Author: danydb
Date: 2012-06-29 22:25:50 +0200 (Fri, 29 Jun 2012)
New Revision: 5039

Modified:
   phpcompta/trunk/include/ajax_view_mod_stock.php
   phpcompta/trunk/include/class_stock_goods.php
   phpcompta/trunk/include/template/stock_inv.php
Log:
Add detail to stock

Modified: phpcompta/trunk/include/ajax_view_mod_stock.php
===================================================================
--- phpcompta/trunk/include/ajax_view_mod_stock.php     2012-06-29 19:53:42 UTC 
(rev 5038)
+++ phpcompta/trunk/include/ajax_view_mod_stock.php     2012-06-29 20:25:50 UTC 
(rev 5039)
@@ -39,6 +39,7 @@
 {
        $p_array['sg_code'.$i]=$array[$i]['sg_code'];
        $p_array['sg_quantity'.$i]=$array[$i]['sg_quantity'];
+       $p_array['sg_type'.$i]=$array[$i]['sg_type'];
 
 }
 echo $st->input($p_array,true);

Modified: phpcompta/trunk/include/class_stock_goods.php
===================================================================
--- phpcompta/trunk/include/class_stock_goods.php       2012-06-29 19:53:42 UTC 
(rev 5038)
+++ phpcompta/trunk/include/class_stock_goods.php       2012-06-29 20:25:50 UTC 
(rev 5039)
@@ -74,6 +74,9 @@
                        }
                        $sg_code[$e]->setReadOnly($p_readonly);
                        $sg_quantity[$e]->setReadOnly($p_readonly);
+                       if ( isset (${'sg_type'.$e})) {
+                               $sg_type[$e]=(${'sg_type'.$e}=='c')?'OUT':'IN';
+                       }
                }
                require_once 'template/stock_inv.php';
        }

Modified: phpcompta/trunk/include/template/stock_inv.php
===================================================================
--- phpcompta/trunk/include/template/stock_inv.php      2012-06-29 19:53:42 UTC 
(rev 5038)
+++ phpcompta/trunk/include/template/stock_inv.php      2012-06-29 20:25:50 UTC 
(rev 5039)
@@ -77,6 +77,11 @@
                        <?=$sg_quantity[$i]->input()?>
                        <? endif;?>
                </td>
+               <TD class="num"">
+                       <? if (isset ($sg_type[$i])):?>
+                       <?=$sg_type[$i]?>
+                       <? endif;?>
+               </td>
        </tr>
 <? endfor; ?>
 </table>



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

_______________________________________________
Phpcompta  est un logiciel libre de comptabilit&#233; en ligne 
(http://www.phpcompta.eu)
Phpcompta-dev mailing list
[email protected]
https://lists.nongnu.org/mailman/listinfo/phpcompta-dev

Reply via email to