mirror of
				https://github.com/invoiceninja/invoiceninja.git
				synced 2025-10-31 12:37:32 -04:00 
			
		
		
		
	Minor fixes for subscriptions
This commit is contained in:
		
							parent
							
								
									7cb4806a65
								
							
						
					
					
						commit
						1e83b729d5
					
				| @ -62,12 +62,6 @@ class StoreSubscriptionRequest extends Request | ||||
|     { | ||||
|         $input = $this->all(); | ||||
| 
 | ||||
|         // if(array_key_exists('webhook_configuration', $input) && (!is_object(json_decode($input['webhook_configuration']))))
 | ||||
|         //     $input['webhook_configuration'] = new \stdClass;
 | ||||
|          | ||||
|         // if(!array_key_exists('webhook_configuration', $input))
 | ||||
|         //     $input['webhook_configuration'] = new \stdClass;
 | ||||
| 
 | ||||
|         $this->replace($input); | ||||
|     } | ||||
| } | ||||
|  | ||||
| @ -21,6 +21,7 @@ class Subscription extends BaseModel | ||||
|     use HasFactory, SoftDeletes; | ||||
| 
 | ||||
|     protected $fillable = [ | ||||
|         'assigned_user_id', | ||||
|         'product_ids', | ||||
|         'recurring_product_ids', | ||||
|         'frequency_id', | ||||
|  | ||||
| @ -40,6 +40,7 @@ class SubscriptionTransformer extends EntityTransformer | ||||
|             'user_id' => $this->encodePrimaryKey($subscription->user_id), | ||||
|             'group_id' => $this->encodePrimaryKey($subscription->group_id), | ||||
|             'product_ids' => (string)$subscription->product_ids, | ||||
|             'name' => (string)$subscription->name, | ||||
|             'recurring_product_ids' => (string)$subscription->recurring_product_ids, | ||||
|             'assigned_user_id' => $this->encodePrimaryKey($subscription->assigned_user_id), | ||||
|             'company_id' => $this->encodePrimaryKey($subscription->company_id), | ||||
|  | ||||
| @ -192,6 +192,7 @@ class HtmlEngine | ||||
|         $data['$taxes'] = ['value' => Number::formatMoney($this->entity_calc->getItemTotalTaxes(), $this->client) ?: ' ', 'label' => ctrans('texts.taxes')]; | ||||
|         $data['$invoice.taxes'] = &$data['$taxes']; | ||||
| 
 | ||||
|         $data['$user.name'] = ['value' => $this->entity->user->present()->name(), 'label' => ctrans('texts.name')]; | ||||
|         $data['$user_iban'] = ['value' => $this->helpers->formatCustomFieldValue($this->company->custom_fields, 'company1', $this->settings->custom_value1, $this->client) ?: ' ', 'label' => $this->helpers->makeCustomField($this->company->custom_fields, 'company1')]; | ||||
|         $data['$invoice.custom1'] = ['value' => $this->helpers->formatCustomFieldValue($this->company->custom_fields, 'invoice1', $this->entity->custom_value1, $this->client) ?: ' ', 'label' => $this->helpers->makeCustomField($this->company->custom_fields, 'invoice1')]; | ||||
|         $data['$invoice.custom2'] = ['value' => $this->helpers->formatCustomFieldValue($this->company->custom_fields, 'invoice2', $this->entity->custom_value2, $this->client) ?: ' ', 'label' => $this->helpers->makeCustomField($this->company->custom_fields, 'invoice2')]; | ||||
|  | ||||
| @ -79,6 +79,7 @@ class SystemHealth | ||||
|             'exec' => (bool)self::checkExecWorks(), | ||||
|             'open_basedir' => (bool)self::checkOpenBaseDir(), | ||||
|             'mail_mailer' => (string)self::checkMailMailer(), | ||||
|             'flutter_renderer' => (string)config('ninja.flutter_canvas_kit'), | ||||
|         ]; | ||||
|     } | ||||
| 
 | ||||
|  | ||||
| @ -0,0 +1,30 @@ | ||||
| <?php | ||||
| 
 | ||||
| use Illuminate\Database\Migrations\Migration; | ||||
| use Illuminate\Database\Schema\Blueprint; | ||||
| use Illuminate\Support\Facades\Schema; | ||||
| 
 | ||||
| class ModifyColumnOnSubscriptionsTable extends Migration | ||||
| { | ||||
|     /** | ||||
|      * Run the migrations. | ||||
|      * | ||||
|      * @return void | ||||
|      */ | ||||
|     public function up() | ||||
|     { | ||||
|         Schema::table('subscriptions', function (Blueprint $table) { | ||||
|             $table->unsignedInteger('assigned_user_id')->nullable()->change(); | ||||
|         }); | ||||
|     } | ||||
| 
 | ||||
|     /** | ||||
|      * Reverse the migrations. | ||||
|      * | ||||
|      * @return void | ||||
|      */ | ||||
|     public function down() | ||||
|     { | ||||
|         //
 | ||||
|     } | ||||
| } | ||||
		Loading…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user