[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Noalyss-commit] [noalyss] 32/39: Fix Bug : when duplicating an ODS oper
From: |
Dany De Bontridder |
Subject: |
[Noalyss-commit] [noalyss] 32/39: Fix Bug : when duplicating an ODS operation, the accounting is cleared if a card is used |
Date: |
Sat, 11 Jul 2020 13:20:46 -0400 (EDT) |
sparkyx pushed a commit to branch master
in repository noalyss.
commit 50cbd096b1dd37e6daa4f11f0d84362c2804cc94
Author: Dany De Bontridder <danydb@noalyss.eu>
AuthorDate: Tue Jun 30 18:27:45 2020 +0200
Fix Bug : when duplicating an ODS operation, the accounting is cleared
if a card is used
---
include/class/acc_operation.class.php | 19 +++++++++++++++----
1 file changed, 15 insertions(+), 4 deletions(-)
diff --git a/include/class/acc_operation.class.php
b/include/class/acc_operation.class.php
index 8586607..7639d9d 100644
--- a/include/class/acc_operation.class.php
+++ b/include/class/acc_operation.class.php
@@ -594,8 +594,8 @@ class Acc_Operation
$ret=new Acc_Fin($this->db,$this->jr_id);
break;
default:
- $ret=new Acc_Misc($this->db,$this->jr_id);
- break;
+ $ret=new Acc_Misc($this->db,$this->jr_id);
+ break;
}
$ret->get();
if ( empty($ret->det->array))
@@ -776,9 +776,20 @@ class Acc_Operation
}
$r.="</p>";
- $r.=HtmlInput::simple_array_to_hidden($array);
- //
+ // For Misc Operation , if a card is given then there is no accounting
+ if ( $operation->signature==="ODS") {
+ $nb_array=count($array);
+ for ($i=0;$i<$nb_array;$i++) {
+ if (isset ($array["qc_".$i] ) && $array["qc_".$i] != "" ) {
+ $array["poste".$i]="";
+ }
+ }
+ }
+
+ // transform the operation into hidden element
+ $r.=HtmlInput::simple_array_to_hidden($array);
+
$r.=HtmlInput::submit(uniqid(), _("Dupliquer"));
$r.='</form>';
- [Noalyss-commit] [noalyss] 22/39: Error with card, (continued)
- [Noalyss-commit] [noalyss] 22/39: Error with card, Dany De Bontridder, 2020/07/11
- [Noalyss-commit] [noalyss] 27/39: Cosmetic #1808 : Ma au lieu de Me dans le calendrier, Dany De Bontridder, 2020/07/11
- [Noalyss-commit] [noalyss] 24/39: Cosmetic : disconnect, Dany De Bontridder, 2020/07/11
- [Noalyss-commit] [noalyss] 21/39: Install show choosen password for admin, Dany De Bontridder, 2020/07/11
- [Noalyss-commit] [noalyss] 28/39: update config.inc.example file, Dany De Bontridder, 2020/07/11
- [Noalyss-commit] [noalyss] 29/39: Orthographe, Dany De Bontridder, 2020/07/11
- [Noalyss-commit] [noalyss] 31/39: Bug : extourne ne fonctionne plus, Dany De Bontridder, 2020/07/11
- [Noalyss-commit] [noalyss] 20/39: Install : initialize variabvle, Dany De Bontridder, 2020/07/11
- [Noalyss-commit] [noalyss] 34/39: Improve error log, Dany De Bontridder, 2020/07/11
- [Noalyss-commit] [noalyss] 30/39: Ergonomie : autoliquidation, Dany De Bontridder, 2020/07/11
- [Noalyss-commit] [noalyss] 32/39: Fix Bug : when duplicating an ODS operation, the accounting is cleared if a card is used,
Dany De Bontridder <=
- [Noalyss-commit] [noalyss] 35/39: Task #0001813: CA – avertissement utilisation poste Info nombre d'utilisation Avoid delete on closed periode, Dany De Bontridder, 2020/07/11
- [Noalyss-commit] [noalyss] 36/39: CC Cosmetic, Dany De Bontridder, 2020/07/11
- [Noalyss-commit] [noalyss] 39/39: Error concat, Dany De Bontridder, 2020/07/11
- [Noalyss-commit] [noalyss] 33/39: Fix bug SQL check if a periode is closed returned wrong value, Dany De Bontridder, 2020/07/11
- [Noalyss-commit] [noalyss] 38/39: Improve : logging error, Dany De Bontridder, 2020/07/11
- [Noalyss-commit] [noalyss] 37/39: Javascript object before, Dany De Bontridder, 2020/07/11