mirror of
https://github.com/invoiceninja/invoiceninja.git
synced 2025-07-09 03:14:30 -04:00
Updates for partial due date validation when creating an invoice
This commit is contained in:
parent
512ae767bd
commit
548e5efb3a
@ -74,7 +74,7 @@ class StoreInvoiceRequest extends Request
|
|||||||
$rules['tax_name3'] = 'bail|sometimes|string|nullable';
|
$rules['tax_name3'] = 'bail|sometimes|string|nullable';
|
||||||
$rules['exchange_rate'] = 'bail|sometimes|numeric';
|
$rules['exchange_rate'] = 'bail|sometimes|numeric';
|
||||||
$rules['partial'] = 'bail|sometimes|nullable|numeric|gte:0';
|
$rules['partial'] = 'bail|sometimes|nullable|numeric|gte:0';
|
||||||
$rules['partial_due_date'] = ['bail', 'sometimes', 'exclude_if:partial,0', Rule::requiredIf(fn () => $this->partial > 0), 'date', 'before:due_date'];
|
$rules['partial_due_date'] = ['bail', 'sometimes', 'exclude_if:partial,0', Rule::requiredIf(fn () => $this->partial > 0), 'date'];
|
||||||
|
|
||||||
return $rules;
|
return $rules;
|
||||||
}
|
}
|
||||||
|
@ -7,8 +7,8 @@ parameters:
|
|||||||
paths:
|
paths:
|
||||||
- app
|
- app
|
||||||
excludePaths:
|
excludePaths:
|
||||||
- vendor/*
|
- 'vendor/*'
|
||||||
- resources/*
|
- 'resources/*/*.php'
|
||||||
- 'app/Jobs/Ninja/*'
|
- 'app/Jobs/Ninja/*'
|
||||||
- 'app/Models/Presenters/*'
|
- 'app/Models/Presenters/*'
|
||||||
- 'app/Console/Commands/*'
|
- 'app/Console/Commands/*'
|
||||||
|
Loading…
x
Reference in New Issue
Block a user