X-Git-Url: https://delta.frontaccounting.com/gitweb/?a=blobdiff_plain;f=sales%2Finquiry%2Fsales_orders_view.php;h=125cae8c51bfb44334f6362b547b35295a2cf359;hb=2e181b13aa722a43e78b897404912d6b13a0a937;hp=b174688deba3d91dbb64b41af46f7a2f4abfc9b6;hpb=b956923926de6b7eecf57510cf86857354cac1b3;p=fa-stable.git diff --git a/sales/inquiry/sales_orders_view.php b/sales/inquiry/sales_orders_view.php index b174688d..125cae8c 100644 --- a/sales/inquiry/sales_orders_view.php +++ b/sales/inquiry/sales_orders_view.php @@ -1,13 +1,13 @@ . + See the License here . ***********************************************************************/ $page_security = 2; $path_to_root="../.."; @@ -115,15 +115,13 @@ function delivery_link($row) function tmpl_checkbox($row) { $name = "chgtpl" .$row['order_no']; - $value = $row['type'] ? ' checked' : ''; - - return "" -// add also old checkbox name+value for check after 'Update' - ."\n"; + $value = $row['type'] ? 1:0; + +// save also in hidden field for testing during 'Update' + + return checkbox(null, $name, $value, true, + _('Set this order as a template for direct deliveries/invoices')) + . hidden('last['.$row['order_no'].']', $value, false); } //--------------------------------------------------------------------------------------------- // Update db record if respective checkbox value has changed. @@ -142,7 +140,7 @@ $id = find_submit('_chgtpl'); if ($id != -1) change_tpl_flag($id); -if (isset($_POST['Update'])) { +if (isset($_POST['Update']) && isset($_POST['last'])) { foreach($_POST['last'] as $id => $value) if ($value != check_value('chgtpl'.$id)) change_tpl_flag($id); @@ -301,6 +299,7 @@ if (get_post('SearchOrders')) { $table->set_sql($sql); $table->set_columns($cols); } +$table->width = "80%"; start_form(); display_db_pager($table);