Get QOH
authorMaxime Bourget <bmx007@gmail.com>
Tue, 28 May 2013 19:53:45 +0000 (20:53 +0100)
committerMaxime Bourget <bmx007@gmail.com>
Tue, 28 May 2013 19:53:45 +0000 (20:53 +0100)
haxe/ItemScheduler.hx
haxe/Location.hx

index 2244eeea5a004832f302eab55e32f2e7e5fb48b8..3f6cdc74cb5812b2c4b3e5d956f8fce220b7a948 100644 (file)
@@ -98,6 +98,7 @@ class ItemScheduler {
                var cells = [
                        location.code
                        ,location.name
+                       ,location.quantityOnHand(stock_id, null)
                ];
                var status = 'header';
                php.Lib.print('<tr class="'+status+'">');
index 198464b502b655dcc7ef78d470d3ccec69884d9e..5390eb50c5cf8c108e1b79fbd5ae3f21ebdddd6d 100644 (file)
@@ -7,6 +7,7 @@ class Location {
        public var code : String;
        public var name : String;
        public var comment : String;
+       public var qoh : Int;
 
        public function new(row : Dynamic) {
                var obj = php.Lib.objectOfAssociativeArray(row);
@@ -14,4 +15,8 @@ class Location {
                name = obj.location_name;
                comment = obj.delivery_address;
        }
+
+       private function quantityOnHand(stock_id, date) {
+               return untyped __call__('get_qoh_on_date', stock_id,  code, date);
+       }
 }