Merge pull request #23671 from Daviid-P/fix_undefined_facidnext

Fix wrong variable used to fetch replaced invoice
This commit is contained in:
Laurent Destailleur 2023-01-26 00:06:13 +01:00 committed by GitHub
commit 8ae80cec86
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -2940,7 +2940,7 @@ if ($action == 'create') {
}
if (isset($objectidnext) && $objectidnext > 0) {
$facthatreplace = new FactureFournisseur($db);
$facthatreplace->fetch($facidnext);
$facthatreplace->fetch($objectidnext);
print ' ('.$langs->transnoentities("ReplacedByInvoice", $facthatreplace->getNomUrl(1)).')';
}
if ($object->type == FactureFournisseur::TYPE_CREDIT_NOTE || $object->type == FactureFournisseur::TYPE_DEPOSIT) {