Require invoice number when importing invoices

This commit is contained in:
Hillel Coren 2018-03-26 13:05:28 +03:00
parent 2b81d7ec47
commit 08aed19f9a

View File

@ -393,12 +393,14 @@ class ImportService
}
}
/*
// if the invoice number is blank we'll assign it
if ($entityType == ENTITY_INVOICE && ! $data['invoice_number']) {
$account = Auth::user()->account;
$invoice = Invoice::createNew();
$data['invoice_number'] = $account->getNextNumber($invoice);
}
*/
if (EntityModel::validate($data, $entityType) !== true) {
return false;