[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Noalyss-commit] [noalyss] 05/33: Bug : pour non-assujetti , pas de calc
From: |
Dany De Bontridder |
Subject: |
[Noalyss-commit] [noalyss] 05/33: Bug : pour non-assujetti , pas de calcul en devise |
Date: |
Thu, 11 Nov 2021 06:02:43 -0500 (EST) |
sparkyx pushed a commit to branch master
in repository noalyss.
commit d699d6409de820644e131f74af62b3f25eb31955
Author: sparkyx <danydb@noalyss.eu>
AuthorDate: Thu Sep 30 23:40:41 2021 +0200
Bug : pour non-assujetti , pas de calcul en devise
---
html/js/acc_currency.js | 2 ++
include/class/acc_ledger_sale.class.php | 13 +++++++------
include/template/form_ledger_detail.php | 6 +++---
3 files changed, 12 insertions(+), 9 deletions(-)
diff --git a/html/js/acc_currency.js b/html/js/acc_currency.js
index 6f56135..5c6d238 100644
--- a/html/js/acc_currency.js
+++ b/html/js/acc_currency.js
@@ -106,6 +106,8 @@ function CurrencyCompute(p_rate,p_update)
if ($('tvac')) {
tvac=$('tvac').innerHTML;
+ } else if ($("htva")) {
+ tvac=$('htva').innerHTML;
}
if ( isNaN(tvac)) {
diff --git a/include/class/acc_ledger_sale.class.php
b/include/class/acc_ledger_sale.class.php
index 2e4568c..b8e579c 100644
--- a/include/class/acc_ledger_sale.class.php
+++ b/include/class/acc_ledger_sale.class.php
@@ -1197,10 +1197,12 @@ EOF;
function input($p_array = null, $p_readonly = 0) {
global $g_parameter, $g_user;
- if ($p_array != null)
- extract($p_array, EXTR_SKIP);
$http=new HttpInput();
-
+ if ($p_array != null) {
+ extract($p_array, EXTR_SKIP);
+ $http->set_array($p_array);
+ }
+ $http->set_array([]);
$flag_tva = $g_parameter->MY_TVA_USE;
/* Add button */
@@ -1484,12 +1486,12 @@ EOF;
// Currency
$currency_select = $this->CurrencyInput("currency_code",
"p_currency_rate" , "p_currency_euro");
-
$currency_select->selected=$http->request('p_currency_code','string',0);
+
$currency_select->selected=$http->extract('p_currency_code','string',0);
$currency_input=new INum("p_currency_rate");
$currency_input->id="p_currency_rate";
$currency_input->prec=6;
- $currency_input->value=$http->request('p_currency_rate','string',1);
+ $currency_input->value=$http->extract('p_currency_rate','string',1);
$currency_input->javascript='onchange="format_number(this,4);CurrencyCompute(\'p_currency_rate\',\'p_currency_euro\');"';
$currency=new Acc_Currency($this->db,0);
@@ -1504,7 +1506,6 @@ EOF;
$op->set_jrn_type("VEN");
$op->set_p_jrn($this->id);
$op->set_od_direct('f');
- $http=new \HttpInput();
$url=http_build_query(array('p_jrn_predef'=>$this->id,
'ac'=>$http->request('ac'),
'gDossier'=>dossier::id()));
echo $op->form_get('do.php?'.$url);
diff --git a/include/template/form_ledger_detail.php
b/include/template/form_ledger_detail.php
index 4e12bd6..2685b6f 100644
--- a/include/template/form_ledger_detail.php
+++ b/include/template/form_ledger_detail.php
@@ -134,8 +134,8 @@ echo '</tr>';
<td> </td>
<td> </td>
<td class="num visible_gt800"> <span id="htva">0.0</span></td>
- <td> </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>
<?php endif; ?>
@@ -149,8 +149,8 @@ echo '</tr>';
<?php if ($flag_tva=='Y') {?>
<td class="num visible_gt800 visible_gt1155"></td>
<td></td>
-<?php } ?>
<td class="num visible_gt800"></td>
+<?php } ?>
<td></td>
<td></td>
<td></td>
@@ -165,7 +165,7 @@ echo '</tr>';
<script>
- if ($('p_currency_code').value != -1) {
+ if ($('p_currency_code').value != 0) {
$('row_currency').show();
}
compute_all_ledger();
- [Noalyss-commit] [noalyss] 04/33: Sale & Purchase Quantity with 2 dec., (continued)
- [Noalyss-commit] [noalyss] 04/33: Sale & Purchase Quantity with 2 dec., Dany De Bontridder, 2021/11/11
- [Noalyss-commit] [noalyss] 01/33: Cosmetic : move dialog horizontally and vertically, Dany De Bontridder, 2021/11/11
- [Noalyss-commit] [noalyss] 02/33: Cosmetic : add button close for filter, dialog box search operation, TVA, Dany De Bontridder, 2021/11/11
- [Noalyss-commit] [noalyss] 09/33: Rounded for currency, Dany De Bontridder, 2021/11/11
- [Noalyss-commit] [noalyss] 08/33: Operation details : calcul correctement la différence avec les opérations extournées, Dany De Bontridder, 2021/11/11
- [Noalyss-commit] [noalyss] 12/33: Button close for new card, Dany De Bontridder, 2021/11/11
- [Noalyss-commit] [noalyss] 06/33: Bug rounded : show amount in currency with 4 dec., Dany De Bontridder, 2021/11/11
- [Noalyss-commit] [noalyss] 10/33: For Misc Operation in currency , show the currency amount / row, Dany De Bontridder, 2021/11/11
- [Noalyss-commit] [noalyss] 11/33: Bug for reversed operation when currency are used, Dany De Bontridder, 2021/11/11
- [Noalyss-commit] [noalyss] 03/33: Improve HttpInput::extract , the array is set and not passed anymore, Dany De Bontridder, 2021/11/11
- [Noalyss-commit] [noalyss] 05/33: Bug : pour non-assujetti , pas de calcul en devise,
Dany De Bontridder <=
- [Noalyss-commit] [noalyss] 07/33: Bug for reversed operation when currency are used, Dany De Bontridder, 2021/11/11
- [Noalyss-commit] [noalyss] 14/33: Typo, Dany De Bontridder, 2021/11/11
- [Noalyss-commit] [noalyss] 13/33: Compute.php it happens that the argument are not numeric, Dany De Bontridder, 2021/11/11
- [Noalyss-commit] [noalyss] 16/33: Documentation, Dany De Bontridder, 2021/11/11
- [Noalyss-commit] [noalyss] 15/33: Bug #2079 : 0002079: Recherche de carte : guillement ne passe pas, Dany De Bontridder, 2021/11/11
- [Noalyss-commit] [noalyss] 21/33: Cosmetic #2082 : OD parfois ajout différence de change, Dany De Bontridder, 2021/11/11
- [Noalyss-commit] [noalyss] 18/33: Bug : currency_id was nullable script compatible PSQL 10, Dany De Bontridder, 2021/11/11
- [Noalyss-commit] [noalyss] 20/33: Cosmetic #0002080 : NOT-FOUND, Dany De Bontridder, 2021/11/11
- [Noalyss-commit] [noalyss] 22/33: Cosmetic #0002081: PRINTTVA : l'export PDF de la TVA, Dany De Bontridder, 2021/11/11
- [Noalyss-commit] [noalyss] 23/33: Fix : date before 2000 throws an exception, Dany De Bontridder, 2021/11/11