if(expiry_date != null && (now.getTime() > expiry_date.getTime())) classes.push('expired');
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>'
+ '<a href="/modules/order_line_extra/order_lines_view.php?customer_id='+Std.string(order.debtor_no)+
+ '&order_id='+order.order_id
+ +'">'+order.order_id+'</a>'
+ , '<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
if($expiry_date !== null && $now->getTime() > $expiry_date->getTime()) {
$classes->push("expired");
}
- $cells = new _hx_array(array($order->order_id, "<a href=\"/modules/order_line_extra/order_lines_view.php?customer_id=" . Std::string($order->debtor_no) . "\">" . Std::string($order->deliver_to) . "</a>", $order->quantity, $before, $left, $order->from_stk_loc, $order->hold_until_date, $order->required_date, $order->comment, $this->quantity_box($row_id, $order, $left)));
+ $cells = new _hx_array(array("<a href=\"/modules/order_line_extra/order_lines_view.php?customer_id=" . Std::string($order->debtor_no) . "&order_id=" . Std::string($order->order_id) . "\">" . Std::string($order->order_id) . "</a>", "<a href=\"/modules/order_line_extra/order_lines_view.php?customer_id=" . Std::string($order->debtor_no) . "\">" . Std::string($order->deliver_to) . "</a>", $order->quantity, $before, $left, $order->from_stk_loc, $order->hold_until_date, $order->required_date, $order->comment, $this->quantity_box($row_id, $order, $left)));
$attributes->push("class=\"" . $classes->join(" ") . "\"");
$this->printRow($cells, $attributes);
}
. hidden('pick['.$id.']', $value, false);
}
-function get_order_details_extra($customer_id, $location, $item_like) {
+function get_order_details_extra($customer_id, $location, $item_like, $order_id) {
$select = "sod.id
, so.order_no
, stk_code
$where .= " AND stk_code LIKE '$item_like'";
}
+ if($order_id) {
+ $where .= " AND so.order_no = $order_id";
+ }
+
return array('select' => $select, 'from' => $from, 'where' => $where);
}
$_SESSION['page_title'] = _($help_context = "Edit lines extra parameters");
+function get_parameter($param) {
+ $value = null;
+ if(!isset($_POST[$param])) {
+ if(isset($_GET[$param])) {
+ $value = $_GET[$param];
+ $_POST[$param] = $value;
+ }
+ }
+ else $value = $_POST[$param];
+ return $value;
+}
+
// Process POST
filter_data($_POST);
update_extra_order_details();
else $item_like = $_POST['item_like'];
text_cells_ex('Filter Item', 'item_like', 50, null, $item_like,
null, null, null, true );
+
+ $order_id = get_parameter('order_id');
+ text_cells_ex(_('Order #'), 'order_id', 10, null, $order_id,
+ null, null, null, true );
}
//
if($customer_id) {
// Display all item for one customer
- $sql = get_order_details_extra($customer_id, 'DEF', $item_like);
+ $sql = get_order_details_extra($customer_id, 'DEF', $item_like, $order_id);
$cols = array(
'detail_id' => 'skip'
, _("Order #") => array('fun'=>'view_link', 'ord' => '')