From: Maxime Bourget Date: Sat, 15 Jun 2013 12:08:22 +0000 (+0100) Subject: Check order with 0 to pick if non null X-Git-Url: https://delta.frontaccounting.com/gitweb/?a=commitdiff_plain;h=d641e560c83e45168c84b51b082d5bb36679d2e8;p=order_line_extra.git Check order with 0 to pick if non null That way checking the box delete the corresponding row in to_pick (Even though the sum is 0). --- diff --git a/includes/order_lines.inc b/includes/order_lines.inc index 928c70e..96c0a27 100644 --- a/includes/order_lines.inc +++ b/includes/order_lines.inc @@ -227,7 +227,7 @@ function pick_checkbox($row) { $id = $row['debtor_no']."_".$row['branch_code']; $name = "chgpck" .$id; - $value = $row['quantity_to_pick'] > 0 ? 1:0; + $value = $row['quantity_to_pick'] !== null; // save also in hidden field for testing during 'Update' return checkbox(null, $name, $value, true,