diff --git a/html/js/acc_ledger.js b/html/js/acc_ledger.js
index 1887952a7..0ebebe666 100644
--- a/html/js/acc_ledger.js
+++ b/html/js/acc_ledger.js
@@ -506,7 +506,6 @@ function compute_ledger(p_ctl_nb)
let other_tax=g("other_tax");
let other_tax_id=(other_tax && other_tax.checked)?other_tax.value:-1;
- console.debug(`other tax is ${other_tax_id}`);
var querystring = { gDossier : dossier , c : qcode ,t :tva_id,p : price , q:quantity,n:p_ctl_nb,'other_tax_id':other_tax_id};
var action = new Ajax.Request(
"compute.php",
diff --git a/include/class/acc_ledger.class.php b/include/class/acc_ledger.class.php
index 01e82fc6a..5c1f6790c 100644
--- a/include/class/acc_ledger.class.php
+++ b/include/class/acc_ledger.class.php
@@ -3197,6 +3197,7 @@ class Acc_Ledger extends jrn_def_sql
$http=new HttpInput();
$nb=$http->post("nb_item", "number", 0);
echo HtmlInput::post_to_hidden(['p_currency_rate','p_currency_code']);
+ echo HtmlInput::post_to_hidden(['other_tax','other_tax_amount']);
for ($i=0; $i<$nb; $i++)
{
echo HtmlInput::post_to_hidden(
@@ -3360,15 +3361,17 @@ class Acc_Ledger extends jrn_def_sql
*/
function input_additional_tax()
{
-
+ $http=new HttpInput();
if ($this->has_other_tax() == false ) { return "";}
$amount=new INum("other_tax_amount",0);
+ $amount->value=$http->request("other_tax_amount","number",0);
$amount->javascript='onchange="format_number(this,2);refresh_ledger();"';
$msg=_("Montant");
$row=$this->cn->get_row("select ac_id,ac_label,ac_rate from acc_other_tax where $1 = any (ajrn_def_id)",
[$this->id]);
$checkbox=new ICheckBox("other_tax",$row['ac_id']);
+ $checkbox->set_check($http->request("other_tax","number",-1));
$checkbox->javascript=<<';
| |
|
|
- 0.0 |
+ 0.0 |
|
- 0.0 |
- 0.0 |
+ 0.0 |
+ 0.0 |
@@ -147,14 +147,14 @@ echo '';
|
- |
+ |
|
- |
+ |
|
|
|
-
+ |
|