Changed so Invoice Template gets the current day instead of original day.
[fa-stable.git] / sales / inquiry / sales_orders_view.php
index e2887fea9d67783ca39d82574b92e87cc7a4bba7..82c103958d9c8b8e8ddb9d05174d4e7083a3afac 100644 (file)
@@ -71,8 +71,8 @@ start_row();
 ref_cells(_("#:"), 'OrderNumber');
 if ($_POST['order_view_mode'] != 'DeliveryTemplates' && $_POST['order_view_mode'] != 'InvoiceTemplates')
 {
-       date_cells(_("from:"), 'OrdersAfterDate', null, -30);
-       date_cells(_("to:"), 'OrdersToDate', null, 1);
+       date_cells(_("from:"), 'OrdersAfterDate', '', null, -30);
+       date_cells(_("to:"), 'OrdersToDate', '', null, 1);
 }
 locations_list_cells(_("Location:"), 'StockLocation', null, true);
 
@@ -237,7 +237,7 @@ if ($result)
                else
                {
                        echo "<td><input ".($myrow["type"]==1 ? 'checked' : '')." type='checkbox' name='chgtpl" .$myrow["order_no"]. "' value='1'
-                               onclick='forms[1].ChangeTmpl.value= this.name.substr(6);
+                               onclick='this.form.ChangeTmpl.value= this.name.substr(6);
                                this.form.submit();' ></td>";
 
                        $modify_page = $path_to_root . "/sales/sales_order_entry.php?" . SID . "ModifyOrderNumber=" . $myrow["order_no"];