diff --git a/htdocs/takepos/invoice.php b/htdocs/takepos/invoice.php index 58fcb5f25b9..fc1e690e263 100644 --- a/htdocs/takepos/invoice.php +++ b/htdocs/takepos/invoice.php @@ -419,9 +419,10 @@ if ($action == 'creditnote') } } -if ($action == 'history') +if ($action == 'history' || $action=='creditnote') { - $placeid = (int) GETPOST('placeid', 'int'); + if ($action=='creditnote') $placeid = $creditnote->id; + else $placeid = (int) GETPOST('placeid', 'int'); $invoice = new Facture($db); $invoice->fetch($placeid); } @@ -769,7 +770,7 @@ if ($action == "order" and $placeid != 0) } $sectionwithinvoicelink = ''; -if ($action == "valid" || $action == "history") +if ($action == "valid" || $action == "history" || $action == 'creditnote') { $sectionwithinvoicelink .= ''."\n"; $sectionwithinvoicelink .= ''; @@ -1315,7 +1316,7 @@ if ($placeid > 0) print ''; -if ($action == "valid" || $action == "history") { +if (($action == "valid" || $action == "history") && $invoice->type != Facture::TYPE_CREDIT_NOTE) { print ''; }