From 99fd8b99604070d855d772c9415626a8b4e96ba7 Mon Sep 17 00:00:00 2001 From: VESSILLER Date: Tue, 8 Aug 2023 10:11:48 +0200 Subject: [PATCH 1/2] NEW no need to create invoice supplier object on supplier card for standalone credit note --- htdocs/fourn/facture/card.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/htdocs/fourn/facture/card.php b/htdocs/fourn/facture/card.php index d2f9b482c63..3876ac22d7e 100644 --- a/htdocs/fourn/facture/card.php +++ b/htdocs/fourn/facture/card.php @@ -3095,12 +3095,12 @@ if ($action == 'create') { print ' '.$langs->transnoentities("ReplaceInvoice", $facreplaced->getNomUrl(1)).''; } if ($object->type == FactureFournisseur::TYPE_CREDIT_NOTE) { - $facusing = new FactureFournisseur($db); if ($object->fk_facture_source > 0) { + $facusing = new FactureFournisseur($db); $facusing->fetch($object->fk_facture_source); print ' '.$langs->transnoentities("CorrectInvoice", $facusing->getNomUrl(1)).''; } else { - print ' '.$langs->transnoentities("CorrectedInvoiceNotFound").''; + print ' '.$langs->transnoentities("NoInvoiceToCorrect").''; } } From a59c95d176002a558bbba545fc45f6276b817b42 Mon Sep 17 00:00:00 2001 From: VESSILLER Date: Wed, 9 Aug 2023 08:25:31 +0200 Subject: [PATCH 2/2] Replace translate key with CorrectedInvoiceNotFound --- htdocs/fourn/facture/card.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/htdocs/fourn/facture/card.php b/htdocs/fourn/facture/card.php index 3876ac22d7e..3deb0711e00 100644 --- a/htdocs/fourn/facture/card.php +++ b/htdocs/fourn/facture/card.php @@ -3100,7 +3100,7 @@ if ($action == 'create') { $facusing->fetch($object->fk_facture_source); print ' '.$langs->transnoentities("CorrectInvoice", $facusing->getNomUrl(1)).''; } else { - print ' '.$langs->transnoentities("NoInvoiceToCorrect").''; + print ' '.$langs->transnoentities("CorrectedInvoiceNotFound").''; } }