Add input for date and comment
authorMaxime Bourget <bmx007@gmail.com>
Sun, 5 May 2013 13:27:38 +0000 (14:27 +0100)
committerMaxime Bourget <bmx007@gmail.com>
Sun, 5 May 2013 13:27:38 +0000 (14:27 +0100)
includes/order_lines.inc
order_lines_view.php

index 0c0b09763223e4110af391060ebb63692577d911..716dd95ce21b58b8aac2c216acd6f3d2bed3befd 100644 (file)
@@ -12,16 +12,22 @@ function order_link($row)
 }
 
 function input_date_details($row, $date) {
- return date_cells( null, 'name');
-
+$row_id = $row['id'];
+       return "
+<input type='text' value='$date' name='detail[$row_id][required_date]'>
+";
 }
 
 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
index ee07f227c3daf416dfbc4f8a684c8387d28c173d..18aed7cf87cb02f2597cddbefad6ff38dc82a606 100644 (file)
@@ -54,7 +54,8 @@ if(isset($customer_id)) {
 
 
        $cols = array(
-               _("Order #") => array('fun'=>'view_link', 'ord' => '')
+               'detail_id' => 'skip'
+       ,       _("Order #") => array('fun'=>'view_link', 'ord' => '')
        ,_("Item Code") => array('ord' => '')
                ,_("Quantity") => array('type' => 'qty')
 ,_("Required Date") => array('fun' => 'input_date_details')