From ea52d139c2309cc07ec2e37155a3fe304471c0fc Mon Sep 17 00:00:00 2001 From: cvs2hg Date: Tue, 25 Nov 2008 10:26:55 +0000 Subject: [PATCH] fixup commit for tag 'unstable_2_0_5' --- CHANGELOG.txt | 166 ------------------------- access/login.php | 10 -- access/logout.php | 11 +- admin/attachments.php | 17 +-- admin/backups.php | 11 +- admin/change_current_user_password.php | 11 +- admin/db/company_db.inc | 12 +- admin/db/maintenance_db.inc | 11 +- admin/db/printers_db.inc | 10 -- admin/db/users_db.inc | 2 +- admin/db/v_banktrans.inc | 11 +- admin/db/voiding_db.inc | 15 +-- admin/display_prefs.php | 2 +- admin/fiscalyears.php | 13 +- admin/forms_setup.php | 11 +- admin/gl_setup.php | 11 +- admin/inst_upgrade.php | 11 +- admin/payment_terms.php | 13 +- admin/print_profiles.php | 10 -- admin/printers.php | 13 +- admin/shipping_companies.php | 14 +-- admin/users.php | 13 +- admin/view_print_transaction.php | 15 +-- admin/void_transaction.php | 108 +--------------- update.html | 2 +- 25 files changed, 40 insertions(+), 483 deletions(-) diff --git a/CHANGELOG.txt b/CHANGELOG.txt index d853edd1..60ab21c4 100644 --- a/CHANGELOG.txt +++ b/CHANGELOG.txt @@ -19,172 +19,6 @@ Legend: ! -> Note $ -> Affected files -25-Nov-2008 Janusz Dobrowolski -! Merged all changes from main trunk up to 2.0.5 (see details below) -$ /CHANGELOG.txt - /update.html - /admin/void_transaction.php - /admin/db/voiding_db.inc - /gl/includes/db/gl_db_trans.inc - /gl/inquiry/gl_trial_balance.php - /includes/banking.inc - /includes/ui/ui_input.inc - /includes/ui/ui_view.inc - /manufacturing/manage/bom_edit.php - /purchasing/po_receive_items.php - /purchasing/supplier_credit.php - /purchasing/supplier_invoice.php - /purchasing/supplier_payment.php - /purchasing/includes/purchasing_db.inc - /purchasing/includes/db/invoice_db.inc - /purchasing/includes/db/supp_payment_db.inc - /purchasing/includes/db/supp_trans_db.inc - /purchasing/includes/ui/invoice_ui.inc - /reporting/rep101.php - /reporting/rep106.php - /reporting/rep201.php - /reporting/rep203.php - /reporting/rep209.php - /reporting/rep708.php - /reporting/reports_main.php - /reporting/includes/class.pdf.inc - /sales/customer_payments.php - /sales/allocations/customer_allocate.php - /sales/includes/sales_db.inc - /sales/includes/db/cust_trans_db.inc - /sales/includes/db/payment_db.inc - /sales/view/view_receipt.php -------------------------------- Release 2.0.5 -------------------------------------------- -24-Nov.2008 Joe Hunt -! Release 2.0.5 -$ config.php -! Changed update.html -$ update.html -# Small bug fixes -$ /reporting/includes/header2.inc - /sales/view/view_receipt.php - -20-Nov-2008 Janusz Dobrowolski -# [0000082] Bad js allocation on All/None button press. -$ /sales/allocations/customer_allocate.php - -20-Nov-2008 Joe Hunt -# Do not allow editing invoice if allocated > 0 -$ /sales/inquiry/customer_inquiry.php - -19-Nov-2008 Joe Hunt -+ Possibility to view a transaction before final voiding. -$ /admin/void_transaction.php - -11-Nov-2008 Janusz Dobrowolski -# Fixed right alignment of amount cells. -$ /includes/ui/ui_input.inc -# Fixed display bug for fully received items and false modify conflicts. -$ /purchasing/po_receive_items.php - -10-Nov-2008 Joe Hunt -! [0000081] Trial Balance again minor changes. -$ /gl/inquiry/gl_trial_balance.php - /reporting/rep708.php - -07-Nov-2008 Joe Hunt -! [0000081] Changed Trial Balance to show all debits and credits (option to only show balances) -$ /gl/inquiry/gl_trial_balance.php - /reporting/reports_main.php - /reporting/rep708.php - -03-Nov-2008 Janusz Dobrowolski -# Fixed price priority in automatic calculations. -$ sales/includes/sales_db.inc - -30-Oct-2008 Janusz Dobrowolski -# [0000080] BOM elements was not editable after entry. -$ /manufacturing/manage/bom_edit.php - -29-Oct-2008 Joe Hunt -# Voiding a supplier invoice/credit note with GL Postings creates a database error -$ /purchasing/includes/db/invoice_db.inc - -28-Oct-2008 Joe Hunt -# [0000079] Delivery Note/Sales Invoice should not be editable after it has been voided. -$ /admin/db/voiding_db.inc - /sales/inquiry/sales_deliveries_view.php - /sales/inquiry/customer_inquiry.php - -27-Oct-2008 Joe Hunt -! [0000078] Opened Exchange rate for editing (without storing) in sales/purchasing module payment -# Fixed exchange rate display bugs in Supplier Payment (earlier dates). -$ /gl/includes/db/gl_db_trans.inc - /includes/banking.inc - /includes/ui/ui_view.inc - /purchasing/supplier_payment.php - /purchasing/includes/purchasing_db.inc - /purchasing/includes/db/supp_payment_db.inc - /purchasing/includes/db/supp_trans_db.inc - /sales/customer_payments.php - /sales/includes/sales_db.inc - /sales/includes/db/cust_trans_db.inc - /sales/includes/db/payment_db.inc -# [0000078] Fixed some reports with wrong exchange rates. -$ /reporting/rep101.php - /reporting/rep106.php - /reporting/rep201.php - /reporting/rep203.php - /reporting/rep209.php -+ Added confirm box when admins are about to remove PO GRNs from Supplier Invoice -$ /purchasing/supplier_invoice.php - -24-Oct-2008 Joe Hunt -! [0000077] Added a total before ending balance in trial balance (also in report) -$ /gl/inquiry/gl_trial_balance.php - /reporting/rep708.php -! Increased memory limit if reports in unicode (48M) as suggested in forum. - /reporting/includes/class.pdf.inc -! Improved layout of Supplier Invoice/Credit. All Items can now be added in one sweep. -$ /purchasing/supplier_invoice.php - /purchasing/supplier_credit.php - /purchasing/includes/ui/invoice_ui.inc - -------------------------------- Release 2.0.4 -------------------------------------------- -23-Oct-2008 Joe Hunt -! Release 2.0.4 -25-Nov-2008 Joe Hunt -! Inserted Copyright Notice and fixed graphic items -$ /access/login.php - /access/logout.php - /admin/attachments.php - /admin/backups.php - /admin/change_current_user_password.php - /admin/db/company_db.inc - /admin/db/maintenence_db.inc - /admin/db/printers_db.inc - /admin/db/users_db.inc - /admin/db/v_banktrans.inc - /admin/db/voiding_db.inc - /admin/display_prefs.php - /admin/fiscalyears.php - /admin/forms_setup.php - /admin/gl_setup.php - /admin/inst_upgrade.php - /admin/payment_terms.php - /admin/print_profiles.php - /admin/printers.php - /admin/shipping_companies.php - /admin/users.php - /admin/view_print_transaction.php - /admin/void_transaction.php - /gl/gl_journal.php - /gl/includes/ui/gl_bank_ui.inc - /gl/includes/ui/gl_journal_ui.inc - /gl/inquiry/bank_inquiry.php - /gl/inquiry/tax_inquiry.php - /gl/manage/bank_accounts.php - /includes/ui/ui_controls.inc - /reporting/includes/pdf_report.inc - /reporting/rep709.php - /sales/includes/ui/sales_credit_ui.inc - /sql/alter2.1.php - 24-Nov-2008 Janusz Dobrowolski + Added alias/foreign item codes and sales kits support. $ /applications/inventory.php diff --git a/access/login.php b/access/login.php index dc2a1965..56441518 100644 --- a/access/login.php +++ b/access/login.php @@ -1,14 +1,4 @@ . -***********************************************************************/ if (!isset($path_to_root) || isset($_GET['path_to_root']) || isset($_POST['path_to_root'])) die("Restricted access"); include_once($path_to_root . "/includes/ui/ui_view.inc"); diff --git a/access/logout.php b/access/logout.php index fc2a2d67..a52b4249 100644 --- a/access/logout.php +++ b/access/logout.php @@ -1,14 +1,5 @@ . -***********************************************************************/ + $page_security = 1; $path_to_root=".."; include($path_to_root . "/includes/session.inc"); diff --git a/admin/attachments.php b/admin/attachments.php index fb5b5e68..a36801d4 100644 --- a/admin/attachments.php +++ b/admin/attachments.php @@ -1,14 +1,5 @@ . -***********************************************************************/ + $path_to_root=".."; $page_security = 8; @@ -179,9 +170,9 @@ function display_rows($type) label_cell($row['filetype']); label_cell(sql2date($row['tran_date'])); edit_button_cell("Edit".$row['id'], _("Edit")); - button_cell("view".$row['id'], _("View"), false, ICON_VIEW); - button_cell("download".$row['id'], _("Download"), false, ICON_DOWN); - delete_button_cell("Delete".$row['id'], _("Delete")); + edit_button_cell("view".$row['id'], _("View")); + edit_button_cell("download".$row['id'], _("Download")); + edit_button_cell("Delete".$row['id'], _("Delete")); end_row(); } end_table(1); diff --git a/admin/backups.php b/admin/backups.php index 8dfec9a1..76c595a4 100644 --- a/admin/backups.php +++ b/admin/backups.php @@ -1,14 +1,5 @@ . -***********************************************************************/ + $page_security = 15; $path_to_root=".."; diff --git a/admin/change_current_user_password.php b/admin/change_current_user_password.php index abfd8529..1f739243 100644 --- a/admin/change_current_user_password.php +++ b/admin/change_current_user_password.php @@ -1,14 +1,5 @@ . -***********************************************************************/ + $page_security=1; $path_to_root=".."; include_once($path_to_root . "/includes/session.inc"); diff --git a/admin/db/company_db.inc b/admin/db/company_db.inc index 817b5d19..fde84cfe 100644 --- a/admin/db/company_db.inc +++ b/admin/db/company_db.inc @@ -1,14 +1,6 @@ . -***********************************************************************/ + + function update_company_gl_setup($debtors_act, $pyt_discount_act, $creditors_act, $freight_act, $exchange_diff_act, diff --git a/admin/db/maintenance_db.inc b/admin/db/maintenance_db.inc index d5124981..1a73d00a 100644 --- a/admin/db/maintenance_db.inc +++ b/admin/db/maintenance_db.inc @@ -1,14 +1,5 @@ . -***********************************************************************/ + function write_config_db($new = false) { global $path_to_root, $def_coy, $db_connections, $tb_pref_counter; diff --git a/admin/db/printers_db.inc b/admin/db/printers_db.inc index 4d3fa96c..043268a6 100644 --- a/admin/db/printers_db.inc +++ b/admin/db/printers_db.inc @@ -1,14 +1,4 @@ . -***********************************************************************/ function write_printer_def($id, $name, $descr, $queue, $host, $port, $timeout) { if ($id>0) diff --git a/admin/db/users_db.inc b/admin/db/users_db.inc index 53f3c40c..876f183f 100644 --- a/admin/db/users_db.inc +++ b/admin/db/users_db.inc @@ -1,6 +1,6 @@ . -***********************************************************************/ + include_once($path_to_root . "/gl/includes/gl_db.inc"); function validate_bank_trans() diff --git a/admin/db/voiding_db.inc b/admin/db/voiding_db.inc index 0f77cb20..e81dd1b0 100644 --- a/admin/db/voiding_db.inc +++ b/admin/db/voiding_db.inc @@ -1,14 +1,5 @@ . -***********************************************************************/ + include_once($path_to_root . "/sales/includes/sales_db.inc"); include_once($path_to_root . "/purchasing/includes/purchasing_db.inc"); include_once($path_to_root . "/inventory/includes/inventory_db.inc"); @@ -49,7 +40,9 @@ function void_transaction($type, $type_no, $date_, $memo_) $delivery = get_customer_trans($type_no, $type); if ($delivery['trans_link'] != 0) { - if (get_voided_entry(10, $delivery['trans_link']) === false) + $inv = get_customer_trans($delivery['trans_link'], 10); + if ($inv['ov_amount'] != 0 || $inv['ov_discount'] != 0 || $inv['ov_gst'] != 0 || + $inv['ov_freight'] != 0 || $inv['ov_freight_tax'] != 0 || $inv['alloc'] != 0) return false; } } diff --git a/admin/display_prefs.php b/admin/display_prefs.php index d23363e1..384c0e5b 100644 --- a/admin/display_prefs.php +++ b/admin/display_prefs.php @@ -1,6 +1,6 @@ . -***********************************************************************/ + $page_security = 9; $path_to_root=".."; include_once($path_to_root . "/includes/session.inc"); @@ -150,7 +141,7 @@ function display_fiscalyears() label_cell($closed_text); edit_button_cell("Edit".$myrow['id'], _("Edit")); if ($myrow["id"] != $company_year) - delete_button_cell("Delete".$myrow['id'], _("Delete")); + edit_button_cell("Delete".$myrow['id'], _("Delete")); else label_cell(''); end_row(); diff --git a/admin/forms_setup.php b/admin/forms_setup.php index 828a36fd..b4a8aa28 100644 --- a/admin/forms_setup.php +++ b/admin/forms_setup.php @@ -1,14 +1,5 @@ . -***********************************************************************/ + $page_security =10; $path_to_root=".."; include($path_to_root . "/includes/session.inc"); diff --git a/admin/gl_setup.php b/admin/gl_setup.php index e457da5c..b6939747 100644 --- a/admin/gl_setup.php +++ b/admin/gl_setup.php @@ -1,14 +1,5 @@ . -***********************************************************************/ + $page_security =10; $path_to_root=".."; include($path_to_root . "/includes/session.inc"); diff --git a/admin/inst_upgrade.php b/admin/inst_upgrade.php index 9141808d..793e050b 100644 --- a/admin/inst_upgrade.php +++ b/admin/inst_upgrade.php @@ -1,14 +1,5 @@ . -***********************************************************************/ + $page_security = 20; $path_to_root=".."; include_once($path_to_root . "/includes/session.inc"); diff --git a/admin/payment_terms.php b/admin/payment_terms.php index 2b323d27..24969c94 100644 --- a/admin/payment_terms.php +++ b/admin/payment_terms.php @@ -1,14 +1,5 @@ . -***********************************************************************/ + $page_security = 10; $path_to_root=".."; include($path_to_root . "/includes/session.inc"); @@ -173,7 +164,7 @@ while ($myrow = db_fetch($result)) label_cell($full_text); label_cell($after_text); edit_button_cell("Edit".$myrow["terms_indicator"], _("Edit")); - delete_button_cell("Delete".$myrow["terms_indicator"], _("Delete")); + edit_button_cell("Delete".$myrow["terms_indicator"], _("Delete")); end_row(); diff --git a/admin/print_profiles.php b/admin/print_profiles.php index 49a8723f..05e5b70a 100644 --- a/admin/print_profiles.php +++ b/admin/print_profiles.php @@ -1,14 +1,4 @@ . -***********************************************************************/ $page_security = 15; $path_to_root=".."; include($path_to_root . "/includes/session.inc"); diff --git a/admin/printers.php b/admin/printers.php index 1b6d063b..89d64476 100644 --- a/admin/printers.php +++ b/admin/printers.php @@ -1,14 +1,5 @@ . -***********************************************************************/ + $page_security = 15; $path_to_root=".."; include($path_to_root . "/includes/session.inc"); @@ -98,7 +89,7 @@ while ($myrow = db_fetch($result)) label_cell($myrow['host']); label_cell($myrow['queue']); edit_button_cell("Edit".$myrow['id'], _("Edit")); - delete_button_cell("Delete".$myrow['id'], _("Delete")); + edit_button_cell("Delete".$myrow['id'], _("Delete")); end_row(); diff --git a/admin/shipping_companies.php b/admin/shipping_companies.php index 94dfd489..1c16fa3f 100644 --- a/admin/shipping_companies.php +++ b/admin/shipping_companies.php @@ -1,14 +1,6 @@ . -***********************************************************************/ + + $page_security = 14; $path_to_root=".."; include($path_to_root . "/includes/session.inc"); @@ -121,7 +113,7 @@ while ($myrow = db_fetch($result)) label_cell($myrow["phone"]); label_cell($myrow["address"]); edit_button_cell("Edit".$myrow[0], _("Edit")); - delete_button_cell("Delete".$myrow[0], _("Delete")); + edit_button_cell("Delete".$myrow[0], _("Delete")); end_row(); } diff --git a/admin/users.php b/admin/users.php index d99edc62..05e9adc9 100644 --- a/admin/users.php +++ b/admin/users.php @@ -1,14 +1,5 @@ . -***********************************************************************/ + $page_security=15; $path_to_root=".."; include_once($path_to_root . "/includes/session.inc"); @@ -131,7 +122,7 @@ while ($myrow = db_fetch($result)) edit_button_cell("Edit".$myrow["user_id"], _("Edit")); if (strcasecmp($myrow["user_id"], $_SESSION["wa_current_user"]->username) && $_SESSION["wa_current_user"]->access == 2) - delete_button_cell("Delete".$myrow["user_id"], _("Delete")); + edit_button_cell("Delete".$myrow["user_id"], _("Delete")); else label_cell(''); end_row(); diff --git a/admin/view_print_transaction.php b/admin/view_print_transaction.php index dbae9f34..8f4c319c 100644 --- a/admin/view_print_transaction.php +++ b/admin/view_print_transaction.php @@ -1,14 +1,5 @@ . -***********************************************************************/ + $path_to_root=".."; $page_security = 5; @@ -141,9 +132,9 @@ function handle_search() label_cell($line[$trans_no_name]); if ($trans_ref) label_cell($line[$trans_ref]); - label_cell(get_trans_view_str($_POST['filterType'],$line[$trans_no_name], _("View"), ICON_VIEW)); + label_cell(get_trans_view_str($_POST['filterType'],$line[$trans_no_name], _("View"))); if ($print_out) - label_cell(print_document_link($line[$trans_no_name], _("Print"), true, $print_type, ICON_PRINT)); + label_cell(print_document_link($line[$trans_no_name], _("Print"), true, $print_type)); label_cell(get_gl_view_str($_POST['filterType'], $line[$trans_no_name])); end_row(); diff --git a/admin/void_transaction.php b/admin/void_transaction.php index e93af71a..4b566940 100644 --- a/admin/void_transaction.php +++ b/admin/void_transaction.php @@ -1,14 +1,5 @@ . -***********************************************************************/ + $path_to_root=".."; $page_security = 14; include_once($path_to_root . "/includes/session.inc"); @@ -21,82 +12,9 @@ include_once($path_to_root . "/admin/db/voiding_db.inc"); $js = ""; if ($use_date_picker) $js .= get_js_date_picker(); -if ($use_popup_windows) - $js .= get_js_open_window(800, 500); - page(_("Void a Transaction"), false, false, "", $js); //---------------------------------------------------------------------------------------- -function exist_transaction($type, $type_no) -{ - $void_entry = get_voided_entry($type, $type_no); - - if ($void_entry != null) - return false; - - switch ($type) - { - case 0 : // it's a journal entry - if (!exists_gl_trans($type, $type_no)) - return false; - break; - - case 1 : // it's a payment - case 2 : // it's a deposit - case 4 : // it's a transfer - if (!exists_bank_trans($type, $type_no)) - return false; - break; - - case 10 : // it's a customer invoice - case 11 : // it's a customer credit note - case 12 : // it's a customer payment - case 13 : // it's a customer dispatch - if (!exists_customer_trans($type, $type_no)) - return false; - break; - - case systypes::location_transfer() : // it's a stock transfer - if (get_stock_transfer_items($type_no) == null) - return false; - break; - - case systypes::inventory_adjustment() : // it's a stock adjustment - if (get_stock_adjustment_items($type_no) == null) - return false; - break; - - case 25 : // it's a GRN - return false; - case 20 : // it's a suppler invoice - case 21 : // it's a supplier credit note - case 22 : // it's a supplier payment - if (!exists_supp_trans($type, $type_no)) - return false; - break; - - case systypes::work_order() : // it's a work order - if (!get_work_order($type_no, true)) - return false; - break; - - case 28 : // it's a work order issue - if (!exists_work_order_issue($type_no)) - return false; - break; - - case 29 : // it's a work order production - if (!exists_work_order_produce($type_no)) - return false; - break; - - case systypes::cost_update() : // it's a stock cost update - return false; - break; - } - - return true; -} function voiding_controls() { @@ -120,26 +38,10 @@ function voiding_controls() submit_center('ProcessVoiding', _("Void Transaction"), true, '', true); else { - if (!exist_transaction($_POST['filterType'],$_POST['trans_no'])) - { - display_error(_("The entered transaction does not exist or cannot be voided.")); - unset($_POST['trans_no']); - unset($_POST['memo_']); - unset($_POST['date_']); - submit_center('ProcessVoiding', _("Void Transaction"), true, '', true); - } - else - { - display_notification_centered(_("Are you sure you want to void this transaction ? This action cannot be undone."), 0, 1); - if ($_POST['filterType'] == 0) // GL transaction are not included in get_trans_view_str - $view_str = get_gl_view_str($_POST['filterType'],$_POST['trans_no'], _("View Transaction")); - else - $view_str = get_trans_view_str($_POST['filterType'],$_POST['trans_no'], _("View Transaction")); - display_note($view_str); - br(); - submit_center_first('ConfirmVoiding', _("Proceed"), '', true); - submit_center_last('CancelVoiding', _("Cancel"), '', true); - } + + display_note(_("Are you sure you want to void this transaction ? This action cannot be undone."), 0, 1); + submit_center_first('ConfirmVoiding', _("Proceed"), '', true); + submit_center_last('CancelVoiding', _("Cancel"), '', true); } end_form(); diff --git a/update.html b/update.html index cc0bb64d..2c070204 100644 --- a/update.html +++ b/update.html @@ -53,7 +53,7 @@ password and choose the update script from the local harddisk. do this, before entering FrontAccounting! Enter the database user and the password and choose the alter.sql script.  Do the same for the alter2.sql script. If you have -already updated release 2.0 Beta, you can just run the alter2.sql script.
You must also manuelly ensure that you have write permission to the new folder /company/0.
There are no database changes during a major and minor release. Like from 2.0 to 2.0.1 - 2.0.5 . +already updated release 2.0 Beta, you can just run the alter2.sql script.
You must also manuelly ensure that you have write permission to the new folder /company/0.

 

-- 2.30.2