[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Noalyss-commit] [noalyss] 234/238: fixup! Printtva , under some circums
From: |
Dany De Bontridder |
Subject: |
[Noalyss-commit] [noalyss] 234/238: fixup! Printtva , under some circumstance tva_summary::check fails |
Date: |
Sat, 26 Oct 2019 04:41:13 -0400 (EDT) |
sparkyx pushed a commit to annotated tag rel7110
in repository noalyss.
commit 4496ad5d4ebc3a9ef165af4bf7a6c565836d7f12
Author: Dany De Bontridder <address@hidden>
Date: Fri Oct 25 14:54:20 2019 +0200
fixup! Printtva , under some circumstance tva_summary::check fails
---
include/class/acc_ledger.class.php | 1 -
include/class/tax_summary.class.php | 4 ++--
include/export/export_printtva_csv.php | 10 +++++++++-
include/tax_summary.inc.php | 10 +++++++++-
4 files changed, 20 insertions(+), 5 deletions(-)
diff --git a/include/class/acc_ledger.class.php
b/include/class/acc_ledger.class.php
index ee30e8b..1121207 100644
--- a/include/class/acc_ledger.class.php
+++ b/include/class/acc_ledger.class.php
@@ -81,7 +81,6 @@ class Acc_Ledger extends jrn_def_sql
$this->row=null;
$this->nb=MAX_ARTICLE;
parent::__construct($p_cn, $p_id);
- parent::__construct($p_cn, $p_id);
}
/**
* retrieve currency_id from database
diff --git a/include/class/tax_summary.class.php
b/include/class/tax_summary.class.php
index ce95070..7de4c8d 100644
--- a/include/class/tax_summary.class.php
+++ b/include/class/tax_summary.class.php
@@ -115,7 +115,7 @@ class Tax_Summary
";
$cnt=$this->db->get_value($sql,[$this->date_start,$this->date_end]);
if ($cnt == 0) {
- throw new Exception(_("Données manquantes"));
+ throw new Exception(_("Données manquantes"),100);
}
/*-------------Purchase ---------------------------------*/
$sql="select count(*)
@@ -131,7 +131,7 @@ class Tax_Summary
";
$cnt=$this->db->get_value($sql,[$this->date_start,$this->date_end]);
if ($cnt > 0) {
- throw new Exception(_("Données manquantes"));
+ throw new Exception(_("Données manquantes"),100);
}
}
diff --git a/include/export/export_printtva_csv.php
b/include/export/export_printtva_csv.php
index c84ffe2..dfdfb11 100644
--- a/include/export/export_printtva_csv.php
+++ b/include/export/export_printtva_csv.php
@@ -30,7 +30,15 @@ require_once NOALYSS_INCLUDE."/class/tax_summary.class.php";
require_once NOALYSS_INCLUDE."/lib/noalyss_csv.class.php";
$http=new HttpInput();
$tax_summary = new
Tax_Summary($cn,$http->get("date_start"),$http->get("date_end"));
-$tax_summary->check();
+try {
+ $tax_summary->check();
+}catch (Exception $e)
+{
+ if ($e->getCode() <> 100) {
+ echo $e->getMessage();
+ return;
+ }
+}
$csv=new Noalyss_Csv("summary_tva");
$csv->send_header();
diff --git a/include/tax_summary.inc.php b/include/tax_summary.inc.php
index 70d9c5d..0623edd 100644
--- a/include/tax_summary.inc.php
+++ b/include/tax_summary.inc.php
@@ -47,7 +47,15 @@ if ( $http->get("do","string","no") == "display")
{
$tax_summary=new
Tax_Summary($cn,$start_periode->value,$end_periode->value);
try {
- $tax_summary->check();
+ try {
+ $tax_summary->check();
+ }catch (Exception $e)
+ {
+ echo '<span class="warning">';
+ echo $e->getMessage();
+ echo '</span>';
+
+ }
echo '<ul class="aligned-block">';
echo '<li>';
echo $tax_summary->form_export_csv();
- [Noalyss-commit] [noalyss] 147/238: Currency : detail operation Purchase , the amount in currency were wrong in the summary, (continued)
- [Noalyss-commit] [noalyss] 147/238: Currency : detail operation Purchase , the amount in currency were wrong in the summary, Dany De Bontridder, 2019/10/26
- [Noalyss-commit] [noalyss] 152/238: New function findSide return D if number is <0, Dany De Bontridder, 2019/10/26
- [Noalyss-commit] [noalyss] 168/238: translation, Dany De Bontridder, 2019/10/26
- [Noalyss-commit] [noalyss] 174/238: Merge branch 'r700-currency' of gitlab.noalyss.eu:noalyss/noalyss into r700-currency, Dany De Bontridder, 2019/10/26
- [Noalyss-commit] [noalyss] 193/238: Php7.2 incompatibility, Dany De Bontridder, 2019/10/26
- [Noalyss-commit] [noalyss] 176/238: Mantis #1626: AFFICHAGE BALANCE FICHE - soldes nuls au débit, Dany De Bontridder, 2019/10/26
- [Noalyss-commit] [noalyss] 192/238: Mantis #0001618: Journaux - choix du type en premier, Dany De Bontridder, 2019/10/26
- [Noalyss-commit] [noalyss] 195/238: mantis #1690: Bug : impossible d'utiliser < dans Inplace_Edit Replace strip_tags , add a space before the "<", Dany De Bontridder, 2019/10/26
- [Noalyss-commit] [noalyss] 228/238: Bug with p_jrn, Dany De Bontridder, 2019/10/26
- [Noalyss-commit] [noalyss] 223/238: Task #0001703: Faciliter effacement montants dans les filtres, Dany De Bontridder, 2019/10/26
- [Noalyss-commit] [noalyss] 234/238: fixup! Printtva , under some circumstance tva_summary::check fails,
Dany De Bontridder <=
- [Noalyss-commit] [noalyss] 201/238: Merge branch 'dev7109' into entreprise, Dany De Bontridder, 2019/10/26
- [Noalyss-commit] [noalyss] 93/238: translate, Dany De Bontridder, 2019/10/26
- [Noalyss-commit] [noalyss] 98/238: Fin currency : detail operation show currency , rate and amount, Dany De Bontridder, 2019/10/26
- [Noalyss-commit] [noalyss] 104/238: Reverse for Currency, Dany De Bontridder, 2019/10/26
- [Noalyss-commit] [noalyss] 101/238: Currency : SQL quant_fin is adapted, Dany De Bontridder, 2019/10/26
- [Noalyss-commit] [noalyss] 100/238: Currency : financial use the rate depending of the operation date, Dany De Bontridder, 2019/10/26
- [Noalyss-commit] [noalyss] 108/238: acc_ledger_fin . translation, Dany De Bontridder, 2019/10/26
- [Noalyss-commit] [noalyss] 99/238: Modify quant_fin , we add a column j_id to have a fk to jrnx and operation_currency, Dany De Bontridder, 2019/10/26
- [Noalyss-commit] [noalyss] 109/238: Indentation, Dany De Bontridder, 2019/10/26
- [Noalyss-commit] [noalyss] 116/238: Database upgrade 131, Dany De Bontridder, 2019/10/26