/[phpcompta]/phpcompta/include/form_input.php
ViewVC logotype

Diff of /phpcompta/include/form_input.php

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 1.43 by sparkyx, Fri May 6 19:41:40 2005 UTC revision 1.44 by sparkyx, Fri Jun 17 10:41:55 2005 UTC
# Line 262  function FormVente($p_cn,$p_jrn,$p_user, Line 262  function FormVente($p_cn,$p_jrn,$p_user,
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");
# Line 281  function FormVente($p_cn,$p_jrn,$p_user, Line 282  function FormVente($p_cn,$p_jrn,$p_user,
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
# Line 722  function RecordInvoice($p_cn,$p_array,$p Line 723  function RecordInvoice($p_cn,$p_array,$p
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;
# Line 778  function RecordInvoice($p_cn,$p_array,$p Line 779  function RecordInvoice($p_cn,$p_array,$p
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);
# Line 1140  function RecordAchat($p_cn,$p_array,$p_u Line 1141  function RecordAchat($p_cn,$p_array,$p_u
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 ){

Legend:
Removed from v.1.43  
changed lines
  Added in v.1.44

savannah-hackers-public@gnu.org
ViewVC Help
Powered by ViewVC 1.1.26