[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Phpcompta-dev] r5210 - phpcompta/tags/rel650/include
From: |
phpcompta-dev |
Subject: |
[Phpcompta-dev] r5210 - phpcompta/tags/rel650/include |
Date: |
Sun, 14 Apr 2013 23:46:39 +0200 (CEST) |
Author: danydb
Date: 2013-04-14 23:46:39 +0200 (Sun, 14 Apr 2013)
New Revision: 5210
Modified:
phpcompta/tags/rel650/include/class_acc_ledger_purchase.php
phpcompta/tags/rel650/include/class_acc_ledger_sold.php
Log:
0000819: Note de d?\195?\169bit et de cr?\195?\169dit n?\195?\169gative avec
TVA autoliquidation
Modified: phpcompta/tags/rel650/include/class_acc_ledger_purchase.php
===================================================================
--- phpcompta/tags/rel650/include/class_acc_ledger_purchase.php 2013-04-04
18:53:49 UTC (rev 5209)
+++ phpcompta/tags/rel650/include/class_acc_ledger_purchase.php 2013-04-14
21:46:39 UTC (rev 5210)
@@ -667,7 +667,7 @@
$acc_operation->jrn=$p_jrn;
$acc_operation->type='d';
$acc_operation->periode=$tperiode;
- if ( $value > 0 ) $tot_debit=bcadd($tot_debit,$value);
+ $tot_debit=bcadd($tot_debit,abs($value));
$acc_operation->insert_jrnx();
// if TVA is on both side, we deduce it immediately
if ( $oTva->get_parameter("both_side")==1)
Modified: phpcompta/tags/rel650/include/class_acc_ledger_sold.php
===================================================================
--- phpcompta/tags/rel650/include/class_acc_ledger_sold.php 2013-04-04
18:53:49 UTC (rev 5209)
+++ phpcompta/tags/rel650/include/class_acc_ledger_sold.php 2013-04-14
21:46:39 UTC (rev 5210)
@@ -1,4 +1,4 @@
-<?php
+ <?php
/*
* This file is part of PhpCompta.
*
@@ -338,18 +338,19 @@
$tva[$idx_tva]+=$tva_item;
else
$tva[$idx_tva]=$tva_item;
- if ($oTva->get_parameter("both_side")==0)
$tot_tva=round(bcadd($tva_item,$tot_tva),2);
- else $n_both=$tva_item;
+ if ($oTva->get_parameter("both_side")==0) {
+
$tot_tva=round(bcadd($tva_item,$tot_tva),2);
+ }else {
+ $n_both=$tva_item;
+ if ( $n_both < 0 )
$tot_debit=bcadd($tot_debit,abs($n_both));
+ }
}
/* Save the stock */
/* if the quantity is < 0 then the stock increase (return of
* material)
*/
- $nNeg=($
- {"e_quant".$i
- }
- <0)?-1:1;
+ $nNeg=(${"e_quant".$i}<0)?-1:1;
// always save quantity but in withStock we can find
// what card need a stock management
---
PhpCompta est un logiciel de comptabilité libre en ligne (full web)
Projet opensource http://www.phpcompta.eu
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [Phpcompta-dev] r5210 - phpcompta/tags/rel650/include,
phpcompta-dev <=