Merged revisions 4810,4813-4821 via svnmerge from
svn+ssh://ns352270.ovh.net/svn/phpcompta/tags/rel601 ........ r4810 | danydb | 2012-04-24 20:55:23 +0200 (Tue, 24 Apr 2012) | 3 lines Removed merge tracking for "svnmerge" for svn+ssh://danydb@ns352270.ovh.net/svn/phpcompta/tags/rel600 ........ r4813 | danydb | 2012-04-24 20:58:20 +0200 (Tue, 24 Apr 2012) | 1 line change SQL ........ r4814 | danydb | 2012-04-24 21:33:02 +0200 (Tue, 24 Apr 2012) | 2 lines Fix bug predefined operation for misc ledger ........ r4815 | danydb | 2012-04-24 21:33:27 +0200 (Tue, 24 Apr 2012) | 3 lines Fix bug predefined operation for misc ledger Fix bug for check_balance (null value) ........ r4816 | danydb | 2012-04-24 21:51:04 +0200 (Tue, 24 Apr 2012) | 1 line fix bug : rounded value ........ r4817 | danydb | 2012-05-01 16:49:39 +0200 (Tue, 01 May 2012) | 2 lines #569 réécriture des menus fournisseur, client et adm ........ r4818 | danydb | 2012-05-01 16:51:35 +0200 (Tue, 01 May 2012) | 2 lines #568: Impossible d'ajouter une fiche BANQUE dans ADM ........ r4819 | danydb | 2012-05-01 16:53:12 +0200 (Tue, 01 May 2012) | 2 lines #570: Ajout d'un menu contact ........ r4820 | danydb | 2012-05-01 16:53:46 +0200 (Tue, 01 May 2012) | 1 line cosmetic : message d'erreur quand on veut ajouter une fiche dans catégorie non existante ........ r4821 | danydb | 2012-05-01 18:38:34 +0200 (Tue, 01 May 2012) | 1 line code : dead code ........
This commit is contained in:
parent
27a50547ad
commit
2e4dc23d33
28 changed files with 414 additions and 1168 deletions
|
|
@ -974,8 +974,9 @@ class Document
|
|||
|| strlen(trim( ${'e_march'.$counter.'_price'} )) ==0
|
||||
|| strlen(trim(${'e_quant'.$counter})) ==0)
|
||||
return "";
|
||||
|
||||
$r=round(${$id}*${$quant},2);
|
||||
bcscale(4);
|
||||
$r=bcmul(${$id},${$quant});
|
||||
$r=round($r,2);
|
||||
break;
|
||||
|
||||
case 'VEN_TVAC':
|
||||
|
|
@ -986,7 +987,7 @@ class Document
|
|||
if ( ! isset(${'e_march'.$counter.'_price'})|| !isset(${'e_quant'.$counter})) return "";
|
||||
// check that something is sold
|
||||
if ( ${'e_march'.$counter.'_price'} == 0 || ${'e_quant'.$counter} == 0 ) return "";
|
||||
bcscale(2);
|
||||
bcscale(4);
|
||||
// if TVA not exist
|
||||
if ( ! isset(${$id}))
|
||||
$r= bcmul(${$price},${$quant});
|
||||
|
|
@ -994,12 +995,13 @@ class Document
|
|||
$r= bcmul(${$price},${$quant});
|
||||
$r=bcadd($r,${$id});
|
||||
}
|
||||
$r=round($r,2);
|
||||
return $r;
|
||||
break;
|
||||
|
||||
case 'TOTAL_VEN_HTVA':
|
||||
extract($p_array);
|
||||
|
||||
bcscale(4);
|
||||
$sum=0.0;
|
||||
for ($i=0;$i<$nb_item;$i++)
|
||||
{
|
||||
|
|
@ -1012,8 +1014,8 @@ class Document
|
|||
strlen(trim(${$qt})) == 0 ||
|
||||
${$qt}==0 || ${$sell}==0)
|
||||
continue;
|
||||
$sum+=${$sell}*${$qt};
|
||||
$sum=round($sum,2);
|
||||
$tmp1=bcmul(${$sell},${$qt});
|
||||
$sum=bcadd($sum,$tmp1);
|
||||
|
||||
|
||||
}
|
||||
|
|
@ -1022,7 +1024,7 @@ class Document
|
|||
case 'TOTAL_VEN_TVAC':
|
||||
extract($p_array);
|
||||
$sum=0.0;
|
||||
bcscale(2);
|
||||
bcscale(4);
|
||||
for ($i=0;$i<$nb_item;$i++)
|
||||
{
|
||||
$tva='e_march'.$i.'_tva_amount';
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue