Bug : fix : ITVA does not change the label
This commit is contained in:
parent
451b9cb7c2
commit
b73742401d
3 changed files with 7 additions and 4 deletions
|
|
@ -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;
|
||||
|
|
|
|||
|
|
@ -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",
|
||||
{
|
||||
|
|
|
|||
|
|
@ -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);
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue