From fca26827ecd7fa1a9c576a8a9275658f90621f65 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?M=C3=A9lina?= Date: Wed, 15 Dec 2021 10:47:30 +0100 Subject: [PATCH 1/2] Add constant TAKEPOS_CHANGE_PRICE_HT --- htdocs/takepos/invoice.php | 2 ++ 1 file changed, 2 insertions(+) diff --git a/htdocs/takepos/invoice.php b/htdocs/takepos/invoice.php index 2a951a505ae..61f955636f5 100644 --- a/htdocs/takepos/invoice.php +++ b/htdocs/takepos/invoice.php @@ -680,6 +680,8 @@ if ($action == "updateprice") { } else { if (empty($user->rights->takepos->editlines) || (empty($user->rights->takepos->editorderedlines) && $line->special_code == "4")) { dol_htmloutput_errors($langs->trans("NotEnoughPermissions", "TakePos"), null, 1); + } elseif ($conf->global->TAKEPOS_CHANGE_PRICE_HT == 1) { + $result = $invoice->updateline($line->id, $line->desc, $number, $line->qty, $line->remise_percent, $line->date_start, $line->date_end, $line->tva_tx, $line->localtax1_tx, $line->localtax2_tx, 'HT', $line->info_bits, $line->product_type, $line->fk_parent_line, 0, $line->fk_fournprice, $line->pa_ht, $line->label, $line->special_code, $line->array_options, $line->situation_percent, $line->fk_unit); } else { $result = $invoice->updateline($line->id, $line->desc, $number, $line->qty, $line->remise_percent, $line->date_start, $line->date_end, $line->tva_tx, $line->localtax1_tx, $line->localtax2_tx, 'TTC', $line->info_bits, $line->product_type, $line->fk_parent_line, 0, $line->fk_fournprice, $line->pa_ht, $line->label, $line->special_code, $line->array_options, $line->situation_percent, $line->fk_unit); } From 81bee064afba78ba9c53d7b6260d9a04799efbd9 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?M=C3=A9lina?= Date: Tue, 28 Dec 2021 11:28:58 +0100 Subject: [PATCH 2/2] add getDolGlobalInt --- htdocs/takepos/invoice.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/htdocs/takepos/invoice.php b/htdocs/takepos/invoice.php index 61f955636f5..5e41a3538e3 100644 --- a/htdocs/takepos/invoice.php +++ b/htdocs/takepos/invoice.php @@ -680,7 +680,7 @@ if ($action == "updateprice") { } else { if (empty($user->rights->takepos->editlines) || (empty($user->rights->takepos->editorderedlines) && $line->special_code == "4")) { dol_htmloutput_errors($langs->trans("NotEnoughPermissions", "TakePos"), null, 1); - } elseif ($conf->global->TAKEPOS_CHANGE_PRICE_HT == 1) { + } elseif (getDolGlobalInt('TAKEPOS_CHANGE_PRICE_HT') == 1) { $result = $invoice->updateline($line->id, $line->desc, $number, $line->qty, $line->remise_percent, $line->date_start, $line->date_end, $line->tva_tx, $line->localtax1_tx, $line->localtax2_tx, 'HT', $line->info_bits, $line->product_type, $line->fk_parent_line, 0, $line->fk_fournprice, $line->pa_ht, $line->label, $line->special_code, $line->array_options, $line->situation_percent, $line->fk_unit); } else { $result = $invoice->updateline($line->id, $line->desc, $number, $line->qty, $line->remise_percent, $line->date_start, $line->date_end, $line->tva_tx, $line->localtax1_tx, $line->localtax2_tx, 'TTC', $line->info_bits, $line->product_type, $line->fk_parent_line, 0, $line->fk_fournprice, $line->pa_ht, $line->label, $line->special_code, $line->array_options, $line->situation_percent, $line->fk_unit);