diff --git a/html/ajax_ledger.php b/html/ajax_ledger.php index 4b97fc45c..afceceb52 100644 --- a/html/ajax_ledger.php +++ b/html/ajax_ledger.php @@ -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)", diff --git a/include/class_acc_operation.php b/include/class_acc_operation.php index 2ea9ad7a3..1122f3123 100644 --- a/include/class_acc_operation.php +++ b/include/class_acc_operation.php @@ -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"; diff --git a/include/template/ledger_detail_ach.php b/include/template/ledger_detail_ach.php index e8bbaca44..4103c13d3 100644 --- a/include/template/ledger_detail_ach.php +++ b/include/template/ledger_detail_ach.php @@ -21,6 +21,15 @@ ?> +