Task 5023: note de credit

This commit is contained in:
sparkyx 2006-04-23 20:06:21 +00:00
parent b80b5780fa
commit 634f1c5bb6
3 changed files with 5 additions and 7 deletions

View file

@ -176,7 +176,7 @@ function ComputeVat($p_cn, $p_fiche,$p_quant,$p_price,$p_vat )
if ( $tva_id == null ) return -1;
// for each fiche find the tva_rate and tva_id
$a_vat=GetTvaRate($p_cn,$tva_id);
$vat_amount=-1;
$vat_amount=null;
// Get the attribut price of the card(fiche)
if ( $a_vat != null and $a_vat['tva_id'] != "" )
{

View file

@ -649,8 +649,7 @@ function RecordSell($p_cn,$p_array,$p_user,$p_jrn)
}
$cost=$a_price[$i]*$a_quant[$i];
$amount+=$cost;
// if cost < 0 => not added to jrn.jr_amount
$amount_jrn+=($cost<0)?0:$cost;
$amount_jrn+=$cost;
echo_debug('user_form_ach.php',__LINE__,'Total customer:'.$amount_jrn);
}
$comm=FormatString($e_comm);
@ -719,7 +718,7 @@ function RecordSell($p_cn,$p_array,$p_user,$p_jrn)
{
$lvat=ComputeVat($p_cn, $a_good[$i],$a_quant[$i],$a_price[$i],
$a_vat_good[$i] );
$ded_vat=($lvat>0)?$lvat*$non_dedu:0;
$ded_vat=($lvat != null )?$lvat*$non_dedu:0;
$sum_tva_nd+=$ded_vat;
echo_debug('user_form_ach.php',__LINE__,
@ -735,7 +734,7 @@ function RecordSell($p_cn,$p_array,$p_user,$p_jrn)
{
$lvat=ComputeVat($p_cn, $a_good[$i],$a_quant[$i],$a_price[$i],
$a_vat_good[$i] );
$ded_vat=($lvat>0)?$lvat*$non_dedu:0;
$ded_vat=($lvat != null )?$lvat*$non_dedu:0;
$sum_tva_nd+=$ded_vat;

View file

@ -600,8 +600,7 @@ function RecordInvoice($p_cn,$p_array,$p_user,$p_jrn)
}
$cost=$a_price[$i]*$a_quant[$i];
$amount+=$cost;
// if cost < 0 not added to jr_montant
$amount_jrn+=($cost<0)?0:$cost;
$amount_jrn+=$cost;
}// for
$comm=FormatString($e_comm);