Merge pull request #15433 from OPEN-DSI/new-takepos-invoice-valid-sale-without-lines

NEW log sale without lines as error in cash desk
This commit is contained in:
Laurent Destailleur 2020-11-18 18:09:10 +01:00 committed by GitHub
commit ad159013e4
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -207,7 +207,8 @@ if ($action == 'valid' && $user->rights->facture->creer)
dol_htmloutput_errors($langs->trans("InvoiceIsAlreadyValidated", "TakePos"), null, 1);
}
} elseif (count($invoice->lines) == 0) {
dol_syslog("Sale without lines");
$error++;
dol_syslog('Sale without lines');
dol_htmloutput_errors($langs->trans("NoLinesToBill", "TakePos"), null, 1);
} elseif (!empty($conf->stock->enabled) && $conf->global->$constantforkey != "1") {
$savconst = $conf->global->STOCK_CALCULATE_ON_BILL;