[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Noalyss-commit] [noalyss] 01/01: Error in Bank not configured
From: |
Dany De Bontridder |
Subject: |
[Noalyss-commit] [noalyss] 01/01: Error in Bank not configured |
Date: |
Thu, 17 Mar 2016 18:35:59 +0000 |
sparkyx pushed a commit to branch master
in repository noalyss.
commit 38e8121573e59e5c14c02fab32fc47c1f98111c0
Author: Dany De Bontridder <address@hidden>
Date: Thu Mar 17 19:34:55 2016 +0100
Error in Bank not configured
---
include/ajax/ajax_bank_saldo.php | 10 +++++-----
1 files changed, 5 insertions(+), 5 deletions(-)
diff --git a/include/ajax/ajax_bank_saldo.php b/include/ajax/ajax_bank_saldo.php
index a74b5eb..2931f0f 100644
--- a/include/ajax/ajax_bank_saldo.php
+++ b/include/ajax/ajax_bank_saldo.php
@@ -57,6 +57,10 @@ $filter_year=" j_tech_per in (select p_id from parm_periode
".
$id=$cn->get_value('select jrn_def_bank from jrn_def where
jrn_def_id=$1',array($_GET['j']));
+if ( $id == '' ) {
+ echo '{"saldo":"ERR"}';
+ return;
+}
$acc=new Fiche($cn,$id);
$res=$acc->get_bk_balance($filter_year." and ( trim(jr_pj_number) != '' and
jr_pj_number is not null)" );
@@ -67,9 +71,5 @@ $solde=$res['solde'];
if ( $res['debit'] < $res['credit'] ) $solde=$solde*(-1);
//header("Content-type: text/html; charset: utf8",true);
-echo '{"saldo":"'.$solde.'"}';
-
-
-
-?>
+echo '{"saldo":"'.$solde.'"}';