}
function tableHeader() {
- return ["Order", "Customer", "Quantity", "Left", "On Hand", "Loc", "Required Date"];
+ return ["Order", "Customer", "Quantity", "Before", "After", "Loc", "Required Date"];
}
+/*
function generateTablex(): Void {
for(location in locations()) {
formatLocation(location, null);
this.formatRow(order);
}
}
+*/
function generateTable(): Void {
var startDate = Date.fromTime(0);
var location = locationIter.next();
var qoh : Int = location.quantityOnHand(stock_id, null);
var left = qoh;
- formatLocation(location, left);
+ formatLocation(location, "Initial", left);
// We display the order ordered by priority
// But insert the location when needed (meaning
var quantityForLocation : Int = location.quantityOnHand(stock_id, null);
if(quantityForLocation == null || quantityForLocation == 0) continue;
left += quantityForLocation;
- trace(quantityForLocation);
- formatLocation(location, left);
+ formatLocation(location, "Delivery", left);
}
left -= quantity;
}
- function formatLocation(location : Location, left : Int) {
+ function formatLocation(location : Location, type: String, left : Int) {
var cells = [
- location.code
+ type
,location.name
,location.quantityOnHand(stock_id, null)
+ ,left-location.quantityOnHand(stock_id, null)
,left
+ ,location.code
,location.delivery
];
var status = 'header';