mirror of
				https://github.com/invoiceninja/invoiceninja.git
				synced 2025-11-02 22:57:33 -05:00 
			
		
		
		
	Payment date is an optional
This commit is contained in:
		
							parent
							
								
									696699b62c
								
							
						
					
					
						commit
						ef11b3eea1
					
				@ -80,7 +80,9 @@ class StorePaymentRequest extends Request
 | 
				
			|||||||
 | 
					
 | 
				
			||||||
        $input['is_manual'] = true;
 | 
					        $input['is_manual'] = true;
 | 
				
			||||||
        
 | 
					        
 | 
				
			||||||
        info(print_r($input,1));
 | 
					        if(!isset($input['date'])) {
 | 
				
			||||||
 | 
					            $input['date'] = now()->format('Y-m-d');
 | 
				
			||||||
 | 
					        }
 | 
				
			||||||
        
 | 
					        
 | 
				
			||||||
        $this->replace($input);
 | 
					        $this->replace($input);
 | 
				
			||||||
    }
 | 
					    }
 | 
				
			||||||
@ -90,7 +92,7 @@ class StorePaymentRequest extends Request
 | 
				
			|||||||
        $rules = [
 | 
					        $rules = [
 | 
				
			||||||
            'amount' => 'numeric|required',
 | 
					            'amount' => 'numeric|required',
 | 
				
			||||||
            'amount' => [new PaymentAmountsBalanceRule(),new ValidCreditsPresentRule()],
 | 
					            'amount' => [new PaymentAmountsBalanceRule(),new ValidCreditsPresentRule()],
 | 
				
			||||||
            'date' => 'required',
 | 
					            //'date' => 'required',
 | 
				
			||||||
            'client_id' => 'bail|required|exists:clients,id',
 | 
					            'client_id' => 'bail|required|exists:clients,id',
 | 
				
			||||||
            'invoices.*.invoice_id' => 'required|distinct|exists:invoices,id',
 | 
					            'invoices.*.invoice_id' => 'required|distinct|exists:invoices,id',
 | 
				
			||||||
            'invoices.*.invoice_id' => new ValidInvoicesRules($this->all()),
 | 
					            'invoices.*.invoice_id' => new ValidInvoicesRules($this->all()),
 | 
				
			||||||
 | 
				
			|||||||
		Loading…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user