Release 1.0.1 established on SourceForge, fixing the bugs and including a Date Picker...
authorJoe Hunt <joe.hunt.consulting@gmail.com>
Mon, 23 Apr 2007 21:57:22 +0000 (21:57 +0000)
committerJoe Hunt <joe.hunt.consulting@gmail.com>
Mon, 23 Apr 2007 21:57:22 +0000 (21:57 +0000)
58 files changed:
CHANGELOG.txt [new file with mode: 0644]
admin/fiscalyears.php
admin/void_transaction.php
config.php
dimensions/dimension_entry.php
dimensions/inquiry/search_dimensions.php
gl/bank_transfer.php
gl/gl_deposit.php
gl/gl_journal.php
gl/gl_payment.php
gl/includes/db/gl_db_trans.inc
gl/inquiry/bank_inquiry.php
gl/inquiry/gl_account_inquiry.php
gl/inquiry/gl_trial_balance.php
gl/manage/exchange_rates.php
includes/ui/ui_input.inc
includes/ui/ui_lists.inc
includes/ui/ui_view.inc
inventory/adjustments.php
inventory/inquiry/stock_movements.php
inventory/manage/items.php
inventory/transfers.php
manufacturing/work_order_add_finished.php
manufacturing/work_order_entry.php
manufacturing/work_order_issue.php
manufacturing/work_order_release.php
purchasing/includes/ui/po_ui.inc
purchasing/inquiry/po_search.php
purchasing/inquiry/po_search_completed.php
purchasing/inquiry/supplier_allocation_inquiry.php
purchasing/inquiry/supplier_inquiry.php
purchasing/po_entry_items.php
purchasing/po_receive_items.php
purchasing/supplier_credit.php
purchasing/supplier_credit_grns.php
purchasing/supplier_invoice.php
purchasing/supplier_invoice_grns.php
purchasing/supplier_payment.php
purchasing/supplier_trans_gl.php
reporting/includes/reports_classes.inc
reporting/rep101.php
reporting/rep102.php
reporting/rep201.php
reporting/rep202.php
reporting/rep203.php
reporting/rep204.php
reporting/reports_main.php
sales/credit_note_entry.php
sales/customer_credit_invoice.php
sales/customer_payments.php
sales/includes/ui/sales_order_ui.inc
sales/inquiry/customer_allocation_inquiry.php
sales/inquiry/customer_inquiry.php
sales/inquiry/sales_orders_view.php
sales/sales_order_entry.php
themes/default/images/cal.gif [new file with mode: 0644]
themes/default/images/next.gif [new file with mode: 0644]
themes/default/images/prev.gif [new file with mode: 0644]

diff --git a/CHANGELOG.txt b/CHANGELOG.txt
new file mode 100644 (file)
index 0000000..3436916
--- /dev/null
@@ -0,0 +1,129 @@
+/**
+* @version $Id$
+* @package FrontAccounting
+* @copyright (C) 2005 - 2007 FrontAccounting
+* @license http://www.gnu.org/copyleft/gpl.html GNU/GPL
+* FrontAccounting is Free Software
+*/
+
+1. Changelog
+------------
+This is a changelog for FrontAccounting All releases.
+
+Legend:
+
+# -> Bug Fix
++ -> Addition
+! -> Change
+- -> Removed
+! -> Note
+$ -> Affected files
+
+
+-------------------- 1.0.1 Stable Released ----------------------
+23-Apr-2007 Joe Hunt
+ ! Release 1.0.1 established on SourceForge, fixing the bugs and including a Date Picker,
+   the changes for selection lists customers/suppliers and the Audit Trail.
+
+22-Apr-2007 Joe Hunt
+ ! Changed the two selection lists for customers/suppliers in reports to a single one with
+   No Filter
+ ! Changed the sort order in these selection lists from id to name.
+ + Added Audit Trail in GL trans. A switch in config.php, $use_audit_trail, must be set to 1.
+ $ /reporting/reports_main.php
+   /reporting/rep101.php
+   /reporting/rep102.php
+   /reporting/rep201.php
+   /reporting/rep202.php
+   /reporting/rep203.php
+   /reporting/rep204.php
+   /reporting/includes/reports_classes.inc
+   /includes/ui/ui_lists.inc
+   /gl/includes/db/gl_db_trans.inc
+   config.php
+   
+22-Apr-2007 Joe Hunt
+ + Date Picker for all date fields.
+ $ config.php
+   /admin/fiscalyears.php
+   /admin/void_transaction.php
+   /includes/ui/ui_view.inc
+   /includes/ui/ui_input.inc
+   /dimensions/dimension_entry.php
+   /dimensions/search_dimensions.php
+   /gl/gl_journal.php
+   /gl/gl_deposit.php
+   /gl/gl_payment.php
+   /gl/bank_transfer.php
+   /gl/inquiry/bank_inquiry.php
+   /gl/inquiry/gl_account_inquiry.php
+   /gl/inquiry/gl_trial_balance.php
+   /gl/manage/exchange_rates.php
+   /inventory/adjustments.php
+   /inventory/transfers.php
+   /inventory/inquiry/stock_movements.php
+   /inventory/manage/items.php
+   /manufacturing/work_order_add_finished.php
+   /manufacturing/work_order_entry.php
+   /manufacturing/work_order_issue.php
+   /manufacturing/work_order_release.php
+   /purchasing/supplier_payment.php
+   /purchasing/po_entry_items.php
+   /purchasing/po_receive_items.php
+   /purchasing/supplier_credit.php
+   /purchasing/supplier_credit_grns.php
+   /purchasing/supplier_invoice.php
+   /purchasing/supplier_invoice_grns.php
+   /purchasing/supplier_trans_gl.php
+   /purchasing/includes/ui/po_ui.inc
+   /purchasing/inquity/po_search.php
+   /purchasing/inquiry/po_search_completed.php
+   /purchasing/inquiry/supplier_allocation_inquiry.php
+   /purchasing/inquiry/supplier_inquiry.php
+   /reporting/reports_main.php
+   /reporting/includes/reports_classes.inc
+   /sales/credit_note_entry.php
+   /sales/customer_credit_invoice.php
+   /sales/customer_payments.php
+   /sales/sales_order_entry.php
+   /sales/includes/ui/sales_order_ui.inc
+   /sales/inquiry/customer_allocation_inquiry.php
+   /sales/inquiry/customer_inquiry.php
+   /sales/inquiry/sales_orders_view.php
+   New image files:
+   /themes/default/images/cal.gif
+   /themes/default/images/next.gif
+   /themes/default/images/prev.gif
+
+19-Apr-2007 Joe Hunt
+ # Bug no 1703895, Account numbers are varchars, need quotes, fixed
+ # Bug no 1703891, Reserved MySQL words used as column names, fixed
+ $ /taxes/db/tax_types_db.inc
+
+ # Bug no 1703888, Apostrophes and other unescaped characters, fixed
+ $ /gl/manage/gl_accounts.php
+   /gl/includes/db/gl_db_accounts.inc
+   /includes/ui/ui_input.inc
+
+18-Apr-2007 Joe Hunt
+ # Bug no 1702594, Logon Loop, fixed
+ $ config.php
+
+-------------------- 1.0a Stable Released ----------------------
+10-Apr-2007 Joe Hunt
+ ! Release 1.0a established on SourceForge, fixing the bugs.
+
+11-Apr-2007 Joe Hunt
+ # Bug No 1698214, Creating Items, fixed
+ $ /includes/ui/ui_lists.inc
+ # Bug no 1698216, Item Movements, fixed
+ $ /inventory/manage/items.php
+
+-------------------- 1.0 Stable Released ----------------------
+10-Apr-2007 Joe Hunt
+ ! Release 1.0 established on SourceForge.
+
+2. Copyright and disclaimer
+---------------------------
+This application is opensource software released under the GPL.  Please
+see source code and the LICENSE file
\ No newline at end of file
index 3701369a1a5304dcc30d810f660624539915e037..a1f1b7515ff3937776a40016edcc62991633da2b 100644 (file)
@@ -4,11 +4,13 @@ $page_security = 9;
 $path_to_root="..";
 include_once($path_to_root . "/includes/session.inc");
 
-page(_("Fiscal Years"));
-
 include_once($path_to_root . "/includes/date_functions.inc");
 include_once($path_to_root . "/admin/db/company_db.inc");
 include_once($path_to_root . "/includes/ui.inc");
+$js = "";
+if ($use_date_picker)
+       $js .= get_js_date_picker();
+page(_("Fiscal Years"), false, false, "", $js);
 
 //---------------------------------------------------------------------------------------------
 
@@ -178,8 +180,8 @@ function display_fiscalyear_edit($selected_id)
        } 
        else 
        {
-               text_row(_("Fiscal Year Begin:"), 'from_date', null, 15, 10);
-               text_row(_("Fiscal Year End:"), 'to_date', null, 15, 10);
+               date_row(_("Fiscal Year Begin:"), 'from_date', null, 0, 0, 1001);
+               date_row(_("Fiscal Year End:"), 'to_date', null, 0, 0, 1001);
        }
 
        yesno_list_row(_("Is Closed:"), 'closed', null, "", "", false);
index d349e5f23e6036bf3553678030a0360fbe0b2f2b..8b6ab74686543fa4b37f557088f43e3c12cc816e 100644 (file)
@@ -4,13 +4,15 @@ $path_to_root="..";
 $page_security = 14;
 include_once($path_to_root . "/includes/session.inc");
 
-page(_("Void a Transaction"));
-
 include_once($path_to_root . "/includes/date_functions.inc");
 include_once($path_to_root . "/includes/ui.inc");
 include_once($path_to_root . "/includes/data_checks.inc");
 
 include_once($path_to_root . "/admin/db/voiding_db.inc");
+$js = "";
+if ($use_date_picker)
+       $js .= get_js_date_picker();
+page(_("Void a Transaction"), false, false, "", $js);
 
 //----------------------------------------------------------------------------------------
 
