[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Noalyss-commit] [noalyss] 03/06: Correct the number of rows with predef
From: |
Dany De Bontridder |
Subject: |
[Noalyss-commit] [noalyss] 03/06: Correct the number of rows with predefined operations |
Date: |
Mon, 29 Feb 2016 21:32:48 +0000 |
sparkyx pushed a commit to branch master
in repository noalyss.
commit bdfb364b7ec092f620d2e57fbdb427b5135e60c1
Author: Dany De Bontridder <address@hidden>
Date: Mon Feb 29 21:42:54 2016 +0100
Correct the number of rows with predefined operations
---
include/class/class_pre_op_ach.php | 8 ++++++--
include/class/class_pre_op_ven.php | 8 ++++++--
2 files changed, 12 insertions(+), 4 deletions(-)
diff --git a/include/class/class_pre_op_ach.php
b/include/class/class_pre_op_ach.php
index 4b51271..34d40c6 100644
--- a/include/class/class_pre_op_ach.php
+++ b/include/class/class_pre_op_ach.php
@@ -126,14 +126,18 @@ class Pre_op_ach extends Pre_operation_detail
}
else
{
- $array+=array("e_march".$count=>$row['opd_poste'],
+ if ( trim($row['opd_poste']) !="" )
+ {
+ $array+=array("e_march".$count=>$row['opd_poste'],
"e_march".$count."_price"=>$row['opd_amount'],
"e_march".$count."_tva_id"=>$row['opd_tva_id'],
"e_march".$count."_tva_amount"=>$row['opd_tva_amount'],
"e_quant".$count=>$row['opd_quantity']
);
- $count++;
+ $count++;
+ }
}
+ $array['nb_item']=$count;
}
return $array;
}
diff --git a/include/class/class_pre_op_ven.php
b/include/class/class_pre_op_ven.php
index 5c386a5..26e322d 100644
--- a/include/class/class_pre_op_ven.php
+++ b/include/class/class_pre_op_ven.php
@@ -124,16 +124,20 @@ class Pre_op_ven extends Pre_operation_detail
}
else
{
- $array+=array("e_march".$count=>$row['opd_poste'],
+ if ( trim($row['opd_poste']) != "")
+ {
+ $array+=array("e_march".$count=>$row['opd_poste'],
"e_march".$count."_price"=>$row['opd_amount'],
"e_march".$count."_tva_id"=>$row['opd_tva_id'],
"e_quant".$count=>$row['opd_quantity'],
"e_march".$count."_label"=>$row['opd_comment'],
"e_march".$count."_tva_amount"=>$row['opd_tva_amount'],
);
- $count++;
+ $count++;
+ }
}
}
+ $array['nb_item']=$count;
return $array;
}
/*!\brief load the data from the database and return an array
- [Noalyss-commit] [noalyss] branch master updated (58e10af -> 2c33652), Dany De Bontridder, 2016/02/29
- [Noalyss-commit] [noalyss] 03/06: Correct the number of rows with predefined operations,
Dany De Bontridder <=
- [Noalyss-commit] [noalyss] 01/06: Bug : phpcompta administrator changed automatically, Dany De Bontridder, 2016/02/29
- [Noalyss-commit] [noalyss] 02/06: Doxyfile : Update version, Dany De Bontridder, 2016/02/29
- [Noalyss-commit] [noalyss] 05/06: Bug : PDF Landscape failed, Dany De Bontridder, 2016/02/29
- [Noalyss-commit] [noalyss] 04/06: Change the layout for confirmation + recording, Dany De Bontridder, 2016/02/29
- [Noalyss-commit] [noalyss] 06/06: Merge branch 'master' of ns3:/srv/git/noalyss, Dany De Bontridder, 2016/02/29