Ledger : change parameter and presentation of numbering

This commit is contained in:
Dany De Bontridder 2010-05-06 18:23:16 +00:00
parent ea115f39b4
commit 77f5bca908
3 changed files with 31 additions and 14 deletions

View file

@ -121,13 +121,14 @@ $sessid=$_REQUEST['PHPSESSID'];
echo '<DIV CLASS="u_redcontent">';
/* 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 '<FORM METHOD="POST">';
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 '<INPUT TYPE="RESET" VALUE="Reset">';
echo '<INPUT TYPE="RESET" class="button" VALUE="Reset">';
echo '</FORM>';
echo "</DIV>";
html_page_stop();

View file

@ -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 '<div class="lmenu">';
@ -162,8 +163,9 @@ $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->table=3;
$wSearch->name="p_jrn_class_deb";
$wSearch->size=40;
$wSearch->size=20;
$wSearch->value=$prop['jrn_def_class_deb'];
$search=$wSearch->input();
@ -172,11 +174,11 @@ $wPjPref=new IText();
$wPjPref->name='jrn_def_pj_pref';
$wPjPref->value=$prop['jrn_def_pj_pref'];
$pj_pref=$wPjPref->input();
$wPjSeq=new IText();
$wPjSeq->value=$Ledger->get_last_pj();
$wPjSeq=new INum();
$wPjSeq->value=0;
$wPjSeq->name='jrn_def_pj_seq';
$pj_seq=$wPjSeq->input();
$last_seq=$Ledger->get_last_pj();
$name=$l_line['jrn_def_name'];
/* construct all the hidden */

View file

@ -5,8 +5,9 @@
<TD> <INPUT TYPE="text" NAME="p_jrn_name" VALUE="<?php echo $name; ?>"></TD>
</TR>
<TR>
<TD><?=_('Postes utilisables journal (débit/crédit)')?> </TD>
<TD>
<td><?=_('Postes utilisables journal (débit/crédit)')?>
</TD>
<td>
<?php echo $search;?>
</TD>
</TR>
@ -33,7 +34,19 @@
</TD>
<TD>
<?php echo $pj_pref; ?>
<span class="notice"><?=_('Le préfixe des pièces peut être différent pour chaque journal')?></span>
</TD>
<TD>
<span class="notice"><?=_('Le préfixe des pièces peut être différent pour chaque journal')?></span><br>
<span class="notice"><?=_('Uniquement des chiffres')?></span>
</TD>
</TR>
<TR>
<TD>
<?=_('Dernière pièce numérotée')?>
</TD>
<TD>
<?=$last_seq?>
</TD>
</TR>
<tr>
@ -41,7 +54,10 @@
</TD>
<TD>
<?php echo $pj_seq; ?>
</TD>
<TD>
<span class="notice"><?=_('La numérotation est propre à chaque journal')?></span>
<span class="notice"><?=_('Laissez à 0 pour ne pas changer le numéro')?></span>
</TD>
</TR>