[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Noalyss-commit] [noalyss] 18/24: Additional tax : remains when correct
From: |
Dany De Bontridder |
Subject: |
[Noalyss-commit] [noalyss] 18/24: Additional tax : remains when correct operation Cosmetic |
Date: |
Tue, 12 Jul 2022 07:05:34 -0400 (EDT) |
sparkyx pushed a commit to branch master
in repository noalyss.
commit a4c1c3c1200e2a23e2c08cef86c00e98d91b4b80
Author: sparkyx <danydb@noalyss.eu>
AuthorDate: Tue May 31 19:12:00 2022 +0200
Additional tax : remains when correct operation
Cosmetic
---
html/js/acc_ledger.js | 1 -
include/class/acc_ledger.class.php | 5 ++++-
include/template/form_ledger_detail.php | 12 ++++++------
3 files changed, 10 insertions(+), 8 deletions(-)
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=<<<EOF
onchange='if (! this.checked) {
$("other_tax_amount").value=0;}compute_all_ledger();'
EOF;
diff --git a/include/template/form_ledger_detail.php
b/include/template/form_ledger_detail.php
index 2685b6fcf..d3b536b56 100644
--- a/include/template/form_ledger_detail.php
+++ b/include/template/form_ledger_detail.php
@@ -133,11 +133,11 @@ echo '</tr>';
<td class="visible_gt800 visible_gt1155"> </td>
<td> </td>
<td> </td>
- <td class="num visible_gt800"> <span id="htva">0.0</span></td>
+ <td style="text-align:center" class="visible_gt800"> <span
id="htva">0.0</span></td>
<?php if ( $flag_tva=='Y' ) : ?>
<td> </td>
- <td class="num visible_gt800"> <span id="tva">0.0</span> </td>
- <td class="num"> <span id="tvac" >0.0</span> </td>
+ <td style="text-align:center" class="visible_gt800"> <span
id="tva">0.0</span> </td>
+ <td style="text-align:center"> <span id="tvac" >0.0</span> </td>
<?php endif; ?>
</tr>
@@ -147,14 +147,14 @@ echo '</tr>';
</td>
<td class="num visible_gt800"></td>
<?php if ($flag_tva=='Y') {?>
- <td class="num visible_gt800 visible_gt1155"></td>
+ <td style="text-align:center" class="visible_gt800
visible_gt1155"></td>
<td></td>
- <td class="num visible_gt800"></td>
+ <td class="visible_gt800"></td>
<?php } ?>
<td></td>
<td></td>
<td></td>
- <td class="num">
+ <td style="text-align:center">
<span id="p_currency_euro"></span>
</td>
</tr>
- [Noalyss-commit] [noalyss] 10/24: New : 2178 Additional Tax : input in purchase and sale ledger - tax with positive amount - tax with negative amount - tax in currency, (continued)
- [Noalyss-commit] [noalyss] 10/24: New : 2178 Additional Tax : input in purchase and sale ledger - tax with positive amount - tax with negative amount - tax in currency, Dany De Bontridder, 2022/07/12
- [Noalyss-commit] [noalyss] 11/24: Nouveau #0002178: Cotisation de solidarité Impression : Listing (HTML, CSV et PDF) Impression : Extended (HTML, CSV et PDF) Negatif amount and currency, Dany De Bontridder, 2022/07/12
- [Noalyss-commit] [noalyss] 14/24: Additional Tax : database changes, Dany De Bontridder, 2022/07/12
- [Noalyss-commit] [noalyss] 16/24: Additional Tax : export operation PDF, Dany De Bontridder, 2022/07/12
- [Noalyss-commit] [noalyss] 17/24: Additional Tax : automatic compute, Dany De Bontridder, 2022/07/12
- [Noalyss-commit] [noalyss] 23/24: Bug : supplemental tax cannot be deleted, Dany De Bontridder, 2022/07/12
- [Noalyss-commit] [noalyss] 19/24: Cosmetic : waiting box if confirmed, Dany De Bontridder, 2022/07/12
- [Noalyss-commit] [noalyss] 04/24: Remove unauthorized profile, Dany De Bontridder, 2022/07/12
- [Noalyss-commit] [noalyss] 07/24: cosmetic, Dany De Bontridder, 2022/07/12
- [Noalyss-commit] [noalyss] 12/24: Additional Tax : input in purchase and sale ledger - tax with positive amount - tax with negative amount - tax currency - Reverse operation - Correct in operation detail the amount of linked operation, Dany De Bontridder, 2022/07/12
- [Noalyss-commit] [noalyss] 18/24: Additional tax : remains when correct operation Cosmetic,
Dany De Bontridder <=
- [Noalyss-commit] [noalyss] 20/24: Cosmetic : restore administration, we set the max filesize, Dany De Bontridder, 2022/07/12
- [Noalyss-commit] [noalyss] 22/24: Doc, correct bug introduced by auto-correct, Dany De Bontridder, 2022/07/12
- [Noalyss-commit] [noalyss] 15/24: Additional Tax : security, Dany De Bontridder, 2022/07/12
- [Noalyss-commit] [noalyss] 24/24: Bug: Fails when p_callback_true is false, Dany De Bontridder, 2022/07/12
- [Noalyss-commit] [noalyss] 21/24: Correct Cosmetic : waiting_box, Dany De Bontridder, 2022/07/12