[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Noalyss-commit] [noalyss] 10/11: Fix : retrieve label from tva_code
From: |
dwm |
Subject: |
[Noalyss-commit] [noalyss] 10/11: Fix : retrieve label from tva_code |
Date: |
Thu, 8 Aug 2024 14:52:17 -0400 (EDT) |
sparkyx pushed a commit to branch unstable
in repository noalyss.
commit fc7a474c192ecda8023ecc818a9b0dbdbf9f1d51
Author: sparkyx <danydb@noalyss.eu>
AuthorDate: Thu Aug 8 20:51:45 2024 +0200
Fix : retrieve label from tva_code
---
html/ajax_misc.php | 12 +++++-------
1 file changed, 5 insertions(+), 7 deletions(-)
diff --git a/html/ajax_misc.php b/html/ajax_misc.php
index 888f171eb..bb3e672c7 100644
--- a/html/ajax_misc.php
+++ b/html/ajax_misc.php
@@ -633,21 +633,19 @@ EOF;
break;
case 'label_tva':
$cn =Dossier::connect();
- if (isNumber($id) == 0)
+ $tva=Acc_Tva::build($cn, $id);
+
+ if ($tva->tva_id == -1 )
$value = _('tva inconnue');
else
{
- $Res = $cn->get_array("select * from tva_rate where
tva_id = $1", array($id));
- if (count($Res) == 0)
- $value = _('tva inconnue');
- else
- $value = $Res[0]['tva_label'];
+ $value=$tva->tva_label;
}
header('Content-type: text/xml; charset=UTF-8');
echo <<<EOF
<?xml version="1.0" encoding="UTF-8"?>
<data>
-<code>$code</code>
+<code>$id</code>
<value>$value</value>
</data>
EOF;
- [Noalyss-commit] [noalyss] branch unstable updated (65dd4e31c -> 451b9cb7c), dwm, 2024/08/08
- [Noalyss-commit] [noalyss] 03/11: GESTION : operation add receipt number, dwm, 2024/08/08
- [Noalyss-commit] [noalyss] 11/11: documentation, dwm, 2024/08/08
- [Noalyss-commit] [noalyss] 01/11: Documentation, dwm, 2024/08/08
- [Noalyss-commit] [noalyss] 07/11: CCARD : rewrite, dwm, 2024/08/08
- [Noalyss-commit] [noalyss] 04/11: CCARD : rewriting interface, code cleanup, dwm, 2024/08/08
- [Noalyss-commit] [noalyss] 08/11: new function alternate_row_color_list, dwm, 2024/08/08
- [Noalyss-commit] [noalyss] 09/11: CCARD : remove category card with confirm, remove dead code, dwm, 2024/08/08
- [Noalyss-commit] [noalyss] 05/11: Javascript : documentation avec JSDOC, dwm, 2024/08/08
- [Noalyss-commit] [noalyss] 06/11: Cosmetic h1.legend, legend & fieldset, dwm, 2024/08/08
- [Noalyss-commit] [noalyss] 10/11: Fix : retrieve label from tva_code,
dwm <=
- [Noalyss-commit] [noalyss] 02/11: Bug : fix create event from AGENDA, dwm, 2024/08/08