Handle case where credit note has no source invoice
This commit is contained in:
parent
960319fd8a
commit
a359c7a681
8
htdocs/fourn/facture/card.php
Normal file → Executable file
8
htdocs/fourn/facture/card.php
Normal file → Executable file
@ -2721,8 +2721,12 @@ if ($action == 'create') {
|
||||
}
|
||||
if ($object->type == FactureFournisseur::TYPE_CREDIT_NOTE) {
|
||||
$facusing = new FactureFournisseur($db);
|
||||
$facusing->fetch($object->fk_facture_source);
|
||||
print ' ('.$langs->transnoentities("CorrectInvoice", $facusing->getNomUrl(1)).')';
|
||||
if ($object->fk_facture_source > 0) {
|
||||
$facusing->fetch($object->fk_facture_source);
|
||||
print ' ('.$langs->transnoentities("CorrectInvoice", $facusing->getNomUrl(1)).')';
|
||||
} else {
|
||||
print ' ('.$langs->transnoentities("NoInvoiceToCorrect").')';
|
||||
}
|
||||
}
|
||||
|
||||
$facidavoir = $object->getListIdAvoirFromInvoice();
|
||||
|
||||
Loading…
Reference in New Issue
Block a user