262 |
list ($l_date_start,$l_date_end)=GetPeriode($p_cn,$userPref); |
list ($l_date_start,$l_date_end)=GetPeriode($p_cn,$userPref); |
263 |
$op_date=( ! isset($e_date) ) ?substr($l_date_start,2,8):$e_date; |
$op_date=( ! isset($e_date) ) ?substr($l_date_start,2,8):$e_date; |
264 |
$e_ech=(isset($e_ech))?$e_ech:""; |
$e_ech=(isset($e_ech))?$e_ech:""; |
265 |
|
$e_comm=(isset($e_comm))?$e_comm:""; |
266 |
// $e_jrn=(isset($e_jrn))?$e_jrn:""; |
// $e_jrn=(isset($e_jrn))?$e_jrn:""; |
267 |
// Save old value and set a new one |
// Save old value and set a new one |
268 |
echo_debug(__FILE__,__LINE__,"form_input.php.FormVentep_op_date is $op_date"); |
echo_debug(__FILE__,__LINE__,"form_input.php.FormVentep_op_date is $op_date"); |
282 |
$r.='<TR>'.InputType("Date ","Text","e_date",$op_date,$view_only).'</TR>'; |
$r.='<TR>'.InputType("Date ","Text","e_date",$op_date,$view_only).'</TR>'; |
283 |
|
|
284 |
$r.='<TR>'.InputType("Echeance","Text","e_ech",$e_ech,$view_only).'</TR>'; |
$r.='<TR>'.InputType("Echeance","Text","e_ech",$e_ech,$view_only).'</TR>'; |
285 |
$r.='<TR>'.InputType("Commentaire","Text_big","e_comm",$e_ech,$view_only).'</TR>'; |
$r.='<TR>'.InputType("Commentaire","Text_big","e_comm",$e_comm,$view_only).'</TR>'; |
286 |
|
|
287 |
include_once("fiche_inc.php"); |
include_once("fiche_inc.php"); |
288 |
// Display the customer |
// Display the customer |
723 |
} |
} |
724 |
$amount+=$a_price[$i]*$a_quant[$i]; |
$amount+=$a_price[$i]*$a_quant[$i]; |
725 |
} |
} |
726 |
|
$comm=FormatString($e_comm); |
727 |
$a_vat=ComputeVat($p_cn,$a_good,$a_quant,$a_price,$a_vat); |
$a_vat=ComputeVat($p_cn,$a_good,$a_quant,$a_price,$a_vat); |
728 |
|
|
729 |
$sum_vat=0.0; |
$sum_vat=0.0; |
779 |
if ( $r == false ) { Rollback($p_cn); exit(" Error __FILE__ __LINE__");} |
if ( $r == false ) { Rollback($p_cn); exit(" Error __FILE__ __LINE__");} |
780 |
// Set Internal code and Comment |
// Set Internal code and Comment |
781 |
$internal=SetInternalCode($p_cn,$seq,$p_jrn); |
$internal=SetInternalCode($p_cn,$seq,$p_jrn); |
782 |
$comment=(trim($e_comm) == "")?$internal." client : ".GetFicheName($p_cn,$e_client):$e_comm; |
$comment=(FormatString($e_comm) == null )?$internal." client : ".GetFicheName($p_cn,$e_client):FormatString($e_comm); |
783 |
|
|
784 |
// Update and set the invoice's comment |
// Update and set the invoice's comment |
785 |
$Res=ExecSql($p_cn,"update jrn set jr_comment='".$comment."' where jr_grpt_id=".$seq); |
$Res=ExecSql($p_cn,"update jrn set jr_comment='".$comment."' where jr_grpt_id=".$seq); |
1141 |
if ( InsertJrnx($p_cn,'d',$p_user,$p_jrn,$poste,$e_date,$tva_amount,$seq,$periode) == false ) { $Rollback($p_cn);exit("error __FILE__ __LINE__");} |
if ( InsertJrnx($p_cn,'d',$p_user,$p_jrn,$poste,$e_date,$tva_amount,$seq,$periode) == false ) { $Rollback($p_cn);exit("error __FILE__ __LINE__");} |
1142 |
} |
} |
1143 |
} |
} |
1144 |
|
$e_comment=FormatString($e_comment); |
1145 |
echo_debug(__FILE__,__LINE__,"echeance = $e_ech"); |
echo_debug(__FILE__,__LINE__,"echeance = $e_ech"); |
1146 |
echo_debug(__FILE__,__LINE__,"comment = $e_comment"); |
echo_debug(__FILE__,__LINE__,"comment = $e_comment"); |
1147 |
if ( ($amount+$sum_vat) != 0 ){ |
if ( ($amount+$sum_vat) != 0 ){ |