Merge pull request #24115 from noec764/16_FIX_invoiceAvoirWithPaymentRestAmount_addLine

FIX: Resolve error message due to missing arguments
This commit is contained in:
Laurent Destailleur 2023-03-04 15:13:38 +01:00 committed by GitHub
commit 5e34b85f6a
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -884,8 +884,12 @@ if (empty($reshook)) {
$totalcreditnotes = $facture_source->getSumCreditNotesUsed();
$totaldeposits = $facture_source->getSumDepositsUsed();
$remain_to_pay = abs($facture_source->total_ttc - $totalpaid - $totalcreditnotes - $totaldeposits);
$desc = $langs->trans('invoiceAvoirLineWithPaymentRestAmount');
$retAddLine = $object->addline($desc, $remain_to_pay, 0, 0, 0, 1, 0, 0, '', '', 0, '', 'TTC');
$object->addline($langs->trans('invoiceAvoirLineWithPaymentRestAmount'), $remain_to_pay, 0, 0, 0, 1, 0, 0, '', '', 'TTC');
if ($retAddLine < 0) {
$error++;
}
}
}
}