}
function formatOrder(order : Dynamic, left : Int, date : Date) {
- var attributes = ['id = "order_'+order.id+'"'];
+ var row_id = 'order_'+order.id;
+ var attributes = ['id = "'+row_id+'"'];
var classes = [];
var before : Int = left + order.quantity;
/* We have basically 3 different cases;
var cells : Array <Dynamic> = [
order.order_id
, '<a href="/modules/order_line_extra/order_lines_view.php?customer_id='+Std.string(order.debtor_no)+'">'+order.deliver_to+'</a>'
- ,order.quantity
+ ,'<input type="text" name="'+row_id+'[quantity]" value="'+order.quantity+'">'
,before
,left
,order.from_stk_loc
var cells : Array<Dynamic> = [
array.get('order_id')
,array.get('deliver_to')
- ,quantity
+ ,'<input type="text" name="quantity">'+quantity+'</input>'
,quantity_available-quantity
,quantity_available
,array.get('from_stk_loc')
//---------------------------------------------------------------------------------------------
+div_start('item_schedule');
start_form();
start_table(TABLESTYLE_NOBORDER);
start_row();
+echo date('h:i:s <br>',time());
?>GET<?php
print_r($_GET);
?>POST<?php
$_POST['stock_id'] = get_global_stock_item();
}
}
+
if (list_updated('stock_id'))
$Ajax->activate('item_schedule');
+if (in_ajax())
+ $Ajax->activate('item_schedule');
//if (!@$_GET['popup'])
start_form();
$scheduler = new ItemScheduler($stock_id, 'DEF');
-div_start('item_schedule');
start_table(TABLESTYLE);
$th = $scheduler->tableHeader();
$scheduler->generateTable();
end_table();
-div_end();
submit_center_first('Update', _("Update"), '', 'default', false);
end_form();
+div_end();
end_page();
?>
<style type='text/css'>
console.log(table)
console.log(row)
}
+ function findRowPosition(table, row) {
+ }
+ function addInput(form, name, value) {
+ $(form).append('<input type="hidden" name="'+name+'" value="'+value+'">')
+ }
+ function addInputs(form, name, values) {
+ for(index = 0; index < values.length; index++) {
+ addInput(form, name+'['+index+']', values[index])
+ }
+ }
function onDrop(table, row) {
var row_ids = $.map(table.tBodies[0].rows, function(r) { return r.id} )
var row_id = row.id
var form = $(table).closest('form')[0]
+
+ addInput(form, 'row_id', row.id)
+ addInputs(form, 'row_order', row_ids )
+
JsHttpRequest.request(this, form);
}