[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Noalyss-commit] [noalyss] 10/11: Improve #0001825: Détail opération : m
From: |
Dany De Bontridder |
Subject: |
[Noalyss-commit] [noalyss] 10/11: Improve #0001825: Détail opération : mise à jour date + logo 9 |
Date: |
Wed, 31 Mar 2021 13:07:08 -0400 (EDT) |
sparkyx pushed a commit to branch master
in repository noalyss.
commit 4325c55c7d7b5e15919e060a4be7066b4774a110
Author: sparkyx <danydb@noalyss.eu>
AuthorDate: Wed Mar 31 13:58:57 2021 +0200
Improve #0001825: Détail opération : mise à jour date
+ logo 9
---
html/image/logo9000.png | Bin 35093 -> 35104 bytes
html/js/acc_ledger.js | 11 ++++++++++-
include/ajax/ajax_ledger.php | 36 ++++++++++++++++++++++--------------
3 files changed, 32 insertions(+), 15 deletions(-)
diff --git a/html/image/logo9000.png b/html/image/logo9000.png
index 0a20936..c243065 100644
Binary files a/html/image/logo9000.png and b/html/image/logo9000.png differ
diff --git a/html/js/acc_ledger.js b/html/js/acc_ledger.js
index 3b2b2bb..f5e7201 100644
--- a/html/js/acc_ledger.js
+++ b/html/js/acc_ledger.js
@@ -1132,7 +1132,11 @@ function op_save(obj)
method: 'post',
parameters: queryString,
onFailure: null,
- onSuccess: infodiv
+ onSuccess: function (req){
+ if (req.responseText !=='OK') {
+ smoke.alert(req.responseText);
+ }
+ }
}
);
// window.close();
@@ -1148,6 +1152,11 @@ function op_save(obj)
parameters: queryString,
onFailure: null,
onSuccess: function(req,json) {
+ console.debug (req);
+
+ if (req.responseXML == null ){
+ smoke.alert(req.responseText);
+ }
new Ajax.Request('ajax_misc.php', {
parameters:{'gDossier':obj.gDossier.value,
'act':'de',
diff --git a/include/ajax/ajax_ledger.php b/include/ajax/ajax_ledger.php
index 16ee64f..357ca2b 100644
--- a/include/ajax/ajax_ledger.php
+++ b/include/ajax/ajax_ledger.php
@@ -388,6 +388,7 @@ case 'rmf':
/////////////////////////////////////////////////////////////////////////////
case 'save':
ob_start();
+ $http=new HttpInput();
try
{
$cn->start();
@@ -395,7 +396,7 @@ case 'save':
{
if (isset($_POST['p_ech']) )
{
- $ech=$_POST['p_ech'];
+ $ech=$http->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",
@@ -412,7 +413,7 @@ case 'save':
if (isset($_POST['p_date_paid']) )
{
- $ech=$_POST['p_date_paid'];
+ $ech=$http->post('p_date_paid');
if ( trim($ech) != '' && isDate($ech) != null)
{
$cn->exec_sql("update jrn set
jr_date_paid=to_date($1,'DD.MM.YYYY') where jr_id=$2",
@@ -428,9 +429,9 @@ case 'save':
}
$cn->exec_sql("update jrn set
jr_comment=$1,jr_pj_number=$2,jr_date=to_date($4,'DD.MM.YYYY'),jr_optype=$5
where jr_id=$3",
-
array($_POST['lib'],$_POST['npj'],$jr_id,$_POST['p_date'],$_POST['jr_optype']));
+
array($http->post('lib'),$http->post('npj'),$jr_id,$http->post('p_date'),$http->post('jr_optype')));
$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)",
- array($_POST['p_date'],$jr_id));
+ array($http->post('p_date'),$jr_id));
$cn->exec_sql('update operation_analytique set oa_date=j_date from
jrnx
where
operation_analytique.j_id=jrnx.j_id and
@@ -439,16 +440,16 @@ case 'save':
where jr_id=$1)
',array($jr_id));
$cn->exec_sql("select comptaproc.jrn_add_note($1,$2)",
- array($jr_id,$_POST['jrn_note']));
+ array($jr_id , $http->post('jrn_note') ));
$rapt=$_POST['rapt'];
if ( $g_parameter->MY_UPDLAB=='Y' && isset ($_POST['j_id']))
{
- $a_rowid=$_POST["j_id"];
+ $a_rowid=$http->post("j_id");
for ($e=0;$e<count($a_rowid);$e++)
{
$id="e_march".$a_rowid[$e]."_label";
- $cn->exec_sql('update jrnx set j_text=$1 where j_id=$2',
array(strip_tags($_POST[$id]),$a_rowid[$e]));
+ $cn->exec_sql('update jrnx set j_text=$1 where j_id=$2',
array($http->post($id),$a_rowid[$e]));
}
}
if (trim($rapt) != '')
@@ -496,26 +497,33 @@ case 'save':
//////////////////////////////////////////////////////////////////
//Save other info
//////////////////////////////////////////////////////////////////
- $op->save_info($_POST['OTHER'],'OTHER');
- $op->save_info($_POST['BON_COMMANDE'],'BON_COMMANDE');
+ $op->save_info($http->post('OTHER'),'OTHER');
+ $op->save_info($http->post('BON_COMMANDE'),'BON_COMMANDE');
///////////////////////////////////////////////////////////////////
// Save related
//////////////////////////////////////////////////////////////////
$related=$http->post("related","string");
- if ($related == "0" )
- throw new Exception('Parameter not send ->
related'.__FILE__.__LINE__,10);
+ if ($related=="0")
+ {
+ throw new Exception('Parameter not send ->
related'.__FILE__.__LINE__, 10);
+ }
$op->insert_related_action($related);
}
- echo _('Opération sauvée');
+ echo 'OK';
$cn->commit();
}
catch (Exception $e)
{
- record_log($e);
+ $html=ob_get_contents();
+ ob_end_clean();
+ record_log($e);
+ record_log($html);
+
if ( DEBUGNOALYSS > 0 ) echo $e->getMessage();
- alert(_( "Changement impossible: on ne peut pas changer la date dans une
période fermée"));
+ echo _( "Changement impossible: on ne peut pas changer la date dans une
période fermée");
+ return;
}
$html=ob_get_contents();
ob_end_clean();
- [Noalyss-commit] [noalyss] branch master updated (b00558e -> eba5413), Dany De Bontridder, 2021/03/31
- [Noalyss-commit] [noalyss] 02/11: Harden security, Dany De Bontridder, 2021/03/31
- [Noalyss-commit] [noalyss] 03/11: calcy , bug position divide by 2 on certain circumstances, Dany De Bontridder, 2021/03/31
- [Noalyss-commit] [noalyss] 05/11: Esthestic Bug Forecast if there is no category do not show the save btn, Dany De Bontridder, 2021/03/31
- [Noalyss-commit] [noalyss] 06/11: 0001923: TAG : Date de paiement BALISE DATE_PAID, Dany De Bontridder, 2021/03/31
- [Noalyss-commit] [noalyss] 07/11: Task #0001928: Export ANC/ANCIMP/ANCHOP, Dany De Bontridder, 2021/03/31
- [Noalyss-commit] [noalyss] 08/11: Set version 9.0, Dany De Bontridder, 2021/03/31
- [Noalyss-commit] [noalyss] 09/11: Bug #1838 Souci décimales ventilation CA si automatique, Dany De Bontridder, 2021/03/31
- [Noalyss-commit] [noalyss] 04/11: Code #0001905: Champ pour Registre des Personnes Morales (RPM) Réécriture complete de COMPANY , ajout libres de paramètres, Dany De Bontridder, 2021/03/31
- [Noalyss-commit] [noalyss] 10/11: Improve #0001825: Détail opération : mise à jour date + logo 9,
Dany De Bontridder <=
- [Noalyss-commit] [noalyss] 01/11: Task #0001735: Standardiser icone, Dany De Bontridder, 2021/03/31
- [Noalyss-commit] [noalyss] 11/11: Cosmetic, Dany De Bontridder, 2021/03/31