[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Noalyss-commit] [noalyss] 12/21: FIX P0TVA when no data
From: |
dwm |
Subject: |
[Noalyss-commit] [noalyss] 12/21: FIX P0TVA when no data |
Date: |
Sun, 15 Dec 2024 09:51:38 -0500 (EST) |
sparkyx pushed a commit to branch unstable
in repository noalyss.
commit 7d15bc9d6a81fda17e43fa382dc8e04dc1c84af4
Author: sparkyx <danydb@noalyss.eu>
AuthorDate: Sat Dec 7 18:19:49 2024 +0100
FIX P0TVA when no data
---
include/class/periode.class.php | 16 +++++++++++-----
1 file changed, 11 insertions(+), 5 deletions(-)
diff --git a/include/class/periode.class.php b/include/class/periode.class.php
index dee39238e..77beb78b5 100644
--- a/include/class/periode.class.php
+++ b/include/class/periode.class.php
@@ -100,15 +100,21 @@ EOF;
function is_closed()
{
if ($this->jrn_def_id!=0)
+ {
+
$sql="select status from jrn_periode ".
- " where jrn_def_id=".$this->jrn_def_id.
- " and p_id =".$this->p_id;
+ " where jrn_def_id=$2 ".
+ " and p_id = $1";
+ $status=$this->cn->get_value($sql,[$this->p_id,$this->jrn_def_id]);
+ }
else
+ {
$sql="select p_closed as status from parm_periode ".
" where ".
- " p_id =".$this->p_id;
- $res=$this->cn->exec_sql($sql);
- $status=Database::fetch_result($res, 0, 0);
+ " p_id = $1";
+ $status=$this->cn->get_value($sql,[$this->p_id]);
+
+ }
if ($status=='CL'||$status=='t'||$status=='CE')
return 1;
return 0;
- [Noalyss-commit] [noalyss] branch unstable updated (078674672 -> 80be65420), dwm, 2024/12/15
- [Noalyss-commit] [noalyss] 01/21: PHP8.3 : remove deprecated in Document_Type, dwm, 2024/12/15
- [Noalyss-commit] [noalyss] 12/21: FIX P0TVA when no data,
dwm <=
- [Noalyss-commit] [noalyss] 03/21: Improve Code Documentation, dwm, 2024/12/15
- [Noalyss-commit] [noalyss] 13/21: New : label cannot be empty, dwm, 2024/12/15
- [Noalyss-commit] [noalyss] 02/21: Merge branch '241104-correct' into unstable, dwm, 2024/12/15
- [Noalyss-commit] [noalyss] 15/21: improve Operation detail : show Analytic imputation for VAT Not Deductible, dwm, 2024/12/15
- [Noalyss-commit] [noalyss] 04/21: css : font size rem or % , remove all fixed font-size in px, dwm, 2024/12/15
- [Noalyss-commit] [noalyss] 20/21: VAT ND Analytic : fix bug, dwm, 2024/12/15
- [Noalyss-commit] [noalyss] 07/21: NEW #0002395: C0TVA : pouvoir choisir la contrepartie pour l'autoliquidation, dwm, 2024/12/15
- [Noalyss-commit] [noalyss] 06/21: FIX : some doc in comment, dwm, 2024/12/15
- [Noalyss-commit] [noalyss] 21/21: Esthetic, dwm, 2024/12/15
- [Noalyss-commit] [noalyss] 11/21: FIX : javascript id$ function, dwm, 2024/12/15