1
0
mirror of https://github.com/invoiceninja/invoiceninja.git synced 2024-11-10 05:02:36 +01:00

Require invoice_items in invoice requests

This commit is contained in:
Hillel Coren 2018-02-19 11:57:22 +02:00
parent 4499fb7a19
commit c9f532dc77
2 changed files with 2 additions and 2 deletions

View File

@ -34,7 +34,7 @@ class UpdateInvoiceAPIRequest extends InvoiceRequest
$invoiceId = $this->entity()->id;
$rules = [
'invoice_items' => 'valid_invoice_items',
'invoice_items' => 'required|valid_invoice_items',
'invoice_number' => 'unique:invoices,invoice_number,' . $invoiceId . ',id,account_id,' . $this->user()->account_id,
'discount' => 'positive',
//'invoice_date' => 'date',

View File

@ -31,7 +31,7 @@ class UpdateInvoiceRequest extends InvoiceRequest
$rules = [
'client' => 'required',
'invoice_items' => 'valid_invoice_items',
'invoice_items' => 'required|valid_invoice_items',
'invoice_number' => 'required|unique:invoices,invoice_number,' . $invoiceId . ',id,account_id,' . $this->user()->account_id,
'discount' => 'positive',
'invoice_date' => 'required',