Fix : retrieve label from tva_code
This commit is contained in:
parent
ff510f6989
commit
fc7a474c19
1 changed files with 5 additions and 7 deletions
|
|
@ -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;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue