mirror of
				https://github.com/invoiceninja/invoiceninja.git
				synced 2025-11-04 04:07:32 -05:00 
			
		
		
		
	frequency_id optional for scheduler
This commit is contained in:
		
							parent
							
								
									5bca8e9a10
								
							
						
					
					
						commit
						2196d8fc20
					
				@ -465,7 +465,10 @@ class CompanySettings extends BaseSettings
 | 
				
			|||||||
 | 
					
 | 
				
			||||||
    public $allow_billable_task_items = false;
 | 
					    public $allow_billable_task_items = false;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					    public $show_task_item_description = false;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
    public static $casts = [
 | 
					    public static $casts = [
 | 
				
			||||||
 | 
					        'show_task_item_description'         => 'bool',
 | 
				
			||||||
        'allow_billable_task_items'          => 'bool',
 | 
					        'allow_billable_task_items'          => 'bool',
 | 
				
			||||||
        'accept_client_input_quote_approval' => 'bool',
 | 
					        'accept_client_input_quote_approval' => 'bool',
 | 
				
			||||||
        'custom_sending_email'               => 'string',
 | 
					        'custom_sending_email'               => 'string',
 | 
				
			||||||
 | 
				
			|||||||
@ -34,7 +34,7 @@ class StoreSchedulerRequest extends Request
 | 
				
			|||||||
        $rules = [
 | 
					        $rules = [
 | 
				
			||||||
            'name' => ['bail', 'required', Rule::unique('schedulers')->where('company_id', auth()->user()->company()->id)],
 | 
					            'name' => ['bail', 'required', Rule::unique('schedulers')->where('company_id', auth()->user()->company()->id)],
 | 
				
			||||||
            'is_paused' => 'bail|sometimes|boolean',
 | 
					            'is_paused' => 'bail|sometimes|boolean',
 | 
				
			||||||
            'frequency_id' => 'bail|required|integer|digits_between:1,12',
 | 
					            'frequency_id' => 'bail|sometimes|integer|digits_between:1,12',
 | 
				
			||||||
            'next_run' => 'bail|required|date:Y-m-d|after_or_equal:today',
 | 
					            'next_run' => 'bail|required|date:Y-m-d|after_or_equal:today',
 | 
				
			||||||
            'next_run_client' => 'bail|sometimes|date:Y-m-d',
 | 
					            'next_run_client' => 'bail|sometimes|date:Y-m-d',
 | 
				
			||||||
            'template' => 'bail|required|string',
 | 
					            'template' => 'bail|required|string',
 | 
				
			||||||
 | 
				
			|||||||
@ -30,7 +30,7 @@ class UpdateSchedulerRequest extends Request
 | 
				
			|||||||
        $rules = [
 | 
					        $rules = [
 | 
				
			||||||
            'name' => ['bail', 'sometimes', Rule::unique('schedulers')->where('company_id', auth()->user()->company()->id)->ignore($this->task_scheduler->id)],
 | 
					            'name' => ['bail', 'sometimes', Rule::unique('schedulers')->where('company_id', auth()->user()->company()->id)->ignore($this->task_scheduler->id)],
 | 
				
			||||||
            'is_paused' => 'bail|sometimes|boolean',
 | 
					            'is_paused' => 'bail|sometimes|boolean',
 | 
				
			||||||
            'frequency_id' => 'bail|required|integer|digits_between:1,12',
 | 
					            'frequency_id' => 'bail|sometimes|integer|digits_between:1,12',
 | 
				
			||||||
            'next_run' => 'bail|required|date:Y-m-d|after_or_equal:today',
 | 
					            'next_run' => 'bail|required|date:Y-m-d|after_or_equal:today',
 | 
				
			||||||
            'next_run_client' => 'bail|sometimes|date:Y-m-d',
 | 
					            'next_run_client' => 'bail|sometimes|date:Y-m-d',
 | 
				
			||||||
            'template' => 'bail|required|string',
 | 
					            'template' => 'bail|required|string',
 | 
				
			||||||
 | 
				
			|||||||
@ -59,7 +59,6 @@ class BaseDriver extends AbstractPaymentDriver
 | 
				
			|||||||
    /* The Invitation */
 | 
					    /* The Invitation */
 | 
				
			||||||
    public $invitation;
 | 
					    public $invitation;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					 | 
				
			||||||
    /* The client */
 | 
					    /* The client */
 | 
				
			||||||
    public $client;
 | 
					    public $client;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
@ -91,7 +90,7 @@ class BaseDriver extends AbstractPaymentDriver
 | 
				
			|||||||
    /** @var array */
 | 
					    /** @var array */
 | 
				
			||||||
    public $required_fields = [];
 | 
					    public $required_fields = [];
 | 
				
			||||||
 | 
					
 | 
				
			||||||
    public function __construct(CompanyGateway $company_gateway, ?Client $client = null, $invitation = false)
 | 
					    public function __construct(CompanyGateway $company_gateway, ?Client $client = null, $invitation = null)
 | 
				
			||||||
    {
 | 
					    {
 | 
				
			||||||
        $this->company_gateway = $company_gateway;
 | 
					        $this->company_gateway = $company_gateway;
 | 
				
			||||||
        $this->invitation = $invitation;
 | 
					        $this->invitation = $invitation;
 | 
				
			||||||
 | 
				
			|||||||
		Loading…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user