From 43ced3c6815d6fbb61782874aaad2726bd32c8ef Mon Sep 17 00:00:00 2001 From: "jove@bisquerra.com" Date: Tue, 10 Nov 2020 21:45:15 +0100 Subject: [PATCH] Credit note improvement in TakePOS --- htdocs/takepos/invoice.php | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) 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 ''; }