[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Noalyss-commit] [noalyss] 01/09: Bug : fix : ITVA does not change the l
From: |
dwm |
Subject: |
[Noalyss-commit] [noalyss] 01/09: Bug : fix : ITVA does not change the label |
Date: |
Fri, 9 Aug 2024 15:18:13 -0400 (EDT) |
sparkyx pushed a commit to branch unstable
in repository noalyss.
commit b73742401dbb1a555d705dde2c78921109f43dcb
Author: sparkyx <danydb@noalyss.eu>
AuthorDate: Fri Aug 9 08:31:44 2024 +0200
Bug : fix : ITVA does not change the label
---
html/ajax_misc.php | 5 +++--
html/js/noalyss_script.js | 4 +++-
include/lib/itva_popup.class.php | 2 +-
3 files changed, 7 insertions(+), 4 deletions(-)
diff --git a/html/ajax_misc.php b/html/ajax_misc.php
index bb3e672c7..a7da58929 100644
--- a/html/ajax_misc.php
+++ b/html/ajax_misc.php
@@ -632,6 +632,7 @@ EOF;
EOF;
break;
case 'label_tva':
+ $code=$http->request('code','string','x');
$cn =Dossier::connect();
$tva=Acc_Tva::build($cn, $id);
@@ -639,13 +640,13 @@ EOF;
$value = _('tva inconnue');
else
{
- $value=$tva->tva_label;
+ $value=htmlentities($tva->tva_label);
}
header('Content-type: text/xml; charset=UTF-8');
echo <<<EOF
<?xml version="1.0" encoding="UTF-8"?>
<data>
-<code>$id</code>
+<code>$code</code>
<value>$value</value>
</data>
EOF;
diff --git a/html/js/noalyss_script.js b/html/js/noalyss_script.js
index bb584f94a..2265b3aa5 100644
--- a/html/js/noalyss_script.js
+++ b/html/js/noalyss_script.js
@@ -626,8 +626,10 @@ function popup_select_tva(obj, p_function_callback) {
function set_tva_label(obj) {
try {
var queryString = "gDossier=" + obj.gDossier + "&op=label_tva" +
"&id=" + obj.value;
- if (obj.jcode)
+ if (obj.jcode )
queryString += '&code=' + obj.jcode;
+ else if ( obj.getAttribute("jcode") )
+ queryString += '&code=' + obj.getAttribute("jcode") ;
var action = new Ajax.Request(
"ajax_misc.php",
{
diff --git a/include/lib/itva_popup.class.php b/include/lib/itva_popup.class.php
index efcfce12b..13bb6b3bc 100644
--- a/include/lib/itva_popup.class.php
+++ b/include/lib/itva_popup.class.php
@@ -145,7 +145,7 @@ class ITva_Popup extends HtmlInput
list="dl_tva_%s" autocomplete="off">';
$r = sprintf($str, $this->name, $this->value, $this->id,
_("C.TVA"),$this->js, $strAttribut,$this->id);
$r.=$code;
- $r.=$this->make_datalist();
+
if ($this->in_table)
$table = '<table>' . '<tr>' . td($r);
- [Noalyss-commit] [noalyss] branch unstable updated (451b9cb7c -> 99fbccdf1), dwm, 2024/08/09
- [Noalyss-commit] [noalyss] 01/09: Bug : fix : ITVA does not change the label,
dwm <=
- [Noalyss-commit] [noalyss] 03/09: CFGPRO : detail menu : add button close, dwm, 2024/08/09
- [Noalyss-commit] [noalyss] 02/09: CFGMENU : cosmetic, dwm, 2024/08/09
- [Noalyss-commit] [noalyss] 04/09: cfgplugin : activate plugin with simple click not confirmation needed, dwm, 2024/08/09
- [Noalyss-commit] [noalyss] 06/09: CMCARD : template of card, drag'n drop to order the attributes, dwm, 2024/08/09
- [Noalyss-commit] [noalyss] 07/09: Change menu code , replace CFG by C0 or C1 , new standard, dwm, 2024/08/09
- [Noalyss-commit] [noalyss] 08/09: Fix : gettext for empty string calls the file header, dwm, 2024/08/09
- [Noalyss-commit] [noalyss] 09/09: Code clean : remove debug info, dwm, 2024/08/09
- [Noalyss-commit] [noalyss] 05/09: HtmlInput::get_node_attribute protect the attribute with htmlentity, dwm, 2024/08/09