MY_TVA_USE == 'Y') echo th(_('Taux TVA'), 'style="text-align:right"'); else echo th(''); if ( $g_parameter->MY_TVA_USE == 'Y') { echo th(_('HTVA'), 'style="text-align:right"'); echo th(_('TVA NP'), 'style="text-align:right"'); echo th(_('TVA'), 'style="text-align:right"'); echo th(_('TVAC'), 'style="text-align:right"'); } else echo th(_('Total'), 'style="text-align:right"'); echo ''; for ($e=0;$edet->array);$e++) { $row=''; $q=$obj->det->array[$e]; $fiche=new Fiche($cn,$q['qs_fiche']); $view_card_detail=HtmlInput::card_detail($fiche->strAttribut(ATTR_DEF_QUICKCODE),"", ' class="line" '); $row.=td($view_card_detail); $input = new ISpan("e_march" . $q['j_id'] . "_label"); $hidden = HtmlInput::hidden("j_id[]", $q['j_id']); $input->value = $fiche->strAttribut(ATTR_DEF_NAME); $row.=td($input->input().$hidden); $sym_tva=''; $pu=0; if ($q['qs_quantite'] != 0) $pu=bcdiv($q['qs_price'],$q['qs_quantite']); $row.=td(nbm($pu),'class="num"'); $row.=td(nbm($q['qs_quantite']),'class="num"'); $sym_tva=''; if ( $g_parameter->MY_TVA_USE=='Y' && $q['qs_vat_code'] != '') { /* retrieve TVA symbol */ $tva=new Acc_Tva($cn,$q['qs_vat_code']); $tva->load(); $sym_tva=(h($tva->get_parameter('label'))); // $sym_tva=$sym } $row.=td($sym_tva,'style="text-align:center"'); $htva=$q['qs_price']; $row.=td(nbm($htva),'class="num"'); $tvac=bcadd($htva,$q['qs_vat']); if ($g_parameter->MY_TVA_USE=='Y') { $class=""; if ($q['qs_vat_sided'] != 0) { $class=' style="text-decoration:line-through"'; $tvac=bcsub($tvac,$q['qs_vat']); } $row.=td(nbm($q['qs_vat_sided']),'class="num"'); $row.=td(nbm($q['qs_vat']),'class="num"'.$class); $row.=td(nbm($tvac),'class="num"'); } $total_tvac=bcadd($total_tvac,$tvac); $total_htva=bcadd($total_htva,$htva); echo tr($row); } if ($g_parameter->MY_TVA_USE=='Y') $row= td(_('Total'),' style="font-style:italic;text-align:right;font-weight: bolder;" colspan="5"'); else $row= td(_('Total'),' style="font-style:italic;text-align:right;font-weight: bolder;" colspan="5"'); $row.=td(nbm($total_htva),'class="num" style="font-style:italic;font-weight: bolder;"'); if ($g_parameter->MY_TVA_USE=='Y') $row.=td("").td(nbm($total_tvac),'class="num" style="font-style:italic;font-weight: bolder;"'); echo tr($row); ?>