phpcompta-dev
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Phpcompta-dev] r5572 - phpcompta/tags/rel670/include


From: phpcompta-dev
Subject: [Phpcompta-dev] r5572 - phpcompta/tags/rel670/include
Date: Fri, 6 Dec 2013 12:32:44 +0100 (CET)

Author: danydb
Date: 2013-12-06 12:32:43 +0100 (Fri, 06 Dec 2013)
New Revision: 5572

Modified:
   phpcompta/tags/rel670/include/class_acc_ledger_purchase.php
   phpcompta/tags/rel670/include/class_acc_ledger_sold.php
Log:
task #930 - Quantit?\195?\169 n?\195?\169gative et impact sur les stocks
Task #930 - Quantit?\195?\169 n?\195?\169gative et impact sur les stocks

Modified: phpcompta/tags/rel670/include/class_acc_ledger_purchase.php
===================================================================
--- phpcompta/tags/rel670/include/class_acc_ledger_purchase.php 2013-12-06 
11:20:37 UTC (rev 5571)
+++ phpcompta/tags/rel670/include/class_acc_ledger_purchase.php 2013-12-06 
11:32:43 UTC (rev 5572)
@@ -474,7 +474,10 @@
                 // always save quantity but in withStock we can find
                 // what card need a stock management
                 if ( $g_parameter->MY_STOCK='Y'&& isset ($repo))
-                    
Stock_Goods::insert_goods($this->db,array('j_id'=>$j_id,'goods'=>${'e_march'.$i},'quant'=>$nNeg*${'e_quant'.$i},'dir'=>'d','repo'=>$repo))
 ;
+                {
+                    $dir=(${'e_quant'.$i} < 0 ) ? 'c':'d';
+                    
Stock_Goods::insert_goods($this->db,array('j_id'=>$j_id,'goods'=>${'e_march'.$i},'quant'=>$nNeg*${'e_quant'.$i},'dir'=>$dir,'repo'=>$repo))
 ;
+                }
 
                 if ( $g_parameter->MY_ANALYTIC != "nu" )
                 {

Modified: phpcompta/tags/rel670/include/class_acc_ledger_sold.php
===================================================================
--- phpcompta/tags/rel670/include/class_acc_ledger_sold.php     2013-12-06 
11:20:37 UTC (rev 5571)
+++ phpcompta/tags/rel670/include/class_acc_ledger_sold.php     2013-12-06 
11:32:43 UTC (rev 5572)
@@ -333,7 +333,10 @@
                 // always save quantity but in withStock we can find
                 // what card need a stock management
                 if ($g_parameter->MY_STOCK = 'Y' && isset($repo))
-                    Stock_Goods::insert_goods($this->db, array('j_id' => 
$j_id, 'goods' => ${'e_march' . $i}, 'quant' => $nNeg * ${'e_quant' . $i}, 
'dir' => 'c', 'repo' => $repo));
+                {
+                    $dir=(${'e_quant'.$i} < 0 ) ? 'd':'c';
+                    Stock_Goods::insert_goods($this->db, array('j_id' => 
$j_id, 'goods' => ${'e_march' . $i}, 'quant' => $nNeg * ${'e_quant' . $i}, 
'dir' => $dir, 'repo' => $repo));
+                }
 
 
                 if ($g_parameter->MY_ANALYTIC != "nu") {



---
PhpCompta est un logiciel de comptabilité libre en ligne (full web)
Projet opensource http://www.phpcompta.eu



reply via email to

[Prev in Thread] Current Thread [Next in Thread]