index e25272473df696d488654d7678d9b9009d5178b3..dd09acd75406c66504db5a3028e82e29353a3601 100644 (file)
        // Main Title
        $app_title = "FrontAccounting";
     // application version
-    $version           = "1.0a";
+    $version           = "1.0.1";
 
     // Build for development purposes
-    $build_version     = "12";
+    $build_version     = "15";
 
        // Powered by
        $power_by               = "FrontAccounting";
 
        /* use popup windows for views */
        $use_popup_windows = 1;
+
     /*Stock units array*/
        $stock_units    = array(_("ea."), _("m"), _("kgg"), _("tons"), _("l"), _("lbs"), _("dozen"), _("pack"), _("hrs"));
 
+       /* use date picker for all date fields */
+       $use_date_picker = 1;
+
+       /* use Audit Trails in GL */
+       $use_audit_trail = 0;
+
        $dateformats    = array("MMDDYYYY", "DDMMYYYY", "YYYYMMDD");
        $dateseps               = array("/", ".", "-", " ");
        $thoseps                = array(",", ".", " ");
index 6474ac1482aee51cbc82cc30d4c67b189d060a4d..c1c0a0bef9b893bb2ff38285f291df8cb43b001c 100644 (file)
@@ -5,8 +5,6 @@ $page_security = 10;
 $path_to_root="..";
 include_once($path_to_root . "/includes/session.inc");
 
-page(_("Dimension Entry"));
-
 include_once($path_to_root . "/includes/date_functions.inc");
 include_once($path_to_root . "/includes/manufacturing.inc");
 include_once($path_to_root . "/includes/data_checks.inc");
@@ -14,6 +12,11 @@ include_once($path_to_root . "/includes/data_checks.inc");
 include_once($path_to_root . "/dimensions/includes/dimensions_db.inc");
 include_once($path_to_root . "/dimensions/includes/dimensions_ui.inc");
 
+$js = "";
+if ($use_date_picker)
+       $js .= get_js_date_picker();
+page(_("Dimension Entry"), false, false, "", $js);
+
 //---------------------------------------------------------------------------------------
 
 if (isset($_GET['trans_no']))
index f659092be0136597d1e17a96d6a26c64322a6af3..02a78f1d10e284c274ee6b3b722754e317c5fa65 100644 (file)
@@ -10,6 +10,8 @@ include_once($path_to_root . "/includes/ui.inc");
 $js = "";
 if ($use_popup_windows)
        $js .= get_js_open_window(800, 500);
