--- /dev/null
+/**
+* @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
$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);
//---------------------------------------------------------------------------------------------
}
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);
$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);
//----------------------------------------------------------------------------------------
// 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(",", ".", " ");
$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");
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']))
$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'])
{
$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."));
$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);
$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);
$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);
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_);
$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";
$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."));
$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);
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);
+
//----------------------------------------------------------------------------------------------------
$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']))
//-----------------------------------------------------------------------------------
-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";
}
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)
$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)
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();
. "</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)
{
$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);
//-----------------------------------------------------------------------------------------------
$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']))
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%");
$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);
$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");
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'];
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");
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."));
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);
//-----------------------------------------------------------------------------------------------
$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"];
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'] == "")
// 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);
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);
$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']))
$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']))
$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']))
$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'])){
$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']))
{
$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);
//---------------------------------------------------------------------------------------------------------------
$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);
//----------------------------------------------------------------------------------------
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']))
{
$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);
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']))
$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);
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']))
{
}
function getDisplay()
{
- global $path_to_root;
+ global $path_to_root, $use_date_picker;
$st = "
<script language='javascript'>
function displayReport_" . $this->id . "() {
$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"));
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");
$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())
$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());
$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))
$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)
$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' => ''));
$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))
$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())
$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());
$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))
$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)
$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' => ''));
$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))
$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();
$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());
$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");
// trial_inquiry_controls();
print_outstanding_GRN();
-function getTransactions($fromsupp, $tosupp)
+function getTransactions($fromsupp)
{
$sql = "SELECT ".TB_PREF."grn_batch.id,
order_no,
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");
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);
$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());
$Tot_Val=0;
$Supplier = '';
$SuppTot_Val=0;
- $res = getTransactions($fromsupp, $tosupp);
+ $res = getTransactions($fromsupp);
While ($GRNs = db_fetch($res))
{
$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;
$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'),
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'),
$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'),
$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);
//-----------------------------------------------------------------------------------------------
$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);
//---------------------------------------------------------------------------------------------------------------
$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);
//----------------------------------------------------------------------------------------------
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);
$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']))
$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);
$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))
{
$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']))
{