From 431531eebf3ba494002cfbf7ea36f9e82d4975c0 Mon Sep 17 00:00:00 2001 From: Joe Hunt Date: Mon, 23 Apr 2007 21:57:22 +0000 Subject: [PATCH] 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. --- CHANGELOG.txt | 129 +++++++++++++ admin/fiscalyears.php | 10 +- admin/void_transaction.php | 6 +- config.php | 11 +- dimensions/dimension_entry.php | 7 +- dimensions/inquiry/search_dimensions.php | 2 + gl/bank_transfer.php | 2 + gl/gl_deposit.php | 2 + gl/gl_journal.php | 2 + gl/gl_payment.php | 2 + gl/includes/db/gl_db_trans.inc | 9 + gl/inquiry/bank_inquiry.php | 2 + gl/inquiry/gl_account_inquiry.php | 2 + gl/inquiry/gl_trial_balance.php | 8 +- gl/manage/exchange_rates.php | 7 +- includes/ui/ui_input.inc | 17 +- includes/ui/ui_lists.inc | 4 +- includes/ui/ui_view.inc | 173 ++++++++++++++++++ inventory/adjustments.php | 2 + inventory/inquiry/stock_movements.php | 3 + inventory/manage/items.php | 2 +- inventory/transfers.php | 2 + manufacturing/work_order_add_finished.php | 7 +- manufacturing/work_order_entry.php | 8 +- manufacturing/work_order_issue.php | 6 +- manufacturing/work_order_release.php | 7 +- purchasing/includes/ui/po_ui.inc | 6 +- purchasing/inquiry/po_search.php | 2 + purchasing/inquiry/po_search_completed.php | 2 + .../inquiry/supplier_allocation_inquiry.php | 2 + purchasing/inquiry/supplier_inquiry.php | 2 + purchasing/po_entry_items.php | 2 + purchasing/po_receive_items.php | 2 + purchasing/supplier_credit.php | 2 + purchasing/supplier_credit_grns.php | 6 +- purchasing/supplier_invoice.php | 2 + purchasing/supplier_invoice_grns.php | 5 +- purchasing/supplier_payment.php | 2 + purchasing/supplier_trans_gl.php | 7 +- reporting/includes/reports_classes.inc | 21 ++- reporting/rep101.php | 24 +-- reporting/rep102.php | 26 +-- reporting/rep201.php | 22 +-- reporting/rep202.php | 26 +-- reporting/rep203.php | 23 +-- reporting/rep204.php | 26 ++- reporting/reports_main.php | 26 ++- sales/credit_note_entry.php | 2 + sales/customer_credit_invoice.php | 2 + sales/customer_payments.php | 2 + sales/includes/ui/sales_order_ui.inc | 2 +- sales/inquiry/customer_allocation_inquiry.php | 2 + sales/inquiry/customer_inquiry.php | 2 + sales/inquiry/sales_orders_view.php | 2 + sales/sales_order_entry.php | 2 + themes/default/images/cal.gif | Bin 0 -> 127 bytes themes/default/images/next.gif | Bin 0 -> 214 bytes themes/default/images/prev.gif | Bin 0 -> 212 bytes 58 files changed, 551 insertions(+), 133 deletions(-) create mode 100644 CHANGELOG.txt create mode 100644 themes/default/images/cal.gif create mode 100644 themes/default/images/next.gif create mode 100644 themes/default/images/prev.gif diff --git a/CHANGELOG.txt b/CHANGELOG.txt new file mode 100644 index 00000000..34369167 --- /dev/null +++ b/CHANGELOG.txt @@ -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 diff --git a/admin/fiscalyears.php b/admin/fiscalyears.php index 3701369a..a1f1b751 100644 --- a/admin/fiscalyears.php +++ b/admin/fiscalyears.php @@ -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); diff --git a/admin/void_transaction.php b/admin/void_transaction.php index d349e5f2..8b6ab746 100644 --- a/admin/void_transaction.php +++ b/admin/void_transaction.php @@ -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); //---------------------------------------------------------------------------------------- diff --git a/config.php b/config.php index e2527247..dd09acd7 100644 --- a/config.php +++ b/config.php @@ -52,10 +52,10 @@ // 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"; @@ -63,9 +63,16 @@ /* 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(",", ".", " "); diff --git a/dimensions/dimension_entry.php b/dimensions/dimension_entry.php index 6474ac14..c1c0a0be 100644 --- a/dimensions/dimension_entry.php +++ b/dimensions/dimension_entry.php @@ -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'])) diff --git a/dimensions/inquiry/search_dimensions.php b/dimensions/inquiry/search_dimensions.php index f659092b..02a78f1d 100644 --- a/dimensions/inquiry/search_dimensions.php +++ b/dimensions/inquiry/search_dimensions.php @@ -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']) { diff --git a/gl/bank_transfer.php b/gl/bank_transfer.php index 83d2750a..2f5b1f1a 100644 --- a/gl/bank_transfer.php +++ b/gl/bank_transfer.php @@ -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.")); diff --git a/gl/gl_deposit.php b/gl/gl_deposit.php index 019e36a4..fd4f98e5 100644 --- a/gl/gl_deposit.php +++ b/gl/gl_deposit.php @@ -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); diff --git a/gl/gl_journal.php b/gl/gl_journal.php index 7ac7b703..2a027399 100644 --- a/gl/gl_journal.php +++ b/gl/gl_journal.php @@ -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); diff --git a/gl/gl_payment.php b/gl/gl_payment.php index 9f2d5067..a1cf3d16 100644 --- a/gl/gl_payment.php +++ b/gl/gl_payment.php @@ -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); diff --git a/gl/includes/db/gl_db_trans.inc b/gl/includes/db/gl_db_trans.inc index f6a8ef1e..fe71fb2d 100644 --- a/gl/includes/db/gl_db_trans.inc +++ b/gl/includes/db/gl_db_trans.inc @@ -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"; diff --git a/gl/inquiry/bank_inquiry.php b/gl/inquiry/bank_inquiry.php index 1ff07159..eab22259 100644 --- a/gl/inquiry/bank_inquiry.php +++ b/gl/inquiry/bank_inquiry.php @@ -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.")); diff --git a/gl/inquiry/gl_account_inquiry.php b/gl/inquiry/gl_account_inquiry.php index 94ef03bf..23ffa17b 100644 --- a/gl/inquiry/gl_account_inquiry.php +++ b/gl/inquiry/gl_account_inquiry.php @@ -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); diff --git a/gl/inquiry/gl_trial_balance.php b/gl/inquiry/gl_trial_balance.php index 28653ff0..d6587c31 100644 --- a/gl/inquiry/gl_trial_balance.php +++ b/gl/inquiry/gl_trial_balance.php @@ -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); + //---------------------------------------------------------------------------------------------------- diff --git a/gl/manage/exchange_rates.php b/gl/manage/exchange_rates.php index e2be27d9..52798c88 100644 --- a/gl/manage/exchange_rates.php +++ b/gl/manage/exchange_rates.php @@ -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'])) diff --git a/includes/ui/ui_input.inc b/includes/ui/ui_input.inc index 7e9218e6..58027b2f 100644 --- a/includes/ui/ui_input.inc +++ b/includes/ui/ui_input.inc @@ -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 "$label\n"; } -function label_cell($label, $params="") // ändra till label_td +function label_cell($label, $params="") { echo "$label\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 = "" + . " "._(\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) diff --git a/includes/ui/ui_lists.inc b/includes/ui/ui_lists.inc index 2e61861e..0eac3a11 100644 --- a/includes/ui/ui_lists.inc +++ b/includes/ui/ui_lists.inc @@ -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 "