remove unused file

fix warning in the jrn file
fix bug in jrn table (jr_rapt text)
fix bug in jrn_search problem when checking if a number is valid
This commit is contained in:
sparkyx 2003-08-15 20:15:07 +00:00
parent 56bb9cb69c
commit b43f146319
6 changed files with 38 additions and 511 deletions

View file

@ -227,8 +227,12 @@ if ( isset($_POST['add_record']) ) {
// si rappt
if ( ! isset ($p_rapt) )
$p_rapt="";
if ( trim($p_rapt) != '' ) {
$jrn_id=GetNextJrnId($cn,'jr_id')+1;
if ( ! isset ($p_ech) )
$p_ech="";
$l_date=isDate($p_ech);
if ( $l_date == null) {
$p_ech='null';
@ -408,6 +412,7 @@ if ( isset($_POST['update_record']) ) {
$Sql=sprintf("update jrn set jr_rapt=null where jr_internal='%s'",$l_src);
$Res=ExecSql($cn,$Sql);
}
}// strlen (trim (p_rapt
if ( !isset ($p_ech) ) $p_ech="";
$l_date=isDate($p_ech);
if ( $l_date == null ) {
@ -440,13 +445,12 @@ if ( isset($_POST['update_record']) ) {
$Sql=sprintf("update jrn set jr_comment='%s',
jr_date=%s,jr_rapt=null,jr_montant=%f where jr_id=%d",
$comment,
$l_date,$tot_deb,
$l_date,$p_sum_deb,
$p_jr_id);
$Res=ExecSql($cn,$Sql);
}
} // if strlen(p_rappt
}
if ($Res) {
Commit($cn);
EndSql($cn);

View file

@ -49,6 +49,7 @@ $cn=DbConnect($l_Db);
if ( isset ($_POST["search"]) ) {
$c1=0;
foreach( $HTTP_POST_VARS as $key=>$element){
echo_debug("$key = $element");
${"$key"}=$element;
}
@ -56,8 +57,10 @@ if ( isset ($_POST["search"]) ) {
$c_comment=" $part pcm_lib like '%$p_comment%'";
$part=" and ";
}
if ( strlen(trim($p_montant)) != 0 &&
(string) $p_montant == (int)(string) $p_montant) {
if ( ereg ("^[0-9]*\.[0-9]*$",$p_montant) )
/*if ( strlen(trim($p_montant)) != 0 &&
(string) $p_montant == (int)(string) $p_montant )
*/{
$c_montant=sprintf(" $part j_montant %s %s",$p_montant_sel,$p_montant);
$part=" and ";
}