0000610: Type de document : modification Libellé, Préfixe et séquence
This commit is contained in:
parent
cfea892af7
commit
003533b044
4 changed files with 159 additions and 72 deletions
|
|
@ -23,13 +23,21 @@
|
|||
*/
|
||||
require_once 'class_document_type.php';
|
||||
echo HtmlInput::title_box(_('Type de document'),'change_doc_div');
|
||||
|
||||
$doc_type=new Document_type($cn,$dt_id);
|
||||
$doc_type->get();
|
||||
?>
|
||||
<form method="GET" id="cat_doc_f" onsubmit="cat_doc_change_record('cat_doc_f');">
|
||||
<form method="POST" id="cat_doc_f" onsubmit="cat_doc_change_record('cat_doc_f');">
|
||||
<?=HtmlInput::request_to_hidden(array("ac","gDossier","dt_id"))?>
|
||||
<table>
|
||||
<tr>
|
||||
<td> <?=_('Nom')?>
|
||||
</td>
|
||||
<td>
|
||||
<?
|
||||
$name=new IText('dt_name',$doc_type->dt_value);
|
||||
echo $name->input();
|
||||
?>
|
||||
</td>
|
||||
</tr>
|
||||
|
||||
|
|
@ -37,13 +45,39 @@ echo HtmlInput::title_box(_('Type de document'),'change_doc_div');
|
|||
<td><?=_('Préfixe')?>
|
||||
</td>
|
||||
<td>
|
||||
<?
|
||||
$prefix=new IText('dt_prefix',$doc_type->dt_prefix);
|
||||
echo $prefix->input();
|
||||
?>
|
||||
</td>
|
||||
</tr>
|
||||
|
||||
<tr>
|
||||
<td><?=_('Prochain numéro')?>
|
||||
<td><?=_('numéro actuel')?>
|
||||
</td>
|
||||
<td>
|
||||
<?
|
||||
$ret= $cn->get_array("select last_value,is_called from seq_doc_type_".$doc_type->dt_id) ;
|
||||
|
||||
$last=$ret[0]['last_value'];
|
||||
/*!
|
||||
*\note With PSQL sequence , the last_value column is 1 when before AND after the first call, to make the difference between them
|
||||
* I have to check whether the sequence has been already called or not */
|
||||
if ($ret[0]['is_called']=='f' ) $last--;
|
||||
echo $last;
|
||||
?>
|
||||
</td>
|
||||
<tr>
|
||||
<td><?=_('Prochain numéro')?>
|
||||
<?=
|
||||
HtmlInput::infobulle(15);
|
||||
?>
|
||||
</td>
|
||||
<td>
|
||||
<?
|
||||
$seq=new INum('seq',0);
|
||||
echo $seq->input();
|
||||
?>
|
||||
</td>
|
||||
</tr>
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue