[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Noalyss-commit] [noalyss] 16/28: Bug : when e_march is null it is consi
From: |
Dany De Bontridder |
Subject: |
[Noalyss-commit] [noalyss] 16/28: Bug : when e_march is null it is considered as an empty string instead of 0 |
Date: |
Sat, 30 Nov 2019 07:51:23 -0500 (EST) |
sparkyx pushed a commit to branch master
in repository noalyss.
commit 9d1f3f0821f7feb0d022bdb7595d39474bd2af31
Author: Dany De Bontridder <address@hidden>
Date: Wed Nov 20 20:56:28 2019 +0100
Bug : when e_march is null it is considered as an empty string instead of 0
---
include/class/acc_ledger_purchase.class.php | 4 ++++
include/class/acc_ledger_sold.class.php | 3 +++
2 files changed, 7 insertions(+)
diff --git a/include/class/acc_ledger_purchase.class.php
b/include/class/acc_ledger_purchase.class.php
index dcbaf3a..7306185 100644
--- a/include/class/acc_ledger_purchase.class.php
+++ b/include/class/acc_ledger_purchase.class.php
@@ -669,6 +669,10 @@ class Acc_Ledger_Purchase extends Acc_Ledger
}
// insert into quant_purchase
//-----
+ if (empty( ${'e_march' . $i . '_price'} ) ) ${'e_march' . $i
. '_price'} = 0;
+ if (empty( ${'e_march' . $i } ) ) ${'e_march' . $i } = 0;
+ if (empty( ${'e_quant' . $i } ) ) ${'e_quant' . $i } = 0;
+
if ( $g_parameter->MY_TVA_USE=='Y')
{
diff --git a/include/class/acc_ledger_sold.class.php
b/include/class/acc_ledger_sold.class.php
index 5867d8d..524fa4c 100644
--- a/include/class/acc_ledger_sold.class.php
+++ b/include/class/acc_ledger_sold.class.php
@@ -374,6 +374,9 @@ class Acc_Ledger_Sold extends Acc_Ledger {
$op->oa_description = sql_string($e_comm);
$op->save_form_plan($_POST, $i, $j_id);
}
+ if (empty( ${'e_march' . $i . '_price'} ) ) ${'e_march' . $i
. '_price'} = 0;
+ if (empty( ${'e_march' . $i } ) ) ${'e_march' . $i } = 0;
+ if (empty( ${'e_quant' . $i } ) ) ${'e_quant' . $i } = 0;
if ($g_parameter->MY_TVA_USE == 'Y') {
/* save into quant_sold */
$r = $this->db->exec_sql("select insert_quant_sold
($1,$2,$3,$4,$5,$6,$7,$8,$9,$10)", array(null, /* 1 */
- [Noalyss-commit] [noalyss] 04/28: Task #0001762: TVA France Erreur dans script SQL, (continued)
- [Noalyss-commit] [noalyss] 04/28: Task #0001762: TVA France Erreur dans script SQL, Dany De Bontridder, 2019/11/30
- [Noalyss-commit] [noalyss] 07/28: Acc_Ledger::id == 0 for Main Ledger, Dany De Bontridder, 2019/11/30
- [Noalyss-commit] [noalyss] 09/28: remove Obsolete, Dany De Bontridder, 2019/11/30
- [Noalyss-commit] [noalyss] 05/28: rename test files:, Dany De Bontridder, 2019/11/30
- [Noalyss-commit] [noalyss] 11/28: In Acc_Ledger, the type shouldn't be overrided , create new attr ledger_type, Dany De Bontridder, 2019/11/30
- [Noalyss-commit] [noalyss] 19/28: Data_SQL Function prefix turn an object to an array but key can have a prefix, Dany De Bontridder, 2019/11/30
- [Noalyss-commit] [noalyss] 06/28: PDFTK Convert in PDF if working from home, see http://wiki.noalyss.eu/doku.php?id=menu:ancgl, Dany De Bontridder, 2019/11/30
- [Noalyss-commit] [noalyss] 14/28: Bug PHP : confuse NULL and 0, Dany De Bontridder, 2019/11/30
- [Noalyss-commit] [noalyss] 13/28: cosmetid add a button close for the "forget-email-box", Dany De Bontridder, 2019/11/30
- [Noalyss-commit] [noalyss] 15/28: Bug Array to string conversion error, Dany De Bontridder, 2019/11/30
- [Noalyss-commit] [noalyss] 16/28: Bug : when e_march is null it is considered as an empty string instead of 0,
Dany De Bontridder <=
- [Noalyss-commit] [noalyss] 17/28: Cosmetic, Dany De Bontridder, 2019/11/30
- [Noalyss-commit] [noalyss] 12/28: Improve PHPUNIT test, Dany De Bontridder, 2019/11/30
- [Noalyss-commit] [noalyss] 22/28: Search operation : all, paid or unpaid, including the CSV export and the filter, Dany De Bontridder, 2019/11/30
- [Noalyss-commit] [noalyss] 10/28: Correct report amount, Dany De Bontridder, 2019/11/30
- [Noalyss-commit] [noalyss] 21/28: Fix problem with Acc_Ledger_purchase or sold and quantity or vat amount were an empty string, Dany De Bontridder, 2019/11/30
- [Noalyss-commit] [noalyss] 24/28: Merge branch 'dev-7200', Dany De Bontridder, 2019/11/30
- [Noalyss-commit] [noalyss] 26/28: warning about session_start, Dany De Bontridder, 2019/11/30
- [Noalyss-commit] [noalyss] 28/28: Merge branch 'dev-7200', Dany De Bontridder, 2019/11/30
- [Noalyss-commit] [noalyss] 02/28: Task #0001762: TVA France , add the possibility to compute VAT at the date of operation , payment. PRINTTVA : Add feature summary of VAT depending of operation date, payment date or VAT setting, Dany De Bontridder, 2019/11/30
- [Noalyss-commit] [noalyss] 03/28: Task #1762 , printtva peut mettre donner les totaux de tva suivant l'exigibilité configuré par Code TVA , par date de paiement ou par date d'opération, Dany De Bontridder, 2019/11/30