#213 add term limit in operation detail

This commit is contained in:
Dany De Bontridder 2011-02-04 21:02:38 +00:00
parent 2df1295b12
commit e651910b0b
4 changed files with 35 additions and 4 deletions

View file

@ -345,6 +345,20 @@ case 'save':
$cn->start();
if ( $access=="W")
{
$ech=$_POST['p_ech'];
if ( trim($ech) != '' && isDate($ech) != null)
{
$cn->exec_sql("update jrn set jr_ech=to_date($1,'DD.MM.YYYY') where jr_id=$2",
array($ech,$jr_id));
}
else
{
$cn->exec_sql("update jrn set jr_ech=null where jr_id=$1",
array($jr_id));
}
$cn->exec_sql("update jrn set jr_comment=$1,jr_pj_number=$2,jr_date=to_date($4,'DD.MM.YYYY') where jr_id=$3",
array($_POST['lib'],$_POST['npj'],$jr_id,$_POST['p_date']));
$cn->exec_sql("update jrnx set j_date=to_date($1,'DD.MM.YYYY') where j_grpt in (select jr_grpt_id from jrn where jr_id=$2)",

View file

@ -536,13 +536,13 @@ class Acc_Detail extends Acc_Operation
$this->det=new stdClass();
}
/**
*@brief retrieve some common data from jrnx / jrn as
* the datum, the comment,...
*@brief retrieve some common data from jrn as
* the datum, the comment,payment limit...
*/
function get()
{
$sql="SELECT jr_id, jr_def_id, jr_montant, jr_comment, jr_date, jr_grpt_id,
jr_internal, jr_tech_date, jr_tech_per, jrn_ech, jr_ech, jr_rapt,
jr_internal, jr_tech_date, jr_tech_per, jrn_ech, jr_ech, jr_rapt,jr_ech,
jr_valid, jr_opid, jr_c_opid, jr_pj, jr_pj_name, jr_pj_type,
jr_pj_number, jr_mt
FROM jrn where jr_id=$1";

View file

@ -21,6 +21,15 @@
?>
</td>
<tr>
<td>
<?php
$date_ech=new IDate('p_ech');
$date_ech->value=format_date($obj->det->jr_ech);
echo td('Echeance').td($date_ech->input());
?>
</td>
</tr>
<tr><td>

View file

@ -22,7 +22,15 @@
?>
</td>
</tr>
<tr>
<td>
<?php
$date_ech=new IDate('p_ech');
$date_ech->value=format_date($obj->det->jr_ech);
echo td('Echeance').td($date_ech->input());
?>
</td>
<tr>
<td>
<?