diff --git a/html/lang/en_US/LC_MESSAGES/messages.po b/html/lang/en_US/LC_MESSAGES/messages.po
index 616f61693..54ce01c43 100644
--- a/html/lang/en_US/LC_MESSAGES/messages.po
+++ b/html/lang/en_US/LC_MESSAGES/messages.po
@@ -10,7 +10,7 @@ msgstr ""
"Project-Id-Version: NOALYSS 672\n"
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2015-11-02 19:12+0100\n"
-"PO-Revision-Date: 2015-11-02 19:12+0100\n"
+"PO-Revision-Date: 2015-11-06 00:07+0100\n"
"Last-Translator: Dany De Bontridder \n"
"Language-Team: American English \n"
"Language: en_US\n"
@@ -3365,7 +3365,7 @@ msgstr "Consideration for VAT not Ded."
#: include/database.item.php:173 include/database.item.php:162
#: include/database.item.php:163
msgid "Contrepartie pour TVA récup par impot"
-msgstr "Consideration for VAT tax by Recycling"
+msgstr "Consideration for VAT tax recoverable"
#: include/database.item.php:160 include/database.item.php:163
#: include/database.item.php:173 include/database.item.php:177
diff --git a/include/class/class_acc_ledger_purchase.php b/include/class/class_acc_ledger_purchase.php
index 1221cf33c..8639b8061 100644
--- a/include/class/class_acc_ledger_purchase.php
+++ b/include/class/class_acc_ledger_purchase.php
@@ -516,9 +516,10 @@ class Acc_Ledger_Purchase extends Acc_Ledger
else
$tperiode=$oPeriode->find_periode($e_date);
- bcscale(4);
+
try
{
+ bcscale(4);
$tot_amount=0;
$tot_tva=0;
$tot_debit=0;
@@ -556,10 +557,9 @@ class Acc_Ledger_Purchase extends Acc_Ledger
$acc_operation->type='d';
$acc_operation->periode=$tperiode;
$acc_operation->qcode="";
-
-
+ $amount_4=bcmul(${'e_march'.$i.'_price'},${'e_quant'.$i});
/* We have to compute all the amount thanks Acc_Compute */
- $amount=round(bcmul(${'e_march'.$i.'_price'},${'e_quant'.$i}),2);
+ $amount=round($amount_4,2);
$acc_amount=new Acc_Compute();
$acc_amount->check=false;
diff --git a/include/class/class_anc_operation.php b/include/class/class_anc_operation.php
index 52daf3dad..39b99c894 100644
--- a/include/class/class_anc_operation.php
+++ b/include/class/class_anc_operation.php
@@ -707,12 +707,12 @@ class Anc_Operation
$idx_pa_id++;
}
$nb_op=count($a_Anc_Operation);
- bcscale(2);
+ bcscale(4);
for ($i=0;$i<$nb_op;$i++)
{
$tot=bcadd($tot,$a_Anc_Operation[$i]->oa_amount);
}
- if ( $tot != $p_nd )
+ if ( $tot != $p_nd && count($a_Anc_Operation) > 0 )
{
$diff= bcsub($tot, $p_nd);
$a_Anc_Operation[0]->oa_amount=bcsub($a_Anc_Operation[0]->oa_amount,$diff);