X-Git-Url: https://delta.frontaccounting.com/gitweb/?a=blobdiff_plain;f=sales%2Finquiry%2Fsales_orders_view.php;h=125cae8c51bfb44334f6362b547b35295a2cf359;hb=a5242af68e65661edb7175412444dce536a7f311;hp=5dde39a833e77e363ad6a984376a6181ce449618;hpb=b1167086b19280eb898396e3af6470975ff74571;p=fa-stable.git
diff --git a/sales/inquiry/sales_orders_view.php b/sales/inquiry/sales_orders_view.php
index 5dde39a8..125cae8c 100644
--- a/sales/inquiry/sales_orders_view.php
+++ b/sales/inquiry/sales_orders_view.php
@@ -1,5 +1,14 @@
.
+***********************************************************************/
$page_security = 2;
$path_to_root="../..";
@@ -76,45 +85,43 @@ function view_link($dummy, $order_no)
function prt_link($row)
{
- return print_document_link($row['order_no'], _("Print"), true, 30);
+ return print_document_link($row['order_no'], _("Print"), true, 30, ICON_PRINT);
}
function edit_link($row)
{
return pager_link( _("Edit"),
- "/sales/sales_order_entry.php?" . SID . "ModifyOrderNumber=" . $row['order_no']);
+ "/sales/sales_order_entry.php?" . SID . "ModifyOrderNumber=" . $row['order_no'], ICON_EDIT);
}
function dispatch_link($row)
{
return pager_link( _("Dispatch"),
- "/sales/customer_delivery.php?" . SID . "OrderNumber=" .$row['order_no']);
+ "/sales/customer_delivery.php?" . SID . "OrderNumber=" .$row['order_no'], ICON_DOC);
}
function invoice_link($row)
{
return pager_link( _("Invoice"),
- "/sales/sales_order_entry.php?" . SID . "NewInvoice=" .$row["order_no"]);
+ "/sales/sales_order_entry.php?" . SID . "NewInvoice=" .$row["order_no"], ICON_DOC);
}
function delivery_link($row)
{
return pager_link( _("Delivery"),
- "/sales/sales_order_entry.php?" . SID . "NewDelivery=" .$row['order_no']);
+ "/sales/sales_order_entry.php?" . SID . "NewDelivery=" .$row['order_no'], ICON_DOC);
}
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.
@@ -133,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);
@@ -185,7 +192,6 @@ end_row();
end_table(1);
end_form();
-
//---------------------------------------------------------------------------------------------
// Orders inquiry table
//
@@ -289,6 +295,11 @@ if ($_POST['order_view_mode'] == 'OutstandingOnly') {
$table =& new_db_pager('orders_tbl', $sql, $cols);
$table->set_marker('check_overdue', _("Marked items are overdue."));
+if (get_post('SearchOrders')) {
+ $table->set_sql($sql);
+ $table->set_columns($cols);
+}
+$table->width = "80%";
start_form();
display_db_pager($table);