<?php
include_once($path_to_root."/includes/ui/ui_input.inc");
+
+function compute_input_name($row, $field) {
+ $row_id = $row['id'];
+ return "detail[$row_id][$field]";
+}
+
function view_link($dummy, $order_no)
{
return get_customer_trans_view_str(ST_SALESORDER, $order_no);
}
function input_date_details($row, $date) {
- return date_cells( null, 'name');
+$row_id = $row['id'];
+ $name = compute_input_name($row, 'required_date');
+
+$_POST[$name] = sql2date($date);
+
+ start_extract_cell();
+ date_cells (null, $name, 'title', null, 0,0,1001);
+ return end_extract_cell();
+
+ return "
+<input type='text' value='$date' name='$name'>
+";
}
function input_comment_details($row, $comment) {
- return label_cell($comment);
+$row_id = $row['id'];
+ return "
+<input type='text' value='$comment' name='detail[$row_id][comment]'>
+";
}
function get_order_details_extra($customer_id) {
- $sql = "SELECT so.order_no
+ $sql = "SELECT sod.id
+ , so.order_no
, stk_code
, quantity - qty_sent
, required_date