[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Noalyss-commit] [noalyss] 115/119: Analytic accountancy protect against
From: |
Dany De Bontridder |
Subject: |
[Noalyss-commit] [noalyss] 115/119: Analytic accountancy protect against divide by zero |
Date: |
Mon, 26 Oct 2020 18:27:42 -0400 (EDT) |
sparkyx pushed a commit to branch master
in repository noalyss.
commit 63c1dbae900174533a8589a12d30a335d8297e17
Author: sparkyx <danydb@noalyss.eu>
AuthorDate: Sat Oct 17 18:35:08 2020 +0200
Analytic accountancy protect against divide by zero
---
include/class/anc_operation.class.php | 5 ++++-
1 file changed, 4 insertions(+), 1 deletion(-)
diff --git a/include/class/anc_operation.class.php
b/include/class/anc_operation.class.php
index 6e87cc9..f8c2ea8 100644
--- a/include/class/anc_operation.class.php
+++ b/include/class/anc_operation.class.php
@@ -710,7 +710,10 @@ class Anc_Operation
$op->po_id=$hplan[$p_item][$e];
$op->oa_group=$this->oa_group;
$op->j_id=$p_j_id;
- $ratio=bcdiv($val[$p_item][$row],${"amount_t".$p_item});
+ $ratio=0;
+ if (${"amount_t".$p_item} != 0 ) {
+ $ratio=bcdiv($val[$p_item][$row],${"amount_t".$p_item});
+ }
$amount= bcmul($p_nd, $ratio);
$op->oa_amount=round($amount,2);
$op->oa_debit=$this->oa_debit;
- [Noalyss-commit] [noalyss] 103/119: Improve : Quick filter on history, (continued)
- [Noalyss-commit] [noalyss] 103/119: Improve : Quick filter on history, Dany De Bontridder, 2020/10/26
- [Noalyss-commit] [noalyss] 84/119: Merge extension-crm, Dany De Bontridder, 2020/10/26
- [Noalyss-commit] [noalyss] 96/119: Cosmetic, Dany De Bontridder, 2020/10/26
- [Noalyss-commit] [noalyss] 100/119: Notice, Dany De Bontridder, 2020/10/26
- [Noalyss-commit] [noalyss] 101/119: Grand livre waiting box, Dany De Bontridder, 2020/10/26
- [Noalyss-commit] [noalyss] 107/119: Follow-Up : comment optional, Dany De Bontridder, 2020/10/26
- [Noalyss-commit] [noalyss] 108/119: fix SQL bug, Dany De Bontridder, 2020/10/26
- [Noalyss-commit] [noalyss] 113/119: Bug : create card failed, Dany De Bontridder, 2020/10/26
- [Noalyss-commit] [noalyss] 112/119: Cosmetic Follow Up add waiting box for search, Dany De Bontridder, 2020/10/26
- [Noalyss-commit] [noalyss] 114/119: Cosmetic & version, Dany De Bontridder, 2020/10/26
- [Noalyss-commit] [noalyss] 115/119: Analytic accountancy protect against divide by zero,
Dany De Bontridder <=
- [Noalyss-commit] [noalyss] 82/119: Follow up search card, add a button to select all , cosmetic add qcode in dialog box for contact option, Dany De Bontridder, 2020/10/26
- [Noalyss-commit] [noalyss] 83/119: Bug : from VEN , cannot get the price, Dany De Bontridder, 2020/10/26
- [Noalyss-commit] [noalyss] 85/119: Follow-up fix order, Dany De Bontridder, 2020/10/26
- [Noalyss-commit] [noalyss] 88/119: Fix bug : follow up option contact are not remove when document type changed, Dany De Bontridder, 2020/10/26
- [Noalyss-commit] [noalyss] 99/119: Upgrade DB 147, Dany De Bontridder, 2020/10/26
- [Noalyss-commit] [noalyss] 102/119: remove dead code, Dany De Bontridder, 2020/10/26
- [Noalyss-commit] [noalyss] 106/119: Filter_Multiselect : make a search on select (multi-row), Dany De Bontridder, 2020/10/26
- [Noalyss-commit] [noalyss] 104/119: Select_Box Add new position : absolute, Dany De Bontridder, 2020/10/26
- [Noalyss-commit] [noalyss] 111/119: Follow-Up improve search, Dany De Bontridder, 2020/10/26
- [Noalyss-commit] [noalyss] 110/119: Follow Up : an action can have several parents, Dany De Bontridder, 2020/10/26