[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Noalyss-commit] [noalyss] 134/151: Fix Bug : Predefined operation in Sa
From: |
Dany De Bontridder |
Subject: |
[Noalyss-commit] [noalyss] 134/151: Fix Bug : Predefined operation in Sales , impossible to add new items |
Date: |
Sat, 4 Feb 2017 17:14:34 +0000 (UTC) |
sparkyx pushed a commit to branch master
in repository noalyss.
commit 702052f55227f7c40142705e89a8ed385b52243f
Author: Dany De Bontridder <address@hidden>
Date: Mon Jan 23 20:27:31 2017 +0100
Fix Bug : Predefined operation in Sales , impossible to add new items
---
include/class/class_pre_op_ven.php | 11 +++++++++--
1 file changed, 9 insertions(+), 2 deletions(-)
diff --git a/include/class/class_pre_op_ven.php
b/include/class/class_pre_op_ven.php
index 26e322d..1e9dbb8 100644
--- a/include/class/class_pre_op_ven.php
+++ b/include/class/class_pre_op_ven.php
@@ -30,10 +30,11 @@ require_once
NOALYSS_INCLUDE.'/class/class_pre_operation.php';
class Pre_op_ven extends Pre_operation_detail
{
var $op;
+ //< Pre_operation
function __construct($cn,$p_id=0)
{
parent::__construct($cn,$p_id);
- $this->operation->od_direct='f';
+ $this->operation->od_direct='f'; //< Pre_operation
}
function get_post()
@@ -137,7 +138,13 @@ class Pre_op_ven extends Pre_operation_detail
}
}
}
- $array['nb_item']=$count;
+ // Find the ledger
+ $ledger=new Acc_Ledger($this->db,$this->operation->jrn_def_id);
+ // Find the max line of the ledger
+ $max_row=$ledger->GetDefLine();
+
+ // compute nb_item
+ $array['nb_item']=($max_row > $count)?$max_row:$count;
return $array;
}
/*!\brief load the data from the database and return an array
- [Noalyss-commit] [noalyss] 88/151: remove debug info, (continued)
- [Noalyss-commit] [noalyss] 88/151: remove debug info, Dany De Bontridder, 2017/02/04
- [Noalyss-commit] [noalyss] 93/151: Export PDF : check files properly, Dany De Bontridder, 2017/02/04
- [Noalyss-commit] [noalyss] 95/151: Problème htmlentities : charset par défaut différent entre version, Dany De Bontridder, 2017/02/04
- [Noalyss-commit] [noalyss] 91/151: Improve Performance Acc_Bilan::warning, Dany De Bontridder, 2017/02/04
- [Noalyss-commit] [noalyss] 104/151: Improve Noalyss_SQL : add set and get, Dany De Bontridder, 2017/02/04
- [Noalyss-commit] [noalyss] 107/151: Add Receipt number to detail operation, Dany De Bontridder, 2017/02/04
- [Noalyss-commit] [noalyss] 118/151: correct typo, Dany De Bontridder, 2017/02/04
- [Noalyss-commit] [noalyss] 124/151: Test ManageTable ; fix parseXML function, Dany De Bontridder, 2017/02/04
- [Noalyss-commit] [noalyss] 129/151: #1380 : Duplication d'opérations, Dany De Bontridder, 2017/02/04
- [Noalyss-commit] [noalyss] 138/151: Merge branch 'master' of ns3:/srv/git/noalyss, Dany De Bontridder, 2017/02/04
- [Noalyss-commit] [noalyss] 134/151: Fix Bug : Predefined operation in Sales , impossible to add new items,
Dany De Bontridder <=
- [Noalyss-commit] [noalyss] 139/151: ManageTable correct color of HighLigthed row, Dany De Bontridder, 2017/02/04
- [Noalyss-commit] [noalyss] 140/151: ManageTable use icon, Dany De Bontridder, 2017/02/04
- [Noalyss-commit] [noalyss] 136/151: Esthetic for duplicate operation & Correct esthetic, Dany De Bontridder, 2017/02/04
- [Noalyss-commit] [noalyss] 72/151: Documentation Task #2 - Documentation nouveau code, Dany De Bontridder, 2017/02/04
- [Noalyss-commit] [noalyss] 76/151: Ajout options Task #9 - PDF_Operation : ajout des options, Dany De Bontridder, 2017/02/04
- [Noalyss-commit] [noalyss] 83/151: Performance : improve VERIF, Dany De Bontridder, 2017/02/04
- [Noalyss-commit] [noalyss] 74/151: Export en PDF d'operation : PDF_Operation::print_section Task #10 - PDF_Operation : ajout titre Analytique, Dany De Bontridder, 2017/02/04
- [Noalyss-commit] [noalyss] 84/151: Performance : improve VERIF , change query pour fiche utilisé avec 2 postes, Dany De Bontridder, 2017/02/04
- [Noalyss-commit] [noalyss] 115/151: Correct doxygen, Dany De Bontridder, 2017/02/04
- [Noalyss-commit] [noalyss] 109/151: Add a class to manage the Param table (CRUD), Dany De Bontridder, 2017/02/04