Merge pull request #18459 from henrynopo/patch-9

Fix error of supplier invoice (variable amount)
This commit is contained in:
Laurent Destailleur 2021-08-24 15:09:53 +02:00 committed by GitHub
commit c3fe1bfdc0
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -861,7 +861,7 @@ if (empty($reshook)) {
} }
} }
// Standard invoice or Deposit invoice, created from a Predefined template invoice // Standard invoice or Deposit invoice, not from a Predefined template invoice
if (GETPOST('type') == FactureFournisseur::TYPE_STANDARD || GETPOST('type') == FactureFournisseur::TYPE_DEPOSIT) { if (GETPOST('type') == FactureFournisseur::TYPE_STANDARD || GETPOST('type') == FactureFournisseur::TYPE_DEPOSIT) {
if (GETPOST('socid', 'int') < 1) { if (GETPOST('socid', 'int') < 1) {
setEventMessages($langs->trans('ErrorFieldRequired', $langs->transnoentities('Supplier')), null, 'errors'); setEventMessages($langs->trans('ErrorFieldRequired', $langs->transnoentities('Supplier')), null, 'errors');
@ -1085,12 +1085,12 @@ if (empty($reshook)) {
1, 1,
0, 0,
0, 0,
0,
null, null,
$object->origin, $object->origin,
0, 0,
'', '',
$lines[$i]->special_code, $lines[$i]->special_code,
0,
0 0
//,$langs->trans('Deposit') //Deprecated //,$langs->trans('Deposit') //Deprecated
); );