+if ($use_date_picker)  
+       $js .= get_js_date_picker();
 
 if ($_GET['outstanding_only']) 
 {
index 83d2750afe2430b7414f9a3c85e69c034daae978..2f5b1f1ae4265186679708f2147a309757c62c45 100644 (file)
@@ -14,6 +14,8 @@ include_once($path_to_root . "/gl/includes/gl_ui.inc");
 $js = "";
 if ($use_popup_windows)
        $js .= get_js_open_window(800, 500);
+if ($use_date_picker)
+       $js .= get_js_date_picker();
 page(_("Transfer between Bank Accounts"), false, false, "", $js);
 
 check_db_has_bank_accounts(_("There are no bank accounts defined in the system."));
index 019e36a4cace9f77342654e3207cc76a6a7250f2..fd4f98e567a28e5228a03d7e2276bae285c341b6 100644 (file)
@@ -15,6 +15,8 @@ include_once($path_to_root . "/gl/includes/gl_ui.inc");
 $js = get_js_form_entry("CodeID2", "code_id", "amount");
 if ($use_popup_windows)
        $js .= get_js_open_window(800, 500);
+if ($use_date_picker)
+       $js .= get_js_date_picker();
 $js .= get_js_set_focus('CodeID2');
 page(_("Bank Account Deposit Entry"), false, false, "setFocus()", $js);
 
index 7ac7b703df69f97625faf05da8a5a3912d1aa8d3..2a027399891d5c70ce593bca6883d5df5ef6f0ba 100644 (file)
@@ -16,6 +16,8 @@ include_once($path_to_root . "/gl/includes/gl_ui.inc");
 $js = get_js_form_entry("CodeID2", "code_id", "AmountDebit");
 if ($use_popup_windows)
        $js .= get_js_open_window(800, 500);
+if ($use_date_picker)
+       $js .= get_js_date_picker();
 $js .= get_js_set_focus('CodeID2');
 
 page(_("Journal Entry"), false, false, "setFocus()", $js);
index 9f2d506711088930ff066865acaea9c9c5f7676b..a1cf3d16d222b79a2c9b9b35badeb57405d0c99e 100644 (file)
@@ -16,6 +16,8 @@ include_once($path_to_root . "/gl/includes/gl_ui.inc");
 $js = get_js_form_entry("CodeID2", "code_id", "amount");
 if ($use_popup_windows)
        $js .= get_js_open_window(800, 500);
+if ($use_date_picker)
+       $js .= get_js_date_picker();
 $js .= get_js_set_focus('CodeID2');
 
 page(_("Bank Account Payment Entry"), false, false, "setFocus()", $js);
index f6a8ef1eab9a6d82fea76c9b10792e00955ade5e..fe71fb2d4907110a4435d7dcbbf28f812ff9f1e0 100644 (file)
@@ -10,6 +10,8 @@
 function add_gl_trans($type, $trans_id, $date_, $account, $dimension, $dimension2, $memo_,
        $amount, $currency=null, $person_type_id=null, $person_id=null, $err_msg="")
 {
+       global $use_audit_trail;
+       
        $date = date2sql($date_);
        if ($currency != null)
                $amount_in_home_currency = to_home_currency($amount, $currency, $date_);
@@ -19,6 +21,13 @@ function add_gl_trans($type, $trans_id, $date_, $account, $dimension, $dimension
                $dimension = 0;
        if ($dimension2 == null || $dimension2 < 0)
                $dimension2 = 0;
+       if (isset($use_audit_trail) && $use_audit_trail)
+       {
+               if ($memo_ == "" || $memo_ == null)
+                       $memo_ = $_SESSION["wa_current_user"]->username;
+               else
+                       $memo_ = $_SESSION["wa_current_user"]->username . " - " . $memo_;
+       }               
        $sql = "INSERT INTO ".TB_PREF."gl_trans ( type, type_no, tran_date,
                account, dimension_id, dimension2_id, memo_, amount";
 
index 1ff071592c037c7d3c9564742426ca35a2ab5ed4..eab22259592a7483107f89e08aa7d1c5a02cb5f9 100644 (file)
@@ -14,6 +14,8 @@ include_once($path_to_root . "/includes/banking.inc");
 $js = "";
 if ($use_popup_windows)
        $js .= get_js_open_window(800, 500);
+if ($use_date_picker)
+       $js .= get_js_date_picker();
 page(_("Bank Statement"), false, false, "", $js);
 
 check_db_has_bank_accounts(_("There are no bank accounts defined in the system."));
index 94ef03bf91a706c5d643d97a7a0e94c219bcdfef..23ffa17bd3f0d8c718f7b698da8826b4b7071045 100644 (file)
@@ -14,6 +14,8 @@ include_once($path_to_root . "/gl/includes/gl_db.inc");
 $js = get_js_set_focus('account');
 if ($use_popup_windows)
        $js .= get_js_open_window(800, 500);
+if ($use_date_picker)
+       $js .= get_js_date_picker();
 
 page(_("General Ledger Account Inquiry"), false, false, "setFocus()", $js);
 
index 28653ff0e57d6327ebff246fa2a093d19b98d284..d6587c3143365be774e3575a0f921f6a5e54dfcc 100644 (file)
@@ -5,14 +5,18 @@ $path_to_root="../..";
 
 include_once($path_to_root . "/includes/session.inc");
 
-page(_("Trial Balance"));
-
 include_once($path_to_root . "/includes/date_functions.inc");
 include_once($path_to_root . "/includes/ui.inc");
 include_once($path_to_root . "/includes/data_checks.inc");
 
 include_once($path_to_root . "/gl/includes/gl_db.inc");
 
+$js = "";
+if ($use_date_picker)
+       $js = get_js_date_picker();
+
+page(_("Trial Balance"), false, false, "", $js);
+
 //----------------------------------------------------------------------------------------------------
 
 
index e2be27d991abccb52f6c76cc0909ccd2f59e2cba..52798c8877f00fd460b02cd77b7fc13b10d29d21 100644 (file)
@@ -4,12 +4,15 @@ $page_security = 9;
 $path_to_root="../..";
 include_once($path_to_root . "/includes/session.inc");
 
-page(_("Exchange Rates"));
-
 include_once($path_to_root . "/includes/date_functions.inc");
 include_once($path_to_root . "/includes/ui.inc");
 include_once($path_to_root . "/includes/banking.inc");
 
+$js = "";
+if ($use_date_picker)
+       $js .= get_js_date_picker();
+page(_("Exchange Rates"), false, false, "", $js);
+
 //---------------------------------------------------------------------------------------------
 
 if (isset($_GET['selected_id']))
index 7e9218e6b42305ca719fc64759fdcb69e80e2e50..58027b2fcface54702a10d6f467a16d3cf6cd881 100644 (file)
@@ -130,12 +130,12 @@ function check_row($label, $name, $value, $submit_on_change=false)
 
 //-----------------------------------------------------------------------------------
 
-function labelheader_cell($label, $params="") // Ã¤ndra till label_td
+function labelheader_cell($label, $params="") 
 {
        echo "<td class='tableheader' $params>$label</td>\n";
 }
 
-function label_cell($label, $params="") // Ã¤ndra till label_td
+function label_cell($label, $params="") 
 {
        echo "<td $params>$label</td>\n";
 }
@@ -237,16 +237,25 @@ function text_row_ex($label, $name, $size, $max=null, $value=null, $params=null,
 
 function date_cells($label, $name, $init=null, $inc_days=0, $inc_months=0, $inc_years=0, $params=null)
 {
+       global $use_date_picker, $path_to_root;
        if (!isset($_POST[$name]) || $_POST[$name] == "") 
        {
                if (!$init)
                {
-                       $_POST[$name] = date(user_date_display(), Mktime(0,0,0,date("m") + $inc_months,date("d") + $inc_days,date("Y") + $inc_years));
+                       if ($inc_days == 1001)
+                               $_POST[$name] = null;
+                       else    
+                               $_POST[$name] = date(user_date_display(), Mktime(0,0,0,date("m") + $inc_months,date("d") + $inc_days,date("Y") + $inc_years));
                }               
                else
                        $_POST[$name] = $init;
        }
-       text_cells_ex($label, $name, 9, 12, $_POST[$name], $params);
+       if ($use_date_picker)
+               $post_label = "<a href=\"javascript:date_picker('document.forms[0].$name', document.forms[0].$name.value);\">"
+               . "     <img src='$path_to_root/themes/default/images/cal.gif' width='16' height='16' border='0' alt='"._('Click Here to Pick up the date')."'></a>\n";
+       else
+               $post_label = "";
+       text_cells_ex($label, $name, 9, 12, $_POST[$name], $params, $post_label);
 }
 
 function date_row($label, $name, $init=null, $inc_days=0, $inc_months=0, $inc_years=0, $params=null)
index 2e61861edaf8bac33774ab6a4aa2d0c7db925f0a..0eac3a11f1bf8d8d1e43e2d41956c06e9c71b39a 100644 (file)
@@ -16,7 +16,7 @@ function supplier_list($name, $selected_id, $all_option=false, $submit_on_change
 
        $company_currency = get_company_currency();
 
-       $supplier_sql = "SELECT supplier_id, supp_name, curr_code FROM ".TB_PREF."suppliers ORDER BY supplier_id";
+       $supplier_sql = "SELECT supplier_id, supp_name, curr_code FROM ".TB_PREF."suppliers ORDER BY supp_name";
        $supplier_result = db_query($supplier_sql);
 
        if ($selected_id == null)
@@ -89,7 +89,7 @@ function customer_list($name, $selected_id, $all_option=false, $submit_on_change
        else
                echo "<select name='$name'>";
 
-       $customer_sql = "SELECT debtor_no, name, curr_code FROM ".TB_PREF."debtors_master ORDER BY debtor_no";
+       $customer_sql = "SELECT debtor_no, name, curr_code FROM ".TB_PREF."debtors_master ORDER BY name";
        $customer_result = db_query($customer_sql);
 
        $company_currency = get_company_currency();
index d33b9fc6804ca682dfc33d4763afcb0732c951a6..03e343c38abbe0454d7452beb01b40be8e39932b 100644 (file)
@@ -620,6 +620,179 @@ function get_js_png_fix()
                . "</script>\n";
        return $js;
 }      
+
+function get_js_date_picker()
+{
+       global $dateseps, $path_to_root;
+       
+       $encoding = $_SESSION['language']->encoding;    // character encoding
+       $dir = $_SESSION['language']->dir;                              // left to right, right to left
+       $how = user_date_format();                                              // 0 = us/ca, 1 = eu, au, nz, 2 = jp, sw
+       $sep = $dateseps[user_date_sep()];                              // date separator
+       $wstart = ($how != 0);                                                  // weekstart (sun = 0, mon = 1)
+       $width = 250;                                                                   // datepicker width
+       $height = 180;                                                                  // datepicker height
+       $path = "$path_to_root/themes/default/images/"; // path to images
+       $tbgcolor = "#4682b4";                                                  // title backgrond
+       $tcolor = "white";                                                              // title color
+       $wbgcolor = "#87cefa";                                                  // weekdays background
+       $wcolor = "white";                                                              // weekdays color
+       $cbgcolor = "#ffb6c1";                                                  // current day background
+       $ebgcolor = "#dbeaf5";                                                  // week-end background
+       $bgcolor = "white";                                                             // normal background
+       $color = "darkblue";                                                    // month day color
+       $gcolor = "#aaaaaa";                                                    // prev/next month day color
+       $family = "tahoma,verdana";                                             // font-family
+       
+       $js = "\n<script type=\"text/javascript\">\n"
+               . "<!--\n"
+               . "function date_picker(nm, val) {\n"
+               . " var mons = ['"._('January')."', '"._('February')."', '"._('March')."', '"._('April')."', '"._('May')."', '"._('June')."',\n"
+               . "  '"._('July')."', '"._('August')."', '"._('Sebtember')."', '"._('October')."', '"._('November')."', '"._('December')."'];\n"
+               . " var wdays = ['"._('Su')."', '"._('Mo')."', '"._('Tu')."', '"._('We')."', '"._('Th')."', '"._('Fr')."', '"._('Sa')."'];\n"
+               . " var wstart = $wstart; // day of week starts from (normally 0 or 1)\n"
+               . " var _date = (val == null || val =='' ?  new Date() : str2dt(val));\n"
+               . " var _prev = new Date(_date);\n"
+               . " _prev.setMonth(_date.getMonth()-1);\n"
+               . " var _next = new Date(_date);\n"
+               . " _next.setMonth(_date.getMonth()+1);\n"
+               . " var _prevy = new Date(_date);\n"
+               . " _prevy.setFullYear(_date.getFullYear()-1);\n"
+               . " var _nexty = new Date(_date);\n"
+               . " _nexty.setFullYear(_date.getFullYear()+1);\n"
+               . " var _first = new Date(_date);\n"
+               . " _first.setDate(1);\n"
+               . " _first.setDate(1-(7+_first.getDay()-wstart)%7);\n"
+               . " var _last = new Date(_next);\n"
+               . " _last.setDate(0);\n"
+               . " var left = (screen.width - $width) / 2;\n"
+               . " var top = (screen.height - $height) / 2;\n"
+               . "     var buff = new String (\n"
+               . "\"<html dir='$dir'>\\n\"+\n"
+               . "\"<head>\\n\"+\n"
+               . "\"   <title>DatePicker</title>\\n\"+\n"
+               . "\"   <meta http-equiv='Content-type' content='text/html'; charset='$encoding'>\\n\"+\n"
+               . "\"   <style>\\n\"+\n"
+               . "\"       body { background-color:$tbgcolor; margin:0; padding:0; font-family: $family; font-size: 13px; }\\n\"+\n"
+               . "\"       select { font-size: 12px; }\\n\"+\n"
+               . "\"       a { text-decoration: none; }\\n\"+\n"
+               . "\"       a:hover { text-decoration: underline; }\\n\"+\n"
+               . "\"       .tbg { background-color: $tbgcolor; color: $tcolor; font-size: 12px; font-weight: bold; text-align: center;}\\n\"+\n"
+               . "\"       .wbg { background-color: $wbgcolor; color: $wcolor; font-size: 12px; text-align: right; }\\n\"+\n"
+               . "\"       .cbg { background-color: $cbgcolor; font-size: 12px; text-align: right; }\\n\"+\n"
+               . "\"       .ebg { background-color: $ebgcolor; font-size: 12px; text-align: right; }\\n\"+\n"
+               . "\"       .bg { background-color: $bgcolor; font-size: 12px; text-align: right; }\\n\"+\n"
+               . "\"       .c { color: $color; }\\n\"+\n"
+               . "\"       .gc { color: $gcolor; }\\n\"+\n"
+               . "\"   </style>\\n\"+\n"
+               . "\"</head>\\n\"+\n"
+               . "\"<body>\\n\"+\n"
+               . "\"<table cellspacing=\\\"0\\\" border=\\\"0\\\" style=\\\"width:100%;\\\">\\n\"+\n"
+               . "\"<tr><td class=\\\"tbg\\\">\\n\"+\n"
+               . "\"<table cellspacing=\\\"1\\\" cellpadding=\\\"2\\\" border=\\\"0\\\" style=\\\"width:100%;\\\">\\n\"+\n"
+               . "\"<tr>\\n    <td class=\\\"tbg\\\"><a href=\\\"javascript:window.opener.date_picker('\"+\n"
+               . " nm+\"', '\"+ dt2dtstr(_prev)+\"');\\\">\"+\n"
+               . "\"<img src=\\\"".$path."prev.gif\\\" width=\\\"16\\\" height=\\\"16\\\" border=\\\"0\\\"\"+\n"
+               . "\" alt=\\\""._('previous month')."\\\"></a></td>\\n\"+\n"
+               . "\"   <td class=\\\"tbg\\\" colspan=\\\"5\\\">\"+\n"
+               . " mons[_date.getMonth()]+\"</td>\\n\"+\n"
+               . "\"   <td class=\\\"tbg\\\"><a href=\\\"javascript:window.opener.date_picker('\"\n"
+               . " +nm+\"', '\"+dt2dtstr(_next)+\"');\\\">\"+\n"
+               . "\"<img src=\\\"".$path."next.gif\\\" width=\\\"16\\\" height=\\\"16\\\" border=\\\"0\\\"\"+\n"
+               . "\" alt=\\\""._('next month')."\\\"></a></td>\\n</tr>\\n\"+\n"
+               . "\"<tr>\\n    <td class=\\\"tbg\\\"><a href=\\\"javascript:window.opener.date_picker('\"+\n"
+               . " nm+\"', '\"+ dt2dtstr(_prevy)+\"');\\\">\"+\n"
+               . "\"<img src=\\\"".$path."prev.gif\\\" width=\\\"16\\\" height=\\\"16\\\" border=\\\"0\\\"\"+\n"
+               . "\" alt=\\\""._('previous year')."\\\"></a></td>\\n\"+\n"
+               . "\"   <td class=\\\"tbg\\\" colspan=\\\"5\\\">\"+\n"
+               . " _date.getFullYear()+\"</td>\\n\"+\n"
+               . "\"   <td class=\\\"tbg\\\"><a href=\\\"javascript:window.opener.date_picker('\"\n"
+               . " +nm+\"', '\"+dt2dtstr(_nexty)+\"');\\\">\"+\n"
+               . "\"<img src=\\\"".$path."next.gif\\\" width=\\\"16\\\" height=\\\"16\\\" border=\\\"0\\\"\"+\n"
+               . "\" alt=\\\""._('next year')."\\\"></a></td>\\n</tr>\\n\"\n"
+               . ");\n"
+               . " var _current = new Date(_first);\n"
+               . " // weekdays titles\n"
+               . " buff += \"<tr>\\n\";\n"
+               . " for (var n=0; n<7; n++)\n"
+               . "  buff += \" <td class=\\\"wbg\\\">\"+\n"
+               . " wdays[(wstart+n)%7]+\"</td>\\n\";\n"
+               . " // calendar table\n"
+               . " buff += \"</tr>\\n\";\n"
+               . " for (var i=0; i<6; i++) {\n"
+               . "  // row heder\n"
+               . "  buff += \"<tr>\\n\";\n"
+               . "  for (var n=0; n<7; n++) {\n"
+               . "   if (_current.getDate() == _date.getDate() &&\n"
+               . "    _current.getMonth() == _date.getMonth())\n"
+               . "    // current date\n"
+               . "        buff += \"   <td class=\\\"cbg\\\">\";\n"
+               . "       else if (_current.getDay() == 0 || _current.getDay() == 6)\n"
+               . "        // weekend days\n"
+               . "    buff += \"       <td class=\\\"ebg\\\">\";\n"
+               . "   else\n"
+               . "    // working days of current month\n"
+               . "        buff += \"   <td class=\\\"bg\\\">\";\n"
+               . "       if (_current.getMonth() == _date.getMonth())\n"
+               . "    // days of current month\n"
+               . "    buff += \"<a href=\\\"javascript:window.opener.\"+nm+\n"
+               . "             \".value='\"+dt2dtstr(_current)+\"'; window.close();\\\">\"+\n"
+               . "             \"<span class=\\\"c\\\">\";\n"
+               . "   else\n" 
+               . "    // days of other months\n"
+               . "    buff += \"<a href=\\\"javascript:window.opener.\"+nm+\n"
+               . "             \".value='\"+dt2dtstr(_current)+\"'; window.close();\\\">\"+\n"
+               . "             \"<span class=\\\"gc\\\">\";\n"
+               . "   buff += _current.getDate()+\"</span></a></td>\\n\";\n"
+               . "   _current.setDate(_current.getDate()+1);\n"
+               . "  }\n"
+               . "  // row footer\n"
+               . "  buff += \"</tr>\\n\";\n"
+               . " }\n"
+               . " // picker footer\n"
+               . " buff +=\n"
+               . " \"</table>\\n\" +\n"
+               . " \"</tr>\\n</td>\\n</table>\\n\" +\n"
+               . " \"</body>\\n\" +\n"
+               . " \"</html>\\n\";\n"
+               . "     var picker = window.open('', 'DatePicker',\n" 
+               . "  'width=$width,height=$height,status=no,resizable=yes,top='+top+',left='+left+'');\n"
+               . " picker.opener = self;\n"
+               . " var _doc = picker.document;\n"
+               . " _doc.write (buff);\n"
+               . " _doc.close();\n"
+               . "}\n"
+               . "// datetime parsing and formatting routimes. modify them if you wish other datetime format\n"
+               . "function str2dt (val) {\n"
+               . " var re_date = /^(\\d+)\\".$sep."(\\d+)\\".$sep."(\\d+)+$/;\n"
+               . " if (!re_date.exec(val))\n"
+               . "  return alert('"._('Invalid Datetime format').": '+ val);\n";
+       if ($how == 0)  
+               $js .= " return (new Date (RegExp.$3, RegExp.$1-1, RegExp.$2));\n";
+       elseif ($how == 1)              
+               $js .= " return (new Date (RegExp.$3, RegExp.$2-1, RegExp.$1));\n";
+       else    
+               $js .= " return (new Date (RegExp.$1, RegExp.$2-1, RegExp.$3));\n";
+       $js .= "}\n"
+               . "function dt2dtstr (_date) {\n"
+               . " var da = new String(_date.getDate());\n"
+               . " var mo = new String(_date.getMonth()+1);\n"
+               . " var yr = _date.getFullYear();\n"
+               . " if (da.length < 2)\n"
+               . "  da = '0'+da;\n"
+               . " if (mo.length < 2)\n"
+               . "  mo = '0'+mo;\n";
+       if ($how == 0)  
+               $js .= " return (new String (mo+'$sep'+da+'$sep'+yr));\n";
+       elseif ($how == 1)      
+               $js .= " return (new String (da+'$sep'+mo+'$sep'+yr));\n";
+       else    
+               $js .= " return (new String (yr+'$sep'+mo+'$sep'+da));\n";
+       $js .= "}\n"
+               . "-->\n"
+               . "</script>\n";
+       return $js;     
+}
        
 function alert($msg)
 {
index 9a114e41c6ab5ef217ab6c481a3a6c8c550015eb..e2a793843208bc676b69404e26d11852cb8cc952 100644 (file)
@@ -14,6 +14,8 @@ include_once($path_to_root . "/inventory/includes/inventory_db.inc");
 $js = "";
 if ($use_popup_windows)
        $js .= get_js_open_window(800, 500);
+if ($use_date_picker)
+       $js .= get_js_date_picker();
 page(_("Item Adjustments Note"), false, false, "", $js);
 
 //-----------------------------------------------------------------------------------------------
index a1c22e1eacaf0ed464b11a2f3ec1fe8de255228d..942a1a8e68b5c4a9e33b50052398e9b067b72257 100644 (file)
@@ -13,6 +13,9 @@ include_once($path_to_root . "/includes/ui.inc");
 $js = "";
 if ($use_popup_windows)
        $js .= get_js_open_window(800, 500);
+if ($use_date_picker)
+       $js .= get_js_date_picker();
+
 page(_("Inventory Item Movement"), false, false, "", $js);
 
 if (isset($_GET['stock_id']))
index 78ca9f2b34378a79175738a18409c486a07dbe12..af08d0275b2f7023212b3fe0309ad4dbf04adc57 100644 (file)
@@ -292,7 +292,7 @@ else
 
 text_row(_("Name:"), 'description', null, 52, 50);
 
-textarea_row(_('Description:'), 'long_description', null, 50, 3);
+textarea_row(_('Description:'), 'long_description', null, 45, 3);
 
 end_table();
 start_table("$table_style2 width=40%");
index e9e931faeab6829423c84511d8d87636554a192c..4b0339b2c585d9ed4a54f547c91ff12734ef8c12 100644 (file)
@@ -14,6 +14,8 @@ include_once($path_to_root . "/inventory/includes/inventory_db.inc");
 $js = "";
 if ($use_popup_windows)
        $js .= get_js_open_window(800, 500);
+if ($use_date_picker)
+       $js .= get_js_date_picker();
 page(_("Inventory Location Transfers"), false, false, "", $js);
 
 
index 2771994a4816859c16bf833f6985782490a99395..ecc1d0a64db3198bd082aa1b5c6a57fa35e396c6 100644 (file)
@@ -4,8 +4,6 @@ $page_security = 10;
 $path_to_root="..";
 include_once($path_to_root . "/includes/session.inc");
 
-page(_("Produce or Unassemble Finished Items From Work Order"));
-
 include_once($path_to_root . "/includes/date_functions.inc");
 include_once($path_to_root . "/includes/db/inventory_db.inc");
 include_once($path_to_root . "/includes/manufacturing.inc");
@@ -13,6 +11,11 @@ include_once($path_to_root . "/includes/manufacturing.inc");
 include_once($path_to_root . "/manufacturing/includes/manufacturing_db.inc");
 include_once($path_to_root . "/manufacturing/includes/manufacturing_ui.inc");
 
+$js = "";
+if ($use_date_picker)
+       $js .= get_js_date_picker();
+page(_("Produce or Unassemble Finished Items From Work Order"), false, false, "", $js);
+
 if (isset($_GET['trans_no']) && $_GET['trans_no'] != "")
 {
        $_POST['selected_id'] = $_GET['trans_no'];
index 8b9c10f79e816fda97bac8a85e6de2fa0cac3c8f..b26ed9cce0d653bc8ddf04e0976a301a1c4a3105 100644 (file)
@@ -5,8 +5,6 @@ $path_to_root="..";
 
 include_once($path_to_root . "/includes/session.inc");
 
-page(_("Work Order Entry"));
-
 include_once($path_to_root . "/includes/date_functions.inc");
 include_once($path_to_root . "/includes/manufacturing.inc");
 include_once($path_to_root . "/includes/data_checks.inc");
@@ -14,6 +12,12 @@ include_once($path_to_root . "/includes/data_checks.inc");
 include_once($path_to_root . "/manufacturing/includes/manufacturing_db.inc");
 include_once($path_to_root . "/manufacturing/includes/manufacturing_ui.inc");
 
+$js = "";
+if ($use_date_picker)
+       $js .= get_js_date_picker();
+page(_("Work Order Entry"), false, false, "", $js);
+
+
 check_db_has_manufacturable_items(_("There are no manufacturable items defined in the system."));
 
 check_db_has_locations(("There are no inventory locations defined in the system."));
index 6d094ab3adbf1e0f53035f522dd4a4a1a1b3a1cb..ec3945669a8304d838508e7119af6f3f66076dc4 100644 (file)
@@ -6,14 +6,16 @@ include_once($path_to_root . "/includes/ui/items_cart.inc");
 
 include_once($path_to_root . "/includes/session.inc");
 
-page(_("Issue Items to Work Order"));
-
 include_once($path_to_root . "/includes/date_functions.inc");
 include_once($path_to_root . "/includes/data_checks.inc");
 
 include_once($path_to_root . "/manufacturing/includes/manufacturing_db.inc");
 include_once($path_to_root . "/manufacturing/includes/manufacturing_ui.inc");
 include_once($path_to_root . "/manufacturing/includes/work_order_issue_ui.inc");
+$js = "";
+if ($use_date_picker)
+       $js .= get_js_date_picker();
+page(_("Issue Items to Work Order"), false, false, "", $js);
 
 //-----------------------------------------------------------------------------------------------
 
index e93e4355434c4e004d344c0d741aed7a37bfca7f..6b4effc264d70040a9439286b7cdbbbd94e57ae3 100644 (file)
@@ -4,14 +4,17 @@ $page_security = 10;
 $path_to_root="..";
 include_once($path_to_root . "/includes/session.inc");
 
-page(_("Work Order Release to Manufacturing"));
-
 include_once($path_to_root . "/includes/date_functions.inc");
 include_once($path_to_root . "/includes/manufacturing.inc");
 
 include_once($path_to_root . "/manufacturing/includes/manufacturing_db.inc");
 include_once($path_to_root . "/manufacturing/includes/manufacturing_ui.inc");
 
+$js = "";
+if ($use_date_picker)
+       $js .= get_js_date_picker();
+page(_("Work Order Release to Manufacturing"), false, false, "", $js);
+
 if (isset($_GET["trans_no"]))
 {
        $selected_id = $_GET["trans_no"];
index e074abaf6c8ffaa70c28e2e3819811980b12e856..2992f509fb00192bccedae73bdebcbf3bbf12c27 100644 (file)
@@ -97,7 +97,7 @@ function display_po_header(&$order)
        echo "</td><td valign=center>"; // outer table
 
        echo "<table height='5'>";
-       // kolla det här?????????
+       // check this out?????????
        //if (!isset($_POST['OrderDate']) || $_POST['OrderDate'] == "")
        //      $_POST['OrderDate'] = $order->orig_order_date;
        //if (!isset($_POST['OrderDate']) || $_POST['OrderDate'] == "")
@@ -106,7 +106,7 @@ function display_po_header(&$order)
        //      if (!is_date_in_fiscalyear($_POST['OrderDate']))
        //              $_POST['OrderDate'] = end_fiscalyear();
        //}
-       text_row(_("Order Date:"), 'OrderDate', $_POST['OrderDate'], 12, 12);
+       date_row(_("Order Date:"), 'OrderDate', $_POST['OrderDate'], 0, 0, 0);
 
        text_row(_("Supplier's Reference:"), 'Requisition', null, 16, 15);
 
@@ -307,7 +307,7 @@ function po_item_controls(&$order, $stock_id=null)
        text_cells(null, 'qty', null, 13, 15);
 
        label_cell($_POST['units']);
-       text_cells(null, 'req_del_date', null, 12, 12);
+       date_cells(null, 'req_del_date', null, 0, 0, 0);
        text_cells(null, 'price', null, 15, 14);
 
        //$line_total = $_POST['qty'] * $_POST['price'] * (1 - $_POST['Disc'] / 100);
index dcdddc2c54e8d8818f42ae5bdc42b45816d33d5c..e460d53e121ef31745ffd4cdb1d0942e5867cf41 100644 (file)
@@ -9,6 +9,8 @@ include($path_to_root . "/purchasing/includes/purchasing_ui.inc");
 $js = "";
 if ($use_popup_windows)
        $js .= get_js_open_window(900, 500);
+if ($use_date_picker)
+       $js .= get_js_date_picker();
 page(_("Search Outstanding Purchase Orders"), false, false, "", $js);
 
 if (isset($_GET['order_number']))
index fd74821fdc6d7341495975af390fa1fcadc305b2..0df563a2b2316930874a0047f6c84a5f5a46bbef 100644 (file)
@@ -8,6 +8,8 @@ include($path_to_root . "/purchasing/includes/purchasing_ui.inc");
 $js = "";
 if ($use_popup_windows)
        $js .= get_js_open_window(900, 500);
+if ($use_date_picker)
+       $js .= get_js_date_picker();
 page(_("Search Purchase Orders"), false, false, "", $js);
 
 if (isset($_GET['order_number']))
index f715ef50a83fb26630d15c87a1367f362836099f..e80201393fb07ba5b6c9f770db4cbb91b6c19b1c 100644 (file)
@@ -8,6 +8,8 @@ include($path_to_root . "/purchasing/includes/purchasing_ui.inc");
 $js = "";
 if ($use_popup_windows)
        $js .= get_js_open_window(900, 500);
+if ($use_date_picker)
+       $js .= get_js_date_picker();
 page(_("Supplier Allocation Inquiry"), false, false, "", $js);
 
 if (isset($_GET['supplier_id']))
index bb6aa4403538aec2d2016fd64072ca186b463b02..3ad2fd261e0e17662d47b04d7c858bca472a31fa 100644 (file)
@@ -9,6 +9,8 @@ include($path_to_root . "/purchasing/includes/purchasing_ui.inc");
 $js = "";
 if ($use_popup_windows)
        $js .= get_js_open_window(900, 500);
+if ($use_date_picker)
+       $js .= get_js_date_picker();
 page(_("Supplier Inquiry"), false, false, "", $js);
 
 if (isset($_GET['supplier_id'])){
index 3c9976be61ea9ad0d594703c91d5d8f1f18a6c24..be2393ae774eaa8285b4a44803bf08bd07f6e022 100644 (file)
@@ -15,6 +15,8 @@ include_once($path_to_root . "/purchasing/includes/purchasing_ui.inc");
 $js = get_js_form_entry("StockID2", "stock_id", "qty");
 if ($use_popup_windows)
        $js .= get_js_open_window(900, 500);
+if ($use_date_picker)
+       $js .= get_js_date_picker();
 
 if (isset($_GET['ModifyOrderNumber'])) 
 {
index 8ad1ef068b10aa565e467ef13b906fd501fca5cf..3fa2705da45700657219e95dc4437f9bf0a50522 100644 (file)
@@ -10,6 +10,8 @@ include_once($path_to_root . "/purchasing/includes/purchasing_ui.inc");
 $js = "";
 if ($use_popup_windows)
        $js .= get_js_open_window(900, 500);
+if ($use_date_picker)
+       $js .= get_js_date_picker();
 page(_("Receive Purchase Order Items"), false, false, "", $js);
 
 //---------------------------------------------------------------------------------------------------------------
index af63044b64f211062dc3caba03c7a1cc966fcba3..ff4c07249a78e311a8b525c3c2ccf297a5df2818 100644 (file)
@@ -15,6 +15,8 @@ include_once($path_to_root . "/purchasing/includes/purchasing_ui.inc");
 $js = "";
 if ($use_popup_windows)
        $js .= get_js_open_window(900, 500);
+if ($use_date_picker)
+       $js .= get_js_date_picker();
 page(_("Supplier Credit Note"), false, false, "", $js);
 
 //----------------------------------------------------------------------------------------
index 5f84a39c712b1df5201367f214220e8ff1747f16..f195d788545982b955e6ea5d5398730c31078f55 100644 (file)
@@ -6,10 +6,12 @@ $path_to_root="..";
 include_once($path_to_root . "/purchasing/includes/supp_trans_class.inc");
 include_once($path_to_root . "/includes/session.inc");
 
-page(_("Select Received Items to Add"));
-
 include_once($path_to_root . "/purchasing/includes/purchasing_ui.inc");
 include_once($path_to_root . "/purchasing/includes/purchasing_db.inc");
+$js = "";
+if ($use_date_picker)
+       $js .= get_js_date_picker();
+page(_("Select Received Items to Add"), false, false, "", $js);
 
 if (!isset($_SESSION['supp_trans']))
 {
index 33afd6c48763c6097ec19ef1543ab02553710796..b4a83c48a3948506d95c3b63363a07535c372d41 100644 (file)
@@ -14,6 +14,8 @@ include_once($path_to_root . "/purchasing/includes/purchasing_ui.inc");
 $js = "";
 if ($use_popup_windows)
        $js .= get_js_open_window(900, 500);
+if ($use_date_picker)
+       $js .= get_js_date_picker();
 page(_("Enter Supplier Invoice"), false, false, "", $js);
 
 
index 0bd9f578cf4d2c7b35d80410dbab4aefb556d2b2..04aaaea7526dfce88f108eb2ed6cb05410dadd2e 100644 (file)
@@ -9,7 +9,10 @@ include_once($path_to_root . "/includes/session.inc");
 include_once($path_to_root . "/purchasing/includes/purchasing_ui.inc");
 include_once($path_to_root . "/purchasing/includes/purchasing_db.inc");
 
-page(_("Select Received Items to Add"));
+$js = "";
+if ($use_date_picker)
+       $js .= get_js_date_picker();
+page(_("Select Received Items to Add"), false, false, "", $js);
 
 
 if (!isset($_SESSION['supp_trans']))
index 82aa967cb074ddae2ebdd34dfe7d881a55c48906..d92973570efb4a39f2b44095f321d2f2c930af36 100644 (file)
@@ -13,6 +13,8 @@ include_once($path_to_root . "/purchasing/includes/purchasing_db.inc");
 $js = "";
 if ($use_popup_windows)
        $js .= get_js_open_window(900, 500);
+if ($use_date_picker)
+       $js .= get_js_date_picker();
 page(_("Supplier Payment Entry"), false, false, "", $js);
 
 
index ced011834b349babbcb3cb82ba402cba6667a08e..903dc56980ba1b91e14e71972d5368fc3880fca8 100644 (file)
@@ -6,9 +6,12 @@ $path_to_root="..";
 include($path_to_root . "/purchasing/includes/supp_trans_class.inc");
 include($path_to_root . "/includes/session.inc");
 
-page(_("Add GL Items"));
-
 include($path_to_root . "/purchasing/includes/purchasing_ui.inc");
+$js = "";
+if ($use_date_picker)
+       $js .= get_js_date_picker();
+page(_("Add GL Items"), false, false, "", $js);
+
 
 if (!isset($_SESSION['supp_trans']))
 {
index 354aab4d1b6644191cb04933a3bffed49dcb6836..f5c64f19585089b70631a291c9014de944f8087d 100644 (file)
@@ -85,7 +85,7 @@ class Report
        }
        function getDisplay() 
        {
-               global $path_to_root;
+               global $path_to_root, $use_date_picker;
                $st = "
 <script language='javascript'>
        function displayReport_" . $this->id . "() {
@@ -152,8 +152,13 @@ class Report
                                                        $date = begin_month($bdate);
                                                }
                                        }       
-                                       //$st .= "<input type='text' name='RP_" . $this->id . "_$index' value='$date' onblur='javascript:checkDate(this)'>";
-                                       $st .= "<input type='text' name='RP_" . $this->id . "_$index' value='$date'>";
+                                       $name = "RP_" . $this->id . "_$index";                  
+                                       //$st .= "<input type='text' name='$name' value='$date' onblur='javascript:checkDate(this)'>";
+                                       $st .= "<input type='text' name='$name' value='$date'>";
+                                       if ($use_date_picker)
+                                               $st .= "<a href=\"javascript:date_picker('document.forms[0].$name', document.forms[0].$name.value);\">"
+                                               . "     <img src='$path_to_root/themes/default/images/cal.gif' width='16' height='16' border='0' alt='"._('Click Here to Pick up the date')."'></a>\n";
+                                       
                                        break;
                                case 'YES_NO':  
                                        $sel = array(_('No'), _("Yes"));
@@ -215,15 +220,19 @@ class Report
                                        break;
                                case 'CUSTOMERS_NO_FILTER':
                                case 'CUSTOMERS':
-                                       $sql = "SELECT debtor_no, name FROM ".TB_PREF."debtors_master ORDER BY debtor_no";
+                                       $sql = "SELECT debtor_no, name FROM ".TB_PREF."debtors_master ORDER BY name";
                                        if ($param->param_type == 'CUSTOMERS_NO_FILTER')
                                                $st .= dup_simple_codeandname_list($sql, "RP_" . $this->id . "_$index", $dummy, true, _("No Customer Filter"), true);
                                        else    
                                                $st .= dup_simple_codeandname_list($sql, "RP_" . $this->id . "_$index", $dummy);
                                        break;
+                               case 'SUPPLIERS_NO_FILTER':
                                case 'SUPPLIERS':
-                                       $sql = "SELECT supplier_id, supp_name FROM ".TB_PREF."suppliers ORDER BY supplier_id";
-                                       $st .= dup_simple_codeandname_list($sql, "RP_" . $this->id . "_$index", $dummy);
+                                       $sql = "SELECT supplier_id, supp_name FROM ".TB_PREF."suppliers ORDER BY supp_name";
+                                       if ($param->param_type == 'SUPPLIERS_NO_FILTER')
+                                               $st .= dup_simple_codeandname_list($sql, "RP_" . $this->id . "_$index", $dummy, true, _("No Supplier Filter"), true);
+                                       else    
+                                               $st .= dup_simple_codeandname_list($sql, "RP_" . $this->id . "_$index", $dummy);
                                        break;
                                case 'INVOICE':
                                        $IV = _("IV");
index 2709e75385a0eb489163be10f760378fa779e794..022212ec263242dee8978beeabb00ee5177073a7 100644 (file)
@@ -47,14 +47,13 @@ function print_customer_balances()
 
     $to = $_POST['PARAM_0'];
     $fromcust = $_POST['PARAM_1'];
-    $tocust = $_POST['PARAM_2'];
-    $currency = $_POST['PARAM_3'];
-    $comments = $_POST['PARAM_4'];
-
-       if ($fromcust == null)
-               $fromcust = 0;
-       if ($tocust == null)
-               $tocust = 0;
+    $currency = $_POST['PARAM_2'];
+    $comments = $_POST['PARAM_3'];
+
+       if ($fromcust == reserved_words::get_all_numeric())
+               $from = _('All');
+       else
+               $from = get_customer_name($fromcust);
     $dec = user_price_dec();
 
        if ($currency == reserved_words::get_all())
@@ -74,8 +73,7 @@ function print_customer_balances()
     
     $params =   array(         0 => $comments,
                                    1 => array('text' => _('End Date'), 'from' => $to,          'to' => ''),
-                                   2 => array('text' => _('Customer'), 'from' => get_customer_name($fromcust),
-                               'to' => get_customer_name($tocust)),
+                                   2 => array('text' => _('Customer'), 'from' => $from,        'to' => ''),
                                    3 => array('text' => _('Currency'), 'from' => $currency, 'to' => ''));
 
     $rep = new FrontReport(_('Customer Balances'), "CustomerBalances.pdf", user_pagesize());
@@ -87,8 +85,10 @@ function print_customer_balances()
        $total = array();
        $grandtotal = array();
 
-       $sql = "SELECT debtor_no, name, curr_code FROM ".TB_PREF."debtors_master
-               WHERE debtor_no>=$fromcust AND debtor_no<=$tocust ORDER BY name";
+       $sql = "SELECT debtor_no, name, curr_code FROM ".TB_PREF."debtors_master ";
+       if ($fromcust != reserved_words::get_all_numeric())
+               $sql .= "WHERE debtor_no=$fromcust ";
+       $sql .= "ORDER BY name";
        $result = db_query($sql, "The customers could not be retrieved");
 
        while ($myrow = db_fetch($result)) 
index e9412e6a12977657d5b60e98fab0c453de35334a..ffe022f81930f8dc4a158e1cfe927acea859eec0 100644 (file)
@@ -104,21 +104,20 @@ function print_aged_customer_analysis()
 
     $to = $_POST['PARAM_0'];
     $fromcust = $_POST['PARAM_1'];
-    $tocust = $_POST['PARAM_2'];
-    $currency = $_POST['PARAM_3'];
-       $summaryOnly = $_POST['PARAM_4'];
-    $graphics = $_POST['PARAM_5'];
-    $comments = $_POST['PARAM_6'];
+    $currency = $_POST['PARAM_2'];
+       $summaryOnly = $_POST['PARAM_3'];
+    $graphics = $_POST['PARAM_4'];
+    $comments = $_POST['PARAM_5'];
        if ($graphics)
        {
                include_once($path_to_root . "reporting/includes/class.graphic.inc");
                $pg = new graph();
        }       
     
-       if ($fromcust == null)
-               $fromcust = 0;
-       if ($tocust == null)
-               $tocust = 0;
+       if ($fromcust == reserved_words::get_all_numeric())
+               $from = _('All');
+       else
+               $from = get_customer_name($fromcust);
     $dec = user_price_dec();
 
        if ($summaryOnly == 1)
@@ -147,8 +146,7 @@ function print_aged_customer_analysis()
     
     $params =   array(         0 => $comments,   
                                        1 => array('text' => _('End Date'), 'from' => $to, 'to' => ''),
-                                   2 => array('text' => _('Customer'), 'from' => get_customer_name($fromcust),
-                            'to' => get_customer_name($tocust)),
+                                   2 => array('text' => _('Customer'), 'from' => $from, 'to' => ''),
                                    3 => array('text' => _('Currency'), 'from' => $currency, 'to' => ''),
                        4 => array('text' => _('Type'),         'from' => $summary,'to' => ''));
 
@@ -163,8 +161,10 @@ function print_aged_customer_analysis()
        $total = array();
        $total[0] = $total[1] = $total[2] = $total[3] = $total[4] = 0.0;
        
-       $sql = "SELECT debtor_no, name, curr_code FROM ".TB_PREF."debtors_master
-               WHERE debtor_no>=$fromcust AND debtor_no<=$tocust ORDER BY name";
+       $sql = "SELECT debtor_no, name, curr_code FROM ".TB_PREF."debtors_master ";
+       if ($fromcust != reserved_words::get_all_numeric())
+               $sql .= "WHERE debtor_no=$fromcust ";
+       $sql .= "ORDER BY name";
        $result = db_query($sql, "The customers could not be retrieved");
        
        while ($myrow=db_fetch($result)) 
index 3b6e64f571649206a46b9b25a703f3806352ce00..3a6f1cff9497265b3d73ffa70cc2eca9be8578b5 100644 (file)
@@ -48,14 +48,13 @@ function print_supplier_balances()
 
     $to = $_POST['PARAM_0'];
     $fromsupp = $_POST['PARAM_1'];
-    $tosupp = $_POST['PARAM_2'];
-    $currency = $_POST['PARAM_3'];
-    $comments = $_POST['PARAM_4'];
+    $currency = $_POST['PARAM_2'];
+    $comments = $_POST['PARAM_3'];
     
-    if ($fromsupp == null)
-       $fromsupp = 0;
-    if ($tosupp == null)
-       $tosupp = 0;
+       if ($fromsupp == reserved_words::get_all_numeric())
+               $from = _('All');
+       else
+               $from = get_supplier_name($fromsupp);
     $dec = user_price_dec();
 
        if ($currency == reserved_words::get_all())
@@ -75,8 +74,7 @@ function print_supplier_balances()
 
     $params =   array(         0 => $comments,
                                    1 => array('text' => _('End Date'), 'from' => $to, 'to' => ''),
-                                   2 => array('text' => _('Supplier'), 'from' => get_supplier_name($fromsupp),
-                            'to' => get_supplier_name($tosupp)),
+                                   2 => array('text' => _('Supplier'), 'from' => $from, 'to' => ''),
                                    3 => array(  'text' => _('Currency'),'from' => $currency, 'to' => ''));
 
     $rep = new FrontReport(_('Supplier Balances'), "SupplierBalances.pdf", user_pagesize());
@@ -88,8 +86,10 @@ function print_supplier_balances()
        $total = array();
        $grandtotal = array();
 
-       $sql = "SELECT supplier_id, supp_name AS name, curr_code FROM ".TB_PREF."suppliers
-               WHERE supplier_id>=$fromsupp AND supplier_id<=$tosupp ORDER BY supp_name";
+       $sql = "SELECT supplier_id, supp_name AS name, curr_code FROM ".TB_PREF."suppliers ";
+       if ($fromsupp != reserved_words::get_all_numeric())
+               $sql .= "WHERE supplier_id=$fromsupp ";
+       $sql .= "ORDER BY supp_name";
        $result = db_query($sql, "The customers could not be retrieved");
        
        while ($myrow=db_fetch($result)) 
index 62d422c61d85a665860bd0bbebccfe3066134fa8..6c23b6347045aa1825ca2df088a0089aff5b3dc3 100644 (file)
@@ -113,21 +113,20 @@ function print_aged_supplier_analysis()
 
     $to = $_POST['PARAM_0'];
     $fromsupp = $_POST['PARAM_1'];
-    $tosupp = $_POST['PARAM_2'];
-    $currency = $_POST['PARAM_3'];
-       $summaryOnly = $_POST['PARAM_4'];
-    $graphics = $_POST['PARAM_5'];
-    $comments = $_POST['PARAM_6'];
+    $currency = $_POST['PARAM_2'];
+       $summaryOnly = $_POST['PARAM_3'];
+    $graphics = $_POST['PARAM_4'];
+    $comments = $_POST['PARAM_5'];
        if ($graphics)
        {
                include_once($path_to_root . "reporting/includes/class.graphic.inc");
                $pg = new graph();
        }       
     
-       if ($fromsupp == null)
-               $fromsupp = 0;
-       if ($tosupp == null)
-               $tosupp = 0;
+       if ($fromsupp == reserved_words::get_all_numeric())
+               $from = _('All');
+       else
+               $from = get_supplier_name($fromsupp);
     $dec = user_price_dec();
 
        if ($summaryOnly == 1)
@@ -156,8 +155,7 @@ function print_aged_supplier_analysis()
 
     $params =   array(         0 => $comments,
                                    1 => array('text' => _('End Date'), 'from' => $to, 'to' => ''),
-                                   2 => array('text' => _('Supplier'), 'from' => get_supplier_name($fromsupp),
-                            'to' => get_supplier_name($tosupp)),
+                                   2 => array('text' => _('Supplier'), 'from' => $from, 'to' => ''),
                                    3 => array('text' => _('Currency'),'from' => $currency,'to' => ''),
                        4 => array('text' => _('Type'), 'from' => $summary,'to' => ''));
 
@@ -178,8 +176,10 @@ function print_aged_supplier_analysis()
        $pastdue1 = $PastDueDays1 + 1 . "-" . $PastDueDays2 . " " . _('Days');
        $pastdue2 = _('Over') . " " . $PastDueDays2 . " " . _('Days');
        
-       $sql = "SELECT supplier_id, supp_name AS name, curr_code FROM ".TB_PREF."suppliers
-               WHERE supplier_id>=$fromsupp AND supplier_id<=$tosupp ORDER BY name";
+       $sql = "SELECT supplier_id, supp_name AS name, curr_code FROM ".TB_PREF."suppliers ";
+       if ($fromsupp != reserved_words::get_all_numeric())
+               $sql .= "WHERE supplier_id=$fromsupp ";
+       $sql .= "ORDER BY supp_name";
        $result = db_query($sql, "The suppliers could not be retrieved");
        
        while ($myrow=db_fetch($result)) 
index 8c4b2aed14a76d8c196a82edef2754e23fcce45f..3434996764ce483660aa9084321e6d870323304a 100644 (file)
@@ -52,14 +52,13 @@ function print_payment_report()
 
     $to = $_POST['PARAM_0'];
     $fromsupp = $_POST['PARAM_1'];
-    $tosupp = $_POST['PARAM_2'];
-    $currency = $_POST['PARAM_3'];
-    $comments = $_POST['PARAM_4'];
-
-       if ($fromsupp == null)
-               $fromsupp = 0;
-       if ($tosupp == null)
-               $tosupp = 0;
+    $currency = $_POST['PARAM_2'];
+    $comments = $_POST['PARAM_3'];
+
+       if ($fromsupp == reserved_words::get_all_numeric())
+               $from = _('All');
+       else
+               $from = get_supplier_name($fromsupp);
            
     $dec = user_price_dec();
 
@@ -80,8 +79,7 @@ function print_payment_report()
 
     $params =   array(         0 => $comments,
                                    1 => array('text' => _('End Date'), 'from' => $to, 'to' => ''),
-                                   2 => array('text' => _('Supplier'), 'from' => get_supplier_name($fromsupp),
-                            'to' => get_supplier_name($tosupp)),
+                                   2 => array('text' => _('Supplier'), 'from' => $from, 'to' => ''),
                                    3 => array(  'text' => _('Currency'),'from' => $currency, 'to' => ''));
 
     $rep = new FrontReport(_('Payment Report'), "PaymentReport.pdf", user_pagesize());
@@ -94,7 +92,10 @@ function print_payment_report()
        $grandtotal = array();
 
        $sql = "SELECT supplier_id, supp_name AS name, curr_code, ".TB_PREF."payment_terms.terms FROM ".TB_PREF."suppliers, ".TB_PREF."payment_terms
-               WHERE supplier_id>=$fromsupp AND supplier_id<=$tosupp AND ".TB_PREF."suppliers.payment_terms = ".TB_PREF."payment_terms.terms_indicator 
+               WHERE ";
+       if ($fromsupp != reserved_words::get_all_numeric())
+               $sql .= "supplier_id=$fromsupp AND ";
+       $sql .= "".TB_PREF."suppliers.payment_terms = ".TB_PREF."payment_terms.terms_indicator 
                ORDER BY supp_name";
        $result = db_query($sql, "The customers could not be retrieved");
        
index a1bbf4329e784dcbe511d60e00b8ce98fc64caee..98e99e0c1c25f31164a1210a980d6dc56092b348 100644 (file)
@@ -19,7 +19,7 @@ include_once($path_to_root . "gl/includes/gl_db.inc");
 // trial_inquiry_controls();
 print_outstanding_GRN();
 
-function getTransactions($fromsupp, $tosupp)
+function getTransactions($fromsupp)
 {
        $sql = "SELECT ".TB_PREF."grn_batch.id,
                        order_no,
@@ -39,10 +39,10 @@ function getTransactions($fromsupp, $tosupp)
                WHERE ".TB_PREF."grn_batch.supplier_id=".TB_PREF."suppliers.supplier_id
                AND ".TB_PREF."grn_batch.id = ".TB_PREF."grn_items.grn_batch_id
                AND ".TB_PREF."grn_items.po_detail_item = ".TB_PREF."purch_order_details.po_detail_item
-               AND qty_recd-quantity_inv <>0
-               AND ".TB_PREF."grn_batch.supplier_id >='" . $fromsupp . "'
-               AND ".TB_PREF."grn_batch.supplier_id <='" . $tosupp . "'
-               ORDER BY ".TB_PREF."grn_batch.supplier_id, 
+               AND qty_recd-quantity_inv <>0 ";
+       if ($fromsupp != reserved_words::get_all_numeric())
+               $sql .= "AND ".TB_PREF."grn_batch.supplier_id ='" . $fromsupp . "' ";
+       $sql .= "ORDER BY ".TB_PREF."grn_batch.supplier_id, 
                        ".TB_PREF."grn_batch.id";
 
     return db_query($sql, "No transactions were returned");
@@ -57,13 +57,12 @@ function print_outstanding_GRN()
     include_once($path_to_root . "reporting/includes/pdf_report.inc");
 
     $fromsupp = $_POST['PARAM_0'];
-    $tosupp = $_POST['PARAM_1'];
-    $comments = $_POST['PARAM_2'];
+    $comments = $_POST['PARAM_1'];
     
-       if ($fromsupp == null)
-               $fromsupp = 0;
-       if ($tosupp == null)
-               $tosupp = 0;
+       if ($fromsupp == reserved_words::get_all_numeric())
+               $from = _('All');
+       else
+               $from = get_supplier_name($fromsupp);
     $dec = user_price_dec();
 
        $cols = array(0, 40, 80, 190,   250, 320, 385, 450,     515);
@@ -74,8 +73,7 @@ function print_outstanding_GRN()
        $aligns = array('left', 'left', 'left', 'right', 'right', 'right', 'right', 'right');
 
     $params =   array(         0 => $comments,
-                                   1 => array('text' => _('Supplier'), 'from' => get_supplier_name($fromsupp),
-                            'to' => get_supplier_name($tosupp)));
+                                   1 => array('text' => _('Supplier'), 'from' => $from, 'to' => ''));
 
     $rep = new FrontReport(_('Outstanding GRNs Report'), "OutstandingGRN.pdf", user_pagesize());
 
@@ -86,7 +84,7 @@ function print_outstanding_GRN()
        $Tot_Val=0;
        $Supplier = '';
        $SuppTot_Val=0;
-       $res = getTransactions($fromsupp, $tosupp);
+       $res = getTransactions($fromsupp);
        
        While ($GRNs = db_fetch($res))
        {       
index 9077ba19446dde092fa7a5181020b7db9506a814..dc06a0823a276e5daf4386b62fdeac83895b4ada 100644 (file)
@@ -4,12 +4,14 @@ $path_to_root="..";
 $page_security = 5;
 include_once($path_to_root . "/includes/session.inc");
 
-page(_("Reports and Analysis"));
-
 include_once($path_to_root . "/includes/date_functions.inc");
 include_once($path_to_root . "/includes/data_checks.inc");
 include_once($path_to_root . "/includes/ui.inc");
 include_once($path_to_root . "/reporting/includes/reports_classes.inc");
+$js = "";
+if ($use_date_picker)
+       $js .= get_js_date_picker();
+page(_("Reports and Analysis"), false, false, "", $js);
 
 $reports = new BoxReports;
 
@@ -18,14 +20,12 @@ $dim = get_company_pref('use_dimension');
 $reports->addReportClass(_('Customer'));
 $reports->addReport(_('Customer'),101,_('Customer Balances'),
        array(  new ReportParam(_('End Date'),'DATE'), 
-                       new ReportParam(_('From Customer'),'CUSTOMERS'), 
-                       new ReportParam(_('To Customer'),'CUSTOMERS'), 
+                       new ReportParam(_('Customer'),'CUSTOMERS_NO_FILTER'), 
                        new ReportParam(_('Currency Filter'),'CURRENCY'), 
                        new ReportParam(_('Comments'),'TEXTBOX')));
 $reports->addReport(_('Customer'),102,_('Aged Customer Analysis'),
        array(  new ReportParam(_('End Date'),'DATE'), 
-                       new ReportParam(_('From Customer'),'CUSTOMERS'), 
-                       new ReportParam(_('To Customer'),'CUSTOMERS'), 
+                       new ReportParam(_('Customer'),'CUSTOMERS_NO_FILTER'), 
                        new ReportParam(_('Currency Filter'),'CURRENCY'), 
                        new ReportParam(_('Summary Only'),'YES_NO'), 
                        new ReportParam(_('Graphics'),'GRAPHIC'), 
@@ -55,7 +55,7 @@ $reports->addReport(_('Customer'),107,_('Print Invoices/Credit Notes'),
                        new ReportParam(_('email Customers'),'YES_NO'), 
                        new ReportParam(_('Comments'),'TEXTBOX')));
 $reports->addReport(_('Customer'),108,_('Print Statements'),
-       array(  new ReportParam(_('Customers'),'CUSTOMERS_NO_FILTER'), 
+       array(  new ReportParam(_('Customer'),'CUSTOMERS_NO_FILTER'), 
                        new ReportParam(_('Currency Filter'),'CURRENCY'), 
                        new ReportParam(_('Bank Account'),'BANK_ACCOUNTS'), 
                        new ReportParam(_('Email Customers'),'YES_NO'), 
@@ -71,27 +71,23 @@ $reports->addReport(_('Customer'),109,_('Print Sales Orders'),
 $reports->addReportClass(_('Supplier'));
 $reports->addReport(_('Supplier'),201,_('Supplier Balances'),
        array(  new ReportParam(_('End Date'),'DATE'), 
-                       new ReportParam(_('From Supplier'),'SUPPLIERS'), 
-                       new ReportParam(_('To Supplier'),'SUPPLIERS'), 
+                       new ReportParam(_('Supplier'),'SUPPLIERS_NO_FILTER'), 
                        new ReportParam(_('Currency Filter'),'CURRENCY'), 
                        new ReportParam(_('Comments'),'TEXTBOX')));
 $reports->addReport(_('Supplier'),202,_('Aged Supplier Analyses'),
        array(  new ReportParam(_('End Date'),'DATE'), 
-                       new ReportParam(_('From Supplier'),'SUPPLIERS'), 
-                       new ReportParam(_('To Supplier'),'SUPPLIERS'), 
+                       new ReportParam(_('Supplier'),'SUPPLIERS_NO_FILTER'), 
                        new ReportParam(_('Currency Filter'),'CURRENCY'), 
                        new ReportParam(_('Summary Only'),'YES_NO'), 
                        new ReportParam(_('Graphics'),'GRAPHIC'), 
                        new ReportParam(_('Comments'),'TEXTBOX')));
 $reports->addReport(_('Supplier'),203,_('Payment Report'),
        array(  new ReportParam(_('End Date'),'DATE'), 
-                       new ReportParam(_('From Supplier'),'SUPPLIERS'), 
-                       new ReportParam(_('To Supplier'),'SUPPLIERS'), 
+                       new ReportParam(_('Supplier'),'SUPPLIERS_NO_FILTER'), 
                        new ReportParam(_('Currency Filter'),'CURRENCY'), 
                        new ReportParam(_('Comments'),'TEXTBOX')));
 $reports->addReport(_('Supplier'),204,_('Outstanding GRNs Report'),
-       array(  new ReportParam(_('From Supplier'),'SUPPLIERS'), 
-                       new ReportParam(_('To Supplier'),'SUPPLIERS'), 
+       array(  new ReportParam(_('Supplier'),'SUPPLIERS_NO_FILTER'), 
                        new ReportParam(_('Comments'),'TEXTBOX')));
 $reports->addReport(_('Supplier'),209,_('Print Purchase Orders'),
        array(  new ReportParam(_('From'),'PO'), 
index fd1474eee0d5c46abee2c3d8d4f00dddee75735e..98a7442f3feaa70e93204ea785ec2b3f7ab67b29 100644 (file)
@@ -21,6 +21,8 @@ include_once($path_to_root . "/sales/includes/ui/sales_order_ui.inc");
 $js = "";
 if ($use_popup_windows)
        $js .= get_js_open_window(900, 500);
+if ($use_date_picker)
+       $js .= get_js_date_picker();
 page(_("Customer Credit Note"), false, false, "", $js);
 
 //-----------------------------------------------------------------------------------------------
index b64f8019bde9cc524f58307eaa2d16fad0b3da02..468d4f4a13a3a4267fc4a6e1b857f063f8263faa 100644 (file)
@@ -14,6 +14,8 @@ include_once($path_to_root . "/sales/includes/sales_ui.inc");
 $js = "";
 if ($use_popup_windows)
        $js .= get_js_open_window(900, 500);
+if ($use_date_picker)
+       $js .= get_js_date_picker();
 page(_("Credit all or part of an Invoice"), false, false, "", $js);
 
 //---------------------------------------------------------------------------------------------------------------
index 7153e4576b712f8cf220d2a28ebcc43b30c503a3..0e38464f2a4fd0dd034bbd5e29407f769b930100 100644 (file)
@@ -15,6 +15,8 @@ include_once($path_to_root . "/sales/includes/sales_db.inc");
 $js = "";
 if ($use_popup_windows)
        $js .= get_js_open_window(900, 500);
+if ($use_date_picker)
+       $js .= get_js_date_picker();
 page(_("Customer Payment Entry"), false, false, "", $js);
 
 //----------------------------------------------------------------------------------------------
index 8c6e0d53aa65d756591fe86b656c20c8385faae2..fd4326f89f9284a09fd344fa31072c2f624f5b0b 100644 (file)
@@ -356,7 +356,7 @@ function display_delivery_details(&$order)
     echo "<table>";
     locations_list_row(_("Deliver from Location:"), 'Location', $order->Location);
 
-       text_row(_("Required Delivery Date:"), 'delivery_date', $order->delivery_date, 14, 14);
+       date_row(_("Required Delivery Date:"), 'delivery_date', $order->delivery_date, 0, 0, 0);
 
     text_row(_("Deliver To:"), 'deliver_to', $order->deliver_to, 40, 40);
 
index 67c366a0c2e001c7418b87a24b3f4c3a8558b7d9..07aad1e3d7b04eb02bf8fe13d9b83f12bf93a9a1 100644 (file)
@@ -10,6 +10,8 @@ include_once($path_to_root . "/sales/includes/sales_db.inc");
 $js = "";
 if ($use_popup_windows)
        $js .= get_js_open_window(900, 500);
+if ($use_date_picker)
+       $js .= get_js_date_picker();
 page(_("Customer Allocation Inquiry"), false, false, "", $js);
 
 if (isset($_GET['customer_id']))
index 89200826d51fb8cb7b290c5da41b13f4f2dd904c..ee8d4b3db9bc405f4b1c7ca4e84db91916e8d8bd 100644 (file)
@@ -10,6 +10,8 @@ include_once($path_to_root . "/sales/includes/sales_db.inc");
 $js = "";
 if ($use_popup_windows)
        $js .= get_js_open_window(900, 500);
+if ($use_date_picker)
+       $js .= get_js_date_picker();
 page(_("Customer Inquiry"), false, false, "", $js);
 
 
index 81f1ebae171400947f5ae95f4e17e84f4082f3b8..d6409e56ab75a3c40a2da33fae71f084de9b334d 100644 (file)
@@ -9,6 +9,8 @@ include($path_to_root . "/sales/includes/sales_ui.inc");
 $js = "";
 if ($use_popup_windows)
        $js .= get_js_open_window(900, 600);
+if ($use_date_picker)
+       $js .= get_js_date_picker();
 
 if (isset($_GET['OutstandingOnly']) && ($_GET['OutstandingOnly'] == true)) 
 {
index 1f2d194c431ff244c5090f0bf9db2a0b84097a06..c8c75bd468187983008f9eb2211f64a0d01497bc 100644 (file)
@@ -15,6 +15,8 @@ include_once($path_to_root . "/sales/includes/sales_db.inc");
 $js = get_js_form_entry("StockID2", "stock_id", "qty");
 if ($use_popup_windows)
        $js .= get_js_open_window(900, 500);
+if ($use_date_picker)
+       $js .= get_js_date_picker();
 
 if (isset($_GET['ModifyOrderNumber'])) 
 {
diff --git a/themes/default/images/cal.gif b/themes/default/images/cal.gif
new file mode 100644 (file)
index 0000000..8526cf5
Binary files /dev/null and b/themes/default/images/cal.gif differ
diff --git a/themes/default/images/next.gif b/themes/default/images/next.gif
new file mode 100644 (file)
index 0000000..bf02152
Binary files /dev/null and b/themes/default/images/next.gif differ
diff --git a/themes/default/images/prev.gif b/themes/default/images/prev.gif
new file mode 100644 (file)
index 0000000..211e1fa
Binary files /dev/null and b/themes/default/images/prev.gif differ