From 78fe8cb8f56510ba3f6a1720b207a33b5828e071 Mon Sep 17 00:00:00 2001 From: Janusz Dobrowolski Date: Tue, 6 Sep 2011 10:47:39 +0200 Subject: [PATCH] Changes up to 2.3.7 merged into unstable branch. --- .hgtags | 2 + CHANGELOG.txt | 113 ++++++++++++++++++ admin/backups.php | 57 ++++++---- admin/change_current_user_password.php | 2 +- admin/create_coy.php | 8 +- admin/crm_categories.php | 2 +- admin/db/company_db.inc | 7 +- admin/db/fiscalyears_db.inc | 29 ++++- admin/db/transactions_db.inc | 5 + admin/db/users_db.inc | 23 +++- admin/db/voiding_db.inc | 16 ++- admin/gl_setup.php | 2 +- admin/inst_module.php | 1 - admin/users.php | 4 +- admin/void_transaction.php | 10 +- gl/bank_account_reconcile.php | 2 +- gl/bank_transfer.php | 11 +- gl/gl_bank.php | 15 ++- gl/gl_journal.php | 4 +- gl/includes/db/gl_db_accounts.inc | 97 +++++++++++++++- gl/includes/db/gl_db_bank_accounts.inc | 18 +++ gl/includes/db/gl_db_bank_trans.inc | 56 ++++++++- gl/includes/db/gl_db_banking.inc | 152 +++++++++++++++++++------ gl/includes/db/gl_db_rates.inc | 3 +- gl/includes/db/gl_db_trans.inc | 3 +- gl/includes/ui/gl_bank_ui.inc | 26 +++-- gl/inquiry/balance_sheet.php | 43 ++++--- gl/inquiry/gl_account_inquiry.php | 3 +- gl/inquiry/gl_trial_balance.php | 9 +- gl/inquiry/journal_inquiry.php | 31 ++++- gl/manage/bank_accounts.php | 12 +- gl/manage/gl_accounts.php | 44 ++++--- gl/manage/gl_quick_entries.php | 4 +- gl/manage/revaluate_currencies.php | 7 +- gl/view/gl_deposit_view.php | 4 +- includes/current_user.inc | 18 ++- includes/data_checks.inc | 2 - includes/db/audit_trail_db.inc | 4 +- includes/db/inventory_db.inc | 96 +++------------- includes/errors.inc | 6 +- includes/hooks.inc | 36 ++++-- includes/session.inc | 12 +- includes/ui/ui_controls.inc | 29 ++++- includes/ui/ui_lists.inc | 18 ++- includes/ui/ui_view.inc | 49 +++++++- 45 files changed, 811 insertions(+), 284 deletions(-) diff --git a/.hgtags b/.hgtags index ec8ed320..8c650902 100644 --- a/.hgtags +++ b/.hgtags @@ -51,3 +51,5 @@ e06cb52d1d84618b36ad0aaaa40781defecf002e version_2_2_9 6345cd24d272070c42b91419962810f58bd06af0 version_2_3RC3 074d18d3b920bdd41848a904b1a2af5aa40a3ab6 version_2_3_3 dd39e5e145c73e6dcb62b87dc8b6b195116089a9 unstable_2_3_4 +b5cb2a38213b8638e6ece671e0c15796177ae3a9 version_2_3_4 +bbd75fe337d100a74505913140dd01a7bd925831 version_2_3_7 diff --git a/CHANGELOG.txt b/CHANGELOG.txt index 305329a7..91ba336d 100644 --- a/CHANGELOG.txt +++ b/CHANGELOG.txt @@ -10,6 +10,119 @@ ------------ This is a changelog for FrontAccounting All releases. +2011-08-31 23:39 +0200 Joe Hunt +(2874) 0001013: Bank Statement w/Reconcile for print incorporated in core. + reporting/rep602.php + reporting/reports_main.php + +2011-08-19 10:04 +0200 Janusz Dobrowolski +(2868) Due date should be preserved on purchase invoice edition start. + purchasing/includes/db/invoice_db.inc + +2011-07-13 14:52 +0200 Joe Hunt +(2841) Fixed print of taxes on documents + reporting/rep107.php + reporting/rep109.php + reporting/rep110.php + reporting/rep209.php + +2011-07-13 14:00 +0200 Joe Hunt +(2840) Rerun of tax_groups.php + taxes/tax_groups.php + +2011-07-13 10:57 +0200 Joe Hunt +(2839) Rerun of tax_groups_db.inc + taxes/db/tax_groups_db.inc + +2011-07-13 10:52 +0200 Joe Hunt +(2838) Rerun of new tax group and shipping files + includes/ui/ui_view.inc + taxes/db/tax_groups_db.inc + taxes/tax_calc.inc + taxes/tax_groups.php + +2011-07-12 17:16 +0200 Joe Hunt +(2837) Update of default COAs + sql/en_US-demo.sql + sql/en_US-new.sql + +2011-07-12 16:50 +0200 Joe Hunt +(2836) 0000710: Shipping tax on all tax groups. And marking with tax type(s) it shall have. + sales/includes/cart_class.inc + sql/alter2.4.sql + taxes/db/tax_groups_db.inc + taxes/tax_calc.inc + taxes/tax_groups.php + +2011-07-10 23:01 +0200 Janusz Dobrowolski +(2793) Implemented journal entries with multiply virtual AR/AP subaccounts. + admin/db/fiscalyears_db.inc + gl/bank_account_reconcile.php + gl/gl_journal.php + gl/includes/db/gl_db_accounts.inc + gl/includes/db/gl_db_trans.inc + gl/includes/ui/gl_journal_ui.inc + gl/inquiry/bank_inquiry.php + gl/view/gl_deposit_view.php + gl/view/gl_payment_view.php + gl/view/gl_trans_view.php + includes/types.inc + includes/ui/items_cart.inc + includes/ui/ui_lists.inc + purchasing/includes/db/invoice_items_db.inc + purchasing/includes/ui/invoice_ui.inc + reporting/rep601.php + reporting/rep702.php + sql/alter2.4.sql + +2011-05-06 14:07 +0200 Janusz Dobrowolski +(2767) Added tag unstable_2_3_4 for changeset dd39e5e145c7 + .hgtags + +2011-05-06 14:05 +0200 Janusz Dobrowolski +(2758) Merged changes up to version 2.3.4 into unstable. + CHANGELOG.txt + access/login.php + access/logout.php + admin/create_coy.php + admin/db/maintenance_db.inc + admin/db/users_db.inc + admin/db/voiding_db.inc + admin/void_transaction.php + config.default.php + gl/accruals.php + gl/bank_transfer.php + gl/gl_bank.php + gl/includes/db/gl_db_bank_accounts.inc + gl/includes/db/gl_db_bank_trans.inc + gl/includes/db/gl_db_banking.inc + gl/includes/db/gl_db_rates.inc + gl/includes/db/gl_db_trans.inc + gl/includes/ui/gl_bank_ui.inc + gl/inquiry/bank_inquiry.php + gl/inquiry/gl_trial_balance.php + gl/manage/gl_account_types.php + gl/manage/gl_accounts.php + gl/view/gl_trans_view.php + includes/access_levels.inc + includes/data_checks.inc + includes/date_functions.inc + includes/db/connect_db.inc + includes/db/inventory_db.inc + includes/db/manufacturing_db.inc + includes/errors.inc + includes/hooks.inc + includes/lang/gettext.php + includes/packages.inc + includes/references.inc + includes/types.inc + includes/ui/items_cart.inc + includes/ui/ui_controls.inc + includes/ui/ui_input.inc + includes/ui/ui_msgs.inc + includes/ui/ui_view.inc + js/login.js + 2011-04-27 22:03 +0200 Janusz Dobrowolski (2743) Added Purchase Invice edition. includes/app_entries.inc diff --git a/admin/backups.php b/admin/backups.php index 2193486b..8d7bfbc0 100644 --- a/admin/backups.php +++ b/admin/backups.php @@ -33,8 +33,11 @@ if (get_post('view')) { } }; if (get_post('download')) { - download_file(BACKUP_PATH . clean_file_name(get_post('backups'))); - exit; + if (get_post('backups')) { + download_file(BACKUP_PATH . clean_file_name(get_post('backups'))); + exit; + } else + display_error(_("Select backup file first.")); } page(_($help_context = "Backup and Restore Database"), false, false, '', ''); @@ -131,19 +134,25 @@ if (get_post('creat')) { }; if (get_post('restore')) { - if (db_import($backup_path, $conn)) - display_notification(_("Restore backup completed.")); - refresh_sys_prefs(); // re-read system setup + if ($backup_name) { + if (db_import($backup_path, $conn)) + display_notification(_("Restore backup completed.")); + refresh_sys_prefs(); // re-read system setup + } else + display_error(_("Select backup file first.")); } if (get_post('deldump')) { - if (unlink($backup_path)) { - display_notification(_("File successfully deleted.")." " - . _("Filename") . ": " . $backup_name); - $Ajax->activate('backups'); - } - else - display_error(_("Can't delete backup file.")); + if ($backup_name) { + if (unlink($backup_path)) { + display_notification(_("File successfully deleted.")." " + . _("Filename") . ": " . $backup_name); + $Ajax->activate('backups'); + } + else + display_error(_("Can't delete backup file.")); + } else + display_error(_("Select backup file first.")); } if (get_post('upload')) @@ -151,14 +160,18 @@ if (get_post('upload')) $tmpname = $_FILES['uploadfile']['tmp_name']; $fname = trim(basename($_FILES['uploadfile']['name'])); - if (!preg_match("/\.sql(\.zip|\.gz)?$/", $fname)) - display_error(_("You can only upload *.sql backup files")); - elseif (is_uploaded_file($tmpname)) { - rename($tmpname, BACKUP_PATH . $fname); - display_notification( "File uploaded to backup directory"); - $Ajax->activate('backups'); + if ($fname) { + if (!preg_match("/\.sql(\.zip|\.gz)?$/", $fname)) + display_error(_("You can only upload *.sql backup files")); + elseif (is_uploaded_file($tmpname)) { + rename($tmpname, BACKUP_PATH . $fname); + display_notification( "File uploaded to backup directory"); + $Ajax->activate('backups'); + } else + display_error(_("File was not uploaded into the system.")); } else - display_error(_("File was not uploaded into the system.")); + display_error(_("Select backup file first.")); + } //------------------------------------------------------------------------------- start_form(true, true); @@ -173,8 +186,8 @@ table_section(2); table_section_title(_("Backup scripts maintenance")); start_row(); - echo "".get_backup_file_combo().""; - echo ""; + echo "".get_backup_file_combo().""; + echo ""; start_table(); submit_row('view',_("View Backup"), false, '', '', false); submit_row('download',_("Download Backup"), false, '', '', false); @@ -189,7 +202,7 @@ table_section_title(_("Backup scripts maintenance")); end_row(); start_row(); echo ""; - submit_cells('upload',_("Upload file"),'', '', true); + submit_cells('upload',_("Upload file"),"style='padding-left:20px'", '', true); end_row(); end_outer_table(); diff --git a/admin/change_current_user_password.php b/admin/change_current_user_password.php index 247517a2..4ed37fb0 100644 --- a/admin/change_current_user_password.php +++ b/admin/change_current_user_password.php @@ -47,7 +47,7 @@ function can_process() return true; } -if (isset($_POST['UPDATE_ITEM'])) +if (isset($_POST['UPDATE_ITEM']) && check_csrf_token()) { if (can_process()) diff --git a/admin/create_coy.php b/admin/create_coy.php index 66d01d1d..afb02660 100644 --- a/admin/create_coy.php +++ b/admin/create_coy.php @@ -238,8 +238,8 @@ function display_companies() echo "