From 77f5bca908d6239d79eaac01a37bbad14e30a932 Mon Sep 17 00:00:00 2001 From: Dany De Bontridder Date: Thu, 6 May 2010 18:23:16 +0000 Subject: [PATCH] Ledger : change parameter and presentation of numbering --- include/param_jrn_add.inc.php | 11 +++++------ include/param_jrn_detail.inc.php | 12 +++++++----- include/template/param_jrn.php | 22 +++++++++++++++++++--- 3 files changed, 31 insertions(+), 14 deletions(-) diff --git a/include/param_jrn_add.inc.php b/include/param_jrn_add.inc.php index 6bf5ebe80..629b09f92 100644 --- a/include/param_jrn_add.inc.php +++ b/include/param_jrn_add.inc.php @@ -121,13 +121,14 @@ $sessid=$_REQUEST['PHPSESSID']; echo '
'; /* widget for searching an account */ $wSearch=new IPoste(); +$wSearch->table=3; $wSearch->set_attribute('ipopup','ipop_account'); $wSearch->set_attribute('account','p_jrn_class_deb'); $wSearch->set_attribute('no_overwrite','1'); $wSearch->set_attribute('noquery','1'); $wSearch->name="p_jrn_class_deb"; -$wSearch->size=40; +$wSearch->size=20; $search=$wSearch->input(); @@ -150,10 +151,8 @@ $rcred=$rdeb=array(); $wPjPref=new IText(); $wPjPref->name='jrn_def_pj_pref'; $pj_pref=$wPjPref->input(); -$wPjSeq=new IText(); -$wPjSeq->value=0; -$wPjSeq->name='jrn_def_pj_seq'; -$pj_seq=$wPjSeq->input(); +$pj_seq=''; +$last_seq=0; echo '
'; echo dossier::hidden().HtmlInput::phpsessid(); @@ -161,7 +160,7 @@ echo HtmlInput::hidden('p_action','jrn'); echo HtmlInput::hidden('sa','add'); require_once('template/param_jrn.php'); echo HtmlInput::submit('add','Sauver'); -echo ''; +echo ''; echo '
'; echo "
"; html_page_stop(); diff --git a/include/param_jrn_detail.inc.php b/include/param_jrn_detail.inc.php index 388aa371b..6ebd882e8 100644 --- a/include/param_jrn_detail.inc.php +++ b/include/param_jrn_detail.inc.php @@ -125,7 +125,8 @@ If ( isset ($_POST["update"] )) { ); echo_debug($Sql); $Res=$cn->exec_sql($Sql,$sql_array); - $Res=$cn->alter_seq("s_jrn_pj".$_GET['p_jrn'],$_POST['jrn_def_pj_seq']); + if ( isNumber($_POST['jrn_def_pj_seq']) == 1 && $_POST['jrn_def_pj_seq']!=0) + $Res=$cn->alter_seq("s_jrn_pj".$_GET['p_jrn'],$_POST['jrn_def_pj_seq']); } } echo '