112 case when j_debit is false and jn.jrn_def_type='ACH' then 0-j_montant
113 when j_debit is true and jn.jrn_def_type='VEN' then 0-j_montant
114 else j_montant end j_montant,
124 join jrnx using (j_id)
125 join jrn on (jrnx.j_grpt=jrn.jr_grpt_id)
126 join jrn_def jn on (jrn.jr_def_id=jn.jrn_def_id)
127 join acc_other_tax aot on (jt.ac_id=aot.ac_id)
128 left join operation_currency oc ON (oc.j_id=jt.j_id)
130 jr_id=$1", [$p_jrn_id]);
137 $a_additional_tax = array();
147 $sum_euro = bcadd($sum_euro,
$array[
$i][
'j_montant']);
148 $sum_currency = bcadd($sum_currency,
$array[
$i][
'oc_amount']);
150 $sum_euro = round($sum_euro, 2);
151 return $a_additional_tax;
161 static function display_row($p_jrn_id, &$sum_euro, &$sum_currency, $decalage = 0)
165 $nb = count($a_additional_tax);
169 echo
td($a_additional_tax[
$i]->ac_accounting);
170 echo
td($a_additional_tax[
$i]->ac_label .
" ( " . $a_additional_tax[
$i]->ac_rate .
" %)");
171 echo
td(
nbm($a_additional_tax[
$i]->tax_amount),
'class="num"');
173 echo
td(
"") .
td(
"") .
td(
"") .
td(
"");
176 for (
$e = 0;
$e < $decalage;
$e++) {
179 echo
td(
nbm($a_additional_tax[
$i]->tax_amount),
'class="num"');
180 if ($a_additional_tax[
$i]->currency_id != 0) {
181 echo
td(
nbm($a_additional_tax[
$i]->currency_amount),
'class="num"');
td($p_string='', $p_extra='')
surround the string with td
nbm($p_number, $p_dec=2)
format the number with a sep.
static get_by_operation($p_jrn_id, &$sum_euro, &$sum_currency)
create an array of Additional_Tax
__construct($tax_amount, $currency_amount, $currency_id, $ac_id, $ac_label, $ac_rate, $ac_accounting)
static display_row($p_jrn_id, &$sum_euro, &$sum_currency, $decalage=0)
display the additional_tax in the ledger_detail for Sales and Purchase