From 46c5f7a65a7659a44ae8254c63152074363d3987 Mon Sep 17 00:00:00 2001 From: Janusz Dobrowolski Date: Fri, 10 Dec 2010 13:12:45 +0000 Subject: [PATCH] New files from unstable branch --- .htaccess | 11 + CHANGELOG.txt | 2296 ++- FA.pem | 17 + access/login.php | 2 +- admin/attachments.php | 101 +- admin/backups.php | 27 +- admin/change_current_user_password.php | 2 +- admin/company_preferences.php | 41 +- admin/create_coy.php | 153 +- admin/crm_categories.php | 153 + admin/db/attachments_db.inc | 82 + admin/db/company_db.inc | 286 +- admin/db/fiscalyears_db.inc | 390 + admin/db/maintenance_db.inc | 241 +- admin/db/printers_db.inc | 5 + admin/db/security_db.inc | 8 +- admin/db/shipping_db.inc | 71 + admin/db/tags_db.inc | 30 + admin/db/transactions_db.inc | 59 + admin/db/users_db.inc | 36 +- admin/db/voiding_db.inc | 13 +- admin/display_prefs.php | 36 +- admin/fiscalyears.php | 321 +- admin/forms_setup.php | 2 +- admin/gl_setup.php | 40 +- admin/inst_chart.php | 98 + admin/inst_lang.php | 328 +- admin/inst_module.php | 404 +- admin/inst_theme.php | 120 + admin/inst_upgrade.php | 59 +- admin/payment_terms.php | 168 +- admin/print_profiles.php | 10 +- admin/printers.php | 14 +- admin/security_roles.php | 6 +- admin/shipping_companies.php | 49 +- admin/system_diagnostics.php | 315 +- admin/tags.php | 4 +- admin/users.php | 34 +- admin/view_print_transaction.php | 60 +- admin/void_transaction.php | 84 +- applications/application.php | 26 +- applications/customers.php | 13 +- applications/dimensions.php | 17 +- applications/generalledger.php | 32 +- applications/inventory.php | 23 +- applications/manufacturing.php | 13 +- applications/setup.php | 19 +- applications/suppliers.php | 20 +- config.default.php | 32 +- dimensions/dimension_entry.php | 2 +- dimensions/includes/dimensions_db.inc | 79 +- dimensions/includes/dimensions_ui.inc | 13 +- dimensions/inquiry/search_dimensions.php | 55 +- dimensions/view/view_dimension.php | 6 +- frontaccounting.php | 47 +- gl/accruals.php | 220 + gl/bank_account_reconcile.php | 48 +- gl/bank_transfer.php | 4 +- gl/gl_bank.php | 180 +- gl/gl_budget.php | 77 +- gl/gl_journal.php | 2 +- gl/includes/db/gl_db_account_types.inc | 62 +- gl/includes/db/gl_db_accounts.inc | 92 + gl/includes/db/gl_db_bank_accounts.inc | 85 +- gl/includes/db/gl_db_bank_trans.inc | 29 +- gl/includes/db/gl_db_banking.inc | 164 +- gl/includes/db/gl_db_currencies.inc | 2 - gl/includes/db/gl_db_rates.inc | 34 +- gl/includes/db/gl_db_trans.inc | 157 +- gl/includes/ui/gl_bank_ui.inc | 13 +- gl/includes/ui/gl_journal_ui.inc | 25 +- gl/inquiry/balance_sheet.php | 41 +- gl/inquiry/bank_inquiry.php | 43 +- gl/inquiry/gl_account_inquiry.php | 20 +- gl/inquiry/gl_trial_balance.php | 38 +- gl/inquiry/journal_inquiry.php | 86 +- gl/inquiry/profit_loss.php | 29 +- gl/inquiry/tax_inquiry.php | 9 +- gl/manage/bank_accounts.php | 35 +- gl/manage/currencies.php | 30 +- gl/manage/exchange_rates.php | 25 +- gl/manage/gl_account_classes.php | 53 +- gl/manage/gl_account_types.php | 62 +- gl/manage/gl_accounts.php | 93 +- gl/manage/gl_quick_entries.php | 90 +- gl/manage/revaluate_currencies.php | 129 + gl/view/accrual_trans.php | 108 + gl/view/bank_transfer_view.php | 4 +- gl/view/gl_deposit_view.php | 6 +- gl/view/gl_payment_view.php | 8 +- gl/view/gl_trans_view.php | 39 +- includes/access_levels.inc | 12 +- includes/ajax.inc | 6 +- includes/archive.inc | 466 + includes/banking.inc | 19 +- includes/current_user.inc | 160 +- includes/data_checks.inc | 6 +- includes/date_functions.inc | 51 +- includes/db/connect_db.inc | 88 +- includes/db/crm_contacts_db.inc | 287 + includes/db/inventory_db.inc | 151 +- includes/db/manufacturing_db.inc | 83 + includes/db/references_db.inc | 25 +- includes/db/sql_functions.inc | 31 +- includes/db_pager.inc | 7 +- includes/errors.inc | 33 +- includes/hooks.inc | 369 + includes/lang/gettext.php | 98 +- includes/lang/language.php | 18 +- includes/main.inc | 126 +- includes/packages.inc | 692 + includes/page/footer.inc | 8 +- includes/page/header.inc | 18 +- includes/prefs/sysprefs.inc | 27 +- includes/prefs/userprefs.inc | 27 +- includes/references.inc | 127 +- includes/remote_url.inc | 88 + includes/session.inc | 67 +- includes/sysnames.inc | 186 + includes/system_tests.inc | 442 + includes/systypes.inc | 4 +- includes/types.inc | 143 +- includes/ui/allocation_cart.inc | 45 +- includes/ui/contacts_view.inc | 171 + includes/ui/db_pager_view.inc | 4 +- includes/ui/simple_crud_class.inc | 379 + includes/ui/ui_controls.inc | 144 +- includes/ui/ui_input.inc | 65 +- includes/ui/ui_lists.inc | 317 +- includes/ui/ui_msgs.inc | 7 +- includes/ui/ui_view.inc | 161 +- includes/ui/view_package.php | 50 + index.php | 2 +- install/index.php | 719 +- install/isession.inc | 134 + install/lang/ar_EG/LC_MESSAGES/ar_EG.mo | Bin 0 -> 11720 bytes install/lang/ar_EG/LC_MESSAGES/ar_EG.po | 464 + install/lang/da_DK/LC_MESSAGES/da_DK.mo | Bin 0 -> 9063 bytes install/lang/da_DK/LC_MESSAGES/da_DK.po | 465 + install/lang/de_DE/LC_MESSAGES/de_DE.mo | Bin 0 -> 9720 bytes install/lang/de_DE/LC_MESSAGES/de_DE.po | 462 + install/lang/el_GR/LC_MESSAGES/el_GR.mo | Bin 0 -> 13465 bytes install/lang/el_GR/LC_MESSAGES/el_GR.po | 465 + install/lang/es_MX/LC_MESSAGES/es_MX.mo | Bin 0 -> 9524 bytes install/lang/es_MX/LC_MESSAGES/es_MX.po | 456 + install/lang/fr_FR/LC_MESSAGES/fr_FR.mo | Bin 0 -> 9754 bytes install/lang/fr_FR/LC_MESSAGES/fr_FR.po | 462 + install/lang/id_ID/LC_MESSAGES/id_ID.mo | Bin 0 -> 9336 bytes install/lang/id_ID/LC_MESSAGES/id_ID.po | 497 + install/lang/in_ID/LC_MESSAGES/in_ID.mo | Bin 0 -> 9334 bytes install/lang/in_ID/LC_MESSAGES/in_ID.po | 497 + install/lang/it_IT/LC_MESSAGES/it_IT.mo | Bin 0 -> 9678 bytes install/lang/it_IT/LC_MESSAGES/it_IT.po | 470 + .../LC_MESSAGES/empty.po | 458 + install/lang/nl_BE/LC_MESSAGES/nl_BE.mo | Bin 0 -> 9505 bytes install/lang/nl_BE/LC_MESSAGES/nl_BE.po | 462 + install/lang/pl_PL/LC_MESSAGES/pl_PL.mo | Bin 0 -> 9162 bytes install/lang/pl_PL/LC_MESSAGES/pl_PL.po | 487 + install/lang/pt_BR/LC_MESSAGES/pt_BR.mo | Bin 0 -> 9637 bytes install/lang/pt_BR/LC_MESSAGES/pt_BR.po | 488 + install/lang/sv_SE/LC_MESSAGES/sv_SE.mo | Bin 0 -> 9067 bytes install/lang/sv_SE/LC_MESSAGES/sv_SE.po | 464 + install/lang/zh_CN/LC_MESSAGES/zh_CN.mo | Bin 0 -> 8663 bytes install/lang/zh_CN/LC_MESSAGES/zh_CN.po | 466 + install/stylesheet.css | 5 +- inventory/adjustments.php | 2 +- inventory/cost_update.php | 2 +- inventory/includes/db/items_adjust_db.inc | 8 + inventory/includes/db/items_category_db.inc | 9 + inventory/includes/db/items_db.inc | 59 +- inventory/includes/db/items_locations_db.inc | 11 +- inventory/includes/db/items_purchases_db.inc | 69 + inventory/includes/db/items_transfer_db.inc | 9 + inventory/includes/db/movement_types_db.inc | 34 + inventory/includes/inventory_db.inc | 1 + inventory/includes/item_adjustments_ui.inc | 8 +- inventory/includes/stock_transfers_ui.inc | 8 +- inventory/inquiry/stock_movements.php | 45 +- inventory/inquiry/stock_status.php | 2 +- inventory/manage/item_categories.php | 15 +- inventory/manage/item_codes.php | 4 +- inventory/manage/item_units.php | 4 +- inventory/manage/items.php | 86 +- inventory/manage/locations.php | 49 +- inventory/manage/movement_types.php | 11 +- inventory/manage/sales_kits.php | 12 +- inventory/prices.php | 6 +- inventory/purchasing_data.php | 63 +- inventory/reorder_level.php | 2 +- inventory/transfers.php | 2 +- inventory/view/view_adjustment.php | 6 +- inventory/view/view_transfer.php | 9 +- js/inserts.js | 164 +- js/reports.js | 63 + js/utils.js | 15 +- .../LC_MESSAGES/empty.po | 13933 ++++++++++------ lang/new_language_template/locale.inc | 40 + .../includes/db/work_order_issues_db.inc | 26 +- .../db/work_order_produce_items_db.inc | 10 +- manufacturing/includes/db/work_orders_db.inc | 136 +- .../includes/db/work_orders_quick_db.inc | 35 +- manufacturing/includes/manufacturing_ui.inc | 29 +- .../includes/work_order_issue_ui.inc | 4 +- manufacturing/inquiry/bom_cost_inquiry.php | 2 +- manufacturing/inquiry/where_used_inquiry.php | 15 +- manufacturing/manage/bom_edit.php | 91 +- manufacturing/manage/work_centres.php | 16 +- manufacturing/search_work_orders.php | 58 +- manufacturing/view/wo_issue_view.php | 10 +- manufacturing/view/wo_production_view.php | 6 +- manufacturing/view/work_order_view.php | 2 +- manufacturing/work_order_add_finished.php | 11 +- manufacturing/work_order_costs.php | 12 +- manufacturing/work_order_entry.php | 2 +- manufacturing/work_order_issue.php | 7 +- manufacturing/work_order_release.php | 3 +- modules/_cache/index.php | 3 + purchasing/includes/db/grn_db.inc | 58 +- purchasing/includes/db/invoice_db.inc | 202 +- purchasing/includes/db/po_db.inc | 230 +- purchasing/includes/db/supp_payment_db.inc | 10 +- purchasing/includes/db/supp_trans_db.inc | 104 +- purchasing/includes/db/suppalloc_db.inc | 55 +- purchasing/includes/db/suppliers_db.inc | 149 +- purchasing/includes/po_class.inc | 159 +- purchasing/includes/supp_trans_class.inc | 61 +- purchasing/includes/ui/grn_ui.inc | 10 +- purchasing/includes/ui/invoice_ui.inc | 99 +- purchasing/includes/ui/po_ui.inc | 239 +- purchasing/inquiry/po_search.php | 57 +- purchasing/inquiry/po_search_completed.php | 53 +- .../inquiry/supplier_allocation_inquiry.php | 54 +- purchasing/inquiry/supplier_inquiry.php | 61 +- purchasing/manage/suppliers.php | 403 +- purchasing/po_entry_items.php | 287 +- purchasing/po_receive_items.php | 57 +- purchasing/supplier_credit.php | 10 +- purchasing/supplier_invoice.php | 42 +- purchasing/supplier_payment.php | 37 +- purchasing/view/view_grn.php | 21 +- purchasing/view/view_po.php | 30 +- purchasing/view/view_supp_credit.php | 14 +- purchasing/view/view_supp_invoice.php | 9 +- purchasing/view/view_supp_payment.php | 4 +- reporting/fonts/LiberationSans-Regular.ttf | Bin 0 -> 138908 bytes reporting/forms/index.php | 3 + reporting/includes/Workbook.php | 6 +- reporting/includes/class.graphic.inc | 22 +- reporting/includes/class.mail.inc | 54 +- reporting/includes/class.pdf.inc | 89 +- reporting/includes/doctext.inc | 7 +- reporting/includes/excel_report.inc | 33 +- .../includes/fpdi/decoders/ASCII85Decode.php | 95 + .../includes/fpdi/decoders/LZWDecode.php | 147 + reporting/includes/fpdi/fpdf_tpl.php | 409 + reporting/includes/fpdi/fpdi.php | 500 + reporting/includes/fpdi/fpdi2tcpdf_bridge.php | 136 + reporting/includes/fpdi/fpdi_pdf_parser.php | 380 + reporting/includes/fpdi/pdf_context.php | 82 + reporting/includes/fpdi/pdf_parser.php | 690 + reporting/includes/fpdi/wrapper_functions.php | 70 + reporting/includes/header2.inc | 161 +- reporting/includes/pdf_report.inc | 320 +- reporting/includes/reporting.inc | 10 + reporting/includes/reports_classes.inc | 184 +- reporting/includes/tcpdf.php | 16 +- reporting/prn_redirect.php | 57 +- reporting/rep101.php | 50 +- reporting/rep102.php | 15 +- reporting/rep103.php | 102 +- reporting/rep104.php | 33 +- reporting/rep105.php | 6 +- reporting/rep106.php | 6 +- reporting/rep107.php | 49 +- reporting/rep108.php | 49 +- reporting/rep109.php | 83 +- reporting/rep110.php | 52 +- reporting/rep111.php | 37 +- reporting/rep112.php | 25 +- reporting/rep201.php | 2 +- reporting/rep202.php | 32 +- reporting/rep203.php | 2 +- reporting/rep204.php | 8 +- reporting/rep209.php | 80 +- reporting/rep210.php | 26 +- reporting/rep301.php | 34 +- reporting/rep302.php | 2 +- reporting/rep303.php | 55 +- reporting/rep304.php | 8 +- reporting/rep305.php | 2 +- reporting/rep401.php | 2 +- reporting/rep409.php | 30 +- reporting/rep501.php | 8 +- reporting/rep601.php | 6 +- reporting/rep701.php | 4 +- reporting/rep702.php | 37 +- reporting/rep704.php | 4 +- reporting/rep705.php | 39 +- reporting/rep706.php | 52 +- reporting/rep707.php | 57 +- reporting/rep708.php | 14 +- reporting/rep709.php | 18 +- reporting/rep710.php | 2 +- reporting/reports_main.php | 139 +- sales/create_recurrent_invoices.php | 32 +- sales/credit_note_entry.php | 12 +- sales/customer_credit_invoice.php | 28 +- sales/customer_delivery.php | 46 +- sales/customer_invoice.php | 66 +- sales/customer_payments.php | 16 +- sales/includes/cart_class.inc | 272 +- sales/includes/db/branches_db.inc | 208 +- sales/includes/db/cust_trans_db.inc | 247 +- sales/includes/db/cust_trans_details_db.inc | 14 +- sales/includes/db/custalloc_db.inc | 133 +- sales/includes/db/customers_db.inc | 149 +- sales/includes/db/payment_db.inc | 9 +- sales/includes/db/recurrent_invoices_db.inc | 66 + sales/includes/db/sales_credit_db.inc | 38 +- sales/includes/db/sales_delivery_db.inc | 25 +- sales/includes/db/sales_groups_db.inc | 159 + sales/includes/db/sales_invoice_db.inc | 44 +- sales/includes/db/sales_order_db.inc | 233 +- sales/includes/sales_db.inc | 168 +- sales/includes/sales_ui.inc | 2 + sales/includes/ui/sales_credit_ui.inc | 45 +- sales/includes/ui/sales_order_ui.inc | 156 +- sales/inquiry/customer_allocation_inquiry.php | 68 +- sales/inquiry/customer_inquiry.php | 94 +- sales/inquiry/sales_deliveries_view.php | 68 +- sales/inquiry/sales_orders_view.php | 84 +- sales/manage/credit_status.php | 10 +- sales/manage/customer_branches.php | 378 +- sales/manage/customers.php | 328 +- sales/manage/recurrent_invoices.php | 43 +- sales/manage/sales_areas.php | 26 +- sales/manage/sales_groups.php | 36 +- sales/manage/sales_people.php | 44 +- sales/manage/sales_points.php | 20 +- sales/manage/sales_types.php | 21 +- sales/sales_order_entry.php | 54 +- sales/view/view_credit.php | 12 +- sales/view/view_dispatch.php | 21 +- sales/view/view_invoice.php | 31 +- sales/view/view_receipt.php | 4 +- sales/view/view_sales_order.php | 92 +- sql/alter2.1.php | 4 +- sql/alter2.3.php | 377 + sql/alter2.3.sql | 251 + sql/alter2.3rc.sql | 5 + sql/en_US-demo.sql | 2851 ++-- sql/en_US-new.sql | 2271 +-- taxes/db/tax_types_db.inc | 14 + taxes/item_tax_types.php | 11 +- taxes/tax_calc.inc | 12 - taxes/tax_groups.php | 24 +- taxes/tax_types.php | 11 +- themes/aqua/default.css | 8 +- themes/aqua/renderer.php | 14 +- themes/cool/default.css | 8 +- themes/cool/renderer.php | 14 +- themes/default/default.css | 8 +- themes/default/renderer.php | 15 +- update.html | 197 +- version.php | 25 + 365 files changed, 38665 insertions(+), 15288 deletions(-) create mode 100644 FA.pem create mode 100644 admin/crm_categories.php create mode 100644 admin/db/attachments_db.inc create mode 100644 admin/db/fiscalyears_db.inc create mode 100644 admin/db/shipping_db.inc create mode 100644 admin/db/transactions_db.inc create mode 100644 admin/inst_chart.php create mode 100644 admin/inst_theme.php create mode 100644 gl/accruals.php create mode 100644 gl/manage/revaluate_currencies.php create mode 100644 gl/view/accrual_trans.php create mode 100644 includes/archive.inc create mode 100644 includes/db/crm_contacts_db.inc create mode 100644 includes/hooks.inc create mode 100644 includes/packages.inc create mode 100644 includes/remote_url.inc create mode 100644 includes/sysnames.inc create mode 100644 includes/system_tests.inc create mode 100644 includes/ui/contacts_view.inc create mode 100644 includes/ui/simple_crud_class.inc create mode 100644 includes/ui/view_package.php create mode 100644 install/isession.inc create mode 100644 install/lang/ar_EG/LC_MESSAGES/ar_EG.mo create mode 100644 install/lang/ar_EG/LC_MESSAGES/ar_EG.po create mode 100644 install/lang/da_DK/LC_MESSAGES/da_DK.mo create mode 100644 install/lang/da_DK/LC_MESSAGES/da_DK.po create mode 100644 install/lang/de_DE/LC_MESSAGES/de_DE.mo create mode 100644 install/lang/de_DE/LC_MESSAGES/de_DE.po create mode 100644 install/lang/el_GR/LC_MESSAGES/el_GR.mo create mode 100644 install/lang/el_GR/LC_MESSAGES/el_GR.po create mode 100644 install/lang/es_MX/LC_MESSAGES/es_MX.mo create mode 100644 install/lang/es_MX/LC_MESSAGES/es_MX.po create mode 100644 install/lang/fr_FR/LC_MESSAGES/fr_FR.mo create mode 100644 install/lang/fr_FR/LC_MESSAGES/fr_FR.po create mode 100644 install/lang/id_ID/LC_MESSAGES/id_ID.mo create mode 100644 install/lang/id_ID/LC_MESSAGES/id_ID.po create mode 100644 install/lang/in_ID/LC_MESSAGES/in_ID.mo create mode 100644 install/lang/in_ID/LC_MESSAGES/in_ID.po create mode 100644 install/lang/it_IT/LC_MESSAGES/it_IT.mo create mode 100644 install/lang/it_IT/LC_MESSAGES/it_IT.po create mode 100644 install/lang/new_language_template/LC_MESSAGES/empty.po create mode 100644 install/lang/nl_BE/LC_MESSAGES/nl_BE.mo create mode 100644 install/lang/nl_BE/LC_MESSAGES/nl_BE.po create mode 100644 install/lang/pl_PL/LC_MESSAGES/pl_PL.mo create mode 100644 install/lang/pl_PL/LC_MESSAGES/pl_PL.po create mode 100644 install/lang/pt_BR/LC_MESSAGES/pt_BR.mo create mode 100644 install/lang/pt_BR/LC_MESSAGES/pt_BR.po create mode 100644 install/lang/sv_SE/LC_MESSAGES/sv_SE.mo create mode 100644 install/lang/sv_SE/LC_MESSAGES/sv_SE.po create mode 100644 install/lang/zh_CN/LC_MESSAGES/zh_CN.mo create mode 100644 install/lang/zh_CN/LC_MESSAGES/zh_CN.po create mode 100644 inventory/includes/db/items_purchases_db.inc create mode 100644 js/reports.js create mode 100644 modules/_cache/index.php create mode 100644 reporting/fonts/LiberationSans-Regular.ttf create mode 100644 reporting/forms/index.php create mode 100644 reporting/includes/fpdi/decoders/ASCII85Decode.php create mode 100644 reporting/includes/fpdi/decoders/LZWDecode.php create mode 100644 reporting/includes/fpdi/fpdf_tpl.php create mode 100644 reporting/includes/fpdi/fpdi.php create mode 100644 reporting/includes/fpdi/fpdi2tcpdf_bridge.php create mode 100644 reporting/includes/fpdi/fpdi_pdf_parser.php create mode 100644 reporting/includes/fpdi/pdf_context.php create mode 100644 reporting/includes/fpdi/pdf_parser.php create mode 100644 reporting/includes/fpdi/wrapper_functions.php create mode 100644 sales/includes/db/recurrent_invoices_db.inc create mode 100644 sales/includes/db/sales_groups_db.inc create mode 100644 sql/alter2.3.php create mode 100644 sql/alter2.3.sql create mode 100644 sql/alter2.3rc.sql create mode 100644 version.php diff --git a/.htaccess b/.htaccess index c80aa26e..ffcd03e6 100644 --- a/.htaccess +++ b/.htaccess @@ -1,3 +1,14 @@ +# Protect sensitive files. + + Order allow,deny + + +# Disable directory listings. +Options -Indexes + +# Set the default index. +DirectoryIndex index.php + # These settings are recommended # Maybe you might have problems # with other scripts that needs diff --git a/CHANGELOG.txt b/CHANGELOG.txt index ec4587dc..289f7348 100644 --- a/CHANGELOG.txt +++ b/CHANGELOG.txt @@ -19,10 +19,1143 @@ Legend: ! -> Note $ -> Affected files -06-Jul-2010 Janusz Dobrowolski/Micha³ Kozielski -# Additional sql injection prevention. -$ /includes/date_functions.inc +------------------------------- Release 2.3 ------------------------------------ +09-Dec-2010 Joe Hunt +! Release 2.3.0 +$ version.php + +08-Dec-2010 Janusz Dobrowolski ++ Debug backtace on all errors when go_debug is set to 2 +$ /includes/errors.inc + /includes/ui/ui_msgs.inc + /includes/ui/ui_view.inc ++ Added SetFontSize method +$ /reporting/includes/excel_report.inc +# Fixedsql assembly in gl_account_types. + /gl/includes/db/gl_db_account_types.inc +# [0000312] Prevented directory traversal (by Mithy) +$ /admin/display_prefs.php + /admin/attachments.php + /admin/company_preferences.php +# [0000314] Fixed session fixation vulnerabilities + /includes/session.inc +# [0000313] Fixed SQL injection vulerabilities (by Mithy) +$ /dimensions/includes/dimensions_db.inc + /includes/banking.inc + /includes/data_checks.inc + /includes/systypes.inc + /purchasing/includes/ui/po_ui.inc + /reporting/includes/header2.inc + /sales/includes/sales_db.inc + /sales/includes/ui/sales_order_ui.inc +! Updated gettext template +$ /lang/new_language_template/LC_MESSAGES/empty.po + +08-Dec-2010 Janusz Dobrowolski +# Added errors.inc inclusion +$ /install/isession.inc + +07-Dec-2010 Janusz Dobrowolski +# Missing tags argument in display_type call +$ /reporting/rep705.php +# [0000301] Voided transactions should no be presented in gl inquiry +$ /gl/includes/db/gl_db_trans.inc +# [0000306] Fixed upload file name test by Mithy +$ /admin/backups.php +# Fixed multiply warnings and error handling on PHP 5.3 + /config.default.php + /reporting/includes/class.pdf.inc + /reporting/includes/pdf_report.inc + /reporting/includes/tcpdf.php +# Added missing hooks class methods placeholders +$ /includes/hooks.inc +# Improved error handling +$ /admin/inst_module.php + /includes/main.inc + /includes/session.inc + /includes/errors.inc + +03-Dec-2010 Janusz Dobrowolski +# Fixed company prefs refresh after upgrade/restore +$ /admin/inst_upgrade.php + /admin/backups.php + /admin/db/company_db.inc +! Improved readibility in COA report. +$ /reporting/rep701.php +! Added core translation support for modules +$ /includes/hooks.inc + /includes/lang/gettext.php +! Cleanup. +$ /includes/ui/ui_lists.inc + /sales/includes/ui/sales_order_ui.inc + +03-Dec-2010 Joe Hunt ++ Creating a warning when opening balance in trial balance is not in balance, + and a probably cause of that. +$ /gl/inquiry/gl_trial_balance.php + /reporting/rep708.php +! Fixing year closure for earlier fiscal years. en_US-demo.sql +$ /sql/en_US-demo.sql + +02-Dec-2010 Joe Hunt +# When deleting a fiscal year, the open balances should share the same trans no. +$ /admin/db/fiscalyear_db.inc +! Changed so it is not possible to select a from date bigger than fiscal year end in trial balance. +$ /gl/inquiry/gl_trial_balance.php + +01-Dec-2010 Joe Hunt +! Better test for correct balance accounts when closing fiscal year. +$ /admin/db/fiscalyear_db.inc + +29-Nov-2010 Janusz Dobrowolski +# [0000290] Fixed side bug after last changes (can't upload file). +$ /admin/backups.php +# [0000289] Duplicated records in void/view/print transaction pager +$ /admin/db/transactions_db.inc + +28-Nov-2010 Janusz Dobrowolski ++ Transaction name shortcuts added +$ /includes/sysnames.inc + /reporting/includes/reports_classes.inc ++ Added Italian installer wizard translation by Paolo Ardoino +$ /install/isession.inc + /install/lang/it_IT/LC_MESSAGES/it_IT.mo (new) + /install/lang/it_IT/LC_MESSAGES/it_IT.po (new) + +28-Nov-2010 Joe Hunt +- Removed possibility to use bank account in Direct Invoice. This + was an old method for handling Cash Payment. We now have better options. +$ /sales/includes/db/sales_invoice_db.inc + /sales/manage/customer_branches.php + +26-Nov-2010 Janusz Dobrowolski +! [0000282] Improved reports menu display. +$ /js/inserts.js + /js/utils.js + /js/reports.js (new) + /reporting/reports_main.php + /reporting/includes/reports_classes.inc +# [0000283] Fixed potential vulnerability (Mithy) +$ /admin/db/security_db.inc +# Fixed hotkeys support. +$ /js/inserts.js +# [0000285] Errors/warning due to obsolete code +$ /reporting/rep109.php +# Fixed tabs switching +$ /sales/manage/customer_branches.php + +23-Nov-2010 Janusz Dobrowolski +# [0000281] Filename input sanitization (Mithy) +$ /admin/attachments.php + /includes/main.inc + /admin/db/maintenance_db.inc +# Fixed sql file view, sanitization. +$ /admin/backups.php +# Fixed period type display. +$ /gl/manage/gl_quick_entries.php +# Fixed errors disay in included files +$ /includes/hooks.inc + +22-Nov-2010 Janusz Dobrowolski ++ Rewritten third party module installation according to extended hooks system. +$ /admin/inst_module.php +! Tabs/menu/roles extensions moved to module hooks file, added install/uninstall hooks. +$ /includes/packages.inc + /includes/access_levels.inc + /sql/alter2.3.php +! check_table() helper moved. +$ /admin/inst_upgrade.php + /admin/db/maintenance_db.inc +! Integration of hooks provided by extensions. +$ /includes/hooks.inc + /includes/session.inc +! Hooks for tabs/menu options added. + /frontaccounting.php + /applications/application.php +! Small cleanup. +$ /includes/main.inc +! Fixed long timeout on localhost repo. +$ /includes/remote_url.inc +! [0000279] Fixed input sanitization by Mithy. +$ /reporting/prn_redirect.php + /.htaccess +# [0000280] Fixed parameter sanitization in get_company_extensions() by Mithy. +$ /admin/db/company_db.inc +# Fixed db_close() helper. +$ /includes/db/connect_db.inc +# Fixed bug in update_person_contact() +$ /includes/db/crm_contacts_db.inc +# Fixed bug in exrate return +$ /gl/includes/db/gl_db_rates.inc +# Item type display incorrect after change saving +$ /inventory/manage/items.php + +18-Nov-2010 Janusz Dobrowolski +! Updated including exclusive theme messages +$ /lang/new_language_template/LC_MESSAGES/empty.po ++ Added Spanish (Mexican) installer wizard translation by Julio C. Perea Pastrana +$ /install/isession.inc + /install/lang/es_MX/LC_MESSAGES/es_MX.po (new) + /install/lang/es_MX/LC_MESSAGES/es_MX.mo (new) + +18-Nov-2010 Joe Hunt +# Could not enter a year before other years (removed readonly begin) + and better check for first end year. +$ /adminfiscalyears.php + /admin/db/fiscalyears_db.inc + +! Scrambled graphic images to avoid unwanted downloads. +$ /reporting/rep102.php + /reporting/rep202.php + /reporting/rep706.php + /reporting/rep707.php + +16-Nov-2010 Joe Hunt +# Minor change in class.graphic.inc +$ /reporting/includes/class.graphic.inc +! Added Work Order Entry menu link after Sales Order issue. +$ /sales/sales_order_entry.php + +15-Nov-2010 Janusz Dobrowolski +# Fixed date legend on po/grn/invoice +$ /purchasing/includes/ui/po_ui.inc +# Fixed text encoding in graphics +$ /reporting/includes/class.graphic.inc +! Default font for graphics changed from Vera to LiberationSans-Regular +$ /reporting/fonts/LiberationSans-Regular.ttf (new) + /reporting/fonts/Vera.ttf (removed) + /reporting/includes/class.graphic.inc + /reporting/rep102.php + /reporting/rep202.php + /reporting/rep706.php + /reporting/rep707.php + +13-Nov-2010 Janusz Dobrowolski ++ New hooks system added +$ /includes/hooks.inc (new) + /includes/session.inc + /lang/new_language_template/locale.inc +! Old hooks converted to new hooks API +$ /gl/includes/db/gl_db_rates.inc + /includes/ui/ui_view.inc + /reporting/rep709.php ++ Added transaction db_write/db_void hooks +$ /gl/includes/db/gl_db_banking.inc + /inventory/includes/db/items_adjust_db.inc + /inventory/includes/db/items_transfer_db.inc + /manufacturing/includes/db/work_order_issues_db.inc + /manufacturing/includes/db/work_order_produce_items_db.inc + /manufacturing/includes/db/work_orders_db.inc + /manufacturing/includes/db/work_orders_quick_db.inc + /purchasing/po_entry_items.php + /purchasing/includes/db/grn_db.inc + /purchasing/includes/db/invoice_db.inc + /purchasing/includes/db/po_db.inc + /purchasing/includes/db/supp_payment_db.inc + /sales/includes/db/payment_db.inc + /sales/includes/db/sales_credit_db.inc + /sales/includes/db/sales_delivery_db.inc + /sales/includes/db/sales_invoice_db.inc + /sales/includes/db/sales_order_db.inc + +12-Nov-2010 Janusz Dobrowolski +# Added missing due date on direct purchase invoice. +$ /purchasing/po_entry_items.php + /purchasing/includes/po_class.inc + /purchasing/includes/supp_trans_class.inc + /purchasing/includes/db/invoice_db.inc + /purchasing/includes/ui/invoice_ui.inc + /purchasing/includes/ui/po_ui.inc +# Fixed maximum name length +$ /inventory/manage/items.php +# Fixed a couple of edition ui bugs +$ /gl/manage/gl_quick_entries.php ++ Added db_close() for optional use +$ /includes/db/connect_db.inc + +11-Nov-2010 Janusz Dobrowolski +# Fixed sql_gen for multiply extra where clauses +$ /includes/db_pager.inc +# Fixed implode injection vulnerabilities. +$ /includes/db/crm_contacts_db.inc + /sales/includes/db/cust_trans_details_db.inc + +10-Nov-2010 Janusz Dobrowolski +# Additional fix for setting local_path_to_root in find_custom_file() +$ /includes/main.inc +# Removed related report class when company does not use dimensions +$ /reporting/includes/report_classes.inc + +09-Nov-2010 Joe Hunt +! [0000277] Changed so FA suggest the next begin day in new Fiscal Year (read only). + But only if there are any fiscal years before. Otherwise it is normal. +$ /admin/db/fiscalyears_db.inc + /admin/fiscalyears.php + +09-Nov-2010 Janusz Dobrowolski +# Session destroy added on install finish, fixed pasword/admin login update, also [0000273]. +$ /install/index.php + +08-Nov-2010 Janusz Dobrowolski +# Fixed support for report translations in extension modules +$ /includes/main.inc + /reporting/includes/class.pdf.inc + +07-Nov-2010 Janusz Dobrowolski +! Separate class for view and print/email links (also fixes conflict with confirmation dialog) +$ /includes/ui/ui_controls.inc +! Cleanup + /reporting/rep107.php + /reporting/rep109.php + /reporting/rep110.php + /reporting/rep111.php + /reporting/rep209.php + /reporting/rep210.php + /reporting/rep409.php + /reporting/includes/pdf_report.inc +# Fixed multipart mail structure +$ /reporting/includes/class.mail.inc +# Enabled javascript updates on ajax _page_body refresh +$ /includes/ajax.inc +! Added validation hook on buttons +$ /js/inserts.js + +06-Nov-2010 Janusz Dobrowolski +# [0000274] Contact edition failed after last security fixes in RC2 +$ /includes/session.inc +! Rearanged contacts edition +$ /includes/db/crm_contacts_db.inc + /includes/ui/contacts_view.inc + /sales/includes/db/branches_db.inc ++ Helpers for js confirmation dialog before data entry is abandoned +$ /includes/ui/ui_controls.inc + /js/inserts.js + /themes/aqua/renderer.php + /themes/cool/renderer.php + /themes/default/renderer.php +# Confirmation dialog added before transaction entry is abandoned. +$ /sales/sales_order_entry.php + /sales/includes/sales_ui.inc + +05-Nov-2010 Janusz Dobrowolski +# [0000276] Fixed admin username update and error when no prefix is selected in installer. +$ /install/index.php + +04-Nov-2010 Janusz Dobrowolski +# Fixed broken excel reports for non-latin encodings. +$ /reporting/includes/Workbook.php + +03-Nov-2010 Janusz Dobrowolski +# More corrections in cleanup for input +$ /includes/session.inc + +02-Nov-2010 Joe Hunt +# Report Customer Details didn't show up correctly in Excel +$ /reporting/rep103.php + +30-Oct-2010 Janusz Dobrowolski +! Added group code in account groups list selector. +$ /includes/ui/ui_lists.inc +! Normalized add_domain() parameters in native/ohpgettext classes +$ /includes/lang/gettext.php +! submit_js_confirm() fixed to be used also on buttons uploaded with ajax. +$ /includes/ui/ui_input.inc +# Validation code was skipped when Esc/ctrlEnter hotkeys used +$ /js/inserts.js +# Fixed reference display in credit note edition. +$ /sales/includes/ui/sales_credit_ui.inc + +29-Oct-2010 Janusz Dobrowolski +# [0000275] Fixed cleanup for input arrays +$ /includes/session.inc + +28-Oct-2010 Janusz Dobrowolski +! All mysql specific functions moved to connect_db.inc +$ /admin/inst_theme.php + /admin/db/maintenance_db.inc + /includes/current_user.inc + /includes/db_pager.inc + /includes/db/connect_db.inc + /install/index.php +# Fixed mailing problems under PHP with Suhoshin patch (Michael Hahn) +$ /reporting/includes/class.mail.inc +# Fixed db error on freehand credit invoice reedition. +$ /sales/includes/cart_class.inc + +------------------------------- Release 2.3 RC3 -------------------------------- +26-Oct-2010 Janusz Dobrowolski +! Release 2.3RC3 +$ version.php +# Small fix to tabbed_content behaviour. +$ /includes/ui/ui_controls.inc +# Fixed installer (error in sys_prefs update) +$ /install/index.php + +26-Oct-2010 Joe Hunt +# 0000272: Manufacturing Bugs. Issue GL items moved to wo_work_order_issues.inc +$ /manufacturing/includes/db/work_orders_quick_db.inc + /manufacturing/includes/db/work_order_issues_db.inc + /manufacturing/includes/db/work_order_produce_items.inc +! Layout improvements in work order inquiry and various work order forms +$ /manufacturing/search_work_orders.php + /manufacturing/work_order_add_finished.php + /manufacturing/work_order_costs.php + /manufacturing/work_order_issue.php + /manufacturing/work_order_release.php + /includes/ui/view_package.php + +22-Oct-2010 Janusz Dobrowolski ++ Added greek installer translation by Kyriakos Tsoukalas +$ /install/isession.inc + /install/lang/el_GR/LC_MESSAGES/el_GR.mo + /install/lang/el_GR/LC_MESSAGES/el_GR.po +# Fixed sql init for manual modules. +$ /admin/inst_module.php +# Old package version was not uninstalled on upgrade. +$ /includes/packages.inc + +21-Oct-2010 Joe Hunt ++ Added credit info in supplier invoice and supplier credit note. +$ /purchasing/includes/db/invoice_db.inc + /purchasing/includes/ui/invoice_ui.inc + /purchasing/includes/supp_trans_class.inc + +21-Oct-2010 Janusz Dobrowolski +! Optimized bank transaction edition code, [0000270] invalid next reference update in journal/bank trans +$ /gl/gl_bank.php + /gl/includes/db/gl_db_bank_trans.inc + /gl/includes/db/gl_db_banking.inc + /purchasing/includes/db/invoice_db.inc + /purchasing/includes/db/supp_payment_db.inc + /purchasing/includes/db/supp_trans_db.inc +! Code cleanups +$ /includes/main.inc + /sales/view/view_dispatch.php + /sales/view/view_invoice.php + /includes/references.inc + /includes/db/references_db.inc + /gl/includes/db/gl_db_trans.inc + /gl/inquiry/journal_inquiry.php +# Bad amount sign for amount + /gl/view/gl_payment_view.php +# Additonal sql parameters sanitization against SQLI attacks +$ /gl/includes/db/gl_db_trans.inc + /gl/inquiry/journal_inquiry.php + /includes/date_functions.inc + /includes/references.inc + /includes/ui/ui_lists.inc + /purchasing/includes/db/suppalloc_db.inc + /sales/includes/db/custalloc_db.inc + /sales/includes/db/cust_trans_db.inc + /sales/includes/sales_db.inc + /sales/includes/db/sales_order_db.inc +# Added global input cleanup against reflected XSS attacks +$ /includes/session.inc + +19-Oct-2010 Janusz Dobrowolski +! Accounts list compares keypresses to starting fragment of GL code (combo3) +$ /includes/ui/ui_lists.inc + /js/inserts.js + +17-Oct-2010 Joe Hunt +! Changed Inventory Sales Report to use average cost by actual trans dates if non zero +$ /reporting/rep304.php + +16-Oct-2010 Joe Hunt +! [0000266] Added dimension selections in Profit Loss and Balance drilldown and Trial Balance +$ /gl/inquiry/balance_sheet.php + /gl/inquiry/gl_trial_balance.php + /gl/inquiry/profit_loss.php + +15-Oct-2010 Joe Hunt +# [0000263] Customer Credit Note didn't update units when shifting items. +$ /sales/includes/ui/sales_credit_ui.inc +! [0000265] Changed Report List of Journal Entries to include balances. +$ /reporting/rep702.php + +14-Oct-2010 Joe Hunt +# Check for empty class ID and better test for type/account id/name. +$ /gl/manage/gl_account_classes.php + /gl/manage/gl_account_types.php + /gl/manage/gl_accounts.php + +13-Oct-2010 Janusz Dobrowolski +! Added inline company switching with set_global_connection() +$ /admin/inst_upgrade.php + /includes/current_user.inc + /includes/errors.inc + /includes/db/connect_db.inc +! Warning instead of fatal error when sales_orders table contains invalid records +$ /sales/includes/db/sales_order_db.inc +# Fixed document totals update +$ /sql/alter2.3.php +# Fixed cash payment terms definition +$ /sql/en_US-demo.sql + /sql/en_US-new.sql + +12-Oct-2010 Janusz Dobrowolski +# Upgrade failed when MySQL run in strict mode. +$ /sql/alter2.3.sql + +------------------------------- Release 2.3 RC2 -------------------------------- +! Release 2.3RC2 +11-Oct-2010 Joe Hunt +$ version.php + update.html + +11-Oct-2010 Janusz Dobrowolski ++ Added document reference display in cust/supp payments +$ /includes/ui/allocation_cart.inc +! Added payment terms categories +$ /includes/types.inc +! Added terms category parameter to sale_payment_list +$ /includes/ui/ui_lists.inc + /sales/customer_invoice.php +! Allowed full edition of bank account if not used yet +$ /gl/manage/bank_accounts.php +# Fixed point of sale handling and terms selection. +$ /sales/sales_order_entry.php + /sales/includes/cart_class.inc + /sales/includes/db/sales_invoice_db.inc + /sales/includes/ui/sales_order_ui.inc +! Payment terms in so/si view +$ /sales/view/view_invoice.php + /sales/view/view_sales_order.php +! Updated po template file +$ /lang/new_language_template/LC_MESSAGES/empty.po + +10-Oct-2010 Joe Hunt +# Master bug in class supp_trans get_items_total. Minor bug in gl_db_trans.inc + Wrong tax report and wrong supp trans/gl records with gl item lines. + Fixing tax_included in gl_items. Layout improvements. +$ /purchasing/includes/supp_trans_class.inc + /purchasing/includes/db/invoice_db.inc + /purchasing/includes/ui/invoice_ui.inc + /purchasing/view/view_supp_credit.php + /gl/includes/db/gl_db_trans.inc + +06-Oct-2010 Janusz Dobrowolski +# Fixed gettext for extension links. +$ /reporting/includes/reports_classes.inc +! Added helper for gettext domain switching +$ /includes/lang/gettext.php + /applications/application.php + /frontaccounting.php + +06-Oct-2010 Joe Hunt +! Option for saving report selections ($save_report_selections > 0 in config.php means days to save) +$ /reporting/includes/reports_classes.inc + /reporting/prn_redirect.php + config.default.php +# Excel reports were missing their headers (due to change in report system). +$ /reporting/includes/excel_report.inc +# [0000259] Item prices not transferring when using kit codes +$ /sales/includes/sales_db.inc + +05-Oct-2010 Jusz Dobrowolski +# [0000258] Broken src_id fields after sales document edition. +$ /sales/includes/cart_class.inc + /sales/includes/sales_db.inc + +05-Oct-2010 Joe Hunt +# [00000257] Bad Layout in sales order inquiry etc. (long item descriptions) +$ /sales/inquiry/sales_orders_view.php + /sales/inquiry/sales_deliveries_view.php + /purchasing/inquiry/po_search.php + /purchasing/inquiry/po_search_completed.php + /inventory/inquiry/stock_movements.php + /gl/inquiry/gl_account_inquiry.php +! Other layour improvements + /admin/fiscalyears.php + /taxes/tax_groups.php + /taxes/tax_types.php + +05-Oct-2010 Janusz Dobrowolski +# Fixed contact type for language selection +$ reporting/rep107.php +# Fixed language file selection +$ reporting/includes/class.pdf.inc + +04-Oct-2010 Janusz Dobrowolski +# [0000252] Error during credit invoice processing for already allocated sales invoice. +$ /sales/includes/db/custalloc_db.inc + +04-Oct-2010 Joe Hunt +# Dimension Report doesn't show up with correct references +$ /reporting/rep501.php + +01-Oct-2010 Janusz Dobrowolski/Scott ++ Added chinese simplified installation wizard translation. +$ /install/isession.inc + /install/lang/de_DE/LC_MESSAGES/zh_CN.mo (new) + /install/lang/de_DE/LC_MESSAGES/zh_CN.po (new) +# Added missing GL/sql messages. +$ /lang/new_language_template/LC_MESSAGES/empty.po + +28-Sep-2010 Janusz Dobrowolski +# Reference should be updated after SO edition +$ /sales/includes/db/sales_order_db.inc +# [0000250] Reference update should not change next reference. +$ /includes/references.inc +# Division by zero error in graphics (Joe Hunt) +$ /reporting/includes/class.graphic.inc +# Fixed missing gettext calls +$ /gl/inquiry/gl_account_inquiry.php + /purchasing/manage/suppliers.php + /sales/manage/customer_branches.php + /sales/manage/customers.php +# Fixed warning on multiply extension access file include +$ /includes/access_levels.inc +! Updated po tempate +$ /lang/new_language_template/LC_MESSAGES/empty.po + +27-Sep-2010 Janusz Dobrowolski +! Alowed optional path for $icon parameter in set_icon helper +$ /includes/ui/ui_input.inc +! pageNumber property of TCPDF class made publicly accesible +$ /reporting/includes/fpdi/fpdi2tcpdf_bridge.php + +23-Sep-2010 Janusz Dobrowolski +# Fixed focus behaviour +$ /includes/ajax.inc ++ Additional debug logging helper. +$ /includes/ui/ui_view.inc +# Fixed gettext for extension menu options. +$ /applications/application.php + +22-Sep-2010 Janusz Dobrowolski +# Fixed delivery address printing in pdf documents. +$ /reporting/includes/header2.inc + +20-Sep-2010 Janusz Dobrowolski +# Fixed third party module installation. +$ /admin/inst_module.php + +17-Sep-2010 Janusz Dobrowolski ++ [0000248] External url reading made independent of php configuration. +$ /gl/includes/db/gl_db_rates.inc + /includes/packages.inc + /includes/remote_url.inc (new) +# Fixed custom reports includes issue. +$ /includes/main.inc + /reporting/prn_redirect.php +# Warning fixed +$ /includes/archive.inc + +13-Sep-2010 Joe Hunt/Chaitanya +! Improved information in Bank Transfers. +$ /gl/includes/db/gl_db_banking.inc + +11-Sep-2010 Janusz Dobrowolski +# Uniqueness moved from name to debtor_ref key in debtors_master +$ /sql/en_US-demo.sql + /sql/en_US-new.sql + +10-Sep-2010 Joe Hunt +! Layout improvements +$ /gl/inquiry/gl_account_inquiry.php + /includes/ui/contacts_view.inc + /includes/ui/ui_view.inc + /manufacturing/manage/bom_edit.php + +09-Sep-2010 Janusz Dobrowolski +# Missing focus on sales entry page +$ /sales/includes/ui/sales_order_ui.inc +# Invalid user table name +$ /sql/alter2.3rc.sql +08-Sep-2010 Joe Hunt +# Material cost updated when buying service items. Resulted in double COGS booking. +$ /purchasing/includes/db/grn_db.inc + /purchasing/includes/db/invoice_db.inc + /sales/includes/db/sales_delivery_db.inc +! Layout improvements in accruals.php +$ /gl/accruals.php + +------------------------------- Release 2.3 RC1 -------------------------------- +07-Sep-2010 Janusz Dobrowolski +! Release 2.3 RC1 +$ version.php +# Ugly bug in formating numbers +$ /js/utils.js + +07-Sep-2010 Joe Hunt/Chaitanya +! Removed all decimal roundings in cost price calculations +$ /purchasing/includes/db/grn_db.inc + /manufacturing/includes/db/work_orders_db.inc + +06-Sep-2010 Janusz Dobrowolski +# [0000247] Fixed error on new contact add. +$ /includes/ui/contacts_view.inc +# Fixed crud editor mode passing. +$ /includes/ui/simple_crud_class.inc + +------------------------------- Release 2.3 RC -------------------------------- +05-Sep-2010 Joe Hunt +! Release 2.3 RC +$ version.php +# Wrong stock item gl code when processing supplier invoice +$ /purchasing/includes/db/invoice_db.inc +! Changed layout of Direct GRN/Invoice form and check for supp ref in invoice. +$ /purchasing/po_entry_items.php + +04-Sep-2010 Joe Hunt +# Fixed installed_extensions.php creation +$ /install/index.php +# Page blocked during FA upgrade +$ /sales/sales_order_entry.php +# Fixed languages update +$ /sql/alter2.3.php +! Shorter line comments +$ /install/lang/new_language_template/LC_MESSAGES/empty.po + +03-Sep-2010 Joe Hunt ++ Added possibility to put dimensions on Delivery from sales order +$ /sales/customer_delivery.php + /sales/customer_invoice.php +! Changed update.html to be more readable +$ update.html + +02-Sep-2010 Janusz Dobrowolski +# Preprinted forms folder moved to /reporting where it should be +$ /reporting/forms + /reporting/forms/index.php + +29-Aug-2010 Janusz Dobrowolski +# Fixed maxprec option in number_format2 +$ /includes/current_user.inc +# Missing tags parameter in display_type call +$ /reporting/rep706.php + /reporting/rep707.php + +25-Aug-2010 Janusz Dobrowolski ++ Added taxes display for sales order/quotation +$ /sales/includes/cart_class.inc + /sales/view/view_sales_order.php + /reporting/rep109.php + +24-Aug-2010 Joe Hunt +# Removed old headerfunc in rep111.php (Sales Quotation) +$ /reporting/rep111.php + +23-Aug-2010 Janusz Dobrowolski ++ Added german translation for install wizard (thanks to iscongroup) +$ /install/isession.inc + /install/lang/de_DE/LC_MESSAGES/de_DE.mo (new) + /install/lang/de_DE/LC_MESSAGES/de_DE.po (new) +# Small fix in layout +$ /gl/manage/exchange_rates.php +# Fixed maxprec formatting +$ /includes/current_user.inc + /js/utils.js +# Fixed cogs account selection +$ /purchasing/includes/db/invoice_db.inc +# Fixed tax_included option update. +$ /purchasing/manage/suppliers.php + +23-Aug-2010 Joe Hunt +# Period bug caused warning on no fiscal year. Had to be reduces by one. +$ /gl/accruals.php + +22-Aug-2010 Janusz Dobrowolski ++ Extended number formatting to allow maximum precision numbers with 'max' specifier. + /includes/current_user.inc + /js/utils.js ++ Added purchase account special option for using item's account +$ /purchasing/manage/suppliers.php +# Fixed default 'C' locale in listing +$ /admin/inst_lang.php +# Fixed mysql extension test +$ /includes/system_tests.inc +# Fixed exrate reedition +$ /gl/manage/exchange_rates.php +# Maximum precision for factor entry +$ /inventory/purchasing_data.php +# Fixed backward compatibility for cogs GL account setup +$ /purchasing/includes/db/invoice_db.inc +! Fixed GL account selection on first display +$ /purchasing/includes/ui/invoice_ui.inc +# Fixed bug in lang update, changed purchase account for suppliers to default. +$ /sql/alter2.3rc.sql + /sql/en_US-demo.sql + +20-Aug-2010 Joe Hunt/Chaitanya ++ Improvements to bank inquiry credit/debit totals as well. +$ /gl/inquiry/bank_inquiry.php + +18-Aug-2010 Joe Hunt +# View of backup scripts and attachments didn't work +$ /admin/attachments.php + /admin/backups.php + /admin/db/attachments_db.inc +! Added more memo info in advanced manufacture / Chaitanya +$ /manufacturing/includes/db/work_orders_quick_db.inc +! Added total debit/credit in gl_trans_view.inc / Chaitanya +$ /gl/view/gl_trans_view.php + +13-Aug-2010 Joe Hunt/infotechaccountant.com ++ Added arabic translation for install wizard (thanks to Hameed, infotechaccountants) +$ /install/lang/ar_EG/LC_MESSAGES/ar_EG.mo (new) + /install/lang/ar_EG/LC_MESSAGES/ar_EG.po (new) + /install/isession.inc + +13-Aug-2010 Janusz Dobrowolski +# Updated pt_BR instaler translation +$ /install/lang/pt_BR/LC_MESSAGES/pt_BR.mo + /install/lang/pt_BR/LC_MESSAGES/pt_BR.po +# Fixed mysql extension test +$ /includes/system_tests.inc + +12-Aug-2010 Janusz Dobrowolski +# [0000242] Database error during credit note processing. +$ /sales/includes/db/sales_credit_db.inc + +11-Aug-2010 Janusz Dobrowolski ++ Added dutch translation for install wizard (thanks to MorkVonOrk) +$ /install/isession.inc + /install/lang/nl_BE/LC_MESSAGES/nl_BE.mo (new) + /install/lang/nl_BE/LC_MESSAGES/nl_BE.po (new) ++ Added portuguese (Brasil) translation for install wizard (thanks to InterConnect Brasil) +$ /install/isession.inc + /install/lang/pt_BR/LC_MESSAGES/pt_BR.mo (new) + /install/lang/pt_BR/LC_MESSAGES/pt_BR.po (new) +# Fixed two typos in translated messages. +$ /includes/system_tests.inc + /install/lang/da_DK/LC_MESSAGES/da_DK.mo + /install/lang/da_DK/LC_MESSAGES/da_DK.po + /install/lang/fr_FR/LC_MESSAGES/fr_FR.mo + /install/lang/fr_FR/LC_MESSAGES/fr_FR.po + /install/lang/id_ID/LC_MESSAGES/id_ID.mo + /install/lang/id_ID/LC_MESSAGES/id_ID.po + /install/lang/new_language_template/LC_MESSAGES/empty.po + /install/lang/pl_PL/LC_MESSAGES/pl_PL.mo + /install/lang/pl_PL/LC_MESSAGES/pl_PL.po + /install/lang/sv_SE/LC_MESSAGES/sv_SE.mo + /install/lang/sv_SE/LC_MESSAGES/sv_SE.po + /lang/new_language_template/LC_MESSAGES/empty.po + +10-Aug-2010 Janusz Dobrowolski +# Fixed tests or fresh new install +$ /includes/system_tests.inc +! Warning cleanups +$ /includes/ajax.inc + /includes/lang/language.php + +09-Aug-2010 Janusz Dobrowolski ++ Added French translation (thanks to Gaston) +$ /install/isession.inc + /install/lang/fr_FR/LC_MESSAGES/fr_FR.mo + /install/lang/fr_FR/LC_MESSAGES/fr_FR.po ++ Added Indonesian translation (thanks to Eko Prasetiyo) +$ /install/isession.inc + /install/lang/id_ID/LC_MESSAGES/id_ID.mo + /install/lang/id_ID/LC_MESSAGES/id_ID.po +# Warning in installer cleanup +$ /includes/ajax.inc +# Subpage display title update on lang switching +$ /install/index.php + +08-Aug-2010 Janusz Dobrowolski ++ Multilangage support in installer +$ /install/lang (new) + /install/lang/new_language_template/LC_MESSAGES (new) + /install/lang/new_language_template/LC_MESSAGES/empty.po (new) + /install/index.php + /install/isession.inc ++ Added Polish installer translation +$ /install/lang/pl_PL (new) + /install/lang/pl_PL/LC_MESSAGES (new) + /install/lang/pl_PL/LC_MESSAGES/pl_PL.po (new) + /install/lang/pl_PL/LC_MESSAGES/pl_PL.mo (new) ++ Added Danish/Svedish installer translation (Joe Hunt) +$ /install/lang/da_DK (new) + /install/lang/da_DK/LC_MESSAGES (new) + /install/lang/da_DK/LC_MESSAGES/da_DK.po (new) + /install/lang/da_DK/LC_MESSAGES/da_DK.mo (new) +$ /install/lang/sv_SE (new) + /install/lang/sv_SE/LC_MESSAGES (new) + /install/lang/sv_SE/LC_MESSAGES/sv_SE.po (new) + /install/lang/sv_SE/LC_MESSAGES/sv_SE.mo (new) + +! Updated language template +$ /lang/new_language_template/LC_MESSAGES/empty.po + +07-Aug-2010 Janusz Dobrowolski ++ Added langauges selection in installer. +$ /install/index.php +! Testing config_db on start +$ /index.php +# Side bug fixed. +$ /applications/setup.php +! Default language code changed form 'en_GB' to 'C' +$ /admin/inst_lang.php + /includes/system_tests.inc + /includes/lang/gettext.php + /includes/lang/language.php + /sql/alter2.3rc.sql + /sql/alter2.3.php + /sql/en_US-demo.sql +! Cleanup. +$ /includes/archive.inc +! Additional error messages +$ /includes/packages.inc +! Added descriptions for all existing hooks +$ /lang/new_language_template/locale.inc +! Changed hook name from TaxFunction to tax_report_done +$ /reporting/rep709.php + +07-Aut-2010 Joe Hunt +# Stamping the installed_languags.inc file with 'rtl' = false, causes 'rtl'. + The value: 'rtl' = false will make the variable as isset. +$ /includes/lang/languages.php + /includes/session.inc + /admin/inst_lang.php + +06-Aug-2010 Janusz Dobrowolski +# Fixed page title +$ /gl/gl_bank.php +# Fixed memo dupliactaion after bank payment edition. +$ /gl/includes/db/gl_db_bank_trans.inc +! Cleanup. +$ /install/index.php +! Improved chart list selection. +$ /includes/ui/ui_lists.inc ++ Added Chart of accounts installation. +$ /admin/inst_chart.php (new) + /applications/setup.php +# Fixed third-party extension installation +$ /admin/inst_module.php +# Fixed theme description popup. +$ /admin/inst_theme.php +! Added optional type parameter in get_extensions_list() +$ /includes/packages.inc ++ Added encoding display for chart packages list +$ /install/index.php +# Fixed multiline package property values display. +$ /includes/ui/view_package.php + +06-Aug-2010 Joe Hunt +# Bank Payment on customer statements shows in credit column, should be debit. Balance ok. +$ /reporting/rep108.php + +04-Aug-2010 Janusz Dobrowolski ++ Rewritten installation wizard, uploading additional COAs form repository during install + /install/index.php + /install/stylesheet.css + /install/isession.inc (new) + /install/save.php (removed) +! COAs selected from previously uploaded charts. +$ /admin/create_coy.php +! Diagnostic tests moved to separate file, to be reused during FA install. +$ /includes/system_tests.inc (new) + /admin/system_diagnostics.php +! user_theme fixed to be used before login, and warning suppressed in array_search_value +$ /includes/current_user.inc +# Fixed bug in check_write() helper +$ /includes/main.inc +! Changed core_version to db_version for better readibility +$ /admin/db/company_db.inc + /sql/alter2.3.php + /version.php ++ Chart packages support added +$ /includes/packages.inc + /includes/ui/ui_lists.inc +! Update from beta to RC1 +$ /sql/alter2.3rc.sql (new) + /sql/en_US-demo.sql + /sql/en_US-new.sql +# Fixed exit on error in check_db_error() +$ /includes/errors.inc +! Added css parameter in page(); +$ /includes/page/header.inc + /includes/main.inc +! Changed repository parameteres format. +$ /version.php +! Cleanup +$ /admin/inst_lang.php + +04-Aug-2010 Joe Hunt ++ Added an extra parameter to db_export in maintenance_db.inc for new COAs +$ /admin/db/maintenance_db.inc +# Link error in items.php for Pictures +$ /inventory/manage/items.php + +01-Aug-2010 Joe Hunt ++ Added Email link when updating documents. +$ /sales/credit_note_entry.php + /sales/customer_credit_invoice.php + /sales/customer_invoice.php + +30-Jul-2010 Janusz Dobrowolski +! Skipping hidden files in sql folder during upgrade. +$ /admin/inst_upgrade.php +# Warning cleanup +$ /includes/lang/language.php +# Bug in src document lines retrieval during edition +$ /sales/includes/cart_class.inc +! Fixing extensions configuration moved to installed() method. +$ /sql/alter2.3.php + +26-Jul-2010 Janusz Dobrowolski +# Fatal typo in upgrade function fixed. +$ /sql/alter2.3.php + +25-Jul-2010 Janusz Dobrowolski +# Fixed language file switching on package version change + /admin/db/company_db.inc + /includes/session.inc + /includes/lang/language.php + /includes/current_user.inc +! flush_dir() and company_path() moved to current_user.php +$ /includes/main.inc ++ Added preprinted forms folder +$ /reporting/includes/forms (new) + /reporting/includes/forms/index.php +# Fixed multilanguage tests +$ /admin/system_diagnostics.php + /includes/lang/gettext.php +# Fixed config comments +$ /admin/db/maintenance_db.inc +! Cleanup. +$ /includes/packages.inc +# Fixed installed_languages config file upgrade. +$ /sql/alter2.3.php + +24-Jul-2010 Janusz Dobrowolski +# Upgrade routines for extensions configuration + /sql/alter2.3.php +# Cleanup +$ /admin/inst_module.php + /includes/current_user.inc + /includes/packages.inc + +24-Jul-2010 Joe Hunt +! Changed so Purchase Order also print taxes. +$ /reporting/rep209.php + /reporting/doctype.inc +# Fixed Customer Details Report and Pricelist (UOM) +$ /reporting/rep103.php + /reporting/rep104.php + +23-Jul-2010 Janusz Dobrowolski ++ Added tax information display + /purchasing/view/view_grn.php + /purchasing/view/view_po.php ++ Added option for tax included prices. +$ /purchasing/includes/db/suppliers_db.inc + /purchasing/manage/suppliers.php ++ Added support for transactions with tax included prices +$ /purchasing/po_entry_items.php + /purchasing/po_receive_items.php + /purchasing/includes/po_class.inc + /purchasing/includes/supp_trans_class.inc + /purchasing/includes/db/grn_db.inc + /purchasing/includes/db/invoice_db.inc + /purchasing/includes/db/po_db.inc + /purchasing/includes/db/supp_trans_db.inc + /purchasing/includes/ui/invoice_ui.inc + /purchasing/includes/ui/po_ui.inc ++ Added GRNs to supplier transaction inquiry + /purchasing/inquiry/supplier_inquiry.php +! Added upgrade from 2.3beta to 2.3RC + /sql/alter2.3.php + /sql/alter2.3.sql + /sql/en_US-demo.sql + /sql/en_US-new.sql +! Versions information moved to separate file. +$ /version.php (new) + /config.default.php + /includes/session.inc +! Fixed item list buttons position. +$ /sales/includes/ui/sales_order_ui.inc +# Fixed credit links colors +$ /themes/aqua/default.css + /themes/cool/default.css + /themes/default/default.css +# SysPrefs restoration after upgrade. +$ /admin/inst_upgrade.php +# Warning clenaup +$ /includes/packages.inc ++ Supplier transactions list added. +$ /includes/ui/ui_lists.inc +# Fixed tax footer descriptions +$ /includes/ui/ui_view.inc + +21-Jul-2010 Joe Hunt +! Changed Report Statements to accept selector Outstanding Only +$ /reporting/reports_main.php + /reporting/rep108.php + +19-Jul-2010 Joe Hunt ++ Added Revenue / Cost Accruals to be included in core FA +$ /applications/generalledger.php + /gl/accruals.php (new file) + /gl/view/accrual_trans.php (new file) + /includes/access_levels.inc +! Changed Std. Cost to show all decimals, and added UOM +$ /reporting/rep301.php + /reporting/rep303.php +# Wrong link to Inventory Reports +$ /applications/inventory.php + +18-Jul-2010 Janusz Dobrowolski +! Improved key_in_foreign_table to check multiply tables +$ /admin/db/company_db.inc +! New customer/supplier currency can be edited as long as no transaction is entered. +$ /purchasing/includes/db/suppliers_db.inc + /purchasing/manage/suppliers.php + /sales/includes/db/customers_db.inc + /sales/manage/customers.php + +17-Jul-2010 Janusz Dobrowolski ++ New packaged extensions system +$ /modules/_cache/index.php (new) + /FA.pem (new) + /includes/archive.inc (new) + /includes/packages.inc (new) + /includes/ui/view_package.php (new) + /config.default.php + /frontaccounting.php + /admin/inst_lang.php + /admin/inst_module.php + /includes/access_levels.inc + /includes/ui/ui_controls.inc + /includes/ui/ui_view.inc + /admin/db/maintenance_db.inc +! Changed language file convention to prevent need for apache restart after *.po file change. +$ /includes/lang/gettext.php + /includes/lang/language.php +! Small cleanup +$ /includes/page/header.inc +! Fixed memo string in adjust_deliveries. +$ /includes/db/inventory_db.inc +! Fixed call params check message display +$ /gl/view/gl_trans_view.php +! Updated MySQL, php, debugging and extension system checks +$ /admin/system_diagnostics.php +# Fixed gettext msg typo +$ /purchasing/supplier_invoice.php +# Fixed curr_default check +$ /gl/manage/currencies.php +# Message typos +$ /admin/create_coy.php + /admin/inst_upgrade.php +! Updated translation template +$ /lang/new_language_template/LC_MESSAGES/empty.po + +15-Jul-2010 Chaitanya/Joe Hunt +! Changed calculating of cost update (average material price) for better sync. +$ /purchasing/includes/db/grn_db.inc + /purchasing/includes/db/invoice_db.inc + /manufacturing/includes/db/work_orders_db.inc + /includes/db/inventory_db.inc + +------------------------------- Release 2.3 Beta -------------------------------- +28-Jun-2010 Joe Hunt +! Release 2.3 Beta +$ config.default.php + +28-Jun-2010 Merged changes from main trunk (2.2.11) as follows ------------------------------- Release 2.2.11 ---------------------------------- ! Release 2.2.11 $ config.default.php @@ -35,26 +1168,199 @@ $ /sales/create_recurrent_invoices.php 18-Jun-2010 Joe Hunt - Removed constraint on day values in Payment Terms $ /admin/payment_terms.php - -18-Jun-2010 Janusz Dobrowolski -# Small bug on final credit note screen redirection + +18-Jun-2010 Janusz Dobrowolski +# Small bug on final credit note screen redirection +$ /sales/customer_credit_invoice.php + +17-Jun-2010 Janusz Dobrowolski +# [0000235],[0000236] db error in sales order view window. +$ /sales/view/view_sales_order.php + +14-Jun-2010 Tom Moulton/Joe Hunt +# Bug [0000231] Wrong On Order for Advanced Manufacturing.before final production. +$ /includes/db/manufacturing_db.inc +! Allow optional non zero values in reports 101,102,201,202,203 and 303. +$ /reporting/rep101.php + /reporting/rep102.php + /reporting/rep201.php + /reporting/rep202.php + /reporting/rep203.php + /reporting/rep303.php + /reporting/reports_main.php + +---------- End of changes from main trunk 2.2.11 + +27-Jun-2010 Janusz Dobrowolski ++ Added debtor_trans.src_id update +$ /sql/alter2.3.php + /sql/alter2.3.sql ++ Added key for debtor_trans_detail.src_id +$ /sql/en_US-demo.sql + /sql/en_US-new.sql ++ Added company upgrade boundary markers in error log. +$ /admin/inst_upgrade.php +! Changed price column name to reflect current pricelist type. + /sales/includes/ui/sales_order_ui.inc +# Fixed sql (removed obsolete email field) + /reporting/rep112.php +# Fixed sql for child/parent lines retrieval + /sales/includes/sales_db.inc +# Removed bank payment print links (not implemented yet) + /sales/inquiry/customer_inquiry.php +# Cleanup +$ /purchasing/includes/db/po_db.inc + +26-Jun-2010 Joe Hunt +! Option to suppress tax rates on documents. To be used for tax on tax + The tax % should be included in the tax name and the calculated + rate be set as the rate. $suppress_tax_rates in config.php set to 1. +$ config.default.php + /includes/ui/ui_view.inc + /reporting/rep107.php + /reporting/rep110.php +! Improvements to Sales Groups. Presenting the Id too. +$ /sales/manage/sales_groups.php ++ Preparing for 2.3 Beta +$ update.html + +26-Jun-2010 Janusz Dobrowolski +# Fixed sql for child transaction retrieval +$ /sales/includes/sales_db.inc +! Added debtor_trans_details.src_id +$ /sql/en_US-demo.sql + /sql/en_US-new.sql + +25-Jun-2010 Janusz Dobrowolski +! Allow reuse of references previously used on voided transactions +$ /includes/references.inc +! Fixed sales database design to ensure document relations consistency on line level. +$ /admin/db/fiscalyears_db.inc + /admin/db/voiding_db.inc + /reporting/includes/header2.inc + /sales/customer_invoice.php + /sales/includes/cart_class.inc + /sales/includes/sales_db.inc + /sales/includes/db/cust_trans_db.inc + /sales/includes/db/cust_trans_details_db.inc + /sales/includes/db/payment_db.inc + /sales/includes/db/sales_credit_db.inc + /sales/includes/db/sales_delivery_db.inc + /sales/includes/db/sales_invoice_db.inc + /sales/view/view_invoice.php + /sales/view/view_sales_order.php + +24-Jun-2010 Joe Hunt +# Rewritten function gl_account_in_company_defaults in gl_db_accounts.inc +$ /gl/includes/db/gl_db_accounts.inc +# More test on tags due to db error in reports with tags. +$ /reporting/rep705.php + /reporting/rep706.php + /reporting/rep707.php + +23-Jun-2010 Chaitanya/Joe Hunt +! Changed memo message in supp invoice price variance +$ /purchasing/includes/db/invoice_db.inc +! Changed Ourstanding GRN Report to use Actual Price instead of Std Cost. +$ /reporting/rep204.php + +23-Jun-2010 Janusz Dobrowolski +# Restored customer payments display +$ /sales/includes/db/cust_trans_db.inc + +22-Jun-2010 Janusz Dobrowolski +# Fixed pos parameters retrieval in direct invoice +$ /sales/includes/cart_class.inc + +21-Jun-2010 Janusz Dobrowolski ++ Support for current credit display +$ /includes/ui/ui_input.inc + /purchasing/po_entry_items.php + /purchasing/includes/po_class.inc + /purchasing/includes/db/po_db.inc + /purchasing/includes/db/suppliers_db.inc + /purchasing/includes/ui/po_ui.inc + /sales/customer_delivery.php + /sales/includes/cart_class.inc + /sales/includes/db/customers_db.inc + /sales/includes/db/sales_order_db.inc + /sales/includes/ui/sales_order_ui.inc ++ Optional displaying all sql queries in footer for debugging purposes + /includes/db/connect_db.inc + /includes/page/footer.inc + /config.default.php + /admin/system_diagnostics.php + /includes/errors.inc ++ Not fully credited invoice can still be credited (automatic payments reallocation) +$ /sales/includes/db/cust_trans_db.inc + /sales/includes/db/custalloc_db.inc + /sales/includes/db/sales_credit_db.inc ++ Added payment term types +$ /includes/sysnames.inc + /includes/types.inc ++ Added popup mode +$ /sales/inquiry/customer_inquiry.php + /purchasing/inquiry/supplier_inquiry.php +! Reorganized payment terms editor +$ /admin/payment_terms.php + /includes/ui/ui_lists.inc +! Comments +$ /includes/ui/allocation_cart.inc +! Cleanup +$ /reporting/rep101.php +# Fixed fatal typo $ /sales/customer_credit_invoice.php +! Fixed final page message text +$ /sales/customer_invoice.php +! Removed sparse order allocation code, invoice reallocation routine added +$ /sales/includes/db/custalloc_db.inc +# Fixed branch creation for new company +$ /sales/manage/customer_branches.php +! Changed line_details class name to po_line_details to avoid conflicts. +$ /purchasing/includes/po_class.inc +! Added sales and purchase order totals +$ /sql/alter2.3.sql + /sql/alter2.3.php + /sql/en_US-demo.sql + /sql/en_US-new.sql -17-Jun-2010 Janusz Dobrowolski -# [0000235],[0000236] db error in sales order view window. -$ /sales/view/view_sales_order.php +14-Jun-2010 Janusz Dobrowolski +# Additional corrections to yesterday commit +$ /sales/includes/cart_class.inc + /sales/includes/db/cust_trans_db.inc + /sales/view/view_sales_order.php -14-Jun-2010 Tom Moulton/Joe Hunt -# Bug [0000231] Wrong On Order for Advanced Manufacturing.before final production. -$ /includes/db/manufacturing_db.inc -! Allow optional non zero values in reports 101,102,201,202,203 and 303. -$ /reporting/rep101.php - /reporting/rep102.php - /reporting/rep201.php - /reporting/rep202.php - /reporting/rep203.php - /reporting/rep303.php - /reporting/reports_main.php +13-Jun-2010 Janusz Dobrowolski +# Small layout bug in tabs widget +$ /includes/ui/ui_controls.inc +! Allowed space and '[' in button names +$ /includes/ui/ui_input.inc +! Formatted posts and a couple of improvements +$ /includes/ui/simple_crud_class.inc +! Changed method naming convention +$ /includes/ui/contacts_view.inc +! is_invoice property superseded by trans_type, removed obsolete Complete property +$ /purchasing/includes/supp_trans_class.inc + /purchasing/includes/db/invoice_db.inc + /purchasing/includes/ui/invoice_ui.inc + /purchasing/view/view_supp_credit.php + /purchasing/view/view_supp_invoice.php +! Cleanups and comments +$ /purchasing/includes/po_class.inc + /sales/includes/cart_class.inc +! Added document inheritance definitions +$ /includes/types.inc +# Smaller technical fixes +$ /purchasing/includes/db/grn_db.inc + /purchasing/includes/db/po_db.inc + /sales/includes/sales_db.inc + /sales/includes/db/sales_credit_db.inc + /purchasing/po_entry_items.php + /purchasing/po_receive_items.php + /purchasing/supplier_credit.php + /purchasing/supplier_invoice.php + +13-Jun-2010 Merged changes from main trunk (2.2.10) as follows ------------------------------- Release 2.2.10 ---------------------------------- 11-Jun-2010 Joe Hunt @@ -107,6 +1413,26 @@ $ /reporting/rep704.php $ /sql/en_US-demo.sql /sql/en_US-new.sql +---------- End of changes from main trunk 2.2.10 + +05-Jun-2010 Joe Hunt +! Allowing SA_MULTIFISCALYEAR access to enter transactions on open fiscal years +$ /admin/db/fiscalyears_db.inc + /includes/date_functions.inc + /includes/acces_levels.inc + +31-May-2010 Joe Hunt +! Allowing modifying of Bank Payments/Deposits +$ /gl/gl_bank.php + /gl/includes/db/gl_db_banking.inc + /gl/includes/db/gl_db_bank_trans.inc + /gl/includes/db/gl_db_trans.inc + /gl/inquiry/journal_inquiry.php + /purchasing/includes/db/supp_trans_db.inc + /sales/includes/db/cust_trans_db.inc + +27-May-2010 Merged changes from main trunk (2.2.8, 2.2.9) as follows + ------------------------------- Release 2.2.9 ---------------------------------- 24-May-2010 Joe hunt ! Release 2.2.9 @@ -159,103 +1485,371 @@ $ /reporting/rep108.php $ /reporting/includes/doctext.inc /reporting/includes/doctext2.inc -04-May-2010 Joe Hunt -# [0000225] Supplier Payment Report showing paid invoices (rounding problem) -$ /reporting/rep203.php -! Minor change to balance sheet/profit and loss drilldown - Script is modified to display only direct child types -/gl/inquiry/balance_sheet.php -/gl/inquiry/profit_loss.php -! New empty.po for release 2.2.8 -$ /lang/new_language_template/LC_MESSAGES/empty.po +04-May-2010 Joe Hunt +# [0000225] Supplier Payment Report showing paid invoices (rounding problem) +$ /reporting/rep203.php +! Minor change to balance sheet/profit and loss drilldown + Script is modified to display only direct child types +/gl/inquiry/balance_sheet.php +/gl/inquiry/profit_loss.php +! New empty.po for release 2.2.8 +$ /lang/new_language_template/LC_MESSAGES/empty.po + +26-Apr-2010 Joe Hunt +! Allowing the Tax Report to be printed to Excel/OO Calc +$ /reporting/rep709.php + /reporting/reports_main.php + /reporting/includes/excel_report.inc + +21-Apr-2010 Joe Hunt +# [0000223] Incorrect backup of tables with more than 2 digit prefix +$ /admin/db/maintenance_db.inc + +21-Apr-2010 Joe Hunt +# [0000222] Deleting a Sales Order with reference to a voided delivery causes SQL error when + looking at this delivery. Solution, can't delete, but set the deliveries to 0 + on the lines. +$ /sales/includes/db/sales_order_db.inc + +------------------------------- Release 2.2.8 ---------------------------------- +18-Apr-2010 +! Release 2.2.8 +$ config.default.php + update.html + +17-Apr-2010 Janusz Dobrowolski +# Small fix in company creation +$ /admin/create_coy.php +# Checking whether reference is unique before saving transaction. +$ /sales/sales_order_entry.php + +09-Apr-2010 Joe Hunt +# Creating a new company without a Database script causes unpredictable errors. +$ /admin/create_coy.php + +06-Apr-2010 Joe Hunt/Albin +# Inactive items should not show in Price List Report. In Item lists they are + stamped (Inactive) after the description. +$ /reporting/rep104.php + /reporting/rep301.php + /reporting/rep302.php + /reporting/rep303.php + /reporting/rep304.php + /reporting/rep305.php + +03-Apr-2010 Joe Hunt/Chaitanya +# [0000219] Incorrect behaviors regarding Payment forms +$ /purchasing/supplier_payment.php + /sales/customer_payments.php + +20-Mar-2010 Joe Hunt/RodW +# [0000215} Wrong text in deliver to and not printing it. +$ /reporting/includes/doctext.inc + /reporting/includes/doctext2.inc + /reporting/includes/header2.inc + +15-Mar-2010 Janusz Dobrowolski +# Missing check for customer/branch selected ([0000216]) +$ /sales/sales_order_entry.php + /sales/customer_payment.php +# Missing check for supplier selected ([0000217]) +$ /purchasing/supplier_invoice.php + /purchasing/supplier_payment.php + /purchasing/po_entry_items.php +# Fixed db error on no supplier selected + /purchasing/includes/db/suppalloc_db.inc +# Smaller clenaups. +$ /includes/current_user.inc + /includes/session.inc + +10-Mar-2010 Joe Hunt +! Print full Location name on reports +$ /reporting/rep105.php + /reporting/rep301.php + /reporting/rep302.php + /reporting/rep303.php +# Print reference on email (PO) + /reporting/rep209.php + +07-Mar-2010 Joe Hunt +# Bug in ui_lists.inc, systypes_list_row, too many parameters in + call to systypes_list_cells +$ /includes/ui/ui_lists.inc + +06-Mar-2010 Joe Hunt +# Bug in Text(Col)WrapLines. Doesn't break on space. +$ /reporting/includes/pdf_report.inc +# Missing 'Set Global Supplier' in invoice_ui.inc +$ /purchasing/includes/ui/invoice_ui.inc + +---------- End of changes from main trunk 2.2.7-2.2.9 + +15-May-2010 Joe Hunt +! Layout - added class label for branch link +$ /sales7manage/customers.php + +11-May-2010 Janusz Dobrowolski ++ Added multiply categorized customer/branch/supplier contacts in separate table, + per contact report language selection +$ /admin/crm_categories.php (new) + /applications/setup.php + /includes/access_levels.inc + /includes/sysnames.inc + /includes/db/crm_contacts_db.inc (new) + /includes/ui/contacts_view.inc (new) + /includes/ui/simple_crud_class.inc (new) + /manufacturing/includes/db/work_orders_db.inc + /purchasing/includes/db/suppliers_db.inc + /purchasing/manage/suppliers.php + /reporting/rep107.php + /reporting/rep108.php + /reporting/rep109.php + /reporting/rep110.php + /reporting/rep111.php + /reporting/rep112.php + /reporting/rep209.php + /reporting/rep210.php + /reporting/rep409.php + /sales/includes/db/branches_db.inc + /sales/includes/db/cust_trans_db.inc + /sales/includes/db/customers_db.inc + /sales/includes/db/sales_order_db.inc + /sales/includes/ui/sales_order_ui.inc + /sales/manage/customer_branches.php + /sales/manage/customers.php + /sql/alter2.3.php + /sql/alter2.3.sql + /sql/en_US-demo.sql + /sql/en_US-new.sql ++ Added tabbed content widget +$ /includes/ui/ui_controls.inc + /themes/aqua/default.css + /themes/cool/default.css + /themes/default/default.css ++ Changes in hotkeys system for tabs support +$ /js/inserts.js ++ Emailed reports can be send to multiply contacts, fixed email charset selection +$ /reporting/includes/pdf_report.inc ++ Added charset selection for email content +$ /reporting/includes/class.mail.inc +# Small field name bug +$ /reporting/reports_main.php +# Fixed typo and small bug +$ /reporting/includes/doctext.inc +# Fixed problem with multiselection in array_combo, added crm related list helpers +$ /includes/ui/ui_lists.inc +# Fixed function name +$ /sales/includes/db/sales_credit_db.inc +# Fixed email sending links to use ajax. +$ /sales/credit_note_entry.php + /sales/customer_delivery.php + /sales/customer_invoice.php +# Fix in array_search_keys +$ /includes/current_user.inc +# Fixed bug in company deletion +$ /admin/create_coy.php + /admin/db/company_db.inc + +07-May-2010 Joe Hunt ++ Added Account tags selection in Annual Expense Breakdown, Balanse Sheet + and Profit and Loss Sheet +$ /admin/db/tags_db.inc + /reporting/rep705.php + /reporting/rep706.php + /reporting/rep707.php + /reporting/reports_main.php + /reporting/includes/reports_classes.inc + +07-May-2010 Janusz Dobrowolski +# Fixed bug in array_selector for multiply lists +$ /includes/ui/ui_lists.inc + +30-Apr-2010 Janusz Dobrowolski ++ Recovering next reference after voiding of last reference + /admin/db/voiding_db.inc + /includes/references.inc + /includes/db/references_db.inc +# Reference column displayed also for journal entries + /admin/void_transaction.php +# Voided transactions excluded form list of transactions + /admin/db/transactions_db.inc + +26-Apr-2010 Joe Hunt +! Changed voiding of Direct Invoice to automatically void 'auto' delivery + and set SO quantity and qty_sent to 0. + And a few small bug fixes. +$ /admin/db/voiding_db.inc + /sales/includes/sales_db.inc + /sales/includes/db/sales_credit_db.inc + /sales/includes/db/sales_invoice_db.inc + /sales/includes/db/sales_delivery_db.inc + +21-Apr-2010 Joe Hunt +# Bug in systypes selector (no type update) +$ /admin/attachments.php +! Better layout +$ /admin/company_preferences.php +# Didn't show 'View Attachments' for Journal Entries +$ /includes/ui/ui_controls.inc + +20-Apr-2010 Joe Hunt ++ Added option for Manual Revaluation of Currency Accounts +$ /admin/company_preferences.php + /applications/generalledger.php + /gl/includes/db/gl_db_banking.inc + /gl/manage/revaluate_currencies.php (new file) + /includes/prefs/sysprefs.inc + /sql/en_US-demo.sql + /sql/en_US-new.sql + /sql/alter2.3.sql + +16-Apr-2010 Joe Hunt +# Minor fixes in voiding transactions +$ /admin/void_transaction.php +! Layout improvement in hyperlink_back function +$ /includes/ui/ui_controls.inc + +15-Apr-2010 Joe Hunt +! Added an alternative way of presenting tax included on invoices. + This is done by setting a global variabel $alternative_tax_include_on_docs = 1. +$ config.default.php + /includes/ui/ui_view.inc + /reporting/rep107.php + /reporting/rep110.php + +! Added a date column and combined the # and View column in 'View / Print Transactions. +! Changed Voiding Transaction to also include a pager. +$ /admin/view_print_transaction.php + /admin/void_transaction.php + /admin/db/transaction_db.inc + /includes/systypes.inc + /manufacturing/view/wo_production_view.php + /reporting/includes/reporting.inc + +14-Apr-2010 Joe Hunt +! Replaced the global variables for table styles to defined CSS classes. +$ all files that includes the call to start_table and start_outer_table + +14-Apr-2010 Joe Hunt/ AVB3 ++ Added 'View Attachments' if any in all popup view windows +$ /admin/db/attachments_db.inc + /includes/main.inc + /includes/ui/ui_controls.inc + /dimensions/view/view_dimension.php + /gl/view/bank_transfer_view.php + /gl/view/gl_deposit_view.php + /gl/view/gl_payment_view.php + /gl/view/gl_trans_view.php + /inventory/view/view_adjustment.php + /inventory/view/view_transfer.php + /manufacturing/view/work_order_view.php + /manufacturing/view/wo_issue_view.php + /manufacturing/view/wo_production_view.php + /purchasing/view/view_grn.php + /purchasing/view/view_po.php + /purchasing/view/view_supp_credit.php + /purchasing/view/view_supp_invoice.php + /purchasing/view/view_supp_payment.php + /sales/view/view_credit.php + /sales/view/view_dispatch.php + /sales/view/view_invoice.php + /sales/view/view_receipt.php + /sales/view/view_sales_order.php + +04-Apr-2010 Janusz Dobrowolski ++ Added supplier/customer document language selection +$ /purchasing/includes/db/suppliers_db.inc + /purchasing/manage/suppliers.php + /reporting/rep107.php + /reporting/rep108.php + /reporting/rep109.php + /reporting/rep110.php + /reporting/rep111.php + /reporting/rep112.php + /reporting/rep209.php + /reporting/rep210.php + /reporting/includes/class.pdf.inc + /reporting/includes/pdf_report.inc + /sales/includes/db/branches_db.inc + /sales/includes/db/customers_db.inc + /sales/includes/db/cust_trans_db.inc + /sales/includes/db/sales_order_db.inc + /sales/manage/customer_branches.php + /sales/manage/customers.php + /sql/alter2.3.sql + /sql/en_US-demo.sql + /sql/en_US-new.sql + /reporting/includes/doctext2.inc (removed) -26-Apr-2010 Joe Hunt -! Allowing the Tax Report to be printed to Excel/OO Calc -$ /reporting/rep709.php - /reporting/reports_main.php ++ Added company_path() helper +$ /admin/attachments.php + /admin/company_preferences.php + /admin/create_coy.php + /admin/display_prefs.php + /admin/print_profiles.php + /admin/system_diagnostics.php + /admin/db/fiscalyears_db.inc + /includes/main.inc + /includes/lang/language.php + /includes/page/header.inc + /includes/ui/ui_view.inc + /inventory/manage/items.php + /reporting/rep102.php + /reporting/rep104.php + /reporting/rep202.php + /reporting/rep303.php + /reporting/rep706.php + /reporting/rep707.php /reporting/includes/excel_report.inc - -21-Apr-2010 Joe Hunt -# [0000223] Incorrect backup of tables with more than 2 digit prefix -$ /admin/db/maintenance_db.inc + /reporting/includes/header2.inc -21-Apr-2010 Joe Hunt -# [0000222] Deleting a Sales Order with reference to a voided delivery causes SQL error when - looking at this delivery. Solution, can't delete, but set the deliveries to 0 - on the lines. -$ /sales/includes/db/sales_order_db.inc +! Added all_option parameter to language selectors +$ /includes/ui/ui_lists.inc -------------------------------- Release 2.2.8 ---------------------------------- -18-Apr-2010 -! Release 2.2.8 -$ config.default.php - update.html +! System names extracted to new separated file to enable re-read after langauge change +$ /includes/types.inc + /includes/sysnames.inc (new) -17-Apr-2010 Janusz Dobrowolski -# Small fix in company creation -$ /admin/create_coy.php -# Checking whether reference is unique before saving transaction. -$ /sales/sales_order_entry.php +! Fixed for better extension modules support +$ /reporting/prn_redirect.php + /reporting/includes/tcpdf.php -09-Apr-2010 Joe Hunt -# Creating a new company without a Database script causes unpredictable errors. -$ /admin/create_coy.php +! Changed addReport method (better support for extension modules) +$ /reporting/reports_main.php + /reporting/includes/reports_classes.inc -06-Apr-2010 Joe Hunt/Albin -# Inactive items should not show in Price List Report. In Item lists they are - stamped (Inactive) after the description. -$ /reporting/rep104.php - /reporting/rep301.php - /reporting/rep302.php - /reporting/rep303.php - /reporting/rep304.php - /reporting/rep305.php - -03-Apr-2010 Joe Hunt/Chaitanya -# [0000219] Incorrect behaviors regarding Payment forms -$ /purchasing/supplier_payment.php - /sales/customer_payments.php +! Code cleanup +$ /gl/inquiry/balance_sheet.php + /gl/inquiry/profit_loss.php -20-Mar-2010 Joe Hunt/RodW -# [0000215} Wrong text in deliver to and not printing it. -$ /reporting/includes/doctext.inc - /reporting/includes/doctext2.inc - /reporting/includes/header2.inc - -15-Mar-2010 Janusz Dobrowolski -# Missing check for customer/branch selected ([0000216]) -$ /sales/sales_order_entry.php - /sales/customer_payment.php -# Missing check for supplier selected ([0000217]) -$ /purchasing/supplier_invoice.php - /purchasing/supplier_payment.php - /purchasing/po_entry_items.php -# Fixed db error on no supplier selected - /purchasing/includes/db/suppalloc_db.inc -# Smaller clenaups. -$ /includes/current_user.inc - /includes/session.inc +26-Mar-2010 Joe Hunt +# Fixed a sorting problem in gl_account_types_list +$ /includes/ui/ui_lists.inc + /gl/includes/db/gl_db_account_types.inc -10-Mar-2010 Joe Hunt -! Print full Location name on reports -$ /reporting/rep105.php - /reporting/rep301.php - /reporting/rep302.php - /reporting/rep303.php -# Print reference on email (PO) - /reporting/rep209.php - -07-Mar-2010 Joe Hunt -# Bug in ui_lists.inc, systypes_list_row, too many parameters in - call to systypes_list_cells +24-Mar-2010 Janusz Dobrowolski/Joe Hunt +# Fixed problem with multiply zeros a value of option in list selectors +# Parse error in ui_list.inc. Fix in other files. $ /includes/ui/ui_lists.inc + /gl/includes/db/gl_db_account_types.inc + /gl/manage/gl_account_types.php -06-Mar-2010 Joe Hunt -# Bug in Text(Col)WrapLines. Doesn't break on space. -$ /reporting/includes/pdf_report.inc -# Missing 'Set Global Supplier' in invoice_ui.inc -$ /purchasing/includes/ui/invoice_ui.inc +22-Mar-2010 Joe Hunt +# Error editing (updating) Account Groups and problem + with "00" == "0" in php. +$ /gl/includes/db/gl_db_account_types.inc + /gl/manage/gl_account_classes.php + /gl/manage/gl_account_types.php + /includes/ui/ui_lists.inc + /sql/alter2.3.sql + +12-Mar-2010 Janusz Dobrowolski +# Small cleanups. +$ /reporting rep301.php + /reporting rep304.php + /reporting rep601.php +05-Mar-2010 Merged changes from main trunk up to 2.2. as follows ------------------------------- Release 2.2.7 ---------------------------------- 05-Mar-2010 Joe Hunt ! Release 2.2.7 @@ -342,6 +1936,81 @@ $ /sales/customer_delivery.php # Missing border layout in report centre $ /reporting/includes/reports_classes.inc +---------- End of changes from main trunk 2.2.6-2.2.7 + +01-Mar-2010 Janusz Dobrowolski ++ Rewrite of FrontReport header API to accept externally defined headers in php and/or pdf form. +$ /reporting/includes/class.pdf.inc + /reporting/includes/excel_report.inc + /reporting/includes/header2.inc + /reporting/includes/pdf_report.inc ++ Integration of fpdi class +$ /reporting/includes/fpdi/* (new) + /reporting/forms (new) +! find_report_file() helper moved to main.inc and renamed to ind_custom_file +$ /reporting/prn_redirect.php + /includes/main.inc +! Reports fixed according to changes in header API in FrontReport class. +$ /reporting/rep101.php + /reporting/rep102.php + /reporting/rep103.php + /reporting/rep104.php + /reporting/rep105.php + /reporting/rep106.php + /reporting/rep107.php + /reporting/rep108.php + /reporting/rep109.php + /reporting/rep110.php + /reporting/rep111.php + /reporting/rep112.php + /reporting/rep201.php + /reporting/rep202.php + /reporting/rep203.php + /reporting/rep204.php + /reporting/rep209.php + /reporting/rep210.php + /reporting/rep301.php + /reporting/rep302.php + /reporting/rep303.php + /reporting/rep304.php + /reporting/rep305.php + /reporting/rep401.php + /reporting/rep409.php + /reporting/rep501.php + /reporting/rep601.php + /reporting/rep701.php + /reporting/rep702.php + /reporting/rep704.php + /reporting/rep705.php + /reporting/rep706.php + /reporting/rep707.php + /reporting/rep708.php + /reporting/rep709.php + /reporting/rep710.php + +25-Feb-2010 Janusz Dobrowolski +# Files manipulation helpers added +$ /includes/main.inc +# Cleanup +$ /includes/db/sql_functions.inc ++ Added radio buttons helper +$ /includes/ui/ui_input.inc +# Smaller fixes: lists reset after page reload, nonformatted description for edition, html cleanup +$ /includes/ui/ui_lists.inc +! Changed _vd debug function to notification type +$ /includes/ui/ui_view.inc +# Layout fix on final screen +$ /purchasing/po_entry_items.php +# Error message when no report file is found +$ /reporting/prn_redirect.php +# Code cleanup (missing $row declaration) +$ /reporting/includes/pdf_report.inc + +20-Feb-2010 Joe Hunt +# Wrong class parameter in Generqal Ledger Reports +$ /applications/generalledger.php + +16-Feb-2010 Merged changes from main trunk up to 2.2.6 as follows ------------------------------- Release 2.2.6 ---------------------------------- 16-Feb-2010 Joe Hunt ! Release 2.2.6 @@ -468,22 +2137,94 @@ $ /sales/includes/db/sales_delivery_db.inc # [0000200] stock_master material_cost incorrectly updated during GRN when price format uses thousands seperator. A couple of minor errors too. $ /purchasing/includes/db/grn_db.inc - /purchasing/includes/db/invoices_db.inc -# Exchange rate bug when searching a non existing customer -$ /includes/banking.inc + /purchasing/includes/db/invoices_db.inc +# Exchange rate bug when searching a non existing customer +$ /includes/banking.inc + +03-Feb-2010 Chaitanya/Joe ++ Added a Profit and Loss Drilldown page and changed menu link +$ /applications/generalledger.php + /gl/inquiry/profit_loss.php (New file) + /gl/inquiry/balance_sheet.php +! Better layout +$ /gl/inquiry/journal_inquiry.php + +02-Feb-2010 Chaitanya ++ Added memo search on journal inquires. +$ /gl/inquiry/journal_inquiry.php + +---------- End of changes from main trunk 2.2.5-2.2.6 + +09-Feb-2010 Janusz Dobrowolski ++ Improved multilevel database transaction support +$ /includes/errors.inc + /includes/db/connect_db.inc + /includes/db/sql_functions.inc + /sales/includes/cart_class.inc ++ Added Direct GRN and Direct Invoice in purchases module +$ /applications/suppliers.php + /includes/current_user.inc + /includes/ui/ui_lists.inc + /purchasing/po_entry_items.php + /purchasing/po_receive_items.php + /purchasing/includes/po_class.inc + /purchasing/includes/db/grn_db.inc + /purchasing/includes/db/invoice_db.inc + /purchasing/includes/db/po_db.inc + /purchasing/includes/ui/grn_ui.inc + /purchasing/includes/ui/po_ui.inc ++ Added invoice preselection option. +$ /purchasing/supplier_payment.php +! Optimized extensions related code. +$ /applications/application.php + /applications/customers.php + /applications/dimensions.php + /applications/generalledger.php + /applications/inventory.php + /applications/manufacturing.php + /applications/setup.php +! Cleanup +$ /purchasing/supplier_invoice.php + /sales/includes/ui/sales_order_ui.inc +# Typo +$ /sales/sales_order_entry.php + +05-Feb-2010 Janusz Dobrowolski ++ Multiply order items with the same stock_id (with warning), code cleanups +$ /purchasing/po_entry_items.php + /purchasing/includes/po_class.inc + /purchasing/includes/supp_trans_class.inc + /purchasing/includes/db/po_db.inc + /purchasing/includes/ui/po_ui.inc +# Fixed typo bugs +$ /purchasing/includes/db/grn_db.inc + /purchasing/includes/db/invoice_db.inc -03-Feb-2010 Chaitanya/Joe -+ Added a Profit and Loss Drilldown page and changed menu link -$ /applications/generalledger.php - /gl/inquiry/profit_loss.php (New file) - /gl/inquiry/balance_sheet.php -! Better layout -$ /gl/inquiry/journal_inquiry.php +04-Feb-2010 Joe Hunt +! Extended account id's to 15 chars. Changed account type to varchar(10) + and class id varchar(3). Ability to change account groups online. +$ /gl/manage/gl_account_classes.php + /gl/manage/gl_account_types.php + /gl/manage/gl_accounts.php + /gl/includes/db/gl_db_account_types.inc + /includes/ui/ui_lists.inc + /sql/alter2.3.sql + /sql/en_US-demo.sql + /sql/en_US-new.sql -02-Feb-2010 Chaitanya -+ Added memo search on journal inquires. -$ /gl/inquiry/journal_inquiry.php +03-Feb-2010 Janusz Dobrowolski +# Payment terms were not retrieved at invoice edit start. +$ /sales/customer_invoice.php +# Fixed item selector. +$ /inventory/prices.php + +02-Feb-2010 Janusz Dobrowolski +# Missing closing bracket +$ /sql/alter2.3.php +# Small fixes in sys_prefs update/retrieve +$ /admin/db/company_db.inc +02-Feb-2010 Merged changes from main trunk 2.2.4-2.2.5 as follows ------------------------------- Release 2.2.5 ---------------------------------- 02-Feb-2010 Joe Hunt ! Release 2.2.5 @@ -577,6 +2318,94 @@ $ /includes/db/manufacturing_db.inc # A back link was still in Bank Transfer. $ /gl/bank_transfer.php +---------- End of changes from main trunk 2.2.4-2.2.5 + +26-Jan-2010 Janusz Dobrowolski ++ Editable sales terms in sales orders and invoices, default terms from customer record. +$ /admin/db/company_db.inc + /includes/ui/ui_lists.inc + /reporting/rep102.php + /reporting/rep108.php + /sales/create_recurrent_invoices.php + /sales/customer_delivery.php + /sales/customer_invoice.php + /sales/sales_order_entry.php + /sales/includes/cart_class.inc + /sales/includes/sales_db.inc + /sales/includes/db/cust_trans_db.inc + /sales/includes/db/sales_credit_db.inc + /sales/includes/db/sales_delivery_db.inc + /sales/includes/db/sales_invoice_db.inc + /sales/includes/db/sales_order_db.inc + /sales/includes/ui/sales_order_ui.inc + /sales/manage/sales_points.php + /sql/alter2.3.php + /sql/alter2.3.sql + /sql/en_US-demo.sql + /sql/en_US-new.sql + +26-Jan-2010 Janusz Dobrowolski ++ Full support for items with editable descriptions in sales documents +$ /includes/ui/ui_lists.inc + /inventory/prices.php + /inventory/includes/db/items_db.inc + /inventory/manage/items.php + /js/inserts.js + /sales/customer_delivery.php + /sales/sales_order_entry.php + /sales/includes/cart_class.inc + /sales/includes/ui/sales_order_ui.inc + /sql/alter2.3.sql + /sql/en_US-demo.sql + /sql/en_US-new.sql +# Fixed warning in debug mode +$ /sales/inquiry/sales_deliveries_view.php + /sales/includes/db/cust_trans_db.inc + +23-Jan-2010 Janusz Dobrowolski ++ Improved locales checking +$ /includes/lang/gettext.php + /includes/lang/language.php ++ Defaults for get_post also for array submits, added confirm dialog helper +$ /includes/ui/ui_controls.inc ++ Added info label in error_log for warnings during upgrade process +$ /includes/errors.inc +! System preferences moved from company to new sys_prefs table +$ /admin/company_preferences.php + /admin/display_prefs.php + /admin/gl_setup.php + /admin/users.php + /admin/db/company_db.inc + /admin/db/users_db.inc + /includes/current_user.inc + /includes/session.inc + /includes/prefs/sysprefs.inc + /includes/prefs/userprefs.inc + /sql/alter2.1.php + /sql/alter2.3.php + /sql/alter2.3.sql + /sql/en_US-demo.sql + /sql/en_US-new.sql + /install/save.php +! Updated locales and database/src compatibility checks +$ /admin/system_diagnostics.php +! Added core version for checks against database version_id +$ /config.default.php +! System setup re-read after upgrade +$ /admin/inst_upgrade.php +! Cached company currency retrieval +$ /includes/banking.inc +! Removed sysprefs.inc include +$ /includes/main.inc +# Removed archaic error handling +$ /includes/date_functions.inc +# Missing path_to_root declaration in handle_submit(). +$ /admin/create_coy.php +# Message box cleanup before ajax call +$ /js/utils.js + +20-Jan-2010 Merged changes from main trunk 2.2.3-2.2.4 as follows + ------------------------------- Release 2.2.4 ---------------------------------- 17-Jan-2010 Joe Hunt ! Release 2.2.4 @@ -632,6 +2461,16 @@ $ /gl/manage/gl_account_types.php # Fixed buggy exemptions display $ /taxes/item_tax_types.php +---------- End of changes from main trunk 2.2.3-2.2.4 + +12-Jan-2010 Janusz Dobrowolski +! Added sorting by branch_ref +$ /sales/includes/db/branches_db.inc +# Fixed misnamed function parameter. + /sales/includes/db/cust_trans_db.inc + /sales/inquiry/sales_deliveries_view.php + +12-Jan-2010 Merged changes from main trunk 2.2.2-2.2.3 as follows ------------------------------- Release 2.2.3 ---------------------------------- 12-Jan-2010 Joe Hunt ! Release 2.2.3 @@ -720,11 +2559,54 @@ $ /taxes/db/tax_groups_db.inc $ /gl/manage/bank_accounts.php /gl/includes/db/gl_db_banking.inc +---------- End of changes from main trunk 2.2.2-2.2.3 + +11-Jan-2010 Janusz Dobrowolski +! Optimized database indexes. +$ /sql/alter2.3.sql + /sql/en_US-demo.sql + /sql/en_US-new.sql + +27-Dec-2009 Janusz Dobrowolski ++ Remote packages repository support for extensions and languages +$ /config.default.php + /frontaccounting.php + /admin/inst_lang.php + /admin/inst_module.php + /includes/access_levels.inc + /includes/ui/ui_lists.inc + /sql/alter2.3.php +# Small fix in handle_submit +$ /admin/create_coy.php +! Using var_dump function for storing variables in config files. +$ /admin/db/maintenance_db.inc ++ Added copy_file(), check_write() helper functions. +$ /includes/main.inc ++ Aded array_search_key() helper. +$ /includes/lang/gettext.php ++ Added helper for checking langauge support. +$ /includes/current_user.inc ++ Added helper for radio buttons. +$ /includes/ui/ui_input.inc +! Extension links support moved to application class. +$ /applications/application.php + /applications/customers.php + /applications/dimensions.php + /applications/generalledger.php + /applications/inventory.php + /applications/manufacturing.php + /applications/setup.php + /applications/suppliers.php + /includes/archive.inc (new) + /includes/packages.inc (new) ++ Support for popup buttons +$ /js/inserts.js + +24-Dec-2009 Merged changes from main trunk 2.2.1-2.2.2 as follows ------------------------------- Release 2.2.2 ---------------------------------- 23-Dec-2009 Joe Hunt ! Release 2.2.2 -$ /config.default.php - /update.html +$ /update.html ! Changed so Printed Sales Order (Quotation) shows TOTAL VAT INCL. if it is. $ /reporting/rep109.php /reporting/rep111.php @@ -823,9 +2705,125 @@ $ /includes/date_functions.inc # Fixed bug [0000178] data error in supplier allocations $ /includes/ui/allocation_cart.inc -------------------------------- Release 2.2.1 ---------------------------------- +---------- End of changes from main trunk 2.2.1-2.2.2 + +10-Dec-2009 Joe Hunt ++ Enhanced Quick Entries to also support Balance Based source amount. Monthly or Yearly (all) + Only works with type Journal Entry. +$ /gl/manage/gl_quick_entries.php + /gl/includes/ui/gl_journal_ui.inc + /includes/ui/ui_view.inc + /sql/alter2.3.sql + /sql/en_US-new.sql + /sql/en_US-demo.sql + . +05-Dec-2009 Joe Hunt +! Moved all SQL statements from PHP files into relevant *_db.inc files. + All folders done, except reporting/repXXX.php and reporting/includes/reports_classes.inc + Awaiting change in report mechanism +$ /includes/ui/allocation_cart.inc + /reporting/includes/header2.inc + /reporting/includes/reports_classes.inc (partly) + /sales/create_recurrent_invoices.php + /sales/customer_payments.php + /sales/allocations/customer_allocate.php + /sales/includes/sales_db.inc + /sales/includes/db/branches_db.inc + /sales/includes/db/custalloc_db.inc + /sales/includes/db/customers_db.inc + /sales/includes/db/cust_trans_db.inc + /sales/includes/db/recurrent_invoices_db.inc (new file) + /sales/includes/db/sales_groups_db.inc (new file) + /sales/includes/db/sales_order_db.inc + /sales/inquiry/customer_allocation_inquiry.php + /sales/inquiry/customer_inquiry.php + /sales/inquiry/sales_deliveries_view.php + /sales/inquiry/sales_orders_view.php + /sales/manage/credit_status.php + /sales/manage/customers.php + /sales/manage/customer_branches.php + /sales/manage/recurrent_invoices.php + /sales/manage/sales_areas.php + /sales/manage/sales_groups.php + /sales/manage/sales_people.php + /sales/manage/sales_points.php + /sales/manage/sales_types.php + /sales/view/view_sales_order.php + /taxes/item_tax_types.php + /taxes/tax_groups.php + /taxes/tax_types.php + /taxes/db/tax_types_db.inc + +04-Dec-2009 Janusz Dobrowolski ++ Next release upgrade skeleton files. +$ /sql/alter2.3.php (new) + /sql/alter2.3.sql (new) + +04-Dec-2009 Tom Hallman +# Added key on type, id in comments to improve performance +$ /sql/en_US-demo.sql + /sql/en_US-new.sql + +04-Dec-2009 Joe Hunt +! Moved all SQL statements from PHP files into relevant *_db.inc files. + Included purchasing folder +$ /includes/db/manufacturing_db.inc + /manufacturing/search_work_orders.php + /manufacturing/work_order_costs.php + /manufacturing/includes/db/work_orders_db.inc + /manufacturing/inquiry/where_used_inquiry.php + /manufacturing/manage/bom_edit.php + /manufacturing/manage/work_centres.php + /purchasing/po_entry_items.php + /purchasing/supplier_credit.php + /purchasing/supplier_invoice.php + /purchasing/includes/db/invoice_db.inc + /purchasing/includes/db/po_db.inc + /purchasing/includes/db/suppalloc_db.inc + /purchasing/includes/db/supp_trans_db.inc + /purchasing/inquiry/po_search.php + /purchasing/inquiry/po_search_completed.php + /purchasing/inquiry/supplier_allocations_inquiry.php + /purchasing/inquiry/supplier_inquiry.php + /purchasing/manage/suppliers.php + +03-Dec-2009 Joe Hunt +! Moved all SQL statements from PHP files into relevant *_db.inc files. + Included inventory folder +$ /admin/payment_terms.php + /admin/printers.php + /admin/print_profiles.php + /admin/shipping_companies.php + /admin/db/company_db.inc + /admin/db/printers_db.inc + /admin/db/shipping_db.inc + /dimensions/includes/dimens_db.inc + /gl/gl_bank.php + /gl/includes/db/gl_db_accounts.inc + /gl/includes/db/gl_db_account_types.inc + /gl/includes/db/gl_db_bank_accounts.inc + /gl/includes/db/gl_db_curriencies.inc + /gl/manage/bank_accounts.php + /gl/manage/currencies.php + /gl/manage/gl_accounts.php + /gl/manage/gl_account_classes.php + /gl/manage/gl_account_types.php + /inventory/purchasing_data.php + /inventory/includes/inventory_db.inc + /inventory/includes/db/items_category_db.inc + /inventory/includes/db/items_db.inc + /inventory/includes/db/items_locations_db.inc + /inventory/includes/db/items_purchases_db.inc (New file) + /inventory/includes/db/movement_types_db.inc + /inventory/inquiry/stock_movements.php + /inventory/manage/items_php + /inventory/manage/item_categories.php + /inventory/manage/locations.php + /inventory/manage/movement_types.php + 02-Dec-2009 Janusz Dobrowolski -# Fixed insert null data values for bank_trans +! Merged changed from trunk up to 2.2.1 --------------------------------------- + $ /sql/en_US-demo.sql # Fixed to store default null values on export $ /admin/db/maintenance_db.inc @@ -837,8 +2835,6 @@ $ /admin/display_prefs.php # Fixed view/download backup $ /admin/backups.php -02-Dec-2009 Joe Hunt -! Release 2.2.1 $ config.default.php /lang/new_language_template/LC_MESSAGES/empty.po /lang/en_US/LC_MESSAGES/en_US.mo @@ -855,7 +2851,6 @@ $ /includes/errors.inc ! Next transaction numbers retrieved from transaction table instead of sys_types $ /includes/systypes.inc - 29-Nov-2009 Janusz Dobrowolski # Fixed change of language in display preferences. Removed sparse $_SESSION['languages'] variable $ /includes/lang/language.php @@ -885,8 +2880,57 @@ $ /includes/ui/allocation_cart.inc ! Fixed type constant usage. $ /purchasing/includes/db/supp_trans_db.inc +-------------- + +01-Dec-2009 Joe Hunt +! Moved all SQL statements from PHP files into relevant *_db.inc files. + included gl folder +$ /dimensions/includes/dimensions_db.inc + /dimensions/includes/dimensions_ui.inc + /dimensions/inquiry/search_dimensions.php + /gl/bank_account_reconcile.pph + /gl/gl_budget.php + /gl/includes/db/gl_db_accounts.inc + /gl/includes/db/gl_db_account_types.inc + /gl/includes/db/gl_db_bank_accounts.inc + /gl/includes/db/gl_db_bank_trans.inc + /gl/includes/db/gl_db_currencies.inc + /gl/includes/db/gl_db_rates.inc + /gl/includes/db/gl_db_trans.inc + /gl/inquiry/bank_inquiry.php + /gl/inquiry/journal_inquiry.php + /gl/manage/bank_accounts.php + /gl/manage/currencies.php + /gl/manage/exchange_rates.php + /gl/manage/gl_accounts.php + /gl/manage/gl_account_classes.php + /gl/manage/gl_account_types.php + /gl/view/gl_trans_view.php + +30-Nov-2009 Joe Hunt +! Moved all SQL statements from PHP files into relevant *_db.inc files. + admin folder +$ /admin/attachments.php + /admin/create_coy.php + /admin/fiscalyears.php + /admin/gl_setup.php + /admin/payment_terms.php + /admin/printers.php + /admin/shipping_companies.php + /admin/view_print_transaction.php + /admin/db/attachments_db.inc (New file) + /admin/db/company_db.inc + /admin/db/fiscalyears_db.inc (New file) + /admin/db/maintenance_db.inc + /admin/db/printers_db.inc + /admin/db/shipping_db.inc (New file) + /admin/db/transactions_db.inc (New file) + /includes/date_functions.inc + /reporting/includes/excel_report.inc + /reporting/includes/pdf_report.inc + ------------------------------- Release 2.2 ---------------------------------- -18-Nov-2009 +18-Nov-2009 Joe Hunt ! Release 2.2 $ config.default.php # Allow null references in trans to show up in gl_trans_view diff --git a/FA.pem b/FA.pem new file mode 100644 index 00000000..b51aae2f --- /dev/null +++ b/FA.pem @@ -0,0 +1,17 @@ +-----BEGIN CERTIFICATE----- +MIICyzCCAjSgAwIBAgIJAPmoLn2B45+EMA0GCSqGSIb3DQEBBQUAME4xCzAJBgNV +BAYTAlVTMREwDwYDVQQIEwhEZWxhd2FyZTEOMAwGA1UEBxMFRG92ZXIxHDAaBgNV +BAMTE2Zyb250YWNjb3VudGluZy5uZXQwHhcNMDkxMTE2MTIxNjEwWhcNMTAxMTE2 +MTIxNjEwWjBOMQswCQYDVQQGEwJVUzERMA8GA1UECBMIRGVsYXdhcmUxDjAMBgNV +BAcTBURvdmVyMRwwGgYDVQQDExNmcm9udGFjY291bnRpbmcubmV0MIGfMA0GCSqG +SIb3DQEBAQUAA4GNADCBiQKBgQDm9BbI0KCUrzOQPtZkNpI0mBvnSIjgIAIZXPgB +UQYqRpNihfrA3eIkpH87X6/zPEmoZXIDrzlXFYzLRvlMwHOnPbVeR0Z3HTT4AYYU ++lcL0l4vIJfaNbRjGXSJ8w/FDc4XOMBU5ut5+zPJmwrqmJsyMcIkN0JX8/5g4+lk +xTnpIQIDAQABo4GwMIGtMB0GA1UdDgQWBBRzT6vxvlhlrXDXTT/WEBZA7k8xMjB+ +BgNVHSMEdzB1gBRzT6vxvlhlrXDXTT/WEBZA7k8xMqFSpFAwTjELMAkGA1UEBhMC +VVMxETAPBgNVBAgTCERlbGF3YXJlMQ4wDAYDVQQHEwVEb3ZlcjEcMBoGA1UEAxMT +ZnJvbnRhY2NvdW50aW5nLm5ldIIJAPmoLn2B45+EMAwGA1UdEwQFMAMBAf8wDQYJ +KoZIhvcNAQEFBQADgYEA4CJMjO0lR5Vsz3N64MBSMpZKw2XgmZDFgMOORiJ9btJA +EAnc5mYYsCmZFlXVp1XOj3hcoggrMPmgyLLbagAz5NW2wgEg4xzyE9PhWDJptkww +oW+J9NyESy8pIsZG/FH0FgoFYshrRRGaK0pImNOSj5HUThfBJLJpLbkm2J1aHag= +-----END CERTIFICATE----- diff --git a/access/login.php b/access/login.php index 0c77bc80..c60819a9 100644 --- a/access/login.php +++ b/access/login.php @@ -66,7 +66,7 @@ function set_fullmode() { div_start('_page_body'); br();br(); start_form(false, false, $_SESSION['timeout']['uri'], "loginform"); - start_table("class='login'"); + start_table(false, "class='login'"); start_row(); echo ""; if (!$login_timeout) { // FA logo diff --git a/admin/attachments.php b/admin/attachments.php index 4d75a508..1ad50d69 100644 --- a/admin/attachments.php +++ b/admin/attachments.php @@ -17,11 +17,12 @@ include_once($path_to_root . "/includes/session.inc"); 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/attachments_db.inc"); if (isset($_GET['vw'])) $view_id = $_GET['vw']; else -$view_id = find_submit('view'); + $view_id = find_submit('view'); if ($view_id != -1) { $row = get_attachment($view_id); @@ -33,11 +34,11 @@ if ($view_id != -1) $type = ($row['filetype']) ? $row['filetype'] : 'application/octet-stream'; header("Content-type: ".$type); header('Content-Length: '.$row['filesize']); - if ($type == 'application/octet-stream') - header('Content-Disposition: attachment; filename='.$row['filename']); - else + //if ($type == 'application/octet-stream') + // header('Content-Disposition: attachment; filename='.$row['filename']); + //else header("Content-Disposition: inline"); - echo file_get_contents($comp_path."/".user_company(). "/attachments/".$row['unique_name']); + echo file_get_contents(company_path(). "/attachments/".$row['unique_name']); exit(); } } @@ -59,7 +60,7 @@ if ($download_id != -1) header("Content-type: ".$type); header('Content-Length: '.$row['filesize']); header('Content-Disposition: attachment; filename='.$row['filename']); - echo file_get_contents($comp_path."/".user_company(). "/attachments/".$row['unique_name']); + echo file_get_contents(company_path()."/attachments/".$row['unique_name']); exit(); } } @@ -84,7 +85,7 @@ if ($Mode == 'ADD_ITEM' || $Mode == 'UPDATE_ITEM') //$content = base64_encode(file_get_contents($_FILES['filename']['tmp_name'])); $tmpname = $_FILES['filename']['tmp_name']; - $dir = $comp_path."/".user_company(). "/attachments"; + $dir = company_path()."/attachments"; if (!file_exists($dir)) { mkdir ($dir,0777); @@ -93,13 +94,16 @@ if ($Mode == 'ADD_ITEM' || $Mode == 'UPDATE_ITEM') fwrite($fp, $index_file); fclose($fp); } - if ($Mode == 'UPDATE_ITEM' && file_exists($dir."/".$_POST['unique_name'])) - unlink($dir."/".$_POST['unique_name']); + // file name compatible with POSIX + // protect against directory traversal + $unique_name = preg_replace('/[^a-zA-Z0-9.\-_]/', '', $_POST['unique_name']); + if ($Mode == 'UPDATE_ITEM' && file_exists($dir."/".$unique_name)) + unlink($dir."/".$unique_name); $unique_name = uniqid(''); move_uploaded_file($tmpname, $dir."/".$unique_name); //save the file - $filename = $_FILES['filename']['name']; + $filename = basename($_FILES['filename']['name']); $filesize = $_FILES['filename']['size']; $filetype = $_FILES['filename']['type']; } @@ -108,32 +112,16 @@ if ($Mode == 'ADD_ITEM' || $Mode == 'UPDATE_ITEM') $unique_name = $filename = $filetype = ""; $filesize = 0; } - $date = date2sql(Today()); if ($Mode == 'ADD_ITEM') { - $sql = "INSERT INTO ".TB_PREF."attachments (type_no, trans_no, description, filename, unique_name, - filesize, filetype, tran_date) VALUES (".db_escape($_POST['filterType'])."," - .db_escape($_POST['trans_no']).",".db_escape($_POST['description']).", " - .db_escape($filename).", ".db_escape($unique_name).", ".db_escape($filesize) - .", ".db_escape($filetype).", '$date')"; - db_query($sql, "Attachment could not be inserted"); + add_attachment($_POST['filterType'], $_POST['trans_no'], $_POST['description'], + $filename, $unique_name, $filesize, $filetype); display_notification(_("Attachment has been inserted.")); } else { - $sql = "UPDATE ".TB_PREF."attachments SET - type_no=".db_escape($_POST['filterType']).", - trans_no=".db_escape($_POST['trans_no']).", - description=".db_escape($_POST['description']).", "; - if ($filename != "") - { - $sql .= "filename=".db_escape($filename).", - unique_name=".db_escape($unique_name).", - filesize=".db_escape($filesize).", - filetype=".db_escape($filetype); - } - $sql .= "tran_date='$date' WHERE id=".db_escape($selected_id); - db_query($sql, "Attachment could not be updated"); + update_attachment($selected_id, $_POST['filterType'], $_POST['trans_no'], $_POST['description'], + $filename, $unique_name, $filesize, $filetype); display_notification(_("Attachment has been updated.")); } $Mode = 'RESET'; @@ -142,11 +130,10 @@ if ($Mode == 'ADD_ITEM' || $Mode == 'UPDATE_ITEM') if ($Mode == 'Delete') { $row = get_attachment($selected_id); - $dir = $comp_path."/".user_company(). "/attachments"; + $dir = company_path()."/attachments"; if (file_exists($dir."/".$row['unique_name'])) unlink($dir."/".$row['unique_name']); - $sql = "DELETE FROM ".TB_PREF."attachments WHERE id = ".db_escape($selected_id); - db_query($sql, "Could not delete attachment"); + delete_attachment($selected_id); display_notification(_("Attachment has been deleted.")); $Mode = 'RESET'; } @@ -160,43 +147,26 @@ if ($Mode == 'RESET') function viewing_controls() { - start_form(); - - start_table("class='tablestyle_noborder'"); + global $selected_id; + + start_table(TABLESTYLE_NOBORDER); - systypes_list_row(_("Type:"), 'filterType', null, true); + start_row(); + systypes_list_cells(_("Type:"), 'filterType', null, true); + if (list_updated('filterType')) + $selected_id = -1;; + end_row(); end_table(1); - end_form(); -} - -//---------------------------------------------------------------------------------------- - -function get_attached_documents($type) -{ - $sql = "SELECT * FROM ".TB_PREF."attachments WHERE type_no=".db_escape($type) - ." ORDER BY trans_no"; - return db_query($sql, "Could not retrieve attachments"); -} - -function get_attachment($id) -{ - $sql = "SELECT * FROM ".TB_PREF."attachments WHERE id=".db_escape($id); - $result = db_query($sql, "Could not retrieve attachments"); - return db_fetch($result); } function display_rows($type) { - global $table_style; - $rows = get_attached_documents($type); $th = array(_("#"), _("Description"), _("Filename"), _("Size"), _("Filetype"), _("Date Uploaded"), "", "", "", ""); - div_start('transactions'); - start_form(); - start_table($table_style); + start_table(TABLESTYLE); table_header($th); $k = 0; while ($row = db_fetch($rows)) @@ -216,21 +186,18 @@ function display_rows($type) end_row(); } end_table(1); - hidden('filterType', $type); - end_form(); - div_end(); } //---------------------------------------------------------------------------------------- +start_form(true); + viewing_controls(); -if (isset($_POST['filterType'])) - display_rows($_POST['filterType']); +display_rows($_POST['filterType']); -start_form(true); -start_table($table_style2); +start_table(TABLESTYLE2); if ($selected_id != -1) { @@ -251,8 +218,6 @@ text_row_ex(_("Description").':', 'description', 40); file_row(_("Attached File") . ":", 'filename', 'filename'); end_table(1); -if (isset($_POST['filterType'])) - hidden('filterType', $_POST['filterType']); submit_add_or_update_center($selected_id == -1, '', 'both'); diff --git a/admin/backups.php b/admin/backups.php index 9f6efa55..2193486b 100644 --- a/admin/backups.php +++ b/admin/backups.php @@ -20,20 +20,20 @@ if (get_post('view')) { if (!get_post('backups')) { display_error(_('Select backup file first.')); } else { - $filename = BACKUP_PATH . get_post('backups'); + $filename = BACKUP_PATH . clean_file_name(get_post('backups')); if (in_ajax()) $Ajax->popup( $filename ); else { - header('Content-type: application/octet-stream'); + header('Content-type: text/plain'); header('Content-Length: '.filesize($filename)); - header("Content-Disposition: inline; filename=$filename"); + header("Content-Disposition: inline"); readfile($filename); exit(); } } }; if (get_post('download')) { - download_file(BACKUP_PATH . get_post('backups')); + download_file(BACKUP_PATH . clean_file_name(get_post('backups'))); exit; } @@ -122,6 +122,8 @@ function download_file($filename) $db_name = $_SESSION["wa_current_user"]->company; $conn = $db_connections[$db_name]; +$backup_name = clean_file_name(get_post('backups')); +$backup_path = BACKUP_PATH . $backup_name; if (get_post('creat')) { generate_backup($conn, get_post('comp'), get_post('comments')); @@ -129,26 +131,27 @@ if (get_post('creat')) { }; if (get_post('restore')) { - if (db_import(BACKUP_PATH . get_post('backups'), $conn)) + if (db_import($backup_path, $conn)) display_notification(_("Restore backup completed.")); + refresh_sys_prefs(); // re-read system setup } if (get_post('deldump')) { - if (unlink(BACKUP_PATH . get_post('backups'))) { + if (unlink($backup_path)) { display_notification(_("File successfully deleted.")." " - . _("Filename") . ": " . get_post('backups')); + . _("Filename") . ": " . $backup_name); $Ajax->activate('backups'); } else display_error(_("Can't delete backup file.")); -}; +} if (get_post('upload')) { $tmpname = $_FILES['uploadfile']['tmp_name']; - $fname = $_FILES['uploadfile']['name']; + $fname = trim(basename($_FILES['uploadfile']['name'])); - if (!preg_match("/.sql(.zip|.gz)?$/", $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); @@ -159,7 +162,7 @@ if (get_post('upload')) } //------------------------------------------------------------------------------- start_form(true, true); -start_outer_table($table_style2); +start_outer_table(TABLESTYLE2); table_section(1); table_section_title(_("Create backup")); textarea_row(_("Comments:"), 'comments', null, 30, 8); @@ -173,7 +176,7 @@ table_section_title(_("Backup scripts maintenance")); echo "".get_backup_file_combo().""; echo ""; start_table(); - submit_row('view',_("View Backup"), false, '', '', true); + submit_row('view',_("View Backup"), false, '', '', false); submit_row('download',_("Download Backup"), false, '', '', false); submit_row('restore',_("Restore Backup"), false, '','', 'process'); submit_js_confirm('restore',_("You are about to restore database from backup file.\nDo you want to continue?")); diff --git a/admin/change_current_user_password.php b/admin/change_current_user_password.php index 29112d03..247517a2 100644 --- a/admin/change_current_user_password.php +++ b/admin/change_current_user_password.php @@ -66,7 +66,7 @@ if (isset($_POST['UPDATE_ITEM'])) start_form(); -start_table($table_style); +start_table(TABLESTYLE); $myrow = get_user($_SESSION["wa_current_user"]->user); diff --git a/admin/company_preferences.php b/admin/company_preferences.php index 9cf0a3a4..d944fefb 100644 --- a/admin/company_preferences.php +++ b/admin/company_preferences.php @@ -40,18 +40,16 @@ if (isset($_POST['update']) && $_POST['update'] != "") } if (isset($_FILES['pic']) && $_FILES['pic']['name'] != '') { - $user_comp = user_company(); $result = $_FILES['pic']['error']; - $filename = $comp_path . "/$user_comp/images"; + $filename = company_path()."/images"; if (!file_exists($filename)) { mkdir($filename); } - $filename .= "/".$_FILES['pic']['name']; + $filename .= "/".clean_file_name($_FILES['pic']['name']); //But check for the worst - if (!in_array((substr(trim($_FILES['pic']['name']),-3)), - array('jpg','JPG','png','PNG'))) + if (!in_array( substr($filename,-3), array('jpg','JPG','png','PNG'))) { display_error(_('Only jpg and png files are supported - a file extension of .jpg or .png is expected')); $input_error = 1; @@ -79,15 +77,14 @@ if (isset($_POST['update']) && $_POST['update'] != "") if ($input_error != 1) { $result = move_uploaded_file($_FILES['pic']['tmp_name'], $filename); - $_POST['coy_logo'] = $_FILES['pic']['name']; + $_POST['coy_logo'] = clean_file_name($_FILES['pic']['name']); if(!$result) display_error(_('Error uploading logo file')); } } if (check_value('del_coy_logo')) { - $user_comp = user_company(); - $filename = $comp_path . "/$user_comp/images/".$_POST['coy_logo']; + $filename = company_path()."/images/".clean_file_name($_POST['coy_logo']); if (file_exists($filename)) { $result = unlink($filename); @@ -106,15 +103,15 @@ if (isset($_POST['update']) && $_POST['update'] != "") $_POST['round_to'] = 1; if ($input_error != 1) { - update_company_setup($_POST['coy_name'], $_POST['coy_no'], - $_POST['gst_no'], $_POST['tax_prd'], $_POST['tax_last'], - $_POST['postal_address'], $_POST['phone'], $_POST['fax'], - $_POST['email'], $_POST['coy_logo'], $_POST['domicile'], - $_POST['use_dimension'], $_POST['curr_default'], $_POST['f_year'], - check_value('no_item_list'), check_value('no_customer_list'), - check_value('no_supplier_list'), $_POST['base_sales'], - check_value('time_zone'), $_POST['add_pct'], $_POST['round_to'], - $_POST['login_tout']); + update_company_prefs( + get_post( array('coy_name','coy_no','gst_no','tax_prd','tax_last', + 'postal_address','phone', 'fax', 'email', 'coy_logo', 'domicile', + 'use_dimension', 'curr_default', 'f_year', + 'no_item_list' => 0, 'no_customer_list' => 0, + 'no_supplier_list' =>0, 'base_sales', + 'time_zone' => 0, 'add_pct', 'round_to', 'login_tout', 'auto_curr_reval')) + ); + $_SESSION['wa_current_user']->timeout = $_POST['login_tout']; display_notification_centered(_("Company setup has been updated.")); } @@ -153,9 +150,10 @@ $_POST['login_tout'] = $myrow['login_tout']; if ($_POST['add_pct'] == -1) $_POST['add_pct'] = ""; $_POST['round_to'] = $myrow['round_to']; +$_POST['auto_curr_reval'] = $myrow['auto_curr_reval']; $_POST['del_coy_logo'] = 0; -start_outer_table($table_style2); +start_outer_table(TABLESTYLE2); table_section(1); @@ -172,12 +170,11 @@ text_row_ex(_("GSTNo:"), 'gst_no', 25); currencies_list_row(_("Home Currency:"), 'curr_default', $_POST['curr_default']); fiscalyears_list_row(_("Fiscal Year:"), 'f_year', $_POST['f_year']); - -table_section(2); - text_row_ex(_("Tax Periods:"), 'tax_prd', 10, 10, '', null, null, _('Months.')); text_row_ex(_("Tax Last Period:"), 'tax_last', 10, 10, '', null, null, _('Months back.')); +table_section(2); + label_row(_("Company Logo:"), $_POST['coy_logo']); file_row(_("New Company Logo (.jpg)") . ":", 'pic', 'pic'); check_row(_("Delete Company Logo:"), 'del_coy_logo', $_POST['del_coy_logo']); @@ -188,11 +185,13 @@ sales_types_list_row(_("Base for auto price calculations:"), 'base_sales', $_POS text_row_ex(_("Add Price from Std Cost:"), 'add_pct', 10, 10, '', null, null, "%"); $curr = get_currency($_POST['curr_default']); text_row_ex(_("Round to nearest:"), 'round_to', 10, 10, '', null, null, $curr['hundreds_name']); +label_row("", " "); check_row(_("Search Item List"), 'no_item_list', null); check_row(_("Search Customer List"), 'no_customer_list', null); check_row(_("Search Supplier List"), 'no_supplier_list', null); label_row("", " "); +check_row(_("Automatic Revaluation Currency Accounts"), 'auto_curr_reval', $_POST['auto_curr_reval']); check_row(_("Time Zone on Reports"), 'time_zone', $_POST['time_zone']); text_row_ex(_("Login Timeout:"), 'login_tout', 10, 10, '', null, null, _('seconds')); label_row(_("Version Id"), $_POST['version_id']); diff --git a/admin/create_coy.php b/admin/create_coy.php index 7e3dcf3d..21861a0f 100644 --- a/admin/create_coy.php +++ b/admin/create_coy.php @@ -42,11 +42,7 @@ function check_data() if ($_POST['name'] == "" || $_POST['host'] == "" || $_POST['dbuser'] == "" || $_POST['dbname'] == "") return false; - if ($selected_id == -1 && (!isset($_GET['ul']) || $_GET['ul'] != 1)) - { - display_error(_("When creating a new company, you must provide a Database script file.")); - return false; - } + foreach($db_connections as $id=>$con) { if($id != $selected_id && $_POST['host'] == $con['host'] @@ -85,75 +81,52 @@ function remove_connection($id) { function handle_submit() { global $db_connections, $def_coy, $tb_pref_counter, $db, - $comp_path, $comp_subdirs, $path_to_root; + $comp_subdirs, $path_to_root, $selected_id; $error = false; if (!check_data()) return false; - $id = $_GET['id']; - $new = !isset($db_connections[$id]); - - $db_connections[$id]['name'] = $_POST['name']; - $db_connections[$id]['host'] = $_POST['host']; - $db_connections[$id]['dbuser'] = $_POST['dbuser']; - $db_connections[$id]['dbpassword'] = $_POST['dbpassword']; - $db_connections[$id]['dbname'] = $_POST['dbname']; - if (isset($_GET['ul']) && $_GET['ul'] == 1) + if ($selected_id==-1) + $selected_id = count($db_connections); + + $new = !isset($db_connections[$selected_id]); + + $db_connections[$selected_id]['name'] = $_POST['name']; + $db_connections[$selected_id]['host'] = $_POST['host']; + $db_connections[$selected_id]['dbuser'] = $_POST['dbuser']; + $db_connections[$selected_id]['dbpassword'] = $_POST['dbpassword']; + $db_connections[$selected_id]['dbname'] = $_POST['dbname']; + if (is_numeric($_POST['tbpref'])) { - if (is_numeric($_POST['tbpref'])) - { - $db_connections[$id]['tbpref'] = $_POST['tbpref'] == 1 ? - $tb_pref_counter."_" : ''; - } - else if ($_POST['tbpref'] != "") - $db_connections[$id]['tbpref'] = $_POST['tbpref']; - else - $db_connections[$id]['tbpref'] = ""; + $db_connections[$selected_id]['tbpref'] = $_POST['tbpref'] == 1 ? + $tb_pref_counter."_" : ''; } + else if ($_POST['tbpref'] != "") + $db_connections[$selected_id]['tbpref'] = $_POST['tbpref']; + else + $db_connections[$selected_id]['tbpref'] = ""; + if ((bool)$_POST['def'] == true) - $def_coy = $id; - if (isset($_GET['ul']) && $_GET['ul'] == 1) - { - $conn = $db_connections[$id]; - if (($db = db_create_db($conn)) == 0) - { - display_error(_("Error creating Database: ") . $conn['dbname'] . _(", Please create it manually")); - $error = true; - } else { + $def_coy = $selected_id; - $filename = $_FILES['uploadfile']['tmp_name']; - if (is_uploaded_file ($filename)) - { - if (!db_import($filename, $conn, $id)) { - display_error(_('Cannot create new company due to bugs in sql file.')); - $error = true; - } else - if (isset($_POST['admpassword']) && $_POST['admpassword'] != "") - db_query("UPDATE ".$conn['tbpref']."users set password = '".md5($_POST['admpassword']). "' WHERE user_id = 'admin'"); - } - else - { - display_error(_("Error uploading Database Script, please upload it manually")); - $error = true; - } - } - set_global_connection(); - if ($error) { - remove_connection($id); - return false; - } + $conn = $db_connections[$selected_id]; + if (($db = db_create_db($conn)) == 0) + { + display_error(_("Error creating Database: ") . $conn['dbname'] . _(", Please create it manually")); + $error = true; } else { - if ($_GET['c'] = 'u') { - $conn = $db_connections[$id]; - if (($db = db_create_db($conn)) == 0) - { - display_error(_("Error connecting to Database: ") . $conn['dbname'] . _(", Please correct it")); - $error = true; - } elseif ($_POST['admpassword'] != "") { - db_query("UPDATE ".$conn['tbpref']."users set password = '".md5($_POST['admpassword']). "' WHERE user_id = 'admin'"); - } - } + if (!db_import($path_to_root.'/sql/'.get_post('coa'), $conn, $selected_id)) { + display_error(_('Cannot create new company due to bugs in sql file.')); + $error = true; + } else + if (isset($_POST['admpassword']) && $_POST['admpassword'] != "") + update_admin_password($conn, md5($_POST['admpassword'])); + } + set_global_connection(); + if ($error) { + remove_connection($selected_id); + return false; } $error = write_config_db($new); if ($error == -1) @@ -169,10 +142,10 @@ function handle_submit() if ($new) { - create_comp_dirs("$comp_path/$id", $comp_subdirs); + create_comp_dirs(company_path($selected_id), $comp_subdirs); } $exts = get_company_extensions(); - write_extensions($exts, $id); + write_extensions($exts, $selected_id); display_notification($new ? _('New company has been created.') : _('Company has been updated.')); return true; } @@ -181,14 +154,15 @@ function handle_submit() function handle_delete() { - global $comp_path, $def_coy, $db_connections, $comp_subdirs, $path_to_root; + global $def_coy, $db_connections, $comp_subdirs, $path_to_root; $id = $_GET['id']; // First make sure all company directories from the one under removal are writable. // Without this after operation we end up with changed per-company owners! for($i = $id; $i < count($db_connections); $i++) { - if (!is_dir($comp_path.'/'.$i) || !is_writable($comp_path.'/'.$i)) { + $comp_path = company_path($i); + if (!is_dir($comp_path) || !is_writable($comp_path)) { display_error(_('Broken company subdirectories system. You have to remove this company manually.')); return; } @@ -202,15 +176,15 @@ function handle_delete() // rename directory to temporary name to ensure all // other subdirectories will have right owners even after // unsuccessfull removal. - $cdir = $comp_path.'/'.$id; - $tmpname = $comp_path.'/old_'.$id; + $cdir = company_path($id); + $tmpname = company_path('/old_'.$id); if (!@rename($cdir, $tmpname)) { display_error(_('Cannot rename subdirectory to temporary name.')); return; } // 'shift' company directories names for ($i = $id+1; $i < count($db_connections); $i++) { - if (!rename($comp_path.'/'.$i, $comp_path.'/'.($i-1))) { + if (!rename(company_path($i), company_path($i-1))) { display_error(_("Cannot rename company subdirectory")); return; } @@ -239,14 +213,14 @@ function handle_delete() display_error(_("Cannot remove temporary renamed company data directory ") . $tmpname); return; } - display_notification(_("Selected company as been deleted")); + display_notification(_("Selected company has been deleted")); } //--------------------------------------------------------------------------------------------- function display_companies() { - global $table_style, $def_coy, $db_connections; + global $def_coy, $db_connections; $coyno = $_SESSION["wa_current_user"]->company; @@ -258,7 +232,7 @@ function display_companies() document.location.replace('create_coy.php?c=df&id='+id) } "; - start_table($table_style); + start_table(TABLESTYLE); $th = array(_("Company"), _("Database Host"), _("Database User"), _("Database Name"), _("Table Pref"), _("Default"), "", ""); @@ -305,29 +279,16 @@ function display_companies() function display_company_edit($selected_id) { - global $def_coy, $db_connections, $tb_pref_counter, $table_style2; + global $def_coy, $db_connections, $tb_pref_counter; if ($selected_id != -1) $n = $selected_id; else $n = count($db_connections); - start_form(true); + start_form(); - echo " - "; - - start_table($table_style2); + start_table(TABLESTYLE2); if ($selected_id != -1) { @@ -361,13 +322,13 @@ function display_company_edit($selected_id) label_row(_("Table Pref"), $_POST['tbpref']); yesno_list_row(_("Default"), 'def', null, "", "", false); - file_row(_("Database Script"), "uploadfile"); + coa_list_row(_("Database Script"), 'coa'); text_row_ex(_("New script Admin Password"), 'admpassword', 20); + end_table(1); - end_table(); - display_note(_("Choose from Database scripts in SQL folder. No Database is created without a script."), 0, 1); - echo "
"; + submit_center('save', _("Save")); +// echo "
"; end_form(); @@ -381,10 +342,10 @@ if (isset($_GET['c']) && $_GET['c'] == 'df') { $selected_id = -1; } -if (isset($_GET['c']) && $_GET['c'] == 'u') +if (get_post('save')) { if (handle_submit()) $selected_id = -1; - +} //--------------------------------------------------------------------------------------------- diff --git a/admin/crm_categories.php b/admin/crm_categories.php new file mode 100644 index 00000000..bf24403e --- /dev/null +++ b/admin/crm_categories.php @@ -0,0 +1,153 @@ +. +***********************************************************************/ +$page_security = 'SA_CRMCATEGORY'; +$path_to_root = '..'; +include($path_to_root . "/includes/session.inc"); +include_once($path_to_root . "/includes/db/crm_contacts_db.inc"); + +page(_($help_context = "Contact Categories")); + +include($path_to_root . "/includes/ui.inc"); + +simple_page_mode(true); + +if ($Mode=='ADD_ITEM' || $Mode=='UPDATE_ITEM') +{ + + $input_error = 0; + + if (strlen($_POST['description']) == 0) + { + $input_error = 1; + display_error(_("Category description cannot be empty.")); + set_focus('description'); + } + + if ($input_error != 1) + { + if ($selected_id != -1) + { + update_crm_category($selected_id, get_post('type'), get_post('subtype'), + get_post('name'), get_post('description')); + $note = _('Selected contact category has been updated'); + } + else + { + add_crm_category(get_post('type'), get_post('subtype'), get_post('name'), + get_post('description')); + $note = _('New contact category has been added'); + } + + display_notification($note); + $Mode = 'RESET'; + } +} + +if ($Mode == 'Delete') +{ + $cancel_delete = 0; + + if (key_in_foreign_table($selected_id, 'crm_relations', 'category_id')) + { + $cancel_delete = 1; + display_error(_("Cannot delete this category because there are contacts related to it.")); + } + if ($cancel_delete == 0) + { + delete_crm_category($selected_id); + + display_notification(_('Category has been deleted')); + } + $Mode = 'RESET'; +} + +if ($Mode == 'RESET') +{ + $selected_id = -1; + $sav = get_post('show_inactive'); + unset($_POST); + $_POST['show_inactive'] = $sav; +} + +//------------------------------------------------------------------------------------------------- + +$result = get_crm_categories(check_value('show_inactive')); + +start_form(); +start_table(TABLESTYLE, "width=50%"); + +$th = array(_("Type id"), _("Action id"), _("Short Name"), _("Description"), "", " "); +inactive_control_column($th); + +table_header($th); +$k = 0; + +while ($myrow = db_fetch($result)) +{ + + alt_table_row_color($k); + + label_cell($myrow["type"]); + label_cell($myrow["action"]); + label_cell($myrow["name"]); + label_cell($myrow["description"]); + + inactive_control_cell($myrow["id"], $myrow["inactive"], 'areas', 'id'); + + edit_button_cell("Edit".$myrow["id"], _("Edit")); + if ($myrow["system"]) + label_cell(''); + else + delete_button_cell("Delete".$myrow["id"], _("Delete")); + end_row(); +} + +inactive_control_row($th); +end_table(1); + +//------------------------------------------------------------------------------------------------- +start_table(TABLESTYLE2); + +if ($selected_id != -1) +{ + if ($Mode == 'Edit') { + //editing an existing area + $myrow = get_crm_category($selected_id); + + $_POST['name'] = $myrow["name"]; + $_POST['type'] = $myrow["type"]; + $_POST['subtype'] = $myrow["action"]; + $_POST['description'] = $myrow["description"]; + } + hidden("selected_id", $selected_id); +} + +if ($Mode == 'Edit' && $myrow['system']) { + label_row(_("Contact Category Type:"), $_POST['type']); + label_row(_("Contact Category Subtype:"), $_POST['subtype']); +} else { +// crm_category_type_list_row(_("Contact Category Type:"), 'type', null, _('Other')); + text_row_ex(_("Contact Category Type:"), 'type', 30); + text_row_ex(_("Contact Category Subtype:"), 'subtype', 30); +} + +text_row_ex(_("Category Short Name:"), 'name', 30); +textarea_row(_("Category Description:"), 'description', null, 60,4); + +end_table(1); + +submit_add_or_update_center($selected_id == -1, '', 'both'); + +end_form(); + +end_page(); +?> diff --git a/admin/db/attachments_db.inc b/admin/db/attachments_db.inc new file mode 100644 index 00000000..6ce9960f --- /dev/null +++ b/admin/db/attachments_db.inc @@ -0,0 +1,82 @@ +. +***********************************************************************/ + +//---------------------------------------------------------------------------------------- + +function add_attachment($filterType, $trans_no, $description, + $filename, $unique_name, $filesize, $filetype) +{ + $date = date2sql(Today()); + $sql = "INSERT INTO ".TB_PREF."attachments (type_no, trans_no, description, filename, unique_name, + filesize, filetype, tran_date) VALUES (".db_escape($filterType)."," + .db_escape($trans_no).",".db_escape($description).", " + .db_escape($filename).", ".db_escape($unique_name).", ".db_escape($filesize) + .", ".db_escape($filetype).", '$date')"; + db_query($sql, "Attachment could not be inserted"); +} +//---------------------------------------------------------------------------------------- + +function update_attachment($selected_id, $filterType, $trans_no, $description, + $filename, $unique_name, $filesize, $filetype) +{ + $date = date2sql(Today()); + $sql = "UPDATE ".TB_PREF."attachments SET + type_no=".db_escape($filterType).", + trans_no=".db_escape($trans_no).", + description=".db_escape($description).", "; + if ($filename != "") + { + $sql .= "filename=".db_escape($filename).", + unique_name=".db_escape($unique_name).", + filesize=".db_escape($filesize).", + filetype=".db_escape($filetype).","; + } + $sql .= "tran_date='$date' WHERE id=".db_escape($selected_id); + db_query($sql, "Attachment could not be updated"); +} + +//---------------------------------------------------------------------------------------- + +function delete_attachment($id) +{ + $sql = "DELETE FROM ".TB_PREF."attachments WHERE id = ".db_escape($id); + db_query($sql, "Could not delete attachment"); +} +//---------------------------------------------------------------------------------------- + +function get_attached_documents($type) +{ + $sql = "SELECT * FROM ".TB_PREF."attachments WHERE type_no=".db_escape($type) + ." ORDER BY trans_no"; + return db_query($sql, "Could not retrieve attachments"); +} + +function get_attachment($id) +{ + $sql = "SELECT * FROM ".TB_PREF."attachments WHERE id=".db_escape($id); + $result = db_query($sql, "Could not retrieve attachments"); + return db_fetch($result); +} + +function has_attachment($type, $id) +{ + $sql = "SELECT DISTINCT * FROM ".TB_PREF."attachments WHERE type_no=".db_escape($type)." AND trans_no=".db_escape($id); + $result = db_query($sql, "Could not retrieve attachments"); + $myrow = db_fetch($result); + if ($myrow === false) + return 0; + else + return $myrow['id']; +} + + +?> \ No newline at end of file diff --git a/admin/db/company_db.inc b/admin/db/company_db.inc index 621e9865..fffd3cb3 100644 --- a/admin/db/company_db.inc +++ b/admin/db/company_db.inc @@ -9,188 +9,186 @@ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the License here . ***********************************************************************/ - -function update_company_gl_setup($retained_act, $profit_loss_act, $debtors_act, $pyt_discount_act, $creditors_act, - $freight_act, - $exchange_diff_act, - $bank_charge_act, - $default_sales_act, - $default_sales_discount_act, - $default_prompt_payment_act, - $default_inventory_act, - $default_cogs_act, - $default_adj_act, - $default_inv_sales_act, - $default_assembly_act, - $allow_negative_stock, - $po_over_receive, - $po_over_charge, - $accumulate_shipping, - $legal_text, - $past_due_days, - $default_credit_limit, - $default_workorder_required, - $default_dim_required, - $default_delivery_required) +/* + Update main or gl company setup. +*/ +function update_company_prefs( $params, $pref = TB_PREF ) { - $sql = "UPDATE ".TB_PREF."company SET - retained_earnings_act=".db_escape($retained_act).", profit_loss_year_act=".db_escape($profit_loss_act).", - debtors_act=".db_escape($debtors_act).", pyt_discount_act=".db_escape($pyt_discount_act).", - creditors_act=".db_escape($creditors_act).", - freight_act=".db_escape($freight_act).", - exchange_diff_act=".db_escape($exchange_diff_act).", - bank_charge_act=".db_escape($bank_charge_act).", - default_sales_act=".db_escape($default_sales_act).", - default_sales_discount_act=".db_escape($default_sales_discount_act).", - default_prompt_payment_act=".db_escape($default_prompt_payment_act).", - default_inventory_act=".db_escape($default_inventory_act).", - default_cogs_act=".db_escape($default_cogs_act).", - default_adj_act=".db_escape($default_adj_act).", - default_inv_sales_act=".db_escape($default_inv_sales_act).", - default_assembly_act=".db_escape($default_assembly_act).", - allow_negative_stock=$allow_negative_stock, - po_over_receive=$po_over_receive, - po_over_charge=$po_over_charge, - accumulate_shipping=$accumulate_shipping, - legal_text=".db_escape($legal_text).", - past_due_days=$past_due_days, - default_credit_limit=$default_credit_limit, - default_workorder_required=$default_workorder_required, - default_dim_required=$default_dim_required, - default_delivery_required=$default_delivery_required - WHERE coy_code=1"; - - db_query($sql, "The company gl setup could not be updated "); + $sql = "UPDATE {$pref}sys_prefs SET value = "; + foreach($params as $name => $value) { + if (!db_query($sql. db_escape($value). " WHERE name=".db_escape($name), + "The company prefferences could not be updated ")) + return false; + // update cached value + $_SESSION['SysPrefs']->prefs[$name] = $value; + } + return true; } - -function update_company_setup($coy_name, $coy_no, $gst_no, $tax_prd, $tax_last, - $postal_address, $phone, $fax, $email, $coy_logo, $domicile, $Dimension, - $curr_default, $f_year, $no_item_list, $no_customer_list, $no_supplier_list, - $base_sales, $time_zone, $add_pct, $round_to, $login_tout) +/* + Get company preferences. Returns cached values from global variable SysPrefs + or retrieved from database if SysPrefs values are not set. + $prefs can be preference name, array of names, or null for all preferences. + +*/ +function get_company_pref($prefs = null, $tbpref = null) { - if ($f_year == null) - $f_year = 0; - $sql = "UPDATE ".TB_PREF."company SET coy_name=".db_escape($coy_name).", - coy_no = ".db_escape($coy_no).", - gst_no=".db_escape($gst_no).", - tax_prd=$tax_prd, - tax_last=$tax_last, - postal_address =".db_escape($postal_address).", - phone=".db_escape($phone).", fax=".db_escape($fax).", - email=".db_escape($email).", - coy_logo=".db_escape($coy_logo).", - domicile=".db_escape($domicile).", - use_dimension=$Dimension, - no_item_list=$no_item_list, - no_customer_list=$no_customer_list, - no_supplier_list=$no_supplier_list, - curr_default=".db_escape($curr_default).", - f_year=$f_year, - base_sales=$base_sales, - time_zone=$time_zone, - add_pct=$add_pct, - round_to=$round_to, - login_tout = ".db_escape($login_tout)." - WHERE coy_code=1"; - - db_query($sql, "The company setup could not be updated "); + global $SysPrefs, $db_version; + + if (!isset($_SESSION['SysPrefs']->prefs)) { // cached preferences + + $_SESSION['SysPrefs'] = new sys_prefs(); + + if (!isset($tbpref)) + $tbpref = TB_PREF; + + $sql = "SELECT name, value FROM {$tbpref}sys_prefs"; + $result = @db_query($sql); // supress errors before 2.3 db structure upgrade + + if(!$result) + return null; + + while($pref = db_fetch_assoc($result)) { + $_SESSION['SysPrefs']->prefs[$pref['name']] = $pref['value']; + } + + $SysPrefs = &$_SESSION['SysPrefs']; + + // update current db status for info in log file + $SysPrefs->db_ok = $SysPrefs->prefs['version_id'] == $db_version; + } + + $all = $_SESSION['SysPrefs']->prefs; + + if (!$prefs) + return $all; + elseif (is_string($prefs)) + return @$all[$prefs]; + + $ret = array(); + foreach($prefs as $name) + $ret[$name] = $all[$name]; + + return $ret; } function get_company_prefs($tbpref = TB_PREF) { - $sql = "SELECT * FROM ".$tbpref."company WHERE coy_code=1"; - - $result = db_query($sql, "The company preferences could not be retrieved"); - - if (db_num_rows($result) == 0) - display_db_error("FATAL : Could not find company prefs", $sql); - - return db_fetch($result); + return get_company_pref(null, $tbpref); } -function get_company_pref($pref_name, $tbpref = TB_PREF) +function refresh_sys_prefs() { - $prefs = get_company_prefs($tbpref); - return $prefs[$pref_name]; + flush_dir(company_path().'/js_cache'); // clear cache + unset($_SESSION['SysPrefs']); + get_company_prefs(); } -// fiscal year routines -function add_fiscalyear($from_date, $to_date, $closed) +function get_base_sales_type() { - $from = date2sql($from_date); - $to = date2sql($to_date); + return get_company_pref('base_sales'); +} - $sql = "INSERT INTO ".TB_PREF."fiscal_year (begin, end, closed) - VALUES (".db_escape($from).",".db_escape($to).", ".db_escape($closed).")"; +function get_company_extensions($id = -1) { + global $path_to_root; - db_query($sql, "could not add fiscal year"); + $file = $path_to_root.($id == -1 ? '' : '/company/'.(int)$id).'/installed_extensions.php'; + $installed_extensions = array(); + if (is_file($file)) { + include($file); + } + return $installed_extensions; } -function update_fiscalyear($id, $closed) +function add_payment_terms($daysOrFoll, $terms, $dayNumber) { - $sql = "UPDATE ".TB_PREF."fiscal_year SET closed=".db_escape($closed)." - WHERE id=".db_escape($id); - - db_query($sql, "could not update fiscal year"); + if ($daysOrFoll) + { + $sql = "INSERT INTO ".TB_PREF."payment_terms (terms, + days_before_due, day_in_following_month) + VALUES (" . + db_escape($terms) . ", " . db_escape($dayNumber) . ", 0)"; + } + else + { + $sql = "INSERT INTO ".TB_PREF."payment_terms (terms, + days_before_due, day_in_following_month) + VALUES (" . db_escape($terms) . ", + 0, " . db_escape($dayNumber) . ")"; + } + db_query($sql,"The payment term could not be added"); } -function get_all_fiscalyears() +function update_payment_terms($selected_id, $daysOrFoll, $terms, $dayNumber) { - $sql = "SELECT * FROM ".TB_PREF."fiscal_year ORDER BY begin"; - - return db_query($sql, "could not get all fiscal years"); + if ($daysOrFoll) + { + $sql = "UPDATE ".TB_PREF."payment_terms SET terms=" . db_escape($terms) . ", + day_in_following_month=0, + days_before_due=" . db_escape($dayNumber) . " + WHERE terms_indicator = " .db_escape($selected_id); + } + else + { + $sql = "UPDATE ".TB_PREF."payment_terms SET terms=" . db_escape($terms) . ", + day_in_following_month=" . db_escape($dayNumber) . ", + days_before_due=0 + WHERE terms_indicator = " .db_escape($selected_id); + } + db_query($sql,"The payment term could not be updated"); } -function get_fiscalyear($id) +function delete_payment_terms($selected_id) { - $sql = "SELECT * FROM ".TB_PREF."fiscal_year WHERE id=".db_escape($id); - - $result = db_query($sql, "could not get fiscal year"); - - return db_fetch($result); + $sql="DELETE FROM ".TB_PREF."payment_terms WHERE terms_indicator=".db_escape($selected_id); + db_query($sql,"could not delete a payment terms"); } -function get_current_fiscalyear() +function get_payment_terms($selected_id) { - $year = get_company_pref('f_year'); + $sql = "SELECT *, (t.days_before_due=0) AND (t.day_in_following_month=0) as cash_sale + FROM ".TB_PREF."payment_terms t WHERE terms_indicator=".db_escape($selected_id); - $sql = "SELECT * FROM ".TB_PREF."fiscal_year WHERE id=".db_escape($year); - - $result = db_query($sql, "could not get current fiscal year"); + $result = db_query($sql,"could not get payment term"); return db_fetch($result); } -function delete_fiscalyear($id) +function get_payment_terms_all($show_inactive) { - begin_transaction(); - - $sql="DELETE FROM ".TB_PREF."fiscal_year WHERE id=".db_escape($id); - - db_query($sql, "could not delete fiscal year"); - - commit_transaction(); + $sql = "SELECT * FROM ".TB_PREF."payment_terms"; + if (!$show_inactive) $sql .= " WHERE !inactive"; + return db_query($sql,"could not get payment terms"); } - -function get_base_sales_type() +/* + Return number of records in tables, where some foreign key $id is used. + $id - searched key value + $tables - array of table names (without prefix); when table name is used as a key, then + value is name of foreign key field. For numeric keys $stdkey field name is used. + $stdkey - standard name of foreign key. +*/ +function key_in_foreign_table($id, $tables, $stdkey, $escaped=false) { - $sql = "SELECT base_sales FROM ".TB_PREF."company WHERE coy_code=1"; + if (!$escaped) + $id = db_escape($id); + + if (!is_array($tables)) + $tables = array($tables); + + $sqls = array(); + foreach ($tables as $tbl => $key) { + if (is_numeric($tbl)) { + $tbl = $key; + $key = $stdkey; + } + $sqls[] = "(SELECT COUNT(*) as cnt FROM ".TB_PREF."$tbl WHERE $key=$id)\n"; + } - $result = db_query($sql, "could not get base sales type"); - $myrow = db_fetch($result); - return $myrow[0]; -} + $sql = "SELECT sum(cnt) FROM (". implode(' UNION ', $sqls).") as counts"; -function get_company_extensions($id = -1) { - global $path_to_root; + $result = db_query($sql, "check relations for ".implode(',',$tables)." failed"); + $count = db_fetch($result); - $file = $path_to_root.($id == -1 ? '' : '/company/'.$id).'/installed_extensions.php'; - $installed_extensions = array(); - if (is_file($file)) { - include($file); - } - return $installed_extensions; + return $count[0]; } - ?> \ No newline at end of file diff --git a/admin/db/fiscalyears_db.inc b/admin/db/fiscalyears_db.inc new file mode 100644 index 00000000..b14ce5ba --- /dev/null +++ b/admin/db/fiscalyears_db.inc @@ -0,0 +1,390 @@ +. +***********************************************************************/ + +// fiscal year routines +function add_fiscalyear($from_date, $to_date, $closed) +{ + $from = date2sql($from_date); + $to = date2sql($to_date); + + $sql = "INSERT INTO ".TB_PREF."fiscal_year (begin, end, closed) + VALUES (".db_escape($from).",".db_escape($to).", ".db_escape($closed).")"; + + db_query($sql, "could not add fiscal year"); +} + +function update_fiscalyear($id, $closed) +{ + $sql = "UPDATE ".TB_PREF."fiscal_year SET closed=".db_escape($closed)." + WHERE id=".db_escape($id); + + db_query($sql, "could not update fiscal year"); +} + +function get_all_fiscalyears() +{ + $sql = "SELECT * FROM ".TB_PREF."fiscal_year ORDER BY begin"; + + return db_query($sql, "could not get all fiscal years"); +} + +function get_fiscalyear($id) +{ + $sql = "SELECT * FROM ".TB_PREF."fiscal_year WHERE id=".db_escape($id); + + $result = db_query($sql, "could not get fiscal year"); + + return db_fetch($result); +} + +function get_current_fiscalyear() +{ + global $path_to_root; + include_once($path_to_root . "/admin/db/company_db.inc"); + $year = get_company_pref('f_year'); + + $sql = "SELECT * FROM ".TB_PREF."fiscal_year WHERE id=".db_escape($year); + + $result = db_query($sql, "could not get current fiscal year"); + + return db_fetch($result); +} + + +function delete_fiscalyear($id) +{ + begin_transaction(); + + $sql="DELETE FROM ".TB_PREF."fiscal_year WHERE id=".db_escape($id); + + db_query($sql, "could not delete fiscal year"); + + commit_transaction(); +} + +function is_date_in_fiscalyears($date, $closed=true) +{ + $date = date2sql($date); + $sql = "SELECT * FROM ".TB_PREF."fiscal_year WHERE '$date' >= begin AND '$date' <= end"; + if (!$closed) + $sql .= " AND closed=0"; + $result = db_query($sql, "could not get all fiscal years"); + return db_fetch($result) !== false; +} + +function check_begin_end_date($date1, $date2) +{ + $sql = "SELECT MAX(end), MIN(begin) FROM ".TB_PREF."fiscal_year"; + $result = db_query($sql, "could not retrieve last fiscal years"); + $row = db_fetch_row($result); + if ($row[0] === null) + return true; + $max = add_days(sql2date($row[0]), 1); + $min = add_days(sql2date($row[1]), -1); + return ($max === $date1 || $min === $date2); +} + +function next_begin_date() +{ + $sql = "SELECT MAX(end) FROM ".TB_PREF."fiscal_year"; + $result = db_query($sql, "could not retrieve last fiscal years"); + $row = db_fetch_row($result); + if ($row[0] === null) + return false; + return add_days(sql2date($row[0]), 1); +} + +function check_years_before($date, $closed=false) +{ + $date = date2sql($date); + $sql = "SELECT COUNT(*) FROM ".TB_PREF."fiscal_year WHERE begin < '$date'"; + if (!$closed) + $sql .= " AND closed=0"; + + $result = db_query($sql, "could not check fiscal years before"); + $row = db_fetch_row($result); + return ($row[0] > 0); +} + +//--------------------------------------------------------------------------------------------- +function close_year($year) +{ + $co = get_company_prefs(); + if (get_gl_account($co['retained_earnings_act']) == false || get_gl_account($co['profit_loss_year_act']) == false) + { + display_error(_("The Retained Earnings Account or the Profit and Loss Year Account has not been set in System and General GL Setup")); + return false; + } + if (!is_account_balancesheet($co['retained_earnings_act']) || is_account_balancesheet($co['profit_loss_year_act'])) + { + display_error(_("The Retained Earnings Account should be a Balance Account or the Profit and Loss Year Account should be an Expense Account (preferred the last one in the Expense Class)")); + return false; + } + + begin_transaction(); + + $myrow = get_fiscalyear($year); + $to = $myrow['end']; + // retrieve total balances from balance sheet accounts + $sql = "SELECT SUM(amount) FROM ".TB_PREF."gl_trans INNER JOIN ".TB_PREF."chart_master ON account=account_code + INNER JOIN ".TB_PREF."chart_types ON account_type=id INNER JOIN ".TB_PREF."chart_class ON class_id=cid + WHERE ctype>=".CL_ASSETS." AND ctype <=".CL_EQUITY." AND tran_date <= '$to'"; + $result = db_query($sql, "The total balance could not be calculated"); + + $row = db_fetch_row($result); + $balance = round2($row[0], user_price_dec()); + + $to = sql2date($to); + + if ($balance != 0.0) + { + $trans_type = ST_JOURNAL; + $trans_id = get_next_trans_no($trans_type); + + add_gl_trans($trans_type, $trans_id, $to, $co['retained_earnings_act'], + 0, 0, _("Closing Year"), -$balance); + add_gl_trans($trans_type, $trans_id, $to, $co['profit_loss_year_act'], + 0, 0, _("Closing Year"), $balance); + + } + close_transactions($to); + + commit_transaction(); + return true; +} + +function open_year($year) +{ + $myrow = get_fiscalyear($year); + $from = sql2date($myrow['begin']); + + begin_transaction(); + open_transactions($from); + commit_transaction(); +} + +//--------------------------------------------------------------------------------------------- +function delete_attachments_and_comments($type_no, $trans_no) +{ + + $sql = "SELECT * FROM ".TB_PREF."attachments WHERE type_no = $type_no AND trans_no = $trans_no"; + $result = db_query($sql, "Could not retrieve attachments"); + while ($row = db_fetch($result)) + { + $dir = company_path(). "/attachments"; + if (file_exists($dir."/".$row['unique_name'])) + unlink($dir."/".$row['unique_name']); + $sql = "DELETE FROM ".TB_PREF."attachments WHERE type_no = $type_no AND trans_no = $trans_no"; + db_query($sql, "Could not delete attachment"); + } + $sql = "DELETE FROM ".TB_PREF."comments WHERE type = $type_no AND id = $trans_no"; + db_query($sql, "Could not delete comments"); + $sql = "DELETE FROM ".TB_PREF."refs WHERE type = $type_no AND id = $trans_no"; + db_query($sql, "Could not delete refs"); +} + +//--------------------------------------------------------------------------------------------- +function delete_this_fiscalyear($selected_id) +{ + global $db_connections; + + db_backup($db_connections[$_SESSION["wa_current_user"]->company], 'Security backup before Fiscal Year Removal'); + begin_transaction(); + $ref = _("Open Balance"); + $myrow = get_fiscalyear($selected_id); + $to = $myrow['end']; + $sql = "SELECT order_no, trans_type FROM ".TB_PREF."sales_orders WHERE ord_date <= '$to' AND type <> 1"; // don't take the templates + $result = db_query($sql, "Could not retrieve sales orders"); + while ($row = db_fetch($result)) + { + $sql = "SELECT SUM(qty_sent), SUM(quantity) FROM ".TB_PREF."sales_order_details WHERE order_no = {$row['order_no']} AND trans_type = {$row['trans_type']}"; + $res = db_query($sql, "Could not retrieve sales order details"); + $row2 = db_fetch_row($res); + if ($row2[0] == $row2[1]) + { + $sql = "DELETE FROM ".TB_PREF."sales_order_details WHERE order_no = {$row['order_no']} AND trans_type = {$row['trans_type']}"; + db_query($sql, "Could not delete sales order details"); + $sql = "DELETE FROM ".TB_PREF."sales_orders WHERE order_no = {$row['order_no']} AND trans_type = {$row['trans_type']}"; + db_query($sql, "Could not delete sales order"); + delete_attachments_and_comments($row['trans_type'], $row['order_no']); + } + } + $sql = "SELECT order_no FROM ".TB_PREF."purch_orders WHERE ord_date <= '$to'"; + $result = db_query($sql, "Could not retrieve purchase orders"); + while ($row = db_fetch($result)) + { + $sql = "SELECT SUM(quantity_ordered), SUM(quantity_received) FROM ".TB_PREF."purch_order_details WHERE order_no = {$row['order_no']}"; + $res = db_query($sql, "Could not retrieve purchase order details"); + $row2 = db_fetch_row($res); + if ($row2[0] == $row2[1]) + { + $sql = "DELETE FROM ".TB_PREF."purch_order_details WHERE order_no = {$row['order_no']}"; + db_query($sql, "Could not delete purchase order details"); + $sql = "DELETE FROM ".TB_PREF."purch_orders WHERE order_no = {$row['order_no']}"; + db_query($sql, "Could not delete purchase order"); + delete_attachments_and_comments(ST_PURCHORDER, $row['order_no']); + } + } + $sql = "SELECT id FROM ".TB_PREF."grn_batch WHERE delivery_date <= '$to'"; + $result = db_query($sql, "Could not retrieve grn batch"); + while ($row = db_fetch($result)) + { + $sql = "DELETE FROM ".TB_PREF."grn_items WHERE grn_batch_id = {$row['id']}"; + db_query($sql, "Could not delete grn items"); + $sql = "DELETE FROM ".TB_PREF."grn_batch WHERE id = {$row['id']}"; + db_query($sql, "Could not delete grn batch"); + delete_attachments_and_comments(25, $row['id']); + } + $sql = "SELECT trans_no, type FROM ".TB_PREF."debtor_trans WHERE tran_date <= '$to' AND + (ov_amount + ov_gst + ov_freight + ov_freight_tax + ov_discount) = alloc"; + $result = db_query($sql, "Could not retrieve debtor trans"); + while ($row = db_fetch($result)) + { + if ($row['type'] == ST_SALESINVOICE) + { + $deliveries = get_sales_parent_numbers($row['type'], $row['trans_no']); + foreach ($deliveries as $delivery) + { + $sql = "DELETE FROM ".TB_PREF."debtor_trans_details WHERE debtor_trans_no = $delivery AND debtor_trans_type = ".ST_CUSTDELIVERY; + db_query($sql, "Could not delete debtor trans details"); + $sql = "DELETE FROM ".TB_PREF."debtor_trans WHERE trans_no = $delivery AND type = ".ST_CUSTDELIVERY; + db_query($sql, "Could not delete debtor trans"); + delete_attachments_and_comments(ST_CUSTDELIVERY, $delivery); + } + } + $sql = "DELETE FROM ".TB_PREF."cust_allocations WHERE trans_no_from = {$row['trans_no']} AND trans_type_from = {$row['type']}"; + db_query($sql, "Could not delete cust allocations"); + $sql = "DELETE FROM ".TB_PREF."debtor_trans_details WHERE debtor_trans_no = {$row['trans_no']} AND debtor_trans_type = {$row['type']}"; + db_query($sql, "Could not delete debtor trans details"); + $sql = "DELETE FROM ".TB_PREF."debtor_trans WHERE trans_no = {$row['trans_no']} AND type = {$row['type']}"; + db_query($sql, "Could not delete debtor trans"); + delete_attachments_and_comments($row['type'], $row['trans_no']); + } + $sql = "SELECT trans_no, type FROM ".TB_PREF."supp_trans WHERE tran_date <= '$to' AND + ABS(ov_amount + ov_gst + ov_discount) = alloc"; + $result = db_query($sql, "Could not retrieve supp trans"); + while ($row = db_fetch($result)) + { + $sql = "DELETE FROM ".TB_PREF."supp_allocations WHERE trans_no_from = {$row['trans_no']} AND trans_type_from = {$row['type']}"; + db_query($sql, "Could not delete supp allocations"); + $sql = "DELETE FROM ".TB_PREF."supp_invoice_items WHERE supp_trans_no = {$row['trans_no']} AND supp_trans_type = {$row['type']}"; + db_query($sql, "Could not delete supp invoice items"); + $sql = "DELETE FROM ".TB_PREF."supp_trans WHERE trans_no = {$row['trans_no']} AND type = {$row['type']}"; + db_query($sql, "Could not delete supp trans"); + delete_attachments_and_comments($row['type'], $row['trans_no']); + } + $sql = "SELECT id FROM ".TB_PREF."workorders WHERE released_date <= '$to' AND closed=1"; + $result = db_query($sql, "Could not retrieve supp trans"); + while ($row = db_fetch($result)) + { + $sql = "SELECT issue_no FROM ".TB_PREF."wo_issues WHERE workorder_id = {$row['id']}"; + $res = db_query($sql, "Could not retrieve wo issues"); + while ($row2 = db_fetch_row($res)) + { + $sql = "DELETE FROM ".TB_PREF."wo_issue_items WHERE issue_id = {$row2[0]}"; + db_query($sql, "Could not delete wo issue items"); + } + delete_attachments_and_comments(ST_MANUISSUE, $row['id']); + $sql = "DELETE FROM ".TB_PREF."wo_issues WHERE workorder_id = {$row['id']}"; + db_query($sql, "Could not delete wo issues"); + $sql = "DELETE FROM ".TB_PREF."wo_manufacture WHERE workorder_id = {$row['id']}"; + db_query($sql, "Could not delete wo manufacture"); + $sql = "DELETE FROM ".TB_PREF."wo_requirements WHERE workorder_id = {$row['id']}"; + db_query($sql, "Could not delete wo requirements"); + $sql = "DELETE FROM ".TB_PREF."workorders WHERE id = {$row['id']}"; + db_query($sql, "Could not delete workorders"); + delete_attachments_and_comments(ST_WORKORDER, $row['id']); + } + $sql = "SELECT loc_code, stock_id, SUM(qty) AS qty, SUM(qty*standard_cost) AS std_cost FROM ".TB_PREF."stock_moves WHERE tran_date <= '$to' GROUP by + loc_code, stock_id"; + $result = db_query($sql, "Could not retrieve supp trans"); + while ($row = db_fetch($result)) + { + $sql = "DELETE FROM ".TB_PREF."stock_moves WHERE tran_date <= '$to' AND loc_code = '{$row['loc_code']}' AND stock_id = '{$row['stock_id']}'"; + db_query($sql, "Could not delete stock moves"); + $qty = $row['qty']; + $std_cost = ($qty == 0 ? 0 : round2($row['std_cost'] / $qty, user_price_dec())); + $sql = "INSERT INTO ".TB_PREF."stock_moves (stock_id, loc_code, tran_date, reference, qty, standard_cost) VALUES + ('{$row['stock_id']}', '{$row['loc_code']}', '$to', '$ref', $qty, $std_cost)"; + db_query($sql, "Could not insert stock move"); + } + $sql = "DELETE FROM ".TB_PREF."voided WHERE date_ <= '$to'"; + db_query($sql, "Could not delete voided items"); + $sql = "DELETE FROM ".TB_PREF."trans_tax_details WHERE tran_date <= '$to'"; + db_query($sql, "Could not delete trans tax details"); + $sql = "DELETE FROM ".TB_PREF."exchange_rates WHERE date_ <= '$to'"; + db_query($sql, "Could not delete exchange rates"); + $sql = "DELETE FROM ".TB_PREF."budget_trans WHERE tran_date <= '$to'"; + db_query($sql, "Could not delete exchange rates"); + + $sql = "SELECT account, SUM(amount) AS amount FROM ".TB_PREF."gl_trans WHERE tran_date <= '$to' GROUP by account"; + $result = db_query($sql, "Could not retrieve gl trans"); + $trans_no = get_next_trans_no(ST_JOURNAL); + while ($row = db_fetch($result)) + { + $sql = "DELETE FROM ".TB_PREF."gl_trans WHERE tran_date <= '$to' AND account = '{$row['account']}'"; + db_query($sql, "Could not delete gl trans"); + if (is_account_balancesheet($row['account'])) + { + $sql = "INSERT INTO ".TB_PREF."gl_trans (type, type_no, tran_date, account, memo_, amount) VALUES + (".ST_JOURNAL.", $trans_no, '$to', '{$row['account']}', '$ref', {$row['amount']})"; + db_query($sql, "Could not insert gl trans"); + } + } + + $sql = "SELECT bank_act, SUM(amount) AS amount FROM ".TB_PREF."bank_trans WHERE trans_date <= '$to' GROUP BY bank_act"; + $result = db_query($sql, "Could not retrieve bank trans"); + while ($row = db_fetch($result)) + { + $sql = "DELETE FROM ".TB_PREF."bank_trans WHERE trans_date <= '$to' AND bank_act = '{$row['bank_act']}'"; + db_query($sql, "Could not delete bank trans"); + $sql = "INSERT INTO ".TB_PREF."bank_trans (type, trans_no, trans_date, bank_act, ref, amount) VALUES + (0, 0, '$to', '{$row['bank_act']}', '$ref', {$row['amount']})"; + db_query($sql, "Could not insert bank trans"); + } + + $sql = "DELETE FROM ".TB_PREF."audit_trail WHERE gl_date <= '$to'"; + db_query($sql, "Could not delete audit trail"); + + $sql = "SELECT type, id FROM ".TB_PREF."comments WHERE type != ".ST_SALESQUOTE." AND type != ".ST_SALESORDER." AND type != ".ST_PURCHORDER; + $result = db_query($sql, "Could not retrieve comments"); + while ($row = db_fetch($result)) + { + $sql = "SELECT count(*) FROM ".TB_PREF."gl_trans WHERE type = {$row['type']} AND type_no = {$row['id']}"; + $res = db_query($sql, "Could not retrieve gl_trans"); + $row2 = db_fetch_row($res); + if ($row2[0] == 0) // if no link, then delete comments + { + $sql = "DELETE FROM ".TB_PREF."comments WHERE type = {$row['type']} AND id = {$row['id']}"; + db_query($sql, "Could not delete comments"); + } + } + $sql = "SELECT type, id FROM ".TB_PREF."refs WHERE type != ".ST_SALESQUOTE." AND type != ".ST_SALESORDER." AND type != ".ST_PURCHORDER; + $result = db_query($sql, "Could not retrieve refs"); + while ($row = db_fetch($result)) + { + $sql = "SELECT count(*) FROM ".TB_PREF."gl_trans WHERE type = {$row['type']} AND type_no = {$row['id']}"; + $res = db_query($sql, "Could not retrieve gl_trans"); + $row2 = db_fetch_row($res); + if ($row2[0] == 0) // if no link, then delete refs + { + $sql = "DELETE FROM ".TB_PREF."refs WHERE type = {$row['type']} AND id = {$row['id']}"; + db_query($sql, "Could not delete refs"); + } + } + + delete_fiscalyear($selected_id); + commit_transaction(); +} + + +?> \ No newline at end of file diff --git a/admin/db/maintenance_db.inc b/admin/db/maintenance_db.inc index 18e680df..81fc0abc 100644 --- a/admin/db/maintenance_db.inc +++ b/admin/db/maintenance_db.inc @@ -56,6 +56,12 @@ function array_natsort($aryData, $strIndex, $strSortBy, $strSortType=false) return $aryResult; } +function update_admin_password($conn, $password) +{ + $sql = "UPDATE ".$conn['tbpref']."users SET password=".db_escape($password) . " + WHERE user_id='admin'"; + db_query($sql, "could not update user password for 'admin'"); +} function write_config_db($new = false) { @@ -66,35 +72,19 @@ function write_config_db($new = false) $n = count($db_connections); $msg = " "; - for ($i = 0; $i < $n; $i++) - { - if ($i > 0) - $msg .= "\tarray "; - else - $msg .= "array "; - $msg .= "('name' => '" . $db_connections[$i]['name'] . "',\n"; - $msg .= "\t\t'host' => '" . $db_connections[$i]['host'] . "',\n"; - $msg .= "\t\t'dbuser' => '" . $db_connections[$i]['dbuser'] . "',\n"; - $msg .= "\t\t'dbpassword' => '" . $db_connections[$i]['dbpassword'] . "',\n"; - $msg .= "\t\t'dbname' => '" . $db_connections[$i]['dbname'] . "',\n"; - $msg .= "\t\t'tbpref' => '" . $db_connections[$i]['tbpref'] . "')"; - if ($i != $n - 1) - $msg .= ","; - $msg .= "\n\n"; - } - $msg .= "\t);\n?>"; + $msg .= "\$db_connections = " .var_export($db_connections, true); + $msg .= ";\n?>"; $filename = $path_to_root . "/config_db.php"; // Check if the file exists and is writable first. @@ -132,26 +122,14 @@ function write_extensions($extensions=null, $company = -1) if (!isset($next_extension_id)) { $next_extension_id = 1; } -// $exts = array_natsort($extensions, 'name', 'name'); -// $extensions = $exts; $msg = " $ext) - { - $msg .= "\t$i => "; - $msg .= "array ( "; - $t = ''; - foreach($ext as $key => $val) { - $msg .= $t."'$key' => '$val',\n"; - $t = "\t\t\t"; - } - $msg .= "\t\t),\n"; - } - $msg .= "\t);\n?>"; - + $msg .= "\$installed_extensions = ". var_export($extensions, true); + $msg .= ";\n?>"; $filename = $path_to_root . ($company==-1 ? '' : '/company/'.$company) .'/installed_extensions.php'; @@ -199,43 +165,60 @@ function write_extensions($extensions=null, $company = -1) } return true; } +//--------------------------------------------------------------------------------------------- +// +// Update per-company list of installed extensions +// +function update_extensions($extensions) { + global $db_connections; + + if (!write_extensions($extensions)) { + display_notification(_("Cannot update system extensions list.")); + return false; + } + + // update per company files + $cnt = count($db_connections); + for($i = 0; $i < $cnt; $i++) + { + $newexts = $extensions; + // update 'active' status + $exts = get_company_extensions($i); + foreach ($exts as $key => $ext) + { + if (isset($newexts[$key])) + $newexts[$key]['active'] = $exts[$key]['active']; + } + if(!write_extensions($newexts, $i)) + { + display_notification(sprintf(_("Cannot update extensions list for company '%s'."), + $db_connections[$i]['name'])); + return false; + } + } + return true; +} + function write_lang() { global $path_to_root, $installed_languages, $dflt_lang; - $conn = array_natsort($installed_languages, 'code', 'code'); - $installed_languages = $conn; - //reset($installed_languages); + $installed_languages = array_natsort($installed_languages, 'code', 'code'); $n = count($installed_languages); $msg = " ')\n"; - $msg .= "-- 'code' should match the name of the directory for the language under \\lang\n"; + $msg .= "/* How to make new entries here for non-packaged languages:\n\n"; + $msg .= "-- 'code' should match the name of the directory for the language under \\lang\n."; $msg .= "-- 'name' is the name that will be displayed in the language selection list (in Users and Display Setup)\n"; - $msg .= "-- 'rtl' only needs to be set for right-to-left languages like Arabic and Hebrew\n\n"; + $msg .= "-- 'rtl' only needs to be set for right-to-left languages like Arabic and Hebrew\n"; + $msg .= "-- 'encoding' used in translation file\n"; + $msg .= "-- 'version' always set to '' for manually installed languages.\n"; + $msg .= "-- 'path' installation path related to FA root (e.g. 'lang/en_US').\n"; $msg .= "*/\n\n\n"; - $msg .= "\$installed_languages = array (\n"; - if ($n > 0) - $msg .= "\t0 => "; - for ($i = 0; $i < $n; $i++) - { - if ($i > 0) - $msg .= "\t\tarray "; - else - $msg .= "array "; - $msg .= "('code' => '" . $installed_languages[$i]['code'] . "', "; - $msg .= "'name' => '" . $installed_languages[$i]['name'] . "', "; - $msg .= "'encoding' => '" . $installed_languages[$i]['encoding'] . "'"; - if (isset($installed_languages[$i]['rtl']) && $installed_languages[$i]['rtl']) - $msg .= ", 'rtl' => true),\n"; - else - $msg .= "),\n"; - } - - $msg .= "\t);\n"; + $msg .= "\$installed_languages = " . var_export($installed_languages, true); + $msg .= ";\n"; $msg .= "\n\$dflt_lang = '$dflt_lang';\n?>\n"; $path = $path_to_root . "/lang"; @@ -268,49 +251,10 @@ function write_lang() return true; } -function db_create_db($connection) -{ - $db = mysql_connect($connection["host"] , - $connection["dbuser"], $connection["dbpassword"]); - if (!mysql_select_db($connection["dbname"], $db)) - { - $sql = "CREATE DATABASE " . $connection["dbname"] . ""; - if (!mysql_query($sql)) - return 0; - mysql_select_db($connection["dbname"], $db); - } - return $db; -} - -function db_drop_db($connection) -{ - - if ($connection["tbpref"] == "") - { - $sql = "DROP DATABASE " . $connection["dbname"] . ""; - return mysql_query($sql); - } - else - { - $res = db_query("show table status"); - $all_tables = array(); - while($row = db_fetch($res)) - $all_tables[] = $row; - // get table structures - foreach ($all_tables as $table) - { - if (strpos($table['Name'], $connection["tbpref"]) === 0) - db_query("DROP TABLE `".$table['Name'] . "`"); - } - //deleting the tables, how?? - return true; - } -} - function db_import($filename, $connection, $force=true) { global $db, $go_debug; - + $allowed_commands = array( "create" => 'table_queries', "alter table" => 'table_queries', @@ -332,7 +276,6 @@ function db_import($filename, $connection, $force=true) ini_set("max_execution_time", "180"); db_query("SET foreign_key_checks=0"); - // uncrompress gziped backup files if (strpos($filename, ".gz") || strpos($filename, ".GZ")) $lines = db_ungzip("lines", $filename); @@ -433,8 +376,6 @@ function db_import($filename, $connection, $force=true) return false; } else return true; - //$shell_command = C_MYSQL_PATH . " -h $host -u $user -p{$password} $dbname < $filename"; - //shell_exec($shell_command); } // returns the content of the gziped $path backup file. use of $mode see below @@ -497,12 +438,12 @@ function db_backup($conn, $ext='no', $comm='', $tbpref = TB_PREF) else $filename = $conn['dbname'] . "_" . date("Ymd_Hi") . ".sql"; - return db_export($conn, $filename, $ext, $comm, $tbpref); + return db_export($conn, clean_file_name($filename), $ext, $comm, $tbpref); } // generates a dump of $db database // $drop and $zip tell if to include the drop table statement or dry to pack -function db_export($conn, $filename, $zip='no', $comment='', $tbpref = TB_PREF) +function db_export($conn, $filename, $zip='no', $comment='', $tbpref = TB_PREF, $no_default=false) { global $app_title, $version, $power_url, $path_to_root; @@ -549,7 +490,6 @@ function db_export($conn, $filename, $zip='no', $comment='', $tbpref = TB_PREF) $all_tables = array(); while($row = db_fetch($res)) { - //if ($conn["tbpref"] == "" || strpos($row['Name'], $conn["tbpref"]) !== false) replaced if (($conn["tbpref"] == "" && !preg_match('/[0-9]+_/', $row['Name'])) || ($conn["tbpref"] != "" && strpos($row['Name'], $conn["tbpref"]) === 0)) $all_tables[] = $row; @@ -584,7 +524,6 @@ function db_export($conn, $filename, $zip='no', $comment='', $tbpref = TB_PREF) // as long as no error occurred if (!$error) { - //while($row=@mysql_fetch_array($res)) foreach ($all_tables as $row) { $tablename = $row['Name']; @@ -595,11 +534,13 @@ function db_export($conn, $filename, $zip='no', $comment='', $tbpref = TB_PREF) $out.="### Structure of table `".$tablename."` ###\n\n"; $out.="DROP TABLE IF EXISTS `".$tablename."`;\n\n"; + if ($no_default && ($def_pos = strpos($table_sql[$tablename], "DEFAULT CHARSET")) > 0) + $table_sql[$tablename] = substr($table_sql[$tablename], 0, $def_pos); $out.=$table_sql[$tablename]; // add auto_increment value - if ($auto_incr[$tablename]) - $out.=" AUTO_INCREMENT=".$auto_incr[$tablename]; +// if ($auto_incr[$tablename]) +// $out.=" AUTO_INCREMENT=".$auto_incr[$tablename]; $out.=" ;"; $out.="\n\n\n"; @@ -668,9 +609,6 @@ function db_export($conn, $filename, $zip='no', $comment='', $tbpref = TB_PREF) return false; } - // if (mysql_error()) return "DB_ERROR"; - //@mysql_close($con); - //if ($zip == "zip") // $zip = $time; if (save_to_file($backupfile, $zip, $out)) @@ -864,4 +802,39 @@ function create_comp_dirs($comp_path, $comp_subdirs) @fclose($f); } } + +// +// Checks $field existence in $table with given field $properties +// $table - table name without prefix +// $field - optional field name +// $properties - optional properties of field defined by MySQL: +// 'Type', 'Null', 'Key', 'Default', 'Extra' +// +function check_table($pref, $table, $field=null, $properties=null) +{ + $tables = @db_query("SHOW TABLES LIKE '".$pref.$table."'"); + if (!db_num_rows($tables)) + return 1; // no such table or error + + $fields = @db_query("SHOW COLUMNS FROM ".$pref.$table); + if (!isset($field)) + return 0; // table exists + + while( $row = db_fetch_assoc($fields)) + { + if ($row['Field'] == $field) + { + if (!isset($properties)) + return 0; + foreach($properties as $property => $value) + { + if ($row[$property] != $value) + return 3; // failed type/length check + } + return 0; // property check ok. + } + } + return 2; // field not found +} + ?> \ No newline at end of file diff --git a/admin/db/printers_db.inc b/admin/db/printers_db.inc index c1d80368..43e13b4c 100644 --- a/admin/db/printers_db.inc +++ b/admin/db/printers_db.inc @@ -41,6 +41,11 @@ function get_printer($id) return db_fetch($result); } +function delete_printer($id) +{ + $sql="DELETE FROM ".TB_PREF."printers WHERE id=".db_escape($id); + db_query($sql,"could not delete printer definition"); +} //============================================================================ // printer profiles functions // diff --git a/admin/db/security_db.inc b/admin/db/security_db.inc index 4af9fde6..d1a2eefb 100644 --- a/admin/db/security_db.inc +++ b/admin/db/security_db.inc @@ -13,7 +13,7 @@ function get_security_role($id) { - $sql = "SELECT * FROM ".TB_PREF."security_roles WHERE id='$id'"; + $sql = "SELECT * FROM ".TB_PREF."security_roles WHERE id=".(int)$id; $ret = db_query($sql, "could not retrieve security roles"); $row = db_fetch($ret); if ($row != false) { @@ -45,21 +45,21 @@ function update_security_role($id, $name, $description, $sections, $areas) .",description=".db_escape($description) .",sections=".db_escape(implode(';', $sections)) .",areas=".db_escape(implode(';', $areas)) - ." WHERE id=$id"; + ." WHERE id=".(int)$id; db_query($sql, "could not update role"); } //-------------------------------------------------------------------------------------------------- function delete_security_role($id) { - $sql = "DELETE FROM ".TB_PREF."security_roles WHERE id=$id"; + $sql = "DELETE FROM ".TB_PREF."security_roles WHERE id=".(int)$id; db_query($sql, "could not delete role"); } //-------------------------------------------------------------------------------------------------- function check_role_used($id) { - $sql = "SELECT count(*) FROM ".TB_PREF."users WHERE role_id=$id"; + $sql = "SELECT count(*) FROM ".TB_PREF."users WHERE role_id=".(int)$id; $ret = db_query($sql, 'cannot check role usage'); $row = db_fetch($ret); return $row[0]; diff --git a/admin/db/shipping_db.inc b/admin/db/shipping_db.inc new file mode 100644 index 00000000..7082b5b5 --- /dev/null +++ b/admin/db/shipping_db.inc @@ -0,0 +1,71 @@ +. +***********************************************************************/ + +//-------------------------------------------------------------------------------------- + +function add_shipper($shipper_name, $contact, $phone, $phone2, $address) +{ + $sql = "INSERT INTO ".TB_PREF."shippers (shipper_name, contact, phone, phone2, address) + VALUES (" . db_escape($shipper_name) . ", " . + db_escape($contact). ", " . + db_escape($phone). ", " . + db_escape($phone2). ", " . + db_escape($address) . ")"; + + db_query($sql,"The Shipping Company could not be added"); +} + +//-------------------------------------------------------------------------------------- + +function update_shipper($selected_id, $shipper_name, $contact, $phone, $phone2, $address) +{ + $sql = "UPDATE ".TB_PREF."shippers SET shipper_name=" . db_escape($shipper_name). " , + contact =" . db_escape($contact). " , + phone =" . db_escape($phone). " , + phone2 =" . db_escape($phone2). " , + address =" . db_escape($address). " + WHERE shipper_id = ".db_escape($selected_id); + + db_query($sql,"The shipping company could not be updated"); +} + +//-------------------------------------------------------------------------------------- + +function delete_shipper($selected_id) +{ + $sql="DELETE FROM ".TB_PREF."shippers WHERE shipper_id=".db_escape($selected_id); + + db_query($sql,"could not delete shipper"); +} + +//-------------------------------------------------------------------------------------- + +function get_shippers($show_inactive) +{ + $sql = "SELECT * FROM ".TB_PREF."shippers"; + if (!$show_inactive) $sql .= " WHERE !inactive"; + $sql .= " ORDER BY shipper_id"; + + return db_query($sql,"could not get shippers"); +} + +//-------------------------------------------------------------------------------------- + +function get_shipper($selected_id) +{ + $sql = "SELECT * FROM ".TB_PREF."shippers WHERE shipper_id=".db_escape($selected_id); + + $result = db_query($sql, "could not get shipper"); + return db_fetch($result); +} + +?> \ No newline at end of file diff --git a/admin/db/tags_db.inc b/admin/db/tags_db.inc index 6b6aec4d..2ca09804 100644 --- a/admin/db/tags_db.inc +++ b/admin/db/tags_db.inc @@ -80,6 +80,22 @@ function get_tag_name($id) return $row[0]; } +//---------------------------------------------------------------------------------------------------- +function get_tag_names($tags) +{ + $str = ""; + if ($tags == -1) + return $str; + foreach($tags as $id) + { + $tag = get_tag_name($id); + if ($str == "") + $str .= $tag; + else + $str .= ", ".$tag; + } + return $str; +} //-------------------------------------------------------------------------------------- function get_tag_description($id) @@ -190,4 +206,18 @@ function get_tags_associated_with_record($type, $recordid) //-------------------------------------------------------------------------------------- +function is_record_in_tags($tags, $type, $recordid) +{ + foreach($tags as $id) + { + $sql = "SELECT ta.record_id FROM ".TB_PREF."tag_associations AS ta + INNER JOIN ".TB_PREF."tags AS tags ON tags.id = ta.tag_id + WHERE tags.type = $type AND tags.id = $id AND ta.record_id = ".db_escape($recordid); + $res = db_query($sql, "could not get tags associations for record"); + if (db_num_rows($res) == 0) + return false; + } + return true; +} + ?> \ No newline at end of file diff --git a/admin/db/transactions_db.inc b/admin/db/transactions_db.inc new file mode 100644 index 00000000..594c34d2 --- /dev/null +++ b/admin/db/transactions_db.inc @@ -0,0 +1,59 @@ +. +***********************************************************************/ + +//-------------------------------------------------------------------------------------- + +function get_sql_for_view_transactions($filtertype, $from, $to, &$trans_ref) +{ + $db_info = get_systype_db_info($filtertype); + + if ($db_info == null) + return ""; + + $table_name = $db_info[0]; + $type_name = $db_info[1]; + $trans_no_name = $db_info[2]; + $trans_ref = $db_info[3]; + $trans_date = $db_info[4]; + + $sql = "SELECT t.$trans_no_name as trans_no"; + + if ($trans_ref) + $sql .= " ,t.$trans_ref as ref "; + else + $sql .= ", r.reference as ref"; + $sql .= ",t.$trans_date as trans_date"; + if ($type_name) + $sql .= ", t.$type_name as type"; + $sql .= " FROM $table_name t LEFT JOIN ".TB_PREF."voided v ON" + ." t.$trans_no_name=v.id AND v.type=$filtertype"; + if (!$trans_ref) + $sql .= " LEFT JOIN ".TB_PREF."refs r ON t.$trans_no_name=r.id AND r.type=$filtertype"; + + $sql .= " WHERE ISNULL(v.`memo_`)"; + if ($from != null && $to != null) + { + $sql .= " AND t.$trans_no_name >= ".db_escape($from). " + AND t.$trans_no_name <= ".db_escape($to); + if ($type_name != null) + $sql .= " AND t.`$type_name` = ".db_escape($filtertype); + } + elseif ($type_name != null) + $sql .= " AND t.`$type_name` = ".db_escape($filtertype); + + $sql .= " GROUP BY t.$type_name, t.$trans_no_name"; + $sql .= " ORDER BY t.$trans_no_name"; + + return $sql; +} + +?> \ No newline at end of file diff --git a/admin/db/users_db.inc b/admin/db/users_db.inc index c0bd02b1..00acb48e 100644 --- a/admin/db/users_db.inc +++ b/admin/db/users_db.inc @@ -54,35 +54,15 @@ function update_user($id, $user_id, $real_name, $phone, $email, $role_id, //----------------------------------------------------------------------------------------------- -function update_user_display_prefs($id, $price_dec, $qty_dec, $exrate_dec, - $percent_dec, $showgl, $showcodes, $date_format, $date_sep, $tho_sep, - $dec_sep, $theme, $pagesize, $show_hints, $profile, $rep_popup, $query_size, - $graphic_links, $lang, $stickydate, $startup_tab) +function update_user_prefs($id, $prefs) { - $sql = "UPDATE ".TB_PREF."users SET - prices_dec=".db_escape($price_dec).", - qty_dec=".db_escape($qty_dec).", - rates_dec=".db_escape($exrate_dec).", - percent_dec=".db_escape($percent_dec).", - show_gl=".db_escape($showgl).", - show_codes=".db_escape($showcodes).", - date_format=".db_escape($date_format).", - date_sep=".db_escape($date_sep).", - tho_sep=".db_escape($tho_sep).", - dec_sep=".db_escape($dec_sep).", - theme=".db_escape($theme).", - page_size=".db_escape($pagesize).", - show_hints=".db_escape($show_hints).", - print_profile=".db_escape($profile).", - rep_popup=".db_escape($rep_popup).", - query_size=".db_escape($query_size).", - graphic_links=".db_escape($graphic_links).", - language=".db_escape($lang).", - sticky_doc_date=".db_escape($stickydate).", - startup_tab=".db_escape($startup_tab)." - WHERE id = ".db_escape($id); - - db_query($sql, "could not update user display prefs for $id"); + $sql = "UPDATE ".TB_PREF."users SET "; + foreach($prefs as $name => $value) { + $prefs[$name] = $name.'='. db_escape($value); + } + $sql .= implode(',', $prefs) . " WHERE id=".db_escape($id); + + return db_query($sql, "could not update user display prefs for $id"); } //----------------------------------------------------------------------------------------------- diff --git a/admin/db/voiding_db.inc b/admin/db/voiding_db.inc index 553240c2..62165c1f 100644 --- a/admin/db/voiding_db.inc +++ b/admin/db/voiding_db.inc @@ -16,6 +16,7 @@ include_once($path_to_root . "/manufacturing/includes/manufacturing_db.inc"); function void_transaction($type, $type_no, $date_, $memo_) { + global $Refs; $void_entry = get_voided_entry($type, $type_no); if ($void_entry != null) @@ -42,15 +43,12 @@ function void_transaction($type, $type_no, $date_, $memo_) case ST_CUSTDELIVERY : // it's a customer dispatch if (!exists_customer_trans($type, $type_no)) return false; - if ($type == 13) // added 04 Oct 2008 by Joe Hunt. If delivery note has a not voided invoice, then NO. + if ($type == ST_CUSTDELIVERY) // added 04 Oct 2008 by Joe Hunt. If delivery note has a not voided invoice, then NO. { - $delivery = get_customer_trans($type_no, $type); - if ($delivery['trans_link'] != 0) - { - if (get_voided_entry(10, $delivery['trans_link']) === false) + $childs = get_sales_child_trans($type_no, $type); + if ($childs && db_num_rows($childs)) return false; - } - } + } post_void_customer_trans($type, $type_no); break; @@ -108,6 +106,7 @@ function void_transaction($type, $type_no, $date_, $memo_) // only add an entry if it's actually been voided add_audit_trail($type, $type_no, $date_, _("Voided.")."\n".$memo_); add_voided_entry($type, $type_no, $date_, $memo_); + $Refs->restore_last($type, $type_no); return true; } diff --git a/admin/display_prefs.php b/admin/display_prefs.php index 2ab17076..4c90ec78 100644 --- a/admin/display_prefs.php +++ b/admin/display_prefs.php @@ -30,25 +30,23 @@ if (isset($_POST['setprefs'])) display_error( _("Query size must be integer and greater than zero.")); set_focus('query_size'); } else { + $_POST['theme'] = clean_file_name($_POST['theme']); $chg_theme = user_theme() != $_POST['theme']; $chg_lang = $_SESSION['language']->code != $_POST['language']; - set_user_prefs($_POST['prices'], $_POST['Quantities'], - $_POST['Rates'], $_POST['Percent'], - check_value('show_gl'), - check_value('show_codes'), - $_POST['date_format'], $_POST['date_sep'], - $_POST['tho_sep'], $_POST['dec_sep'], - $_POST['theme'], $_POST['page_size'], check_value('show_hints'), - $_POST['profile'], check_value('rep_popup'), - (int)($_POST['query_size']), check_value('graphic_links'), - $_POST['language'], check_value('sticky_doc_date'), $_POST['startup_tab']); + set_user_prefs(get_post( + array('prices_dec', 'qty_dec', 'rates_dec', 'percent_dec', + 'date_format', 'date_sep', 'tho_sep', 'dec_sep', 'print_profile', + 'theme', 'page_size', 'language', 'startup_tab', + 'show_gl' => 0, 'show_codes'=> 0, 'show_hints' => 0, + 'rep_popup' => 0, 'graphic_links' => 0, 'sticky_doc_date' => 0, + 'query_size' => 10.0))); if ($chg_lang) $_SESSION['language']->set_language($_POST['language']); // refresh main menu - flush_dir($comp_path.'/'.user_company().'/js_cache'); + flush_dir(company_path().'/js_cache'); if ($chg_theme && $allow_demo_mode) $_SESSION["wa_current_user"]->prefs->theme = $_POST['theme']; @@ -66,15 +64,15 @@ if (isset($_POST['setprefs'])) start_form(); -start_outer_table($table_style2); +start_outer_table(TABLESTYLE2); table_section(1); table_section_title(_("Decimal Places")); -text_row_ex(_("Prices/Amounts:"), 'prices', 5, 5, '', user_price_dec()); -text_row_ex(_("Quantities:"), 'Quantities', 5, 5, '', user_qty_dec()); -text_row_ex(_("Exchange Rates:"), 'Rates', 5, 5, '', user_exrate_dec()); -text_row_ex(_("Percentages:"), 'Percent', 5, 5, '', user_percent_dec()); +text_row_ex(_("Prices/Amounts:"), 'prices_dec', 5, 5, '', user_price_dec()); +text_row_ex(_("Quantities:"), 'qty_dec', 5, 5, '', user_qty_dec()); +text_row_ex(_("Exchange Rates:"), 'rates_dec', 5, 5, '', user_exrate_dec()); +text_row_ex(_("Percentages:"), 'percent_dec', 5, 5, '', user_percent_dec()); table_section_title(_("Dateformat and Separators")); @@ -122,10 +120,10 @@ tab_list_row(_("Start-up Tab"), 'startup_tab', user_startup_tab()); /* The array $pagesizes is set up in config.php for modifications possible separators can be added by modifying the array definition by editing that file */ -if (!isset($_POST['profile'])) - $_POST['profile'] = user_print_profile(); +if (!isset($_POST['print_profile'])) + $_POST['print_profile'] = user_print_profile(); -print_profiles_list_row(_("Printing profile"). ':', 'profile', +print_profiles_list_row(_("Printing profile"). ':', 'print_profile', null, _('Browser printing support')); check_row(_("Use popup window to display reports:"), 'rep_popup', user_rep_popup(), diff --git a/admin/fiscalyears.php b/admin/fiscalyears.php index 6fd36fc7..d886608f 100644 --- a/admin/fiscalyears.php +++ b/admin/fiscalyears.php @@ -15,6 +15,7 @@ include_once($path_to_root . "/includes/session.inc"); include_once($path_to_root . "/includes/date_functions.inc"); include_once($path_to_root . "/admin/db/company_db.inc"); +include_once($path_to_root . "/admin/db/fiscalyears_db.inc"); include_once($path_to_root . "/includes/ui.inc"); include_once($path_to_root . "/sales/includes/db/cust_trans_db.inc"); include_once($path_to_root . "/admin/db/maintenance_db.inc"); @@ -26,43 +27,9 @@ page(_($help_context = "Fiscal Years"), false, false, "", $js); simple_page_mode(true); //--------------------------------------------------------------------------------------------- -function is_date_in_fiscalyears($date) -{ - $date = date2sql($date); - $sql = "SELECT * FROM ".TB_PREF."fiscal_year WHERE '$date' >= begin AND '$date' <= end"; - - $result = db_query($sql, "could not get all fiscal years"); - return db_fetch($result) !== false; -} - -function is_bad_begin_date($date) -{ - $bdate = date2sql($date); - $sql = "SELECT MAX(end) FROM ".TB_PREF."fiscal_year WHERE begin < '$bdate'"; - - $result = db_query($sql, "could not retrieve last fiscal years"); - $row = db_fetch_row($result); - if ($row[0] === null) - return false; - $max = add_days(sql2date($row[0]), 1); - return ($max !== $date); -} - -function check_years_before($date, $closed=false) -{ - $date = date2sql($date); - $sql = "SELECT COUNT(*) FROM ".TB_PREF."fiscal_year WHERE begin < '$date'"; - if (!$closed) - $sql .= " AND closed=0"; - - $result = db_query($sql, "could not check fiscal years before"); - $row = db_fetch_row($result); - return ($row[0] > 0); -} - function check_data() { - if (!is_date($_POST['from_date']) || is_date_in_fiscalyears($_POST['from_date']) || is_bad_begin_date($_POST['from_date'])) + if (!is_date($_POST['from_date']) || is_date_in_fiscalyears($_POST['from_date'])) { display_error( _("Invalid BEGIN date in fiscal year.")); set_focus('from_date'); @@ -74,65 +41,21 @@ function check_data() set_focus('to_date'); return false; } - if (date1_greater_date2($_POST['from_date'], $_POST['to_date'])) + if (!check_begin_end_date($_POST['from_date'], $_POST['to_date'])) { - display_error( _("BEGIN date bigger than END date.")); + display_error( _("Invalid BEGIN or END date in fiscal year.")); set_focus('from_date'); return false; } - return true; -} -//--------------------------------------------------------------------------------------------- -function close_year($year) -{ - $co = get_company_prefs(); - if (get_gl_account($co['retained_earnings_act']) == false || get_gl_account($co['profit_loss_year_act']) == false) + if (date1_greater_date2($_POST['from_date'], $_POST['to_date'])) { - display_error(_("The Retained Earnings Account or the Profit and Loss Year Account has not been set in System and General GL Setup")); + display_error( _("BEGIN date bigger than END date.")); + set_focus('from_date'); return false; } - begin_transaction(); - - $myrow = get_fiscalyear($year); - $to = $myrow['end']; - // retrieve total balances from balance sheet accounts - $sql = "SELECT SUM(amount) FROM ".TB_PREF."gl_trans INNER JOIN ".TB_PREF."chart_master ON account=account_code - INNER JOIN ".TB_PREF."chart_types ON account_type=id INNER JOIN ".TB_PREF."chart_class ON class_id=cid - WHERE ctype>=".CL_ASSETS." AND ctype <=".CL_EQUITY." AND tran_date <= '$to'"; - $result = db_query($sql, "The total balance could not be calculated"); - - $row = db_fetch_row($result); - $balance = round2($row[0], user_price_dec()); - - $to = sql2date($to); - - if ($balance != 0.0) - { - $trans_type = ST_JOURNAL; - $trans_id = get_next_trans_no($trans_type); - - add_gl_trans($trans_type, $trans_id, $to, $co['retained_earnings_act'], - 0, 0, _("Closing Year"), -$balance); - add_gl_trans($trans_type, $trans_id, $to, $co['profit_loss_year_act'], - 0, 0, _("Closing Year"), $balance); - - } - close_transactions($to); - - commit_transaction(); return true; } -function open_year($year) -{ - $myrow = get_fiscalyear($year); - $from = sql2date($myrow['begin']); - - begin_transaction(); - open_transactions($from); - commit_transaction(); -} - function handle_submit() { global $selected_id, $Mode; @@ -187,220 +110,6 @@ function check_can_delete($selected_id) return true; } -//--------------------------------------------------------------------------------------------- -function delete_attachments_and_comments($type_no, $trans_no) -{ - global $comp_path; - - $sql = "SELECT * FROM ".TB_PREF."attachments WHERE type_no = $type_no AND trans_no = $trans_no"; - $result = db_query($sql, "Could not retrieve attachments"); - while ($row = db_fetch($result)) - { - $dir = $comp_path."/".user_company(). "/attachments"; - if (file_exists($dir."/".$row['unique_name'])) - unlink($dir."/".$row['unique_name']); - $sql = "DELETE FROM ".TB_PREF."attachments WHERE type_no = $type_no AND trans_no = $trans_no"; - db_query($sql, "Could not delete attachment"); - } - $sql = "DELETE FROM ".TB_PREF."comments WHERE type = $type_no AND id = $trans_no"; - db_query($sql, "Could not delete comments"); - $sql = "DELETE FROM ".TB_PREF."refs WHERE type = $type_no AND id = $trans_no"; - db_query($sql, "Could not delete refs"); -} - -function delete_this_fiscalyear($selected_id) -{ - global $db_connections; - - db_backup($db_connections[$_SESSION["wa_current_user"]->company], 'Security backup before Fiscal Year Removal'); - begin_transaction(); - $ref = _("Open Balance"); - $myrow = get_fiscalyear($selected_id); - $to = $myrow['end']; - $sql = "SELECT order_no, trans_type FROM ".TB_PREF."sales_orders WHERE ord_date <= '$to' AND type <> 1"; // don't take the templates - $result = db_query($sql, "Could not retrieve sales orders"); - while ($row = db_fetch($result)) - { - $sql = "SELECT SUM(qty_sent), SUM(quantity) FROM ".TB_PREF."sales_order_details WHERE order_no = {$row['order_no']} AND trans_type = {$row['trans_type']}"; - $res = db_query($sql, "Could not retrieve sales order details"); - $row2 = db_fetch_row($res); - if ($row2[0] == $row2[1]) - { - $sql = "DELETE FROM ".TB_PREF."sales_order_details WHERE order_no = {$row['order_no']} AND trans_type = {$row['trans_type']}"; - db_query($sql, "Could not delete sales order details"); - $sql = "DELETE FROM ".TB_PREF."sales_orders WHERE order_no = {$row['order_no']} AND trans_type = {$row['trans_type']}"; - db_query($sql, "Could not delete sales order"); - delete_attachments_and_comments($row['trans_type'], $row['order_no']); - } - } - $sql = "SELECT order_no FROM ".TB_PREF."purch_orders WHERE ord_date <= '$to'"; - $result = db_query($sql, "Could not retrieve purchase orders"); - while ($row = db_fetch($result)) - { - $sql = "SELECT SUM(quantity_ordered), SUM(quantity_received) FROM ".TB_PREF."purch_order_details WHERE order_no = {$row['order_no']}"; - $res = db_query($sql, "Could not retrieve purchase order details"); - $row2 = db_fetch_row($res); - if ($row2[0] == $row2[1]) - { - $sql = "DELETE FROM ".TB_PREF."purch_order_details WHERE order_no = {$row['order_no']}"; - db_query($sql, "Could not delete purchase order details"); - $sql = "DELETE FROM ".TB_PREF."purch_orders WHERE order_no = {$row['order_no']}"; - db_query($sql, "Could not delete purchase order"); - delete_attachments_and_comments(ST_PURCHORDER, $row['order_no']); - } - } - $sql = "SELECT id FROM ".TB_PREF."grn_batch WHERE delivery_date <= '$to'"; - $result = db_query($sql, "Could not retrieve grn batch"); - while ($row = db_fetch($result)) - { - $sql = "DELETE FROM ".TB_PREF."grn_items WHERE grn_batch_id = {$row['id']}"; - db_query($sql, "Could not delete grn items"); - $sql = "DELETE FROM ".TB_PREF."grn_batch WHERE id = {$row['id']}"; - db_query($sql, "Could not delete grn batch"); - delete_attachments_and_comments(25, $row['id']); - } - $sql = "SELECT trans_no, type FROM ".TB_PREF."debtor_trans WHERE tran_date <= '$to' AND - (ov_amount + ov_gst + ov_freight + ov_freight_tax + ov_discount) = alloc"; - $result = db_query($sql, "Could not retrieve debtor trans"); - while ($row = db_fetch($result)) - { - if ($row['type'] == ST_SALESINVOICE) - { - $deliveries = get_parent_trans(ST_SALESINVOICE,$row['trans_no']); - foreach ($deliveries as $delivery) - { - $sql = "DELETE FROM ".TB_PREF."debtor_trans_details WHERE debtor_trans_no = $delivery AND debtor_trans_type = ".ST_CUSTDELIVERY; - db_query($sql, "Could not delete debtor trans details"); - $sql = "DELETE FROM ".TB_PREF."debtor_trans WHERE trans_no = $delivery AND type = ".ST_CUSTDELIVERY; - db_query($sql, "Could not delete debtor trans"); - delete_attachments_and_comments(ST_CUSTDELIVERY, $delivery); - } - } - $sql = "DELETE FROM ".TB_PREF."cust_allocations WHERE trans_no_from = {$row['trans_no']} AND trans_type_from = {$row['type']}"; - db_query($sql, "Could not delete cust allocations"); - $sql = "DELETE FROM ".TB_PREF."debtor_trans_details WHERE debtor_trans_no = {$row['trans_no']} AND debtor_trans_type = {$row['type']}"; - db_query($sql, "Could not delete debtor trans details"); - $sql = "DELETE FROM ".TB_PREF."debtor_trans WHERE trans_no = {$row['trans_no']} AND type = {$row['type']}"; - db_query($sql, "Could not delete debtor trans"); - delete_attachments_and_comments($row['type'], $row['trans_no']); - } - $sql = "SELECT trans_no, type FROM ".TB_PREF."supp_trans WHERE tran_date <= '$to' AND - ABS(ov_amount + ov_gst + ov_discount) = alloc"; - $result = db_query($sql, "Could not retrieve supp trans"); - while ($row = db_fetch($result)) - { - $sql = "DELETE FROM ".TB_PREF."supp_allocations WHERE trans_no_from = {$row['trans_no']} AND trans_type_from = {$row['type']}"; - db_query($sql, "Could not delete supp allocations"); - $sql = "DELETE FROM ".TB_PREF."supp_invoice_items WHERE supp_trans_no = {$row['trans_no']} AND supp_trans_type = {$row['type']}"; - db_query($sql, "Could not delete supp invoice items"); - $sql = "DELETE FROM ".TB_PREF."supp_trans WHERE trans_no = {$row['trans_no']} AND type = {$row['type']}"; - db_query($sql, "Could not delete supp trans"); - delete_attachments_and_comments($row['type'], $row['trans_no']); - } - $sql = "SELECT id FROM ".TB_PREF."workorders WHERE released_date <= '$to' AND closed=1"; - $result = db_query($sql, "Could not retrieve supp trans"); - while ($row = db_fetch($result)) - { - $sql = "SELECT issue_no FROM ".TB_PREF."wo_issues WHERE workorder_id = {$row['id']}"; - $res = db_query($sql, "Could not retrieve wo issues"); - while ($row2 = db_fetch_row($res)) - { - $sql = "DELETE FROM ".TB_PREF."wo_issue_items WHERE issue_id = {$row2[0]}"; - db_query($sql, "Could not delete wo issue items"); - } - delete_attachments_and_comments(ST_MANUISSUE, $row['id']); - $sql = "DELETE FROM ".TB_PREF."wo_issues WHERE workorder_id = {$row['id']}"; - db_query($sql, "Could not delete wo issues"); - $sql = "DELETE FROM ".TB_PREF."wo_manufacture WHERE workorder_id = {$row['id']}"; - db_query($sql, "Could not delete wo manufacture"); - $sql = "DELETE FROM ".TB_PREF."wo_requirements WHERE workorder_id = {$row['id']}"; - db_query($sql, "Could not delete wo requirements"); - $sql = "DELETE FROM ".TB_PREF."workorders WHERE id = {$row['id']}"; - db_query($sql, "Could not delete workorders"); - delete_attachments_and_comments(ST_WORKORDER, $row['id']); - } - $sql = "SELECT loc_code, stock_id, SUM(qty) AS qty, SUM(qty*standard_cost) AS std_cost FROM ".TB_PREF."stock_moves WHERE tran_date <= '$to' GROUP by - loc_code, stock_id"; - $result = db_query($sql, "Could not retrieve supp trans"); - while ($row = db_fetch($result)) - { - $sql = "DELETE FROM ".TB_PREF."stock_moves WHERE tran_date <= '$to' AND loc_code = '{$row['loc_code']}' AND stock_id = '{$row['stock_id']}'"; - db_query($sql, "Could not delete stock moves"); - $qty = $row['qty']; - $std_cost = ($qty == 0 ? 0 : round2($row['std_cost'] / $qty, user_price_dec())); - $sql = "INSERT INTO ".TB_PREF."stock_moves (stock_id, loc_code, tran_date, reference, qty, standard_cost) VALUES - ('{$row['stock_id']}', '{$row['loc_code']}', '$to', '$ref', $qty, $std_cost)"; - db_query($sql, "Could not insert stock move"); - } - $sql = "DELETE FROM ".TB_PREF."voided WHERE date_ <= '$to'"; - db_query($sql, "Could not delete voided items"); - $sql = "DELETE FROM ".TB_PREF."trans_tax_details WHERE tran_date <= '$to'"; - db_query($sql, "Could not delete trans tax details"); - $sql = "DELETE FROM ".TB_PREF."exchange_rates WHERE date_ <= '$to'"; - db_query($sql, "Could not delete exchange rates"); - $sql = "DELETE FROM ".TB_PREF."budget_trans WHERE tran_date <= '$to'"; - db_query($sql, "Could not delete exchange rates"); - - $sql = "SELECT account, SUM(amount) AS amount FROM ".TB_PREF."gl_trans WHERE tran_date <= '$to' GROUP by account"; - $result = db_query($sql, "Could not retrieve gl trans"); - while ($row = db_fetch($result)) - { - $sql = "DELETE FROM ".TB_PREF."gl_trans WHERE tran_date <= '$to' AND account = '{$row['account']}'"; - db_query($sql, "Could not delete gl trans"); - if (is_account_balancesheet($row['account'])) - { - $trans_no = get_next_trans_no(ST_JOURNAL); - $sql = "INSERT INTO ".TB_PREF."gl_trans (type, type_no, tran_date, account, memo_, amount) VALUES - (".ST_JOURNAL.", $trans_no, '$to', '{$row['account']}', '$ref', {$row['amount']})"; - db_query($sql, "Could not insert gl trans"); - } - } - - $sql = "SELECT bank_act, SUM(amount) AS amount FROM ".TB_PREF."bank_trans WHERE trans_date <= '$to' GROUP BY bank_act"; - $result = db_query($sql, "Could not retrieve bank trans"); - while ($row = db_fetch($result)) - { - $sql = "DELETE FROM ".TB_PREF."bank_trans WHERE trans_date <= '$to' AND bank_act = '{$row['bank_act']}'"; - db_query($sql, "Could not delete bank trans"); - $sql = "INSERT INTO ".TB_PREF."bank_trans (type, trans_no, trans_date, bank_act, ref, amount) VALUES - (0, 0, '$to', '{$row['bank_act']}', '$ref', {$row['amount']})"; - db_query($sql, "Could not insert bank trans"); - } - - $sql = "DELETE FROM ".TB_PREF."audit_trail WHERE gl_date <= '$to'"; - db_query($sql, "Could not delete audit trail"); - - $sql = "SELECT type, id FROM ".TB_PREF."comments WHERE type != ".ST_SALESQUOTE." AND type != ".ST_SALESORDER." AND type != ".ST_PURCHORDER; - $result = db_query($sql, "Could not retrieve comments"); - while ($row = db_fetch($result)) - { - $sql = "SELECT count(*) FROM ".TB_PREF."gl_trans WHERE type = {$row['type']} AND type_no = {$row['id']}"; - $res = db_query($sql, "Could not retrieve gl_trans"); - $row2 = db_fetch_row($res); - if ($row2[0] == 0) // if no link, then delete comments - { - $sql = "DELETE FROM ".TB_PREF."comments WHERE type = {$row['type']} AND id = {$row['id']}"; - db_query($sql, "Could not delete comments"); - } - } - $sql = "SELECT type, id FROM ".TB_PREF."refs WHERE type != ".ST_SALESQUOTE." AND type != ".ST_SALESORDER." AND type != ".ST_PURCHORDER; - $result = db_query($sql, "Could not retrieve refs"); - while ($row = db_fetch($result)) - { - $sql = "SELECT count(*) FROM ".TB_PREF."gl_trans WHERE type = {$row['type']} AND type_no = {$row['id']}"; - $res = db_query($sql, "Could not retrieve gl_trans"); - $row2 = db_fetch_row($res); - if ($row2[0] == 0) // if no link, then delete refs - { - $sql = "DELETE FROM ".TB_PREF."refs WHERE type = {$row['type']} AND id = {$row['id']}"; - db_query($sql, "Could not delete refs"); - } - } - - delete_fiscalyear($selected_id); - commit_transaction(); -} - function handle_delete() { global $selected_id, $Mode; @@ -417,16 +126,14 @@ function handle_delete() function display_fiscalyears() { - global $table_style; - $company_year = get_company_pref('f_year'); $result = get_all_fiscalyears(); start_form(); display_note(_("Warning: Deleting a fiscal year all transactions are removed and converted into relevant balances. This process is irreversible!"), - 0, 0, "class='currentfg'"); - start_table($table_style); + 0, 1, "class='currentfg'"); + start_table(TABLESTYLE); $th = array(_("Fiscal Year Begin"), _("Fiscal Year End"), _("Closed"), "", ""); table_header($th); @@ -473,10 +180,10 @@ function display_fiscalyears() function display_fiscalyear_edit($selected_id) { - global $table_style2, $Mode; + global $Mode; start_form(); - start_table($table_style2); + start_table(TABLESTYLE2); if ($selected_id != -1) { @@ -495,6 +202,12 @@ function display_fiscalyear_edit($selected_id) } else { + $begin = next_begin_date(); + if ($begin && $Mode != 'ADD_ITEM') + { + $_POST['from_date'] = $begin; + $_POST['to_date'] = end_month(add_months($begin, 11)); + } date_row(_("Fiscal Year Begin:"), 'from_date', '', null, 0, 0, 1001); date_row(_("Fiscal Year End:"), 'to_date', '', null, 0, 0, 1001); } diff --git a/admin/forms_setup.php b/admin/forms_setup.php index f282b92d..f0065576 100644 --- a/admin/forms_setup.php +++ b/admin/forms_setup.php @@ -38,7 +38,7 @@ if (isset($_POST['setprefs'])) start_form(); -start_outer_table($table_style2); +start_outer_table(TABLESTYLE2); $systypes = get_systypes(); table_section(1); diff --git a/admin/gl_setup.php b/admin/gl_setup.php index 68ea6480..997a2bda 100644 --- a/admin/gl_setup.php +++ b/admin/gl_setup.php @@ -52,28 +52,16 @@ function can_process() if (isset($_POST['submit']) && can_process()) { - update_company_gl_setup($_POST['retained_earnings_act'], $_POST['profit_loss_year_act'], - $_POST['debtors_act'], $_POST['pyt_discount_act'], - $_POST['creditors_act'], $_POST['freight_act'], - $_POST['exchange_diff_act'], $_POST['bank_charge_act'], - $_POST['default_sales_act'], - $_POST['default_sales_discount_act'], - $_POST['default_prompt_payment_act'], - $_POST['default_inventory_act'], - $_POST['default_cogs_act'], - $_POST['default_adj_act'], - $_POST['default_inv_sales_act'], - $_POST['default_assembly_act'], - check_value('allow_negative_stock'), - input_num('po_over_receive'), - input_num('po_over_charge'), - check_value('accumulate_shipping'), - $_POST['legal_text'], - $_POST['past_due_days'], - $_POST['default_credit_limit'], - $_POST['default_workorder_required'], - $_POST['default_dim_required'], - $_POST['default_delivery_required']); + update_company_prefs( get_post( array( 'retained_earnings_act', 'profit_loss_year_act', + 'debtors_act', 'pyt_discount_act', 'creditors_act', 'freight_act', + 'exchange_diff_act', 'bank_charge_act', 'default_sales_act', 'default_sales_discount_act', + 'default_prompt_payment_act', 'default_inventory_act', 'default_cogs_act', + 'default_adj_act', 'default_inv_sales_act', 'default_assembly_act', 'legal_text', + 'past_due_days', 'default_workorder_required', 'default_dim_required', + 'default_delivery_required', + 'allow_negative_stock'=> 0, 'accumulate_shipping'=> 0, + 'po_over_receive' => 0.0, 'po_over_charge' => 0.0, 'default_credit_limit'=>0.0 +))); display_notification(_("The general GL setup has been updated.")); @@ -83,8 +71,7 @@ if (isset($_POST['submit']) && can_process()) start_form(); -//start_outer_table("class='tablestyle'"); -start_outer_table($table_style2, 5); +start_outer_table(TABLESTYLE2); table_section(1); @@ -128,11 +115,6 @@ $_POST['default_delivery_required'] = $myrow['default_delivery_required']; table_section_title(_("General GL")); -// Not used in FA2.0. -//gl_all_accounts_list_row(_("Retained Earning Clearing Account:"), 'retained_earnings_act', $_POST['retained_earnings_act']); -// Not used in FA2.0. -//gl_all_accounts_list_row(_("Payroll Account:"), 'payroll_act', $_POST['payroll_act']); - text_row(_("Past Due Days Interval:"), 'past_due_days', $_POST['past_due_days'], 6, 6, '', "", _("days")); gl_all_accounts_list_row(_("Retained Earnings:"), 'retained_earnings_act', $_POST['retained_earnings_act']); diff --git a/admin/inst_chart.php b/admin/inst_chart.php new file mode 100644 index 00000000..35e76678 --- /dev/null +++ b/admin/inst_chart.php @@ -0,0 +1,98 @@ +. +***********************************************************************/ +$page_security = 'SA_CREATEMODULES'; +$path_to_root=".."; +include_once($path_to_root . "/includes/session.inc"); +include_once($path_to_root."/includes/packages.inc"); + +if ($use_popup_windows) { + $js = get_js_open_window(900, 500); +} +page(_($help_context = "Install Charts of Accounts"), false, false, '', $js); + +include_once($path_to_root . "/includes/date_functions.inc"); +include_once($path_to_root . "/admin/db/company_db.inc"); +include_once($path_to_root . "/admin/db/maintenance_db.inc"); +include_once($path_to_root . "/includes/ui.inc"); + +//--------------------------------------------------------------------------------------------- + +if ($id = find_submit('Delete', false)) +{ + $extensions = get_company_extensions(); + if (($extensions[$id]['type']=='chart') && uninstall_package($extensions[$id]['package'])) { + unset($extensions[$id]); + if (update_extensions($extensions)) { + display_notification(_("Selected chart has been successfully deleted")); + meta_forward($_SERVER['PHP_SELF']); + } + } +} + +if ($id = find_submit('Update', false)) + install_extension($id); + +//--------------------------------------------------------------------------------------------- +start_form(true); + + div_start('ext_tbl'); + start_table(TABLESTYLE); + + $th = array(_("Chart"), _("Installed"), _("Available"), _("Encoding"), "", ""); + table_header($th); + + $k = 0; + $mods = get_charts_list(); + + foreach($mods as $pkg_name => $ext) + { + $available = @$ext['available']; + $installed = @$ext['version']; + $id = @$ext['local_id']; + $encoding = @$ext['encoding']; + + alt_table_row_color($k); + +// label_cell(is_array($ext['Descr']) ? $ext['Descr'][0] : $ext['Descr']); + label_cell($available ? get_package_view_str($pkg_name, $ext['name']) : $ext['name']); + + label_cell($id === null ? _("None") : + ($available && $installed ? $installed : _("Unknown"))); + label_cell($available ? $available : _("None")); + label_cell($encoding ? $encoding : _("Unknown")); + + if ($available && check_pkg_upgrade($installed, $available)) // outdated or not installed theme in repo + button_cell('Update'.$pkg_name, $installed ? _("Update") : _("Install"), + _('Upload and install latest extension package'), ICON_DOWN); + else + label_cell(''); + + if ($id !== null) { + delete_button_cell('Delete'.$id, _('Delete')); + submit_js_confirm('Delete'.$id, + sprintf(_("You are about to remove package \'%s\'.\nDo you want to continue ?"), + $ext['name'])); + } else + label_cell(''); + + end_row(); + } + + end_table(1); + + div_end(); + +//--------------------------------------------------------------------------------------------- +end_form(); + +end_page(); +?> \ No newline at end of file diff --git a/admin/inst_lang.php b/admin/inst_lang.php index ee44fdf4..e1fbd063 100644 --- a/admin/inst_lang.php +++ b/admin/inst_lang.php @@ -13,47 +13,139 @@ $page_security = 'SA_CREATELANGUAGE'; $path_to_root=".."; include_once($path_to_root . "/includes/session.inc"); -page(_($help_context = "Install/Update Languages")); - -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/packages.inc"); include_once($path_to_root . "/admin/db/maintenance_db.inc"); include_once($path_to_root . "/includes/ui.inc"); -//--------------------------------------------------------------------------------------------- +if ($use_popup_windows) + $js = get_js_open_window(900, 500); -if (isset($_GET['selected_id'])) -{ - $selected_id = $_GET['selected_id']; -} -elseif (isset($_POST['selected_id'])) -{ - $selected_id = $_POST['selected_id']; -} -else - $selected_id = -1; +page(_($help_context = "Install/Update Languages"), false, false, "", $js); + +simple_page_mode(true); //--------------------------------------------------------------------------------------------- +// +// Display all packages - both already installed and available from repository +// +function display_languages() +{ + global $table_style, $installed_languages, $dflt_lang; + + $th = array(_("Language"), _("Name"), _("Encoding"), _("Right To Left"), + _("Installed"), _("Available"), _("Default"), "", ""); + $currlang = $_SESSION["language"]->code; + + div_start('lang_tbl'); + start_form(); + // + // select/display system locales support for sites using native gettext + // + if (function_exists('gettext')) + { + if (check_value('DisplayAll')) + array_insert($th, 7, _("Supported")); + start_table(); + check_row(_('Display also languages not supported by server locales'), 'DisplayAll', null, true); + end_table(); + } + start_table(TABLESTYLE); + table_header($th); + + $k = 0; + + // get list of all (available and installed) langauges + $langs = get_languages_list(); + foreach ($langs as $pkg_name => $lng) + { + if ($lng == 'C') // skip default locale (aka no translation) + continue; + + $lang = $lng['code']; + $lang_name = $lng['name']; + $charset = $lng['encoding']; + $rtl = @$lng['rtl'] == 'yes' || @$lng['rtl'] === true; + $available = @$lng['available']; + $installed = @$lng['version']; + $id = @$lng['local_id']; + + if ($lang == $currlang) + start_row("class='stockmankobg'"); + else + alt_table_row_color($k); + + $support = $_SESSION['get_text']->check_support($lang, $charset); + + if (function_exists('gettext') && !$support && !get_post('DisplayAll')) continue; + + label_cell($lang); + label_cell($available ? get_package_view_str($lang, $lang_name) : $lang_name); + label_cell($charset); + label_cell($rtl ? _("Yes") : _("No")); + + label_cell($id === null ? _("None") : + ($available && $installed ? $installed : _("Unknown"))); + + label_cell($available ? $available : _("None")); + + label_cell($id === null ? '' : + radio(null, 'CurDflt', $id, $dflt_lang == $lang, true), + "align='center'"); + + if (function_exists('gettext') && check_value('DisplayAll')) + label_cell($support ? _("Yes") :_("No")); + + if (!$available && ($lang != 'C')) // manually installed language + button_cell('Edit'.$id, _("Edit"), _('Edit non standard language configuration'), + ICON_EDIT); + elseif (check_pkg_upgrade($installed, $available)) // outdated or not installed language in repo + button_cell('Update'.$pkg_name, $installed ? _("Update") : _("Install"), + _('Upload and install latest language package'), ICON_DOWN); + else + label_cell(''); + + if (($id !== null) && ($lang != $currlang) && ($lang != 'C')) { + delete_button_cell('Delete'.$id, _('Delete')); + submit_js_confirm('Delete'.$id, + sprintf(_("You are about to remove language \'%s\'.\nDo you want to continue ?"), + $lang_name)); + } else + label_cell(''); + end_row(); + } + end_table(); + display_note(_("The marked language is the current language which cannot be deleted."), 0, 0, "class='currentfg'"); + br(); + submit_center_first('Refresh', _("Update default"), '', null); + + submit_center_last('Add', _("Add new language manually"), '', false); + + end_form(); + div_end(); +} +//--------------------------------------------------------------------------------------------- +// Non standard (manually entered) languages support. +// function check_data() { - if ($_POST['code'] == "" || $_POST['name'] == "" || $_POST['encoding'] == "") { + global $installed_languages; + + if (get_post('code') == '' || get_post('name') == '' || get_post('encoding') == '') { display_error(_("Language name, code nor encoding cannot be empty")); return false; } + $id = array_search_value($_POST['code'], $installed_languages, 'code'); + if ($id !== null && $installed_languages[$id]['package'] != null) { + display_error(_('Standard package for this language is already installed. If you want to install this language manually, uninstall standard language package first.')); + return false; + } return true; } -//--------------------------------------------------------------------------------------------- - -function handle_submit() +function handle_submit($id) { - global $path_to_root, $installed_languages, $dflt_lang; - - if (!check_data()) - return false; - - $id = $_GET['id']; + global $path_to_root, $installed_languages, $dflt_lang, $Mode; if ($_POST['dflt']) { $dflt_lang = $_POST['code']; @@ -61,8 +153,11 @@ function handle_submit() $installed_languages[$id]['code'] = $_POST['code']; $installed_languages[$id]['name'] = $_POST['name']; + $installed_languages[$id]['path'] = 'lang/' . $_POST['code']; $installed_languages[$id]['encoding'] = $_POST['encoding']; $installed_languages[$id]['rtl'] = (bool)$_POST['rtl']; + $installed_languages[$id]['package'] = ''; + $installed_languages[$id]['version'] = ''; if (!write_lang()) return false; $directory = $path_to_root . "/lang/" . $_POST['code']; @@ -92,123 +187,30 @@ function handle_submit() //--------------------------------------------------------------------------------------------- -function handle_delete() -{ - global $path_to_root, $installed_languages, $dflt_lang; - - $id = $_GET['id']; - - $lang = $installed_languages[$id]['code']; - $filename = "$path_to_root/lang/$lang/LC_MESSAGES"; - - if ($lang == $dflt_lang ) { - // on delete set default to current. - $dflt_lang = $_SESSION['language']->code; - } - - unset($installed_languages[$id]); - $installed_languages = array_values($installed_languages); - - if (!write_lang()) - return; - - $filename = "$path_to_root/lang/$lang"; - flush_dir($filename); - rmdir($filename); - - meta_forward($_SERVER['PHP_SELF']); -} - -//--------------------------------------------------------------------------------------------- - -function display_languages() -{ - global $table_style, $installed_languages, $dflt_lang; - - $lang = $_SESSION["language"]->code; - - echo " - "; - start_table($table_style); - $th = array(_("Language"), _("Name"), _("Encoding"), _("Right To Left"), _("Default"), "", ""); - table_header($th); - - $k = 0; - $conn = $installed_languages; - $n = count($conn); - for ($i = 0; $i < $n; $i++) - { - if ($conn[$i]['code'] == $lang) - start_row("class='stockmankobg'"); - else - alt_table_row_color($k); - - label_cell($conn[$i]['code']); - label_cell($conn[$i]['name']); - label_cell($conn[$i]['encoding']); - if (isset($conn[$i]['rtl']) && $conn[$i]['rtl']) - $rtl = _("Yes"); - else - $rtl = _("No"); - label_cell($rtl); - label_cell($dflt_lang == $conn[$i]['code'] ? _("Yes") :_("No")); - $edit = _("Edit"); - $delete = _("Delete"); - if (user_graphic_links()) - { - $edit = set_icon(ICON_EDIT, $edit); - $delete = set_icon(ICON_DELETE, $delete); - } - label_cell("$edit"); - label_cell($conn[$i]['code'] == $lang ? '' : - "$delete"); - end_row(); - } - - end_table(); - display_note(_("The marked language is the current language which cannot be deleted."), 0, 0, "class='currentfg'"); -} - -//--------------------------------------------------------------------------------------------- - function display_language_edit($selected_id) { - global $installed_languages, $table_style2, $dflt_lang; + global $installed_languages, $dflt_lang; - if ($selected_id != -1) - $n = $selected_id; - else + if ($selected_id == -1) $n = count($installed_languages); - + else + $n = $selected_id; + start_form(true); - echo " - "; - - start_table($table_style2); + start_table(TABLESTYLE2); if ($selected_id != -1) { - $conn = $installed_languages[$selected_id]; - $_POST['code'] = $conn['code']; - $_POST['name'] = $conn['name']; - $_POST['encoding'] = $conn['encoding']; - if (isset($conn['rtl'])) - $_POST['rtl'] = $conn['rtl']; + $lang = $installed_languages[$n]; + $_POST['code'] = $lang['code']; + $_POST['name'] = $lang['name']; + $_POST['encoding'] = $lang['encoding']; + if (isset($lang['rtl']) && $lang['rtl'] === true) + $_POST['rtl'] = $lang['rtl']; else $_POST['rtl'] = false; - $_POST['dflt'] = $dflt_lang == $conn['code']; + $_POST['dflt'] = $dflt_lang == $lang['code']; hidden('selected_id', $selected_id); } text_row_ex(_("Language Code"), 'code', 20); @@ -223,41 +225,71 @@ function display_language_edit($selected_id) end_table(0); display_note(_("Select your language files from your local harddisk."), 0, 1); - echo "
"; + submit_add_or_update_center(false, '', 'both'); end_form(); } - -//--------------------------------------------------------------------------------------------- - -if (isset($_GET['c'])) +function handle_delete($id) { - if ($_GET['c'] == 'df') - { - handle_delete(); + global $path_to_root, $installed_languages, $dflt_lang; + + $lang = $installed_languages[$id]['code']; + if ($installed_languages[$id]['package']) + if (!uninstall_package($installed_languages[$id]['package'])) + return; + + if ($lang == $dflt_lang ) { + // on delete set default to current. + $dflt_lang = $_SESSION['language']->code; } + + unset($installed_languages[$id]); + $installed_languages = array_values($installed_languages); - if ($_GET['c'] == 'u') - { - if (handle_submit()) - { - //meta_forward($_SERVER['PHP_SELF']); - } + if (!write_lang()) + return; + + $dirname = "$path_to_root/lang/$lang"; + if ($lang && is_dir($dirname)) { // remove nonstadard language dir + flush_dir($dirname, true); + rmdir($dirname); } } //--------------------------------------------------------------------------------------------- -display_languages(); +if ($Mode == 'Delete') + handle_delete($selected_id); -hyperlink_no_params($_SERVER['PHP_SELF'], _("Create a new language")); +if ($Mode == 'ADD_ITEM' || $Mode == 'UPDATE_ITEM') + if (check_data() && handle_submit($selected_id)) + $Mode = 'RESET'; -display_language_edit($selected_id); +if ($id = find_submit('Update', false)) + install_language($id); +if (get_post('_CurDflt_update') || (get_post('Refresh') && get_post('CurDflt', -1) != -1)) { + $new_lang = $installed_languages[get_post('CurDflt', 0)]['code']; + if ($new_lang != $dflt_lang) { + $dflt_lang = $new_lang; + write_lang(); + $Ajax->activate('lang_tbl'); + } +} +if (get_post('_DisplayAll_update')) { + $Ajax->activate('lang_tbl'); +} + //--------------------------------------------------------------------------------------------- +if (isset($_GET['popup']) || get_post('Add') || $Mode == 'Edit' || $Mode == 'ADD_ITEM' || $Mode == 'UPDATE_ITEM') { + display_language_edit($selected_id); +} else + display_languages(); + +//--------------------------------------------------------------------------------------------- end_page(); ?> \ No newline at end of file diff --git a/admin/inst_module.php b/admin/inst_module.php index d8b00450..0e7cb534 100644 --- a/admin/inst_module.php +++ b/admin/inst_module.php @@ -12,7 +12,11 @@ $page_security = 'SA_CREATEMODULES'; $path_to_root=".."; include_once($path_to_root . "/includes/session.inc"); +include_once($path_to_root."/includes/packages.inc"); +if ($use_popup_windows) { + $js = get_js_open_window(900, 500); +} page(_($help_context = "Install/Activate extensions")); include_once($path_to_root . "/includes/date_functions.inc"); @@ -23,221 +27,148 @@ include_once($path_to_root . "/includes/ui.inc"); simple_page_mode(true); //--------------------------------------------------------------------------------------------- -function update_extensions($extensions) { - global $db_connections; - - if (!write_extensions($extensions)) { - display_notification(_("Cannot update system extensions list.")); - return false; - } - - // update per company files - $cnt = count($db_connections); - for($i = 0; $i < $cnt; $i++) - { - $newexts = $extensions; - // update 'active' status - $exts = get_company_extensions($i); - foreach ($exts as $key => $ext) - { - if (isset($newexts[$key])) - $newexts[$key]['active'] = $exts[$key]['active']; - } - if(!write_extensions($newexts, $i)) - { - display_notification(sprintf(_("Cannot update extensions list for company '%s'."), - $db_connections[$i]['name'])); - return false; - } - } - return true; -} - -function check_data($id, $exts) +function local_extension($id) { - if ($_POST['name'] == "") { - display_error(_("Extension name cannot be empty.")); - return false; - } - foreach($exts as $n =>$ext) { - if ($_POST['name'] == $ext['name'] && $id != $n) { - display_error(_("Extension name have to be unique.")); - return false; - } - } - - if ($_POST['title'] == "") { - display_error(_("Extension title cannot be empty.")); - return false; - } - if ($_POST['path'] == "") { - display_error(_("Extension folder name cannot be empty.")); - return false; - } - if ($id == -1 && !is_uploaded_file($_FILES['uploadfile']['tmp_name'])) { - display_error(_("You have to select plugin file to upload")); - return false; - } - return true; -} + global $next_extension_id, $Ajax, $path_to_root; -//--------------------------------------------------------------------------------------------- - -function handle_submit() -{ - global $path_to_root, $db_connections, $selected_id, $next_extension_id; - - $extensions = get_company_extensions(); - if (!check_data($selected_id, $extensions)) - return false; - $id = $selected_id==-1 ? $next_extension_id : $selected_id; - - if ($selected_id != -1 && $extensions[$id]['type'] != 'plugin') { - display_error(_('Module installation support is not implemented yet. You have to do it manually.')); - return; - } - - $extensions[$id]['tab'] = $_POST['tab']; - $extensions[$id]['name'] = $_POST['name']; - $extensions[$id]['path'] = $_POST['path']; - $extensions[$id]['title'] = $_POST['title']; - $extensions[$id]['active'] = check_value('active'); - - // Currently we support only plugin extensions here. - $extensions[$id]['type'] = 'plugin'; - $directory = $path_to_root . "/modules/" . $_POST['path']; - if (!file_exists($directory)) - { - mkdir($directory); - } - if (is_uploaded_file($_FILES['uploadfile']['tmp_name'])) - { - $extensions[$id]['filename'] = $_FILES['uploadfile']['name']; - $file1 = $_FILES['uploadfile']['tmp_name']; - $file2 = $directory . "/".$_FILES['uploadfile']['name']; - if (file_exists($file2)) - unlink($file2); - move_uploaded_file($file1, $file2); - } - else - $extensions[$id]['filename'] = get_post('filename'); - if (is_uploaded_file($_FILES['uploadfile2']['tmp_name'])) - { - $file1 = $_FILES['uploadfile2']['tmp_name']; - $file2 = $directory . "/".$_FILES['uploadfile2']['name']; - if (file_exists($file2)) - unlink($file2); - move_uploaded_file($file1, $file2); - $db_name = $_SESSION["wa_current_user"]->company; - db_import($file2, $db_connections[$db_name]); - } - - if (is_uploaded_file($_FILES['uploadfile3']['tmp_name'])) - { - $extensions[$id]['acc_file'] = $_FILES['uploadfile3']['name']; - $file1 = $_FILES['uploadfile3']['tmp_name']; - $file2 = $directory . "/".$_FILES['uploadfile3']['name']; - if (file_exists($file2)) - unlink($file2); - move_uploaded_file($file1, $file2); + $exts = get_company_extensions(); + $exts[$next_extension_id++] = array( + 'package' => $id, + 'name' => $id, + 'version' => '-', + 'available' => '', + 'type' => 'extension', + 'path' => 'modules/'.$id, + 'active' => false + ); + + if (file_exists($path_to_root.'/modules/'.$id.'/hooks.php')) { + include_once($path_to_root.'/modules/'.$id.'/hooks.php'); } - else - $extensions[$id]['acc_file'] = get_post('acc_file'); - - // security area guess for plugins - if ($extensions[$id]['type'] == 'plugin'){ - $exttext = file_get_contents($path_to_root.'/modules/' - .$extensions[$id]['path'].'/'.$extensions[$id]['filename']); - $area = 'SA_OPEN'; - if (preg_match('/.*\$page_security\s*=\s*[\'"]([^\'"]*)/', $exttext, $match)) { - $area = trim($match[1]); - } - $extensions[$id]['access'] = $area; + $hooks_class = 'hooks_'.$id; + if (class_exists($hooks_class, false)) { + $hooks = new $hooks_class; + $hooks->install_extension(false); } - - if ($selected_id == -1) - { - $next_extension_id++; - } - if (!update_extensions($extensions)) + $Ajax->activate('ext_tbl'); // refresh settings display + if (!update_extensions($exts)) return false; return true; } -function handle_delete() +function handle_delete($id) { - global $path_to_root, $db_connections, $selected_id; + global $path_to_root; $extensions = get_company_extensions(); - - $id = $selected_id; - - $filename = $path_to_root - . ($extensions[$id]['type']=='plugin' ? "/modules/": '/') - . $extensions[$id]['path']; - - flush_dir($filename); - rmdir($filename); + $ext = $extensions[$id]; + if ($ext['version'] != '-') { + if (!uninstall_package($ext['package'])) + return false; + } else { + @include_once($path_to_root.'/'.$ext['path'].'/hooks.php'); + $hooks_class = 'hooks_'.$ext['package']; + if (class_exists($hooks_class)) { + $hooks = new $hooks_class; + $hooks->uninstall_extension(false); + } + } unset($extensions[$id]); - if (update_extensions($extensions)) + if (update_extensions($extensions)) { display_notification(_("Selected extension has been successfully deleted")); + } return true; } - +// +// Helper for formating menu tabs/entries to be displayed in extension table +// +function fmt_titles($defs) +{ + if (!$defs) return ''; + foreach($defs as $def) { + $str[] = access_string($def['title'], true); + } + return implode('
', array_values($str)); +} //--------------------------------------------------------------------------------------------- - +// +// Display list of all extensions - installed and available from repository +// function display_extensions() { - global $table_style; + global $installed_extensions; + + div_start('ext_tbl'); + start_table(TABLESTYLE); - start_table($table_style); - $th = array(_("Name"),_("Tab"), _("Link text"), _("Folder"), _("Filename"), - _("Access extensions"),"", ""); + $th = array(_("Extension"),_("Modules provided"), _("Options provided"), + _("Installed"), _("Available"), "", ""); table_header($th); $k = 0; - $mods = get_company_extensions(); - $mods = array_natsort($mods, null, 'name'); + $mods = get_extensions_list('extension'); - foreach($mods as $i => $mod) + foreach($mods as $pkg_name => $ext) { - $is_mod = $mod['type'] == 'module'; - alt_table_row_color($k); - label_cell($mod['name']); - label_cell( $is_mod ? - $mod['title'] : access_string($_SESSION['App']->applications[$mod['tab']]->name, true)); - $ttl = access_string($mod['title']); - label_cell($ttl[0]); - label_cell($mod['path']); - label_cell($mod['filename']); - label_cell(@$mod['acc_file']); - if ($is_mod) - { - label_cell(''); // not implemented (yet) - } + $available = @$ext['available']; + $installed = @$ext['version']; + $id = @$ext['local_id']; + $is_mod = $ext['type'] == 'module'; + + $entries = fmt_titles(@$ext['entries']); + $tabs = fmt_titles(@$ext['tabs']); + + alt_table_row_color($k); +// label_cell(is_array($ext['Descr']) ? $ext['Descr'][0] : $ext['Descr']); + label_cell($available ? get_package_view_str($pkg_name, $ext['name']) : $ext['name']); + label_cell($tabs); + label_cell($entries); + + label_cell($id === null ? _("None") : + ($available && $installed ? $installed : _("Unknown"))); + label_cell($available ? $available : _("Unknown")); + + if (!$available && $ext['type'] == 'extension') {// third-party plugin + if (!$installed) + button_cell('Local'.$ext['package'], _("Install"), _('Install third-party extension.'), + ICON_DOWN); + else + label_cell(''); + } elseif (check_pkg_upgrade($installed, $available)) // outdated or not installed extension in repo + button_cell('Update'.$pkg_name, $installed ? _("Update") : _("Install"), + _('Upload and install latest extension package'), ICON_DOWN); else - { - edit_button_cell("Edit".$i, _("Edit")); - } - delete_button_cell("Delete".$i, _("Delete")); - submit_js_confirm('Delete'.$i, _('You are about to delete this extension\nDo you want to continue?')); + label_cell(''); + + if ($id !== null) { + delete_button_cell('Delete'.$id, _('Delete')); + submit_js_confirm('Delete'.$id, + sprintf(_("You are about to remove package \'%s\'.\nDo you want to continue ?"), + $ext['name'])); + } else + label_cell(''); + end_row(); } end_table(1); -} + submit_center_first('Refresh', _("Update"), '', null); + submit_center_last('Add', _("Add third-party extension"), '', false); + + div_end(); +} +//--------------------------------------------------------------------------------- +// +// Get all installed extensions and display +// with current status stored in company directory. +// function company_extensions($id) { - global $table_style; - - start_table($table_style); + start_table(TABLESTYLE); - $th = array(_("Name"),_("Tab"), _("Link text"), _("Active")); + $th = array(_("Extension"),_("Modules provided"), _("Options provided"), _("Active")); - // get all available extensions and display - // with current status stored in company directory. - $mods = get_company_extensions(); $exts = get_company_extensions($id); foreach($mods as $key => $ins) { @@ -252,90 +183,65 @@ function company_extensions($id) $k = 0; foreach($mods as $i => $mod) { + if ($mod['type'] != 'extension') continue; alt_table_row_color($k); label_cell($mod['name']); - label_cell( $mod['type'] == 'module' ? - $mod['title'] : access_string($_SESSION['App']->applications[$mod['tab']]->name, true)); - $ttl = access_string($mod['title']); - label_cell($ttl[0]); + $entries = fmt_titles(@$mod['entries']); + $tabs = fmt_titles(@$mod['tabs']); + label_cell($tabs); + label_cell($entries); + check_cells(null, 'Active'.$i, @$mod['active'] ? 1:0, false, false, "align='center'"); end_row(); } end_table(1); - submit_center('Update', _('Update'), true, false, 'default'); + submit_center('Refresh', _('Update'), true, false, 'default'); } //--------------------------------------------------------------------------------------------- - -function display_ext_edit($selected_id) -{ - global $table_style2, $Mode; - - - $extensions = get_company_extensions(); - - start_table($table_style2); - - if ($selected_id != -1 && $extensions[$selected_id]['type'] == 'plugin') - { - if ($Mode == 'Edit') { - $mod = $extensions[$selected_id]; - $_POST['tab'] = $mod['tab']; - $_POST['name'] = $mod['name']; - $_POST['title'] = $mod['title']; - $_POST['path'] = $mod['path']; - $_POST['filename'] = $mod['filename']; - $_POST['acc_file'] = @$mod['acc_file']; - hidden('filename', $_POST['filename']); - hidden('acc_file', $_POST['acc_file']); - } - hidden('selected_id', $selected_id); - } - text_row_ex(_("Name"), 'name', 30); - text_row_ex(_("Folder"), 'path', 20); - - tab_list_row(_("Menu Tab"), 'tab', null, true); - text_row_ex(_("Menu Link Text"), 'title', 30); - - record_status_list_row(_("Default status"), 'active'); - - file_row(_("Module File"), 'uploadfile'); - file_row(_("Access Levels Extensions"), 'uploadfile3'); - file_row(_("SQL File"), 'uploadfile2'); - - end_table(0); - display_note(_("Select your module PHP file from your local harddisk."), 0, 1); - submit_add_or_update_center($selected_id == -1, '', 'both'); -} - -//--------------------------------------------------------------------------------------------- -if ($Mode=='ADD_ITEM' || $Mode == 'UPDATE_ITEM') { - if(handle_submit()) { - if ($selected_id != -1) - display_notification(_("Extension data has been updated.")); - else - display_notification(_("Extension has been installed.")); - $Mode = 'RESET'; - } -} if ($Mode == 'Delete') { - handle_delete(); + handle_delete($selected_id); $Mode = 'RESET'; } -if (get_post('Update')) { - $exts = get_company_extensions(); + +if (get_post('Refresh')) { + $comp = get_post('extset'); + $exts = get_company_extensions($comp); + + $result = true; foreach($exts as $i => $ext) { - $exts[$i]['active'] = check_value('Active'.$i); + if ($ext['package'] && ($ext['active'] ^ check_value('Active'.$i))) { + if (!$ext['active']) + $activated = activate_hooks($ext['package'], $comp); + else + $activated = hook_invoke($ext['package'], check_value('Active'.$i) ? + 'activate_extension':'deactivate_extension', $comp, false); + if ($activated !== null) + $result &= $activated; + if ($activated || ($activated === null)) + $exts[$i]['active'] = check_value('Active'.$i); + } } write_extensions($exts, get_post('extset')); if (get_post('extset') == user_company()) $installed_extensions = $exts; - display_notification(_('Current active extensions set has been saved.')); + + if(!$result) { + display_error(_('Status change for some extensions failed.')); + $Ajax->activate('ext_tbl'); // refresh settings display + }else + display_notification(_('Current active extensions set has been saved.')); } +if ($id = find_submit('Update', false)) + install_extension($id); + +if ($id = find_submit('Local', false)) + local_extension($id); + if ($Mode == 'RESET') { $selected_id = -1; @@ -347,21 +253,19 @@ start_form(true); if (list_updated('extset')) $Ajax->activate('_page_body'); +$set = get_post('extset', -1); + echo "
" . _('Extensions:') . "  "; echo extset_list('extset', null, true); echo "

"; -$set = get_post('extset', -1); -if ($set == -1) { +if ($set == -1) display_extensions(); - - display_ext_edit($selected_id); -} else { +else company_extensions($set); -} + //--------------------------------------------------------------------------------------------- end_form(); end_page(); - ?> \ No newline at end of file diff --git a/admin/inst_theme.php b/admin/inst_theme.php new file mode 100644 index 00000000..af640e88 --- /dev/null +++ b/admin/inst_theme.php @@ -0,0 +1,120 @@ +. +***********************************************************************/ +$page_security = 'SA_CREATEMODULES'; +$path_to_root=".."; +include_once($path_to_root . "/includes/session.inc"); +include_once($path_to_root."/includes/packages.inc"); + +if ($use_popup_windows) { + $js = get_js_open_window(900, 500); +} +page(_($help_context = "Install Themes"), false, false, '', $js); + +include_once($path_to_root . "/includes/date_functions.inc"); +include_once($path_to_root . "/admin/db/company_db.inc"); +include_once($path_to_root . "/admin/db/maintenance_db.inc"); +include_once($path_to_root . "/includes/ui.inc"); + +//--------------------------------------------------------------------------------------------- +// If theme is used in customer record set to default +// +function clean_user_themes($id) +{ + global $db_connections, $db, $installed_extensions; + + $theme = $installed_extensions[$id]['package']; + $comp = user_company(); + + foreach ($db_connections as $n => $conn) { + $db = $_SESSION["wa_current_user"]->set_db_connection($n); + $sql = "UPDATE {$conn['tbpref']}users SET theme='default' WHERE theme='$theme'"; + if (!db_query($sql, 'Cannot update user theme settings')) + return false; + } + $db = $_SESSION["wa_current_user"]->set_db_connection($comp); + + $_SESSION['wa_current_user']->prefs->theme = 'default'; + return true; +} + +if (($id = find_submit('Delete', false)) && clean_user_themes($id)) +{ + $extensions = get_company_extensions(); + $theme = $extensions[$id]['package']; + if (uninstall_package($theme)) { + $dirname = $path_to_root.'/themes/'.$theme; + flush_dir($dirname, true); + rmdir($dirname); + unset($extensions[$id]); + if (update_extensions($extensions)) { + display_notification(_("Selected theme has been successfully deleted")); + meta_forward($_SERVER['PHP_SELF']); + } + } +} + +if ($id = find_submit('Update', false)) + install_extension($id); + +//--------------------------------------------------------------------------------------------- +start_form(true); + + div_start('ext_tbl'); + start_table(TABLESTYLE); + + $th = array(_("Theme"), _("Installed"), _("Available"), "", ""); + table_header($th); + + $k = 0; + $mods = get_themes_list(); + + foreach($mods as $pkg_name => $ext) + { + $available = @$ext['available']; + $installed = @$ext['version']; + $id = @$ext['local_id']; + + alt_table_row_color($k); + +// label_cell(is_array($ext['Descr']) ? $ext['Descr'][0] : $ext['Descr']); + label_cell($available ? get_package_view_str($pkg_name, $ext['name']) : $ext['name']); + + label_cell($id === null ? _("None") : + ($available && $installed ? $installed : _("Unknown"))); + label_cell($available ? $available : _("None")); + + if ($available && check_pkg_upgrade($installed, $available)) // outdated or not installed theme in repo + button_cell('Update'.$pkg_name, $installed ? _("Update") : _("Install"), + _('Upload and install latest extension package'), ICON_DOWN); + else + label_cell(''); + + if ($id !== null) { + delete_button_cell('Delete'.$id, _('Delete')); + submit_js_confirm('Delete'.$id, + sprintf(_("You are about to remove package \'%s\'.\nDo you want to continue ?"), + $ext['name'])); + } else + label_cell(''); + + end_row(); + } + + end_table(1); + + div_end(); + +//--------------------------------------------------------------------------------------------- +end_form(); + +end_page(); +?> \ No newline at end of file diff --git a/admin/inst_upgrade.php b/admin/inst_upgrade.php index 1d646af2..9691b22e 100644 --- a/admin/inst_upgrade.php +++ b/admin/inst_upgrade.php @@ -20,39 +20,6 @@ include_once($path_to_root . "/admin/db/company_db.inc"); include_once($path_to_root . "/admin/db/maintenance_db.inc"); include_once($path_to_root . "/includes/ui.inc"); -// -// Checks $field existence in $table with given field $properties -// $table - table name without prefix -// $field - optional field name -// $properties - optional properties of field defined by MySQL: -// 'Type', 'Null', 'Key', 'Default', 'Extra' -// -function check_table($pref, $table, $field=null, $properties=null) -{ - $tables = @db_query("SHOW TABLES LIKE '".$pref.$table."'"); - if (!db_num_rows($tables)) - return 1; // no such table or error - - $fields = @db_query("SHOW COLUMNS FROM ".$pref.$table); - if (!isset($field)) - return 0; // table exists - - while( $row = db_fetch_assoc($fields)) - { - if ($row['Field'] == $field) - { - if (!isset($properties)) - return 0; - foreach($properties as $property => $value) - { - if ($row[$property] != $value) - return 3; // failed type/length check - } - return 0; // property check ok. - } - } - return 2; // field not found -} // // Creates table of installer objects sorted by version. // @@ -69,7 +36,7 @@ function get_installers() while(false !== ($fname = readdir($datadir))) { // check all php files but index.php if (!is_dir($patchdir . $fname) && ($fname != 'index.php') - && stristr($fname, '.php') != false) + && stristr($fname, '.php') != false && $fname[0] != '.') { unset($install); include_once($patchdir . $fname); @@ -102,10 +69,16 @@ function upgrade_step($index, $conn) if (!$inst->pre_check($pref, $force)) return false; $sql = $inst->sql; + error_log(sprintf(_("Database upgrade for company '%s' (%s:%s*) started..."), + $conn['name'], $conn['dbname'], $conn['tbpref'])); + if ($sql != '') $ret &= db_import($path_to_root.'/sql/'.$sql, $conn, $force); $ret &= $inst->install($pref, $force); + + error_log(_("Database upgrade finished.")); + } else if ($state!==true) { display_error(_("Upgrade cannot be done because database has been already partially upgraded. Please downgrade database to clean previous version or try forced upgrade.")); @@ -115,26 +88,16 @@ function upgrade_step($index, $conn) return $ret; } -function db_open($conn) -{ - $db = mysql_connect($conn["host"] ,$conn["dbuser"], $conn["dbpassword"]); - if (!$db) - return false; - if (!mysql_select_db($conn["dbname"], $db)) - return false; - return $db; -} - $installers = get_installers(); if (get_post('Upgrade')) { $ret = true; - foreach ($db_connections as $conn) + foreach ($db_connections as $comp => $conn) { // connect to database - if (!($db = db_open($conn))) + if (!(set_global_connection($comp))) { display_error(_("Cannot connect to database for company") ." '".$conn['name']."'"); @@ -156,6 +119,7 @@ if (get_post('Upgrade')) // db_close($conn); ? if (!$ret) break; } + set_global_connection(); if($ret) { // re-read the prefs global $path_to_root; @@ -164,11 +128,12 @@ if (get_post('Upgrade')) $_SESSION["wa_current_user"]->prefs = new user_prefs($user); display_notification(_('All companies data has been successfully updated')); } + refresh_sys_prefs(); // re-read system setup $Ajax->activate('_page_body'); } start_form(); -start_table($table_style); +start_table(TABLESTYLE); $th = array(_("Version"), _("Description"), _("Sql file"), _("Install"), _("Force upgrade")); table_header($th); diff --git a/admin/payment_terms.php b/admin/payment_terms.php index 8200241a..76ccd53e 100644 --- a/admin/payment_terms.php +++ b/admin/payment_terms.php @@ -18,83 +18,70 @@ page(_($help_context = "Payment Terms")); include($path_to_root . "/includes/ui.inc"); simple_page_mode(true); + +//------------------------------ +// Helper to translate record content to more intuitive form +// +function term_days($myrow) +{ + return $myrow["day_in_following_month"] != 0 ? $myrow["day_in_following_month"] : + $myrow["days_before_due"]; +} + +function term_type($myrow) +{ + if ($myrow["day_in_following_month"] != 0) + return PTT_FOLLOWING; + + $days = $myrow["days_before_due"]; + + return $days < 0 ? PTT_PRE : ($days ? PTT_DAYS : PTT_CASH); +} + //------------------------------------------------------------------------------------------- if ($Mode=='ADD_ITEM' || $Mode=='UPDATE_ITEM') { - $inpug_error = 0; + $input_error = 0; if (!is_numeric($_POST['DayNumber'])) { - $inpug_error = 1; + $input_error = 1; display_error( _("The number of days or the day in the following month must be numeric.")); set_focus('DayNumber'); } elseif (strlen($_POST['terms']) == 0) { - $inpug_error = 1; + $input_error = 1; display_error( _("The Terms description must be entered.")); set_focus('terms'); - } // there should be no limits by 30 here if they want longer payment terms. Joe Hunt 2010-05-31 - //elseif ($_POST['DayNumber'] > 30 && !check_value('DaysOrFoll')) - //{ - // $inpug_error = 1; - // display_error( _("When the check box to indicate a day in the following month is the due date, the due date cannot be a day after the 30th. A number between 1 and 30 is expected.")); - // set_focus('DayNumber'); - //} - // No constrain on day values, Joe Hunt 2010-06-18. - //elseif ($_POST['DayNumber'] > 500 && check_value('DaysOrFoll')) - //{ - // $inpug_error = 1; - // display_error( _("When the check box is not checked to indicate that the term expects a number of days after which accounts are due, the number entered should be less than 500 days.")); - // set_focus('DayNumber'); - //} + } if ($_POST['DayNumber'] == '') $_POST['DayNumber'] = 0; - if ($inpug_error != 1) + if ($input_error != 1) { + $type = get_post('type'); + $days = input_num('DayNumber'); + $from_now = ($type != PTT_FOLLOWING); + if ($type == PTT_CASH) + $days = 0; + if ($type == PTT_PRE) + $days = -1; + if ($selected_id != -1) { - if (check_value('DaysOrFoll')) - { - $sql = "UPDATE ".TB_PREF."payment_terms SET terms=" . db_escape($_POST['terms']) . ", - day_in_following_month=0, - days_before_due=" . db_escape($_POST['DayNumber']) . " - WHERE terms_indicator = " .db_escape($selected_id); - } - else - { - $sql = "UPDATE ".TB_PREF."payment_terms SET terms=" . db_escape($_POST['terms']) . ", - day_in_following_month=" . db_escape($_POST['DayNumber']) . ", - days_before_due=0 - WHERE terms_indicator = " .db_escape( $selected_id ); - } + update_payment_terms($selected_id, $from_now, $_POST['terms'], $days); $note = _('Selected payment terms have been updated'); } else { - - if (check_value('DaysOrFoll')) - { - $sql = "INSERT INTO ".TB_PREF."payment_terms (terms, - days_before_due, day_in_following_month) - VALUES (" . - db_escape($_POST['terms']) . ", " . db_escape($_POST['DayNumber']) . ", 0)"; - } - else - { - $sql = "INSERT INTO ".TB_PREF."payment_terms (terms, - days_before_due, day_in_following_month) - VALUES (" . db_escape($_POST['terms']) . ", - 0, " . db_escape($_POST['DayNumber']) . ")"; - } + add_payment_terms($from_now, $_POST['terms'], $days); $note = _('New payment terms have been added'); } //run the sql from either of the above possibilites - db_query($sql,"The payment term could not be added or updated"); display_notification($note); $Mode = 'RESET'; } @@ -103,29 +90,20 @@ if ($Mode=='ADD_ITEM' || $Mode=='UPDATE_ITEM') if ($Mode == 'Delete') { // PREVENT DELETES IF DEPENDENT RECORDS IN debtors_master - - $sql= "SELECT COUNT(*) FROM ".TB_PREF."debtors_master WHERE payment_terms = ".db_escape($selected_id); - $result = db_query($sql,"check failed"); - $myrow = db_fetch_row($result); - if ($myrow[0] > 0) + if (key_in_foreign_table($selected_id, 'debtors_master', 'payment_terms')) { display_error(_("Cannot delete this payment term, because customer accounts have been created referring to this term.")); } else { - $sql= "SELECT COUNT(*) FROM ".TB_PREF."suppliers WHERE payment_terms = ".db_escape($selected_id); - $result = db_query($sql,"check failed"); - $myrow = db_fetch_row($result); - if ($myrow[0] > 0) + if (key_in_foreign_table($selected_id, 'suppliers', 'payment_terms')) { display_error(_("Cannot delete this payment term, because supplier accounts have been created referring to this term")); } else { //only delete if used in neither customer or supplier accounts - - $sql="DELETE FROM ".TB_PREF."payment_terms WHERE terms_indicator=".db_escape($selected_id); - db_query($sql,"could not delete a payment terms"); + delete_payment_terms($selected_id); display_notification(_('Selected payment terms have been deleted')); } } @@ -142,90 +120,68 @@ if ($Mode == 'RESET') } //------------------------------------------------------------------------------------------------- -$sql = "SELECT * FROM ".TB_PREF."payment_terms"; -if (!check_value('show_inactive')) $sql .= " WHERE !inactive"; -$result = db_query($sql,"could not get payment terms"); +$result = get_payment_terms_all(check_value('show_inactive')); start_form(); -start_table($table_style); -$th = array(_("Description"), _("Following Month On"), _("Due After (Days)"), "", ""); +start_table(TABLESTYLE); +$th = array(_("Description"), _("Type"), _("Due After/Days"), "", ""); inactive_control_column($th); table_header($th); $k = 0; //row colour counter while ($myrow = db_fetch($result)) { - if ($myrow["day_in_following_month"] == 0) - { - $full_text = _("N/A"); - } - else - { - $full_text = $myrow["day_in_following_month"]; - } - - if ($myrow["days_before_due"] == 0) - { - $after_text = _("N/A"); - } - else - { - $after_text = $myrow["days_before_due"] . " " . _("days"); - } alt_table_row_color($k); - + $type = term_type($myrow); + $days = term_days($myrow); label_cell($myrow["terms"]); - label_cell($full_text); - label_cell($after_text); + label_cell($pterm_types[$type]); + label_cell($type == PTT_DAYS ? "$days "._("days") : ($type == PTT_FOLLOWING ? $days : _("N/A"))); inactive_control_cell($myrow["terms_indicator"], $myrow["inactive"], 'payment_terms', "terms_indicator"); edit_button_cell("Edit".$myrow["terms_indicator"], _("Edit")); delete_button_cell("Delete".$myrow["terms_indicator"], _("Delete")); end_row(); - -} //END WHILE LIST LOOP +} inactive_control_row($th); end_table(1); //------------------------------------------------------------------------------------------------- +if (list_updated('type')) { + $Ajax->activate('edits'); +} -start_table($table_style2); +div_start('edits'); + +start_table(TABLESTYLE2); $day_in_following_month = $days_before_due = 0; if ($selected_id != -1) { if ($Mode == 'Edit') { //editing an existing payment terms - $sql = "SELECT * FROM ".TB_PREF."payment_terms - WHERE terms_indicator=".db_escape($selected_id); - - $result = db_query($sql,"could not get payment term"); - $myrow = db_fetch($result); + $myrow = get_payment_terms($selected_id); $_POST['terms'] = $myrow["terms"]; - $days_before_due = $myrow["days_before_due"]; - $day_in_following_month = $myrow["day_in_following_month"]; - unset($_POST['DayNumber']); + $_POST['DayNumber'] = term_days($myrow); + $_POST['type'] = term_type($myrow); } hidden('selected_id', $selected_id); } -text_row(_("Terms Description:"), 'terms', null, 40, 40); -check_row(_("Due After A Given No. Of Days:"), 'DaysOrFoll', $day_in_following_month == 0); +text_row(_("Terms Description:"), 'terms', null, 40, 40); -if (!isset($_POST['DayNumber'])) -{ - if ($days_before_due != 0) - $_POST['DayNumber'] = $days_before_due; - else - $_POST['DayNumber'] = $day_in_following_month; -} +payment_type_list_row(_("Payment type:"), 'type', null, true); -text_row_ex(_("Days (Or Day In Following Month):"), 'DayNumber', 3); +if ( in_array(get_post('type'), array(PTT_FOLLOWING, PTT_DAYS))) + text_row_ex(_("Days (Or Day In Following Month):"), 'DayNumber', 3); +else + hidden('DayNumber', 0); end_table(1); +div_end(); submit_add_or_update_center($selected_id == -1, '', 'both'); diff --git a/admin/print_profiles.php b/admin/print_profiles.php index 5b387534..fb959dfb 100644 --- a/admin/print_profiles.php +++ b/admin/print_profiles.php @@ -23,13 +23,13 @@ $selected_id = get_post('profile_id',''); // Returns array of defined reports // function get_reports() { - global $path_to_root, $comp_path, $go_debug; + global $path_to_root, $go_debug; if ($go_debug || !isset($_SESSION['reports'])) { // to save time, store in session. $paths = array ( $path_to_root.'/reporting/', - $comp_path .'/'. user_company() . '/reporting/'); + company_path(). '/reporting/'); $reports = array( '' => _('Default printing destination')); foreach($paths as $dirno => $path) { @@ -77,9 +77,7 @@ function check_delete($name) { // check if selected profile is used by any user if ($name=='') return 0; // cannot delete system default profile - $sql = "SELECT * FROM ".TB_PREF."users WHERE print_profile=".db_escape($name); - $res = db_query($sql,'cannot check printing profile usage'); - return db_num_rows($res); + return key_in_foreign_table($name, 'users', 'print_profile'); } //------------------------------------------------------------------------------------------- if ( get_post('submit')) @@ -146,7 +144,7 @@ while ($myrow = db_fetch($result)) { $prints[$myrow['report']] = $myrow['printer']; } -start_table($table_style); +start_table(TABLESTYLE); $th = array(_("Report Id"), _("Description"), _("Printer")); table_header($th); diff --git a/admin/printers.php b/admin/printers.php index d46afeeb..8d11b726 100644 --- a/admin/printers.php +++ b/admin/printers.php @@ -59,18 +59,14 @@ if ($Mode == 'Delete') { // PREVENT DELETES IF DEPENDENT RECORDS IN print_profiles - $sql= "SELECT COUNT(*) FROM ".TB_PREF."print_profiles WHERE printer = ".db_escape($selected_id); - $result = db_query($sql,"check printers relations failed"); - $myrow = db_fetch_row($result); - if ($myrow[0] > 0) + if (key_in_foreign_table($selected_id, 'print_profiles', 'printer')) { display_error(_("Cannot delete this printer definition, because print profile have been created using it.")); } else { - $sql="DELETE FROM ".TB_PREF."printers WHERE id=".db_escape($selected_id); - db_query($sql,"could not delete printer definition"); - display_notification(_('Selected printer definition has been deleted')); + delete_printer($selected_id); + display_notification(_('Selected printer definition has been deleted')); } $Mode = 'RESET'; } @@ -84,7 +80,7 @@ if ($Mode == 'RESET') $result = get_all_printers(); start_form(); -start_table($table_style); +start_table(TABLESTYLE); $th = array(_("Name"), _("Description"), _("Host"), _("Printer Queue"),'',''); table_header($th); @@ -112,7 +108,7 @@ echo '
'; start_form(); -start_table($table_style2); +start_table(TABLESTYLE2); if ($selected_id != -1) { diff --git a/admin/security_roles.php b/admin/security_roles.php index bce6661f..2727af4c 100644 --- a/admin/security_roles.php +++ b/admin/security_roles.php @@ -173,7 +173,7 @@ if (!isset($_POST['role']) || get_post('clone') || list_updated('role')) { start_form(); -start_table("class='tablestyle_noborder'"); +start_table(TABLESTYLE_NOBORDER); start_row(); security_roles_list_cells(_("Role:"). " ", 'role', null, true, true, check_value('show_inactive')); $new_role = get_post('role')==''; @@ -191,13 +191,13 @@ if (find_submit('_Section')) { } //----------------------------------------------------------------------------------------------- div_start('details'); -start_table($table_style2); +start_table(TABLESTYLE2); text_row(_("Role name:"), 'name', null, 20, 22); text_row(_("Role description:"), 'description', null, 50, 52); record_status_list_row(_("Current status:"), 'inactive'); end_table(1); - start_table("$table_style width=40%"); + start_table(TABLESTYLE, "width=40%"); $k = $j = 0; //row colour counter $ext = $sec = $m = -1; diff --git a/admin/shipping_companies.php b/admin/shipping_companies.php index 19f034b7..cb994d3f 100644 --- a/admin/shipping_companies.php +++ b/admin/shipping_companies.php @@ -14,6 +14,7 @@ $path_to_root=".."; include($path_to_root . "/includes/session.inc"); page(_($help_context = "Shipping Company")); include($path_to_root . "/includes/ui.inc"); +include($path_to_root . "/admin/db/shipping_db.inc"); simple_page_mode(true); //---------------------------------------------------------------------------------------------- @@ -32,15 +33,7 @@ function can_process() //---------------------------------------------------------------------------------------------- if ($Mode=='ADD_ITEM' && can_process()) { - - $sql = "INSERT INTO ".TB_PREF."shippers (shipper_name, contact, phone, phone2, address) - VALUES (" . db_escape($_POST['shipper_name']) . ", " . - db_escape($_POST['contact']). ", " . - db_escape($_POST['phone']). ", " . - db_escape($_POST['phone2']). ", " . - db_escape($_POST['address']) . ")"; - - db_query($sql,"The Shipping Company could not be added"); + add_shipper($_POST['shipper_name'], $_POST['contact'], $_POST['phone'], $_POST['phone2'], $_POST['address']); display_notification(_('New shipping company has been added')); $Mode = 'RESET'; } @@ -49,15 +42,7 @@ if ($Mode=='ADD_ITEM' && can_process()) if ($Mode=='UPDATE_ITEM' && can_process()) { - - $sql = "UPDATE ".TB_PREF."shippers SET shipper_name=" . db_escape($_POST['shipper_name']). " , - contact =" . db_escape($_POST['contact']). " , - phone =" . db_escape($_POST['phone']). " , - phone2 =" . db_escape($_POST['phone2']). " , - address =" . db_escape($_POST['address']). " - WHERE shipper_id = ".db_escape($selected_id); - - db_query($sql,"The shipping company could not be updated"); + update_shipper($selected_id, $_POST['shipper_name'], $_POST['contact'], $_POST['phone'], $_POST['phone2'], $_POST['address']); display_notification(_('Selected shipping company has been updated')); $Mode = 'RESET'; } @@ -68,10 +53,7 @@ if ($Mode == 'Delete') { // PREVENT DELETES IF DEPENDENT RECORDS IN 'sales_orders' - $sql= "SELECT COUNT(*) FROM ".TB_PREF."sales_orders WHERE ship_via=".db_escape($selected_id); - $result = db_query($sql,"check failed"); - $myrow = db_fetch_row($result); - if ($myrow[0] > 0) + if (key_in_foreign_table($selected_id, 'sales_orders', 'ship_via')) { $cancel_delete = 1; display_error(_("Cannot delete this shipping company because sales orders have been created using this shipper.")); @@ -79,19 +61,14 @@ if ($Mode == 'Delete') else { // PREVENT DELETES IF DEPENDENT RECORDS IN 'debtor_trans' - - $sql= "SELECT COUNT(*) FROM ".TB_PREF."debtor_trans WHERE ship_via=".db_escape($selected_id); - $result = db_query($sql,"check failed"); - $myrow = db_fetch_row($result); - if ($myrow[0] > 0) + if (key_in_foreign_table($selected_id, 'debtor_trans', 'ship_via')) { $cancel_delete = 1; display_error(_("Cannot delete this shipping company because invoices have been created using this shipping company.")); } else { - $sql="DELETE FROM ".TB_PREF."shippers WHERE shipper_id=".db_escape($selected_id); - db_query($sql,"could not delete shipper"); + delete_shipper($selected_id); display_notification(_('Selected shipping company has been deleted')); } } @@ -107,13 +84,10 @@ if ($Mode == 'RESET') } //---------------------------------------------------------------------------------------------- -$sql = "SELECT * FROM ".TB_PREF."shippers"; -if (!check_value('show_inactive')) $sql .= " WHERE !inactive"; -$sql .= " ORDER BY shipper_id"; -$result = db_query($sql,"could not get shippers"); +$result = get_shippers(check_value('show_inactive')); start_form(); -start_table($table_style); +start_table(TABLESTYLE); $th = array(_("Name"), _("Contact Person"), _("Phone Number"), _("Secondary Phone"), _("Address"), "", ""); inactive_control_column($th); table_header($th); @@ -139,17 +113,14 @@ end_table(1); //---------------------------------------------------------------------------------------------- -start_table($table_style2); +start_table(TABLESTYLE2); if ($selected_id != -1) { if ($Mode == 'Edit') { //editing an existing Shipper - $sql = "SELECT * FROM ".TB_PREF."shippers WHERE shipper_id=".db_escape($selected_id); - - $result = db_query($sql, "could not get shipper"); - $myrow = db_fetch($result); + $myrow = get_shipper($selected_id); $_POST['shipper_name'] = $myrow["shipper_name"]; $_POST['contact'] = $myrow["contact"]; diff --git a/admin/system_diagnostics.php b/admin/system_diagnostics.php index 4f941e94..94dc8aa3 100644 --- a/admin/system_diagnostics.php +++ b/admin/system_diagnostics.php @@ -17,322 +17,11 @@ include($path_to_root . "/includes/session.inc"); page(_($help_context = "System Diagnostics")); include($path_to_root . "/includes/ui.inc"); - -// Type of requirement for positive test result -$test_level = array( - 0 => _('Info'), - 1 => _('Optional'), - 2 => _('Recomended'), - 3 => _('Required ') -); - -$system_tests = array('tst_mysql', 'tst_php', 'tst_server', 'tst_system', 'tst_browser', - 'tst_gettext', 'tst_debug', 'tst_logging', - 'tst_dbversion', 'tst_subdirs', 'tst_langs', 'tst_tmpdir', 'tst_sessionpath', - 'tst_dbconfig', 'tst_config', 'tst_extconfig' - ); - -function tst_mysql() -{ - $test['descr'] = _('MySQL version'). ' >3.23.58'; - $test['type'] = 3; - $test['test'] = mysql_get_server_info(); - $test['result'] = $test['test']>'3.23.58'; - $test['comments'] = _('Upgrade MySQL server to version at least 3.23.58'); - - return $test; -} - -function tst_php() -{ - $test['descr'] = _('PHP version').' >4.3.2'; - $test['type'] = 3; - $test['test'] = phpversion(); - $test['result'] = $test['test']>'4.3.2'; - $test['comments'] = _('Upgrade PHP to version at least 4.3.2'); - - return $test; -} - -function tst_system() -{ - $test['descr'] = _('Server system'); - $test['type'] = 0; - $test['test'] = PHP_OS; - $test['result'] = true; - - return $test; -} - -function tst_sessionpath() -{ - $test['descr'] = _('Session save path'); - $test['type'] = 0; - $test['test'] = session_save_path(); - $test['result'] = true; - - return $test; -} - -function tst_browser() -{ - $test['descr'] = _('Browser type'); - $test['type'] = 0; - $test['test'] = $_SERVER['HTTP_USER_AGENT']; - $test['result'] = true; - $test['comments'] = _('Any browser is supported'); - - return $test; -} - -function tst_server() -{ - $test['descr'] = _('Http server type'); - $test['test'] = $_SERVER['SERVER_SOFTWARE']; - $test['type'] = 0; - $test['result'] = true; - $test['comments'] = _('Any server is supported'); - - return $test; -} - -function tst_gettext() -{ - $test['descr'] = _('Native gettext'); - $test['test'] = function_exists('gettext') ? _('Yes'): _('No'); - $test['type'] = 1; - $test['result'] = true; - $test['comments'] = _('In case of no getext support, php emulation is used'); - - return $test; -} - -function tst_debug() -{ - global $go_debug; - $test['descr'] = _('Debugging mode'); - $test['type'] = 0; - $test['test'] = $go_debug ? _("Yes") : _("No"); - $test['result'] = $go_debug != 0; - $test['comments'] = _('To switch debugging on set $go_debug=1 in config.php file'); - - return $test; -} - -function tst_logging() -{ - global $error_logfile; - - $test['descr'] = _('Error logging'); - $test['type'] = 2; - // if error lgging is on, but log file does not exists try write - if ($error_logfile && !is_file($error_logfile)) - { - @fclose(@fopen($error_logfile, 'w')); - } - $test['result'] = @$error_logfile != '' && is_writable($error_logfile); - $test['test'] = @$error_logfile == '' ? _("Disabled") : $error_logfile; - - if (@$error_logfile == '') - $test['comments'] = _('To switch error logging set $error_logging in config.php file'); - else - if (!is_writable($error_logfile)) - $test['comments'] = _('Log file is not writeable'); - - return $test; -} -// -// Installed FA database structure version -// -function tst_dbversion() -{ - $test['descr'] = _('Current database version'); - $test['type'] = 3; - $test['test'] = get_company_pref('version_id'); - $test['result'] = $test['test'] == '2.2'; - $test['comments'] = _('Database structure seems to be not upgraded to current version') - .' (2.2)'; - - return $test; -} - - -function tst_subdirs() -{ - global $db_connections, $comp_path; - - $comp_subdirs = array('images', 'pdf_files', 'backup','js_cache'); - - $test['descr'] = _('Company subdirectories consistency'); - $test['type'] = 3; - $test['test'] = array($comp_path.'/*'); - foreach($comp_subdirs as $sub) { - $test['test'][] = $comp_path.'/*/'.$sub; - } - $test['result'] = true; - - if (!is_dir($comp_path) || !is_writable($comp_path) ) { - $test['result'] = false; - $test['comments'][] = sprintf(_("'%s' is not writeable"), $comp_path); - return $test; - }; - foreach ($db_connections as $n => $comp) { - $path = "$comp_path/$n"; - if (!is_dir($path) || !is_writable($path) ) { - $test['result'] = false; - $test['comments'][] = sprintf(_("'%s' is not writeable"), $path); - continue; - }; - foreach($comp_subdirs as $sub) { - $spath = $path.'/'.$sub; - if (!is_dir($spath) || !is_writable($spath) ) { - $test['result'] = false; - $test['comments'][] = sprintf(_("'%s' is not writeable"), $spath); - } else { - $dir = opendir($spath); - while (false !== ($fname = readdir($dir))) { - // check only *.js files. Manually installed package can contain other - // non-writable files which are non-crucial for normal operations - if (preg_match('/.*(\.js)/', $fname) && !is_writable("$spath/$fname")) { - $test['result'] = false; - $test['comments'][] = sprintf(_("'%s' is not writeable"), "$spath/$fname"); - } - } - } - } - } - return $test; -} - -function tst_tmpdir() -{ - global $path_to_root; - - $test['descr'] = _('Temporary directory'); - $test['type'] = 3; - $test['test'] = $path_to_root.'/tmp'; - $test['result'] = is_dir($test['test']) && is_writable($test['test']); - $test['comments'][] = sprintf(_("'%s' is not writeable"), $test['test']); - return $test; -} - -function tst_langs() -{ - global $installed_languages, $path_to_root; - - $test['descr'] = _('Language configuration consistency'); - $test['type'] = 3; - $test['result'] = true; - $test['comments'] = array(); - - $old = setlocale(LC_MESSAGES, '0'); - - $langs = array(); - - foreach ($installed_languages as $lang) { - $langs[] = $lang['code']; - if ($lang['code'] == 'en_GB') continue; // native FA language - - $file = $path_to_root.'/lang/'.$lang['code'].'/LC_MESSAGES/'.$lang['code']; - $file .= function_exists('gettext') ? '.mo' : '.po'; - - if (!is_file($file)) { - $test['result'] = false; - $test['comments'][] = sprintf( _('Missing %s translation file.'), $file); - } - if (!setlocale(LC_MESSAGES, $lang['code'].".".$lang['encoding'])) - { - $test['result'] = false; - $test['comments'][] = sprintf(_('Missing system locale: %s'), $lang['code'].".".$lang['encoding']); - }; - } - - setlocale(LC_MESSAGES, $old); - - $test['test'] = $langs; - - return $test; -} - -function tst_config() -{ - global $path_to_root; - - $test['descr'] = _('Main config file'); - $test['type'] = 2; - $test['test'] = $path_to_root.'/config.php'; - $test['result'] = is_file($test['test']) && !is_writable($test['test']); - $test['comments'][] = sprintf(_("'%s' file should be read-only"), $test['test']); - return $test; -} - -function tst_dbconfig() -{ - global $path_to_root; - - $test['descr'] = _('Database auth file'); - $test['type'] = 2; - $test['test'] = $path_to_root.'/config_db.php'; - $test['result'] = is_file($test['test']) && !is_writable($test['test']); - $test['comments'][] = sprintf(_("'%s' file should be read-only if you do not plan to add or change companies"), $test['test']); - - return $test; -} - -function tst_extconfig() -{ - global $path_to_root, $db_connections, $comp_path; - - $test['descr'] = _('Extensions configuration files'); - $test['type'] = 3; - $test['test'] = $path_to_root.'/installed_extensions.php'; - $test['result'] = is_file($test['test']) && is_writable($test['test']); - $test['test'] . ','.$comp_path.'/*/installed_extensions.php'; - $test['comments'][] = sprintf(_("'%s' file should be writeable"), $test['test']); - - foreach ($db_connections as $n => $comp) { - $path = "$comp_path/$n"; - if (!is_dir($path)) continue; - - $path .= "/installed_extensions.php"; - if (!is_file($path) || !is_writable($path) ) { - $test['result'] = false; - $test['comments'][] = sprintf(_("'%s' is not writeable"), $path); - continue; - }; - } - return $test; -} +include($path_to_root . "/includes/system_tests.inc"); //------------------------------------------------------------------------------------------------- -start_table("$table_style width=80%"); -$th = array(_("Test"), _('Test type'), _("Value"), _("Comments")); -table_header($th); - -$k = 0; //row colour counter -foreach ($system_tests as $test) -{ - alt_table_row_color($k); - $result = $test(); - if (!$result) continue; - label_cell($result['descr']); - label_cell($test_level[$result['type']]); - - $res = is_array(@$result['test']) ? implode('
', $result['test']) - : $result['test']; - label_cell($res); - - $comm = is_array(@$result['comments']) ? implode('
', $result['comments']) - : @$result['comments']; - $color = ($result['result'] ? 'green': - ($result['type']==3 ? 'red' : - ($result['type']==2 ? 'orange' : 'green'))); - label_cell("". - ($result['result'] ? _('Ok') : ''.$comm.'').''); - end_row(); -} +display_system_tests(); -end_table(); end_page(); ?> diff --git a/admin/tags.php b/admin/tags.php index f87d98d6..d6f46da9 100644 --- a/admin/tags.php +++ b/admin/tags.php @@ -124,7 +124,7 @@ if ($Mode == 'RESET') $result = get_tags($_POST['type'], check_value('show_inactive')); start_form(); -start_table($table_style); +start_table(TABLESTYLE); $th = array(_("Tag Name"), _("Tag Description"), "", ""); inactive_control_column($th); table_header($th); @@ -147,7 +147,7 @@ end_table(1); //----------------------------------------------------------------------------------- -start_table($table_style2); +start_table(TABLESTYLE2); if ($selected_id != -1) // We've selected a tag { diff --git a/admin/users.php b/admin/users.php index 6bf694bc..9fde1d93 100644 --- a/admin/users.php +++ b/admin/users.php @@ -62,9 +62,9 @@ if ($Mode=='ADD_ITEM' || $Mode=='UPDATE_ITEM') { if ($selected_id != -1) { - update_user($selected_id, $_POST['user_id'], $_POST['real_name'], $_POST['phone'], - $_POST['email'], $_POST['Access'], $_POST['language'], - $_POST['profile'], check_value('rep_popup'), $_POST['pos']); + update_user_prefs($selected_id, + get_post(array('user_id', 'real_name', 'phone', 'email', 'role_id', 'language', + 'print_profile', 'rep_popup' => 0, 'pos'))); if ($_POST['password'] != "") update_user_password($selected_id, $_POST['user_id'], md5($_POST['password'])); @@ -74,16 +74,14 @@ if ($Mode=='ADD_ITEM' || $Mode=='UPDATE_ITEM') else { add_user($_POST['user_id'], $_POST['real_name'], md5($_POST['password']), - $_POST['phone'], $_POST['email'], $_POST['Access'], $_POST['language'], - $_POST['profile'], check_value('rep_popup'), $_POST['pos']); + $_POST['phone'], $_POST['email'], $_POST['role_id'], $_POST['language'], + $_POST['print_profile'], check_value('rep_popup'), $_POST['pos']); $id = db_insert_id(); // use current user display preferences as start point for new user - update_user_display_prefs($id, user_price_dec(), user_qty_dec(), user_exrate_dec(), - user_percent_dec(), user_show_gl_info(), user_show_codes(), - user_date_format(), user_date_sep(), user_tho_sep(), - user_dec_sep(), user_theme(), user_pagesize(), user_hints(), - $_POST['profile'], check_value('rep_popup'), user_query_size(), - user_graphic_links(), $_POST['language'], sticky_doc_date(), user_startup_tab()); + $prefs = $_SESSION['wa_current_user']->prefs->get_all(); + + update_user_prefs($id, array_merge($prefs, get_post(array('print_profile', + 'rep_popup' => 0, 'language')))); display_notification_centered(_("A new user has been added.")); } @@ -111,7 +109,7 @@ if ($Mode == 'RESET') $result = get_users(check_value('show_inactive')); start_form(); -start_table($table_style); +start_table(TABLESTYLE); $th = array(_("User login"), _("Full Name"), _("Phone"), _("E-mail"), _("Last Visit"), _("Access Level"), "", ""); @@ -155,7 +153,7 @@ while ($myrow = db_fetch($result)) inactive_control_row($th); end_table(1); //------------------------------------------------------------------------------------------------- -start_table($table_style2); +start_table(TABLESTYLE2); $_POST['email'] = ""; if ($selected_id != -1) @@ -169,9 +167,9 @@ if ($selected_id != -1) $_POST['real_name'] = $myrow["real_name"]; $_POST['phone'] = $myrow["phone"]; $_POST['email'] = $myrow["email"]; - $_POST['Access'] = $myrow["role_id"]; + $_POST['role_id'] = $myrow["role_id"]; $_POST['language'] = $myrow["language"]; - $_POST['profile'] = $myrow["print_profile"]; + $_POST['print_profile'] = $myrow["print_profile"]; $_POST['rep_popup'] = $myrow["rep_popup"]; $_POST['pos'] = $myrow["pos"]; } @@ -185,7 +183,7 @@ else { //end of if $selected_id only do the else when a new record is being entered text_row(_("User Login:"), "user_id", null, 22, 20); $_POST['language'] = user_language(); - $_POST['profile'] = user_print_profile(); + $_POST['print_profile'] = user_print_profile(); $_POST['rep_popup'] = user_rep_popup(); $_POST['pos'] = user_pos(); } @@ -203,13 +201,13 @@ text_row_ex(_("Telephone No.:"), 'phone', 30); email_row_ex(_("Email Address:"), 'email', 50); -security_roles_list_row(_("Access Level:"), 'Access', null); +security_roles_list_row(_("Access Level:"), 'role_id', null); languages_list_row(_("Language:"), 'language', null); pos_list_row(_("User's POS"). ':', 'pos', null); -print_profiles_list_row(_("Printing profile"). ':', 'profile', null, +print_profiles_list_row(_("Printing profile"). ':', 'print_profile', null, _('Browser printing support')); check_row(_("Use popup window for reports:"), 'rep_popup', $_POST['rep_popup'], diff --git a/admin/view_print_transaction.php b/admin/view_print_transaction.php index b3e35f62..7e72bb33 100644 --- a/admin/view_print_transaction.php +++ b/admin/view_print_transaction.php @@ -18,6 +18,7 @@ include_once($path_to_root . "/includes/session.inc"); 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/transactions_db.inc"); include_once($path_to_root . "/reporting/includes/reporting.inc"); $js = ""; @@ -28,25 +29,44 @@ page(_($help_context = "View or Print Transactions"), false, false, "", $js); //---------------------------------------------------------------------------------------- function view_link($trans) { + if (!isset($trans['type'])) + $trans['type'] = $_POST['filterType']; return get_trans_view_str($trans["type"], $trans["trans_no"]); } function prt_link($row) { - if ($row['type'] != ST_CUSTPAYMENT && $row['type'] != ST_BANKDEPOSIT) // customer payment or bank deposit printout not defined yet. + if (!isset($row['type'])) + $row['type'] = $_POST['filterType']; + if ($row['type'] == ST_PURCHORDER || $row['type'] == ST_SALESORDER || $row['type'] == ST_SALESQUOTE || + $row['type'] == ST_WORKORDER) return print_document_link($row['trans_no'], _("Print"), true, $row['type'], ICON_PRINT); + else + return print_document_link($row['trans_no']."-".$row['type'], _("Print"), true, $row['type'], ICON_PRINT); } function gl_view($row) { + if (!isset($row['type'])) + $row['type'] = $_POST['filterType']; return get_gl_view_str($row["type"], $row["trans_no"]); } +function date_view($row) +{ + return $row['trans_date']; +} + +function ref_view($row) +{ + return $row['ref']; +} + function viewing_controls() { display_note(_("Only documents can be printed.")); - start_table("class='tablestyle_noborder'"); + start_table(TABLESTYLE_NOBORDER); start_row(); systypes_list_cells(_("Type:"), 'filterType', null, true); @@ -90,42 +110,22 @@ function check_valid_entries() function handle_search() { - global $table_style; if (check_valid_entries()==true) { - $db_info = get_systype_db_info($_POST['filterType']); - - if ($db_info == null) + $trans_ref = false; + $sql = get_sql_for_view_transactions($_POST['filterType'], $_POST['FromTransNo'], $_POST['ToTransNo'], $trans_ref); + if ($sql == "") return; - $table_name = $db_info[0]; - $type_name = $db_info[1]; - $trans_no_name = $db_info[2]; - $trans_ref = $db_info[3]; - - $sql = "SELECT DISTINCT $trans_no_name as trans_no"; - - if ($trans_ref) - $sql .= " ,$trans_ref "; - - $sql .= ", ".$_POST['filterType']." as type FROM $table_name - WHERE $trans_no_name >= ".db_escape($_POST['FromTransNo']). " - AND $trans_no_name <= ".db_escape($_POST['ToTransNo']); - - if ($type_name != null) - $sql .= " AND `$type_name` = ".db_escape($_POST['filterType']); - - $sql .= " ORDER BY $trans_no_name"; - - $print_type = $_POST['filterType']; $print_out = ($print_type == ST_SALESINVOICE || $print_type == ST_CUSTCREDIT || $print_type == ST_CUSTDELIVERY || - $print_type == ST_PURCHORDER || $print_type == ST_SALESORDER || $print_type == ST_SALESQUOTE); + $print_type == ST_PURCHORDER || $print_type == ST_SALESORDER || $print_type == ST_SALESQUOTE || + $print_type == ST_CUSTPAYMENT || $print_type == ST_SUPPAYMENT || $print_type == ST_WORKORDER); $cols = array( - _("#"), - _("Reference"), - _("View") => array('insert'=>true, 'fun'=>'view_link'), + _("#") => array('insert'=>true, 'fun'=>'view_link'), + _("Reference") => array('fun'=>'ref_view'), + _("Date") => array('type'=>'date', 'fun'=>'date_view'), _("Print") => array('insert'=>true, 'fun'=>'prt_link'), _("GL") => array('insert'=>true, 'fun'=>'gl_view') ); diff --git a/admin/void_transaction.php b/admin/void_transaction.php index 9fd0184b..6066d3ed 100644 --- a/admin/void_transaction.php +++ b/admin/void_transaction.php @@ -11,11 +11,13 @@ ***********************************************************************/ $page_security = 'SA_VOIDTRANSACTION'; $path_to_root = ".."; +include($path_to_root . "/includes/db_pager.inc"); include_once($path_to_root . "/includes/session.inc"); 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/transactions_db.inc"); include_once($path_to_root . "/admin/db/voiding_db.inc"); $js = ""; @@ -26,6 +28,7 @@ if ($use_popup_windows) page(_($help_context = "Void a Transaction"), false, false, "", $js); +simple_page_mode(true); //---------------------------------------------------------------------------------------- function exist_transaction($type, $type_no) { @@ -102,17 +105,82 @@ function exist_transaction($type, $type_no) return true; } +function view_link($trans) +{ + if (!isset($trans['type'])) + $trans['type'] = $_POST['filterType']; + return get_trans_view_str($trans["type"], $trans["trans_no"]); +} + +function select_link($row) +{ + if (!isset($row['type'])) + $row['type'] = $_POST['filterType']; + return button('Edit'.$row["trans_no"], _("Select"), _("Select"), ICON_EDIT); +} + +function gl_view($row) +{ + if (!isset($row['type'])) + $row['type'] = $_POST['filterType']; + return get_gl_view_str($row["type"], $row["trans_no"]); +} + +function date_view($row) +{ + return $row['trans_date']; +} + +function ref_view($row) +{ + return $row['ref']; +} + function voiding_controls() { - global $table_style2; - + global $selected_id; start_form(); - start_table($table_style2); + start_table(TABLESTYLE_NOBORDER); + start_row(); + + systypes_list_cells(_("Transaction Type:"), 'filterType', null, true); + if (list_updated('filterType')) + $selected_id = -1; + + end_row(); + end_table(1); + + $trans_ref = false; + $sql = get_sql_for_view_transactions($_POST['filterType'], null, null, $trans_ref); + if ($sql == "") + return; - systypes_list_row(_("Transaction Type:"), "filterType", null, true); + $cols = array( + _("#") => array('insert'=>true, 'fun'=>'view_link'), + _("Reference") => array('fun'=>'ref_view'), + _("Date") => array('type'=>'date', 'fun'=>'date_view'), + _("GL") => array('insert'=>true, 'fun'=>'gl_view'), + _("Select") => array('insert'=>true, 'fun'=>'select_link') + ); - text_row(_("Transaction #:"), 'trans_no', null, 12, 12); + $table =& new_db_pager('transactions', $sql, $cols); + $table->width = "40%"; + display_db_pager($table); + + start_table(TABLESTYLE2); + + if ($selected_id != -1) + { + hidden('trans_no', $selected_id); + hidden('selected_id', $selected_id); + } + else + { + hidden('trans_no', ''); + $_POST['memo_'] = ''; + } + label_row(_("Transaction #:"), ($selected_id==-1?'':$selected_id)); date_row(_("Voiding Date:"), 'date_'); @@ -135,11 +203,6 @@ function voiding_controls() else { display_warning(_("Are you sure you want to void this transaction ? This action cannot be undone."), 0, 1); - if ($_POST['filterType'] == ST_JOURNAL) // 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"), '', 'cancel'); @@ -241,6 +304,7 @@ if (isset($_POST['ConfirmVoiding'])) if (isset($_POST['CancelVoiding'])) { + $selected_id = -1; $Ajax->activate('_page_body'); } diff --git a/applications/application.php b/applications/application.php index cf8c7c39..430b20c8 100644 --- a/applications/application.php +++ b/applications/application.php @@ -116,12 +116,32 @@ function add_lapp_function($level, $label,$link="",$access='SA_OPEN') { $this->modules[$level]->lappfunctions[] = new app_function($label, $link, $access); - } - + } + function add_rapp_function($level, $label,$link="",$access='SA_OPEN') { $this->modules[$level]->rappfunctions[] = new app_function($label, $link, $access); - } + } + + function add_extensions() + { + hook_invoke_all('install_options', $this); + } + // + // Helper returning link to report class added by extension module. + // + function report_class_url($class) + { + global $installed_extensions; + + // TODO : konwencja lub ? + $classno = 7; +// if (file_exists($path_to_root.'/'.$mod['path'].'/'.$entry['url'] +// .'/'.'reporting/reports_custom.php')) + return "reporting/reports_main.php?Class=".$class; +// else +// return ''; + } } diff --git a/applications/customers.php b/applications/customers.php index 1a385b9e..d99e8fbb 100644 --- a/applications/customers.php +++ b/applications/customers.php @@ -13,7 +13,6 @@ class customers_app extends application { function customers_app() { - global $installed_extensions; $this->application("orders", _($this->help_context = "&Sales")); $this->add_module(_("Transactions")); @@ -76,16 +75,8 @@ class customers_app extends application "sales/manage/sales_areas.php?", 'SA_SALESAREA'); $this->add_rapp_function(2, _("Credit &Status Setup"), "sales/manage/credit_status.php?", 'SA_CRSTATUS'); - if (count($installed_extensions) > 0) - { - foreach ($installed_extensions as $mod) - { - if (@$mod['active'] && $mod['type'] == 'plugin' && $mod["tab"] == "orders") - $this->add_rapp_function(2, $mod["title"], - "modules/".$mod["path"]."/".$mod["filename"]."?", - isset($mod["access"]) ? $mod["access"] : 'SA_OPEN' ); - } - } + + $this->add_extensions(); } } diff --git a/applications/dimensions.php b/applications/dimensions.php index bf46ef8d..0af8fc75 100644 --- a/applications/dimensions.php +++ b/applications/dimensions.php @@ -13,7 +13,6 @@ class dimensions_app extends application { function dimensions_app() { - global $installed_extensions; $dim = get_company_pref('use_dimension'); $this->application("proj", _($this->help_context = "&Dimensions"), $dim); @@ -35,22 +34,10 @@ class dimensions_app extends application $this->add_module(_("Maintenance")); $this->add_lapp_function(2, _("Dimension &Tags"), "admin/tags.php?type=dimension", 'SA_DIMTAGS'); - - if (count($installed_extensions) > 0) - { - foreach ($installed_extensions as $mod) - { - if (@$mod['active'] && $mod['type'] == 'plugin' && $mod["tab"] == "proj") - { - $this->add_rapp_function(2, $mod["title"], - "modules/".$mod["path"]."/".$mod["filename"]."?", - isset($mod["access"]) ? $mod["access"] : 'SA_OPEN' ); - } - } - } + + $this->add_extensions(); } } } - ?> \ No newline at end of file diff --git a/applications/generalledger.php b/applications/generalledger.php index 8aca3627..1bbea0d4 100644 --- a/applications/generalledger.php +++ b/applications/generalledger.php @@ -1,19 +1,18 @@ . ***********************************************************************/ -class general_ledger_app extends application +class general_ledger_app extends application { - function general_ledger_app() + function general_ledger_app() { - global $installed_extensions; $this->application("GL", _($this->help_context = "&Banking and General Ledger")); $this->add_module(_("Transactions")); @@ -29,7 +28,9 @@ class general_ledger_app extends application "gl/gl_budget.php?", 'SA_BUDGETENTRY'); $this->add_rapp_function(0, _("&Reconcile Bank Account"), "gl/bank_account_reconcile.php?", 'SA_RECONCILE'); - + $this->add_rapp_function(0, _("Revenue / &Costs Accruals"), + "gl/accruals.php?", 'SA_ACCRUALS'); + $this->add_module(_("Inquiries and Reports")); $this->add_lapp_function(1, _("&Journal Inquiry"), "gl/inquiry/journal_inquiry.php?", 'SA_GLANALYTIC'); @@ -45,7 +46,7 @@ class general_ledger_app extends application $this->add_rapp_function(1, _("Balance &Sheet Drilldown"), "gl/inquiry/balance_sheet.php?", 'SA_GLANALYTIC'); $this->add_rapp_function(1, _("&Profit and Loss Drilldown"), - "gl/inquiry/profit_loss.php?", 'SA_GLANALYTIC'); + "gl/inquiry/profit_loss.php?", 'SA_GLANALYTIC'); $this->add_rapp_function(1, _("Banking &Reports"), "reporting/reports_main.php?Class=5", 'SA_BANKREP'); $this->add_rapp_function(1, _("General Ledger &Reports"), @@ -70,16 +71,11 @@ class general_ledger_app extends application "gl/manage/gl_account_types.php?", 'SA_GLACCOUNTGROUP'); $this->add_rapp_function(2, _("GL Account &Classes"), "gl/manage/gl_account_classes.php?", 'SA_GLACCOUNTCLASS'); - if (count($installed_extensions) > 0) - { - foreach ($installed_extensions as $mod) - { - if (@$mod['active'] && $mod['type'] == 'plugin' && $mod["tab"] == "GL") - $this->add_rapp_function(2, $mod["title"], - "modules/".$mod["path"]."/".$mod["filename"]."?", - isset($mod["access"]) ? $mod["access"] : 'SA_OPEN' ); - } - } + $this->add_rapp_function(2, "",""); + $this->add_rapp_function(2, _("&Revaluation of Currency Accounts"), + "gl/manage/revaluate_currencies.php?", 'SA_EXCHANGERATE'); + + $this->add_extensions(); } } diff --git a/applications/inventory.php b/applications/inventory.php index feb820ba..b5b32f53 100644 --- a/applications/inventory.php +++ b/applications/inventory.php @@ -1,19 +1,18 @@ . ***********************************************************************/ -class inventory_app extends application +class inventory_app extends application { - function inventory_app() + function inventory_app() { - global $installed_extensions; $this->application("stock", _($this->help_context = "&Items and Inventory")); $this->add_module(_("Transactions")); @@ -55,16 +54,8 @@ class inventory_app extends application "inventory/purchasing_data.php?", 'SA_PURCHASEPRICING'); $this->add_rapp_function(3, _("Standard &Costs"), "inventory/cost_update.php?", 'SA_STANDARDCOST'); - if (count($installed_extensions) > 0) - { - foreach ($installed_extensions as $mod) - { - if (@$mod['active'] && $mod['type'] == 'plugin' && $mod["tab"] == "stock") - $this->add_rapp_function(2, $mod["title"], - "modules/".$mod["path"]."/".$mod["filename"]."?", - isset($mod["access"]) ? $mod["access"] : 'SA_OPEN' ); - } - } + + $this->add_extensions(); } } diff --git a/applications/manufacturing.php b/applications/manufacturing.php index 6892ecc2..3c9c861f 100644 --- a/applications/manufacturing.php +++ b/applications/manufacturing.php @@ -13,7 +13,6 @@ class manufacturing_app extends application { function manufacturing_app() { - global $installed_extensions; $this->application("manuf", _($this->help_context = "&Manufacturing")); $this->add_module(_("Transactions")); @@ -37,16 +36,8 @@ class manufacturing_app extends application "manufacturing/manage/bom_edit.php?", 'SA_BOM'); $this->add_lapp_function(2, _("&Work Centres"), "manufacturing/manage/work_centres.php?", 'SA_WORKCENTRES'); - if (count($installed_extensions) > 0) - { - foreach ($installed_extensions as $mod) - { - if (@$mod['active'] && $mod['type'] == 'plugin' && $mod["tab"] == "manuf") - $this->add_rapp_function(2, $mod["title"], - "modules/".$mod["path"]."/".$mod["filename"]."?", - isset($mod["access"]) ? $mod["access"] : 'SA_OPEN' ); - } - } + + $this->add_extensions(); } } diff --git a/applications/setup.php b/applications/setup.php index 3f1f652c..3e2f3b86 100644 --- a/applications/setup.php +++ b/applications/setup.php @@ -13,7 +13,6 @@ class setup_app extends application { function setup_app() { - global $installed_extensions; $this->application("system", _($this->help_context = "S&etup")); $this->add_module(_("Company Setup")); @@ -49,6 +48,8 @@ class setup_app extends application "sales/manage/sales_points.php?", 'SA_POSSETUP'); $this->add_rapp_function(1, _("&Printers"), "admin/printers.php?", 'SA_PRINTERS'); + $this->add_rapp_function(1, _("Contact &Categories"), + "admin/crm_categories.php?", 'SA_CRMCATEGORY'); $this->add_module(_("Maintenance")); $this->add_lapp_function(2, _("&Void a Transaction"), @@ -68,18 +69,14 @@ class setup_app extends application "admin/inst_lang.php?", 'SA_CREATELANGUAGE'); $this->add_rapp_function(2, _("Install/Activate &Extensions"), "admin/inst_module.php?", 'SA_CREATEMODULES'); + $this->add_rapp_function(2, _("Install/Activate &Themes"), + "admin/inst_theme.php?", 'SA_CREATEMODULES'); + $this->add_rapp_function(2, _("Install/Activate &Chart of Accounts"), + "admin/inst_chart.php?", 'SA_CREATEMODULES'); $this->add_rapp_function(2, _("Software &Upgrade"), "admin/inst_upgrade.php?", 'SA_SOFTWAREUPGRADE'); - if (count($installed_extensions) > 0) - { - foreach ($installed_extensions as $mod) - { - if (@$mod['active'] && $mod['type'] == 'plugin' && $mod["tab"] == "system") - $this->add_rapp_function(2, $mod["title"], - "modules/".$mod["path"]."/".$mod["filename"]."?", - isset($mod["access"]) ? $mod["access"] : 'SA_OPEN' ); - } - } + + $this->add_extensions(); } } diff --git a/applications/suppliers.php b/applications/suppliers.php index 304c653c..173a8c03 100644 --- a/applications/suppliers.php +++ b/applications/suppliers.php @@ -13,14 +13,18 @@ class suppliers_app extends application { function suppliers_app() { - global $installed_extensions; $this->application("AP", _($this->help_context = "&Purchases")); $this->add_module(_("Transactions")); $this->add_lapp_function(0, _("Purchase &Order Entry"), "purchasing/po_entry_items.php?NewOrder=Yes", 'SA_PURCHASEORDER'); $this->add_lapp_function(0, _("&Outstanding Purchase Orders Maintenance"), - "purchasing/inquiry/po_search.php?", 'SA_SUPPTRANSVIEW'); + "purchasing/inquiry/po_search.php?", 'SA_GRN'); + $this->add_lapp_function(0, _("Direct &GRN"), + "purchasing/po_entry_items.php?NewGRN=Yes", 'SA_GRN'); + $this->add_lapp_function(0, _("Direct &Invoice"), + "purchasing/po_entry_items.php?NewInvoice=Yes", 'SA_SUPPLIERINVOICE'); + $this->add_rapp_function(0, _("&Payments to Suppliers"), "purchasing/supplier_payment.php?", 'SA_SUPPLIERPAYMNT'); $this->add_rapp_function(0, "",""); @@ -46,16 +50,8 @@ class suppliers_app extends application $this->add_module(_("Maintenance")); $this->add_lapp_function(2, _("&Suppliers"), "purchasing/manage/suppliers.php?", 'SA_SUPPLIER'); - if (count($installed_extensions) > 0) - { - foreach ($installed_extensions as $mod) - { - if (@$mod['active'] && $mod['type'] == 'plugin' && $mod["tab"] == "AP") - $this->add_rapp_function(2, $mod["title"], - "modules/".$mod["path"]."/".$mod["filename"]."?", - isset($mod["access"]) ? $mod["access"] : 'SA_OPEN' ); - } - } + + $this->add_extensions(); } } diff --git a/config.default.php b/config.default.php index d6cefef0..692c87b5 100644 --- a/config.default.php +++ b/config.default.php @@ -25,10 +25,11 @@ if (!isset($path_to_root) || isset($_GET['path_to_root']) || isset($_POST['path_ // Special value 'syslog' can be used for system logger usage (see php manual). //$error_logfile = ''; $error_logfile = dirname(__FILE__).'/tmp/errors.log'; - $debug = 1; - $show_sql = 0; - $go_debug = 0; - $pdf_debug = 0; + $debug = 1; // show sql on database errors + + $show_sql = 0; // show all sql queries in page footer for debugging purposes + $go_debug = 0; // set to 1 for basic debugging, or 2 to see also backtrace after failure. + $pdf_debug = 0; // display pdf source instead reports for debugging when $go_debug!=0 // set $sql_trail to 1 only if you want to perform bugtracking sql trail // Warning: this produces huge amount of data in sql_trail table. // Don't forget switch the option off and flush the table manually after @@ -36,9 +37,9 @@ if (!isset($path_to_root) || isset($_GET['path_to_root']) || isset($_POST['path_ // $sql_trail = 0; // save all sql queries in sql_trail $select_trail = 0; // track also SELECT queries - if ($go_debug == 1) + if ($go_debug > 0) { - error_reporting(E_ALL); + error_reporting(-1); ini_set("display_errors", "On"); } else @@ -55,8 +56,6 @@ if (!isset($path_to_root) || isset($_GET['path_to_root']) || isset($_POST['path_ } // Main Title $app_title = "FrontAccounting"; - // application version - $version = "2.2.11"; // Build for development purposes $build_version = date("d.m.Y", filemtime("$path_to_root/CHANGELOG.txt")); @@ -65,6 +64,9 @@ if (!isset($path_to_root) || isset($_GET['path_to_root']) || isset($_POST['path_ $power_by = "FrontAccounting"; $power_url = "http://frontaccounting.com"; + /* Save Report selections (a value > 0 means days to save. 0 = no save) */ + $save_report_selections = 0; + /* use popup windows for views */ $use_popup_windows = 1; @@ -88,7 +90,7 @@ if (!isset($path_to_root) || isset($_GET['path_to_root']) || isset($_POST['path_ // $old_style_help = 1; // this setting is depreciated and subject to removal in next FA versions // locally installed wiki module // $help_base_url = $path_to_root.'/modules/wiki/index.php?n='._('Help').'.'; - // context help feed from frontaccounting.net + // context help feed from frontaccounting.com // $help_base_url = 'http://frontaccounting.com/fawiki/index.php?n=Help.'; // not used $help_base_url = null; @@ -109,6 +111,12 @@ if (!isset($path_to_root) || isset($_GET['path_to_root']) || isset($_POST['path_ /* print_invoice_no. 0 = print reference number, 1 = print invoice number */ $print_invoice_no = 0; + /* 1 = print Subtotal tax excluded, tax and Total tax included */ + $alternative_tax_include_on_docs = 0; + + /* suppress tax rates on documents. 0 = no, 1 = yes. */ + $suppress_tax_rates = 0; + $dateformats = array("MMDDYYYY", "DDMMYYYY", "YYYYMMDD"); $dateseps = array("/", ".", "-", " "); $thoseps = array(",", ".", " "); @@ -119,12 +127,6 @@ if (!isset($path_to_root) || isset($_GET['path_to_root']) || isset($_POST['path_ $pagesizes = array("Letter", "A4"); // default PDF pagesize - /* Default border and spacing for tables */ - /* Should be moved to CSS */ - - $table_style = "class='tablestyle'"; - $table_style2 = "class='tablestyle2'"; - /* Accounts Payable */ /* System check to see if quantity charged on purchase invoices exceeds the quantity received. If this parameter is checked the proportion by which the purchase invoice is an overcharge diff --git a/dimensions/dimension_entry.php b/dimensions/dimension_entry.php index 0777c2a3..8ee8fb8a 100644 --- a/dimensions/dimension_entry.php +++ b/dimensions/dimension_entry.php @@ -223,7 +223,7 @@ if (isset($_POST['reopen'])) start_form(); -start_table($table_style2); +start_table(TABLESTYLE2); if ($selected_id != -1) { diff --git a/dimensions/includes/dimensions_db.inc b/dimensions/includes/dimensions_db.inc index 8a4f7a54..c0483710 100644 --- a/dimensions/includes/dimensions_db.inc +++ b/dimensions/includes/dimensions_db.inc @@ -122,10 +122,11 @@ function dimension_has_deposits($id) function dimension_has_payments($id) { - $sql = "SELECT SUM(amount) FROM ".TB_PREF."gl_trans WHERE dimension_id = ".db_escape($id); + $sql = "SELECT COUNT(*) FROM ".TB_PREF."gl_trans WHERE dimension_id = ".db_escape($id) + . " OR dimension2_id = ".db_escape($id); $res = db_query($sql, "Transactions could not be calculated"); $row = db_fetch_row($res); - return ($row[0] != 0.0); + return ($row[0] > 0); } function dimension_is_closed($id) @@ -146,8 +147,80 @@ function close_dimension($id) function reopen_dimension($id) { - $sql = "UPDATE ".TB_PREF."dimensions SET closed='0' WHERE id = $id"; + $sql = "UPDATE ".TB_PREF."dimensions SET closed='0' WHERE id = ".db_escape($id); db_query($sql, "could not reopen dimension"); } +//-------------------------------------------------------------------------------------- + +function get_dimension_balance_all($id, $from, $to) +{ + $from = date2sql($from); + $to = date2sql($to); + $sql = "SELECT account, ".TB_PREF."chart_master.account_name, sum(amount) AS amt FROM + ".TB_PREF."gl_trans,".TB_PREF."chart_master WHERE + ".TB_PREF."gl_trans.account = ".TB_PREF."chart_master.account_code AND + (dimension_id = ".db_escape($id)." OR dimension2_id = ".db_escape($id).") AND + tran_date >= '$from' AND tran_date <= '$to' GROUP BY account"; + return db_query($sql, "Transactions could not be calculated"); +} + +//-------------------------------------------------------------------------------------- + +function get_dimension_balance($id, $from, $to) +{ + $id = db_escape($id); + $sql = "SELECT SUM(amount) FROM ".TB_PREF."gl_trans WHERE tran_date >= '" . + date2sql($from) . "' AND + tran_date <= '" . date2sql($to) . "' AND (dimension_id = " . + db_escape($id)." OR dimension2_id = " .db_escape($id).")"; + $res = db_query($sql, "Sum of transactions could not be calculated"); + $row = db_fetch_row($res); + + return $row[0]; +} + +//-------------------------------------------------------------------------------------- + +function get_sql_for_search_dimensions($dim) +{ + $sql = "SELECT dim.id, + dim.reference, + dim.name, + dim.type_, + dim.date_, + dim.due_date, + dim.closed + FROM ".TB_PREF."dimensions as dim WHERE id > 0"; + + if (isset($_POST['OrderNumber']) && $_POST['OrderNumber'] != "") + { + $sql .= " AND reference LIKE ".db_escape("%". $_POST['OrderNumber'] . "%"); + } else { + + if ($dim == 1) + $sql .= " AND type_=1"; + + if (isset($_POST['OpenOnly'])) + { + $sql .= " AND closed=0"; + } + + if (isset($_POST['type_']) && ($_POST['type_'] > 0)) + { + $sql .= " AND type_=".db_escape($_POST['type_']); + } + + if (isset($_POST['OverdueOnly'])) + { + $today = date2sql(Today()); + + $sql .= " AND due_date < '$today'"; + } + + $sql .= " AND date_ >= '" . date2sql($_POST['FromDate']) . "' + AND date_ <= '" . date2sql($_POST['ToDate']) . "'"; + } + return $sql; +} ?> \ No newline at end of file diff --git a/dimensions/includes/dimensions_ui.inc b/dimensions/includes/dimensions_ui.inc index 6ac85524..925d0313 100644 --- a/dimensions/includes/dimensions_ui.inc +++ b/dimensions/includes/dimensions_ui.inc @@ -15,16 +15,9 @@ include_once($path_to_root . "/includes/ui.inc"); function display_dimension_balance($id, $from, $to) { - global $path_to_root, $table_style; + global $path_to_root; - $from = date2sql($from); - $to = date2sql($to); - $sql = "SELECT account, ".TB_PREF."chart_master.account_name, sum(amount) AS amt FROM - ".TB_PREF."gl_trans,".TB_PREF."chart_master WHERE - ".TB_PREF."gl_trans.account = ".TB_PREF."chart_master.account_code AND - (dimension_id = $id OR dimension2_id = $id) AND - tran_date >= '$from' AND tran_date <= '$to' GROUP BY account"; - $result = db_query($sql, "Transactions could not be calculated"); + $result = get_dimension_balance_all($id, $from, $to); if (db_num_rows($result) == 0) { @@ -34,7 +27,7 @@ function display_dimension_balance($id, $from, $to) { display_heading2(_("Balance for this Dimension")); br(); - start_table($table_style); + start_table(TABLESTYLE); $th = array(_("Account"), _("Debit"), _("Credit")); table_header($th); diff --git a/dimensions/inquiry/search_dimensions.php b/dimensions/inquiry/search_dimensions.php index 29b58efe..ccf72ada 100644 --- a/dimensions/inquiry/search_dimensions.php +++ b/dimensions/inquiry/search_dimensions.php @@ -67,7 +67,7 @@ if (isset($_GET["stock_id"])) start_form(false, false, $_SERVER['PHP_SELF'] ."?outstanding_only=$outstanding_only"); -start_table("class='tablestyle_noborder'"); +start_table(TABLESTYLE_NOBORDER); start_row(); ref_cells(_("Reference:"), 'OrderNumber', '',null, '', true); @@ -97,21 +97,14 @@ function view_link($row) return get_dimensions_trans_view_str(ST_DIMENSION, $row["id"]); } -function is_closed($row) +function sum_dimension($row) { - return $row['closed'] ? _('Yes') : _('No'); + return get_dimension_balance($row['id'], $_POST['FromDate'], $_POST['ToDate']); } -function sum_dimension($row) +function is_closed($row) { - $sql = "SELECT SUM(amount) FROM ".TB_PREF."gl_trans WHERE tran_date >= '" . - date2sql($_POST['FromDate']) . "' AND - tran_date <= '" . date2sql($_POST['ToDate']) . "' AND (dimension_id = " . - $row['id']." OR dimension2_id = " .$row['id'].")"; - $res = db_query($sql, "Sum of transactions could not be calculated"); - $row = db_fetch_row($res); - - return $row[0]; + return $row['closed'] ? _('Yes') : _('No'); } function is_overdue($row) @@ -128,43 +121,7 @@ function edit_link($row) "/dimensions/dimension_entry.php?trans_no=" . $row["id"], ICON_EDIT); } -$sql = "SELECT dim.id, - dim.reference, - dim.name, - dim.type_, - dim.date_, - dim.due_date, - dim.closed - FROM ".TB_PREF."dimensions as dim WHERE id > 0"; - -if (isset($_POST['OrderNumber']) && $_POST['OrderNumber'] != "") -{ - $sql .= " AND reference LIKE ".db_escape("%". $_POST['OrderNumber'] . "%"); -} else { - - if ($dim == 1) - $sql .= " AND type_=1"; - - if (isset($_POST['OpenOnly'])) - { - $sql .= " AND closed=0"; - } - - if (isset($_POST['type_']) && ($_POST['type_'] > 0)) - { - $sql .= " AND type_=".db_escape($_POST['type_']); - } - - if (isset($_POST['OverdueOnly'])) - { - $today = date2sql(Today()); - - $sql .= " AND due_date < '$today'"; - } - - $sql .= " AND date_ >= '" . date2sql($_POST['FromDate']) . "' - AND date_ <= '" . date2sql($_POST['ToDate']) . "'"; -} +$sql = get_sql_for_search_dimensions($dim); $cols = array( _("#") => array('fun'=>'view_link'), diff --git a/dimensions/view/view_dimension.php b/dimensions/view/view_dimension.php index 2fe54071..28b16de1 100644 --- a/dimensions/view/view_dimension.php +++ b/dimensions/view/view_dimension.php @@ -49,7 +49,7 @@ if (strlen($myrow[0]) == 0) exit; } -start_table($table_style); +start_table(TABLESTYLE); $th = array(_("#"), _("Reference"), _("Name"), _("Type"), _("Date"), _("Due Date")); table_header($th); @@ -74,7 +74,7 @@ if ($myrow["closed"] == true) start_form(); -start_table("class='tablestyle_noborder'"); +start_table(TABLESTYLE_NOBORDER); start_row(); if (!isset($_POST['TransFromDate'])) @@ -95,6 +95,6 @@ display_dimension_balance($id, $_POST['TransFromDate'], $_POST['TransToDate']); br(1); -end_page(true); +end_page(true, false, false, ST_DIMENSION, $id); ?> diff --git a/frontaccounting.php b/frontaccounting.php index 4ae88cbb..2da5fe9f 100644 --- a/frontaccounting.php +++ b/frontaccounting.php @@ -20,14 +20,6 @@ if (!isset($path_to_root) || isset($_GET['path_to_root']) || isset($_POST['path_ include_once($path_to_root . '/applications/generalledger.php'); include_once($path_to_root . '/applications/setup.php'); include_once($path_to_root . '/installed_extensions.php'); - if (count($installed_extensions) > 0) - { - foreach ($installed_extensions as $ext) - { - if ($ext['type'] == 'module') - include_once($path_to_root."/".$ext['path']."/".$ext['filename']); - } - } class front_accounting { @@ -35,12 +27,11 @@ if (!isset($path_to_root) || isset($_GET['path_to_root']) || isset($_POST['path_ var $settings; var $applications; var $selected_application; - // GUI + var $menu; - //var $renderer; + function front_accounting() { - //$this->renderer =& new renderer(); } function add_application(&$app) { @@ -64,18 +55,20 @@ if (!isset($path_to_root) || isset($_GET['path_to_root']) || isset($_POST['path_ function display() { global $path_to_root; - include($path_to_root . "/themes/".user_theme()."/renderer.php"); + + include_once($path_to_root . "/themes/".user_theme()."/renderer.php"); + $this->init(); $rend = new renderer(); $rend->wa_header(); - //$rend->menu_header($this->menu); + $rend->display_applications($this); - //$rend->menu_footer($this->menu); + $rend->wa_footer(); + $this->renderer =& $rend; } function init() { - global $installed_extensions, $path_to_root; $this->menu = new menu(_("Main Menu")); $this->menu->add_item(_("Main Menu"), "index.php"); @@ -87,27 +80,9 @@ if (!isset($path_to_root) || isset($_GET['path_to_root']) || isset($_POST['path_ $this->add_application(new manufacturing_app()); $this->add_application(new dimensions_app()); $this->add_application(new general_ledger_app()); - if (count($installed_extensions) > 0) - { - // Do not use global array directly here, or you suffer - // from buggy php behaviour (unexpected loop break - // because of same var usage in class constructor). - $extensions = $installed_extensions; - foreach ($extensions as $ext) - { - if (@($ext['active'] && $ext['type'] == 'module')) // supressed warnings before 2.2 upgrade - { - $_SESSION['get_text']->add_domain($_SESSION['language']->code, - $ext['path']."/lang"); - $class = $ext['tab']."_app"; - if (class_exists($class)) - $this->add_application(new $class()); - $_SESSION['get_text']->add_domain($_SESSION['language']->code, - $path_to_root."/lang"); - } - } - } - + + hook_invoke_all('install_tabs', $this); + $this->add_application(new setup_app()); } } diff --git a/gl/accruals.php b/gl/accruals.php new file mode 100644 index 00000000..091458c9 --- /dev/null +++ b/gl/accruals.php @@ -0,0 +1,220 @@ + 0) + { + switch($freq) + { + case 1: + $date_ = add_days($date_, 7); + break; + case 2: + $date_ = add_days($date_, 14); + break; + case 3: + $date_ = add_months($date_, 1); + break; + case 4: + $date_ = add_months($date_, 3); + break; + } + $am0 = $am; + } + if (isset($_POST['go'])) + { + $id = get_next_trans_no(ST_JOURNAL); + $ref = $Refs->get_next(ST_JOURNAL); + add_gl_trans(ST_JOURNAL, $id, $date_, get_post('acc_act'), 0, + 0, $ref, $am0 * -1); + add_gl_trans(ST_JOURNAL, $id, $date_, get_post('res_act'), get_post('dimension_id'), + get_post('dimension2_id'), $ref, $am0); + add_comments(ST_JOURNAL, $id, $date_, $memo); + $Refs->save(ST_JOURNAL, $id, $ref); + } + else + { + alt_table_row_color($k); + label_cell($date_); + label_cell($_POST['acc_act'] . " " . get_gl_account_name($_POST['acc_act'])); + if ($dim > 0) + label_cell(""); + if ($dim > 1) + label_cell(""); + display_debit_or_credit_cells($am0 * -1); + label_cell($memo); + alt_table_row_color($k); + label_cell($date_); + label_cell($_POST['res_act'] . " " . get_gl_account_name($_POST['res_act'])); + if ($dim > 0) + label_cell(get_dimension_string($_POST['dimension_id'], true)); + if ($dim > 1) + label_cell(get_dimension_string($_POST['dimension2_id'], true)); + display_debit_or_credit_cells($am0); + label_cell($memo); + } + } + if (isset($_POST['go'])) + { + commit_transaction(); + display_notification_centered(_("Revenue / Cost Accruals have been processed.")); + $_POST['date_'] = $_POST['amount'] = $_POST['periods'] = ""; + } + else + { + end_table(1); + display_notification_centered(_("Showing GL Transactions.")); + } + } + } +} + +function frequency_list_row($label, $name, $selected=null) +{ + echo "\n"; + label_cell($label, "class='label'"); + echo "\n"; + $freq = array( + '1'=> _("Weekly"), + '2'=> _("Bi-weekly"), + '3' => _("Monthly"), + '4' => _("Quarterly"), + ); + echo array_selector($name, $selected, $freq); + echo "\n"; + echo "= 1) + dimensions_list_row(_("Dimension"), 'dimension_id', null, true, " ", false, 1); +if ($dim > 1) + dimensions_list_row(_("Dimension")." 2", 'dimension2_id', null, true, " ", false, 2); + +$url = "gl/view/accrual_trans.php?act=".get_post('acc_act')."&date=".get_post('date_'); +amount_row(_("Amount"), 'amount', null, null, viewer_link(_("Search Amount"), $url, "", "", ICON_VIEW)); + +frequency_list_row(_("Frequency"), 'freq', null); + +text_row(_("Periods"), 'periods', null, 3, 3); +textarea_row(_("Memo"), 'memo_', null, 35, 3); + +end_table(1); +submit_center_first('show', _("Show GL Rows"));//,true,false,'process',ICON_SUBMIT); +submit_center_last('go', _("Process Accruals"));//,true,false,'process',ICON_SUBMIT); +submit_js_confirm('go', _("Are you sure you want to post accruals?")); + +end_form(); + +end_page(); + +?> diff --git a/gl/bank_account_reconcile.php b/gl/bank_account_reconcile.php index c06b9d5b..4fa56550 100644 --- a/gl/bank_account_reconcile.php +++ b/gl/bank_account_reconcile.php @@ -118,17 +118,10 @@ function change_tpl_flag($reconcile_id) $_POST['bank_date'] = date2sql(get_post('reconcile_date')); $reconcile_value = check_value("rec_".$reconcile_id) ? ("'".$_POST['bank_date'] ."'") : 'NULL'; - $sql = "UPDATE ".TB_PREF."bank_trans SET reconciled=$reconcile_value" - ." WHERE id=".db_escape($reconcile_id); - - db_query($sql, "Can't change reconciliation status"); - // save last reconcilation status (date, end balance) - $sql2="UPDATE ".TB_PREF."bank_accounts SET last_reconciled_date='" - .date2sql($_POST["reconcile_date"])."', - ending_reconcile_balance=".input_num("end_balance") - ." WHERE id=".db_escape($_POST["bank_account"]); - - $result = db_query($sql2,"Error updating reconciliation information"); + + update_reconciled_values($reconcile_id, $reconcile_value, $_POST['reconcile_date'], + input_num('end_balance'), $_POST['bank_account']); + $Ajax->activate('reconciled'); $Ajax->activate('difference'); return true; @@ -168,7 +161,7 @@ if (isset($_POST['Reconcile'])) { //------------------------------------------------------------------------------------------------ start_form(); -start_table("class='tablestyle_noborder'"); +start_table(TABLESTYLE_NOBORDER); start_row(); bank_accounts_list_cells(_("Account:"), 'bank_account', null, true); @@ -177,19 +170,7 @@ bank_reconciliation_list_cells(_("Bank Statement:"), get_post('bank_account'), end_row(); end_table(); -$date = date2sql(get_post('reconcile_date')); - // temporary fix to enable fix of invalid entries made in 2.2RC -if ($date == 0) $date = '0000-00-00'; - -$sql = "SELECT MAX(reconciled) as last_date, - SUM(IF(reconciled<='$date', amount, 0)) as end_balance, - SUM(IF(reconciled<'$date', amount, 0)) as beg_balance, - SUM(amount) as total - FROM ".TB_PREF."bank_trans trans - WHERE bank_act=".db_escape($_POST['bank_account']); -// ." AND trans.reconciled IS NOT NULL"; - -$result = db_query($sql,"Cannot retrieve reconciliation data"); +$result = get_max_reconciled(get_post('reconcile_date'), $_POST['bank_account']); if ($row = db_fetch($result)) { $_POST["reconciled"] = price_format($row["end_balance"]-$row["beg_balance"]); @@ -200,11 +181,8 @@ if ($row = db_fetch($result)) { $_POST["end_balance"] = price_format($row["end_balance"]); if (get_post('bank_date')) { // if it is the last updated bank statement retrieve ending balance - $sql = "SELECT ending_reconcile_balance - FROM ".TB_PREF."bank_accounts WHERE id=".db_escape($_POST['bank_account']) - . " AND last_reconciled_date=".db_escape($_POST['bank_date']); - $result = db_query($sql,"Cannot retrieve last reconciliation"); - $row = db_fetch($result); + + $row = get_ending_reconciled($_POST['bank_account'], $_POST['bank_date']); if($row) { $_POST["end_balance"] = price_format($row["ending_reconcile_balance"]); } @@ -216,7 +194,7 @@ echo "
"; div_start('summary'); -start_table($table_style); +start_table(TABLESTYLE); $th = array(_("Reconcile Date"), _("Beginning
Balance"), _("Ending
Balance"), _("Account
Total"),_("Reconciled
Amount"), _("Difference")); table_header($th); @@ -245,13 +223,7 @@ echo "
"; if (!isset($_POST['bank_account'])) $_POST['bank_account'] = ""; -$sql = "SELECT type, trans_no, ref, trans_date, - amount, person_id, person_type_id, reconciled, id - FROM ".TB_PREF."bank_trans - WHERE ".TB_PREF."bank_trans.bank_act = ".db_escape($_POST['bank_account']) . " - AND (reconciled IS NULL OR reconciled='". $date ."') - ORDER BY trans_date,".TB_PREF."bank_trans.id"; -// or ORDER BY reconciled desc, trans_date,".TB_PREF."bank_trans.id"; +$sql = get_sql_for_bank_account_reconcile($_POST['bank_account'], get_post('reconcile_date')); $act = get_bank_account($_POST["bank_account"]); display_heading($act['bank_account_name']." - ".$act['bank_curr_code']); diff --git a/gl/bank_transfer.php b/gl/bank_transfer.php index 7ec52cc8..5ed84c08 100644 --- a/gl/bank_transfer.php +++ b/gl/bank_transfer.php @@ -53,13 +53,13 @@ if (isset($_POST['_DatePaid_changed'])) { function gl_payment_controls() { - global $table_style2, $Refs; + global $Refs; $home_currency = get_company_currency(); start_form(); - start_outer_table($table_style2, 5); + start_outer_table(TABLESTYLE2); table_section(1); diff --git a/gl/gl_bank.php b/gl/gl_bank.php index b3b3345c..5ed202e7 100644 --- a/gl/gl_bank.php +++ b/gl/gl_bank.php @@ -31,11 +31,16 @@ if ($use_date_picker) if (isset($_GET['NewPayment'])) { $_SESSION['page_title'] = _($help_context = "Bank Account Payment Entry"); - handle_new_order(ST_BANKPAYMENT); - + create_cart(ST_BANKPAYMENT, 0); } else if(isset($_GET['NewDeposit'])) { $_SESSION['page_title'] = _($help_context = "Bank Account Deposit Entry"); - handle_new_order(ST_BANKDEPOSIT); + create_cart(ST_BANKDEPOSIT, 0); +} else if(isset($_GET['ModifyPayment'])) { + $_SESSION['page_title'] = _($help_context = "Modify Bank Account Entry")." #".$_GET['trans_no']; + create_cart(ST_BANKPAYMENT, $_GET['trans_no']); +} else if(isset($_GET['ModifyDeposit'])) { + $_SESSION['page_title'] = _($help_context = "Modify Bank Deposit Entry")." #".$_GET['trans_no']; + create_cart(ST_BANKDEPOSIT, $_GET['trans_no']); } page($_SESSION['page_title'], false, false, '', $js); @@ -75,6 +80,22 @@ if (isset($_GET['AddedID'])) display_footer_exit(); } +if (isset($_GET['UpdatedID'])) +{ + $trans_no = $_GET['UpdatedID']; + $trans_type = ST_BANKPAYMENT; + + display_notification_centered(_("Payment $trans_no has been modified")); + + display_note(get_gl_view_str($trans_type, $trans_no, _("&View the GL Postings for this Payment"))); + + hyperlink_params($_SERVER['PHP_SELF'], _("Enter Another &Payment"), "NewPayment=yes"); + + hyperlink_params($_SERVER['PHP_SELF'], _("Enter A &Deposit"), "NewDeposit=yes"); + + display_footer_exit(); +} + if (isset($_GET['AddedDep'])) { $trans_no = $_GET['AddedDep']; @@ -90,28 +111,100 @@ if (isset($_GET['AddedDep'])) display_footer_exit(); } +if (isset($_GET['UpdatedDep'])) +{ + $trans_no = $_GET['UpdatedDep']; + $trans_type = ST_BANKDEPOSIT; + + display_notification_centered(_("Deposit $trans_no has been modified")); + + display_note(get_gl_view_str($trans_type, $trans_no, _("&View the GL Postings for this Deposit"))); + + hyperlink_params($_SERVER['PHP_SELF'], _("Enter Another &Deposit"), "NewDeposit=yes"); + + hyperlink_params($_SERVER['PHP_SELF'], _("Enter A &Payment"), "NewPayment=yes"); + + display_footer_exit(); +} + if (isset($_POST['_date__changed'])) { $Ajax->activate('_ex_rate'); } //-------------------------------------------------------------------------------------------------- -function handle_new_order($type) +function create_cart($type, $trans_no) { + global $Refs; + if (isset($_SESSION['pay_items'])) { unset ($_SESSION['pay_items']); } + + $cart = new items_cart($type); + $cart->order_id = $trans_no; + + if ($trans_no) { + + $bank_trans = db_fetch(get_bank_trans($type, $trans_no)); + $_POST['bank_account'] = $bank_trans["bank_act"]; + $_POST['PayType'] = $bank_trans["person_type_id"]; + + if ($bank_trans["person_type_id"] == PT_CUSTOMER) + { + $trans = get_customer_trans($trans_no, $type); + $_POST['person_id'] = $trans["debtor_no"]; + $_POST['PersonDetailID'] = $trans["branch_code"]; + } + elseif ($bank_trans["person_type_id"] == PT_SUPPLIER) + { + $trans = get_supp_trans($trans_no, $type); + $_POST['person_id'] = $trans["supplier_id"]; + } + elseif ($bank_trans["person_type_id"] == PT_MISC) + $_POST['person_id'] = $bank_trans["person_id"]; + elseif ($bank_trans["person_type_id"] == PT_QUICKENTRY) + $_POST['person_id'] = $bank_trans["person_id"]; + else + $_POST['person_id'] = $bank_trans["person_id"]; + + $cart->memo_ = get_comments_string($type, $trans_no); + $cart->tran_date = sql2date($bank_trans['trans_date']); + $cart->reference = $Refs->get($type, $trans_no); + + $gl_amount = 0; + $result = get_gl_trans($type, $trans_no); + if ($result) { + while ($row = db_fetch($result)) { + if (is_bank_account($row['account'])) { + // date exchange rate is currenly not stored in bank transaction, + // so we have to restore it from original gl amounts + $ex_rate = $bank_trans['amount']/$row['amount']; + } else { + $date = $row['tran_date']; + $cart->add_gl_item( $row['account'], $row['dimension_id'], + $row['dimension2_id'], $row['amount'], $row['memo_']); + $gl_amount += $row['amount']; + } + } + } + // apply exchange rate + foreach($cart->gl_items as $line_no => $line) + $cart->gl_items[$line_no]->amount *= $ex_rate; + + } else { + $cart->reference = $Refs->get_next($cart->trans_type); + $cart->tran_date = new_doc_date(); + if (!is_date_in_fiscalyear($cart->tran_date)) + $cart->tran_date = end_fiscalyear(); + } - //session_register("pay_items"); - - $_SESSION['pay_items'] = new items_cart($type); + $_POST['memo_'] = $cart->memo_; + $_POST['ref'] = $cart->reference; + $_POST['date_'] = $cart->tran_date; - $_POST['date_'] = new_doc_date(); - if (!is_date_in_fiscalyear($_POST['date_'])) - $_POST['date_'] = end_fiscalyear(); - $_SESSION['pay_items']->tran_date = $_POST['date_']; + $_SESSION['pay_items'] = &$cart; } - //----------------------------------------------------------------------------------------------- if (isset($_POST['Process'])) @@ -137,7 +230,7 @@ if (isset($_POST['Process'])) set_focus('ref'); $input_error = 1; } - elseif (!is_new_reference($_POST['ref'], $_SESSION['pay_items']->trans_type)) + elseif ($_POST['ref'] != $_SESSION['pay_items']->reference && !is_new_reference($_POST['ref'], $_SESSION['pay_items']->trans_type)) { display_error( _("The entered reference is already in use.")); set_focus('ref'); @@ -156,18 +249,32 @@ if (isset($_POST['Process'])) $input_error = 1; } + if (get_post('PayType')==PT_CUSTOMER && (!get_post('person_id') || !get_post('PersonDetailID'))) { + display_error(_("You have to select customer and customer branch.")); + set_focus('person_id'); + $input_error = 1; + } elseif (get_post('PayType')==PT_SUPPLIER && (!get_post('person_id'))) { + display_error(_("You have to select supplier.")); + set_focus('person_id'); + $input_error = 1; + } + if ($input_error == 1) unset($_POST['Process']); } if (isset($_POST['Process'])) { + begin_transaction(); + + $_SESSION['pay_items'] = &$_SESSION['pay_items']; + $new = $_SESSION['pay_items']->order_id == 0; - $trans = add_bank_transaction( - $_SESSION['pay_items']->trans_type, $_POST['bank_account'], + $trans = write_bank_transaction( + $_SESSION['pay_items']->trans_type, $_SESSION['pay_items']->order_id, $_POST['bank_account'], $_SESSION['pay_items'], $_POST['date_'], $_POST['PayType'], $_POST['person_id'], get_post('PersonDetailID'), - $_POST['ref'], $_POST['memo_']); + $_POST['ref'], $_POST['memo_'], false); $trans_type = $trans[0]; $trans_no = $trans[1]; @@ -175,41 +282,30 @@ if (isset($_POST['Process'])) $_SESSION['pay_items']->clear_items(); unset($_SESSION['pay_items']); + + commit_transaction(); + + if ($new) + meta_forward($_SERVER['PHP_SELF'], $trans_type==ST_BANKPAYMENT ? + "AddedID=$trans_no" : "AddedDep=$trans_no"); + else + meta_forward($_SERVER['PHP_SELF'], $trans_type==ST_BANKPAYMENT ? + "UpdatedID=$trans_no" : "UpdatedDep=$trans_no"); - meta_forward($_SERVER['PHP_SELF'], $trans_type==ST_BANKPAYMENT ? - "AddedID=$trans_no" : "AddedDep=$trans_no"); - -} /*end of process credit note */ +} //----------------------------------------------------------------------------------------------- function check_item_data() { - //if (!check_num('amount', 0)) - //{ - // display_error( _("The amount entered is not a valid number or is less than zero.")); - // set_focus('amount'); - // return false; - //} - - if ($_POST['code_id'] == $_POST['bank_account']) + if (!check_num('amount', 0)) { - display_error( _("The source and destination accouts cannot be the same.")); - set_focus('code_id'); + display_error( _("The amount entered is not a valid number or is less than zero.")); + set_focus('amount'); return false; } - //if (is_bank_account($_POST['code_id'])) - //{ - // if ($_SESSION['pay_items']->trans_type == ST_BANKPAYMENT) - // display_error( _("You cannot make a payment to a bank account. Please use the transfer funds facility for this.")); - // else - // display_error( _("You cannot make a deposit from a bank account. Please use the transfer funds facility for this.")); - // set_focus('code_id'); - // return false; - //} - - return true; + return true; } //----------------------------------------------------------------------------------------------- @@ -272,7 +368,7 @@ start_form(); display_bank_header($_SESSION['pay_items']); -start_table("$table_style2 width=90%", 10); +start_table(TABLESTYLE2, "width=90%", 10); start_row(); echo ""; display_gl_items($_SESSION['pay_items']->trans_type==ST_BANKPAYMENT ? diff --git a/gl/gl_budget.php b/gl/gl_budget.php index 2fc74cb4..585be9b4 100644 --- a/gl/gl_budget.php +++ b/gl/gl_budget.php @@ -11,76 +11,19 @@ ***********************************************************************/ $page_security = 'SA_BUDGETENTRY'; $path_to_root = ".."; -include($path_to_root . "/includes/session.inc"); +include_once($path_to_root . "/includes/session.inc"); add_js_file('budget.js'); page(_($help_context = "Budget Entry")); -include($path_to_root . "/includes/ui.inc"); -include($path_to_root . "/gl/includes/gl_db.inc"); +include_once($path_to_root . "/includes/ui.inc"); +include_once($path_to_root . "/gl/includes/gl_db.inc"); include_once($path_to_root . "/includes/data_checks.inc"); +include_once($path_to_root . "/admin/db/fiscalyears_db.inc"); -check_db_has_gl_account_groups(_("There are no account groups defined. Please define at least one account group before entering accounts.")); - -//------------------------------------------------------------------------------------- - -function exists_gl_budget($date_, $account, $dimension, $dimension2) -{ - $sql = "SELECT account FROM ".TB_PREF."budget_trans WHERE account=".db_escape($account) - ." AND tran_date='$date_' AND - dimension_id=".db_escape($dimension)." AND dimension2_id=".db_escape($dimension2); - $result = db_query($sql, "Cannot retreive a gl transaction"); - - return (db_num_rows($result) > 0); -} - -function add_update_gl_budget_trans($date_, $account, $dimension, $dimension2, $amount) -{ - $date = date2sql($date_); - - if (exists_gl_budget($date, $account, $dimension, $dimension2)) - $sql = "UPDATE ".TB_PREF."budget_trans SET amount=".db_escape($amount) - ." WHERE account=".db_escape($account) - ." AND dimension_id=".db_escape($dimension) - ." AND dimension2_id=".db_escape($dimension2) - ." AND tran_date='$date'"; - else - $sql = "INSERT INTO ".TB_PREF."budget_trans (tran_date, - account, dimension_id, dimension2_id, amount, memo_) VALUES ('$date', - ".db_escape($account).", ".db_escape($dimension).", " - .db_escape($dimension2).", ".db_escape($amount).", '')"; - - db_query($sql, "The GL budget transaction could not be saved"); -} -function delete_gl_budget_trans($date_, $account, $dimension, $dimension2) -{ - $date = date2sql($date_); - - $sql = "DELETE FROM ".TB_PREF."budget_trans WHERE account=".db_escape($account) - ." AND dimension_id=".db_escape($dimension) - ." AND dimension2_id=".db_escape($dimension2) - ." AND tran_date='$date'"; - db_query($sql, "The GL budget transaction could not be deleted"); -} - -function get_only_budget_trans_from_to($from_date, $to_date, $account, $dimension=0, $dimension2=0) -{ - - $from = date2sql($from_date); - $to = date2sql($to_date); - - $sql = "SELECT SUM(amount) FROM ".TB_PREF."budget_trans - WHERE account=".db_escape($account) - ." AND tran_date >= '$from' AND tran_date <= '$to' - AND dimension_id = ".db_escape($dimension) - ." AND dimension2_id = ".db_escape($dimension2); - $result = db_query($sql,"No budget accounts were returned"); - - $row = db_fetch_row($result); - return $row[0]; -} +check_db_has_gl_account_groups(_("There are no account groups defined. Please define at least one account group before entering accounts.")); //------------------------------------------------------------------------------------- @@ -116,7 +59,7 @@ start_form(); if (db_has_gl_accounts()) { $dim = get_company_pref('use_dimension'); - start_table($table_style2); + start_table(TABLESTYLE2); fiscalyears_list_row(_("Fiscal Year:"), 'fyear', null); gl_all_accounts_list_row(_("Account Code:"), 'account', null); if (!isset($_POST['dim1'])) @@ -141,7 +84,7 @@ if (db_has_gl_accounts()) submit_row('submit', _("Get"), true, '', '', true); end_table(1); div_start('budget_tbl'); - start_table($table_style2); + start_table(TABLESTYLE2); $showdims = (($dim == 1 && $_POST['dim1'] == 0) || ($dim == 2 && $_POST['dim1'] == 0 && $_POST['dim2'] == 0)); if ($showdims) @@ -151,11 +94,7 @@ if (db_has_gl_accounts()) table_header($th); $year = $_POST['fyear']; if (get_post('update') == '') { - $sql = "SELECT * FROM ".TB_PREF."fiscal_year WHERE id=".db_escape($year); - - $result = db_query($sql, "could not get current fiscal year"); - - $fyear = db_fetch($result); + $fyear = get_fiscalyear($year); $_POST['begin'] = sql2date($fyear['begin']); $_POST['end'] = sql2date($fyear['end']); } diff --git a/gl/gl_journal.php b/gl/gl_journal.php index 035de8ac..bc3e15e9 100644 --- a/gl/gl_journal.php +++ b/gl/gl_journal.php @@ -321,7 +321,7 @@ start_form(); display_order_header($_SESSION['journal_items']); -start_table("$table_style2 width=90%", 10); +start_table(TABLESTYLE2, "width=90%", 10); start_row(); echo ""; display_gl_items(_("Rows"), $_SESSION['journal_items']); diff --git a/gl/includes/db/gl_db_account_types.inc b/gl/includes/db/gl_db_account_types.inc index 6dd5a5db..03a3abeb 100644 --- a/gl/includes/db/gl_db_account_types.inc +++ b/gl/includes/db/gl_db_account_types.inc @@ -12,33 +12,66 @@ function add_account_type($id, $name, $class_id, $parent) { $sql = "INSERT INTO ".TB_PREF."chart_types (id, name, class_id, parent) - VALUES ($id, ".db_escape($name).", ".db_escape($class_id).", ".db_escape($parent).")"; + VALUES (".db_escape($id).", ".db_escape($name).", ".db_escape($class_id).", ".db_escape($parent).")"; return db_query($sql); } -function update_account_type($id, $name, $class_id, $parent) +function update_account_type($id, $name, $class_id, $parent, $old_id) { - $sql = "UPDATE ".TB_PREF."chart_types SET name=".db_escape($name).", + begin_transaction(); + if ($old_id !== $id) + { + $sql = "SELECT id FROM ".TB_PREF."chart_types WHERE parent = ".db_escape($old_id); + + $result = db_query($sql, "could not get account type"); + + while ($myrow = db_fetch($result)) + { + $sql = "UPDATE ".TB_PREF."chart_types SET parent=".db_escape($id) + ." WHERE id = '".$myrow['id']."'"; + db_query($sql, "could not update account type"); + } + $sql = "SELECT account_code FROM ".TB_PREF."chart_master WHERE account_type = ".db_escape($old_id); + + $result = db_query($sql, "could not get account"); + + while ($myrow = db_fetch($result)) + { + $sql = "UPDATE ".TB_PREF."chart_master SET account_type=".db_escape($id) + ." WHERE account_code = '".$myrow['account_code']."'"; + db_query($sql, "could not update account"); + } + } + $sql = "UPDATE ".TB_PREF."chart_types SET id=".db_escape($id) .", name=".db_escape($name).", class_id=".db_escape($class_id).", parent=".db_escape($parent) - ." WHERE id = ".db_escape($id); + ." WHERE id = ".db_escape($old_id); - return db_query($sql, "could not update account type"); + $ret = db_query($sql, "could not update account type"); + commit_transaction(); + return $ret; } function get_account_types($all=false, $class_id=false, $parent=false) { $sql = "SELECT * FROM ".TB_PREF."chart_types"; - if (!$all) - $sql .= " WHERE !inactive"; - if ($class_id != false) - $sql .= " AND class_id=".db_escape($class_id); + $where = array(); + + if (!$all) + $where[] = "!inactive"; + + if ($class_id != false) + $where[] = "class_id=".db_escape($class_id); + if ($parent == -1) - $sql .= " AND parent <= 0"; - elseif ($parent != false) - $sql .= " AND parent=".db_escape($parent); - $sql .= " ORDER BY class_id, id"; + $where[] ="(parent = '' OR parent = '-1')"; + elseif ($parent !== false) + $where[] = "parent=".db_escape($parent); + + if (count($where)) + $sql .= ' WHERE '.implode(' AND ', $where); + $sql .= " ORDER BY class_id, id, parent"; return db_query($sql, "could not get account types"); } @@ -88,13 +121,14 @@ function update_account_class($id, $name, $ctype) function get_account_classes($all=false, $balance=-1) { $sql = "SELECT * FROM ".TB_PREF."chart_class"; + if (!$all) $sql .= " WHERE !inactive"; if ($balance == 0) $sql .= " AND ctype>".CL_EQUITY." OR ctype=0"; elseif ($balance == 1) $sql .= " AND ctype>0 AND ctype<".CL_INCOME; - $sql .= " ORDER BY cid"; + $sql .= " ORDER BY ctype, cid"; return db_query($sql, "could not get account classes"); } diff --git a/gl/includes/db/gl_db_accounts.inc b/gl/includes/db/gl_db_accounts.inc index 70ef3236..f085cfe8 100644 --- a/gl/includes/db/gl_db_accounts.inc +++ b/gl/includes/db/gl_db_accounts.inc @@ -86,5 +86,97 @@ function get_gl_account_name($code) display_db_error("could not retreive the account name for $code", $sql, true); } +function gl_account_in_company_defaults($acc) +{ + $sql= "SELECT COUNT(*) FROM ".TB_PREF."sys_prefs WHERE (name='debtors_act' + OR name='pyt_discount_act' + OR name='creditors_act' + OR name='bank_charge_act' + OR name='exchange_diff_act' + OR name='profit_loss_year_act' + OR name='retained_earnings_act' + OR name='freight_act' + OR name='default_sales_act' + OR name='default_sales_discount_act' + OR name='default_prompt_payment_act' + OR name='default_inventory_act' + OR name='default_cogs_act' + OR name='default_adj_act' + OR name='default_inv_sales_act' + OR name='default_assembly_act') AND value=$acc"; + $result = db_query($sql,"Couldn't test for default company GL codes"); + + $myrow = db_fetch_row($result); + return ($myrow[0] > 0); +} + +function gl_account_in_stock_category($acc) +{ + $sql= "SELECT COUNT(*) FROM ".TB_PREF."stock_category WHERE + dflt_inventory_act=$acc + OR dflt_cogs_act=$acc + OR dflt_adjustment_act=$acc + OR dflt_sales_act=$acc"; + $result = db_query($sql,"Couldn't test for existing stock category GL codes"); + + $myrow = db_fetch_row($result); + return ($myrow[0] > 0); +} +function gl_account_in_stock_master($acc) +{ + $sql= "SELECT COUNT(*) FROM ".TB_PREF."stock_master WHERE + inventory_account=$acc + OR cogs_account=$acc + OR adjustment_account=$acc + OR sales_account=$acc"; + $result = db_query($sql,"Couldn't test for existing stock GL codes"); + + $myrow = db_fetch_row($result); + return ($myrow[0] > 0); +} + +function gl_account_in_tax_types($acc) +{ + $sql= "SELECT COUNT(*) FROM ".TB_PREF."tax_types WHERE sales_gl_code=$acc OR purchasing_gl_code=$acc"; + $result = db_query($sql,"Couldn't test for existing tax GL codes"); + + $myrow = db_fetch_row($result); + return ($myrow[0] > 0); +} + +function gl_account_in_cust_branch($acc) +{ + $sql= "SELECT COUNT(*) FROM ".TB_PREF."cust_branch WHERE + sales_account=$acc + OR sales_discount_account=$acc + OR receivables_account=$acc + OR payment_discount_account=$acc"; + $result = db_query($sql,"Couldn't test for existing cust branch GL codes"); + + $myrow = db_fetch_row($result); + return ($myrow[0] > 0); +} + +function gl_account_in_suppliers($acc) +{ + $sql= "SELECT COUNT(*) FROM ".TB_PREF."suppliers WHERE + purchase_account=$acc + OR payment_discount_account=$acc + OR payable_account=$acc"; + $result = db_query($sql,"Couldn't test for existing suppliers GL codes"); + + $myrow = db_fetch_row($result); + return ($myrow[0] > 0); +} + +function gl_account_in_quick_entry_lines($acc) +{ + $sql= "SELECT COUNT(*) FROM ".TB_PREF."quick_entry_lines WHERE + dest_id=$acc AND UPPER(LEFT(action, 1)) <> 'T'"; + $result = db_query($sql,"Couldn't test for existing Quick Entry Line GL codes"); + + $myrow = db_fetch_row($result); + return ($myrow[0] > 0); +} ?> \ No newline at end of file diff --git a/gl/includes/db/gl_db_bank_accounts.inc b/gl/includes/db/gl_db_bank_accounts.inc index a86b2ec4..b0423f55 100644 --- a/gl/includes/db/gl_db_bank_accounts.inc +++ b/gl/includes/db/gl_db_bank_accounts.inc @@ -75,6 +75,20 @@ function get_bank_account($id) } //--------------------------------------------------------------------------------------------- + +function get_bank_accounts($show_inactive) +{ + $sql = "SELECT account.*, gl_account.account_name + FROM ".TB_PREF."bank_accounts account, ".TB_PREF."chart_master gl_account + WHERE account.account_code = gl_account.account_code"; + if (!$show_inactive) $sql .= " AND !account.inactive"; + $sql .= " ORDER BY account_code, bank_curr_code"; + + return db_query($sql,"could not get bank accounts"); +} + +//--------------------------------------------------------------------------------------------- + function get_bank_gl_account($id) { $sql = "SELECT account_code FROM ".TB_PREF."bank_accounts WHERE id=".db_escape($id); @@ -88,22 +102,22 @@ function get_bank_gl_account($id) //--------------------------------------------------------------------------------------------- -function add_quick_entry($description, $type, $base_amount, $base_desc) +function add_quick_entry($description, $type, $base_amount, $base_desc, $bal_type) { - $sql = "INSERT INTO ".TB_PREF."quick_entries (description, type, base_amount, base_desc) + $sql = "INSERT INTO ".TB_PREF."quick_entries (description, type, base_amount, base_desc, bal_type) VALUES (".db_escape($description).", ".db_escape($type).", " - .db_escape($base_amount).", ".db_escape($base_desc).")"; + .db_escape($base_amount).", ".db_escape($base_desc).", ".db_escape($bal_type).")"; db_query($sql, "could not insert quick entry for $description"); } //--------------------------------------------------------------------------------------------- -function update_quick_entry($selected_id, $description, $type, $base_amount, $base_desc) +function update_quick_entry($selected_id, $description, $type, $base_amount, $base_desc, $bal_type) { $sql = "UPDATE ".TB_PREF."quick_entries SET description = ".db_escape($description).", type=".db_escape($type).", base_amount=".db_escape($base_amount) - .", base_desc=".db_escape($base_desc)." + .", base_desc=".db_escape($base_desc).", bal_type=".db_escape($bal_type)." WHERE id = ".db_escape($selected_id); db_query($sql, "could not update quick entry for $selected_id"); @@ -220,6 +234,67 @@ function get_quick_entry_line($selected_id) //--------------------------------------------------------------------------------------------- +function get_max_reconciled($date, $bank_account) +{ + $date = date2sql($date); + // temporary fix to enable fix of invalid entries made in 2.2RC + if ($date == 0) $date = '0000-00-00'; + + $sql = "SELECT MAX(reconciled) as last_date, + SUM(IF(reconciled<='$date', amount, 0)) as end_balance, + SUM(IF(reconciled<'$date', amount, 0)) as beg_balance, + SUM(amount) as total + FROM ".TB_PREF."bank_trans trans + WHERE bank_act=".db_escape($bank_account); + // ." AND trans.reconciled IS NOT NULL"; + + return db_query($sql,"Cannot retrieve reconciliation data"); + +} + +//--------------------------------------------------------------------------------------------- + +function get_ending_reconciled($bank_account, $bank_date) +{ + $sql = "SELECT ending_reconcile_balance + FROM ".TB_PREF."bank_accounts WHERE id=".db_escape($bank_account) + . " AND last_reconciled_date=".db_escape($bank_date); + $result = db_query($sql,"Cannot retrieve last reconciliation"); + return db_fetch($result); +} + +//--------------------------------------------------------------------------------------------- + +function get_sql_for_bank_account_reconcile($bank_account, $date) +{ + $sql = "SELECT type, trans_no, ref, trans_date, + amount, person_id, person_type_id, reconciled, id + FROM ".TB_PREF."bank_trans + WHERE ".TB_PREF."bank_trans.bank_act = ".db_escape($bank_account) . " + AND (reconciled IS NULL OR reconciled='". date2sql($date) ."') + ORDER BY trans_date,".TB_PREF."bank_trans.id"; +// or ORDER BY reconciled desc, trans_date,".TB_PREF."bank_trans.id"; + return $sql; +} + +//--------------------------------------------------------------------------------------------- + +function update_reconciled_values($reconcile_id, $reconcile_value, $reconcile_date, $end_balance, $bank_account) +{ + $sql = "UPDATE ".TB_PREF."bank_trans SET reconciled=$reconcile_value" + ." WHERE id=".db_escape($reconcile_id); + + db_query($sql, "Can't change reconciliation status"); + // save last reconcilation status (date, end balance) + $sql2 = "UPDATE ".TB_PREF."bank_accounts SET last_reconciled_date='" + .date2sql($reconcile_date)."', + ending_reconcile_balance=$end_balance + WHERE id=".db_escape($bank_account); + + db_query($sql2,"Error updating reconciliation information"); +} +//--------------------------------------------------------------------------------------------- + function get_default_bank_account($curr) { /* default bank account is selected as first found account from: diff --git a/gl/includes/db/gl_db_bank_trans.inc b/gl/includes/db/gl_db_bank_trans.inc index ad369861..90dc8c4a 100644 --- a/gl/includes/db/gl_db_bank_trans.inc +++ b/gl/includes/db/gl_db_bank_trans.inc @@ -83,6 +83,33 @@ function get_bank_trans($type, $trans_no=null, $person_type_id=null, $person_id= //---------------------------------------------------------------------------------------- +function get_bank_trans_for_bank_account($bank_account, $from, $to) +{ + $from = date2sql($from); + $to = date2sql($to); + $sql = "SELECT ".TB_PREF."bank_trans.* FROM ".TB_PREF."bank_trans + WHERE ".TB_PREF."bank_trans.bank_act = ".db_escape($bank_account) . " + AND trans_date >= '$from' + AND trans_date <= '$to' + ORDER BY trans_date,".TB_PREF."bank_trans.id"; + + return db_query($sql,"The transactions for '" . $bank_account . "' could not be retrieved"); +} + +//---------------------------------------------------------------------------------------- + +function get_balance_before_for_bank_account($bank_account, $from) +{ + $from = date2sql($from); + $sql = "SELECT SUM(amount) FROM ".TB_PREF."bank_trans WHERE bank_act=" + .db_escape($bank_account) . " + AND trans_date < '$from'"; + $before_qty = db_query($sql, "The starting balance on hand could not be calculated"); + $bfw_row = db_fetch_row($before_qty); + return $bfw_row[0]; +} +//---------------------------------------------------------------------------------------- + function get_gl_trans_value($account, $type, $trans_no) { $sql = "SELECT SUM(amount) FROM ".TB_PREF."gl_trans WHERE account=" @@ -123,6 +150,4 @@ function void_bank_trans($type, $type_no, $nested=false) commit_transaction(); } -//---------------------------------------------------------------------------------- - ?> \ No newline at end of file diff --git a/gl/includes/db/gl_db_banking.inc b/gl/includes/db/gl_db_banking.inc index cff9e70d..9d2a585d 100644 --- a/gl/includes/db/gl_db_banking.inc +++ b/gl/includes/db/gl_db_banking.inc @@ -9,11 +9,11 @@ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the License here . ***********************************************************************/ -function add_exchange_variation($trans_type, $trans_no, $date_, $acc_id, $account, +function add_exchange_variation($trans_no, $date_, $acc_id, $account, $currency, $person_type_id=null, $person_id = "") { if (is_company_currency($currency)) - return; + return false; if ($date_ == null) $date_ = Today(); $for_amount = 0; @@ -37,27 +37,42 @@ function add_exchange_variation($trans_type, $trans_no, $date_, $acc_id, $accoun $diff = $amount - $for_amount; if ($diff != 0) { - if ($trans_type == null) - $trans_type = ST_JOURNAL; if ($trans_no == null) - $trans_no = get_next_trans_no($trans_type); + $trans_no = get_next_trans_no(ST_JOURNAL); if ($person_type_id == null) $person_type_id = PT_MISC; - add_gl_trans($trans_type, $trans_no, $date_, $account, 0, 0, _("Exchange Variance"), + add_gl_trans(ST_JOURNAL, $trans_no, $date_, $account, 0, 0, _("Exchange Variance"), -$diff, null, $person_type_id, $person_id); - add_gl_trans($trans_type, $trans_no, $date_, get_company_pref('exchange_diff_act'), 0, 0, + add_gl_trans(ST_JOURNAL, $trans_no, $date_, get_company_pref('exchange_diff_act'), 0, 0, _("Exchange Variance"), $diff, null, $person_type_id, $person_id); - } + } + return ($diff != 0); } -function add_exchange_variation_all() +function add_exchange_variation_all($date=null, $ref="", $memo) { + global $Refs; + begin_transaction(); + $exchanged = false; $trans_no = get_next_trans_no(ST_JOURNAL); $sql = "SELECT * FROM ".TB_PREF."bank_accounts"; $result = db_query($sql, "could not retreive bank accounts"); while ($myrow = db_fetch($result)) - add_exchange_variation(ST_JOURNAL, $trans_no, null, $myrow['id'], $myrow['account_code'], - $myrow['currency_code']); + { + if (add_exchange_variation($trans_no, $date, $myrow['id'], $myrow['account_code'], + $myrow['bank_curr_code'])) + $exchanged = true; + } + if ($exchanged) + { + add_comments(ST_JOURNAL, $trans_no, $date, $memo); + if ($ref == "") + $ref = $Refs->get_next(ST_JOURNAL); + $Refs->save(ST_JOURNAL, $trans_no, $ref); + add_audit_trail(ST_JOURNAL, $trans_no, $date); + } + commit_transaction(); + return ($exchanged ? $trans_no : 0); } //---------------------------------------------------------------------------------- // Add bank tranfer to database. @@ -69,65 +84,86 @@ function add_exchange_variation_all() function add_bank_transfer($from_account, $to_account, $date_, $amount, $ref, $memo_, $charge=0) { - global $Refs; + global $Refs, $SysPrefs; begin_transaction(); + $args = func_get_args(); if (count($args) < 7) $args[] = 0; + $args = (object)array_combine(array('from_account', 'to_account', 'date_', 'amount', + 'ref', 'memo_', 'charge'), $args); + $args->trans_no = 0; + hook_db_prewrite($args, ST_BANKTRANSFER); $trans_type = ST_BANKTRANSFER; $currency = get_bank_account_currency($from_account); $trans_no = get_next_trans_no($trans_type); + + $fromact = get_bank_account($from_account); + $toact = get_bank_account($to_account); + $person_id = _("From")." ".$fromact['bank_account_name']." "._("To")." ".$toact['bank_account_name']; $from_gl_account = get_bank_gl_account($from_account); $to_gl_account = get_bank_gl_account($to_account); - + + $exchanged = false; $total = 0; // do the source account postings - $total += add_gl_trans($trans_type, $trans_no, $date_, $from_gl_account, 0, 0, "", + $total += add_gl_trans($trans_type, $trans_no, $date_, $from_gl_account, 0, 0, $person_id, -($amount + $charge), $currency); add_bank_trans($trans_type, $trans_no, $from_account, $ref, $date_, -($amount + $charge), - PT_MISC, "", $currency, + PT_MISC, $person_id, $currency, "Cannot insert a source bank transaction"); - - add_exchange_variation($trans_type, $trans_no, $date_, $from_account, $from_gl_account, - $currency, PT_MISC, ""); - + if ($SysPrefs->auto_currency_revaluation()) + { + $trans_no1 = get_next_trans_no(ST_JOURNAL); + if (add_exchange_variation($trans_no1, $date_, $from_account, $from_gl_account, + $currency, PT_MISC, $person_id)) + $exchanged = true; + } if ($charge != 0) { /* Now Debit bank charge account with charges */ $charge_act = get_company_pref('bank_charge_act'); $total += add_gl_trans($trans_type, $trans_no, $date_, - $charge_act, 0, 0, "", $charge, $currency); + $charge_act, 0, 0, $person_id, $charge, $currency); } // do the destination account postings - $total += add_gl_trans($trans_type, $trans_no, $date_, $to_gl_account, 0, 0, "", + $total += add_gl_trans($trans_type, $trans_no, $date_, $to_gl_account, 0, 0, $person_id, $amount, $currency); /*Post a balance post if $total != 0 */ add_gl_balance($trans_type, $trans_no, $date_, -$total); add_bank_trans($trans_type, $trans_no, $to_account, $ref, - $date_, $amount, PT_MISC, "", + $date_, $amount, PT_MISC, $person_id, $currency, "Cannot insert a destination bank transaction"); - $currency = get_bank_account_currency($to_account); - - add_exchange_variation($trans_type, $trans_no, $date_, $to_account, $to_gl_account, - $currency, PT_MISC, ""); + if ($SysPrefs->auto_currency_revaluation()) + { + $currency = get_bank_account_currency($to_account); + if ($exchanged || add_exchange_variation($trans_no1, $date_, $to_account, $to_gl_account, + $currency, PT_MISC, $person_id)) + { + $ref1 = $Refs->get_next(ST_JOURNAL); + $Refs->save(ST_JOURNAL, $trans_no1, $ref1); + add_audit_trail(ST_JOURNAL, $trans_no1, $date_); + } + } add_comments($trans_type, $trans_no, $date_, $memo_); $Refs->save($trans_type, $trans_no, $ref); add_audit_trail($trans_type, $trans_no, $date_); + $args->trans_no = $trans_no; + hook_db_postwrite($args, ST_BANKTRANSFER); commit_transaction(); return $trans_no; } - //---------------------------------------------------------------------------------- // Add bank payment or deposit to database. // @@ -138,21 +174,32 @@ function add_bank_transfer($from_account, $to_account, $date_, // $person_detail_id - customer branch id or not used // // returns an array of (inserted trans type, trans no) - -function add_bank_transaction($trans_type, $from_account, $items, $date_, +// +// FIXME -revise code for update case +// +function write_bank_transaction($trans_type, $trans_no, $from_account, $items, $date_, $person_type_id, $person_id, $person_detail_id, $ref, $memo_, $use_transaction=true) { - global $Refs; + global $Refs, $SysPrefs; // we can only handle type 1 (payment)and type 2 (deposit) if ($trans_type != ST_BANKPAYMENT && $trans_type != ST_BANKDEPOSIT) display_db_error("Invalid type ($trans_type) sent to add_bank_transaction"); $do_exchange_variance = false; - + $exchanged = false; if ($use_transaction) begin_transaction(); + $args = func_get_args(); if (count($args) < 11) $args[] = true; + $args = (object)array_combine(array('trans_type', 'trans_no', 'from_account', 'items', 'date_', + 'person_type_id', 'person_id', 'person_detail_id', 'ref', 'memo_', 'use_transaction'), + $args); + hook_db_prewrite($args, $trans_type); + + if ($trans_no) + clear_bank_transaction($_SESSION['pay_items']->trans_type, $_SESSION['pay_items']->order_id); + $currency = get_bank_account_currency($from_account); $bank_gl_account = get_bank_gl_account($from_account); @@ -168,7 +215,7 @@ function add_bank_transaction($trans_type, $from_account, $items, $date_, // we need to negate it too $cust_amount = -$cust_amount; - $trans_no = write_customer_trans($trans_type, 0, $person_id, $person_detail_id, $date_, + $trans_no = write_customer_trans($trans_type, $trans_no, $person_id, $person_detail_id, $date_, $ref, $cust_amount); } @@ -181,14 +228,17 @@ function add_bank_transaction($trans_type, $from_account, $items, $date_, // we need to negate it too $supp_amount = -$supp_amount; - $trans_no = add_supp_trans($trans_type, $person_id, $date_, '', - $ref, "", $supp_amount, 0, 0); + $trans_no = write_supp_trans($trans_type, $trans_no, $person_id, $date_, '', + $ref, "", $supp_amount, 0, 0); } else { - $trans_no = get_next_trans_no($trans_type); - $do_exchange_variance = true; + if (!$trans_no) + $trans_no = get_next_trans_no($trans_type); + $do_exchange_variance = $SysPrefs->auto_currency_revaluation(); + if ($do_exchange_variance) + $trans_no1 = get_next_trans_no(ST_JOURNAL); } // do the source account postings @@ -221,8 +271,10 @@ function add_bank_transaction($trans_type, $from_account, $items, $date_, $person_type_id, $person_id, $currency, "Cannot insert a destination bank transaction"); if ($do_exchange_variance) - add_exchange_variation($trans_type, $trans_no, $date_, $is_bank_to, $gl_item->code_id, + { + add_exchange_variation($trans_no1, $date_, $is_bank_to, $gl_item->code_id, $currency, $person_type_id, $person_id); + } } // store tax details if the gl account is a tax account @@ -238,20 +290,52 @@ function add_bank_transaction($trans_type, $from_account, $items, $date_, -$total, null, $person_type_id, $person_id); if ($do_exchange_variance) - add_exchange_variation($trans_type, $trans_no, $date_, $from_account, $bank_gl_account, - $currency, $person_type_id, $person_id); + { + if ($exchanged || add_exchange_variation($trans_no1, $date_, $from_account, $bank_gl_account, + $currency, $person_type_id, $person_id)) + { + $ref1 = $Refs->get_next(ST_JOURNAL); + $Refs->save(ST_JOURNAL, $trans_no1, $ref1); + add_audit_trail(ST_JOURNAL, $trans_no1, $date_); + } + } add_comments($trans_type, $trans_no, $date_, $memo_); $Refs->save($trans_type, $trans_no, $ref); add_audit_trail($trans_type, $trans_no, $date_); + $args->trans_no = $trans_no; + hook_db_postwrite($args, $trans_type); if ($use_transaction) commit_transaction(); return array($trans_type, $trans_no); } - //---------------------------------------------------------------------------------------- +function clear_bank_transaction($type, $type_no) +{ + + hook_db_prevoid($type, $type_no); + + $sql = "DELETE FROM ".TB_PREF."bank_trans + WHERE type=".db_escape($type)." AND trans_no=".db_escape($type_no); + + $result = db_query($sql, "could not clear bank transactions for type=$type and trans_no=$type_no"); + + clear_gl_trans($type, $type_no, true); + + // in case it's a customer trans - probably better to check first + void_cust_allocations($type, $type_no); + + // in case it's a supplier trans - probably better to check first + void_supp_allocations($type, $type_no); + clear_supp_trans($type, $type_no); + + clear_trans_tax_details($type, $type_no); + + delete_comments($type, $type_no); +} + ?> \ No newline at end of file diff --git a/gl/includes/db/gl_db_currencies.inc b/gl/includes/db/gl_db_currencies.inc index eee35e1c..a4ddf95a 100644 --- a/gl/includes/db/gl_db_currencies.inc +++ b/gl/includes/db/gl_db_currencies.inc @@ -68,6 +68,4 @@ function get_currencies($all=false) return db_query($sql, "could not get currencies"); } -//--------------------------------------------------------------------------------------------- - ?> \ No newline at end of file diff --git a/gl/includes/db/gl_db_rates.inc b/gl/includes/db/gl_db_rates.inc index 7189afa8..b91e909a 100644 --- a/gl/includes/db/gl_db_rates.inc +++ b/gl/includes/db/gl_db_rates.inc @@ -9,6 +9,7 @@ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the License here . ***********************************************************************/ +include_once($path_to_root . "/includes/remote_url.inc"); //--------------------------------------------------------------------------------------------- function get_exchange_rate($rate_id) { @@ -75,12 +76,10 @@ function delete_exchange_rate($rate_id) // function retrieve_exrate($curr_b, $date) { - global $Hooks; - - if (method_exists($Hooks, 'retrieve_exrate')) - return $Hooks->retrieve_exrate($curr_b, $date); - else - return get_extern_rate($curr_b, 'ECB', $date); + $rate = hook_retrieve_exrate($curr_b, $date); + if (is_numeric($rate)) + return $rate; + return get_extern_rate($curr_b, 'ECB', $date); } //----------------------------------------------------------------------------- @@ -123,18 +122,7 @@ function get_extern_rate($curr_b, $provider = 'ECB', $date) } while( ($contents == '') && $retry--); } else { - $handle = @fopen("http://".$site.$filename, 'rb'); - if ($handle) { - do - { - $data = @fread( $handle, 4096 ); - if ( strlen ( $data ) == 0 ) - break; - $contents .= $data; // with this syntax only text will be translated, whole text with htmlspecialchars($data) - } - while (true); - @fclose( $handle ); - } // end handle + $contents = url_get_contents("http://".$site.$filename); } if (!$contents) { display_warning(_("Cannot retrieve currency rate from $provider page. Please set the rate manually.")); @@ -184,4 +172,14 @@ function get_extern_rate($curr_b, $provider = 'ECB', $date) return $val; } /* end function get_extern_rate */ +//----------------------------------------------------------------------------- + +function get_sql_for_exchange_rates() +{ + $sql = "SELECT date_, rate_buy, id FROM " + .TB_PREF."exchange_rates " + ."WHERE curr_code=".db_escape($_POST['curr_abrev'])." + ORDER BY date_ DESC"; + return $sql; +} ?> \ No newline at end of file diff --git a/gl/includes/db/gl_db_trans.inc b/gl/includes/db/gl_db_trans.inc index efb8b2f6..bf6a8b4f 100644 --- a/gl/includes/db/gl_db_trans.inc +++ b/gl/includes/db/gl_db_trans.inc @@ -104,9 +104,13 @@ function get_gl_transactions($from_date, $to_date, $trans_no=0, $to = date2sql($to_date); $sql = "SELECT ".TB_PREF."gl_trans.*, " - .TB_PREF."chart_master.account_name FROM ".TB_PREF."gl_trans, " - .TB_PREF."chart_master - WHERE ".TB_PREF."chart_master.account_code=".TB_PREF."gl_trans.account + .TB_PREF."chart_master.account_name FROM " + .TB_PREF."gl_trans + LEFT JOIN ".TB_PREF."voided v ON " + .TB_PREF."gl_trans.type_no=v.id AND v.type=".TB_PREF."gl_trans.type," + .TB_PREF."chart_master" + ." WHERE ".TB_PREF."chart_master.account_code=".TB_PREF."gl_trans.account + AND ISNULL(v.date_) AND tran_date >= '$from' AND tran_date <= '$to'"; if ($trans_no > 0) @@ -140,13 +144,13 @@ function get_gl_transactions($from_date, $to_date, $trans_no=0, function get_gl_trans($type, $trans_id) { - $sql = "SELECT ".TB_PREF."gl_trans.*, " - .TB_PREF."chart_master.account_name FROM " - .TB_PREF."gl_trans, ".TB_PREF."chart_master - WHERE ".TB_PREF."chart_master.account_code=".TB_PREF."gl_trans.account - AND ".TB_PREF."gl_trans.type=".db_escape($type) - ." AND ".TB_PREF."gl_trans.type_no=".db_escape($trans_id); - + $sql = "SELECT gl.*, cm.account_name, IF(ISNULL(refs.reference), '', refs.reference) AS reference FROM " + .TB_PREF."gl_trans as gl + LEFT JOIN ".TB_PREF."chart_master as cm ON gl.account = cm.account_code + LEFT JOIN ".TB_PREF."refs as refs ON (gl.type=refs.type AND gl.type_no=refs.id)" + ." WHERE gl.type= ".db_escape($type) + ." AND gl.type_no = ".db_escape($trans_id) + ." ORDER BY counter"; return db_query($sql, "The gl transactions could not be retrieved"); } @@ -269,17 +273,76 @@ function get_budget_trans_from_to($from_date, $to_date, $account, $dimension=0, $row = db_fetch_row($result); return $row[0]; } +//------------------------------------------------------------------------------------- + +function exists_gl_budget($date_, $account, $dimension, $dimension2) +{ + $sql = "SELECT account FROM ".TB_PREF."budget_trans WHERE account=".db_escape($account) + ." AND tran_date='$date_' AND + dimension_id=".db_escape($dimension)." AND dimension2_id=".db_escape($dimension2); + $result = db_query($sql, "Cannot retreive a gl transaction"); + + return (db_num_rows($result) > 0); +} + +function add_update_gl_budget_trans($date_, $account, $dimension, $dimension2, $amount) +{ + $date = date2sql($date_); + + if (exists_gl_budget($date, $account, $dimension, $dimension2)) + $sql = "UPDATE ".TB_PREF."budget_trans SET amount=".db_escape($amount) + ." WHERE account=".db_escape($account) + ." AND dimension_id=".db_escape($dimension) + ." AND dimension2_id=".db_escape($dimension2) + ." AND tran_date='$date'"; + else + $sql = "INSERT INTO ".TB_PREF."budget_trans (tran_date, + account, dimension_id, dimension2_id, amount, memo_) VALUES ('$date', + ".db_escape($account).", ".db_escape($dimension).", " + .db_escape($dimension2).", ".db_escape($amount).", '')"; + + db_query($sql, "The GL budget transaction could not be saved"); +} + +function delete_gl_budget_trans($date_, $account, $dimension, $dimension2) +{ + $date = date2sql($date_); + + $sql = "DELETE FROM ".TB_PREF."budget_trans WHERE account=".db_escape($account) + ." AND dimension_id=".db_escape($dimension) + ." AND dimension2_id=".db_escape($dimension2) + ." AND tran_date='$date'"; + db_query($sql, "The GL budget transaction could not be deleted"); +} + +function get_only_budget_trans_from_to($from_date, $to_date, $account, $dimension=0, $dimension2=0) +{ + + $from = date2sql($from_date); + $to = date2sql($to_date); + + $sql = "SELECT SUM(amount) FROM ".TB_PREF."budget_trans + WHERE account=".db_escape($account) + ." AND tran_date >= '$from' AND tran_date <= '$to' + AND dimension_id = ".db_escape($dimension) + ." AND dimension2_id = ".db_escape($dimension2); + $result = db_query($sql,"No budget accounts were returned"); + + $row = db_fetch_row($result); + return $row[0]; +} //-------------------------------------------------------------------------------- // Stores journal/bank transaction tax details if applicable // -function add_gl_tax_details($gl_code, $trans_type, $trans_no, $amount, $ex_rate, $date, $memo) +function add_gl_tax_details($gl_code, $trans_type, $trans_no, $amount, $ex_rate, $date, $memo, $included=0) { $tax_type = is_tax_account($gl_code); if(!$tax_type) return; // $gl_code is not tax account $tax = get_tax_type($tax_type); - if ($gl_code == $tax['sales_gl_code']) + //if ($gl_code == $tax['sales_gl_code']) + if ($trans_type == ST_SALESINVOICE || $trans_type == ST_CUSTDELIVERY || $trans_type == ST_CUSTCREDIT) $amount = -$amount; // we have to restore net amount as we cannot know the base amount if ($tax['rate'] == 0) { @@ -291,7 +354,7 @@ function add_gl_tax_details($gl_code, $trans_type, $trans_no, $amount, $ex_rate, $net_amount = $amount/$tax['rate']*100; } - add_trans_tax_details($trans_type, $trans_no, $tax['id'], $tax['rate'], 0, + add_trans_tax_details($trans_type, $trans_no, $tax['id'], $tax['rate'], $included, $amount, $net_amount, $ex_rate, $date, $memo); } @@ -343,6 +406,17 @@ function void_trans_tax_details($type, $type_no) db_query($sql, "The transaction tax details could not be voided"); } +//---------------------------------------------------------------------------------------- + +function clear_trans_tax_details($type, $type_no) +{ + $sql = "DELETE FROM ".TB_PREF."trans_tax_details + WHERE trans_no=".db_escape($type_no) + ." AND trans_type=".db_escape($type); + + db_query($sql, "The transaction tax details could not be cleared"); +} + function get_tax_summary($from, $to) { $fromdate = date2sql($from); @@ -427,12 +501,11 @@ function write_journal_entries(&$cart, $reverse, $use_transaction=true) ST_JOURNAL, $trans_id, $journal_item->amount, 1, $date_, $memo_); } + $Refs->save($trans_type, $trans_id, $ref); if ($new) { add_comments($trans_type, $trans_id, $date_, $memo_); - $Refs->save($trans_type, $trans_id, $ref); } else { update_comments($trans_type, $trans_id, null, $memo_); - $Refs->update($trans_type, $trans_id, $ref); } add_audit_trail($trans_type, $trans_id, $date_); @@ -503,6 +576,22 @@ function void_gl_trans($type, $trans_id, $nested=false) commit_transaction(); } +//-------------------------------------------------------------------------------------------------- + +function clear_gl_trans($type, $trans_id, $nested=false) +{ + if (!$nested) + begin_transaction(); + + $sql = "DELETE FROM ".TB_PREF."gl_trans WHERE type=".db_escape($type) + ." AND type_no=".db_escape($trans_id); + + db_query($sql, "could not clear gl transactions for type=$type and trans_no=$trans_id"); + + if (!$nested) + commit_transaction(); +} + //---------------------------------------------------------------------------------------- function void_journal_trans($type, $type_no, $use_transaction=true) @@ -518,4 +607,42 @@ function void_journal_trans($type, $type_no, $use_transaction=true) commit_transaction(); } +function get_sql_for_journal_inquiry($filter, $from, $to, $ref='', $memo='', $alsoclosed=false) +{ + + $sql = "SELECT IF(ISNULL(a.gl_seq),0,a.gl_seq) as gl_seq, + gl.tran_date, + gl.type, + gl.type_no, + refs.reference, + SUM(IF(gl.amount>0, gl.amount,0)) as amount, + com.memo_, + IF(ISNULL(u.user_id),'',u.user_id) as user_id + FROM ".TB_PREF."gl_trans as gl + LEFT JOIN ".TB_PREF."audit_trail as a ON + (gl.type=a.type AND gl.type_no=a.trans_no) + LEFT JOIN ".TB_PREF."comments as com ON + (gl.type=com.type AND gl.type_no=com.id) + LEFT JOIN ".TB_PREF."refs as refs ON + (gl.type=refs.type AND gl.type_no=refs.id) + LEFT JOIN ".TB_PREF."users as u ON + a.user=u.id + WHERE gl.tran_date >= '" . date2sql($from) . "' + AND gl.tran_date <= '" . date2sql($to) . "' + AND gl.amount!=0"; + if ($ref) { + $sql .= " AND reference LIKE ". db_escape("%$ref%"); + } + if ($memo) { + $sql .= " AND com.memo_ LIKE ". db_escape("%$memo%"); + } + if ($filter != -1) { + $sql .= " AND gl.type=".db_escape($filter); + } + if (!$alsoclosed) { + $sql .= " AND gl_seq=0"; + } + $sql .= " GROUP BY gl.type, gl.type_no"; + return $sql; +} ?> \ No newline at end of file diff --git a/gl/includes/ui/gl_bank_ui.inc b/gl/includes/ui/gl_bank_ui.inc index 2fe97b86..6454edbd 100644 --- a/gl/includes/ui/gl_bank_ui.inc +++ b/gl/includes/ui/gl_bank_ui.inc @@ -11,12 +11,12 @@ ***********************************************************************/ function display_bank_header(&$order) { - global $table_style2, $Ajax, $Refs; + global $Ajax, $Refs; $payment = $order->trans_type == ST_BANKPAYMENT; div_start('pmt_header'); - start_outer_table("width=90% $table_style2"); // outer table + start_outer_table(TABLESTYLE2, "width=90%"); // outer table table_section(1); @@ -98,10 +98,7 @@ function display_bank_header(&$order) table_section(3, "33%"); - if (isset($_GET['NewPayment'])) - ref_row(_("Reference:"), 'ref', '', $Refs->get_next(ST_BANKPAYMENT)); - else - ref_row(_("Reference:"), 'ref', '', $Refs->get_next(ST_BANKDEPOSIT)); + ref_row(_("Reference:"), 'ref', ''); end_outer_table(1); // outer table @@ -111,14 +108,14 @@ function display_bank_header(&$order) function display_gl_items($title, &$order) { - global $table_style, $path_to_root; + global $path_to_root; $dim = get_company_pref('use_dimension'); $colspan = ($dim == 2 ? 4 : ($dim == 1 ? 3 : 2)); display_heading($title); div_start('items_table'); - start_table("$table_style colspan=7 width=95%"); + start_table(TABLESTYLE, "colspan=7 width=95%"); if ($dim == 2) $th = array(_("Account Code"), _("Account Description"), _("Dimension")." 1", diff --git a/gl/includes/ui/gl_journal_ui.inc b/gl/includes/ui/gl_journal_ui.inc index 3b4698c0..8c4aec6a 100644 --- a/gl/includes/ui/gl_journal_ui.inc +++ b/gl/includes/ui/gl_journal_ui.inc @@ -16,12 +16,12 @@ include_once($path_to_root . "/includes/ui/items_cart.inc"); function display_order_header(&$Order) { - global $table_style2, $Ajax; + global $Ajax; $qes = has_quick_entries(QE_JOURNAL); $new = $Order->order_id==0; - start_outer_table("$table_style2 width=90%"); - table_section(1); + start_outer_table(TABLESTYLE2, "width=90%"); + table_section(1, $qes ? "20%" : ""); start_row(); date_cells(_("Date:"), 'date_', '', $new); @@ -41,7 +41,7 @@ function display_order_header(&$Order) if ($qes !== false) { - table_section(3, "50%"); + table_section(3, "40%"); start_row(); quick_entries_list_cells(_("Quick Entry").":", 'person_id', null, QE_JOURNAL, true); $qid = get_quick_entry(get_post('person_id')); @@ -49,8 +49,17 @@ function display_order_header(&$Order) unset($_POST['totamount']); // enable default $Ajax->activate('totamount'); } - amount_cells($qid['base_desc'].":", 'totamount', price_format($qid['base_amount']), - null, "  ".submit('go', _("Go"), false, false, true)); + if ($qid['bal_type'] == 1) + { + end_row(); + start_row(); + $accname = get_gl_account_name($qid['base_desc']); + label_cell(($qid['base_amount'] == 0 ? _("Yearly") : _("Monthly")) . " ". _("balance from account")." ". + $qid['base_desc']." ".$accname."  ".submit('go', _("Go"), false, false, true), "colspan=2"); + } + else + amount_cells($qid['base_desc'].":", 'totamount', price_format($qid['base_amount']), + null, "  ".submit('go', _("Go"), false, false, true)); end_row(); } @@ -62,14 +71,14 @@ function display_order_header(&$Order) function display_gl_items($title, &$order) { - global $table_style, $path_to_root; + global $path_to_root; display_heading($title); $dim = get_company_pref('use_dimension'); div_start('items_table'); - start_table("$table_style colspan=7 width=95%"); + start_table(TABLESTYLE, "colspan=7 width=95%"); if ($dim == 2) $th = array(_("Account Code"), _("Account Description"), _("Dimension")." 1", _("Dimension")." 2", _("Debit"), _("Credit"), _("Memo"), ""); diff --git a/gl/inquiry/balance_sheet.php b/gl/inquiry/balance_sheet.php index 776171ab..eafb4855 100644 --- a/gl/inquiry/balance_sheet.php +++ b/gl/inquiry/balance_sheet.php @@ -38,16 +38,19 @@ if (isset($_GET["TransFromDate"])) $_POST["TransFromDate"] = $_GET["TransFromDate"]; if (isset($_GET["TransToDate"])) $_POST["TransToDate"] = $_GET["TransToDate"]; +if (isset($_GET["Dimension"])) + $_POST["Dimension"] = $_GET["Dimension"]; +if (isset($_GET["Dimension2"])) + $_POST["Dimension2"] = $_GET["Dimension2"]; if (isset($_GET["AccGrp"])) $_POST["AccGrp"] = $_GET["AccGrp"]; //---------------------------------------------------------------------------------------------------- -function display_type ($type, $typename, $from, $to, $convert, $drilldown, $path_to_root) +function display_type ($type, $typename, $from, $to, $convert, $dimension, $dimension2, $drilldown, $path_to_root) { global $levelptr, $k; - $dimension = $dimension2 = 0; $acctstotal = 0; $typestotal = 0; @@ -64,7 +67,7 @@ function display_type ($type, $typename, $from, $to, $convert, $drilldown, $path if ($drilldown && $levelptr == 0) { $url = "" . $account['account_code'] ." ". $account['account_name'] .""; @@ -84,7 +87,7 @@ function display_type ($type, $typename, $from, $to, $convert, $drilldown, $path while ($accounttype=db_fetch($result)) { $typestotal += display_type($accounttype["id"], $accounttype["name"], $from, $to, - $convert, $drilldown, $path_to_root); + $convert, $dimension, $dimension2, $drilldown, $path_to_root); } //Display Type Summary if total is != 0 @@ -105,7 +108,7 @@ function display_type ($type, $typename, $from, $to, $convert, $drilldown, $path //elseif ($drilldown && $type != $_POST["AccGrp"]) { $url = "" . $typename .""; alt_table_row_color($k); @@ -119,8 +122,13 @@ function display_type ($type, $typename, $from, $to, $convert, $drilldown, $path function inquiry_controls() { - start_table("class='tablestyle_noborder'"); + $dim = get_company_pref('use_dimension'); + start_table(TABLESTYLE_NOBORDER); date_cells(_("As at:"), 'TransToDate'); + if ($dim >= 1) + dimensions_list_cells(_("Dimension")." 1:", 'Dimension', null, true, " ", false, 1); + if ($dim > 1) + dimensions_list_cells(_("Dimension")." 2:", 'Dimension2', null, true, " ", false, 2); submit_cells('Show',_("Show"),'','', 'default'); end_table(); @@ -130,13 +138,17 @@ function inquiry_controls() function display_balance_sheet() { - global $comp_path, $path_to_root, $table_style; + global $path_to_root; $from = begin_fiscalyear(); $to = $_POST['TransToDate']; - $dim = get_company_pref('use_dimension'); - $dimension = $dimension2 = 0; + if (!isset($_POST['Dimension'])) + $_POST['Dimension'] = 0; + if (!isset($_POST['Dimension2'])) + $_POST['Dimension2'] = 0; + $dimension = $_POST['Dimension']; + $dimension2 = $_POST['Dimension2']; $lconvert = $econvert = 1; if (isset($_POST["AccGrp"]) && (strlen($_POST['AccGrp']) > 0)) $drilldown = 1; // Deeper Level @@ -145,7 +157,7 @@ function display_balance_sheet() div_start('balance_tbl'); - start_table("width=30% $table_style"); + start_table(TABLESTYLE, "width=30%"); if (!$drilldown) //Root Level { @@ -174,12 +186,13 @@ function display_balance_sheet() while ($accounttype=db_fetch($typeresult)) { $TypeTotal = display_type($accounttype["id"], $accounttype["name"], $from, $to, - $convert, $drilldown, $path_to_root); + $convert, $dimension, $dimension2, $drilldown, $path_to_root); //Print Summary if ($TypeTotal != 0 ) { $url = "" . $accounttype['name'] .""; + . $from . "&TransToDate=" . $to . "&Dimension=" . $dimension . "&Dimension2=" . $dimension2 + . "&AccGrp=" . $accounttype['id'] ."'>" . $accounttype['name'] .""; alt_table_row_color($k); label_cell($url); amount_cell($TypeTotal * $convert); @@ -212,7 +225,7 @@ function display_balance_sheet() $calculateclose *= -1; //Final Report Summary $url = ""._('Calculated Return').""; start_row("class='inquirybg' style='font-weight:bold'"); @@ -240,7 +253,7 @@ function display_balance_sheet() table_section_title(get_account_type_name($_POST["AccGrp"])); $classclose = display_type($accounttype["id"], $accounttype["name"], $from, $to, - $convert, $drilldown, $path_to_root); + $convert, $dimension, $dimension2, $drilldown, $path_to_root); } end_table(1); // outer table diff --git a/gl/inquiry/bank_inquiry.php b/gl/inquiry/bank_inquiry.php index b9dcf28e..65a691fd 100644 --- a/gl/inquiry/bank_inquiry.php +++ b/gl/inquiry/bank_inquiry.php @@ -39,7 +39,7 @@ if (get_post('Show')) //------------------------------------------------------------------------------------------------ start_form(); -start_table("class='tablestyle_noborder'"); +start_table(TABLESTYLE_NOBORDER); start_row(); bank_accounts_list_cells(_("Account:"), 'bank_account', null); @@ -53,44 +53,36 @@ end_form(); //------------------------------------------------------------------------------------------------ - -$date_after = date2sql($_POST['TransAfterDate']); -$date_to = date2sql($_POST['TransToDate']); if (!isset($_POST['bank_account'])) $_POST['bank_account'] = ""; -$sql = "SELECT ".TB_PREF."bank_trans.* FROM ".TB_PREF."bank_trans - WHERE ".TB_PREF."bank_trans.bank_act = ".db_escape($_POST['bank_account']) . " - AND trans_date >= '$date_after' - AND trans_date <= '$date_to' - ORDER BY trans_date,".TB_PREF."bank_trans.id"; -$result = db_query($sql,"The transactions for '" . $_POST['bank_account'] . "' could not be retrieved"); +$result = get_bank_trans_for_bank_account($_POST['bank_account'], $_POST['TransAfterDate'], $_POST['TransToDate']); div_start('trans_tbl'); $act = get_bank_account($_POST["bank_account"]); display_heading($act['bank_account_name']." - ".$act['bank_curr_code']); -start_table($table_style); +start_table(TABLESTYLE); $th = array(_("Type"), _("#"), _("Reference"), _("Date"), _("Debit"), _("Credit"), _("Balance"), _("Person/Item"), ""); table_header($th); -$sql = "SELECT SUM(amount) FROM ".TB_PREF."bank_trans WHERE bank_act=" - .db_escape($_POST['bank_account']) . " - AND trans_date < '$date_after'"; -$before_qty = db_query($sql, "The starting balance on hand could not be calculated"); +$bfw = get_balance_before_for_bank_account($_POST['bank_account'], $_POST['TransAfterDate']); -start_row("class='inquirybg'"); -label_cell(""._("Opening Balance")." - ".$_POST['TransAfterDate']."", "colspan=4"); -$bfw_row = db_fetch_row($before_qty); -$bfw = $bfw_row[0]; +$credit = $debit = 0; +start_row("class='inquirybg' style='font-weight:bold'"); +label_cell(_("Opening Balance")." - ".$_POST['TransAfterDate'], "colspan=4"); display_debit_or_credit_cells($bfw); label_cell(""); label_cell("", "colspan=2"); end_row(); $running_total = $bfw; +if ($bfw > 0 ) + $debit += $bfw; +else + $credit += $bfw; $j = 1; $k = 0; //row colour counter while ($myrow = db_fetch($result)) @@ -110,6 +102,10 @@ while ($myrow = db_fetch($result)) label_cell(payment_person_name($myrow["person_type_id"],$myrow["person_id"])); label_cell(get_gl_view_str($myrow["type"], $myrow["trans_no"])); end_row(); + if ($myrow["amount"] > 0 ) + $debit += $myrow["amount"]; + else + $credit += $myrow["amount"]; if ($j == 12) { @@ -120,9 +116,12 @@ while ($myrow = db_fetch($result)) } //end of while loop -start_row("class='inquirybg'"); -label_cell("" . _("Ending Balance")." - ". $_POST['TransToDate']. "", "colspan=4"); -display_debit_or_credit_cells($running_total); +start_row("class='inquirybg' style='font-weight:bold'"); +label_cell(_("Ending Balance")." - ". $_POST['TransToDate'], "colspan=4"); +amount_cell($debit); +amount_cell(-$credit); +//display_debit_or_credit_cells($running_total); +amount_cell($debit+$credit); label_cell(""); label_cell("", "colspan=2"); end_row(); diff --git a/gl/inquiry/gl_account_inquiry.php b/gl/inquiry/gl_account_inquiry.php index 5612e363..5bef33f9 100644 --- a/gl/inquiry/gl_account_inquiry.php +++ b/gl/inquiry/gl_account_inquiry.php @@ -61,28 +61,26 @@ if (!isset($_POST["amount_max"])) function gl_inquiry_controls() { - global $table_style2; - $dim = get_company_pref('use_dimension'); start_form(); - start_table("class='tablestyle_noborder'"); + start_table(TABLESTYLE_NOBORDER); start_row(); - gl_all_accounts_list_cells(_("Account:"), 'account', null, false, false, "All Accounts"); + gl_all_accounts_list_cells(_("Account:"), 'account', null, false, false, _("All Accounts")); date_cells(_("from:"), 'TransFromDate', '', null, -30); date_cells(_("to:"), 'TransToDate'); end_row(); end_table(); - start_table(); + start_table(TABLESTYLE_NOBORDER); start_row(); if ($dim >= 1) dimensions_list_cells(_("Dimension")." 1:", 'Dimension', null, true, " ", false, 1); if ($dim > 1) dimensions_list_cells(_("Dimension")." 2:", 'Dimension2', null, true, " ", false, 2); - small_amount_cells(_("Amount min:"), 'amount_min', null); - small_amount_cells(_("Amount max:"), 'amount_max', null); + small_amount_cells(_("Amount min:"), 'amount_min', null, " "); + small_amount_cells(_("Amount max:"), 'amount_max', null, " "); submit_cells('Show',_("Show"),'','', 'default'); end_row(); end_table(); @@ -95,7 +93,7 @@ function gl_inquiry_controls() function show_results() { - global $path_to_root, $table_style, $systypes_array; + global $path_to_root, $systypes_array; if (!isset($_POST["account"])) $_POST["account"] = null; @@ -122,7 +120,7 @@ function show_results() input_num("amount_min") == 0 && input_num("amount_max") == 0; - start_table($table_style); + start_table(TABLESTYLE); $first_cols = array(_("Type"), _("#"), _("Date")); @@ -161,7 +159,7 @@ function show_results() $bfw = get_gl_balance_from_to($begin, $_POST['TransFromDate'], $_POST["account"], $_POST['Dimension'], $_POST['Dimension2']); start_row("class='inquirybg'"); label_cell(""._("Opening Balance")." - ".$_POST['TransFromDate']."", "colspan=$colspan"); - display_debit_or_credit_cells($bfw); + display_debit_or_credit_cells($bfw, true); label_cell(""); label_cell(""); end_row(); @@ -210,7 +208,7 @@ function show_results() if ($show_balances) { start_row("class='inquirybg'"); label_cell("" . _("Ending Balance") ." - ".$_POST['TransToDate']. "", "colspan=$colspan"); - display_debit_or_credit_cells($running_total); + display_debit_or_credit_cells($running_total, true); label_cell(""); label_cell(""); end_row(); diff --git a/gl/inquiry/gl_trial_balance.php b/gl/inquiry/gl_trial_balance.php index 50ff2e3d..c0a3e56a 100644 --- a/gl/inquiry/gl_trial_balance.php +++ b/gl/inquiry/gl_trial_balance.php @@ -14,8 +14,9 @@ $path_to_root="../.."; include_once($path_to_root . "/includes/session.inc"); -include_once($path_to_root . "/includes/date_functions.inc"); include_once($path_to_root . "/includes/ui.inc"); +include_once($path_to_root . "/includes/date_functions.inc"); +include_once($path_to_root . "/admin/db/fiscalyears_db.inc"); include_once($path_to_root . "/includes/data_checks.inc"); include_once($path_to_root . "/gl/includes/gl_db.inc"); @@ -37,12 +38,17 @@ if (get_post('Show')) function gl_inquiry_controls() { + $dim = get_company_pref('use_dimension'); start_form(); - start_table("class='tablestyle_noborder'"); + start_table(TABLESTYLE_NOBORDER); date_cells(_("From:"), 'TransFromDate', '', null, -30); date_cells(_("To:"), 'TransToDate'); + if ($dim >= 1) + dimensions_list_cells(_("Dimension")." 1:", 'Dimension', null, true, " ", false, 1); + if ($dim > 1) + dimensions_list_cells(_("Dimension")." 2:", 'Dimension2', null, true, " ", false, 2); check_cells(_("No zero values"), 'NoZero', null); check_cells(_("Only balances"), 'Balance', null); @@ -55,10 +61,24 @@ function gl_inquiry_controls() function display_trial_balance() { - global $table_style, $path_to_root; + global $path_to_root; + if (isset($_POST['TransFromDate'])) + { + $row = get_current_fiscalyear(); + if (date1_greater_date2($_POST['TransFromDate'], sql2date($row['end']))) + { + display_error(_("The from date cannot be bigger than the fiscal year end.")); + set_focus('TransFromDate'); + return; + } + } div_start('balance_tbl'); - start_table($table_style); + if (!isset($_POST['Dimension'])) + $_POST['Dimension'] = 0; + if (!isset($_POST['Dimension2'])) + $_POST['Dimension2'] = 0; + start_table(TABLESTYLE); $tableheader = " " . _("Account") . " " . _("Account Name") . " @@ -87,14 +107,14 @@ function display_trial_balance() while ($account = db_fetch($accounts)) { - $prev = get_balance($account["account_code"], 0, 0, $begin, $_POST['TransFromDate'], false, false); - $curr = get_balance($account["account_code"], 0, 0, $_POST['TransFromDate'], $_POST['TransToDate'], true, true); - $tot = get_balance($account["account_code"], 0, 0, $begin, $_POST['TransToDate'], false, true); + $prev = get_balance($account["account_code"], $_POST['Dimension'], $_POST['Dimension2'], $begin, $_POST['TransFromDate'], false, false); + $curr = get_balance($account["account_code"], $_POST['Dimension'], $_POST['Dimension2'], $_POST['TransFromDate'], $_POST['TransToDate'], true, true); + $tot = get_balance($account["account_code"], $_POST['Dimension'], $_POST['Dimension2'], $begin, $_POST['TransToDate'], false, true); if (check_value("NoZero") && !$prev['balance'] && !$curr['balance'] && !$tot['balance']) continue; alt_table_row_color($k); - $url = "" . $account["account_code"] . ""; + $url = "" . $account["account_code"] . ""; label_cell($url); label_cell($account["account_name"]); @@ -149,6 +169,8 @@ function display_trial_balance() end_row(); end_table(1); + if (($pbal = round2($pbal, user_price_dec())) != 0) + display_warning(_("The Opening Balance is not in balance, probably due to a non closed Previous Fiscalyear.")); div_end(); } diff --git a/gl/inquiry/journal_inquiry.php b/gl/inquiry/journal_inquiry.php index 3ceb3241..dccef78f 100644 --- a/gl/inquiry/journal_inquiry.php +++ b/gl/inquiry/journal_inquiry.php @@ -39,7 +39,7 @@ if (!isset($_POST['filterType'])) start_form(); -start_table("class='tablestyle_noborder'"); +start_table(TABLESTYLE_NOBORDER); start_row(); ref_cells(_("Reference:"), 'Ref', '',null, _('Enter reference fragment or leave empty')); @@ -80,9 +80,9 @@ function gl_link($row) } $editors = array( - 0 => "/gl/gl_journal.php?ModifyGL=Yes&trans_no=%d&trans_type=%d", -// 1=> Bank Payment, -// 2=> Bank Deposit, + ST_JOURNAL => "/gl/gl_journal.php?ModifyGL=Yes&trans_no=%d&trans_type=%d", + ST_BANKPAYMENT => "/gl/gl_bank.php?ModifyPayment=Yes&trans_no=%d&trans_type=%d", + ST_BANKDEPOSIT => "/gl/gl_bank.php?ModifyDeposit=Yes&trans_no=%d&trans_type=%d", // 4=> Funds Transfer, ST_SALESINVOICE => "/sales/customer_invoice.php?ModifyInvoice=%d", // 11=> @@ -112,81 +112,9 @@ function edit_link($row) sprintf($editors[$row["type"]], $row["type_no"], $row["type"]), ICON_EDIT) : ''; } -/* -// Tom Hallman 11 Nov 2009 -// IF(gl.type = 1... statement is for deposits/payments that may not actually result -// in a deposit, such as when a fix is made. Without that statement (and the -// joining of the bank_trans table), the fix deposit/payment amount would show up -// incorrectly as only the positive side of the fix. -$sql = "SELECT IF(ISNULL(a.gl_seq),0,a.gl_seq) as gl_seq, - gl.tran_date, - gl.type, - gl.type_no, - refs.reference, - IF(gl.type = 1 OR gl.type = 2, - bank_trans.amount, - SUM(IF(gl.amount>0, gl.amount,0))) as amount, - com.memo_, - IF(ISNULL(u.user_id),'',u.user_id) as user_id - FROM ".TB_PREF."gl_trans as gl - LEFT JOIN ".TB_PREF."audit_trail as a ON - (gl.type=a.type AND gl.type_no=a.trans_no) - LEFT JOIN ".TB_PREF."comments as com ON - (gl.type=com.type AND gl.type_no=com.id) - LEFT JOIN ".TB_PREF."refs as refs ON - (gl.type=refs.type AND gl.type_no=refs.id) - LEFT JOIN ".TB_PREF."users as u ON - a.user=u.id - LEFT JOIN ".TB_PREF."bank_trans as bank_trans ON - (gl.type=bank_trans.type AND gl.type_no=bank_trans.trans_no) - WHERE gl.tran_date >= '" . date2sql($_POST['FromDate']) . "' - AND gl.tran_date <= '" . date2sql($_POST['ToDate']) . "' - AND gl.amount!=0"; -if (isset($_POST['Ref']) && $_POST['Ref'] != "") { - $sql .= " AND reference LIKE '%". $_POST['Ref'] . "%'"; -} -if (get_post('filterType') != -1) { - $sql .= " AND gl.type=".get_post('filterType'); -} -if (!check_value('AlsoClosed')) { - $sql .= " AND gl_seq=0"; -} -$sql .= " GROUP BY gl.type, gl.type_no"; -*/ - -$sql = "SELECT IF(ISNULL(a.gl_seq),0,a.gl_seq) as gl_seq, - gl.tran_date, - gl.type, - gl.type_no, - refs.reference, - SUM(IF(gl.amount>0, gl.amount,0)) as amount, - com.memo_, - IF(ISNULL(u.user_id),'',u.user_id) as user_id - FROM ".TB_PREF."gl_trans as gl - LEFT JOIN ".TB_PREF."audit_trail as a ON - (gl.type=a.type AND gl.type_no=a.trans_no) - LEFT JOIN ".TB_PREF."comments as com ON - (gl.type=com.type AND gl.type_no=com.id) - LEFT JOIN ".TB_PREF."refs as refs ON - (gl.type=refs.type AND gl.type_no=refs.id) - LEFT JOIN ".TB_PREF."users as u ON - a.user=u.id - WHERE gl.tran_date >= '" . date2sql($_POST['FromDate']) . "' - AND gl.tran_date <= '" . date2sql($_POST['ToDate']) . "' - AND gl.amount!=0"; -if (isset($_POST['Ref']) && $_POST['Ref'] != "") { - $sql .= " AND reference LIKE '%". $_POST['Ref'] . "%'"; -} -if (isset($_POST['Memo']) && $_POST['Memo'] != "") { - $sql .= " AND com.memo_ LIKE '%". $_POST['Memo'] . "%'"; -} -if (get_post('filterType') != -1) { - $sql .= " AND gl.type=".get_post('filterType'); -} -if (!check_value('AlsoClosed')) { - $sql .= " AND gl_seq=0"; -} -$sql .= " GROUP BY gl.type, gl.type_no"; + +$sql = get_sql_for_journal_inquiry(get_post('filterType', -1), get_post('FromDate'), + get_post('ToDate'), get_post('Ref'), get_post('Memo'), check_value('AlsoClosed')); $cols = array( _("#") => array('fun'=>'journal_pos', 'align'=>'center'), diff --git a/gl/inquiry/profit_loss.php b/gl/inquiry/profit_loss.php index e20fae1a..46b8f44b 100644 --- a/gl/inquiry/profit_loss.php +++ b/gl/inquiry/profit_loss.php @@ -40,6 +40,10 @@ if (isset($_GET["TransToDate"])) $_POST["TransToDate"] = $_GET["TransToDate"]; if (isset($_GET["Compare"])) $_POST["Compare"] = $_GET["Compare"]; +if (isset($_GET["Dimension"])) + $_POST["Dimension"] = $_GET["Dimension"]; +if (isset($_GET["Dimension2"])) + $_POST["Dimension2"] = $_GET["Dimension2"]; if (isset($_GET["AccGrp"])) $_POST["AccGrp"] = $_GET["AccGrp"]; @@ -74,7 +78,7 @@ function display_type ($type, $typename, $from, $to, $begin, $end, $compare, $co if ($drilldown && $levelptr == 0) { $url = "" . $account['account_code'] ." ". $account['account_name'] .""; @@ -122,7 +126,7 @@ function display_type ($type, $typename, $from, $to, $begin, $end, $compare, $co //elseif ($drilldown && $type != $_POST["AccGrp"]) { $url = "" . $typename .""; alt_table_row_color($k); @@ -153,7 +157,8 @@ function Achieve($d1, $d2) function inquiry_controls() { - start_table("class='tablestyle_noborder'"); + $dim = get_company_pref('use_dimension'); + start_table(TABLESTYLE_NOBORDER); date_cells(_("From:"), 'TransFromDate', '', null, -30); date_cells(_("To:"), 'TransToDate'); @@ -165,6 +170,10 @@ function inquiry_controls() echo ""; echo array_selector('Compare', null, $sel); echo "\n"; + if ($dim >= 1) + dimensions_list_cells(_("Dimension")." 1:", 'Dimension', null, true, " ", false, 1); + if ($dim > 1) + dimensions_list_cells(_("Dimension")." 2:", 'Dimension2', null, true, " ", false, 2); submit_cells('Show',_("Show"),'','', 'default'); end_table(); @@ -176,10 +185,14 @@ function inquiry_controls() function display_profit_and_loss() { - global $comp_path, $path_to_root, $table_style, $sel; + global $path_to_root, $sel; - $dim = get_company_pref('use_dimension'); - $dimension = $dimension2 = 0; + if (!isset($_POST['Dimension'])) + $_POST['Dimension'] = 0; + if (!isset($_POST['Dimension2'])) + $_POST['Dimension2'] = 0; + $dimension = $_POST['Dimension']; + $dimension2 = $_POST['Dimension2']; $from = $_POST['TransFromDate']; $to = $_POST['TransToDate']; @@ -211,7 +224,7 @@ function display_profit_and_loss() div_start('pl_tbl'); - start_table("width=50% $table_style"); + start_table(TABLESTYLE, "width=50%"); $tableheader = " " . _("Group/Account Name") . " @@ -252,7 +265,7 @@ function display_profit_and_loss() if ($TypeTotal[0] != 0 || $TypeTotal[1] != 0 ) { $url = "" . $accounttype['name'] .""; alt_table_row_color($k); diff --git a/gl/inquiry/tax_inquiry.php b/gl/inquiry/tax_inquiry.php index 394963ab..6022fcd7 100644 --- a/gl/inquiry/tax_inquiry.php +++ b/gl/inquiry/tax_inquiry.php @@ -53,12 +53,9 @@ if (get_post('TransFromDate') == "" && get_post('TransToDate') == "") function tax_inquiry_controls() { - global $table_style2; - start_form(); - //start_table($table_style2); - start_table("class='tablestyle_noborder'"); + start_table(TABLESTYLE_NOBORDER); start_row(); date_cells(_("from:"), 'TransFromDate', '', null, -30); @@ -76,11 +73,11 @@ function tax_inquiry_controls() function show_results() { - global $path_to_root, $table_style; + global $path_to_root; /*Now get the transactions */ div_start('trans_tbl'); - start_table($table_style); + start_table(TABLESTYLE); $th = array(_("Type"), _("Description"), _("Amount"), _("Outputs")."/"._("Inputs")); table_header($th); diff --git a/gl/manage/bank_accounts.php b/gl/manage/bank_accounts.php index ae1dc41e..634283b4 100644 --- a/gl/manage/bank_accounts.php +++ b/gl/manage/bank_accounts.php @@ -66,18 +66,13 @@ elseif( $Mode == 'Delete') $acc = db_escape($selected_id); // PREVENT DELETES IF DEPENDENT RECORDS IN 'bank_trans' - $sql= "SELECT COUNT(*) FROM ".TB_PREF."bank_trans WHERE bank_act=$acc"; - $result = db_query($sql,"check failed"); - $myrow = db_fetch_row($result); - if ($myrow[0] > 0) + if (key_in_foreign_table($acc, 'bank_trans', 'bank_act', true)) { $cancel_delete = 1; display_error(_("Cannot delete this bank account because transactions have been created using this account.")); } - $sql= "SELECT COUNT(*) FROM ".TB_PREF."sales_pos WHERE pos_account=$acc"; - $result = db_query($sql,"check failed"); - $myrow = db_fetch_row($result); - if ($myrow[0] > 0) + + if (key_in_foreign_table($acc, 'sales_pos', 'pos_account', true)) { $cancel_delete = 1; display_error(_("Cannot delete this bank account because POS definitions have been created using this account.")); @@ -99,18 +94,10 @@ if ($Mode == 'RESET') /* Always show the list of accounts */ -$sql = "SELECT account.*, gl_account.account_name - FROM ".TB_PREF."bank_accounts account, ".TB_PREF."chart_master gl_account - WHERE account.account_code = gl_account.account_code"; -if (!check_value('show_inactive')) $sql .= " AND !account.inactive"; -$sql .= " ORDER BY account_code, bank_curr_code"; - -$result = db_query($sql,"could not get bank accounts"); - -check_db_error("The bank accounts set up could not be retreived", $sql); +$result = get_bank_accounts(check_value('show_inactive')); start_form(); -start_table("$table_style width='80%'"); +start_table(TABLESTYLE, "width='80%'"); $th = array(_("Account Name"), _("Type"), _("Currency"), _("GL Account"), _("Bank"), _("Number"), _("Bank Address"), _("Dflt"), '',''); @@ -144,11 +131,11 @@ while ($myrow = db_fetch($result)) inactive_control_row($th); end_table(1); -$is_editing = $selected_id != -1; +$is_used = $selected_id != -1 && key_in_foreign_table($selected_id, 'bank_trans', 'bank_act', true); -start_table($table_style2); +start_table(TABLESTYLE2); -if ($is_editing) +if ($selected_id != -1) { if ($Mode == 'Edit') { $myrow = get_bank_account($selected_id); @@ -171,7 +158,7 @@ if ($is_editing) text_row(_("Bank Account Name:"), 'bank_account_name', null, 50, 100); -if ($is_editing) +if ($is_used) { label_row(_("Account Type:"), $bank_account_types[$_POST['account_type']]); } @@ -179,7 +166,7 @@ else { bank_account_types_list_row(_("Account Type:"), 'account_type', null); } -if ($is_editing) +if ($is_used) { label_row(_("Bank Account Currency:"), $_POST['BankAccountCurrency']); } @@ -190,7 +177,7 @@ else yesno_list_row(_("Default currency account:"), 'dflt_curr_act'); -if($is_editing) +if($is_used) label_row(_("Bank Account GL Code:"), $_POST['account_code']); else gl_all_accounts_list_row(_("Bank Account GL Code:"), 'account_code', null); diff --git a/gl/manage/currencies.php b/gl/manage/currencies.php index 9bf6a9cd..b14b79fd 100644 --- a/gl/manage/currencies.php +++ b/gl/manage/currencies.php @@ -89,38 +89,26 @@ function check_can_delete() $curr = db_escape($selected_id); // PREVENT DELETES IF DEPENDENT RECORDS IN debtors_master - $sql= "SELECT COUNT(*) FROM ".TB_PREF."debtors_master WHERE curr_code = $curr"; - $result = db_query($sql); - $myrow = db_fetch_row($result); - if ($myrow[0] > 0) + if (key_in_foreign_table($curr, 'debtors_master', 'curr_code', true)) { display_error(_("Cannot delete this currency, because customer accounts have been created referring to this currency.")); return false; } - $sql= "SELECT COUNT(*) FROM ".TB_PREF."suppliers WHERE curr_code = $curr"; - $result = db_query($sql); - $myrow = db_fetch_row($result); - if ($myrow[0] > 0) + if (key_in_foreign_table($curr, 'suppliers', 'curr_code', true)) { display_error(_("Cannot delete this currency, because supplier accounts have been created referring to this currency.")); return false; } - - $sql= "SELECT COUNT(*) FROM ".TB_PREF."company WHERE curr_default = $curr"; - $result = db_query($sql); - $myrow = db_fetch_row($result); - if ($myrow[0] > 0) + + if ($curr == get_company_pref('curr_default')) { display_error(_("Cannot delete this currency, because the company preferences uses this currency.")); return false; } // see if there are any bank accounts that use this currency - $sql= "SELECT COUNT(*) FROM ".TB_PREF."bank_accounts WHERE bank_curr_code = $curr"; - $result = db_query($sql); - $myrow = db_fetch_row($result); - if ($myrow[0] > 0) + if (key_in_foreign_table($curr, 'bank_accounts', 'bank_curr_code', true)) { display_error(_("Cannot delete this currency, because thre are bank accounts that use this currency.")); return false; @@ -146,12 +134,10 @@ function handle_delete() function display_currencies() { - global $table_style; - $company_currency = get_company_currency(); $result = get_currencies(check_value('show_inactive')); - start_table($table_style); + start_table(TABLESTYLE); $th = array(_("Abbreviation"), _("Symbol"), _("Currency Name"), _("Hundredths name"), _("Country"), _("Auto update"), "", ""); inactive_control_column($th); @@ -195,9 +181,9 @@ function display_currencies() function display_currency_edit($selected_id) { - global $table_style2, $Mode; + global $Mode; - start_table($table_style2); + start_table(TABLESTYLE2); if ($selected_id != '') { diff --git a/gl/manage/exchange_rates.php b/gl/manage/exchange_rates.php index 55259ff8..90ab428f 100644 --- a/gl/manage/exchange_rates.php +++ b/gl/manage/exchange_rates.php @@ -26,7 +26,7 @@ page(_($help_context = "Exchange Rates"), false, false, "", $js); simple_page_mode(false); //--------------------------------------------------------------------------------------------- -function check_data() +function check_data($selected_id) { if (!is_date($_POST['date_'])) { @@ -40,7 +40,7 @@ function check_data() set_focus('BuyRate'); return false; } - if (get_date_exchange_rate($_POST['curr_abrev'], $_POST['date_'])) + if (!$selected_id && get_date_exchange_rate($_POST['curr_abrev'], $_POST['date_'])) { display_error( _("The exchange rate for the date is already there.")); set_focus('date_'); @@ -55,7 +55,7 @@ function handle_submit() { global $selected_id; - if (!check_data()) + if (!check_data($selected_id)) return false; if ($selected_id != "") @@ -101,7 +101,6 @@ function del_link($row) function display_rates($curr_code) { - global $table_style; } @@ -109,9 +108,9 @@ function display_rates($curr_code) function display_rate_edit() { - global $selected_id, $table_style2, $Ajax; + global $selected_id, $Ajax; - start_table($table_style2); + start_table(TABLESTYLE2); if ($selected_id != "") { @@ -120,7 +119,7 @@ function display_rate_edit() $myrow = get_exchange_rate($selected_id); $_POST['date_'] = sql2date($myrow["date_"]); - $_POST['BuyRate'] = exrate_format($myrow["rate_buy"]); + $_POST['BuyRate'] = maxprec_format($myrow["rate_buy"]); hidden('selected_id', $selected_id); hidden('date_', $_POST['date_']); @@ -136,12 +135,11 @@ function display_rate_edit() if (isset($_POST['get_rate'])) { $_POST['BuyRate'] = - exrate_format(retrieve_exrate($_POST['curr_abrev'], $_POST['date_'])); + maxprec_format(retrieve_exrate($_POST['curr_abrev'], $_POST['date_'])); $Ajax->activate('BuyRate'); } - small_amount_row(_("Exchange Rate:"), 'BuyRate', null, '', - submit('get_rate',_("Get"), false, _('Get current ECB rate') , true), - user_exrate_dec()); + amount_row(_("Exchange Rate:"), 'BuyRate', null, '', + submit('get_rate',_("Get"), false, _('Get current ECB rate') , true), 'max'); end_table(1); @@ -191,10 +189,7 @@ if ($_POST['curr_abrev'] != get_global_curr_code()) set_global_curr_code($_POST['curr_abrev']); -$sql = "SELECT date_, rate_buy, id FROM " - .TB_PREF."exchange_rates " - ."WHERE curr_code=".db_escape($_POST['curr_abrev'])." - ORDER BY date_ DESC"; +$sql = get_sql_for_exchange_rates(); $cols = array( _("Date to Use From") => 'date', diff --git a/gl/manage/gl_account_classes.php b/gl/manage/gl_account_classes.php index bc141c37..238ffa0a 100644 --- a/gl/manage/gl_account_classes.php +++ b/gl/manage/gl_account_classes.php @@ -19,19 +19,20 @@ include($path_to_root . "/gl/includes/gl_db.inc"); include($path_to_root . "/includes/ui.inc"); -simple_page_mode(true); +simple_page_mode(false); //----------------------------------------------------------------------------------- function can_process() { global $use_oldstyle_convert; - if (!is_numeric($_POST['id'])) + + if (strlen(trim($_POST['id'])) == 0) { - display_error( _("The account class ID must be numeric.")); + display_error( _("The account class ID cannot be empty.")); set_focus('id'); return false; } - if (strlen($_POST['name']) == 0) + if (strlen(trim($_POST['name'])) == 0) { display_error( _("The account class name cannot be empty.")); set_focus('name'); @@ -50,7 +51,7 @@ if ($Mode=='ADD_ITEM' || $Mode=='UPDATE_ITEM') if (can_process()) { - if ($selected_id != -1) + if ($selected_id != "") { if(update_account_class($selected_id, $_POST['name'], $_POST['ctype'])) display_notification(_('Selected account class settings has been updated')); @@ -69,13 +70,9 @@ if ($Mode=='ADD_ITEM' || $Mode=='UPDATE_ITEM') function can_delete($selected_id) { - if ($selected_id == -1) + if ($selected_id == "") return false; - $sql= "SELECT COUNT(*) FROM ".TB_PREF."chart_types - WHERE class_id=$selected_id"; - $result = db_query($sql, "could not query chart master"); - $myrow = db_fetch_row($result); - if ($myrow[0] > 0) + if (key_in_foreign_table($selected_id, 'chart_types', 'class_id')) { display_error(_("Cannot delete this account class because GL account types have been created referring to it.")); return false; @@ -101,7 +98,7 @@ if ($Mode == 'Delete') //----------------------------------------------------------------------------------- if ($Mode == 'RESET') { - $selected_id = -1; + $selected_id = ""; $_POST['id'] = $_POST['name'] = $_POST['ctype'] = ''; } //----------------------------------------------------------------------------------- @@ -109,7 +106,7 @@ if ($Mode == 'RESET') $result = get_account_classes(check_value('show_inactive')); start_form(); -start_table($table_style); +start_table(TABLESTYLE); $th = array(_("Class ID"), _("Class Name"), _("Class Type"), "", ""); if (isset($use_oldstyle_convert) && $use_oldstyle_convert == 1) $th[2] = _("Balance Sheet"); @@ -140,22 +137,22 @@ inactive_control_row($th); end_table(1); //----------------------------------------------------------------------------------- -start_table($table_style2); +start_table(TABLESTYLE2); -if ($selected_id != -1) +if ($selected_id != "") { - if ($Mode == 'Edit') { - //editing an existing status code - $myrow = get_account_class($selected_id); - - $_POST['id'] = $myrow["cid"]; - $_POST['name'] = $myrow["class_name"]; - if (isset($use_oldstyle_convert) && $use_oldstyle_convert == 1) - $_POST['ctype'] = ($myrow["ctype"] >= CL_ASSETS && $myrow["ctype"] < CL_INCOME ? 1 : 0); - else - $_POST['ctype'] = $myrow["ctype"]; - hidden('selected_id', $selected_id); - } + if ($Mode == 'Edit') { + //editing an existing status code + $myrow = get_account_class($selected_id); + + $_POST['id'] = $myrow["cid"]; + $_POST['name'] = $myrow["class_name"]; + if (isset($use_oldstyle_convert) && $use_oldstyle_convert == 1) + $_POST['ctype'] = ($myrow["ctype"] >= CL_ASSETS && $myrow["ctype"] < CL_INCOME ? 1 : 0); + else + $_POST['ctype'] = $myrow["ctype"]; + hidden('selected_id', $selected_id); + } hidden('id'); label_row(_("Class ID:"), $_POST['id']); @@ -175,7 +172,7 @@ else end_table(1); -submit_add_or_update_center($selected_id == -1, '', 'both'); +submit_add_or_update_center($selected_id == "", '', 'both'); end_form(); diff --git a/gl/manage/gl_account_types.php b/gl/manage/gl_account_types.php index b73d9111..3cef7a07 100644 --- a/gl/manage/gl_account_types.php +++ b/gl/manage/gl_account_types.php @@ -19,27 +19,26 @@ include($path_to_root . "/gl/includes/gl_db.inc"); include($path_to_root . "/includes/ui.inc"); -simple_page_mode(true); +simple_page_mode(false); //----------------------------------------------------------------------------------- function can_process() { - global $selected_id; - - if (!input_num('id')) + if (strlen(trim($_POST['id'])) == 0) { - display_error( _("The account id must be an integer and cannot be empty.")); + display_error( _("The account group id cannot be empty.")); set_focus('id'); return false; } - if (strlen($_POST['name']) == 0) + if (strlen(trim($_POST['name'])) == 0) { display_error( _("The account group name cannot be empty.")); set_focus('name'); return false; } - if (isset($selected_id) && ($selected_id == $_POST['parent'])) + //if (strcmp($_POST['id'], $_POST['parent']) == 0) + if ($_POST['id'] === $_POST['parent']) { display_error(_("You cannot set an account group to be a subgroup of itself.")); return false; @@ -56,18 +55,18 @@ if ($Mode=='ADD_ITEM' || $Mode=='UPDATE_ITEM') if (can_process()) { - if ($selected_id != -1) + if ($selected_id != "") { - if (update_account_type($selected_id, $_POST['name'], $_POST['class_id'], $_POST['parent'])) + if (update_account_type($_POST['id'], $_POST['name'], $_POST['class_id'], $_POST['parent'], $_POST['old_id'])) display_notification(_('Selected account type has been updated')); } else { if (add_account_type($_POST['id'], $_POST['name'], $_POST['class_id'], $_POST['parent'])) { display_notification(_('New account type has been added')); - $Mode = 'RESET'; } } + $Mode = 'RESET'; } } @@ -75,25 +74,17 @@ if ($Mode=='ADD_ITEM' || $Mode=='UPDATE_ITEM') function can_delete($selected_id) { - if ($selected_id == -1) + if ($selected_id == "") return false; $type = db_escape($selected_id); - $sql= "SELECT COUNT(*) FROM ".TB_PREF."chart_master - WHERE account_type=$type"; - $result = db_query($sql, "could not query chart master"); - $myrow = db_fetch_row($result); - if ($myrow[0] > 0) + if (key_in_foreign_table($type, 'chart_master', 'account_type', true)) { display_error(_("Cannot delete this account group because GL accounts have been created referring to it.")); return false; } - $sql= "SELECT COUNT(*) FROM ".TB_PREF."chart_types - WHERE parent=$type"; - $result = db_query($sql, "could not query chart types"); - $myrow = db_fetch_row($result); - if ($myrow[0] > 0) + if (key_in_foreign_table($type, 'chart_types', 'parent', true)) { display_error(_("Cannot delete this account group because GL account groups have been created referring to it.")); return false; @@ -117,7 +108,7 @@ if ($Mode == 'Delete') } if ($Mode == 'RESET') { - $selected_id = -1; + $selected_id = ""; $_POST['id'] = $_POST['name'] = ''; unset($_POST['parent']); unset($_POST['class_id']); @@ -127,8 +118,8 @@ if ($Mode == 'RESET') $result = get_account_types(check_value('show_inactive')); start_form(); -start_table($table_style); -$th = array(_("ID"), _("Name"), _("Subgroup Of"), _("Class Type"), "", ""); +start_table(TABLESTYLE); +$th = array(_("Group ID"), _("Group Name"), _("Subgroup Of"), _("Class Type"), "", ""); inactive_control_column($th); table_header($th); @@ -140,7 +131,7 @@ while ($myrow = db_fetch($result)) $bs_text = get_account_class_name($myrow["class_id"]); - if ($myrow["parent"] == ANY_NUMERIC) + if ($myrow["parent"] == '-1') { $parent_text = ""; } @@ -163,9 +154,9 @@ inactive_control_row($th); end_table(1); //----------------------------------------------------------------------------------- -start_table($table_style2); +start_table(TABLESTYLE2); -if ($selected_id != -1) +if ($selected_id != "") { if ($Mode == 'Edit') { @@ -175,14 +166,19 @@ if ($selected_id != -1) $_POST['id'] = $myrow["id"]; $_POST['name'] = $myrow["name"]; $_POST['parent'] = $myrow["parent"]; + if ($_POST['parent'] == '-1') + $_POST['parent'] == ""; $_POST['class_id'] = $myrow["class_id"]; - hidden('selected_id', $selected_id); + hidden('selected_id', $myrow['id']); + hidden('old_id', $myrow["id"]); } - hidden('id'); - label_row(_("ID:"), $_POST['id']); + else + { + hidden('selected_id', $selected_id); + hidden('old_id', $_POST["old_id"]); + } } -else - text_row_ex(_("ID:"), 'id', 10); +text_row_ex(_("ID:"), 'id', 10); text_row_ex(_("Name:"), 'name', 50); gl_account_types_list_row(_("Subgroup Of:"), 'parent', null, _("None"), true); @@ -191,7 +187,7 @@ class_list_row(_("Class Type:"), 'class_id', null); end_table(1); -submit_add_or_update_center($selected_id == -1, '', 'both'); +submit_add_or_update_center($selected_id == "", '', 'both'); end_form(); diff --git a/gl/manage/gl_accounts.php b/gl/manage/gl_accounts.php index 807a53a7..8944d385 100644 --- a/gl/manage/gl_accounts.php +++ b/gl/manage/gl_accounts.php @@ -47,13 +47,13 @@ if (isset($_POST['add']) || isset($_POST['update'])) $input_error = 0; - if (strlen($_POST['account_code']) == 0) + if (strlen(trim($_POST['account_code'])) == 0) { $input_error = 1; display_error( _("The account code must be entered.")); set_focus('account_code'); } - elseif (strlen($_POST['account_name']) == 0) + elseif (strlen(trim($_POST['account_name'])) == 0) { $input_error = 1; display_error( _("The account name cannot be empty.")); @@ -108,108 +108,55 @@ function can_delete($selected_account) return false; $acc = db_escape($selected_account); - $sql= "SELECT COUNT(*) FROM ".TB_PREF."gl_trans WHERE account=$acc"; - $result = db_query($sql,"Couldn't test for existing transactions"); - - $myrow = db_fetch_row($result); - if ($myrow[0] > 0) + if (key_in_foreign_table($acc, 'gl_trans', 'account', true)) { display_error(_("Cannot delete this account because transactions have been created using this account.")); return false; } - $sql= "SELECT COUNT(*) FROM ".TB_PREF."company WHERE debtors_act=$acc - OR pyt_discount_act=$acc - OR creditors_act=$acc - OR bank_charge_act=$acc - OR exchange_diff_act=$acc - OR profit_loss_year_act=$acc - OR retained_earnings_act=$acc - OR freight_act=$acc - OR default_sales_act=$acc - OR default_sales_discount_act=$acc - OR default_prompt_payment_act=$acc - OR default_inventory_act=$acc - OR default_cogs_act=$acc - OR default_adj_act=$acc - OR default_inv_sales_act=$acc - OR default_assembly_act=$acc"; - $result = db_query($sql,"Couldn't test for default company GL codes"); - - $myrow = db_fetch_row($result); - if ($myrow[0] > 0) + if (gl_account_in_company_defaults($acc)) { display_error(_("Cannot delete this account because it is used as one of the company default GL accounts.")); return false; } - - $sql= "SELECT COUNT(*) FROM ".TB_PREF."bank_accounts WHERE account_code=$acc"; - $result = db_query($sql,"Couldn't test for bank accounts"); - $myrow = db_fetch_row($result); - if ($myrow[0] > 0) + if (key_in_foreign_table($acc, 'bank_accounts', 'account_code', true)) { display_error(_("Cannot delete this account because it is used by a bank account.")); return false; } - $sql= "SELECT COUNT(*) FROM ".TB_PREF."stock_master WHERE - inventory_account=$acc - OR cogs_account=$acc - OR adjustment_account=$acc - OR sales_account=$acc"; - $result = db_query($sql,"Couldn't test for existing stock GL codes"); - - $myrow = db_fetch_row($result); - if ($myrow[0] > 0) + if (gl_account_in_stock_category($acc)) + { + display_error(_("Cannot delete this account because it is used by one or more Item Categories.")); + return false; + } + + if (gl_account_in_stock_master($acc)) { display_error(_("Cannot delete this account because it is used by one or more Items.")); return false; } - $sql= "SELECT COUNT(*) FROM ".TB_PREF."tax_types WHERE sales_gl_code=$acc OR purchasing_gl_code=$acc"; - $result = db_query($sql,"Couldn't test for existing tax GL codes"); - - $myrow = db_fetch_row($result); - if ($myrow[0] > 0) + if (gl_account_in_tax_types($acc)) { display_error(_("Cannot delete this account because it is used by one or more Taxes.")); return false; } - $sql= "SELECT COUNT(*) FROM ".TB_PREF."cust_branch WHERE - sales_account=$acc - OR sales_discount_account=$acc - OR receivables_account=$acc - OR payment_discount_account=$acc"; - $result = db_query($sql,"Couldn't test for existing cust branch GL codes"); - - $myrow = db_fetch_row($result); - if ($myrow[0] > 0) + if (gl_account_in_cust_branch($acc)) { display_error(_("Cannot delete this account because it is used by one or more Customer Branches.")); return false; } - $sql= "SELECT COUNT(*) FROM ".TB_PREF."suppliers WHERE - purchase_account=$acc - OR payment_discount_account=$acc - OR payable_account=$acc"; - $result = db_query($sql,"Couldn't test for existing suppliers GL codes"); - - $myrow = db_fetch_row($result); - if ($myrow[0] > 0) + if (gl_account_in_suppliers($acc)) { display_error(_("Cannot delete this account because it is used by one or more suppliers.")); return false; } - $sql= "SELECT COUNT(*) FROM ".TB_PREF."quick_entry_lines WHERE - dest_id=$acc AND UPPER(LEFT(action, 1)) <> 'T'"; - $result = db_query($sql,"Couldn't test for existing suppliers GL codes"); - - $myrow = db_fetch_row($result); - if ($myrow[0] > 0) + if (gl_account_in_quick_entry_lines($acc)) { display_error(_("Cannot delete this account because it is used by one or more Quick Entry Lines.")); return false; @@ -241,7 +188,7 @@ start_form(); if (db_has_gl_accounts()) { - start_table("class = 'tablestyle_noborder'"); + start_table(TABLESTYLE_NOBORDER); start_row(); gl_all_accounts_list_cells(null, 'AccountList', null, false, false, _('New account'), true, check_value('show_inactive')); @@ -255,7 +202,7 @@ if (db_has_gl_accounts()) } br(1); -start_table($table_style2); +start_table(TABLESTYLE2); if ($selected_account != "") { @@ -287,10 +234,10 @@ else $_POST['account_name'] = $_POST['account_type'] = ''; $_POST['inactive'] = 0; } - text_row_ex(_("Account Code:"), 'account_code', 11); + text_row_ex(_("Account Code:"), 'account_code', 15); } -text_row_ex(_("Account Code 2:"), 'account_code2', 11); +text_row_ex(_("Account Code 2:"), 'account_code2', 15); text_row_ex(_("Account Name:"), 'account_name', 60); diff --git a/gl/manage/gl_quick_entries.php b/gl/manage/gl_quick_entries.php index a9ad9b55..87e770c4 100644 --- a/gl/manage/gl_quick_entries.php +++ b/gl/manage/gl_quick_entries.php @@ -74,7 +74,14 @@ function can_process() set_focus('description'); return false; } - if (strlen($_POST['base_desc']) == 0) + $bal_type = get_post('bal_type'); + if ($bal_type == 1 && $_POST['type'] != QE_JOURNAL) + { + display_error( _("You can only use Balance Based together with Journal Entries.")); + set_focus('base_desc'); + return false; + } + if (!$bal_type && strlen($_POST['base_desc']) == 0) { display_error( _("The base amount description cannot be empty.")); set_focus('base_desc'); @@ -95,13 +102,13 @@ if ($Mode=='ADD_ITEM' || $Mode=='UPDATE_ITEM') if ($selected_id != -1) { update_quick_entry($selected_id, $_POST['description'], $_POST['type'], - input_num('base_amount'), $_POST['base_desc']); + input_num('base_amount'), $_POST['base_desc'], get_post('bal_type')); display_notification(_('Selected quick entry has been updated')); } else { add_quick_entry($_POST['description'], $_POST['type'], - input_num('base_amount'), $_POST['base_desc']); + input_num('base_amount'), $_POST['base_desc'], get_post('bal_type')); display_notification(_('New quick entry has been added')); } $Mode = 'RESET'; @@ -142,6 +149,14 @@ if ($Mode == 'Delete') } } +if (find_submit('Edit') != -1) { + $Mode2 = 'RESET2'; + set_focus('description'); +} +if (find_submit('BEd') != -1 || get_post('ADD_ITEM2')) { + set_focus('actn'); +} + if ($Mode2 == 'BDel') { delete_quick_entry_line($selected_id2); @@ -155,6 +170,7 @@ if ($Mode == 'RESET') $_POST['description'] = $_POST['type'] = ''; $_POST['base_desc']= _('Base Amount'); $_POST['base_amount'] = price_format(0); + $_POST['bal_type'] = 0; } if ($Mode2 == 'RESET2') { @@ -166,7 +182,7 @@ if ($Mode2 == 'RESET2') $result = get_quick_entries(); start_form(); -start_table($table_style); +start_table(TABLESTYLE); $th = array(_("Description"), _("Type"), "", ""); table_header($th); @@ -183,54 +199,68 @@ while ($myrow = db_fetch($result)) } end_table(1); -end_form(); //----------------------------------------------------------------------------------- -start_form(); - -start_table($table_style2); +div_start('qe'); +start_table(TABLESTYLE2); if ($selected_id != -1) { - //if ($Mode == 'Edit') - //{ - //editing an existing status code + if ($Mode == 'Edit') // changed by Joe 2010-11-09 + { $myrow = get_quick_entry($selected_id); $_POST['id'] = $myrow["id"]; $_POST['description'] = $myrow["description"]; $_POST['type'] = $myrow["type"]; $_POST['base_desc'] = $myrow["base_desc"]; - $_POST['base_amount'] = price_format($myrow["base_amount"]); - hidden('selected_id', $selected_id); - //} + $_POST['bal_type'] = $myrow["bal_type"]; + $_POST['base_amount'] = $myrow["bal_type"] ? + $myrow["base_amount"] : price_format($myrow["base_amount"]); + } + hidden('selected_id', $selected_id); } text_row_ex(_("Description").':', 'description', 50, 60); -quick_entry_types_list_row(_("Entry Type").':', 'type'); +quick_entry_types_list_row(_("Entry Type").':', 'type', null, true); -text_row_ex(_("Base Amount Description").':', 'base_desc', 50, 60, '',_('Base Amount')); +if (get_post('type') == QE_JOURNAL) +{ + yesno_list_row(_("Balance Based"), 'bal_type', null, _("Yes"), _("No"), true); +} -amount_row(_("Default Base Amount").':', 'base_amount', price_format(0)); +if (list_updated('bal_type') || list_updated('type')) +{ + $Ajax->activate('qe'); +} +if (get_post('type') == QE_JOURNAL && get_post('bal_type') == 1) +{ + yesno_list_row(_("Period"), 'base_amount', null, _("Monthly"), _("Yearly")); + gl_all_accounts_list_row(_("Account"), 'base_desc', null, true); +} +else +{ + $_POST['base_desc'] = _("Base Amount"); + text_row_ex(_("Base Amount Description").':', 'base_desc', 50, 60, '',_('Base Amount')); + amount_row(_("Default Base Amount").':', 'base_amount', price_format(0)); +} end_table(1); - submit_add_or_update_center($selected_id == -1, '', 'both'); - -end_form(); +div_end(); if ($selected_id != -1) { display_heading(_("Quick Entry Lines") . " - " . $_POST['description']); $result = get_quick_entry_lines($selected_id); - start_form(); - start_table($table_style2); + + start_table(TABLESTYLE2); $dim = get_company_pref('use_dimension'); if ($dim == 2) $th = array(_("Post"), _("Account/Tax Type"), _("Amount"), _("Dimension"), _("Dimension")." 2", "", ""); - else if ($dim == 1) + elseif ($dim == 1) $th = array(_("Post"), _("Account/Tax Type"), _("Amount"), _("Dimension"), "", ""); else $th = array(_("Post"), _("Account/Tax Type"), _("Amount"), "", ""); @@ -268,15 +298,9 @@ if ($selected_id != -1) end_row(); } end_table(1); - hidden('selected_id', $selected_id); - hidden('selected_id2', $selected_id2); - hidden('description', $_POST['description']); - hidden('type', $_POST['type']); - end_form(); - start_form(); div_start('edit_line'); - start_table($table_style2); + start_table(TABLESTYLE2); if ($selected_id2 != -1) { @@ -327,16 +351,14 @@ if ($selected_id != -1) if ($dim < 1) hidden('dimension_id', 0); div_end(); - + hidden('selected_id', $selected_id); hidden('selected_id2', $selected_id2); - hidden('description', $_POST['description']); - hidden('type', $_POST['type']); submit_add_or_update_center2($selected_id2 == -1, '', true); - end_form(); } +end_form(); //------------------------------------------------------------------------------------ end_page(); diff --git a/gl/manage/revaluate_currencies.php b/gl/manage/revaluate_currencies.php new file mode 100644 index 00000000..78c5cbbb --- /dev/null +++ b/gl/manage/revaluate_currencies.php @@ -0,0 +1,129 @@ +. +***********************************************************************/ +$page_security = 'SA_EXCHANGERATE'; +$path_to_root = "../.."; +include_once($path_to_root . "/includes/session.inc"); + +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(_($help_context = "Revaluation of Currency Accounts"), false, false, "", $js); + +if (isset($_GET['AddedID'])) +{ + $trans_no = $_GET['AddedID']; + $trans_type = ST_JOURNAL; + + if ($trans_no == 0) + display_notification_centered( _("No Revaluation was needed")); + else + { + display_notification_centered( _("Transfer has been entered")); + + display_note(get_gl_view_str($trans_type, $trans_no, _("&View the GL Journal Entries for this Transfer"))); + } + + //display_footer_exit(); +} + + +//--------------------------------------------------------------------------------------------- +function check_data() +{ + global $Refs; + + if (!is_date($_POST['date'])) + { + display_error( _("The entered date is invalid.")); + set_focus('date'); + return false; + } + if (!is_date_in_fiscalyear($_POST['date'])) + { + display_error(_("The entered date is not in fiscal year.")); + set_focus('date'); + return false; + } + if (!$Refs->is_valid($_POST['ref'])) + { + display_error(_("You must enter a reference.")); + set_focus('ref'); + return false; + } + + if (!is_new_reference($_POST['ref'], ST_JOURNAL)) + { + display_error(_("The entered reference is already in use.")); + set_focus('ref'); + return false; + } + + return true; +} + +//--------------------------------------------------------------------------------------------- + +function handle_submit() +{ + if (!check_data()) + return; + + $trans_no = add_exchange_variation_all($_POST['date'], $_POST['ref'], $_POST['memo_']); + + meta_forward($_SERVER['PHP_SELF'], "AddedID=$trans_no"); + //clear_data(); +} + + +//--------------------------------------------------------------------------------------------- + +function display_reval() +{ + global $Refs; + start_form(); + start_table(TABLESTYLE2); + + if (!isset($_POST['date'])) + $_POST['date'] = Today(); + date_row(_("Date for Revaluation:"), 'date', '', null, 0, 0, 0, null, true); + ref_row(_("Reference:"), 'ref', '', $Refs->get_next(ST_JOURNAL)); + textarea_row(_("Memo:"), 'memo_', null, 40,4); + end_table(1); + + submit_center('submit', _("Revaluate Currencies"), true, false); + end_form(); +} + +//--------------------------------------------------------------------------------------------- + +function clear_data() +{ + unset($_POST['date_']); + unset($_POST['memo_']); +} + +//--------------------------------------------------------------------------------------------- + +if (get_post('submit')) + handle_submit(); + +//--------------------------------------------------------------------------------------------- + +display_reval(); + +end_page(); + +?> diff --git a/gl/view/accrual_trans.php b/gl/view/accrual_trans.php new file mode 100644 index 00000000..6d1d360d --- /dev/null +++ b/gl/view/accrual_trans.php @@ -0,0 +1,108 @@ +. +***********************************************************************/ +$page_security = 'SA_ACCRUALS'; +$path_to_root = "../.."; +include_once($path_to_root . "/includes/session.inc"); + +$_SESSION['page_title'] = _($help_context = _("Search General Ledger Transactions for account: ").$_GET['act']); + +page($_SESSION['page_title'], true); + +include_once($path_to_root . "/includes/date_functions.inc"); +include_once($path_to_root . "/includes/ui.inc"); + +include_once($path_to_root . "/gl/includes/gl_db.inc"); + +$js ="\n\n"; +echo $js; + +if (!isset($_GET['act']) || !isset($_GET['date'])) +{ /*Script was not passed the correct parameters */ + + echo "

" . _("The script must be called with a valid transaction type and transaction number to review the general ledger postings for.") . "

"; + exit; +} + +display_heading($_SESSION['page_title']. " ".get_gl_account_name($_GET['act'])); + +br(); + +start_table(TABLESTYLE); +$dim = get_company_pref('use_dimension'); + +$first_cols = array(_("Type"), "#", _("Date")); +if ($dim == 2) + $dim_cols = array(_("Dimension")." 1", _("Dimension")." 2"); +else if ($dim == 1) + $dim_cols = array(_("Dimension")); +else + $dim_cols = array(); + +$remaining_cols = array(_("Person/Item"), _("Debit"), _("Credit"), _("Memo")); + +$th = array_merge($first_cols, $dim_cols, $remaining_cols); + +table_header($th); +$end = $_GET['date']; +$account = $_GET['act']; +$begin = add_days($end, -30); + +$result = get_gl_transactions($begin, $end, -1, $account, 0, 0, null); +$j = 0; +$k = 1; +while ($myrow = db_fetch($result)) +{ + alt_table_row_color($k); + + $trandate = sql2date($myrow["tran_date"]); + + label_cell($systypes_array[$myrow["type"]]); + $amount = price_format($myrow["amount"]); + $str = "".$myrow['type_no'].""; + label_cell($str); + label_cell($trandate); + + if ($dim >= 1) + label_cell(get_dimension_string($myrow['dimension_id'], true)); + if ($dim > 1) + label_cell(get_dimension_string($myrow['dimension2_id'], true)); + label_cell(payment_person_name($myrow["person_type_id"],$myrow["person_id"])); + display_debit_or_credit_cells($myrow["amount"]); + label_cell($myrow['memo_']); + end_row(); + + $j++; + if ($j == 12) + { + $j = 1; + table_header($th); + } +} +//end of while loop + + +//end of while loop +end_table(1); + +end_page(true); + +?> diff --git a/gl/view/bank_transfer_view.php b/gl/view/bank_transfer_view.php index b56a331c..5d0d0a02 100644 --- a/gl/view/bank_transfer_view.php +++ b/gl/view/bank_transfer_view.php @@ -61,7 +61,7 @@ if ($from_trans['bank_curr_code'] != $to_trans['bank_curr_code']) display_heading($systypes_array[ST_BANKTRANSFER] . " #$trans_no"); echo "
"; -start_table("$table_style width=80%"); +start_table(TABLESTYLE, "width=80%"); start_row(); label_cells(_("From Bank Account"), $from_trans['bank_account_name'], "class='tableheader2'"); @@ -91,5 +91,5 @@ end_table(1); is_voided_display(ST_BANKTRANSFER, $trans_no, _("This transfer has been voided.")); -end_page(true); +end_page(true, false, false, ST_BANKTRANSFER, $trans_no); ?> \ No newline at end of file diff --git a/gl/view/gl_deposit_view.php b/gl/view/gl_deposit_view.php index 4a7da98b..949282b5 100644 --- a/gl/view/gl_deposit_view.php +++ b/gl/view/gl_deposit_view.php @@ -48,7 +48,7 @@ echo "
"; display_heading(_("GL Deposit") . " #$trans_no"); echo "
"; -start_table("$table_style width=80%"); +start_table(TABLESTYLE, "width=80%"); if ($show_currencies) { @@ -93,7 +93,7 @@ else if ($show_currencies) display_heading2(_("Item Amounts are Shown in :") . " " . $company_currency); - start_table("$table_style width=80%"); + start_table(TABLESTYLE, "width=80%"); $dim = get_company_pref('use_dimension'); if ($dim == 2) $th = array(_("Account Code"), _("Account Description"), _("Dimension")." 1", _("Dimension")." 2", @@ -136,5 +136,5 @@ else display_allocations_from($to_trans['person_type_id'], $to_trans['person_id'], 2, $trans_no, $to_trans['amount']); } -end_page(true); +end_page(true, false, false, ST_BANKDEPOSIT, $trans_no); ?> \ No newline at end of file diff --git a/gl/view/gl_payment_view.php b/gl/view/gl_payment_view.php index 44dd2948..f348de15 100644 --- a/gl/view/gl_payment_view.php +++ b/gl/view/gl_payment_view.php @@ -46,7 +46,7 @@ if ($from_trans['bank_curr_code'] != $company_currency) display_heading(_("GL Payment") . " #$trans_no"); echo "
"; -start_table("$table_style width=80%"); +start_table(TABLESTYLE, "width=80%"); if ($show_currencies) { @@ -62,7 +62,7 @@ start_row(); label_cells(_("From Bank Account"), $from_trans['bank_account_name'], "class='tableheader2'"); if ($show_currencies) label_cells(_("Currency"), $from_trans['bank_curr_code'], "class='tableheader2'"); -label_cells(_("Amount"), number_format2($from_trans['amount'], user_price_dec()), "class='tableheader2'", "align=right"); +label_cells(_("Amount"), number_format2(-$from_trans['amount'], user_price_dec()), "class='tableheader2'", "align=right"); label_cells(_("Date"), sql2date($from_trans['trans_date']), "class='tableheader2'"); end_row(); start_row(); @@ -92,7 +92,7 @@ else display_heading2(_("Item Amounts are Shown in :") . " " . $company_currency); echo "
"; - start_table("$table_style width=80%"); + start_table(TABLESTYLE, "width=80%"); $dim = get_company_pref('use_dimension'); if ($dim == 2) $th = array(_("Account Code"), _("Account Description"), _("Dimension")." 1", _("Dimension")." 2", @@ -136,5 +136,5 @@ else display_allocations_from($from_trans['person_type_id'], $from_trans['person_id'], 1, $trans_no, -$from_trans['amount']); } -end_page(true); +end_page(true, false, false, ST_BANKPAYMENT, $trans_no); ?> \ No newline at end of file diff --git a/gl/view/gl_trans_view.php b/gl/view/gl_trans_view.php index 32276c3a..70103026 100644 --- a/gl/view/gl_trans_view.php +++ b/gl/view/gl_trans_view.php @@ -23,15 +23,15 @@ include_once($path_to_root . "/gl/includes/gl_db.inc"); if (!isset($_GET['type_id']) || !isset($_GET['trans_no'])) { /*Script was not passed the correct parameters */ - echo "

" . _("The script must be called with a valid transaction type and transaction number to review the general ledger postings for.") . "

"; - exit; + display_note(_("The script must be called with a valid transaction type and transaction number to review the general ledger postings for.")); + end_page(); } function display_gl_heading($myrow) { - global $table_style, $systypes_array; + global $systypes_array; $trans_name = $systypes_array[$_GET['type_id']]; - start_table("$table_style width=95%"); + start_table(TABLESTYLE, "width=95%"); $th = array(_("General Ledger Transaction Details"), _("Reference"), _("Date"), _("Person/Item")); table_header($th); @@ -47,15 +47,7 @@ function display_gl_heading($myrow) end_table(1); } -$sql = "SELECT gl.*, cm.account_name, IF(ISNULL(refs.reference), '', refs.reference) AS reference FROM " - .TB_PREF."gl_trans as gl - LEFT JOIN ".TB_PREF."chart_master as cm ON gl.account = cm.account_code - LEFT JOIN ".TB_PREF."refs as refs ON (gl.type=refs.type AND gl.type_no=refs.id)" - ." WHERE gl.type= ".db_escape($_GET['type_id']) - ." AND gl.type_no = ".db_escape($_GET['trans_no']) - ." ORDER BY counter"; -$result = db_query($sql,"could not get transactions"); -//alert("sql = ".$sql); +$result = get_gl_trans($_GET['type_id'], $_GET['trans_no']); if (db_num_rows($result) == 0) { @@ -79,13 +71,14 @@ else $k = 0; //row colour counter $heading_shown = false; +$credit = $debit = 0; while ($myrow = db_fetch($result)) { if ($myrow['amount'] == 0) continue; if (!$heading_shown) { display_gl_heading($myrow); - start_table("$table_style width=95%"); + start_table(TABLESTYLE, "width=95%"); table_header($th); $heading_shown = true; } @@ -102,14 +95,28 @@ while ($myrow = db_fetch($result)) display_debit_or_credit_cells($myrow['amount']); label_cell($myrow['memo_']); end_row(); - + if ($myrow['amount'] > 0 ) + $debit += $myrow['amount']; + else + $credit += $myrow['amount']; } +start_row("class='inquirybg' style='font-weight:bold'"); +label_cell(_("Total"), "colspan=2"); +if ($dim >= 1) + label_cell(''); +if ($dim > 1) + label_cell(''); +amount_cell($debit); +amount_cell(-$credit); +label_cell(''); +end_row(); + //end of while loop if ($heading_shown) end_table(1); is_voided_display($_GET['type_id'], $_GET['trans_no'], _("This transaction has been voided.")); -end_page(true); +end_page(true, false, false, $_GET['type_id'], $_GET['trans_no']); ?> diff --git a/includes/access_levels.inc b/includes/access_levels.inc index 797f374e..7ea510a6 100644 --- a/includes/access_levels.inc +++ b/includes/access_levels.inc @@ -110,6 +110,7 @@ $security_areas =array( 'SA_INVENTORYMOVETYPE' => array(SS_SETUP|11, _("Inventory movement types")), 'SA_WORKCENTRES' => array(SS_SETUP|12, _("Manufacture work centres")), 'SA_FORMSETUP' => array(SS_SETUP|13, _("Forms setup")), + 'SA_CRMCATEGORY' => array(SS_SETUP|14, _("Contact categories")), // // Special and common functions // @@ -226,6 +227,7 @@ $security_areas =array( 'SA_FISCALYEARS' => array(SS_GL_C|9, _("Fiscal years maintenance")), 'SA_GLSETUP' => array(SS_GL_C|10, _("Company GL setup")), 'SA_GLACCOUNTTAGS' => array(SS_GL_C|11, _("GL Account tags")), + 'SA_MULTIFISCALYEARS' => array(SS_GL_C|13, _("Allow entry on non closed Fiscal years")), 'SA_BANKTRANSVIEW' => array(SS_GL|1, _("Bank transactions view")), 'SA_GLTRANSVIEW' => array(SS_GL|2, _("GL postings view")), @@ -238,6 +240,7 @@ $security_areas =array( 'SA_BANKJOURNAL' => array(SS_GL|11, _("Journal entries to bank related accounts")), 'SA_BUDGETENTRY' => array(SS_GL|9, _("Budget edition")), 'SA_STANDARDCOST' => array(SS_GL|10, _("Item standard costs")), + 'SA_ACCRUALS' => array(SS_GL|12, _("Revenue / Cost Accruals")), 'SA_GLANALYTIC' => array(SS_GL_A|1, _("GL analytical reports and inquiries")), 'SA_TAXREP' => array(SS_GL_A|2, _("Tax reports and inquiries")), @@ -257,9 +260,11 @@ function add_access_extensions() global $security_areas, $security_sections, $installed_extensions; foreach($installed_extensions as $extid => $ext) { + $accext = hook_invoke($ext['package'], 'install_access', $dummy); + if ($accext == null) continue; + $scode = 100; $acode = 100; - $accext = get_access_extensions($extid); $extsections = $accext[1]; $extareas = $accext[0]; $extcode = $extid<<16; @@ -290,6 +295,7 @@ function add_access_extensions() /* Helper function to retrieve extension access definitions in isolated environment. */ +/* function get_access_extensions($id) { global $path_to_root, $installed_extensions; @@ -298,9 +304,9 @@ function get_access_extensions($id) { $security_sections = $security_areas = array(); if (isset($ext['acc_file'])) - include($path_to_root.($ext['type'] == 'plugin' ? '/modules/':'/').$ext['path'].'/'.$ext['acc_file']); + include_once($path_to_root.'/'.$ext['path'].'/'.$ext['acc_file']); return array($security_areas, $security_sections); } - +*/ ?> \ No newline at end of file diff --git a/includes/ajax.inc b/includes/ajax.inc index a8a6981c..096d2391 100644 --- a/includes/ajax.inc +++ b/includes/ajax.inc @@ -18,7 +18,7 @@ class Ajax extends JsHttpRequest { function Ajax() { - $this->JsHttpRequest($_SESSION['language']->encoding); + $this->JsHttpRequest(@$_SESSION['language']->encoding); } // // This function is used in ctrl routines to activate @@ -132,8 +132,8 @@ class Ajax extends JsHttpRequest { if($com['n'] == 'up' && $com['t'] == '_page_body') { $cmds = array($com); foreach( $this->aCommands as $k=> $cmd) { - if ($cmd['n'] == 'fc') { // save focus - $cmds[] = $cmd; break; + if ($cmd['n'] == 'fc' || $cmd['n'] == 'js') { // save focus + $cmds[] = $cmd; //break; } } $this->aCommands = $cmds; diff --git a/includes/archive.inc b/includes/archive.inc new file mode 100644 index 00000000..696903f9 --- /dev/null +++ b/includes/archive.inc @@ -0,0 +1,466 @@ +options = array ( + 'basedir' => ".", + 'name' => $name, + 'prepend' => "", + 'inmemory' => 0, + 'overwrite' => 0, + 'recurse' => 1, + 'storepaths' => 1, + 'followlinks' => 0, + 'level' => 3, + 'method' => 1, + 'sfx' => "", + 'type' => "", + 'comment' => "" + ); + $this->files = array (); + $this->exclude = array (); + $this->storeonly = array (); + $this->error = array (); + } + + function set_options($options) + { + foreach ($options as $key => $value) + $this->options[$key] = $value; + if (!empty ($this->options['basedir'])) + { + $this->options['basedir'] = str_replace("\\", "/", $this->options['basedir']); + $this->options['basedir'] = preg_replace("/\/+/", "/", $this->options['basedir']); + $this->options['basedir'] = preg_replace("/\/$/", "", $this->options['basedir']); + } + if (!empty ($this->options['name'])) + { + $this->options['name'] = str_replace("\\", "/", $this->options['name']); +// $this->options['name'] = preg_replace("/\/+/", "/", $this->options['name']); + } + if (!empty ($this->options['prepend'])) + { + $this->options['prepend'] = str_replace("\\", "/", $this->options['prepend']); + $this->options['prepend'] = preg_replace("/^(\.*\/+)+/", "", $this->options['prepend']); + $this->options['prepend'] = preg_replace("/\/+/", "/", $this->options['prepend']); + $this->options['prepend'] = preg_replace("/\/$/", "", $this->options['prepend']) . "/"; + } + } + + function create_archive() + { + $this->make_list(); + + if ($this->options['inmemory'] == 0) + { + if ($this->options['overwrite'] == 0 && + file_exists($this->options['name'] + . ($this->options['type'] == "pkg" || $this->options['type'] == "gzip" ||$this->options['type'] == "bzip" ? ".tmp" : ""))) + { + $this->error[] = "File {$this->options['name']} already exists."; + return 0; + } + else if (!($this->archive = @fopen($this->options['name'].".tmp", "wb+"))) + { + $this->error[] = "Could not open {$this->options['name']} for writing.".':'.getcwd(); + return 0; + } + } + else + $this->archive = ""; + + if (!$this->create_tar()) + { + $this->error[] = "Could not create package file."; + return 0; + } + if (!$this->create_pkg()) + { + $this->error[] = "Could not compress package file."; + return 0; + } + + if ($this->options['inmemory'] == 0) + { + fclose($this->archive); + unlink($this->options['name'] . ".tmp"); + } + } + + function add_data($data) + { + if ($this->options['inmemory'] == 0) + fwrite($this->archive, $data); + else + $this->archive .= $data; + } + + function make_list() + { + if (!empty ($this->exclude)) { + foreach ($this->files as $key => $value) + foreach ($this->exclude as $current) + if ($value['name'] == $current['name']) + unset ($this->files[$key]); + } + if (!empty ($this->storeonly)) + foreach ($this->files as $key => $value) + foreach ($this->storeonly as $current) + if ($value['name'] == $current['name']) + $this->files[$key]['method'] = 0; + unset ($this->exclude, $this->storeonly); + } + + function add_files($list) + { + $temp = $this->list_files($list); + foreach ($temp as $current) + $this->files[] = $current; + } + + function exclude_files($list) + { + $temp = $this->list_files($list); + foreach ($temp as $current) + $this->exclude[] = $current; + } + + function store_files($list) + { + $temp = $this->list_files($list); + foreach ($temp as $current) + $this->storeonly[] = $current; + } + + function list_files($list) + { + if (!is_array ($list)) + { + $temp = $list; + $list = array ($temp); + unset ($temp); + } + + $files = array (); + + $pwd = getcwd(); + chdir($this->options['basedir']); + + foreach ($list as $current) + { + $current = str_replace("\\", "/", $current); + $current = preg_replace("/\/+/", "/", $current); + $current = preg_replace("/\/$/", "", $current); + if (strstr($current, "*")) + { + $regex = preg_replace("/([\\\^\$\.\[\]\|\(\)\?\+\{\}\/])/", "\\\\\\1", $current); + $regex = str_replace("*", ".*", $regex); + $dir = strstr($current, "/") ? substr($current, 0, strrpos($current, "/")) : "."; + $temp = $this->parse_dir($dir); + foreach ($temp as $current2) + if (preg_match("/^{$regex}$/i", $current2['name'])) + $files[] = $current2; + unset ($regex, $dir, $temp, $current); + } + else if (@is_dir($current)) + { + $temp = $this->parse_dir($current); + foreach ($temp as $file) + $files[] = $file; + unset ($temp, $file); + } + else if (@file_exists($current)) + $files[] = array ('name' => $current, 'name2' => $this->options['prepend'] . + preg_replace("/(\.+\/+)+/", "", ($this->options['storepaths'] == 0 && strstr($current, "/")) ? + substr($current, strrpos($current, "/") + 1) : $current), + 'type' => @is_link($current) && $this->options['followlinks'] == 0 ? 2 : 0, + 'ext' => substr($current, strrpos($current, ".")), 'stat' => stat($current)); + } + + chdir($pwd); + + unset ($current, $pwd); + return $files; + } + + function parse_dir($dirname) + { + if ($this->options['storepaths'] == 1 && !preg_match("/^(\.+\/*)+$/", $dirname)) + $files = array (array ('name' => $dirname, 'name2' => $this->options['prepend'] . + preg_replace("/(\.+\/+)+/", "", ($this->options['storepaths'] == 0 && strstr($dirname, "/")) ? + substr($dirname, strrpos($dirname, "/") + 1) : $dirname), 'type' => 5, 'stat' => stat($dirname))); + else + $files = array (); + $dir = @opendir($dirname); + + while ($file = @readdir($dir)) + { + $fullname = $dirname . "/" . $file; + if ($file == "." || $file == "..") + continue; + else if (@is_dir($fullname)) + { + if (empty ($this->options['recurse'])) + continue; + $temp = $this->parse_dir($fullname); + foreach ($temp as $file2) + $files[] = $file2; + } + else if (@file_exists($fullname)) + $files[] = array ('name' => $fullname, 'name2' => $this->options['prepend'] . + preg_replace("/(\.+\/+)+/", "", ($this->options['storepaths'] == 0 && strstr($fullname, "/")) ? + substr($fullname, strrpos($fullname, "/") + 1) : $fullname), + 'type' => @is_link($fullname) && $this->options['followlinks'] == 0 ? 2 : 0, + 'ext' => substr($file, strrpos($file, ".")), 'stat' => stat($fullname)); + } + + @closedir($dir); + + return $files; + } +} + +class tar_file extends archive +{ + function tar_file($name) + { + $this->archive($name); + $this->options['type'] = "tar"; + } + + function create_tar() + { + $pwd = getcwd(); + chdir($this->options['basedir']); + $files = $this->files; + foreach ($files as $current) + { + if ($current['name'] == $this->options['name']) + continue; + if (strlen($current['name2']) > 99) + { + $path = substr($current['name2'], 0, strpos($current['name2'], "/", strlen($current['name2']) - 100) + 1); + $current['name2'] = substr($current['name2'], strlen($path)); + if (strlen($path) > 154 || strlen($current['name2']) > 99) + { + $this->error[] = "Could not add {$path}{$current['name2']} to archive because the filename is too long."; + continue; + } + } + $block = pack("a100a8a8a8a12a12a8a1a100a6a2a32a32a8a8a155a12", $current['name2'], sprintf("%07o", + $current['stat'][2]), sprintf("%07o", $current['stat'][4]), sprintf("%07o", $current['stat'][5]), + sprintf("%011o", $current['type'] == 2 ? 0 : $current['stat'][7]), sprintf("%011o", $current['stat'][9]), + " ", $current['type'], $current['type'] == 2 ? @readlink($current['name']) : "", "ustar ", " ", + "Unknown", "Unknown", "", "", !empty ($path) ? $path : "", ""); + + $checksum = 0; + for ($i = 0; $i < 512; $i++) + $checksum += ord(substr($block, $i, 1)); + $checksum = pack("a8", sprintf("%07o", $checksum)); + $block = substr_replace($block, $checksum, 148, 8); + + if ($current['type'] == 2 || $current['stat'][7] == 0) + { $this->add_data($block); + } + else if ($fp = @fopen($current['name'], "rb")) + { + $this->add_data($block); + + while ($temp = fread($fp, 1048576)) { + $this->add_data($temp); + } + if ($current['stat'][7] % 512 > 0) + { + $temp = ""; + for ($i = 0; $i < 512 - $current['stat'][7] % 512; $i++) + $temp .= "\0"; + $this->add_data($temp); + } + fclose($fp); + } + else + $this->error[] = "Could not open file {$current['name']} for reading. It was not added."; + } + + $this->add_data(pack("a1024", "")); + + chdir($pwd); + + return 1; + } + /* + Extract files to base directory. + When $dry_run!=0 no file is written, + but list of existing files to be written is returned. + */ + function extract_files($dry_run = false) + { + $flist = array(); + if ($fp = $this->open_archive()) + { + $pwd = getcwd(); + // display_error($pwd.':'.$this->options['basedir']); + chdir($this->options['basedir']); + if ($this->options['inmemory'] == 1) + $this->files = array(); + + while ($block = fread($fp, 512)) + { + $temp = unpack("a100name/a8mode/a8uid/a8gid/a12size/a12mtime/a8checksum/a1type/a100symlink/a6magic/a2temp/a32temp/a32temp/a8temp/a8temp/a155prefix/a12temp", $block); + $file = array ( + 'name' => $temp['prefix'] . $temp['name'], + 'stat' => array ( + 2 => octdec($temp['mode']), + 4 => octdec($temp['uid']), + 5 => octdec($temp['gid']), + 7 => octdec($temp['size']), + 9 => octdec($temp['mtime']), + ), + 'checksum' => octdec($temp['checksum']), + 'type' => $temp['type'], + 'magic' => $temp['magic'], + ); + if ($file['checksum'] == 0x00000000) + break; + else if (substr($file['magic'], 0, 5) != "ustar") + { + $this->error[] = "This script does not support extracting this type of tar file."; + break; + } + $block = substr_replace($block, " ", 148, 8); + $checksum = 0; + for ($i = 0; $i < 512; $i++) + $checksum += ord(substr($block, $i, 1)); + if ($file['checksum'] != $checksum) { + $this->error[] = "Could not extract from {$this->options['name']}, it is corrupt."; + break; + } + if ($dry_run || $this->options['inmemory'] == 1) + { + if ($file['type'] == 0) { + if($dry_run) { + $tst = check_write($file['name']); + if (!$tst) { + $this->error[] = "Could not open {$this->options['basedir']}/{$file['name']} for writing."; + break; + } else { + $flist[] = $file['name']; + if ( $tst < 0 && $this->options['overwrite'] == 0) + $this->error[] = "{$file['name']} already exists."; + } + fseek($fp, ($file['stat'][7] + 511) & ~511, SEEK_CUR); // skip data + } else { + $dat = fread($fp, $file['stat'][7]); + $tail = $file['stat'][7] % 512; + if ($tail) + fread($fp, 512 - $tail); + $file['data'] = $dat; + } + } + unset ($file['checksum'], $file['magic']); + $this->files[] = $file; + } + else if ($file['type'] == 5) + { + if (!is_dir($file['name'])) { + mkdir($file['name'], $file['stat'][2]); + } + } + else if ($this->options['overwrite'] == 0 && file_exists($file['name'])) + { + $this->error[] = "{$file['name']} already exists."; + continue; + } + else if ($file['type'] == 2) + { + symlink($temp['symlink'], $file['name']); + @chmod($file['name'], $file['stat'][2]); + } + else if ($new = @fopen($file['name'], "wb")) + { + fwrite($new, fread($fp, $file['stat'][7])); + if ($file['stat'][7] % 512) + fread($fp, 512 - $file['stat'][7] % 512); + fclose($new); + @chmod($file['name'], $file['stat'][2]); + } + else + { + $this->error[] = "Could not open {$file['name']} for writing."; + continue; + } +// @chown($file['name'], $file['stat'][4]); +// @chgrp($file['name'], $file['stat'][5]); + if (!$dry_run) { + @touch($file['name'], $file['stat'][9]); + } + unset ($file); + } + chdir($pwd); + } + else + $this->error[] = "Could not open file {$this->options['name']}"; + + return $flist; + } + + function open_archive() + { + return @fopen($this->options['name'], "rb"); + } +} + +class gzip_file extends tar_file +{ + function gzip_file($name) + { + $this->tar_file($name); + $this->options['type'] = "gzip"; + } + + function create_gzip() + { + if ($this->options['inmemory'] == 0) + { + if ($fp = gzopen($this->options['name'], "wb{$this->options['level']}")) + { + fseek($this->archive, 0); + while ($temp = fread($this->archive, 1048576)) + gzwrite($fp, $temp); + gzclose($fp); + } + else + { + $this->error[] = "Could not open {$this->options['name']} for writing."; + return 0; + } + } + else + $this->archive = gzencode($this->archive, $this->options['level']); + + return 1; + } + + function open_archive() + { + return @gzopen($this->options['name'], "rb"); + } +} + +?> \ No newline at end of file diff --git a/includes/banking.inc b/includes/banking.inc index 59f0fe07..21dbb8f6 100644 --- a/includes/banking.inc +++ b/includes/banking.inc @@ -21,7 +21,7 @@ include_once($path_to_root . "/gl/includes/gl_db.inc"); // function is_bank_account($account_code) { - $sql= "SELECT id FROM ".TB_PREF."bank_accounts WHERE account_code='$account_code'"; + $sql= "SELECT id FROM ".TB_PREF."bank_accounts WHERE account_code=".db_escape($account_code); $result = db_query($sql, "checking account is bank account"); if (db_num_rows($result) > 0) { $acct = db_fetch($result); @@ -41,21 +41,14 @@ function is_company_currency($currency) function get_company_currency() { - $sql= "SELECT curr_default FROM ".TB_PREF."company"; - $result = db_query($sql, "retreive company currency"); - - if (db_num_rows($result) == 0) - display_db_error("Could not find the requested currency. Fatal.", $sql); - - $myrow = db_fetch_row($result); - return $myrow[0]; + return get_company_pref('curr_default'); } //---------------------------------------------------------------------------------- function get_bank_account_currency($id) { - $sql= "SELECT bank_curr_code FROM ".TB_PREF."bank_accounts WHERE id='$id'"; + $sql= "SELECT bank_curr_code FROM ".TB_PREF."bank_accounts WHERE id=".db_escape($id); $result = db_query($sql, "retreive bank account currency"); $myrow = db_fetch_row($result); @@ -66,7 +59,7 @@ function get_bank_account_currency($id) function get_customer_currency($customer_id) { - $sql = "SELECT curr_code FROM ".TB_PREF."debtors_master WHERE debtor_no = '$customer_id'"; + $sql = "SELECT curr_code FROM ".TB_PREF."debtors_master WHERE debtor_no = ".db_escape($customer_id); $result = db_query($sql, "Retreive currency of customer $customer_id"); @@ -78,7 +71,7 @@ function get_customer_currency($customer_id) function get_supplier_currency($supplier_id) { - $sql = "SELECT curr_code FROM ".TB_PREF."suppliers WHERE supplier_id = '$supplier_id'"; + $sql = "SELECT curr_code FROM ".TB_PREF."suppliers WHERE supplier_id = ".db_escape($supplier_id); $result = db_query($sql, "Retreive currency of supplier $supplier_id"); @@ -95,7 +88,7 @@ function get_exchange_rate_from_home_currency($currency_code, $date_) $date = date2sql($date_); - $sql = "SELECT rate_buy, max(date_) as date_ FROM ".TB_PREF."exchange_rates WHERE curr_code = '$currency_code' + $sql = "SELECT rate_buy, max(date_) as date_ FROM ".TB_PREF."exchange_rates WHERE curr_code = ".db_escape($currency_code)." AND date_ <= '$date' GROUP BY rate_buy ORDER BY date_ Desc LIMIT 1"; $result = db_query($sql, "could not query exchange rates"); diff --git a/includes/current_user.inc b/includes/current_user.inc index 6ae7160f..b97db9f3 100644 --- a/includes/current_user.inc +++ b/includes/current_user.inc @@ -9,8 +9,11 @@ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the License here . ***********************************************************************/ -include_once($path_to_root . "/includes/prefs/userprefs.inc"); +include_once($path_to_root . "/includes/prefs/userprefs.inc"); +if (!defined('TB_PREF')) { + define('TB_PREF', '&TB_PREF&'); +} //-------------------------------------------------------------------------- class current_user @@ -19,17 +22,18 @@ class current_user var $loginname; var $username; var $name; - var $company; + var $company; // user's company var $pos; var $access; var $timeout; var $last_act; var $role_set = false; - var $old_db; + var $old_db; var $logged; var $ui_mode = 0; var $prefs; + var $cur_con; // current db connection (can be different from $company for superuser) function current_user() { @@ -149,50 +153,19 @@ class current_user return $this->can_access($page_level); } - function get_db_connection($id=-1) + function set_db_connection($id = -1) { - global $db_connections; - - $connection = $db_connections[$id == -1 ? $this->company : $id]; - - //print_r($connection); - - $db = mysql_connect($connection["host"] , - $connection["dbuser"], $connection["dbpassword"]); - mysql_select_db($connection["dbname"],$db); - - if (!defined('TB_PREF')) - define('TB_PREF', $connection["tbpref"]); - - return $db; + return set_global_connection($id); } - function update_prefs($price_dec, $qty_dec, $exrate_dec, $percent_dec, - $showgl, $showcodes, $date_format, $date_sep, $tho_sep, $dec_sep, - $theme, $pagesize, $show_hints, $profile, $rep_popup, $query_size, - $graphic_links, $lang, $stickydate, $startup_tab) + function update_prefs($prefs) { global $allow_demo_mode; - - $user = array( - 'prices_dec' => $price_dec, 'qty_dec' => $qty_dec, - 'rates_dec' => $exrate_dec, 'percent_dec' => $percent_dec, - 'show_gl' => $showgl, 'show_codes' => $showcodes, - 'date_format' => $date_format, 'date_sep' => $date_sep, - 'tho_sep' => $tho_sep, 'dec_sep' => $dec_sep, - 'theme' => $theme, 'page_size' => $pagesize, - 'show_hints' => $show_hints, 'print_profile' => $profile, - 'rep_popup' => $rep_popup, 'query_size' => $query_size, - 'graphic_links' => $graphic_links, 'language' => $lang, - 'sticky_doc_date' => $stickydate, 'startup_tab' => $startup_tab - ); - + if(!$allow_demo_mode) { - update_user_display_prefs($this->user, $price_dec, - $qty_dec, $exrate_dec, $percent_dec, $showgl, $showcodes, - $date_format, $date_sep, $tho_sep, $dec_sep, $theme, $pagesize, - $show_hints, $profile, $rep_popup, $query_size, $graphic_links, $lang, $stickydate, $startup_tab); + update_user_prefs($this->user, $prefs); } + $this->prefs = new user_prefs(get_user($this->user)); } } @@ -205,14 +178,29 @@ function round2($number, $decimals=0) return round($number+$delta, $decimals); } +/* + Returns number formatted according to user setup and using $decimals digits after dot + (defualt is 0). When $decimals is set to 'max' maximum available precision is used + (decimals depend on value) and trailing zeros are trimmed. +*/ function number_format2($number, $decimals=0) { global $thoseps, $decseps; $tsep = $thoseps[$_SESSION["wa_current_user"]->prefs->tho_sep()]; $dsep = $decseps[$_SESSION["wa_current_user"]->prefs->dec_sep()]; //return number_format($number, $decimals, $dsep, $tsep); - $delta = ($number < 0 ? -.0000000001 : .0000000001); - return number_format($number+$delta, $decimals, $dsep, $tsep); + if($decimals==='max') + $dec = 15 - floor(log10(abs($number))); + else { + $delta = ($number < 0 ? -.0000000001 : .0000000001); + $number += $delta; + $dec = $decimals; + } + + $num = number_format($number, $dec, $dsep, $tsep); + + return $decimals==='max' ? rtrim($num, '0') : $num; + } // // Current ui mode. @@ -254,6 +242,7 @@ function qty_format($number, $stock_id=null, &$dec) { $dec = get_qty_dec($stock_id); return number_format2($number, $dec); } + // and get_qty_dec function get_qty_dec($stock_id=null) { @@ -266,6 +255,13 @@ function get_qty_dec($stock_id=null) return $dec; } //------------------------------------------------------------------- +// +// Maximum precision format. Strips trailing unsignificant digits. +// +function maxprec_format($number) { + return number_format2($number, 'max'); +} + function exrate_format($number) { return number_format2($number, $_SESSION["wa_current_user"]->prefs->exrate_dec()); @@ -299,7 +295,9 @@ function user_numeric($input) { function user_company() { - return $_SESSION["wa_current_user"]->company; + global $def_coy; + + return isset($_SESSION["wa_current_user"]) ? $_SESSION["wa_current_user"]->company : $def_coy; } function user_pos() @@ -369,7 +367,8 @@ function user_dec_sep() function user_theme() { - return $_SESSION["wa_current_user"]->prefs->get_theme(); + return isset($_SESSION["wa_current_user"]) ? + $_SESSION["wa_current_user"]->prefs->get_theme() : 'default'; } function user_pagesize() @@ -412,14 +411,9 @@ function user_startup_tab() return $_SESSION["wa_current_user"]->prefs->start_up_tab(); } -function set_user_prefs($price_dec, $qty_dec, $exrate_dec, $percent_dec, $showgl, $showcodes, - $date_format, $date_sep, $tho_sep, $dec_sep, $theme, $pagesize, $show_hints, - $print_profile, $rep_popup, $query_size, $graphic_links, $lang, $stickydate, $startup_tab) +function set_user_prefs($prefs) { - - $_SESSION["wa_current_user"]->update_prefs($price_dec, $qty_dec, $exrate_dec, $percent_dec, $showgl, $showcodes, - $date_format, $date_sep, $tho_sep, $dec_sep, $theme, $pagesize, $show_hints, - $print_profile, $rep_popup, $query_size, $graphic_links, $lang, $stickydate, $startup_tab); + $_SESSION["wa_current_user"]->update_prefs($prefs); } function add_user_js_data() { @@ -483,26 +477,72 @@ function array_append(&$array, $elements) $array[$key] = $el; } } - +// +// Search $needle in $haystack or in $haystack[][$valuekey] +// returns $needle found or null. +// function array_search_value($needle, $haystack, $valuekey=null) { foreach($haystack as $key => $value) { - $val = isset($valuekey) ? $value[$valuekey] : $value; + $val = isset($valuekey) ? @$value[$valuekey] : $value; if ($needle == $val){ return $value; } } return null; } - +// +// Search $needle in $haystack or in $haystack[][$valuekey] +// returns array of keys of $haystack elements found +// +function array_search_keys($needle, $haystack, $valuekey=null) +{ + $keys = array(); + if($haystack) + foreach($haystack as $key => $value) { + $val = isset($valuekey) ? @$value[$valuekey] : $value; + if ($needle == $val){ + $keys[] = $key; + } + } + return $keys; +} +// +// Find first (single) $needle in $haystack or in $haystack[][$valuekey] +// returns $haystack element found or null +// function array_search_key($needle, $haystack, $valuekey=null) { - foreach($haystack as $key => $value) { - $val = isset($valuekey) ? $value[$valuekey] : $value; - if ($needle == $val){ - return $key; - } + $keys = array_search_keys($needle, $haystack, $valuekey); + return @$keys[0]; +} + +function flush_dir($path, $wipe = false) +{ + $dir = opendir($path); + while(false !== ($fname = readdir($dir))) { + if($fname=='.' || $fname=='..' || $fname=='CVS' || (!$wipe && $fname=='index.php')) continue; + if(is_dir($path.'/'.$fname)) { + flush_dir($path.'/'.$fname, $wipe); + if ($wipe) @rmdir($path.'/'.$fname); + } else + @unlink($path.'/'.$fname); } - return null; } +/* + Returns current path to company private folder. + (Current path can change after chdir). +*/ +function company_path($comp=null) +{ + global $path_to_root, $comp_path; + + if (!isset($comp)) + $comp = user_company(); + + // if path is relative, set current path_to_root + return ($comp_path[0]=='.' ? $path_to_root.'/'.basename($comp_path) : $comp_path) + . '/'.$comp; +} + ?> \ No newline at end of file diff --git a/includes/data_checks.inc b/includes/data_checks.inc index ff316953..798e84c4 100644 --- a/includes/data_checks.inc +++ b/includes/data_checks.inc @@ -124,7 +124,7 @@ function check_db_has_movement_types($msg) function db_customer_has_branches($customer_id) { return check_empty_result("SELECT COUNT(*) FROM ".TB_PREF."cust_branch " - ."WHERE debtor_no='$customer_id'"); + ."WHERE debtor_no=".db_escape($customer_id)); } function db_has_customer_branches() @@ -430,7 +430,7 @@ function db_has_quick_entries() function db_has_tags($type) { - return check_empty_result("SELECT COUNT(*) FROM ".TB_PREF."tags WHERE type=$type"); + return check_empty_result("SELECT COUNT(*) FROM ".TB_PREF."tags WHERE type=".db_escape($type)); } function check_db_has_tags($type, $msg) @@ -449,7 +449,7 @@ function check_empty_result($sql) $result = db_query($sql, "could not do check empty query"); $myrow = db_fetch_row($result); - return $myrow[0] > 0; + return $myrow[0] > 0; } // // Integer input check diff --git a/includes/date_functions.inc b/includes/date_functions.inc index bf579a4e..64fdfab4 100644 --- a/includes/date_functions.inc +++ b/includes/date_functions.inc @@ -35,7 +35,7 @@ function __date($year, $month, $day) $month = "0".$month; if ($how == 0) return $month.$sep.$day.$sep.$year; - else if ($how == 1) + elseif ($how == 1) return $day.$sep.$month.$sep.$year; else return $year.$sep.$month.$sep.$day; @@ -105,7 +105,7 @@ function is_date($date_) global $date_system; if ($date_system == 1) list($year, $month, $day) = jalali_to_gregorian($year, $month, $day); - else if ($date_system == 2) + elseif ($date_system == 2) list($year, $month, $day) = islamic_to_gregorian($year, $month, $day); if (checkdate((int)$month, (int)$day, (int)$year)) { @@ -131,7 +131,7 @@ function Today() $day = date("j"); if ($date_system == 1) list($year, $month, $day) = gregorian_to_jalali($year, $month, $day); - else if ($date_system == 2) + elseif ($date_system == 2) list($year, $month, $day) = gregorian_to_islamic($year, $month, $day); return __date($year, $month, $day); } @@ -160,8 +160,10 @@ function new_doc_date($date=null) function is_date_in_fiscalyear($date, $convert=false) { global $path_to_root; - include_once($path_to_root . "/admin/db/company_db.inc"); + include_once($path_to_root . "/admin/db/fiscalyears_db.inc"); + if ($_SESSION["wa_current_user"]->can_access('SA_MULTIFISCALYEARS')) // allow all open years for this one + return is_date_in_fiscalyears($date, false); $myrow = get_current_fiscalyear(); if ($myrow['closed'] == 1) return 0; @@ -181,7 +183,7 @@ function is_date_in_fiscalyear($date, $convert=false) function begin_fiscalyear() { global $path_to_root; - include_once($path_to_root . "/admin/db/company_db.inc"); + include_once($path_to_root . "/admin/db/fiscalyears_db.inc"); $myrow = get_current_fiscalyear(); return sql2date($myrow['begin']); @@ -190,7 +192,7 @@ function begin_fiscalyear() function end_fiscalyear() { global $path_to_root; - include_once($path_to_root . "/admin/db/company_db.inc"); + include_once($path_to_root . "/admin/db/fiscalyears_db.inc"); $myrow = get_current_fiscalyear(); return sql2date($myrow['end']); @@ -202,7 +204,7 @@ function begin_month($date) list($day, $month, $year) = explode_date_to_dmy($date); if ($date_system == 1) list($year, $month, $day) = gregorian_to_jalali($year, $month, $day); - else if ($date_system == 2) + elseif ($date_system == 2) list($year, $month, $day) = gregorian_to_islamic($year, $month, $day); return __date($year, $month, 1); } @@ -216,7 +218,7 @@ function end_month($date) list($year, $month, $day) = gregorian_to_jalali($year, $month, $day); $days_in_month = array(31, 31, 31, 31, 31, 31, 30, 30, 30, 30, 30, ((((((($year - (($year > 0) ? 474 : 473)) % 2820) + 474) + 38) * 682) % 2816) < 682 ? 30 : 29)); } - else if ($date_system == 2) + elseif ($date_system == 2) { list($year, $month, $day) = gregorian_to_islamic($year, $month, $day); $days_in_month = array(30, 29, 30, 29, 30, 29, 30, 29, 30, 29, 30, (((((11 * $year) + 14) % 30) < 11) ? 30 : 29)); @@ -235,7 +237,7 @@ function add_days($date, $days) // accepts negative values as well { if ($date_system == 1) list($year, $month, $day) = gregorian_to_jalali(date("Y", $timet), date("n", $timet), date("j", $timet)); - else if ($date_system == 2) + elseif ($date_system == 2) list($year, $month, $day) = gregorian_to_islamic(date("Y", $timet), date("n", $timet), date("j", $timet)); return __date($year, $month, $day); } @@ -251,7 +253,7 @@ function add_months($date, $months) // accepts negative values as well { if ($date_system == 1) list($year, $month, $day) = gregorian_to_jalali(date("Y", $timet), date("n", $timet), date("j", $timet)); - else if ($date_system == 2) + elseif ($date_system == 2) list($year, $month, $day) = gregorian_to_islamic(date("Y", $timet), date("n", $timet), date("j", $timet)); return __date($year, $month, $day); } @@ -267,7 +269,7 @@ function add_years($date, $years) // accepts negative values as well { if ($date_system == 1) list($year, $month, $day) = gregorian_to_jalali(date("Y", $timet), date("n", $timet), date("j", $timet)); - else if ($date_system == 2) + elseif ($date_system == 2) list($year, $month, $day) = gregorian_to_islamic(date("Y", $timet), date("n", $timet), date("j", $timet)); return __date($year, $month, $day); } @@ -299,7 +301,7 @@ function sql2date($date_) } if ($date_system == 1) list($year, $month, $day) = gregorian_to_jalali($year, $month, $day); - else if ($date_system == 2) + elseif ($date_system == 2) list($year, $month, $day) = gregorian_to_islamic($year, $month, $day); return __date($year, $month, $day); } // end function sql2date @@ -328,11 +330,7 @@ and converts to a yyyy/mm/dd format */ else // $how == 2, YYYYMMDD list($year, $month, $day) = explode($sep, $date_); - // prevent potential SQL injection - $year = (int)$year; - $month = (int)$month; - $day = (int)$day; - //to modify assumption in 2030 +//to modify assumption in 2030 if ($date_system == 0 || $date_system == 3) { if ((int)$year < 60) @@ -350,16 +348,10 @@ and converts to a yyyy/mm/dd format */ } if ($date_system == 1) list($year, $month, $day) = jalali_to_gregorian($year, $month, $day); - else if ($date_system == 2) + elseif ($date_system == 2) list($year, $month, $day) = islamic_to_gregorian($year, $month, $day); - // Pad with 0s if needed - if (strlen($month) == 1) - $month = "0$month"; - if (strlen($day) == 1) - $day = "0$day"; - - return $year."-".$month."-".$day; + return sprintf("%04d-%02d-%02d", $year, $month, $day); }// end of function function date1_greater_date2 ($date1, $date2) @@ -369,8 +361,9 @@ function date1_greater_date2 ($date1, $date2) $date1 = date2sql($date1); $date2 = date2sql($date2); - list($year1, $month1, $day1) = explode("-", $date1); - list($year2, $month2, $day2) = explode("-", $date2); + + @list($year1, $month1, $day1) = explode("-", $date1); + @list($year2, $month2, $day2) = explode("-", $date2); if ($year1 > $year2) { @@ -434,9 +427,7 @@ function explode_date_to_dmy($date_) $date = date2sql($date_); if ($date == "") { - $disp = user_date_display(); - echo "
Dates must be entered in the format $disp. Sent was $date_
"; - exit; + return array(0,0,0); } list($year, $month, $day) = explode("-", $date); return array($day, $month, $year); diff --git a/includes/db/connect_db.inc b/includes/db/connect_db.inc index 203883b0..ed706fe3 100644 --- a/includes/db/connect_db.inc +++ b/includes/db/connect_db.inc @@ -10,11 +10,23 @@ See the License here . ***********************************************************************/ -function set_global_connection() +function set_global_connection($company=-1) { - global $db; + global $db, $transaction_level, $db_connections; + + cancel_transaction(); // cancel all aborted transactions if any + $transaction_level = 0; + + if ($company == -1) + $company = $_SESSION["wa_current_user"]->company; + + $_SESSION["wa_current_user"]->cur_con = $company; - $db = $_SESSION["wa_current_user"]->get_db_connection(); + $connection = $db_connections[$company]; + + $db = mysql_connect($connection["host"], $connection["dbuser"], $connection["dbpassword"]); + mysql_select_db($connection["dbname"], $db); + return $db; } $db_duplicate_error_code = 1062; @@ -23,22 +35,24 @@ $db_duplicate_error_code = 1062; function db_query($sql, $err_msg=null) { - global $db, $show_sql, $sql_trail, $select_trail, $go_debug; + global $db, $show_sql, $sql_trail, $select_trail, $go_debug, $sql_queries, $Ajax, + $db_connections; + // set current db prefix + $cur_prefix = $db_connections[$_SESSION["wa_current_user"]->cur_con]['tbpref']; + $sql = str_replace(TB_PREF, $cur_prefix, $sql); + if ($show_sql) { - echo "SQL.."; - echo "
";
-		echo $sql;
-		echo "
\n"; + $Ajax->activate('footer_debug'); + $sql_queries .= "
$sql
\n
"; } - $result = mysql_query($sql, $db); if($sql_trail) { if ($select_trail || (strstr($sql, 'SELECT') === false)) { mysql_query( - "INSERT INTO ".TB_PREF."sql_trail + "INSERT INTO ".$cur_prefix."sql_trail (`sql`, `result`, `msg`) VALUES(".db_escape($sql).",".($result ? 1 : 0).", ".db_escape($err_msg).")", $db); @@ -146,4 +160,56 @@ function db_num_affected_rows() return mysql_affected_rows($db); } -?> +function db_field_name($result, $n) +{ + return mysql_field_name($result, $n); +} + +function db_create_db($connection) +{ + $db = mysql_connect($connection["host"] , + $connection["dbuser"], $connection["dbpassword"]); + if (!mysql_select_db($connection["dbname"], $db)) + { + $sql = "CREATE DATABASE " . $connection["dbname"] . ""; + if (!mysql_query($sql) || !mysql_select_db($connection["dbname"], $db)) + return 0; + } + return $db; +} + +function db_drop_db($connection) +{ + + if ($connection["tbpref"] == "") + { + $sql = "DROP DATABASE " . $connection["dbname"] . ""; + return mysql_query($sql); + } + else + { + $res = db_query("show table status"); + $all_tables = array(); + while($row = db_fetch($res)) + $all_tables[] = $row; + // get table structures + foreach ($all_tables as $table) + { + if (strpos($table['Name'], $connection["tbpref"]) === 0) + db_query("DROP TABLE `".$table['Name'] . "`"); + } + //deleting the tables, how?? + return true; + } +} + +function db_close($dbase = null) +{ + global $db; + + if (!$dbase) + $dbase = $db; + return mysql_close($dbase); +} + +?> \ No newline at end of file diff --git a/includes/db/crm_contacts_db.inc b/includes/db/crm_contacts_db.inc new file mode 100644 index 00000000..3b47790f --- /dev/null +++ b/includes/db/crm_contacts_db.inc @@ -0,0 +1,287 @@ +. +***********************************************************************/ + +function add_crm_person($ref, $name, $name2, $address, $phone, $phone2, $fax, $email, $lang, $notes, + $cat_ids=null, $entity=null) +{ + $sql = "INSERT INTO ".TB_PREF."crm_persons (ref, name, name2, address, + phone, phone2, fax, email, lang, notes) + VALUES (" + .db_escape($ref) . ", " + .db_escape($name) . ", " + .db_escape($name2) . ", " + .db_escape($address) . ", " + .db_escape($phone) . ", " + .db_escape($phone2) . ", " + .db_escape($fax) . ", " + .db_escape($email) . ", " + .db_escape($lang) . ", " + .db_escape($notes) + .")"; + + begin_transaction(); + + $ret = db_query($sql, "Can't insert crm person"); + $id = db_insert_id(); + if ($ret && $cat_ids) { + if(!update_person_contacts($id, $cat_ids, $entity)) + return null; + } + commit_transaction(); + return $id; +} + +function update_crm_person($id, $ref, $name, $name2, $address, $phone, $phone2, $fax, $email, + $lang, $notes, $cat_ids, $entity=null) +{ + $sql = "UPDATE ".TB_PREF."crm_persons SET " + ."ref=".db_escape($ref) . ", " + ."name=".db_escape($name) . ", " + ."name2=".db_escape($name2) . ", " + ."address=".db_escape($address) . ", " + ."phone=".db_escape($phone) . ", " + ."phone2=".db_escape($phone2) . ", " + ."fax=".db_escape($fax) . ", " + ."email=".db_escape($email) . ", " + ."lang=".db_escape($lang) . ", " + ."notes=".db_escape($notes) + ." WHERE id = ".db_escape($id); + + begin_transaction(); + + $ret = db_query($sql, "Can't update crm person"); + if ($ret) { + if(!update_person_contacts($id, $cat_ids, $entity)) + return null; + } + commit_transaction(); + return $id; +} + +function delete_crm_person($person, $with_contacts=false) +{ + begin_transaction(); + + if ($with_contacts) { + $sql = "DELETE FROM ".TB_PREF."crm_contacts WHERE person_id=".db_escape($person); + db_query($sql, "Can't delete crm contacts"); + } + $sql = "DELETE FROM ".TB_PREF."crm_persons WHERE id=".db_escape($person); + $ret = db_query($sql, "Can't delete crm person"); + + commit_transaction(); + return $ret; +} +/* + Retrieve full contact data from database for selected type/action/entity or person +*/ +function get_crm_persons($type=null, $action=null, $entity=null, $person=null, $unique=false) +{ + $sql = "SELECT t.*, p.*, r.id as contact_id FROM ".TB_PREF."crm_persons p," + .TB_PREF."crm_categories t, " + .TB_PREF."crm_contacts r WHERE "; + $sel = array('r.type=t.type', 'r.action=t.action', 'r.person_id=p.id'); + + if ($type) + $sel[] = 't.type='.db_escape($type); + + if ($action) + $sel[] = 't.action='.db_escape($action); + + if ($entity) + $sel[] = 'r.entity_id='.db_escape($entity); + + if ($person) + $sel[] = 'r.person_id='.db_escape($person); + + $sql .= implode (" AND ", $sel); + + if ($unique) + $sql .= " GROUP BY person_id"; + else + $sql .= " ORDER BY contact_id"; + + return db_query($sql, "Can't get crm persons"); +} + +function get_crm_person($id) +{ + $sql = "SELECT * FROM ".TB_PREF."crm_persons WHERE id=".db_escape($id); + + $res = db_query($sql, "Can't get crm persons"); + + $person = db_fetch($res); + $person['contacts'] = get_person_contacts($id); + + return $person; +} + +/* + Returns all contacts for given person id +*/ +function get_person_contacts($id) +{ + $sql = "SELECT t.id FROM " + .TB_PREF."crm_categories t, " + .TB_PREF."crm_contacts r WHERE r.type=t.type AND r.action=t.action + AND r.person_id=".db_escape($id); + + $contacts = array(); + $ret = db_query($sql, "Can't get crm person contacts"); + while($cont = db_fetch_row($ret)) + $contacts[] = $cont[0]; + return $contacts; +} + +function update_person_contacts($id, $cat_ids, $entity_id=null) +{ + $sql = "DELETE FROM ".TB_PREF."crm_contacts WHERE person_id=".db_escape($id); + + begin_transaction(); + + $ret = db_query($sql, "Can't delete person contacts"); + + foreach($cat_ids as $n => $cid) + $cat_ids[$n] = db_escape($cid); + + if($ret && count($cat_ids)) { + array_walk($cat_ids,'db_escape'); + $sql = "INSERT INTO ".TB_PREF."crm_contacts (person_id,type,action,entity_id) + SELECT ".db_escape($id).",t.type, t.action,".db_escape($entity_id, true)." + FROM ".TB_PREF."crm_categories t WHERE t.id=".implode(' OR t.id=', $cat_ids); + $ret = db_query($sql, "Can't update person contacts"); + } + commit_transaction(); + return $ret; +} + +function delete_entity_contacts($class, $entity) +{ + $res = get_crm_persons($class, null, $entity, null, true); + + while($person = db_fetch($res)) { + delete_crm_person($person['id'], true); + } +} + +//----------------------------------------------------------------------------------------------- + +function add_crm_category($type, $action, $name, $description) +{ + $sql = "INSERT INTO ".TB_PREF."crm_categories (type, action, name, description) + VALUES (".db_escape($type) . ", " + .db_escape($action) . ", " + .db_escape($name) . ", " + .db_escape($description) + .")"; + db_query($sql,"The insert of the crm category failed"); +} + +function update_crm_category($selected_id, $type, $action, $name, $description) +{ + $sql = "UPDATE ".TB_PREF."crm_categories SET "; + if ($type) + $sql .= "type=".db_escape($type) . ","; + if ($action) + $sql .= "action=".db_escape($action) . ","; + $sql .= "name=".db_escape($name) . "," + ."description=".db_escape($description) + ." WHERE id = ".db_escape($selected_id); + db_query($sql,"The update of the crm category failed"); +} + +function delete_crm_category($selected_id) +{ + // preserve system categories + $sql="DELETE FROM ".TB_PREF."crm_categories WHERE system=0 AND id=".db_escape($selected_id); + db_query($sql,"could not delete crm category"); +} + +function get_crm_categories($show_inactive) +{ + $sql = "SELECT * FROM ".TB_PREF."crm_categories"; + if (!$show_inactive) $sql .= " WHERE !inactive"; + $sql .= " ORDER BY type, action"; + return db_query($sql,"could not get areas"); +} + +function get_crm_category($selected_id) +{ + $sql = "SELECT * FROM ".TB_PREF."crm_categories WHERE id=".db_escape($selected_id); + + $result = db_query($sql,"could not get crm category"); + return db_fetch($result); +} + +function get_crm_category_name($id) +{ + $sql = "SELECT name FROM ".TB_PREF."crm_categories WHERE id=".db_escape($id); + + $result = db_query($sql, "could not get sales type"); + + $row = db_fetch_row($result); + return $row[0]; +} + +//---------------------------------------------------------------------------------------- +// Contact is relation between person and entity in some category +// +function add_crm_contact($type, $action, $entity_id, $person_id) +{ + $sql = "INSERT INTO ".TB_PREF."crm_contacts (person_id, type, action, entity_id) VALUES (" + .db_escape($person_id) . "," + .db_escape($type) . "," + .db_escape($action) . "," + .db_escape($entity_id) . ")"; + return db_query($sql, "Can't insert crm contact"); +} +/* + Delete contact selected by unique id. +*/ +function delete_crm_contact($id) +{ + $sql = "DELETE FROM ".TB_PREF."crm_contacts WHERE id=".db_escape($id); + + return db_query($sql, "Can't delete crm contact"); +} +/* + Delete selected contacts for given person +*/ +function delete_crm_contacts($person_id, $type = null, $entity_id=null, $action = null) +{ + $sql = "DELETE FROM ".TB_PREF."crm_contacts WHERE person_id=".db_escape($person_id); + if ($type) + $sql .= ' AND type='.db_escape($type); + if ($entity_id) + $sql .= ' AND entity_id='.db_escape($entity_id); + if ($action) + $sql .= ' AND action='.db_escape($action); + + return db_query($sql, "Can't delete crm contact"); +} + +/* + Returns person data for given contact id +*/ +function get_crm_contact($id) +{ + $sql = "SELECT t.type, t.action, p.*, r.person_id, r.id FROM ".TB_PREF."crm_persons p," + .TB_PREF."crm_categories t, " + .TB_PREF."crm_contacts r WHERE r.type=t.type AND r.action=t.action AND r.person_id=p.id" + ." AND r.id=".db_escape($id); + $ret = db_query($sql, "Can't get crm contact"); + if($ret) + return db_fetch($ret, "Can't fetch contact data"); + return $ret; +} + +?> \ No newline at end of file diff --git a/includes/db/inventory_db.inc b/includes/db/inventory_db.inc index a5caab96..7f4daf9b 100644 --- a/includes/db/inventory_db.inc +++ b/includes/db/inventory_db.inc @@ -99,6 +99,35 @@ function last_negative_stock_begin_date($stock_id, $to) return $row[3]; } +//------------------------------------------------------------------- +// Newly written +function last_negative_stock_trans_id($stock_id, $to) +{ + $sql = "SELECT * from ".TB_PREF."stock_moves + WHERE stock_id=".db_escape($stock_id)." + AND qty <> 0 order by trans_id asc"; + + $result = db_query($sql, "The query on stock moves failed."); + + $qty = 0; + $flag = 0; + $negative_trans_id = 1; + + while ($myrow = db_fetch($result)) + { + $qty += $myrow['qty']; + if ($qty < 0 && $flag == 0) + { + $flag = 1; + $negative_trans_id = $myrow['trans_id']; + } + if ($qty > 0) + $flag = 0; + } + + return $negative_trans_id; +} + //------------------------------------------------------------------- function get_deliveries_between($stock_id, $from, $to) @@ -113,9 +142,67 @@ function get_deliveries_between($stock_id, $from, $to) return db_fetch_row($result); } -//------------------------------------------------------------------- +//Newly written +function get_deliveries_from_trans($stock_id, $from) +{ + // -ve qty is delivery either by ST_CUSTDELIVERY or inventory adjustment + $sql = "SELECT SUM(-qty), SUM(-qty*standard_cost) FROM ".TB_PREF."stock_moves + WHERE stock_id=".db_escape($stock_id)." AND qty < 0 AND + trans_id>='$from' GROUP BY stock_id"; + $result = db_query($sql, "The deliveries could not be updated"); + $row = db_fetch_row($result); + + display_notification('Row0 - '.$row[0].' Row1- '.$row[1]); + + //return $row; + + // Get Std cost of previsous transaction before the cut-over delivery + // This is useful to get inventory valuation + $prev_trans = $from - 1; + display_notification('From - '.$from.' Prev- '.$prev_trans); + $sql = "SELECT standard_cost FROM ".TB_PREF."stock_moves + WHERE stock_id=".db_escape($stock_id)." AND + trans_id ='$prev_trans'"; + $result = db_query($sql, "The deliveries could not be updated"); + $cost = db_fetch_row($result); + + display_notification('Last Delivery Cost - '.$cost[0]); + + // Adjusting QOH valuation + $sql = "SELECT SUM(qty) FROM ".TB_PREF."stock_moves + WHERE stock_id=".db_escape($stock_id)." AND + trans_id<'$from' GROUP BY stock_id"; + $result = db_query($sql, "The deliveries could not be updated"); + $qoh = db_fetch_row($result); + + display_notification('QOH before last delivery - '.$qoh[0]); + + $qty = $row[0] - $qoh[0]; //Qoh is minus from delivered in -ve + $final_cost = $row[1] - $qoh[0]*$cost[0]; + + display_notification('Qty - '.$qty.' cost- '.$final_cost); + + return array($qty,$final_cost); +} -function adjust_deliveries($stock_id, $material_cost, $to) +//Newly written +function get_purchases_from_trans($stock_id, $from) +{ + // Calculate All inward stock moves i.e. qty > 0 + $sql = "SELECT SUM(qty), SUM(qty*standard_cost) FROM ".TB_PREF."stock_moves + WHERE stock_id=".db_escape($stock_id)." AND qty > 0 AND + trans_id>'$from' GROUP BY stock_id"; + $result = db_query($sql, "The deliveries could not be updated"); + $row = db_fetch_row($result); + + display_notification('Purchase Qty - '.$row[0].' Cost- '.$row[1]); + + return $row; +} + +//------------------------------------------------------------------- +// Original Code V0 +function adjust_deliveries_v0($stock_id, $material_cost, $to) { if (!is_inventory_item($stock_id)) return; @@ -137,7 +224,65 @@ function adjust_deliveries($stock_id, $material_cost, $to) $stock_gl_code = get_stock_gl_code($stock_id); - $memo_ = _("Cost was ") . $old_cost . _(" changed to ") . $new_cost . _(" for item ")."'$stock_id'"; + $memo_ = sprintf(_("Cost was %s changed to %s for item '%s'"), + $old_cost, $new_cost, $stock_id); + add_gl_trans_std_cost(ST_COSTUPDATE, $update_no, $to, $stock_gl_code["cogs_account"], + $stock_gl_code["dimension_id"], $stock_gl_code["dimension2_id"], $memo_, $diff); + + add_gl_trans_std_cost(ST_COSTUPDATE, $update_no, $to, $stock_gl_code["inventory_account"], + 0, 0, $memo_, -$diff); + add_audit_trail(ST_COSTUPDATE, $update_no, $to); + } +} + +//New written function +function adjust_deliveries($stock_id, $material_cost, $to) +{ + if (!is_inventory_item($stock_id)) + return; + + $from = last_negative_stock_trans_id($stock_id, $to); + if ($from == false || $from == "") + return; + + $row = get_deliveries_from_trans($stock_id, $from); + + if ($row == false) + return; + $old_sales_cost = $row[1]; + $new_sales_cost = $row[0] * $material_cost; + $sales_diff = $new_sales_cost - $old_sales_cost; + + $row = get_purchases_from_trans($stock_id, $from); + $purchase_diff = 0; + $old_purchase_cost = 0; + if ($row != false) + { + $old_purchase_cost = $row[1]; + $new_purchase_cost = $row[0] * $material_cost; + $purchase_diff = $new_purchase_cost - $old_purchase_cost; + } + + $diff = $sales_diff - $purchase_diff; + + display_notification('Sales Diff - '.$sales_diff.' Purchase Diff - '.$purchase_diff); + + $sql = "INSERT INTO trace values ('Diff', ".db_escape($diff).", '')"; + $result = db_query($sql, "The dstock moves could not be retrieved"); + + if ($diff != 0) + { + $update_no = get_next_trans_no(ST_COSTUPDATE); + if (!is_date_in_fiscalyear($to)) + $to = end_fiscalyear(); + + $stock_gl_code = get_stock_gl_code($stock_id); + + $dec = user_price_dec(); + $old_cost = -round2($old_sales_cost-$old_purchase_cost,$dec); + $new_cost = -round2($new_sales_cost-$new_purchase_cost,$dec); + + $memo_ = _("Cost was ") . $old_cost. _(" changed to ") . $new_cost . _(" for item ")."'$stock_id'"; add_gl_trans_std_cost(ST_COSTUPDATE, $update_no, $to, $stock_gl_code["cogs_account"], $stock_gl_code["dimension_id"], $stock_gl_code["dimension2_id"], $memo_, $diff); diff --git a/includes/db/manufacturing_db.inc b/includes/db/manufacturing_db.inc index c2da112f..9378f645 100644 --- a/includes/db/manufacturing_db.inc +++ b/includes/db/manufacturing_db.inc @@ -194,6 +194,35 @@ function get_mb_flag($stock_id) //-------------------------------------------------------------------------------------- +function add_bom($selected_parent, $component, $workcentre_added, $loc_code, $quantity) +{ + $sql = "INSERT INTO ".TB_PREF."bom (parent, component, workcentre_added, loc_code, quantity) + VALUES (".db_escape($selected_parent).", ".db_escape($component) . "," + .db_escape($workcentre_added) . ", ".db_escape($loc_code) . ", " + . $quantity . ")"; + + db_query($sql,"check failed"); +} +//-------------------------------------------------------------------------------------- + +function update_bom($selected_parent, $selected_component, $work_centre_added, $loc_code, $quantity) +{ + $sql = "UPDATE ".TB_PREF."bom SET workcentre_added=".db_escape($workcentre_added) + . ",loc_code=".db_escape($loc_code) . ", + quantity= " . $quantity . " + WHERE parent=".db_escape($selected_parent) . " + AND id=".db_escape($selected_component); + check_db_error("Could not update this bom component", $sql); + + db_query($sql,"could not update bom"); +} + +function delete_bom($selected_id) +{ + $sql = "DELETE FROM ".TB_PREF."bom WHERE id=".db_escape($selected_id); + db_query($sql,"Could not delete this bom components"); +} + function get_bom($item) { $sql = "SELECT ".TB_PREF."bom.*, ".TB_PREF."locations.location_name, ".TB_PREF."workcentres.name AS WorkCentreDescription, @@ -210,6 +239,18 @@ function get_bom($item) //-------------------------------------------------------------------------------------- +function get_component_from_bom($selected_id) +{ + $sql = "SELECT ".TB_PREF."bom.*,".TB_PREF."stock_master.description FROM " + .TB_PREF."bom,".TB_PREF."stock_master + WHERE id=".db_escape($selected_id)." + AND ".TB_PREF."stock_master.stock_id=".TB_PREF."bom.component"; + + $result = db_query($sql, "could not get bom"); + return db_fetch($result); +} +//-------------------------------------------------------------------------------------- + function has_bom($item) { $result = get_bom($item); @@ -219,4 +260,46 @@ function has_bom($item) //-------------------------------------------------------------------------------------- +function is_component_already_on_bom($component, $workcentre_added, $loc_code, $selected_parent) +{ + $sql = "SELECT component FROM ".TB_PREF."bom + WHERE parent=".db_escape($selected_parent)." + AND component=".db_escape($component) . " + AND workcentre_added=".db_escape($workcentre_added) . " + AND loc_code=".db_escape($loc_code); + $result = db_query($sql,"check failed"); + + return (db_num_rows($result) > 0); +} + +//-------------------------------------------------------------------------------------- + +function check_for_recursive_bom($ultimate_parent, $component_to_check) +{ + + /* returns true ie 1 if the bom contains the parent part as a component + ie the bom is recursive otherwise false ie 0 */ + + $sql = "SELECT component FROM ".TB_PREF."bom WHERE parent=".db_escape($component_to_check); + $result = db_query($sql,"could not check recursive bom"); + + if ($result != 0) + { + while ($myrow = db_fetch_row($result)) + { + if ($myrow[0] == $ultimate_parent) + { + return 1; + } + + if (check_for_recursive_bom($ultimate_parent, $myrow[0])) + { + return 1; + } + } //(while loop) + } //end if $result is true + + return 0; +} //end of function check_for_recursive_bom + ?> diff --git a/includes/db/references_db.inc b/includes/db/references_db.inc index e5212c65..ca086541 100644 --- a/includes/db/references_db.inc +++ b/includes/db/references_db.inc @@ -20,23 +20,12 @@ function get_reference($type, $id) return $row['reference']; } -//-------------------------------------------------------------------------------------------------- - -function add_reference($type, $id, $reference) -{ - $sql = "INSERT INTO ".TB_PREF."refs (type, id, reference) - VALUES (".db_escape($type).", ".db_escape($id).", " - . db_escape(trim($reference)) . ")"; - - db_query($sql, "could not add reference entry"); -} - //-------------------------------------------------------------------------------------------------- function update_reference($type, $id, $reference) { - $sql = "UPDATE ".TB_PREF."refs SET reference=".db_escape($reference) - ." WHERE type=".db_escape($type)." AND id=".db_escape($id); + $sql = "REPLACE ".TB_PREF."refs SET reference=".db_escape($reference) + .", type=".db_escape($type).", id=".db_escape($id); db_query($sql, "could not update reference entry"); } @@ -44,7 +33,7 @@ function update_reference($type, $id, $reference) function delete_reference($type, $id) { - $sql = "DELETE FROM ".TB_PREF."refs WHERE type=$type AND id=".db_escape($id); + $sql = "DELETE FROM ".TB_PREF."refs WHERE type=".db_escape($type)." AND id=".db_escape($id); return db_query($sql, "could not delete from reference table"); } @@ -53,8 +42,12 @@ function delete_reference($type, $id) function find_reference($type, $reference) { - $sql = "SELECT id FROM ".TB_PREF."refs WHERE type=".db_escape($type) - ." AND reference=".db_escape($reference); + // ignore refs references for voided transactions + $sql = "SELECT r.id FROM ".TB_PREF."refs r LEFT JOIN ".TB_PREF."voided v ON" + ." r.type=v.type AND r.id=v.id" + ." WHERE r.type=".db_escape($type) + ." AND reference=".db_escape($reference) + ." AND ISNULL(`memo_`)"; $result = db_query($sql, "could not query reference table"); diff --git a/includes/db/sql_functions.inc b/includes/db/sql_functions.inc index 0fa479dc..85a25137 100644 --- a/includes/db/sql_functions.inc +++ b/includes/db/sql_functions.inc @@ -12,21 +12,44 @@ // // General database functions common for all modules. // -//------------------------------------------------------------------- +//------------------------------------------------------------------- +// Multilevel transaction control. +// + function begin_transaction() { - db_query("BEGIN", "could not start a transaction"); + global $transaction_level; // set in set_global_connection() + + if (!$transaction_level) { + db_query("BEGIN", "could not start a transaction"); + } + $transaction_level++; } function commit_transaction() { - db_query("COMMIT", "could not commit a transaction"); + global $transaction_level; + + $transaction_level--; + + if (!$transaction_level) { + db_query("COMMIT", "could not commit a transaction"); + } } +/* + This function is called on end of script execution to cancel + all aborted transactions (if any) +*/ function cancel_transaction() { - db_query("ROLLBACK", "could not cancel a transaction"); + global $transaction_level; + + if ($transaction_level) { + db_query("ROLLBACK", "could not cancel a transaction"); + } } + //----------------------------------------------------------------------------- // Update record activity status. // diff --git a/includes/db_pager.inc b/includes/db_pager.inc index cf67659a..64a79eda 100644 --- a/includes/db_pager.inc +++ b/includes/db_pager.inc @@ -61,7 +61,6 @@ class db_pager { // $name is base name for pager controls function db_pager($sql, $name, $table = null, $page_len=0) { - global $table_style; $this->width = "95%"; if ($page_len == 0) $page_len = user_query_size(); $this->name = $name; @@ -160,11 +159,11 @@ class db_pager { $c = 0; // add result field names to column defs for // col value retrieve and sort purposes - $cnt = min(mysql_num_fields($result), count($this->columns)); + $cnt = min(db_num_fields($result), count($this->columns)); for ($c = $i = 0; $c < $cnt; $c++) { if (!(isset($this->columns[$c]['insert']) && $this->columns[$c]['insert'])) { // if (!@($this->columns[$c]['type']=='skip')) - $this->columns[$c]['name']= mysql_field_name($result, $i); + $this->columns[$c]['name']= db_field_name($result, $i); if (!@($this->columns[$c]['type']=='insert')) $i++; } @@ -261,7 +260,7 @@ class db_pager { if(count($this->extra_where)) { $where .= ($where=='' ? '' : ' AND ') - .implode( $this->extra_where, ' AND '); + .implode(' AND ', $this->extra_where); } if ($where) $where = " WHERE ($where)"; diff --git a/includes/errors.inc b/includes/errors.inc index f2cfe1c0..f55951cf 100644 --- a/includes/errors.inc +++ b/includes/errors.inc @@ -17,7 +17,7 @@ $before_box = ''; // temporary container for output html data before error box // display in message box. function error_handler($errno, $errstr, $file, $line) { - global $messages, $go_debug; + global $messages, $go_debug, $SysPrefs; // skip well known warnings we don't care about. // Please use restrainedly to not risk loss of important messages @@ -27,13 +27,16 @@ function error_handler($errno, $errstr, $file, $line) { return true; } } - + // error_reporting==0 when messages are set off with @ - if ($errno & error_reporting()) - $messages[] = array($errno, $errstr, $file, $line); - else if($errno&~E_NOTICE)// log all not displayed messages - error_log(user_company() . ':' . $_SESSION["wa_current_user"]->loginname.':' - . basename($file) .":$line: $errstr"); + if ($errno & error_reporting()) { + $messages[] = array($errno, $errstr, $file, $line); + } + else if($errno&~E_NOTICE) { // log all not displayed messages + $user = @$_SESSION["wa_current_user"]->loginname; + $context = isset($SysPrefs) && !$SysPrefs->db_ok ? '[before upgrade]' : ''; + error_log(user_company() . ":$user:". basename($file) .":$line:$context $errstr"); + } return true; } @@ -93,18 +96,21 @@ function error_box() { /* Helper to avoid sparse log notices. */ -function end_flush () { - global $Ajax; +function end_flush() { + global $Ajax, $transaction_level; if (isset($Ajax)) $Ajax->run(); // flush all output buffers (works also with exit inside any div levels) while(ob_get_level()) ob_end_flush(); + + // if any transaction was aborted unexpectedly rollback changes + cancel_transaction(); } function display_db_error($msg, $sql_statement=null, $exit=true) { - global $db, $debug; + global $db, $debug, $go_debug, $db_connections; $warning = $msg==null; $db_error = db_error_no(); @@ -123,7 +129,10 @@ function display_db_error($msg, $sql_statement=null, $exit=true) if ($debug == 1) { - $str .= "sql that failed was : " . $sql_statement . "
"; + $cur_prefix = $db_connections[$_SESSION["wa_current_user"]->cur_con]['tbpref']; + + $str .= "sql that failed was : ".str_replace(TB_PREF, $cur_prefix, $sql_statement)."
"; +// if ($go_debug > 1) display_backtrace(); } $str .= "

"; @@ -162,7 +171,7 @@ function check_db_error($msg, $sql_statement, $exit_if_error=true, $rollback_if_ if ($rollback_if_error) { - $rollback_result = db_query("rollback","could not rollback"); + $rollback_result = db_query("rollback"); } if ($exit_if_error) diff --git a/includes/hooks.inc b/includes/hooks.inc new file mode 100644 index 00000000..c279b4af --- /dev/null +++ b/includes/hooks.inc @@ -0,0 +1,369 @@ +. +***********************************************************************/ +// +// FrontAccounting extension modules integration. +// This file is included in session.inc even before session is started, +// and includes hooks.php connector files from all installed extensions. +// To make hooks active install_hooks() have to be called after interface +// language is set. +// +// To find how various hooks are processed look into respective hook_* functions below. +// +class hooks { + var $module_name; // extension module name. + + // + // Helper for updating databases with extension scheme + // + // $comp can be company number, -1 for all, + // $updates - table of filename => array(table, field, property) + // $check_only - don't update database, check table/field/property existence only + // + function update_databases($comp, $updates, $check_only=false) + { + global $db_connections, $path_to_root; + + if ($comp == -1) + $conn = $db_connections; + else + $conn = array( $comp => $db_connections[$comp]); + $result = true; + + foreach($conn as $comp => $con) { + set_global_connection($comp); + foreach($updates as $file => $update) { + $table = @$update[0]; + $field = @$update[1]; + $properties = @$update[2]; + + $ok = check_table($con['tbpref'], $table, $field, $properties) == 0; + + if (!$check_only && !$ok) { + $ok = db_import($path_to_root.'/modules/'.$this->module_name.'/sql/'.$file, + $con); + } + $result &= $ok; + if (!$result) + break; + } + db_close(); + if (!$result) + break; + } + set_global_connection(0); // return to siteadmin account + + return $result; + } + // + // Install additional tabs provided by extension + // + function install_tabs($app) { +// set_ext_domain('modules/example'); // set text domain for gettext +// $app->add_application(new example_class); // add menu tab defined by example_class +// set_ext_domain(); + } + // + // Install additonal menu options provided by extension + // + function install_options($app) { +// global $path_to_root; +// set_ext_domain('modules/example'); +// switch($app->id) { +// case 'orders': +// $app->add_rapp_function( 0, _("&Example option"), +// $path_to_root.'/modules/example/example.php?', 'SA_OPEN'); +// } +// set_ext_domain(); + } + // + // Price in words. $doc_type is set to document type and can be used to suppress + // price in words printing for selected document types. + // Used instead of built in simple english price_in_words() function. + // + // Returns: amount in words as string. + + function price_in_words($amount, $doc_type) + { + } + + // + // Exchange rate currency $curr as on date $date. + // Keep in mind FA has internally implemented 3 exrate providers + // If any of them supports your currency, you can simply use function below + // with apprioprate provider set, otherwise implement your own. + // Returns: $curr value in home currency units as a real number. + + function retrieve_exrate($curr, $date) + { +// $provider = 'ECB'; // 'ECB', 'YAHOO' or 'GOOGLE' +// return get_extern_rate($curr, $provider, $date); + return null; + } + + // Generic function called at the end of Tax Report (report 709) + // Can be used e.g. for special database updates on every report printing + // or to print special tax report footer + // + // Returns: nothing + function tax_report_done() + { + } + // Following database transaction hooks akcepts array of parameters: + // 'cart' => transaction data + // 'trans_type' => transaction type + + function db_prewrite(&$cart, $trans_type) + { + return true; + } + + function db_postwrite(&$cart, $trans_type) + { + return true; + } + + function db_prevoid($trans_type, $trans_no) + { + return true; + } + /* + This method is called after module install. + */ + function install_extension($check_only=true) + { + return true; + } + /* + This method is called after module uninstall. + */ + function uninstall_extension($check_only=true) + { + return true; + } + /* + This method is called on extension activation for company. + */ + function activate_extension($company, $check_only=true) + { + return true; + } + /* + This method is called when extension is deactivated for company. + */ + function deactivate_extension($company, $check_only=true) + { + return true; + } +} +// +// include all extensions hook files. +// +foreach ($installed_extensions as $ext) +{ + if (file_exists($path_to_root.'/'.$ext['path'].'/hooks.php')) + include_once($path_to_root.'/'.$ext['path'].'/hooks.php'); +} + +/* + Installs hooks provided by extension modules +*/ +function install_hooks() { + global $path_to_root, $Hooks, $installed_extensions; + + $Hooks = array(); + + // include current language related $Hooks object if locale file exists + if (file_exists($path_to_root . "/lang/".$_SESSION['language']->code."/locale.inc")) + { + include_once($path_to_root . "/lang/".$_SESSION['language']->code."/locale.inc"); + $code = $_SESSION['language']->code; + $hook_class = 'hooks_'.$code; + $Hooks[$code] = new $hook_class; + unset($code, $hook_class); + } + // install hooks provided by active extensions + foreach($installed_extensions as $ext) { + $hook_class = 'hooks_'.$ext['package']; + if ($ext['active'] && class_exists($hook_class)) { + $Hooks[$ext['package']] = new $hook_class; + } + } +} +/* + Non active hooks are not included in $Hooks array, so we can use special function to + activate. +*/ +function activate_hooks($ext, $comp) { + global $Hooks; + + $hooks = @$Hooks[$ext]; + if (!$hooks) { + $hookclass = 'hooks_'.$ext; + if (class_exists($hookclass)) + $hooks = new $hookclass; + else + return true; // extension does not have hooks file + } + if (!$hooks) + return false; + else + return $hooks->activate_extension($comp, false); +} +/* + Calls hook $method defined in extension $ext (if any) +*/ +function hook_invoke($ext, $method, &$data, $opts=null) { + + global $Hooks; + + $ret = null; + if (isset($Hooks[$ext]) && method_exists($Hooks[$ext], $method)) { + set_ext_domain('modules/'.$ext); + $ret = $Hooks[$ext]->$method($data, $opts); + set_ext_domain(); + } + return $ret; +} + +/* + Calls hook $methods defined in all extensions (if any) +*/ +function hook_invoke_all($method, &$data, $opts=null) { + + global $Hooks; + + $result = array(); + foreach($Hooks as $ext => $hook) + if (method_exists($hook, $method)) { + set_ext_domain('modules/'.$ext); + $result = $hook->$method($data, $opts); + if (isset($result) && is_array($result)) { + $return = array_merge_recursive($return, $result); + } else if (isset($result)) { + $return[] = $result; + } + } + set_ext_domain(); + return $result; +} +/* + Returns first non-null result returned from hook. +*/ +function hook_invoke_first($method, &$data, $opts=null) { + + global $Hooks; + + $result = null; + foreach($Hooks as $ext => $hook) { + if (method_exists($hook, $method)) { + set_ext_domain('modules/'.$ext); + $result = $hook->$method($data, $opts); + if (isset($result)) + break; + } + } + set_ext_domain(); + return $result; +} +/* + Returns result of last hook installed. Helps implement hooks overriding by + extensions installed later. + +*/ +function hook_invoke_last($method, &$data, $opts=null) { + + global $Hooks; + + $found = false; + foreach($Hooks as $ext => $hook) { + if (method_exists($hook, $method)) { + $found = $ext; + } + } + $ret = null; + if ($found) { + set_ext_domain('modules/'.$found); + $ret = $Hooks[$found]->$method($data, $opts); + set_ext_domain(); + } + return $ret; +} +//------------------------------------------------------------------------------------------ +// Database transaction hooks. +// $type - type of transaction (simplifies cart processing) +// $cart - transaction cart +// $args is optional array of parameters +// +// For FA 2.3 prewrite, postwrite and prevoid hooks are implemented for following transaction types: +// +// ST_BANKPAYMENT, ST_BANKDEPOSIT, ST_BANKTRANSFER, +// ST_SALESORDER, ST_SALESQUOTE, ST_SALESINVOICE, ST_CUSTCREDIT, ST_CUSTPAYMENT, ST_CUSTDELIVERY, +// ST_LOCTRANSFER, ST_INVADJUST, +// ST_PURCHORDER, ST_SUPPINVOICE, ST_SUPPCREDIT, ST_SUPPAYMENT, ST_SUPPRECEIVE, +// ST_WORKORDER, ST_MANUISSUE, ST_MANURECEIVE, + +/* + Invoked after transaction has been read from database to cart. + Not implemented yet. +*/ +//function hook_db_postread(&$cart, $type) +//{ +// hook_invoke_all('db_postread', $cart, $type); +//} + +/* + Invoked before transaction is written to database. +*/ +function hook_db_prewrite(&$cart, $type) +{ + return hook_invoke_all('db_prewrite', $cart, $type); +} + +/* + Invoked after transaction has been written to database. +*/ +function hook_db_postwrite(&$cart, $type) +{ + return hook_invoke_all('db_postwrite', $cart, $type); +} +/* + Invoked before transaction is voided +*/ +function hook_db_prevoid($type, $type_no) +{ + return hook_invoke_all('db_prevoid', $type, $type_no); +} + +//------------------------------------------------------------------------------------------- +// +// Various hooks +// +// Alternative exchange rates feeds. +// +function hook_retrieve_exrate($currency, $date) +{ + return hook_invoke_last('retrieve_exrate', $currency, $date); +} +// +// Generic function called at the end of Tax Report (report 709) +// +function hook_tax_report_done() +{ + return hook_invoke_all('tax_report_done', $dummy); +} +// +// Amount in words displayed on various documents (especially sales invoice) +// +function hook_price_in_words($amount, $document) +{ + return hook_invoke_last('price_in_words', $amount, $document); +} diff --git a/includes/lang/gettext.php b/includes/lang/gettext.php index cc2f04d0..4d80c9b3 100644 --- a/includes/lang/gettext.php +++ b/includes/lang/gettext.php @@ -43,7 +43,7 @@ function get_text_init($managerType = GETTEXT_NATIVE) { } function raise_error($str) { -// echo "$str"; + error_log($str); return 1; } @@ -60,6 +60,7 @@ function is_error($err) { class gettext_native_support { var $_interpolation_vars = array(); + var $domain_path; /** * Set gettext language code. @@ -73,7 +74,20 @@ class gettext_native_support //$set = setlocale(LC_ALL, "$lang_code"); //$set = setlocale(LC_ALL, "$encoding"); - $set = setlocale(LC_ALL, $lang_code.".".$encoding); + + // cover a couple of country/encoding variants + $up = strtoupper($encoding); + $low = strtolower($encoding); + $lshort = strtr($up, '-',''); + $ushort = strtr($low, '-',''); + + if ($lang_code == 'C') + $set = setlocale(LC_ALL,'C'); + else + $set = setlocale(LC_ALL, $lang_code.".".$encoding, + $lang_code.".".$up, $lang_code.".".$low, + $lang_code.".".$ushort, $lang_code.".".$lshort); + setlocale(LC_NUMERIC, 'C'); // important for numeric presentation etc. if ($set === false) { @@ -85,24 +99,50 @@ class gettext_native_support } //return 0; } - + /** + * Check system support for given language nedded for gettext. + */ + function check_support($lang_code, $encoding) + { + + $old = setlocale(LC_CTYPE, '0'); // LC_MESSAGES does not exist on Win + $up = strtoupper($encoding); + $low = strtolower($encoding); + $lshort = strtr($up, '-',''); + $ushort = strtr($low, '-',''); + + $test = setlocale(LC_ALL, + $lang_code.".".$encoding, + $lang_code.".".$up, + $lang_code.".".$low, + $lang_code.".".$ushort, + $lang_code.".".$lshort) !== false; + setlocale(LC_ALL, $old); + setlocale(LC_NUMERIC, 'C'); + return $test; + } /** * Add a translation domain. */ - function add_domain($domain, $path=false) + function add_domain($domain, $path=false, $version='') { if ($path === false) - { - bindtextdomain($domain, "./locale/"); - } - else - { - bindtextdomain($domain, $path); - } + $path = $this->domain_path; + if ($path === false) + $path = "./locale"; + if ($domain == "") + $domain = "?"; + if ($version) { + // To avoid need for apache server restart after change of *.mo file + // we have to include file version as part of filename. + // This is alternative naming convention: $domain = $version.'/'.$domain; + $domain .= '-'.$version; + } + bindtextdomain($domain, $path); //bind_textdomain_codeset($domain, $encoding); textdomain($domain); } - + /** * Retrieve translation for specified key. * @@ -242,7 +282,13 @@ class gettext_php_support extends gettext_native_support } } } - + /** + * Check system support for given language (dummy). + */ + function check_support($lang_code, $encoding) + { + return true; + } /** * Add a translation domain. * @@ -250,8 +296,17 @@ class gettext_php_support extends gettext_native_support * @param string $path optional -- Repository path * @throws GetText_Error */ - function add_domain($domain, $path = "./locale/") + function add_domain($domain, $path = false, $version ='') { + if ($path === false) + $path = $this->domain_path; + if ($path === false) + $path = "./locale"; + + if ($version) { + $domain .= '-'.$version; + } + if (array_key_exists($domain, $this->_domains)) { return; @@ -487,9 +542,16 @@ class gettext_php_support_compiler } } -/** -* get_text related error. +/* + Set current gettext domain path */ -//class GetText_Error extends PEAR_Error {} - +function set_ext_domain($path='') { + global $path_to_root; + + $lang_path = $path_to_root . ($path ? '/' : '') .$path.'/lang'; + // ignore change when extension does not provide translation structure + if (file_exists($lang_path)) + $_SESSION['get_text']->add_domain($_SESSION['language']->code, + $lang_path, $path ? '' : $_SESSION['language']->version); +} ?> diff --git a/includes/lang/language.php b/includes/lang/language.php index e983384f..ea428fca 100644 --- a/includes/lang/language.php +++ b/includes/lang/language.php @@ -12,7 +12,7 @@ // Prevent register_globals vulnerability if (isset($_GET['path_to_root']) || isset($_POST['path_to_root'])) die("Restricted access"); -include_once($path_to_root . "/lang/installed_languages.inc"); +@include_once($path_to_root . "/lang/installed_languages.inc"); include_once($path_to_root . "/includes/lang/gettext.php"); class language @@ -22,12 +22,15 @@ class language var $encoding; // eg. UTF-8, CP1256, ISO8859-1 var $dir; // Currently support for Left-to-Right (ltr) and // Right-To-Left (rtl) + var $version; // lang package version var $is_locale_file; function language($name, $code, $encoding, $dir = 'ltr') { + global $dflt_lang; + $this->name = $name; - $this->code = $code ? $code : 'en_GB'; + $this->code = $code ? $code : ($dflt_lang ? $dflt_lang : 'C'); $this->encoding = $encoding; $this->dir = $dir; } @@ -45,26 +48,27 @@ class language function set_language($code) { - global $comp_path, $path_to_root, $installed_languages; + global $path_to_root, $installed_languages; - $changed = $this->code != $code; $lang = array_search_value($code, $installed_languages, 'code'); + $changed = $this->code != $code || $this->version != @$lang['version']; if ($lang && $changed) { // flush cache as we can use several languages in one account - flush_dir($comp_path.'/'.user_company().'/js_cache'); + flush_dir(company_path().'/js_cache'); $this->name = $lang['name']; $this->code = $lang['code']; $this->encoding = $lang['encoding']; - $this->dir = isset($lang['rtl']) ? 'rtl' : 'ltr'; + $this->version = @$lang['version']; + $this->dir = (isset($lang['rtl']) && $lang['rtl'] === true) ? 'rtl' : 'ltr'; $locale = $path_to_root . "/lang/" . $this->code . "/locale.inc"; $this->is_locale_file = file_exists($locale); } $_SESSION['get_text']->set_language($this->code, $this->encoding); - $_SESSION['get_text']->add_domain($this->code, $path_to_root . "/lang"); + $_SESSION['get_text']->add_domain($this->code, $path_to_root . "/lang", $this->version); // Necessary for ajax calls. Due to bug in php 4.3.10 for this // version set globally in php.ini diff --git a/includes/main.inc b/includes/main.inc index 016102a5..161911c6 100644 --- a/includes/main.inc +++ b/includes/main.inc @@ -11,11 +11,9 @@ ***********************************************************************/ include_once($path_to_root . "/includes/db/connect_db.inc"); -include_once($path_to_root . "/includes/errors.inc"); include_once($path_to_root . "/includes/types.inc"); include_once($path_to_root . "/includes/systypes.inc"); include_once($path_to_root . "/includes/references.inc"); -include_once($path_to_root . "/includes/prefs/sysprefs.inc"); include_once($path_to_root . "/includes/db/comments_db.inc"); include_once($path_to_root . "/includes/db/sql_functions.inc"); include_once($path_to_root . "/includes/db/audit_trail_db.inc"); @@ -25,7 +23,7 @@ include_once($path_to_root . "/admin/db/users_db.inc"); include_once($path_to_root . "/includes/ui/ui_view.inc"); include_once($path_to_root . "/includes/ui/ui_controls.inc"); -function page($title, $no_menu=false, $is_index=false, $onload="", $js="", $script_only=false) +function page($title, $no_menu=false, $is_index=false, $onload="", $js="", $script_only=false, $css='') { global $path_to_root, $page_security; @@ -35,7 +33,7 @@ function page($title, $no_menu=false, $is_index=false, $onload="", $js="", $scri include($path_to_root . "/includes/page/header.inc"); - page_header($title, $no_menu, $is_index, $onload, $js); + page_header($title, $no_menu, $is_index, $onload, $js, $css); check_page_security($page_security); // error_box(); if($script_only) { @@ -48,31 +46,18 @@ function page($title, $no_menu=false, $is_index=false, $onload="", $js="", $scri } } -function end_page($no_menu=false, $is_index=false, $hide_back_link=false) +function end_page($no_menu=false, $is_index=false, $hide_back_link=false, $type_no=0, $trans_no=0) { global $path_to_root; if (!$is_index && !$hide_back_link && function_exists('hyperlink_back')) - hyperlink_back(true, $no_menu); + hyperlink_back(true, $no_menu, $type_no, $trans_no); div_end(); // end of _page_body section include($path_to_root . "/includes/page/footer.inc"); page_footer($no_menu, $is_index, $hide_back_link); } -function flush_dir($path, $wipe = false) -{ - $dir = opendir($path); - while(false !== ($fname = readdir($dir))) { - if($fname=='.' || $fname=='..' || $fname=='CVS' || (!$wipe && $fname=='index.php')) continue; - if(is_dir($path.'/'.$fname)) { - flush_dir($path.'/'.$fname, $wipe); - if ($wipe) @rmdir($path.'/'.$fname); - } else - @unlink($path.'/'.$fname); - } -} - function cache_js_file($fpath, $text) { global $go_debug; @@ -263,4 +248,107 @@ function js_compress($sJS) return $sJS; } +/* + Check if file can be updated, restoring subdirectories + if needed. Returns 1 when no confilcts, -1 when file exists and is writable +*/ +function check_write($path) +{ + if ($path == ''//|| $path == '.' || $path == '..' + ) return 0; + + return is_writable($path) ? (is_dir($path) ? 1 : -1) + : (is_file($path) ? 0 : ($path == '.' ? 0 : check_write(dirname($path)))); +} + +/* + Copies set of files. When $strict is set + also removes files from the $to which + does not exists in $from directory but arelisted in $flist. +*/ +function copy_files($flist, $from, $to, $strict=false) +{ + foreach ($flist as $file) { + if (file_exists($from.'/'.$file)) { + if (!copy_file($file, $from, $to)) + return false; + } else if ($strict) { + unlink($to.'/'.$file); + } + } + return true; +} + +/* + Copies file from base to target directory, restoring subdirectories + if needed. +*/ +function copy_file($file, $from, $to) +{ + + if (!is_dir(dirname($file=='.' ? $to : ($to.'/'.$file)))) { + if (!copy_file(dirname($file), null, $to)) + return false; + } + if (!$from) { + // error_log( 'dodanie katalogu '.$to.'/'.$file); + return @mkdir($file=='.' ? $to : ($to.'/'.$file)); + } + else { + // error_log( 'skopiowanie '.$to.'/'.$file); + return @copy($from.'/'.$file, $to.'/'.$file); + } +} +/* + Search for file, looking first for company specific version, then for + version provided by any extension module, finally in main FA directory. + Also adds include path for any related files, and sets $local_path_to_root + to enable local translation domains. + + Returns found file path or null. +*/ +function find_custom_file($rep) +{ + global $installed_extensions, $path_to_root, $local_path_to_root; + + // customized per company version + $path = company_path(); + $file = $path.$rep; + if (file_exists($file)) { + // add local include path + $local_path_to_root = $path; + set_include_path(dirname($file).PATH_SEPARATOR.get_include_path()); + return $file; + } + // file added by active extension modules + if (count($installed_extensions) > 0) + { + $extensions = $installed_extensions; + foreach ($extensions as $ext) + if (($ext['active'] && $ext['type'] == 'extension')) { + $path = $path_to_root.'/'.$ext['path']; + $file = $path.$rep; + if (file_exists($file)) { + set_include_path($path.PATH_SEPARATOR.get_include_path()); + $local_path_to_root = $path; + return $file; + } + } + } + // standard location + $file = $path_to_root.$rep; + if (file_exists($file)) + return $file; + + return null; +} +/* + + Protect against directory traversal. + Changes all not POSIX compatible chars to underscore. +*/ +function clean_file_name($filename) { + return preg_replace('/[^a-zA-Z0-9.\-_]/', '_', $filename); +} + ?> \ No newline at end of file diff --git a/includes/packages.inc b/includes/packages.inc new file mode 100644 index 00000000..aa630422 --- /dev/null +++ b/includes/packages.inc @@ -0,0 +1,692 @@ +. +***********************************************************************/ +include_once($path_to_root. "/includes/archive.inc"); +include_once($path_to_root. "/includes/remote_url.inc"); + +define('PKG_CACHE_PATH', $path_to_root.'/modules/_cache'); +define('PUBKEY_PATH', $path_to_root); +define('REPO_URL', 'http://'.$repo_auth['login'].':'.$repo_auth['pass'].'@'.$repo_auth['host'].'/'.$repo_auth['branch']); +// +// FrontAccounting package class +// +class package extends gzip_file { + function package($filename, $basedir=null) + { + global $path_to_root; + + if (!$basedir) { + $basedir = PKG_CACHE_PATH.'/'.substr(basename($filename), 0, -4); + if (file_exists($basedir)) { +// flush_dir($basedir, true); + } else + mkdir($basedir); + } + $this->archive($filename); + $this->set_options(array('basedir'=> $basedir)); + $this->options['type'] = "pkg"; + } + // + // Used by archive class. Use create_archive() instead. + // + function create_pkg() + { + return $this->create_gzip(); + } + // + // Install package and clean temp directory. + // + function install() + { + global $path_to_root; + + $success = true; + + $this->set_options(array('overwrite' => 1)); + $this->extract_files(); // extract package in cache directory + $cachepath = $this->options['basedir']; + $ctrl = get_control_file("$cachepath/_init/config"); + + $targetdir = $path_to_root.'/'.$ctrl['InstallPath']; + + if (!is_dir($targetdir)) + mkdir($targetdir); + + $dpackage = new package("$cachepath/_data", $targetdir); + $dpackage->set_options(array('overwrite' => 1)); + + $flist = $dpackage->extract_files(true); + if (count($dpackage->error)) { + $this->error = array_merge($this->error, $dpackage->error); + return false; + } + copy_files($flist, $targetdir, "$cachepath/_back"); + + $dpackage->extract_files(); //install package in target directory + + $install = hook_invoke($ctrl['Package'], 'install_extension', $dummy); + $success &= $install===null || $install; + $success &= count($dpackage->error) == 0; + $this->error = array_merge($this->error, $dpackage->error); + return $success; + } + // + // Removing package related sources + // + function uninstall() + { + global $path_to_root; + + $success = true; + + $cachepath = $this->options['basedir']; + $ctrl = get_control_file("$cachepath/_init/config"); + + $targetdir = $path_to_root.'/'.$ctrl['InstallPath']; + + $dpackage = new package("$cachepath/_data", $targetdir); + + $flist = $dpackage->extract_files(true); + + $success &= copy_files($flist, "$cachepath/_back", $targetdir, true); + + if (strpos($ctrl['InstallPath'], 'modules/') === 0) { // flush module directory + flush_dir($targetdir, true); + rmdir($targetdir); + } + + $uninstall = hook_invoke($ctrl['Package'], 'uninstall_extension', $dummy); + $success &= $uninstall===null || $uninstall; + + return $success; + } + // + // Purge all package related configuration and data. + // + function purge() + { + return true; + } + +} +// +// Changes field value read from control file (single, or multiline) into +// arrays of subfields if needed. +// +function ufmt_property($key, $value) +{ + // indexes used in output arrays + $sub_fields = array( +// 'MenuTabs' => array('url', 'access', 'tab_id', 'title', 'section'), +// 'MenuEntries' => array('url', 'access', 'tab_id', 'title'), + ); + if (!isset($sub_fields[$key])) + return $value==='' ? null : $value; + + $prop = array(); + + if (!is_array($value)) + $value = array($value); + foreach($value as $line) { + $indexes = $sub_fields[$key]; + $ret = array(); + preg_match_all('/(["])(?:\\\\?+.)*?\1|[^"\s][\S]*/', $line, $match); + foreach($match[0] as $n => $subf) { + if ($match[1][$n]) + $val = strtr(substr($subf, 1, -1), + array('\\"'=>'"')); + else + $val = $subf; + if (count($indexes)) + $ret[array_shift($indexes)] = $val; + else + $ret[] = $val; + } + if (count($ret)) + $prop[] = $ret; + } + return $prop; +} +//============================================================================= +// +// Retrieve control file and return as associative array +// $index is name of field used as key in result array, or null for numeric keys +// +function get_control_file($file, $index = false) { + + $list = gzopen($file, 'rb'); + if (!$list) return null; + + $repo = $pkg = array(); + $key = false; $value = ''; + $line = ''; + do { + $line = rtrim($line); + if ($line && ctype_space($line[0])) { // continuation of multiline property + if (strlen(ltrim($line))) { + if ($value !== '' && !is_array($value)) + $value = array($value); + $value[] = ltrim($line); + continue; + } + } + if ($key) { // save previous property if any + $pkg[$key] = ufmt_property($key, $value); + } + if (!strlen($line)) { // end of section + if (count($pkg)) { + if ($index !== true) { + if ($index === false) break; + if (!isset($pkg[$index])) { + display_error(_("No key field '$index' in file '$file'")); + return null; + } + $repo[$pkg[$index]] = $pkg; + } else + $repo[] = $pkg; + } + $pkg = array(); + $key = null; $value = ''; + continue; + } elseif (preg_match('/([^:]*):\s*(.*)/', $line, $m)) { + $key = $m[1]; $value = $m[2]; + if (!strlen($key)) { + display_error("Empty key in line $line"); + return null; + } + } else { + display_error("File parse error in line $line"); + return null; + } + + } while ((($line = fgets($list))!==false) || $key); + fclose($list); + + return $index === false ? $pkg : $repo; +} +// +// Save configuration data to control file. +// +function save_control_file($fname, $list, $zip=false) +{ + $file = $zip ? gzopen($fname, 'wb') : fopen($fname, 'wb'); + foreach($list as $section) { + foreach($section as $key => $value) { + if (is_array($value)) { // multiline value + if (is_array(reset($value))) { // lines have subfields + foreach($value as $i => $line) { + // Subfields containing white spaces or double quotes are doublequoted + // with " escaped with backslash. + foreach($line as $n => $subfield) + if (preg_match('/[\s"]/', $subfield)) { + $value[$i][$n] = + '"'.strtr($subfield, array('"'=>'\\"')).'"'; + } + // Subfields are separated by white space. + $value[$i] = implode(' ', $value[$i]); + } + } + // array elements on subsequent lines starting with white space + $value = implode("\n ", $value); + } + $zip ? gzwrite($file, "$key: $value\n") : fwrite($file, "$key: $value\n"); + } + $zip ? gzwrite($file, "\n"): fwrite($file, "\n"); + } + $zip ? gzclose($file) : fclose($file); +} +// +// Retrieve text field in localized version or default one +// when the localized is not avaialable. +// +function pkg_prop($pkg, $property, $lang=false) +{ + + if ($lang && isset($pkg[$property.'-'.user_language()])) + $prop = @$pkg[$pname]; + else + $prop = @$pkg[$property]; + + return is_array($prop) ? implode("\n ",$prop): $prop; +} +// +// Retrieve list of packages from repository and return as table ($pkgname==null), +// or find $pkgname package in repository and optionaly download +// +// $type is type/s of package +// $filter is optional field selection array in form field=>newkey +// or (0=>field1, 1=>field2...) +// $outkey - field used as a key in package list. If null 'Package' field is used. +// +function get_pkg_or_list($type = null, $pkgname = null, $filter=array(), $outkey=null, $download=true) { + + global $path_to_root, $repo_auth; + + // first download local copy of repo release file + // and check remote signature with local copy of public key + // + $loclist = PKG_CACHE_PATH.'/Release.gz'; + + if (isset($type) && !is_array($type)) { + $type = array($type); + } + $refresh = true; + do{ + if (!file_exists($loclist)) { + url_copy(REPO_URL.'/Release.gz', $loclist); + $refresh = false; + } + $sig = url_get_contents(REPO_URL.'/Release.sig'); + $data = file_get_contents($loclist); + $cert = file_get_contents(PUBKEY_PATH.'/FA.pem'); + if (!openssl_verify($data, $sig, $cert)) { + if ($refresh) + @unlink($loclist); + else { + display_error(_('Release file in repository is invalid, or public key is outdated.')); + return null; + } + } else + $refresh = false; + } while($refresh); + + $Release = get_control_file($loclist, 'Filename'); + // download and check all indexes containing given package types + // then complete package list or seek for pkg + $Packages = array(); + foreach($Release as $fname => $parms) { + if ($type && !count(array_intersect(explode(' ', $parms['Type']), $type))) { + unset($Release[$fname]); continue; // no packages of selected type in this index + } + if ($Release[$fname]['Version'] != $repo_auth['branch']) { + display_warning(_('Repository version does not match application version.')); // ? + } + $remoteindex = REPO_URL.'/'.$fname; + $locindex = PKG_CACHE_PATH.'/'.$fname; + $refresh = true; + do{ + if (!file_exists($locindex)) { + url_copy($remoteindex, $locindex); + $refresh = false; + } + if ($parms['SHA1sum'] != sha1_file($locindex)) { // check subdir index consistency + if ($refresh) + @unlink($locindex); + else { + display_error(sprintf( _("Security alert: broken index file in repository '%s'. Please inform repository administrator about this issue."), + $fname)); + return null; + } + } else + $refresh = false; + } while($refresh); + + // scan subdir list and select packages of given type + $pkglist = get_control_file($locindex, 'Package'); + foreach($pkglist as $name => $pkg) { + $pkgfullname = REPO_URL.'/'.$parms['Path']."/".$pkg['Filename'].'.pkg'; + if (!isset($type) || in_array($pkg['Type'], $type)) { + if (empty($filter)) + $p = $pkg; + else { + foreach($filter as $field => $key) { + if (is_numeric($field)) + $p[$field] = @$pkg[$field]; + else + $p[$key] = @$pkg[$field]; + } + } + if ($pkgname == null) { + $Packages[$outkey ? $outkey : $name] = $p; + } elseif ($pkgname == $pkg['Package']) { + //download package to temp directory + if ($download) { + $locname = "$path_to_root/tmp/".$pkg['Filename'].'.pkg'; + url_copy($pkgfullname, $locname); + // checking sha1 hash is expensive proces, so chekc the package + // consistency just before downloading + if ($pkg['SHA1sum'] != sha1_file($locname)) { + display_error(sprintf( _("Security alert: broken package '%s' in repository. Please inform repository administrator about this issue."), + $pkgfullname)); + return null; + } + } + return $p; + } + } + } + } + + return $Packages; +} + +function get_package($pkgname, $type = null) +{ + return get_pkg_or_list($type, $pkgname); +} +/* + Returns full name of installed package, or null if package is not installed. +*/ +function installed_package($package) +{ + $cache = opendir(PKG_CACHE_PATH); + + while ($file = @readdir($cache)) { + if (!is_dir(PKG_CACHE_PATH.'/'.$file)) + continue; + if (strpos($file, $package.'-') === 0) + return $file; + } + @closedir($cache); + + return null; +} +/* + Remove package from system +*/ +function uninstall_package($name) +{ + $name = installed_package($name); + if (!$name) return true; // not installed + $pkg = new package($name.'.pkg'); + $pkg->uninstall(); + if($name) { + flush_dir(PKG_CACHE_PATH.'/'.$name, true); + rmdir(PKG_CACHE_PATH.'/'.$name); + } + return count($pkg->error)==0; +} + +//--------------------------------------------------------------------------------------- +// +// Return merged list of available and installed languages in inform of local +// configuration array supplemented with installed versions information. +// +function get_languages_list() +{ + global $installed_languages; + + $pkgs = get_pkg_or_list('language', null, array( + 'Package' => 'package', + 'Version' => 'available', + 'Name' => 'name', + 'Language' => 'code', + 'Encoding' => 'encoding', + 'RTLDir' => 'rtl', + 'Description' => 'Descr', + 'InstallPath' => 'path' + )); + + // add/update languages already installed + // + foreach($installed_languages as $id => $l) { + $list = array_search_keys($l['code'], $pkgs, 'code'); // get all packages with this code + foreach ($list as $name) { + if ($l['encoding'] == $pkgs[$name]['encoding']) { // if the same encoding + $pkgs[$name]['version'] = @$l['version']; // set installed version + $pkgs[$name]['local_id'] = $id; // index in installed_languages + continue 2; + } + } + $l['local_id'] = $id; + if (!isset($l['package']) || $l['package'] == '' || !isset($pkgs[$l['package']])) + $pkgs[] = $l; + else + $pkgs[$l['package']] = array_merge($pkgs[$l['package']], $l); + } + ksort($pkgs); + return $pkgs; +} +//--------------------------------------------------------------------------------------- +// +// Return merged list of available and installed extensions as a local +// configuration array supplemented with installed versions information. +// +function get_extensions_list($type = null) +{ + global $path_to_root; + + if (isset($type) || !is_array($type)) { + $type = array($type); + } + + $pkgs = get_pkg_or_list($type, null, array( + 'Package' => 'package', + 'Version' => 'available', + 'Name' => 'name', + 'Description' => 'Descr', + 'Type' => 'type', + 'DefaultStatus'=> 'active', +// 'MenuTabs' => 'tabs', +// 'MenuEntries' => 'entries', + 'Encoding' => 'encoding', +// 'AccessExtensions' => 'acc_file', + 'InstallPath' => 'path' + )); + + // lookup for local extensions + $path = $path_to_root.'/modules/'; + $loc = array(); + $moddir = opendir($path); + + while(false != ($fname = readdir($moddir))) + { + if(!in_array($fname, array('.','..','CVS','_cache')) && is_dir($path.$fname)) + { + if (!isset($pkgs[$fname])) + $pkgs[$fname] = array( + 'package' => $fname, + 'name' => $fname, + 'version' => '', + 'available' => '', + 'type' => 'extension', + 'path' => 'modules/'.$fname, + 'active' => false + ); + } + } + + // add/update extensions already installed + // + $installed = get_company_extensions(); + foreach($installed as $extno => $ext) { + if (!in_array($ext['type'], $type)) continue; + $ext['local_id'] = $extno; +// if (!isset($pkgs[$ext['package']]) || $ext['package'] == '') +// $pkgs[] = $ext; +// else + $pkgs[$ext['package']] = array_merge($pkgs[$ext['package']], $ext); + } + ksort($pkgs); + return $pkgs; +} +// +// Return merged list of available and installed extensions as a local +// configuration array supplemented with installed versions information. +// +function get_themes_list() +{ + $pkgs = get_pkg_or_list('theme', null, array( + 'Package' => 'package', + 'Version' => 'available', + 'Name' => 'name', + 'Description' => 'Descr' + )); + + // add/update extensions already installed + // + $local = get_company_extensions(); + + foreach($local as $extno => $ext) { + if (isset($pkgs[@$ext['package']])) { + $ext['local_id'] = $extno; + $pkgs[$ext['package']] = array_merge($pkgs[$ext['package']], $ext); + } + } + // TODO: Add other themes from themes directory + + ksort($pkgs); + return $pkgs; +} +//--------------------------------------------------------------------------------------- +// +// Return merged list of available and installed COAs as a local +// configuration array supplemented with installed versions information. +// +function get_charts_list() +{ + $pkgs = get_pkg_or_list('chart', null, array( + 'Package' => 'package', + 'Version' => 'available', + 'Name' => 'name', + 'Description' => 'Descr', + 'Type' => 'type', + 'InstallPath' => 'path', + 'Encoding' => 'encoding', + 'SqlScript' => 'sql' + )); + + // add/update default charts + // + $local = get_company_extensions(); + + foreach($local as $extno => $ext) { + if ($ext['type'] != 'chart') continue; + $ext['local_id'] = $extno; + if (!isset($pkgs[$ext['package']]) || $ext['package'] == '') + $pkgs[] = $ext; + else + $pkgs[$ext['package']] = array_merge($pkgs[$ext['package']], $ext); + } + ksort($pkgs); + return $pkgs; +} +//--------------------------------------------------------------------------------------------- +// Install/update package from repository +// +function install_language($pkg_name) +{ + global $path_to_root, $installed_languages, $Ajax; + + $pkg = get_pkg_or_list('language', $pkg_name); + + if ($pkg) { + $i = array_search_key($pkg['Language'], $installed_languages, 'code'); + if ($i === null) + $i = count($installed_languages); + else { // remove another already installed package for this language + $old_pkg = @$installed_languages[$i]['package']; + if ($old_pkg && ($pkg['Package'] != $old_pkg)) + uninstall_package($old_pkg); + } + + $package = new package("$path_to_root/tmp/".$pkg['Filename'].'.pkg'); + if ($package->install()) { + $lang = array( + 'name' => $pkg['Name'], + 'package' => $pkg['Package'], + 'code' => $pkg['Language'], + 'encoding' => $pkg['Encoding'], + 'version' => $pkg['Version'], + 'path' => $pkg['InstallPath'] + ); + if ($pkg['RTLDir']=='yes') + $lang['rtl'] = true; + $installed_languages[$i] = $lang; + write_lang($installed_languages); + unlink("$path_to_root/tmp/".$pkg['Filename'].'.pkg'); + $Ajax->activate('lang_tbl'); + } else { + display_error(implode('
', $package->error)); + return false; + } + } else { + display_error(sprintf(_("Package '%s' not found."), $pkg_name)); + return false; + } + return true; +} +//--------------------------------------------------------------------------------------------- +// Install/update extension or theme package from repository +// +function install_extension($pkg_name) +{ + global $path_to_root, $installed_extensions, $next_extension_id, $Ajax; + + $pkg = get_pkg_or_list(array('extension', 'theme', 'chart'), $pkg_name); + if ($pkg) { + $package = new package("$path_to_root/tmp/".$pkg['Filename'].'.pkg'); + $local_exts = get_company_extensions(); + if ($package->install()) { + $ext_id = array_search_key($pkg['Package'], $local_exts, 'package'); + if ($ext_id === null) + $ext_id = $next_extension_id++; + else { // remove another already installed package for this language + $old_pkg = $installed_extensions[$ext_id]['package']; + if ($old_pkg) + uninstall_package($old_pkg); + } + $ext = array( + 'name' => $pkg['Name'], + 'package' => $pkg['Package'], + 'version' => $pkg['Version'], + 'type' => $pkg['Type'], + 'active' => true, + 'path' => $pkg['InstallPath'], + ); +// if (isset($pkg['MenuTabs'])) +// $ext['tabs'] = $pkg['MenuTabs']; +// if (isset($pkg['MenuEntries'])) +// $ext['entries'] = $pkg['MenuEntries']; +// if (isset($pkg['AccessExtensions'])) +// $ext['acc_file'] = $pkg['AccessExtensions']; + if (isset($pkg['SqlScript'])) + $ext['sql'] = $pkg['SqlScript']; + $local_exts[$ext_id] = $ext; + $ret = update_extensions($local_exts); + unlink("$path_to_root/tmp/".$pkg['Filename'].'.pkg'); + $Ajax->activate('ext_tbl'); + return $ret; + } else { + display_error(implode('
', $package->error)); + return false; + } + } else { + display_error(sprintf(_("Package '%s' not found."), $pkg_name)); + return false; + } + return true; +} +/* + Returns true if newer package version is available +*/ +function check_pkg_upgrade($current, $available) +{ + preg_match_all('/[\d]+/', $available, $aver); + if (!count($aver[0])) + return false; + preg_match_all('/[\d]+/', $current, $cver); + if (!count($cver[0])) + return true; + foreach($aver[0] as $n => $ver) + if ($ver>@$cver[0][$n]) + return true; + return false; +} + +// +// Returns package info from index file +// +function get_package_info($pkg, $type=null, $filter=array(), $outkey=null, $download=true) { + return get_pkg_or_list($type, $pkg, $filter, null, false); +} + +?> \ No newline at end of file diff --git a/includes/page/footer.inc b/includes/page/footer.inc index 23318932..68f76f35 100644 --- a/includes/page/footer.inc +++ b/includes/page/footer.inc @@ -11,7 +11,7 @@ ***********************************************************************/ function page_footer($no_menu=false, $is_index=false, $hide_back_link=false) { - global $path_to_root, $js_lib, $Validate, $Editors, $Ajax; + global $path_to_root, $js_lib, $Validate, $Editors, $Ajax, $sql_queries; include_once($path_to_root."/themes/".user_theme()."/renderer.php"); $rend = new renderer(); @@ -32,6 +32,12 @@ function page_footer($no_menu=false, $is_index=false, $hide_back_link=false) foreach($js_lib as $text) echo $text; echo "\n-->\n"; + + if ($sql_queries) { + div_start('footer_debug'); + echo "
$sql_queries
"; + div_end(); + } echo "\n"; } diff --git a/includes/page/header.inc b/includes/page/header.inc index b0364cbe..fc850b95 100644 --- a/includes/page/header.inc +++ b/includes/page/header.inc @@ -47,13 +47,12 @@ function help_url($context=null) function send_scripts() { - global $js_lib, $js_static, $js_path, $js_userlib, $comp_path, - $path_to_root, $go_debug; + global $js_static, $js_path, $js_userlib, $path_to_root, $go_debug; $js =''; foreach($js_static as $jsfile) { - $fpath = $comp_path.'/'.user_company().'/js_cache/'.$jsfile; + $fpath = company_path().'/js_cache/'.$jsfile; // compress also static files if (!file_exists($fpath) || $go_debug) cache_js_file($fpath, file_get_contents($js_path.$jsfile)); @@ -70,7 +69,7 @@ function send_scripts() echo $js; } -function page_header($title, $no_menu=false, $is_index=false, $onload="", $js="") +function page_header($title, $no_menu=false, $is_index=false, $onload="", $js="", $css='') { // titles and screen header global $path_to_root, $def_app, $use_popup_windows, $help_base_url; @@ -84,7 +83,6 @@ function page_header($title, $no_menu=false, $is_index=false, $onload="", $js="" // add_js_ufile($jsext); $theme = user_theme(); - $local_path_to_root = $path_to_root; if ($help_base_url != null && $use_popup_windows && $js == '') { @@ -127,15 +125,19 @@ function page_header($title, $no_menu=false, $is_index=false, $onload="", $js="" echo "dir . "' >\n"; echo "$title"; echo ""; - echo " \n"; - send_scripts($js); + echo " \n"; + if ($css) + echo ''; + + send_scripts(); echo " \n"; if ($onload == "") echo ""; else echo ""; - include_once($local_path_to_root."/themes/".user_theme()."/renderer.php"); + + include_once($path_to_root . "/themes/".user_theme()."/renderer.php"); $rend = new renderer(); $rend->menu_header($title, $no_menu, $is_index); error_box(); diff --git a/includes/prefs/sysprefs.inc b/includes/prefs/sysprefs.inc index f8e78282..f930f85d 100644 --- a/includes/prefs/sysprefs.inc +++ b/includes/prefs/sysprefs.inc @@ -13,10 +13,18 @@ include_once($path_to_root . "/admin/db/company_db.inc"); class sys_prefs { + var $prefs; + var $db_ok; // check whether database has been upgraded after src update. + + function sys_prefs() + { +// $this->prefs = get_company_prefs(); + + } function allow_negative_stock() { - return get_company_pref('allow_negative_stock'); + return $this->prefs['allow_negative_stock']; } /* Sherifoz 26.06.03 Proportion by which items can be received over the quantity that is specified in a purchase @@ -25,7 +33,7 @@ class sys_prefs */ function over_receive_allowance() { - return get_company_pref('po_over_receive'); + return $this->prefs['po_over_receive']; } /* Proportion by which a purchase invoice line is an overcharge for a purchase order item received @@ -35,27 +43,32 @@ class sys_prefs */ function over_charge_allowance() { - return get_company_pref('po_over_charge'); + return $this->prefs['po_over_charge']; } function default_credit_limit() { - return get_company_pref('default_credit_limit'); + return $this->prefs['default_credit_limit']; } function default_wo_required_by() { - return get_company_pref('default_workorder_required'); + return $this->prefs['default_workorder_required']; } function default_delivery_required_by() { - return get_company_pref('default_delivery_required'); + return $this->prefs['default_delivery_required']; } function default_dimension_required_by() { - return get_company_pref('default_dim_required'); + return $this->prefs['default_dim_required']; + } + + function auto_currency_revaluation() + { + return $this->prefs['auto_curr_reval']; } function allocation_settled_allowance() diff --git a/includes/prefs/userprefs.inc b/includes/prefs/userprefs.inc index 93f94180..50fa0a88 100644 --- a/includes/prefs/userprefs.inc +++ b/includes/prefs/userprefs.inc @@ -84,7 +84,32 @@ class user_prefs } } } - + + function get_all() + { + return array( + 'language' => $this->language, + 'qty_dec' => $this->qty_dec, + 'prices_dec' => $this->price_dec, + 'rates_dec' => $this->exrate_dec, + 'percent_dec' => $this->percent_dec, + 'show_gl' => $this->show_gl_info, + 'show_codes' => $this->show_codes, + 'date_format' =>$this->date_format, + 'date_sep' => $this->date_sep, + 'tho_sep' => $this->tho_sep, + 'dec_sep' => $this->dec_sep, + 'theme' => $this->theme, + 'page_size' => $this->pagesize, + 'show_hints' => $this->show_hints, + 'print_profile' => $this->print_profile, + 'rep_popup' => $this->rep_popup, + 'query_size' => $this->query_size, + 'graphic_links' => $this->graphic_links, + 'sticky_doc_date' => $this->sticky_date, + 'startup_tab' => $this->startup_tab); + } + function language() { return $this->language; diff --git a/includes/references.inc b/includes/references.inc index 420e960e..0c11ebee 100644 --- a/includes/references.inc +++ b/includes/references.inc @@ -10,58 +10,74 @@ See the License here . ***********************************************************************/ include_once($path_to_root . "/includes/db/references_db.inc"); +//--------------------------------------------------------------------------------------------- +// +// For now (2.3) the references system has somewhat inconsistent design scheme. +// Most transactions store references in respective table, but this is not the case +// for journal entries. All references regardless of type are stored also in refs table. +// Reference uniquness now can be checked with is_new_reference() for all transactions. +// In near future this should be fixed either with removing reference fields +// in transaction tables, or adding ref in bank transaction/journal and removing refs table. +// class references { - - function save($type, $id, $reference) - { - add_reference($type, $id, $reference); - if ($reference != 'auto') - $this->save_last($reference, $type); - } - + // + // Get reference from refs table for given transaction. + // Used for transactions which do not hold references (journal and bank). + // function get($type, $id) { return get_reference($type, $id); - } - - function delete($type, $id) - { - delete_reference($type, $id); - } - - function update($type, $id, $reference) - { - update_reference($type, $id, $reference); - if ($reference != 'auto') - $this->save_last($reference, $type); } - + // + // Check if reference is used for any non voided transaction (used for ST_JOURNALENTRY type) + // function exists($type, $reference) { return (find_reference($type, $reference) != null); } - - function save_last($reference, $type) - { - $next = $this->increment($reference); - save_next_reference($type, $next); - } - + // + // Get default reference on new transaction creation. + // function get_next($type) { return get_next_reference($type); } - - //------------------------------------ - + // + // Check reference is valid before add/update transaction. + // function is_valid($reference) { return strlen(trim($reference)) > 0; } - - function increment($reference) + // + // Save reference (and prepare next) on write transaction. + // + function save($type, $id, $reference) + { + update_reference($type, $id, $reference); // store in refs table + if ($reference == $this->get_next($type)) { // if reference was not changed from default + $next = $this->_increment($reference); // increment default + save_next_reference($type, $next); + } + } + // + // Restore previous reference (if possible) after voiding transaction. + // + function restore_last($type, $id) + { + $reference = get_reference($type, $id); + $prev = $this->_increment($this->get_next($type), true); //decrement + if ($reference==$prev) { + save_next_reference($type, $prev); + } + } + //----------------------------------------------------------------------- + // + // Increments (or decrements if $back==true) reference template + // + function _increment($reference, $back=false) { // New method done by Pete. So f.i. WA036 will increment to WA037 and so on. // If $reference contains at least one group of digits, @@ -74,15 +90,14 @@ class references list($all, $prefix, $number, $postfix) = $result; $dig_count = strlen($number); // How many digits? eg. 0003 = 4 $fmt = '%0' . $dig_count . 'd'; // Make a format string - leading zeroes - $nextval = sprintf($fmt, intval($number + 1)); // Add one on, and put prefix back on + $val = intval($number + ($back ? ($number<1 ? 0 : -1) : 1)); + $nextval = sprintf($fmt, $val); // Add one on, and put prefix back on return $prefix.$nextval.$postfix; } else return $reference; } - - //------------------------------------ } //---------------------------------------------------------------------------- @@ -92,21 +107,37 @@ function is_new_reference($ref, $type) $db_info = get_systype_db_info($type); $db_name = $db_info[0]; $db_type = $db_info[1]; + $db_trans = $db_info[2]; $db_ref = $db_info[3]; - if ($db_ref != null) - { - $sql = "SELECT $db_ref FROM $db_name WHERE $db_ref='$ref'"; - if ($db_type != null) - $sql .= " AND $db_type=$type"; - - $result = db_query($sql, "could not test for unique reference"); - - return (db_num_rows($result) == 0); - } + $ref = db_escape(trim($ref)); + $type = db_escape($type); - // it's a type that doesn't use references - shouldn't be calling here, but say yes anyways - return true; + if ($db_ref == null) { // journal or bank trans store references in refs table + $db_ref = TB_PREF."refs"; + $db_type = 'type'; + $db_trans = 'id'; + $rb_ref = 'reference'; + } + + if ($db_type != null) { + $sql = "SELECT $db_ref FROM $db_name + LEFT JOIN ".TB_PREF."voided v ON + $db_name.$db_type=v.type AND $db_name.$db_trans=v.id + WHERE $db_name.$db_ref=$ref AND ISNULL(v.id) + AND $db_name.$db_type=$type"; + } else { + $sql = "SELECT $db_ref FROM $db_name + LEFT JOIN ".TB_PREF."voided v ON + v.type=$type AND $db_name.$db_trans=v.id + WHERE $db_ref=$ref AND ISNULL(v.id)"; + } + + $result = db_query($sql, "could not test for unique reference"); + + return (db_num_rows($result) == 0); + } + ?> \ No newline at end of file diff --git a/includes/remote_url.inc b/includes/remote_url.inc new file mode 100644 index 00000000..fb0c1348 --- /dev/null +++ b/includes/remote_url.inc @@ -0,0 +1,88 @@ +. +***********************************************************************/ + +/* + Read content of remote url via http. + Does not require curl php extension nor allow_url_fopen=1. +*/ +function url_get_contents($url, $timeout=10) +{ + // get the host name and url path + $parsedUrl = parse_url($url); + + $host = $parsedUrl['host']; + + if (isset($parsedUrl['path'])) { + $path = $parsedUrl['path']; + } else { + // the url is pointing to the host like http://www.mysite.com + $path = '/'; + } + + if (isset($parsedUrl['query'])) { + $path .= '?' . $parsedUrl['query']; + } + + if (isset($parsedUrl['port'])) { + $port = $parsedUrl['port']; + } else { + // most sites use port 80 + $port = '80'; + } + + $response = ''; + + // connect to the remote server + $fp = @fsockopen($host, $port, $errno, $errstr, $timeout ); + if( !$fp ) { + return null; + } else { + // send the necessary headers to get the file + fputs($fp, "GET $path HTTP/1.0\r\n" . + "Host: $host\r\n". + (isset($parsedUrl['pass']) ? "Authorization: Basic ". + base64_encode($parsedUrl['user'].':'.$parsedUrl['pass'])."\r\n" : ''). + "User-Agent: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.8.0.3) Gecko/20060426 Firefox/1.5.0.3\r\n" . + "Accept: */*\r\n" . + "Accept-Language: en-us,en;q=0.5\r\n" . + "Accept-Charset: ISO-8859-1,utf-8;q=0.7,*;q=0.7\r\n" . + "Keep-Alive: 300\r\n" . + "Connection: keep-alive\r\n" . + "Referer: http://$host\r\n\r\n"); + + // retrieve the response from the remote server + $len =0; + while ($line = fread($fp, 4096)) { + $response .= $line; + if ($host=='localhost') + stream_set_blocking($fp, 0); // just after connection switch to nonblocking mode + } + fclose( $fp ); + + if (!strpos($response, "200 OK\r\n")) + return null; + // strip the headers + $pos = strpos($response, "\r\n\r\n"); + + $response = substr($response, $pos + 4); + } + + // return the file content + return $response; +} + +function url_copy($from, $to, $timeout=10) +{ + $f = fopen($to, 'wb'); + fwrite($f, url_get_contents($from, $timeout)); + fclose($f); +} diff --git a/includes/session.inc b/includes/session.inc index daec5dea..f98c97b2 100644 --- a/includes/session.inc +++ b/includes/session.inc @@ -51,6 +51,10 @@ function login_fail() function check_page_security($page_security) { + global $SysPrefs; + + $msg = ''; + if (!$_SESSION["wa_current_user"]->check_user_access()) { // notification after upgrade from pre-2.2 version @@ -58,7 +62,11 @@ function check_page_security($page_security) _("Security settings have not been defined for your user account.") . "
" . _("Please contact your system administrator.") : _("Please remove \$security_groups and \$security_headings arrays from config.php file!"); - + } elseif (!$_SESSION['SysPrefs']->db_ok && !$_SESSION["wa_current_user"]->can_access('SA_SOFTWAREUPGRADE')) { + $msg = _('Access to application has been blocked until database upgrade is completed by system administrator.'); + } + + if ($msg){ display_error($msg); end_page(); kill_login(); @@ -75,6 +83,14 @@ function check_page_security($page_security) end_page(); exit; } + if (!$_SESSION['SysPrefs']->db_ok + && !in_array($page_security, array('SA_SOFTWAREUPGRADE', 'SA_OPEN', 'SA_BACKUP'))) + { + display_error(_('System is blocked after source upgrade until database is updated on System/Software Upgrade page')); + end_page(); + exit; + } + } /* Helper function for setting page security level depeding on @@ -115,6 +131,18 @@ function strip_quotes($data) return $data; } +function html_cleanup(&$parms) +{ + foreach($parms as $name => $value) { +// $value = @html_entity_decode($value, ENT_QUOTES, $_SESSION['language']->encoding); + if (is_array($value)) + html_cleanup($parms[$name]); + else + $parms[$name] = @htmlspecialchars($value, ENT_QUOTES, $_SESSION['language']->encoding); + } + reset($parms); // needed for direct key() usage later throughout the sources +} + //============================================================================ // // @@ -140,6 +168,10 @@ if (!isset($path_to_root)) if (isset($_GET['path_to_root']) || isset($_POST['path_to_root'])) die("Restricted access"); +include_once($path_to_root . "/includes/errors.inc"); +// colect all error msgs +set_error_handler('error_handler' /*, errtypes */); + include_once($path_to_root . "/includes/current_user.inc"); include_once($path_to_root . "/frontaccounting.php"); include_once($path_to_root . "/admin/db/security_db.inc"); @@ -147,6 +179,9 @@ include_once($path_to_root . "/includes/lang/language.php"); include_once($path_to_root . "/config_db.php"); include_once($path_to_root . "/includes/ajax.inc"); include_once($path_to_root . "/includes/ui/ui_msgs.inc"); +include_once($path_to_root . "/includes/prefs/sysprefs.inc"); + +include_once($path_to_root . "/includes/hooks.inc"); /* Uncomment the setting below when using FA on shared hosting @@ -158,11 +193,13 @@ include_once($path_to_root . "/includes/ui/ui_msgs.inc"); ini_set('session.gc_maxlifetime', 36000); // 10hrs session_name('FA'.md5(dirname(__FILE__))); +//include_once($path_to_root.'/modules/www_statistics/includes/db_sessions.inc'); session_start(); // this is to fix the "back-do-you-want-to-refresh" issue - thanx PHPFreaks header("Cache-control: private"); +include_once($path_to_root . "/config.php"); get_text_init(); // Page Initialisation @@ -170,20 +207,14 @@ if (!isset($_SESSION['language']) || !method_exists($_SESSION['language'], 'set_ { $l = array_search_value($dflt_lang, $installed_languages, 'code'); $_SESSION['language'] = new language($l['name'], $l['code'], $l['encoding'], - isset($l['rtl']) ? 'rtl' : 'ltr'); + (isset($l['rtl']) && $l['rtl'] === true) ? 'rtl' : 'ltr'); } $_SESSION['language']->set_language($_SESSION['language']->code); -// include $Hooks object if locale file exists -if (file_exists($path_to_root . "/lang/".$_SESSION['language']->code."/locale.inc")) -{ - include_once($path_to_root . "/lang/".$_SESSION['language']->code."/locale.inc"); - $Hooks = new Hooks(); -} include_once($path_to_root . "/includes/access_levels.inc"); -include_once($path_to_root . "/config.php"); +include_once($path_to_root . "/version.php"); include_once($path_to_root . "/includes/main.inc"); // Ajax communication object @@ -196,20 +227,20 @@ $Editors = array(); // page help. Currently help for function keys. $Pagehelp = array(); -$SysPrefs = new sys_prefs(); - $Refs = new references(); // intercept all output to destroy it in case of ajax call register_shutdown_function('end_flush'); ob_start('output_html',0); -// colect all error msgs -set_error_handler('error_handler' /*, errtypes */); - if (!isset($_SESSION["wa_current_user"])) $_SESSION["wa_current_user"] = new current_user(); +html_cleanup($_GET); +html_cleanup($_POST); +html_cleanup($_REQUEST); +html_cleanup($_SERVER); + // logout.php is the only page we should have always // accessable regardless of access level and current login status. if (strstr($_SERVER['PHP_SELF'], 'logout.php') == false){ @@ -223,7 +254,7 @@ if (strstr($_SERVER['PHP_SELF'], 'logout.php') == false){ { // strip ajax marker from uri, to force synchronous page reload $_SESSION['timeout'] = array( 'uri'=>preg_replace('/JsHttpRequest=(?:(\d+)-)?([^&]+)/s', - '', @$_SERVER['REQUEST_URI']), + '', @htmlspecialchars($_SERVER['REQUEST_URI'], ENT_QUOTES, $_SESSION['language']->encoding)), 'post' => $_POST); include($path_to_root . "/access/login.php"); @@ -251,14 +282,18 @@ if (strstr($_SERVER['PHP_SELF'], 'logout.php') == false){ if (!$_SESSION["wa_current_user"]->old_db) include_once($path_to_root . '/company/'.user_company().'/installed_extensions.php'); + install_hooks(); + if (!isset($_SESSION["App"])) { $_SESSION["App"] = new front_accounting(); $_SESSION["App"]->init(); } } +$SysPrefs = &$_SESSION['SysPrefs']; + // POST vars cleanup needed for direct reuse. // We quote all values later with db_escape() before db update. - $_POST = strip_quotes($_POST); +$_POST = strip_quotes($_POST); ?> \ No newline at end of file diff --git a/includes/sysnames.inc b/includes/sysnames.inc new file mode 100644 index 00000000..1b9f6754 --- /dev/null +++ b/includes/sysnames.inc @@ -0,0 +1,186 @@ +. +***********************************************************************/ +//---------------------------------------------------------------------------------- +// FrontAccounting global system names. They have to be stored separate from +// sys types defines to enable inclusion after every language change +// (which happens for multilanguage bulk reports) +// +global $systypes_array, $bank_account_types, $bank_transfer_types, + $payment_person_types, $wo_types_array, $wo_cost_types, $class_types, + $quick_actions, $quick_entry_types, $stock_types, $tag_types; + +$systypes_array = array ( + ST_JOURNAL => _("Journal Entry"), + ST_BANKPAYMENT => _("Bank Payment"), + ST_BANKDEPOSIT => _("Bank Deposit"), + ST_BANKTRANSFER => _("Funds Transfer"), + ST_SALESINVOICE => _("Sales Invoice"), + ST_CUSTCREDIT => _("Customer Credit Note"), + ST_CUSTPAYMENT => _("Customer Payment"), + ST_CUSTDELIVERY => _("Delivery Note"), + ST_LOCTRANSFER => _("Location Transfer"), + ST_INVADJUST => _("Inventory Adjustment"), + ST_PURCHORDER => _("Purchase Order"), + ST_SUPPINVOICE => _("Supplier Invoice"), + ST_SUPPCREDIT => _("Supplier Credit Note"), + ST_SUPPAYMENT => _("Supplier Payment"), + ST_SUPPRECEIVE => _("Purchase Order Delivery"), + ST_WORKORDER => _("Work Order"), + ST_MANUISSUE => _("Work Order Issue"), + ST_MANURECEIVE => _("Work Order Production"), + ST_SALESORDER => _("Sales Order"), + ST_SALESQUOTE => _("Sales Quotation"), + ST_COSTUPDATE => _("Cost Update"), + ST_DIMENSION => _("Dimension") + ); + +$type_shortcuts = array( + ST_JOURNAL => _("GJ"), // general journal + ST_BANKPAYMENT => _("BP"), + ST_BANKDEPOSIT => _("BD"), + ST_BANKTRANSFER => _("BT"), + ST_SALESINVOICE => _("SI"), + ST_CUSTCREDIT => _("CN"), + ST_CUSTPAYMENT => _("CP"), + ST_CUSTDELIVERY => _("DN"), + ST_LOCTRANSFER => _("IT"), // inventory transfer + ST_INVADJUST => _("IA"), + ST_PURCHORDER => _("PO"), + ST_SUPPINVOICE => _("PI"), // purchase invoice + ST_SUPPCREDIT => _("PC"), + ST_SUPPAYMENT => _("SP"), + ST_SUPPRECEIVE => _("GRN"), + ST_WORKORDER => _("WO"), + ST_MANUISSUE => _("WI"), + ST_MANURECEIVE => _("WP"), + ST_SALESORDER => _("SO"), + ST_SALESQUOTE => _("SQ"), + ST_COSTUPDATE => _("CU"), + ST_DIMENSION => _("Dim") +); + + +//---------------------------------------------------------------------------------- +// Bank transaction types +// +$bank_account_types = array ( + BT_TRANSFER => _("Savings Account"), + _("Chequing Account"), + _("Credit Account"), + _("Cash Account") + ); + +$bank_transfer_types = array( + BT_TRANSFER => _("Transfer"), + _("Cheque"), + _("Credit"), + _("Cash") + ); + +//---------------------------------------------------------------------------------- +// Payment types +// + +$payment_person_types = array ( + PT_MISC => _("Miscellaneous"), + _("Work Order"), + _("Customer"), + _("Supplier"), + _("Quick Entry") + ); + +//---------------------------------------------------------------------------------- +// Manufacturing types +// +$wo_types_array = array ( + WO_ASSEMBLY => _("Assemble"), + WO_UNASSEMBLY => _("Unassemble"), + WO_ADVANCED => _("Advanced Manufacture") + ); + +$wo_cost_types = array( + WO_LABOUR => _("Labour Cost"), + WO_OVERHEAD => _("Overhead Cost"), +); + +//---------------------------------------------------------------------------------- +// GL account classes +// +$class_types = array( + CL_ASSETS => _("Assets"), + CL_LIABILITIES => _("Liabilities"), + CL_EQUITY => _("Equity"), + CL_INCOME => _("Income"), + CL_COGS => _("Cost of Goods Sold"), + CL_EXPENSE => _("Expense"), +); + +//---------------------------------------------------------------------------------- +// Quick entry types +// +$quick_actions = array( + '=' => _('Remainder'), // post current base amount to GL account + 'a' => _('Amount'), // post amount to GL account + 'a+' => _('Amount, increase base'), // post amount to GL account and increase base + 'a-' => _('Amount, reduce base'), // post amount to GL account and reduce base + '%' => _('% amount of base'), // store acc*amount% to GL account + '%+' => _('% amount of base, increase base'), // ditto & increase base amount + '%-' => _('% amount of base, reduce base'), // ditto & reduce base amount + 'T' => _('Taxes added'), // post taxes calculated on base amount + 'T+' => _('Taxes added, increase base'), // ditto & increase base amount + 'T-' => _('Taxes added, reduce base'), // ditto & reduce base amount + 't' => _('Taxes included'), // post taxes calculated on base amount + 't+' => _('Taxes included, increase base'), // ditto & increase base amount + 't-' => _('Taxes included, reduce base') // ditto & reduce base amount +); + +$quick_entry_types = array( + QE_DEPOSIT => _("Bank Deposit"), + QE_PAYMENT => _("Bank Payment"), + QE_JOURNAL => _("Journal Entry"), + QE_SUPPINV => _("Supplier Invoice/Credit") +); + +//---------------------------------------------------------------------------------- +// Types of stock items +$stock_types = array( + 'M' => _("Manufactured"), + 'B' => _("Purchased"), + 'D' => _("Service") +); + +//---------------------------------------------------------------------------------- + +$tag_types = array ( + TAG_ACCOUNT => _("Account"), + TAG_DIMENSION => _("Dimension") +); + +//---------------------------------------------------------------------------------- +// crm contacts categories +$sys_crm_cats = array ( + 'cust_branch' => _("Customer branch"), + 'supplier' => _("Supplier"), + 'shipper' => _("Shipper"), + 'company' => _("Company internal") +); +//---------------------------------------------------------------------------------- + +$pterm_types = array( + PTT_PRE => _("Prepayment"), + PTT_CASH => _("Cash"), + PTT_DAYS => _("After No. of Days"), + PTT_FOLLOWING => _("Day In Following Month") +); + + +?> \ No newline at end of file diff --git a/includes/system_tests.inc b/includes/system_tests.inc new file mode 100644 index 00000000..798ef677 --- /dev/null +++ b/includes/system_tests.inc @@ -0,0 +1,442 @@ +. +***********************************************************************/ + +// Type of requirement for positive test result +$test_level = array( + 0 => _('Info'), + 1 => _('Optional'), + 2 => _('Recommended'), + 3 => _('Required ') +); + +// test mysql server version +function tst_mysql() +{ + $test['descr'] = _('MySQL version'). ' >=4.1'; + $test['type'] = 3; + $test['test'] = mysql_get_server_info(); + $test['result'] = $test['test']>='4.1'; + $test['comments'] = _('Upgrade MySQL server to version at least 4.1'); + + return $test; +} +// test php mysql extension +function tst_phpmysql() +{ + $test['descr'] = _('PHP MySQL extension'); + $test['type'] = 3; + $test['result'] = function_exists('mysql_connect'); + $test['test'] = $test['result'] ? _('Yes'): _('No'); + + $test['comments'] = _('Your PHP has to have MySQL extension enabled.'); + return $test; +} + +function tst_php() +{ + $test['descr'] = _('PHP version').' >=4.3.3'; + $test['type'] = 3; + $test['test'] = phpversion(); + $test['result'] = $test['test']>='4.3.3'; + $test['comments'] = _('Upgrade PHP to version at least 4.3.3'); + + return $test; +} + +function tst_system() +{ + $test['descr'] = _('Server system'); + $test['type'] = 0; + $test['test'] = PHP_OS; + $test['result'] = true; + + return $test; +} + +function tst_sessionpath() +{ + $test['descr'] = _('Session save path'); + $test['type'] = 0; + $test['test'] = session_save_path(); + $test['result'] = true; + + return $test; +} + +function tst_install() +{ + global $path_to_root; + + $test['descr'] = _('Removed install wizard folder'); + $test['type'] = 2; + $test['result'] = !is_dir($path_to_root.'/install'); + $test['test'] = _('Not removed'); + $test['comments'] = _('Remove or rename install wizard folder for security reasons.'); + + return $test; +} + +function tst_browser() +{ + $test['descr'] = _('Browser type'); + $test['type'] = 0; + $test['test'] = $_SERVER['HTTP_USER_AGENT']; + $test['result'] = true; + $test['comments'] = _('Any browser is supported'); + + return $test; +} + +function tst_server() +{ + $test['descr'] = _('Http server type'); + $test['test'] = $_SERVER['SERVER_SOFTWARE']; + $test['type'] = 0; + $test['result'] = true; + $test['comments'] = _('Any server is supported'); + + return $test; +} + +function tst_gettext() +{ + $test['descr'] = _('Native gettext'); + $test['test'] = function_exists('gettext') ? _('Yes'): _('No'); + $test['type'] = 1; + $test['result'] = true; + $test['comments'] = _('In case of no gettext support, php emulation is used'); + + return $test; +} + +function tst_debug() +{ + global $go_debug; + $test['descr'] = _('Debugging mode'); + $test['type'] = 0; + $test['test'] = $go_debug ? _("Yes") : _("No"); + $test['result'] = $go_debug != 0; + $test['comments'] = _('To switch debugging on set $go_debug>0 in config.php file'); + + return $test; +} + +function tst_logging() +{ + global $error_logfile; + + $test['descr'] = _('Error logging'); + $test['type'] = 2; + // if error lgging is on, but log file does not exists try write + if ($error_logfile && !is_file($error_logfile)) + { + @fclose(@fopen($error_logfile, 'w')); + } + $test['result'] = @$error_logfile != '' && is_writable($error_logfile); + $test['test'] = @$error_logfile == '' ? _("Disabled") : $error_logfile; + + if (@$error_logfile == '') + $test['comments'] = _('To switch error logging set $error_logging in config.php file'); + else + if (!is_writable($error_logfile)) + $test['comments'] = _('Log file is not writeable'); + + return $test; +} +// +// Installed FA database structure version +// +function tst_dbversion() +{ + global $db_version; + $test['descr'] = _('Current database version'); + $test['type'] = 3; + $test['test'] = get_company_pref('version_id'); + $test['result'] = $test['test'] == $db_version; + $test['comments'] = _('Database structure seems to be not upgraded to current version') + ." ($db_version)"; + + return $test; +} + + +function tst_subdirs($install=false) +{ + global $db_connections; + + $comps = $install ? array('0') : array_keys($db_connections); + + $comp_subdirs = array('images', 'pdf_files', 'backup','js_cache'); + + $test['descr'] = _('Company subdirectories consistency'); + $test['type'] = 3; + $test['test'] = array(company_path().'/*'); + foreach($comp_subdirs as $sub) { + $test['test'][] = company_path().'/*/'.$sub; + } + $test['result'] = true; + + $comp_path = company_path(); + foreach ($comps as $n) { + $path = company_path($n); + if (!is_dir($path) || !is_writable($path) ) { + $test['result'] = false; + $test['comments'][] = sprintf(_("'%s' is not writeable"), $path); + continue; + }; + foreach($comp_subdirs as $sub) { + $spath = $path.'/'.$sub; + if (!is_dir($spath) || !is_writable($spath) ) { + $test['result'] = false; + $test['comments'][] = sprintf(_("'%s' is not writeable"), $spath); + } else { + $dir = opendir($spath); + while (false !== ($fname = readdir($dir))) { + // check only *.js files. Manually installed package can contain other + // non-writable files which are non-crucial for normal operations + if (preg_match('/.*(\.js)/', $fname) && !is_writable("$spath/$fname")) { + $test['result'] = false; + $test['comments'][] = sprintf(_("'%s' is not writeable"), "$spath/$fname"); + } + } + } + } + } + return $test; +} + +function tst_tmpdir() +{ + global $path_to_root; + + $test['descr'] = _('Temporary directory'); + $test['type'] = 3; + $test['test'] = $path_to_root.'/tmp'; + $test['result'] = is_dir($test['test']) && is_writable($test['test']); + $test['comments'][] = sprintf(_("'%s' is not writeable"), $test['test']); + return $test; +} + +function tst_langs($install) +{ + global $installed_languages, $path_to_root; + + $test['descr'] = _('Language configuration consistency'); + $test['type'] = 3; + $test['result'] = true; + $test['comments'] = array(); + + $fname = $path_to_root.'/lang'; + $test['test'] = $fname; + if (!(is_dir($fname) && is_writable($fname))) { + $test['result'] = false; + $test['comments'][] = _("Languages folder should be writeable."); + return $test; + } + + if (!$install) { + $fname = $path_to_root.'/lang/installed_languages.inc'; + $test['test'] = $fname; + if (!(is_file($fname) && is_writable($fname))) { + $test['result'] = false; + $test['comments'][] = _("Languages configuration file should be writeable."); + return $test; + } + } + + $langs = array(); + + foreach ($installed_languages as $lang) { + + if ($lang['code'] == 'C') continue; // no translation (English) + $langs[] = $lang['code']; + + $file = $path_to_root.'/lang/'.$lang['code'].'/LC_MESSAGES/'.$lang['code']; + if (@$lang['version']) + $file .= '-'.$lang['version']; + $file .= function_exists('gettext') ? '.mo' : '.po'; + + if (!is_file($file)) { + $test['result'] = false; + $test['comments'][] = sprintf( _('Missing %s translation file.'), $file); + } + if (!$_SESSION['get_text']->check_support($lang['code'], $lang['encoding'])) + { + $test['result'] = false; + $test['comments'][] = sprintf(_('Missing system locale: %s'), $lang['code'].".".$lang['encoding']); + }; + } + + $test['test'] = $langs; + + return $test; +} + +function tst_config($install) +{ + global $path_to_root; + + $test['descr'] = _('Main config file'); + $test['test'] = $path_to_root.'/config.php'; + if ($install) { + $test['type'] = 3; + $writable = check_write($test['test']); + $test['result'] = $writable==1; + $test['comments'][] = $writable == 0 ? + sprintf(_("Can't write '%s' file. Check FA directory write permissions."), $test['test']) + : sprintf(_("'%s' file exists."), $test['test']); + } else { + $test['type'] = 2; + $test['result'] = is_file($test['test']) && !is_writable($test['test']); + $test['comments'][] = sprintf(_("'%s' file should be read-only"), $test['test']); + } + return $test; +} + +function tst_dbconfig($install) +{ + global $path_to_root; + + $test['descr'] = _('Database auth file'); + $test['test'] = $path_to_root.'/config_db.php'; + + if ($install) { + $test['type'] = 3; + $writable = check_write($test['test']); + $test['result'] = $writable==1; + $test['comments'][] = $writable == 0 ? + sprintf(_("Can't write '%s' file. Check FA directory write permissions."), $test['test']) + : sprintf(_("'%s' file exists."), $test['test']); + } else { + $test['type'] = 2; + $test['result'] = is_file($test['test']) && !is_writable($test['test']); + $test['comments'][] = sprintf(_("'%s' file should be read-only if you do not plan to add or change companies"), $test['test']); + } + return $test; +} + +function tst_extconfig($install) +{ + global $path_to_root, $db_connections; + + $comps = $install ? array('0') : array_keys($db_connections); + + $test['descr'] = _('Extensions system'); + $test['type'] = 3; + $fname = $path_to_root.'/installed_extensions.php'; + $test['test'][] = $fname; + $test['result'] = ($install || is_file($fname)) && check_write($fname); + $test['test'][] = company_path().'/*/installed_extensions.php'; + if (!$test['result']) + $test['comments'][] = sprintf(_("'%s' is not writeable"), $fname); + + foreach ($comps as $n) { + $path = company_path($n); + if (!is_dir($path)) continue; + + $path .= "/installed_extensions.php"; + if ((!$install && !is_file($path)) || !check_write($path) ) { + $test['result'] = false; + $test['comments'][] = sprintf(_("'%s' is not writeable"), $path); + continue; + }; + } + foreach(array('modules', 'modules/_cache', 'themes', 'sql') as $dir) { + $fname = $path_to_root.'/'.$dir; + $test['test'][] = $fname; + $t = is_dir($fname) && is_writable($fname); + if (!$t) + $test['comments'][] = sprintf(_("'%s' is not writeable"), $fname); + $test['result'] &= $t; + } + + if(!$test['result']) + $test['comments'][] = _("Extensions configuration files and directories should be writeable"); + + $themedir = opendir($fname); + while (false !== ($fname = readdir($themedir))) + { + if ($fname!='.' && $fname!='..' && $fname!='CVS' && is_dir($path_to_root.'/themes/'.$fname) + && !in_array($fname, array('aqua', 'cool', 'default'))) + { + $test['test'][] = $fname; + $test['result'] = is_writable($path_to_root.'/themes/'.$fname); + if (!$test['result']) { + $test['comments'][] = + sprintf(_("Non-standard theme directory '%s' is not writable"), $fname); + break; + } + } + } + closedir($themedir); + + $test['test'][] = 'OpenSSL PHP extension'; + if (!extension_loaded('openssl')) { + $test['result'] = false; + $test['comments'][] = _("OpenSSL PHP extension have to be enabled to use extension repository system."); + } elseif (!function_exists('openssl_verify')) { + $test['result'] = false; + $test['comments'][] = _("OpenSSL have to be available on your server to use extension repository system."); + } + return $test; +} + +function display_system_tests($install = false) +{ + global $test_level; + + if ($install) + $system_tests = array('tst_php', 'tst_phpmysql', 'tst_system', 'tst_dbconfig', + 'tst_config', + 'tst_subdirs', 'tst_langs', 'tst_tmpdir', 'tst_sessionpath', 'tst_extconfig' + ); + else + $system_tests = array('tst_mysql', 'tst_php', 'tst_server', 'tst_system', 'tst_browser', + 'tst_gettext', 'tst_debug', 'tst_logging', + 'tst_dbversion', 'tst_subdirs', 'tst_langs', 'tst_tmpdir', 'tst_sessionpath', + 'tst_install', 'tst_dbconfig', 'tst_config', 'tst_extconfig' + ); + + + start_table(TABLESTYLE, "width=80%"); + $th = array(_("Test"), _('Test type'), _("Value"), _("Comments")); + table_header($th); + + $ret = true; + $k = 0; //row colour counter + foreach ($system_tests as $test) + { + alt_table_row_color($k); + $result = $test($install); + if (!$result) continue; + + label_cell($result['descr']); + label_cell($test_level[$result['type']]); + + $res = is_array(@$result['test']) ? implode('
', $result['test']) + : $result['test']; + label_cell($res); + + $comm = is_array(@$result['comments']) ? implode('
', $result['comments']) + : @$result['comments']; + $color = ($result['result'] ? 'green': + ($result['type']==3 ? 'red' : + ($result['type']==2 ? 'orange' : 'green'))); + label_cell("". + ($result['result'] ? _('Ok') : ''.$comm.'').''); + end_row(); + $ret = $ret && (($result['result']!=0) || ($result['type'] < 3)); + } + end_table(); + + return $ret; +} diff --git a/includes/systypes.inc b/includes/systypes.inc index 969960cd..974adfdb 100644 --- a/includes/systypes.inc +++ b/includes/systypes.inc @@ -26,7 +26,7 @@ function get_next_trans_no ($trans_type){ $sql = "SELECT MAX(`$st[2]`) FROM $st[0]"; if ($st[1] != null) - $sql .= " WHERE `$st[1]`=$trans_type"; + $sql .= " WHERE `$st[1]`=".db_escape($trans_type); $result = db_query($sql,"The next transaction number for $trans_type could not be retrieved"); $myrow = db_fetch_row($result); @@ -51,7 +51,7 @@ function get_systype_db_info($type) case ST_CUSTDELIVERY : return array("".TB_PREF."debtor_trans", "type", "trans_no", "reference", "tran_date"); case ST_LOCTRANSFER : return array("".TB_PREF."stock_moves", "type", "trans_no", "reference", "tran_date"); case ST_INVADJUST : return array("".TB_PREF."stock_moves", "type", "trans_no", "reference", "tran_date"); - case ST_PURCHORDER : return array("".TB_PREF."purch_orders", null, "order_no", "reference", "tran_date"); + case ST_PURCHORDER : return array("".TB_PREF."purch_orders", null, "order_no", "reference", "ord_date"); case ST_SUPPINVOICE : return array("".TB_PREF."supp_trans", "type", "trans_no", "reference", "tran_date"); case ST_SUPPCREDIT : return array("".TB_PREF."supp_trans", "type", "trans_no", "reference", "tran_date"); case ST_SUPPAYMENT : return array("".TB_PREF."supp_trans", "type", "trans_no", "reference", "tran_date"); diff --git a/includes/types.inc b/includes/types.inc index c7bb52c2..79ef8be7 100644 --- a/includes/types.inc +++ b/includes/types.inc @@ -47,30 +47,30 @@ define('ST_DIMENSION', 40); define ('ST_STATEMENT', 91); define ('ST_CHEQUE', 92); -$systypes_array = array ( - ST_JOURNAL => _("Journal Entry"), - ST_BANKPAYMENT => _("Bank Payment"), - ST_BANKDEPOSIT => _("Bank Deposit"), - ST_BANKTRANSFER => _("Funds Transfer"), - ST_SALESINVOICE => _("Sales Invoice"), - ST_CUSTCREDIT => _("Customer Credit Note"), - ST_CUSTPAYMENT => _("Customer Payment"), - ST_CUSTDELIVERY => _("Delivery Note"), - ST_LOCTRANSFER => _("Location Transfer"), - ST_INVADJUST => _("Inventory Adjustment"), - ST_PURCHORDER => _("Purchase Order"), - ST_SUPPINVOICE => _("Supplier Invoice"), - ST_SUPPCREDIT => _("Supplier Credit Note"), - ST_SUPPAYMENT => _("Supplier Payment"), - ST_SUPPRECEIVE => _("Purchase Order Delivery"), - ST_WORKORDER => _("Work Order"), - ST_MANUISSUE => _("Work Order Issue"), - ST_MANURECEIVE => _("Work Order Production"), - ST_SALESORDER => _("Sales Order"), - ST_SALESQUOTE => _("Sales Quotation"), - ST_COSTUPDATE => _("Cost Update"), - ST_DIMENSION => _("Dimension") - ); +// document inheritance +$document_child_types = array( + ST_SALESQUOTE => ST_SALESORDER, + ST_SALESORDER => ST_CUSTDELIVERY, + ST_CUSTDELIVERY => ST_SALESINVOICE, + ST_SALESINVOICE => ST_CUSTCREDIT, + + ST_PURCHORDER => ST_SUPPRECEIVE, + ST_SUPPRECEIVE => ST_SUPPINVOICE, + ST_SUPPINVOICE => ST_SUPPCREDIT, +); + +function get_child_type($type) +{ + global $document_child_types; + return isset($document_child_types[$type]) ? $document_child_types[$type] : 0; +} + +function get_parent_type($type) +{ + global $document_child_types; + $child = array_search($type, $document_child_types); + return $child ? $child : 0; +} //---------------------------------------------------------------------------------- // Bank transaction types @@ -80,20 +80,6 @@ define('BT_CHEQUE', 1); define('BT_CREDIT', 2); define('BT_CASH', 3); -$bank_account_types = array ( - BT_TRANSFER => _("Savings Account"), - _("Chequing Account"), - _("Credit Account"), - _("Cash Account") - ); - -$bank_transfer_types = array( - BT_TRANSFER => _("Transfer"), - _("Cheque"), - _("Credit"), - _("Cash") - ); - include_once($path_to_root . "/manufacturing/includes/manufacturing_db.inc"); include_once($path_to_root . "/purchasing/includes/purchasing_db.inc"); include_once($path_to_root . "/sales/includes/sales_db.inc"); @@ -108,14 +94,6 @@ define('PT_SUPPLIER', 3); define('PT_QUICKENTRY', 4); define('PT_DIMESION', 5); -$payment_person_types = array ( - PT_MISC => _("Miscellaneous"), - _("Work Order"), - _("Customer"), - _("Supplier"), - _("Quick Entry") - ); - function payment_person_currency($type, $person_id) { switch ($type) { @@ -177,6 +155,12 @@ function payment_person_has_items($type) { return false; } } +//---------------------------------------------------------------------------------- +// Payment terms categories +// +define('PM_ANY', 0); +define('PM_CASH', 1); +define('PM_CREDIT', 2); //---------------------------------------------------------------------------------- // Manufacturing types @@ -185,20 +169,9 @@ define('WO_ASSEMBLY', 0); define('WO_UNASSEMBLY', 1); define('WO_ADVANCED', 2); -$wo_types_array = array ( - WO_ASSEMBLY => _("Assemble"), - WO_UNASSEMBLY => _("Unassemble"), - WO_ADVANCED => _("Advanced Manufacture") - ); - define('WO_LABOUR', 0); define('WO_OVERHEAD', 1); -$wo_cost_types = array( - WO_LABOUR => _("Labour Cost"), - WO_OVERHEAD => _("Overhead Cost"), -); - //---------------------------------------------------------------------------------- // GL account classes // @@ -210,15 +183,6 @@ define('CL_INCOME', 4); define('CL_COGS', 5); define('CL_EXPENSE', 6); -$class_types = array( - CL_ASSETS => _("Assets"), - CL_LIABILITIES => _("Liabilities"), - CL_EQUITY => _("Equity"), - CL_INCOME => _("Income"), - CL_COGS => _("Cost of Goods Sold"), - CL_EXPENSE => _("Expense"), -); - function get_class_type_convert($ctype) { global $use_oldstyle_convert; @@ -230,34 +194,11 @@ function get_class_type_convert($ctype) //---------------------------------------------------------------------------------- // Quick entry types // -$quick_actions = array( - '=' => _('Remainder'), // post current base amount to GL account - 'a' => _('Amount'), // post amount to GL account - 'a+' => _('Amount, increase base'), // post amount to GL account and increase base - 'a-' => _('Amount, reduce base'), // post amount to GL account and reduce base - '%' => _('% amount of base'), // store acc*amount% to GL account - '%+' => _('% amount of base, increase base'), // ditto & increase base amount - '%-' => _('% amount of base, reduce base'), // ditto & reduce base amount - 'T' => _('Taxes added'), // post taxes calculated on base amount - 'T+' => _('Taxes added, increase base'), // ditto & increase base amount - 'T-' => _('Taxes added, reduce base'), // ditto & reduce base amount - 't' => _('Taxes included'), // post taxes calculated on base amount - 't+' => _('Taxes included, increase base'), // ditto & increase base amount - 't-' => _('Taxes included, reduce base') // ditto & reduce base amount -); - define('QE_PAYMENT', '1'); define('QE_DEPOSIT', '2'); define('QE_JOURNAL', '3'); define('QE_SUPPINV', '4'); -$quick_entry_types = array( - QE_DEPOSIT => _("Bank Deposit"), - QE_PAYMENT => _("Bank Payment"), - QE_JOURNAL => _("Journal Entry"), - QE_SUPPINV => _("Supplier Invoice/Credit") -); - //---------------------------------------------------------------------------------- // Special option values for various list selectors. // @@ -266,23 +207,25 @@ define('ANY_NUMERIC', -1); define('ALL_TEXT', ''); define('ALL_NUMERIC', -1); - //---------------------------------------------------------------------------------- -// Types of stock items -$stock_types = array( - 'M' => _("Manufactured"), - 'B' => _("Purchased"), - 'D' => _("Service") -); +// Special class values for tables (start_table()) +define('TABLESTYLE', 1); +define('TABLESTYLE2', 2); +define('TABLESTYLE_NOBORDER', 3); //---------------------------------------------------------------------------------- define('TAG_ACCOUNT', 1); define('TAG_DIMENSION', 2); -$tag_types = array ( - TAG_ACCOUNT => _("Account"), - TAG_DIMENSION => _("Dimension") -); +//---------------------------------------------------------------------------------- +// Payment term types + +define('PTT_PRE', 1); +define('PTT_CASH', 2); +define('PTT_DAYS', 3); +define('PTT_FOLLOWING', 4); + +include_once($path_to_root . '/includes/sysnames.inc'); ?> \ No newline at end of file diff --git a/includes/ui/allocation_cart.inc b/includes/ui/allocation_cart.inc index ad33e573..d408c80a 100644 --- a/includes/ui/allocation_cart.inc +++ b/includes/ui/allocation_cart.inc @@ -22,7 +22,7 @@ class allocation var $type; var $person_id = ''; var $person_name = ''; - var $person_type; + var $person_type; // true - supplier, otherwise customer var $date_; var $amount = 0; /*Total amount of the transaction in FX */ @@ -38,12 +38,12 @@ class allocation } function add_item($type, $type_no, $date_, $due_date, $amount, $amount_allocated, - $current_allocated) + $current_allocated, $ref) { if ($amount > 0) { $this->allocs[count($this->allocs)] = new allocation_item($type, $type_no, - $date_, $due_date, $amount, $amount_allocated, $current_allocated); + $date_, $due_date, $amount, $amount_allocated, $current_allocated, $ref); return true; } else @@ -53,12 +53,12 @@ class allocation } function update_item($index, $type, $type_no, $date_, $due_date, - $amount, $amount_allocated, $current_allocated) + $amount, $amount_allocated, $current_allocated, $ref) { if ($amount > 0) { $this->allocs[$index] = new allocation_item($type, $type_no, - $date_, $due_date, $amount, $amount_allocated, $current_allocated); + $date_, $due_date, $amount, $amount_allocated, $current_allocated, $ref); return true; } else @@ -68,7 +68,7 @@ class allocation } function add_or_update_item($type, $type_no, $date_, $due_date, - $amount, $amount_allocated, $current_allocated) + $amount, $amount_allocated, $current_allocated, $ref) { for ($i = 0; $i < count($this->allocs); $i++) { @@ -76,16 +76,18 @@ class allocation if (($item->type == $type) && ($item->type_no == $type_no)) { return $this->update_item($i, $type, $type_no, $date_, $due_date, - $amount, $amount_allocated, $current_allocated); + $amount, $amount_allocated, $current_allocated, $ref); } } return $this->add_item($type, $type_no, $date_, $due_date, - $amount, $amount_allocated, $current_allocated); - } + $amount, $amount_allocated, $current_allocated, $ref); + } // // Read payment or credit current/available allocations to cart. // + // FIXME - read all transactions below twice seems to be suboptimal + // function read($type = null, $trans_no = 0) { if ($type == null) { // re-read @@ -129,9 +131,9 @@ class allocation sql2date($myrow["due_date"]), $myrow["Total"], // trans total $myrow["alloc"], // trans total allocated - 0); // this allocation + 0, + $myrow["reference"]); // this allocation } - if ($trans_no == 0) return; // this is new payment /* Now get trans that might have previously been allocated to by this trans @@ -144,14 +146,14 @@ class allocation else $trans_items = get_allocatable_to_cust_transactions($this->person_id, $trans_no, $type); - + while ($myrow = db_fetch($trans_items)) { $this->add_or_update_item ($myrow["type"], $myrow["trans_no"], sql2date($myrow["tran_date"]), sql2date($myrow["due_date"]), $myrow["Total"], - $myrow["alloc"] - $myrow["amt"], $myrow["amt"]); + $myrow["alloc"] - $myrow["amt"], $myrow["amt"], $myrow["reference"]); } } // @@ -188,7 +190,6 @@ class allocation $alloc_item->type_no, $alloc_item->current_allocated); } // Exchange Variations Joe Hunt 2008-09-20 //////////////////// - exchange_variation($this->type, $this->trans_no, $alloc_item->type, $alloc_item->type_no, $this->date_, $alloc_item->current_allocated, @@ -206,7 +207,7 @@ class allocation else update_debtor_trans_allocation($this->type, $this->trans_no, $total_allocated); - + commit_transaction(); } @@ -226,16 +227,19 @@ class allocation_item var $amount_allocated; var $amount; + var $ref; var $current_allocated; function allocation_item ($type, $type_no, $date_, $due_date, $amount, - $amount_allocated, $current_allocated) + $amount_allocated, $current_allocated, $ref) { $this->type = $type; $this->type_no = $type_no; - + + $this->ref = $ref; + $this->date_ = $date_; $this->due_date = $due_date; @@ -249,14 +253,14 @@ class allocation_item function show_allocatable($show_totals) { - global $table_style, $systypes_array; + global $systypes_array; $k = $counter = $total_allocated = 0; if (count($_SESSION['alloc']->allocs)) { - start_table("$table_style width=60%"); - $th = array(_("Transaction Type"), _("#"), _("Date"), _("Due Date"), _("Amount"), + start_table(TABLESTYLE, "width=60%"); + $th = array(_("Transaction Type"), _("#"), _("Ref"), _("Date"), _("Due Date"), _("Amount"), _("Other Allocations"), _("This Allocation"), _("Left to Allocate"),'',''); table_header($th); @@ -265,6 +269,7 @@ function show_allocatable($show_totals) { alt_table_row_color($k); label_cell($systypes_array[$alloc_item->type]); label_cell(get_trans_view_str($alloc_item->type, $alloc_item->type_no)); + label_cell($alloc_item->ref); label_cell($alloc_item->date_, "align=right"); label_cell($alloc_item->due_date, "align=right"); amount_cell($alloc_item->amount); diff --git a/includes/ui/contacts_view.inc b/includes/ui/contacts_view.inc new file mode 100644 index 00000000..07e3066d --- /dev/null +++ b/includes/ui/contacts_view.inc @@ -0,0 +1,171 @@ +. +***********************************************************************/ +include_once($path_to_root. '/includes/ui/simple_crud_class.inc'); +include_once($path_to_root . "/includes/db/crm_contacts_db.inc"); + +/* + View/Edit class for contacts +*/ +class contacts extends simple_crud { + var $id; + var $entity; + var $sub_class; + var $class; + + function contacts($name, $id, $class, $subclass=null) { + $fields = array('ref','name','name2','address', 'phone', 'phone2','fax', + 'email','lang','notes', 'assgn' =>array('fld'=>'contacts')); + + $this->simple_crud($name, $fields); + $this->class = $class; + $this->subclass = $subclass; + $this->entity = $id; + } + + function list_view() { + br(); + + $contacts = get_crm_persons($this->class, $this->subclass, $this->entity); +// check_value('show_inactive')); + start_table(TABLESTYLE, "width=80%"); + + $th = array(_('Assignment'), _("Reference"), _("Full Name"), _("Phone"), _("Sec Phone"), _("Fax"), + _("email"), '', + " "); + // inactive_control_column($th); + + table_header($th); + $k = 0; + + $last = $myrow = db_fetch($contacts); + while ($last) + { + + if ($myrow['id'] != $last['id']) { + alt_table_row_color($k); + label_cell(implode('
',$description)); + label_cell($last["ref"]); + label_cell($last["name"].' '.$last["name2"]); + label_cell($last["phone"]); + label_cell($last["phone2"]); + label_cell($last["fax"]); + email_cell($last["email"]); + // inactive_control_cell($myrow["id"], $myrow["inactive"], 'crm_contacts', 'id'); + + edit_button_cell("{$this->name}Edit[{$last['id']}]", _("Edit")); + + // delete button removes only category unless this is the last contact for this person + delete_button_cell("{$this->name}Delete[{$last['id']}]", _("Delete")); + end_row(); + $description = array(); + $last = $myrow; + } + + if ($myrow) { + $description[] = $myrow['description']; + $myrow = db_fetch($contacts); + } + } + +//inactive_control_row($th); + end_table(1); + } + + function editor_view() + { + br(); + + start_outer_table(TABLESTYLE); + + table_section(1); + table_section_title(_("Contact data")); + + text_row(_("First Name:"), 'name', @$this->data['name'], 35, 40); + text_row(_("Last Name:"), 'name2', @$this->data['name2'], 35, 40); + text_row(_("Reference:"), 'ref', @$this->data['ref'], 35, 40); + + crm_category_types_list_row(_("Contact active for:"), 'assgn', @$this->data['contacts'], + array('subclass' => @$this->subclass, + 'class' => @$this->class, + 'multi' =>true) + ); + + text_row(_("Phone:"), 'phone', @$this->data['phone'], 32, 30); + text_row(_("Secondary Phone Number:"), 'phone2', @$this->data['phone2'], 32, 30); + text_row(_("Fax Number:"), 'fax', @$this->data['fax'], 32, 30); + email_row(_("E-mail:"), 'email', @$this->data['email'], 35, 55); + + table_section(2); + table_section_title(" "); + textarea_row(_("Address:"), 'address', @$this->data['address'], 30, 4); + languages_list_row( _("Document Language:"), 'lang', @$this->data['lang'], _("Customer default")); + + textarea_row(_("Notes:"), 'notes', @$this->data['notes'], 30, 4); + end_outer_table(1); + } + + function db_insert() { + $dat = $this->data; + return add_crm_person($dat['ref'], $dat['name'], $dat['name2'], $dat['address'], + $dat['phone'], $dat['phone2'], $dat['fax'], $dat['email'], $dat['lang'], + $dat['notes'], $dat['contacts'], $this->entity); + } + + function db_update() { + return update_crm_person($this->selected_id, $_POST['ref'], $_POST['name'], $_POST['name2'], + $_POST['address'], $_POST['phone'], $_POST['phone2'], $_POST['fax'], $_POST['email'], + $_POST['lang'], $_POST['notes'], $_POST['assgn'], $this->entity); + + } + + function insert_check() { + if (strlen($_POST['name']) == 0) { + display_error(_("The contact name cannot be empty.")); + set_focus('name'); + return false; + } + if (strlen($_POST['ref']) == 0) { + display_error(_("Contact reference cannot be empty.")); + set_focus('ref'); + return false; + } + if (count(@$_POST['assgn']) == 0) { + display_error(_("You have to select at least one category.")); + set_focus('assgn'); + return false; + } + return true; + } + + function db_read() { + return get_crm_person($this->selected_id); + } + + function delete_check() { + return true; + } + // + // Delete all contacts for person in current class/entity + // + function db_delete() { + if (delete_crm_contacts($this->selected_id, $this->class, $this->entity)) { + // if this is the last relation - delete contact data + $rels = get_person_contacts($this->selected_id); + if (count($rels)==0) { + return delete_crm_person($this->selected_id); + } + } + return false; + } +} + +?> \ No newline at end of file diff --git a/includes/ui/db_pager_view.inc b/includes/ui/db_pager_view.inc index d941cf90..e8718c63 100644 --- a/includes/ui/db_pager_view.inc +++ b/includes/ui/db_pager_view.inc @@ -40,7 +40,7 @@ function navi_button_cell($name, $value, $enabled=true, $align='left') { // Sql paged table view. Call this function inside form. // function display_db_pager(&$pager) { - global $table_style, $use_popup_windows, $use_date_picker, $path_to_root; + global $use_popup_windows, $use_date_picker, $path_to_root; $pager->select_records(); @@ -61,7 +61,7 @@ function display_db_pager(&$pager) { } } /* show a table of records returned by the sql */ - start_table("$table_style width=$pager->width"); + start_table(TABLESTYLE, "width=$pager->width"); table_header($headers); if($pager->header_fun) { // if set header handler diff --git a/includes/ui/simple_crud_class.inc b/includes/ui/simple_crud_class.inc new file mode 100644 index 00000000..46b9fbfc --- /dev/null +++ b/includes/ui/simple_crud_class.inc @@ -0,0 +1,379 @@ +. +***********************************************************************/ +// +// Template for simple table editors +// +class simple_crud { + var $name; + var $Mode; + var $selected_id; + var $_none = ''; // selector value when no item is selected + var $pre_handlers; // control buttons and related methods called before view display + var $views; + var $data = array(); + var $fields; + var $tool_buttons; + var $options; + var $dec; + // + // + function simple_crud($name, $fields = null) + { + $this->name = $name; + $this->pre_handlers = array( + 'Edit' => '_edit', + 'Delete' => '_delete', + 'NEW' => '_edit', + 'ADD' => '_add', + 'UPDATE' => '_update', + 'RESET' => '_cancel', + 'CLONE' => '_cloning' + ); + $this->views = array( + '' => 'list_view', // default view + 'Edit' => 'editor_view', + 'Delete' => 'list_view', + 'NEW' => 'editor_view', + 'ADD' => 'editor_view', + 'UPDATE' => 'editor_view', + 'RESET' => 'list_view', + 'CLONE' => 'editor_view' + ); + $this->tool_buttons['Edit'] = + array(_('Edit'), _('Edit document line'), ICON_EDIT, ''); + $this->tool_buttons['Delete'] = + array(_('Delete'), _('Remove line from document'), ICON_DELETE, ''); + $this->tool_buttons['UPDATE'] = + array(_('Update'), _('Confirm changes'), ICON_UPDATE, ''); + $this->tool_buttons['RESET'] = + array(_('Cancel'), _('Cancel changes'), ICON_CANCEL, ''); + + $this->fields = $fields; + $this->selected_id = $this->_none; + } + /* + Input/output formatters - convert values between php/user domains. + */ + function _format_input($value, $fmt) + { + switch($fmt) { + case 'stock': + $this->dec = get_qty_dec($value); + return $value; + case 'price': + case 'qty': + case 'number': + return user_numeric($value); + case 'percent': + return user_numeric($value)/100; + case 'text': + case 'date': + default: + return $value; + } + } + + function _format_output($value, $fmt) + { + switch($fmt) { + case 'price': + return price_format($value); + case 'qty': + return number_format2($value, $this->dec); + case 'number': + return number_format2($value); + case 'percent': + return percent_format($value*100); + case 'stock': + $this->dec = get_qty_dec($value); // retrieve dec for use in later qty fields + case 'text': + case 'date': + default: + return $value; + } + } + + function _check_mode() + { + global $Ajax; + + $sel_name = $this->name.'_id'; + + // list controls lookup + foreach (array_keys($this->pre_handlers) as $m) { + if (isset($_POST[$this->name.$m])) { + unset($_POST['_focus']); // focus on first form entry + $Ajax->activate($this->name.'_div'); + $val = @key($_POST[$this->name.$m]); + $this->selected_id = $val!==null ? @quoted_printable_decode($val) : $this->_none; + return $m; + } + } + $mod = get_post($this->name.'Mode', ''); + if ($mod) { + $val = @key($mod); + $this->selected_id = $val!==null ? @quoted_printable_decode($val) : $this->_none; + return $mod[$val]; + } + return ''; + } + + // + // Set record for edition + // + function _edit($mode) + { + if ($this->Mode != $mode) { + if ($this->selected_id != $this->_none) { + $this->data = $this->db_read(); + } + $this->set_posts($this->data); + } + $this->Mode = $mode; + } + // + // Update record after edition + // + function _update($mode) + { + $this->get_posts(); + if ($this->update_check()) { + if ($this->db_update()) { + $this->selected_id = $this->_none; + $this->Mode = ''; + return; + } + } + $this->Mode = $mode; + } + // + // Add new record + // + function _add($mode) + { + $this->get_posts(); + if ($this->insert_check()) { + $this->db_insert(); + $this->_cancel(); + return; + } + $this->Mode = $mode; + } + // + // Delete selected record + // + function _delete() + { + if ($this->delete_check()) + $this->db_delete(); + $this->_cancel(); + } + // + // Return to listing view + // + function _cancel() + { + $this->selected_id = $this->_none; + $this->db_cancel(); + $this->Mode = ''; + } + // + // Clone record for new edition + // + function _cloning() + { + $this->Mode = ''; + $this->_edit('Edit'); + $this->selected_id = $this->_none; + } + /* + Generate form controls + */ + function _bottom_controls() + { + $clone = $this->selected_id != $this->_none; + + $title=false; + $async='both'; + $base=$this->name; + + $cancel = $async; + + if ($async === 'both') { + $async = 'default'; $cancel = 'cancel'; + } + else if ($async === 'default') + $cancel = true; + else if ($async === 'cancel') + $async = true; + echo "
"; + + if ($this->Mode == '' || $this->Mode == 'RESET') + submit("{$base}NEW", _("Add new"), true, $title, $async); + else { + if ($this->Mode == 'NEW' || $this->selected_id==$this->_none) + + submit("{$base}ADD", _("Add"), true, $title, $async); + else { + submit("{$base}UPDATE[{$this->selected_id}]", _("Update"), true, _('Submit changes'), $async); + if ($clone) + submit("{$base}CLONE[{$this->selected_id}]", _("Clone"), true, _('Edit new record with current data'), $async); + } + submit("{$base}RESET", _("Cancel"), true, _('Cancel edition'), $cancel); + } + echo "
"; + } + //=========================================================================== + // Public functions + // + + function tool_button($name, $selected_id=null, $params='') + { + $b = $this->tool_buttons[$name]; + + return "" + .button( "{$this->name}$name" + .($selected_id === null || $selected_id === $this->_none ? '': "[$selected_id]"), + $b[0], $b[1], $b[2], $b[3]).""; + } + + function set_posts() + { + foreach($this->fields as $name => $fmt) { + if (is_int($name)) { + $name = $fmt; + $fmt = array(); + } + $post = isset($fmt['post']) ? $fmt['post'] : $name; + $fld = isset($fmt['fld']) ? $fmt['fld'] : $name; + + $value = $this->selected_id == $this->_none ? @$fmt['dflt'] : + (is_array($this->data) ? $this->data[$fld]: $this->data->$fld); + + $_POST[$post] = $this->_format_output($value, @$fmt['fmt']); + } + } + //-------------------------- + // + // Get editor POST variables. + // + function get_posts() { + foreach ($this->fields as $name => $fmt) { + if (is_int($name)) { + $name = $fmt; + $fmt = array(); + } + $post = isset($fmt['post']) ? $fmt['post'] : $name; + $fld = isset($fmt['fld']) ? $fmt['fld'] : $name; + + $value = $this->_format_input(@$_POST[$post], @$fmt['fmt']); + if (is_array($this->data)) + $this->data[$fld] = $value; + else + $this->data->$fld = $value; + } + } + // Main function - display current CRUD editor content + // + function show() + { + if (!isset($_POST[$this->name.'Mode'])) + $this->set_posts(); + + $Mode = $this->_check_mode(true); + div_start($this->name.'_div'); + + if (array_key_exists($Mode, $this->pre_handlers)) { + $fun = $this->pre_handlers[$Mode]; + $this->$fun($Mode); + } + + if (isset($this->views[$this->Mode])) + $this->{$this->views[$this->Mode]}(); + else + $this->{$this->views['']}(); // default view + + $this->_bottom_controls(); + // this is needed only when we use temporary crud object together with ajax screen updates + hidden($this->name.'Mode'.'['.$this->selected_id.']', $this->Mode); + div_end(); + } + + //=========================================================================== + // Database functions placeholders + + // + // Read record from db for edition + // + function db_read() { + display_notification(__FUNCTION__. ' is not defined...'); + return array(); + } + // + // Update record in db after edition + // + function db_update() + { + $this->db_insert(); + } + // + // Delete record + // + function db_delete() { + display_notification(__FUNCTION__. ' is not defined...'); + } + // + // Insert record + // + function db_insert() + { + display_notification(__FUNCTION__. ' is not defined...'); + } + // + // Cancel edition + // Optional things like focus set. + // + function db_cancel() + { + } + + + function delete_check() { + display_notification(__FUNCTION__. ' is not defined...'); + return true; + } + + function insert_check() { + return true; + } + + function update_check() + { + return $this->insert_check(); + } + + // + // Show database content in pager/table + // + function list_view() { + display_notification(__FUNCTION__. ' is not defined...'); + } + + // + // Show record editor screen content + // + function editor_view() { + display_notification(__FUNCTION__. ' is not defined...'); + } +}; + +?> \ No newline at end of file diff --git a/includes/ui/ui_controls.inc b/includes/ui/ui_controls.inc index a6140df5..d6533f90 100644 --- a/includes/ui/ui_controls.inc +++ b/includes/ui/ui_controls.inc @@ -9,9 +9,27 @@ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the License here . ***********************************************************************/ +/* + Retrieve value of POST variable(s). + For $name passed as array $dflt is not used, + default values can be passed as values with non-numeric keys instead. + If some field have user formatted numeric value, pass float default value to + convert automatically to POSIX. +*/ function get_post($name, $dflt='') { - return ((!isset($_POST[$name]) || $_POST[$name] === '') ? $dflt : $_POST[$name]); + if (is_array($name)) { + $ret = array(); + foreach($name as $key => $dflt) + if (!is_numeric($key)) { + $ret[$key] = is_float($dflt) ? input_num($key, $dflt) : get_post($key, $dflt); + } else { + $ret[$dflt] = get_post($dflt, null); + } + return $ret; + } else + return is_float($dflt) ? input_num($name, $dflt) : + ((!isset($_POST[$name]) || $_POST[$name] === '') ? $dflt : $_POST[$name]); } //--------------------------------------------------------------------------------- @@ -38,12 +56,19 @@ function end_form($breaks=0) if ($breaks) br($breaks); echo "\n"; + echo "\n"; echo "\n"; } -function start_table($extra="", $padding='2', $spacing='0') +function start_table($class=false, $extra="", $padding='2', $spacing='0') { echo "
\n"; @@ -56,11 +81,11 @@ function end_table($breaks=0) br($breaks); } -function start_outer_table($extra="", $padding='2', $spacing='0', $br=false) +function start_outer_table($class=false, $extra="", $padding='2', $spacing='0', $br=false) { if ($br) br(); - start_table($extra, $padding, $spacing); + start_table($class, $extra, $padding, $spacing); echo "\n"; // outer table } @@ -125,14 +150,27 @@ function access_string($label, $clean=false) return $clean ? $label : array($label, $access); } -function hyperlink_back($center=true, $no_menu=true) +function hyperlink_back($center=true, $no_menu=true, $type_no=0, $trans_no=0) { + global $path_to_root; + if ($center) echo "
"; - start_table("width=20%"); + $id = 0; + if ($no_menu && $trans_no != 0) + { + include_once($path_to_root."/admin/db/attachments_db.inc"); + $id = has_attachment($type_no, $trans_no); + } + $width = ($id != 0 ? "30%" : "20%"); + start_table(false, "width=$width"); start_row(); if ($no_menu) + { + if ($id != 0) + echo ""._("View Attachment")."\n"; echo ""._("Print")."\n"; + } echo "".($no_menu ? _("Close") : _("Back"))."\n"; end_row(); end_table(); @@ -180,7 +218,6 @@ function viewer_link($label, $url='', $class='', $id='', $icon=null) } else $preview_str = $label; - return $preview_str; } @@ -200,12 +237,12 @@ function submenu_option($title, $url, $id=null) function submenu_view($title, $type, $number, $id=null) { - display_note(get_trans_view_str($type, $number, $title, false, 'menu_option', $id), 0, 1); + display_note(get_trans_view_str($type, $number, $title, false, 'viewlink', $id), 0, 1); } function submenu_print($title, $type, $number, $id=null, $email=0, $extra=0) { - display_note(print_document_link($number, $title, true, $type, false, 'menu_option', $id, $email, $extra), 0, 1); + display_note(print_document_link($number, $title, true, $type, false, 'printlink', $id, $email, $extra), 0, 1); } //----------------------------------------------------------------------------------- @@ -329,6 +366,55 @@ function div_end() } } +//----------------------------------------------------------------------------- +// Tabbed area: +// $name - prefix for widget internal elements: +// Nth tab submit name: {$name}_N +// div id: _{$name}_div +// sel (hidden) name: _{$name}_sel +// $tabs - array of tabs; string: tab title or array(tab_title, enabled_status) + +function tabbed_content_start($name, $tabs, $dft='') { + global $Ajax; + + $selname = '_'.$name.'_sel'; + $div = '_'.$name.'_div'; + + $sel = find_submit($name.'_', false); + if($sel==null) + $sel = get_post($selname, (string)($dft==='' ? key($tabs) : $dft)); + + if ($sel!==@$_POST[$selname]) + $Ajax->activate($name); + + $_POST[$selname] = $sel; + + div_start($name); + $str = "
    \n"; + foreach($tabs as $tab_no => $tab) { + + $acc = access_string(is_array($tab) ? $tab[0] : $tab); + $disabled = (is_array($tab) && !$tab[1]) ? 'disabled ' : ''; + $str .= ( "
  • " + ."\n" + ."
  • \n" ); + } + + $str .= "
\n"; + $str .= "
\n"; + $str .= "\n"; + $str .= "
\n"; + echo $str; +} + +function tabbed_content_end() { + echo "
"; // content box (don't change to div_end() unless div_start() is used above) + div_end(); // tabs widget +} + /* Table editor interfaces. Key is editor type 0 => url of editor page 1 => hotkey code @@ -467,4 +553,44 @@ function editor_return($vars, $restore_fun='') { } } +function confirm_dialog($submit, $msg) { + if (find_post($submit)) { + display_warning($msg); + br(); + submit_center_first('DialogConfirm', _("Proceed"), '', true); + submit_center_last('DialogCancel', _("Cancel"), '', 'cancel'); + return 0; + } else + return get_post('DialogConfirm', 0); +} + +/* + Block menu/shortcut links during transaction procesing. +*/ +function page_processing($msg = false) +{ + global $Ajax; + + if ($msg === true) + $msg = _('Entered data has not been saved yet.\nDo you want to abandon changes?'); + + $js = "_validate._processing=" . ( + $msg ? '\''.strtr($msg, array("\n"=>'\\n')) . '\';' : 'null;'); + if (in_ajax()) { + $Ajax->addScript(true, $js); + } else + add_js_source($js); +} + +function page_modified($status = true) +{ + global $Ajax; + + $js = "_validate._modified=" . ($status ? 1:0).';'; + if (in_ajax()) { + $Ajax->addScript(true, $js); + } else + add_js_source($js); +} + ?> \ No newline at end of file diff --git a/includes/ui/ui_input.inc b/includes/ui/ui_input.inc index 391cd7fc..1889962d 100644 --- a/includes/ui/ui_input.inc +++ b/includes/ui/ui_input.inc @@ -247,17 +247,24 @@ function submit_return($name, $value, $title=false) } } -function submit_js_confirm($name, $msg) { - add_js_source( - "_validate.$name=function(){ return confirm('" - . strtr($msg, array("\n"=>'\\n')) . "');};"); -}; +function submit_js_confirm($name, $msg, $set = true) { + global $Ajax; + $js = "_validate.$name=".($set ? "function(){ return confirm('" + . strtr($msg, array("\n"=>'\\n')) . "');};" + : 'null;'); + if (in_ajax()) { + $Ajax->addScript(true, $js); + } else + add_js_source($js); +} //----------------------------------------------------------------------------------- function set_icon($icon, $title=false) { global $path_to_root; - return "\n"; + if (basename($icon) === $icon) // standard icons does not contain path separator + $icon = "$path_to_root/themes/".user_theme()."/images/$icon"; + return "\n"; } function button($name, $value, $title=false, $icon=false, $aspect='') @@ -273,16 +280,18 @@ function button($name, $value, $title=false, $icon=false, $aspect='') { if ($value == _("Delete")) // Helper during implementation $icon = ICON_DELETE; - return "\n"; } else return "'=2E',' '=>'=20','='=>'=3D','['=>'=5B'))) + .htmlentities(strtr($name, array('.'=>'=2E', '='=>'=3D',// ' '=>'=20','['=>'=5B' + ))) ."' value='$value'" .($title ? " title='$title'":'') . ($aspect ? " aspect='$aspect'" : '') @@ -370,7 +379,18 @@ function check_row($label, $name, $value=null, $submit_on_change=false, $title=f } //----------------------------------------------------------------------------------- +function radio($label, $name, $value, $selected, $submit_on_change=false) { + + if ($submit_on_change === true) + $submit_on_change = + "JsHttpRequest.request(\"_{$name}_update\", this.form);"; + return "".($label ? $label : ''); +} + +//----------------------------------------------------------------------------------- function labelheader_cell($label, $params="") { echo "$label\n"; @@ -886,4 +906,29 @@ function inactive_control_column(&$th) { $Ajax->activate('_page_body'); } } + +function customer_credit_row($customer, $credit, $parms='') +{ + global $path_to_root; + + label_row( _("Current Credit:"), + "" + . price_format($credit) + ."", $parms); +} + +function supplier_credit_row($supplier, $credit, $parms='') +{ + global $path_to_root; + + label_row( _("Current Credit:"), + "" + . price_format($credit) + ."", $parms); +} + ?> \ No newline at end of file diff --git a/includes/ui/ui_lists.inc b/includes/ui/ui_lists.inc index a0f82fcf..cae9efbc 100644 --- a/includes/ui/ui_lists.inc +++ b/includes/ui/ui_lists.inc @@ -46,9 +46,10 @@ $opts = array( // default options 'sel_hint' => null, 'search_box' => false, // name or true/false 'type' => 0, // type of extended selector: - // 0 - with (optional) visible search box, search by id + // 0 - with (optional) visible search box, search by fragment inside id // 1 - with hidden search box, search by option text - // 2 - TODO reverse: box with hidden selector available via enter; this + // 2 - with (optional) visible search box, search by fragment at the start of id + // 3 - TODO reverse: box with hidden selector available via enter; this // would be convenient for optional ad hoc adding of new item 'search_submit' => true, //search submit button: true/false 'size' => 8, // size and max of box tag @@ -60,7 +61,8 @@ $opts = array( // default options 'disabled' => false, 'box_hint' => null, // box/selectors hints; null = std see below 'category' => false, // category column name or false - 'show_inactive' => false // show inactive records. + 'show_inactive' => false, // show inactive records. + 'editable' => false // false, or length of editable entry field ); // ------ merge options with defaults ---------- if($options != null) @@ -68,12 +70,25 @@ $opts = array( // default options if (!is_array($opts['where'])) $opts['where'] = array($opts['where']); $search_box = $opts['search_box']===true ? '_'.$name.'_edit' : $opts['search_box']; + // select content filtered by search field: $search_submit = $opts['search_submit']===true ? '_'.$name.'_button' : $opts['search_submit']; + // select set by select content field + $search_button = $opts['editable'] ? '_'.$name.'_button' : ($search_box ? $search_submit : false); + $select_submit = $opts['select_submit']; $spec_id = $opts['spec_id']; $spec_option = $opts['spec_option']; - $by_id = ($opts['type'] == 0); - $class = $by_id ? 'combo':'combo2'; + if ($opts['type'] == 0) { + $by_id = true; + $class = 'combo'; + } elseif($opts['type'] == 1) { + $by_id = false; + $class = 'combo2'; + } else { + $by_id = true; + $class = 'combo3'; + } + $disabled = $opts['disabled'] ? "disabled" : ''; $multi = $opts['multi']; @@ -90,16 +105,15 @@ $opts = array( // default options : _('Enter description fragment to search or * for all')) :''; if ($selected_id == null) { - $selected_id = get_post($name, $opts['default']); + $selected_id = get_post($name, (string)$opts['default']); } if(!is_array($selected_id)) - $selected_id = array($selected_id); // code is generalized for multiple selection support + $selected_id = array((string)$selected_id); // code is generalized for multiple selection support $txt = get_post($search_box); $rel = ''; $limit = ''; - - if (isset($_POST['_'.$name.'_update'])) { + if (isset($_POST['_'.$name.'_update'])) { // select list or search box change if ($by_id) $txt = $_POST[$name]; if (!$opts['async']) @@ -107,33 +121,41 @@ $opts = array( // default options else $Ajax->activate($name); } - if ($search_box) { - // search related sql modifications - - $rel = "rel='$search_box'"; // set relation to list - if ($opts['search_submit']) { - if (isset($_POST[$search_submit])) { - $selected_id = array(); // ignore selected_id while search + if (isset($_POST[$search_button])) { if (!$opts['async']) $Ajax->activate('_page_body'); else $Ajax->activate($name); } - if ($txt == '') { - if ($spec_option === false && $selected_id == array()) - $limit = ' LIMIT 1'; - else - $opts['where'][] = $valfield . "='". get_post($name, $spec_id)."'"; - } - else - if ($txt != '*') { + if ($search_box) { + // search related sql modifications - foreach($opts['search'] as $i=> $s) - $opts['search'][$i] = $s . " LIKE '%{$txt}%'"; - $opts['where'][] = '('. implode($opts['search'], ' OR ') . ')'; + $rel = "rel='$search_box'"; // set relation to list + if ($opts['search_submit']) { + if (isset($_POST[$search_button])) { + $selected_id = array(); // ignore selected_id while search + if (!$opts['async']) + $Ajax->activate('_page_body'); + else + $Ajax->activate($name); + } + if ($txt == '') { + if ($spec_option === false && $selected_id == array()) + $limit = ' LIMIT 1'; + else + $opts['where'][] = $valfield . "=". db_escape(get_post($name, $spec_id)); + } + else + if ($txt != '*') { + + foreach($opts['search'] as $i=> $s) + $opts['search'][$i] = $s . " LIKE " + .db_escape(($class=='combo3' ? '' : '%').$txt.'%'); + $opts['where'][] = '('. implode($opts['search'], ' OR ') . ')'; + } } } - } + // sql completion if (count($opts['where'])) { $where = strpos($sql, 'WHERE')==false ? ' WHERE ':' AND '; @@ -158,19 +180,27 @@ $opts = array( // default options $first_id = false; $found = false; $lastcat = null; -//if($name=='stock_id') display_error($sql); + $edit = false; +//if($name=='stock_id') display_notification('
'.print_r($_POST, true).'
'); +//if($name=='curr_default') display_notification($opts['search_submit']); if($result = db_query($sql)) { while ($contact_row = db_fetch($result)) { $value = $contact_row[0]; $descr = $opts['format']==null ? $contact_row[1] : call_user_func($opts['format'], $contact_row); $sel = ''; - if (get_post($search_submit) && ($txt === $value)) { + if (get_post($search_button) && ($txt == $value)) { $selected_id[] = $value; } - if (in_array($value, $selected_id)) { + + if (in_array((string)$value, $selected_id, true)) { $sel = 'selected'; $found = $value; + $edit = $opts['editable'] && $contact_row['editable'] + && (@$_POST[$search_box] == $value) + ? $contact_row[1] : false; // get non-formatted description + if ($edit) + break; // selected field is editable - abandon list construction } // show selected option even if inactive if (!$opts['show_inactive'] && @$contact_row['inactive'] && $sel==='') { @@ -207,24 +237,35 @@ $opts = array( // default options if ($found===false) { $selected_id = array($first_id); } + $_POST[$name] = $multi ? $selected_id : $selected_id[0]; - if ($by_id && $search_box != false) { - $txt = $found; - $Ajax->addUpdate($name, $search_box, $txt ? $txt : ''); - } - $selector = "\n"; + if ($by_id && ($search_box != false || $opts['editable']) ) { + // on first display show selector list + if (isset($_POST[$search_box]) && $opts['editable'] && $edit) { + $selector = "" + ."\n"; + set_focus($name.'_text'); // prevent lost focus + } else if (get_post($search_submit ? $search_submit : "_{$name}_button")) + set_focus($name); // prevent lost focus + if (!$opts['editable']) + $txt = $found; + $Ajax->addUpdate($name, $search_box, $txt ? $txt : ''); + } + $Ajax->addUpdate($name, "_{$name}_sel", $selector); - // because of bug which M$ cannot fix since IE 5.0 - // we must embed whole selector in span tags to enable proper ajax update + // span for select list/input field update $selector = "".$selector."\n"; - if ($select_submit != false) { // if submit on change is used - add select button + // if selectable or editable list is used - add select button + if ($select_submit != false || $search_button) { global $_select_button; // button class selects form reload/ajax selector update $selector .= sprintf($_select_button, $disabled, user_theme(), @@ -232,7 +273,6 @@ $opts = array( // default options '_'.$name.'_update')."\n"; } // ------ make combo ---------- - $edit_entry = ''; if ($search_box != false) { $edit_entry = "\n"; - if ($search_submit != false) { + if ($search_submit != false || $opts['editable']) { global $_search_button; $edit_entry .= sprintf($_search_button, $disabled, user_theme(), (fallback_mode() ? '' : 'display:none;'), - $search_submit)."\n"; + $search_submit ? $search_submit : "_{$name}_button")."\n"; } } default_focus(($search_box && $by_id) ? $search_box : $name); @@ -299,7 +339,7 @@ $opts = array( // default options $selected_id = get_post($name, $opts['default']); } if(!is_array($selected_id)) - $selected_id = array($selected_id); // code is generalized for multiple selection support + $selected_id = array((string)$selected_id); // code is generalized for multiple selection support if (isset($_POST[ '_'.$name.'_update'])) { if (!$opts['async']) @@ -315,7 +355,7 @@ $opts = array( // default options //if($name=='SelectStockFromList') display_error($sql); foreach($items as $value=>$descr) { $sel = ''; - if (in_array((string)$value, $selected_id)) { + if (in_array((string)$value, $selected_id, true)) { $sel = 'selected'; $found = $value; } @@ -326,6 +366,10 @@ $opts = array( // default options $selector .= "\n"; } + if ($first_id!==false) { + $sel = ($found===$first_id) || ($found===false && ($spec_option===false)) ? "selected='selected'" : ''; + $selector = sprintf($first_opt, $sel).$selector; + } // Prepend special option. if ($spec_option !== false) { // if special option used - add it $first_id = $spec_id; @@ -339,7 +383,8 @@ $opts = array( // default options $selected_id = array($first_id); } $_POST[$name] = $multi ? $selected_id : $selected_id[0]; - $selector = "\n"; @@ -477,7 +522,7 @@ function customer_branches_list($customer_id, $name, $selected_id=null, global $all_items; $sql = "SELECT branch_code, branch_ref FROM ".TB_PREF."cust_branch - WHERE debtor_no='" . $customer_id . "' "; + WHERE debtor_no=" . db_escape($customer_id)." "; if ($editkey) set_editor('branch', $name, $editkey); @@ -554,7 +599,6 @@ function currencies_list($name, $selected_id=null, $submit_on_change=false) $sql = "SELECT curr_abrev, currency, inactive FROM ".TB_PREF."currencies"; // default to the company currency - return combo_input($name, $selected_id, $sql, 'curr_abrev', 'currency', array( 'select_submit'=> $submit_on_change, @@ -668,7 +712,7 @@ function stock_items_list($name, $selected_id=null, $all_option=false, { global $all_items; - $sql = "SELECT stock_id, s.description, c.description, s.inactive + $sql = "SELECT stock_id, s.description, c.description, s.inactive, s.editable FROM ".TB_PREF."stock_master s,".TB_PREF."stock_category c WHERE s.category_id=c.category_id"; if ($editkey) @@ -721,7 +765,7 @@ function sales_items_list($name, $selected_id=null, $all_option=false, global $all_items; // all sales codes $sql = "SELECT i.item_code, i.description, c.description, count(*)>1 as kit, - i.inactive + i.inactive, if(count(*)>1, '0', s.editable) as editable FROM ".TB_PREF."stock_master s, ".TB_PREF."item_codes i @@ -751,7 +795,9 @@ function sales_items_list($name, $selected_id=null, $all_option=false, 'size'=>15, 'select_submit'=> $submit_on_change, 'category' => 2, - 'order' => array('c.description','i.item_code') + 'order' => array('c.description','i.item_code'), + 'editable' => 30, + 'max' => 255 ), $opts) ); } @@ -766,7 +812,7 @@ function sales_items_list_cells($label, $name, $selected_id=null, $all_option=fa function sales_kits_list($name, $selected_id=null, $all_option=false, $submit_on_change=false) { return sales_items_list($name, $selected_id, $all_option, $submit_on_change, - 'kits', array('cells'=>false)); + 'kits', array('cells'=>false, 'editable' => false)); } function sales_local_items_list_row($label, $name, $selected_id=null, $all_option=false, $submit_on_change=false) @@ -776,7 +822,7 @@ function sales_local_items_list_row($label, $name, $selected_id=null, $all_optio echo "$label\n"; echo ""; echo sales_items_list($name, $selected_id, $all_option, $submit_on_change, - 'local', array('cells'=>false)); + 'local', array('cells'=>false, 'editable' => false)); echo ""; } //------------------------------------------------------------------------------------ @@ -849,7 +895,9 @@ function stock_purchasable_items_list($name, $selected_id=null, array('where'=>array("mb_flag!= 'M'"), 'show_inactive'=>$all), $editkey); } - +// +// This helper is used in PO/GRN/PI entry and supports editable descriptions. +// function stock_purchasable_items_list_cells($label, $name, $selected_id=null, $all_option=false, $submit_on_change=false, $editkey=false) { @@ -857,9 +905,10 @@ function stock_purchasable_items_list_cells($label, $name, $selected_id=null, echo "$label\n"; echo stock_items_list($name, $selected_id, $all_option, $submit_on_change, array('where'=>array("mb_flag!= 'M'"), + 'editable' => 30, 'cells'=>true), $editkey); } - +/* function stock_purchasable_items_list_row($label, $name, $selected_id=null, $all_option=false, $submit_on_change=false, $editkey=false) { @@ -868,7 +917,7 @@ function stock_purchasable_items_list_row($label, $name, $selected_id=null, $all_option, $submit_on_change, $editkey); echo "\n"; } - +*/ //------------------------------------------------------------------------------------ function stock_item_types_list_row($label, $name, $selected_id=null, $enabled=true) @@ -1362,7 +1411,7 @@ function cash_accounts_list_row($label, $name, $selected_id=null, $submit_on_cha { $sql = "SELECT ".TB_PREF."bank_accounts.id, bank_account_name, bank_curr_code, inactive FROM ".TB_PREF."bank_accounts - WHERE ".TB_PREF."bank_accounts.account_type=3"; + WHERE ".TB_PREF."bank_accounts.account_type=".BT_CASH; if ($label != null) echo "$label\n"; @@ -1399,13 +1448,33 @@ function pos_list_row($label, $name, $selected_id=null, $spec_option=false, $sub } //----------------------------------------------------------------------------------------------- +// Payment type selector for current user. +// +function sale_payment_list($name, $category, $selected_id=null, $submit_on_change=true) +{ + $sql = "SELECT terms_indicator, terms, inactive FROM ".TB_PREF."payment_terms"; + + if ($category == PM_CASH) // only cash + $sql .= " WHERE days_before_due=0 AND day_in_following_month=0"; + if ($category == PM_CREDIT) // only delayed payments + $sql .= " WHERE days_before_due!=0 OR day_in_following_month!=0"; + + return combo_input($name, $selected_id, $sql, 'terms_indicator', 'terms', + array( + 'select_submit'=> $submit_on_change, + 'async' => true + ) ); -function sale_payment_list_cells($label, $name, $selected_id=null, $submit_on_change=false) +} + +function sale_payment_list_cells($label, $name, $category, $selected_id=null, $submit_on_change=true) { if ($label != null) echo "$label\n"; echo ""; - echo yesno_list($name, $selected_id, _('Cash'), _('Delayed'), $submit_on_change); + + echo sale_payment_list($name, $category, $selected_id, $submit_on_change); + echo "\n"; } //----------------------------------------------------------------------------------------------- @@ -1469,7 +1538,7 @@ function stock_categories_list_row($label, $name, $selected_id=null, $spec_opt=f //----------------------------------------------------------------------------------------------- -function gl_account_types_list($name, $selected_id=null, $all_option=false, $all_option_numeric=true) +function gl_account_types_list($name, $selected_id=null, $all_option=false, $all=true) { global $all_items; @@ -1477,28 +1546,27 @@ function gl_account_types_list($name, $selected_id=null, $all_option=false, $all return combo_input($name, $selected_id, $sql, 'id', 'name', array( - 'order' => 'id', + 'format' => '_format_account', + 'order' => array('class_id', 'id', 'parent'), 'spec_option' =>$all_option, - 'spec_id' => $all_option_numeric ? 0 : $all_items + 'spec_id' => $all_items ) ); } -function gl_account_types_list_cells($label, $name, $selected_id=null, $all_option=false, - $all_option_numeric=false) +function gl_account_types_list_cells($label, $name, $selected_id=null, $all_option=false, $all=false) { if ($label != null) echo "$label\n"; echo ""; - echo gl_account_types_list($name, $selected_id, $all_option, $all_option_numeric); + echo gl_account_types_list($name, $selected_id, $all_option, $all); echo "\n"; } -function gl_account_types_list_row($label, $name, $selected_id=null, $all_option=false, - $all_option_numeric=false) +function gl_account_types_list_row($label, $name, $selected_id=null, $all_option=false, $all=false) { echo "$label"; gl_account_types_list_cells(null, $name, $selected_id, $all_option, - $all_option_numeric); + $all); echo "\n"; } @@ -1523,7 +1591,8 @@ function gl_all_accounts_list($name, $selected_id=null, $skip_bank_accounts=fals 'format' => '_format_account', 'spec_option' => $all_option===true ? _("Use Item Sales Accounts") : $all_option, 'spec_id' => '', - 'order' => array('type.id','account_code'), + 'type' => 2, + 'order' => array('type.class_id','type.id','account_code'), 'search_box' => $cells, 'search_submit' => false, 'size' => 12, @@ -1593,30 +1662,31 @@ function yesno_list_row($label, $name, $selected_id=null, $name_yes="", $name_no //------------------------------------------------------------------------------------------------ -function languages_list($name, $selected_id=null) +function languages_list($name, $selected_id=null, $all_option=false) { global $installed_languages; $items = array(); + if ($all_option) + $items[''] = $all_option; foreach ($installed_languages as $lang) $items[$lang['code']] = $lang['name']; - return array_selector($name, $selected_id, $items); } -function languages_list_cells($label, $name, $selected_id=null) +function languages_list_cells($label, $name, $selected_id=null, $all_option=false) { if ($label != null) echo "$label\n"; echo ""; - echo languages_list($name, $selected_id); + echo languages_list($name, $selected_id, $all_option); echo "\n"; } -function languages_list_row($label, $name, $selected_id=null) +function languages_list_row($label, $name, $selected_id=null, $all_option=false) { echo "$label"; - languages_list_cells(null, $name, $selected_id); + languages_list_cells(null, $name, $selected_id, $all_option); echo "\n"; } @@ -1857,6 +1927,25 @@ function supp_allocations_list_cell($name, $selected=null) echo "\n"; } +function supp_transactions_list_cell($name, $selected=null) +{ + global $all_items; + + echo "\n"; + $allocs = array( + $all_items=>_("All Types"), + '6'=>_("GRNs"), + '1'=> _("Invoices"), + '2'=> _("Overdue Invoices"), + '3' => _("Payments"), + '4' => _("Credit Notes"), + '5' => _("Overdue Credit Notes") + ); + + echo array_selector($name, $selected, $allocs); + echo "\n"; +} + function policy_list_cells($label, $name, $selected=null) { if ($label != null) @@ -2151,11 +2240,89 @@ function extset_list($name, $value=null, $submit_on_change=false) $items[] = sprintf(_("Activated for '%s'"), $comp['name']); return array_selector( $name, $value, $items, array( - 'spec_option'=> _("Installed on system"), + 'spec_option'=> _("Available and/or installed"), 'spec_id' => -1, 'select_submit'=> $submit_on_change, 'async' => true )); } +function crm_category_types_list($name, $selected_id=null, $filter=array(), $submit_on_change=true) +{ + + $sql = "SELECT id, name, type, inactive FROM ".TB_PREF."crm_categories"; + + $multi = false; + $groups = false; + $where = array(); + if (@$filter['class']) { + $where[] = 'type='.db_escape($filter['class']); + } else + $groups = 'type'; + if (@$filter['subclass']) $where[] = 'action='.db_escape($filter['subclass']); + if (@$filter['entity']) $where[] = 'entity_id='.db_escape($filter['entity']); + if (@$filter['multi']) { // contact category selector for person + $multi = true; + } + + return combo_input($name, $selected_id, $sql, 'id', 'name', + array( + 'multi' => $multi, + 'height' => $multi ? 5:1, + 'category' => $groups, + 'select_submit'=> $submit_on_change, + 'async' => true, + 'where' => $where + )); +} + +function crm_category_types_list_row($label, $name, $selected_id=null, $filter=array(), $submit_on_change=true) +{ + echo "$label"; + echo crm_category_types_list($name, $selected_id, $filter, $submit_on_change); + echo "\n"; +} + +function payment_type_list_row($label, $name, $selected_id=null, $submit_on_change=false) +{ + global $pterm_types; + + echo "$label"; + echo array_selector($name, $selected_id, $pterm_types, + array( + 'select_submit'=> $submit_on_change + ) ); + echo "\n"; +} + +function coa_list_row($label, $name, $value=null) +{ + global $path_to_root, $installed_extensions; + + $path = $path_to_root.'/sql/'; + $coas = array(); + $sqldir = opendir($path); + while (false !== ($fname = readdir($sqldir))) + { + if (is_file($path.$fname) && substr($fname,-4)=='.sql' && @($fname[2] == '_')) + { + $ext = array_search_value($fname, $installed_extensions, 'sql'); + if ($ext!=null) { + $descr = $ext['name']; + } elseif ($fname == 'en_US-new.sql') { // two standard COAs + $descr = _("Standard new company American COA (4 digit)"); + } elseif ($fname == 'en_US-demo.sql') { + $descr = _("Standard American COA (4 digit) with demo data"); + } else + $descr = $fname; + + $coas[$fname] = $descr; + } + } + ksort($coas); + + echo "$label\n"; + echo array_selector( $name, $value, $coas ); + echo "\n"; +} ?> \ No newline at end of file diff --git a/includes/ui/ui_msgs.inc b/includes/ui/ui_msgs.inc index 8925c030..5c28c893 100644 --- a/includes/ui/ui_msgs.inc +++ b/includes/ui/ui_msgs.inc @@ -11,7 +11,10 @@ ***********************************************************************/ function display_error($msg, $center=true) { - trigger_error($msg, E_USER_ERROR); + global $go_debug; + + $bt = $go_debug>1 ? ('
'.get_backtrace(true)) : ''; + trigger_error($msg.$bt, E_USER_ERROR); } function display_notification($msg, $center=true) @@ -55,7 +58,7 @@ function stock_item_heading($stock_id) { if ($stock_id != "") { - $result = db_query("SELECT description, units FROM ".TB_PREF."stock_master WHERE stock_id='$stock_id'"); + $result = db_query("SELECT description, units FROM ".TB_PREF."stock_master WHERE stock_id=".db_escape($stock_id)); $myrow = db_fetch_row($result); display_heading("$stock_id - $myrow[0]"); diff --git a/includes/ui/ui_view.inc b/includes/ui/ui_view.inc index 111f2d7e..c0e9e8c9 100644 --- a/includes/ui/ui_view.inc +++ b/includes/ui/ui_view.inc @@ -201,6 +201,19 @@ function get_journal_trans_view_str($type, $trans_no, $label="", $icon=false, return viewer_link($label, $viewer, $class, $id, $icon); } +//-------------------------------------------------------------------------------------- + +function get_package_view_str($pkg, $label="", $icon=false, $class='', $id='') +{ + if ($label == "") + { + $label = _("Info"); +// $icon = ICON_GL; + } + return viewer_link($label, "includes/ui/view_package.php?id=$pkg", $class, $id, $icon); +} + + //-------------------------------------------------------------------------------------- function get_trans_view_str($type, $trans_no, $label="", $icon=false, @@ -283,13 +296,12 @@ function exchange_rate_display($from_currency, $to_currency, $date_, $edit_rate= function is_voided_display($type, $id, $label) { - global $table_style; $void_entry = get_voided_entry($type, $id); if ($void_entry == null) return false; - start_table("width=50% $table_style"); + start_table(TABLESTYLE, "width=50%"); echo "$label
"; echo "" . _("Date Voided:") . " " . sql2date($void_entry["date_"]) . "
"; if (strlen($void_entry["memo_"]) > 0) @@ -356,18 +368,18 @@ function view_stock_status_cell($stock_id, $description=null) //-------------------------------------------------------------------------------------- -function display_debit_or_credit_cells($value) +function display_debit_or_credit_cells($value, $bold=false) { $value = round2($value, user_price_dec()); if ($value >= 0) { - amount_cell($value); + amount_cell($value, $bold); label_cell(""); } elseif ($value < 0) { label_cell(""); - amount_cell(abs($value)); + amount_cell(abs($value), $bold); } } @@ -375,15 +387,31 @@ function display_debit_or_credit_cells($value) function display_customer_trans_tax_details($tax_items, $columns) { + global $alternative_tax_include_on_docs, $suppress_tax_rates; + $first = true; while ($tax_item = db_fetch($tax_items)) { $tax = number_format2($tax_item['amount'],user_price_dec()); + if (isset($suppress_tax_rates) && $suppress_tax_rates == 1) + $tax_type_name = $tax_item['tax_type_name']; + else + $tax_type_name = $tax_item['tax_type_name']." (".$tax_item['rate']."%) "; if ($tax_item['included_in_price']) - label_row(_("Included") . " " . $tax_item['tax_type_name'] . " (" . $tax_item['rate'] . "%) " . - _("Amount") . ": $tax", "", "colspan=$columns align=right", "align=right"); + { + if (isset($alternative_tax_include_on_docs) && $alternative_tax_include_on_docs == 1) + { + if ($first) + label_row(_("Total Tax Excluded"), number_format2($tax_item['net_amount'], user_price_dec()), + "colspan=$columns align=right", "align=right"); + label_row($tax_type_name, $tax, "colspan=$columns align=right", "align=right"); + $first = false; + } + else + label_row(_("Included") . " " . $tax_type_name + . ": $tax", "", "colspan=$columns align=right", "align=right"); + } else - label_row($tax_item['tax_type_name'] . " (" . $tax_item['rate'] . "%)", - $tax, "colspan=$columns align=right", "align=right"); + label_row($tax_type_name, $tax, "colspan=$columns align=right", "align=right"); } } @@ -395,8 +423,8 @@ function display_supp_trans_tax_details($tax_items, $columns) { $tax = number_format2(abs($tax_item['amount']),user_price_dec()); if ($tax_item['included_in_price']) - label_row(_("Included") . " " . $tax_item['tax_type_name'] . " (" . $tax_item['rate'] . "%) " . - _("Amount") . ": $tax", "colspan=$columns align=right", "align=right"); + label_row(_("Included") . " " . $tax_item['tax_type_name'] . " (" . $tax_item['rate'] . "%) " + . ": $tax", '', "colspan=$columns align=right", "align=right"); else label_row($tax_item['tax_type_name'] . " (" . $tax_item['rate'] . "%)", $tax, "colspan=$columns align=right", "align=right"); @@ -413,8 +441,8 @@ function display_edit_tax_items($taxes, $columns, $tax_included, $leftspan=0) { if ($tax_included) { - label_row(_("Included") . " " . $taxitem['tax_type_name'] . " (" . $taxitem['rate'] . "%) " . - _("Amount:") . " " . number_format2($taxitem['Value'],user_price_dec()), "", "colspan=$columns align=right", "align=right",$leftspan); + label_row(_("Included") . " " . $taxitem['tax_type_name'] . " (" . $taxitem['rate'] . "%) " + . " " . number_format2($taxitem['Value'],user_price_dec()), "", "colspan=$columns align=right", "align=right",$leftspan); } else { @@ -440,14 +468,14 @@ function display_footer_exit() function display_allocations($alloc_result, $total) { - global $table_style, $systypes_array; + global $systypes_array; if (!$alloc_result || db_num_rows($alloc_result) == 0) return; display_heading2(_("Allocations")); - start_table("$table_style width=80%"); + start_table(TABLESTYLE, "width=80%"); $th = array( _("Type"), _("Number"), _("Date"), _("Total Amount"), _("Left to Allocate"), _("This Allocation")); @@ -523,8 +551,27 @@ function display_quick_entries(&$cart, $id, $base, $type, $descr='') if ($type != QE_SUPPINV) // only one quick entry on journal/bank transaction $cart->clear_items(); $qe = get_quick_entry($id); + if ($qe['bal_type'] == 1) + { + if ($qe['base_amount'] == 1.0) // monthly + $begin = begin_month($cart->tran_date); + else + { + if (is_account_balancesheet($qe['base_desc'])) // total + $begin = ""; + else + $begin = begin_fiscalyear(); // from fiscalyear begin + } + $base = get_gl_trans_from_to($begin, $cart->tran_date, $qe['base_desc']); + + } if ($descr != '') $qe['description'] .= ': '.$descr; $result = get_quick_entry_lines($id); + if (db_num_rows($result) == 0) + { + display_error( _("No Quick Entry lines are defined.")); + set_focus('totamount'); + } $totrate = 0; while ($row = db_fetch($result)) { @@ -687,12 +734,11 @@ function _number_to_words($number) function price_in_words($amount, $document=0) { - global $Hooks; // use local price_in_words() if the hook is defined - if (method_exists($Hooks, 'price_in_words')) - { - return $Hooks->price_in_words($amount, $document); - } + $price = hook_price_in_words($amount, $document); + if ($price) + return $price; + // Only usefor Remittance and Receipts as default if (!($document == ST_SUPPAYMENT || $document == ST_CUSTPAYMENT || $document == ST_CHEQUE)) return ""; @@ -780,8 +826,8 @@ function get_js_png_fix() function get_js_date_picker() { - global $comp_path, $go_debug; - $fpath = $comp_path.'/'.user_company().'/js_cache/'.'date_picker.js'; + global $go_debug; + $fpath = company_path().'/js_cache/'.'date_picker.js'; if (!file_exists($fpath) || $go_debug) { @@ -1243,53 +1289,64 @@ if (!function_exists('_vd')) { function _vd($mixed, $title = '', $exit = false) { - // Only the site admin is able to proceed here. $str = (!empty($title) ? ($title .':') : '') .'
';
     	$str .= print_r($mixed, true); //var_dump($mixed);
     	$str .= "
\n"; - display_error('
'.$str.'
'); + display_notification('
'.$str.'
'); if ($exit) exit; } } -function display_backtrace($cond=true, $msg='') { +function _vl($mixed, $title = '', $exit = false) +{ + error_log((!empty($title) ? ($title .':') : '') . var_export($mixed, true)); + if ($exit) + exit; +} +function display_backtrace($cond=true, $msg='') { if ($cond) { if ($msg) $str = "
$msg
\n"; else $str = ''; - $str .= ''; - $trace = debug_backtrace(); - foreach($trace as $trn => $tr) { - if (!$trn) continue; - $str .= ''; } -} + if ($html) $str .= '
'; - $str .= $tr['file'].':'.$tr['line'].': '; - $str .= ''; - if (isset($tr['type'])) { - if($tr['type'] == '::') { - $str .= $tr['class'].'::'; - } else if($tr['type'] == '->') { - $str .= '('.$tr['class'].' Object)'.'->'; - } - } - foreach($tr['args'] as $n=>$a) { - if (is_object($tr['args'][$n])) - $tr['args'][$n] = "(".get_class($tr['args'][$n])." Object)"; - if (is_array($tr['args'][$n])) - $tr['args'][$n] = "(Array[".count($tr['args'][$n])."])"; - else - $tr['args'][$n] = "'".$tr['args'][$n]."'"; + $str .= get_backtrace(true); + display_error($str); + } +} + +function get_backtrace($html = false) +{ + $str = ''; + if ($html) $str .= ''; + $trace = debug_backtrace(); + + foreach($trace as $trn => $tr) { + if (!$trn) continue; + if ($html) $str .= ''; + } - $str .= ''; + foreach($tr['args'] as $n=>$a) { + if (is_object($tr['args'][$n])) + $tr['args'][$n] = "(".get_class($tr['args'][$n])." Object)"; + if (is_array($tr['args'][$n])) + $tr['args'][$n] = "(Array[".count($tr['args'][$n])."])"; + else + $tr['args'][$n] = "'".$tr['args'][$n]."'"; } - - $str .= '
'; + $str .= $tr['file'].':'.$tr['line'].': '; + if ($html) $str .= ''; + if (isset($tr['type'])) { + if($tr['type'] == '::') { + $str .= $tr['class'].'::'; + } else if($tr['type'] == '->') { + $str .= '('.$tr['class'].' Object)'.'->'; } - $str .= $tr['function'].'('. implode(',',$tr['args']).')
'; - display_error($str); + $str .= $tr['function'].'('. implode(',',$tr['args']).')
'; + return $str; +} ?> \ No newline at end of file diff --git a/includes/ui/view_package.php b/includes/ui/view_package.php new file mode 100644 index 00000000..9e68d046 --- /dev/null +++ b/includes/ui/view_package.php @@ -0,0 +1,50 @@ + _('Available version'), + 'Type' => _('Package type'), + 'Name' => _('Package content'), + 'Description' => _('Description'), + 'Author' => _('Author'), + 'Homepage' => _('Home page'), + 'Maintenance' => _('Package maintainer'), + 'InstallPath' => _('Installation path'), + 'Depends' => _('Minimal software versions'), + 'RTLDir' => _('Right to left'), + 'Encoding' => _('Charset encoding') +); + +$pkg = get_package_info($_GET['id'], null, $filter); + +display_heading(sprintf(_("Content information for package '%s'"), $_GET['id'])); +br(); +start_table(TABLESTYLE2, "width=80%"); +$th = array(_("Property"), _("Value")); +table_header($th); + +foreach ($pkg as $field => $value) { + if ($value == '') + continue; + start_row(); + label_cells($field, nl2br(htmlentities(is_array($value) ? implode("\n", $value) :$value)), + "class='tableheader2'"); + end_row(); +} +end_table(1); + +end_page(true); diff --git a/index.php b/index.php index d8fd0542..52bf999d 100644 --- a/index.php +++ b/index.php @@ -10,7 +10,7 @@ See the License here . ***********************************************************************/ $path_to_root="."; - if (!file_exists($path_to_root.'/config.php')) + if (!file_exists($path_to_root.'/config_db.php')) header("Location: ".$path_to_root."/install/index.php"); $page_security = 'SA_OPEN'; diff --git a/install/index.php b/install/index.php index 56924549..e9e0ef59 100644 --- a/install/index.php +++ b/install/index.php @@ -1,352 +1,403 @@ - Copyright (C) 2004-2007, Ryan Djurovich. - The code is released under GPLv3 - modified by FrontAcounting, LLC. + Copyright (C) FrontAccounting, LLC. + Released under the terms of the GNU General Public License, GPL, + as published by the Free Software Foundation, either version 3 + of the License, or (at your option) any later version. + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. + See the License here . ***********************************************************************/ -error_reporting(E_ALL); -ini_set("display_errors", "On"); -// Start a session -if(!defined('SESSION_STARTED')) +$page_security = 'SA_OPEN'; +$path_to_root=".."; + +if (file_exists($path_to_root.'/config_db.php')) + header("Location: $path_to_root/index.php"); + +include($path_to_root . "/install/isession.inc"); + +page(_("FrontAccouting ERP Installation Wizard"), true, false, "", '', false, 'stylesheet.css'); + +include($path_to_root . "/includes/ui.inc"); +include($path_to_root . "/includes/system_tests.inc"); +include($path_to_root . "/admin/db/maintenance_db.inc"); +include($path_to_root . "/includes/packages.inc"); +@include($path_to_root . "/installed_extensions.php"); +//------------------------------------------------------------------------------------------------- + +function subpage_title($txt) { - session_name('ba_session_id'); - session_start(); - define('SESSION_STARTED', true); + global $path_to_root; + + echo '
Logo +
'; + + $page = @$_POST['Page'] ? $_POST['Page'] : 1; + + display_heading( + $page == 6 ? $txt : + _("FrontAccouting ERP Installation Wizard").'
' + . sprintf(_('Step %d: %s'), $page , $txt)); + br(); } -// Check if the page has been reloaded -if(!isset($_GET['sessions_checked']) || $_GET['sessions_checked'] != 'true') +function display_coas() { - // Set session variable - $_SESSION['session_support'] = 'Enabled'; - $_SESSION['message'] = ''; - // Reload page - header('Location: index.php?sessions_checked=true'); - exit(0); + start_table(TABLESTYLE); + $th = array(_("Chart of accounts"), _("Encoding"), _("Description"), _("Install")); + table_header($th); + + $k = 0; + $charts = get_charts_list(); + + foreach($charts as $pkg_name => $coa) + { + $available = @$coa['available']; + $installed = @$coa['version']; + $id = @$coa['local_id']; + + alt_table_row_color($k); + label_cell($coa['name']); + label_cell($coa['encoding']); + label_cell(is_array($coa['Descr']) ? implode('
', $coa['Descr']) : $coa['Descr']); + label_cell($installed ? + _("Installed") : checkbox(null, 'coas['.$coa['package'].']'), "align='center'"); + + end_row(); + } + end_table(1); } -else + +function display_langs() { - // Check if session variable has been saved after reload - if(isset($_SESSION['session_support'])) + start_table(TABLESTYLE); + $th = array(_("Language"), _("Encoding"), _("Description"), _("Install")); + table_header($th); + + $k = 0; + $langs = get_languages_list(); + + foreach($langs as $pkg_name => $lang) { - $session_support = $_SESSION['session_support']; + $available = @$lang['available']; + $installed = @$lang['version']; + $id = @$lang['local_id']; + if (!$available) continue; + + alt_table_row_color($k); + label_cell($lang['name']); + label_cell($lang['encoding']); + label_cell(is_array($lang['Descr']) ? implode('
', $lang['Descr']) : $lang['Descr']); + label_cell($installed ? + _("Installed") : checkbox(null, 'langs['.$lang['package'].']'), "align='center'"); + end_row(); } - else - { - $session_support = 'Disabled'; + end_table(1); +} + +function instlang_list_row($label, $name, $value=null) { + + global $inst_langs; + + $langs = array(); + foreach ($inst_langs as $n => $lang) + $langs[$n] = $lang['name']; + + echo "$label\n" . "\n" + .array_selector($name, $value, $langs, + array( + 'select_submit' => true, + 'async' => true + )) . "\n"; +} + +function install_connect_db() { + + global $db; + + $conn = $_SESSION['inst_set']; + + $db = db_create_db($conn); + if (!$db) { + display_error(_("Cannot connect to database. User or password is invalid or you have no permittions to create database.")); } + return $db; } -$path_to_root = ".."; -//include_once($path_to_root.'/config.php'); -$comp_path = $path_to_root."/company"; -?> - - - -FrontAccounting Installation Wizard - - - - - - - - - -
- FrontAccounting - Installation Wizard -
- -
- - - - - - - - - -
-

Welcome to the FrontAccounting Installation Wizard.

-
- Logo -
-
Error: Seems you have FrontAccounting application already installed.
-After logging as an admin to first installed company you can: -
    -
  • Add more companies using Add/Update Companies under Setup tab;
  • -
  • Upgrade FA version using Upgrade Software under Setup tab.
  • -
- -
Error:
'localhost', + 'dbuser' => 'root', + 'dbpassword' => '', + 'username' => 'admin', + 'tbpref' => '0_', + 'admin' => 'admin', + 'inst_lang' => 'C' + ); + +if (!@$_POST['Tests']) + $_POST['Page'] = 1; // set to start page + +if (isset($_POST['back']) && (@$_POST['Page']>1)) { + if ($_POST['Page'] == 5) + $_POST['Page'] = 2; + else + $_POST['Page']--; +} +elseif (isset($_POST['continue'])) { + $_POST['Page'] = 2; +} +elseif (isset($_POST['db_test'])) { + if (get_post('host')=='') { + display_error(_('Host name cannot be empty.')); + set_focus('host'); + } + elseif ($_POST['dbuser']=='') { + display_error(_('Database user name cannot be empty.')); + set_focus('dbuser'); + } + elseif ($_POST['dbname']=='') { + display_error(_('Database name cannot be empty.')); + set_focus('dbname'); + } + else { + $_SESSION['inst_set'] = array_merge($_SESSION['inst_set'], array( + 'host' => $_POST['host'], + 'dbuser' => $_POST['dbuser'], + 'dbpassword' => $_POST['dbpassword'], + 'dbname' => $_POST['dbname'], + 'tbpref' => $_POST['tbpref'] ? '0_' : '', + 'sel_langs' => check_value('sel_langs'), + 'sel_coas' => check_value('sel_coas'), + )); + if (install_connect_db()) { + $_POST['Page'] = check_value('sel_langs') ? 3 : + (check_value('sel_coas') ? 4 : 5); + } + } + if (!file_exists($path_to_root . "/lang/installed_languages.inc")) { + $installed_languages = array ( + 0 => array ('code' => 'C', 'name' => 'English', 'encoding' => 'iso-8859-1')); + $dflt_lang = 'C'; + write_lang(); + } +} +elseif(get_post('install_langs')) +{ + $ret = true; + if (isset($_POST['langs'])) + foreach($_POST['langs'] as $package => $ok) { + $ret &= install_language($package); + } + if ($ret) { + $_POST['Page'] = $_SESSION['inst_set']['sel_coas'] ? 4 : 5; + } +} +elseif(get_post('install_coas')) +{ + $ret = true; + $next_extension_id = 0; + + if (isset($_POST['coas'])) + foreach($_POST['coas'] as $package => $ok) { + $ret &= install_extension($package); + } + if ($ret) { + @include($path_to_root.'/installed_extensions.php'); + $_POST['Page'] = 5; + } +} +elseif (isset($_POST['set_admin'])) { + // check company settings + if (get_post('name')=='') { + display_error(_('Company name cannot be empty.')); + set_focus('name'); + } + elseif (get_post('admin')=='') { + display_error(_('Company admin name cannot be empty.')); + set_focus('admin'); + } + elseif (get_post('pass')=='') { + display_error(_('Company admin password cannot be empty.')); + set_focus('pass'); + } + elseif (get_post('pass')!=get_post('repass')) { + display_error(_('Company admin passwords differ.')); + unset($_POST['pass'],$_POST['repass']); + set_focus('pass'); + } + else { + + $_SESSION['inst_set'] = array_merge($_SESSION['inst_set'], array( + 'coa' => $_POST['coa'], + 'pass' => $_POST['pass'], + 'name' => $_POST['name'], + 'admin' => $_POST['admin'], + )); + if (do_install()) { + $_POST['Page'] = 6; } - ?> - - - - - Enabled') { ?> - - - - - - - - - - - - - - - - - - - - -

Step 1

Please check the following requirements are met before continuing...
Please note: PHP Session Support may appear disabled if your browser does not support cookies.
PHP Version > 4.1.0 - 4.1) { - ?>YesNo - PHP Session SupportPHP Safe Mode - EnabledDisabled -
Magic Quotes GPC - Enabled'; - } else { - echo 'Disabled'; - } - ?> - Register Globals - Enabled'; - } else { - echo 'Disabled'; - } - ?> -
- - - - - - - - - - - - - - - - -

Step 2

Please check the following files/folders are writeable before continuing...
config_db.phpWriteable'; } elseif(file_exists($path_to_root.'/config_db.php')) { echo 'File Exists'; } else { echo 'Unwriteable'; } ?>modules/Writeable'; } elseif(!file_exists($path_to_root.'/modules/')) { echo 'Directory Not Found'; } else { echo 'Unwriteable'; } ?>
lang/Writeable'; } elseif(!file_exists($path_to_root.'/lang/')) { echo 'Directory Not Found'; } else { echo 'Unwriteable'; } ?>Writeable'; } elseif(!file_exists($comp_path)) { - echo 'Directory Not Found'; } else { echo 'Unwriteable'; } ?>
- - - - - - - - -

Step 3

Please check your path settings...
- Absolute URL: - - - -
- - - - - - - - - -

Step 4

Please specify your operating system information below...
- Server Operating System: - - /> - Linux/Unix based -
- /> - Windows -
-
- /> - -
- (Please note: this is only recommended for testing environments) -
-
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
Please enter your MySQL database server details below...
Host Name: - -  Username: - -
Database Name: - -  Password: - /> -
Table Prefix ( 0_ ): - /> -   - /> - -
      - (Please note: May remove existing tables and data)
Fill database with demo data: - /> -
-
 

Step 5

Please enter the training company name below (you can create your own company later)...
Company Name: - -

Step 6

Please enter your Administrator account details below...
Username: - admin - -  Password: - /> -
Email: - /> -  Re-Password: - /> -

 

- - - - - -
Please note:   - FrontAccounting is released under the - GNU General Public License. By - clicking install, you are accepting the license. -
-
- -
- -
- -
- - - - - -
- - FrontAccounting - is released under the - GNU General Public License - -
- - - \ No newline at end of file + } +} + +if (list_updated('inst_lang')) { + $_SESSION['inst_set']['inst_lang'] = get_post('inst_lang'); + $Ajax->setEncoding($inst_langs[get_post('inst_lang')]['encoding']); + $Ajax->activate('welcome'); +} + +start_form(); + switch(@$_POST['Page']) { + default: +// include ('../install.html'); +// submit_center('continue', _('Continue >>')); +// break; + case '1': + div_start('welcome'); + subpage_title(_('System Diagnostics')); + start_table(); + instlang_list_row(_("Select install wizard language:"), 'inst_lang', + $_SESSION['inst_set']['inst_lang']); + end_table(1); + $_POST['Tests'] = display_system_tests(true); + br(); + if (@$_POST['Tests']) { + display_notification(_('All application preliminary requirements seems to be correct. Please press Continue button below.')); + submit_center('continue', _('Continue >>')); + } else { + display_error(_('Application cannot be installed. Please fix problems listed below in red, and press Refresh button.')); + submit_center('refresh', _('Refresh')); + } + div_end(); + break; + + case '2': + if (!isset($_POST['host'])) { + foreach($_SESSION['inst_set'] as $name => $val) + $_POST[$name] = $val; + } + subpage_title(_('Database Server Settings')); + start_table(TABLESTYLE); + text_row_ex(_("Server Host:"), 'host', 30); + text_row_ex(_("Database User:"), 'dbuser', 30); + text_row_ex(_("Database Password:"), 'dbpassword', 30); + text_row_ex(_("Database Name:"), 'dbname', 30); + yesno_list_row(_("Use '0_' Table Prefix:"), 'tbpref', 1, _('Yes'), _('No'), false); + check_row(_("Install Additional Language Packs from FA Repository:"), 'sel_langs'); + check_row(_("Install Additional COAs from FA Repository:"), 'sel_coas'); + end_table(1); + display_note(_('Use table prefix if you share selected database for more than one FA company.')); + display_note(_("Do not select additional langs nor COAs if you have no working internet connection right now. You can install them later.")); + submit_center_first('back', _('<< Back')); + submit_center_last('db_test', _('Continue >>')); + break; + + case '3': // select langauges + subpage_title(_('User Interface Languages Selection')); + display_langs(); + submit_center_first('back', _('<< Back')); + submit_center_last('install_langs', _('Continue >>')); + break; + + case '4': // select COA + subpage_title(_('Charts of Accounts Selection')); + display_coas(); + submit_center_first('back', _('<< Back')); + submit_center_last('install_coas', _('Continue >>')); + break; + + case '5': + if (!isset($_POST['name'])) { + foreach($_SESSION['inst_set'] as $name => $val) + $_POST[$name] = $val; + set_focus('name'); + } + subpage_title(_('Company Settings')); + start_table(TABLESTYLE); + text_row_ex(_("Company Name:"), 'name', 30); + text_row_ex(_("Admin Login:"), 'admin', 30); + password_row(_("Admin Password:"), 'pass', @$_POST['pass']); + password_row(_("Reenter Password:"), 'repass', @$_POST['repass']); + coa_list_row(_("Select Chart of Accounts:"), 'coa'); + languages_list_row(_("Select Default Language:"), 'lang'); + end_table(1); + submit_center_first('back', _('<< Back')); + submit_center_last('set_admin', _('Continue >>')); + break; + + case '6': // final screen + subpage_title(_('FrontAccounting ERP has been installed successsfully.')); + display_note(_('Please do not forget to remove install wizard folder.')); + session_unset(); + session_destroy(); + hyperlink_no_params($path_to_root.'/index.php', _('Click here to start.')); + break; + + } + + hidden('Tests'); + hidden('Page'); +end_form(1); + +end_page(false, false, true); + +?> diff --git a/install/isession.inc b/install/isession.inc new file mode 100644 index 00000000..314da9d8 --- /dev/null +++ b/install/isession.inc @@ -0,0 +1,134 @@ +. +***********************************************************************/ +function output_html($text) +{ + global $before_box, $Ajax, $messages; + // Fatal errors are not send to error_handler, + // so we must check the output + if ($text && preg_match('/\bFatal error(<.*?>)?:(.*)/i', $text, $m)) { + $Ajax->aCommands = array(); // Don't update page via ajax on errors + $text = preg_replace('/\bFatal error(<.*?>)?:(.*)/i','', $text); + $messages[] = array(E_ERROR, $m[2], null, null); + } + $Ajax->run(); + return in_ajax() ? fmt_errors() : ($before_box.fmt_errors().$text); +} + +//----------------------------------------------------------------------------- +// Removing magic quotes from nested arrays/variables +// +function strip_quotes($data) +{ + if(get_magic_quotes_gpc()) { + if(is_array($data)) { + foreach($data as $k => $v) { + $data[$k] = strip_quotes($data[$k]); + } + } else + return stripslashes($data); + } + return $data; +} + +function check_page_security($page_security) +{ +} +//============================================================================ +if (!isset($path_to_root)) +{ + $path_to_root = "."; +} + +// Prevent register_globals vulnerability +if (isset($_GET['path_to_root']) || isset($_POST['path_to_root'])) + die("Restricted access"); + +include_once($path_to_root . "/includes/errors.inc"); +// collect all error msgs +set_error_handler('error_handler' /*, errtypes */); + +include_once($path_to_root . "/includes/current_user.inc"); +include_once($path_to_root . "/includes/lang/language.php"); +include_once($path_to_root . "/includes/ajax.inc"); +include_once($path_to_root . "/includes/ui/ui_msgs.inc"); +include_once($path_to_root . "/includes/prefs/sysprefs.inc"); + +session_name('FAinstall'); +session_start(); + +// this is to fix the "back-do-you-want-to-refresh" issue - thanx PHPFreaks +header("Cache-control: private"); + +include_once($path_to_root . "/config.default.php"); + +$inst_langs = array( + 'C' => array ( 'name' => 'English', 'code' => 'C', 'encoding' => 'iso-8859-1'), + 'ar_EG' => array ( 'name' => 'Arabic', 'code' => 'ar_EG', 'encoding' => 'utf-8', 'rtl' => true), + 'da_DK' => array ( 'name' => 'Dansk', 'code' => 'da_DK', 'encoding' => 'iso-8859-1'), + 'de_DE' => array ( 'name' => 'Deutsch', 'code' => 'de_DE', 'encoding' => 'iso-8859-1'), + 'el_GR' => array ( 'name' => 'Greek', 'code' => 'el_GR', 'encoding' => 'utf-8'), + 'es_MX' => array ( 'name' => 'Spanish', 'code' => 'es_MX', 'encoding' => 'iso-8859-1'), + 'fr_FR' => array ( 'name' => 'Français', 'code' => 'fr_FR', 'encoding' => 'iso-8859-1'), + 'id_ID' => array ( 'name' => 'Indonesian','code' => 'id_ID', 'encoding' => 'iso-8859-1'), + 'it_IT' => array ( 'name' => 'Italian','code' => 'it_IT', 'encoding' => 'iso-8859-1'), + 'nl_BE' => array ( 'name' => 'Nederlands','code' => 'nl_BE', 'encoding' => 'iso-8859-1'), + 'pl_PL' => array ( 'name' => 'Polski', 'code' => 'pl_PL', 'encoding' => 'iso-8859-2'), + 'pt_BR' => array ( 'name' => 'Português','code' => 'pt_BR', 'encoding' => 'iso-8859-1'), + 'sv_SE' => array ( 'name' => 'Svenska', 'code' => 'sv_SE', 'encoding' => 'iso-8859-1'), + 'zh_CN' => array ( 'name' => 'Chinese Simplifed', 'code' => 'zh_CN', 'encoding' => 'utf-8'), +); + +$Ajax = new Ajax(); + +get_text_init(); + +$i_lang = isset($_POST['inst_lang']) ? $_POST['inst_lang'] : + (isset($_SESSION['inst_set']['inst_lang']) ? $_SESSION['inst_set']['inst_lang'] : 'C'); + +// Page Initialisation +if (!isset($_SESSION['language']) || !method_exists($_SESSION['language'], 'set_language') + || $_SESSION['language']->code != $i_lang) +{ + $l = array_search_value($i_lang, $inst_langs, 'code'); + $_SESSION['language'] = new language($l['name'], $l['code'], $l['encoding'], + isset($l['rtl']) ? 'rtl' : 'ltr'); +} + +$_SESSION['language']->set_language($_SESSION['language']->code); +$_SESSION['get_text']->add_domain( $_SESSION['language']->code, $path_to_root."/install/lang"); + +include_once($path_to_root . "/version.php"); +include_once($path_to_root . "/includes/main.inc"); + +// js/php validation rules container +$Validate = array(); +// bindings for editors +$Editors = array(); +// page help. Currently help for function keys. +$Pagehelp = array(); + +//$Ajax = new Ajax(); + +// intercept all output to destroy it in case of ajax call +register_shutdown_function('end_flush'); +ob_start('output_html',0); + +if (!isset($_SESSION["wa_current_user"])) + $_SESSION["wa_current_user"] = new current_user(); + +$SysPrefs = &$_SESSION['SysPrefs']; + +// POST vars cleanup needed for direct reuse. +// We quote all values later with db_escape() before db update. + $_POST = strip_quotes($_POST); + +?> diff --git a/install/lang/ar_EG/LC_MESSAGES/ar_EG.mo b/install/lang/ar_EG/LC_MESSAGES/ar_EG.mo new file mode 100644 index 0000000000000000000000000000000000000000..d5bf4b831a331573b5cf93ddfb573020eb8c2f8a GIT binary patch literal 11720 zcmb`M3yfUVdB-maB*BCvg#u|y)5F8K4eYYUIGDvanDqh%KNjyoVkm{XGk15Vo}D|H zJ7cqv8hLH69}AV5NK}zRl~QB8EM6O9j3Jd;MO1226{!zZz0*jMTB%jlszq(3s0gL$ z?|;s@cOD)uR@=d6|Mzju_kHJkpUaP~y7YyB-xT9|#;<-n2%ZC9`~-ja{mG|-;Ag-e zfWHX-5PSsu0K5hqzB~v%2|fva8Z3aH1*>2P?gc*&{ylgd_#s#TuU_Hi?*Z3ye*nB4 z{64q_{CDs!aOD+_|5Kpki@~1-p9c{kcnQ1`Tm(M{z75_4{s3GB{ww%P;57&*`PYIs zf}>yp?gp6>{4*#ye++&G{47MT0>1$2`D#$lANJ38f?wdi3~m6Q1I71GLCyO&P;`F+ zO3ur9I0Ie<>i&6C+$*1r#;>R=^{#P4=c`(6jG2A>31g1-s=9C!xgU+^A(q~{;`=O2QS^BROhq~Ip- zW8fX2=&S{`&q@D00k?3!8{7`Q3yS~MDD!IYdQkHRK*_n@-`7B<2Hya+pWg!I7vBbD zx4#CppZ^3U?@vJ472jFesT{xTcR0OXD=fSPuOQ7`mK6n{;6~RF01fK`{!0W-^xdeX!<@f)@V(mva zdx3jF(fq5l^EsE zxE}(w{&NJw8t@iSaqtA#4}QZxUjntSzXNXvuV7P~zi$ch_z#2fpKpTlpYMXA z^B(vtn1WvhA4M2F|0eiF@I|m6{9{n-ehi}e;AURRo}0j1!6!iJ?I4J22Hyd3x!?@= zY4AP&{BOZ3_x}M-g9R23gMR@If!E>eun3+6zXQ&JtHB#!E;^&&C%|XGXTVAD5>UF+ z54W>^DPO#t@c<+H!P5H7PVh2@=;?Q-11tZ1T+42^#Jff9f~RkPQ?M z^8M^5f4{@ukcOa-@S}=4BRPrnz5OY{p5$; zKiL@72LlZGvuvUtVH*_f6+Hs@F~&-NpTQ=7@hOn>WAktJZUq(`t6!@{m$V{y7vFqg0Egqe?w7Nfb>d5`tY6;#w^#)cegyISP|Vi;~0)#g%%g(umA>qh5#9 zcvOz}^amR&GiJON?@6MXLB^y}t;V%_RJ1R6xcj{4ZQ>NdiWC6PQYEQ}<#JTaxlWXx zg>%eS5v+{PBdHjk%tiL%Z6>S~y=*(831pn|qV)&&dx7dR)hHMWE34|pD$e9)>^DPG zQDK*PV52FbghD+=BW_MLs!f-Y1a)C$7E8jo8dc1yLR^_BO+H;5@2^f(SD`1}Hfm0_ za*lj{67G&nGK0|5J*H)pESY?bO__dRv7_re(Zn zx>}#Hv@8iXr|O;XV&^3oVqzkywdgF*C25RjmLo`{Po1u%>hgjn^GOezD-t<-}TiRmCRe6;bB^p&^|miYzT%L1W=`JieWt*R|F9R@~2=^ z_P}X5zikC<{%F*NPHuqw#bX53V2e`Ns889%)OyrgZ#jXaUTYNU4cwqT=;h^&>SQe} z5@+~F!SCTb(Hn~N3$TdB87Fjh}6U;nRY*GCHqz?ZX@AhK6s#pJNOus z*uy(U%v6|=z;L2G*O4s?1#)XL(I}S*pw=n{on5rq42a*!d;w0f5JzLMR^lgSbW}@i^8o~(5-&nU8Y_3ei{IMB1L$k4E zDr=yLT0E`vxg)B^NlE#0u-Duzn6(j7&qgR#iCJb9jI+u4MVCq1gFKsSL%%Bzn;ur` z&xs;MTrT3py=TRfuF$uo2v>2phEyIzfSHT9ttt~3Y9*Dk7FH6kMpp^4m%a*=<3d=D z2ALadof&;}OP&+9p?iGXnam$#|DKrX@9UIqH&_6k;b?t3uEV2 zdi9M0Z=@`BTO?{ll8?zwY7o`dNQI@k`lT?jJ%L+X?7arkwyi3fz?EKA7FVXTnmm}j z*%VELjdI;&uAIN*mh>)j>8{{)BtEV8s?x z-#6wnUR)bA*|q#{EDER1`VuANK9YT~T&C?F(IQz2BV9=}^FV$CkwQnSj=u7%CQ3uV&S~y-RwB8J<-=^Z3;Rkn)jI9Wo zbIk+IS>w(Z+#F6%Fir*Oah`X)n@>-q3no39O?n^tge?!F182i|NVq9AqtP?%sm^tnLo$-S?XF>1iWz(>K%8&Hae7 z=nkI#6(Su^7n%p0u=`oUEyAYnAp3mtP@qkuC;2;TXo1tC>6zx7BY29(huzA#^i<9W zvEGK^oEZ#|5jAP+b1*-QBwX~IiC*WR@Q$U-q{Z|cY!@W1W46fqL(I@>q|=5@^7gE5 zn8qzj*vNcypZ2}LL=`68fLa!z|0c4Y z3z`QpW}B_767ZCct%+5aKcQqR0B^FO!Y<8yV!R+lrf0F4+a`=McwfNbsEh6|?)IZyOa_m})-^`|OUtp=FWWCS(UheW4Rr>{?n`BRgT%2$? z(`jj5_LYT}@IA$;qM499iH}KLL^>0>ctvh~-b6icwrw6lWc*OEO{kbVmdvRzQc;+cKG1*Z@V|VsElKL%D`kjA|EXyHeqnzfX@TSQ0-hjI(G1?73KYb7fw zRZr!5r<+Ig(bDSYxER=%SXHia*18GGSDBIDcv8xF$K``r=3BC=o0m7s>6V$_v#ea0 z{P`ZM$W>xqhDX32ysDO;h%lKQ*`Brz?d2(VX35SNx$rh9Ly*oRWnN(`1KNh;5XMp| zSY}6ZKGh=0C^${lrR+2hne-U1jyU_Z3}(&QZIp{t3cNZhf!!mVI<{cT-YfD4il{5o zP6qkZIri#vlJfOzkj23qG$_|DQdvptN-g3@4v{k*BgGw8&9?q26}6?rw!GOj(>GO8 zl2xXYLsOa91iKF>QU|6~> zt?y|1ChI<=q40yYrCTBr2|UyQH`=OIeoCobSIO*V*P#3A-Y|% za~>yfoa`i?bLhgy_{_-*4yQ7u97T@q4vig=+nQwTx2LpKE$ruwpwm6Y#Gc4p_Y-h? zT-4hd_cu|ui^Dv>+sUxUm;I@`mwmG7KIL?o305|ZqX_)w7zaD2l|!&sU~8{kNl7iD z8fxD*w^v^- zAjaAG8N^Q2*08%bAVN{goQ8|u89rd1N;4}Llpb_O(FuhFdK5q@BI6DPJmU^h?pUBq z1y_Htbw^RwJD<^d#P=uEcCzFgG;0gwM@lCR_!irH$AT0l+T>9Y!7+VYaM62=RYI#^Ib%#CB49~ksHI4VbXOqEt_PIat~QeEgTn8PO}G|BY#lct|~ zL3tt0l-wPi$`u#x0~L*PM_1q{Y9l`VxD&Wl%NZF`jxWphu7(MDi^R3fL~p_4 zT*nu7SM04Yh&tQ$xn1e9jp0XhcgwNs{3>rb;&xr!*uOgwpy@96>HLIFKH`>p zgVMar*Ezu;Z|9d%eM6z8^T|aS@-XpaYwI#+)8=7FFS%^uGwo3%dd+@QP@c-a3gi>L zPr*)=6#clviKTR+dC0r7^>te)nscl`&z#A4NIE#E4%j_&MMtl#WpHcG7~KZX_QEo2 StsWVf7kmBxdBOhf81+AZ&w{1^ literal 0 HcmV?d00001 diff --git a/install/lang/ar_EG/LC_MESSAGES/ar_EG.po b/install/lang/ar_EG/LC_MESSAGES/ar_EG.po new file mode 100644 index 00000000..5f646539 --- /dev/null +++ b/install/lang/ar_EG/LC_MESSAGES/ar_EG.po @@ -0,0 +1,464 @@ +# SOME DESCRIPTIVE TITLE. +# Copyright (C) YEAR THE PACKAGE'S COPYRIGHT HOLDER +# This file is distributed under the same license as the PACKAGE package. +# FIRST AUTHOR , YEAR. +# +msgid "" +msgstr "" +"Project-Id-Version: PACKAGE VERSION\n" +"Report-Msgid-Bugs-To: \n" +"POT-Creation-Date: 2010-08-08 12:50+0200\n" +"PO-Revision-Date: 2010-08-13 09:13+0100\n" +"Last-Translator: Translation Team \n" +"Language-Team: infotechaccountants.com \n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=UTF-8\n" +"Content-Transfer-Encoding: 8bit\n" +"X-Poedit-Language: Arabic\n" +"X-Poedit-Country: EGYPT\n" + +#: /var/www/fa2.3/devel/../install/index.php:20 +#: /var/www/fa2.3/devel/../install/index.php:40 +msgid "FrontAccouting ERP Installation Wizard" +msgstr "معالج التثبيت الخاص بالحل المالي لإدارة موارد المؤسسات \"FrontAccounting\"" + +#: /var/www/fa2.3/devel/../install/index.php:41 +#, php-format +msgid "Step %d: %s" +msgstr "الخطوة %d: %s " + +#: /var/www/fa2.3/devel/../install/index.php:48 +msgid "Chart of accounts" +msgstr "خريطة الحسابات" + +#: /var/www/fa2.3/devel/../install/index.php:48 +#: /var/www/fa2.3/devel/../install/index.php:75 +msgid "Encoding" +msgstr "الترميز" + +#: /var/www/fa2.3/devel/../install/index.php:48 +#: /var/www/fa2.3/devel/../install/index.php:75 +msgid "Description" +msgstr "الوصف" + +#: /var/www/fa2.3/devel/../install/index.php:48 +#: /var/www/fa2.3/devel/../install/index.php:75 +msgid "Install" +msgstr "التثبيت" + +#: /var/www/fa2.3/devel/../install/index.php:65 +#: /var/www/fa2.3/devel/../install/index.php:93 +msgid "Installed" +msgstr "تم تثبيته" + +#: /var/www/fa2.3/devel/../install/index.php:75 +msgid "Language" +msgstr "اللغة" + +#: /var/www/fa2.3/devel/../install/index.php:156 +msgid "Cannot save system configuration file 'config.php'." +msgstr "لا يمكن حفظ ملف التوصيف الخاص بالنظام 'config.php'" + +#: /var/www/fa2.3/devel/../install/index.php:173 +msgid "Cannot open 'config_db.php' configuration file." +msgstr "لا يمكن فتح ملف التوصيف 'config_db.php'" + +#: /var/www/fa2.3/devel/../install/index.php:176 +msgid "Cannot write to the 'config_db.php' configuration file." +msgstr "لا يمكن الكتابة على ملف التوصيف 'config_db.php'" + +#: /var/www/fa2.3/devel/../install/index.php:179 +msgid "Configuration file 'config_db.php' is not writable. Change its permissions so it is, then re-run installation step." +msgstr "ملف التوصيف 'config_db.php' غير قابل للكتابة ، الرجاء تغيير صلاحيات الأستخدام و بعد ذلك أعد تشغيل خطوة التثبيت مرة أخرى" + +#: /var/www/fa2.3/devel/../install/index.php:217 +msgid "Host name cannot be empty." +msgstr "أسم المضيف لا يمكن تركه فارغاً " + +#: /var/www/fa2.3/devel/../install/index.php:221 +msgid "Database user name cannot be empty." +msgstr "أسم مستخدم قاعدة البيانات لا يمكن تركه فارغاً" + +#: /var/www/fa2.3/devel/../install/index.php:225 +msgid "Database name cannot be empty." +msgstr "لا يمكن ترك أسم قاعدة البيانات فارغاً" + +#: /var/www/fa2.3/devel/../install/index.php:277 +msgid "Company name cannot be empty." +msgstr "لا يمكن ترك أسم الشركة فارغاً" + +#: /var/www/fa2.3/devel/../install/index.php:281 +msgid "Company admin name cannot be empty." +msgstr "لا يمكن ترك أسم مدير النظام فارغاً" + +#: /var/www/fa2.3/devel/../install/index.php:285 +msgid "Company admin password cannot be empty." +msgstr "لا يمكن ترك كلمة مرور مدير النظام فارغاً" + +#: /var/www/fa2.3/devel/../install/index.php:289 +msgid "Company admin passwords differ." +msgstr "كلمات مرور مدير النظام مختلفة" + +#: /var/www/fa2.3/devel/../install/index.php:320 +msgid "System Diagnostics" +msgstr "تشخيص النظام" + +#: /var/www/fa2.3/devel/../install/index.php:323 +msgid "Select install wizard language:" +msgstr "أختيار لغة معالج التثبيت" + +#: /var/www/fa2.3/devel/../install/index.php:329 +msgid "All application preliminary requirements seems to be correct. Please press Continue button below." +msgstr "جميع المتطلبات التمهيدية الخاصة بالتطبيق تبدو صحيحة ، الرجاء الضغط على زر الأستمرار في الأسفل" + +#: /var/www/fa2.3/devel/../install/index.php:330 +#: /var/www/fa2.3/devel/../install/index.php:356 +#: /var/www/fa2.3/devel/../install/index.php:363 +#: /var/www/fa2.3/devel/../install/index.php:370 +#: /var/www/fa2.3/devel/../install/index.php:389 +msgid "Continue >>" +msgstr "<< الاستمرار" + +#: /var/www/fa2.3/devel/../install/index.php:332 +msgid "Application cannot be installed. Please fix problems listed below in red, and press Refresh button." +msgstr "لا يمكن تثبيت التطبيق ، الرجاء إصلاح المشاكل الملونة باللون الأحمر و المدرجة بالأسف ثم الضغط على زر التنشيط" + +#: /var/www/fa2.3/devel/../install/index.php:333 +msgid "Refresh" +msgstr "تنشيط" + +#: /var/www/fa2.3/devel/../install/index.php:343 +msgid "Database Server Settings" +msgstr "إعدادات خادم قاعدة البيانات" + +#: /var/www/fa2.3/devel/../install/index.php:345 +msgid "Server Host:" +msgstr "الخادم المستضيف :" + +#: /var/www/fa2.3/devel/../install/index.php:346 +msgid "Database User:" +msgstr "مستخدم قاعدة البيانات:" + +#: /var/www/fa2.3/devel/../install/index.php:347 +msgid "Database Password:" +msgstr "كلمة مرور قاعدة البيانات:" + +#: /var/www/fa2.3/devel/../install/index.php:348 +msgid "Database Name:" +msgstr "أسم قاعدة البيانات:" + +#: /var/www/fa2.3/devel/../install/index.php:349 +msgid "Use '0_' Table Prefix:" +msgstr "استخدام '0_' كبادئة جدول" + +#: /var/www/fa2.3/devel/../install/index.php:349 +#: /var/www/fa2.3/devel/../includes/system_tests.inc:38 +#: /var/www/fa2.3/devel/../includes/system_tests.inc:113 +#: /var/www/fa2.3/devel/../includes/system_tests.inc:126 +msgid "Yes" +msgstr "نعم" + +#: /var/www/fa2.3/devel/../install/index.php:349 +#: /var/www/fa2.3/devel/../includes/system_tests.inc:38 +#: /var/www/fa2.3/devel/../includes/system_tests.inc:113 +#: /var/www/fa2.3/devel/../includes/system_tests.inc:126 +msgid "No" +msgstr "لا" + +#: /var/www/fa2.3/devel/../install/index.php:350 +msgid "Install Additional Language Packs from FA Repository:" +msgstr "تثبيت حزم لغات إضافية من مستودع التطبيق :" + +#: /var/www/fa2.3/devel/../install/index.php:351 +msgid "Install Additional COAs from FA Repository:" +msgstr "تثبيت خرائط حسابات أضافية من مستودع التطبيق :" + +#: /var/www/fa2.3/devel/../install/index.php:353 +msgid "Use table prefix if you share selected database for more than one FA company." +msgstr "أستخدم بادئة جدول إذا كنت تريد أن تحتوي قاعدة البيانات الواحدة على أكثر من شركة واحدة" + +#: /var/www/fa2.3/devel/../install/index.php:354 +msgid "Do not select additional langs nor COAs if you have no working internet connection right now. You can install them later." +msgstr "لا تختار لغات إضافية أو خرائط حسابات إضافية إذا لم يكن لديك الآن توصيلة أنترنت تعمل بكفاءة ، يمكنك أن تثبت اللغات و خرائط الحسابات في وقت لاحق" + +#: /var/www/fa2.3/devel/../install/index.php:355 +#: /var/www/fa2.3/devel/../install/index.php:362 +#: /var/www/fa2.3/devel/../install/index.php:369 +#: /var/www/fa2.3/devel/../install/index.php:388 +msgid "<< Back" +msgstr "للخلف >>" + +#: /var/www/fa2.3/devel/../install/index.php:360 +msgid "User Interface Languages Selection" +msgstr "اختيار لغات واجهة المستخدم" + +#: /var/www/fa2.3/devel/../install/index.php:367 +msgid "Charts of Accounts Selection" +msgstr "أختيار خرائط الحسابات" + +#: /var/www/fa2.3/devel/../install/index.php:379 +msgid "Company Settings" +msgstr "إعدادات الشركة" + +#: /var/www/fa2.3/devel/../install/index.php:381 +msgid "Company Name:" +msgstr "أسم الشركة :" + +#: /var/www/fa2.3/devel/../install/index.php:382 +msgid "Admin Login:" +msgstr "أسم الدخول لمدير النظام :" + +#: /var/www/fa2.3/devel/../install/index.php:383 +msgid "Admin Password:" +msgstr "كلمة مرور مدير النظام :" + +#: /var/www/fa2.3/devel/../install/index.php:384 +msgid "Reenter Password:" +msgstr "إعادة أدخال كلمة المرور :" + +#: /var/www/fa2.3/devel/../install/index.php:385 +msgid "Select Chart of Accounts:" +msgstr "اختيار خريطة الحسابات :" + +#: /var/www/fa2.3/devel/../install/index.php:386 +msgid "Select Default Language:" +msgstr "اختيار اللغة الأفتراضية :" + +#: /var/www/fa2.3/devel/../install/index.php:393 +msgid "FrontAccounting ERP has been installed successsfully." +msgstr "تمت عملية تثبيت FrontAccounting ERP بنجاح" + +#: /var/www/fa2.3/devel/../install/index.php:394 +msgid "Please do not forget to remove install wizard folder." +msgstr "الرجاء لا تنسى أن تزيل مجلد معالج التثبيت" + +#: /var/www/fa2.3/devel/../install/index.php:396 +msgid "Click here to start." +msgstr "الضغط هنا للبدء" + +#: /var/www/fa2.3/devel/../includes/system_tests.inc:15 +msgid "Info" +msgstr "معلومات" + +#: /var/www/fa2.3/devel/../includes/system_tests.inc:16 +msgid "Optional" +msgstr "اختياري" + +#: /var/www/fa2.3/devel/../includes/system_tests.inc:17 +msgid "Recommended" +msgstr "يوصى به" + +#: /var/www/fa2.3/devel/../includes/system_tests.inc:18 +msgid "Required " +msgstr "مطلوب" + +#: /var/www/fa2.3/devel/../includes/system_tests.inc:24 +msgid "MySQL version" +msgstr "إصدار MySQL" + +#: /var/www/fa2.3/devel/../includes/system_tests.inc:28 +msgid "Upgrade MySQL server to version at least 4.1" +msgstr "ترقية خادم MySQL إلى الإصدار 4.1 على الأقل" + +#: /var/www/fa2.3/devel/../includes/system_tests.inc:35 +msgid "PHP MySQL extension" +msgstr "رابط برمجي بين PHP و MySQL" + +#: /var/www/fa2.3/devel/../includes/system_tests.inc:40 +msgid "Your PHP has to have MySQL extension enabled." +msgstr "الـ PHP الخاص بك يجب أن يحتوي على رابط برمجي لـ MySQL مفعل" + +#: /var/www/fa2.3/devel/../includes/system_tests.inc:46 +msgid "PHP version" +msgstr "إصدار PHP" + +#: /var/www/fa2.3/devel/../includes/system_tests.inc:50 +msgid "Upgrade PHP to version at least 4.3.3" +msgstr "ترقية PHP إلى الإصدار رقم 4.3.3 على الأقل" + +#: /var/www/fa2.3/devel/../includes/system_tests.inc:57 +msgid "Server system" +msgstr "نظام الخادم" + +#: /var/www/fa2.3/devel/../includes/system_tests.inc:67 +msgid "Session save path" +msgstr "مسار حفظ جلسة الأستخدام" + +#: /var/www/fa2.3/devel/../includes/system_tests.inc:79 +msgid "Removed install wizard folder" +msgstr "مجلد معالج التثبيت الذي تمت إزالته" + +#: /var/www/fa2.3/devel/../includes/system_tests.inc:82 +msgid "Not removed" +msgstr "لم يتم إزالته" + +#: /var/www/fa2.3/devel/../includes/system_tests.inc:83 +msgid "Remove or rename install wizard folder for security reasons." +msgstr "قم بإزالة أو قم بإعادة تسمية مجلد معالج التثبيت و ذلك لأسباب أمنية" + +#: /var/www/fa2.3/devel/../includes/system_tests.inc:90 +msgid "Browser type" +msgstr "نوع المتصفح" + +#: /var/www/fa2.3/devel/../includes/system_tests.inc:94 +msgid "Any browser is supported" +msgstr "أي مستصفح تم دعمه" + +#: /var/www/fa2.3/devel/../includes/system_tests.inc:101 +msgid "Http server type" +msgstr "نوع خادم Http" + +#: /var/www/fa2.3/devel/../includes/system_tests.inc:105 +msgid "Any server is supported" +msgstr "أي خادم تم دعمه" + +#: /var/www/fa2.3/devel/../includes/system_tests.inc:112 +msgid "Native gettext" +msgstr "جيتيكس الطبيعية" + +#: /var/www/fa2.3/devel/../includes/system_tests.inc:116 +msgid "In case of no gettext support, php emulation is used" +msgstr "في حالة عدم دعم جيتيكس ، فإن محاكي PHP سوف يستخدم " + +#: /var/www/fa2.3/devel/../includes/system_tests.inc:124 +msgid "Debugging mode" +msgstr "بيئة تصحيح الأخطاء" + +#: /var/www/fa2.3/devel/../includes/system_tests.inc:128 +msgid "To switch debugging on set $go_debug>0 in config.php file" +msgstr "لتفعيل بيئة تصحيح الأخطاء يجب أن يتم ضبط $go_debug>0 في الملف config.php" + +#: /var/www/fa2.3/devel/../includes/system_tests.inc:137 +msgid "Error logging" +msgstr "سجل وقائع الأخطاء" + +#: /var/www/fa2.3/devel/../includes/system_tests.inc:145 +msgid "Disabled" +msgstr "غير مفعل" + +#: /var/www/fa2.3/devel/../includes/system_tests.inc:148 +msgid "To switch error logging set $error_logging in config.php file" +msgstr "لتفعيل سجل وقائع الأخطاء يجب أن يتم ضبط $error_logging في ملف config.php" + +#: /var/www/fa2.3/devel/../includes/system_tests.inc:151 +msgid "Log file is not writeable" +msgstr "ملف سجل الوقائع غير قابل للكتابة عليه" + +#: /var/www/fa2.3/devel/../includes/system_tests.inc:161 +msgid "Current database version" +msgstr "إصدار قاعدة البيانات الحالي" + +#: /var/www/fa2.3/devel/../includes/system_tests.inc:165 +msgid "Database structure seems to be not upgraded to current version" +msgstr "يبدو أن هيكل قاعدة البيانات لم تتم ترقيته إلى الإصدار الحالي" + +#: /var/www/fa2.3/devel/../includes/system_tests.inc:180 +msgid "Company subdirectories consistency" +msgstr "اتساق الفهارس الفرعية للشركة" + +#: /var/www/fa2.3/devel/../includes/system_tests.inc:193 +#: /var/www/fa2.3/devel/../includes/system_tests.inc:200 +#: /var/www/fa2.3/devel/../includes/system_tests.inc:208 +#: /var/www/fa2.3/devel/../includes/system_tests.inc:225 +#: /var/www/fa2.3/devel/../includes/system_tests.inc:345 +#, php-format +msgid "'%s' is not writeable" +msgstr "'%s' غير قابل للكتابة عليه" + +#: /var/www/fa2.3/devel/../includes/system_tests.inc:221 +msgid "Temporary directory" +msgstr "الفهرس المؤقت" + +#: /var/www/fa2.3/devel/../includes/system_tests.inc:233 +msgid "Language configuration consistency" +msgstr "اتساق توصيف اللغة" + +#: /var/www/fa2.3/devel/../includes/system_tests.inc:242 +msgid "Languages folder should be writeable." +msgstr "مجلد اللغات يجب أن يكون قابل للكتابة عليه" + +#: /var/www/fa2.3/devel/../includes/system_tests.inc:250 +msgid "Languages configuration file should be writeable." +msgstr "ملف توصيف اللغات يجب أن يكون قابل للكتابة عليه" + +#: /var/www/fa2.3/devel/../includes/system_tests.inc:268 +#, php-format +msgid "Missing %s translation file." +msgstr "ملف الترجمة %s مفقود" + +#: /var/www/fa2.3/devel/../includes/system_tests.inc:273 +#, php-format +msgid "Missing system locale: %s" +msgstr "مسار النظام المفقود : %s" + +#: /var/www/fa2.3/devel/../includes/system_tests.inc:286 +msgid "Main config file" +msgstr "ملف التوصيف الرئيسي" + +#: /var/www/fa2.3/devel/../includes/system_tests.inc:293 +#: /var/www/fa2.3/devel/../includes/system_tests.inc:315 +#, php-format +msgid "Can't write '%s' file. Check FA directory write permissions." +msgstr "لا يمكن الكتابة على الملف '%s' ، قم بفحص صلاحيات الكتابة على مجلد التطبيق" + +#: /var/www/fa2.3/devel/../includes/system_tests.inc:294 +#: /var/www/fa2.3/devel/../includes/system_tests.inc:316 +#, php-format +msgid "'%s' file exists." +msgstr "ملف '%s' موجود" + +#: /var/www/fa2.3/devel/../includes/system_tests.inc:298 +#, php-format +msgid "'%s' file should be read-only" +msgstr "الملف '%s' يجب أن يكون للقراءة فقط " + +#: /var/www/fa2.3/devel/../includes/system_tests.inc:307 +msgid "Database auth file" +msgstr "ملف اعتماد قاعدة البيانات" + +#: /var/www/fa2.3/devel/../includes/system_tests.inc:320 +#, php-format +msgid "'%s' file should be read-only if you do not plan to add or change companies" +msgstr "الملف '%s' يجب أن يكون للقراءة فقط ، إذا كنت تخطط أن تضيف أو تغير الشركات" + +#: /var/www/fa2.3/devel/../includes/system_tests.inc:331 +msgid "Extensions system" +msgstr "نظام الإضافات البرمجية" + +#: /var/www/fa2.3/devel/../includes/system_tests.inc:366 +msgid "Extensions configuration files and directories should be writeable" +msgstr "ملفات توصيف الإضافات البرمجية و المجلدات يجب أن تكون قابلة للكتابة" + +#: /var/www/fa2.3/devel/../includes/system_tests.inc:378 +#, php-format +msgid "Non-standard theme directory '%s' is not writable" +msgstr "مجلد الشكل الغير معياري '%s' يجب أن يكون غير قابل للكتابة" + +#: /var/www/fa2.3/devel/../includes/system_tests.inc:388 +msgid "OpenSSL PHP extension have to be enabled to use extension repository system." +msgstr "نظام الروابط البرمجية OpenSSL لـ PHP يجب أن يكون مفعل لأستخدام مستودع الإضافات البرمجية للنظام" + +#: /var/www/fa2.3/devel/../includes/system_tests.inc:391 +msgid "OpenSSL have to be available on your server to use extension repository system." +msgstr "OpenSSL يجب أن يكون متاح على الخادم حتى يمكنك أستخدام مستودع الإضافات البرمجية للنظام" + +#: /var/www/fa2.3/devel/../includes/system_tests.inc:414 +msgid "Test" +msgstr "اختبار" + +#: /var/www/fa2.3/devel/../includes/system_tests.inc:414 +msgid "Test type" +msgstr "نوع الاختبار" + +#: /var/www/fa2.3/devel/../includes/system_tests.inc:414 +msgid "Value" +msgstr "القيمة" + +#: /var/www/fa2.3/devel/../includes/system_tests.inc:414 +msgid "Comments" +msgstr "الملاحظات" + +#: /var/www/fa2.3/devel/../includes/system_tests.inc:438 +msgid "Ok" +msgstr "موافق" + diff --git a/install/lang/da_DK/LC_MESSAGES/da_DK.mo b/install/lang/da_DK/LC_MESSAGES/da_DK.mo new file mode 100644 index 0000000000000000000000000000000000000000..ed6bda6915de636eb05bae02f1ba8a24cf2c8a42 GIT binary patch literal 9063 zcma)=eT*FEUB{m$rL-@YVP6$MuizH|A%+x4>Tn z{|!6`z5_l0E`Gq69|xZYe*$cS9|DJ<2fhqG1pX)ZAoxSD4c@=67=IN!$@AyH!{Fb8 zkAeRM9tZb-u-N}aQ1m6>&w{UjkYHW|e-iv7@TbAQ1V0A815(`z|Ot zKS1XWcps?eS3q8wuY#w+uYuz8E_e*Q0sb=Bgqc4NUIcZ%A^14>S@6B!Ux4EO-++&T zZ-AQrJrGu#{Y=t+he4hD1b75|9^4Op3H&+mb&#L=7yiWOx6A$?f}-;Qh=U~aG4LMn zD5!OgfjVcm?9adzp0~mC;2WU!zaM7a4?YZP{46LsPnORq$WZf}pw9DUPZY5Yd@G12@1oL7np<{-g&-z#+H->Rf*doðkAnBWoa5jz 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 XJhK4zMGl5CQ5}|6=&X+gasK}gn?pu= literal 0 HcmV?d00001 diff --git a/install/lang/da_DK/LC_MESSAGES/da_DK.po b/install/lang/da_DK/LC_MESSAGES/da_DK.po new file mode 100644 index 00000000..c0bfa7a0 --- /dev/null +++ b/install/lang/da_DK/LC_MESSAGES/da_DK.po @@ -0,0 +1,465 @@ +# Frontaccounting ERP Installer +# Copyright (C) 2010 FrontAccounting LLC +# This file is distributed under the same license as the FrontAccounting package. +# Joe Hunt +# +msgid "" +msgstr "" +"Project-Id-Version: PACKAGE VERSION\n" +"Report-Msgid-Bugs-To: \n" +"POT-Creation-Date: 2010-08-08 12:50+0200\n" +"PO-Revision-Date: 2010-08-08 15:26+0100\n" +"Last-Translator: Translation Team \n" +"Language-Team: LANGUAGE \n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=iso-8859-1\n" +"Content-Transfer-Encoding: 8bit\n" +"X-Poedit-Language: Danish\n" +"X-Poedit-Country: DENMARK\n" +"X-Poedit-SourceCharset: iso-8859-1\n" + +#: /var/www/fa2.3/devel/../install/index.php:20 +#: /var/www/fa2.3/devel/../install/index.php:40 +msgid "FrontAccouting ERP Installation Wizard" +msgstr "FrontAccounting ERP installationswizard" + +#: /var/www/fa2.3/devel/../install/index.php:41 +#, php-format +msgid "Step %d: %s" +msgstr "Trin %d: %s" + +#: /var/www/fa2.3/devel/../install/index.php:48 +msgid "Chart of accounts" +msgstr "Kontoplaner" + +#: /var/www/fa2.3/devel/../install/index.php:48 +#: /var/www/fa2.3/devel/../install/index.php:75 +msgid "Encoding" +msgstr "Kodning" + +#: /var/www/fa2.3/devel/../install/index.php:48 +#: /var/www/fa2.3/devel/../install/index.php:75 +msgid "Description" +msgstr "Beskrivelse" + +#: /var/www/fa2.3/devel/../install/index.php:48 +#: /var/www/fa2.3/devel/../install/index.php:75 +msgid "Install" +msgstr "Installer" + +#: /var/www/fa2.3/devel/../install/index.php:65 +#: /var/www/fa2.3/devel/../install/index.php:93 +msgid "Installed" +msgstr "Installeret" + +#: /var/www/fa2.3/devel/../install/index.php:75 +msgid "Language" +msgstr "Sprog" + +#: /var/www/fa2.3/devel/../install/index.php:156 +msgid "Cannot save system configuration file 'config.php'." +msgstr "Kan ikke gemme system konfigurationsfilen 'config.php'." + +#: /var/www/fa2.3/devel/../install/index.php:173 +msgid "Cannot open 'config_db.php' configuration file." +msgstr "Kan ikk åbnet 'config_db.php' konfigurationsfilen." + +#: /var/www/fa2.3/devel/../install/index.php:176 +msgid "Cannot write to the 'config_db.php' configuration file." +msgstr "Kan ikke skrive til 'config_db.php' konfigurationsfilen." + +#: /var/www/fa2.3/devel/../install/index.php:179 +msgid "Configuration file 'config_db.php' is not writable. Change its permissions so it is, then re-run installation step." +msgstr "Konfigurationsfilen 'config_db.php' er ikke skrivbar. Ändre tilladelsen til det og kör installationenstrinet igen." + +#: /var/www/fa2.3/devel/../install/index.php:217 +msgid "Host name cannot be empty." +msgstr "Host navnet kan ikke være tomt." + +#: /var/www/fa2.3/devel/../install/index.php:221 +msgid "Database user name cannot be empty." +msgstr "Database bruernavnet kan ikke være tomt." + +#: /var/www/fa2.3/devel/../install/index.php:225 +msgid "Database name cannot be empty." +msgstr "Database navnet kan ikke være tomt." + +#: /var/www/fa2.3/devel/../install/index.php:277 +msgid "Company name cannot be empty." +msgstr "Firmanavnet kan ikke være tomt." + +#: /var/www/fa2.3/devel/../install/index.php:281 +msgid "Company admin name cannot be empty." +msgstr "Firma admin navnet kan ikke være tomt." + +#: /var/www/fa2.3/devel/../install/index.php:285 +msgid "Company admin password cannot be empty." +msgstr "Firma admin password kan ikke være tomt." + +#: /var/www/fa2.3/devel/../install/index.php:289 +msgid "Company admin passwords differ." +msgstr "Firma admin password er ikke ens." + +#: /var/www/fa2.3/devel/../install/index.php:320 +msgid "System Diagnostics" +msgstr "System diagnostik." + +#: /var/www/fa2.3/devel/../install/index.php:323 +msgid "Select install wizard language:" +msgstr "Vælg installationswizard sprog:" + +#: /var/www/fa2.3/devel/../install/index.php:329 +msgid "All application preliminary requirements seems to be correct. Please press Continue button below." +msgstr "Alle programmets behov ser ud til at være dækket. Venligst tryk 'Fortsæt' forneden." + +#: /var/www/fa2.3/devel/../install/index.php:330 +#: /var/www/fa2.3/devel/../install/index.php:356 +#: /var/www/fa2.3/devel/../install/index.php:363 +#: /var/www/fa2.3/devel/../install/index.php:370 +#: /var/www/fa2.3/devel/../install/index.php:389 +msgid "Continue >>" +msgstr "Fortsæt >>" + +#: /var/www/fa2.3/devel/../install/index.php:332 +msgid "Application cannot be installed. Please fix problems listed below in red, and press Refresh button." +msgstr "Programmet kan ikke installeres. Venligst ordne problemerne beskrivet forneden i rødt, og tryk 'Genlæs' knappen." + +#: /var/www/fa2.3/devel/../install/index.php:333 +msgid "Refresh" +msgstr "Genlæs" + +#: /var/www/fa2.3/devel/../install/index.php:343 +msgid "Database Server Settings" +msgstr "Databaseserver instillinger" + +#: /var/www/fa2.3/devel/../install/index.php:345 +msgid "Server Host:" +msgstr "Server Host:" + +#: /var/www/fa2.3/devel/../install/index.php:346 +msgid "Database User:" +msgstr "Database bruger:" + +#: /var/www/fa2.3/devel/../install/index.php:347 +msgid "Database Password:" +msgstr "Database password:" + +#: /var/www/fa2.3/devel/../install/index.php:348 +msgid "Database Name:" +msgstr "Database navn:" + +#: /var/www/fa2.3/devel/../install/index.php:349 +msgid "Use '0_' Table Prefix:" +msgstr "Brug '0_' tabel prefi:" + +#: /var/www/fa2.3/devel/../install/index.php:349 +#: /var/www/fa2.3/devel/../includes/system_tests.inc:38 +#: /var/www/fa2.3/devel/../includes/system_tests.inc:113 +#: /var/www/fa2.3/devel/../includes/system_tests.inc:126 +msgid "Yes" +msgstr "Ja" + +#: /var/www/fa2.3/devel/../install/index.php:349 +#: /var/www/fa2.3/devel/../includes/system_tests.inc:38 +#: /var/www/fa2.3/devel/../includes/system_tests.inc:113 +#: /var/www/fa2.3/devel/../includes/system_tests.inc:126 +msgid "No" +msgstr "Nej" + +#: /var/www/fa2.3/devel/../install/index.php:350 +msgid "Install Additional Language Packs from FA Repository:" +msgstr "Installer yderligere sprogpakker fra FA's lager (Repository): " + +#: /var/www/fa2.3/devel/../install/index.php:351 +msgid "Install Additional COAs from FA Repository:" +msgstr "Installer yderligere kontoplaner fra FA's lager (Repository):" + +#: /var/www/fa2.3/devel/../install/index.php:353 +msgid "Use table prefix if you share selected database for more than one FA company." +msgstr "Brug tabel prefix hvis du deler databasen med flere FA firmaer." + +#: /var/www/fa2.3/devel/../install/index.php:354 +msgid "Do not select additional langs nor COAs if you have no working internet connection right now. You can install them later." +msgstr "Vælg ikke yderligere sprog eller kontoplaner hvis du ikke har en fungerende internet forbindelse lige nu. Du kan installere dem senere." + +#: /var/www/fa2.3/devel/../install/index.php:355 +#: /var/www/fa2.3/devel/../install/index.php:362 +#: /var/www/fa2.3/devel/../install/index.php:369 +#: /var/www/fa2.3/devel/../install/index.php:388 +msgid "<< Back" +msgstr "<< Tilbage" + +#: /var/www/fa2.3/devel/../install/index.php:360 +msgid "User Interface Languages Selection" +msgstr "Valg af bruger sprog " + +#: /var/www/fa2.3/devel/../install/index.php:367 +msgid "Charts of Accounts Selection" +msgstr "Valg af kontoplaner" + +#: /var/www/fa2.3/devel/../install/index.php:379 +msgid "Company Settings" +msgstr "Firma instillinger" + +#: /var/www/fa2.3/devel/../install/index.php:381 +msgid "Company Name:" +msgstr "Firmanavn:" + +#: /var/www/fa2.3/devel/../install/index.php:382 +msgid "Admin Login:" +msgstr "Admin login:" + +#: /var/www/fa2.3/devel/../install/index.php:383 +msgid "Admin Password:" +msgstr "Admin password:" + +#: /var/www/fa2.3/devel/../install/index.php:384 +msgid "Reenter Password:" +msgstr "Gentag password:" + +#: /var/www/fa2.3/devel/../install/index.php:385 +msgid "Select Chart of Accounts:" +msgstr "Vælg kontoplan:" + +#: /var/www/fa2.3/devel/../install/index.php:386 +msgid "Select Default Language:" +msgstr "Vælg standard sprog:" + +#: /var/www/fa2.3/devel/../install/index.php:393 +msgid "FrontAccounting ERP has been installed successsfully." +msgstr "FrontAccounting ERP er nu installeret." + +#: /var/www/fa2.3/devel/../install/index.php:394 +msgid "Please do not forget to remove install wizard folder." +msgstr "Venligst husk at fjerne installationsmappen." + +#: /var/www/fa2.3/devel/../install/index.php:396 +msgid "Click here to start." +msgstr "Klik her for at starte." + +#: /var/www/fa2.3/devel/../includes/system_tests.inc:15 +msgid "Info" +msgstr "Info" + +#: /var/www/fa2.3/devel/../includes/system_tests.inc:16 +msgid "Optional" +msgstr "Frivillig" + +#: /var/www/fa2.3/devel/../includes/system_tests.inc:17 +msgid "Recommended" +msgstr "Anbefalet" + +#: /var/www/fa2.3/devel/../includes/system_tests.inc:18 +msgid "Required " +msgstr "Nødvendig" + +#: /var/www/fa2.3/devel/../includes/system_tests.inc:24 +msgid "MySQL version" +msgstr "MySQL version" + +#: /var/www/fa2.3/devel/../includes/system_tests.inc:28 +msgid "Upgrade MySQL server to version at least 4.1" +msgstr "Opgrader MySQL server til mindst 4.1" + +#: /var/www/fa2.3/devel/../includes/system_tests.inc:35 +msgid "PHP MySQL extension" +msgstr "PHP MySQL tillæg" + +#: /var/www/fa2.3/devel/../includes/system_tests.inc:40 +msgid "Your PHP has to have MySQL extension enabled." +msgstr "Din PHP må have MySQL tillæg aktiveret." + +#: /var/www/fa2.3/devel/../includes/system_tests.inc:46 +msgid "PHP version" +msgstr "PHP version" + +#: /var/www/fa2.3/devel/../includes/system_tests.inc:50 +msgid "Upgrade PHP to version at least 4.3.3" +msgstr "Opgrader PHP til mindst 4.3.3" + +#: /var/www/fa2.3/devel/../includes/system_tests.inc:57 +msgid "Server system" +msgstr "Server system" + +#: /var/www/fa2.3/devel/../includes/system_tests.inc:67 +msgid "Session save path" +msgstr "Session save Path" + +#: /var/www/fa2.3/devel/../includes/system_tests.inc:79 +msgid "Removed install wizard folder" +msgstr "Fjernet installationswizrd mappen" + +#: /var/www/fa2.3/devel/../includes/system_tests.inc:82 +msgid "Not removed" +msgstr "Ikke fjernet" + +#: /var/www/fa2.3/devel/../includes/system_tests.inc:83 +msgid "Remove or rename install wizard folder for security reasons." +msgstr "Fjern eller omdøb installationswizard mappen for en sikkerheds skyld." + +#: /var/www/fa2.3/devel/../includes/system_tests.inc:90 +msgid "Browser type" +msgstr "Browsertype" + +#: /var/www/fa2.3/devel/../includes/system_tests.inc:94 +msgid "Any browser is supported" +msgstr "Alle broser understøttes" + +#: /var/www/fa2.3/devel/../includes/system_tests.inc:101 +msgid "Http server type" +msgstr "Http server type" + +#: /var/www/fa2.3/devel/../includes/system_tests.inc:105 +msgid "Any server is supported" +msgstr "Alle servers understøttes." + +#: /var/www/fa2.3/devel/../includes/system_tests.inc:112 +msgid "Native gettext" +msgstr "Modersmål (gettext)" + +#: /var/www/fa2.3/devel/../includes/system_tests.inc:116 +msgid "In case of no gettext support, php emulation is used" +msgstr "Hvis ingen gettext støtte, bruges php emulering." + +#: /var/www/fa2.3/devel/../includes/system_tests.inc:124 +msgid "Debugging mode" +msgstr "Debug på" + +#: /var/www/fa2.3/devel/../includes/system_tests.inc:128 +msgid "To switch debugging on set $go_debug>0 in config.php file" +msgstr "For at sætte debug på, søt $go_debug>0 i config.php filen" + +#: /var/www/fa2.3/devel/../includes/system_tests.inc:137 +msgid "Error logging" +msgstr "Fejl log" + +#: /var/www/fa2.3/devel/../includes/system_tests.inc:145 +msgid "Disabled" +msgstr "Afkoblet" + +#: /var/www/fa2.3/devel/../includes/system_tests.inc:148 +msgid "To switch error logging set $error_logging in config.php file" +msgstr "For at sætte fejl log på, sæt $error_logging i config.php filen." + +#: /var/www/fa2.3/devel/../includes/system_tests.inc:151 +msgid "Log file is not writeable" +msgstr "Log filen er ikke skrivbar" + +#: /var/www/fa2.3/devel/../includes/system_tests.inc:161 +msgid "Current database version" +msgstr "Nuværende database version" + +#: /var/www/fa2.3/devel/../includes/system_tests.inc:165 +msgid "Database structure seems to be not upgraded to current version" +msgstr "Database strukturen synes ikke at være opdateret til nuværende version" + +#: /var/www/fa2.3/devel/../includes/system_tests.inc:180 +msgid "Company subdirectories consistency" +msgstr "Firma undermappers konsistens " + +#: /var/www/fa2.3/devel/../includes/system_tests.inc:193 +#: /var/www/fa2.3/devel/../includes/system_tests.inc:200 +#: /var/www/fa2.3/devel/../includes/system_tests.inc:208 +#: /var/www/fa2.3/devel/../includes/system_tests.inc:225 +#: /var/www/fa2.3/devel/../includes/system_tests.inc:345 +#, php-format +msgid "'%s' is not writeable" +msgstr "'%s' er ikke skrivbar" + +#: /var/www/fa2.3/devel/../includes/system_tests.inc:221 +msgid "Temporary directory" +msgstr "Midlertidig mappe (temporary)" + +#: /var/www/fa2.3/devel/../includes/system_tests.inc:233 +msgid "Language configuration consistency" +msgstr "Sprog konfigurations konsistens " + +#: /var/www/fa2.3/devel/../includes/system_tests.inc:242 +msgid "Languages folder should be writeable." +msgstr "Sprogmappe må være skrivbar." + +#: /var/www/fa2.3/devel/../includes/system_tests.inc:250 +msgid "Languages configuration file should be writeable." +msgstr "Sprog konfigurationsfilen må være skrivbar." + +#: /var/www/fa2.3/devel/../includes/system_tests.inc:268 +#, php-format +msgid "Missing %s translation file." +msgstr "%s oversættelsesfilen savnes." + +#: /var/www/fa2.3/devel/../includes/system_tests.inc:273 +#, php-format +msgid "Missing system locale: %s" +msgstr "System lokal: %s savnes" + +#: /var/www/fa2.3/devel/../includes/system_tests.inc:286 +msgid "Main config file" +msgstr "Hoved config fil" + +#: /var/www/fa2.3/devel/../includes/system_tests.inc:293 +#: /var/www/fa2.3/devel/../includes/system_tests.inc:315 +#, php-format +msgid "Can't write '%s' file. Check FA directory write permissions." +msgstr "Kan ikke skabe '%s' filen. Undersøg mappens skrivbarhed." + +#: /var/www/fa2.3/devel/../includes/system_tests.inc:294 +#: /var/www/fa2.3/devel/../includes/system_tests.inc:316 +#, php-format +msgid "'%s' file exists." +msgstr "'%s' filen findes allerede." + +#: /var/www/fa2.3/devel/../includes/system_tests.inc:298 +#, php-format +msgid "'%s' file should be read-only" +msgstr "'%s' filen må være 'read-only'" + +#: /var/www/fa2.3/devel/../includes/system_tests.inc:307 +msgid "Database auth file" +msgstr "Database Auth fil" + +#: /var/www/fa2.3/devel/../includes/system_tests.inc:320 +#, php-format +msgid "'%s' file should be read-only if you do not plan to add or change companies" +msgstr "'%s' filen må være 'read-only' hvis du ikke har planer om at lægge till eller ændre firmaer." + +#: /var/www/fa2.3/devel/../includes/system_tests.inc:331 +msgid "Extensions system" +msgstr "Tillægssystem" + +#: /var/www/fa2.3/devel/../includes/system_tests.inc:366 +msgid "Extensions configuration files and directories should be writeable" +msgstr "Tillægskonfiguration filer og mapper må være skrivbare" + +#: /var/www/fa2.3/devel/../includes/system_tests.inc:378 +#, php-format +msgid "Non-standard theme directory '%s' is not writable" +msgstr "Ikke standard theme mappe '%s' er ikk skrivbar" + +#: /var/www/fa2.3/devel/../includes/system_tests.inc:388 +msgid "OpenSSL PHP extension have to be enabled to use extension repository system." +msgstr "OpenSSL PHP tillæg må være aktiv for at bruge tillægslagersystemet (FA Repository)" + +#: /var/www/fa2.3/devel/../includes/system_tests.inc:391 +msgid "OpenSSL have to be available on your server to use extension repository system." +msgstr "OpenSSL må findes på din server for at bruge tillægslagersystem (FA Repository)" + +#: /var/www/fa2.3/devel/../includes/system_tests.inc:414 +msgid "Test" +msgstr "Test" + +#: /var/www/fa2.3/devel/../includes/system_tests.inc:414 +msgid "Test type" +msgstr "Testtype" + +#: /var/www/fa2.3/devel/../includes/system_tests.inc:414 +msgid "Value" +msgstr "Værdi" + +#: /var/www/fa2.3/devel/../includes/system_tests.inc:414 +msgid "Comments" +msgstr "Kommentarer" + +#: /var/www/fa2.3/devel/../includes/system_tests.inc:438 +msgid "Ok" +msgstr "Ok" + diff --git a/install/lang/de_DE/LC_MESSAGES/de_DE.mo b/install/lang/de_DE/LC_MESSAGES/de_DE.mo new file mode 100644 index 0000000000000000000000000000000000000000..9055e184d6943a5cf5f15d0fa1dc16e2b310f7ea GIT binary patch literal 9720 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 literal 0 HcmV?d00001 diff --git a/install/lang/de_DE/LC_MESSAGES/de_DE.po b/install/lang/de_DE/LC_MESSAGES/de_DE.po new file mode 100644 index 00000000..d23fd13a --- /dev/null +++ b/install/lang/de_DE/LC_MESSAGES/de_DE.po @@ -0,0 +1,462 @@ +# Frontaccounting ERP Installer +# Copyright (C) 2010 FrontAccounting LLC +# This file is distributed under the same license as the FrontAccounting package. +# iscongroup , 2010. +# +msgid "" +msgstr "" +"Project-Id-Version: PACKAGE VERSION\n" +"Report-Msgid-Bugs-To: \n" +"POT-Creation-Date: 2010-08-08 12:50+0200\n" +"PO-Revision-Date: 2010-08-23 17:08+0100\n" +"Last-Translator: iscongroup \n" +"Language-Team: LANGUAGE \n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=ISO-8859-1\n" +"Content-Transfer-Encoding: 8bit\n" + +#: /var/www/fa2.3/devel/../install/index.php:20 +#: /var/www/fa2.3/devel/../install/index.php:40 +msgid "FrontAccouting ERP Installation Wizard" +msgstr "FrontAccouting ERP Installationsassistent" + +#: /var/www/fa2.3/devel/../install/index.php:41 +#, php-format +msgid "Step %d: %s" +msgstr "Schritt %d: %s" + +#: /var/www/fa2.3/devel/../install/index.php:48 +msgid "Chart of accounts" +msgstr "Kontenplan" + +#: /var/www/fa2.3/devel/../install/index.php:48 +#: /var/www/fa2.3/devel/../install/index.php:75 +msgid "Encoding" +msgstr "Kodierung" + +#: /var/www/fa2.3/devel/../install/index.php:48 +#: /var/www/fa2.3/devel/../install/index.php:75 +msgid "Description" +msgstr "Beschreibung" + +#: /var/www/fa2.3/devel/../install/index.php:48 +#: /var/www/fa2.3/devel/../install/index.php:75 +msgid "Install" +msgstr "Installation" + +#: /var/www/fa2.3/devel/../install/index.php:65 +#: /var/www/fa2.3/devel/../install/index.php:93 +msgid "Installed" +msgstr "Installiert" + +#: /var/www/fa2.3/devel/../install/index.php:75 +msgid "Language" +msgstr "Sprache" + +#: /var/www/fa2.3/devel/../install/index.php:156 +msgid "Cannot save system configuration file 'config.php'." +msgstr "Kann die Konfigurationsdatei 'config.php' nicht speichern." + +#: /var/www/fa2.3/devel/../install/index.php:173 +msgid "Cannot open 'config_db.php' configuration file." +msgstr "Kann die Konfigurationsdatei 'config_db.php' nicht öffnen " + +#: /var/www/fa2.3/devel/../install/index.php:176 +msgid "Cannot write to the 'config_db.php' configuration file." +msgstr "Die Konfigurationsdatei 'config_db.php' ist nicht beschreibbar." + +#: /var/www/fa2.3/devel/../install/index.php:179 +msgid "Configuration file 'config_db.php' is not writable. Change its permissions so it is, then re-run installation step." +msgstr "Konfigurationsdatei 'config_db.php' ist nicht beschreibbar. Ändern Sie die Berechtigungen wenn notwendig und wiederholen Sie den Installationsschritt." + +#: /var/www/fa2.3/devel/../install/index.php:217 +msgid "Host name cannot be empty." +msgstr "Host Name kann nicht leer sein." + +#: /var/www/fa2.3/devel/../install/index.php:221 +msgid "Database user name cannot be empty." +msgstr "Datenbank Benutzername darf nicht leer sein." + +#: /var/www/fa2.3/devel/../install/index.php:225 +msgid "Database name cannot be empty." +msgstr "Datenbankname darf nicht leer sein." + +#: /var/www/fa2.3/devel/../install/index.php:277 +msgid "Company name cannot be empty." +msgstr "Firmenname kann nicht leer sein." + +#: /var/www/fa2.3/devel/../install/index.php:281 +msgid "Company admin name cannot be empty." +msgstr "Name des Admins der Firma kann nicht leer sein." + +#: /var/www/fa2.3/devel/../install/index.php:285 +msgid "Company admin password cannot be empty." +msgstr "Passwort des Admins der Firma kann nicht leer sein." + +#: /var/www/fa2.3/devel/../install/index.php:289 +msgid "Company admin passwords differ." +msgstr "Admin Passwörter unterscheiden sich" + +#: /var/www/fa2.3/devel/../install/index.php:320 +msgid "System Diagnostics" +msgstr "System Diagnose" + +#: /var/www/fa2.3/devel/../install/index.php:323 +msgid "Select install wizard language:" +msgstr "Sprache für Installation wählen:" + +#: /var/www/fa2.3/devel/../install/index.php:329 +msgid "All application preliminary requirements seems to be correct. Please press Continue button below." +msgstr "Alle Voraussetzungen für die Installation scheinen erfüllt zu sein. Bitte drücken Sie unten auf Weiter." + +#: /var/www/fa2.3/devel/../install/index.php:330 +#: /var/www/fa2.3/devel/../install/index.php:356 +#: /var/www/fa2.3/devel/../install/index.php:363 +#: /var/www/fa2.3/devel/../install/index.php:370 +#: /var/www/fa2.3/devel/../install/index.php:389 +msgid "Continue >>" +msgstr "Weiter >>" + +#: /var/www/fa2.3/devel/../install/index.php:332 +msgid "Application cannot be installed. Please fix problems listed below in red, and press Refresh button." +msgstr "Die Anwendung kann nicht installiert werden. Bitte beheben Sie die Probleme die unten in rot gelistet sind und drücken anschließend auf Aktualisieren" + +#: /var/www/fa2.3/devel/../install/index.php:333 +msgid "Refresh" +msgstr "Aktualisieren" + +#: /var/www/fa2.3/devel/../install/index.php:343 +msgid "Database Server Settings" +msgstr "Datenbank Server Einstellungen" + +#: /var/www/fa2.3/devel/../install/index.php:345 +msgid "Server Host:" +msgstr "Server Host:" + +#: /var/www/fa2.3/devel/../install/index.php:346 +msgid "Database User:" +msgstr "Datenbank Benutzer:" + +#: /var/www/fa2.3/devel/../install/index.php:347 +msgid "Database Password:" +msgstr "Datenbank Passwort:" + +#: /var/www/fa2.3/devel/../install/index.php:348 +msgid "Database Name:" +msgstr "Datenbank Name:" + +#: /var/www/fa2.3/devel/../install/index.php:349 +msgid "Use '0_' Table Prefix:" +msgstr "'0_' den Tabellen voranstellen:" + +#: /var/www/fa2.3/devel/../install/index.php:349 +#: /var/www/fa2.3/devel/../includes/system_tests.inc:38 +#: /var/www/fa2.3/devel/../includes/system_tests.inc:113 +#: /var/www/fa2.3/devel/../includes/system_tests.inc:126 +msgid "Yes" +msgstr "Ja" + +#: /var/www/fa2.3/devel/../install/index.php:349 +#: /var/www/fa2.3/devel/../includes/system_tests.inc:38 +#: /var/www/fa2.3/devel/../includes/system_tests.inc:113 +#: /var/www/fa2.3/devel/../includes/system_tests.inc:126 +msgid "No" +msgstr "Nein" + +#: /var/www/fa2.3/devel/../install/index.php:350 +msgid "Install Additional Language Packs from FA Repository:" +msgstr "Zusätzliche Sprachpakete aus dem FA Vorrat installieren:" + +#: /var/www/fa2.3/devel/../install/index.php:351 +msgid "Install Additional COAs from FA Repository:" +msgstr "Zusätzliche Kontenpläne aus dem FA Vorrat installieren:" + +#: /var/www/fa2.3/devel/../install/index.php:353 +msgid "Use table prefix if you share selected database for more than one FA company." +msgstr "Verwenden Sie Tabellen Präfixe wenn Sie in einer Datenbank mehrere FA Mandanten betreiben " + +#: /var/www/fa2.3/devel/../install/index.php:354 +msgid "Do not select additional langs nor COAs if you have no working internet connection right now. You can install them later." +msgstr "Installieren Sie keine zusätzlichen Sprachen oder Kontenpläne wenn Sie über keine Internet Verbindung verfügen. Sie können diese später installieren." + +#: /var/www/fa2.3/devel/../install/index.php:355 +#: /var/www/fa2.3/devel/../install/index.php:362 +#: /var/www/fa2.3/devel/../install/index.php:369 +#: /var/www/fa2.3/devel/../install/index.php:388 +msgid "<< Back" +msgstr "<< Zurück" + +#: /var/www/fa2.3/devel/../install/index.php:360 +msgid "User Interface Languages Selection" +msgstr "Sprachenauswahl für Benutzeroberfläche" + +#: /var/www/fa2.3/devel/../install/index.php:367 +msgid "Charts of Accounts Selection" +msgstr "Auswahl Kontenplan" + +#: /var/www/fa2.3/devel/../install/index.php:379 +msgid "Company Settings" +msgstr "Mandanteneinstellungen" + +#: /var/www/fa2.3/devel/../install/index.php:381 +msgid "Company Name:" +msgstr "Name Mandant (Firma):" + +#: /var/www/fa2.3/devel/../install/index.php:382 +msgid "Admin Login:" +msgstr "Admin Login:" + +#: /var/www/fa2.3/devel/../install/index.php:383 +msgid "Admin Password:" +msgstr "Admin Passwort:" + +#: /var/www/fa2.3/devel/../install/index.php:384 +msgid "Reenter Password:" +msgstr "Passwort nochmals eingeben:" + +#: /var/www/fa2.3/devel/../install/index.php:385 +msgid "Select Chart of Accounts:" +msgstr "Kontenplan auswählen:" + +#: /var/www/fa2.3/devel/../install/index.php:386 +msgid "Select Default Language:" +msgstr "Standardsprache auswählen:" + +#: /var/www/fa2.3/devel/../install/index.php:393 +msgid "FrontAccounting ERP has been installed successsfully." +msgstr "FrontAccounting ERP wurde erfolgreich installiert." + +#: /var/www/fa2.3/devel/../install/index.php:394 +msgid "Please do not forget to remove install wizard folder." +msgstr "Bitte vergessen Sie nicht das Verzeichnis des Installationsassistenten (install wizard) zu entfernen" + +#: /var/www/fa2.3/devel/../install/index.php:396 +msgid "Click here to start." +msgstr "Klicken Sie hier um zu starten." + +#: /var/www/fa2.3/devel/../includes/system_tests.inc:15 +msgid "Info" +msgstr "Info" + +#: /var/www/fa2.3/devel/../includes/system_tests.inc:16 +msgid "Optional" +msgstr "Optional" + +#: /var/www/fa2.3/devel/../includes/system_tests.inc:17 +msgid "Recomended" +msgstr "Empfohlen" + +#: /var/www/fa2.3/devel/../includes/system_tests.inc:18 +msgid "Required " +msgstr "Erforderlich " + +#: /var/www/fa2.3/devel/../includes/system_tests.inc:24 +msgid "MySQL version" +msgstr "MySQL Version" + +#: /var/www/fa2.3/devel/../includes/system_tests.inc:28 +msgid "Upgrade MySQL server to version at least 4.1" +msgstr "Den MySQL Server mindestens auf Version 4.1 aktualisieren" + +#: /var/www/fa2.3/devel/../includes/system_tests.inc:35 +msgid "PHP MySQL extension" +msgstr "PHP MySQL Erweiterung" + +#: /var/www/fa2.3/devel/../includes/system_tests.inc:40 +msgid "Your PHP has to have MySQL extension enabled." +msgstr "Ihre PHP-MySQL-Erweiterung muss aktiviert sein." + +#: /var/www/fa2.3/devel/../includes/system_tests.inc:46 +msgid "PHP version" +msgstr "PHP Version" + +#: /var/www/fa2.3/devel/../includes/system_tests.inc:50 +msgid "Upgrade PHP to version at least 4.3.3" +msgstr "PHP Version mindestens auf 4.3.3 aktualisieren" + +#: /var/www/fa2.3/devel/../includes/system_tests.inc:57 +msgid "Server system" +msgstr "Server System" + +#: /var/www/fa2.3/devel/../includes/system_tests.inc:67 +msgid "Session save path" +msgstr "Pfad für Session Daten" + +#: /var/www/fa2.3/devel/../includes/system_tests.inc:79 +msgid "Removed install wizard folder" +msgstr "Entferntes Verzeichnis des Installationsassistenten (install wizard)" + +#: /var/www/fa2.3/devel/../includes/system_tests.inc:82 +msgid "Not removed" +msgstr "Nicht entfernt" + +#: /var/www/fa2.3/devel/../includes/system_tests.inc:83 +msgid "Remove or rename install wizard folder for security reasons." +msgstr "Aus Sicherheitsgründen entfernen Sie das Verzeichnis des Installationsassistenten (install wizard) bzw. benennen Sie es um" + +#: /var/www/fa2.3/devel/../includes/system_tests.inc:90 +msgid "Browser type" +msgstr "Browsertyp" + +#: /var/www/fa2.3/devel/../includes/system_tests.inc:94 +msgid "Any browser is supported" +msgstr "Jeder Browser wird unterstützt" + +#: /var/www/fa2.3/devel/../includes/system_tests.inc:101 +msgid "Http server type" +msgstr "Http Server Typ" + +#: /var/www/fa2.3/devel/../includes/system_tests.inc:105 +msgid "Any server is supported" +msgstr "Jeder Server wird unterstützt" + +#: /var/www/fa2.3/devel/../includes/system_tests.inc:112 +msgid "Native gettext" +msgstr "Nativer gettext" + +#: /var/www/fa2.3/devel/../includes/system_tests.inc:116 +msgid "In case of no getext support, php emulation is used" +msgstr "Im Fall dass gettext nicht unterstützt wird, wird PHP Emulation verwendet" + +#: /var/www/fa2.3/devel/../includes/system_tests.inc:124 +msgid "Debugging mode" +msgstr "Debug Modus" + +#: /var/www/fa2.3/devel/../includes/system_tests.inc:128 +msgid "To switch debugging on set $go_debug>0 in config.php file" +msgstr "Um den Debug Modus einzuschalten, setzen Sie $go_debug>0 in der config.php" + +#: /var/www/fa2.3/devel/../includes/system_tests.inc:137 +msgid "Error logging" +msgstr "Fehlerprotokollierung" + +#: /var/www/fa2.3/devel/../includes/system_tests.inc:145 +msgid "Disabled" +msgstr "Inaktiv" + +#: /var/www/fa2.3/devel/../includes/system_tests.inc:148 +msgid "To switch error logging set $error_logging in config.php file" +msgstr "Um die Fehlerprotokollierung einzuschalten setzen Sie $error_logging in der config.php Datei" + +#: /var/www/fa2.3/devel/../includes/system_tests.inc:151 +msgid "Log file is not writeable" +msgstr "Log-Datei ist nicht beschreibbar" + +#: /var/www/fa2.3/devel/../includes/system_tests.inc:161 +msgid "Current database version" +msgstr "Aktuelle Datenbank Version" + +#: /var/www/fa2.3/devel/../includes/system_tests.inc:165 +msgid "Database structure seems to be not upgraded to current version" +msgstr "Datenbank Schema scheint nicht auf die letzte Version aktualisiert worden zu sein" + +#: /var/www/fa2.3/devel/../includes/system_tests.inc:180 +msgid "Company subdirectories consistency" +msgstr "Mandanten Unterverzeichnisse Konsistenz" + +#: /var/www/fa2.3/devel/../includes/system_tests.inc:193 +#: /var/www/fa2.3/devel/../includes/system_tests.inc:200 +#: /var/www/fa2.3/devel/../includes/system_tests.inc:208 +#: /var/www/fa2.3/devel/../includes/system_tests.inc:225 +#: /var/www/fa2.3/devel/../includes/system_tests.inc:345 +#, php-format +msgid "'%s' is not writeable" +msgstr "'%s' ist nicht beschreibbar" + +#: /var/www/fa2.3/devel/../includes/system_tests.inc:221 +msgid "Temporary directory" +msgstr "Temporäres Verzeichnis" + +#: /var/www/fa2.3/devel/../includes/system_tests.inc:233 +msgid "Language configuration consistency" +msgstr "Spracheneinstellung - Konsistenz" + +#: /var/www/fa2.3/devel/../includes/system_tests.inc:242 +msgid "Languages folder should be writeable." +msgstr "Sprachen Ordner sollten beschreibbar sein." + +#: /var/www/fa2.3/devel/../includes/system_tests.inc:250 +msgid "Languages configuration file should be writeable." +msgstr "Sprachen Konfigurationsdatei sollte beschreibbar sein." + +#: /var/www/fa2.3/devel/../includes/system_tests.inc:268 +#, php-format +msgid "Missing %s translation file." +msgstr "Fehlende %s Übersetzungsdatei." + +#: /var/www/fa2.3/devel/../includes/system_tests.inc:273 +#, php-format +msgid "Missing system locale: %s" +msgstr "Fehlendes lokales Schema: %s" + +#: /var/www/fa2.3/devel/../includes/system_tests.inc:286 +msgid "Main config file" +msgstr "Haupt-Konfigurationsdatei" + +#: /var/www/fa2.3/devel/../includes/system_tests.inc:293 +#: /var/www/fa2.3/devel/../includes/system_tests.inc:315 +#, php-format +msgid "Can't write '%s' file. Check FA directory write permissions." +msgstr "Kann '% s'-Datei nicht schreiben. Überprüfen Sie die Schreibrechte im FA-Verzeichnis ." + +#: /var/www/fa2.3/devel/../includes/system_tests.inc:294 +#: /var/www/fa2.3/devel/../includes/system_tests.inc:316 +#, php-format +msgid "'%s' file exists." +msgstr "'% s' Datei existiert." + +#: /var/www/fa2.3/devel/../includes/system_tests.inc:298 +#, php-format +msgid "'%s' file should be read-only" +msgstr "'%s' Datei sollte auf 'nur lesen' gesetzt sein" + +#: /var/www/fa2.3/devel/../includes/system_tests.inc:307 +msgid "Database auth file" +msgstr "Datenbank auth Datei" + +#: /var/www/fa2.3/devel/../includes/system_tests.inc:320 +#, php-format +msgid "'%s' file should be read-only if you do not plan to add or change companies" +msgstr "'%s' Datei sollte auf 'nur lesen' gesetzt sein wenn Sie nicht vorhaben, Mandanten hinzuzufügen oder zu ändern" + +#: /var/www/fa2.3/devel/../includes/system_tests.inc:331 +msgid "Extensions system" +msgstr "Erweiterungen System" + +#: /var/www/fa2.3/devel/../includes/system_tests.inc:366 +msgid "Extensions configuration files and directories should be writeable" +msgstr "Konfigurations Dateien und Verzeichnisse für Erweiterungen sollten beschreibbar sein" + +#: /var/www/fa2.3/devel/../includes/system_tests.inc:378 +#, php-format +msgid "Non-standard theme directory '%s' is not writable" +msgstr "Das NIcht-Standard-Design Verzeichnis '% s' ist nicht beschreibbar" + +#: /var/www/fa2.3/devel/../includes/system_tests.inc:388 +msgid "OpenSSL PHP extension have to be enabled to use extension repository system." +msgstr "OpenSSL PHP muss aktiviert sein um das FA Erweiterungssystem nutzen zu können ." + +#: /var/www/fa2.3/devel/../includes/system_tests.inc:391 +msgid "OpenSSL have to be available on your server to use extension repository system." +msgstr "OpenSSL muss auf Ihrem Server vorhanden sein um das FA Erweiterungssystem nutzen zu können ." + +#: /var/www/fa2.3/devel/../includes/system_tests.inc:414 +msgid "Test" +msgstr "Test" + +#: /var/www/fa2.3/devel/../includes/system_tests.inc:414 +msgid "Test type" +msgstr "Testtyp" + +#: /var/www/fa2.3/devel/../includes/system_tests.inc:414 +msgid "Value" +msgstr "Wert" + +#: /var/www/fa2.3/devel/../includes/system_tests.inc:414 +msgid "Comments" +msgstr "Kommentare" + +#: /var/www/fa2.3/devel/../includes/system_tests.inc:438 +msgid "Ok" +msgstr "Ok" + diff --git a/install/lang/el_GR/LC_MESSAGES/el_GR.mo b/install/lang/el_GR/LC_MESSAGES/el_GR.mo new file mode 100644 index 0000000000000000000000000000000000000000..8440db3619380661e4ddb328cbd5d68114b41204 GIT binary patch literal 13465 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 literal 0 HcmV?d00001 diff --git a/install/lang/el_GR/LC_MESSAGES/el_GR.po b/install/lang/el_GR/LC_MESSAGES/el_GR.po new file mode 100644 index 00000000..59a497ab --- /dev/null +++ b/install/lang/el_GR/LC_MESSAGES/el_GR.po @@ -0,0 +1,465 @@ +# SOME DESCRIPTIVE TITLE. +# Copyright (C) YEAR THE PACKAGE'S COPYRIGHT HOLDER +# This file is distributed under the same license as the PACKAGE package. +# FIRST AUTHOR , YEAR. +# +msgid "" +msgstr "" +"Project-Id-Version: FA2.3RC1+ inst wizard\n" +"Report-Msgid-Bugs-To: \n" +"POT-Creation-Date: 2010-08-08 12:50+0200\n" +"PO-Revision-Date: 2010-10-22 12:07+0200\n" +"Last-Translator: Kyriakos Tsoukalas \n" +"Language-Team: Labyrinth \n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=utf-8\n" +"Content-Transfer-Encoding: 8bit\n" +"X-Poedit-Language: Greek\n" +"X-Poedit-Country: GREECE\n" +"X-Poedit-SourceCharset: iso-8859-1\n" + +#: /var/www/fa2.3/devel/../install/index.php:20 +#: /var/www/fa2.3/devel/../install/index.php:40 +msgid "FrontAccouting ERP Installation Wizard" +msgstr "Μάγος εγκατάστασης του FrontAccouting ERP" + +#: /var/www/fa2.3/devel/../install/index.php:41 +#, php-format +msgid "Step %d: %s" +msgstr "Βήμα %d: %s" + +#: /var/www/fa2.3/devel/../install/index.php:48 +msgid "Chart of accounts" +msgstr "Διάγραμμα απολογισμών" + +#: /var/www/fa2.3/devel/../install/index.php:48 +#: /var/www/fa2.3/devel/../install/index.php:75 +msgid "Encoding" +msgstr "Κωδικοποίηση" + +#: /var/www/fa2.3/devel/../install/index.php:48 +#: /var/www/fa2.3/devel/../install/index.php:75 +msgid "Description" +msgstr "Περιγραφή" + +#: /var/www/fa2.3/devel/../install/index.php:48 +#: /var/www/fa2.3/devel/../install/index.php:75 +msgid "Install" +msgstr "Εγκατάσταση" + +#: /var/www/fa2.3/devel/../install/index.php:65 +#: /var/www/fa2.3/devel/../install/index.php:93 +msgid "Installed" +msgstr "Εγκατεστημένο" + +#: /var/www/fa2.3/devel/../install/index.php:75 +msgid "Language" +msgstr "Γλώσσα" + +#: /var/www/fa2.3/devel/../install/index.php:156 +msgid "Cannot save system configuration file 'config.php'." +msgstr "Αδυναμία εγγραφής του αρχείου διαμόρφωσης συστήματος 'config.php'." + +#: /var/www/fa2.3/devel/../install/index.php:173 +msgid "Cannot open 'config_db.php' configuration file." +msgstr "Αδυναμία ανοίγματος του αρχείου διαμόρφωσης 'config_db.php'" + +#: /var/www/fa2.3/devel/../install/index.php:176 +msgid "Cannot write to the 'config_db.php' configuration file." +msgstr "Αδυναμία εγγραφής στο αρχείο διαμόρφωσης 'config_db.php'." + +#: /var/www/fa2.3/devel/../install/index.php:179 +msgid "Configuration file 'config_db.php' is not writable. Change its permissions so it is, then re-run installation step." +msgstr "Το αρχείο διαμόρφωσης 'config_db.php' δεν είναι εγγράψιμο. Παρακαλώ αλλάξτε τα δικαιώματα ώστε να είναι και μετά τρέξτε ξανά το βήμα εγκατάστασης." + +#: /var/www/fa2.3/devel/../install/index.php:217 +msgid "Host name cannot be empty." +msgstr "Το όνομα φιλοξενητή δεν μπορεί να είναι κενό." + +#: /var/www/fa2.3/devel/../install/index.php:221 +msgid "Database user name cannot be empty." +msgstr "Το όνομα χρήστη βάσης δεδομένων δεν μπορεί να είναι κενό." + +#: /var/www/fa2.3/devel/../install/index.php:225 +msgid "Database name cannot be empty." +msgstr "Το όνομα της βάσης δεδομένων δεν μπορεί να είναι κενό." + +#: /var/www/fa2.3/devel/../install/index.php:277 +msgid "Company name cannot be empty." +msgstr "Το όνομα της επιχείρησης δεν μπορεί να είναι κενό." + +#: /var/www/fa2.3/devel/../install/index.php:281 +msgid "Company admin name cannot be empty." +msgstr "Το όνομα Διαχειριστή επιχείρησης δεν μπορεί να είναι κενό." + +#: /var/www/fa2.3/devel/../install/index.php:285 +msgid "Company admin password cannot be empty." +msgstr "Το συνθηματικό Διαχειριστή επιχείρησης δεν μπορεί να είναι κενό." + +#: /var/www/fa2.3/devel/../install/index.php:289 +msgid "Company admin passwords differ." +msgstr "Τα συνθηματικά Διαχειριστή επιχείρησης διαφέρουν." + +#: /var/www/fa2.3/devel/../install/index.php:320 +msgid "System Diagnostics" +msgstr "Διαγνωστικά συστήματος" + +#: /var/www/fa2.3/devel/../install/index.php:323 +msgid "Select install wizard language:" +msgstr "Επιλέξτε γλώσσα μάγου εγκατάστασης:" + +#: /var/www/fa2.3/devel/../install/index.php:329 +msgid "All application preliminary requirements seems to be correct. Please press Continue button below." +msgstr "Όλα τα προκαταρκτικά απαιτούμενα φαίνεται να είναι σωστά. Παρακαλώ πιέστε το κουμπί Συνέχεια χαμηλότερα." + +#: /var/www/fa2.3/devel/../install/index.php:330 +#: /var/www/fa2.3/devel/../install/index.php:356 +#: /var/www/fa2.3/devel/../install/index.php:363 +#: /var/www/fa2.3/devel/../install/index.php:370 +#: /var/www/fa2.3/devel/../install/index.php:389 +msgid "Continue >>" +msgstr "Συνέχεια >>" + +#: /var/www/fa2.3/devel/../install/index.php:332 +msgid "Application cannot be installed. Please fix problems listed below in red, and press Refresh button." +msgstr "Η εφαρμογή δεν μπορεί να εγκατασταθεί. Παρακαλώ διορθώστε τα προβλήματα που απαριθμούνται παρακάτω με κόκκινο και πατήστε το κουμπί Ανανέωση." + +#: /var/www/fa2.3/devel/../install/index.php:333 +msgid "Refresh" +msgstr "Ανανέωση" + +#: /var/www/fa2.3/devel/../install/index.php:343 +msgid "Database Server Settings" +msgstr "Επιλογές Εξυπηρετητή βάσης δεδομένων" + +#: /var/www/fa2.3/devel/../install/index.php:345 +msgid "Server Host:" +msgstr "Φιλοξενητής Εξυπηρετητή:" + +#: /var/www/fa2.3/devel/../install/index.php:346 +msgid "Database User:" +msgstr "Χρήστης βάσης δεδομένων:" + +#: /var/www/fa2.3/devel/../install/index.php:347 +msgid "Database Password:" +msgstr "Συνθηματικό βάσης δεδομένων:" + +#: /var/www/fa2.3/devel/../install/index.php:348 +msgid "Database Name:" +msgstr "Όνομα βάσης δεδομένων:" + +#: /var/www/fa2.3/devel/../install/index.php:349 +msgid "Use '0_' Table Prefix:" +msgstr "Χρήση '0_' προθέματος πίνακα:" + +#: /var/www/fa2.3/devel/../install/index.php:349 +#: /var/www/fa2.3/devel/../includes/system_tests.inc:38 +#: /var/www/fa2.3/devel/../includes/system_tests.inc:113 +#: /var/www/fa2.3/devel/../includes/system_tests.inc:126 +msgid "Yes" +msgstr "Ναι" + +#: /var/www/fa2.3/devel/../install/index.php:349 +#: /var/www/fa2.3/devel/../includes/system_tests.inc:38 +#: /var/www/fa2.3/devel/../includes/system_tests.inc:113 +#: /var/www/fa2.3/devel/../includes/system_tests.inc:126 +msgid "No" +msgstr "Όχι" + +#: /var/www/fa2.3/devel/../install/index.php:350 +msgid "Install Additional Language Packs from FA Repository:" +msgstr "Εγκατάσταση πρόσθετων πακέτων γλώσσας από την αποθήκη του FA:" + +#: /var/www/fa2.3/devel/../install/index.php:351 +msgid "Install Additional COAs from FA Repository:" +msgstr "Εγκατάσταση Πρόσθετων ΔΑ από την Αποθήκη του FA:" + +#: /var/www/fa2.3/devel/../install/index.php:353 +msgid "Use table prefix if you share selected database for more than one FA company." +msgstr "Χρησιμοποιήστε πρόθεμα πίνακα εάν μοιράζεστε την βάση δεδομένων για περισσότερο από μια επιχείρηση FA." + +#: /var/www/fa2.3/devel/../install/index.php:354 +msgid "Do not select additional langs nor COAs if you have no working internet connection right now. You can install them later." +msgstr "Μην επιλέξετε πρόσθετες γλώσσες ή ΔΑ αν δεν έχετε λειτουργική σύνδεση στο διαδίκτυο τώρα. Μπορείτε να τα εγκαταστήσετε αργότερα." + +#: /var/www/fa2.3/devel/../install/index.php:355 +#: /var/www/fa2.3/devel/../install/index.php:362 +#: /var/www/fa2.3/devel/../install/index.php:369 +#: /var/www/fa2.3/devel/../install/index.php:388 +msgid "<< Back" +msgstr "<< Πίσω" + +#: /var/www/fa2.3/devel/../install/index.php:360 +msgid "User Interface Languages Selection" +msgstr "Επιλογή γλωσσών της διεπαφής χρήστη" + +#: /var/www/fa2.3/devel/../install/index.php:367 +msgid "Charts of Accounts Selection" +msgstr "Επιλογή διαγραμμάτων απολογισμών" + +#: /var/www/fa2.3/devel/../install/index.php:379 +msgid "Company Settings" +msgstr "Επιλογές Επιχείρησης" + +#: /var/www/fa2.3/devel/../install/index.php:381 +msgid "Company Name:" +msgstr "Όνομα Επιχείρησης:" + +#: /var/www/fa2.3/devel/../install/index.php:382 +msgid "Admin Login:" +msgstr "Είσοδος Διαχειριστή:" + +#: /var/www/fa2.3/devel/../install/index.php:383 +msgid "Admin Password:" +msgstr "Συνθηματικό Διαχειριστή:" + +#: /var/www/fa2.3/devel/../install/index.php:384 +msgid "Reenter Password:" +msgstr "Εισάγετε ξανά το συνθηματικό:" + +#: /var/www/fa2.3/devel/../install/index.php:385 +msgid "Select Chart of Accounts:" +msgstr "Επιλογή Διαγραμμάτων Απολογισμών:" + +#: /var/www/fa2.3/devel/../install/index.php:386 +msgid "Select Default Language:" +msgstr "Επιλογή προκαθορισμένης Γλώσσας:" + +#: /var/www/fa2.3/devel/../install/index.php:393 +msgid "FrontAccounting ERP has been installed successsfully." +msgstr "Το FrontAccounting ERP εγκαταστάθηκε επιτυχώς." + +#: /var/www/fa2.3/devel/../install/index.php:394 +msgid "Please do not forget to remove install wizard folder." +msgstr "Παρακαλώ μην ξεχάσετε να αφαιρέσετε το φάκελο του μάγου εγκατάστασης." + +#: /var/www/fa2.3/devel/../install/index.php:396 +msgid "Click here to start." +msgstr "Κάντε κλικ εδώ για να αρχίσετε." + +#: /var/www/fa2.3/devel/../includes/system_tests.inc:15 +msgid "Info" +msgstr "Πληροφορίες" + +#: /var/www/fa2.3/devel/../includes/system_tests.inc:16 +msgid "Optional" +msgstr "Προαιρετικό" + +#: /var/www/fa2.3/devel/../includes/system_tests.inc:17 +msgid "Recommended" +msgstr "Προτείνεται" + +#: /var/www/fa2.3/devel/../includes/system_tests.inc:18 +msgid "Required " +msgstr "Απαιτούμενο" + +#: /var/www/fa2.3/devel/../includes/system_tests.inc:24 +msgid "MySQL version" +msgstr "Έκδοση MySQL" + +#: /var/www/fa2.3/devel/../includes/system_tests.inc:28 +msgid "Upgrade MySQL server to version at least 4.1" +msgstr "Αναβαθμίστε την έκδοση του εξυπηρετητή MySQL τουλάχιστον σε 4.1" + +#: /var/www/fa2.3/devel/../includes/system_tests.inc:35 +msgid "PHP MySQL extension" +msgstr "επέκταση PHP MySQL" + +#: /var/www/fa2.3/devel/../includes/system_tests.inc:40 +msgid "Your PHP has to have MySQL extension enabled." +msgstr "Η PHP πρέπει να έχει την επέκταση MySQL ενεργοποιημένη." + +#: /var/www/fa2.3/devel/../includes/system_tests.inc:46 +msgid "PHP version" +msgstr "Έκδοση PHP" + +#: /var/www/fa2.3/devel/../includes/system_tests.inc:50 +msgid "Upgrade PHP to version at least 4.3.3" +msgstr "Αναβαθμίστε την έκδοση PHP σε τουλάχιστον 4.3.3" + +#: /var/www/fa2.3/devel/../includes/system_tests.inc:57 +msgid "Server system" +msgstr "Σύστημα εξυπηρετητή" + +#: /var/www/fa2.3/devel/../includes/system_tests.inc:67 +msgid "Session save path" +msgstr "Διαδρομή καταχωρήσεων συνεδρίας" + +#: /var/www/fa2.3/devel/../includes/system_tests.inc:79 +msgid "Removed install wizard folder" +msgstr "Έγινε απομάκρυνση του φακέλου του μάγου εγκατάστασης" + +#: /var/www/fa2.3/devel/../includes/system_tests.inc:82 +msgid "Not removed" +msgstr "Δεν έχει απομακρυνθεί" + +#: /var/www/fa2.3/devel/../includes/system_tests.inc:83 +msgid "Remove or rename install wizard folder for security reasons." +msgstr "Διαγράψτε ή μετονομάστε τον φάκελο του μάγου εγκατάστασης για λόγους ασφαλείας." + +#: /var/www/fa2.3/devel/../includes/system_tests.inc:90 +msgid "Browser type" +msgstr "Τύπος φυλλομετρητή" + +#: /var/www/fa2.3/devel/../includes/system_tests.inc:94 +msgid "Any browser is supported" +msgstr "Οποιοσδήποτε φυλλομετρητής υποστηρίζεται" + +#: /var/www/fa2.3/devel/../includes/system_tests.inc:101 +msgid "Http server type" +msgstr "Εξυπηρετητής τύπου HTTP" + +#: /var/www/fa2.3/devel/../includes/system_tests.inc:105 +msgid "Any server is supported" +msgstr "Οποιοσδήποτε εξυπηρετητής υποστηρίζεται" + +#: /var/www/fa2.3/devel/../includes/system_tests.inc:112 +msgid "Native gettext" +msgstr "Μητρικό gettext" + +#: /var/www/fa2.3/devel/../includes/system_tests.inc:116 +msgid "In case of no gettext support, php emulation is used" +msgstr "Στην περίπτωση μη υποστήριξης getext, χρησιμοποιείται εξομοίωση php" + +#: /var/www/fa2.3/devel/../includes/system_tests.inc:124 +msgid "Debugging mode" +msgstr "Καθεστώς εύρεσης προγραμματιστικού λάθους (debugging)" + +#: /var/www/fa2.3/devel/../includes/system_tests.inc:128 +msgid "To switch debugging on set $go_debug>0 in config.php file" +msgstr "Για να ενεργοποιήσετε την αποσφαλμάτωση ορίστε $go_debug>0 στο αρχείο config.php" + +#: /var/www/fa2.3/devel/../includes/system_tests.inc:137 +msgid "Error logging" +msgstr "Αποτυχία καταγράφησης" + +#: /var/www/fa2.3/devel/../includes/system_tests.inc:145 +msgid "Disabled" +msgstr "Απενεργοποιημένο" + +#: /var/www/fa2.3/devel/../includes/system_tests.inc:148 +msgid "To switch error logging set $error_logging in config.php file" +msgstr "Για να ενεργοποιήσετε την καταγραφή λαθών ορίστε $error_logging στο αρχείο config.php" + +#: /var/www/fa2.3/devel/../includes/system_tests.inc:151 +msgid "Log file is not writeable" +msgstr "Το αρχείο καταγραφών δεν είναι εγγράψιμο" + +#: /var/www/fa2.3/devel/../includes/system_tests.inc:161 +msgid "Current database version" +msgstr "Τρέχουσα έκδοση βάσης δεδομένων" + +#: /var/www/fa2.3/devel/../includes/system_tests.inc:165 +msgid "Database structure seems to be not upgraded to current version" +msgstr "Η δομή της βάσης δεδομένων φαίνεται μην είναι αναβαθμισμένη στην τρέχουσα έκδοση" + +#: /var/www/fa2.3/devel/../includes/system_tests.inc:180 +msgid "Company subdirectories consistency" +msgstr "Συνέπεια υπο-φακέλων επιχείρησης" + +#: /var/www/fa2.3/devel/../includes/system_tests.inc:193 +#: /var/www/fa2.3/devel/../includes/system_tests.inc:200 +#: /var/www/fa2.3/devel/../includes/system_tests.inc:208 +#: /var/www/fa2.3/devel/../includes/system_tests.inc:225 +#: /var/www/fa2.3/devel/../includes/system_tests.inc:345 +#, php-format +msgid "'%s' is not writeable" +msgstr "Το '%s' δεν είναι εγγράψιμο" + +#: /var/www/fa2.3/devel/../includes/system_tests.inc:221 +msgid "Temporary directory" +msgstr "Προσωρινός κατάλογος αρχείων" + +#: /var/www/fa2.3/devel/../includes/system_tests.inc:233 +msgid "Language configuration consistency" +msgstr "Συνέπεια γλωσσικής διαμόρφωσης" + +#: /var/www/fa2.3/devel/../includes/system_tests.inc:242 +msgid "Languages folder should be writeable." +msgstr "Ο φάκελος των γλωσσών πρέπει να είναι εγγράψιμος." + +#: /var/www/fa2.3/devel/../includes/system_tests.inc:250 +msgid "Languages configuration file should be writeable." +msgstr "Το αρχείο παραμετροποίησης γλωσσών πρέπει να είναι εγγράψιμο." + +#: /var/www/fa2.3/devel/../includes/system_tests.inc:268 +#, php-format +msgid "Missing %s translation file." +msgstr "Έλλειψη του αρχείου μετάφρασης %s ." + +#: /var/www/fa2.3/devel/../includes/system_tests.inc:273 +#, php-format +msgid "Missing system locale: %s" +msgstr "Έλλειψη συνόλου τοπικής προσαρμογής του συστήματος: %s" + +#: /var/www/fa2.3/devel/../includes/system_tests.inc:286 +msgid "Main config file" +msgstr "Βασικό αρχείο παραμετροποίησης" + +#: /var/www/fa2.3/devel/../includes/system_tests.inc:293 +#: /var/www/fa2.3/devel/../includes/system_tests.inc:315 +#, php-format +msgid "Can't write '%s' file. Check FA directory write permissions." +msgstr "Αδυναμία εγγραφής αρχείου '%s'. Ελέγξτε τα δικαιώματα του φακέλου του FA." + +#: /var/www/fa2.3/devel/../includes/system_tests.inc:294 +#: /var/www/fa2.3/devel/../includes/system_tests.inc:316 +#, php-format +msgid "'%s' file exists." +msgstr "Το αρχείο '%s' υπάρχει." + +#: /var/www/fa2.3/devel/../includes/system_tests.inc:298 +#, php-format +msgid "'%s' file should be read-only" +msgstr "το '%s' αρχείο θα έπρεπε να είναι μόνο για ανάγνωση" + +#: /var/www/fa2.3/devel/../includes/system_tests.inc:307 +msgid "Database auth file" +msgstr "Αρχείο έγκρισης βάσης δεδομένων" + +#: /var/www/fa2.3/devel/../includes/system_tests.inc:320 +#, php-format +msgid "'%s' file should be read-only if you do not plan to add or change companies" +msgstr "Το '%s' αρχείο πρέπει να είναι μόνο για ανάγνωση εάν δεν σκοπεύετε να προσθέσετε ή να αφαιρέσετε επιχειρήσεις" + +#: /var/www/fa2.3/devel/../includes/system_tests.inc:331 +msgid "Extensions system" +msgstr "Σύστημα επεκτάσεων" + +#: /var/www/fa2.3/devel/../includes/system_tests.inc:366 +msgid "Extensions configuration files and directories should be writeable" +msgstr "Τα αρχεία και οι φάκελοι επεκτάσεων πρέπει να είναι εγγράψιμα" + +#: /var/www/fa2.3/devel/../includes/system_tests.inc:378 +#, php-format +msgid "Non-standard theme directory '%s' is not writable" +msgstr "Ο φάκελος μη-προκαθορισμένου θέματος '%s' δεν είναι εγγράψιμος" + +#: /var/www/fa2.3/devel/../includes/system_tests.inc:388 +msgid "OpenSSL PHP extension have to be enabled to use extension repository system." +msgstr "Η επέκταση OpenSSL PHP πρέπει να είναι ενεργοποιημένη για να χρησιμοποιεί το σύστημα αποθήκευσης επεκτάσεων." + +#: /var/www/fa2.3/devel/../includes/system_tests.inc:391 +msgid "OpenSSL have to be available on your server to use extension repository system." +msgstr "Το OpenSSL πρέπει να είναι διαθέσιμο στον εξυπηρετητή σας για να χρησιμοποιήσετε το σύστημα αποθήκευσης επεκτάσεων" + +#: /var/www/fa2.3/devel/../includes/system_tests.inc:414 +msgid "Test" +msgstr "Τεστ" + +#: /var/www/fa2.3/devel/../includes/system_tests.inc:414 +msgid "Test type" +msgstr "Τύπος τεστ" + +#: /var/www/fa2.3/devel/../includes/system_tests.inc:414 +msgid "Value" +msgstr "Τιμή" + +#: /var/www/fa2.3/devel/../includes/system_tests.inc:414 +msgid "Comments" +msgstr "Σχόλια" + +#: /var/www/fa2.3/devel/../includes/system_tests.inc:438 +msgid "Ok" +msgstr "ΟΚ" + diff --git a/install/lang/es_MX/LC_MESSAGES/es_MX.mo b/install/lang/es_MX/LC_MESSAGES/es_MX.mo new file mode 100644 index 0000000000000000000000000000000000000000..d04896b9684bda110480c48b06dc13d967c5d5e1 GIT binary patch literal 9524 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 literal 0 HcmV?d00001 diff --git a/install/lang/es_MX/LC_MESSAGES/es_MX.po b/install/lang/es_MX/LC_MESSAGES/es_MX.po new file mode 100644 index 00000000..aebdb1d2 --- /dev/null +++ b/install/lang/es_MX/LC_MESSAGES/es_MX.po @@ -0,0 +1,456 @@ +msgid "" +msgstr "" +"Project-Id-Version: \n" +"POT-Creation-Date: \n" +"PO-Revision-Date: \n" +"Last-Translator: Julio C. Perea Pastrana \n" +"Language-Team: \n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=iso-8859-1\n" +"Content-Transfer-Encoding: 8bit\n" + +#: /var/www/fa2.3/devel/../install/index.php:20 +#: /var/www/fa2.3/devel/../install/index.php:40 +msgid "FrontAccouting ERP Installation Wizard" +msgstr "Asistente de Instalación" + +#: /var/www/fa2.3/devel/../install/index.php:41 +#, php-format +msgid "Step %d: %s" +msgstr "Paso %d: %s" + +#: /var/www/fa2.3/devel/../install/index.php:48 +msgid "Chart of accounts" +msgstr "Plan contable" + +#: /var/www/fa2.3/devel/../install/index.php:48 +#: /var/www/fa2.3/devel/../install/index.php:75 +msgid "Encoding" +msgstr "Encoding" + +#: /var/www/fa2.3/devel/../install/index.php:48 +#: /var/www/fa2.3/devel/../install/index.php:75 +msgid "Description" +msgstr "Descripción" + +#: /var/www/fa2.3/devel/../install/index.php:48 +#: /var/www/fa2.3/devel/../install/index.php:75 +msgid "Install" +msgstr "Instalar" + +#: /var/www/fa2.3/devel/../install/index.php:65 +#: /var/www/fa2.3/devel/../install/index.php:93 +msgid "Installed" +msgstr "Instalado" + +#: /var/www/fa2.3/devel/../install/index.php:75 +msgid "Language" +msgstr "Idioma" + +#: /var/www/fa2.3/devel/../install/index.php:156 +msgid "Cannot save system configuration file 'config.php'." +msgstr "No se puede guardar el archivo 'config.php'." + +#: /var/www/fa2.3/devel/../install/index.php:173 +msgid "Cannot open 'config_db.php' configuration file." +msgstr "No se puede abrir el archivo 'config_db.php'." + +#: /var/www/fa2.3/devel/../install/index.php:176 +msgid "Cannot write to the 'config_db.php' configuration file." +msgstr "No se puede escribir en el archivo 'config_db.php'" + +#: /var/www/fa2.3/devel/../install/index.php:179 +msgid "Configuration file 'config_db.php' is not writable. Change its permissions so it is, then re-run installation step." +msgstr "El archivo 'config_db.php' no tiene permisos de escritura. Corrige los permisos y reinicia este paso de la instalación." + +#: /var/www/fa2.3/devel/../install/index.php:217 +msgid "Host name cannot be empty." +msgstr "El nombre del host es requerido." + +#: /var/www/fa2.3/devel/../install/index.php:221 +msgid "Database user name cannot be empty." +msgstr "El nombre de usuario de la base de datos es requerido." + +#: /var/www/fa2.3/devel/../install/index.php:225 +msgid "Database name cannot be empty." +msgstr "El nombre de la base de datos es requerida." + +#: /var/www/fa2.3/devel/../install/index.php:277 +msgid "Company name cannot be empty." +msgstr "El nombre de la empresa es requerido." + +#: /var/www/fa2.3/devel/../install/index.php:281 +msgid "Company admin name cannot be empty." +msgstr "El nombre del administrador de la empresa es requerido" + +#: /var/www/fa2.3/devel/../install/index.php:285 +msgid "Company admin password cannot be empty." +msgstr "El password de la empresa es requerido." + +#: /var/www/fa2.3/devel/../install/index.php:289 +msgid "Company admin passwords differ." +msgstr "La confirmación del password del administrador es diferente." + +#: /var/www/fa2.3/devel/../install/index.php:320 +msgid "System Diagnostics" +msgstr "Diagnóstico del sistema" + +#: /var/www/fa2.3/devel/../install/index.php:323 +msgid "Select install wizard language:" +msgstr "Selecciona el idioma del asistente de instalación:" + +#: /var/www/fa2.3/devel/../install/index.php:329 +msgid "All application preliminary requirements seems to be correct. Please press Continue button below." +msgstr "Todos los requisitos preliminares estan correctos. Pulsa el botón Continuar" + +#: /var/www/fa2.3/devel/../install/index.php:330 +#: /var/www/fa2.3/devel/../install/index.php:356 +#: /var/www/fa2.3/devel/../install/index.php:363 +#: /var/www/fa2.3/devel/../install/index.php:370 +#: /var/www/fa2.3/devel/../install/index.php:389 +msgid "Continue >>" +msgstr "Continuar >>" + +#: /var/www/fa2.3/devel/../install/index.php:332 +msgid "Application cannot be installed. Please fix problems listed below in red, and press Refresh button." +msgstr "No se puede instalar el sistema. Por favor, corrige los problemas marcados en rojo y presiona el botón recargar. " + +#: /var/www/fa2.3/devel/../install/index.php:333 +msgid "Refresh" +msgstr "Recargar" + +#: /var/www/fa2.3/devel/../install/index.php:343 +msgid "Database Server Settings" +msgstr "Configuración del servidor de base de datos" + +#: /var/www/fa2.3/devel/../install/index.php:345 +msgid "Server Host:" +msgstr "Host:" + +#: /var/www/fa2.3/devel/../install/index.php:346 +msgid "Database User:" +msgstr "Usuario:" + +#: /var/www/fa2.3/devel/../install/index.php:347 +msgid "Database Password:" +msgstr "Password:" + +#: /var/www/fa2.3/devel/../install/index.php:348 +msgid "Database Name:" +msgstr "Base de datos" + +#: /var/www/fa2.3/devel/../install/index.php:349 +msgid "Use '0_' Table Prefix:" +msgstr "Usar prefijo '0_' en tablas:" + +#: /var/www/fa2.3/devel/../install/index.php:349 +#: /var/www/fa2.3/devel/../includes/system_tests.inc:38 +#: /var/www/fa2.3/devel/../includes/system_tests.inc:113 +#: /var/www/fa2.3/devel/../includes/system_tests.inc:126 +msgid "Yes" +msgstr "Si" + +#: /var/www/fa2.3/devel/../install/index.php:349 +#: /var/www/fa2.3/devel/../includes/system_tests.inc:38 +#: /var/www/fa2.3/devel/../includes/system_tests.inc:113 +#: /var/www/fa2.3/devel/../includes/system_tests.inc:126 +msgid "No" +msgstr "No" + +#: /var/www/fa2.3/devel/../install/index.php:350 +msgid "Install Additional Language Packs from FA Repository:" +msgstr "Instalar paquetes de idioma adicional desde el repositorio:" + +#: /var/www/fa2.3/devel/../install/index.php:351 +msgid "Install Additional COAs from FA Repository:" +msgstr "Instalar COA's adicionales desde el repositorio" + +#: /var/www/fa2.3/devel/../install/index.php:353 +msgid "Use table prefix if you share selected database for more than one FA company." +msgstr "Seleccionar usar prefijo si has elegido compartir la base de datos para más de una empresa." + +#: /var/www/fa2.3/devel/../install/index.php:354 +msgid "Do not select additional langs nor COAs if you have no working internet connection right now. You can install them later." +msgstr "No selecciones instalar lenguajes ni COA’s adicionales si en este momento no tienes Internet. Estos los puedes instalar más tarde." + +#: /var/www/fa2.3/devel/../install/index.php:355 +#: /var/www/fa2.3/devel/../install/index.php:362 +#: /var/www/fa2.3/devel/../install/index.php:369 +#: /var/www/fa2.3/devel/../install/index.php:388 +msgid "<< Back" +msgstr "<< Regresar" + +#: /var/www/fa2.3/devel/../install/index.php:360 +msgid "User Interface Languages Selection" +msgstr "Selección el lenguaje del usuario en el sistema" + +#: /var/www/fa2.3/devel/../install/index.php:367 +msgid "Charts of Accounts Selection" +msgstr "Seleción el plan contable" + +#: /var/www/fa2.3/devel/../install/index.php:379 +msgid "Company Settings" +msgstr "Configuraciones de la empresa" + +#: /var/www/fa2.3/devel/../install/index.php:381 +msgid "Company Name:" +msgstr "Nombre de la empresa:" + +#: /var/www/fa2.3/devel/../install/index.php:382 +msgid "Admin Login:" +msgstr "Login del Admin:" + +#: /var/www/fa2.3/devel/../install/index.php:383 +msgid "Admin Password:" +msgstr "Password del Admin:" + +#: /var/www/fa2.3/devel/../install/index.php:384 +msgid "Reenter Password:" +msgstr "Re-ingresar password:" + +#: /var/www/fa2.3/devel/../install/index.php:385 +msgid "Select Chart of Accounts:" +msgstr "Selecciona el plan contable:" + +#: /var/www/fa2.3/devel/../install/index.php:386 +msgid "Select Default Language:" +msgstr "Selecciona el idioma por default:" + +#: /var/www/fa2.3/devel/../install/index.php:393 +msgid "FrontAccounting ERP has been installed successsfully." +msgstr "El sistema ha sido instalado." + +#: /var/www/fa2.3/devel/../install/index.php:394 +msgid "Please do not forget to remove install wizard folder." +msgstr "Por favor, no olvides borrar la carpeta del asistente de instalación." + +#: /var/www/fa2.3/devel/../install/index.php:396 +msgid "Click here to start." +msgstr "Click para iniciar." + +#: /var/www/fa2.3/devel/../includes/system_tests.inc:15 +msgid "Info" +msgstr "Info" + +#: /var/www/fa2.3/devel/../includes/system_tests.inc:16 +msgid "Optional" +msgstr "Opcional" + +#: /var/www/fa2.3/devel/../includes/system_tests.inc:17 +msgid "Recommended" +msgstr "Recomendado" + +#: /var/www/fa2.3/devel/../includes/system_tests.inc:18 +msgid "Required " +msgstr "Requerido" + +#: /var/www/fa2.3/devel/../includes/system_tests.inc:24 +msgid "MySQL version" +msgstr "Versión de MySQL" + +#: /var/www/fa2.3/devel/../includes/system_tests.inc:28 +msgid "Upgrade MySQL server to version at least 4.1" +msgstr "Debes actualizar el servidor MySQL, cuando menos a la versión 4.1" + +#: /var/www/fa2.3/devel/../includes/system_tests.inc:35 +msgid "PHP MySQL extension" +msgstr "Extensión PHP MySQL" + +#: /var/www/fa2.3/devel/../includes/system_tests.inc:40 +msgid "Your PHP has to have MySQL extension enabled." +msgstr "Tu PHP debe tener habilitada la extensión MySQL." + +#: /var/www/fa2.3/devel/../includes/system_tests.inc:46 +msgid "PHP version" +msgstr "Version de PHP" + +#: /var/www/fa2.3/devel/../includes/system_tests.inc:50 +msgid "Upgrade PHP to version at least 4.3.3" +msgstr "Debes actualizar PHP, cuando menos a la versión 4.3.3" + +#: /var/www/fa2.3/devel/../includes/system_tests.inc:57 +msgid "Server system" +msgstr "Servidor del sistema" + +#: /var/www/fa2.3/devel/../includes/system_tests.inc:67 +msgid "Session save path" +msgstr "Ruta para guardar Session" + +#: /var/www/fa2.3/devel/../includes/system_tests.inc:79 +msgid "Removed install wizard folder" +msgstr "El asistente de instalación ha sido eliminado" + +#: /var/www/fa2.3/devel/../includes/system_tests.inc:82 +msgid "Not removed" +msgstr "No se elimino" + +#: /var/www/fa2.3/devel/../includes/system_tests.inc:83 +msgid "Remove or rename install wizard folder for security reasons." +msgstr "Eliminar o renombrar el asistente de instalación" + +#: /var/www/fa2.3/devel/../includes/system_tests.inc:90 +msgid "Browser type" +msgstr "Tipo de navegador web" + +#: /var/www/fa2.3/devel/../includes/system_tests.inc:94 +msgid "Any browser is supported" +msgstr "Cualquier navegador web es soportado" + +#: /var/www/fa2.3/devel/../includes/system_tests.inc:101 +msgid "Http server type" +msgstr "Tipo de servidor HTTP" + +#: /var/www/fa2.3/devel/../includes/system_tests.inc:105 +msgid "Any server is supported" +msgstr "Cualquier servidor es soportado" + +#: /var/www/fa2.3/devel/../includes/system_tests.inc:112 +msgid "Native gettext" +msgstr "Gettext nativo" + +#: /var/www/fa2.3/devel/../includes/system_tests.inc:116 +msgid "In case of no gettext support, php emulation is used" +msgstr "En caso de no soportar gettext, se usara la emulación PHP" + +#: /var/www/fa2.3/devel/../includes/system_tests.inc:124 +msgid "Debugging mode" +msgstr "Modo Debugging" + +#: /var/www/fa2.3/devel/../includes/system_tests.inc:128 +msgid "To switch debugging on set $go_debug>0 in config.php file" +msgstr "Para cambiar a modo Debugging debes poner $go_debug>0 en el archivo config.php" + +#: /var/www/fa2.3/devel/../includes/system_tests.inc:137 +msgid "Error logging" +msgstr "Error de acceso" + +#: /var/www/fa2.3/devel/../includes/system_tests.inc:145 +msgid "Disabled" +msgstr "Deshabilitado" + +#: /var/www/fa2.3/devel/../includes/system_tests.inc:148 +msgid "To switch error logging set $error_logging in config.php file" +msgstr "Para cambiar a modo error logging pon $error_logging en el archivo config.php" + +#: /var/www/fa2.3/devel/../includes/system_tests.inc:151 +msgid "Log file is not writeable" +msgstr "El archivo de log's no tiene permisos de escritura" + +#: /var/www/fa2.3/devel/../includes/system_tests.inc:161 +msgid "Current database version" +msgstr "Versión de la base de datos actual" + +#: /var/www/fa2.3/devel/../includes/system_tests.inc:165 +msgid "Database structure seems to be not upgraded to current version" +msgstr "La estructura de base de datos parece no estar actualizada a la versión actual" + +#: /var/www/fa2.3/devel/../includes/system_tests.inc:180 +msgid "Company subdirectories consistency" +msgstr "Consistencia de los directorios de la empresa" + +#: /var/www/fa2.3/devel/../includes/system_tests.inc:193 +#: /var/www/fa2.3/devel/../includes/system_tests.inc:200 +#: /var/www/fa2.3/devel/../includes/system_tests.inc:208 +#: /var/www/fa2.3/devel/../includes/system_tests.inc:225 +#: /var/www/fa2.3/devel/../includes/system_tests.inc:345 +#, php-format +msgid "'%s' is not writeable" +msgstr "'%s' no tiene permisos de escritura" + +#: /var/www/fa2.3/devel/../includes/system_tests.inc:221 +msgid "Temporary directory" +msgstr "Directorio temporal" + +#: /var/www/fa2.3/devel/../includes/system_tests.inc:233 +msgid "Language configuration consistency" +msgstr "Consistencia del lenguaje de configuración" + +#: /var/www/fa2.3/devel/../includes/system_tests.inc:242 +msgid "Languages folder should be writeable." +msgstr "La carpeta de idiomas debe tener permisos de escritura." + +#: /var/www/fa2.3/devel/../includes/system_tests.inc:250 +msgid "Languages configuration file should be writeable." +msgstr "El archivo de configuración d idiomas debe tener permisos de escritura." + +#: /var/www/fa2.3/devel/../includes/system_tests.inc:268 +#, php-format +msgid "Missing %s translation file." +msgstr "Falta archivo de traducción %s" + +#: /var/www/fa2.3/devel/../includes/system_tests.inc:273 +#, php-format +msgid "Missing system locale: %s" +msgstr "Falta configuración regional del sistema:" + +#: /var/www/fa2.3/devel/../includes/system_tests.inc:286 +msgid "Main config file" +msgstr "Archivo de configuración principal" + +#: /var/www/fa2.3/devel/../includes/system_tests.inc:293 +#: /var/www/fa2.3/devel/../includes/system_tests.inc:315 +#, php-format +msgid "Can't write '%s' file. Check FA directory write permissions." +msgstr "No se puede escribir el archivo '% s'. Compruebe que el sistema tiene permisos de escritura." + +#: /var/www/fa2.3/devel/../includes/system_tests.inc:294 +#: /var/www/fa2.3/devel/../includes/system_tests.inc:316 +#, php-format +msgid "'%s' file exists." +msgstr "Ya existe el archivo '%s'" + +#: /var/www/fa2.3/devel/../includes/system_tests.inc:298 +#, php-format +msgid "'%s' file should be read-only" +msgstr "El archivo '% s' debe ser de sólo lectura" + +#: /var/www/fa2.3/devel/../includes/system_tests.inc:307 +msgid "Database auth file" +msgstr "Archivo de autenticación de base de datos" + +#: /var/www/fa2.3/devel/../includes/system_tests.inc:320 +#, php-format +msgid "'%s' file should be read-only if you do not plan to add or change companies" +msgstr "El archivo '% s' debe ser de sólo lectura si no vas a agregar o cambiar empresa" + +#: /var/www/fa2.3/devel/../includes/system_tests.inc:331 +msgid "Extensions system" +msgstr "Sistema de Extensiones" + +#: /var/www/fa2.3/devel/../includes/system_tests.inc:366 +msgid "Extensions configuration files and directories should be writeable" +msgstr "Los archivos y directorios de configuración de extensiones deben tener permisos de escritura" + +#: /var/www/fa2.3/devel/../includes/system_tests.inc:378 +#, php-format +msgid "Non-standard theme directory '%s' is not writable" +msgstr "El directorio del tema '% S' no tiene permisos de escritura" + +#: /var/www/fa2.3/devel/../includes/system_tests.inc:388 +msgid "OpenSSL PHP extension have to be enabled to use extension repository system." +msgstr "La extension PHP OpenSSL tienen que estar habilitada para utilizar el sistema de repositorios." + +#: /var/www/fa2.3/devel/../includes/system_tests.inc:391 +msgid "OpenSSL have to be available on your server to use extension repository system." +msgstr "OpenSSL tienen que estar disponible en tu servidor para utilizar el sistema de repositorios." + +#: /var/www/fa2.3/devel/../includes/system_tests.inc:414 +msgid "Test" +msgstr "Prueba" + +#: /var/www/fa2.3/devel/../includes/system_tests.inc:414 +msgid "Test type" +msgstr "Tipo de prueba" + +#: /var/www/fa2.3/devel/../includes/system_tests.inc:414 +msgid "Value" +msgstr "Valor" + +#: /var/www/fa2.3/devel/../includes/system_tests.inc:414 +msgid "Comments" +msgstr "Comentarios" + +#: /var/www/fa2.3/devel/../includes/system_tests.inc:438 +msgid "Ok" +msgstr "Ok" + diff --git a/install/lang/fr_FR/LC_MESSAGES/fr_FR.mo b/install/lang/fr_FR/LC_MESSAGES/fr_FR.mo new file mode 100644 index 0000000000000000000000000000000000000000..6466405abe0b23f3e133a1143301ae21a98c6e15 GIT binary patch literal 9754 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 literal 0 HcmV?d00001 diff --git a/install/lang/fr_FR/LC_MESSAGES/fr_FR.po b/install/lang/fr_FR/LC_MESSAGES/fr_FR.po new file mode 100644 index 00000000..9d296a4c --- /dev/null +++ b/install/lang/fr_FR/LC_MESSAGES/fr_FR.po @@ -0,0 +1,462 @@ +# Frontaccounting ERP Installer +# Copyright (C) 2010 FrontAccounting LLC +# This file is distributed under the same license as the FrontAccounting package. +# Gaston \n" +# +msgid "" +msgstr "" +"Project-Id-Version: FrontAccounting 2.3.0\n" +"Report-Msgid-Bugs-To: \n" +"POT-Creation-Date: 2010-08-08 12:50+0200\n" +"PO-Revision-Date: 2010-08-08 12:48-0500\n" +"Last-Translator: Gaston \n" +"Language-Team: LANGUAGE \n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=ISO-8859-1\n" +"Content-Transfer-Encoding: 8bit\n" + +#: /var/www/fa2.3/devel/../install/index.php:20 +#: /var/www/fa2.3/devel/../install/index.php:40 +msgid "FrontAccouting ERP Installation Wizard" +msgstr "Outil d'installation assistée de FrontAccounting" + +#: /var/www/fa2.3/devel/../install/index.php:41 +#, php-format +msgid "Step %d: %s" +msgstr "Étape %d: %s" + +#: /var/www/fa2.3/devel/../install/index.php:48 +msgid "Chart of accounts" +msgstr "Charte des postes comptables" + +#: /var/www/fa2.3/devel/../install/index.php:48 +#: /var/www/fa2.3/devel/../install/index.php:75 +msgid "Encoding" +msgstr "Codage des caractères" + +#: /var/www/fa2.3/devel/../install/index.php:48 +#: /var/www/fa2.3/devel/../install/index.php:75 +msgid "Description" +msgstr "Description" + +#: /var/www/fa2.3/devel/../install/index.php:48 +#: /var/www/fa2.3/devel/../install/index.php:75 +msgid "Install" +msgstr "Installer" + +#: /var/www/fa2.3/devel/../install/index.php:65 +#: /var/www/fa2.3/devel/../install/index.php:93 +msgid "Installed" +msgstr "Installé" + +#: /var/www/fa2.3/devel/../install/index.php:75 +msgid "Language" +msgstr "Langue" + +#: /var/www/fa2.3/devel/../install/index.php:156 +msgid "Cannot save system configuration file 'config.php'." +msgstr "Impossible d'enregistrer le fichier 'config.php'" + +#: /var/www/fa2.3/devel/../install/index.php:173 +msgid "Cannot open 'config_db.php' configuration file." +msgstr "Impossible d'ouvrir le fichier 'config_db.php'" + +#: /var/www/fa2.3/devel/../install/index.php:176 +msgid "Cannot write to the 'config_db.php' configuration file." +msgstr "Impossible d'écrire dans le fichier 'config_db.php'" + +#: /var/www/fa2.3/devel/../install/index.php:179 +msgid "Configuration file 'config_db.php' is not writable. Change its permissions so it is, then re-run installation step." +msgstr "Il n'est pas possible d'écrire dans le fichier de configuration 'config_db.php'. Svp revoir les permissions et recommencer le processus d'installation." + +#: /var/www/fa2.3/devel/../install/index.php:217 +msgid "Host name cannot be empty." +msgstr "Le nom du Host ne peut être vide." + +#: /var/www/fa2.3/devel/../install/index.php:221 +msgid "Database user name cannot be empty." +msgstr "Svp un code d'utilisateur pour cette BD" + +#: /var/www/fa2.3/devel/../install/index.php:225 +msgid "Database name cannot be empty." +msgstr "Svp préciser le nom de la BD" + +#: /var/www/fa2.3/devel/../install/index.php:277 +msgid "Company name cannot be empty." +msgstr "SVP préciser le nom de la compagnie" + +#: /var/www/fa2.3/devel/../install/index.php:281 +msgid "Company admin name cannot be empty." +msgstr "SVP préciser le nom de l'administrateur " + +#: /var/www/fa2.3/devel/../install/index.php:285 +msgid "Company admin password cannot be empty." +msgstr "SVP préciser le mot de passe de l'administrateur" + +#: /var/www/fa2.3/devel/../install/index.php:289 +msgid "Company admin passwords differ." +msgstr "Les 2 entrées de mot de passe diffèrent." + +#: /var/www/fa2.3/devel/../install/index.php:320 +msgid "System Diagnostics" +msgstr "Diagnostique du système" + +#: /var/www/fa2.3/devel/../install/index.php:323 +msgid "Select install wizard language:" +msgstr "Svp choisir la langue d'installation." + +#: /var/www/fa2.3/devel/../install/index.php:329 +msgid "All application preliminary requirements seems to be correct. Please press Continue button below." +msgstr "Tous les pré-requis semblent corrects. Svp appuyez sur le bouton Continuer situé ci-après" + +#: /var/www/fa2.3/devel/../install/index.php:330 +#: /var/www/fa2.3/devel/../install/index.php:356 +#: /var/www/fa2.3/devel/../install/index.php:363 +#: /var/www/fa2.3/devel/../install/index.php:370 +#: /var/www/fa2.3/devel/../install/index.php:389 +msgid "Continue >>" +msgstr "Continuer >>" + +#: /var/www/fa2.3/devel/../install/index.php:332 +msgid "Application cannot be installed. Please fix problems listed below in red, and press Refresh button." +msgstr "L'application n'a pu être installée. Svp résoudre le problème libellé en rouge et appuyez sur le bouton Actualiser" + +#: /var/www/fa2.3/devel/../install/index.php:333 +msgid "Refresh" +msgstr "Actualiser" + +#: /var/www/fa2.3/devel/../install/index.php:343 +msgid "Database Server Settings" +msgstr "Réglages de la BD" + +#: /var/www/fa2.3/devel/../install/index.php:345 +msgid "Server Host:" +msgstr "Nom du serveur:" + +#: /var/www/fa2.3/devel/../install/index.php:346 +msgid "Database User:" +msgstr "ID de l'utilisateur de la BD:" + +#: /var/www/fa2.3/devel/../install/index.php:347 +msgid "Database Password:" +msgstr "Mot de passe :" + +#: /var/www/fa2.3/devel/../install/index.php:348 +msgid "Database Name:" +msgstr "Nom de la BD:" + +#: /var/www/fa2.3/devel/../install/index.php:349 +msgid "Use '0_' Table Prefix:" +msgstr "Utilisez le préfix de table '0_':" + +#: /var/www/fa2.3/devel/../install/index.php:349 +#: /var/www/fa2.3/devel/../includes/system_tests.inc:38 +#: /var/www/fa2.3/devel/../includes/system_tests.inc:113 +#: /var/www/fa2.3/devel/../includes/system_tests.inc:126 +msgid "Yes" +msgstr "Oui" + +#: /var/www/fa2.3/devel/../install/index.php:349 +#: /var/www/fa2.3/devel/../includes/system_tests.inc:38 +#: /var/www/fa2.3/devel/../includes/system_tests.inc:113 +#: /var/www/fa2.3/devel/../includes/system_tests.inc:126 +msgid "No" +msgstr "Non" + +#: /var/www/fa2.3/devel/../install/index.php:350 +msgid "Install Additional Language Packs from FA Repository:" +msgstr "Installer d'autres langues:" + +#: /var/www/fa2.3/devel/../install/index.php:351 +msgid "Install Additional COAs from FA Repository:" +msgstr "Installer d'autres COAs à partir du dépôt de FA:" + +#: /var/www/fa2.3/devel/../install/index.php:353 +msgid "Use table prefix if you share selected database for more than one FA company." +msgstr "Svp utiliser un préfixe de table si vous partagez la BD pour plus d'une compagnie." + +#: /var/www/fa2.3/devel/../install/index.php:354 +msgid "Do not select additional langs nor COAs if you have no working internet connection right now. You can install them later." +msgstr "Ne pas sélectionner d'autres langues (ni COA) si votre connection internet n'est pas active en ce moment. Vous pourrez le faire plus tard." + +#: /var/www/fa2.3/devel/../install/index.php:355 +#: /var/www/fa2.3/devel/../install/index.php:362 +#: /var/www/fa2.3/devel/../install/index.php:369 +#: /var/www/fa2.3/devel/../install/index.php:388 +msgid "<< Back" +msgstr "<< Retour" + +#: /var/www/fa2.3/devel/../install/index.php:360 +msgid "User Interface Languages Selection" +msgstr "Sélection de la langue :" + +#: /var/www/fa2.3/devel/../install/index.php:367 +msgid "Charts of Accounts Selection" +msgstr "Sélection de la charte des postes comptables" + +#: /var/www/fa2.3/devel/../install/index.php:379 +msgid "Company Settings" +msgstr "Réglages systèmes de la compagnie" + +#: /var/www/fa2.3/devel/../install/index.php:381 +msgid "Company Name:" +msgstr "Nom de la compagnie:" + +#: /var/www/fa2.3/devel/../install/index.php:382 +msgid "Admin Login:" +msgstr "Identifiant d'administrateur:" + +#: /var/www/fa2.3/devel/../install/index.php:383 +msgid "Admin Password:" +msgstr "Mot de passe de l'administrateur:" + +#: /var/www/fa2.3/devel/../install/index.php:384 +msgid "Reenter Password:" +msgstr "Saisir de nouveau le mot de passe:" + +#: /var/www/fa2.3/devel/../install/index.php:385 +msgid "Select Chart of Accounts:" +msgstr "Sélectionner la charte de postes comptables:" + +#: /var/www/fa2.3/devel/../install/index.php:386 +msgid "Select Default Language:" +msgstr "Sélectionner la langue par défaut:" + +#: /var/www/fa2.3/devel/../install/index.php:393 +msgid "FrontAccounting ERP has been installed successsfully." +msgstr "L'installation de FrontAccounting est un succès." + +#: /var/www/fa2.3/devel/../install/index.php:394 +msgid "Please do not forget to remove install wizard folder." +msgstr "Svp ne pas oublier de retirer le répertoire d'installation." + +#: /var/www/fa2.3/devel/../install/index.php:396 +msgid "Click here to start." +msgstr "Appuyez ici pour démarrer." + +#: /var/www/fa2.3/devel/../includes/system_tests.inc:15 +msgid "Info" +msgstr "Information" + +#: /var/www/fa2.3/devel/../includes/system_tests.inc:16 +msgid "Optional" +msgstr "Optionnel" + +#: /var/www/fa2.3/devel/../includes/system_tests.inc:17 +msgid "Recommended" +msgstr "Recommandé" + +#: /var/www/fa2.3/devel/../includes/system_tests.inc:18 +msgid "Required " +msgstr "Requis" + +#: /var/www/fa2.3/devel/../includes/system_tests.inc:24 +msgid "MySQL version" +msgstr "Version de MySQL" + +#: /var/www/fa2.3/devel/../includes/system_tests.inc:28 +msgid "Upgrade MySQL server to version at least 4.1" +msgstr "Mettre à niveau MySQL à la vesion 4.1 et plus" + +#: /var/www/fa2.3/devel/../includes/system_tests.inc:35 +msgid "PHP MySQL extension" +msgstr "Extension MySQL de PHP" + +#: /var/www/fa2.3/devel/../includes/system_tests.inc:40 +msgid "Your PHP has to have MySQL extension enabled." +msgstr "SVP activer l'extension MySQL de votre PHP" + +#: /var/www/fa2.3/devel/../includes/system_tests.inc:46 +msgid "PHP version" +msgstr "Version de PHP" + +#: /var/www/fa2.3/devel/../includes/system_tests.inc:50 +msgid "Upgrade PHP to version at least 4.3.3" +msgstr "Mettre à niveau PHP à la version 4.3.3 et plus" + +#: /var/www/fa2.3/devel/../includes/system_tests.inc:57 +msgid "Server system" +msgstr "Système serveur" + +#: /var/www/fa2.3/devel/../includes/system_tests.inc:67 +msgid "Session save path" +msgstr "Chemin d'accès à la sauvegarde de la session" + +#: /var/www/fa2.3/devel/../includes/system_tests.inc:79 +msgid "Removed install wizard folder" +msgstr "Le répertoire d'installation a été retiré." + +#: /var/www/fa2.3/devel/../includes/system_tests.inc:82 +msgid "Not removed" +msgstr "Non retiré" + +#: /var/www/fa2.3/devel/../includes/system_tests.inc:83 +msgid "Remove or rename install wizard folder for security reasons." +msgstr "Pour des raisons de sécurité, vous devez retirer ou renommer le répertoire d'installation." + +#: /var/www/fa2.3/devel/../includes/system_tests.inc:90 +msgid "Browser type" +msgstr "Type de navigateur" + +#: /var/www/fa2.3/devel/../includes/system_tests.inc:94 +msgid "Any browser is supported" +msgstr "Tous les navigateurs sont supportés" + +#: /var/www/fa2.3/devel/../includes/system_tests.inc:101 +msgid "Http server type" +msgstr "Type de serveur Http" + +#: /var/www/fa2.3/devel/../includes/system_tests.inc:105 +msgid "Any server is supported" +msgstr "Tous les serveurs sont supportés" + +#: /var/www/fa2.3/devel/../includes/system_tests.inc:112 +msgid "Native gettext" +msgstr "Gettext natif" + +#: /var/www/fa2.3/devel/../includes/system_tests.inc:116 +msgid "In case of no gettext support, php emulation is used" +msgstr "Si gettext est non supporté, l'émulation php sera utilisée" + +#: /var/www/fa2.3/devel/../includes/system_tests.inc:124 +msgid "Debugging mode" +msgstr "Mode de débuggage" + +#: /var/www/fa2.3/devel/../includes/system_tests.inc:128 +msgid "To switch debugging on set $go_debug>0 in config.php file" +msgstr "Pour activer le code de débug, modifier $go_debug>0 dans le fichier config.php" + +#: /var/www/fa2.3/devel/../includes/system_tests.inc:137 +msgid "Error logging" +msgstr "Enregistrement des erreurs" + +#: /var/www/fa2.3/devel/../includes/system_tests.inc:145 +msgid "Disabled" +msgstr "Désactivé" + +#: /var/www/fa2.3/devel/../includes/system_tests.inc:148 +msgid "To switch error logging set $error_logging in config.php file" +msgstr "Pour activer l'enregistrement des erreurs, modifiez $error_logging dans le fichier de configuration config.php" + +#: /var/www/fa2.3/devel/../includes/system_tests.inc:151 +msgid "Log file is not writeable" +msgstr "Impossible d'écrire dans le fichier de log" + +#: /var/www/fa2.3/devel/../includes/system_tests.inc:161 +msgid "Current database version" +msgstr "Version de la BD" + +#: /var/www/fa2.3/devel/../includes/system_tests.inc:165 +msgid "Database structure seems to be not upgraded to current version" +msgstr "La structure de la BD ne semble pas être de niveau avec la version actuelle" + +#: /var/www/fa2.3/devel/../includes/system_tests.inc:180 +msgid "Company subdirectories consistency" +msgstr "Cohérence des sous-répertoire de la compagnie" + +#: /var/www/fa2.3/devel/../includes/system_tests.inc:193 +#: /var/www/fa2.3/devel/../includes/system_tests.inc:200 +#: /var/www/fa2.3/devel/../includes/system_tests.inc:208 +#: /var/www/fa2.3/devel/../includes/system_tests.inc:225 +#: /var/www/fa2.3/devel/../includes/system_tests.inc:345 +#, php-format +msgid "'%s' is not writeable" +msgstr "Il est impossible d'écrire dans '%s' " + +#: /var/www/fa2.3/devel/../includes/system_tests.inc:221 +msgid "Temporary directory" +msgstr "Répertoire temporaire" + +#: /var/www/fa2.3/devel/../includes/system_tests.inc:233 +msgid "Language configuration consistency" +msgstr "Cohérence de la configuration de la langue" + +#: /var/www/fa2.3/devel/../includes/system_tests.inc:242 +msgid "Languages folder should be writeable." +msgstr "Les répertoires de langue doivent avoir un accès en écriture" + +#: /var/www/fa2.3/devel/../includes/system_tests.inc:250 +msgid "Languages configuration file should be writeable." +msgstr "Le fichier de configuration de langues doit être accessible en écriture" + +#: /var/www/fa2.3/devel/../includes/system_tests.inc:268 +#, php-format +msgid "Missing %s translation file." +msgstr "Le fichier de traduction '%s' est manquant" + +#: /var/www/fa2.3/devel/../includes/system_tests.inc:273 +#, php-format +msgid "Missing system locale: %s" +msgstr "Il manque '%s'" + +#: /var/www/fa2.3/devel/../includes/system_tests.inc:286 +msgid "Main config file" +msgstr "Fichier de configuration" + +#: /var/www/fa2.3/devel/../includes/system_tests.inc:293 +#: /var/www/fa2.3/devel/../includes/system_tests.inc:315 +#, php-format +msgid "Can't write '%s' file. Check FA directory write permissions." +msgstr "Impossible d'écrire '%s'. Svp vérifier les permissions d'écriture sur le répertoire de FA" + +#: /var/www/fa2.3/devel/../includes/system_tests.inc:294 +#: /var/www/fa2.3/devel/../includes/system_tests.inc:316 +#, php-format +msgid "'%s' file exists." +msgstr "Fichier '%s' existant." + +#: /var/www/fa2.3/devel/../includes/system_tests.inc:298 +#, php-format +msgid "'%s' file should be read-only" +msgstr "'%s' doit être en lecture seule." + +#: /var/www/fa2.3/devel/../includes/system_tests.inc:307 +msgid "Database auth file" +msgstr "Fichier d'autorisation de la BD" + +#: /var/www/fa2.3/devel/../includes/system_tests.inc:320 +#, php-format +msgid "'%s' file should be read-only if you do not plan to add or change companies" +msgstr "Le fichier '%s' devrait être en lecture seule si vous ne prévoyez pas ajouter ou changer les compagnies." + +#: /var/www/fa2.3/devel/../includes/system_tests.inc:331 +msgid "Extensions system" +msgstr "Système des extensions" + +#: /var/www/fa2.3/devel/../includes/system_tests.inc:366 +msgid "Extensions configuration files and directories should be writeable" +msgstr "Les répertoires et fichiers de configuration des extensions doivent accepter les écritures" + +#: /var/www/fa2.3/devel/../includes/system_tests.inc:378 +#, php-format +msgid "Non-standard theme directory '%s' is not writable" +msgstr "Le répertoire de thèmes non-standards '%s' n'accepte pas les écritures" + +#: /var/www/fa2.3/devel/../includes/system_tests.inc:388 +msgid "OpenSSL PHP extension have to be enabled to use extension repository system." +msgstr "Les extensions OpenSSL de PHP doivent être activées pour utiliser le système de dépôt des extensions" + +#: /var/www/fa2.3/devel/../includes/system_tests.inc:391 +msgid "OpenSSL have to be available on your server to use extension repository system." +msgstr "Les extensions OpenSSL de PHP doivent être disponibles pour utiliser le système de dépôt des extensions" + +#: /var/www/fa2.3/devel/../includes/system_tests.inc:414 +msgid "Test" +msgstr "Test" + +#: /var/www/fa2.3/devel/../includes/system_tests.inc:414 +msgid "Test type" +msgstr "Type de test" + +#: /var/www/fa2.3/devel/../includes/system_tests.inc:414 +msgid "Value" +msgstr "Valeur" + +#: /var/www/fa2.3/devel/../includes/system_tests.inc:414 +msgid "Comments" +msgstr "Commentaires" + +#: /var/www/fa2.3/devel/../includes/system_tests.inc:438 +msgid "Ok" +msgstr "Ok" + diff --git a/install/lang/id_ID/LC_MESSAGES/id_ID.mo b/install/lang/id_ID/LC_MESSAGES/id_ID.mo new file mode 100644 index 0000000000000000000000000000000000000000..c6ca28bc2040a1ac9da4d3b826933a3d1ea674f1 GIT binary patch literal 9336 zcmb`MUyNPHUB@R)3eZFdDd(Z5> z$M@WGF6WQeTTw*85~2xGUs~}{QME)uLR6*vsVX5!I!|F1bg87!7*sS-vB=Z{tNg)@JC<|Jb1v5-v&=| ze-nHh{A=(D@V~$(!9(}@^{;>;Uk3gR_$r79>MP(+fqw-4H25v>W8ine!{C2_4}lLL zoXCF+`~`3wEWqm^L)5>4BIldnec=0<^nUQ8p!Cmy(*JDezYKnq`vjZ^Ujb#^?}0Mz zKS7!I9Z=+aADuhk{h-{x3i3#O0Xz-<0VsO@SMV74zu+%|ZIt=*;3g>h8-qu|&w}@W z-vmYfe+fPYz7ER!Z-A&;9pWWf?{QG}eH@$vUjh$-zYG2x_-7#h)Zg+)^!$U+|07W3 zd;sAPNqr1_4|oKWd5(dy&wl7H!1LT+2QPxJgR=fXlz9+*5R~z=pvZYL+~*)e)vtrH zpU;EBi{AsqZr=xGKmQGiyzhWwmk%4bJ_GWK`W=ve>P!3) z{rw3j^Zo^R0{k|33Va)!0iT3yqNfP_S@3h z3&;@lcf2fo`62iscsI@<`*<0I>gon4^8Xena(^DY0)7<~`^#o!zaQpL1|9`v{A=K4 z@EhPU@Lnc83NC;P;B`>u{}zZS>UB`&`v*|$@;{*1{T)!&y^n`&P=hkhMNs_cCin>W z$Dr{1```e48x%RZANKy8fx?sD26?2u2#Vgm0g4{J1G1F*Cs5{n3l#r(2+|3EUk2s* z=RlGBHBjvNb?~#`Ux6a`Cm@B)cNUa=UIC%J`Z6eTe;pLN{SXv89YFcA&lY$BoCn4J zH$Vw>p8+2SZ-OGnpM$cGe-6*z0Qslh|{1*QLKQ2gowcnN$i;A^1l_bpKPs~+}zJqSL@?MFb_*CvQ6)mC`^ zo8TGlUj=3Ve-Da2-vq_ZchM<)I0zz=dK45pu7D!X^B~ky5h!~2HBi=n1;jPf?}Nhk zKLtg;Z-N)VZ-eK+`yh$v=S7e%brTdm{2}-$@NYmUs~-Be*T-@2Ztmwn;qhtkE>QL+ zm*{k!_RBQ!SJ_*A{SrT9jmtFAt?WZC;elMjlc#ALG?sPoWEGV4m2u2Zz*G|44bX)Cn)x~Kjz zg<|s-ZI*@!oNoY*`;q+M68pV}c1UifuBGr>_#n0xp4FFdPy9nJ;q4r4MsB#o-aXpG za>FJ5zeRh7_5#h)>Pvj-e7Lz7(D}vTL&age6(?5P8*xzRjsh#3sA*#2tC?oSUr=Qrg_J&jtRt%1oAZA+V8FRQSkT9lqbx)ws0UbhLmV>4k=2q;Cy7Q8?vymf!{D5vd z`hpqRPII?zON`!U=J41!wxtZx6XV&@xZH7bxhedZaUkKl9amt8tu32R=DG7KMb)h> zhm(kw3n59`+d;XOC6cgbj5>k0^yTdsyn=vo7;)QHeKu9bs7US4>obC&SWN2l>--;CSCjM zt(l-G^Qu=?&|uo>h2_<_pPL9jgCD)HhdrWK;_0_p!gi}Zaj36HS!C6cEqZx8cH~=% z3(<3=mVC@B94#f}#q!)FnjqMh7?47N-V34SZbwtZvkJwslRY`&aP2Lixb1$v7VWXKN&@Lf_#n7On?3KX#d9+R5v& z&h>Z2VZD!)+Rda$ktGo<-hWiq_lbTgMEH!mYREi@z+&FxRwYefs6%AV+@wWNqt68O z!;l4%tY;G2VXRu+S%2<)6B90=dpI6Uqb_9pOIzqZjWD)ju${_LE`v>p=4ycpI4_wz zyN(Vo4%J1n)%yB*y>@nuawX6k{;`bD@HTbMD0diqYE0f3Gi0xJGuhPZ=DLX!nL$Gu z3K=vRDEF@B^A4{>IiMDmr^g8!qo)+sPTazXQ6?o6^#b&_5&~hI z6h3X4E!Qi;xh>PPja>^psluK&NoCb#TPSiB)I?}W3<&NVY?njm;Hho3mS@+HrL_{Z zp7+&6M<0;bo0qNCq8~@C(^bD{ZDe$>UEF9bLRWFL7I~krb7XdIwl#a4e|qjn=h*CH zvqxrU8Q8jHugAih-Q!N^xf7kECmx%9l5ywJb!#JpxGeAJ4G>9opz*p7(t4Z*5pJ>Y$kjjTI>FGHcJ6e+0;~bab^eH(e<*a{dbK^|w_+*?2Nfp_uvwcS&@5beUPqv=1sijmG z>Cb0Flf<94T2@#~sNj>$*D(D{qQM0_vljxlsf>r2u#^R z-W-~gtSzTP*I8I(s)}^SNU#Ve!8frvy2V>Cg`jJjq3+f5~R z{YvhrPOHKUj7j~$(7zTLTpmX*D~?LBI(bT;v%H+d%AE|!-kkb6>KtrcZ{H*{GW(LicNxdnby! zX4?!V2Qj2$*=vTGqiR^C{dOJ7_B>Gw&4NxL_0D`uM38!I6wx*DFxDee7!l10?(!ym z*qW&2<(R>Lk#btr)ykBc5?9-5BOY_8^(RJd#0Y-P5gQ(gjnR23dKGPyIBP=#4y!hg zhlRm;huREL&eT{5t3wDEON`hx^Qg9tuO7} zgp>b{%bqrU*({b)YjzYTu@Ix%bhgzwNFg+d(^zx#tcGY@>d2T!nVcw1t}d975d{Uh zO2Tq=?WD^O3FpOTVC@N6V#S2RjI`T#t~N#A|Ie2S1Z{g+AXO0e4pP)dO$-)Jq2A1s zmwiyUgNnoKHMzapw)LiXc*7+E$qc8Lq|#_M?c;*@z1V-^3u@wYr{{D9fVV^eZ@W6ZH6{uvx9;~7P%7q=$vb|JoIkO)j}W&GmpeE^-t{4h5V6~y>l{Ug z97QLy78WJK5<(~+d#Vxk52sQhl+W!1lId;TD%EY5TIED4zS%Q*j0T6KA!3Ha?=_oV z!_)C@wG^kEMTcd)1>MxM=$xTrp+BmZSnRxjd`-xfpgi%2J#id&;60)ft7<G>}wbcs*Mnqn5!b_rX$JqJ{RG7vyXdoxo z+nUG);=sHC2U+#3S1AOoQQaj_`+EUp)Dxb`f;Lr$5rqxGL1ea}&l+pK)E)g}Q3b zZ8B2Y4}_>?o-%dq9#aQgLO)dkRV7m~9cp%`Emxh@N$y=vDJ8W@CgL`S-4LU>SH6V0 z=A%qfQ6fo^=e9cK(%as>8ux2^O-hoDu!gYR6*8_4s)pR_p+sI+<#kk3=&&3*^l=OR zm$7_8l5N&z*}V{cK8iIal)7g~0dI&(VRcv4?0q5FX^Dy|Po#2EYc63@unGyqRsE&A%xJ2QLVuz&DZ~~@|@wFPy{RC5# zEZqMFAt=k?7s65zmi*WZl@0MOBn9_nbH6+?!=ksIiXo6Iw0apIjHEJ~nl4oGdxLtI z=GGJPWG4Cc\n" +"Language-Team: Indonesan \n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=UTF-8\n" +"Content-Transfer-Encoding: 8bit\n" +"X-Generator: Lokalize 1.0\n" +"Plural-Forms: nplurals=2; plural=(n != 1);\n" + +#: /var/www/fa2.3/devel/../install/index.php:20 +#: /var/www/fa2.3/devel/../install/index.php:40 +msgid "FrontAccouting ERP Installation Wizard" +msgstr "Wisaya Instalasi Front Accounting ERP" + +#: /var/www/fa2.3/devel/../install/index.php:41 +#, php-format +msgid "Step %d: %s" +msgstr "Langkah %d: %s" + +#: /var/www/fa2.3/devel/../install/index.php:48 +msgid "Chart of accounts" +msgstr "Bagan akun" + +#: /var/www/fa2.3/devel/../install/index.php:48 +#: /var/www/fa2.3/devel/../install/index.php:75 +msgid "Encoding" +msgstr "Encoding" + +#: /var/www/fa2.3/devel/../install/index.php:48 +#: /var/www/fa2.3/devel/../install/index.php:75 +msgid "Description" +msgstr "Penjelasan" + +#: /var/www/fa2.3/devel/../install/index.php:48 +#: /var/www/fa2.3/devel/../install/index.php:75 +msgid "Install" +msgstr "Instal" + +#: /var/www/fa2.3/devel/../install/index.php:65 +#: /var/www/fa2.3/devel/../install/index.php:93 +msgid "Installed" +msgstr "Telah diinstal" + +#: /var/www/fa2.3/devel/../install/index.php:75 +msgid "Language" +msgstr "Bahasa" + +#: /var/www/fa2.3/devel/../install/index.php:156 +msgid "Cannot save system configuration file 'config.php'." +msgstr "Tidak dapat menyimpan file konfigurasi 'config.php'." + +#: /var/www/fa2.3/devel/../install/index.php:173 +msgid "Cannot open 'config_db.php' configuration file." +msgstr "Tidak dapat membuka file konfigurasi 'config_db.php'." + +#: /var/www/fa2.3/devel/../install/index.php:176 +msgid "Cannot write to the 'config_db.php' configuration file." +msgstr "Tidak dapat melakukan penulisan file konfigurasi 'config_db.php'." + +#: /var/www/fa2.3/devel/../install/index.php:179 +msgid "" +"Configuration file 'config_db.php' is not writable. Change its permissions " +"so it is, then re-run installation step." +msgstr "" +"File konfigurasi 'config_db.php' tidak dapat ditulisi. Ubah hak aksesnya, " +"lalu ulangi tahapan instalasi." + +#: /var/www/fa2.3/devel/../install/index.php:217 +msgid "Host name cannot be empty." +msgstr "Nama host tidak boleh dikosongkan." + +#: /var/www/fa2.3/devel/../install/index.php:221 +msgid "Database user name cannot be empty." +msgstr "Nama user database tidak boleh dikosongkan." + +#: /var/www/fa2.3/devel/../install/index.php:225 +msgid "Database name cannot be empty." +msgstr "Nama data base tidak boleh dikosongkan." + +#: /var/www/fa2.3/devel/../install/index.php:277 +msgid "Company name cannot be empty." +msgstr "Nama perusahaan tidak boleh dikosongkan." + +#: /var/www/fa2.3/devel/../install/index.php:281 +msgid "Company admin name cannot be empty." +msgstr "Nama admin perusahaan tidak boleh dikosongkan." + +#: /var/www/fa2.3/devel/../install/index.php:285 +msgid "Company admin password cannot be empty." +msgstr "Kata sandi admin perusahaan tidak boleh dikosongkan." + +#: /var/www/fa2.3/devel/../install/index.php:289 +msgid "Company admin passwords differ." +msgstr "Kata sandi admin perusahaan tidak sama." + +#: /var/www/fa2.3/devel/../install/index.php:320 +msgid "System Diagnostics" +msgstr "Pemeriksaan Sistem" + +#: /var/www/fa2.3/devel/../install/index.php:323 +msgid "Select install wizard language:" +msgstr "Pilih bahasa yg akan digunakan:" + +#: /var/www/fa2.3/devel/../install/index.php:329 +msgid "" +"All application preliminary requirements seems to be correct. Please press " +"Continue button below." +msgstr "" +"Seluruh kebutuhan yg disyaratkan aplikasi telah sesuai. Harap tekan tombol " +"Lanjutkan dibawah." + +#: /var/www/fa2.3/devel/../install/index.php:330 +#: /var/www/fa2.3/devel/../install/index.php:356 +#: /var/www/fa2.3/devel/../install/index.php:363 +#: /var/www/fa2.3/devel/../install/index.php:370 +#: /var/www/fa2.3/devel/../install/index.php:389 +msgid "Continue >>" +msgstr "Lanjutkan =>" + +#: /var/www/fa2.3/devel/../install/index.php:332 +msgid "" +"Application cannot be installed. Please fix problems listed below in red, " +"and press Refresh button." +msgstr "" +"Aplikasi tidak dapat diinstalasi. Harap perbaiki masalah yg ditandai merah " +"dibawah, dan tekan tombol MuatUlang." + +#: /var/www/fa2.3/devel/../install/index.php:333 +msgid "Refresh" +msgstr "MuatUlang" + +#: /var/www/fa2.3/devel/../install/index.php:343 +msgid "Database Server Settings" +msgstr "Seting server database" + +#: /var/www/fa2.3/devel/../install/index.php:345 +msgid "Server Host:" +msgstr "Host server:" + +#: /var/www/fa2.3/devel/../install/index.php:346 +msgid "Database User:" +msgstr "Nama user database :" + +#: /var/www/fa2.3/devel/../install/index.php:347 +msgid "Database Password:" +msgstr "Kata sandi untuk database:" + +#: /var/www/fa2.3/devel/../install/index.php:348 +msgid "Database Name:" +msgstr "Nama Database:" + +#: /var/www/fa2.3/devel/../install/index.php:349 +msgid "Use '0_' Table Prefix:" +msgstr "Gunakan awalan tabel '0_':" + +#: /var/www/fa2.3/devel/../install/index.php:349 +#: /var/www/fa2.3/devel/../includes/system_tests.inc:38 +#: /var/www/fa2.3/devel/../includes/system_tests.inc:113 +#: /var/www/fa2.3/devel/../includes/system_tests.inc:126 +msgid "Yes" +msgstr "Ya " + +#: /var/www/fa2.3/devel/../install/index.php:349 +#: /var/www/fa2.3/devel/../includes/system_tests.inc:38 +#: /var/www/fa2.3/devel/../includes/system_tests.inc:113 +#: /var/www/fa2.3/devel/../includes/system_tests.inc:126 +msgid "No" +msgstr "Tidak" + +#: /var/www/fa2.3/devel/../install/index.php:350 +msgid "Install Additional Language Packs from FA Repository:" +msgstr "Install tambahan bahasa dari repositori FA:" + +#: /var/www/fa2.3/devel/../install/index.php:351 +msgid "Install Additional COAs from FA Repository:" +msgstr "Install tambahan bagan akun dari repositori FA:" + +#: /var/www/fa2.3/devel/../install/index.php:353 +msgid "" +"Use table prefix if you share selected database for more than one FA company." +msgstr "" +"Gunakan awalan tabel jika anda menggunakan database yg sama untuk beberapa " +"perusahaan di FA." + +#: /var/www/fa2.3/devel/../install/index.php:354 +msgid "" +"Do not select additional langs nor COAs if you have no working internet " +"connection right now. You can install them later." +msgstr "" +"Jangan pilih tambahan bahasa atau bagan akun jika anda tidak memiliki " +"sambungan internet sekaran. Anda dapat menginstalnya nanti." + +#: /var/www/fa2.3/devel/../install/index.php:355 +#: /var/www/fa2.3/devel/../install/index.php:362 +#: /var/www/fa2.3/devel/../install/index.php:369 +#: /var/www/fa2.3/devel/../install/index.php:388 +msgid "<< Back" +msgstr "<= Kembali" + +#: /var/www/fa2.3/devel/../install/index.php:360 +msgid "User Interface Languages Selection" +msgstr "Pilihan bahasa antarmuka" + +#: /var/www/fa2.3/devel/../install/index.php:367 +msgid "Charts of Accounts Selection" +msgstr "Pemilihan bagan akun." + +#: /var/www/fa2.3/devel/../install/index.php:379 +msgid "Company Settings" +msgstr "Seting Perusahaan" + +#: /var/www/fa2.3/devel/../install/index.php:381 +msgid "Company Name:" +msgstr "Nama Perusahaan:" + +#: /var/www/fa2.3/devel/../install/index.php:382 +msgid "Admin Login:" +msgstr "Login Admin:" + +#: /var/www/fa2.3/devel/../install/index.php:383 +msgid "Admin Password:" +msgstr "Kata sandi Admin:" + +#: /var/www/fa2.3/devel/../install/index.php:384 +msgid "Reenter Password:" +msgstr "Ulangi masukkan kata sandi:" + +#: /var/www/fa2.3/devel/../install/index.php:385 +msgid "Select Chart of Accounts:" +msgstr "Pilih bagan akun:" + +#: /var/www/fa2.3/devel/../install/index.php:386 +msgid "Select Default Language:" +msgstr "Pilih bahasa default:" + +#: /var/www/fa2.3/devel/../install/index.php:393 +msgid "FrontAccounting ERP has been installed successsfully." +msgstr "FrontAccounting ERP telah diinstalasi dengan sukses." + +#: /var/www/fa2.3/devel/../install/index.php:394 +msgid "Please do not forget to remove install wizard folder." +msgstr "Harap jangan lupa menghapus direktori wisaya instalasi." + +#: /var/www/fa2.3/devel/../install/index.php:396 +msgid "Click here to start." +msgstr "Klik disini untuk memulai." + +#: /var/www/fa2.3/devel/../includes/system_tests.inc:15 +msgid "Info" +msgstr "Info" + +#: /var/www/fa2.3/devel/../includes/system_tests.inc:16 +msgid "Optional" +msgstr "Opsional" + +#: /var/www/fa2.3/devel/../includes/system_tests.inc:17 +msgid "Recommended" +msgstr "Direkomendasikan" + +#: /var/www/fa2.3/devel/../includes/system_tests.inc:18 +msgid "Required " +msgstr "Diperlukan" + +#: /var/www/fa2.3/devel/../includes/system_tests.inc:24 +msgid "MySQL version" +msgstr "Versi MySQL" + +#: /var/www/fa2.3/devel/../includes/system_tests.inc:28 +msgid "Upgrade MySQL server to version at least 4.1" +msgstr "Upgrade server MySQL minimal ke versi 4.1" + +#: /var/www/fa2.3/devel/../includes/system_tests.inc:35 +msgid "PHP MySQL extension" +msgstr "Ekstensi PHP MySQL" + +#: /var/www/fa2.3/devel/../includes/system_tests.inc:40 +msgid "Your PHP has to have MySQL extension enabled." +msgstr "PHP anda harus memiliki ekstensi MySQL yg diaktifkan." + +#: /var/www/fa2.3/devel/../includes/system_tests.inc:46 +msgid "PHP version" +msgstr "Versi PHP" + +#: /var/www/fa2.3/devel/../includes/system_tests.inc:50 +msgid "Upgrade PHP to version at least 4.3.3" +msgstr "Upgrade PHP minimal ke versi 4.3.3" + +#: /var/www/fa2.3/devel/../includes/system_tests.inc:57 +msgid "Server system" +msgstr "Sistem server" + +#: /var/www/fa2.3/devel/../includes/system_tests.inc:67 +msgid "Session save path" +msgstr "Lokasi penyimpanan sesi" + +#: /var/www/fa2.3/devel/../includes/system_tests.inc:79 +msgid "Removed install wizard folder" +msgstr "Direktori wisaya instalasi dihapus" + +#: /var/www/fa2.3/devel/../includes/system_tests.inc:82 +msgid "Not removed" +msgstr "Tidak dihapus" + +#: /var/www/fa2.3/devel/../includes/system_tests.inc:83 +msgid "Remove or rename install wizard folder for security reasons." +msgstr "Hapus atau ganti nama direktori wisaya instalasi demi alasan keamanan." + +#: /var/www/fa2.3/devel/../includes/system_tests.inc:90 +msgid "Browser type" +msgstr "Tipe browser" + +#: /var/www/fa2.3/devel/../includes/system_tests.inc:94 +msgid "Any browser is supported" +msgstr "Browser apa saja didukung." + +#: /var/www/fa2.3/devel/../includes/system_tests.inc:101 +msgid "Http server type" +msgstr "Tipe server http" + +#: /var/www/fa2.3/devel/../includes/system_tests.inc:105 +msgid "Any server is supported" +msgstr "Server apa saja didukung" + +#: /var/www/fa2.3/devel/../includes/system_tests.inc:112 +msgid "Native gettext" +msgstr "Gettext alami" + +#: /var/www/fa2.3/devel/../includes/system_tests.inc:116 +msgid "In case of no gettext support, php emulation is used" +msgstr "Jika tidak ada dukungan gettext, emulasi php yg digunakan" + +#: /var/www/fa2.3/devel/../includes/system_tests.inc:124 +msgid "Debugging mode" +msgstr "Mode pencarian kesalahan." + +#: /var/www/fa2.3/devel/../includes/system_tests.inc:128 +msgid "To switch debugging on set $go_debug>0 in config.php file" +msgstr "" +"Untuk mengaktifkan mode pencarian kesalahan, set $go_debug>0 di file cofig." +"php" + +#: /var/www/fa2.3/devel/../includes/system_tests.inc:137 +msgid "Error logging" +msgstr "Pencatatan kesalahan" + +#: /var/www/fa2.3/devel/../includes/system_tests.inc:145 +msgid "Disabled" +msgstr "Dinonaktifkan" + +#: /var/www/fa2.3/devel/../includes/system_tests.inc:148 +msgid "To switch error logging set $error_logging in config.php file" +msgstr "" +"Untuk mengubah pencatatan kesalahan, set $error_logging di file config.php " + +#: /var/www/fa2.3/devel/../includes/system_tests.inc:151 +msgid "Log file is not writeable" +msgstr "File catatan log tidak dapat ditulisi" + +#: /var/www/fa2.3/devel/../includes/system_tests.inc:161 +msgid "Current database version" +msgstr "Versi database saat ini" + +#: /var/www/fa2.3/devel/../includes/system_tests.inc:165 +msgid "Database structure seems to be not upgraded to current version" +msgstr "Struktur database sepertinya belum diupgrade ke versi saat ini" + +#: /var/www/fa2.3/devel/../includes/system_tests.inc:180 +msgid "Company subdirectories consistency" +msgstr "Konsistensi subdirektori perusahaan" + +#: /var/www/fa2.3/devel/../includes/system_tests.inc:193 +#: /var/www/fa2.3/devel/../includes/system_tests.inc:200 +#: /var/www/fa2.3/devel/../includes/system_tests.inc:208 +#: /var/www/fa2.3/devel/../includes/system_tests.inc:225 +#: /var/www/fa2.3/devel/../includes/system_tests.inc:345 +#, php-format +msgid "'%s' is not writeable" +msgstr "'%s' tidak dapat ditulisi" + +#: /var/www/fa2.3/devel/../includes/system_tests.inc:221 +msgid "Temporary directory" +msgstr "Direktori sementara" + +#: /var/www/fa2.3/devel/../includes/system_tests.inc:233 +msgid "Language configuration consistency" +msgstr "Konsistensi konfigurasi bahasa" + +#: /var/www/fa2.3/devel/../includes/system_tests.inc:242 +msgid "Languages folder should be writeable." +msgstr "Direktori bahasa seharusnya bisa ditulisi" + +#: /var/www/fa2.3/devel/../includes/system_tests.inc:250 +msgid "Languages configuration file should be writeable." +msgstr "File konfigurasi bahasa seharusnya bisa ditulisi" + +#: /var/www/fa2.3/devel/../includes/system_tests.inc:268 +#, php-format +msgid "Missing %s translation file." +msgstr "File terjemahan %s tidak ada" + +#: /var/www/fa2.3/devel/../includes/system_tests.inc:273 +#, php-format +msgid "Missing system locale: %s" +msgstr "Lokalisasi sistem tidak ada : %s" + +#: /var/www/fa2.3/devel/../includes/system_tests.inc:286 +msgid "Main config file" +msgstr "File konfigurasi utama" + +#: /var/www/fa2.3/devel/../includes/system_tests.inc:293 +#: /var/www/fa2.3/devel/../includes/system_tests.inc:315 +#, php-format +msgid "Can't write '%s' file. Check FA directory write permissions." +msgstr "" +"Tidak dapat melakukan penulisan atas file '%s'. Periksa hak akses penulisan " +"direktori FA " + +#: /var/www/fa2.3/devel/../includes/system_tests.inc:294 +#: /var/www/fa2.3/devel/../includes/system_tests.inc:316 +#, php-format +msgid "'%s' file exists." +msgstr "file '%s' ditemukan." + +#: /var/www/fa2.3/devel/../includes/system_tests.inc:298 +#, php-format +msgid "'%s' file should be read-only" +msgstr "File '%s' seharusnya read-only" + +#: /var/www/fa2.3/devel/../includes/system_tests.inc:307 +msgid "Database auth file" +msgstr "File autentikasi database" + +#: /var/www/fa2.3/devel/../includes/system_tests.inc:320 +#, php-format +msgid "" +"'%s' file should be read-only if you do not plan to add or change companies" +msgstr "" +"File '%s' seharusnya read-only jika anda tidak berencana menambah atau " +"mengubah perusahaan" + +#: /var/www/fa2.3/devel/../includes/system_tests.inc:331 +msgid "Extensions system" +msgstr "Ekstensi sistem" + +#: /var/www/fa2.3/devel/../includes/system_tests.inc:366 +msgid "Extensions configuration files and directories should be writeable" +msgstr "File dan direktori konfigurasi ekstensi seharusnya dapat ditulisi" + +#: /var/www/fa2.3/devel/../includes/system_tests.inc:378 +#, php-format +msgid "Non-standard theme directory '%s' is not writable" +msgstr "Direktori tema non standar '%s' tidak dapat ditulisi" + +#: /var/www/fa2.3/devel/../includes/system_tests.inc:388 +msgid "" +"OpenSSL PHP extension have to be enabled to use extension repository system." +msgstr "" +"Ekstensi OpenSSL PHP harus diaktifkan untuk menggunakan sistem repositori " +"ekstensi" + +#: /var/www/fa2.3/devel/../includes/system_tests.inc:391 +msgid "" +"OpenSSL have to be available on your server to use extension repository " +"system." +msgstr "" +"OpenSSL harus tersedia di server anda untuk menggunakan sistem repositori " +"ekstensi" + +#: /var/www/fa2.3/devel/../includes/system_tests.inc:414 +msgid "Test" +msgstr "Tes" + +#: /var/www/fa2.3/devel/../includes/system_tests.inc:414 +msgid "Test type" +msgstr "Tipe tes" + +#: /var/www/fa2.3/devel/../includes/system_tests.inc:414 +msgid "Value" +msgstr "Nilai" + +#: /var/www/fa2.3/devel/../includes/system_tests.inc:414 +msgid "Comments" +msgstr "Komentar" + +#: /var/www/fa2.3/devel/../includes/system_tests.inc:438 +msgid "Ok" +msgstr "OK" + diff --git a/install/lang/in_ID/LC_MESSAGES/in_ID.mo b/install/lang/in_ID/LC_MESSAGES/in_ID.mo new file mode 100644 index 0000000000000000000000000000000000000000..278f2944a3a98bffd937efc9709a1b2e1a4dd3e4 GIT binary patch literal 9334 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 Vy_45zwQ}F`8-a`dm66)&{{TV}jc5P> literal 0 HcmV?d00001 diff --git a/install/lang/in_ID/LC_MESSAGES/in_ID.po b/install/lang/in_ID/LC_MESSAGES/in_ID.po new file mode 100644 index 00000000..b5a16586 --- /dev/null +++ b/install/lang/in_ID/LC_MESSAGES/in_ID.po @@ -0,0 +1,497 @@ +# Copyright (C) YEAR THE PACKAGE'S COPYRIGHT HOLDER +# This file is distributed under the same license as the PACKAGE package. +# +# Eko Prasetiyo, 2010. +msgid "" +msgstr "" +"Project-Id-Version: \n" +"Report-Msgid-Bugs-To: \n" +"POT-Creation-Date: 2010-08-08 12:50+0200\n" +"PO-Revision-Date: 2010-08-09 19:49+0700\n" +"Last-Translator: Eko Prasetiyo \n" +"Language-Team: Indonesan \n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=UTF-8\n" +"Content-Transfer-Encoding: 8bit\n" +"X-Generator: Lokalize 1.0\n" +"Plural-Forms: nplurals=2; plural=(n != 1);\n" + +#: /var/www/fa2.3/devel/../install/index.php:20 +#: /var/www/fa2.3/devel/../install/index.php:40 +msgid "FrontAccouting ERP Installation Wizard" +msgstr "Wisaya Instalasi Front Accounting ERP" + +#: /var/www/fa2.3/devel/../install/index.php:41 +#, php-format +msgid "Step %d: %s" +msgstr "Langkah %d: %s" + +#: /var/www/fa2.3/devel/../install/index.php:48 +msgid "Chart of accounts" +msgstr "Bagan akun" + +#: /var/www/fa2.3/devel/../install/index.php:48 +#: /var/www/fa2.3/devel/../install/index.php:75 +msgid "Encoding" +msgstr "Encoding" + +#: /var/www/fa2.3/devel/../install/index.php:48 +#: /var/www/fa2.3/devel/../install/index.php:75 +msgid "Description" +msgstr "Penjelasan" + +#: /var/www/fa2.3/devel/../install/index.php:48 +#: /var/www/fa2.3/devel/../install/index.php:75 +msgid "Install" +msgstr "Instal" + +#: /var/www/fa2.3/devel/../install/index.php:65 +#: /var/www/fa2.3/devel/../install/index.php:93 +msgid "Installed" +msgstr "Telah diinstal" + +#: /var/www/fa2.3/devel/../install/index.php:75 +msgid "Language" +msgstr "Bahasa" + +#: /var/www/fa2.3/devel/../install/index.php:156 +msgid "Cannot save system configuration file 'config.php'." +msgstr "Tidak dapat menyimpan file konfigurasi 'config.php'." + +#: /var/www/fa2.3/devel/../install/index.php:173 +msgid "Cannot open 'config_db.php' configuration file." +msgstr "Tidak dapat membuka file konfigurasi 'config_db.php'." + +#: /var/www/fa2.3/devel/../install/index.php:176 +msgid "Cannot write to the 'config_db.php' configuration file." +msgstr "Tidak dapat melakukan penulisan file konfigurasi 'config_db.php'." + +#: /var/www/fa2.3/devel/../install/index.php:179 +msgid "" +"Configuration file 'config_db.php' is not writable. Change its permissions " +"so it is, then re-run installation step." +msgstr "" +"File konfigurasi 'config_db.php' tidak dapat ditulisi. Ubah hak aksesnya, " +"lalu ulangi tahapan instalasi." + +#: /var/www/fa2.3/devel/../install/index.php:217 +msgid "Host name cannot be empty." +msgstr "Nama host tidak boleh dikosongkan." + +#: /var/www/fa2.3/devel/../install/index.php:221 +msgid "Database user name cannot be empty." +msgstr "Nama user database tidak boleh dikosongkan." + +#: /var/www/fa2.3/devel/../install/index.php:225 +msgid "Database name cannot be empty." +msgstr "Nama data base tidak boleh dikosongkan." + +#: /var/www/fa2.3/devel/../install/index.php:277 +msgid "Company name cannot be empty." +msgstr "Nama perusahaan tidak boleh dikosongkan." + +#: /var/www/fa2.3/devel/../install/index.php:281 +msgid "Company admin name cannot be empty." +msgstr "Nama admin perusahaan tidak boleh dikosongkan." + +#: /var/www/fa2.3/devel/../install/index.php:285 +msgid "Company admin password cannot be empty." +msgstr "Kata sandi admin perusahaan tidak boleh dikosongkan." + +#: /var/www/fa2.3/devel/../install/index.php:289 +msgid "Company admin passwords differ." +msgstr "Kata sandi admin perusahaan tidak sama." + +#: /var/www/fa2.3/devel/../install/index.php:320 +msgid "System Diagnostics" +msgstr "Pemeriksaan Sistem" + +#: /var/www/fa2.3/devel/../install/index.php:323 +msgid "Select install wizard language:" +msgstr "Pilih bahasa yg akan digunakan:" + +#: /var/www/fa2.3/devel/../install/index.php:329 +msgid "" +"All application preliminary requirements seems to be correct. Please press " +"Continue button below." +msgstr "" +"Seluruh kebutuhan yg disyaratkan aplikasi telah sesuai. Harap tekan tombol " +"Lanjutkan dibawah." + +#: /var/www/fa2.3/devel/../install/index.php:330 +#: /var/www/fa2.3/devel/../install/index.php:356 +#: /var/www/fa2.3/devel/../install/index.php:363 +#: /var/www/fa2.3/devel/../install/index.php:370 +#: /var/www/fa2.3/devel/../install/index.php:389 +msgid "Continue >>" +msgstr "Lanjutkan =>" + +#: /var/www/fa2.3/devel/../install/index.php:332 +msgid "" +"Application cannot be installed. Please fix problems listed below in red, " +"and press Refresh button." +msgstr "" +"Aplikasi tidak dapat diinstalasi. Harap perbaiki masalah yg ditandai merah " +"dibawah, dan tekan tombol MuatUlang." + +#: /var/www/fa2.3/devel/../install/index.php:333 +msgid "Refresh" +msgstr "MuatUlang" + +#: /var/www/fa2.3/devel/../install/index.php:343 +msgid "Database Server Settings" +msgstr "Seting server database" + +#: /var/www/fa2.3/devel/../install/index.php:345 +msgid "Server Host:" +msgstr "Host server:" + +#: /var/www/fa2.3/devel/../install/index.php:346 +msgid "Database User:" +msgstr "Nama user database :" + +#: /var/www/fa2.3/devel/../install/index.php:347 +msgid "Database Password:" +msgstr "Kata sandi untuk database:" + +#: /var/www/fa2.3/devel/../install/index.php:348 +msgid "Database Name:" +msgstr "Nama Database:" + +#: /var/www/fa2.3/devel/../install/index.php:349 +msgid "Use '0_' Table Prefix:" +msgstr "Gunakan awalan tabel '0_':" + +#: /var/www/fa2.3/devel/../install/index.php:349 +#: /var/www/fa2.3/devel/../includes/system_tests.inc:38 +#: /var/www/fa2.3/devel/../includes/system_tests.inc:113 +#: /var/www/fa2.3/devel/../includes/system_tests.inc:126 +msgid "Yes" +msgstr "Ya " + +#: /var/www/fa2.3/devel/../install/index.php:349 +#: /var/www/fa2.3/devel/../includes/system_tests.inc:38 +#: /var/www/fa2.3/devel/../includes/system_tests.inc:113 +#: /var/www/fa2.3/devel/../includes/system_tests.inc:126 +msgid "No" +msgstr "Tidak" + +#: /var/www/fa2.3/devel/../install/index.php:350 +msgid "Install Additional Language Packs from FA Repository:" +msgstr "Install tambahan bahasa dari repositori FA:" + +#: /var/www/fa2.3/devel/../install/index.php:351 +msgid "Install Additional COAs from FA Repository:" +msgstr "Install tambahan bagan akun dari repositori FA:" + +#: /var/www/fa2.3/devel/../install/index.php:353 +msgid "" +"Use table prefix if you share selected database for more than one FA company." +msgstr "" +"Gunakan awalan tabel jika anda menggunakan database yg sama untuk beberapa " +"perusahaan di FA." + +#: /var/www/fa2.3/devel/../install/index.php:354 +msgid "" +"Do not select additional langs nor COAs if you have no working internet " +"connection right now. You can install them later." +msgstr "" +"Jangan pilih tambahan bahasa atau bagan akun jika anda tidak memiliki " +"sambungan internet sekaran. Anda dapat menginstalnya nanti." + +#: /var/www/fa2.3/devel/../install/index.php:355 +#: /var/www/fa2.3/devel/../install/index.php:362 +#: /var/www/fa2.3/devel/../install/index.php:369 +#: /var/www/fa2.3/devel/../install/index.php:388 +msgid "<< Back" +msgstr "<= Kembali" + +#: /var/www/fa2.3/devel/../install/index.php:360 +msgid "User Interface Languages Selection" +msgstr "Pilihan bahasa antarmuka" + +#: /var/www/fa2.3/devel/../install/index.php:367 +msgid "Charts of Accounts Selection" +msgstr "Pemilihan bagan akun." + +#: /var/www/fa2.3/devel/../install/index.php:379 +msgid "Company Settings" +msgstr "Seting Perusahaan" + +#: /var/www/fa2.3/devel/../install/index.php:381 +msgid "Company Name:" +msgstr "Nama Perusahaan:" + +#: /var/www/fa2.3/devel/../install/index.php:382 +msgid "Admin Login:" +msgstr "Login Admin:" + +#: /var/www/fa2.3/devel/../install/index.php:383 +msgid "Admin Password:" +msgstr "Kata sandi Admin:" + +#: /var/www/fa2.3/devel/../install/index.php:384 +msgid "Reenter Password:" +msgstr "Ulangi masukkan kata sandi:" + +#: /var/www/fa2.3/devel/../install/index.php:385 +msgid "Select Chart of Accounts:" +msgstr "Pilih bagan akun:" + +#: /var/www/fa2.3/devel/../install/index.php:386 +msgid "Select Default Language:" +msgstr "Pilih bahasa default:" + +#: /var/www/fa2.3/devel/../install/index.php:393 +msgid "FrontAccounting ERP has been installed successsfully." +msgstr "FrontAccounting ERP telah diinstalasi dengan sukses." + +#: /var/www/fa2.3/devel/../install/index.php:394 +msgid "Please do not forget to remove install wizard folder." +msgstr "Harap jangan lupa menghapus direktori wisaya instalasi." + +#: /var/www/fa2.3/devel/../install/index.php:396 +msgid "Click here to start." +msgstr "Klik disini untuk memulai." + +#: /var/www/fa2.3/devel/../includes/system_tests.inc:15 +msgid "Info" +msgstr "Info" + +#: /var/www/fa2.3/devel/../includes/system_tests.inc:16 +msgid "Optional" +msgstr "Opsional" + +#: /var/www/fa2.3/devel/../includes/system_tests.inc:17 +msgid "Recomended" +msgstr "Direkomendasikan" + +#: /var/www/fa2.3/devel/../includes/system_tests.inc:18 +msgid "Required " +msgstr "Diperlukan" + +#: /var/www/fa2.3/devel/../includes/system_tests.inc:24 +msgid "MySQL version" +msgstr "Versi MySQL" + +#: /var/www/fa2.3/devel/../includes/system_tests.inc:28 +msgid "Upgrade MySQL server to version at least 4.1" +msgstr "Upgrade server MySQL minimal ke versi 4.1" + +#: /var/www/fa2.3/devel/../includes/system_tests.inc:35 +msgid "PHP MySQL extension" +msgstr "Ekstensi PHP MySQL" + +#: /var/www/fa2.3/devel/../includes/system_tests.inc:40 +msgid "Your PHP has to have MySQL extension enabled." +msgstr "PHP anda harus memiliki ekstensi MySQL yg diaktifkan." + +#: /var/www/fa2.3/devel/../includes/system_tests.inc:46 +msgid "PHP version" +msgstr "Versi PHP" + +#: /var/www/fa2.3/devel/../includes/system_tests.inc:50 +msgid "Upgrade PHP to version at least 4.3.3" +msgstr "Upgrade PHP minimal ke versi 4.3.3" + +#: /var/www/fa2.3/devel/../includes/system_tests.inc:57 +msgid "Server system" +msgstr "Sistem server" + +#: /var/www/fa2.3/devel/../includes/system_tests.inc:67 +msgid "Session save path" +msgstr "Lokasi penyimpanan sesi" + +#: /var/www/fa2.3/devel/../includes/system_tests.inc:79 +msgid "Removed install wizard folder" +msgstr "Direktori wisaya instalasi dihapus" + +#: /var/www/fa2.3/devel/../includes/system_tests.inc:82 +msgid "Not removed" +msgstr "Tidak dihapus" + +#: /var/www/fa2.3/devel/../includes/system_tests.inc:83 +msgid "Remove or rename install wizard folder for security reasons." +msgstr "Hapus atau ganti nama direktori wisaya instalasi demi alasan keamanan." + +#: /var/www/fa2.3/devel/../includes/system_tests.inc:90 +msgid "Browser type" +msgstr "Tipe browser" + +#: /var/www/fa2.3/devel/../includes/system_tests.inc:94 +msgid "Any browser is supported" +msgstr "Browser apa saja didukung." + +#: /var/www/fa2.3/devel/../includes/system_tests.inc:101 +msgid "Http server type" +msgstr "Tipe server http" + +#: /var/www/fa2.3/devel/../includes/system_tests.inc:105 +msgid "Any server is supported" +msgstr "Server apa saja didukung" + +#: /var/www/fa2.3/devel/../includes/system_tests.inc:112 +msgid "Native gettext" +msgstr "Gettext alami" + +#: /var/www/fa2.3/devel/../includes/system_tests.inc:116 +msgid "In case of no getext support, php emulation is used" +msgstr "Jika tidak ada dukungan gettext, emulasi php yg digunakan" + +#: /var/www/fa2.3/devel/../includes/system_tests.inc:124 +msgid "Debugging mode" +msgstr "Mode pencarian kesalahan." + +#: /var/www/fa2.3/devel/../includes/system_tests.inc:128 +msgid "To switch debugging on set $go_debug>0 in config.php file" +msgstr "" +"Untuk mengaktifkan mode pencarian kesalahan, set $go_debug>0 di file cofig." +"php" + +#: /var/www/fa2.3/devel/../includes/system_tests.inc:137 +msgid "Error logging" +msgstr "Pencatatan kesalahan" + +#: /var/www/fa2.3/devel/../includes/system_tests.inc:145 +msgid "Disabled" +msgstr "Dinonaktifkan" + +#: /var/www/fa2.3/devel/../includes/system_tests.inc:148 +msgid "To switch error logging set $error_logging in config.php file" +msgstr "" +"Untuk mengubah pencatatan kesalahan, set $error_logging di file config.php " + +#: /var/www/fa2.3/devel/../includes/system_tests.inc:151 +msgid "Log file is not writeable" +msgstr "File catatan log tidak dapat ditulisi" + +#: /var/www/fa2.3/devel/../includes/system_tests.inc:161 +msgid "Current database version" +msgstr "Versi database saat ini" + +#: /var/www/fa2.3/devel/../includes/system_tests.inc:165 +msgid "Database structure seems to be not upgraded to current version" +msgstr "Struktur database sepertinya belum diupgrade ke versi saat ini" + +#: /var/www/fa2.3/devel/../includes/system_tests.inc:180 +msgid "Company subdirectories consistency" +msgstr "Konsistensi subdirektori perusahaan" + +#: /var/www/fa2.3/devel/../includes/system_tests.inc:193 +#: /var/www/fa2.3/devel/../includes/system_tests.inc:200 +#: /var/www/fa2.3/devel/../includes/system_tests.inc:208 +#: /var/www/fa2.3/devel/../includes/system_tests.inc:225 +#: /var/www/fa2.3/devel/../includes/system_tests.inc:345 +#, php-format +msgid "'%s' is not writeable" +msgstr "'%s' tidak dapat ditulisi" + +#: /var/www/fa2.3/devel/../includes/system_tests.inc:221 +msgid "Temporary directory" +msgstr "Direktori sementara" + +#: /var/www/fa2.3/devel/../includes/system_tests.inc:233 +msgid "Language configuration consistency" +msgstr "Konsistensi konfigurasi bahasa" + +#: /var/www/fa2.3/devel/../includes/system_tests.inc:242 +msgid "Languages folder should be writeable." +msgstr "Direktori bahasa seharusnya bisa ditulisi" + +#: /var/www/fa2.3/devel/../includes/system_tests.inc:250 +msgid "Languages configuration file should be writeable." +msgstr "File konfigurasi bahasa seharusnya bisa ditulisi" + +#: /var/www/fa2.3/devel/../includes/system_tests.inc:268 +#, php-format +msgid "Missing %s translation file." +msgstr "File terjemahan %s tidak ada" + +#: /var/www/fa2.3/devel/../includes/system_tests.inc:273 +#, php-format +msgid "Missing system locale: %s" +msgstr "Lokalisasi sistem tidak ada : %s" + +#: /var/www/fa2.3/devel/../includes/system_tests.inc:286 +msgid "Main config file" +msgstr "File konfigurasi utama" + +#: /var/www/fa2.3/devel/../includes/system_tests.inc:293 +#: /var/www/fa2.3/devel/../includes/system_tests.inc:315 +#, php-format +msgid "Can't write '%s' file. Check FA directory write permissions." +msgstr "" +"Tidak dapat melakukan penulisan atas file '%s'. Periksa hak akses penulisan " +"direktori FA " + +#: /var/www/fa2.3/devel/../includes/system_tests.inc:294 +#: /var/www/fa2.3/devel/../includes/system_tests.inc:316 +#, php-format +msgid "'%s' file exists." +msgstr "file '%s' ditemukan." + +#: /var/www/fa2.3/devel/../includes/system_tests.inc:298 +#, php-format +msgid "'%s' file should be read-only" +msgstr "File '%s' seharusnya read-only" + +#: /var/www/fa2.3/devel/../includes/system_tests.inc:307 +msgid "Database auth file" +msgstr "File autentikasi database" + +#: /var/www/fa2.3/devel/../includes/system_tests.inc:320 +#, php-format +msgid "" +"'%s' file should be read-only if you do not plan to add or change companies" +msgstr "" +"File '%s' seharusnya read-only jika anda tidak berencana menambah atau " +"mengubah perusahaan" + +#: /var/www/fa2.3/devel/../includes/system_tests.inc:331 +msgid "Extensions system" +msgstr "Ekstensi sistem" + +#: /var/www/fa2.3/devel/../includes/system_tests.inc:366 +msgid "Extensions configuration files and directories should be writeable" +msgstr "File dan direktori konfigurasi ekstensi seharusnya dapat ditulisi" + +#: /var/www/fa2.3/devel/../includes/system_tests.inc:378 +#, php-format +msgid "Non-standard theme directory '%s' is not writable" +msgstr "Direktori tema non standar '%s' tidak dapat ditulisi" + +#: /var/www/fa2.3/devel/../includes/system_tests.inc:388 +msgid "" +"OpenSSL PHP extension have to be enabled to use extension repository system." +msgstr "" +"Ekstensi OpenSSL PHP harus diaktifkan untuk menggunakan sistem repositori " +"ekstensi" + +#: /var/www/fa2.3/devel/../includes/system_tests.inc:391 +msgid "" +"OpenSSL have to be available on your server to use extension repository " +"system." +msgstr "" +"OpenSSL harus tersedia di server anda untuk menggunakan sistem repositori " +"ekstensi" + +#: /var/www/fa2.3/devel/../includes/system_tests.inc:414 +msgid "Test" +msgstr "Tes" + +#: /var/www/fa2.3/devel/../includes/system_tests.inc:414 +msgid "Test type" +msgstr "Tipe tes" + +#: /var/www/fa2.3/devel/../includes/system_tests.inc:414 +msgid "Value" +msgstr "Nilai" + +#: /var/www/fa2.3/devel/../includes/system_tests.inc:414 +msgid "Comments" +msgstr "Komentar" + +#: /var/www/fa2.3/devel/../includes/system_tests.inc:438 +msgid "Ok" +msgstr "OK" + diff --git a/install/lang/it_IT/LC_MESSAGES/it_IT.mo b/install/lang/it_IT/LC_MESSAGES/it_IT.mo new file mode 100644 index 0000000000000000000000000000000000000000..ba5f77b332c06d864123aea37da0945ede173c55 GIT binary patch literal 9678 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 Z&06XX++1kja8O=19g>13+5pry{|j&(8%zKI literal 0 HcmV?d00001 diff --git a/install/lang/it_IT/LC_MESSAGES/it_IT.po b/install/lang/it_IT/LC_MESSAGES/it_IT.po new file mode 100644 index 00000000..3845aeee --- /dev/null +++ b/install/lang/it_IT/LC_MESSAGES/it_IT.po @@ -0,0 +1,470 @@ +# SOME DESCRIPTIVE TITLE. +# Copyright (C) YEAR THE PACKAGE'S COPYRIGHT HOLDER +# This file is distributed under the same license as the PACKAGE package. +# FIRST AUTHOR , YEAR. +# +msgid "" +msgstr "" +"Project-Id-Version: FrontAccounting Installer\n" +"Report-Msgid-Bugs-To: \n" +"POT-Creation-Date: 2010-08-13 15:12+0200\n" +"PO-Revision-Date: 2010-11-28 20:00+0200\n" +"Last-Translator: Paolo Ardoino \n" +"Language-Team: Italian \n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=iso-8859-1\n" +"Content-Transfer-Encoding: 8bit\n" + +#: ../install/index.php:20 ../install/index.php:40 +msgid "FrontAccouting ERP Installation Wizard" +msgstr "Installazione guidata FontAccounting ERP" + +#: ../install/index.php:41 +#, php-format +msgid "Step %d: %s" +msgstr "Passo %d: %s" + +#: ../install/index.php:48 +msgid "Chart of accounts" +msgstr "Piano dei conti" + +#: ../install/index.php:48 ../install/index.php:75 +msgid "Encoding" +msgstr "Codifica" + +#: ../install/index.php:48 ../install/index.php:75 +msgid "Description" +msgstr "Descrizione" + +#: ../install/index.php:48 ../install/index.php:75 +msgid "Install" +msgstr "Installa" + +#: ../install/index.php:65 ../install/index.php:93 +msgid "Installed" +msgstr "Installato" + +#: ../install/index.php:75 +msgid "Language" +msgstr "Lingua" + +#: ../install/index.php:156 +msgid "Cannot save system configuration file 'config.php'." +msgstr "Impossibile salvare il file di configurazine di sistema 'config.php'." + +#: ../install/index.php:173 +msgid "Cannot open 'config_db.php' configuration file." +msgstr "Impossibile aprire il file di configurazione 'config_db.php'." + +#: ../install/index.php:176 +msgid "Cannot write to the 'config_db.php' configuration file." +msgstr "Impossibile scrivere il file di configurazione 'config_db.php'." + +#: ../install/index.php:179 +msgid "" +"Configuration file 'config_db.php' is not writable. Change its permissions " +"so it is, then re-run installation step." +msgstr "" +"Il file di configurazione 'config_db.php' non è scrivibile. Cambia i permessi " +"e ripercorri lo step di installazione." + +#: ../install/index.php:217 +msgid "Host name cannot be empty." +msgstr "Host non può essere vuoto." + +#: ../install/index.php:221 +msgid "Database user name cannot be empty." +msgstr "Il nome dell'utente database non può essere vuoto." + +#: ../install/index.php:225 +msgid "Database name cannot be empty." +msgstr "Il nome del database non può essere vuoto." + +#: ../install/index.php:277 +msgid "Company name cannot be empty." +msgstr "Il nome dell'azienda non può essere vuoto." + +#: ../install/index.php:281 +msgid "Company admin name cannot be empty." +msgstr "Il nome dell'amministartore dell'azienda non può essere vuoto." + +#: ../install/index.php:285 +msgid "Company admin password cannot be empty." +msgstr "La password dell'amministartore dell'azienda non può essere vuoto." + +#: ../install/index.php:289 +msgid "Company admin passwords differ." +msgstr "Le password di amministrazione dell'azienda non coincidono." + +#: ../install/index.php:321 +msgid "System Diagnostics" +msgstr "Diagnostica di sistema" + +#: ../install/index.php:323 +msgid "Select install wizard language:" +msgstr "Seleziona la lingua dell'installazione guidata:" + +#: ../install/index.php:329 +msgid "" +"All application preliminary requirements seems to be correct. Please press " +"Continue button below." +msgstr "" +"Tutti i requisiti preliminari dell'applicazione sembrano essere corretti. Premi " +"il pulsante Continua sotto." + +#: ../install/index.php:330 ../install/index.php:356 ../install/index.php:363 +#: ../install/index.php:370 ../install/index.php:389 +msgid "Continue >>" +msgstr "Continua >>" + +#: ../install/index.php:332 +msgid "" +"Application cannot be installed. Please fix problems listed below in red, " +"and press Refresh button." +msgstr "" +"L'applicazione non può essere installata. Risolvi i problemi visualizzati sotto in rosso, " +"e premi il pulsante Aggiorna." + +#: ../install/index.php:333 +msgid "Refresh" +msgstr "Aggiorna" + +#: ../install/index.php:343 +msgid "Database Server Settings" +msgstr "Impostazioni Database" + +#: ../install/index.php:345 +msgid "Server Host:" +msgstr "Server Host:" + +#: ../install/index.php:346 +msgid "Database User:" +msgstr "Utente Database:" + +#: ../install/index.php:347 +msgid "Database Password:" +msgstr "Password Database:" + +#: ../install/index.php:348 +msgid "Database Name:" +msgstr "Nome Database:" + +#: ../install/index.php:349 +msgid "Use '0_' Table Prefix:" +msgstr "Usa '0_' Prefisso Tabelle:" + +#: ../install/index.php:349 ../includes/system_tests.inc:38 +#: ../includes/system_tests.inc:113 ../includes/system_tests.inc:126 +msgid "Yes" +msgstr "Si" + +#: ../install/index.php:349 ../includes/system_tests.inc:38 +#: ../includes/system_tests.inc:113 ../includes/system_tests.inc:126 +msgid "No" +msgstr "No" + +#: ../install/index.php:350 +msgid "Install Additional Language Packs from FA Repository:" +msgstr "Installa Pacchetti di Lingua Aggiuntivi dal Repository FA:" + +#: ../install/index.php:351 +msgid "Install Additional COAs from FA Repository:" +msgstr "Installa COA Addizionali dal Repository FA:" + +#: ../install/index.php:353 +msgid "" +"Use table prefix if you share selected database for more than one FA company." +msgstr "" +"Usa il prefisso alle tabelle se condividi il database selezionato per " +"più di una azienda FA." + +#: ../install/index.php:354 +msgid "" +"Do not select additional langs nor COAs if you have no working internet " +"connection right now. You can install them later." +msgstr "" +"Non selezionare ora lingue o COA addizionali se non hai una connessione internet " +"funzionante. Potrai installarli successivamente." + +#: ../install/index.php:355 ../install/index.php:362 ../install/index.php:369 +#: ../install/index.php:388 +msgid "<< Back" +msgstr "<< Indietro" + +#: ../install/index.php:360 +msgid "User Interface Languages Selection" +msgstr "Selezione Lingue Interfaccia Utente" + +#: ../install/index.php:367 +msgid "Charts of Accounts Selection" +msgstr "Selezione Piano dei Conti" + +#: ../install/index.php:379 +msgid "Company Settings" +msgstr "Impostazioni dell'azienda" + +#: ../install/index.php:381 +msgid "Company Name:" +msgstr "Nome Azienda:" + +#: ../install/index.php:382 +msgid "Admin Login:" +msgstr "Login amministratore:" + +#: ../install/index.php:383 +msgid "Admin Password:" +msgstr "Password Amministratore:" + +#: ../install/index.php:384 +msgid "Reenter Password:" +msgstr "Reinserisci la Password:" + +#: ../install/index.php:385 +msgid "Select Chart of Accounts:" +msgstr "Seleziona un piano dei conti:" + +#: ../install/index.php:386 +msgid "Select Default Language:" +msgstr "Seleziona la Lingua di default:" + +#: ../install/index.php:393 +msgid "FrontAccounting ERP has been installed successsfully." +msgstr "FrontAccounting ERP è stato installato con successo." + +#: ../install/index.php:394 +msgid "Please do not forget to remove install wizard folder." +msgstr "Perfavore non dimenticare di rimuovere la cartella di installazione guidata." + +#: ../install/index.php:396 +msgid "Click here to start." +msgstr "Clicca qui per iniziare." + +#: ../includes/system_tests.inc:15 +msgid "Info" +msgstr "Info" + +#: ../includes/system_tests.inc:16 +msgid "Optional" +msgstr "Opzionale" + +#: ../includes/system_tests.inc:17 +msgid "Recommended" +msgstr "Raccomandato" + +#: ../includes/system_tests.inc:18 +msgid "Required " +msgstr "Richiesto" + +#: ../includes/system_tests.inc:24 +msgid "MySQL version" +msgstr "Versione MySQL" + +#: ../includes/system_tests.inc:28 +msgid "Upgrade MySQL server to version at least 4.1" +msgstr "Aggiorna il server MySQL almeno alla versione 4.1" + +#: ../includes/system_tests.inc:35 +msgid "PHP MySQL extension" +msgstr "Estensione PHP MySQL" + +#: ../includes/system_tests.inc:40 +msgid "Your PHP has to have MySQL extension enabled." +msgstr "PHP deve avere l'estensione MySQL abilitata." + +#: ../includes/system_tests.inc:46 +msgid "PHP version" +msgstr "Versione PHP" + +#: ../includes/system_tests.inc:50 +msgid "Upgrade PHP to version at least 4.3.3" +msgstr "Aggiorna PHP almeno alla versione 4.3.3" + +#: ../includes/system_tests.inc:57 +msgid "Server system" +msgstr "Sistema Server" + +#: ../includes/system_tests.inc:67 +msgid "Session save path" +msgstr "Path salvataggio Sessione" + +#: ../includes/system_tests.inc:79 +msgid "Removed install wizard folder" +msgstr "La cartella di installazione guidata è stata rimossa" + +#: ../includes/system_tests.inc:82 +msgid "Not removed" +msgstr "Non rimosso" + +#: ../includes/system_tests.inc:83 +msgid "Remove or rename install wizard folder for security reasons." +msgstr "Rimuovi o rinomina la cartella di installazione guidata per motivi di sicurezza." + +#: ../includes/system_tests.inc:90 +msgid "Browser type" +msgstr "Tipo browser" + +#: ../includes/system_tests.inc:94 +msgid "Any browser is supported" +msgstr "Tutti i browser sono supportati" + +#: ../includes/system_tests.inc:101 +msgid "Http server type" +msgstr "Tipo server Http" + +#: ../includes/system_tests.inc:105 +msgid "Any server is supported" +msgstr "Tutti i server sono supportati" + +#: ../includes/system_tests.inc:112 +msgid "Native gettext" +msgstr "Gettext nativo" + +#: ../includes/system_tests.inc:116 +msgid "In case of no gettext support, php emulation is used" +msgstr "In caso di mancanza di gettext, verrà usata un'emulazione php" + +#: ../includes/system_tests.inc:124 +msgid "Debugging mode" +msgstr "Modalità di debug" + +#: ../includes/system_tests.inc:128 +msgid "To switch debugging on set $go_debug>0 in config.php file" +msgstr "Per abilitare il debugging imposta $go_debug>0 nel file config.php" + +#: ../includes/system_tests.inc:137 +msgid "Error logging" +msgstr "Loggin Errori" + +#: ../includes/system_tests.inc:145 +msgid "Disabled" +msgstr "Disabilitato" + +#: ../includes/system_tests.inc:148 +msgid "To switch error logging set $error_logging in config.php file" +msgstr "Per abilitare il logging degli errori imposta $error_logging nel file config.php" + +#: ../includes/system_tests.inc:151 +msgid "Log file is not writeable" +msgstr "Il file di log non è scrivibile" + +#: ../includes/system_tests.inc:161 +msgid "Current database version" +msgstr "Versione corrente del database" + +#: ../includes/system_tests.inc:165 +msgid "Database structure seems to be not upgraded to current version" +msgstr "La struttura del database sembra non essere aggiornata alla versione corrente" + +#: ../includes/system_tests.inc:180 +msgid "Company subdirectories consistency" +msgstr "Consistenza sottodirectory azienda" + +#: ../includes/system_tests.inc:193 ../includes/system_tests.inc:200 +#: ../includes/system_tests.inc:208 ../includes/system_tests.inc:225 +#: ../includes/system_tests.inc:340 ../includes/system_tests.inc:349 +#: ../includes/system_tests.inc:358 +#, php-format +msgid "'%s' is not writeable" +msgstr "'%s' non è scrivibile" + +#: ../includes/system_tests.inc:221 +msgid "Temporary directory" +msgstr "Directory temporanea" + +#: ../includes/system_tests.inc:233 +msgid "Language configuration consistency" +msgstr "Consistenza configurazione lingua" + +#: ../includes/system_tests.inc:242 +msgid "Languages folder should be writeable." +msgstr "La cartella delle lingue dovrebbe essere scrivibile." + +#: ../includes/system_tests.inc:251 +msgid "Languages configuration file should be writeable." +msgstr "Il file di configurazione di lingua dovrebbe essere scrivibile." + +#: ../includes/system_tests.inc:270 +#, php-format +msgid "Missing %s translation file." +msgstr "Manca il file di traduzione %s ." + +#: ../includes/system_tests.inc:275 +#, php-format +msgid "Missing system locale: %s" +msgstr "Locale di sistema mancante: %s" + +#: ../includes/system_tests.inc:288 +msgid "Main config file" +msgstr "File principale di config" + +#: ../includes/system_tests.inc:295 ../includes/system_tests.inc:317 +#, php-format +msgid "Can't write '%s' file. Check FA directory write permissions." +msgstr "Non posso scrivere il file '%s'. Controlla i permessi di scrittura della directory di FA." + +#: ../includes/system_tests.inc:296 ../includes/system_tests.inc:318 +#, php-format +msgid "'%s' file exists." +msgstr "Il file '%s' esiste." + +#: ../includes/system_tests.inc:300 +#, php-format +msgid "'%s' file should be read-only" +msgstr "Il file '%s' dovrebbe essere di sola lettura" + +#: ../includes/system_tests.inc:309 +msgid "Database auth file" +msgstr "File di autenticazione del Database" + +#: ../includes/system_tests.inc:322 +#, php-format +msgid "" +"'%s' file should be read-only if you do not plan to add or change companies" +msgstr "" +"Il file '%s' dovrebbe essere di sola lettura se non si prevede di aggiungere o modificare aziende" + +#: ../includes/system_tests.inc:333 +msgid "Extensions system" +msgstr "Estensioni del sistema" + +#: ../includes/system_tests.inc:363 +msgid "Extensions configuration files and directories should be writeable" +msgstr "I file e le directory di configurazione delle estensioni dovrebbero essere scrivibili" + +#: ../includes/system_tests.inc:375 +#, php-format +msgid "Non-standard theme directory '%s' is not writable" +msgstr "Directory dei temi non-standard '%s' non è scrivibile" + +#: ../includes/system_tests.inc:385 +msgid "" +"OpenSSL PHP extension have to be enabled to use extension repository system." +msgstr "" +"L'estensione PHP OpenSSL deve essere abilitata per usare il sistema del repository delle estensioni." + +#: ../includes/system_tests.inc:388 +msgid "" +"OpenSSL have to be available on your server to use extension repository " +"system." +msgstr "" +"OpenSSL deve essere disponibile sul tuo server per usare il sistema del repository delle estensioni." + +#: ../includes/system_tests.inc:411 +msgid "Test" +msgstr "Test" + +#: ../includes/system_tests.inc:411 +msgid "Test type" +msgstr "Tipo test" + +#: ../includes/system_tests.inc:411 +msgid "Value" +msgstr "Valore" + +#: ../includes/system_tests.inc:411 +msgid "Comments" +msgstr "Commenti" + +#: ../includes/system_tests.inc:435 +msgid "Ok" +msgstr "Ok" diff --git a/install/lang/new_language_template/LC_MESSAGES/empty.po b/install/lang/new_language_template/LC_MESSAGES/empty.po new file mode 100644 index 00000000..a874aded --- /dev/null +++ b/install/lang/new_language_template/LC_MESSAGES/empty.po @@ -0,0 +1,458 @@ +# SOME DESCRIPTIVE TITLE. +# Copyright (C) YEAR THE PACKAGE'S COPYRIGHT HOLDER +# This file is distributed under the same license as the PACKAGE package. +# FIRST AUTHOR , YEAR. +# +#, fuzzy +msgid "" +msgstr "" +"Project-Id-Version: PACKAGE VERSION\n" +"Report-Msgid-Bugs-To: \n" +"POT-Creation-Date: 2010-08-13 15:12+0200\n" +"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" +"Last-Translator: FULL NAME \n" +"Language-Team: LANGUAGE \n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=CHARSET\n" +"Content-Transfer-Encoding: 8bit\n" + +#: ../install/index.php:20 ../install/index.php:40 +msgid "FrontAccouting ERP Installation Wizard" +msgstr "" + +#: ../install/index.php:41 +#, php-format +msgid "Step %d: %s" +msgstr "" + +#: ../install/index.php:48 +msgid "Chart of accounts" +msgstr "" + +#: ../install/index.php:48 ../install/index.php:75 +msgid "Encoding" +msgstr "" + +#: ../install/index.php:48 ../install/index.php:75 +msgid "Description" +msgstr "" + +#: ../install/index.php:48 ../install/index.php:75 +msgid "Install" +msgstr "" + +#: ../install/index.php:65 ../install/index.php:93 +msgid "Installed" +msgstr "" + +#: ../install/index.php:75 +msgid "Language" +msgstr "" + +#: ../install/index.php:156 +msgid "Cannot save system configuration file 'config.php'." +msgstr "" + +#: ../install/index.php:173 +msgid "Cannot open 'config_db.php' configuration file." +msgstr "" + +#: ../install/index.php:176 +msgid "Cannot write to the 'config_db.php' configuration file." +msgstr "" + +#: ../install/index.php:179 +msgid "" +"Configuration file 'config_db.php' is not writable. Change its permissions " +"so it is, then re-run installation step." +msgstr "" + +#: ../install/index.php:217 +msgid "Host name cannot be empty." +msgstr "" + +#: ../install/index.php:221 +msgid "Database user name cannot be empty." +msgstr "" + +#: ../install/index.php:225 +msgid "Database name cannot be empty." +msgstr "" + +#: ../install/index.php:277 +msgid "Company name cannot be empty." +msgstr "" + +#: ../install/index.php:281 +msgid "Company admin name cannot be empty." +msgstr "" + +#: ../install/index.php:285 +msgid "Company admin password cannot be empty." +msgstr "" + +#: ../install/index.php:289 +msgid "Company admin passwords differ." +msgstr "" + +#: ../install/index.php:321 +msgid "System Diagnostics" +msgstr "" + +#: ../install/index.php:323 +msgid "Select install wizard language:" +msgstr "" + +#: ../install/index.php:329 +msgid "" +"All application preliminary requirements seems to be correct. Please press " +"Continue button below." +msgstr "" + +#: ../install/index.php:330 ../install/index.php:356 ../install/index.php:363 +#: ../install/index.php:370 ../install/index.php:389 +msgid "Continue >>" +msgstr "" + +#: ../install/index.php:332 +msgid "" +"Application cannot be installed. Please fix problems listed below in red, " +"and press Refresh button." +msgstr "" + +#: ../install/index.php:333 +msgid "Refresh" +msgstr "" + +#: ../install/index.php:343 +msgid "Database Server Settings" +msgstr "" + +#: ../install/index.php:345 +msgid "Server Host:" +msgstr "" + +#: ../install/index.php:346 +msgid "Database User:" +msgstr "" + +#: ../install/index.php:347 +msgid "Database Password:" +msgstr "" + +#: ../install/index.php:348 +msgid "Database Name:" +msgstr "" + +#: ../install/index.php:349 +msgid "Use '0_' Table Prefix:" +msgstr "" + +#: ../install/index.php:349 ../includes/system_tests.inc:38 +#: ../includes/system_tests.inc:113 ../includes/system_tests.inc:126 +msgid "Yes" +msgstr "" + +#: ../install/index.php:349 ../includes/system_tests.inc:38 +#: ../includes/system_tests.inc:113 ../includes/system_tests.inc:126 +msgid "No" +msgstr "" + +#: ../install/index.php:350 +msgid "Install Additional Language Packs from FA Repository:" +msgstr "" + +#: ../install/index.php:351 +msgid "Install Additional COAs from FA Repository:" +msgstr "" + +#: ../install/index.php:353 +msgid "" +"Use table prefix if you share selected database for more than one FA company." +msgstr "" + +#: ../install/index.php:354 +msgid "" +"Do not select additional langs nor COAs if you have no working internet " +"connection right now. You can install them later." +msgstr "" + +#: ../install/index.php:355 ../install/index.php:362 ../install/index.php:369 +#: ../install/index.php:388 +msgid "<< Back" +msgstr "" + +#: ../install/index.php:360 +msgid "User Interface Languages Selection" +msgstr "" + +#: ../install/index.php:367 +msgid "Charts of Accounts Selection" +msgstr "" + +#: ../install/index.php:379 +msgid "Company Settings" +msgstr "" + +#: ../install/index.php:381 +msgid "Company Name:" +msgstr "" + +#: ../install/index.php:382 +msgid "Admin Login:" +msgstr "" + +#: ../install/index.php:383 +msgid "Admin Password:" +msgstr "" + +#: ../install/index.php:384 +msgid "Reenter Password:" +msgstr "" + +#: ../install/index.php:385 +msgid "Select Chart of Accounts:" +msgstr "" + +#: ../install/index.php:386 +msgid "Select Default Language:" +msgstr "" + +#: ../install/index.php:393 +msgid "FrontAccounting ERP has been installed successsfully." +msgstr "" + +#: ../install/index.php:394 +msgid "Please do not forget to remove install wizard folder." +msgstr "" + +#: ../install/index.php:396 +msgid "Click here to start." +msgstr "" + +#: ../includes/system_tests.inc:15 +msgid "Info" +msgstr "" + +#: ../includes/system_tests.inc:16 +msgid "Optional" +msgstr "" + +#: ../includes/system_tests.inc:17 +msgid "Recommended" +msgstr "" + +#: ../includes/system_tests.inc:18 +msgid "Required " +msgstr "" + +#: ../includes/system_tests.inc:24 +msgid "MySQL version" +msgstr "" + +#: ../includes/system_tests.inc:28 +msgid "Upgrade MySQL server to version at least 4.1" +msgstr "" + +#: ../includes/system_tests.inc:35 +msgid "PHP MySQL extension" +msgstr "" + +#: ../includes/system_tests.inc:40 +msgid "Your PHP has to have MySQL extension enabled." +msgstr "" + +#: ../includes/system_tests.inc:46 +msgid "PHP version" +msgstr "" + +#: ../includes/system_tests.inc:50 +msgid "Upgrade PHP to version at least 4.3.3" +msgstr "" + +#: ../includes/system_tests.inc:57 +msgid "Server system" +msgstr "" + +#: ../includes/system_tests.inc:67 +msgid "Session save path" +msgstr "" + +#: ../includes/system_tests.inc:79 +msgid "Removed install wizard folder" +msgstr "" + +#: ../includes/system_tests.inc:82 +msgid "Not removed" +msgstr "" + +#: ../includes/system_tests.inc:83 +msgid "Remove or rename install wizard folder for security reasons." +msgstr "" + +#: ../includes/system_tests.inc:90 +msgid "Browser type" +msgstr "" + +#: ../includes/system_tests.inc:94 +msgid "Any browser is supported" +msgstr "" + +#: ../includes/system_tests.inc:101 +msgid "Http server type" +msgstr "" + +#: ../includes/system_tests.inc:105 +msgid "Any server is supported" +msgstr "" + +#: ../includes/system_tests.inc:112 +msgid "Native gettext" +msgstr "" + +#: ../includes/system_tests.inc:116 +msgid "In case of no gettext support, php emulation is used" +msgstr "" + +#: ../includes/system_tests.inc:124 +msgid "Debugging mode" +msgstr "" + +#: ../includes/system_tests.inc:128 +msgid "To switch debugging on set $go_debug>0 in config.php file" +msgstr "" + +#: ../includes/system_tests.inc:137 +msgid "Error logging" +msgstr "" + +#: ../includes/system_tests.inc:145 +msgid "Disabled" +msgstr "" + +#: ../includes/system_tests.inc:148 +msgid "To switch error logging set $error_logging in config.php file" +msgstr "" + +#: ../includes/system_tests.inc:151 +msgid "Log file is not writeable" +msgstr "" + +#: ../includes/system_tests.inc:161 +msgid "Current database version" +msgstr "" + +#: ../includes/system_tests.inc:165 +msgid "Database structure seems to be not upgraded to current version" +msgstr "" + +#: ../includes/system_tests.inc:180 +msgid "Company subdirectories consistency" +msgstr "" + +#: ../includes/system_tests.inc:193 ../includes/system_tests.inc:200 +#: ../includes/system_tests.inc:208 ../includes/system_tests.inc:225 +#: ../includes/system_tests.inc:340 ../includes/system_tests.inc:349 +#: ../includes/system_tests.inc:358 +#, php-format +msgid "'%s' is not writeable" +msgstr "" + +#: ../includes/system_tests.inc:221 +msgid "Temporary directory" +msgstr "" + +#: ../includes/system_tests.inc:233 +msgid "Language configuration consistency" +msgstr "" + +#: ../includes/system_tests.inc:242 +msgid "Languages folder should be writeable." +msgstr "" + +#: ../includes/system_tests.inc:251 +msgid "Languages configuration file should be writeable." +msgstr "" + +#: ../includes/system_tests.inc:270 +#, php-format +msgid "Missing %s translation file." +msgstr "" + +#: ../includes/system_tests.inc:275 +#, php-format +msgid "Missing system locale: %s" +msgstr "" + +#: ../includes/system_tests.inc:288 +msgid "Main config file" +msgstr "" + +#: ../includes/system_tests.inc:295 ../includes/system_tests.inc:317 +#, php-format +msgid "Can't write '%s' file. Check FA directory write permissions." +msgstr "" + +#: ../includes/system_tests.inc:296 ../includes/system_tests.inc:318 +#, php-format +msgid "'%s' file exists." +msgstr "" + +#: ../includes/system_tests.inc:300 +#, php-format +msgid "'%s' file should be read-only" +msgstr "" + +#: ../includes/system_tests.inc:309 +msgid "Database auth file" +msgstr "" + +#: ../includes/system_tests.inc:322 +#, php-format +msgid "" +"'%s' file should be read-only if you do not plan to add or change companies" +msgstr "" + +#: ../includes/system_tests.inc:333 +msgid "Extensions system" +msgstr "" + +#: ../includes/system_tests.inc:363 +msgid "Extensions configuration files and directories should be writeable" +msgstr "" + +#: ../includes/system_tests.inc:375 +#, php-format +msgid "Non-standard theme directory '%s' is not writable" +msgstr "" + +#: ../includes/system_tests.inc:385 +msgid "" +"OpenSSL PHP extension have to be enabled to use extension repository system." +msgstr "" + +#: ../includes/system_tests.inc:388 +msgid "" +"OpenSSL have to be available on your server to use extension repository " +"system." +msgstr "" + +#: ../includes/system_tests.inc:411 +msgid "Test" +msgstr "" + +#: ../includes/system_tests.inc:411 +msgid "Test type" +msgstr "" + +#: ../includes/system_tests.inc:411 +msgid "Value" +msgstr "" + +#: ../includes/system_tests.inc:411 +msgid "Comments" +msgstr "" + +#: ../includes/system_tests.inc:435 +msgid "Ok" +msgstr "" diff --git a/install/lang/nl_BE/LC_MESSAGES/nl_BE.mo b/install/lang/nl_BE/LC_MESSAGES/nl_BE.mo new file mode 100644 index 0000000000000000000000000000000000000000..a8c70e2e4c5b30ce678b196f9546448fdf2b4316 GIT binary patch literal 9505 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 +# +msgid "" +msgstr "" +"Project-Id-Version: PACKAGE VERSION\n" +"Report-Msgid-Bugs-To: \n" +"POT-Creation-Date: 2010-08-08 12:50+0200\n" +"PO-Revision-Date: 2010-08-11 20:15+0100\n" +"Last-Translator: MorkvonOrk \n" +"Language-Team: LANGUAGE \n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=ISO-8859-1\n" +"Content-Transfer-Encoding: 8bit\n" + +#: /var/www/fa2.3/devel/../install/index.php:20 +#: /var/www/fa2.3/devel/../install/index.php:40 +msgid "FrontAccouting ERP Installation Wizard" +msgstr "FrontAccouting ERP Installatie Wizard" + +#: /var/www/fa2.3/devel/../install/index.php:41 +#, php-format +msgid "Step %d: %s" +msgstr "Stap %d: %s" + +#: /var/www/fa2.3/devel/../install/index.php:48 +msgid "Chart of accounts" +msgstr "Rekeningenstelsel" + +#: /var/www/fa2.3/devel/../install/index.php:48 +#: /var/www/fa2.3/devel/../install/index.php:75 +msgid "Encoding" +msgstr "Codering" + +#: /var/www/fa2.3/devel/../install/index.php:48 +#: /var/www/fa2.3/devel/../install/index.php:75 +msgid "Description" +msgstr "Beschrijving" + +#: /var/www/fa2.3/devel/../install/index.php:48 +#: /var/www/fa2.3/devel/../install/index.php:75 +msgid "Install" +msgstr "Installeer" + +#: /var/www/fa2.3/devel/../install/index.php:65 +#: /var/www/fa2.3/devel/../install/index.php:93 +msgid "Installed" +msgstr "Geïnstalleerd" + +#: /var/www/fa2.3/devel/../install/index.php:75 +msgid "Language" +msgstr "Taal" + +#: /var/www/fa2.3/devel/../install/index.php:156 +msgid "Cannot save system configuration file 'config.php'." +msgstr "Het systeem-configuratiebestand 'config.php' is niet beschrijfbaar." + +#: /var/www/fa2.3/devel/../install/index.php:173 +msgid "Cannot open 'config_db.php' configuration file." +msgstr "Kan het configuratiebestand 'config_db.php' niet openen." + +#: /var/www/fa2.3/devel/../install/index.php:176 +msgid "Cannot write to the 'config_db.php' configuration file." +msgstr "Het configuratiebestand 'config_db.php' is niet beschrijfbaar." + +#: /var/www/fa2.3/devel/../install/index.php:179 +msgid "Configuration file 'config_db.php' is not writable. Change its permissions so it is, then re-run installation step." +msgstr "Het configuratiebestand 'config_db.php' is niet beschrijfbaar. Verander de rechten naar beschrijfbaar en herhaal deze installatiestap." + +#: /var/www/fa2.3/devel/../install/index.php:217 +msgid "Host name cannot be empty." +msgstr "Hostnaam mag niet leeg zijn." + +#: /var/www/fa2.3/devel/../install/index.php:221 +msgid "Database user name cannot be empty." +msgstr "Database usernaam mag niet leeg zijn." + +#: /var/www/fa2.3/devel/../install/index.php:225 +msgid "Database name cannot be empty." +msgstr "Databasenaam mag niet leeg zijn." + +#: /var/www/fa2.3/devel/../install/index.php:277 +msgid "Company name cannot be empty." +msgstr "Bedrijfsnaam mag niet leeg zijn." + +#: /var/www/fa2.3/devel/../install/index.php:281 +msgid "Company admin name cannot be empty." +msgstr "Naam van bedrijfsadministrator mag niet leeg zijn." + +#: /var/www/fa2.3/devel/../install/index.php:285 +msgid "Company admin password cannot be empty." +msgstr "Paswoord van bedrijfsadministrator mag niet leeg zijn." + +#: /var/www/fa2.3/devel/../install/index.php:289 +msgid "Company admin passwords differ." +msgstr "De paswoorden van de administrator zijn niet gelijk." + +#: /var/www/fa2.3/devel/../install/index.php:320 +msgid "System Diagnostics" +msgstr "Systeem diagnose" + +#: /var/www/fa2.3/devel/../install/index.php:323 +msgid "Select install wizard language:" +msgstr "Selecteer een taal voor de installatie wizard:" + +#: /var/www/fa2.3/devel/../install/index.php:329 +msgid "All application preliminary requirements seems to be correct. Please press Continue button below." +msgstr "Alle voorwaarden voor het installeren van het programma lijken voldaan. Klik op de 'Ga verder'-knop hieronder." + +#: /var/www/fa2.3/devel/../install/index.php:330 +#: /var/www/fa2.3/devel/../install/index.php:356 +#: /var/www/fa2.3/devel/../install/index.php:363 +#: /var/www/fa2.3/devel/../install/index.php:370 +#: /var/www/fa2.3/devel/../install/index.php:389 +msgid "Continue >>" +msgstr "Ga verder >>" + +#: /var/www/fa2.3/devel/../install/index.php:332 +msgid "Application cannot be installed. Please fix problems listed below in red, and press Refresh button." +msgstr "Het programma kan niet worden geïnstalleerd. Herstel de problemen hieronder in het rood aangeduid, en druk op de 'Hernieuw'-knop." + +#: /var/www/fa2.3/devel/../install/index.php:333 +msgid "Refresh" +msgstr "Hernieuw" + +#: /var/www/fa2.3/devel/../install/index.php:343 +msgid "Database Server Settings" +msgstr "Database Server instellingen" + +#: /var/www/fa2.3/devel/../install/index.php:345 +msgid "Server Host:" +msgstr "Server host:" + +#: /var/www/fa2.3/devel/../install/index.php:346 +msgid "Database User:" +msgstr "Database user:" + +#: /var/www/fa2.3/devel/../install/index.php:347 +msgid "Database Password:" +msgstr "Database paswoord:" + +#: /var/www/fa2.3/devel/../install/index.php:348 +msgid "Database Name:" +msgstr "Database naam:" + +#: /var/www/fa2.3/devel/../install/index.php:349 +msgid "Use '0_' Table Prefix:" +msgstr "Gebruik '0_ als prefix voor de tabellen" + +#: /var/www/fa2.3/devel/../install/index.php:349 +#: /var/www/fa2.3/devel/../includes/system_tests.inc:38 +#: /var/www/fa2.3/devel/../includes/system_tests.inc:113 +#: /var/www/fa2.3/devel/../includes/system_tests.inc:126 +msgid "Yes" +msgstr "Ja" + +#: /var/www/fa2.3/devel/../install/index.php:349 +#: /var/www/fa2.3/devel/../includes/system_tests.inc:38 +#: /var/www/fa2.3/devel/../includes/system_tests.inc:113 +#: /var/www/fa2.3/devel/../includes/system_tests.inc:126 +msgid "No" +msgstr "Neen" + +#: /var/www/fa2.3/devel/../install/index.php:350 +msgid "Install Additional Language Packs from FA Repository:" +msgstr "Installeer bijkomende talenpaketten van de FA bibliotheek:" + +#: /var/www/fa2.3/devel/../install/index.php:351 +msgid "Install Additional COAs from FA Repository:" +msgstr "Installeer bijkomende rekeningenstelsels van de FA bibliotheek:" + +#: /var/www/fa2.3/devel/../install/index.php:353 +msgid "Use table prefix if you share selected database for more than one FA company." +msgstr "Gebruik verschillende tabellenprefixen als je de database voor verschillende FA bedrijven wilt delen." + +#: /var/www/fa2.3/devel/../install/index.php:354 +msgid "Do not select additional langs nor COAs if you have no working internet connection right now. You can install them later." +msgstr "Selecteer geen bijkomende talen of rekenngenstelsels als u nu geen werkende internetverbinding hebt. U kunt ze later installeren." + +#: /var/www/fa2.3/devel/../install/index.php:355 +#: /var/www/fa2.3/devel/../install/index.php:362 +#: /var/www/fa2.3/devel/../install/index.php:369 +#: /var/www/fa2.3/devel/../install/index.php:388 +msgid "<< Back" +msgstr "<0 in config.php file" +msgstr "Om debugging aan te zetten, set $go_debug>0 in config.php bestand" + +#: /var/www/fa2.3/devel/../includes/system_tests.inc:137 +msgid "Error logging" +msgstr "Fouten logging" + +#: /var/www/fa2.3/devel/../includes/system_tests.inc:145 +msgid "Disabled" +msgstr "Uitgeschakeld" + +#: /var/www/fa2.3/devel/../includes/system_tests.inc:148 +msgid "To switch error logging set $error_logging in config.php file" +msgstr "Om fouten-logging aan te zetten, zet $error_logging in config.php bestand" + +#: /var/www/fa2.3/devel/../includes/system_tests.inc:151 +msgid "Log file is not writeable" +msgstr "Logbestand is niet beschrijfbaar" + +#: /var/www/fa2.3/devel/../includes/system_tests.inc:161 +msgid "Current database version" +msgstr "Huidige database versie" + +#: /var/www/fa2.3/devel/../includes/system_tests.inc:165 +msgid "Database structure seems to be not upgraded to current version" +msgstr "Database structuur lijkt niet aangepast te zijn aan huidige versie" + +#: /var/www/fa2.3/devel/../includes/system_tests.inc:180 +msgid "Company subdirectories consistency" +msgstr "Bedrijfs-subdirectories consistentie" + +#: /var/www/fa2.3/devel/../includes/system_tests.inc:193 +#: /var/www/fa2.3/devel/../includes/system_tests.inc:200 +#: /var/www/fa2.3/devel/../includes/system_tests.inc:208 +#: /var/www/fa2.3/devel/../includes/system_tests.inc:225 +#: /var/www/fa2.3/devel/../includes/system_tests.inc:345 +#, php-format +msgid "'%s' is not writeable" +msgstr "'%s' is niet beschrijfbaar" + +#: /var/www/fa2.3/devel/../includes/system_tests.inc:221 +msgid "Temporary directory" +msgstr "Tijdelijke directory" + +#: /var/www/fa2.3/devel/../includes/system_tests.inc:233 +msgid "Language configuration consistency" +msgstr "Taal-configuratie consistentie" + +#: /var/www/fa2.3/devel/../includes/system_tests.inc:242 +msgid "Languages folder should be writeable." +msgstr "Taalmappen moeten beschijfbaar zijn." + +#: /var/www/fa2.3/devel/../includes/system_tests.inc:250 +msgid "Languages configuration file should be writeable." +msgstr "Configuratiebestand van de talen moet beschrijfbaar zijn." + +#: /var/www/fa2.3/devel/../includes/system_tests.inc:268 +#, php-format +msgid "Missing %s translation file." +msgstr "%s vertalingsbestand ontbreekt." + +#: /var/www/fa2.3/devel/../includes/system_tests.inc:273 +#, php-format +msgid "Missing system locale: %s" +msgstr "Systeem locale %s ontbreekt." + +#: /var/www/fa2.3/devel/../includes/system_tests.inc:286 +msgid "Main config file" +msgstr "Hoofd-configuratiebestand" + +#: /var/www/fa2.3/devel/../includes/system_tests.inc:293 +#: /var/www/fa2.3/devel/../includes/system_tests.inc:315 +#, php-format +msgid "Can't write '%s' file. Check FA directory write permissions." +msgstr "Kan '%s' bestand niet beschrijven. Check de schrijfrechten van de FA directory." + +#: /var/www/fa2.3/devel/../includes/system_tests.inc:294 +#: /var/www/fa2.3/devel/../includes/system_tests.inc:316 +#, php-format +msgid "'%s' file exists." +msgstr "'%s' bestand bestaat." + +#: /var/www/fa2.3/devel/../includes/system_tests.inc:298 +#, php-format +msgid "'%s' file should be read-only" +msgstr "'%s' bestand moet alleen-lezen zijn" + +#: /var/www/fa2.3/devel/../includes/system_tests.inc:307 +msgid "Database auth file" +msgstr "Database authorisatiebestand" + +#: /var/www/fa2.3/devel/../includes/system_tests.inc:320 +#, php-format +msgid "'%s' file should be read-only if you do not plan to add or change companies" +msgstr "'%s' bestand moet alleen-lezen zijn als je geen bedrijven wilt toevoegen of veranderen" + +#: /var/www/fa2.3/devel/../includes/system_tests.inc:331 +msgid "Extensions system" +msgstr "Extensies systeem" + +#: /var/www/fa2.3/devel/../includes/system_tests.inc:366 +msgid "Extensions configuration files and directories should be writeable" +msgstr "Extensies configuratiebestanden en directories moeten beschrijfbaar zijn" + +#: /var/www/fa2.3/devel/../includes/system_tests.inc:378 +#, php-format +msgid "Non-standard theme directory '%s' is not writable" +msgstr "Niet-standard thema directory '%s' is niet beschrijfbaar" + +#: /var/www/fa2.3/devel/../includes/system_tests.inc:388 +msgid "OpenSSL PHP extension have to be enabled to use extension repository system." +msgstr "OpenSSL PHP extensie moet geactiveerd zijn om het extensie repository systeem te gebruiken." + +#: /var/www/fa2.3/devel/../includes/system_tests.inc:391 +msgid "OpenSSL have to be available on your server to use extension repository system." +msgstr "OpenSSL PHP extensie moet beschikbaar zijn op de serverom het extensie repository systeem te gebruiken." + +#: /var/www/fa2.3/devel/../includes/system_tests.inc:414 +msgid "Test" +msgstr "Test" + +#: /var/www/fa2.3/devel/../includes/system_tests.inc:414 +msgid "Test type" +msgstr "Test type" + +#: /var/www/fa2.3/devel/../includes/system_tests.inc:414 +msgid "Value" +msgstr "Waarde" + +#: /var/www/fa2.3/devel/../includes/system_tests.inc:414 +msgid "Comments" +msgstr "Commentaar" + +#: /var/www/fa2.3/devel/../includes/system_tests.inc:438 +msgid "Ok" +msgstr "OK" + diff --git a/install/lang/pl_PL/LC_MESSAGES/pl_PL.mo b/install/lang/pl_PL/LC_MESSAGES/pl_PL.mo new file mode 100644 index 0000000000000000000000000000000000000000..0af89b18b375d76e775ee32065489bb2d8f1d08d GIT binary patch literal 9162 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 literal 0 HcmV?d00001 diff --git a/install/lang/pl_PL/LC_MESSAGES/pl_PL.po b/install/lang/pl_PL/LC_MESSAGES/pl_PL.po new file mode 100644 index 00000000..210033b0 --- /dev/null +++ b/install/lang/pl_PL/LC_MESSAGES/pl_PL.po @@ -0,0 +1,487 @@ +# Frontaccounting ERP Installer +# Copyright (C) 2010 FrontAccounting LLC +# This file is distributed under the same license as the FrontAccounting package. +# Janusz Dobrowolski +# +msgid "" +msgstr "" +"Project-Id-Version: \n" +"Report-Msgid-Bugs-To: \n" +"POT-Creation-Date: 2010-08-08 12:50+0200\n" +"PO-Revision-Date: \n" +"Last-Translator: Janusz Dobrowolski \n" +"Language-Team: \n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=ISO-8859-2\n" +"Content-Transfer-Encoding: 8bit\n" + +#: /var/www/fa2.3/devel/../install/index.php:20 +#: /var/www/fa2.3/devel/../install/index.php:40 +msgid "FrontAccouting ERP Installation Wizard" +msgstr "Instalator FrontAccounting ERP" + +#: /var/www/fa2.3/devel/../install/index.php:41 +#, php-format +msgid "Step %d: %s" +msgstr "Krok %d: %s" + +#: /var/www/fa2.3/devel/../install/index.php:48 +msgid "Chart of accounts" +msgstr "Plan kont" + +#: /var/www/fa2.3/devel/../install/index.php:48 +#: /var/www/fa2.3/devel/../install/index.php:75 +msgid "Encoding" +msgstr "Kodowanie" + +#: /var/www/fa2.3/devel/../install/index.php:48 +#: /var/www/fa2.3/devel/../install/index.php:75 +msgid "Description" +msgstr "Opis" + +#: /var/www/fa2.3/devel/../install/index.php:48 +#: /var/www/fa2.3/devel/../install/index.php:75 +msgid "Install" +msgstr "Zainstaluj" + +#: /var/www/fa2.3/devel/../install/index.php:65 +#: /var/www/fa2.3/devel/../install/index.php:93 +msgid "Installed" +msgstr "Zainstalowany" + +#: /var/www/fa2.3/devel/../install/index.php:75 +msgid "Language" +msgstr "Jêzyk" + +#: /var/www/fa2.3/devel/../install/index.php:156 +msgid "Cannot save system configuration file 'config.php'." +msgstr "Nie mo¿na zapisaæ pliku konfiguracyjnego 'config.php'." + +#: /var/www/fa2.3/devel/../install/index.php:173 +msgid "Cannot open 'config_db.php' configuration file." +msgstr "Nie mo¿na utworzyæ pliku konfiguracji 'config_db.php'." + +#: /var/www/fa2.3/devel/../install/index.php:176 +msgid "Cannot write to the 'config_db.php' configuration file." +msgstr "Nie mo¿na zapisaæ pliku konfiguracji 'config_db.php'." + +#: /var/www/fa2.3/devel/../install/index.php:179 +msgid "" +"Configuration file 'config_db.php' is not writable. Change its permissions " +"so it is, then re-run installation step." +msgstr "" +"Plik konfiguracji 'config_db.php' jest zabezpieczony przed zapisem. Zmieñ " +"prawa dostêpu i powtórz krok instalacji." + +#: /var/www/fa2.3/devel/../install/index.php:217 +msgid "Host name cannot be empty." +msgstr "Adres serwera nie mo¿e byæ pusty." + +#: /var/www/fa2.3/devel/../install/index.php:221 +msgid "Database user name cannot be empty." +msgstr "Nazwa u¿ytkownika nie mo¿e by pusta." + +#: /var/www/fa2.3/devel/../install/index.php:225 +msgid "Database name cannot be empty." +msgstr "Nazwa bazy danych nie mo¿e byæ pusta." + +#: /var/www/fa2.3/devel/../install/index.php:277 +msgid "Company name cannot be empty." +msgstr "Nazwa firmy nie mo¿e by pusta." + +#: /var/www/fa2.3/devel/../install/index.php:281 +msgid "Company admin name cannot be empty." +msgstr "Nazwa administratora nie mo¿e byæ pusta." + +#: /var/www/fa2.3/devel/../install/index.php:285 +msgid "Company admin password cannot be empty." +msgstr "Has³o administratora nie mo¿e by puste." + +#: /var/www/fa2.3/devel/../install/index.php:289 +msgid "Company admin passwords differ." +msgstr "Wprowadzone has³a ró¿ni± siê." + +#: /var/www/fa2.3/devel/../install/index.php:320 +msgid "System Diagnostics" +msgstr "Diagnostyka Systemu" + +#: /var/www/fa2.3/devel/../install/index.php:323 +msgid "Select install wizard language:" +msgstr "Wybierz jêzyk u¿ywany przy instalacji:" + +#: /var/www/fa2.3/devel/../install/index.php:329 +msgid "" +"All application preliminary requirements seems to be correct. Please press " +"Continue button below." +msgstr "" +"Wszystkie wymagania systemu wydaj± siê byæ spe³nione. Kliknij klawisz " +"poni¿ej aby rozpocz±æ instalacjê." + +#: /var/www/fa2.3/devel/../install/index.php:330 +#: /var/www/fa2.3/devel/../install/index.php:356 +#: /var/www/fa2.3/devel/../install/index.php:363 +#: /var/www/fa2.3/devel/../install/index.php:370 +#: /var/www/fa2.3/devel/../install/index.php:389 +msgid "Continue >>" +msgstr "Kontynuuj >>" + +#: /var/www/fa2.3/devel/../install/index.php:332 +msgid "" +"Application cannot be installed. Please fix problems listed below in red, " +"and press Refresh button." +msgstr "" +"Aplikacja nie mo¿e byæ zainstalowana. Usuñ wskazane problemy i kliknij " +"klawisz 'Od¶wie¿'." + +#: /var/www/fa2.3/devel/../install/index.php:333 +msgid "Refresh" +msgstr "Od¶wierz" + +#: /var/www/fa2.3/devel/../install/index.php:343 +msgid "Database Server Settings" +msgstr "Ustawienia Serwera Bazy Danych" + +#: /var/www/fa2.3/devel/../install/index.php:345 +msgid "Server Host:" +msgstr "Adres Serwera:" + +#: /var/www/fa2.3/devel/../install/index.php:346 +msgid "Database User:" +msgstr "Nazwa U¿ytkownika:" + +#: /var/www/fa2.3/devel/../install/index.php:347 +msgid "Database Password:" +msgstr "Has³o:" + +#: /var/www/fa2.3/devel/../install/index.php:348 +msgid "Database Name:" +msgstr "Nazwa Bazy Danych:" + +#: /var/www/fa2.3/devel/../install/index.php:349 +msgid "Use '0_' Table Prefix:" +msgstr "Prefiks '0_' dla Nazw Tablic:" + +#: /var/www/fa2.3/devel/../install/index.php:349 +#: /var/www/fa2.3/devel/../includes/system_tests.inc:38 +#: /var/www/fa2.3/devel/../includes/system_tests.inc:113 +#: /var/www/fa2.3/devel/../includes/system_tests.inc:126 +msgid "Yes" +msgstr "Tak" + +#: /var/www/fa2.3/devel/../install/index.php:349 +#: /var/www/fa2.3/devel/../includes/system_tests.inc:38 +#: /var/www/fa2.3/devel/../includes/system_tests.inc:113 +#: /var/www/fa2.3/devel/../includes/system_tests.inc:126 +msgid "No" +msgstr "Nie" + +#: /var/www/fa2.3/devel/../install/index.php:350 +msgid "Install Additional Language Packs from FA Repository:" +msgstr "Instalacja Dodatkowych Jêzyków z Repozytorium FA:" + +#: /var/www/fa2.3/devel/../install/index.php:351 +msgid "Install Additional COAs from FA Repository:" +msgstr "Instalacja Dodatkowych Planów Kont z Repozytorium FA:" + +#: /var/www/fa2.3/devel/../install/index.php:353 +msgid "" +"Use table prefix if you share selected database for more than one FA company." +msgstr "U¿yj prefiksu je¶li ta sama baza danych bêdzie u¿ywana dla kilku firm." + +#: /var/www/fa2.3/devel/../install/index.php:354 +msgid "" +"Do not select additional langs nor COAs if you have no working internet " +"connection right now. You can install them later." +msgstr "" +"Nie zaznaczaj wyboru dodatkowych jêzyków ani planów kont je¶li w tej chwili " +"nie masz dostêpu do internetu. Bêdziesz je móg³ zainstalowaæ równie¿ pó¼niej." + +#: /var/www/fa2.3/devel/../install/index.php:355 +#: /var/www/fa2.3/devel/../install/index.php:362 +#: /var/www/fa2.3/devel/../install/index.php:369 +#: /var/www/fa2.3/devel/../install/index.php:388 +msgid "<< Back" +msgstr "<< Wróæ" + +#: /var/www/fa2.3/devel/../install/index.php:360 +msgid "User Interface Languages Selection" +msgstr "Wybór Jêzyków Interfejsu U¿ytkownika" + +#: /var/www/fa2.3/devel/../install/index.php:367 +msgid "Charts of Accounts Selection" +msgstr "Wybór Planów Kont" + +#: /var/www/fa2.3/devel/../install/index.php:379 +msgid "Company Settings" +msgstr "Ustawienia Firmy" + +#: /var/www/fa2.3/devel/../install/index.php:381 +msgid "Company Name:" +msgstr "Nazwa Firmy:" + +#: /var/www/fa2.3/devel/../install/index.php:382 +msgid "Admin Login:" +msgstr "Login Administratora:" + +#: /var/www/fa2.3/devel/../install/index.php:383 +msgid "Admin Password:" +msgstr "Has³o Administratora:" + +#: /var/www/fa2.3/devel/../install/index.php:384 +msgid "Reenter Password:" +msgstr "Powtórz Has³o:" + +#: /var/www/fa2.3/devel/../install/index.php:385 +msgid "Select Chart of Accounts:" +msgstr "Wybierz Planów Kont:" + +#: /var/www/fa2.3/devel/../install/index.php:386 +msgid "Select Default Language:" +msgstr "Wybierz Jêzyk Domy¶lny:" + +#: /var/www/fa2.3/devel/../install/index.php:393 +msgid "FrontAccounting ERP has been installed successsfully." +msgstr "Aplikacja FrontAccounting ERP zosta³a zainstalowana pomy¶lnie." + +#: /var/www/fa2.3/devel/../install/index.php:394 +msgid "Please do not forget to remove install wizard folder." +msgstr "Nie zapomnij usun±æ folderu instalatora." + +#: /var/www/fa2.3/devel/../install/index.php:396 +msgid "Click here to start." +msgstr "Kliknij tutaj, aby rozpocz±æ pracê." + +#: /var/www/fa2.3/devel/../includes/system_tests.inc:15 +msgid "Info" +msgstr "Informacja" + +#: /var/www/fa2.3/devel/../includes/system_tests.inc:16 +msgid "Optional" +msgstr "Opcjonalne" + +#: /var/www/fa2.3/devel/../includes/system_tests.inc:17 +msgid "Recommended" +msgstr "Zalecane" + +#: /var/www/fa2.3/devel/../includes/system_tests.inc:18 +msgid "Required " +msgstr "Wymagane" + +#: /var/www/fa2.3/devel/../includes/system_tests.inc:24 +msgid "MySQL version" +msgstr "Wersja MySQL" + +#: /var/www/fa2.3/devel/../includes/system_tests.inc:28 +msgid "Upgrade MySQL server to version at least 4.1" +msgstr "U¿yj wersji serwera MySQL minimum 4.1" + +#: /var/www/fa2.3/devel/../includes/system_tests.inc:35 +msgid "PHP MySQL extension" +msgstr "Rozszerzenie PHP MySQL" + +#: /var/www/fa2.3/devel/../includes/system_tests.inc:40 +msgid "Your PHP has to have MySQL extension enabled." +msgstr "PHP musi mieæ w³±czone rozszerzenie MySQL." + +#: /var/www/fa2.3/devel/../includes/system_tests.inc:46 +msgid "PHP version" +msgstr "Wersja PHP" + +#: /var/www/fa2.3/devel/../includes/system_tests.inc:50 +msgid "Upgrade PHP to version at least 4.3.3" +msgstr "Zainstaluj PHP w wersji co najmniej 4.3.3" + +#: /var/www/fa2.3/devel/../includes/system_tests.inc:57 +msgid "Server system" +msgstr "System serwera" + +#: /var/www/fa2.3/devel/../includes/system_tests.inc:67 +msgid "Session save path" +msgstr "Katalog zapisu pliku sesji" + +#: /var/www/fa2.3/devel/../includes/system_tests.inc:79 +msgid "Removed install wizard folder" +msgstr "Folder instalatora usuniêty" + +#: /var/www/fa2.3/devel/../includes/system_tests.inc:82 +msgid "Not removed" +msgstr "Nie usuniêty" + +#: /var/www/fa2.3/devel/../includes/system_tests.inc:83 +msgid "Remove or rename install wizard folder for security reasons." +msgstr "Ze wzglêdów bezpieczeñstwa usuñ lub zmieñ nazwê folderu instalatora." + +#: /var/www/fa2.3/devel/../includes/system_tests.inc:90 +msgid "Browser type" +msgstr "Typ przegl±darki" + +#: /var/www/fa2.3/devel/../includes/system_tests.inc:94 +msgid "Any browser is supported" +msgstr "Mo¿e byæ u¿yty dowolny typ przegl±darki" + +#: /var/www/fa2.3/devel/../includes/system_tests.inc:101 +msgid "Http server type" +msgstr "Serwer http" + +#: /var/www/fa2.3/devel/../includes/system_tests.inc:105 +msgid "Any server is supported" +msgstr "Dowolny" + +#: /var/www/fa2.3/devel/../includes/system_tests.inc:112 +msgid "Native gettext" +msgstr "Biblioteka Gettext " + +#: /var/www/fa2.3/devel/../includes/system_tests.inc:116 +msgid "In case of no gettext support, php emulation is used" +msgstr "W przypadku braku wsparcia systemu, gettext jest emulowany." + +#: /var/www/fa2.3/devel/../includes/system_tests.inc:124 +msgid "Debugging mode" +msgstr "Tryb debug" + +#: /var/www/fa2.3/devel/../includes/system_tests.inc:128 +msgid "To switch debugging on set $go_debug>0 in config.php file" +msgstr "Aby w³±czyæ tryb debug ustaw $go_debug>0 in config.php file" + +#: /var/www/fa2.3/devel/../includes/system_tests.inc:137 +msgid "Error logging" +msgstr "Logowanie b³êdów" + +#: /var/www/fa2.3/devel/../includes/system_tests.inc:145 +msgid "Disabled" +msgstr "Wy³±czony" + +#: /var/www/fa2.3/devel/../includes/system_tests.inc:148 +msgid "To switch error logging set $error_logging in config.php file" +msgstr "" +"Aby w³±czyæ logowanie b³êdów ustaw zmienn± $error_logging w pliku config.php" + +#: /var/www/fa2.3/devel/../includes/system_tests.inc:151 +msgid "Log file is not writeable" +msgstr "Logfile jest niezapisywalny" + +#: /var/www/fa2.3/devel/../includes/system_tests.inc:161 +msgid "Current database version" +msgstr "Aktualna wersja bazy danych" + +#: /var/www/fa2.3/devel/../includes/system_tests.inc:165 +msgid "Database structure seems to be not upgraded to current version" +msgstr "Struktura bazy danych nie jest zaktualizowana do bie¿±cej wersji" + +#: /var/www/fa2.3/devel/../includes/system_tests.inc:180 +msgid "Company subdirectories consistency" +msgstr "Prawid³owa struktura folderów firmowych" + +#: /var/www/fa2.3/devel/../includes/system_tests.inc:193 +#: /var/www/fa2.3/devel/../includes/system_tests.inc:200 +#: /var/www/fa2.3/devel/../includes/system_tests.inc:208 +#: /var/www/fa2.3/devel/../includes/system_tests.inc:225 +#: /var/www/fa2.3/devel/../includes/system_tests.inc:345 +#, php-format +msgid "'%s' is not writeable" +msgstr "'%s' jest niezapisywalny" + +#: /var/www/fa2.3/devel/../includes/system_tests.inc:221 +msgid "Temporary directory" +msgstr "Katalog plików tymczasowych" + +#: /var/www/fa2.3/devel/../includes/system_tests.inc:233 +msgid "Language configuration consistency" +msgstr "Konfiguracja jêzykowa" + +#: /var/www/fa2.3/devel/../includes/system_tests.inc:242 +msgid "Languages folder should be writeable." +msgstr "Folder jêzyków musi byæ zapisywalny" + +#: /var/www/fa2.3/devel/../includes/system_tests.inc:250 +msgid "Languages configuration file should be writeable." +msgstr "Pliki konfiguracyjny jêzyków musi byæ zapisywalny." + +#: /var/www/fa2.3/devel/../includes/system_tests.inc:268 +#, php-format +msgid "Missing %s translation file." +msgstr "Brak pliku t³umaczeñ %s" + +#: /var/www/fa2.3/devel/../includes/system_tests.inc:273 +#, php-format +msgid "Missing system locale: %s" +msgstr "Lokalizacja '%s' nie jest zainstalowana w systemie" + +#: /var/www/fa2.3/devel/../includes/system_tests.inc:286 +msgid "Main config file" +msgstr "G³ówny plik konfiguracyjny " + +#: /var/www/fa2.3/devel/../includes/system_tests.inc:293 +#: /var/www/fa2.3/devel/../includes/system_tests.inc:315 +#, php-format +msgid "Can't write '%s' file. Check FA directory write permissions." +msgstr "Nie mo¿na zapisaæ pliku '%s'. Sprawd¼ prawa zapisu do foderu FA." + +#: /var/www/fa2.3/devel/../includes/system_tests.inc:294 +#: /var/www/fa2.3/devel/../includes/system_tests.inc:316 +#, php-format +msgid "'%s' file exists." +msgstr "Plik '%s' istnieje." + +#: /var/www/fa2.3/devel/../includes/system_tests.inc:298 +#, php-format +msgid "'%s' file should be read-only" +msgstr "Plik '%s powinien byæ zabezpieczony przed zapisem" + +#: /var/www/fa2.3/devel/../includes/system_tests.inc:307 +msgid "Database auth file" +msgstr "Pik configuracyjny bazy danych" + +#: /var/www/fa2.3/devel/../includes/system_tests.inc:320 +#, php-format +msgid "" +"'%s' file should be read-only if you do not plan to add or change companies" +msgstr "" +"Plik '%s' powinien byæ zabezpieczony przed zapisem je¶li nie planujesz " +"dodawania ani zmiany firm" + +#: /var/www/fa2.3/devel/../includes/system_tests.inc:331 +msgid "Extensions system" +msgstr "System rozszerzeñ" + +#: /var/www/fa2.3/devel/../includes/system_tests.inc:366 +msgid "Extensions configuration files and directories should be writeable" +msgstr "Pliki konfiguracyjne i foldery rozszerzeñ powinny byæ zapisywalne" + +#: /var/www/fa2.3/devel/../includes/system_tests.inc:378 +#, php-format +msgid "Non-standard theme directory '%s' is not writable" +msgstr "Niestandardowy folder tematu '%s' jest zazpieczony przed zapisem" + +#: /var/www/fa2.3/devel/../includes/system_tests.inc:388 +msgid "" +"OpenSSL PHP extension have to be enabled to use extension repository system." +msgstr "System pakietów wymaga zaisnatlowanego rozszerzenia PHP OpenSSL." + +#: /var/www/fa2.3/devel/../includes/system_tests.inc:391 +msgid "" +"OpenSSL have to be available on your server to use extension repository " +"system." +msgstr "" +"Serwer musi mieæ zainstalowane OpenSSL ¿eby mo¿na by³o korzystaæ z " +"repozytorium pakietów rozszerzeñ FA." + +#: /var/www/fa2.3/devel/../includes/system_tests.inc:414 +msgid "Test" +msgstr "Test" + +#: /var/www/fa2.3/devel/../includes/system_tests.inc:414 +msgid "Test type" +msgstr "Typ testu" + +#: /var/www/fa2.3/devel/../includes/system_tests.inc:414 +msgid "Value" +msgstr "Warto¶æ" + +#: /var/www/fa2.3/devel/../includes/system_tests.inc:414 +msgid "Comments" +msgstr "Komentarz" + +#: /var/www/fa2.3/devel/../includes/system_tests.inc:438 +msgid "Ok" +msgstr "Ok" diff --git a/install/lang/pt_BR/LC_MESSAGES/pt_BR.mo b/install/lang/pt_BR/LC_MESSAGES/pt_BR.mo new file mode 100644 index 0000000000000000000000000000000000000000..35b796953acc54f8a5543326d7275ea02aa49f54 GIT binary patch literal 9637 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 literal 0 HcmV?d00001 diff --git a/install/lang/pt_BR/LC_MESSAGES/pt_BR.po b/install/lang/pt_BR/LC_MESSAGES/pt_BR.po new file mode 100644 index 00000000..c58a8c50 --- /dev/null +++ b/install/lang/pt_BR/LC_MESSAGES/pt_BR.po @@ -0,0 +1,488 @@ +# Idioma PT-BR FrontAccouting ERP +# Copyright (C) 2010 +# This file is distributed under the same license as the PACKAGE package. +# InterConnect Brasil Ltda. , 2010. +# +#, fuzzy +msgid "" +msgstr "" +"Project-Id-Version: PACKAGE VERSION\n" +"Report-Msgid-Bugs-To: \n" +"POT-Creation-Date: 2010-08-08 12:50+0200\n" +"PO-Revision-Date: 2010-08-12 12:50+0200\n" +"Last-Translator: InterConnect Brasil \n" +"Language-Team: PT-BR <>\n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=ISO-8859-1\n" +"Content-Transfer-Encoding: 8bit\n" + +#: /var/www/fa2.3/devel/../install/index.php:20 +#: /var/www/fa2.3/devel/../install/index.php:40 +msgid "FrontAccouting ERP Installation Wizard" +msgstr "Assistente de Instalação do FrontAccouting ERP" + +#: /var/www/fa2.3/devel/../install/index.php:41 +#, php-format +msgid "Step %d: %s" +msgstr "%do. passo: %s" + +#: /var/www/fa2.3/devel/../install/index.php:48 +msgid "Chart of accounts" +msgstr "Plano de contas" + +#: /var/www/fa2.3/devel/../install/index.php:48 +#: /var/www/fa2.3/devel/../install/index.php:75 +msgid "Encoding" +msgstr "Codificação" + +#: /var/www/fa2.3/devel/../install/index.php:48 +#: /var/www/fa2.3/devel/../install/index.php:75 +msgid "Description" +msgstr "Descrição" + +#: /var/www/fa2.3/devel/../install/index.php:48 +#: /var/www/fa2.3/devel/../install/index.php:75 +msgid "Install" +msgstr "Instalar" + +#: /var/www/fa2.3/devel/../install/index.php:65 +#: /var/www/fa2.3/devel/../install/index.php:93 +msgid "Installed" +msgstr "Instalado" + +#: /var/www/fa2.3/devel/../install/index.php:75 +msgid "Language" +msgstr "Idioma" + +#: /var/www/fa2.3/devel/../install/index.php:156 +msgid "Cannot save system configuration file 'config.php'." +msgstr "Não é possível gravar o arquivo de configuração do sistema 'config.php'." + +#: /var/www/fa2.3/devel/../install/index.php:173 +msgid "Cannot open 'config_db.php' configuration file." +msgstr "Não é possível abrir o arquivo de configuração 'config_db.php'." + +#: /var/www/fa2.3/devel/../install/index.php:176 +msgid "Cannot write to the 'config_db.php' configuration file." +msgstr "Não é possível escrever no arquivo de configuração 'config_db.php'." + +#: /var/www/fa2.3/devel/../install/index.php:179 +msgid "" +"Configuration file 'config_db.php' is not writable. Change its permissions " +"so it is, then re-run installation step." +msgstr "" +"Arquivo de configuração 'config_db.php' não é gravável. Mudar suas permissões " +"para gravável, então reinstale passo a passo." + +#: /var/www/fa2.3/devel/../install/index.php:217 +msgid "Host name cannot be empty." +msgstr "O nome da máquina deve ser preenchido." + +#: /var/www/fa2.3/devel/../install/index.php:221 +msgid "Database user name cannot be empty." +msgstr "O nome do usuário do banco de dados deve ser preenchido." + +#: /var/www/fa2.3/devel/../install/index.php:225 +msgid "Database name cannot be empty." +msgstr "O nome do banco de dados deve ser preenchido." + +#: /var/www/fa2.3/devel/../install/index.php:277 +msgid "Company name cannot be empty." +msgstr "O nome da empresa deve ser preenchido." + +#: /var/www/fa2.3/devel/../install/index.php:281 +msgid "Company admin name cannot be empty." +msgstr "O nome do admin da empresa deve ser preenchido." + +#: /var/www/fa2.3/devel/../install/index.php:285 +msgid "Company admin password cannot be empty." +msgstr "A senha do admin da empresa deve ser preenchida." + +#: /var/www/fa2.3/devel/../install/index.php:289 +msgid "Company admin passwords differ." +msgstr "As senhas do administrador da empresa diferem" + +#: /var/www/fa2.3/devel/../install/index.php:320 +msgid "System Diagnostics" +msgstr "Diagnóstico do Sistema" + +#: /var/www/fa2.3/devel/../install/index.php:323 +msgid "Select install wizard language:" +msgstr "Selecione o idioma do assistente de instalação:" + +#: /var/www/fa2.3/devel/../install/index.php:329 +msgid "" +"All application preliminary requirements seems to be correct. Please press " +"Continue button below." +msgstr "" +"Todos os requisitos de aplicação preliminar parece esta correto. Por favor " +"pressione o botão Continuar." + +#: /var/www/fa2.3/devel/../install/index.php:330 +#: /var/www/fa2.3/devel/../install/index.php:356 +#: /var/www/fa2.3/devel/../install/index.php:363 +#: /var/www/fa2.3/devel/../install/index.php:370 +#: /var/www/fa2.3/devel/../install/index.php:389 +msgid "Continue >>" +msgstr "Continuar >>" + +#: /var/www/fa2.3/devel/../install/index.php:332 +msgid "" +"Application cannot be installed. Please fix problems listed below in red, " +"and press Refresh button." +msgstr "" +"O aplicativo não pode ser instalad0. Por favor corrija os problemas listados abaixo em vermelho, " +"e pressione o botão Atualizar." + +#: /var/www/fa2.3/devel/../install/index.php:333 +msgid "Refresh" +msgstr "Atualizar" + +#: /var/www/fa2.3/devel/../install/index.php:343 +msgid "Database Server Settings" +msgstr "Configuração do Banco de Dados" + +#: /var/www/fa2.3/devel/../install/index.php:345 +msgid "Server Host:" +msgstr "Servidor do Banco de Dados:" + +#: /var/www/fa2.3/devel/../install/index.php:346 +msgid "Database User:" +msgstr "Usuário do Banco de Dados:" + +#: /var/www/fa2.3/devel/../install/index.php:347 +msgid "Database Password:" +msgstr "Senha do Banco de Dados:" + +#: /var/www/fa2.3/devel/../install/index.php:348 +msgid "Database Name:" +msgstr "Nome do Banco de Dados:" + +#: /var/www/fa2.3/devel/../install/index.php:349 +msgid "Use '0_' Table Prefix:" +msgstr "Usar Prefixo de Tabela '0_':" + +#: /var/www/fa2.3/devel/../install/index.php:349 +#: /var/www/fa2.3/devel/../includes/system_tests.inc:38 +#: /var/www/fa2.3/devel/../includes/system_tests.inc:113 +#: /var/www/fa2.3/devel/../includes/system_tests.inc:126 +msgid "Yes" +msgstr "Sim" + +#: /var/www/fa2.3/devel/../install/index.php:349 +#: /var/www/fa2.3/devel/../includes/system_tests.inc:38 +#: /var/www/fa2.3/devel/../includes/system_tests.inc:113 +#: /var/www/fa2.3/devel/../includes/system_tests.inc:126 +msgid "No" +msgstr "Não" + +#: /var/www/fa2.3/devel/../install/index.php:350 +msgid "Install Additional Language Packs from FA Repository:" +msgstr "Instalar Suporte de Idiomas Adicionais do Repositório do FA:" + +#: /var/www/fa2.3/devel/../install/index.php:351 +msgid "Install Additional COAs from FA Repository:" +msgstr "Instalar Plano de Contas do Repositório do FA:" + +#: /var/www/fa2.3/devel/../install/index.php:353 +msgid "" +"Use table prefix if you share selected database for more than one FA company." +msgstr "" +"Use o prefixo da tabela se você for utilizar o banco de dados para mais de uma empresa." + +#: /var/www/fa2.3/devel/../install/index.php:354 +msgid "" +"Do not select additional langs nor COAs if you have no working internet " +"connection right now. You can install them later." +msgstr "" +"Não selecione Idiomas Adicionais nem Plano de Contas se você não tem uma " +"conexão com a internet agora. Você poderá instalar mais tarde." + +#: /var/www/fa2.3/devel/../install/index.php:355 +#: /var/www/fa2.3/devel/../install/index.php:362 +#: /var/www/fa2.3/devel/../install/index.php:369 +#: /var/www/fa2.3/devel/../install/index.php:388 +msgid "<< Back" +msgstr "<< Voltar" + +#: /var/www/fa2.3/devel/../install/index.php:360 +msgid "User Interface Languages Selection" +msgstr "Seleção da Idioma da Interface" + +#: /var/www/fa2.3/devel/../install/index.php:367 +msgid "Charts of Accounts Selection" +msgstr "Seleção do Plano de Contas" + +#: /var/www/fa2.3/devel/../install/index.php:379 +msgid "Company Settings" +msgstr "Configuração da Empresa" + +#: /var/www/fa2.3/devel/../install/index.php:381 +msgid "Company Name:" +msgstr "Nome da Empresa:" + +#: /var/www/fa2.3/devel/../install/index.php:382 +msgid "Admin Login:" +msgstr "Login do Administrador:" + +#: /var/www/fa2.3/devel/../install/index.php:383 +msgid "Admin Password:" +msgstr "Senha do Administrador:" + +#: /var/www/fa2.3/devel/../install/index.php:384 +msgid "Reenter Password:" +msgstr "Digitar a Senha Novamente:" + +#: /var/www/fa2.3/devel/../install/index.php:385 +msgid "Select Chart of Accounts:" +msgstr "Selecionar Plano de Contas:" + +#: /var/www/fa2.3/devel/../install/index.php:386 +msgid "Select Default Language:" +msgstr "Selecionar Idioma Padrão:" + +#: /var/www/fa2.3/devel/../install/index.php:393 +msgid "FrontAccounting ERP has been installed successsfully." +msgstr "O FrontAccounting ERP foi instalado com sucesso." + +#: /var/www/fa2.3/devel/../install/index.php:394 +msgid "Please do not forget to remove install wizard folder." +msgstr "Por favor não se esqueça de remover a pasta de instalação do assistente." + +#: /var/www/fa2.3/devel/../install/index.php:396 +msgid "Click here to start." +msgstr "Clique aqui para iniciar." + +#: /var/www/fa2.3/devel/../includes/system_tests.inc:15 +msgid "Info" +msgstr "Info" + +#: /var/www/fa2.3/devel/../includes/system_tests.inc:16 +msgid "Optional" +msgstr "Opcional" + +#: /var/www/fa2.3/devel/../includes/system_tests.inc:17 +msgid "Recomended" +msgstr "Recomendado" + +#: /var/www/fa2.3/devel/../includes/system_tests.inc:18 +msgid "Required " +msgstr "Requerido " + +#: /var/www/fa2.3/devel/../includes/system_tests.inc:24 +msgid "MySQL version" +msgstr "Versão do MySQL" + +#: /var/www/fa2.3/devel/../includes/system_tests.inc:28 +msgid "Upgrade MySQL server to version at least 4.1" +msgstr "Atualize o servidor MySQL para versão 4.1 ou superior" + +#: /var/www/fa2.3/devel/../includes/system_tests.inc:35 +msgid "PHP MySQL extension" +msgstr "Extensão PHP MySQL" + +#: /var/www/fa2.3/devel/../includes/system_tests.inc:40 +msgid "Your PHP has to have MySQL extension enabled." +msgstr "Seu PHP deve ter extensão de MySQL habilitada." + +#: /var/www/fa2.3/devel/../includes/system_tests.inc:46 +msgid "PHP version" +msgstr "Versão do PHP" + +#: /var/www/fa2.3/devel/../includes/system_tests.inc:50 +msgid "Upgrade PHP to version at least 4.3.3" +msgstr "Atualize o PHP para versão 4.3.3 ou superior" + +#: /var/www/fa2.3/devel/../includes/system_tests.inc:57 +msgid "Server system" +msgstr "Sistema do Servidor" + +#: /var/www/fa2.3/devel/../includes/system_tests.inc:67 +msgid "Session save path" +msgstr "Endereço de gravação da seção" + +#: /var/www/fa2.3/devel/../includes/system_tests.inc:79 +msgid "Removed install wizard folder" +msgstr "Removida a pasta do assistente de instalação" + +#: /var/www/fa2.3/devel/../includes/system_tests.inc:82 +msgid "Not removed" +msgstr "Não removido" + +#: /var/www/fa2.3/devel/../includes/system_tests.inc:83 +msgid "Remove or rename install wizard folder for security reasons." +msgstr "Remover ou renomear a pasta do assistente de instalação por motivos de segurança." + +#: /var/www/fa2.3/devel/../includes/system_tests.inc:90 +msgid "Browser type" +msgstr "Tipo do navegador" + +#: /var/www/fa2.3/devel/../includes/system_tests.inc:94 +msgid "Any browser is supported" +msgstr "Qualquer navegador é compatível" + +#: /var/www/fa2.3/devel/../includes/system_tests.inc:101 +msgid "Http server type" +msgstr "Tipo de servidor Http" + +#: /var/www/fa2.3/devel/../includes/system_tests.inc:105 +msgid "Any server is supported" +msgstr "Qualquer servidor é compatível" + +#: /var/www/fa2.3/devel/../includes/system_tests.inc:112 +msgid "Native gettext" +msgstr "gettext nativo" + +#: /var/www/fa2.3/devel/../includes/system_tests.inc:116 +msgid "In case of no getext support, php emulation is used" +msgstr "Na falta de suporte getext, a emulação php será usada" + +#: /var/www/fa2.3/devel/../includes/system_tests.inc:124 +msgid "Debugging mode" +msgstr "Modo de depuração (debug)" + +#: /var/www/fa2.3/devel/../includes/system_tests.inc:128 +msgid "To switch debugging on set $go_debug>0 in config.php file" +msgstr "Para ativar depuração (debug) inclua $go_debug>0 no arquivo config.php" + +#: /var/www/fa2.3/devel/../includes/system_tests.inc:137 +msgid "Error logging" +msgstr "Log de erros" + +#: /var/www/fa2.3/devel/../includes/system_tests.inc:145 +msgid "Disabled" +msgstr "Desabilitado" + +#: /var/www/fa2.3/devel/../includes/system_tests.inc:148 +msgid "To switch error logging set $error_logging in config.php file" +msgstr "Para logar erros inclua $error_logging no arquivo config.php" + +#: /var/www/fa2.3/devel/../includes/system_tests.inc:151 +msgid "Log file is not writeable" +msgstr "Arquivo de log não é gravável" + +#: /var/www/fa2.3/devel/../includes/system_tests.inc:161 +msgid "Current database version" +msgstr "Versão do banco de dados atual" + +#: /var/www/fa2.3/devel/../includes/system_tests.inc:165 +msgid "Database structure seems to be not upgraded to current version" +msgstr "A estrutura do banco de dados não foi atualizada para a versão atual" + +#: /var/www/fa2.3/devel/../includes/system_tests.inc:180 +msgid "Company subdirectories consistency" +msgstr "Consistência de subdiretórios da empresa" + +#: /var/www/fa2.3/devel/../includes/system_tests.inc:193 +#: /var/www/fa2.3/devel/../includes/system_tests.inc:200 +#: /var/www/fa2.3/devel/../includes/system_tests.inc:208 +#: /var/www/fa2.3/devel/../includes/system_tests.inc:225 +#: /var/www/fa2.3/devel/../includes/system_tests.inc:345 +#, php-format +msgid "'%s' is not writeable" +msgstr "'%s' não é gravável" + +#: /var/www/fa2.3/devel/../includes/system_tests.inc:221 +msgid "Temporary directory" +msgstr "Diretório temporário" + +#: /var/www/fa2.3/devel/../includes/system_tests.inc:233 +msgid "Language configuration consistency" +msgstr "Consistência de configuração de idioma" + +#: /var/www/fa2.3/devel/../includes/system_tests.inc:242 +msgid "Languages folder should be writeable." +msgstr "Diretório de idiomas deveria ser gravável." + +#: /var/www/fa2.3/devel/../includes/system_tests.inc:250 +msgid "Languages configuration file should be writeable." +msgstr "O arquivo de configuração de idiomas deve ser gravável." + +#: /var/www/fa2.3/devel/../includes/system_tests.inc:268 +#, php-format +msgid "Missing %s translation file." +msgstr "Falta o arquivo de tradução %s." + +#: /var/www/fa2.3/devel/../includes/system_tests.inc:273 +#, php-format +msgid "Missing system locale: %s" +msgstr "Falta localidade (locale) do sistema: %s" + +#: /var/www/fa2.3/devel/../includes/system_tests.inc:286 +msgid "Main config file" +msgstr "Arquivo de configuração principal" + +#: /var/www/fa2.3/devel/../includes/system_tests.inc:293 +#: /var/www/fa2.3/devel/../includes/system_tests.inc:315 +#, php-format +msgid "Can't write '%s' file. Check FA directory write permissions." +msgstr "Não é possível escrever no arquivo '%s'. Verifique a permissõe de escrita do diretório FA" + +#: /var/www/fa2.3/devel/../includes/system_tests.inc:294 +#: /var/www/fa2.3/devel/../includes/system_tests.inc:316 +#, php-format +msgid "'%s' file exists." +msgstr "O arquivo '%s' existente." + +#: /var/www/fa2.3/devel/../includes/system_tests.inc:298 +#, php-format +msgid "'%s' file should be read-only" +msgstr "O arquivo '%s' deve ser somente leitura" + +#: /var/www/fa2.3/devel/../includes/system_tests.inc:307 +msgid "Database auth file" +msgstr "Arquivo de autorização da base de dados" + +#: /var/www/fa2.3/devel/../includes/system_tests.inc:320 +#, php-format +msgid "" +"'%s' file should be read-only if you do not plan to add or change companies" +msgstr "" +"O arquivo '%s' deve ser somente leitura se você não planeja adicionar ou alterar empresas" + +#: /var/www/fa2.3/devel/../includes/system_tests.inc:331 +msgid "Extensions system" +msgstr "Sistema de extensões" + +#: /var/www/fa2.3/devel/../includes/system_tests.inc:366 +msgid "Extensions configuration files and directories should be writeable" +msgstr "Extensões de arquivos de configuração e diretórios devem ser graváveis" + +#: /var/www/fa2.3/devel/../includes/system_tests.inc:378 +#, php-format +msgid "Non-standard theme directory '%s' is not writable" +msgstr "Descrição de diretório sem-padrão '%s' não é gravável" + +#: /var/www/fa2.3/devel/../includes/system_tests.inc:388 +msgid "" +"OpenSSL PHP extension have to be enabled to use extension repository system." +msgstr "" +"A extensão OpenSSL PHP tem que estar habilitada para usar o repositório de extensão." + +#: /var/www/fa2.3/devel/../includes/system_tests.inc:391 +msgid "" +"OpenSSL have to be available on your server to use extension repository " +"system." +msgstr "" +"OpenSSL deve estar disponível no seu servidor para utilizar o repositório " +"de extensão." + +#: /var/www/fa2.3/devel/../includes/system_tests.inc:414 +msgid "Test" +msgstr "Teste" + +#: /var/www/fa2.3/devel/../includes/system_tests.inc:414 +msgid "Test type" +msgstr "Tipo de teste" + +#: /var/www/fa2.3/devel/../includes/system_tests.inc:414 +msgid "Value" +msgstr "Valor" + +#: /var/www/fa2.3/devel/../includes/system_tests.inc:414 +msgid "Comments" +msgstr "Comentários" + +#: /var/www/fa2.3/devel/../includes/system_tests.inc:438 +msgid "Ok" +msgstr "Ok" diff --git a/install/lang/sv_SE/LC_MESSAGES/sv_SE.mo b/install/lang/sv_SE/LC_MESSAGES/sv_SE.mo new file mode 100644 index 0000000000000000000000000000000000000000..16b811b146c5b93a1c5c935aa11ca3ad0c3647ad GIT binary patch literal 9067 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 literal 0 HcmV?d00001 diff --git a/install/lang/sv_SE/LC_MESSAGES/sv_SE.po b/install/lang/sv_SE/LC_MESSAGES/sv_SE.po new file mode 100644 index 00000000..5a1441e6 --- /dev/null +++ b/install/lang/sv_SE/LC_MESSAGES/sv_SE.po @@ -0,0 +1,464 @@ +# Frontaccounting ERP Installer +# Copyright (C) 2010 FrontAccounting LLC +# This file is distributed under the same license as the FrontAccounting package. +# Joe Hunt +msgid "" +msgstr "" +"Project-Id-Version: PACKAGE VERSION\n" +"Report-Msgid-Bugs-To: \n" +"POT-Creation-Date: 2010-08-08 12:50+0200\n" +"PO-Revision-Date: 2010-08-08 17:14+0100\n" +"Last-Translator: Translation Team \n" +"Language-Team: LANGUAGE \n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=iso-8859-1\n" +"Content-Transfer-Encoding: 8bit\n" +"X-Poedit-Language: Swedish\n" +"X-Poedit-Country: SWEDEN\n" +"X-Poedit-SourceCharset: iso-8859-1\n" + +#: /var/www/fa2.3/devel/../install/index.php:20 +#: /var/www/fa2.3/devel/../install/index.php:40 +msgid "FrontAccouting ERP Installation Wizard" +msgstr "FrontAccounting ERP installationswizard" + +#: /var/www/fa2.3/devel/../install/index.php:41 +#, php-format +msgid "Step %d: %s" +msgstr "Steg %d: %s" + +#: /var/www/fa2.3/devel/../install/index.php:48 +msgid "Chart of accounts" +msgstr "Kontoplaner" + +#: /var/www/fa2.3/devel/../install/index.php:48 +#: /var/www/fa2.3/devel/../install/index.php:75 +msgid "Encoding" +msgstr "Kodning" + +#: /var/www/fa2.3/devel/../install/index.php:48 +#: /var/www/fa2.3/devel/../install/index.php:75 +msgid "Description" +msgstr "Beskrivning" + +#: /var/www/fa2.3/devel/../install/index.php:48 +#: /var/www/fa2.3/devel/../install/index.php:75 +msgid "Install" +msgstr "Installera" + +#: /var/www/fa2.3/devel/../install/index.php:65 +#: /var/www/fa2.3/devel/../install/index.php:93 +msgid "Installed" +msgstr "Installerad" + +#: /var/www/fa2.3/devel/../install/index.php:75 +msgid "Language" +msgstr "Språk" + +#: /var/www/fa2.3/devel/../install/index.php:156 +msgid "Cannot save system configuration file 'config.php'." +msgstr "Kan inte spara system konfigurationsfilen 'config.php'." + +#: /var/www/fa2.3/devel/../install/index.php:173 +msgid "Cannot open 'config_db.php' configuration file." +msgstr "Kan inte öppna 'config_db.php' konfigurationsfilen." + +#: /var/www/fa2.3/devel/../install/index.php:176 +msgid "Cannot write to the 'config_db.php' configuration file." +msgstr "Kan inte skriva till 'config_db.php konfigutionsfilen." + +#: /var/www/fa2.3/devel/../install/index.php:179 +msgid "Configuration file 'config_db.php' is not writable. Change its permissions so it is, then re-run installation step." +msgstr "Konfigurationsfilen 'config_db.php' är inte skrivbar. Ändra så att den ör skrivbar, och kör installationssteget igen." + +#: /var/www/fa2.3/devel/../install/index.php:217 +msgid "Host name cannot be empty." +msgstr "Värtsnamnet kan inte vara tomt." + +#: /var/www/fa2.3/devel/../install/index.php:221 +msgid "Database user name cannot be empty." +msgstr "Databas användarnamet kan inte vara tomt." + +#: /var/www/fa2.3/devel/../install/index.php:225 +msgid "Database name cannot be empty." +msgstr "Databasnamnet kan inte vara toms." + +#: /var/www/fa2.3/devel/../install/index.php:277 +msgid "Company name cannot be empty." +msgstr "Företagsnamnet kan inte vara tomt." + +#: /var/www/fa2.3/devel/../install/index.php:281 +msgid "Company admin name cannot be empty." +msgstr "Företags admin namnet kan inte vara tomt." + +#: /var/www/fa2.3/devel/../install/index.php:285 +msgid "Company admin password cannot be empty." +msgstr "Företags admin lösenordet kan inte vara tomt." + +#: /var/www/fa2.3/devel/../install/index.php:289 +msgid "Company admin passwords differ." +msgstr "Företags admin lösenordet är inte samma." + +#: /var/www/fa2.3/devel/../install/index.php:320 +msgid "System Diagnostics" +msgstr "System diagnostik" + +#: /var/www/fa2.3/devel/../install/index.php:323 +msgid "Select install wizard language:" +msgstr "Välj installationswizardens språk:" + +#: /var/www/fa2.3/devel/../install/index.php:329 +msgid "All application preliminary requirements seems to be correct. Please press Continue button below." +msgstr "Alla programmets behov ser ut att vara korrekta. Vänligen tryck Fortsätt knappen nedan." + +#: /var/www/fa2.3/devel/../install/index.php:330 +#: /var/www/fa2.3/devel/../install/index.php:356 +#: /var/www/fa2.3/devel/../install/index.php:363 +#: /var/www/fa2.3/devel/../install/index.php:370 +#: /var/www/fa2.3/devel/../install/index.php:389 +msgid "Continue >>" +msgstr "Fortsätt >>" + +#: /var/www/fa2.3/devel/../install/index.php:332 +msgid "Application cannot be installed. Please fix problems listed below in red, and press Refresh button." +msgstr "Programmet kan inte installeras. Vänligen fixa problemen som är beskrivna nedan och tryk Upprepa knappen." + +#: /var/www/fa2.3/devel/../install/index.php:333 +msgid "Refresh" +msgstr "Upprepa" + +#: /var/www/fa2.3/devel/../install/index.php:343 +msgid "Database Server Settings" +msgstr "Databasserver inställningar" + +#: /var/www/fa2.3/devel/../install/index.php:345 +msgid "Server Host:" +msgstr "Server värt:" + +#: /var/www/fa2.3/devel/../install/index.php:346 +msgid "Database User:" +msgstr "Databasanvändare:" + +#: /var/www/fa2.3/devel/../install/index.php:347 +msgid "Database Password:" +msgstr "Databaslösenord:" + +#: /var/www/fa2.3/devel/../install/index.php:348 +msgid "Database Name:" +msgstr "Databasnamn:" + +#: /var/www/fa2.3/devel/../install/index.php:349 +msgid "Use '0_' Table Prefix:" +msgstr "Använd '0_' tabell prefix:" + +#: /var/www/fa2.3/devel/../install/index.php:349 +#: /var/www/fa2.3/devel/../includes/system_tests.inc:38 +#: /var/www/fa2.3/devel/../includes/system_tests.inc:113 +#: /var/www/fa2.3/devel/../includes/system_tests.inc:126 +msgid "Yes" +msgstr "Ja" + +#: /var/www/fa2.3/devel/../install/index.php:349 +#: /var/www/fa2.3/devel/../includes/system_tests.inc:38 +#: /var/www/fa2.3/devel/../includes/system_tests.inc:113 +#: /var/www/fa2.3/devel/../includes/system_tests.inc:126 +msgid "No" +msgstr "Nej" + +#: /var/www/fa2.3/devel/../install/index.php:350 +msgid "Install Additional Language Packs from FA Repository:" +msgstr "Installera ytterligare språkpaket från FA Repository:" + +#: /var/www/fa2.3/devel/../install/index.php:351 +msgid "Install Additional COAs from FA Repository:" +msgstr "Installera ytterligare kontoplaner från FA lagret:" + +#: /var/www/fa2.3/devel/../install/index.php:353 +msgid "Use table prefix if you share selected database for more than one FA company." +msgstr "Använd tabell prefix om du delar databasen med flera än ett företag." + +#: /var/www/fa2.3/devel/../install/index.php:354 +msgid "Do not select additional langs nor COAs if you have no working internet connection right now. You can install them later." +msgstr "Välj inte ytterligare språk eller kontoplaner om du inte har någon fungerande internet förbindelse nu. Du kan installere dem senare." + +#: /var/www/fa2.3/devel/../install/index.php:355 +#: /var/www/fa2.3/devel/../install/index.php:362 +#: /var/www/fa2.3/devel/../install/index.php:369 +#: /var/www/fa2.3/devel/../install/index.php:388 +msgid "<< Back" +msgstr "<< Tillbaka" + +#: /var/www/fa2.3/devel/../install/index.php:360 +msgid "User Interface Languages Selection" +msgstr "Användar språkval" + +#: /var/www/fa2.3/devel/../install/index.php:367 +msgid "Charts of Accounts Selection" +msgstr "Kontoplansval" + +#: /var/www/fa2.3/devel/../install/index.php:379 +msgid "Company Settings" +msgstr "Företagsinställningar" + +#: /var/www/fa2.3/devel/../install/index.php:381 +msgid "Company Name:" +msgstr "Företagsnamn:" + +#: /var/www/fa2.3/devel/../install/index.php:382 +msgid "Admin Login:" +msgstr "Admin logga in:" + +#: /var/www/fa2.3/devel/../install/index.php:383 +msgid "Admin Password:" +msgstr "Admin lösenord:" + +#: /var/www/fa2.3/devel/../install/index.php:384 +msgid "Reenter Password:" +msgstr "Upprepa lösenordet:" + +#: /var/www/fa2.3/devel/../install/index.php:385 +msgid "Select Chart of Accounts:" +msgstr "Välj kontoplan:" + +#: /var/www/fa2.3/devel/../install/index.php:386 +msgid "Select Default Language:" +msgstr "Välj standardspråk:" + +#: /var/www/fa2.3/devel/../install/index.php:393 +msgid "FrontAccounting ERP has been installed successsfully." +msgstr "FrontAccounting ERP har installerats." + +#: /var/www/fa2.3/devel/../install/index.php:394 +msgid "Please do not forget to remove install wizard folder." +msgstr "Vänligen glöm inte att omdöpa eller ta bort installationswizrdens mapp." + +#: /var/www/fa2.3/devel/../install/index.php:396 +msgid "Click here to start." +msgstr "Klicka här för at börja:" + +#: /var/www/fa2.3/devel/../includes/system_tests.inc:15 +msgid "Info" +msgstr "Info" + +#: /var/www/fa2.3/devel/../includes/system_tests.inc:16 +msgid "Optional" +msgstr "Frivillig" + +#: /var/www/fa2.3/devel/../includes/system_tests.inc:17 +msgid "Recommended" +msgstr "Rekommanderad" + +#: /var/www/fa2.3/devel/../includes/system_tests.inc:18 +msgid "Required " +msgstr "Nödvändig" + +#: /var/www/fa2.3/devel/../includes/system_tests.inc:24 +msgid "MySQL version" +msgstr "MySQL version" + +#: /var/www/fa2.3/devel/../includes/system_tests.inc:28 +msgid "Upgrade MySQL server to version at least 4.1" +msgstr "Uppgradera MySQL servern till minst version 4.1" + +#: /var/www/fa2.3/devel/../includes/system_tests.inc:35 +msgid "PHP MySQL extension" +msgstr "PHP MySQL tillägg" + +#: /var/www/fa2.3/devel/../includes/system_tests.inc:40 +msgid "Your PHP has to have MySQL extension enabled." +msgstr "Din PHP måste ha MySQL tillägg aktiverat." + +#: /var/www/fa2.3/devel/../includes/system_tests.inc:46 +msgid "PHP version" +msgstr "PHP version" + +#: /var/www/fa2.3/devel/../includes/system_tests.inc:50 +msgid "Upgrade PHP to version at least 4.3.3" +msgstr "Uppgradera PHP till minst 4.3.3" + +#: /var/www/fa2.3/devel/../includes/system_tests.inc:57 +msgid "Server system" +msgstr "Serversystem" + +#: /var/www/fa2.3/devel/../includes/system_tests.inc:67 +msgid "Session save path" +msgstr "Session save path" + +#: /var/www/fa2.3/devel/../includes/system_tests.inc:79 +msgid "Removed install wizard folder" +msgstr "Omdöpt installationswizardens mapp" + +#: /var/www/fa2.3/devel/../includes/system_tests.inc:82 +msgid "Not removed" +msgstr "Inte borttagen" + +#: /var/www/fa2.3/devel/../includes/system_tests.inc:83 +msgid "Remove or rename install wizard folder for security reasons." +msgstr "Ta bort eller omdöp installationswizardens mapp av säkerhetsmässiga orsaker." + +#: /var/www/fa2.3/devel/../includes/system_tests.inc:90 +msgid "Browser type" +msgstr "Browswrtyp" + +#: /var/www/fa2.3/devel/../includes/system_tests.inc:94 +msgid "Any browser is supported" +msgstr "Alla browser stöds." + +#: /var/www/fa2.3/devel/../includes/system_tests.inc:101 +msgid "Http server type" +msgstr "Http servertyp" + +#: /var/www/fa2.3/devel/../includes/system_tests.inc:105 +msgid "Any server is supported" +msgstr "Alla servrar stöds" + +#: /var/www/fa2.3/devel/../includes/system_tests.inc:112 +msgid "Native gettext" +msgstr "Inhemsk gettext" + +#: /var/www/fa2.3/devel/../includes/system_tests.inc:116 +msgid "In case of no gettext support, php emulation is used" +msgstr "Om inte gettext stöds, används PHP emulering." + +#: /var/www/fa2.3/devel/../includes/system_tests.inc:124 +msgid "Debugging mode" +msgstr "Debug sätt" + +#: /var/www/fa2.3/devel/../includes/system_tests.inc:128 +msgid "To switch debugging on set $go_debug>0 in config.php file" +msgstr "För att koppla på debugging, sätt $go_debug>0 i config.php filen" + +#: /var/www/fa2.3/devel/../includes/system_tests.inc:137 +msgid "Error logging" +msgstr "Fellogg" + +#: /var/www/fa2.3/devel/../includes/system_tests.inc:145 +msgid "Disabled" +msgstr "Bortkopplat" + +#: /var/www/fa2.3/devel/../includes/system_tests.inc:148 +msgid "To switch error logging set $error_logging in config.php file" +msgstr "För att koppla på fel log, sätt $error_logging i config.php filen" + +#: /var/www/fa2.3/devel/../includes/system_tests.inc:151 +msgid "Log file is not writeable" +msgstr "Loggfilen är inte skrivbar" + +#: /var/www/fa2.3/devel/../includes/system_tests.inc:161 +msgid "Current database version" +msgstr "Nuvarande databasversion" + +#: /var/www/fa2.3/devel/../includes/system_tests.inc:165 +msgid "Database structure seems to be not upgraded to current version" +msgstr "Databasstruktur tycks inte ha blivit uppgraderat till nuvarande version" + +#: /var/www/fa2.3/devel/../includes/system_tests.inc:180 +msgid "Company subdirectories consistency" +msgstr "Företagsundermapp konsistens " + +#: /var/www/fa2.3/devel/../includes/system_tests.inc:193 +#: /var/www/fa2.3/devel/../includes/system_tests.inc:200 +#: /var/www/fa2.3/devel/../includes/system_tests.inc:208 +#: /var/www/fa2.3/devel/../includes/system_tests.inc:225 +#: /var/www/fa2.3/devel/../includes/system_tests.inc:345 +#, php-format +msgid "'%s' is not writeable" +msgstr "'%s' är inte skrivbar" + +#: /var/www/fa2.3/devel/../includes/system_tests.inc:221 +msgid "Temporary directory" +msgstr "Temporär mapp" + +#: /var/www/fa2.3/devel/../includes/system_tests.inc:233 +msgid "Language configuration consistency" +msgstr "Språkkonfiguration konsistens" + +#: /var/www/fa2.3/devel/../includes/system_tests.inc:242 +msgid "Languages folder should be writeable." +msgstr "Språkmapp måste vara skrivbar" + +#: /var/www/fa2.3/devel/../includes/system_tests.inc:250 +msgid "Languages configuration file should be writeable." +msgstr "Språkkonfigurationsfil måste vara skrivbar." + +#: /var/www/fa2.3/devel/../includes/system_tests.inc:268 +#, php-format +msgid "Missing %s translation file." +msgstr "'%s' översättningsfil saknas." + +#: /var/www/fa2.3/devel/../includes/system_tests.inc:273 +#, php-format +msgid "Missing system locale: %s" +msgstr "System locale: %s saknas" + +#: /var/www/fa2.3/devel/../includes/system_tests.inc:286 +msgid "Main config file" +msgstr "Huvud config fil" + +#: /var/www/fa2.3/devel/../includes/system_tests.inc:293 +#: /var/www/fa2.3/devel/../includes/system_tests.inc:315 +#, php-format +msgid "Can't write '%s' file. Check FA directory write permissions." +msgstr "Kan inte skriva till '%s' fil. Kolla FA mappens skrivbarhet." + +#: /var/www/fa2.3/devel/../includes/system_tests.inc:294 +#: /var/www/fa2.3/devel/../includes/system_tests.inc:316 +#, php-format +msgid "'%s' file exists." +msgstr "'%s' filen finns redan." + +#: /var/www/fa2.3/devel/../includes/system_tests.inc:298 +#, php-format +msgid "'%s' file should be read-only" +msgstr "'%s' filen måste vara read-only" + +#: /var/www/fa2.3/devel/../includes/system_tests.inc:307 +msgid "Database auth file" +msgstr "Databas Auth fil" + +#: /var/www/fa2.3/devel/../includes/system_tests.inc:320 +#, php-format +msgid "'%s' file should be read-only if you do not plan to add or change companies" +msgstr "'%s' filen måste vara read-only om du inte planerar att lägga till eller ändra företag." + +#: /var/www/fa2.3/devel/../includes/system_tests.inc:331 +msgid "Extensions system" +msgstr "Tilläggssystem" + +#: /var/www/fa2.3/devel/../includes/system_tests.inc:366 +msgid "Extensions configuration files and directories should be writeable" +msgstr "Tillägskonfigurationsfilen och mappar måste vara skrivbara" + +#: /var/www/fa2.3/devel/../includes/system_tests.inc:378 +#, php-format +msgid "Non-standard theme directory '%s' is not writable" +msgstr "Icke standard theme mapp '%s' är inte skrivbar" + +#: /var/www/fa2.3/devel/../includes/system_tests.inc:388 +msgid "OpenSSL PHP extension have to be enabled to use extension repository system." +msgstr "OpenSSL PHP tillägget måste vara aktivt för att använda tillägslagret" + +#: /var/www/fa2.3/devel/../includes/system_tests.inc:391 +msgid "OpenSSL have to be available on your server to use extension repository system." +msgstr "OpenSSL måste finnas på din server för att använda tillägslagret." + +#: /var/www/fa2.3/devel/../includes/system_tests.inc:414 +msgid "Test" +msgstr "Test" + +#: /var/www/fa2.3/devel/../includes/system_tests.inc:414 +msgid "Test type" +msgstr "Testtyp" + +#: /var/www/fa2.3/devel/../includes/system_tests.inc:414 +msgid "Value" +msgstr "Värde" + +#: /var/www/fa2.3/devel/../includes/system_tests.inc:414 +msgid "Comments" +msgstr "Kommentarer" + +#: /var/www/fa2.3/devel/../includes/system_tests.inc:438 +msgid "Ok" +msgstr "Ok" + diff --git a/install/lang/zh_CN/LC_MESSAGES/zh_CN.mo b/install/lang/zh_CN/LC_MESSAGES/zh_CN.mo new file mode 100644 index 0000000000000000000000000000000000000000..6e9782790205cf8cc3e241e35c232b5a856bf14f GIT binary patch literal 8663 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 U_$-k@B84>V!hc!FBp@;W2WH%@T>t<8 literal 0 HcmV?d00001 diff --git a/install/lang/zh_CN/LC_MESSAGES/zh_CN.po b/install/lang/zh_CN/LC_MESSAGES/zh_CN.po new file mode 100644 index 00000000..fb4c37f5 --- /dev/null +++ b/install/lang/zh_CN/LC_MESSAGES/zh_CN.po @@ -0,0 +1,466 @@ +# SOME DESCRIPTIVE TITLE. +# Copyright (C) YEAR THE PACKAGE'S COPYRIGHT HOLDER +# This file is distributed under the same license as the PACKAGE package. +# FIRST AUTHOR , YEAR. +# +msgid "" +msgstr "" +"Project-Id-Version: PACKAGE VERSION\n" +"Report-Msgid-Bugs-To: \n" +"POT-Creation-Date: 2010-08-13 15:12+0200\n" +"PO-Revision-Date: 2010-10-01 14:22+0100\n" +"Last-Translator: Scott \n" +"Language-Team: LANGUAGE \n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=UTF-8\n" +"Content-Transfer-Encoding: 8bit\n" +"X-Poedit-Language: Chinese\n" +"X-Poedit-Country: CHINA\n" + +#: ../install/index.php:20 +#: ../install/index.php:40 +msgid "FrontAccouting ERP Installation Wizard" +msgstr "FrontAccouting ERP 安装向导" + +#: ../install/index.php:41 +#, php-format +msgid "Step %d: %s" +msgstr "第 %d: %s æ­¥" + +#: ../install/index.php:48 +msgid "Chart of accounts" +msgstr "账户图" + +#: ../install/index.php:48 +#: ../install/index.php:75 +msgid "Encoding" +msgstr "编码" + +#: ../install/index.php:48 +#: ../install/index.php:75 +msgid "Description" +msgstr "描述" + +#: ../install/index.php:48 +#: ../install/index.php:75 +msgid "Install" +msgstr "安装" + +#: ../install/index.php:65 +#: ../install/index.php:93 +msgid "Installed" +msgstr "已安装" + +#: ../install/index.php:75 +msgid "Language" +msgstr "语言" + +#: ../install/index.php:156 +msgid "Cannot save system configuration file 'config.php'." +msgstr "不能保存系统配置文件 'config.php'。" + +#: ../install/index.php:173 +msgid "Cannot open 'config_db.php' configuration file." +msgstr "不能打开'config_db.php' 配置文件。" + +#: ../install/index.php:176 +msgid "Cannot write to the 'config_db.php' configuration file." +msgstr "不能写入'config_db.php' 配置文件。" + +#: ../install/index.php:179 +msgid "Configuration file 'config_db.php' is not writable. Change its permissions so it is, then re-run installation step." +msgstr "配置文件 'config_db.php'不可写。改变文件权限,然后重新运行安装步骤。" + +#: ../install/index.php:217 +msgid "Host name cannot be empty." +msgstr "数据库主机名不能为空。" + +#: ../install/index.php:221 +msgid "Database user name cannot be empty." +msgstr "数据库用户名不能为空。" + +#: ../install/index.php:225 +msgid "Database name cannot be empty." +msgstr "数据库名不能为空。" + +#: ../install/index.php:277 +msgid "Company name cannot be empty." +msgstr "公司名不能为空" + +#: ../install/index.php:281 +msgid "Company admin name cannot be empty." +msgstr "公司管理员名不能为空。" + +#: ../install/index.php:285 +msgid "Company admin password cannot be empty." +msgstr "公司管理员密码不能为空。" + +#: ../install/index.php:289 +msgid "Company admin passwords differ." +msgstr "公司管理员密码不同。" + +#: ../install/index.php:321 +msgid "System Diagnostics" +msgstr "系统诊断" + +#: ../install/index.php:323 +msgid "Select install wizard language:" +msgstr "选择安装向导语言:" + +#: ../install/index.php:329 +msgid "All application preliminary requirements seems to be correct. Please press Continue button below." +msgstr "全部软件的初步要求看来正确。请按下面的\"继续\"按钮" + +#: ../install/index.php:330 +#: ../install/index.php:356 +#: ../install/index.php:363 +#: ../install/index.php:370 +#: ../install/index.php:389 +msgid "Continue >>" +msgstr "继续 >>" + +#: ../install/index.php:332 +msgid "Application cannot be installed. Please fix problems listed below in red, and press Refresh button." +msgstr "不能安装软件。请修正红字所列的问题然后按刷新按钮。" + +#: ../install/index.php:333 +msgid "Refresh" +msgstr "刷新" + +#: ../install/index.php:343 +msgid "Database Server Settings" +msgstr "数据库服务器设置" + +#: ../install/index.php:345 +msgid "Server Host:" +msgstr "数据库主机:" + +#: ../install/index.php:346 +msgid "Database User:" +msgstr "数据库用户名:" + +#: ../install/index.php:347 +msgid "Database Password:" +msgstr "数据库密码:" + +#: ../install/index.php:348 +msgid "Database Name:" +msgstr "数据库名:" + +#: ../install/index.php:349 +msgid "Use '0_' Table Prefix:" +msgstr "使用 '0_' 表前缀:" + +#: ../install/index.php:349 +#: ../includes/system_tests.inc:38 +#: ../includes/system_tests.inc:113 +#: ../includes/system_tests.inc:126 +msgid "Yes" +msgstr "是" + +#: ../install/index.php:349 +#: ../includes/system_tests.inc:38 +#: ../includes/system_tests.inc:113 +#: ../includes/system_tests.inc:126 +msgid "No" +msgstr "不" + +#: ../install/index.php:350 +msgid "Install Additional Language Packs from FA Repository:" +msgstr "从FA库安装附加的语言包:" + +#: ../install/index.php:351 +msgid "Install Additional COAs from FA Repository:" +msgstr "从FA库安装附加账户图表:" + +#: ../install/index.php:353 +msgid "Use table prefix if you share selected database for more than one FA company." +msgstr "如果您选择的数据库用于一个以上公司的话,使用表前缀。" + +#: ../install/index.php:354 +msgid "Do not select additional langs nor COAs if you have no working internet connection right now. You can install them later." +msgstr "如果您没有正确的连上internet,不要选择附加语言或者帐户表。您可以以后安装它们。" + +#: ../install/index.php:355 +#: ../install/index.php:362 +#: ../install/index.php:369 +#: ../install/index.php:388 +msgid "<< Back" +msgstr "<< 返回" + +#: ../install/index.php:360 +msgid "User Interface Languages Selection" +msgstr "用户界面语言选择" + +#: ../install/index.php:367 +msgid "Charts of Accounts Selection" +msgstr "账户表选择" + +#: ../install/index.php:379 +msgid "Company Settings" +msgstr "公司设置" + +#: ../install/index.php:381 +msgid "Company Name:" +msgstr "公司名称:" + +#: ../install/index.php:382 +msgid "Admin Login:" +msgstr "管理员登录:" + +#: ../install/index.php:383 +msgid "Admin Password:" +msgstr "Admin管理员密码:" + +#: ../install/index.php:384 +msgid "Reenter Password:" +msgstr "重新输入密码:" + +#: ../install/index.php:385 +msgid "Select Chart of Accounts:" +msgstr "选择账户表:" + +#: ../install/index.php:386 +msgid "Select Default Language:" +msgstr "选择默认语言:" + +#: ../install/index.php:393 +msgid "FrontAccounting ERP has been installed successsfully." +msgstr "FrontAccounting ERP 安装成功。" + +#: ../install/index.php:394 +msgid "Please do not forget to remove install wizard folder." +msgstr "请不要忘记删除安装向导文件夹。" + +#: ../install/index.php:396 +msgid "Click here to start." +msgstr "点击这里开始" + +#: ../includes/system_tests.inc:15 +msgid "Info" +msgstr "信息" + +#: ../includes/system_tests.inc:16 +msgid "Optional" +msgstr "可选的" + +#: ../includes/system_tests.inc:17 +msgid "Recommended" +msgstr "建议的" + +#: ../includes/system_tests.inc:18 +msgid "Required " +msgstr "必须的" + +#: ../includes/system_tests.inc:24 +msgid "MySQL version" +msgstr "MySQL 版本" + +#: ../includes/system_tests.inc:28 +msgid "Upgrade MySQL server to version at least 4.1" +msgstr "升级 MySQL 服务器到至少 4.1 版本" + +#: ../includes/system_tests.inc:35 +msgid "PHP MySQL extension" +msgstr "PHP MySQL 扩展" + +#: ../includes/system_tests.inc:40 +msgid "Your PHP has to have MySQL extension enabled." +msgstr "您的 PHP 必须使用MYSQL扩展。" + +#: ../includes/system_tests.inc:46 +msgid "PHP version" +msgstr "PHP 版本" + +#: ../includes/system_tests.inc:50 +msgid "Upgrade PHP to version at least 4.3.3" +msgstr "升级 PHP 到至少4.3.3版本" + +#: ../includes/system_tests.inc:57 +msgid "Server system" +msgstr "服务器系统" + +#: ../includes/system_tests.inc:67 +msgid "Session save path" +msgstr "Session 保存路径" + +#: ../includes/system_tests.inc:79 +msgid "Removed install wizard folder" +msgstr "删除了安装向导文件夹" + +#: ../includes/system_tests.inc:82 +msgid "Not removed" +msgstr "没有删除" + +#: ../includes/system_tests.inc:83 +msgid "Remove or rename install wizard folder for security reasons." +msgstr "出于安全原因,要求删除或者重命名安装向导文件夹。" + +#: ../includes/system_tests.inc:90 +msgid "Browser type" +msgstr "浏览器类型" + +#: ../includes/system_tests.inc:94 +msgid "Any browser is supported" +msgstr "支持任意浏览器" + +#: ../includes/system_tests.inc:101 +msgid "Http server type" +msgstr "Http 服务器类型" + +#: ../includes/system_tests.inc:105 +msgid "Any server is supported" +msgstr "支持任意服务器" + +#: ../includes/system_tests.inc:112 +msgid "Native gettext" +msgstr "本地 gettext" + +#: ../includes/system_tests.inc:116 +msgid "In case of no gettext support, php emulation is used" +msgstr "因为没有 gettext 支持,php 仿真被使用" + +#: ../includes/system_tests.inc:124 +msgid "Debugging mode" +msgstr "调试模式" + +#: ../includes/system_tests.inc:128 +msgid "To switch debugging on set $go_debug>0 in config.php file" +msgstr "在 config.php 文件里设置 $go_debug>0 来切换调试" + +#: ../includes/system_tests.inc:137 +msgid "Error logging" +msgstr "错误日志" + +#: ../includes/system_tests.inc:145 +msgid "Disabled" +msgstr "停用的" + +#: ../includes/system_tests.inc:148 +msgid "To switch error logging set $error_logging in config.php file" +msgstr "在 config.php 文件里面设置 $error_logging 来切换错误记录" + +#: ../includes/system_tests.inc:151 +msgid "Log file is not writeable" +msgstr "日志文件不可写" + +#: ../includes/system_tests.inc:161 +msgid "Current database version" +msgstr "当前数据库版本" + +#: ../includes/system_tests.inc:165 +msgid "Database structure seems to be not upgraded to current version" +msgstr "数据结构看上去没有升级到当前版本" + +#: ../includes/system_tests.inc:180 +msgid "Company subdirectories consistency" +msgstr "公司子目录一致性" + +#: ../includes/system_tests.inc:193 +#: ../includes/system_tests.inc:200 +#: ../includes/system_tests.inc:208 +#: ../includes/system_tests.inc:225 +#: ../includes/system_tests.inc:340 +#: ../includes/system_tests.inc:349 +#: ../includes/system_tests.inc:358 +#, php-format +msgid "'%s' is not writeable" +msgstr "'%s' 不可写" + +#: ../includes/system_tests.inc:221 +msgid "Temporary directory" +msgstr "临时目录" + +#: ../includes/system_tests.inc:233 +msgid "Language configuration consistency" +msgstr "语言配置一致性" + +#: ../includes/system_tests.inc:242 +msgid "Languages folder should be writeable." +msgstr "语言文件夹必须可写。" + +#: ../includes/system_tests.inc:251 +msgid "Languages configuration file should be writeable." +msgstr "语言配置文件必须可写。" + +#: ../includes/system_tests.inc:270 +#, php-format +msgid "Missing %s translation file." +msgstr "缺少 %s 翻译文件。" + +#: ../includes/system_tests.inc:275 +#, php-format +msgid "Missing system locale: %s" +msgstr "缺少的系统位于:%s" + +#: ../includes/system_tests.inc:288 +msgid "Main config file" +msgstr "主配置文件" + +#: ../includes/system_tests.inc:295 +#: ../includes/system_tests.inc:317 +#, php-format +msgid "Can't write '%s' file. Check FA directory write permissions." +msgstr "不能写 '%s' 文件。 检查 FA 目录的写权限。" + +#: ../includes/system_tests.inc:296 +#: ../includes/system_tests.inc:318 +#, php-format +msgid "'%s' file exists." +msgstr "'%s' 文件存在。" + +#: ../includes/system_tests.inc:300 +#, php-format +msgid "'%s' file should be read-only" +msgstr "'%s' 文件必须只读" + +#: ../includes/system_tests.inc:309 +msgid "Database auth file" +msgstr "数据库认证文件" + +#: ../includes/system_tests.inc:322 +#, php-format +msgid "'%s' file should be read-only if you do not plan to add or change companies" +msgstr "如果您不计划添加或者改变公司的话,'%s' 文件必须只读。" + +#: ../includes/system_tests.inc:333 +msgid "Extensions system" +msgstr "扩展系统" + +#: ../includes/system_tests.inc:363 +msgid "Extensions configuration files and directories should be writeable" +msgstr "扩展配置文件和目录必须可写" + +#: ../includes/system_tests.inc:375 +#, php-format +msgid "Non-standard theme directory '%s' is not writable" +msgstr "非标准主题目录 '%s' 不可写" + +#: ../includes/system_tests.inc:385 +msgid "OpenSSL PHP extension have to be enabled to use extension repository system." +msgstr "OpenSSL PHP 扩展必须打开用于扩展库系统。" + +#: ../includes/system_tests.inc:388 +msgid "OpenSSL have to be available on your server to use extension repository system." +msgstr "在您的服务器上,扩展库OpenSSL 必须可用。" + +#: ../includes/system_tests.inc:411 +msgid "Test" +msgstr "测试" + +#: ../includes/system_tests.inc:411 +msgid "Test type" +msgstr "测试类型" + +#: ../includes/system_tests.inc:411 +msgid "Value" +msgstr "值" + +#: ../includes/system_tests.inc:411 +msgid "Comments" +msgstr "评论" + +#: ../includes/system_tests.inc:435 +msgid "Ok" +msgstr "Ok" + diff --git a/install/stylesheet.css b/install/stylesheet.css index 63f15b55..d318052e 100644 --- a/install/stylesheet.css +++ b/install/stylesheet.css @@ -68,4 +68,7 @@ a:hover { } .hide { display: none; -} \ No newline at end of file +} +select { + max-width: 1000px; +} diff --git a/inventory/adjustments.php b/inventory/adjustments.php index 51b097be..205a3cb2 100644 --- a/inventory/adjustments.php +++ b/inventory/adjustments.php @@ -223,7 +223,7 @@ start_form(); display_order_header($_SESSION['adj_items']); -start_outer_table("$table_style width=70%", 10); +start_outer_table(TABLESTYLE, "width=70%", 10); display_adjustment_items(_("Adjustment Items"), $_SESSION['adj_items']); adjustment_options_controls(); diff --git a/inventory/cost_update.php b/inventory/cost_update.php index 088cad58..03db733e 100644 --- a/inventory/cost_update.php +++ b/inventory/cost_update.php @@ -102,7 +102,7 @@ hidden("OldMaterialCost", $myrow["material_cost"]); hidden("OldLabourCost", $myrow["labour_cost"]); hidden("OldOverheadCost", $myrow["overhead_cost"]); -start_table($table_style2); +start_table(TABLESTYLE2); $dec1 = $dec2 = $dec3 = 0; $_POST['material_cost'] = price_decimal_format($myrow["material_cost"], $dec1); $_POST['labour_cost'] = price_decimal_format($myrow["labour_cost"], $dec2); diff --git a/inventory/includes/db/items_adjust_db.inc b/inventory/includes/db/items_adjust_db.inc index ae2e25c7..5274584d 100644 --- a/inventory/includes/db/items_adjust_db.inc +++ b/inventory/includes/db/items_adjust_db.inc @@ -16,6 +16,11 @@ function add_stock_adjustment($items, $location, $date_, $type, $increase, $refe global $Refs; begin_transaction(); + $args = func_get_args(); + $args = (object)array_combine(array('items', 'location', 'date_', 'type', 'increase', + 'reference', 'memo_'), $args); + $args->trans_no = 0; + hook_db_prewrite($args, ST_INVADJUST); $adj_id = get_next_trans_no(ST_INVADJUST); @@ -34,6 +39,8 @@ function add_stock_adjustment($items, $location, $date_, $type, $increase, $refe $Refs->save(ST_INVADJUST, $adj_id, $reference); add_audit_trail(ST_INVADJUST, $adj_id, $date_); + $args->trans_no = $adj_id; + hook_db_postwrite($args, ST_INVADJUST); commit_transaction(); return $adj_id; @@ -43,6 +50,7 @@ function add_stock_adjustment($items, $location, $date_, $type, $increase, $refe function void_stock_adjustment($type_no) { + hook_db_prevoid(ST_INVADJUST, $type_no); void_gl_trans(ST_INVADJUST, $type_no); void_stock_move(ST_INVADJUST, $type_no); } diff --git a/inventory/includes/db/items_category_db.inc b/inventory/includes/db/items_category_db.inc index 11f9486d..27a4ed6b 100644 --- a/inventory/includes/db/items_category_db.inc +++ b/inventory/includes/db/items_category_db.inc @@ -64,6 +64,15 @@ function delete_item_category($id) db_query($sql,"an item category could not be deleted"); } +function get_item_categories($show_inactive) +{ + $sql = "SELECT c.*, t.name as tax_name FROM ".TB_PREF."stock_category c, " + .TB_PREF."item_tax_types t WHERE c.dflt_tax_type=t.id"; + if (!$show_inactive) $sql .= " AND !c.inactive"; + + return db_query($sql, "could not get stock categories"); +} + function get_item_category($id) { $sql="SELECT * FROM ".TB_PREF."stock_category WHERE category_id=".db_escape($id); diff --git a/inventory/includes/db/items_db.inc b/inventory/includes/db/items_db.inc index b0553726..de6ce056 100644 --- a/inventory/includes/db/items_db.inc +++ b/inventory/includes/db/items_db.inc @@ -12,7 +12,7 @@ function update_item($stock_id, $description, $long_description, $category_id, $tax_type_id, $units='', $mb_flag='', $sales_account, $inventory_account, $cogs_account, $adjustment_account, $assembly_account, $dimension_id, - $dimension2_id, $no_sale) + $dimension2_id, $no_sale, $editable) { $sql = "UPDATE ".TB_PREF."stock_master SET long_description=".db_escape($long_description).", description=".db_escape($description).", @@ -25,7 +25,8 @@ function update_item($stock_id, $description, $long_description, $category_id, dimension_id=".db_escape($dimension_id).", dimension2_id=".db_escape($dimension2_id).", tax_type_id=".db_escape($tax_type_id).", - no_sale=".db_escape($no_sale); + no_sale=".db_escape($no_sale).", + editable=".db_escape($editable); if ($units != '') $sql .= ", units='$units'"; @@ -43,11 +44,11 @@ function update_item($stock_id, $description, $long_description, $category_id, function add_item($stock_id, $description, $long_description, $category_id, $tax_type_id, $units, $mb_flag, $sales_account, $inventory_account, $cogs_account, $adjustment_account, $assembly_account, $dimension_id, - $dimension2_id, $no_sale) + $dimension2_id, $no_sale, $editable) { $sql = "INSERT INTO ".TB_PREF."stock_master (stock_id, description, long_description, category_id, tax_type_id, units, mb_flag, sales_account, inventory_account, cogs_account, - adjustment_account, assembly_account, dimension_id, dimension2_id, no_sale) + adjustment_account, assembly_account, dimension_id, dimension2_id, no_sale, editable) VALUES (".db_escape($stock_id).", ".db_escape($description).", ".db_escape($long_description).", ".db_escape($category_id).", ".db_escape($tax_type_id).", " .db_escape($units).", ".db_escape($mb_flag).", @@ -55,7 +56,8 @@ function add_item($stock_id, $description, $long_description, $category_id, .", ".db_escape($cogs_account).",".db_escape($adjustment_account) .", ".db_escape($assembly_account).", " .db_escape($dimension_id).", ".db_escape($dimension2_id)."," - .db_escape($no_sale).")"; + .db_escape($no_sale)."," + .db_escape($editable).")"; db_query($sql, "The item could not be added"); @@ -109,4 +111,51 @@ function get_items() return db_query($sql,"items could not be retreived"); } +function item_in_foreign_codes($stock_id) +{ + $sqls= array( + "SELECT COUNT(*) FROM " + .TB_PREF."stock_moves WHERE stock_id=".db_escape($stock_id) => + _('Cannot delete this item because there are stock movements that refer to this item.'), + "SELECT COUNT(*) FROM " + .TB_PREF."bom WHERE component=".db_escape($stock_id)=> + _('Cannot delete this item record because there are bills of material that require this part as a component.'), + "SELECT COUNT(*) FROM " + .TB_PREF."sales_order_details WHERE stk_code=".db_escape($stock_id) => + _('Cannot delete this item because there are existing purchase order items for it.'), + "SELECT COUNT(*) FROM " + .TB_PREF."purch_order_details WHERE item_code=".db_escape($stock_id)=> + _('Cannot delete this item because there are existing purchase order items for it.') + ); + + $msg = ''; + + foreach($sqls as $sql=>$err) { + $result = db_query($sql, "could not query stock usage"); + $myrow = db_fetch_row($result); + if ($myrow[0] > 0) + { + $msg = $err; break; + } + } + if ($msg == '') { + + $kits = get_where_used($stock_id); + $num_kits = db_num_rows($kits); + if ($num_kits) { + $msg = _("This item cannot be deleted because some code aliases + or foreign codes was entered for it, or there are kits defined + using this item as component") + .':
'; + + while($num_kits--) { + $kit = db_fetch($kits); + $msg .= "'".$kit[0]."'"; + if ($num_kits) $msg .= ','; + } + + } + } + return $msg; +} ?> \ No newline at end of file diff --git a/inventory/includes/db/items_locations_db.inc b/inventory/includes/db/items_locations_db.inc index b0372971..4a12c671 100644 --- a/inventory/includes/db/items_locations_db.inc +++ b/inventory/includes/db/items_locations_db.inc @@ -63,6 +63,15 @@ function get_item_location($item_location) //------------------------------------------------------------------------------------ +function get_item_locations($show_inactive) +{ + $sql = "SELECT * FROM ".TB_PREF."locations"; + if (!$show_inactive) $sql .= " WHERE !inactive"; + return db_query($sql, "could not query locations");; +} + +//------------------------------------------------------------------------------------ + function set_reorder_level($stock_id, $loc_code, $reorder_level) { $sql = "UPDATE ".TB_PREF."loc_stock SET reorder_level = $reorder_level @@ -83,6 +92,4 @@ function get_loc_details($stock_id) return db_query($sql,"an item reorder could not be retreived"); } -//------------------------------------------------------------------------------------ - ?> \ No newline at end of file diff --git a/inventory/includes/db/items_purchases_db.inc b/inventory/includes/db/items_purchases_db.inc new file mode 100644 index 00000000..dccdc511 --- /dev/null +++ b/inventory/includes/db/items_purchases_db.inc @@ -0,0 +1,69 @@ +. +***********************************************************************/ + +function add_item_purchasing_data($supplier_id, $stock_id, $price, + $suppliers_uom, $conversion_factor, $supplier_description) +{ + $sql = "INSERT INTO ".TB_PREF."purch_data (supplier_id, stock_id, price, suppliers_uom, + conversion_factor, supplier_description) VALUES ("; + $sql .= db_escape($supplier_id).", ".db_escape($stock_id). ", " + .$price . ", ".db_escape($suppliers_uom ). ", " + .$conversion_factor . ", " + .db_escape($supplier_description) . ")"; + + db_query($sql,"The supplier purchasing details could not be added"); +} + +function update_item_purchasing_data($selected_id, $stock_id, $price, + $suppliers_uom, $conversion_factor, $supplier_description) +{ + $sql = "UPDATE ".TB_PREF."purch_data SET price=" . $price . ", + suppliers_uom=".db_escape($suppliers_uom) . ", + conversion_factor=" . $conversion_factor . ", + supplier_description=" . db_escape($supplier_description) . " + WHERE stock_id=".db_escape($stock_id) . " AND + supplier_id=".db_escape($selected_id); + db_query($sql,"The supplier purchasing details could not be updated"); +} + +function delete_item_purchasing_data($selected_id, $stock_id) +{ + $sql = "DELETE FROM ".TB_PREF."purch_data WHERE supplier_id=".db_escape($selected_id)." + AND stock_id=".db_escape($stock_id); + db_query($sql,"could not delete purchasing data"); +} + +function get_items_purchasing_data($stock_id) +{ + $sql = "SELECT ".TB_PREF."purch_data.*,".TB_PREF."suppliers.supp_name," + .TB_PREF."suppliers.curr_code + FROM ".TB_PREF."purch_data INNER JOIN ".TB_PREF."suppliers + ON ".TB_PREF."purch_data.supplier_id=".TB_PREF."suppliers.supplier_id + WHERE stock_id = ".db_escape($stock_id); + + return db_query($sql, "The supplier purchasing details for the selected part could not be retrieved"); +} + +function get_item_purchasing_data($selected_id, $stock_id) +{ + $sql = "SELECT ".TB_PREF."purch_data.*,".TB_PREF."suppliers.supp_name FROM ".TB_PREF."purch_data + INNER JOIN ".TB_PREF."suppliers ON ".TB_PREF."purch_data.supplier_id=".TB_PREF."suppliers.supplier_id + WHERE ".TB_PREF."purch_data.supplier_id=".db_escape($selected_id)." + AND ".TB_PREF."purch_data.stock_id=".db_escape($stock_id); + + $result = db_query($sql, "The supplier purchasing details for the selected supplier and item could not be retrieved"); + + return db_fetch($result); +} + + +?> \ No newline at end of file diff --git a/inventory/includes/db/items_transfer_db.inc b/inventory/includes/db/items_transfer_db.inc index da1ceec2..5d5181f7 100644 --- a/inventory/includes/db/items_transfer_db.inc +++ b/inventory/includes/db/items_transfer_db.inc @@ -16,6 +16,11 @@ function add_stock_transfer($Items, $location_from, $location_to, $date_, $type, global $Refs; begin_transaction(); + $args = func_get_args(); + $args = (object)array_combine(array('Items', 'location_from', 'location_to', + 'date_', 'type', 'reference', 'memo_'), $args); + $args->trans_no = 0; + hook_db_prewrite($args, ST_LOCTRANSFER); $transfer_id = get_next_trans_no(ST_LOCTRANSFER); @@ -30,6 +35,9 @@ function add_stock_transfer($Items, $location_from, $location_to, $date_, $type, $Refs->save(ST_LOCTRANSFER, $transfer_id, $reference); add_audit_trail(ST_LOCTRANSFER, $transfer_id, $date_); + $args->trans_no = $transfer_id; + hook_db_postwrite($args, ST_LOCTRANSFER); + commit_transaction(); return $transfer_id; @@ -94,6 +102,7 @@ function get_stock_transfer_items($trans_no) function void_stock_transfer($type_no) { + hook_db_prevoid(ST_LOCTRANSFER, $type_no); void_stock_move(ST_LOCTRANSFER, $type_no); } diff --git a/inventory/includes/db/movement_types_db.inc b/inventory/includes/db/movement_types_db.inc index 210cad43..1862f7b1 100644 --- a/inventory/includes/db/movement_types_db.inc +++ b/inventory/includes/db/movement_types_db.inc @@ -49,4 +49,38 @@ function delete_movement_type($type_id) db_query($sql, "could not delete item movement type"); } +function get_stock_movements($stock_id, $StockLocation, $BeforeDate, $AfterDate) +{ + $before_date = date2sql($BeforeDate); + $after_date = date2sql($AfterDate); + $sql = "SELECT type, trans_no, tran_date, person_id, qty, reference + FROM ".TB_PREF."stock_moves + WHERE loc_code=".db_escape($StockLocation)." + AND tran_date >= '". $after_date . "' + AND tran_date <= '" . $before_date . "' + AND stock_id = ".db_escape($stock_id) . " ORDER BY tran_date,trans_id"; + return db_query($sql, "could not query stock moves"); +} + +function get_stock_movements_before($stock_id, $StockLocation, $AfterDate) +{ + $after_date = date2sql($AfterDate); + $sql = "SELECT SUM(qty) FROM ".TB_PREF."stock_moves WHERE stock_id=".db_escape($stock_id) . " + AND loc_code=".db_escape( $StockLocation) . " + AND tran_date < '" . $after_date . "'"; + $before_qty = db_query($sql, "The starting quantity on hand could not be calculated"); + + $before_qty_row = db_fetch_row($before_qty); + return $before_qty_row[0]; +} + +function movement_types_in_stock_moves($selected_id) +{ + $sql= "SELECT COUNT(*) FROM ".TB_PREF."stock_moves + WHERE type=" . ST_INVADJUST. " AND person_id=".db_escape($selected_id); + + $result = db_query($sql, "could not query stock moves"); + $myrow = db_fetch_row($result); + return ($myrow[0] > 0); +} ?> \ No newline at end of file diff --git a/inventory/includes/inventory_db.inc b/inventory/includes/inventory_db.inc index d7b20c9d..34f7b3d9 100644 --- a/inventory/includes/inventory_db.inc +++ b/inventory/includes/inventory_db.inc @@ -16,6 +16,7 @@ include_once($path_to_root . "/includes/manufacturing.inc"); include_once($path_to_root . "/inventory/includes/db/items_category_db.inc"); include_once($path_to_root . "/inventory/includes/db/items_trans_db.inc"); include_once($path_to_root . "/inventory/includes/db/items_prices_db.inc"); +include_once($path_to_root . "/inventory/includes/db/items_purchases_db.inc"); include_once($path_to_root . "/inventory/includes/db/items_codes_db.inc"); include_once($path_to_root . "/inventory/includes/db/items_db.inc"); include_once($path_to_root . "/inventory/includes/db/items_locations_db.inc"); diff --git a/inventory/includes/item_adjustments_ui.inc b/inventory/includes/item_adjustments_ui.inc index cfe697fa..f7af3dad 100644 --- a/inventory/includes/item_adjustments_ui.inc +++ b/inventory/includes/item_adjustments_ui.inc @@ -26,9 +26,9 @@ function add_to_order(&$order, $new_item, $new_item_qty, $standard_cost) function display_order_header(&$order) { - global $table_style2, $Refs; + global $Refs; - start_outer_table("width=70% $table_style2"); // outer table + start_outer_table(TABLESTYLE2, "width=70%"); // outer table table_section(1); locations_list_row(_("Location:"), 'StockLocation', null); @@ -54,11 +54,11 @@ function display_order_header(&$order) function display_adjustment_items($title, &$order) { - global $table_style, $path_to_root; + global $path_to_root; display_heading($title); div_start('items_table'); - start_table("$table_style width=80%"); + start_table(TABLESTYLE, "width=80%"); $th = array(_("Item Code"), _("Item Description"), _("Quantity"), _("Unit"), _("Unit Cost"), _("Total"), ""); if ( count($order->line_items)) $th[] = ''; diff --git a/inventory/includes/stock_transfers_ui.inc b/inventory/includes/stock_transfers_ui.inc index 33df8fde..474fc9df 100644 --- a/inventory/includes/stock_transfers_ui.inc +++ b/inventory/includes/stock_transfers_ui.inc @@ -26,9 +26,9 @@ function add_to_order(&$order, $new_item, $new_item_qty, $standard_cost) function display_order_header(&$order) { - global $table_style, $Refs; + global $Refs; - start_outer_table("width=70% $table_style"); + start_outer_table(TABLESTYLE, "width=70%"); table_section(1); @@ -52,11 +52,11 @@ function display_order_header(&$order) function display_transfer_items($title, &$order) { - global $table_style, $path_to_root; + global $path_to_root; display_heading($title); div_start('items_table'); - start_table("$table_style width=80%"); + start_table(TABLESTYLE, "width=80%"); $th = array(_("Item Code"), _("Item Description"), _("Quantity"), _("Unit"), ''); if ( count($order->line_items)) $th[] = ''; table_header($th); diff --git a/inventory/inquiry/stock_movements.php b/inventory/inquiry/stock_movements.php index 61388dd1..1dd13827 100644 --- a/inventory/inquiry/stock_movements.php +++ b/inventory/inquiry/stock_movements.php @@ -44,9 +44,14 @@ start_form(); if (!isset($_POST['stock_id'])) $_POST['stock_id'] = get_global_stock_item(); -start_table("class='tablestyle_noborder'"); - +start_table(TABLESTYLE_NOBORDER); +start_row(); stock_items_list_cells(_("Item:"), 'stock_id', $_POST['stock_id']); +end_row(); +end_table(); + +start_table(TABLESTYLE_NOBORDER); +start_row(); locations_list_cells(_("From Location:"), 'StockLocation', null); @@ -54,6 +59,7 @@ date_cells(_("From:"), 'AfterDate', '', null, -30); date_cells(_("To:"), 'BeforeDate'); submit_cells('ShowMoves',_("Show Movements"),'',_('Refresh Inquiry'), 'default'); +end_row(); end_table(); end_form(); @@ -62,36 +68,26 @@ set_global_stock_item($_POST['stock_id']); $before_date = date2sql($_POST['BeforeDate']); $after_date = date2sql($_POST['AfterDate']); -$sql = "SELECT type, trans_no, tran_date, person_id, qty, reference - FROM ".TB_PREF."stock_moves - WHERE loc_code=".db_escape($_POST['StockLocation'])." - AND tran_date >= '". $after_date . "' - AND tran_date <= '" . $before_date . "' - AND stock_id = ".db_escape($_POST['stock_id']) . " ORDER BY tran_date,trans_id"; -$result = db_query($sql, "could not query stock moves"); - -check_db_error("The stock movements for the selected criteria could not be retrieved",$sql); +$result = get_stock_movements($_POST['stock_id'], $_POST['StockLocation'], + $_POST['BeforeDate'], $_POST['AfterDate']); div_start('doc_tbl'); -start_table($table_style); +start_table(TABLESTYLE); $th = array(_("Type"), _("#"), _("Reference"), _("Date"), _("Detail"), _("Quantity In"), _("Quantity Out"), _("Quantity On Hand")); table_header($th); -$sql = "SELECT SUM(qty) FROM ".TB_PREF."stock_moves WHERE stock_id=".db_escape($_POST['stock_id']) . " - AND loc_code=".db_escape( $_POST['StockLocation']) . " - AND tran_date < '" . $after_date . "'"; -$before_qty = db_query($sql, "The starting quantity on hand could not be calculated"); - -$before_qty_row = db_fetch_row($before_qty); -$after_qty = $before_qty = $before_qty_row[0]; +$before_qty = get_stock_movements_before($_POST['stock_id'], $_POST['StockLocation'], $_POST['AfterDate']); + +$after_qty = $before_qty; +/* if (!isset($before_qty_row[0])) { $after_qty = $before_qty = 0; } - +*/ start_row("class='inquirybg'"); label_cell(""._("Quantity on hand before") . " " . $_POST['AfterDate']."", "align=center colspan=5"); label_cell(" ", "colspan=2"); @@ -147,13 +143,10 @@ while ($myrow = db_fetch($result)) elseif ($myrow["type"] == ST_SUPPRECEIVE || $myrow['type'] == ST_SUPPCREDIT) { // get the supplier name - $sql = "SELECT supp_name FROM ".TB_PREF."suppliers WHERE supplier_id = '" . $myrow["person_id"] . "'"; - $supp_result = db_query($sql,"check failed"); - - $supp_row = db_fetch($supp_result); + $supp_name = get_supplier_name($myrow["person_id"]); - if (strlen($supp_row['supp_name']) > 0) - $person = $supp_row['supp_name']; + if (strlen($supp_name) > 0) + $person = $supp_name; } elseif ($myrow["type"] == ST_LOCTRANSFER || $myrow["type"] == ST_INVADJUST) { diff --git a/inventory/inquiry/stock_status.php b/inventory/inquiry/stock_status.php index d3d8781a..1ccbca0d 100644 --- a/inventory/inquiry/stock_status.php +++ b/inventory/inquiry/stock_status.php @@ -58,7 +58,7 @@ if (is_service($mb_flag)) $loc_details = get_loc_details($_POST['stock_id']); -start_table($table_style); +start_table(TABLESTYLE); if ($kitset_or_service == true) { diff --git a/inventory/manage/item_categories.php b/inventory/manage/item_categories.php index a12f56ff..b52d67c8 100644 --- a/inventory/manage/item_categories.php +++ b/inventory/manage/item_categories.php @@ -67,10 +67,7 @@ if ($Mode == 'Delete') { // PREVENT DELETES IF DEPENDENT RECORDS IN 'stock_master' - $sql= "SELECT COUNT(*) FROM ".TB_PREF."stock_master WHERE category_id=".db_escape($selected_id); - $result = db_query($sql, "could not query stock master"); - $myrow = db_fetch_row($result); - if ($myrow[0] > 0) + if (key_in_foreign_table($selected_id, 'stock_master', 'category_id')) { display_error(_("Cannot delete this item category because items have been created using this item category.")); } @@ -94,14 +91,10 @@ if (list_updated('mb_flag')) { } //---------------------------------------------------------------------------------- -$sql = "SELECT c.*, t.name as tax_name FROM ".TB_PREF."stock_category c, " - .TB_PREF."item_tax_types t WHERE c.dflt_tax_type=t.id"; -if (!check_value('show_inactive')) $sql .= " AND !c.inactive"; - -$result = db_query($sql, "could not get stock categories"); +$result = get_item_categories(check_value('show_inactive')); start_form(); -start_table("$table_style width=80%"); +start_table(TABLESTYLE, "width=80%"); $th = array(_("Name"), _("Tax type"), _("Units"), _("Type"), _("Sales Act"), _("Inventory Account"), _("COGS Account"), _("Adjustment Account"), _("Assembly Account"), "", ""); @@ -136,7 +129,7 @@ echo '
'; //---------------------------------------------------------------------------------- div_start('details'); -start_table($table_style2); +start_table(TABLESTYLE2); if ($selected_id != -1) { diff --git a/inventory/manage/item_codes.php b/inventory/manage/item_codes.php index d26f6f41..d423b921 100644 --- a/inventory/manage/item_codes.php +++ b/inventory/manage/item_codes.php @@ -117,7 +117,7 @@ $dflt_cat = $result['category_id']; $result = get_all_item_codes($_POST['stock_id']); div_start('code_table'); - start_table("$table_style width=60%"); + start_table(TABLESTYLE, "width=60%"); $th = array(_("EAN/UPC Code"), _("Quantity"), _("Units"), _("Description"),_("Category"), "", ""); @@ -169,7 +169,7 @@ if ($selected_id != '') { } echo "
"; -start_table($table_style2); +start_table(TABLESTYLE2); hidden('code_id', $selected_id); diff --git a/inventory/manage/item_units.php b/inventory/manage/item_units.php index 9a23f645..fa63bbe5 100644 --- a/inventory/manage/item_units.php +++ b/inventory/manage/item_units.php @@ -90,7 +90,7 @@ if ($Mode == 'RESET') $result = get_all_item_units(check_value('show_inactive')); start_form(); -start_table("$table_style width=40%"); +start_table(TABLESTYLE, "width=40%"); $th = array(_('Unit'), _('Description'), _('Decimals'), "", ""); inactive_control_column($th); @@ -117,7 +117,7 @@ end_table(1); //---------------------------------------------------------------------------------- -start_table($table_style2); +start_table(TABLESTYLE2); if ($selected_id != '') { diff --git a/inventory/manage/items.php b/inventory/manage/items.php index add74834..1391b825 100644 --- a/inventory/manage/items.php +++ b/inventory/manage/items.php @@ -56,7 +56,7 @@ if (isset($_FILES['pic']) && $_FILES['pic']['name'] != '') $stock_id = $_POST['NewStockID']; $result = $_FILES['pic']['error']; $upload_file = 'Yes'; //Assume all is well to start off with - $filename = $comp_path . "/$user_comp/images"; + $filename = company_path().'/images'; if (!file_exists($filename)) { mkdir($filename); @@ -155,7 +155,7 @@ if (isset($_POST['addupdate'])) { if (check_value('del_image')) { - $filename = $comp_path . "/$user_comp/images/".item_img_name($_POST['NewStockID']).".jpg"; + $filename = company_path().'/images/'.item_img_name($_POST['NewStockID']).".jpg"; if (file_exists($filename)) unlink($filename); } @@ -169,7 +169,7 @@ if (isset($_POST['addupdate'])) $_POST['inventory_account'], $_POST['cogs_account'], $_POST['adjustment_account'], $_POST['assembly_account'], $_POST['dimension_id'], $_POST['dimension2_id'], - check_value('no_sale')); + check_value('no_sale'), check_value('editable')); update_record_status($_POST['NewStockID'], $_POST['inactive'], 'stock_master', 'stock_id'); update_record_status($_POST['NewStockID'], $_POST['inactive'], @@ -187,12 +187,12 @@ if (isset($_POST['addupdate'])) $_POST['inventory_account'], $_POST['cogs_account'], $_POST['adjustment_account'], $_POST['assembly_account'], $_POST['dimension_id'], $_POST['dimension2_id'], - check_value('no_sale')); + check_value('no_sale'), check_value('editable')); display_notification(_("A new item has been added.")); $_POST['stock_id'] = $_POST['NewStockID'] = $_POST['description'] = $_POST['long_description'] = ''; - $_POST['no_sale'] = 0; + $_POST['no_sale'] = $_POST['editable'] = 0; set_focus('NewStockID'); } $Ajax->activate('_page_body'); @@ -210,50 +210,8 @@ if (get_post('clone')) { function check_usage($stock_id, $dispmsg=true) { - $sqls= array( - "SELECT COUNT(*) FROM " - .TB_PREF."stock_moves WHERE stock_id=".db_escape($stock_id) => - _('Cannot delete this item because there are stock movements that refer to this item.'), - "SELECT COUNT(*) FROM " - .TB_PREF."bom WHERE component=".db_escape($stock_id)=> - _('Cannot delete this item record because there are bills of material that require this part as a component.'), - "SELECT COUNT(*) FROM " - .TB_PREF."sales_order_details WHERE stk_code=".db_escape($stock_id) => - _('Cannot delete this item because there are existing purchase order items for it.'), - "SELECT COUNT(*) FROM " - .TB_PREF."purch_order_details WHERE item_code=".db_escape($stock_id)=> - _('Cannot delete this item because there are existing purchase order items for it.') - ); - - $msg = ''; - - foreach($sqls as $sql=>$err) { - $result = db_query($sql, "could not query stock usage"); - $myrow = db_fetch_row($result); - if ($myrow[0] > 0) - { - $msg = $err; break; - } - } - - if ($msg == '') { - - $kits = get_where_used($stock_id); - $num_kits = db_num_rows($kits); - if ($num_kits) { - $msg = _("This item cannot be deleted because some code aliases - or foreign codes was entered for it, or there are kits defined - using this item as component") - .':
'; + $msg = item_in_foreign_codes($stock_id); - while($num_kits--) { - $kit = db_fetch($kits); - $msg .= "'".$kit[0]."'"; - if ($num_kits) $msg .= ','; - } - - } - } if ($msg != '') { if($dispmsg) display_error($msg); return false; @@ -270,7 +228,7 @@ if (isset($_POST['delete']) && strlen($_POST['delete']) > 1) $stock_id = $_POST['NewStockID']; delete_item($stock_id); - $filename = $comp_path . "/$user_comp/images/".item_img_name($stock_id).".jpg"; + $filename = company_path().'/images/'.item_img_name($stock_id).".jpg"; if (file_exists($filename)) unlink($filename); display_notification(_("Selected item has been deleted.")); @@ -287,7 +245,7 @@ start_form(true); if (db_has_stock_items()) { - start_table("class='tablestyle_noborder'"); + start_table(TABLESTYLE_NOBORDER); start_row(); stock_items_list_cells(_("Select an item:"), 'stock_id', null, _('New item'), true, check_value('show_inactive')); @@ -303,7 +261,7 @@ if (db_has_stock_items()) } div_start('details'); -start_outer_table($table_style2, 5); +start_outer_table(TABLESTYLE2); table_section(1); @@ -318,7 +276,8 @@ if ($new_item) } else { // Must be modifying an existing item - if (!isset($_POST['NewStockID'])) { + if (get_post('NewStockID') != get_post('stock_id')) { // first item display + $_POST['NewStockID'] = $_POST['stock_id']; $myrow = get_item($_POST['NewStockID']); @@ -340,13 +299,14 @@ else $_POST['no_sale'] = $myrow['no_sale']; $_POST['del_image'] = 0; $_POST['inactive'] = $myrow["inactive"]; + $_POST['editable'] = $myrow["editable"]; } label_row(_("Item Code:"),$_POST['NewStockID']); hidden('NewStockID', $_POST['NewStockID']); set_focus('description'); } -text_row(_("Name:"), 'description', null, 52, 50); +text_row(_("Name:"), 'description', null, 52, 200); textarea_row(_('Description:'), 'long_description', null, 42, 3); @@ -367,6 +327,8 @@ if ($new_item && (list_updated('category_id') || !isset($_POST['units']))) { $_POST['dimension_id'] = $category_record["dflt_dim1"]; $_POST['dimension2_id'] = $category_record["dflt_dim2"]; $_POST['no_sale'] = $category_record["dflt_no_sale"]; + $_POST['editable'] = 0; + } $fresh_item = !isset($_POST['NewStockID']) || $new_item || check_usage($_POST['stock_id'],false); @@ -377,6 +339,12 @@ stock_item_types_list_row(_("Item Type:"), 'mb_flag', null, $fresh_item); stock_units_list_row(_('Units of Measure:'), 'units', null, $fresh_item); +check_row(_("Editable description:"), 'editable'); + +check_row(_("Exclude from sales:"), 'no_sale'); + +table_section(2); + $dim = get_company_pref('use_dimension'); if ($dim >= 1) { @@ -391,8 +359,6 @@ if ($dim < 1) if ($dim < 2) hidden('dimension2_id', 0); -table_section(2); - table_section_title(_("GL Accounts")); gl_all_accounts_list_row(_("Sales Account:"), 'sales_account', $_POST['sales_account']); @@ -423,14 +389,14 @@ file_row(_("Image File (.jpg)") . ":", 'pic', 'pic'); // Add Image upload for New Item - by Joe $stock_img_link = ""; $check_remove_image = false; -if (isset($_POST['NewStockID']) && file_exists("$comp_path/$user_comp/images/" +if (isset($_POST['NewStockID']) && file_exists(company_path().'/images/' .item_img_name($_POST['NewStockID']).".jpg")) { // 31/08/08 - rand() call is necessary here to avoid caching problems. Thanks to Peter D. $stock_img_link .= "[".$_POST["; - $check_remove_image = true; + "]' src='".company_path().'/images/'.item_img_name($_POST['NewStockID']). + ".jpg?nocache=".rand()."'"." height='$pic_height' border='0'>"; + $check_remove_image = true; } else { @@ -441,8 +407,6 @@ label_row(" ", $stock_img_link); if ($check_remove_image) check_row(_("Delete Image:"), 'del_image'); -check_row(_("Exclude from sales:"), 'no_sale'); - record_status_list_row(_("Item status:"), 'inactive'); end_outer_table(1); div_end(); diff --git a/inventory/manage/locations.php b/inventory/manage/locations.php index 6dae2fa3..0bae7585 100644 --- a/inventory/manage/locations.php +++ b/inventory/manage/locations.php @@ -71,69 +71,46 @@ if ($Mode=='ADD_ITEM' || $Mode=='UPDATE_ITEM') function can_delete($selected_id) { - $sql= "SELECT COUNT(*) FROM ".TB_PREF."stock_moves WHERE loc_code=".db_escape($selected_id); - $result = db_query($sql, "could not query stock moves"); - $myrow = db_fetch_row($result); - if ($myrow[0] > 0) + if (key_in_foreign_table($selected_id, 'stock_moves', 'loc_code')) { display_error(_("Cannot delete this location because item movements have been created using this location.")); return false; } - $sql= "SELECT COUNT(*) FROM ".TB_PREF."workorders WHERE loc_code=".db_escape($selected_id); - $result = db_query($sql, "could not query work orders"); - $myrow = db_fetch_row($result); - if ($myrow[0] > 0) + if (key_in_foreign_table($selected_id, 'workorders', 'loc_code')) { display_error(_("Cannot delete this location because it is used by some work orders records.")); return false; } - $sql= "SELECT COUNT(*) FROM ".TB_PREF."cust_branch WHERE default_location='$selected_id'"; - $result = db_query($sql, "could not query customer branches"); - $myrow = db_fetch_row($result); - if ($myrow[0] > 0) + if (key_in_foreign_table($selected_id, 'cust_branch', 'default_location')) { display_error(_("Cannot delete this location because it is used by some branch records as the default location to deliver from.")); return false; } - $sql= "SELECT COUNT(*) FROM ".TB_PREF."bom WHERE loc_code=".db_escape($selected_id); - $result = db_query($sql, "could not query bom"); - $myrow = db_fetch_row($result); - if ($myrow[0] > 0) + if (key_in_foreign_table($selected_id, 'bom', 'loc_code')) { display_error(_("Cannot delete this location because it is used by some related records in other tables.")); return false; } - $sql= "SELECT COUNT(*) FROM ".TB_PREF."grn_batch WHERE loc_code=".db_escape($selected_id); - $result = db_query($sql, "could not query grn batch"); - $myrow = db_fetch_row($result); - if ($myrow[0] > 0) + + if (key_in_foreign_table($selected_id, 'grn_batch', 'loc_code')) { display_error(_("Cannot delete this location because it is used by some related records in other tables.")); return false; } - $sql= "SELECT COUNT(*) FROM ".TB_PREF."purch_orders WHERE into_stock_location=".db_escape($selected_id); - $result = db_query($sql, "could not query purch orders"); - $myrow = db_fetch_row($result); - if ($myrow[0] > 0) + if (key_in_foreign_table($selected_id, 'purch_orders', 'into_stock_location')) { display_error(_("Cannot delete this location because it is used by some related records in other tables.")); return false; } - $sql= "SELECT COUNT(*) FROM ".TB_PREF."sales_orders WHERE from_stk_loc=".db_escape($selected_id); - $result = db_query($sql, "could not query sales orders"); - $myrow = db_fetch_row($result); - if ($myrow[0] > 0) + if (key_in_foreign_table($selected_id, 'sales_orders', 'from_stk_loc')) { display_error(_("Cannot delete this location because it is used by some related records in other tables.")); return false; } - $sql= "SELECT COUNT(*) FROM ".TB_PREF."sales_pos WHERE pos_location=".db_escape($selected_id); - $result = db_query($sql, "could not query sales pos"); - $myrow = db_fetch_row($result); - if ($myrow[0] > 0) + if (key_in_foreign_table($selected_id, 'sales_pos', 'pos_location')) { display_error(_("Cannot delete this location because it is used by some related records in other tables.")); return false; @@ -162,12 +139,10 @@ if ($Mode == 'RESET') $_POST['show_inactive'] = $sav; } -$sql = "SELECT * FROM ".TB_PREF."locations"; -if (!check_value('show_inactive')) $sql .= " WHERE !inactive"; -$result = db_query($sql, "could not query locations");; +$result = get_item_locations(check_value('show_inactive')); start_form(); -start_table($table_style); +start_table(TABLESTYLE); $th = array(_("Location Code"), _("Location Name"), _("Address"), _("Phone"), _("Secondary Phone"), "", ""); inactive_control_column($th); table_header($th); @@ -193,7 +168,7 @@ end_table(); echo '
'; -start_table($table_style2); +start_table(TABLESTYLE2); $_POST['email'] = ""; if ($selected_id != -1) diff --git a/inventory/manage/movement_types.php b/inventory/manage/movement_types.php index 259f6dce..e7086f94 100644 --- a/inventory/manage/movement_types.php +++ b/inventory/manage/movement_types.php @@ -56,12 +56,7 @@ if ($Mode=='ADD_ITEM' || $Mode=='UPDATE_ITEM') function can_delete($selected_id) { - $sql= "SELECT COUNT(*) FROM ".TB_PREF."stock_moves - WHERE type=" . ST_INVADJUST. " AND person_id=".db_escape($selected_id); - - $result = db_query($sql, "could not query stock moves"); - $myrow = db_fetch_row($result); - if ($myrow[0] > 0) + if (movement_types_in_stock_moves($selected_id)) { display_error(_("Cannot delete this inventory movement type because item transactions have been created referring to it.")); return false; @@ -95,7 +90,7 @@ if ($Mode == 'RESET') $result = get_all_movement_type(check_value('show_inactive')); start_form(); -start_table("$table_style width=30%"); +start_table(TABLESTYLE, "width=30%"); $th = array(_("Description"), "", ""); inactive_control_column($th); @@ -117,7 +112,7 @@ end_table(1); //----------------------------------------------------------------------------------- -start_table($table_style2); +start_table(TABLESTYLE2); if ($selected_id != -1) { diff --git a/inventory/manage/sales_kits.php b/inventory/manage/sales_kits.php index 16a78f87..2aef8e8b 100644 --- a/inventory/manage/sales_kits.php +++ b/inventory/manage/sales_kits.php @@ -34,11 +34,9 @@ if (isset($_GET['item_code'])) //-------------------------------------------------------------------------------------------------- function display_kit_items($selected_kit) { - global $table_style; - $result = get_item_kit($selected_kit); -div_start('bom'); - start_table("$table_style width=60%"); + div_start('bom'); + start_table(TABLESTYLE, "width=60%"); $th = array(_("Stock Item"), _("Description"), _("Quantity"), _("Units"), '',''); table_header($th); @@ -197,14 +195,14 @@ $selected_kit = $_POST['item_code']; //---------------------------------------------------------------------------------- if (get_post('item_code') == '') { // New sales kit entry - start_table($table_style2); + start_table(TABLESTYLE2); text_row(_("Alias/kit code:"), 'kit_code', null, 20, 21); } else { // Kit selected so display bom or edit component $_POST['description'] = $props['description']; $_POST['category'] = $props['category_id']; - start_table($table_style2); + start_table(TABLESTYLE2); text_row(_("Description:"), 'description', null, 50, 200); stock_categories_list_row(_("Category:"), 'category', null); submit_row('update_name', _("Update"), false, 'align=center colspan=2', _('Update kit/alias name'), true); @@ -212,7 +210,7 @@ if (get_post('item_code') == '') { end_table(1); display_kit_items($selected_kit); echo '
'; - start_table($table_style2); + start_table(TABLESTYLE2); } if ($Mode == 'Edit') { diff --git a/inventory/prices.php b/inventory/prices.php index 40dd11f7..dfac2aa5 100644 --- a/inventory/prices.php +++ b/inventory/prices.php @@ -54,7 +54,7 @@ if (!isset($_POST['stock_id'])) $_POST['stock_id'] = get_global_stock_item(); echo "
" . _("Item:"). " "; -echo sales_items_list('stock_id', $_POST['stock_id'], false, true); +echo sales_items_list('stock_id', $_POST['stock_id'], false, true, '', array('editable' => false)); echo "
"; set_global_stock_item($_POST['stock_id']); @@ -128,7 +128,7 @@ if (list_updated('stock_id') || isset($_POST['_curr_abrev_update']) || isset($_P $prices_list = get_prices($_POST['stock_id']); div_start('price_table'); -start_table("$table_style width=30%"); +start_table(TABLESTYLE, "width=30%"); $th = array(_("Currency"), _("Sales Type"), _("Price"), "", ""); table_header($th); @@ -169,7 +169,7 @@ if ($Mode == 'Edit') hidden('selected_id', $selected_id); div_start('price_details'); -start_table($table_style2); +start_table(TABLESTYLE2); currencies_list_row(_("Currency:"), 'curr_abrev', null, true); diff --git a/inventory/purchasing_data.php b/inventory/purchasing_data.php index b77a92bd..1969cf93 100644 --- a/inventory/purchasing_data.php +++ b/inventory/purchasing_data.php @@ -55,26 +55,14 @@ if ($Mode=='ADD_ITEM' || $Mode=='UPDATE_ITEM') { if ($Mode == 'ADD_ITEM') { - - $sql = "INSERT INTO ".TB_PREF."purch_data (supplier_id, stock_id, price, suppliers_uom, - conversion_factor, supplier_description) VALUES ("; - $sql .= db_escape($_POST['supplier_id']).", ".db_escape($_POST['stock_id']). ", " - .input_num('price',0) . ", ".db_escape( $_POST['suppliers_uom'] ). ", " - .input_num('conversion_factor') . ", " - .db_escape($_POST['supplier_description']) . ")"; - - db_query($sql,"The supplier purchasing details could not be added"); + add_item_purchasing_data($_POST['supplier_id'], $_POST['stock_id'], input_num('price',0), + $_POST['suppliers_uom'], input_num('conversion_factor'), $_POST['supplier_description']); display_notification(_("This supplier purchasing data has been added.")); - } else + } + else { - $sql = "UPDATE ".TB_PREF."purch_data SET price=" . input_num('price',0) . ", - suppliers_uom=".db_escape($_POST['suppliers_uom']) . ", - conversion_factor=" . input_num('conversion_factor') . ", - supplier_description=" . db_escape($_POST['supplier_description']) . " - WHERE stock_id=".db_escape($_POST['stock_id']) . " AND - supplier_id=".db_escape($selected_id); - db_query($sql,"The supplier purchasing details could not be updated"); - + update_item_purchasing_data($selected_id, $_POST['stock_id'], input_num('price',0), + $_POST['suppliers_uom'], input_num('conversion_factor'), $_POST['supplier_description']); display_notification(_("Supplier purchasing data has been updated.")); } $Mode = 'RESET'; @@ -85,11 +73,7 @@ if ($Mode=='ADD_ITEM' || $Mode=='UPDATE_ITEM') if ($Mode == 'Delete') { - - $sql = "DELETE FROM ".TB_PREF."purch_data WHERE supplier_id=".db_escape($selected_id)." - AND stock_id=".db_escape($_POST['stock_id']); - db_query($sql,"could not delete purchasing data"); - + delete_item_purchasing_data($selected_id, $_POST['stock_id']); display_notification(_("The purchasing data item has been sucessfully deleted.")); $Mode = 'RESET'; } @@ -130,22 +114,15 @@ if ($mb_flag == -1) } else { - - $sql = "SELECT ".TB_PREF."purch_data.*,".TB_PREF."suppliers.supp_name," - .TB_PREF."suppliers.curr_code - FROM ".TB_PREF."purch_data INNER JOIN ".TB_PREF."suppliers - ON ".TB_PREF."purch_data.supplier_id=".TB_PREF."suppliers.supplier_id - WHERE stock_id = ".db_escape($_POST['stock_id']); - - $result = db_query($sql, "The supplier purchasing details for the selected part could not be retrieved"); - div_start('price_table'); + $result = get_items_purchasing_data($_POST['stock_id']); + div_start('price_table'); if (db_num_rows($result) == 0) { display_note(_("There is no purchasing data set up for the part selected")); } else { - start_table("$table_style width=65%"); + start_table(TABLESTYLE, "width=65%"); $th = array(_("Supplier"), _("Price"), _("Currency"), _("Supplier's Unit"), _("Conversion Factor"), _("Supplier's Description"), "", ""); @@ -162,7 +139,7 @@ else amount_decimal_cell($myrow["price"]); label_cell($myrow["curr_code"]); label_cell($myrow["suppliers_uom"]); - qty_cell($myrow['conversion_factor'], false, user_exrate_dec()); + qty_cell($myrow['conversion_factor'], false, 'max'); label_cell($myrow["supplier_description"]); edit_button_cell("Edit".$myrow['supplier_id'], _("Edit")); delete_button_cell("Delete".$myrow['supplier_id'], _("Delete")); @@ -186,26 +163,18 @@ else $dec2 = 6; if ($Mode =='Edit') { - - $sql = "SELECT ".TB_PREF."purch_data.*,".TB_PREF."suppliers.supp_name FROM ".TB_PREF."purch_data - INNER JOIN ".TB_PREF."suppliers ON ".TB_PREF."purch_data.supplier_id=".TB_PREF."suppliers.supplier_id - WHERE ".TB_PREF."purch_data.supplier_id=".db_escape($selected_id)." - AND ".TB_PREF."purch_data.stock_id=".db_escape($_POST['stock_id']); - - $result = db_query($sql, "The supplier purchasing details for the selected supplier and item could not be retrieved"); - - $myrow = db_fetch($result); + $myrow = get_item_purchasing_data($selected_id, $_POST['stock_id']); $supp_name = $myrow["supp_name"]; $_POST['price'] = price_decimal_format($myrow["price"], $dec2); $_POST['suppliers_uom'] = $myrow["suppliers_uom"]; $_POST['supplier_description'] = $myrow["supplier_description"]; - $_POST['conversion_factor'] = exrate_format($myrow["conversion_factor"]); + $_POST['conversion_factor'] = maxprec_format($myrow["conversion_factor"]); } br(); hidden('selected_id', $selected_id); -start_table($table_style2); +start_table(TABLESTYLE2); if ($Mode == 'Edit') { @@ -222,10 +191,10 @@ text_row(_("Suppliers Unit of Measure:"), 'suppliers_uom', null, 50, 51); if (!isset($_POST['conversion_factor']) || $_POST['conversion_factor'] == "") { - $_POST['conversion_factor'] = exrate_format(1); + $_POST['conversion_factor'] = maxprec_format(1); } amount_row(_("Conversion Factor (to our UOM):"), 'conversion_factor', - exrate_format($_POST['conversion_factor']), null, null, user_exrate_dec() ); + maxprec_format($_POST['conversion_factor']), null, null, 'max'); text_row(_("Supplier's Code or Description:"), 'supplier_description', null, 50, 51); end_table(1); diff --git a/inventory/reorder_level.php b/inventory/reorder_level.php index 787348a5..4e8f02c4 100644 --- a/inventory/reorder_level.php +++ b/inventory/reorder_level.php @@ -52,7 +52,7 @@ div_end(); set_global_stock_item($_POST['stock_id']); div_start('reorders'); -start_table("$table_style width=30%"); +start_table(TABLESTYLE, "width=30%"); $th = array(_("Location"), _("Quantity On Hand"), _("Re-Order Level")); table_header($th); diff --git a/inventory/transfers.php b/inventory/transfers.php index 9e6cbd85..26859e59 100644 --- a/inventory/transfers.php +++ b/inventory/transfers.php @@ -224,7 +224,7 @@ start_form(); display_order_header($_SESSION['transfer_items']); -start_table("$table_style width=70%", 10); +start_table(TABLESTYLE, "width=70%", 10); start_row(); echo ""; display_transfer_items(_("Items"), $_SESSION['transfer_items']); diff --git a/inventory/view/view_adjustment.php b/inventory/view/view_adjustment.php index 953e6018..e5722c54 100644 --- a/inventory/view/view_adjustment.php +++ b/inventory/view/view_adjustment.php @@ -38,7 +38,7 @@ while ($adjustment = db_fetch($adjustment_items)) { $adjustment_type = get_movement_type($adjustment['person_id']) ; - start_table("$table_style2 width=90%"); + start_table(TABLESTYLE2, "width=90%"); start_row(); label_cells(_("At Location"), $adjustment['location_name'], "class='tableheader2'"); label_cells(_("Reference"), $adjustment['reference'], "class='tableheader2'", "colspan=6"); @@ -51,7 +51,7 @@ while ($adjustment = db_fetch($adjustment_items)) $header_shown = true; echo "
"; - start_table("$table_style width=90%"); + start_table(TABLESTYLE, "width=90%"); $th = array(_("Item"), _("Description"), _("Quantity"), _("Units"), _("Unit Cost")); @@ -72,5 +72,5 @@ end_table(1); is_voided_display(ST_INVADJUST, $trans_no, _("This adjustment has been voided.")); -end_page(true); +end_page(true, false, false, ST_INVADJUST, $trans_no); ?> \ No newline at end of file diff --git a/inventory/view/view_transfer.php b/inventory/view/view_transfer.php index 195f91bc..86ad8bfa 100644 --- a/inventory/view/view_transfer.php +++ b/inventory/view/view_transfer.php @@ -33,7 +33,7 @@ $to_trans = $transfer_items[1]; display_heading($systypes_array[ST_LOCTRANSFER] . " #$trans_no"); echo "
"; -start_table("$table_style2 width=90%"); +start_table(TABLESTYLE2, "width=90%"); start_row(); label_cells(_("Item"), $from_trans['stock_id'] . " - " . $from_trans['description'], "class='tableheader2'"); @@ -49,10 +49,9 @@ end_row(); comments_display_row(ST_LOCTRANSFER, $trans_no); -end_table(1); +end_table(2); -echo "
"; -start_table("$table_style width=90%"); +start_table(TABLESTYLE, "width=90%"); $th = array(_("Item"), _("Description"), _("Quantity"), _("Units")); table_header($th); @@ -76,5 +75,5 @@ end_table(1); is_voided_display(ST_LOCTRANSFER, $trans_no, _("This transfer has been voided.")); -end_page(true); +end_page(true, false, false, ST_LOCTRANSFER, $trans_no); ?> \ No newline at end of file diff --git a/js/inserts.js b/js/inserts.js index 6d8b1ff7..a17519ef 100644 --- a/js/inserts.js +++ b/js/inserts.js @@ -11,9 +11,16 @@ var _focus; var _hotkeys = { 'alt': false, // whether is the Alt key pressed - 'focus': -1 // currently selected indeks of document.links + 'list': false, // list of all elements with hotkey used recently + 'focus': -1 // currently selected list element }; +function validate(e) { + if (e.name && (typeof _validate[e.name] == 'function')) + return _validate[e.name](e); + return true; +} + function save_focus(e) { _focus = e.name||e.id; var h = document.getElementById('hints'); @@ -26,7 +33,7 @@ function save_focus(e) { function _expand(tabobj) { var ul = tabobj.parentNode.parentNode; - var alltabs=ul.getElementsByTagName("input"); + var alltabs=ul.getElementsByTagName("button"); var frm = tabobj.form; if (ul.getAttribute("rel")){ @@ -53,8 +60,9 @@ function _set_combo_input(e) { save_focus(select); // submit request if there is submit_on_change option set and // search field has changed. + if (button && (this.value != this.getAttribute('_last'))) { - JsHttpRequest.request(button); + JsHttpRequest.request(button); } else if(this.className=='combo2') { this.style.display = 'none'; select.style.display = 'inline'; @@ -66,14 +74,21 @@ function _set_combo_input(e) { var select = document.getElementsByName(this.getAttribute('rel'))[0]; if(select && select.selectedIndex>=0) { var len = select.length; - var byid = this.className=='combo'; + var byid = this.className=='combo' || this.className=='combo3'; var ac = this.value.toUpperCase(); select.options[select.selectedIndex].selected = false; for (i = 0; i < len; i++) { var txt = byid ? select.options[i].value : select.options[i].text; - if (txt.toUpperCase().indexOf(ac) >= 0) { - select.options[i].selected = true; - break; + if (this.className=='combo3') { + if(txt.toUpperCase().indexOf(ac) == 0) { + select.options[i].selected = true; + break; + } + } else { + if(txt.toUpperCase().indexOf(ac) >= 0) { + select.options[i].selected = true; + break; + } } } } @@ -89,14 +104,16 @@ function _set_combo_input(e) { } function _update_box(s) { - var byid = s.className=='combo'; + var byid = s.className=='combo' || s.className=='combo3'; var rel = s.getAttribute('rel'); var box = document.getElementsByName(rel)[0]; if(box && s.selectedIndex>=0) { var opt = s.options[s.selectedIndex]; if(box) { + var old = box.value; box.value = byid ? opt.value : opt.text; box.setAttribute('_last', box.value); + return old != box.value } } } @@ -107,15 +124,18 @@ function _set_combo_select(e) { // signaling we must track selectedIndex in onblur handler. e.setAttribute('_last', e.selectedIndex); e.onblur = function() { - if(this.className=='combo') - _update_box(this); - if (this.selectedIndex != this.getAttribute('_last')) - this.onchange(); + var box = document.getElementsByName(this.getAttribute('rel'))[0]; +// if(this.className=='combo') +// _update_box(this); + if ((this.selectedIndex != this.getAttribute('_last')) + ||((this.className=='combo' || this.className=='combo3') && _update_box(this)) + ) + this.onchange(); } e.onchange = function() { var s = this; - this.setAttribute('_last', this.selectedIndex); - if(s.className=='combo') + this.setAttribute('_last', this.selectedIndex); + if(s.className=='combo' || this.className=='combo3') _update_box(s); if(s.selectedIndex>=0) { var sname = '_'+s.name+'_update'; @@ -178,11 +198,11 @@ var inserts = { if(e.onfocus==undefined) { e.onfocus = function() { save_focus(this); - if (this.className == 'combo') + if (this.className == 'combo' || this.className == 'combo3') this.select(); }; } - if (e.className == 'combo' || e.className == 'combo2') { + if (e.className == 'combo' || e.className == 'combo2' || e.className == 'combo3') { _set_combo_input(e); } else @@ -208,36 +228,24 @@ var inserts = { // this shows divs for js enabled browsers only e.style.display = 'block'; }, + + 'button': function(e) { + e.onclick = function(){ return validate(e); } + }, // '.ajaxsubmit,.editbutton,.navibutton': // much slower on IE7 'button.ajaxsubmit,input.ajaxsubmit,input.editbutton,button.editbutton,button.navibutton': function(e) { - e.onclick = function() { - save_focus(e); - var asp = e.getAttribute('aspect') - if (asp && asp.indexOf('process') !== -1) - JsHttpRequest.request(this, null, 60000); - else - JsHttpRequest.request(this); - return false; - } - }, - 'button': function(e) { - if (e.name) { - var func = _validate[e.name]; - var old = e.onclick; - if(func) { - if (typeof old != 'function' || old == func) { // prevent multiply binding on ajax update - e.onclick = func; - } else { - e.onclick = function() { - if(func()) - { old(); return true;} - else - return false; - } + e.onclick = function() { + if (validate(e)) { + save_focus(e); + var asp = e.getAttribute('aspect') + if (asp && asp.indexOf('process') !== -1) + JsHttpRequest.request(this, null, 60000); + else + JsHttpRequest.request(this); } + return false; } - } }, '.amount': function(e) { if(e.onblur==undefined) { @@ -259,19 +267,32 @@ var inserts = { } } }, - 'button[aspect*selector], input[aspect*selector]': function(e) { + 'button[aspect*selector], button[aspect*abort], input[aspect*selector]': function(e) { e.onclick = function() { passBack(this.getAttribute('rel')); return false; } }, + 'button[aspect=popup]': function(e) { + e.onclick = function() { + if(_w) _w.close(); // this is really necessary to have window on top in FF2 :/ + _w = open(document.location+'popup=1', + "edit","Scrollbars=0,resizable=0,width=800,height=600, top=50,left=50"); + if (_w.opener == null) + _w.opener = self; + // editors._call = key; // store call point for passBack +// _w.moveTo(50, 50); + _w.focus(); + return false; + } + }, 'select': function(e) { if(e.onfocus==undefined) { e.onfocus = function() { save_focus(this); }; var c = e.className; - if (c == 'combo' || c == 'combo2') + if (c == 'combo' || c == 'combo2' || c == 'combo3') _set_combo_select(e); } }, @@ -282,6 +303,16 @@ var inserts = { return false; } }, + 'a.repopts_link': function(l) { + l.onclick = function() { + save_focus(this); + var replinks = document.getElementsBySelector('a.repopts_link'); + for(var i in replinks) + replinks[i].style.fontWeight = replinks[i]==this ? 'bold' : 'normal'; + JsHttpRequest.request(this, null); + return false; + } + }, 'a': function(e) { // traverse menu e.onkeydown = function(ev) { ev = ev||window.event; @@ -292,21 +323,36 @@ var inserts = { return false; } } + // prevent unneeded transaction entry abortion + if (e.className == 'shortcut' + || e.className == 'menu_option' + || e.className == 'menu_tab' + || e.className == 'selected') + e.onclick = function(ev) { + if (_validate._processing + && _validate._modified + && !confirm(_validate._processing)) { + ev.returnValue = false; + return false; + } + window.location = e.href; + } }, 'ul.ajaxtabs': function(ul) { var ulist=ul.getElementsByTagName("li"); for (var x=0; x47 && key<58) || (key>64 && key<91))) { + key = String.fromCharCode(key); var n = _hotkeys.focus; - var l = document.links; + var l = document.getElementsBySelector('[accesskey='+key+']'); var cnt = l.length; - key = String.fromCharCode(key); + _hotkeys.list = l; for (var i=0; i=0) { - var link = document.links[_hotkeys.focus]; + if (_hotkeys.focus >= 0) { + var link = _hotkeys.list[_hotkeys.focus]; if(link.onclick) link.onclick(); else diff --git a/js/reports.js b/js/reports.js new file mode 100644 index 00000000..1c24875e --- /dev/null +++ b/js/reports.js @@ -0,0 +1,63 @@ +/********************************************************************** + Copyright (C) FrontAccounting, LLC. + Released under the terms of the GNU General Public License, GPL, + as published by the Free Software Foundation, either version 3 + of the License, or (at your option) any later version. + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. + See the License here . +***********************************************************************/ +var replinks = { + 'a, button': function(e) { // traverse menu + e.onkeydown = function(ev) { + ev = ev||window.event; + key = ev.keyCode||ev.which; + if(key==37 || key==38 || key==39 || key==40) { + move_focus(key, e, document.links); + ev.returnValue = false; + return false; + } + } + }, + 'a.repopts_link': function(e) { + e.onclick = function() { + save_focus(this); + set_options(this); + JsHttpRequest.request(this, null); + return false; + } + }, + 'a.repclass_link': function(e) { + e.onclick = function() { + save_focus(this); + showClass(this.id.substring(5)); // id=classX + return false; + } + } +} + +function set_options(e) +{ + var replinks = document.getElementsBySelector('a.repopts_link'); + for(var i in replinks) + replinks[i].style.fontWeight = replinks[i]==e ? 'bold' : 'normal'; +} + +function showClass(pClass) { + var classes = document.getElementsBySelector('.repclass'); + for(var i in classes) { + cl = classes[i]; + cl.style.display = (cl.id==('TAB_'+pClass)) ? "block" : "none"; + } + var classlinks = document.getElementsBySelector('a.repclass_link'); + for(var i in classlinks) + classlinks[i].style.fontWeight = classlinks[i].id == ('class'+pClass) ? + 'bold' : 'normal'; + + set_options(); // clear optionset links + document.getElementById('rep_form').innerHTML = ''; + return false; +} + +Behaviour.register(replinks); \ No newline at end of file diff --git a/js/utils.js b/js/utils.js index ca365f5d..51a7a491 100644 --- a/js/utils.js +++ b/js/utils.js @@ -36,6 +36,7 @@ function disp_msg(msg, cl) { JsHttpRequest.request= function(trigger, form, tout) { // if (trigger.type=='submit' && !validate(trigger)) return false; tout = tout | 6000; // default timeout value + document.getElementById('msgbox').innerHTML=''; set_mark(tout>10000 ? 'progressbar.gif' : 'ajax-loader.gif'); JsHttpRequest._request(trigger, form, tout, 0); } @@ -104,7 +105,7 @@ JsHttpRequest._request = function(trigger, form, tout, retry) { // seek element by id if there is no elemnt with given name objElement = document.getElementsByName(id)[0] || document.getElementById(id); if(cmd=='as') { - eval("objElement.setAttribute('"+property+"',"+data+");"); + eval("objElement.setAttribute('"+property+"','"+data+"');"); } else if(cmd=='up') { // if(!objElement) alert('No element "'+id+'"'); if(objElement) { @@ -211,19 +212,24 @@ function price_format(post, num, dec, label, color) { if(isNaN(num)) num = "0"; sign = (num == (num = Math.abs(num))); + var max = dec=='max'; + if(max) dec = 15 - Math.floor(Math.log(Math.abs(num))); if(dec<0) dec = 2; decsize = Math.pow(10, dec); num = Math.floor(num*decsize+0.50000000001); cents = num%decsize; num = Math.floor(num/decsize).toString(); for( i=cents.toString().length; ip0.y)) || (dir==38 && (p.yp0.x)))) { var l1 = (p.y-p0.y)*(p.y-p0.y)+(p.x-p0.x)*(p.x-p0.x); diff --git a/lang/new_language_template/LC_MESSAGES/empty.po b/lang/new_language_template/LC_MESSAGES/empty.po index e25e0cce..5c383df1 100644 --- a/lang/new_language_template/LC_MESSAGES/empty.po +++ b/lang/new_language_template/LC_MESSAGES/empty.po @@ -1,11306 +1,14549 @@ -# LAnguage template file for FrontAccounting 2.1.1 -# Copyright (C) 2009 FrontAccounting LLC +# SOME DESCRIPTIVE TITLE. +# Copyright (C) YEAR THE PACKAGE'S COPYRIGHT HOLDER +# This file is distributed under the same license as the PACKAGE package. +# FIRST AUTHOR , YEAR. # +#, fuzzy msgid "" msgstr "" -"Project-Id-Version: FrontAccounting\n" +"Project-Id-Version: PACKAGE VERSION\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2010-05-05 13:48+0100\n" -"PO-Revision-Date: 2010-05-05 13:48+0100\n" -"Last-Translator: Translation Team \n" -"Language-Team: Translators\n" +"POT-Creation-Date: 2010-12-09 11:41+0100\n" +"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" +"Last-Translator: FULL NAME \n" +"Language-Team: LANGUAGE \n" +"Language: \n" "MIME-Version: 1.0\n" -"Content-Type: text/plain; charset=UTF-8\n" +"Content-Type: text/plain; charset=ISO-8859-2\n" "Content-Transfer-Encoding: 8bit\n" -"X-Poedit-Language: English\n" -"X-Poedit-Country: UNITED KINGDOM\n" -"X-Poedit-SourceCharset: iso-8859-1\n" -"X-Poedit-Basepath: c:\\Apache2\\htdocs\\account228\n" -"X-Poedit-SearchPath-0: c:\\Apache2\\htdocs\\account228\n" - -#: c:\Apache2\htdocs\account228/frontaccounting.php:80 -#: c:\Apache2\htdocs\account228/frontaccounting.php:81 + +#: ../frontaccounting.php:73 +#: ../frontaccounting.php:74 msgid "Main Menu" msgstr "" -#: c:\Apache2\htdocs\account228/frontaccounting.php:82 -#: c:\Apache2\htdocs\account228/access/logout.php:17 +#: ../frontaccounting.php:75 +#: ../access/logout.php:17 +#: ../themes/default/renderer.php:42 +#: ../themes/default/renderer.php:68 +#: ../themes/exclusive/renderer.php:42 +#: ../themes/exclusive/renderer.php:51 msgid "Logout" msgstr "" -#: c:\Apache2\htdocs\account228/access/login.php:13 +#: ../access/login.php:13 msgid "Restricted access" msgstr "" -#: c:\Apache2\htdocs\account228/access/login.php:33 +#: ../access/login.php:33 msgid "Login as user: demouser and password: password" msgstr "" -#: c:\Apache2\htdocs\account228/access/login.php:37 +#: ../access/login.php:37 msgid "Please login here" msgstr "" -#: c:\Apache2\htdocs\account228/access/login.php:45 -#: c:\Apache2\htdocs\account228/access/login.php:75 +#: ../access/login.php:45 +#: ../access/login.php:75 msgid "Authorization timeout" msgstr "" -#: c:\Apache2\htdocs\account228/access/login.php:45 -#: c:\Apache2\htdocs\account228/access/login.php:82 +#: ../access/login.php:45 +#: ../access/login.php:82 msgid "Login" msgstr "" -#: c:\Apache2\htdocs\account228/access/login.php:82 +#: ../access/login.php:82 +#: ../admin/inst_upgrade.php:137 msgid "Version" msgstr "" -#: c:\Apache2\htdocs\account228/access/login.php:85 +#: ../access/login.php:85 msgid "User name" msgstr "" -#: c:\Apache2\htdocs\account228/access/login.php:89 -#: c:\Apache2\htdocs\account228/admin/change_current_user_password.php:78 +#: ../access/login.php:89 +#: ../admin/change_current_user_password.php:78 +#: ../admin/users.php:191 msgid "Password:" msgstr "" -#: c:\Apache2\htdocs\account228/access/login.php:98 -#: c:\Apache2\htdocs\account228/admin/create_coy.php:263 -#: c:\Apache2\htdocs\account228/admin/create_coy.php:352 +#: ../access/login.php:98 +#: ../admin/create_coy.php:237 +#: ../admin/create_coy.php:313 msgid "Company" msgstr "" -#: c:\Apache2\htdocs\account228/access/login.php:107 +#: ../access/login.php:107 msgid "Login -->" msgstr "" -#: c:\Apache2\htdocs\account228/access/login.php:136 -#: c:\Apache2\htdocs\account228/admin/display_prefs.php:110 +#: ../access/login.php:136 +#: ../admin/display_prefs.php:111 +#: ../themes/default/renderer.php:113 +#: ../themes/exclusive/renderer.php:154 msgid "Theme:" msgstr "" -#: c:\Apache2\htdocs\account228/access/logout.php:28 +#: ../access/logout.php:28 msgid "Thank you for using" msgstr "" -#: c:\Apache2\htdocs\account228/access/logout.php:39 +#: ../access/logout.php:39 msgid "Click here to Login Again." msgstr "" -#: c:\Apache2\htdocs\account228/admin/attachments.php:71 +#: ../admin/attachments.php:72 msgid "Attach Documents" msgstr "" -#: c:\Apache2\htdocs\account228/admin/attachments.php:120 +#: ../admin/attachments.php:119 msgid "Attachment has been inserted." msgstr "" -#: c:\Apache2\htdocs\account228/admin/attachments.php:137 +#: ../admin/attachments.php:125 msgid "Attachment has been updated." msgstr "" -#: c:\Apache2\htdocs\account228/admin/attachments.php:150 +#: ../admin/attachments.php:137 msgid "Attachment has been deleted." msgstr "" -#: c:\Apache2\htdocs\account228/admin/attachments.php:167 +#: ../admin/attachments.php:155 +#: ../admin/view_print_transaction.php:72 +#: ../gl/inquiry/journal_inquiry.php:47 +#: ../inventory/includes/item_adjustments_ui.inc:47 +#: ../manufacturing/work_order_add_finished.php:203 +#: ../manufacturing/work_order_costs.php:142 +#: ../manufacturing/work_order_entry.php:377 +#: ../manufacturing/work_order_entry.php:385 +#: ../manufacturing/includes/work_order_issue_ui.inc:157 +#: ../sales/inquiry/customer_allocation_inquiry.php:47 msgid "Type:" msgstr "" -#: c:\Apache2\htdocs\account228/admin/attachments.php:195 +#: ../admin/attachments.php:167 +#: ../admin/view_print_transaction.php:126 +#: ../admin/void_transaction.php:160 +#: ../dimensions/inquiry/search_dimensions.php:127 +#: ../dimensions/view/view_dimension.php:54 +#: ../gl/bank_account_reconcile.php:234 +#: ../gl/inquiry/bank_inquiry.php:67 +#: ../gl/inquiry/gl_account_inquiry.php:125 +#: ../gl/inquiry/journal_inquiry.php:120 +#: ../gl/inquiry/journal_inquiry.php:133 +#: ../includes/ui/allocation_cart.inc:263 +#: ../inventory/inquiry/stock_movements.php:76 +#: ../manufacturing/search_work_orders.php:159 +#: ../manufacturing/includes/manufacturing_ui.inc:157 +#: ../manufacturing/includes/manufacturing_ui.inc:200 +#: ../manufacturing/includes/manufacturing_ui.inc:236 +#: ../manufacturing/includes/manufacturing_ui.inc:276 +#: ../manufacturing/includes/manufacturing_ui.inc:280 +#: ../manufacturing/includes/manufacturing_ui.inc:331 +#: ../purchasing/view/view_po.php:115 +#: ../purchasing/view/view_po.php:140 +#: ../purchasing/inquiry/po_search_completed.php:116 +#: ../purchasing/inquiry/po_search.php:130 +#: ../purchasing/inquiry/supplier_allocation_inquiry.php:126 +#: ../purchasing/inquiry/supplier_inquiry.php:163 +#: ../purchasing/allocations/supplier_allocation_main.php:95 +#: ../reporting/rep101.php:130 +#: ../reporting/rep201.php:118 +#: ../reporting/rep203.php:91 +#: ../reporting/rep601.php:76 +#: ../reporting/rep704.php:78 +#: ../reporting/rep704.php:81 +#: ../reporting/rep704.php:84 +#: ../reporting/rep710.php:76 +#: ../reporting/includes/doctext.inc:108 +#: ../reporting/includes/doctext.inc:116 +#: ../sales/allocations/customer_allocation_main.php:94 +#: ../sales/view/view_sales_order.php:95 +#: ../sales/view/view_sales_order.php:128 +#: ../sales/view/view_sales_order.php:160 +#: ../sales/inquiry/customer_allocation_inquiry.php:142 +#: ../sales/inquiry/customer_inquiry.php:213 msgid "#" msgstr "" -#: c:\Apache2\htdocs\account228/admin/attachments.php:195 -#: c:\Apache2\htdocs\account228/admin/attachments.php:250 +#: ../admin/attachments.php:167 +#: ../admin/attachments.php:217 +#: ../admin/crm_categories.php:88 +#: ../admin/inst_upgrade.php:137 +#: ../admin/payment_terms.php:127 +#: ../admin/printers.php:84 +#: ../admin/print_profiles.php:148 +#: ../gl/inquiry/tax_inquiry.php:82 +#: ../gl/manage/gl_quick_entries.php:186 +#: ../gl/manage/gl_quick_entries.php:224 +#: ../includes/ui/view_package.php:22 +#: ../inventory/manage/item_codes.php:123 +#: ../inventory/manage/item_units.php:94 +#: ../inventory/manage/movement_types.php:95 +#: ../inventory/manage/sales_kits.php:40 +#: ../inventory/view/view_adjustment.php:56 +#: ../inventory/view/view_transfer.php:56 +#: ../manufacturing/manage/bom_edit.php:70 +#: ../manufacturing/includes/manufacturing_ui.inc:28 +#: ../purchasing/includes/ui/invoice_ui.inc:465 +#: ../purchasing/includes/ui/invoice_ui.inc:477 +#: ../purchasing/po_receive_items.php:58 +#: ../reporting/rep104.php:109 +#: ../reporting/rep105.php:112 +#: ../reporting/rep204.php:82 +#: ../reporting/rep303.php:109 +#: ../reporting/rep303.php:115 +#: ../reporting/rep304.php:114 +#: ../reporting/rep305.php:72 +#: ../reporting/rep401.php:69 +#: ../sales/create_recurrent_invoices.php:98 +#: ../sales/manage/credit_status.php:97 +#: ../sales/manage/recurrent_invoices.php:85 +#: ../sales/inquiry/sales_orders_view.php:289 +#: ../sales/inquiry/sales_orders_view.php:293 +#: ../taxes/tax_groups.php:146 +#: ../taxes/tax_types.php:115 msgid "Description" msgstr "" -#: c:\Apache2\htdocs\account228/admin/attachments.php:195 -#: c:\Apache2\htdocs\account228/admin/backups.php:60 -#: c:\Apache2\htdocs\account228/admin/backups.php:139 +#: ../admin/attachments.php:167 +#: ../admin/backups.php:60 +#: ../admin/backups.php:142 msgid "Filename" msgstr "" -#: c:\Apache2\htdocs\account228/admin/attachments.php:195 +#: ../admin/attachments.php:167 msgid "Size" msgstr "" -#: c:\Apache2\htdocs\account228/admin/attachments.php:195 +#: ../admin/attachments.php:167 msgid "Filetype" msgstr "" -#: c:\Apache2\htdocs\account228/admin/attachments.php:195 +#: ../admin/attachments.php:167 msgid "Date Uploaded" msgstr "" -#: c:\Apache2\htdocs\account228/admin/attachments.php:212 -#: c:\Apache2\htdocs\account228/admin/create_coy.php:287 -#: c:\Apache2\htdocs\account228/admin/fiscalyears.php:457 +#: ../admin/attachments.php:182 +#: ../admin/create_coy.php:261 +#: ../admin/crm_categories.php:106 +#: ../admin/fiscalyears.php:164 +#: ../admin/inst_lang.php:100 +#: ../admin/payment_terms.php:142 +#: ../admin/printers.php:96 +#: ../admin/shipping_companies.php:106 +#: ../admin/tags.php:140 +#: ../admin/users.php:144 +#: ../dimensions/inquiry/search_dimensions.php:120 +#: ../gl/inquiry/journal_inquiry.php:111 +#: ../gl/manage/bank_accounts.php:126 +#: ../gl/manage/currencies.php:166 +#: ../gl/manage/exchange_rates.php:94 +#: ../gl/manage/gl_account_classes.php:132 +#: ../gl/manage/gl_account_types.php:148 +#: ../gl/manage/gl_quick_entries.php:196 +#: ../gl/manage/gl_quick_entries.php:296 +#: ../gl/includes/ui/gl_bank_ui.inc:155 +#: ../gl/includes/ui/gl_journal_ui.inc:122 +#: ../includes/ui/contacts_view.inc:64 +#: ../includes/ui/simple_crud_class.inc:52 +#: ../inventory/prices.php:145 +#: ../inventory/purchasing_data.php:144 +#: ../inventory/includes/item_adjustments_ui.inc:87 +#: ../inventory/includes/stock_transfers_ui.inc:79 +#: ../inventory/manage/item_categories.php:121 +#: ../inventory/manage/item_codes.php:138 +#: ../inventory/manage/item_units.php:110 +#: ../inventory/manage/locations.php:161 +#: ../inventory/manage/movement_types.php:106 +#: ../inventory/manage/sales_kits.php:55 +#: ../manufacturing/search_work_orders.php:109 +#: ../manufacturing/manage/bom_edit.php:86 +#: ../manufacturing/manage/work_centres.php:114 +#: ../manufacturing/includes/work_order_issue_ui.inc:58 +#: ../purchasing/includes/ui/invoice_ui.inc:514 +#: ../purchasing/includes/ui/po_ui.inc:266 +#: ../purchasing/inquiry/po_search_completed.php:101 +#: ../purchasing/inquiry/po_search.php:87 +#: ../sales/manage/credit_status.php:119 +#: ../sales/manage/customer_branches.php:159 +#: ../sales/manage/recurrent_invoices.php:113 +#: ../sales/manage/sales_areas.php:103 +#: ../sales/manage/sales_groups.php:99 +#: ../sales/manage/sales_people.php:119 +#: ../sales/manage/sales_points.php:99 +#: ../sales/manage/sales_types.php:121 +#: ../sales/inquiry/customer_inquiry.php:186 +#: ../sales/inquiry/sales_deliveries_view.php:154 +#: ../sales/inquiry/sales_orders_view.php:123 +#: ../sales/includes/ui/sales_credit_ui.inc:197 +#: ../sales/includes/ui/sales_order_ui.inc:203 +#: ../taxes/item_tax_types.php:134 +#: ../taxes/tax_groups.php:168 +#: ../taxes/tax_types.php:132 msgid "Edit" msgstr "" -#: c:\Apache2\htdocs\account228/admin/attachments.php:213 +#: ../admin/attachments.php:183 +#: ../gl/inquiry/journal_inquiry.php:128 msgid "View" msgstr "" -#: c:\Apache2\htdocs\account228/admin/attachments.php:214 +#: ../admin/attachments.php:184 msgid "Download" msgstr "" -#: c:\Apache2\htdocs\account228/admin/attachments.php:215 -#: c:\Apache2\htdocs\account228/admin/create_coy.php:288 -#: c:\Apache2\htdocs\account228/admin/fiscalyears.php:459 +#: ../admin/attachments.php:185 +#: ../admin/create_coy.php:262 +#: ../admin/crm_categories.php:110 +#: ../admin/fiscalyears.php:166 +#: ../admin/inst_chart.php:80 +#: ../admin/inst_lang.php:109 +#: ../admin/inst_module.php:144 +#: ../admin/inst_theme.php:102 +#: ../admin/payment_terms.php:143 +#: ../admin/printers.php:97 +#: ../admin/shipping_companies.php:107 +#: ../admin/tags.php:141 +#: ../admin/users.php:146 +#: ../gl/gl_budget.php:137 +#: ../gl/manage/bank_accounts.php:127 +#: ../gl/manage/currencies.php:168 +#: ../gl/manage/exchange_rates.php:99 +#: ../gl/manage/gl_account_classes.php:133 +#: ../gl/manage/gl_account_types.php:149 +#: ../gl/manage/gl_quick_entries.php:197 +#: ../gl/manage/gl_quick_entries.php:297 +#: ../gl/includes/ui/gl_bank_ui.inc:157 +#: ../gl/includes/ui/gl_journal_ui.inc:124 +#: ../includes/ui/contacts_view.inc:67 +#: ../includes/ui/simple_crud_class.inc:54 +#: ../includes/ui/ui_input.inc:281 +#: ../inventory/prices.php:146 +#: ../inventory/purchasing_data.php:145 +#: ../inventory/includes/item_adjustments_ui.inc:89 +#: ../inventory/includes/stock_transfers_ui.inc:81 +#: ../inventory/manage/item_categories.php:122 +#: ../inventory/manage/item_codes.php:139 +#: ../inventory/manage/item_units.php:111 +#: ../inventory/manage/locations.php:162 +#: ../inventory/manage/movement_types.php:107 +#: ../inventory/manage/sales_kits.php:56 +#: ../manufacturing/manage/bom_edit.php:87 +#: ../manufacturing/manage/work_centres.php:115 +#: ../manufacturing/includes/work_order_issue_ui.inc:60 +#: ../purchasing/includes/ui/invoice_ui.inc:284 +#: ../purchasing/includes/ui/po_ui.inc:268 +#: ../sales/manage/credit_status.php:120 +#: ../sales/manage/customer_branches.php:163 +#: ../sales/manage/recurrent_invoices.php:114 +#: ../sales/manage/sales_areas.php:104 +#: ../sales/manage/sales_groups.php:100 +#: ../sales/manage/sales_people.php:120 +#: ../sales/manage/sales_points.php:100 +#: ../sales/manage/sales_types.php:122 +#: ../sales/includes/ui/sales_credit_ui.inc:199 +#: ../sales/includes/ui/sales_order_ui.inc:205 +#: ../taxes/item_tax_types.php:135 +#: ../taxes/tax_groups.php:169 +#: ../taxes/tax_types.php:133 msgid "Delete" msgstr "" -#: c:\Apache2\htdocs\account228/admin/attachments.php:244 -#: c:\Apache2\htdocs\account228/admin/attachments.php:249 +#: ../admin/attachments.php:211 +#: ../admin/attachments.php:216 msgid "Transaction #" msgstr "" -#: c:\Apache2\htdocs\account228/admin/attachments.php:251 +#: ../admin/attachments.php:218 msgid "Attached File" msgstr "" -#: c:\Apache2\htdocs\account228/admin/backups.php:21 -#: c:\Apache2\htdocs\account228/admin/backups.php:111 +#: ../admin/backups.php:21 +#: ../admin/backups.php:111 msgid "Select backup file first." msgstr "" -#: c:\Apache2\htdocs\account228/admin/backups.php:40 +#: ../admin/backups.php:40 msgid "Backup and Restore Database" msgstr "" -#: c:\Apache2\htdocs\account228/admin/backups.php:47 +#: ../admin/backups.php:47 msgid "Backup paths have not been set correctly." msgstr "" -#: c:\Apache2\htdocs\account228/admin/backups.php:48 +#: ../admin/backups.php:48 msgid "Please contact System Administrator." msgstr "" -#: c:\Apache2\htdocs\account228/admin/backups.php:49 +#: ../admin/backups.php:49 msgid "cannot find backup directory" msgstr "" -#: c:\Apache2\htdocs\account228/admin/backups.php:59 +#: ../admin/backups.php:59 msgid "Backup successfully generated." msgstr "" -#: c:\Apache2\htdocs\account228/admin/backups.php:62 +#: ../admin/backups.php:62 msgid "Database backup failed." msgstr "" -#: c:\Apache2\htdocs\account228/admin/backups.php:95 -#: c:\Apache2\htdocs\account228/admin/create_coy.php:275 -#: c:\Apache2\htdocs\account228/admin/fiscalyears.php:448 +#: ../admin/backups.php:95 +#: ../admin/create_coy.php:249 +#: ../admin/fiscalyears.php:155 +#: ../admin/inst_lang.php:85 +#: ../admin/inst_lang.php:97 +#: ../dimensions/inquiry/search_dimensions.php:107 +#: ../gl/manage/bank_accounts.php:123 +#: ../gl/manage/currencies.php:164 +#: ../gl/manage/gl_account_classes.php:127 +#: ../gl/manage/gl_quick_entries.php:230 +#: ../includes/system_tests.inc:38 +#: ../includes/system_tests.inc:113 +#: ../includes/system_tests.inc:126 +#: ../includes/ui/ui_lists.inc:1638 +#: ../purchasing/manage/suppliers.php:123 +#: ../reporting/rep101.php:126 +#: ../reporting/rep102.php:106 +#: ../reporting/rep104.php:103 +#: ../reporting/rep106.php:73 +#: ../reporting/rep201.php:114 +#: ../reporting/rep202.php:108 +#: ../reporting/rep203.php:87 +#: ../reporting/rep303.php:101 +#: ../reporting/rep303.php:105 +#: ../reporting/rep501.php:109 +#: ../sales/manage/sales_points.php:94 +#: ../sales/manage/sales_points.php:95 +#: ../sales/manage/sales_types.php:119 +#: ../taxes/item_tax_types.php:124 +#: ../taxes/tax_groups.php:161 msgid "No" msgstr "" -#: c:\Apache2\htdocs\account228/admin/backups.php:133 +#: ../admin/backups.php:135 msgid "Restore backup completed." msgstr "" -#: c:\Apache2\htdocs\account228/admin/backups.php:138 +#: ../admin/backups.php:141 msgid "File successfully deleted." msgstr "" -#: c:\Apache2\htdocs\account228/admin/backups.php:143 +#: ../admin/backups.php:146 msgid "Can't delete backup file." msgstr "" -#: c:\Apache2\htdocs\account228/admin/backups.php:152 +#: ../admin/backups.php:155 msgid "You can only upload *.sql backup files" msgstr "" -#: c:\Apache2\htdocs\account228/admin/backups.php:158 +#: ../admin/backups.php:161 msgid "File was not uploaded into the system." msgstr "" -#: c:\Apache2\htdocs\account228/admin/backups.php:164 +#: ../admin/backups.php:167 msgid "Create backup" msgstr "" -#: c:\Apache2\htdocs\account228/admin/backups.php:165 +#: ../admin/backups.php:168 +#: ../sales/includes/ui/sales_order_ui.inc:590 +#: ../sales/includes/ui/sales_order_ui.inc:637 msgid "Comments:" msgstr "" -#: c:\Apache2\htdocs\account228/admin/backups.php:166 +#: ../admin/backups.php:169 msgid "Compression:" msgstr "" -#: c:\Apache2\htdocs\account228/admin/backups.php:168 +#: ../admin/backups.php:171 msgid "Create Backup" msgstr "" -#: c:\Apache2\htdocs\account228/admin/backups.php:170 +#: ../admin/backups.php:173 msgid "Backup scripts maintenance" msgstr "" -#: c:\Apache2\htdocs\account228/admin/backups.php:176 +#: ../admin/backups.php:179 msgid "View Backup" msgstr "" -#: c:\Apache2\htdocs\account228/admin/backups.php:177 +#: ../admin/backups.php:180 msgid "Download Backup" msgstr "" -#: c:\Apache2\htdocs\account228/admin/backups.php:178 +#: ../admin/backups.php:181 msgid "Restore Backup" msgstr "" -#: c:\Apache2\htdocs\account228/admin/backups.php:179 +#: ../admin/backups.php:182 msgid "" "You are about to restore database from backup file.\n" "Do you want to continue?" msgstr "" -#: c:\Apache2\htdocs\account228/admin/backups.php:181 +#: ../admin/backups.php:184 msgid "Delete Backup" msgstr "" -#: c:\Apache2\htdocs\account228/admin/backups.php:183 +#: ../admin/backups.php:186 #, php-format msgid "" "You are about to remove selected backup file.\n" "Do you want to continue ?" msgstr "" -#: c:\Apache2\htdocs\account228/admin/backups.php:189 +#: ../admin/backups.php:192 msgid "Upload file" msgstr "" -#: c:\Apache2\htdocs\account228/admin/change_current_user_password.php:16 -#: c:\Apache2\htdocs\account228/admin/change_current_user_password.php:85 +#: ../admin/change_current_user_password.php:16 +#: ../admin/change_current_user_password.php:85 +#: ../themes/default/renderer.php:62 +#: ../themes/exclusive/renderer.php:47 msgid "Change password" msgstr "" -#: c:\Apache2\htdocs\account228/admin/change_current_user_password.php:28 +#: ../admin/change_current_user_password.php:28 +#: ../admin/users.php:40 msgid "The password entered must be at least 4 characters long." msgstr "" -#: c:\Apache2\htdocs\account228/admin/change_current_user_password.php:35 +#: ../admin/change_current_user_password.php:35 +#: ../admin/users.php:47 msgid "The password cannot contain the user login." msgstr "" -#: c:\Apache2\htdocs\account228/admin/change_current_user_password.php:42 +#: ../admin/change_current_user_password.php:42 msgid "The passwords entered are not the same." msgstr "" -#: c:\Apache2\htdocs\account228/admin/change_current_user_password.php:56 +#: ../admin/change_current_user_password.php:56 msgid "Password cannot be changed in demo mode." msgstr "" -#: c:\Apache2\htdocs\account228/admin/change_current_user_password.php:61 +#: ../admin/change_current_user_password.php:61 msgid "Your password has been updated." msgstr "" -#: c:\Apache2\htdocs\account228/admin/change_current_user_password.php:73 +#: ../admin/change_current_user_password.php:73 +#: ../admin/users.php:180 msgid "User login:" msgstr "" -#: c:\Apache2\htdocs\account228/admin/change_current_user_password.php:79 +#: ../admin/change_current_user_password.php:79 msgid "Repeat password:" msgstr "" -#: c:\Apache2\htdocs\account228/admin/change_current_user_password.php:81 +#: ../admin/change_current_user_password.php:81 msgid "Enter your new password in the fields." msgstr "" -#: c:\Apache2\htdocs\account228/admin/company_preferences.php:16 +#: ../admin/company_preferences.php:16 +#: ../applications/setup.php:18 msgid "Company Setup" msgstr "" -#: c:\Apache2\htdocs\account228/admin/company_preferences.php:31 +#: ../admin/company_preferences.php:31 msgid "Login timeout must be positive number not less than 10." msgstr "" -#: c:\Apache2\htdocs\account228/admin/company_preferences.php:38 +#: ../admin/company_preferences.php:38 msgid "The company name must be entered." msgstr "" -#: c:\Apache2\htdocs\account228/admin/company_preferences.php:56 -msgid "Only jpg and png files are supported - a file extension of .jpg or .png is expected" +#: ../admin/company_preferences.php:54 +msgid "" +"Only jpg and png files are supported - a file extension of .jpg or .png is " +"expected" msgstr "" -#: c:\Apache2\htdocs\account228/admin/company_preferences.php:61 -msgid "The file size is over the maximum allowed. The maximum size allowed in KB is" +#: ../admin/company_preferences.php:59 +#: ../inventory/manage/items.php:74 +msgid "" +"The file size is over the maximum allowed. The maximum size allowed in KB is" msgstr "" -#: c:\Apache2\htdocs\account228/admin/company_preferences.php:66 +#: ../admin/company_preferences.php:64 +#: ../inventory/manage/items.php:79 msgid "Only graphics files can be uploaded" msgstr "" -#: c:\Apache2\htdocs\account228/admin/company_preferences.php:74 -#: c:\Apache2\htdocs\account228/admin/company_preferences.php:96 +#: ../admin/company_preferences.php:72 +#: ../admin/company_preferences.php:93 +#: ../inventory/manage/items.php:87 msgid "The existing image could not be removed" msgstr "" -#: c:\Apache2\htdocs\account228/admin/company_preferences.php:84 +#: ../admin/company_preferences.php:82 msgid "Error uploading logo file" msgstr "" -#: c:\Apache2\htdocs\account228/admin/company_preferences.php:119 +#: ../admin/company_preferences.php:116 msgid "Company setup has been updated." msgstr "" -#: c:\Apache2\htdocs\account228/admin/company_preferences.php:162 +#: ../admin/company_preferences.php:160 msgid "Name (to appear on reports):" msgstr "" -#: c:\Apache2\htdocs\account228/admin/company_preferences.php:163 +#: ../admin/company_preferences.php:161 +#: ../admin/shipping_companies.php:142 +#: ../includes/ui/contacts_view.inc:109 +#: ../inventory/manage/locations.php:202 +#: ../sales/manage/customers.php:203 +#: ../sales/includes/ui/sales_order_ui.inc:628 msgid "Address:" msgstr "" -#: c:\Apache2\htdocs\account228/admin/company_preferences.php:164 +#: ../admin/company_preferences.php:162 msgid "Domicile:" msgstr "" -#: c:\Apache2\htdocs\account228/admin/company_preferences.php:166 +#: ../admin/company_preferences.php:164 +#: ../admin/shipping_companies.php:138 +#: ../purchasing/manage/suppliers.php:105 +#: ../sales/manage/customer_branches.php:260 msgid "Phone Number:" msgstr "" -#: c:\Apache2\htdocs\account228/admin/company_preferences.php:167 +#: ../admin/company_preferences.php:165 +#: ../includes/ui/contacts_view.inc:104 +#: ../purchasing/manage/suppliers.php:107 +#: ../sales/manage/customer_branches.php:262 msgid "Fax Number:" msgstr "" -#: c:\Apache2\htdocs\account228/admin/company_preferences.php:168 +#: ../admin/company_preferences.php:166 +#: ../admin/users.php:202 msgid "Email Address:" msgstr "" -#: c:\Apache2\htdocs\account228/admin/company_preferences.php:170 +#: ../admin/company_preferences.php:168 msgid "Official Company Number:" msgstr "" -#: c:\Apache2\htdocs\account228/admin/company_preferences.php:171 +#: ../admin/company_preferences.php:169 +#: ../purchasing/manage/suppliers.php:88 +#: ../sales/manage/customers.php:205 msgid "GSTNo:" msgstr "" -#: c:\Apache2\htdocs\account228/admin/company_preferences.php:173 +#: ../admin/company_preferences.php:171 msgid "Home Currency:" msgstr "" -#: c:\Apache2\htdocs\account228/admin/company_preferences.php:174 +#: ../admin/company_preferences.php:172 +#: ../gl/gl_budget.php:63 msgid "Fiscal Year:" msgstr "" -#: c:\Apache2\htdocs\account228/admin/company_preferences.php:178 +#: ../admin/company_preferences.php:173 msgid "Tax Periods:" msgstr "" -#: c:\Apache2\htdocs\account228/admin/company_preferences.php:178 +#: ../admin/company_preferences.php:173 msgid "Months." msgstr "" -#: c:\Apache2\htdocs\account228/admin/company_preferences.php:179 +#: ../admin/company_preferences.php:174 msgid "Tax Last Period:" msgstr "" -#: c:\Apache2\htdocs\account228/admin/company_preferences.php:179 +#: ../admin/company_preferences.php:174 msgid "Months back." msgstr "" -#: c:\Apache2\htdocs\account228/admin/company_preferences.php:181 +#: ../admin/company_preferences.php:178 msgid "Company Logo:" msgstr "" -#: c:\Apache2\htdocs\account228/admin/company_preferences.php:182 +#: ../admin/company_preferences.php:179 msgid "New Company Logo (.jpg)" msgstr "" -#: c:\Apache2\htdocs\account228/admin/company_preferences.php:183 +#: ../admin/company_preferences.php:180 msgid "Delete Company Logo:" msgstr "" -#: c:\Apache2\htdocs\account228/admin/company_preferences.php:185 +#: ../admin/company_preferences.php:182 msgid "Use Dimensions:" msgstr "" -#: c:\Apache2\htdocs\account228/admin/company_preferences.php:186 +#: ../admin/company_preferences.php:183 msgid "Base for auto price calculations:" msgstr "" -#: c:\Apache2\htdocs\account228/admin/company_preferences.php:187 +#: ../admin/company_preferences.php:184 msgid "No base price list" msgstr "" -#: c:\Apache2\htdocs\account228/admin/company_preferences.php:188 +#: ../admin/company_preferences.php:185 msgid "Add Price from Std Cost:" msgstr "" -#: c:\Apache2\htdocs\account228/admin/company_preferences.php:190 +#: ../admin/company_preferences.php:187 msgid "Round to nearest:" msgstr "" -#: c:\Apache2\htdocs\account228/admin/company_preferences.php:192 +#: ../admin/company_preferences.php:190 msgid "Search Item List" msgstr "" -#: c:\Apache2\htdocs\account228/admin/company_preferences.php:193 +#: ../admin/company_preferences.php:191 msgid "Search Customer List" msgstr "" -#: c:\Apache2\htdocs\account228/admin/company_preferences.php:194 +#: ../admin/company_preferences.php:192 msgid "Search Supplier List" msgstr "" -#: c:\Apache2\htdocs\account228/admin/company_preferences.php:196 +#: ../admin/company_preferences.php:194 +msgid "Automatic Revaluation Currency Accounts" +msgstr "" + +#: ../admin/company_preferences.php:195 msgid "Time Zone on Reports" msgstr "" -#: c:\Apache2\htdocs\account228/admin/company_preferences.php:197 +#: ../admin/company_preferences.php:196 msgid "Login Timeout:" msgstr "" -#: c:\Apache2\htdocs\account228/admin/company_preferences.php:197 +#: ../admin/company_preferences.php:196 msgid "seconds" msgstr "" -#: c:\Apache2\htdocs\account228/admin/company_preferences.php:198 +#: ../admin/company_preferences.php:197 msgid "Version Id" msgstr "" -#: c:\Apache2\htdocs\account228/admin/company_preferences.php:203 -#: c:\Apache2\htdocs\account228/admin/display_prefs.php:141 -#: c:\Apache2\htdocs\account228/admin/forms_setup.php:61 -#: c:\Apache2\htdocs\account228/admin/gl_setup.php:221 +#: ../admin/company_preferences.php:202 +#: ../admin/display_prefs.php:142 +#: ../admin/forms_setup.php:61 +#: ../admin/gl_setup.php:203 +#: ../admin/inst_chart.php:74 +#: ../admin/inst_lang.php:103 +#: ../admin/inst_module.php:138 +#: ../admin/inst_module.php:156 +#: ../admin/inst_module.php:200 +#: ../admin/inst_theme.php:96 +#: ../dimensions/dimension_entry.php:293 +#: ../gl/gl_bank.php:381 +#: ../gl/gl_budget.php:135 +#: ../gl/manage/gl_quick_entries.php:60 +#: ../gl/includes/ui/gl_bank_ui.inc:246 +#: ../gl/includes/ui/gl_journal_ui.inc:221 +#: ../includes/ui/db_pager_view.inc:174 +#: ../includes/ui/simple_crud_class.inc:56 +#: ../includes/ui/simple_crud_class.inc:227 +#: ../includes/ui/ui_input.inc:203 +#: ../includes/ui/ui_input.inc:894 +#: ../inventory/adjustments.php:233 +#: ../inventory/cost_update.php:125 +#: ../inventory/reorder_level.php:97 +#: ../inventory/transfers.php:236 +#: ../inventory/includes/item_adjustments_ui.inc:157 +#: ../inventory/includes/stock_transfers_ui.inc:137 +#: ../inventory/manage/sales_kits.php:208 +#: ../manufacturing/work_order_entry.php:457 +#: ../manufacturing/includes/work_order_issue_ui.inc:127 +#: ../purchasing/includes/ui/po_ui.inc:299 +#: ../purchasing/includes/ui/po_ui.inc:434 +#: ../purchasing/po_receive_items.php:322 +#: ../sales/credit_note_entry.php:280 +#: ../sales/customer_credit_invoice.php:391 +#: ../sales/customer_delivery.php:521 +#: ../sales/customer_invoice.php:555 +#: ../sales/inquiry/sales_orders_view.php:317 +#: ../sales/includes/ui/sales_credit_ui.inc:293 +#: ../sales/includes/ui/sales_order_ui.inc:238 +#: ../sales/includes/ui/sales_order_ui.inc:558 msgid "Update" msgstr "" -#: c:\Apache2\htdocs\account228/admin/create_coy.php:21 +#: ../admin/create_coy.php:21 msgid "Create/Update Company" msgstr "" -#: c:\Apache2\htdocs\account228/admin/create_coy.php:47 -msgid "When creating a new company, you must provide a Database script file." -msgstr "" - -#: c:\Apache2\htdocs\account228/admin/create_coy.php:57 +#: ../admin/create_coy.php:53 msgid "This database settings are already used by another company." msgstr "" -#: c:\Apache2\htdocs\account228/admin/create_coy.php:62 -msgid "You cannot have table set without prefix together with prefixed sets in the same database." +#: ../admin/create_coy.php:58 +msgid "" +"You cannot have table set without prefix together with prefixed sets in the " +"same database." msgstr "" -#: c:\Apache2\htdocs\account228/admin/create_coy.php:121 +#: ../admin/create_coy.php:116 msgid "Error creating Database: " msgstr "" -#: c:\Apache2\htdocs\account228/admin/create_coy.php:121 +#: ../admin/create_coy.php:116 msgid ", Please create it manually" msgstr "" -#: c:\Apache2\htdocs\account228/admin/create_coy.php:129 +#: ../admin/create_coy.php:120 msgid "Cannot create new company due to bugs in sql file." msgstr "" -#: c:\Apache2\htdocs\account228/admin/create_coy.php:137 -msgid "Error uploading Database Script, please upload it manually" -msgstr "" - -#: c:\Apache2\htdocs\account228/admin/create_coy.php:151 -msgid "Error connecting to Database: " -msgstr "" - -#: c:\Apache2\htdocs\account228/admin/create_coy.php:151 -msgid ", Please correct it" -msgstr "" - -#: c:\Apache2\htdocs\account228/admin/create_coy.php:160 -#: c:\Apache2\htdocs\account228/admin/create_coy.php:226 +#: ../admin/create_coy.php:133 +#: ../admin/create_coy.php:200 msgid "Cannot open the configuration file - " msgstr "" -#: c:\Apache2\htdocs\account228/admin/create_coy.php:162 -#: c:\Apache2\htdocs\account228/admin/create_coy.php:228 +#: ../admin/create_coy.php:135 +#: ../admin/create_coy.php:202 msgid "Cannot write to the configuration file - " msgstr "" -#: c:\Apache2\htdocs\account228/admin/create_coy.php:164 -#: c:\Apache2\htdocs\account228/admin/create_coy.php:199 -#: c:\Apache2\htdocs\account228/admin/create_coy.php:230 +#: ../admin/create_coy.php:137 +#: ../admin/create_coy.php:173 +#: ../admin/create_coy.php:204 msgid "The configuration file " msgstr "" -#: c:\Apache2\htdocs\account228/admin/create_coy.php:164 -#: c:\Apache2\htdocs\account228/admin/create_coy.php:199 -#: c:\Apache2\htdocs\account228/admin/create_coy.php:230 -msgid " is not writable. Change its permissions so it is, then re-run the operation." +#: ../admin/create_coy.php:137 +#: ../admin/create_coy.php:173 +#: ../admin/create_coy.php:204 +#: ../admin/db/maintenance_db.inc:248 +msgid "" +" is not writable. Change its permissions so it is, then re-run the operation." msgstr "" -#: c:\Apache2\htdocs\account228/admin/create_coy.php:176 +#: ../admin/create_coy.php:149 msgid "New company has been created." msgstr "" -#: c:\Apache2\htdocs\account228/admin/create_coy.php:176 +#: ../admin/create_coy.php:149 msgid "Company has been updated." msgstr "" -#: c:\Apache2\htdocs\account228/admin/create_coy.php:192 -msgid "Broken company subdirectories system. You have to remove this company manually." +#: ../admin/create_coy.php:166 +msgid "" +"Broken company subdirectories system. You have to remove this company " +"manually." msgstr "" -#: c:\Apache2\htdocs\account228/admin/create_coy.php:208 +#: ../admin/create_coy.php:182 msgid "Cannot rename subdirectory to temporary name." msgstr "" -#: c:\Apache2\htdocs\account228/admin/create_coy.php:214 +#: ../admin/create_coy.php:188 msgid "Cannot rename company subdirectory" msgstr "" -#: c:\Apache2\htdocs\account228/admin/create_coy.php:220 +#: ../admin/create_coy.php:194 msgid "Error removing Database: " msgstr "" -#: c:\Apache2\htdocs\account228/admin/create_coy.php:220 +#: ../admin/create_coy.php:194 msgid ", please remove it manually" msgstr "" -#: c:\Apache2\htdocs\account228/admin/create_coy.php:239 +#: ../admin/create_coy.php:213 msgid "Cannot remove temporary renamed company data directory " msgstr "" -#: c:\Apache2\htdocs\account228/admin/create_coy.php:242 -msgid "Selected company as been deleted" +#: ../admin/create_coy.php:216 +msgid "Selected company has been deleted" msgstr "" -#: c:\Apache2\htdocs\account228/admin/create_coy.php:256 +#: ../admin/create_coy.php:230 msgid "Are you sure you want to delete company no. " msgstr "" -#: c:\Apache2\htdocs\account228/admin/create_coy.php:263 +#: ../admin/create_coy.php:237 msgid "Database Host" msgstr "" -#: c:\Apache2\htdocs\account228/admin/create_coy.php:263 -#: c:\Apache2\htdocs\account228/admin/create_coy.php:354 +#: ../admin/create_coy.php:237 +#: ../admin/create_coy.php:315 msgid "Database User" msgstr "" -#: c:\Apache2\htdocs\account228/admin/create_coy.php:264 -#: c:\Apache2\htdocs\account228/admin/create_coy.php:357 +#: ../admin/create_coy.php:238 +#: ../admin/create_coy.php:318 msgid "Database Name" msgstr "" -#: c:\Apache2\htdocs\account228/admin/create_coy.php:264 -#: c:\Apache2\htdocs\account228/admin/create_coy.php:359 -#: c:\Apache2\htdocs\account228/admin/create_coy.php:361 +#: ../admin/create_coy.php:238 +#: ../admin/create_coy.php:320 +#: ../admin/create_coy.php:322 msgid "Table Pref" msgstr "" -#: c:\Apache2\htdocs\account228/admin/create_coy.php:264 -#: c:\Apache2\htdocs\account228/admin/create_coy.php:362 +#: ../admin/create_coy.php:238 +#: ../admin/create_coy.php:323 +#: ../admin/inst_lang.php:36 +#: ../admin/print_profiles.php:162 msgid "Default" msgstr "" -#: c:\Apache2\htdocs\account228/admin/create_coy.php:273 -#: c:\Apache2\htdocs\account228/admin/fiscalyears.php:452 +#: ../admin/create_coy.php:247 +#: ../admin/fiscalyears.php:159 +#: ../admin/inst_lang.php:85 +#: ../admin/inst_lang.php:97 +#: ../dimensions/inquiry/search_dimensions.php:107 +#: ../gl/manage/bank_accounts.php:121 +#: ../gl/manage/currencies.php:164 +#: ../gl/manage/gl_account_classes.php:127 +#: ../gl/manage/gl_quick_entries.php:230 +#: ../includes/system_tests.inc:38 +#: ../includes/system_tests.inc:113 +#: ../includes/system_tests.inc:126 +#: ../includes/ui/ui_lists.inc:1639 +#: ../purchasing/manage/suppliers.php:123 +#: ../reporting/rep101.php:125 +#: ../reporting/rep102.php:105 +#: ../reporting/rep104.php:105 +#: ../reporting/rep106.php:75 +#: ../reporting/rep201.php:113 +#: ../reporting/rep202.php:107 +#: ../reporting/rep203.php:86 +#: ../reporting/rep303.php:96 +#: ../reporting/rep303.php:104 +#: ../reporting/rep501.php:107 +#: ../sales/manage/sales_points.php:94 +#: ../sales/manage/sales_points.php:95 +#: ../sales/manage/sales_types.php:119 +#: ../taxes/item_tax_types.php:128 +#: ../taxes/tax_groups.php:159 msgid "Yes" msgstr "" -#: c:\Apache2\htdocs\account228/admin/create_coy.php:301 +#: ../admin/create_coy.php:275 msgid "The marked company is the current company which cannot be deleted." msgstr "" -#: c:\Apache2\htdocs\account228/admin/create_coy.php:353 +#: ../admin/create_coy.php:314 +#: ../admin/printers.php:84 msgid "Host" msgstr "" -#: c:\Apache2\htdocs\account228/admin/create_coy.php:356 +#: ../admin/create_coy.php:317 msgid "Database Password" msgstr "" -#: c:\Apache2\htdocs\account228/admin/create_coy.php:359 +#: ../admin/create_coy.php:320 +#: ../admin/inst_chart.php:68 +#: ../admin/inst_chart.php:70 +#: ../admin/inst_lang.php:87 +#: ../admin/inst_lang.php:90 +#: ../admin/inst_module.php:127 +#: ../admin/inst_theme.php:91 +#: ../admin/inst_theme.php:93 +#: ../admin/inst_upgrade.php:149 +#: ../gl/manage/gl_account_types.php:184 +#: ../includes/ui/allocation_cart.inc:286 +#: ../taxes/tax_groups.php:220 msgid "None" msgstr "" -#: c:\Apache2\htdocs\account228/admin/create_coy.php:364 +#: ../admin/create_coy.php:325 msgid "Database Script" msgstr "" -#: c:\Apache2\htdocs\account228/admin/create_coy.php:366 +#: ../admin/create_coy.php:327 msgid "New script Admin Password" msgstr "" -#: c:\Apache2\htdocs\account228/admin/create_coy.php:369 -msgid "Choose from Database scripts in SQL folder. No Database is created without a script." -msgstr "" - -#: c:\Apache2\htdocs\account228/admin/create_coy.php:370 +#: ../admin/create_coy.php:330 +#: ../gl/gl_budget.php:136 msgid "Save" msgstr "" -#: c:\Apache2\htdocs\account228/admin/create_coy.php:393 +#: ../admin/create_coy.php:354 msgid "Create a new company" msgstr "" -#: c:\Apache2\htdocs\account228/admin/display_prefs.php:16 +#: ../admin/crm_categories.php:17 +msgid "Contact Categories" +msgstr "" + +#: ../admin/crm_categories.php:31 +msgid "Category description cannot be empty." +msgstr "" + +#: ../admin/crm_categories.php:41 +msgid "Selected contact category has been updated" +msgstr "" + +#: ../admin/crm_categories.php:47 +msgid "New contact category has been added" +msgstr "" + +#: ../admin/crm_categories.php:62 +msgid "Cannot delete this category because there are contacts related to it." +msgstr "" + +#: ../admin/crm_categories.php:68 +msgid "Category has been deleted" +msgstr "" + +#: ../admin/crm_categories.php:88 +msgid "Type id" +msgstr "" + +#: ../admin/crm_categories.php:88 +msgid "Action id" +msgstr "" + +#: ../admin/crm_categories.php:88 +#: ../sales/manage/customer_branches.php:293 +msgid "Short Name" +msgstr "" + +#: ../admin/crm_categories.php:135 +#: ../admin/crm_categories.php:139 +msgid "Contact Category Type:" +msgstr "" + +#: ../admin/crm_categories.php:136 +#: ../admin/crm_categories.php:140 +msgid "Contact Category Subtype:" +msgstr "" + +#: ../admin/crm_categories.php:143 +msgid "Category Short Name:" +msgstr "" + +#: ../admin/crm_categories.php:144 +msgid "Category Description:" +msgstr "" + +#: ../admin/display_prefs.php:16 msgid "Display Setup" msgstr "" -#: c:\Apache2\htdocs\account228/admin/display_prefs.php:30 +#: ../admin/display_prefs.php:30 msgid "Query size must be integer and greater than zero." msgstr "" -#: c:\Apache2\htdocs\account228/admin/display_prefs.php:58 -msgid "Display settings have been updated. Keep in mind that changed settings are restored on every login in demo mode." +#: ../admin/display_prefs.php:59 +msgid "" +"Display settings have been updated. Keep in mind that changed settings are " +"restored on every login in demo mode." msgstr "" -#: c:\Apache2\htdocs\account228/admin/display_prefs.php:60 +#: ../admin/display_prefs.php:61 msgid "Display settings have been updated." msgstr "" -#: c:\Apache2\htdocs\account228/admin/display_prefs.php:69 +#: ../admin/display_prefs.php:70 msgid "Decimal Places" msgstr "" -#: c:\Apache2\htdocs\account228/admin/display_prefs.php:71 +#: ../admin/display_prefs.php:72 msgid "Prices/Amounts:" msgstr "" -#: c:\Apache2\htdocs\account228/admin/display_prefs.php:72 +#: ../admin/display_prefs.php:73 msgid "Quantities:" msgstr "" -#: c:\Apache2\htdocs\account228/admin/display_prefs.php:73 +#: ../admin/display_prefs.php:74 msgid "Exchange Rates:" msgstr "" -#: c:\Apache2\htdocs\account228/admin/display_prefs.php:74 +#: ../admin/display_prefs.php:75 msgid "Percentages:" msgstr "" -#: c:\Apache2\htdocs\account228/admin/display_prefs.php:76 +#: ../admin/display_prefs.php:77 msgid "Dateformat and Separators" msgstr "" -#: c:\Apache2\htdocs\account228/admin/display_prefs.php:78 +#: ../admin/display_prefs.php:79 msgid "Dateformat:" msgstr "" -#: c:\Apache2\htdocs\account228/admin/display_prefs.php:80 +#: ../admin/display_prefs.php:81 msgid "Date Separator:" msgstr "" -#: c:\Apache2\htdocs\account228/admin/display_prefs.php:85 +#: ../admin/display_prefs.php:86 msgid "Thousand Separator:" msgstr "" -#: c:\Apache2\htdocs\account228/admin/display_prefs.php:90 +#: ../admin/display_prefs.php:91 msgid "Decimal Separator:" msgstr "" -#: c:\Apache2\htdocs\account228/admin/display_prefs.php:97 +#: ../admin/display_prefs.php:98 +#: ../admin/inst_lang.php:35 msgid "Language" msgstr "" -#: c:\Apache2\htdocs\account228/admin/display_prefs.php:99 +#: ../admin/display_prefs.php:100 +#: ../admin/users.php:206 msgid "Language:" msgstr "" -#: c:\Apache2\htdocs\account228/admin/display_prefs.php:102 +#: ../admin/display_prefs.php:103 +#: ../applications/setup.php:42 +#: ../includes/sysnames.inc:94 msgid "Miscellaneous" msgstr "" -#: c:\Apache2\htdocs\account228/admin/display_prefs.php:104 +#: ../admin/display_prefs.php:105 msgid "Show hints for new users:" msgstr "" -#: c:\Apache2\htdocs\account228/admin/display_prefs.php:106 +#: ../admin/display_prefs.php:107 msgid "Show GL Information:" msgstr "" -#: c:\Apache2\htdocs\account228/admin/display_prefs.php:108 +#: ../admin/display_prefs.php:109 msgid "Show Item Codes:" msgstr "" -#: c:\Apache2\htdocs\account228/admin/display_prefs.php:115 +#: ../admin/display_prefs.php:116 msgid "Page Size:" msgstr "" -#: c:\Apache2\htdocs\account228/admin/display_prefs.php:117 +#: ../admin/display_prefs.php:118 msgid "Start-up Tab" msgstr "" -#: c:\Apache2\htdocs\account228/admin/display_prefs.php:125 +#: ../admin/display_prefs.php:126 +#: ../admin/users.php:210 msgid "Printing profile" msgstr "" -#: c:\Apache2\htdocs\account228/admin/display_prefs.php:126 +#: ../admin/display_prefs.php:127 +#: ../admin/users.php:211 msgid "Browser printing support" msgstr "" -#: c:\Apache2\htdocs\account228/admin/display_prefs.php:128 +#: ../admin/display_prefs.php:129 msgid "Use popup window to display reports:" msgstr "" -#: c:\Apache2\htdocs\account228/admin/display_prefs.php:129 +#: ../admin/display_prefs.php:130 +#: ../admin/users.php:214 msgid "Set this option to on if your browser directly supports pdf files" msgstr "" -#: c:\Apache2\htdocs\account228/admin/display_prefs.php:131 +#: ../admin/display_prefs.php:132 msgid "Use icons instead of text links:" msgstr "" -#: c:\Apache2\htdocs\account228/admin/display_prefs.php:132 +#: ../admin/display_prefs.php:133 msgid "Set this option to on for using icons instead of text links" msgstr "" -#: c:\Apache2\htdocs\account228/admin/display_prefs.php:134 +#: ../admin/display_prefs.php:135 msgid "Query page size:" msgstr "" -#: c:\Apache2\htdocs\account228/admin/display_prefs.php:136 +#: ../admin/display_prefs.php:137 msgid "Remember last document date:" msgstr "" -#: c:\Apache2\htdocs\account228/admin/display_prefs.php:137 -msgid "If set document date is remembered on subsequent documents, otherwise default is current date" +#: ../admin/display_prefs.php:138 +msgid "" +"If set document date is remembered on subsequent documents, otherwise " +"default is current date" msgstr "" -#: c:\Apache2\htdocs\account228/admin/fiscalyears.php:24 +#: ../admin/fiscalyears.php:25 msgid "Fiscal Years" msgstr "" -#: c:\Apache2\htdocs\account228/admin/fiscalyears.php:67 +#: ../admin/fiscalyears.php:34 msgid "Invalid BEGIN date in fiscal year." msgstr "" -#: c:\Apache2\htdocs\account228/admin/fiscalyears.php:73 +#: ../admin/fiscalyears.php:40 msgid "Invalid END date in fiscal year." msgstr "" -#: c:\Apache2\htdocs\account228/admin/fiscalyears.php:79 -msgid "BEGIN date bigger than END date." -msgstr "" - -#: c:\Apache2\htdocs\account228/admin/fiscalyears.php:91 -msgid "The Retained Earnings Account or the Profit and Loss Year Account has not been set in System and General GL Setup" +#: ../admin/fiscalyears.php:46 +msgid "Invalid BEGIN or END date in fiscal year." msgstr "" -#: c:\Apache2\htdocs\account228/admin/fiscalyears.php:115 -#: c:\Apache2\htdocs\account228/admin/fiscalyears.php:117 -msgid "Closing Year" +#: ../admin/fiscalyears.php:52 +msgid "BEGIN date bigger than END date." msgstr "" -#: c:\Apache2\htdocs\account228/admin/fiscalyears.php:147 +#: ../admin/fiscalyears.php:70 msgid "Cannot CLOSE this year because there are open fiscal years before" msgstr "" -#: c:\Apache2\htdocs\account228/admin/fiscalyears.php:158 +#: ../admin/fiscalyears.php:81 msgid "Selected fiscal year has been updated" msgstr "" -#: c:\Apache2\htdocs\account228/admin/fiscalyears.php:166 +#: ../admin/fiscalyears.php:89 msgid "New fiscal year has been added" msgstr "" -#: c:\Apache2\htdocs\account228/admin/fiscalyears.php:179 +#: ../admin/fiscalyears.php:102 msgid "Cannot delete this fiscal year because thera are fiscal years before." msgstr "" -#: c:\Apache2\htdocs\account228/admin/fiscalyears.php:184 +#: ../admin/fiscalyears.php:107 msgid "Cannot delete this fiscal year because the fiscal year is not closed." msgstr "" -#: c:\Apache2\htdocs\account228/admin/fiscalyears.php:217 -msgid "Open Balance" -msgstr "" - -#: c:\Apache2\htdocs\account228/admin/fiscalyears.php:411 +#: ../admin/fiscalyears.php:120 msgid "Selected fiscal year has been deleted" msgstr "" -#: c:\Apache2\htdocs\account228/admin/fiscalyears.php:426 +#: ../admin/fiscalyears.php:133 msgid "" "Warning: Deleting a fiscal year all transactions \n" -"\t\tare removed and converted into relevant balances. This process is irreversible!" +"\t\tare removed and converted into relevant balances. This process is " +"irreversible!" msgstr "" -#: c:\Apache2\htdocs\account228/admin/fiscalyears.php:431 +#: ../admin/fiscalyears.php:138 msgid "Fiscal Year Begin" msgstr "" -#: c:\Apache2\htdocs\account228/admin/fiscalyears.php:431 +#: ../admin/fiscalyears.php:138 msgid "Fiscal Year End" msgstr "" -#: c:\Apache2\htdocs\account228/admin/fiscalyears.php:431 +#: ../admin/fiscalyears.php:138 +#: ../dimensions/inquiry/search_dimensions.php:133 +#: ../dimensions/inquiry/search_dimensions.php:139 +#: ../includes/ui/ui_lists.inc:648 +#: ../manufacturing/search_work_orders.php:108 +#: ../reporting/rep501.php:85 +#: ../reporting/rep710.php:109 +#: ../reporting/includes/excel_report.inc:234 +#: ../reporting/includes/pdf_report.inc:266 msgid "Closed" msgstr "" -#: c:\Apache2\htdocs\account228/admin/fiscalyears.php:461 +#: ../admin/fiscalyears.php:168 #, php-format -msgid "Are you sure you want to delete fiscal year %s - %s? All transactions are deleted and converted into relevant balances. Do you want to continue ?" +msgid "" +"Are you sure you want to delete fiscal year %s - %s? All transactions are " +"deleted and converted into relevant balances. Do you want to continue ?" msgstr "" -#: c:\Apache2\htdocs\account228/admin/fiscalyears.php:469 -msgid "The marked fiscal year is the current fiscal year which cannot be deleted." +#: ../admin/fiscalyears.php:176 +msgid "" +"The marked fiscal year is the current fiscal year which cannot be deleted." msgstr "" -#: c:\Apache2\htdocs\account228/admin/fiscalyears.php:493 -#: c:\Apache2\htdocs\account228/admin/fiscalyears.php:498 +#: ../admin/fiscalyears.php:200 +#: ../admin/fiscalyears.php:211 msgid "Fiscal Year Begin:" msgstr "" -#: c:\Apache2\htdocs\account228/admin/fiscalyears.php:494 -#: c:\Apache2\htdocs\account228/admin/fiscalyears.php:499 +#: ../admin/fiscalyears.php:201 +#: ../admin/fiscalyears.php:212 msgid "Fiscal Year End:" msgstr "" -#: c:\Apache2\htdocs\account228/admin/fiscalyears.php:503 +#: ../admin/fiscalyears.php:216 msgid "Is Closed:" msgstr "" -#: c:\Apache2\htdocs\account228/admin/forms_setup.php:16 +#: ../admin/forms_setup.php:16 msgid "Forms Setup" msgstr "" -#: c:\Apache2\htdocs\account228/admin/forms_setup.php:36 +#: ../admin/forms_setup.php:36 msgid "Forms settings have been updated." msgstr "" -#: c:\Apache2\htdocs\account228/admin/forms_setup.php:46 +#: ../admin/forms_setup.php:46 msgid "Form" msgstr "" -#: c:\Apache2\htdocs\account228/admin/forms_setup.php:46 +#: ../admin/forms_setup.php:46 msgid "Next Reference" msgstr "" -#: c:\Apache2\htdocs\account228/admin/gl_setup.php:16 +#: ../admin/gl_setup.php:16 msgid "System and General GL Setup" msgstr "" -#: c:\Apache2\htdocs\account228/admin/gl_setup.php:30 +#: ../admin/gl_setup.php:30 msgid "The delivery over-receive allowance must be between 0 and 100." msgstr "" -#: c:\Apache2\htdocs\account228/admin/gl_setup.php:37 +#: ../admin/gl_setup.php:37 msgid "The invoice over-charge allowance must be between 0 and 100." msgstr "" -#: c:\Apache2\htdocs\account228/admin/gl_setup.php:44 +#: ../admin/gl_setup.php:44 msgid "The past due days interval allowance must be between 0 and 100." msgstr "" -#: c:\Apache2\htdocs\account228/admin/gl_setup.php:78 +#: ../admin/gl_setup.php:66 msgid "The general GL setup has been updated." msgstr "" -#: c:\Apache2\htdocs\account228/admin/gl_setup.php:129 +#: ../admin/gl_setup.php:116 msgid "General GL" msgstr "" -#: c:\Apache2\htdocs\account228/admin/gl_setup.php:136 +#: ../admin/gl_setup.php:118 msgid "Past Due Days Interval:" msgstr "" -#: c:\Apache2\htdocs\account228/admin/gl_setup.php:136 -#: c:\Apache2\htdocs\account228/admin/gl_setup.php:171 -#: c:\Apache2\htdocs\account228/admin/gl_setup.php:179 -#: c:\Apache2\htdocs\account228/admin/gl_setup.php:214 +#: ../admin/gl_setup.php:118 +#: ../admin/gl_setup.php:153 +#: ../admin/gl_setup.php:161 +#: ../admin/gl_setup.php:196 +#: ../admin/payment_terms.php:140 msgid "days" msgstr "" -#: c:\Apache2\htdocs\account228/admin/gl_setup.php:138 +#: ../admin/gl_setup.php:120 msgid "Retained Earnings:" msgstr "" -#: c:\Apache2\htdocs\account228/admin/gl_setup.php:140 +#: ../admin/gl_setup.php:122 msgid "Profit/Loss Year:" msgstr "" -#: c:\Apache2\htdocs\account228/admin/gl_setup.php:142 +#: ../admin/gl_setup.php:124 msgid "Exchange Variances Account:" msgstr "" -#: c:\Apache2\htdocs\account228/admin/gl_setup.php:144 +#: ../admin/gl_setup.php:126 msgid "Bank Charges Account:" msgstr "" -#: c:\Apache2\htdocs\account228/admin/gl_setup.php:148 +#: ../admin/gl_setup.php:130 msgid "Customers and Sales" msgstr "" -#: c:\Apache2\htdocs\account228/admin/gl_setup.php:150 +#: ../admin/gl_setup.php:132 msgid "Default Credit Limit:" msgstr "" -#: c:\Apache2\htdocs\account228/admin/gl_setup.php:152 +#: ../admin/gl_setup.php:134 msgid "Accumulate batch shipping:" msgstr "" -#: c:\Apache2\htdocs\account228/admin/gl_setup.php:154 +#: ../admin/gl_setup.php:136 msgid "Legal Text on Invoice:" msgstr "" -#: c:\Apache2\htdocs\account228/admin/gl_setup.php:156 +#: ../admin/gl_setup.php:138 msgid "Shipping Charged Account:" msgstr "" -#: c:\Apache2\htdocs\account228/admin/gl_setup.php:160 +#: ../admin/gl_setup.php:142 msgid "Customers and Sales Defaults" msgstr "" -#: c:\Apache2\htdocs\account228/admin/gl_setup.php:162 +#: ../admin/gl_setup.php:144 msgid "Receivable Account:" msgstr "" -#: c:\Apache2\htdocs\account228/admin/gl_setup.php:164 -#: c:\Apache2\htdocs\account228/admin/gl_setup.php:200 +#: ../admin/gl_setup.php:146 +#: ../admin/gl_setup.php:182 +#: ../inventory/manage/item_categories.php:192 +#: ../inventory/manage/items.php:364 +#: ../sales/manage/customer_branches.php:250 msgid "Sales Account:" msgstr "" -#: c:\Apache2\htdocs\account228/admin/gl_setup.php:167 +#: ../admin/gl_setup.php:149 +#: ../sales/manage/customer_branches.php:251 msgid "Sales Discount Account:" msgstr "" -#: c:\Apache2\htdocs\account228/admin/gl_setup.php:169 +#: ../admin/gl_setup.php:151 +#: ../sales/manage/customer_branches.php:253 msgid "Prompt Payment Discount Account:" msgstr "" -#: c:\Apache2\htdocs\account228/admin/gl_setup.php:171 +#: ../admin/gl_setup.php:153 msgid "Delivery Required By:" msgstr "" -#: c:\Apache2\htdocs\account228/admin/gl_setup.php:177 +#: ../admin/gl_setup.php:159 msgid "Dimension Defaults" msgstr "" -#: c:\Apache2\htdocs\account228/admin/gl_setup.php:179 +#: ../admin/gl_setup.php:161 msgid "Dimension Required By After:" msgstr "" -#: c:\Apache2\htdocs\account228/admin/gl_setup.php:182 +#: ../admin/gl_setup.php:164 msgid "Suppliers and Purchasing" msgstr "" -#: c:\Apache2\htdocs\account228/admin/gl_setup.php:184 +#: ../admin/gl_setup.php:166 msgid "Delivery Over-Receive Allowance:" msgstr "" -#: c:\Apache2\htdocs\account228/admin/gl_setup.php:186 +#: ../admin/gl_setup.php:168 msgid "Invoice Over-Charge Allowance:" msgstr "" -#: c:\Apache2\htdocs\account228/admin/gl_setup.php:188 +#: ../admin/gl_setup.php:170 msgid "Suppliers and Purchasing Defaults" msgstr "" -#: c:\Apache2\htdocs\account228/admin/gl_setup.php:190 +#: ../admin/gl_setup.php:172 msgid "Payable Account:" msgstr "" -#: c:\Apache2\htdocs\account228/admin/gl_setup.php:192 +#: ../admin/gl_setup.php:174 +#: ../purchasing/manage/suppliers.php:129 msgid "Purchase Discount Account:" msgstr "" -#: c:\Apache2\htdocs\account228/admin/gl_setup.php:194 +#: ../admin/gl_setup.php:176 +#: ../reporting/reports_main.php:166 msgid "Inventory" msgstr "" -#: c:\Apache2\htdocs\account228/admin/gl_setup.php:196 +#: ../admin/gl_setup.php:178 msgid "Allow Negative Inventory:" msgstr "" -#: c:\Apache2\htdocs\account228/admin/gl_setup.php:197 +#: ../admin/gl_setup.php:179 msgid "Warning: This may cause a delay in GL postings" msgstr "" -#: c:\Apache2\htdocs\account228/admin/gl_setup.php:199 +#: ../admin/gl_setup.php:181 msgid "Items Defaults" msgstr "" -#: c:\Apache2\htdocs\account228/admin/gl_setup.php:202 +#: ../admin/gl_setup.php:184 +#: ../inventory/manage/item_categories.php:202 +#: ../inventory/manage/items.php:368 msgid "Inventory Account:" msgstr "" -#: c:\Apache2\htdocs\account228/admin/gl_setup.php:204 +#: ../admin/gl_setup.php:186 +#: ../inventory/manage/item_categories.php:196 +#: ../inventory/manage/item_categories.php:204 +#: ../inventory/manage/items.php:369 +#: ../inventory/manage/items.php:374 msgid "C.O.G.S. Account:" msgstr "" -#: c:\Apache2\htdocs\account228/admin/gl_setup.php:206 +#: ../admin/gl_setup.php:188 +#: ../inventory/manage/item_categories.php:205 +#: ../inventory/manage/items.php:370 msgid "Inventory Adjustments Account:" msgstr "" -#: c:\Apache2\htdocs\account228/admin/gl_setup.php:208 +#: ../admin/gl_setup.php:190 +#: ../inventory/manage/item_categories.php:209 +#: ../inventory/manage/items.php:381 msgid "Item Assembly Costs Account:" msgstr "" -#: c:\Apache2\htdocs\account228/admin/gl_setup.php:212 +#: ../admin/gl_setup.php:194 msgid "Manufacturing Defaults" msgstr "" -#: c:\Apache2\htdocs\account228/admin/gl_setup.php:214 +#: ../admin/gl_setup.php:196 msgid "Work Order Required By After:" msgstr "" -#: c:\Apache2\htdocs\account228/admin/inst_lang.php:16 -msgid "Install/Update Languages" +#: ../admin/inst_chart.php:20 +msgid "Install Charts of Accounts" msgstr "" -#: c:\Apache2\htdocs\account228/admin/inst_lang.php:41 -msgid "Language name, code nor encoding cannot be empty" +#: ../admin/inst_chart.php:35 +msgid "Selected chart has been successfully deleted" msgstr "" -#: c:\Apache2\htdocs\account228/admin/inst_lang.php:133 -msgid "Are you sure you want to delete language no. " +#: ../admin/inst_chart.php:50 +msgid "Chart" msgstr "" -#: c:\Apache2\htdocs\account228/admin/inst_lang.php:139 -#: c:\Apache2\htdocs\account228/admin/inst_module.php:194 -#: c:\Apache2\htdocs\account228/admin/inst_module.php:236 -#: c:\Apache2\htdocs\account228/admin/inst_module.php:296 -#: c:\Apache2\htdocs\account228/admin/printers.php:88 -#: c:\Apache2\htdocs\account228/admin/shipping_companies.php:117 -msgid "Name" +#: ../admin/inst_chart.php:50 +#: ../admin/inst_lang.php:36 +#: ../admin/inst_module.php:105 +#: ../admin/inst_theme.php:74 +#: ../admin/inst_upgrade.php:155 +msgid "Installed" +msgstr "" + +#: ../admin/inst_chart.php:50 +#: ../admin/inst_lang.php:36 +#: ../admin/inst_module.php:105 +#: ../admin/inst_theme.php:74 +#: ../inventory/inquiry/stock_status.php:70 +#: ../reporting/rep303.php:102 +msgid "Available" msgstr "" -#: c:\Apache2\htdocs\account228/admin/inst_lang.php:139 -#: c:\Apache2\htdocs\account228/admin/inst_lang.php:216 +#: ../admin/inst_chart.php:50 +#: ../admin/inst_lang.php:35 +#: ../admin/inst_lang.php:218 msgid "Encoding" msgstr "" -#: c:\Apache2\htdocs\account228/admin/inst_lang.php:139 -#: c:\Apache2\htdocs\account228/admin/inst_lang.php:218 -msgid "Right To Left" +#: ../admin/inst_chart.php:69 +#: ../admin/inst_chart.php:71 +#: ../admin/inst_lang.php:88 +#: ../admin/inst_module.php:128 +#: ../admin/inst_module.php:129 +#: ../admin/inst_theme.php:92 +msgid "Unknown" msgstr "" -#: c:\Apache2\htdocs\account228/admin/inst_lang.php:175 -msgid "The marked language is the current language which cannot be deleted." +#: ../admin/inst_chart.php:74 +#: ../admin/inst_lang.php:103 +#: ../admin/inst_module.php:133 +#: ../admin/inst_module.php:138 +#: ../admin/inst_theme.php:96 +#: ../admin/inst_upgrade.php:137 +msgid "Install" msgstr "" -#: c:\Apache2\htdocs\account228/admin/inst_lang.php:214 -msgid "Language Code" +#: ../admin/inst_chart.php:75 +#: ../admin/inst_module.php:139 +#: ../admin/inst_theme.php:97 +msgid "Upload and install latest extension package" msgstr "" -#: c:\Apache2\htdocs\account228/admin/inst_lang.php:215 -msgid "Language Name" +#: ../admin/inst_chart.php:82 +#: ../admin/inst_module.php:146 +#: ../admin/inst_theme.php:104 +#, php-format +msgid "" +"You are about to remove package \\'%s\\'.\n" +"Do you want to continue ?" msgstr "" -#: c:\Apache2\htdocs\account228/admin/inst_lang.php:219 -msgid "Default Language" +#: ../admin/inst_lang.php:23 +msgid "Install/Update Languages" msgstr "" -#: c:\Apache2\htdocs\account228/admin/inst_lang.php:221 -#: c:\Apache2\htdocs\account228/admin/inst_lang.php:222 -msgid "Language File" +#: ../admin/inst_lang.php:35 +#: ../admin/printers.php:84 +#: ../admin/shipping_companies.php:91 +#: ../dimensions/dimension_entry.php:271 +#: ../dimensions/inquiry/search_dimensions.php:129 +#: ../dimensions/view/view_dimension.php:54 +#: ../inventory/manage/item_categories.php:98 +#: ../manufacturing/manage/work_centres.php:101 +#: ../purchasing/includes/ui/invoice_ui.inc:245 +#: ../purchasing/includes/ui/invoice_ui.inc:247 +#: ../purchasing/includes/ui/invoice_ui.inc:249 +#: ../reporting/rep501.php:85 +#: ../reporting/rep709.php:107 +#: ../sales/manage/customer_branches.php:294 +#: ../sales/manage/sales_people.php:99 +#: ../taxes/item_tax_types.php:112 +msgid "Name" msgstr "" -#: c:\Apache2\htdocs\account228/admin/inst_lang.php:225 -msgid "Select your language files from your local harddisk." +#: ../admin/inst_lang.php:35 +#: ../admin/inst_lang.php:220 +msgid "Right To Left" msgstr "" -#: c:\Apache2\htdocs\account228/admin/inst_lang.php:255 -msgid "Create a new language" +#: ../admin/inst_lang.php:47 +msgid "Supported" msgstr "" -#: c:\Apache2\htdocs\account228/admin/inst_module.php:16 -msgid "Install/Activate extensions" +#: ../admin/inst_lang.php:49 +msgid "Display also languages not supported by server locales" msgstr "" -#: c:\Apache2\htdocs\account228/admin/inst_module.php:30 -msgid "Cannot update system extensions list." +#: ../admin/inst_lang.php:100 +msgid "Edit non standard language configuration" msgstr "" -#: c:\Apache2\htdocs\account228/admin/inst_module.php:48 +#: ../admin/inst_lang.php:104 +msgid "Upload and install latest language package" +msgstr "" + +#: ../admin/inst_lang.php:111 #, php-format -msgid "Cannot update extensions list for company '%s'." +msgid "" +"You are about to remove language \\'%s\\'.\n" +"Do you want to continue ?" msgstr "" -#: c:\Apache2\htdocs\account228/admin/inst_module.php:59 -msgid "Extension name cannot be empty." +#: ../admin/inst_lang.php:118 +msgid "The marked language is the current language which cannot be deleted." msgstr "" -#: c:\Apache2\htdocs\account228/admin/inst_module.php:64 -msgid "Extension name have to be unique." +#: ../admin/inst_lang.php:120 +msgid "Update default" msgstr "" -#: c:\Apache2\htdocs\account228/admin/inst_module.php:70 -msgid "Extension title cannot be empty." +#: ../admin/inst_lang.php:122 +msgid "Add new language manually" msgstr "" -#: c:\Apache2\htdocs\account228/admin/inst_module.php:74 -msgid "Extension folder name cannot be empty." +#: ../admin/inst_lang.php:135 +msgid "Language name, code nor encoding cannot be empty" msgstr "" -#: c:\Apache2\htdocs\account228/admin/inst_module.php:78 -msgid "You have to select plugin file to upload" +#: ../admin/inst_lang.php:140 +msgid "" +"Standard package for this language is already installed. If you want to " +"install this language manually, uninstall standard language package first." msgstr "" -#: c:\Apache2\htdocs\account228/admin/inst_module.php:96 -msgid "Module installation support is not implemented yet. You have to do it manually." +#: ../admin/inst_lang.php:216 +msgid "Language Code" msgstr "" -#: c:\Apache2\htdocs\account228/admin/inst_module.php:183 -msgid "Selected extension has been successfully deleted" +#: ../admin/inst_lang.php:217 +msgid "Language Name" msgstr "" -#: c:\Apache2\htdocs\account228/admin/inst_module.php:194 -#: c:\Apache2\htdocs\account228/admin/inst_module.php:236 -msgid "Tab" +#: ../admin/inst_lang.php:221 +msgid "Default Language" msgstr "" -#: c:\Apache2\htdocs\account228/admin/inst_module.php:194 -#: c:\Apache2\htdocs\account228/admin/inst_module.php:236 -msgid "Link text" +#: ../admin/inst_lang.php:223 +#: ../admin/inst_lang.php:224 +msgid "Language File" msgstr "" -#: c:\Apache2\htdocs\account228/admin/inst_module.php:194 -#: c:\Apache2\htdocs\account228/admin/inst_module.php:297 -msgid "Folder" +#: ../admin/inst_lang.php:227 +msgid "Select your language files from your local harddisk." msgstr "" -#: c:\Apache2\htdocs\account228/admin/inst_module.php:195 -msgid "Access extensions" +#: ../admin/inst_module.php:20 +msgid "Install/Activate extensions" msgstr "" -#: c:\Apache2\htdocs\account228/admin/inst_module.php:223 -msgid "" -"You are about to delete this extension\\n" -"Do you want to continue?" +#: ../admin/inst_module.php:78 +msgid "Selected extension has been successfully deleted" msgstr "" -#: c:\Apache2\htdocs\account228/admin/inst_module.php:236 -msgid "Active" +#: ../admin/inst_module.php:104 +#: ../admin/inst_module.php:170 +msgid "Extension" msgstr "" -#: c:\Apache2\htdocs\account228/admin/inst_module.php:299 -msgid "Menu Tab" +#: ../admin/inst_module.php:104 +#: ../admin/inst_module.php:170 +msgid "Modules provided" msgstr "" -#: c:\Apache2\htdocs\account228/admin/inst_module.php:300 -msgid "Menu Link Text" +#: ../admin/inst_module.php:104 +#: ../admin/inst_module.php:170 +msgid "Options provided" msgstr "" -#: c:\Apache2\htdocs\account228/admin/inst_module.php:302 -msgid "Default status" +#: ../admin/inst_module.php:133 +msgid "Install third-party extension." msgstr "" -#: c:\Apache2\htdocs\account228/admin/inst_module.php:304 -msgid "Module File" +#: ../admin/inst_module.php:157 +msgid "Add third-party extension" msgstr "" -#: c:\Apache2\htdocs\account228/admin/inst_module.php:305 -msgid "Access Levels Extensions" +#: ../admin/inst_module.php:170 +#: ../includes/ui/ui_lists.inc:648 +#: ../includes/ui/ui_lists.inc:2118 +#: ../reporting/includes/excel_report.inc:232 +#: ../reporting/includes/pdf_report.inc:264 +msgid "Active" msgstr "" -#: c:\Apache2\htdocs\account228/admin/inst_module.php:306 -msgid "SQL File" +#: ../admin/inst_module.php:233 +msgid "Status change for some extensions failed." msgstr "" -#: c:\Apache2\htdocs\account228/admin/inst_module.php:309 -msgid "Select your module PHP file from your local harddisk." +#: ../admin/inst_module.php:236 +msgid "Current active extensions set has been saved." msgstr "" -#: c:\Apache2\htdocs\account228/admin/inst_module.php:317 -msgid "Extension data has been updated." +#: ../admin/inst_module.php:258 +msgid "Extensions:" msgstr "" -#: c:\Apache2\htdocs\account228/admin/inst_module.php:319 -msgid "Extension has been installed." +#: ../admin/inst_theme.php:20 +msgid "Install Themes" msgstr "" -#: c:\Apache2\htdocs\account228/admin/inst_module.php:336 -msgid "Current active extensions set has been saved." +#: ../admin/inst_theme.php:59 +msgid "Selected theme has been successfully deleted" msgstr "" -#: c:\Apache2\htdocs\account228/admin/inst_module.php:350 -msgid "Extensions:" +#: ../admin/inst_theme.php:74 +msgid "Theme" msgstr "" -#: c:\Apache2\htdocs\account228/admin/inst_upgrade.php:16 +#: ../admin/inst_upgrade.php:16 msgid "Software Upgrade" msgstr "" -#: c:\Apache2\htdocs\account228/admin/inst_upgrade.php:111 -msgid "Upgrade cannot be done because database has been already partially upgraded. Please downgrade database to clean previous version or try forced upgrade." +#: ../admin/inst_upgrade.php:72 +#, php-format +msgid "Database upgrade for company '%s' (%s:%s*) started..." +msgstr "" + +#: ../admin/inst_upgrade.php:80 +msgid "Database upgrade finished." +msgstr "" + +#: ../admin/inst_upgrade.php:84 +msgid "" +"Upgrade cannot be done because database has been already partially upgraded. " +"Please downgrade database to clean previous version or try forced upgrade." msgstr "" -#: c:\Apache2\htdocs\account228/admin/inst_upgrade.php:139 +#: ../admin/inst_upgrade.php:102 msgid "Cannot connect to database for company" msgstr "" -#: c:\Apache2\htdocs\account228/admin/inst_upgrade.php:151 +#: ../admin/inst_upgrade.php:114 #, php-format msgid "Database upgrade to version %s failed for company '%s'." msgstr "" -#: c:\Apache2\htdocs\account228/admin/inst_upgrade.php:154 +#: ../admin/inst_upgrade.php:117 msgid "You should restore company database from latest backup file" msgstr "" -#: c:\Apache2\htdocs\account228/admin/inst_upgrade.php:165 +#: ../admin/inst_upgrade.php:129 msgid "All companies data has been successfully updated" msgstr "" -#: c:\Apache2\htdocs\account228/admin/inst_upgrade.php:172 +#: ../admin/inst_upgrade.php:137 msgid "Sql file" msgstr "" -#: c:\Apache2\htdocs\account228/admin/inst_upgrade.php:172 -msgid "Install" -msgstr "" - -#: c:\Apache2\htdocs\account228/admin/inst_upgrade.php:173 +#: ../admin/inst_upgrade.php:138 msgid "Force upgrade" msgstr "" -#: c:\Apache2\htdocs\account228/admin/inst_upgrade.php:190 -msgid "Installed" -msgstr "" - -#: c:\Apache2\htdocs\account228/admin/inst_upgrade.php:196 +#: ../admin/inst_upgrade.php:161 #, php-format msgid "Partially installed (%s)" msgstr "" -#: c:\Apache2\htdocs\account228/admin/inst_upgrade.php:205 +#: ../admin/inst_upgrade.php:170 msgid "" -"Database upgrades marked as partially installed cannot be installed automatically.\n" -"You have to clean database manually to enable them, or try to perform forced upgrade." +"Database upgrades marked as partially installed cannot be installed " +"automatically.\n" +"You have to clean database manually to enable them, or try to perform forced " +"upgrade." msgstr "" -#: c:\Apache2\htdocs\account228/admin/inst_upgrade.php:209 +#: ../admin/inst_upgrade.php:174 msgid "Upgrade system" msgstr "" -#: c:\Apache2\htdocs\account228/admin/inst_upgrade.php:209 +#: ../admin/inst_upgrade.php:174 msgid "Save database and perform upgrade" msgstr "" -#: c:\Apache2\htdocs\account228/admin/payment_terms.php:16 +#: ../admin/payment_terms.php:16 +#: ../reporting/includes/doctext.inc:56 +#: ../sales/view/view_invoice.php:74 +#: ../sales/view/view_sales_order.php:77 msgid "Payment Terms" msgstr "" -#: c:\Apache2\htdocs\account228/admin/payment_terms.php:31 +#: ../admin/payment_terms.php:51 msgid "The number of days or the day in the following month must be numeric." msgstr "" -#: c:\Apache2\htdocs\account228/admin/payment_terms.php:37 +#: ../admin/payment_terms.php:57 msgid "The Terms description must be entered." msgstr "" -#: c:\Apache2\htdocs\account228/admin/payment_terms.php:43 -msgid "When the check box to indicate a day in the following month is the due date, the due date cannot be a day after the 30th. A number between 1 and 30 is expected." -msgstr "" - -#: c:\Apache2\htdocs\account228/admin/payment_terms.php:49 -msgid "When the check box is not checked to indicate that the term expects a number of days after which accounts are due, the number entered should be less than 500 days." -msgstr "" - -#: c:\Apache2\htdocs\account228/admin/payment_terms.php:74 +#: ../admin/payment_terms.php:77 msgid "Selected payment terms have been updated" msgstr "" -#: c:\Apache2\htdocs\account228/admin/payment_terms.php:93 +#: ../admin/payment_terms.php:82 msgid "New payment terms have been added" msgstr "" -#: c:\Apache2\htdocs\account228/admin/payment_terms.php:111 -msgid "Cannot delete this payment term, because customer accounts have been created referring to this term." +#: ../admin/payment_terms.php:95 +msgid "" +"Cannot delete this payment term, because customer accounts have been created " +"referring to this term." msgstr "" -#: c:\Apache2\htdocs\account228/admin/payment_terms.php:120 -msgid "Cannot delete this payment term, because supplier accounts have been created referring to this term" +#: ../admin/payment_terms.php:101 +msgid "" +"Cannot delete this payment term, because supplier accounts have been created " +"referring to this term" msgstr "" -#: c:\Apache2\htdocs\account228/admin/payment_terms.php:128 +#: ../admin/payment_terms.php:107 msgid "Selected payment terms have been deleted" msgstr "" -#: c:\Apache2\htdocs\account228/admin/payment_terms.php:150 -msgid "Following Month On" +#: ../admin/payment_terms.php:127 +#: ../dimensions/dimension_entry.php:275 +#: ../dimensions/inquiry/search_dimensions.php:75 +#: ../dimensions/inquiry/search_dimensions.php:130 +#: ../dimensions/view/view_dimension.php:54 +#: ../gl/bank_account_reconcile.php:233 +#: ../gl/inquiry/bank_inquiry.php:67 +#: ../gl/inquiry/gl_account_inquiry.php:125 +#: ../gl/inquiry/journal_inquiry.php:122 +#: ../gl/inquiry/tax_inquiry.php:82 +#: ../gl/manage/bank_accounts.php:102 +#: ../gl/manage/gl_quick_entries.php:186 +#: ../gl/view/accrual_trans.php:52 +#: ../gl/includes/ui/gl_bank_ui.inc:80 +#: ../includes/ui/ui_view.inc:480 +#: ../inventory/inquiry/stock_movements.php:76 +#: ../inventory/manage/item_categories.php:98 +#: ../manufacturing/search_work_orders.php:161 +#: ../manufacturing/includes/manufacturing_ui.inc:236 +#: ../manufacturing/includes/manufacturing_ui.inc:276 +#: ../manufacturing/includes/manufacturing_ui.inc:280 +#: ../manufacturing/includes/manufacturing_ui.inc:331 +#: ../purchasing/inquiry/supplier_allocation_inquiry.php:125 +#: ../purchasing/inquiry/supplier_inquiry.php:162 +#: ../reporting/rep102.php:124 +#: ../reporting/rep202.php:127 +#: ../reporting/rep501.php:85 +#: ../reporting/rep601.php:76 +#: ../reporting/rep702.php:58 +#: ../reporting/rep704.php:78 +#: ../reporting/rep704.php:81 +#: ../reporting/rep704.php:84 +#: ../reporting/rep709.php:103 +#: ../reporting/rep710.php:76 +#: ../reporting/rep710.php:84 +#: ../reporting/reports_main.php:242 +#: ../reporting/reports_main.php:389 +#: ../reporting/includes/doctext.inc:42 +#: ../reporting/includes/doctext.inc:52 +#: ../sales/inquiry/customer_allocation_inquiry.php:141 +#: ../sales/inquiry/customer_inquiry.php:212 +msgid "Type" msgstr "" -#: c:\Apache2\htdocs\account228/admin/payment_terms.php:150 -msgid "Due After (Days)" +#: ../admin/payment_terms.php:127 +msgid "Due After/Days" msgstr "" -#: c:\Apache2\htdocs\account228/admin/payment_terms.php:159 -#: c:\Apache2\htdocs\account228/admin/payment_terms.php:168 +#: ../admin/payment_terms.php:140 msgid "N/A" msgstr "" -#: c:\Apache2\htdocs\account228/admin/payment_terms.php:213 +#: ../admin/payment_terms.php:174 msgid "Terms Description:" msgstr "" -#: c:\Apache2\htdocs\account228/admin/payment_terms.php:215 -msgid "Due After A Given No. Of Days:" +#: ../admin/payment_terms.php:176 +msgid "Payment type:" msgstr "" -#: c:\Apache2\htdocs\account228/admin/payment_terms.php:225 +#: ../admin/payment_terms.php:179 msgid "Days (Or Day In Following Month):" msgstr "" -#: c:\Apache2\htdocs\account228/admin/printers.php:16 +#: ../admin/printers.php:16 msgid "Printer Locations" msgstr "" -#: c:\Apache2\htdocs\account228/admin/printers.php:31 +#: ../admin/printers.php:31 msgid "Printer name cannot be empty." msgstr "" -#: c:\Apache2\htdocs\account228/admin/printers.php:36 +#: ../admin/printers.php:36 msgid "You have selected printing to server at user IP." msgstr "" -#: c:\Apache2\htdocs\account228/admin/printers.php:41 +#: ../admin/printers.php:41 msgid "Timeout cannot be less than zero nor longer than 60 (sec)." msgstr "" -#: c:\Apache2\htdocs\account228/admin/printers.php:52 +#: ../admin/printers.php:52 msgid "New printer definition has been created" msgstr "" -#: c:\Apache2\htdocs\account228/admin/printers.php:53 +#: ../admin/printers.php:53 msgid "Selected printer definition has been updated" msgstr "" -#: c:\Apache2\htdocs\account228/admin/printers.php:67 -msgid "Cannot delete this printer definition, because print profile have been created using it." +#: ../admin/printers.php:64 +msgid "" +"Cannot delete this printer definition, because print profile have been " +"created using it." msgstr "" -#: c:\Apache2\htdocs\account228/admin/printers.php:73 +#: ../admin/printers.php:69 msgid "Selected printer definition has been deleted" msgstr "" -#: c:\Apache2\htdocs\account228/admin/printers.php:88 -#: c:\Apache2\htdocs\account228/admin/printers.php:140 +#: ../admin/printers.php:84 +#: ../admin/printers.php:136 msgid "Printer Queue" msgstr "" -#: c:\Apache2\htdocs\account228/admin/printers.php:136 +#: ../admin/printers.php:132 msgid "Printer Name" msgstr "" -#: c:\Apache2\htdocs\account228/admin/printers.php:137 +#: ../admin/printers.php:133 msgid "Printer Description" msgstr "" -#: c:\Apache2\htdocs\account228/admin/printers.php:138 +#: ../admin/printers.php:134 msgid "Host name or IP" msgstr "" -#: c:\Apache2\htdocs\account228/admin/printers.php:139 +#: ../admin/printers.php:135 msgid "Port" msgstr "" -#: c:\Apache2\htdocs\account228/admin/printers.php:141 +#: ../admin/printers.php:137 msgid "Timeout" msgstr "" -#: c:\Apache2\htdocs\account228/admin/print_profiles.php:18 +#: ../admin/print_profiles.php:18 msgid "Printing Profiles" msgstr "" -#: c:\Apache2\htdocs\account228/admin/print_profiles.php:33 +#: ../admin/print_profiles.php:33 msgid "Default printing destination" msgstr "" -#: c:\Apache2\htdocs\account228/admin/print_profiles.php:93 +#: ../admin/print_profiles.php:91 msgid "Printing profile name cannot be empty." msgstr "" -#: c:\Apache2\htdocs\account228/admin/print_profiles.php:109 +#: ../admin/print_profiles.php:107 msgid "New printing profile has been created" msgstr "" -#: c:\Apache2\htdocs\account228/admin/print_profiles.php:112 +#: ../admin/print_profiles.php:110 msgid "Printing profile has been updated" msgstr "" -#: c:\Apache2\htdocs\account228/admin/print_profiles.php:121 +#: ../admin/print_profiles.php:119 msgid "Selected printing profile has been deleted" msgstr "" -#: c:\Apache2\htdocs\account228/admin/print_profiles.php:132 +#: ../admin/print_profiles.php:130 msgid "Select printing profile" msgstr "" -#: c:\Apache2\htdocs\account228/admin/print_profiles.php:133 +#: ../admin/print_profiles.php:131 msgid "New printing profile" msgstr "" -#: c:\Apache2\htdocs\account228/admin/print_profiles.php:138 -#: c:\Apache2\htdocs\account228/admin/print_profiles.php:140 +#: ../admin/print_profiles.php:136 +#: ../admin/print_profiles.php:138 msgid "Printing Profile Name" msgstr "" -#: c:\Apache2\htdocs\account228/admin/print_profiles.php:150 +#: ../admin/print_profiles.php:148 msgid "Report Id" msgstr "" -#: c:\Apache2\htdocs\account228/admin/print_profiles.php:150 +#: ../admin/print_profiles.php:148 msgid "Printer" msgstr "" -#: c:\Apache2\htdocs\account228/admin/print_profiles.php:164 +#: ../admin/print_profiles.php:162 msgid "Browser support" msgstr "" -#: c:\Apache2\htdocs\account228/admin/print_profiles.php:171 +#: ../admin/print_profiles.php:169 msgid "no title was found in this report definition file." msgstr "" -#: c:\Apache2\htdocs\account228/admin/print_profiles.php:177 +#: ../admin/print_profiles.php:175 msgid "Add New Profile" msgstr "" -#: c:\Apache2\htdocs\account228/admin/print_profiles.php:179 +#: ../admin/print_profiles.php:177 msgid "Update Profile" msgstr "" -#: c:\Apache2\htdocs\account228/admin/print_profiles.php:180 +#: ../admin/print_profiles.php:178 msgid "Update printer profile" msgstr "" -#: c:\Apache2\htdocs\account228/admin/print_profiles.php:181 +#: ../admin/print_profiles.php:179 msgid "Delete Profile" msgstr "" -#: c:\Apache2\htdocs\account228/admin/print_profiles.php:182 +#: ../admin/print_profiles.php:180 msgid "Delete printer profile (only if not used by any user)" msgstr "" -#: c:\Apache2\htdocs\account228/admin/security_roles.php:18 +#: ../admin/security_roles.php:18 msgid "Access setup" msgstr "" -#: c:\Apache2\htdocs\account228/admin/security_roles.php:63 +#: ../admin/security_roles.php:63 msgid "Role description cannot be empty." msgstr "" -#: c:\Apache2\htdocs\account228/admin/security_roles.php:69 +#: ../admin/security_roles.php:69 msgid "Role name cannot be empty." msgstr "" -#: c:\Apache2\htdocs\account228/admin/security_roles.php:76 -msgid "Access level edition in Company setup section have to be enabled for your account." +#: ../admin/security_roles.php:76 +msgid "" +"Access level edition in Company setup section have to be enabled for your " +"account." msgstr "" -#: c:\Apache2\htdocs\account228/admin/security_roles.php:105 +#: ../admin/security_roles.php:105 msgid "New security role has been added." msgstr "" -#: c:\Apache2\htdocs\account228/admin/security_roles.php:113 +#: ../admin/security_roles.php:113 msgid "Security role has been updated." msgstr "" -#: c:\Apache2\htdocs\account228/admin/security_roles.php:126 +#: ../admin/security_roles.php:126 msgid "This role is currently assigned to some users and cannot be deleted" msgstr "" -#: c:\Apache2\htdocs\account228/admin/security_roles.php:129 +#: ../admin/security_roles.php:129 msgid "Security role has been sucessfully deleted." msgstr "" -#: c:\Apache2\htdocs\account228/admin/security_roles.php:178 +#: ../admin/security_roles.php:178 msgid "Role:" msgstr "" -#: c:\Apache2\htdocs\account228/admin/security_roles.php:180 +#: ../admin/security_roles.php:180 +#: ../gl/manage/gl_accounts.php:195 +#: ../inventory/manage/items.php:253 +#: ../purchasing/manage/suppliers.php:281 +#: ../sales/manage/customers.php:282 msgid "Show inactive:" msgstr "" -#: c:\Apache2\htdocs\account228/admin/security_roles.php:195 +#: ../admin/security_roles.php:195 msgid "Role name:" msgstr "" -#: c:\Apache2\htdocs\account228/admin/security_roles.php:196 +#: ../admin/security_roles.php:196 msgid "Role description:" msgstr "" -#: c:\Apache2\htdocs\account228/admin/security_roles.php:197 +#: ../admin/security_roles.php:197 msgid "Current status:" msgstr "" -#: c:\Apache2\htdocs\account228/admin/security_roles.php:221 +#: ../admin/security_roles.php:221 msgid "On/off set of features" msgstr "" -#: c:\Apache2\htdocs\account228/admin/security_roles.php:240 -#: c:\Apache2\htdocs\account228/admin/security_roles.php:246 +#: ../admin/security_roles.php:240 +#: ../admin/security_roles.php:246 msgid "Update view" msgstr "" -#: c:\Apache2\htdocs\account228/admin/security_roles.php:241 +#: ../admin/security_roles.php:241 msgid "Insert New Role" msgstr "" -#: c:\Apache2\htdocs\account228/admin/security_roles.php:245 +#: ../admin/security_roles.php:245 msgid "Save Role" msgstr "" -#: c:\Apache2\htdocs\account228/admin/security_roles.php:247 +#: ../admin/security_roles.php:247 msgid "Clone This Role" msgstr "" -#: c:\Apache2\htdocs\account228/admin/security_roles.php:248 +#: ../admin/security_roles.php:248 msgid "Delete This Role" msgstr "" -#: c:\Apache2\htdocs\account228/admin/security_roles.php:249 -#: c:\Apache2\htdocs\account228/admin/void_transaction.php:145 +#: ../admin/security_roles.php:249 +#: ../admin/void_transaction.php:208 +#: ../gl/manage/gl_quick_entries.php:61 +#: ../gl/includes/ui/gl_bank_ui.inc:248 +#: ../gl/includes/ui/gl_journal_ui.inc:223 +#: ../includes/ui/simple_crud_class.inc:58 +#: ../includes/ui/simple_crud_class.inc:231 +#: ../includes/ui/ui_controls.inc:561 +#: ../includes/ui/ui_input.inc:206 +#: ../inventory/includes/item_adjustments_ui.inc:159 +#: ../inventory/includes/stock_transfers_ui.inc:139 +#: ../inventory/manage/items.php:426 +#: ../manufacturing/includes/work_order_issue_ui.inc:129 +#: ../purchasing/includes/ui/po_ui.inc:436 +#: ../sales/includes/ui/sales_credit_ui.inc:295 +#: ../sales/includes/ui/sales_order_ui.inc:560 msgid "Cancel" msgstr "" -#: c:\Apache2\htdocs\account228/admin/security_roles.php:249 +#: ../admin/security_roles.php:249 +#: ../inventory/manage/items.php:426 msgid "Cancel Edition" msgstr "" -#: c:\Apache2\htdocs\account228/admin/shipping_companies.php:15 +#: ../admin/shipping_companies.php:15 +#: ../reporting/includes/doctext.inc:32 +#: ../sales/customer_credit_invoice.php:265 +#: ../sales/customer_delivery.php:366 +#: ../sales/customer_invoice.php:403 +#: ../sales/view/view_credit.php:74 +#: ../sales/view/view_dispatch.php:92 +#: ../sales/view/view_invoice.php:91 msgid "Shipping Company" msgstr "" -#: c:\Apache2\htdocs\account228/admin/shipping_companies.php:25 +#: ../admin/shipping_companies.php:26 msgid "The shipping company name cannot be empty." msgstr "" -#: c:\Apache2\htdocs\account228/admin/shipping_companies.php:44 +#: ../admin/shipping_companies.php:37 msgid "New shipping company has been added" msgstr "" -#: c:\Apache2\htdocs\account228/admin/shipping_companies.php:61 +#: ../admin/shipping_companies.php:46 msgid "Selected shipping company has been updated" msgstr "" -#: c:\Apache2\htdocs\account228/admin/shipping_companies.php:77 -msgid "Cannot delete this shipping company because sales orders have been created using this shipper." +#: ../admin/shipping_companies.php:59 +msgid "" +"Cannot delete this shipping company because sales orders have been created " +"using this shipper." msgstr "" -#: c:\Apache2\htdocs\account228/admin/shipping_companies.php:89 -msgid "Cannot delete this shipping company because invoices have been created using this shipping company." +#: ../admin/shipping_companies.php:67 +msgid "" +"Cannot delete this shipping company because invoices have been created using " +"this shipping company." msgstr "" -#: c:\Apache2\htdocs\account228/admin/shipping_companies.php:95 +#: ../admin/shipping_companies.php:72 msgid "Selected shipping company has been deleted" msgstr "" -#: c:\Apache2\htdocs\account228/admin/shipping_companies.php:117 +#: ../admin/shipping_companies.php:91 msgid "Contact Person" msgstr "" -#: c:\Apache2\htdocs\account228/admin/shipping_companies.php:117 +#: ../admin/shipping_companies.php:91 msgid "Phone Number" msgstr "" -#: c:\Apache2\htdocs\account228/admin/shipping_companies.php:117 +#: ../admin/shipping_companies.php:91 +#: ../inventory/manage/locations.php:146 msgid "Secondary Phone" msgstr "" -#: c:\Apache2\htdocs\account228/admin/shipping_companies.php:117 +#: ../admin/shipping_companies.php:91 +#: ../inventory/manage/locations.php:146 +#: ../reporting/includes/doctext.inc:75 msgid "Address" msgstr "" -#: c:\Apache2\htdocs\account228/admin/shipping_companies.php:163 +#: ../admin/shipping_companies.php:134 +#: ../gl/manage/gl_account_types.php:182 +#: ../gl/includes/ui/gl_bank_ui.inc:55 +#: ../inventory/manage/items.php:309 +#: ../manufacturing/manage/work_centres.php:137 msgid "Name:" msgstr "" -#: c:\Apache2\htdocs\account228/admin/shipping_companies.php:165 +#: ../admin/shipping_companies.php:136 +#: ../purchasing/manage/suppliers.php:104 +#: ../sales/manage/customer_branches.php:259 msgid "Contact Person:" msgstr "" -#: c:\Apache2\htdocs\account228/admin/shipping_companies.php:169 +#: ../admin/shipping_companies.php:140 +#: ../includes/ui/contacts_view.inc:103 +#: ../inventory/manage/locations.php:205 +#: ../purchasing/manage/suppliers.php:106 +#: ../sales/manage/customer_branches.php:261 msgid "Secondary Phone Number:" msgstr "" -#: c:\Apache2\htdocs\account228/admin/system_diagnostics.php:17 +#: ../admin/system_diagnostics.php:17 msgid "System Diagnostics" msgstr "" -#: c:\Apache2\htdocs\account228/admin/system_diagnostics.php:23 -msgid "Info" +#: ../admin/tags.php:33 +msgid "Unspecified tag type" msgstr "" -#: c:\Apache2\htdocs\account228/admin/system_diagnostics.php:24 -msgid "Optional" +#: ../admin/tags.php:40 +#: ../reporting/reports_main.php:263 +#: ../reporting/reports_main.php:271 +#: ../reporting/reports_main.php:282 +#: ../reporting/reports_main.php:310 +#: ../reporting/reports_main.php:317 +#: ../reporting/reports_main.php:327 +#: ../reporting/reports_main.php:352 +#: ../reporting/reports_main.php:358 +#: ../reporting/reports_main.php:367 +msgid "Account Tags" msgstr "" -#: c:\Apache2\htdocs\account228/admin/system_diagnostics.php:25 -msgid "Recomended" +#: ../admin/tags.php:44 +msgid "Dimension Tags" msgstr "" -#: c:\Apache2\htdocs\account228/admin/system_diagnostics.php:26 -msgid "Required " +#: ../admin/tags.php:57 +msgid "The tag name cannot be empty." msgstr "" -#: c:\Apache2\htdocs\account228/admin/system_diagnostics.php:37 -msgid "MySQL version" +#: ../admin/tags.php:73 +msgid "Selected tag settings have been updated" msgstr "" -#: c:\Apache2\htdocs\account228/admin/system_diagnostics.php:41 -msgid "Upgrade MySQL server to version at least 3.23.58" +#: ../admin/tags.php:78 +msgid "New tag has been added" msgstr "" -#: c:\Apache2\htdocs\account228/admin/system_diagnostics.php:48 -msgid "PHP version" +#: ../admin/tags.php:94 +msgid "" +"Cannot delete this tag because records have been created referring to it." msgstr "" -#: c:\Apache2\htdocs\account228/admin/system_diagnostics.php:52 -msgid "Upgrade PHP to version at least 4.3.2" +#: ../admin/tags.php:109 +msgid "Selected tag has been deleted" msgstr "" -#: c:\Apache2\htdocs\account228/admin/system_diagnostics.php:59 -msgid "Server system" +#: ../admin/tags.php:128 +msgid "Tag Name" msgstr "" -#: c:\Apache2\htdocs\account228/admin/system_diagnostics.php:69 -msgid "Session save path" +#: ../admin/tags.php:128 +msgid "Tag Description" msgstr "" -#: c:\Apache2\htdocs\account228/admin/system_diagnostics.php:79 -msgid "Browser type" +#: ../admin/tags.php:165 +msgid "Tag Name:" msgstr "" -#: c:\Apache2\htdocs\account228/admin/system_diagnostics.php:83 -msgid "Any browser is supported" +#: ../admin/tags.php:166 +msgid "Tag Description:" msgstr "" -#: c:\Apache2\htdocs\account228/admin/system_diagnostics.php:90 -msgid "Http server type" +#: ../admin/users.php:16 +msgid "Users" msgstr "" -#: c:\Apache2\htdocs\account228/admin/system_diagnostics.php:94 -msgid "Any server is supported" +#: ../admin/users.php:31 +msgid "The user login entered must be at least 4 characters long." msgstr "" -#: c:\Apache2\htdocs\account228/admin/system_diagnostics.php:101 -msgid "Native gettext" +#: ../admin/users.php:72 +msgid "The selected user has been updated." msgstr "" -#: c:\Apache2\htdocs\account228/admin/system_diagnostics.php:105 -msgid "In case of no getext support, php emulation is used" +#: ../admin/users.php:86 +msgid "A new user has been added." msgstr "" -#: c:\Apache2\htdocs\account228/admin/system_diagnostics.php:113 -msgid "Debugging mode" +#: ../admin/users.php:97 +msgid "User has been deleted." msgstr "" -#: c:\Apache2\htdocs\account228/admin/system_diagnostics.php:117 -msgid "To switch debugging on set $go_debug=1 in config.php file" +#: ../admin/users.php:114 +msgid "User login" msgstr "" -#: c:\Apache2\htdocs\account228/admin/system_diagnostics.php:126 -msgid "Error logging" +#: ../admin/users.php:114 +#: ../admin/users.php:198 +#: ../includes/ui/contacts_view.inc:41 +msgid "Full Name" msgstr "" -#: c:\Apache2\htdocs\account228/admin/system_diagnostics.php:134 -msgid "Disabled" +#: ../admin/users.php:114 +#: ../includes/ui/contacts_view.inc:41 +#: ../inventory/manage/locations.php:146 +#: ../reporting/rep106.php:86 +#: ../reporting/includes/header2.inc:86 +#: ../sales/manage/sales_people.php:99 +msgid "Phone" msgstr "" -#: c:\Apache2\htdocs\account228/admin/system_diagnostics.php:137 -msgid "To switch error logging set $error_logging in config.php file" +#: ../admin/users.php:115 +#: ../sales/manage/customer_branches.php:300 +#: ../sales/view/view_sales_order.php:82 +msgid "E-mail" msgstr "" -#: c:\Apache2\htdocs\account228/admin/system_diagnostics.php:140 -msgid "Log file is not writeable" +#: ../admin/users.php:115 +msgid "Last Visit" msgstr "" -#: c:\Apache2\htdocs\account228/admin/system_diagnostics.php:149 -msgid "Current database version" +#: ../admin/users.php:115 +msgid "Access Level" msgstr "" -#: c:\Apache2\htdocs\account228/admin/system_diagnostics.php:153 -msgid "Database structure seems to be not upgraded to current version" +#: ../admin/users.php:184 +msgid "User Login:" msgstr "" -#: c:\Apache2\htdocs\account228/admin/system_diagnostics.php:166 -msgid "Company subdirectories consistency" +#: ../admin/users.php:195 +msgid "Enter a new password to change, leave empty to keep current." msgstr "" -#: c:\Apache2\htdocs\account228/admin/system_diagnostics.php:176 -#: c:\Apache2\htdocs\account228/admin/system_diagnostics.php:183 -#: c:\Apache2\htdocs\account228/admin/system_diagnostics.php:190 -#: c:\Apache2\htdocs\account228/admin/system_diagnostics.php:205 -#: c:\Apache2\htdocs\account228/admin/system_diagnostics.php:290 -#, php-format -msgid "'%s' is not writeable" +#: ../admin/users.php:200 +msgid "Telephone No.:" msgstr "" -#: c:\Apache2\htdocs\account228/admin/system_diagnostics.php:201 -msgid "Temporary directory" +#: ../admin/users.php:204 +msgid "Access Level:" msgstr "" -#: c:\Apache2\htdocs\account228/admin/system_diagnostics.php:213 -msgid "Language configuration consistency" +#: ../admin/users.php:208 +msgid "User's POS" msgstr "" -#: c:\Apache2\htdocs\account228/admin/system_diagnostics.php:231 -#, php-format -msgid "Missing %s translation file." +#: ../admin/users.php:213 +msgid "Use popup window for reports:" msgstr "" -#: c:\Apache2\htdocs\account228/admin/system_diagnostics.php:236 -#, php-format -msgid "Missing system locale: %s" +#: ../admin/view_print_transaction.php:27 +msgid "View or Print Transactions" msgstr "" -#: c:\Apache2\htdocs\account228/admin/system_diagnostics.php:251 -msgid "Main config file" +#: ../admin/view_print_transaction.php:43 +#: ../admin/view_print_transaction.php:45 +#: ../admin/view_print_transaction.php:129 +#: ../includes/ui/ui_controls.inc:172 +#: ../purchasing/inquiry/po_search_completed.php:108 +#: ../purchasing/inquiry/po_search.php:93 +#: ../sales/inquiry/customer_inquiry.php:197 +#: ../sales/inquiry/sales_deliveries_view.php:160 +#: ../sales/inquiry/sales_orders_view.php:116 +msgid "Print" msgstr "" -#: c:\Apache2\htdocs\account228/admin/system_diagnostics.php:255 -#, php-format -msgid "'%s' file should be read-only" +#: ../admin/view_print_transaction.php:67 +msgid "Only documents can be printed." msgstr "" -#: c:\Apache2\htdocs\account228/admin/system_diagnostics.php:263 -msgid "Database auth file" +#: ../admin/view_print_transaction.php:79 +msgid "from #:" msgstr "" -#: c:\Apache2\htdocs\account228/admin/system_diagnostics.php:267 -#, php-format -msgid "'%s' file should be read-only if you do not plan to add or change companies" +#: ../admin/view_print_transaction.php:81 +msgid "to #:" msgstr "" -#: c:\Apache2\htdocs\account228/admin/system_diagnostics.php:276 -msgid "Extensions configuration files" +#: ../admin/view_print_transaction.php:83 +#: ../dimensions/inquiry/search_dimensions.php:88 +#: ../gl/inquiry/journal_inquiry.php:53 +#: ../manufacturing/search_work_orders.php:78 +#: ../purchasing/includes/ui/invoice_ui.inc:447 +#: ../purchasing/inquiry/po_search_completed.php:74 +#: ../purchasing/inquiry/po_search.php:76 +#: ../purchasing/inquiry/supplier_allocation_inquiry.php:57 +#: ../purchasing/inquiry/supplier_inquiry.php:54 +#: ../sales/inquiry/customer_allocation_inquiry.php:51 +#: ../sales/inquiry/customer_inquiry.php:54 +#: ../sales/inquiry/sales_deliveries_view.php:116 +#: ../sales/inquiry/sales_orders_view.php:244 +msgid "Search" msgstr "" -#: c:\Apache2\htdocs\account228/admin/system_diagnostics.php:281 -#, php-format -msgid "'%s' file should be writeable" +#: ../admin/view_print_transaction.php:96 +msgid "" +"The starting transaction number is expected to be numeric and greater than " +"zero." msgstr "" -#: c:\Apache2\htdocs\account228/admin/system_diagnostics.php:299 -msgid "Test" +#: ../admin/view_print_transaction.php:102 +msgid "" +"The ending transaction number is expected to be numeric and greater than " +"zero." +msgstr "" + +#: ../admin/view_print_transaction.php:127 +#: ../admin/void_transaction.php:161 +#: ../dimensions/inquiry/search_dimensions.php:128 +#: ../dimensions/view/view_dimension.php:54 +#: ../gl/bank_account_reconcile.php:235 +#: ../gl/inquiry/bank_inquiry.php:67 +#: ../gl/inquiry/journal_inquiry.php:124 +#: ../gl/view/bank_transfer_view.php:86 +#: ../gl/view/gl_deposit_view.php:75 +#: ../gl/view/gl_payment_view.php:73 +#: ../gl/view/gl_trans_view.php:35 +#: ../includes/ui/contacts_view.inc:41 +#: ../inventory/inquiry/stock_movements.php:76 +#: ../inventory/view/view_adjustment.php:44 +#: ../inventory/view/view_transfer.php:44 +#: ../manufacturing/search_work_orders.php:160 +#: ../manufacturing/view/wo_issue_view.php:43 +#: ../manufacturing/view/wo_production_view.php:44 +#: ../manufacturing/includes/manufacturing_ui.inc:157 +#: ../manufacturing/includes/manufacturing_ui.inc:200 +#: ../manufacturing/includes/manufacturing_ui.inc:276 +#: ../manufacturing/includes/manufacturing_ui.inc:280 +#: ../manufacturing/includes/manufacturing_ui.inc:331 +#: ../purchasing/includes/ui/grn_ui.inc:36 +#: ../purchasing/includes/ui/grn_ui.inc:53 +#: ../purchasing/includes/ui/po_ui.inc:314 +#: ../purchasing/view/view_po.php:115 +#: ../purchasing/view/view_supp_credit.php:43 +#: ../purchasing/view/view_supp_invoice.php:46 +#: ../purchasing/view/view_supp_payment.php:70 +#: ../purchasing/inquiry/po_search_completed.php:117 +#: ../purchasing/inquiry/po_search.php:131 +#: ../purchasing/inquiry/supplier_allocation_inquiry.php:127 +#: ../purchasing/inquiry/supplier_inquiry.php:164 +#: ../purchasing/allocations/supplier_allocation_main.php:96 +#: ../reporting/rep501.php:85 +#: ../reporting/rep601.php:76 +#: ../reporting/rep702.php:51 +#: ../reporting/includes/doctext.inc:45 +#: ../sales/customer_credit_invoice.php:256 +#: ../sales/customer_credit_invoice.php:258 +#: ../sales/customer_delivery.php:346 +#: ../sales/customer_delivery.php:348 +#: ../sales/customer_invoice.php:382 +#: ../sales/customer_invoice.php:384 +#: ../sales/allocations/customer_allocation_main.php:95 +#: ../sales/view/view_dispatch.php:85 +#: ../sales/view/view_invoice.php:84 +#: ../sales/view/view_receipt.php:50 +#: ../sales/view/view_sales_order.php:80 +#: ../sales/inquiry/customer_allocation_inquiry.php:143 +#: ../sales/inquiry/customer_inquiry.php:215 +#: ../sales/inquiry/sales_deliveries_view.php:184 +#: ../sales/includes/ui/sales_credit_ui.inc:85 +#: ../sales/includes/ui/sales_credit_ui.inc:87 +#: ../sales/includes/ui/sales_order_ui.inc:374 +msgid "Reference" msgstr "" -#: c:\Apache2\htdocs\account228/admin/system_diagnostics.php:299 -msgid "Test type" +#: ../admin/view_print_transaction.php:128 +#: ../admin/void_transaction.php:162 +#: ../dimensions/inquiry/search_dimensions.php:131 +#: ../dimensions/view/view_dimension.php:54 +#: ../gl/accruals.php:87 +#: ../gl/accruals.php:191 +#: ../gl/bank_account_reconcile.php:236 +#: ../gl/inquiry/bank_inquiry.php:67 +#: ../gl/inquiry/gl_account_inquiry.php:125 +#: ../gl/inquiry/journal_inquiry.php:121 +#: ../gl/view/accrual_trans.php:52 +#: ../gl/view/bank_transfer_view.php:83 +#: ../gl/view/gl_deposit_view.php:68 +#: ../gl/view/gl_payment_view.php:66 +#: ../gl/view/gl_trans_view.php:36 +#: ../includes/ui/allocation_cart.inc:263 +#: ../includes/ui/ui_view.inc:480 +#: ../inventory/inquiry/stock_movements.php:76 +#: ../inventory/view/view_adjustment.php:45 +#: ../inventory/view/view_transfer.php:47 +#: ../manufacturing/search_work_orders.php:166 +#: ../manufacturing/work_order_entry.php:417 +#: ../manufacturing/work_order_entry.php:423 +#: ../manufacturing/view/wo_production_view.php:45 +#: ../manufacturing/includes/manufacturing_ui.inc:157 +#: ../manufacturing/includes/manufacturing_ui.inc:200 +#: ../manufacturing/includes/manufacturing_ui.inc:236 +#: ../manufacturing/includes/manufacturing_ui.inc:277 +#: ../manufacturing/includes/manufacturing_ui.inc:281 +#: ../manufacturing/includes/manufacturing_ui.inc:332 +#: ../purchasing/includes/ui/invoice_ui.inc:103 +#: ../purchasing/includes/ui/po_ui.inc:328 +#: ../purchasing/view/view_po.php:140 +#: ../purchasing/inquiry/supplier_allocation_inquiry.php:130 +#: ../purchasing/inquiry/supplier_inquiry.php:167 +#: ../purchasing/allocations/supplier_allocation_main.php:97 +#: ../reporting/rep101.php:130 +#: ../reporting/rep201.php:118 +#: ../reporting/rep501.php:85 +#: ../reporting/rep601.php:76 +#: ../reporting/rep704.php:78 +#: ../reporting/rep704.php:81 +#: ../reporting/rep704.php:84 +#: ../reporting/rep709.php:107 +#: ../reporting/rep710.php:75 +#: ../reporting/includes/doctext.inc:15 +#: ../reporting/includes/doctext.inc:108 +#: ../reporting/includes/doctext.inc:116 +#: ../sales/customer_delivery.php:376 +#: ../sales/customer_invoice.php:413 +#: ../sales/allocations/customer_allocation_main.php:96 +#: ../sales/view/view_credit.php:69 +#: ../sales/view/view_sales_order.php:95 +#: ../sales/view/view_sales_order.php:128 +#: ../sales/view/view_sales_order.php:160 +#: ../sales/inquiry/customer_allocation_inquiry.php:145 +#: ../sales/inquiry/customer_inquiry.php:216 +#: ../themes/exclusive/renderer.php:289 +#: ../themes/exclusive/renderer.php:383 +msgid "Date" msgstr "" -#: c:\Apache2\htdocs\account228/admin/system_diagnostics.php:299 -msgid "Value" +#: ../admin/view_print_transaction.php:130 +#: ../admin/void_transaction.php:163 +#: ../includes/ui/ui_view.inc:51 +msgid "GL" msgstr "" -#: c:\Apache2\htdocs\account228/admin/system_diagnostics.php:299 -msgid "Comments" +#: ../admin/void_transaction.php:29 +msgid "Void a Transaction" msgstr "" -#: c:\Apache2\htdocs\account228/admin/system_diagnostics.php:317 -msgid "Ok" +#: ../admin/void_transaction.php:119 +#: ../admin/void_transaction.php:164 +#: ../includes/ui/ui_input.inc:136 +#: ../includes/ui/ui_input.inc:277 +#: ../includes/ui/ui_lists.inc:20 +msgid "Select" msgstr "" -#: c:\Apache2\htdocs\account228/admin/tags.php:33 -msgid "Unspecified tag type" +#: ../admin/void_transaction.php:147 +msgid "Transaction Type:" msgstr "" -#: c:\Apache2\htdocs\account228/admin/tags.php:40 -msgid "Account Tags" +#: ../admin/void_transaction.php:183 +msgid "Transaction #:" msgstr "" -#: c:\Apache2\htdocs\account228/admin/tags.php:44 -msgid "Dimension Tags" +#: ../admin/void_transaction.php:185 +msgid "Voiding Date:" msgstr "" -#: c:\Apache2\htdocs\account228/admin/tags.php:57 -msgid "The tag name cannot be empty." +#: ../admin/void_transaction.php:187 +#: ../dimensions/dimension_entry.php:283 +#: ../gl/bank_transfer.php:91 +#: ../gl/inquiry/journal_inquiry.php:56 +#: ../gl/manage/revaluate_currencies.php:103 +#: ../includes/ui/ui_view.inc:308 +#: ../manufacturing/work_order_add_finished.php:210 +#: ../manufacturing/work_order_entry.php:449 +#: ../manufacturing/work_order_release.php:100 +#: ../purchasing/includes/ui/invoice_ui.inc:161 +#: ../purchasing/po_entry_items.php:501 +#: ../purchasing/supplier_payment.php:298 +#: ../sales/customer_payments.php:291 +msgid "Memo:" msgstr "" -#: c:\Apache2\htdocs\account228/admin/tags.php:73 -msgid "Selected tag settings have been updated" +#: ../admin/void_transaction.php:192 +#: ../admin/void_transaction.php:201 +msgid "Void Transaction" msgstr "" -#: c:\Apache2\htdocs\account228/admin/tags.php:78 -msgid "New tag has been added" +#: ../admin/void_transaction.php:197 +#: ../admin/void_transaction.php:276 +msgid "The entered transaction does not exist or cannot be voided." msgstr "" -#: c:\Apache2\htdocs\account228/admin/tags.php:94 -msgid "Cannot delete this tag because records have been created referring to it." +#: ../admin/void_transaction.php:205 +msgid "" +"Are you sure you want to void this transaction ? This action cannot be " +"undone." msgstr "" -#: c:\Apache2\htdocs\account228/admin/tags.php:109 -msgid "Selected tag has been deleted" +#: ../admin/void_transaction.php:207 +#: ../includes/ui/ui_controls.inc:560 +msgid "Proceed" msgstr "" -#: c:\Apache2\htdocs\account228/admin/tags.php:128 -msgid "Tag Name" +#: ../admin/void_transaction.php:221 +msgid "The selected transaction was closed for edition and cannot be voided." msgstr "" -#: c:\Apache2\htdocs\account228/admin/tags.php:128 -msgid "Tag Description" +#: ../admin/void_transaction.php:227 +#: ../gl/accruals.php:32 +#: ../gl/bank_transfer.php:108 +#: ../gl/gl_journal.php:154 +#: ../gl/manage/exchange_rates.php:33 +#: ../gl/manage/revaluate_currencies.php:50 +#: ../manufacturing/work_order_add_finished.php:98 +#: ../manufacturing/work_order_costs.php:83 +#: ../purchasing/po_receive_items.php:170 +#: ../purchasing/supplier_payment.php:179 +#: ../sales/customer_credit_invoice.php:89 +#: ../sales/sales_order_entry.php:335 +msgid "The entered date is invalid." msgstr "" -#: c:\Apache2\htdocs\account228/admin/tags.php:165 -msgid "Tag Name:" +#: ../admin/void_transaction.php:233 +#: ../gl/accruals.php:38 +#: ../gl/bank_transfer.php:114 +#: ../gl/gl_bank.php:247 +#: ../gl/gl_journal.php:160 +#: ../gl/manage/revaluate_currencies.php:56 +#: ../inventory/adjustments.php:114 +#: ../inventory/transfers.php:111 +#: ../manufacturing/work_order_add_finished.php:104 +#: ../manufacturing/work_order_costs.php:89 +#: ../manufacturing/work_order_entry.php:159 +#: ../manufacturing/work_order_issue.php:85 +#: ../purchasing/supplier_credit.php:176 +#: ../purchasing/supplier_invoice.php:174 +#: ../purchasing/supplier_payment.php:185 +#: ../sales/create_recurrent_invoices.php:92 +#: ../sales/credit_note_entry.php:159 +#: ../sales/customer_credit_invoice.php:93 +#: ../sales/customer_payments.php:100 +msgid "The entered date is not in fiscal year." msgstr "" -#: c:\Apache2\htdocs\account228/admin/tags.php:166 -msgid "Tag Description:" +#: ../admin/void_transaction.php:240 +msgid "The transaction number is expected to be numeric and greater than zero." msgstr "" -#: c:\Apache2\htdocs\account228/admin/users.php:16 -msgid "Users" +#: ../admin/void_transaction.php:257 +msgid "The selected transaction has already been voided." msgstr "" -#: c:\Apache2\htdocs\account228/admin/users.php:31 -msgid "The user login entered must be at least 4 characters long." +#: ../admin/void_transaction.php:270 +msgid "Selected transaction has been voided." msgstr "" -#: c:\Apache2\htdocs\account228/admin/users.php:72 -msgid "The selected user has been updated." +#: ../admin/db/fiscalyears_db.inc:124 +msgid "" +"The Retained Earnings Account or the Profit and Loss Year Account has not " +"been set in System and General GL Setup" msgstr "" -#: c:\Apache2\htdocs\account228/admin/users.php:88 -msgid "A new user has been added." +#: ../admin/db/fiscalyears_db.inc:129 +msgid "" +"The Retained Earnings Account should be a Balance Account or the Profit and " +"Loss Year Account should be an Expense Account (preferred the last one in " +"the Expense Class)" msgstr "" -#: c:\Apache2\htdocs\account228/admin/users.php:99 -msgid "User has been deleted." +#: ../admin/db/fiscalyears_db.inc:154 +#: ../admin/db/fiscalyears_db.inc:156 +msgid "Closing Year" msgstr "" -#: c:\Apache2\htdocs\account228/admin/users.php:116 -msgid "User login" +#: ../admin/db/fiscalyears_db.inc:202 +#: ../reporting/rep101.php:175 +#: ../reporting/rep201.php:167 +#: ../reporting/rep706.php:181 +msgid "Open Balance" msgstr "" -#: c:\Apache2\htdocs\account228/admin/users.php:116 -#: c:\Apache2\htdocs\account228/admin/users.php:200 -msgid "Full Name" +#: ../admin/db/maintenance_db.inc:150 +#, php-format +msgid "Cannot open the extension setup file '%s' for writing." msgstr "" -#: c:\Apache2\htdocs\account228/admin/users.php:116 -msgid "Phone" +#: ../admin/db/maintenance_db.inc:158 +#, php-format +msgid "Cannot write to the extensions setup file '%s'." msgstr "" -#: c:\Apache2\htdocs\account228/admin/users.php:117 -msgid "E-mail" +#: ../admin/db/maintenance_db.inc:176 +msgid "Cannot update system extensions list." msgstr "" -#: c:\Apache2\htdocs\account228/admin/users.php:117 -msgid "Last Visit" +#: ../admin/db/maintenance_db.inc:194 +#, php-format +msgid "Cannot update extensions list for company '%s'." msgstr "" -#: c:\Apache2\htdocs\account228/admin/users.php:117 -msgid "Access Level" +#: ../admin/db/maintenance_db.inc:231 +msgid "Cannot open the languages file - " msgstr "" -#: c:\Apache2\htdocs\account228/admin/users.php:186 -msgid "User Login:" -msgstr "" - -#: c:\Apache2\htdocs\account228/admin/users.php:197 -msgid "Enter a new password to change, leave empty to keep current." -msgstr "" - -#: c:\Apache2\htdocs\account228/admin/users.php:202 -msgid "Telephone No.:" -msgstr "" - -#: c:\Apache2\htdocs\account228/admin/users.php:206 -msgid "Access Level:" -msgstr "" - -#: c:\Apache2\htdocs\account228/admin/users.php:210 -msgid "User's POS" -msgstr "" - -#: c:\Apache2\htdocs\account228/admin/users.php:215 -msgid "Use popup window for reports:" -msgstr "" - -#: c:\Apache2\htdocs\account228/admin/view_print_transaction.php:26 -msgid "View or Print Transactions" -msgstr "" - -#: c:\Apache2\htdocs\account228/admin/view_print_transaction.php:37 -#: c:\Apache2\htdocs\account228/admin/view_print_transaction.php:129 -msgid "Print" -msgstr "" - -#: c:\Apache2\htdocs\account228/admin/view_print_transaction.php:47 -msgid "Only documents can be printed." -msgstr "" - -#: c:\Apache2\htdocs\account228/admin/view_print_transaction.php:59 -msgid "from #:" -msgstr "" - -#: c:\Apache2\htdocs\account228/admin/view_print_transaction.php:61 -msgid "to #:" -msgstr "" - -#: c:\Apache2\htdocs\account228/admin/view_print_transaction.php:63 -msgid "Search" -msgstr "" - -#: c:\Apache2\htdocs\account228/admin/view_print_transaction.php:76 -msgid "The starting transaction number is expected to be numeric and greater than zero." -msgstr "" - -#: c:\Apache2\htdocs\account228/admin/view_print_transaction.php:82 -msgid "The ending transaction number is expected to be numeric and greater than zero." -msgstr "" - -#: c:\Apache2\htdocs\account228/admin/view_print_transaction.php:127 -msgid "Reference" -msgstr "" - -#: c:\Apache2\htdocs\account228/admin/view_print_transaction.php:130 -msgid "GL" -msgstr "" - -#: c:\Apache2\htdocs\account228/admin/void_transaction.php:27 -msgid "Void a Transaction" -msgstr "" - -#: c:\Apache2\htdocs\account228/admin/void_transaction.php:113 -msgid "Transaction Type:" -msgstr "" - -#: c:\Apache2\htdocs\account228/admin/void_transaction.php:115 -msgid "Transaction #:" -msgstr "" - -#: c:\Apache2\htdocs\account228/admin/void_transaction.php:117 -msgid "Voiding Date:" -msgstr "" - -#: c:\Apache2\htdocs\account228/admin/void_transaction.php:119 -msgid "Memo:" -msgstr "" - -#: c:\Apache2\htdocs\account228/admin/void_transaction.php:124 -#: c:\Apache2\htdocs\account228/admin/void_transaction.php:133 -msgid "Void Transaction" -msgstr "" - -#: c:\Apache2\htdocs\account228/admin/void_transaction.php:129 -#: c:\Apache2\htdocs\account228/admin/void_transaction.php:213 -msgid "The entered transaction does not exist or cannot be voided." -msgstr "" - -#: c:\Apache2\htdocs\account228/admin/void_transaction.php:137 -msgid "Are you sure you want to void this transaction ? This action cannot be undone." -msgstr "" - -#: c:\Apache2\htdocs\account228/admin/void_transaction.php:139 -#: c:\Apache2\htdocs\account228/admin/void_transaction.php:141 -msgid "View Transaction" -msgstr "" - -#: c:\Apache2\htdocs\account228/admin/void_transaction.php:144 -msgid "Proceed" -msgstr "" - -#: c:\Apache2\htdocs\account228/admin/void_transaction.php:158 -msgid "The selected transaction was closed for edition and cannot be voided." +#: ../admin/db/maintenance_db.inc:238 +msgid "Cannot write to the language file - " msgstr "" -#: c:\Apache2\htdocs\account228/admin/void_transaction.php:164 -msgid "The entered date is invalid." +#: ../admin/db/maintenance_db.inc:248 +msgid "The language files folder " msgstr "" -#: c:\Apache2\htdocs\account228/admin/void_transaction.php:170 -msgid "The entered date is not in fiscal year." +#: ../admin/db/maintenance_db.inc:374 +#, php-format +msgid "SQL script execution failed in line %d: %s" msgstr "" -#: c:\Apache2\htdocs\account228/admin/void_transaction.php:177 -msgid "The transaction number is expected to be numeric and greater than zero." +#: ../admin/db/users_db.inc:196 +msgid "user online" msgstr "" -#: c:\Apache2\htdocs\account228/admin/void_transaction.php:194 -msgid "The selected transaction has already been voided." +#: ../admin/db/users_db.inc:196 +msgid "users online" msgstr "" -#: c:\Apache2\htdocs\account228/admin/void_transaction.php:207 -msgid "Selected transaction has been voided." +#: ../admin/db/voiding_db.inc:107 +#: ../sales/includes/db/sales_invoice_db.inc:205 +msgid "Voided." msgstr "" -#: c:\Apache2\htdocs\account228/applications/customers.php:17 +#: ../applications/customers.php:16 msgid "&Sales" msgstr "" -#: c:\Apache2\htdocs\account228/applications/customers.php:19 -#: c:\Apache2\htdocs\account228/applications/dimensions.php:22 -#: c:\Apache2\htdocs\account228/applications/generalledger.php:19 -#: c:\Apache2\htdocs\account228/applications/inventory.php:19 -#: c:\Apache2\htdocs\account228/applications/manufacturing.php:19 -#: c:\Apache2\htdocs\account228/applications/suppliers.php:19 +#: ../applications/customers.php:18 +#: ../applications/dimensions.php:21 +#: ../applications/generalledger.php:18 +#: ../applications/inventory.php:18 +#: ../applications/manufacturing.php:18 +#: ../applications/suppliers.php:18 msgid "Transactions" msgstr "" -#: c:\Apache2\htdocs\account228/applications/customers.php:20 +#: ../applications/customers.php:19 msgid "Sales &Quotation Entry" msgstr "" -#: c:\Apache2\htdocs\account228/applications/customers.php:22 +#: ../applications/customers.php:21 msgid "Sales &Order Entry" msgstr "" -#: c:\Apache2\htdocs\account228/applications/customers.php:24 +#: ../applications/customers.php:23 msgid "Direct &Delivery" msgstr "" -#: c:\Apache2\htdocs\account228/applications/customers.php:26 +#: ../applications/customers.php:25 +#: ../applications/suppliers.php:25 msgid "Direct &Invoice" msgstr "" -#: c:\Apache2\htdocs\account228/applications/customers.php:29 +#: ../applications/customers.php:28 msgid "&Delivery Against Sales Orders" msgstr "" -#: c:\Apache2\htdocs\account228/applications/customers.php:31 +#: ../applications/customers.php:30 msgid "&Invoice Against Sales Delivery" msgstr "" -#: c:\Apache2\htdocs\account228/applications/customers.php:34 +#: ../applications/customers.php:33 msgid "&Template Delivery" msgstr "" -#: c:\Apache2\htdocs\account228/applications/customers.php:36 +#: ../applications/customers.php:35 msgid "&Template Invoice" msgstr "" -#: c:\Apache2\htdocs\account228/applications/customers.php:38 +#: ../applications/customers.php:37 msgid "&Create and Print Recurrent Invoices" msgstr "" -#: c:\Apache2\htdocs\account228/applications/customers.php:41 +#: ../applications/customers.php:40 msgid "Customer &Payments" msgstr "" -#: c:\Apache2\htdocs\account228/applications/customers.php:43 +#: ../applications/customers.php:42 msgid "Customer &Credit Notes" msgstr "" -#: c:\Apache2\htdocs\account228/applications/customers.php:45 +#: ../applications/customers.php:44 msgid "&Allocate Customer Payments or Credit Notes" msgstr "" -#: c:\Apache2\htdocs\account228/applications/customers.php:48 -#: c:\Apache2\htdocs\account228/applications/dimensions.php:28 -#: c:\Apache2\htdocs\account228/applications/generalledger.php:33 -#: c:\Apache2\htdocs\account228/applications/inventory.php:25 -#: c:\Apache2\htdocs\account228/applications/manufacturing.php:25 -#: c:\Apache2\htdocs\account228/applications/suppliers.php:34 +#: ../applications/customers.php:47 +#: ../applications/dimensions.php:27 +#: ../applications/generalledger.php:34 +#: ../applications/inventory.php:24 +#: ../applications/manufacturing.php:24 +#: ../applications/suppliers.php:38 msgid "Inquiries and Reports" msgstr "" -#: c:\Apache2\htdocs\account228/applications/customers.php:49 +#: ../applications/customers.php:48 msgid "Sales Quotation I&nquiry" msgstr "" -#: c:\Apache2\htdocs\account228/applications/customers.php:51 +#: ../applications/customers.php:50 msgid "Sales Order &Inquiry" msgstr "" -#: c:\Apache2\htdocs\account228/applications/customers.php:53 +#: ../applications/customers.php:52 msgid "Customer Transaction &Inquiry" msgstr "" -#: c:\Apache2\htdocs\account228/applications/customers.php:56 +#: ../applications/customers.php:55 msgid "Customer Allocation &Inquiry" msgstr "" -#: c:\Apache2\htdocs\account228/applications/customers.php:59 +#: ../applications/customers.php:58 msgid "Customer and Sales &Reports" msgstr "" -#: c:\Apache2\htdocs\account228/applications/customers.php:62 -#: c:\Apache2\htdocs\account228/applications/dimensions.php:35 -#: c:\Apache2\htdocs\account228/applications/generalledger.php:54 -#: c:\Apache2\htdocs\account228/applications/inventory.php:33 -#: c:\Apache2\htdocs\account228/applications/manufacturing.php:35 -#: c:\Apache2\htdocs\account228/applications/setup.php:53 -#: c:\Apache2\htdocs\account228/applications/suppliers.php:46 +#: ../applications/customers.php:61 +#: ../applications/dimensions.php:34 +#: ../applications/generalledger.php:55 +#: ../applications/inventory.php:32 +#: ../applications/manufacturing.php:34 +#: ../applications/setup.php:54 +#: ../applications/suppliers.php:50 msgid "Maintenance" msgstr "" -#: c:\Apache2\htdocs\account228/applications/customers.php:63 +#: ../applications/customers.php:62 msgid "Add and Manage &Customers" msgstr "" -#: c:\Apache2\htdocs\account228/applications/customers.php:65 +#: ../applications/customers.php:64 msgid "Customer &Branches" msgstr "" -#: c:\Apache2\htdocs\account228/applications/customers.php:67 +#: ../applications/customers.php:66 msgid "Sales &Groups" msgstr "" -#: c:\Apache2\htdocs\account228/applications/customers.php:69 +#: ../applications/customers.php:68 msgid "Recurrent &Invoices" msgstr "" -#: c:\Apache2\htdocs\account228/applications/customers.php:71 +#: ../applications/customers.php:70 msgid "Sales T&ypes" msgstr "" -#: c:\Apache2\htdocs\account228/applications/customers.php:73 +#: ../applications/customers.php:72 msgid "Sales &Persons" msgstr "" -#: c:\Apache2\htdocs\account228/applications/customers.php:75 +#: ../applications/customers.php:74 msgid "Sales &Areas" msgstr "" -#: c:\Apache2\htdocs\account228/applications/customers.php:77 +#: ../applications/customers.php:76 msgid "Credit &Status Setup" msgstr "" -#: c:\Apache2\htdocs\account228/applications/dimensions.php:18 +#: ../applications/dimensions.php:17 msgid "&Dimensions" msgstr "" -#: c:\Apache2\htdocs\account228/applications/dimensions.php:23 +#: ../applications/dimensions.php:22 msgid "Dimension &Entry" msgstr "" -#: c:\Apache2\htdocs\account228/applications/dimensions.php:25 +#: ../applications/dimensions.php:24 msgid "&Outstanding Dimensions" msgstr "" -#: c:\Apache2\htdocs\account228/applications/dimensions.php:29 +#: ../applications/dimensions.php:28 msgid "Dimension &Inquiry" msgstr "" -#: c:\Apache2\htdocs\account228/applications/dimensions.php:32 +#: ../applications/dimensions.php:31 msgid "Dimension &Reports" msgstr "" -#: c:\Apache2\htdocs\account228/applications/dimensions.php:36 +#: ../applications/dimensions.php:35 msgid "Dimension &Tags" msgstr "" -#: c:\Apache2\htdocs\account228/applications/generalledger.php:17 +#: ../applications/generalledger.php:16 msgid "&Banking and General Ledger" msgstr "" -#: c:\Apache2\htdocs\account228/applications/generalledger.php:20 +#: ../applications/generalledger.php:19 msgid "&Payments" msgstr "" -#: c:\Apache2\htdocs\account228/applications/generalledger.php:22 +#: ../applications/generalledger.php:21 msgid "&Deposits" msgstr "" -#: c:\Apache2\htdocs\account228/applications/generalledger.php:24 +#: ../applications/generalledger.php:23 msgid "Bank Account &Transfers" msgstr "" -#: c:\Apache2\htdocs\account228/applications/generalledger.php:26 +#: ../applications/generalledger.php:25 msgid "&Journal Entry" msgstr "" -#: c:\Apache2\htdocs\account228/applications/generalledger.php:28 +#: ../applications/generalledger.php:27 msgid "&Budget Entry" msgstr "" -#: c:\Apache2\htdocs\account228/applications/generalledger.php:30 +#: ../applications/generalledger.php:29 msgid "&Reconcile Bank Account" msgstr "" -#: c:\Apache2\htdocs\account228/applications/generalledger.php:34 +#: ../applications/generalledger.php:31 +msgid "Revenue / &Costs Accruals" +msgstr "" + +#: ../applications/generalledger.php:35 msgid "&Journal Inquiry" msgstr "" -#: c:\Apache2\htdocs\account228/applications/generalledger.php:36 +#: ../applications/generalledger.php:37 msgid "GL &Inquiry" msgstr "" -#: c:\Apache2\htdocs\account228/applications/generalledger.php:38 +#: ../applications/generalledger.php:39 msgid "Bank Account &Inquiry" msgstr "" -#: c:\Apache2\htdocs\account228/applications/generalledger.php:40 +#: ../applications/generalledger.php:41 msgid "Ta&x Inquiry" msgstr "" -#: c:\Apache2\htdocs\account228/applications/generalledger.php:43 +#: ../applications/generalledger.php:44 +#: ../reporting/reports_main.php:287 +#: ../reporting/reports_main.php:332 +#: ../reporting/reports_main.php:372 msgid "Trial &Balance" msgstr "" -#: c:\Apache2\htdocs\account228/applications/generalledger.php:45 +#: ../applications/generalledger.php:46 msgid "Balance &Sheet Drilldown" msgstr "" -#: c:\Apache2\htdocs\account228/applications/generalledger.php:47 +#: ../applications/generalledger.php:48 msgid "&Profit and Loss Drilldown" msgstr "" -#: c:\Apache2\htdocs\account228/applications/generalledger.php:49 +#: ../applications/generalledger.php:50 msgid "Banking &Reports" msgstr "" -#: c:\Apache2\htdocs\account228/applications/generalledger.php:51 +#: ../applications/generalledger.php:52 msgid "General Ledger &Reports" msgstr "" -#: c:\Apache2\htdocs\account228/applications/generalledger.php:55 +#: ../applications/generalledger.php:56 msgid "Bank &Accounts" msgstr "" -#: c:\Apache2\htdocs\account228/applications/generalledger.php:57 +#: ../applications/generalledger.php:58 msgid "&Quick Entries" msgstr "" -#: c:\Apache2\htdocs\account228/applications/generalledger.php:59 +#: ../applications/generalledger.php:60 msgid "Account &Tags" msgstr "" -#: c:\Apache2\htdocs\account228/applications/generalledger.php:62 +#: ../applications/generalledger.php:63 msgid "&Currencies" msgstr "" -#: c:\Apache2\htdocs\account228/applications/generalledger.php:64 +#: ../applications/generalledger.php:65 msgid "&Exchange Rates" msgstr "" -#: c:\Apache2\htdocs\account228/applications/generalledger.php:67 +#: ../applications/generalledger.php:68 msgid "&GL Accounts" msgstr "" -#: c:\Apache2\htdocs\account228/applications/generalledger.php:69 +#: ../applications/generalledger.php:70 msgid "GL Account &Groups" msgstr "" -#: c:\Apache2\htdocs\account228/applications/generalledger.php:71 +#: ../applications/generalledger.php:72 msgid "GL Account &Classes" msgstr "" -#: c:\Apache2\htdocs\account228/applications/inventory.php:17 +#: ../applications/generalledger.php:75 +msgid "&Revaluation of Currency Accounts" +msgstr "" + +#: ../applications/inventory.php:16 msgid "&Items and Inventory" msgstr "" -#: c:\Apache2\htdocs\account228/applications/inventory.php:20 +#: ../applications/inventory.php:19 msgid "Inventory Location &Transfers" msgstr "" -#: c:\Apache2\htdocs\account228/applications/inventory.php:22 +#: ../applications/inventory.php:21 msgid "Inventory &Adjustments" msgstr "" -#: c:\Apache2\htdocs\account228/applications/inventory.php:26 +#: ../applications/inventory.php:25 msgid "Inventory Item &Movements" msgstr "" -#: c:\Apache2\htdocs\account228/applications/inventory.php:28 +#: ../applications/inventory.php:27 msgid "Inventory Item &Status" msgstr "" -#: c:\Apache2\htdocs\account228/applications/inventory.php:30 +#: ../applications/inventory.php:29 msgid "Inventory &Reports" msgstr "" -#: c:\Apache2\htdocs\account228/applications/inventory.php:34 +#: ../applications/inventory.php:33 msgid "&Items" msgstr "" -#: c:\Apache2\htdocs\account228/applications/inventory.php:36 +#: ../applications/inventory.php:35 msgid "&Foreign Item Codes" msgstr "" -#: c:\Apache2\htdocs\account228/applications/inventory.php:38 +#: ../applications/inventory.php:37 msgid "Sales &Kits" msgstr "" -#: c:\Apache2\htdocs\account228/applications/inventory.php:40 +#: ../applications/inventory.php:39 msgid "Item &Categories" msgstr "" -#: c:\Apache2\htdocs\account228/applications/inventory.php:42 +#: ../applications/inventory.php:41 msgid "Inventory &Locations" msgstr "" -#: c:\Apache2\htdocs\account228/applications/inventory.php:44 +#: ../applications/inventory.php:43 msgid "Inventory &Movement Types" msgstr "" -#: c:\Apache2\htdocs\account228/applications/inventory.php:46 +#: ../applications/inventory.php:45 msgid "&Units of Measure" msgstr "" -#: c:\Apache2\htdocs\account228/applications/inventory.php:48 +#: ../applications/inventory.php:47 msgid "&Reorder Levels" msgstr "" -#: c:\Apache2\htdocs\account228/applications/inventory.php:51 +#: ../applications/inventory.php:50 msgid "Pricing and Costs" msgstr "" -#: c:\Apache2\htdocs\account228/applications/inventory.php:52 +#: ../applications/inventory.php:51 msgid "Sales &Pricing" msgstr "" -#: c:\Apache2\htdocs\account228/applications/inventory.php:54 +#: ../applications/inventory.php:53 msgid "Purchasing &Pricing" msgstr "" -#: c:\Apache2\htdocs\account228/applications/inventory.php:56 +#: ../applications/inventory.php:55 msgid "Standard &Costs" msgstr "" -#: c:\Apache2\htdocs\account228/applications/manufacturing.php:17 +#: ../applications/manufacturing.php:16 msgid "&Manufacturing" msgstr "" -#: c:\Apache2\htdocs\account228/applications/manufacturing.php:20 +#: ../applications/manufacturing.php:19 +#: ../sales/sales_order_entry.php:112 msgid "Work &Order Entry" msgstr "" -#: c:\Apache2\htdocs\account228/applications/manufacturing.php:22 +#: ../applications/manufacturing.php:21 msgid "&Outstanding Work Orders" msgstr "" -#: c:\Apache2\htdocs\account228/applications/manufacturing.php:26 +#: ../applications/manufacturing.php:25 +#: ../manufacturing/inquiry/bom_cost_inquiry.php:16 msgid "Costed Bill Of Material Inquiry" msgstr "" -#: c:\Apache2\htdocs\account228/applications/manufacturing.php:28 +#: ../applications/manufacturing.php:27 msgid "Inventory Item Where Used &Inquiry" msgstr "" -#: c:\Apache2\htdocs\account228/applications/manufacturing.php:30 +#: ../applications/manufacturing.php:29 msgid "Work Order &Inquiry" msgstr "" -#: c:\Apache2\htdocs\account228/applications/manufacturing.php:32 +#: ../applications/manufacturing.php:31 msgid "Manufacturing &Reports" msgstr "" -#: c:\Apache2\htdocs\account228/applications/manufacturing.php:36 +#: ../applications/manufacturing.php:35 msgid "&Bills Of Material" msgstr "" -#: c:\Apache2\htdocs\account228/applications/manufacturing.php:38 +#: ../applications/manufacturing.php:37 msgid "&Work Centres" msgstr "" -#: c:\Apache2\htdocs\account228/applications/setup.php:17 +#: ../applications/setup.php:16 msgid "S&etup" msgstr "" -#: c:\Apache2\htdocs\account228/applications/setup.php:20 +#: ../applications/setup.php:19 msgid "&Company Setup" msgstr "" -#: c:\Apache2\htdocs\account228/applications/setup.php:22 +#: ../applications/setup.php:21 msgid "&User Accounts Setup" msgstr "" -#: c:\Apache2\htdocs\account228/applications/setup.php:24 +#: ../applications/setup.php:23 msgid "&Access Setup" msgstr "" -#: c:\Apache2\htdocs\account228/applications/setup.php:26 +#: ../applications/setup.php:25 msgid "&Display Setup" msgstr "" -#: c:\Apache2\htdocs\account228/applications/setup.php:28 +#: ../applications/setup.php:27 msgid "&Forms Setup" msgstr "" -#: c:\Apache2\htdocs\account228/applications/setup.php:30 +#: ../applications/setup.php:29 msgid "&Taxes" msgstr "" -#: c:\Apache2\htdocs\account228/applications/setup.php:32 +#: ../applications/setup.php:31 msgid "Tax &Groups" msgstr "" -#: c:\Apache2\htdocs\account228/applications/setup.php:34 +#: ../applications/setup.php:33 msgid "Item Ta&x Types" msgstr "" -#: c:\Apache2\htdocs\account228/applications/setup.php:36 +#: ../applications/setup.php:35 msgid "System and &General GL Setup" msgstr "" -#: c:\Apache2\htdocs\account228/applications/setup.php:38 +#: ../applications/setup.php:37 msgid "&Fiscal Years" msgstr "" -#: c:\Apache2\htdocs\account228/applications/setup.php:40 +#: ../applications/setup.php:39 msgid "&Print Profiles" msgstr "" -#: c:\Apache2\htdocs\account228/applications/setup.php:44 +#: ../applications/setup.php:43 msgid "Pa&yment Terms" msgstr "" -#: c:\Apache2\htdocs\account228/applications/setup.php:46 +#: ../applications/setup.php:45 msgid "Shi&pping Company" msgstr "" -#: c:\Apache2\htdocs\account228/applications/setup.php:48 +#: ../applications/setup.php:47 msgid "&Points of Sale" msgstr "" -#: c:\Apache2\htdocs\account228/applications/setup.php:50 +#: ../applications/setup.php:49 msgid "&Printers" msgstr "" -#: c:\Apache2\htdocs\account228/applications/setup.php:54 +#: ../applications/setup.php:51 +msgid "Contact &Categories" +msgstr "" + +#: ../applications/setup.php:55 msgid "&Void a Transaction" msgstr "" -#: c:\Apache2\htdocs\account228/applications/setup.php:56 +#: ../applications/setup.php:57 msgid "View or &Print Transactions" msgstr "" -#: c:\Apache2\htdocs\account228/applications/setup.php:58 +#: ../applications/setup.php:59 msgid "&Attach Documents" msgstr "" -#: c:\Apache2\htdocs\account228/applications/setup.php:60 +#: ../applications/setup.php:61 msgid "System &Diagnostics" msgstr "" -#: c:\Apache2\htdocs\account228/applications/setup.php:63 +#: ../applications/setup.php:64 msgid "&Backup and Restore" msgstr "" -#: c:\Apache2\htdocs\account228/applications/setup.php:65 +#: ../applications/setup.php:66 msgid "Create/Update &Companies" msgstr "" -#: c:\Apache2\htdocs\account228/applications/setup.php:67 +#: ../applications/setup.php:68 msgid "Install/Update &Languages" msgstr "" -#: c:\Apache2\htdocs\account228/applications/setup.php:69 +#: ../applications/setup.php:70 msgid "Install/Activate &Extensions" msgstr "" -#: c:\Apache2\htdocs\account228/applications/setup.php:71 +#: ../applications/setup.php:72 +msgid "Install/Activate &Themes" +msgstr "" + +#: ../applications/setup.php:74 +msgid "Install/Activate &Chart of Accounts" +msgstr "" + +#: ../applications/setup.php:76 msgid "Software &Upgrade" msgstr "" -#: c:\Apache2\htdocs\account228/applications/suppliers.php:17 +#: ../applications/suppliers.php:16 msgid "&Purchases" msgstr "" -#: c:\Apache2\htdocs\account228/applications/suppliers.php:20 +#: ../applications/suppliers.php:19 msgid "Purchase &Order Entry" msgstr "" -#: c:\Apache2\htdocs\account228/applications/suppliers.php:22 +#: ../applications/suppliers.php:21 msgid "&Outstanding Purchase Orders Maintenance" msgstr "" -#: c:\Apache2\htdocs\account228/applications/suppliers.php:24 +#: ../applications/suppliers.php:23 +msgid "Direct &GRN" +msgstr "" + +#: ../applications/suppliers.php:28 msgid "&Payments to Suppliers" msgstr "" -#: c:\Apache2\htdocs\account228/applications/suppliers.php:27 +#: ../applications/suppliers.php:31 msgid "Supplier &Invoices" msgstr "" -#: c:\Apache2\htdocs\account228/applications/suppliers.php:29 +#: ../applications/suppliers.php:33 msgid "Supplier &Credit Notes" msgstr "" -#: c:\Apache2\htdocs\account228/applications/suppliers.php:31 +#: ../applications/suppliers.php:35 msgid "&Allocate Supplier Payments or Credit Notes" msgstr "" -#: c:\Apache2\htdocs\account228/applications/suppliers.php:35 +#: ../applications/suppliers.php:39 msgid "Purchase Orders &Inquiry" msgstr "" -#: c:\Apache2\htdocs\account228/applications/suppliers.php:37 +#: ../applications/suppliers.php:41 msgid "Supplier Transaction &Inquiry" msgstr "" -#: c:\Apache2\htdocs\account228/applications/suppliers.php:40 +#: ../applications/suppliers.php:44 msgid "Supplier Allocation &Inquiry" msgstr "" -#: c:\Apache2\htdocs\account228/applications/suppliers.php:43 +#: ../applications/suppliers.php:47 msgid "Supplier and Purchasing &Reports" msgstr "" -#: c:\Apache2\htdocs\account228/applications/suppliers.php:47 +#: ../applications/suppliers.php:51 msgid "&Suppliers" msgstr "" -#: c:\Apache2\htdocs\account228/dimensions/dimension_entry.php:27 +#: ../dimensions/dimension_entry.php:27 msgid "Dimension Entry" msgstr "" -#: c:\Apache2\htdocs\account228/dimensions/dimension_entry.php:47 +#: ../dimensions/dimension_entry.php:47 msgid "The dimension has been entered." msgstr "" -#: c:\Apache2\htdocs\account228/dimensions/dimension_entry.php:58 +#: ../dimensions/dimension_entry.php:58 msgid "The dimension has been updated." msgstr "" -#: c:\Apache2\htdocs\account228/dimensions/dimension_entry.php:68 +#: ../dimensions/dimension_entry.php:68 msgid "The dimension has been deleted." msgstr "" -#: c:\Apache2\htdocs\account228/dimensions/dimension_entry.php:78 +#: ../dimensions/dimension_entry.php:78 msgid "The dimension has been closed. There can be no more changes to it." msgstr "" -#: c:\Apache2\htdocs\account228/dimensions/dimension_entry.php:88 +#: ../dimensions/dimension_entry.php:88 msgid "The dimension has been re-opened. " msgstr "" -#: c:\Apache2\htdocs\account228/dimensions/dimension_entry.php:98 +#: ../dimensions/dimension_entry.php:98 msgid "Enter a &new dimension" msgstr "" -#: c:\Apache2\htdocs\account228/dimensions/dimension_entry.php:100 +#: ../dimensions/dimension_entry.php:100 msgid "&Select an existing dimension" msgstr "" -#: c:\Apache2\htdocs\account228/dimensions/dimension_entry.php:116 +#: ../dimensions/dimension_entry.php:116 msgid "The dimension reference must be entered." msgstr "" -#: c:\Apache2\htdocs\account228/dimensions/dimension_entry.php:123 +#: ../dimensions/dimension_entry.php:123 +#: ../gl/bank_transfer.php:146 +#: ../gl/gl_bank.php:235 +#: ../gl/gl_journal.php:174 +#: ../gl/manage/revaluate_currencies.php:69 +#: ../inventory/adjustments.php:101 +#: ../inventory/transfers.php:99 +#: ../manufacturing/work_order_add_finished.php:84 +#: ../manufacturing/work_order_entry.php:138 +#: ../manufacturing/work_order_issue.php:98 +#: ../purchasing/po_entry_items.php:353 +#: ../purchasing/po_receive_items.php:184 +#: ../purchasing/supplier_credit.php:156 +#: ../purchasing/supplier_invoice.php:154 +#: ../purchasing/supplier_payment.php:198 +#: ../sales/credit_note_entry.php:149 +#: ../sales/customer_credit_invoice.php:106 +#: ../sales/customer_delivery.php:181 +#: ../sales/customer_invoice.php:285 +#: ../sales/customer_payments.php:112 +#: ../sales/sales_order_entry.php:404 msgid "The entered reference is already in use." msgstr "" -#: c:\Apache2\htdocs\account228/dimensions/dimension_entry.php:131 +#: ../dimensions/dimension_entry.php:131 msgid "The dimension name must be entered." msgstr "" -#: c:\Apache2\htdocs\account228/dimensions/dimension_entry.php:138 +#: ../dimensions/dimension_entry.php:138 +#: ../manufacturing/work_order_entry.php:153 +#: ../manufacturing/work_order_entry.php:233 +#: ../purchasing/po_entry_items.php:232 msgid "The date entered is in an invalid format." msgstr "" -#: c:\Apache2\htdocs\account228/dimensions/dimension_entry.php:145 +#: ../dimensions/dimension_entry.php:145 msgid "The required by date entered is in an invalid format." msgstr "" -#: c:\Apache2\htdocs\account228/dimensions/dimension_entry.php:190 +#: ../dimensions/dimension_entry.php:190 msgid "This dimension cannot be deleted because it has already been processed." msgstr "" -#: c:\Apache2\htdocs\account228/dimensions/dimension_entry.php:234 +#: ../dimensions/dimension_entry.php:234 msgid "The dimension sent is not valid." msgstr "" -#: c:\Apache2\htdocs\account228/dimensions/dimension_entry.php:261 -#: c:\Apache2\htdocs\account228/dimensions/dimension_entry.php:268 +#: ../dimensions/dimension_entry.php:261 +#: ../dimensions/dimension_entry.php:268 msgid "Dimension Reference:" msgstr "" -#: c:\Apache2\htdocs\account228/dimensions/dimension_entry.php:275 -msgid "Type" -msgstr "" - -#: c:\Apache2\htdocs\account228/dimensions/dimension_entry.php:277 +#: ../dimensions/dimension_entry.php:277 +#: ../reporting/reports_main.php:34 +#: ../reporting/reports_main.php:67 +#: ../reporting/reports_main.php:75 +#: ../reporting/reports_main.php:126 +#: ../reporting/reports_main.php:189 +#: ../reporting/reports_main.php:197 +#: ../reporting/reports_main.php:229 +#: ../reporting/reports_main.php:240 +#: ../reporting/reports_main.php:251 +#: ../reporting/reports_main.php:267 +#: ../reporting/reports_main.php:277 +#: ../reporting/reports_main.php:288 +#: ../reporting/reports_main.php:300 +#: ../reporting/reports_main.php:314 +#: ../reporting/reports_main.php:323 +#: ../reporting/reports_main.php:333 +#: ../reporting/reports_main.php:344 +#: ../reporting/reports_main.php:356 +#: ../reporting/reports_main.php:364 +#: ../reporting/reports_main.php:373 +#: ../reporting/reports_main.php:381 +#: ../reporting/reports_main.php:387 msgid "Start Date" msgstr "" -#: c:\Apache2\htdocs\account228/dimensions/dimension_entry.php:279 +#: ../dimensions/dimension_entry.php:279 +#: ../manufacturing/work_order_entry.php:418 msgid "Date Required By" msgstr "" -#: c:\Apache2\htdocs\account228/dimensions/dimension_entry.php:281 +#: ../dimensions/dimension_entry.php:281 msgid "Tags:" msgstr "" -#: c:\Apache2\htdocs\account228/dimensions/dimension_entry.php:288 +#: ../dimensions/dimension_entry.php:288 msgid "This Dimension is closed." msgstr "" -#: c:\Apache2\htdocs\account228/dimensions/dimension_entry.php:293 +#: ../dimensions/dimension_entry.php:293 msgid "Save changes to dimension" msgstr "" -#: c:\Apache2\htdocs\account228/dimensions/dimension_entry.php:295 +#: ../dimensions/dimension_entry.php:295 msgid "Re-open This Dimension" msgstr "" -#: c:\Apache2\htdocs\account228/dimensions/dimension_entry.php:295 +#: ../dimensions/dimension_entry.php:295 msgid "Mark this dimension as re-opened" msgstr "" -#: c:\Apache2\htdocs\account228/dimensions/dimension_entry.php:297 +#: ../dimensions/dimension_entry.php:297 msgid "Close This Dimension" msgstr "" -#: c:\Apache2\htdocs\account228/dimensions/dimension_entry.php:297 +#: ../dimensions/dimension_entry.php:297 msgid "Mark this dimension as closed" msgstr "" -#: c:\Apache2\htdocs\account228/dimensions/dimension_entry.php:298 +#: ../dimensions/dimension_entry.php:298 msgid "Delete This Dimension" msgstr "" -#: c:\Apache2\htdocs\account228/dimensions/dimension_entry.php:298 +#: ../dimensions/dimension_entry.php:298 msgid "Delete unused dimension" msgstr "" -#: c:\Apache2\htdocs\account228/dimensions/dimension_entry.php:302 +#: ../dimensions/dimension_entry.php:302 +#: ../includes/ui/simple_crud_class.inc:225 +#: ../purchasing/includes/ui/invoice_ui.inc:186 +#: ../purchasing/includes/ui/invoice_ui.inc:386 +#: ../purchasing/includes/ui/invoice_ui.inc:388 msgid "Add" msgstr "" -#: c:\Apache2\htdocs\account228/dimensions/inquiry/search_dimensions.php:29 +#: ../dimensions/includes/dimensions_ui.inc:24 +msgid "There are no transactions for this dimension for the selected period." +msgstr "" + +#: ../dimensions/includes/dimensions_ui.inc:28 +msgid "Balance for this Dimension" +msgstr "" + +#: ../dimensions/includes/dimensions_ui.inc:31 +#: ../gl/accruals.php:87 +#: ../gl/inquiry/gl_account_inquiry.php:128 +#: ../gl/inquiry/gl_trial_balance.php:83 +#: ../gl/manage/gl_quick_entries.php:241 +#: ../gl/manage/gl_quick_entries.php:334 +#: ../includes/sysnames.inc:164 +#: ../purchasing/includes/ui/invoice_ui.inc:245 +#: ../purchasing/includes/ui/invoice_ui.inc:247 +#: ../purchasing/includes/ui/invoice_ui.inc:249 +#: ../reporting/rep701.php:106 +#: ../reporting/rep705.php:234 +#: ../reporting/rep706.php:181 +#: ../reporting/rep707.php:206 +#: ../reporting/rep708.php:80 +msgid "Account" +msgstr "" + +#: ../dimensions/includes/dimensions_ui.inc:31 +#: ../gl/accruals.php:95 +#: ../gl/bank_account_reconcile.php:237 +#: ../gl/inquiry/bank_inquiry.php:68 +#: ../gl/inquiry/gl_account_inquiry.php:140 +#: ../gl/inquiry/gl_account_inquiry.php:142 +#: ../gl/inquiry/gl_trial_balance.php:89 +#: ../gl/inquiry/gl_trial_balance.php:91 +#: ../gl/inquiry/gl_trial_balance.php:93 +#: ../gl/view/accrual_trans.php:60 +#: ../gl/view/gl_trans_view.php:64 +#: ../gl/view/gl_trans_view.php:67 +#: ../gl/view/gl_trans_view.php:70 +#: ../gl/includes/ui/gl_journal_ui.inc:84 +#: ../gl/includes/ui/gl_journal_ui.inc:87 +#: ../gl/includes/ui/gl_journal_ui.inc:90 +#: ../purchasing/inquiry/supplier_allocation_inquiry.php:133 +#: ../purchasing/inquiry/supplier_inquiry.php:170 +#: ../reporting/rep601.php:77 +#: ../reporting/rep702.php:52 +#: ../reporting/rep704.php:79 +#: ../reporting/rep704.php:82 +#: ../reporting/rep704.php:85 +#: ../reporting/rep708.php:80 +#: ../reporting/rep708.php:81 +#: ../sales/inquiry/customer_allocation_inquiry.php:149 +#: ../sales/inquiry/customer_inquiry.php:221 +msgid "Debit" +msgstr "" + +#: ../dimensions/includes/dimensions_ui.inc:31 +#: ../gl/accruals.php:95 +#: ../gl/bank_account_reconcile.php:238 +#: ../gl/inquiry/bank_inquiry.php:68 +#: ../gl/inquiry/gl_account_inquiry.php:140 +#: ../gl/inquiry/gl_account_inquiry.php:142 +#: ../gl/inquiry/gl_trial_balance.php:90 +#: ../gl/inquiry/gl_trial_balance.php:92 +#: ../gl/inquiry/gl_trial_balance.php:94 +#: ../gl/view/accrual_trans.php:60 +#: ../gl/view/gl_trans_view.php:64 +#: ../gl/view/gl_trans_view.php:67 +#: ../gl/view/gl_trans_view.php:70 +#: ../gl/includes/ui/gl_journal_ui.inc:84 +#: ../gl/includes/ui/gl_journal_ui.inc:87 +#: ../gl/includes/ui/gl_journal_ui.inc:90 +#: ../includes/sysnames.inc:85 +#: ../purchasing/inquiry/supplier_allocation_inquiry.php:134 +#: ../purchasing/inquiry/supplier_inquiry.php:171 +#: ../reporting/rep601.php:77 +#: ../reporting/rep702.php:52 +#: ../reporting/rep704.php:79 +#: ../reporting/rep704.php:82 +#: ../reporting/rep704.php:85 +#: ../reporting/rep708.php:80 +#: ../reporting/rep708.php:81 +#: ../sales/inquiry/customer_allocation_inquiry.php:150 +#: ../sales/inquiry/customer_inquiry.php:222 +msgid "Credit" +msgstr "" + +#: ../dimensions/includes/dimensions_ui.inc:45 +#: ../dimensions/inquiry/search_dimensions.php:134 +#: ../gl/inquiry/bank_inquiry.php:68 +#: ../gl/inquiry/gl_account_inquiry.php:140 +#: ../gl/inquiry/gl_trial_balance.php:87 +#: ../purchasing/inquiry/supplier_allocation_inquiry.php:136 +#: ../reporting/rep203.php:92 +#: ../reporting/rep204.php:82 +#: ../reporting/rep601.php:77 +#: ../reporting/rep701.php:106 +#: ../reporting/rep704.php:79 +#: ../reporting/rep704.php:82 +#: ../reporting/rep704.php:85 +#: ../reporting/rep708.php:72 +#: ../sales/inquiry/customer_allocation_inquiry.php:152 +msgid "Balance" +msgstr "" + +#: ../dimensions/inquiry/search_dimensions.php:29 msgid "Search Outstanding Dimensions" msgstr "" -#: c:\Apache2\htdocs\account228/dimensions/inquiry/search_dimensions.php:34 +#: ../dimensions/inquiry/search_dimensions.php:34 msgid "Search Dimensions" msgstr "" -#: c:\Apache2\htdocs\account228/dimensions/inquiry/search_dimensions.php:73 -#: c:\Apache2\htdocs\account228/gl/bank_transfer.php:89 +#: ../dimensions/inquiry/search_dimensions.php:73 +#: ../gl/bank_transfer.php:89 +#: ../gl/inquiry/journal_inquiry.php:45 +#: ../gl/manage/revaluate_currencies.php:102 +#: ../gl/includes/ui/gl_bank_ui.inc:101 +#: ../gl/includes/ui/gl_journal_ui.inc:30 +#: ../includes/ui/contacts_view.inc:94 +#: ../inventory/includes/item_adjustments_ui.inc:35 +#: ../inventory/includes/stock_transfers_ui.inc:40 +#: ../manufacturing/search_work_orders.php:67 +#: ../manufacturing/work_order_add_finished.php:198 +#: ../manufacturing/work_order_entry.php:376 +#: ../manufacturing/work_order_entry.php:383 +#: ../manufacturing/includes/work_order_issue_ui.inc:152 +#: ../purchasing/includes/ui/invoice_ui.inc:92 +#: ../purchasing/includes/ui/po_ui.inc:159 +#: ../purchasing/includes/ui/po_ui.inc:164 +#: ../purchasing/supplier_payment.php:271 +#: ../sales/customer_payments.php:258 msgid "Reference:" msgstr "" -#: c:\Apache2\htdocs\account228/dimensions/inquiry/search_dimensions.php:75 +#: ../dimensions/inquiry/search_dimensions.php:75 +#: ../includes/ui/allocation_cart.inc:284 +#: ../includes/ui/ui_lists.inc:1885 +#: ../reporting/rep101.php:112 +#: ../reporting/rep102.php:88 +#: ../reporting/rep104.php:95 +#: ../reporting/rep104.php:99 +#: ../reporting/rep105.php:93 +#: ../reporting/rep105.php:97 +#: ../reporting/rep201.php:100 +#: ../reporting/rep202.php:90 +#: ../reporting/rep203.php:72 +#: ../reporting/rep204.php:75 +#: ../reporting/rep301.php:86 +#: ../reporting/rep301.php:93 +#: ../reporting/rep302.php:103 +#: ../reporting/rep302.php:110 +#: ../reporting/rep303.php:84 +#: ../reporting/rep303.php:91 +#: ../reporting/rep304.php:96 +#: ../reporting/rep304.php:103 +#: ../reporting/rep304.php:108 +#: ../reporting/rep702.php:59 +#: ../reporting/rep710.php:84 +#: ../reporting/rep710.php:85 msgid "All" msgstr "" -#: c:\Apache2\htdocs\account228/dimensions/inquiry/search_dimensions.php:76 +#: ../dimensions/inquiry/search_dimensions.php:76 +#: ../gl/inquiry/bank_inquiry.php:46 +#: ../gl/inquiry/gl_trial_balance.php:46 +#: ../gl/inquiry/journal_inquiry.php:48 +#: ../gl/inquiry/profit_loss.php:163 +#: ../gl/includes/ui/gl_bank_ui.inc:23 +#: ../gl/includes/ui/gl_bank_ui.inc:50 +#: ../inventory/inquiry/stock_movements.php:58 +#: ../purchasing/inquiry/supplier_allocation_inquiry.php:50 +#: ../purchasing/inquiry/supplier_inquiry.php:49 +#: ../sales/inquiry/customer_inquiry.php:46 msgid "From:" msgstr "" -#: c:\Apache2\htdocs\account228/dimensions/inquiry/search_dimensions.php:77 +#: ../dimensions/inquiry/search_dimensions.php:77 +#: ../gl/inquiry/bank_inquiry.php:47 +#: ../gl/inquiry/gl_trial_balance.php:47 +#: ../gl/inquiry/journal_inquiry.php:49 +#: ../gl/inquiry/profit_loss.php:164 +#: ../gl/includes/ui/gl_bank_ui.inc:23 +#: ../inventory/inquiry/stock_movements.php:59 +#: ../purchasing/inquiry/supplier_allocation_inquiry.php:51 +#: ../purchasing/inquiry/supplier_inquiry.php:50 +#: ../sales/inquiry/customer_inquiry.php:47 msgid "To:" msgstr "" -#: c:\Apache2\htdocs\account228/dimensions/inquiry/search_dimensions.php:79 +#: ../dimensions/inquiry/search_dimensions.php:79 +#: ../manufacturing/search_work_orders.php:71 msgid "Only Overdue:" msgstr "" -#: c:\Apache2\htdocs\account228/dimensions/inquiry/search_dimensions.php:83 +#: ../dimensions/inquiry/search_dimensions.php:83 +#: ../manufacturing/search_work_orders.php:74 msgid "Only Open:" msgstr "" -#: c:\Apache2\htdocs\account228/dimensions/inquiry/search_dimensions.php:174 -#: c:\Apache2\htdocs\account228/dimensions/view/view_dimension.php:54 -#: c:\Apache2\htdocs\account228/gl/bank_account_reconcile.php:264 -msgid "Date" -msgstr "" - -#: c:\Apache2\htdocs\account228/dimensions/inquiry/search_dimensions.php:175 -#: c:\Apache2\htdocs\account228/dimensions/view/view_dimension.php:54 +#: ../dimensions/inquiry/search_dimensions.php:132 +#: ../dimensions/view/view_dimension.php:54 +#: ../includes/ui/allocation_cart.inc:263 +#: ../purchasing/includes/ui/invoice_ui.inc:112 +#: ../purchasing/view/view_supp_credit.php:48 +#: ../purchasing/view/view_supp_invoice.php:51 +#: ../purchasing/inquiry/supplier_allocation_inquiry.php:131 +#: ../purchasing/inquiry/supplier_inquiry.php:168 +#: ../reporting/rep101.php:130 +#: ../reporting/rep201.php:118 +#: ../reporting/rep203.php:91 +#: ../reporting/rep501.php:85 +#: ../reporting/includes/doctext.inc:38 +#: ../reporting/includes/doctext.inc:108 +#: ../sales/customer_invoice.php:420 +#: ../sales/view/view_dispatch.php:97 +#: ../sales/view/view_invoice.php:96 +#: ../sales/inquiry/customer_allocation_inquiry.php:146 +#: ../sales/inquiry/customer_inquiry.php:217 +#: ../sales/includes/ui/sales_order_ui.inc:596 +#: ../themes/exclusive/renderer.php:289 +#: ../themes/exclusive/renderer.php:383 msgid "Due Date" msgstr "" -#: c:\Apache2\htdocs\account228/dimensions/inquiry/search_dimensions.php:177 -msgid "Balance" -msgstr "" - -#: c:\Apache2\htdocs\account228/dimensions/inquiry/search_dimensions.php:186 +#: ../dimensions/inquiry/search_dimensions.php:143 msgid "Marked dimensions are overdue." msgstr "" -#: c:\Apache2\htdocs\account228/dimensions/view/view_dimension.php:20 +#: ../dimensions/view/view_dimension.php:20 msgid "View Dimension" msgstr "" -#: c:\Apache2\htdocs\account228/dimensions/view/view_dimension.php:48 +#: ../dimensions/view/view_dimension.php:48 msgid "The dimension number sent is not valid." msgstr "" -#: c:\Apache2\htdocs\account228/dimensions/view/view_dimension.php:72 +#: ../dimensions/view/view_dimension.php:72 msgid "This dimension is closed." msgstr "" -#: c:\Apache2\htdocs\account228/dimensions/view/view_dimension.php:84 +#: ../dimensions/view/view_dimension.php:84 +#: ../gl/inquiry/gl_account_inquiry.php:70 +#: ../gl/inquiry/tax_inquiry.php:61 +#: ../purchasing/inquiry/po_search_completed.php:62 +#: ../purchasing/inquiry/po_search.php:64 +#: ../sales/inquiry/customer_allocation_inquiry.php:44 +#: ../sales/inquiry/sales_deliveries_view.php:104 +#: ../sales/inquiry/sales_orders_view.php:229 msgid "from:" msgstr "" -#: c:\Apache2\htdocs\account228/dimensions/view/view_dimension.php:85 +#: ../dimensions/view/view_dimension.php:85 +#: ../gl/inquiry/gl_account_inquiry.php:71 +#: ../gl/inquiry/tax_inquiry.php:62 +#: ../purchasing/inquiry/po_search_completed.php:63 +#: ../purchasing/inquiry/po_search.php:65 +#: ../sales/inquiry/customer_allocation_inquiry.php:45 +#: ../sales/inquiry/sales_deliveries_view.php:105 +#: ../sales/inquiry/sales_orders_view.php:230 msgid "to:" msgstr "" -#: c:\Apache2\htdocs\account228/dimensions/view/view_dimension.php:86 +#: ../dimensions/view/view_dimension.php:86 +#: ../gl/inquiry/balance_sheet.php:132 +#: ../gl/inquiry/bank_inquiry.php:49 +#: ../gl/inquiry/gl_account_inquiry.php:84 +#: ../gl/inquiry/gl_trial_balance.php:55 +#: ../gl/inquiry/profit_loss.php:178 +#: ../gl/inquiry/tax_inquiry.php:63 msgid "Show" msgstr "" -#: c:\Apache2\htdocs\account228/gl/bank_account_reconcile.php:33 +#: ../gl/accruals.php:20 +#: ../includes/access_levels.inc:243 +msgid "Revenue / Cost Accruals" +msgstr "" + +#: ../gl/accruals.php:44 +msgid "The amount can not be 0." +msgstr "" + +#: ../gl/accruals.php:50 +msgid "The periods must be greater than 0." +msgstr "" + +#: ../gl/accruals.php:64 +msgid "" +"Some of the period dates are outside the fiscal year. Create a new fiscal " +"year first!" +msgstr "" + +#: ../gl/accruals.php:89 +#: ../gl/accruals.php:91 +#: ../gl/accruals.php:199 +#: ../gl/accruals.php:201 +#: ../gl/gl_budget.php:71 +#: ../gl/gl_budget.php:72 +#: ../gl/gl_budget.php:76 +#: ../gl/inquiry/balance_sheet.php:129 +#: ../gl/inquiry/balance_sheet.php:131 +#: ../gl/inquiry/gl_account_inquiry.php:78 +#: ../gl/inquiry/gl_account_inquiry.php:80 +#: ../gl/inquiry/gl_account_inquiry.php:133 +#: ../gl/inquiry/gl_account_inquiry.php:135 +#: ../gl/inquiry/gl_trial_balance.php:49 +#: ../gl/inquiry/gl_trial_balance.php:51 +#: ../gl/inquiry/profit_loss.php:174 +#: ../gl/inquiry/profit_loss.php:176 +#: ../gl/manage/gl_quick_entries.php:262 +#: ../gl/manage/gl_quick_entries.php:264 +#: ../gl/manage/gl_quick_entries.php:344 +#: ../gl/manage/gl_quick_entries.php:346 +#: ../gl/view/accrual_trans.php:54 +#: ../gl/view/accrual_trans.php:56 +#: ../gl/view/gl_deposit_view.php:99 +#: ../gl/view/gl_deposit_view.php:102 +#: ../gl/view/gl_payment_view.php:98 +#: ../gl/view/gl_payment_view.php:101 +#: ../gl/view/gl_trans_view.php:63 +#: ../gl/view/gl_trans_view.php:66 +#: ../gl/includes/ui/gl_bank_ui.inc:121 +#: ../gl/includes/ui/gl_bank_ui.inc:122 +#: ../gl/includes/ui/gl_bank_ui.inc:124 +#: ../gl/includes/ui/gl_journal_ui.inc:83 +#: ../gl/includes/ui/gl_journal_ui.inc:84 +#: ../gl/includes/ui/gl_journal_ui.inc:86 +#: ../includes/sysnames.inc:43 +#: ../includes/sysnames.inc:165 +#: ../inventory/manage/item_categories.php:216 +#: ../inventory/manage/item_categories.php:218 +#: ../inventory/manage/items.php:353 +#: ../inventory/manage/items.php:355 +#: ../purchasing/includes/ui/invoice_ui.inc:245 +#: ../purchasing/includes/ui/invoice_ui.inc:247 +#: ../purchasing/manage/suppliers.php:135 +#: ../purchasing/manage/suppliers.php:136 +#: ../purchasing/manage/suppliers.php:138 +#: ../reporting/rep501.php:90 +#: ../reporting/rep704.php:78 +#: ../reporting/rep704.php:81 +#: ../reporting/rep704.php:92 +#: ../reporting/rep704.php:94 +#: ../reporting/rep704.php:102 +#: ../reporting/rep705.php:245 +#: ../reporting/rep705.php:247 +#: ../reporting/rep705.php:258 +#: ../reporting/rep706.php:190 +#: ../reporting/rep706.php:192 +#: ../reporting/rep706.php:200 +#: ../reporting/rep707.php:214 +#: ../reporting/rep707.php:216 +#: ../reporting/rep707.php:224 +#: ../reporting/rep708.php:89 +#: ../reporting/rep708.php:91 +#: ../reporting/rep708.php:98 +#: ../reporting/reports_main.php:255 +#: ../reporting/reports_main.php:256 +#: ../reporting/reports_main.php:261 +#: ../reporting/reports_main.php:262 +#: ../reporting/reports_main.php:269 +#: ../reporting/reports_main.php:270 +#: ../reporting/reports_main.php:280 +#: ../reporting/reports_main.php:281 +#: ../reporting/reports_main.php:292 +#: ../reporting/reports_main.php:293 +#: ../reporting/reports_main.php:304 +#: ../reporting/reports_main.php:309 +#: ../reporting/reports_main.php:316 +#: ../reporting/reports_main.php:326 +#: ../reporting/reports_main.php:337 +#: ../sales/customer_delivery.php:393 +#: ../sales/customer_delivery.php:401 +#: ../sales/customer_invoice.php:395 +#: ../sales/customer_invoice.php:422 +#: ../sales/manage/customers.php:234 +#: ../sales/manage/customers.php:236 +#: ../sales/includes/ui/sales_credit_ui.inc:132 +#: ../sales/includes/ui/sales_credit_ui.inc:137 +#: ../sales/includes/ui/sales_order_ui.inc:454 +#: ../sales/includes/ui/sales_order_ui.inc:459 +#: ../themes/exclusive/renderer.php:488 +#: ../themes/exclusive/renderer.php:506 +msgid "Dimension" +msgstr "" + +#: ../gl/accruals.php:95 +#: ../gl/accruals.php:209 +#: ../gl/inquiry/gl_account_inquiry.php:140 +#: ../gl/inquiry/gl_account_inquiry.php:142 +#: ../gl/inquiry/journal_inquiry.php:126 +#: ../gl/view/accrual_trans.php:60 +#: ../gl/view/gl_deposit_view.php:100 +#: ../gl/view/gl_deposit_view.php:103 +#: ../gl/view/gl_deposit_view.php:106 +#: ../gl/view/gl_payment_view.php:99 +#: ../gl/view/gl_payment_view.php:102 +#: ../gl/view/gl_payment_view.php:105 +#: ../gl/view/gl_trans_view.php:64 +#: ../gl/view/gl_trans_view.php:67 +#: ../gl/view/gl_trans_view.php:70 +#: ../gl/includes/ui/gl_bank_ui.inc:122 +#: ../gl/includes/ui/gl_bank_ui.inc:125 +#: ../gl/includes/ui/gl_bank_ui.inc:128 +#: ../gl/includes/ui/gl_bank_ui.inc:268 +#: ../gl/includes/ui/gl_journal_ui.inc:84 +#: ../gl/includes/ui/gl_journal_ui.inc:87 +#: ../gl/includes/ui/gl_journal_ui.inc:90 +#: ../gl/includes/ui/gl_journal_ui.inc:240 +#: ../inventory/includes/item_adjustments_ui.inc:181 +#: ../inventory/includes/stock_transfers_ui.inc:161 +#: ../manufacturing/includes/work_order_issue_ui.inc:165 +#: ../purchasing/includes/ui/invoice_ui.inc:245 +#: ../purchasing/includes/ui/invoice_ui.inc:247 +#: ../purchasing/includes/ui/invoice_ui.inc:249 +#: ../sales/customer_credit_invoice.php:375 +#: ../sales/customer_delivery.php:517 +#: ../sales/customer_invoice.php:551 +#: ../sales/includes/ui/sales_credit_ui.inc:339 +msgid "Memo" +msgstr "" + +#: ../gl/accruals.php:158 +msgid "Revenue / Cost Accruals have been processed." +msgstr "" + +#: ../gl/accruals.php:164 +msgid "Showing GL Transactions." +msgstr "" + +#: ../gl/accruals.php:176 +msgid "Weekly" +msgstr "" + +#: ../gl/accruals.php:177 +msgid "Bi-weekly" +msgstr "" + +#: ../gl/accruals.php:178 +#: ../gl/manage/gl_quick_entries.php:240 +#: ../gl/includes/ui/gl_journal_ui.inc:57 +#: ../sales/create_recurrent_invoices.php:98 +#: ../sales/manage/recurrent_invoices.php:85 +msgid "Monthly" +msgstr "" + +#: ../gl/accruals.php:179 +msgid "Quarterly" +msgstr "" + +#: ../gl/accruals.php:191 +msgid "First date of Accruals" +msgstr "" + +#: ../gl/accruals.php:193 +msgid "Accrued Balance Account" +msgstr "" + +#: ../gl/accruals.php:196 +msgid "Revenue / Cost Account" +msgstr "" + +#: ../gl/accruals.php:204 +#: ../gl/gl_budget.php:91 +#: ../gl/gl_budget.php:93 +#: ../gl/inquiry/journal_inquiry.php:125 +#: ../gl/inquiry/tax_inquiry.php:82 +#: ../gl/manage/gl_quick_entries.php:262 +#: ../gl/manage/gl_quick_entries.php:264 +#: ../gl/manage/gl_quick_entries.php:266 +#: ../gl/manage/gl_quick_entries.php:340 +#: ../gl/view/bank_transfer_view.php:70 +#: ../gl/view/bank_transfer_view.php:80 +#: ../gl/view/gl_deposit_view.php:67 +#: ../gl/view/gl_deposit_view.php:100 +#: ../gl/view/gl_deposit_view.php:103 +#: ../gl/view/gl_deposit_view.php:106 +#: ../gl/view/gl_payment_view.php:65 +#: ../gl/view/gl_payment_view.php:99 +#: ../gl/view/gl_payment_view.php:102 +#: ../gl/view/gl_payment_view.php:105 +#: ../gl/includes/ui/gl_bank_ui.inc:122 +#: ../gl/includes/ui/gl_bank_ui.inc:125 +#: ../gl/includes/ui/gl_bank_ui.inc:128 +#: ../includes/sysnames.inc:132 +#: ../includes/ui/allocation_cart.inc:263 +#: ../includes/ui/ui_lists.inc:1152 +#: ../manufacturing/includes/manufacturing_ui.inc:236 +#: ../purchasing/includes/ui/invoice_ui.inc:245 +#: ../purchasing/includes/ui/invoice_ui.inc:247 +#: ../purchasing/includes/ui/invoice_ui.inc:249 +#: ../purchasing/view/view_supp_payment.php:60 +#: ../purchasing/view/view_supp_payment.php:69 +#: ../reporting/rep102.php:228 +#: ../reporting/rep202.php:234 +#: ../reporting/rep706.php:303 +#: ../reporting/rep707.php:321 +#: ../reporting/rep710.php:76 +#: ../reporting/includes/doctext.inc:150 +#: ../sales/view/view_receipt.php:44 +#: ../themes/exclusive/renderer.php:236 +#: ../themes/exclusive/renderer.php:255 +#: ../themes/exclusive/renderer.php:333 +#: ../themes/exclusive/renderer.php:352 +#: ../themes/exclusive/renderer.php:433 +#: ../themes/exclusive/renderer.php:453 +#: ../themes/exclusive/renderer.php:488 +#: ../themes/exclusive/renderer.php:507 +#: ../themes/exclusive/renderer.php:570 +msgid "Amount" +msgstr "" + +#: ../gl/accruals.php:204 +msgid "Search Amount" +msgstr "" + +#: ../gl/accruals.php:206 +msgid "Frequency" +msgstr "" + +#: ../gl/accruals.php:208 +msgid "Periods" +msgstr "" + +#: ../gl/accruals.php:212 +msgid "Show GL Rows" +msgstr "" + +#: ../gl/accruals.php:213 +msgid "Process Accruals" +msgstr "" + +#: ../gl/accruals.php:214 +msgid "Are you sure you want to post accruals?" +msgstr "" + +#: ../gl/bank_account_reconcile.php:33 msgid "Reconcile Bank Account" msgstr "" -#: c:\Apache2\htdocs\account228/gl/bank_account_reconcile.php:35 -#: c:\Apache2\htdocs\account228/gl/bank_transfer.php:30 -#: c:\Apache2\htdocs\account228/gl/gl_bank.php:43 +#: ../gl/bank_account_reconcile.php:35 +#: ../gl/bank_transfer.php:30 +#: ../gl/gl_bank.php:48 +#: ../gl/inquiry/bank_inquiry.php:30 +#: ../purchasing/supplier_payment.php:42 +#: ../sales/customer_payments.php:39 msgid "There are no bank accounts defined in the system." msgstr "" -#: c:\Apache2\htdocs\account228/gl/bank_account_reconcile.php:39 +#: ../gl/bank_account_reconcile.php:39 msgid "Invalid reconcile date format" msgstr "" -#: c:\Apache2\htdocs\account228/gl/bank_account_reconcile.php:56 +#: ../gl/bank_account_reconcile.php:56 msgid "Reconcile this transaction" msgstr "" -#: c:\Apache2\htdocs\account228/gl/bank_account_reconcile.php:173 +#: ../gl/bank_account_reconcile.php:166 +#: ../gl/inquiry/bank_inquiry.php:44 +#: ../gl/inquiry/gl_account_inquiry.php:69 msgid "Account:" msgstr "" -#: c:\Apache2\htdocs\account228/gl/bank_account_reconcile.php:175 +#: ../gl/bank_account_reconcile.php:168 msgid "Bank Statement:" msgstr "" -#: c:\Apache2\htdocs\account228/gl/bank_account_reconcile.php:176 +#: ../gl/bank_account_reconcile.php:169 msgid "New" msgstr "" -#: c:\Apache2\htdocs\account228/gl/bank_account_reconcile.php:220 +#: ../gl/bank_account_reconcile.php:198 msgid "Reconcile Date" msgstr "" -#: c:\Apache2\htdocs\account228/gl/bank_account_reconcile.php:220 +#: ../gl/bank_account_reconcile.php:198 msgid "Beginning
Balance" msgstr "" -#: c:\Apache2\htdocs\account228/gl/bank_account_reconcile.php:221 +#: ../gl/bank_account_reconcile.php:199 msgid "Ending
Balance" msgstr "" -#: c:\Apache2\htdocs\account228/gl/bank_account_reconcile.php:221 +#: ../gl/bank_account_reconcile.php:199 msgid "Account
Total" msgstr "" -#: c:\Apache2\htdocs\account228/gl/bank_account_reconcile.php:221 +#: ../gl/bank_account_reconcile.php:199 msgid "Reconciled
Amount" msgstr "" -#: c:\Apache2\htdocs\account228/gl/bank_account_reconcile.php:221 +#: ../gl/bank_account_reconcile.php:199 msgid "Difference" msgstr "" -#: c:\Apache2\htdocs\account228/gl/bank_account_reconcile.php:225 +#: ../gl/bank_account_reconcile.php:203 msgid "Date of bank statement to reconcile" msgstr "" -#: c:\Apache2\htdocs\account228/gl/bank_account_reconcile.php:265 -msgid "Debit" -msgstr "" - -#: c:\Apache2\htdocs\account228/gl/bank_account_reconcile.php:266 -msgid "Credit" -msgstr "" - -#: c:\Apache2\htdocs\account228/gl/bank_account_reconcile.php:267 +#: ../gl/bank_account_reconcile.php:239 +#: ../gl/inquiry/bank_inquiry.php:68 +#: ../gl/inquiry/gl_account_inquiry.php:140 +#: ../gl/inquiry/gl_account_inquiry.php:142 +#: ../gl/view/accrual_trans.php:60 +#: ../gl/view/gl_trans_view.php:36 +#: ../reporting/rep601.php:76 +#: ../reporting/rep704.php:79 +#: ../reporting/rep704.php:81 +#: ../reporting/rep704.php:84 msgid "Person/Item" msgstr "" -#: c:\Apache2\htdocs\account228/gl/bank_account_reconcile.php:277 +#: ../gl/bank_account_reconcile.php:249 msgid "Reconcile" msgstr "" -#: c:\Apache2\htdocs\account228/gl/bank_transfer.php:28 +#: ../gl/bank_transfer.php:28 msgid "Transfer between Bank Accounts" msgstr "" -#: c:\Apache2\htdocs\account228/gl/bank_transfer.php:39 +#: ../gl/bank_transfer.php:39 +#: ../gl/manage/revaluate_currencies.php:34 msgid "Transfer has been entered" msgstr "" -#: c:\Apache2\htdocs\account228/gl/bank_transfer.php:41 +#: ../gl/bank_transfer.php:41 +#: ../gl/manage/revaluate_currencies.php:36 msgid "&View the GL Journal Entries for this Transfer" msgstr "" -#: c:\Apache2\htdocs\account228/gl/bank_transfer.php:43 +#: ../gl/bank_transfer.php:43 msgid "Enter &Another Transfer" msgstr "" -#: c:\Apache2\htdocs\account228/gl/bank_transfer.php:66 +#: ../gl/bank_transfer.php:66 msgid "From Account:" msgstr "" -#: c:\Apache2\htdocs\account228/gl/bank_transfer.php:68 +#: ../gl/bank_transfer.php:68 msgid "To Account:" msgstr "" -#: c:\Apache2\htdocs\account228/gl/bank_transfer.php:70 +#: ../gl/bank_transfer.php:70 msgid "Transfer Date:" msgstr "" -#: c:\Apache2\htdocs\account228/gl/bank_transfer.php:76 -#: c:\Apache2\htdocs\account228/gl/bank_transfer.php:83 +#: ../gl/bank_transfer.php:76 +#: ../gl/bank_transfer.php:83 +#: ../sales/customer_payments.php:289 msgid "Amount:" msgstr "" -#: c:\Apache2\htdocs\account228/gl/bank_transfer.php:77 -#: c:\Apache2\htdocs\account228/gl/bank_transfer.php:84 +#: ../gl/bank_transfer.php:77 +#: ../gl/bank_transfer.php:84 +#: ../purchasing/supplier_payment.php:284 +#: ../sales/customer_payments.php:274 msgid "Bank Charge:" msgstr "" -#: c:\Apache2\htdocs\account228/gl/bank_transfer.php:95 +#: ../gl/bank_transfer.php:95 msgid "Enter Transfer" msgstr "" -#: c:\Apache2\htdocs\account228/gl/bank_transfer.php:121 -#: c:\Apache2\htdocs\account228/gl/bank_transfer.php:128 +#: ../gl/bank_transfer.php:121 +#: ../gl/bank_transfer.php:128 +#: ../purchasing/supplier_payment.php:130 +#: ../purchasing/supplier_payment.php:136 msgid "The entered amount is invalid or less than zero." msgstr "" -#: c:\Apache2\htdocs\account228/gl/bank_transfer.php:133 -msgid "The Bank Charge Account has not been set in System and General GL Setup." -msgstr "" - -#: c:\Apache2\htdocs\account228/gl/bank_transfer.php:139 -#: c:\Apache2\htdocs\account228/gl/gl_bank.php:136 -#: c:\Apache2\htdocs\account228/gl/gl_journal.php:166 +#: ../gl/bank_transfer.php:133 +#: ../purchasing/supplier_payment.php:144 +#: ../sales/customer_payments.php:131 +msgid "" +"The Bank Charge Account has not been set in System and General GL Setup." +msgstr "" + +#: ../gl/bank_transfer.php:139 +#: ../gl/gl_bank.php:229 +#: ../gl/gl_journal.php:166 +#: ../gl/manage/revaluate_currencies.php:62 +#: ../inventory/adjustments.php:94 +#: ../inventory/transfers.php:93 +#: ../manufacturing/work_order_add_finished.php:77 +#: ../manufacturing/work_order_entry.php:131 +#: ../manufacturing/work_order_issue.php:91 +#: ../purchasing/po_receive_items.php:177 +#: ../purchasing/supplier_payment.php:191 +#: ../sales/credit_note_entry.php:145 +#: ../sales/customer_credit_invoice.php:100 +#: ../sales/customer_delivery.php:175 +#: ../sales/customer_invoice.php:279 +#: ../sales/customer_payments.php:106 +#: ../sales/sales_order_entry.php:398 msgid "You must enter a reference." msgstr "" -#: c:\Apache2\htdocs\account228/gl/bank_transfer.php:153 +#: ../gl/bank_transfer.php:153 msgid "The source and destination bank accouts cannot be the same." msgstr "" -#: c:\Apache2\htdocs\account228/gl/gl_bank.php:33 +#: ../gl/gl_bank.php:33 msgid "Bank Account Payment Entry" msgstr "" -#: c:\Apache2\htdocs\account228/gl/gl_bank.php:37 +#: ../gl/gl_bank.php:36 msgid "Bank Account Deposit Entry" msgstr "" -#: c:\Apache2\htdocs\account228/gl/gl_bank.php:69 +#: ../gl/gl_bank.php:39 +msgid "Modify Bank Account Entry" +msgstr "" + +#: ../gl/gl_bank.php:42 +msgid "Modify Bank Deposit Entry" +msgstr "" + +#: ../gl/gl_bank.php:74 +#: ../gl/gl_bank.php:90 msgid "&View the GL Postings for this Payment" msgstr "" -#: c:\Apache2\htdocs\account228/gl/gl_bank.php:71 +#: ../gl/gl_bank.php:76 +#: ../gl/gl_bank.php:92 msgid "Enter Another &Payment" msgstr "" -#: c:\Apache2\htdocs\account228/gl/gl_bank.php:73 +#: ../gl/gl_bank.php:78 +#: ../gl/gl_bank.php:94 msgid "Enter A &Deposit" msgstr "" -#: c:\Apache2\htdocs\account228/gl/gl_bank.php:85 +#: ../gl/gl_bank.php:106 msgid "View the GL Postings for this Deposit" msgstr "" -#: c:\Apache2\htdocs\account228/gl/gl_bank.php:87 +#: ../gl/gl_bank.php:108 msgid "Enter Another Deposit" msgstr "" -#: c:\Apache2\htdocs\account228/gl/gl_bank.php:89 +#: ../gl/gl_bank.php:110 msgid "Enter A Payment" msgstr "" -#: c:\Apache2\htdocs\account228/gl/gl_bank.php:123 +#: ../gl/gl_bank.php:121 +msgid "&View the GL Postings for this Deposit" +msgstr "" + +#: ../gl/gl_bank.php:123 +msgid "Enter Another &Deposit" +msgstr "" + +#: ../gl/gl_bank.php:125 +msgid "Enter A &Payment" +msgstr "" + +#: ../gl/gl_bank.php:216 msgid "You must enter at least one payment line." msgstr "" -#: c:\Apache2\htdocs\account228/gl/gl_bank.php:129 +#: ../gl/gl_bank.php:222 msgid "The total bank amount cannot be 0." msgstr "" -#: c:\Apache2\htdocs\account228/gl/gl_bank.php:148 +#: ../gl/gl_bank.php:241 msgid "The entered date for the payment is invalid." msgstr "" -#: c:\Apache2\htdocs\account228/gl/gl_bank.php:197 -msgid "The source and destination accouts cannot be the same." +#: ../gl/gl_bank.php:253 +msgid "You have to select customer and customer branch." msgstr "" -#: c:\Apache2\htdocs\account228/gl/gl_bank.php:279 +#: ../gl/gl_bank.php:257 +msgid "You have to select supplier." +msgstr "" + +#: ../gl/gl_bank.php:303 +msgid "The amount entered is not a valid number or is less than zero." +msgstr "" + +#: ../gl/gl_bank.php:375 msgid "Payment Items" msgstr "" -#: c:\Apache2\htdocs\account228/gl/gl_bank.php:279 +#: ../gl/gl_bank.php:375 msgid "Deposit Items" msgstr "" -#: c:\Apache2\htdocs\account228/gl/gl_bank.php:287 +#: ../gl/gl_bank.php:383 msgid "Process Payment" msgstr "" -#: c:\Apache2\htdocs\account228/gl/gl_bank.php:287 +#: ../gl/gl_bank.php:383 msgid "Process Deposit" msgstr "" -#: c:\Apache2\htdocs\account228/gl/gl_budget.php:18 +#: ../gl/gl_budget.php:18 msgid "Budget Entry" msgstr "" -#: c:\Apache2\htdocs\account228/gl/gl_budget.php:24 -msgid "There are no account groups defined. Please define at least one account group before entering accounts." +#: ../gl/gl_budget.php:26 +#: ../gl/manage/gl_accounts.php:23 +msgid "" +"There are no account groups defined. Please define at least one account " +"group before entering accounts." msgstr "" -#: c:\Apache2\htdocs\account228/gl/gl_budget.php:102 +#: ../gl/gl_budget.php:45 msgid "The Budget has been saved." msgstr "" -#: c:\Apache2\htdocs\account228/gl/gl_budget.php:104 +#: ../gl/gl_budget.php:47 msgid "The Budget has been deleted." msgstr "" -#: c:\Apache2\htdocs\account228/gl/gl_budget.php:121 +#: ../gl/gl_budget.php:64 +#: ../gl/manage/gl_accounts.php:227 +#: ../gl/manage/gl_accounts.php:237 msgid "Account Code:" msgstr "" -#: c:\Apache2\htdocs\account228/gl/gl_budget.php:128 -#: c:\Apache2\htdocs\account228/gl/gl_budget.php:129 -#: c:\Apache2\htdocs\account228/gl/gl_budget.php:133 -msgid "Dimension" -msgstr "" - -#: c:\Apache2\htdocs\account228/gl/gl_budget.php:141 +#: ../gl/gl_budget.php:84 +#: ../gl/manage/exchange_rates.php:142 msgid "Get" msgstr "" -#: c:\Apache2\htdocs\account228/gl/gl_budget.php:148 -#: c:\Apache2\htdocs\account228/gl/gl_budget.php:150 +#: ../gl/gl_budget.php:91 +#: ../gl/gl_budget.php:93 +#: ../gl/inquiry/profit_loss.php:231 +#: ../gl/manage/gl_quick_entries.php:240 +#: ../reporting/rep101.php:136 +#: ../reporting/rep105.php:116 +#: ../reporting/rep106.php:90 +#: ../reporting/rep201.php:124 +#: ../reporting/rep304.php:121 +#: ../reporting/rep305.php:77 +#: ../reporting/rep601.php:82 +#: ../reporting/rep702.php:57 +#: ../reporting/rep704.php:90 +#: ../reporting/rep704.php:100 +#: ../reporting/rep704.php:108 +#: ../reporting/rep706.php:181 +#: ../reporting/rep706.php:189 +#: ../reporting/rep706.php:199 +#: ../reporting/rep706.php:207 +#: ../reporting/rep707.php:206 +#: ../reporting/rep707.php:213 +#: ../reporting/rep707.php:223 +#: ../reporting/rep707.php:231 +#: ../reporting/rep708.php:88 +#: ../reporting/rep708.php:97 +#: ../reporting/rep708.php:104 +#: ../reporting/rep709.php:102 +#: ../reporting/rep710.php:83 msgid "Period" msgstr "" -#: c:\Apache2\htdocs\account228/gl/gl_budget.php:148 -#: c:\Apache2\htdocs\account228/gl/gl_budget.php:150 -msgid "Amount" -msgstr "" - -#: c:\Apache2\htdocs\account228/gl/gl_budget.php:148 +#: ../gl/gl_budget.php:91 msgid "Dim. incl." msgstr "" -#: c:\Apache2\htdocs\account228/gl/gl_budget.php:148 -#: c:\Apache2\htdocs\account228/gl/gl_budget.php:150 +#: ../gl/gl_budget.php:91 +#: ../gl/gl_budget.php:93 msgid "Last Year" msgstr "" -#: c:\Apache2\htdocs\account228/gl/gl_budget.php:188 +#: ../gl/gl_budget.php:127 +#: ../gl/inquiry/balance_sheet.php:99 +#: ../gl/inquiry/balance_sheet.php:206 +#: ../gl/inquiry/balance_sheet.php:237 +#: ../gl/inquiry/gl_trial_balance.php:155 +#: ../gl/inquiry/profit_loss.php:115 +#: ../gl/inquiry/profit_loss.php:283 +#: ../gl/view/gl_deposit_view.php:132 +#: ../gl/view/gl_payment_view.php:131 +#: ../gl/view/gl_trans_view.php:104 +#: ../gl/includes/ui/gl_bank_ui.inc:171 +#: ../gl/includes/ui/gl_journal_ui.inc:141 +#: ../inventory/includes/item_adjustments_ui.inc:63 +#: ../inventory/includes/item_adjustments_ui.inc:102 +#: ../manufacturing/includes/manufacturing_ui.inc:178 +#: ../purchasing/includes/ui/invoice_ui.inc:309 +#: ../purchasing/includes/ui/invoice_ui.inc:468 +#: ../purchasing/includes/ui/invoice_ui.inc:538 +#: ../purchasing/po_receive_items.php:59 +#: ../purchasing/view/view_po.php:140 +#: ../purchasing/allocations/supplier_allocation_main.php:100 +#: ../reporting/rep101.php:237 +#: ../reporting/rep106.php:82 +#: ../reporting/rep106.php:120 +#: ../reporting/rep106.php:168 +#: ../reporting/rep201.php:221 +#: ../reporting/rep203.php:92 +#: ../reporting/rep203.php:167 +#: ../reporting/rep204.php:109 +#: ../reporting/rep204.php:137 +#: ../reporting/rep301.php:125 +#: ../reporting/rep301.php:162 +#: ../reporting/rep304.php:144 +#: ../reporting/rep304.php:186 +#: ../reporting/rep305.php:72 +#: ../reporting/rep305.php:96 +#: ../reporting/rep305.php:127 +#: ../reporting/rep702.php:138 +#: ../reporting/rep705.php:152 +#: ../reporting/rep705.php:309 +#: ../reporting/rep706.php:106 +#: ../reporting/rep706.php:249 +#: ../reporting/rep706.php:284 +#: ../reporting/rep707.php:115 +#: ../reporting/rep707.php:291 +#: ../reporting/rep708.php:182 +#: ../reporting/includes/doctext.inc:103 +#: ../reporting/includes/doctext.inc:111 +#: ../sales/customer_credit_invoice.php:292 +#: ../sales/customer_delivery.php:431 +#: ../sales/customer_invoice.php:443 +#: ../sales/allocations/customer_allocation_main.php:99 +#: ../sales/view/view_credit.php:91 +#: ../sales/view/view_dispatch.php:113 +#: ../sales/view/view_invoice.php:114 +#: ../sales/view/view_sales_order.php:95 +#: ../sales/view/view_sales_order.php:128 +#: ../sales/view/view_sales_order.php:160 +#: ../sales/view/view_sales_order.php:201 +#: ../sales/includes/ui/sales_credit_ui.inc:168 +#: ../sales/includes/ui/sales_order_ui.inc:143 +#: ../themes/exclusive/renderer.php:290 +#: ../themes/exclusive/renderer.php:383 msgid "Total" msgstr "" -#: c:\Apache2\htdocs\account228/gl/gl_journal.php:32 +#: ../gl/gl_journal.php:32 #, php-format msgid "Modifying Journal Transaction # %d." msgstr "" -#: c:\Apache2\htdocs\account228/gl/gl_journal.php:36 +#: ../gl/gl_journal.php:36 +#: ../includes/sysnames.inc:22 +#: ../includes/sysnames.inc:149 msgid "Journal Entry" msgstr "" -#: c:\Apache2\htdocs\account228/gl/gl_journal.php:54 +#: ../gl/gl_journal.php:54 msgid "Journal entry has been entered" msgstr "" -#: c:\Apache2\htdocs\account228/gl/gl_journal.php:56 -#: c:\Apache2\htdocs\account228/gl/gl_journal.php:69 +#: ../gl/gl_journal.php:56 +#: ../gl/gl_journal.php:69 msgid "&View this Journal Entry" msgstr "" -#: c:\Apache2\htdocs\account228/gl/gl_journal.php:59 +#: ../gl/gl_journal.php:59 msgid "Enter &New Journal Entry" msgstr "" -#: c:\Apache2\htdocs\account228/gl/gl_journal.php:67 +#: ../gl/gl_journal.php:67 msgid "Journal entry has been updated" msgstr "" -#: c:\Apache2\htdocs\account228/gl/gl_journal.php:71 +#: ../gl/gl_journal.php:71 msgid "Return to Journal &Inquiry" msgstr "" -#: c:\Apache2\htdocs\account228/gl/gl_journal.php:84 -msgid "You can edit directly only journal entries created via Journal Entry page." +#: ../gl/gl_journal.php:84 +msgid "" +"You can edit directly only journal entries created via Journal Entry page." msgstr "" -#: c:\Apache2\htdocs\account228/gl/gl_journal.php:85 +#: ../gl/gl_journal.php:85 msgid "Entry &New Journal Entry" msgstr "" -#: c:\Apache2\htdocs\account228/gl/gl_journal.php:141 +#: ../gl/gl_journal.php:141 msgid "You must enter at least one journal line." msgstr "" -#: c:\Apache2\htdocs\account228/gl/gl_journal.php:147 -msgid "The journal must balance (debits equal to credits) before it can be processed." +#: ../gl/gl_journal.php:147 +msgid "" +"The journal must balance (debits equal to credits) before it can be " +"processed." msgstr "" -#: c:\Apache2\htdocs\account228/gl/gl_journal.php:209 -#: c:\Apache2\htdocs\account228/gl/gl_journal.php:216 +#: ../gl/gl_journal.php:209 +#: ../gl/gl_journal.php:216 msgid "Dimension is closed." msgstr "" -#: c:\Apache2\htdocs\account228/gl/gl_journal.php:223 +#: ../gl/gl_journal.php:223 msgid "You must enter either a debit amount or a credit amount." msgstr "" -#: c:\Apache2\htdocs\account228/gl/gl_journal.php:230 +#: ../gl/gl_journal.php:230 msgid "The debit amount entered is not a valid number or is less than zero." msgstr "" -#: c:\Apache2\htdocs\account228/gl/gl_journal.php:235 +#: ../gl/gl_journal.php:235 msgid "The credit amount entered is not a valid number or is less than zero." msgstr "" -#: c:\Apache2\htdocs\account228/gl/gl_journal.php:241 +#: ../gl/gl_journal.php:241 +#: ../includes/ui/ui_view.inc:646 +#: ../purchasing/supplier_credit.php:119 +#: ../purchasing/supplier_invoice.php:119 msgid "Cannot post to GL account used by more than one tax type." msgstr "" -#: c:\Apache2\htdocs\account228/gl/gl_journal.php:248 -msgid "You cannot make a journal entry for a bank account. Please use one of the banking functions for bank transactions." +#: ../gl/gl_journal.php:248 +msgid "" +"You cannot make a journal entry for a bank account. Please use one of the " +"banking functions for bank transactions." msgstr "" -#: c:\Apache2\htdocs\account228/gl/gl_journal.php:327 +#: ../gl/gl_journal.php:327 msgid "Rows" msgstr "" -#: c:\Apache2\htdocs\account228/gl/gl_journal.php:333 +#: ../gl/gl_journal.php:333 msgid "Process Journal Entry" msgstr "" -#: c:\Apache2\htdocs\account228/gl/gl_journal.php:334 +#: ../gl/gl_journal.php:334 msgid "Process journal entry only if debits equal to credits" msgstr "" -#: c:\Apache2\htdocs\account228/gl/inquiry/balance_sheet.php:27 +#: ../gl/inquiry/balance_sheet.php:27 msgid "Balance Sheet Drilldown" msgstr "" -#: c:\Apache2\htdocs\account228/gl/inquiry/balance_sheet.php:118 +#: ../gl/inquiry/balance_sheet.php:127 msgid "As at:" msgstr "" -#: c:\Apache2\htdocs\account228/gl/inquiry/balance_sheet.php:211 -#: c:\Apache2\htdocs\account228/gl/inquiry/profit_loss.php:276 +#: ../gl/inquiry/balance_sheet.php:229 +#: ../gl/inquiry/profit_loss.php:294 +#: ../reporting/rep705.php:319 +#: ../reporting/rep706.php:272 +#: ../reporting/rep706.php:297 +#: ../reporting/rep707.php:303 +#: ../reporting/rep707.php:309 +#: ../themes/exclusive/renderer.php:560 msgid "Calculated Return" msgstr "" -#: c:\Apache2\htdocs\account228/gl/inquiry/balance_sheet.php:219 +#: ../gl/inquiry/balance_sheet.php:237 +#: ../includes/sysnames.inc:120 +#: ../reporting/rep706.php:284 msgid "Liabilities" msgstr "" -#: c:\Apache2\htdocs\account228/gl/inquiry/balance_sheet.php:219 +#: ../gl/inquiry/balance_sheet.php:237 +#: ../reporting/rep706.php:284 msgid " and " msgstr "" -#: c:\Apache2\htdocs\account228/gl/inquiry/balance_sheet.php:219 +#: ../gl/inquiry/balance_sheet.php:237 +#: ../reporting/rep706.php:284 msgid "Equities" msgstr "" -#: c:\Apache2\htdocs\account228/gl/inquiry/bank_inquiry.php:28 +#: ../gl/inquiry/bank_inquiry.php:28 +#: ../reporting/rep601.php:69 msgid "Bank Statement" msgstr "" -#: c:\Apache2\htdocs\account228/gl/inquiry/bank_inquiry.php:85 -#: c:\Apache2\htdocs\account228/gl/inquiry/gl_account_inquiry.php:163 +#: ../gl/inquiry/bank_inquiry.php:75 +#: ../gl/inquiry/gl_account_inquiry.php:161 +#: ../reporting/rep601.php:99 +#: ../reporting/rep704.php:137 msgid "Opening Balance" msgstr "" -#: c:\Apache2\htdocs\account228/gl/inquiry/bank_inquiry.php:124 -#: c:\Apache2\htdocs\account228/gl/inquiry/gl_account_inquiry.php:212 -#: c:\Apache2\htdocs\account228/gl/inquiry/gl_trial_balance.php:145 +#: ../gl/inquiry/bank_inquiry.php:120 +#: ../gl/inquiry/gl_account_inquiry.php:210 +#: ../gl/inquiry/gl_trial_balance.php:165 +#: ../reporting/rep601.php:150 +#: ../reporting/rep704.php:185 +#: ../reporting/rep708.php:191 msgid "Ending Balance" msgstr "" -#: c:\Apache2\htdocs\account228/gl/inquiry/gl_account_inquiry.php:30 +#: ../gl/inquiry/gl_account_inquiry.php:30 msgid "General Ledger Inquiry" msgstr "" -#: c:\Apache2\htdocs\account228/gl/inquiry/gl_account_inquiry.php:84 -msgid "Amount min:" -msgstr "" - -#: c:\Apache2\htdocs\account228/gl/inquiry/gl_account_inquiry.php:85 -msgid "Amount max:" +#: ../gl/inquiry/gl_account_inquiry.php:69 +msgid "All Accounts" msgstr "" -#: c:\Apache2\htdocs\account228/gl/inquiry/gl_account_inquiry.php:130 -#: c:\Apache2\htdocs\account228/gl/inquiry/gl_trial_balance.php:63 -#: c:\Apache2\htdocs\account228/gl/manage/gl_quick_entries.php:310 -msgid "Account" +#: ../gl/inquiry/gl_account_inquiry.php:82 +msgid "Amount min:" msgstr "" -#: c:\Apache2\htdocs\account228/gl/inquiry/gl_account_inquiry.php:142 -#: c:\Apache2\htdocs\account228/gl/inquiry/gl_account_inquiry.php:144 -#: c:\Apache2\htdocs\account228/gl/inquiry/journal_inquiry.php:198 -msgid "Memo" +#: ../gl/inquiry/gl_account_inquiry.php:83 +msgid "Amount max:" msgstr "" -#: c:\Apache2\htdocs\account228/gl/inquiry/gl_account_inquiry.php:221 -msgid "No general ledger transactions have been created for the specified criteria." +#: ../gl/inquiry/gl_account_inquiry.php:219 +msgid "" +"No general ledger transactions have been created for the specified criteria." msgstr "" -#: c:\Apache2\htdocs\account228/gl/inquiry/gl_trial_balance.php:27 +#: ../gl/inquiry/gl_trial_balance.php:28 +#: ../reporting/rep708.php:107 msgid "Trial Balance" msgstr "" -#: c:\Apache2\htdocs\account228/gl/inquiry/gl_trial_balance.php:46 +#: ../gl/inquiry/gl_trial_balance.php:52 msgid "No zero values" msgstr "" -#: c:\Apache2\htdocs\account228/gl/inquiry/gl_trial_balance.php:47 +#: ../gl/inquiry/gl_trial_balance.php:53 +#: ../reporting/reports_main.php:291 +#: ../reporting/reports_main.php:336 +#: ../reporting/reports_main.php:376 msgid "Only balances" msgstr "" -#: c:\Apache2\htdocs\account228/gl/inquiry/gl_trial_balance.php:64 -#: c:\Apache2\htdocs\account228/gl/manage/bank_accounts.php:115 +#: ../gl/inquiry/gl_trial_balance.php:71 +msgid "The from date cannot be bigger than the fiscal year end." +msgstr "" + +#: ../gl/inquiry/gl_trial_balance.php:84 +#: ../gl/manage/bank_accounts.php:102 +#: ../gl/view/gl_trans_view.php:63 +#: ../gl/view/gl_trans_view.php:66 +#: ../gl/view/gl_trans_view.php:69 +#: ../reporting/rep701.php:106 +#: ../reporting/rep702.php:51 +#: ../reporting/rep705.php:234 +#: ../reporting/rep706.php:181 +#: ../reporting/rep707.php:206 +#: ../reporting/rep708.php:80 msgid "Account Name" msgstr "" -#: c:\Apache2\htdocs\account228/gl/inquiry/gl_trial_balance.php:65 +#: ../gl/inquiry/gl_trial_balance.php:85 +#: ../reporting/rep708.php:72 msgid "Brought Forward" msgstr "" -#: c:\Apache2\htdocs\account228/gl/inquiry/gl_trial_balance.php:66 +#: ../gl/inquiry/gl_trial_balance.php:86 +#: ../reporting/rep708.php:72 msgid "This Period" msgstr "" -#: c:\Apache2\htdocs\account228/gl/inquiry/journal_inquiry.php:27 +#: ../gl/inquiry/gl_trial_balance.php:173 +#: ../reporting/rep708.php:212 +msgid "" +"The Opening Balance is not in balance, probably due to a non closed Previous " +"Fiscalyear." +msgstr "" + +#: ../gl/inquiry/journal_inquiry.php:27 msgid "Journal Inquiry" msgstr "" -#: c:\Apache2\htdocs\account228/gl/inquiry/journal_inquiry.php:45 +#: ../gl/inquiry/journal_inquiry.php:45 msgid "Enter reference fragment or leave empty" msgstr "" -#: c:\Apache2\htdocs\account228/gl/inquiry/journal_inquiry.php:51 +#: ../gl/inquiry/journal_inquiry.php:51 msgid "Show closed:" msgstr "" -#: c:\Apache2\htdocs\account228/gl/inquiry/journal_inquiry.php:56 +#: ../gl/inquiry/journal_inquiry.php:56 msgid "Enter memo fragment or leave empty" msgstr "" -#: c:\Apache2\htdocs\account228/gl/inquiry/journal_inquiry.php:195 +#: ../gl/inquiry/journal_inquiry.php:123 msgid "Trans #" msgstr "" -#: c:\Apache2\htdocs\account228/gl/inquiry/journal_inquiry.php:199 +#: ../gl/inquiry/journal_inquiry.php:127 +#: ../reporting/rep710.php:75 +#: ../reporting/rep710.php:85 +#: ../reporting/reports_main.php:390 msgid "User" msgstr "" -#: c:\Apache2\htdocs\account228/gl/inquiry/profit_loss.php:27 +#: ../gl/inquiry/profit_loss.php:27 msgid "Profit & Loss Drilldown" msgstr "" -#: c:\Apache2\htdocs\account228/gl/inquiry/profit_loss.php:158 +#: ../gl/inquiry/profit_loss.php:168 +#: ../reporting/rep707.php:206 +#: ../reporting/includes/reports_classes.inc:229 msgid "Accumulated" msgstr "" -#: c:\Apache2\htdocs\account228/gl/inquiry/profit_loss.php:158 +#: ../gl/inquiry/profit_loss.php:168 +#: ../reporting/rep707.php:251 +#: ../reporting/includes/reports_classes.inc:229 msgid "Period Y-1" msgstr "" -#: c:\Apache2\htdocs\account228/gl/inquiry/profit_loss.php:158 +#: ../gl/inquiry/profit_loss.php:168 +#: ../reporting/rep707.php:242 +#: ../reporting/includes/reports_classes.inc:229 msgid "Budget" msgstr "" -#: c:\Apache2\htdocs\account228/gl/inquiry/profit_loss.php:212 +#: ../gl/inquiry/profit_loss.php:169 +#: ../reporting/reports_main.php:279 +#: ../reporting/reports_main.php:325 +#: ../reporting/reports_main.php:366 +msgid "Compare to" +msgstr "" + +#: ../gl/inquiry/profit_loss.php:230 msgid "Group/Account Name" msgstr "" -#: c:\Apache2\htdocs\account228/gl/inquiry/profit_loss.php:215 +#: ../gl/inquiry/profit_loss.php:233 +#: ../reporting/rep707.php:206 msgid "Achieved %" msgstr "" -#: c:\Apache2\htdocs\account228/gl/inquiry/tax_inquiry.php:30 +#: ../gl/inquiry/tax_inquiry.php:30 msgid "Tax Inquiry" msgstr "" -#: c:\Apache2\htdocs\account228/gl/inquiry/tax_inquiry.php:85 +#: ../gl/inquiry/tax_inquiry.php:82 +#: ../reporting/rep709.php:168 msgid "Outputs" msgstr "" -#: c:\Apache2\htdocs\account228/gl/inquiry/tax_inquiry.php:85 +#: ../gl/inquiry/tax_inquiry.php:82 +#: ../reporting/rep709.php:168 msgid "Inputs" msgstr "" -#: c:\Apache2\htdocs\account228/gl/inquiry/tax_inquiry.php:103 +#: ../gl/inquiry/tax_inquiry.php:100 msgid "Charged on sales" msgstr "" -#: c:\Apache2\htdocs\account228/gl/inquiry/tax_inquiry.php:103 +#: ../gl/inquiry/tax_inquiry.php:100 +#: ../reporting/rep709.php:168 msgid "Output Tax" msgstr "" -#: c:\Apache2\htdocs\account228/gl/inquiry/tax_inquiry.php:109 +#: ../gl/inquiry/tax_inquiry.php:106 msgid "Paid on purchases" msgstr "" -#: c:\Apache2\htdocs\account228/gl/inquiry/tax_inquiry.php:109 +#: ../gl/inquiry/tax_inquiry.php:106 +#: ../reporting/rep709.php:168 msgid "Input Tax" msgstr "" -#: c:\Apache2\htdocs\account228/gl/inquiry/tax_inquiry.php:115 +#: ../gl/inquiry/tax_inquiry.php:112 msgid "Net payable or collectible" msgstr "" -#: c:\Apache2\htdocs\account228/gl/inquiry/tax_inquiry.php:122 +#: ../gl/inquiry/tax_inquiry.php:119 +#: ../reporting/rep709.php:199 msgid "Total payable or refund" msgstr "" -#: c:\Apache2\htdocs\account228/gl/manage/bank_accounts.php:16 +#: ../gl/manage/bank_accounts.php:16 +#: ../reporting/reports_main.php:228 msgid "Bank Accounts" msgstr "" -#: c:\Apache2\htdocs\account228/gl/manage/bank_accounts.php:33 +#: ../gl/manage/bank_accounts.php:33 msgid "The bank account name cannot be empty." msgstr "" -#: c:\Apache2\htdocs\account228/gl/manage/bank_accounts.php:47 +#: ../gl/manage/bank_accounts.php:47 msgid "Bank account has been updated" msgstr "" -#: c:\Apache2\htdocs\account228/gl/manage/bank_accounts.php:56 +#: ../gl/manage/bank_accounts.php:56 msgid "New bank account has been added" msgstr "" -#: c:\Apache2\htdocs\account228/gl/manage/bank_accounts.php:75 -msgid "Cannot delete this bank account because transactions have been created using this account." +#: ../gl/manage/bank_accounts.php:72 +msgid "" +"Cannot delete this bank account because transactions have been created using " +"this account." msgstr "" -#: c:\Apache2\htdocs\account228/gl/manage/bank_accounts.php:83 -msgid "Cannot delete this bank account because POS definitions have been created using this account." +#: ../gl/manage/bank_accounts.php:78 +msgid "" +"Cannot delete this bank account because POS definitions have been created " +"using this account." msgstr "" -#: c:\Apache2\htdocs\account228/gl/manage/bank_accounts.php:88 +#: ../gl/manage/bank_accounts.php:83 msgid "Selected bank account has been deleted" msgstr "" -#: c:\Apache2\htdocs\account228/gl/manage/bank_accounts.php:115 +#: ../gl/manage/bank_accounts.php:102 +#: ../gl/view/bank_transfer_view.php:69 +#: ../gl/view/bank_transfer_view.php:78 +#: ../gl/view/gl_deposit_view.php:66 +#: ../gl/view/gl_payment_view.php:64 +#: ../inventory/prices.php:133 +#: ../inventory/purchasing_data.php:127 +#: ../purchasing/view/view_supp_credit.php:49 +#: ../purchasing/view/view_supp_invoice.php:53 +#: ../purchasing/inquiry/po_search_completed.php:122 +#: ../purchasing/inquiry/po_search.php:136 +#: ../purchasing/inquiry/supplier_allocation_inquiry.php:132 +#: ../purchasing/inquiry/supplier_allocation_inquiry.php:142 +#: ../purchasing/inquiry/supplier_inquiry.php:72 +#: ../purchasing/inquiry/supplier_inquiry.php:169 +#: ../purchasing/inquiry/supplier_inquiry.php:180 +#: ../purchasing/allocations/supplier_allocation_main.php:99 +#: ../purchasing/allocations/supplier_allocation_main.php:107 +#: ../reporting/rep101.php:138 +#: ../reporting/rep102.php:123 +#: ../reporting/rep102.php:128 +#: ../reporting/rep104.php:114 +#: ../reporting/rep201.php:126 +#: ../reporting/rep202.php:126 +#: ../reporting/rep203.php:99 +#: ../sales/customer_credit_invoice.php:248 +#: ../sales/customer_delivery.php:338 +#: ../sales/customer_invoice.php:392 +#: ../sales/allocations/customer_allocation_main.php:98 +#: ../sales/allocations/customer_allocation_main.php:106 +#: ../sales/view/view_credit.php:70 +#: ../sales/view/view_dispatch.php:86 +#: ../sales/view/view_invoice.php:85 +#: ../sales/inquiry/customer_allocation_inquiry.php:148 +#: ../sales/inquiry/customer_allocation_inquiry.php:158 +#: ../sales/inquiry/customer_inquiry.php:76 +#: ../sales/inquiry/customer_inquiry.php:220 +#: ../sales/inquiry/customer_inquiry.php:233 +#: ../sales/inquiry/sales_deliveries_view.php:189 +#: ../sales/inquiry/sales_orders_view.php:268 +#: ../sales/inquiry/sales_orders_view.php:282 +#: ../themes/exclusive/renderer.php:289 +#: ../themes/exclusive/renderer.php:383 msgid "Currency" msgstr "" -#: c:\Apache2\htdocs\account228/gl/manage/bank_accounts.php:115 +#: ../gl/manage/bank_accounts.php:102 msgid "GL Account" msgstr "" -#: c:\Apache2\htdocs\account228/gl/manage/bank_accounts.php:116 +#: ../gl/manage/bank_accounts.php:103 +#: ../reporting/includes/doctext.inc:77 msgid "Bank" msgstr "" -#: c:\Apache2\htdocs\account228/gl/manage/bank_accounts.php:116 +#: ../gl/manage/bank_accounts.php:103 +#: ../includes/ui/ui_view.inc:480 msgid "Number" msgstr "" -#: c:\Apache2\htdocs\account228/gl/manage/bank_accounts.php:116 +#: ../gl/manage/bank_accounts.php:103 msgid "Bank Address" msgstr "" -#: c:\Apache2\htdocs\account228/gl/manage/bank_accounts.php:116 +#: ../gl/manage/bank_accounts.php:103 msgid "Dflt" msgstr "" -#: c:\Apache2\htdocs\account228/gl/manage/bank_accounts.php:172 +#: ../gl/manage/bank_accounts.php:159 msgid "Bank Account Name:" msgstr "" -#: c:\Apache2\htdocs\account228/gl/manage/bank_accounts.php:176 -#: c:\Apache2\htdocs\account228/gl/manage/bank_accounts.php:180 +#: ../gl/manage/bank_accounts.php:163 +#: ../gl/manage/bank_accounts.php:167 msgid "Account Type:" msgstr "" -#: c:\Apache2\htdocs\account228/gl/manage/bank_accounts.php:184 -#: c:\Apache2\htdocs\account228/gl/manage/bank_accounts.php:188 +#: ../gl/manage/bank_accounts.php:171 +#: ../gl/manage/bank_accounts.php:175 msgid "Bank Account Currency:" msgstr "" -#: c:\Apache2\htdocs\account228/gl/manage/bank_accounts.php:191 +#: ../gl/manage/bank_accounts.php:178 msgid "Default currency account:" msgstr "" -#: c:\Apache2\htdocs\account228/gl/manage/bank_accounts.php:194 -#: c:\Apache2\htdocs\account228/gl/manage/bank_accounts.php:196 +#: ../gl/manage/bank_accounts.php:181 +#: ../gl/manage/bank_accounts.php:183 msgid "Bank Account GL Code:" msgstr "" -#: c:\Apache2\htdocs\account228/gl/manage/bank_accounts.php:198 +#: ../gl/manage/bank_accounts.php:185 msgid "Bank Name:" msgstr "" -#: c:\Apache2\htdocs\account228/gl/manage/bank_accounts.php:199 +#: ../gl/manage/bank_accounts.php:186 msgid "Bank Account Number:" msgstr "" -#: c:\Apache2\htdocs\account228/gl/manage/bank_accounts.php:200 +#: ../gl/manage/bank_accounts.php:187 msgid "Bank Address:" msgstr "" -#: c:\Apache2\htdocs\account228/gl/manage/currencies.php:16 +#: ../gl/manage/currencies.php:16 +#: ../includes/access_levels.inc:223 msgid "Currencies" msgstr "" -#: c:\Apache2\htdocs\account228/gl/manage/currencies.php:29 +#: ../gl/manage/currencies.php:29 msgid "The currency abbreviation must be entered." msgstr "" -#: c:\Apache2\htdocs\account228/gl/manage/currencies.php:35 +#: ../gl/manage/currencies.php:35 msgid "The currency name must be entered." msgstr "" -#: c:\Apache2\htdocs\account228/gl/manage/currencies.php:41 +#: ../gl/manage/currencies.php:41 msgid "The currency symbol must be entered." msgstr "" -#: c:\Apache2\htdocs\account228/gl/manage/currencies.php:47 +#: ../gl/manage/currencies.php:47 msgid "The hundredths name must be entered." msgstr "" -#: c:\Apache2\htdocs\account228/gl/manage/currencies.php:69 +#: ../gl/manage/currencies.php:69 msgid "Selected currency settings has been updated" msgstr "" -#: c:\Apache2\htdocs\account228/gl/manage/currencies.php:76 +#: ../gl/manage/currencies.php:76 msgid "New currency has been added" msgstr "" -#: c:\Apache2\htdocs\account228/gl/manage/currencies.php:97 -msgid "Cannot delete this currency, because customer accounts have been created referring to this currency." +#: ../gl/manage/currencies.php:94 +msgid "" +"Cannot delete this currency, because customer accounts have been created " +"referring to this currency." msgstr "" -#: c:\Apache2\htdocs\account228/gl/manage/currencies.php:106 -msgid "Cannot delete this currency, because supplier accounts have been created referring to this currency." +#: ../gl/manage/currencies.php:100 +msgid "" +"Cannot delete this currency, because supplier accounts have been created " +"referring to this currency." msgstr "" -#: c:\Apache2\htdocs\account228/gl/manage/currencies.php:115 -msgid "Cannot delete this currency, because the company preferences uses this currency." +#: ../gl/manage/currencies.php:106 +msgid "" +"Cannot delete this currency, because the company preferences uses this " +"currency." msgstr "" -#: c:\Apache2\htdocs\account228/gl/manage/currencies.php:125 -msgid "Cannot delete this currency, because thre are bank accounts that use this currency." +#: ../gl/manage/currencies.php:113 +msgid "" +"Cannot delete this currency, because thre are bank accounts that use this " +"currency." msgstr "" -#: c:\Apache2\htdocs\account228/gl/manage/currencies.php:140 +#: ../gl/manage/currencies.php:128 msgid "Selected currency has been deleted" msgstr "" -#: c:\Apache2\htdocs\account228/gl/manage/currencies.php:155 +#: ../gl/manage/currencies.php:141 msgid "Abbreviation" msgstr "" -#: c:\Apache2\htdocs\account228/gl/manage/currencies.php:155 +#: ../gl/manage/currencies.php:141 msgid "Symbol" msgstr "" -#: c:\Apache2\htdocs\account228/gl/manage/currencies.php:155 +#: ../gl/manage/currencies.php:141 msgid "Currency Name" msgstr "" -#: c:\Apache2\htdocs\account228/gl/manage/currencies.php:156 +#: ../gl/manage/currencies.php:142 msgid "Hundredths name" msgstr "" -#: c:\Apache2\htdocs\account228/gl/manage/currencies.php:156 +#: ../gl/manage/currencies.php:142 msgid "Country" msgstr "" -#: c:\Apache2\htdocs\account228/gl/manage/currencies.php:156 +#: ../gl/manage/currencies.php:142 msgid "Auto update" msgstr "" -#: c:\Apache2\htdocs\account228/gl/manage/currencies.php:191 +#: ../gl/manage/currencies.php:177 msgid "The marked currency is the home currency which cannot be deleted." msgstr "" -#: c:\Apache2\htdocs\account228/gl/manage/currencies.php:217 -#: c:\Apache2\htdocs\account228/gl/manage/currencies.php:222 +#: ../gl/manage/currencies.php:203 +#: ../gl/manage/currencies.php:208 msgid "Currency Abbreviation:" msgstr "" -#: c:\Apache2\htdocs\account228/gl/manage/currencies.php:225 +#: ../gl/manage/currencies.php:211 msgid "Currency Symbol:" msgstr "" -#: c:\Apache2\htdocs\account228/gl/manage/currencies.php:226 +#: ../gl/manage/currencies.php:212 msgid "Currency Name:" msgstr "" -#: c:\Apache2\htdocs\account228/gl/manage/currencies.php:227 +#: ../gl/manage/currencies.php:213 msgid "Hundredths Name:" msgstr "" -#: c:\Apache2\htdocs\account228/gl/manage/currencies.php:228 +#: ../gl/manage/currencies.php:214 msgid "Country:" msgstr "" -#: c:\Apache2\htdocs\account228/gl/manage/currencies.php:229 +#: ../gl/manage/currencies.php:215 msgid "Automatic exchange rate update:" msgstr "" -#: c:\Apache2\htdocs\account228/gl/manage/exchange_rates.php:24 +#: ../gl/manage/exchange_rates.php:24 msgid "Exchange Rates" msgstr "" -#: c:\Apache2\htdocs\account228/gl/manage/exchange_rates.php:39 +#: ../gl/manage/exchange_rates.php:39 msgid "The exchange rate cannot be zero or a negative number." msgstr "" -#: c:\Apache2\htdocs\account228/gl/manage/exchange_rates.php:45 +#: ../gl/manage/exchange_rates.php:45 msgid "The exchange rate for the date is already there." msgstr "" -#: c:\Apache2\htdocs\account228/gl/manage/exchange_rates.php:128 -#: c:\Apache2\htdocs\account228/gl/manage/exchange_rates.php:134 +#: ../gl/manage/exchange_rates.php:127 +#: ../gl/manage/exchange_rates.php:133 msgid "Date to Use From:" msgstr "" -#: c:\Apache2\htdocs\account228/gl/manage/exchange_rates.php:142 +#: ../gl/manage/exchange_rates.php:141 +#: ../includes/ui/ui_view.inc:288 +#: ../includes/ui/ui_view.inc:290 msgid "Exchange Rate:" msgstr "" -#: c:\Apache2\htdocs\account228/gl/manage/exchange_rates.php:143 +#: ../gl/manage/exchange_rates.php:142 msgid "Get current ECB rate" msgstr "" -#: c:\Apache2\htdocs\account228/gl/manage/exchange_rates.php:150 +#: ../gl/manage/exchange_rates.php:148 msgid "Exchange rates are entered against the company currency." msgstr "" -#: c:\Apache2\htdocs\account228/gl/manage/exchange_rates.php:181 +#: ../gl/manage/exchange_rates.php:179 msgid "Select a currency :" msgstr "" -#: c:\Apache2\htdocs\account228/gl/manage/exchange_rates.php:200 +#: ../gl/manage/exchange_rates.php:195 msgid "Date to Use From" msgstr "" -#: c:\Apache2\htdocs\account228/gl/manage/exchange_rates.php:201 +#: ../gl/manage/exchange_rates.php:196 msgid "Exchange Rate" msgstr "" -#: c:\Apache2\htdocs\account228/gl/manage/exchange_rates.php:210 +#: ../gl/manage/exchange_rates.php:205 msgid "The selected currency is the company currency." msgstr "" -#: c:\Apache2\htdocs\account228/gl/manage/exchange_rates.php:211 -msgid "The company currency is the base currency so exchange rates cannot be set for it." +#: ../gl/manage/exchange_rates.php:206 +msgid "" +"The company currency is the base currency so exchange rates cannot be set " +"for it." msgstr "" -#: c:\Apache2\htdocs\account228/gl/manage/gl_accounts.php:16 -msgid "Chart of Accounts" +#: ../gl/manage/gl_account_classes.php:16 +msgid "GL Account Classes" msgstr "" -#: c:\Apache2\htdocs\account228/gl/manage/gl_accounts.php:53 -msgid "The account code must be entered." +#: ../gl/manage/gl_account_classes.php:31 +msgid "The account class ID cannot be empty." msgstr "" -#: c:\Apache2\htdocs\account228/gl/manage/gl_accounts.php:59 -msgid "The account name cannot be empty." +#: ../gl/manage/gl_account_classes.php:37 +msgid "The account class name cannot be empty." msgstr "" -#: c:\Apache2\htdocs\account228/gl/manage/gl_accounts.php:65 -msgid "The account code must be numeric." +#: ../gl/manage/gl_account_classes.php:57 +msgid "Selected account class settings has been updated" msgstr "" -#: c:\Apache2\htdocs\account228/gl/manage/gl_accounts.php:86 -msgid "Account data has been updated." +#: ../gl/manage/gl_account_classes.php:62 +msgid "New account class has been added" msgstr "" -#: c:\Apache2\htdocs\account228/gl/manage/gl_accounts.php:95 -msgid "New account has been added." +#: ../gl/manage/gl_account_classes.php:77 +msgid "" +"Cannot delete this account class because GL account types have been created " +"referring to it." msgstr "" -#: c:\Apache2\htdocs\account228/gl/manage/gl_accounts.php:117 -msgid "Cannot delete this account because transactions have been created using this account." +#: ../gl/manage/gl_account_classes.php:93 +msgid "Selected account class has been deleted" msgstr "" -#: c:\Apache2\htdocs\account228/gl/manage/gl_accounts.php:142 -msgid "Cannot delete this account because it is used as one of the company default GL accounts." +#: ../gl/manage/gl_account_classes.php:110 +msgid "Class ID" msgstr "" -#: c:\Apache2\htdocs\account228/gl/manage/gl_accounts.php:152 -msgid "Cannot delete this account because it is used by a bank account." +#: ../gl/manage/gl_account_classes.php:110 +msgid "Class Name" msgstr "" -#: c:\Apache2\htdocs\account228/gl/manage/gl_accounts.php:166 -msgid "Cannot delete this account because it is used by one or more Items." +#: ../gl/manage/gl_account_classes.php:110 +#: ../gl/manage/gl_account_types.php:122 +msgid "Class Type" msgstr "" -#: c:\Apache2\htdocs\account228/gl/manage/gl_accounts.php:176 -msgid "Cannot delete this account because it is used by one or more Taxes." +#: ../gl/manage/gl_account_classes.php:112 +#: ../gl/manage/gl_account_classes.php:169 +#: ../reporting/rep706.php:211 +msgid "Balance Sheet" msgstr "" -#: c:\Apache2\htdocs\account228/gl/manage/gl_accounts.php:190 -msgid "Cannot delete this account because it is used by one or more Customer Branches." +#: ../gl/manage/gl_account_classes.php:157 +#: ../gl/manage/gl_account_classes.php:163 +msgid "Class ID:" msgstr "" -#: c:\Apache2\htdocs\account228/gl/manage/gl_accounts.php:203 -msgid "Cannot delete this account because it is used by one or more suppliers." +#: ../gl/manage/gl_account_classes.php:166 +msgid "Class Name:" msgstr "" -#: c:\Apache2\htdocs\account228/gl/manage/gl_accounts.php:214 -msgid "Cannot delete this account because it is used by one or more Quick Entry Lines." +#: ../gl/manage/gl_account_classes.php:171 +#: ../gl/manage/gl_account_types.php:186 +msgid "Class Type:" msgstr "" -#: c:\Apache2\htdocs\account228/gl/manage/gl_accounts.php:232 -msgid "Selected account has been deleted" +#: ../gl/manage/gl_accounts.php:16 +#: ../reporting/rep701.php:112 +msgid "Chart of Accounts" msgstr "" -#: c:\Apache2\htdocs\account228/gl/manage/gl_accounts.php:247 -msgid "New account" +#: ../gl/manage/gl_accounts.php:53 +msgid "The account code must be entered." msgstr "" -#: c:\Apache2\htdocs\account228/gl/manage/gl_accounts.php:293 -msgid "Account Code 2:" +#: ../gl/manage/gl_accounts.php:59 +msgid "The account name cannot be empty." msgstr "" -#: c:\Apache2\htdocs\account228/gl/manage/gl_accounts.php:295 -msgid "Account Name:" +#: ../gl/manage/gl_accounts.php:65 +msgid "The account code must be numeric." msgstr "" -#: c:\Apache2\htdocs\account228/gl/manage/gl_accounts.php:297 -msgid "Account Group:" +#: ../gl/manage/gl_accounts.php:86 +msgid "Account data has been updated." msgstr "" -#: c:\Apache2\htdocs\account228/gl/manage/gl_accounts.php:299 -msgid "Account Tags:" +#: ../gl/manage/gl_accounts.php:95 +msgid "New account has been added." msgstr "" -#: c:\Apache2\htdocs\account228/gl/manage/gl_accounts.php:301 -msgid "Account status:" +#: ../gl/manage/gl_accounts.php:113 +msgid "" +"Cannot delete this account because transactions have been created using this " +"account." msgstr "" -#: c:\Apache2\htdocs\account228/gl/manage/gl_accounts.php:306 -msgid "Add Account" +#: ../gl/manage/gl_accounts.php:119 +msgid "" +"Cannot delete this account because it is used as one of the company default " +"GL accounts." msgstr "" -#: c:\Apache2\htdocs\account228/gl/manage/gl_accounts.php:310 -msgid "Update Account" +#: ../gl/manage/gl_accounts.php:125 +msgid "Cannot delete this account because it is used by a bank account." msgstr "" -#: c:\Apache2\htdocs\account228/gl/manage/gl_accounts.php:311 -msgid "Delete account" +#: ../gl/manage/gl_accounts.php:131 +msgid "" +"Cannot delete this account because it is used by one or more Item Categories." msgstr "" -#: c:\Apache2\htdocs\account228/gl/manage/gl_account_classes.php:16 -msgid "GL Account Classes" +#: ../gl/manage/gl_accounts.php:137 +msgid "Cannot delete this account because it is used by one or more Items." msgstr "" -#: c:\Apache2\htdocs\account228/gl/manage/gl_account_classes.php:30 -msgid "The account class ID must be numeric." +#: ../gl/manage/gl_accounts.php:143 +msgid "Cannot delete this account because it is used by one or more Taxes." msgstr "" -#: c:\Apache2\htdocs\account228/gl/manage/gl_account_classes.php:36 -msgid "The account class name cannot be empty." +#: ../gl/manage/gl_accounts.php:149 +msgid "" +"Cannot delete this account because it is used by one or more Customer " +"Branches." msgstr "" -#: c:\Apache2\htdocs\account228/gl/manage/gl_account_classes.php:56 -msgid "Selected account class settings has been updated" +#: ../gl/manage/gl_accounts.php:155 +msgid "Cannot delete this account because it is used by one or more suppliers." msgstr "" -#: c:\Apache2\htdocs\account228/gl/manage/gl_account_classes.php:61 -msgid "New account class has been added" +#: ../gl/manage/gl_accounts.php:161 +msgid "" +"Cannot delete this account because it is used by one or more Quick Entry " +"Lines." msgstr "" -#: c:\Apache2\htdocs\account228/gl/manage/gl_account_classes.php:80 -msgid "Cannot delete this account class because GL account types have been created referring to it." +#: ../gl/manage/gl_accounts.php:179 +msgid "Selected account has been deleted" msgstr "" -#: c:\Apache2\htdocs\account228/gl/manage/gl_account_classes.php:96 -msgid "Selected account class has been deleted" +#: ../gl/manage/gl_accounts.php:194 +msgid "New account" msgstr "" -#: c:\Apache2\htdocs\account228/gl/manage/gl_account_classes.php:113 -msgid "Class ID" +#: ../gl/manage/gl_accounts.php:240 +msgid "Account Code 2:" msgstr "" -#: c:\Apache2\htdocs\account228/gl/manage/gl_account_classes.php:113 -msgid "Class Name" +#: ../gl/manage/gl_accounts.php:242 +msgid "Account Name:" msgstr "" -#: c:\Apache2\htdocs\account228/gl/manage/gl_account_classes.php:113 -#: c:\Apache2\htdocs\account228/gl/manage/gl_account_types.php:131 -msgid "Class Type" +#: ../gl/manage/gl_accounts.php:244 +msgid "Account Group:" msgstr "" -#: c:\Apache2\htdocs\account228/gl/manage/gl_account_classes.php:115 -#: c:\Apache2\htdocs\account228/gl/manage/gl_account_classes.php:172 -msgid "Balance Sheet" +#: ../gl/manage/gl_accounts.php:246 +msgid "Account Tags:" msgstr "" -#: c:\Apache2\htdocs\account228/gl/manage/gl_account_classes.php:160 -#: c:\Apache2\htdocs\account228/gl/manage/gl_account_classes.php:166 -msgid "Class ID:" +#: ../gl/manage/gl_accounts.php:248 +msgid "Account status:" msgstr "" -#: c:\Apache2\htdocs\account228/gl/manage/gl_account_classes.php:169 -msgid "Class Name:" +#: ../gl/manage/gl_accounts.php:253 +msgid "Add Account" msgstr "" -#: c:\Apache2\htdocs\account228/gl/manage/gl_account_classes.php:174 -#: c:\Apache2\htdocs\account228/gl/manage/gl_account_types.php:190 -msgid "Class Type:" +#: ../gl/manage/gl_accounts.php:257 +msgid "Update Account" +msgstr "" + +#: ../gl/manage/gl_accounts.php:258 +msgid "Delete account" msgstr "" -#: c:\Apache2\htdocs\account228/gl/manage/gl_account_types.php:16 +#: ../gl/manage/gl_account_types.php:16 msgid "GL Account Groups" msgstr "" -#: c:\Apache2\htdocs\account228/gl/manage/gl_account_types.php:31 -msgid "The account id must be an integer and cannot be empty." +#: ../gl/manage/gl_account_types.php:29 +msgid "The account group id cannot be empty." msgstr "" -#: c:\Apache2\htdocs\account228/gl/manage/gl_account_types.php:37 +#: ../gl/manage/gl_account_types.php:35 msgid "The account group name cannot be empty." msgstr "" -#: c:\Apache2\htdocs\account228/gl/manage/gl_account_types.php:44 +#: ../gl/manage/gl_account_types.php:43 msgid "You cannot set an account group to be a subgroup of itself." msgstr "" -#: c:\Apache2\htdocs\account228/gl/manage/gl_account_types.php:62 +#: ../gl/manage/gl_account_types.php:61 msgid "Selected account type has been updated" msgstr "" -#: c:\Apache2\htdocs\account228/gl/manage/gl_account_types.php:67 +#: ../gl/manage/gl_account_types.php:66 msgid "New account type has been added" msgstr "" -#: c:\Apache2\htdocs\account228/gl/manage/gl_account_types.php:88 -msgid "Cannot delete this account group because GL accounts have been created referring to it." +#: ../gl/manage/gl_account_types.php:83 +msgid "" +"Cannot delete this account group because GL accounts have been created " +"referring to it." msgstr "" -#: c:\Apache2\htdocs\account228/gl/manage/gl_account_types.php:98 -msgid "Cannot delete this account group because GL account groups have been created referring to it." +#: ../gl/manage/gl_account_types.php:89 +msgid "" +"Cannot delete this account group because GL account groups have been created " +"referring to it." msgstr "" -#: c:\Apache2\htdocs\account228/gl/manage/gl_account_types.php:114 +#: ../gl/manage/gl_account_types.php:105 msgid "Selected account group has been deleted" msgstr "" -#: c:\Apache2\htdocs\account228/gl/manage/gl_account_types.php:131 -msgid "ID" +#: ../gl/manage/gl_account_types.php:122 +msgid "Group ID" +msgstr "" + +#: ../gl/manage/gl_account_types.php:122 +#: ../sales/manage/sales_groups.php:85 +msgid "Group Name" msgstr "" -#: c:\Apache2\htdocs\account228/gl/manage/gl_account_types.php:131 +#: ../gl/manage/gl_account_types.php:122 msgid "Subgroup Of" msgstr "" -#: c:\Apache2\htdocs\account228/gl/manage/gl_account_types.php:182 -#: c:\Apache2\htdocs\account228/gl/manage/gl_account_types.php:185 +#: ../gl/manage/gl_account_types.php:181 msgid "ID:" msgstr "" -#: c:\Apache2\htdocs\account228/gl/manage/gl_account_types.php:188 +#: ../gl/manage/gl_account_types.php:184 msgid "Subgroup Of:" msgstr "" -#: c:\Apache2\htdocs\account228/gl/manage/gl_quick_entries.php:16 +#: ../gl/manage/gl_quick_entries.php:16 msgid "Quick Entries" msgstr "" -#: c:\Apache2\htdocs\account228/gl/manage/gl_quick_entries.php:58 +#: ../gl/manage/gl_quick_entries.php:58 +#: ../includes/ui/simple_crud_class.inc:221 +#: ../includes/ui/ui_input.inc:201 msgid "Add new" msgstr "" -#: c:\Apache2\htdocs\account228/gl/manage/gl_quick_entries.php:73 +#: ../gl/manage/gl_quick_entries.php:73 msgid "The Quick Entry description cannot be empty." msgstr "" -#: c:\Apache2\htdocs\account228/gl/manage/gl_quick_entries.php:79 +#: ../gl/manage/gl_quick_entries.php:80 +msgid "You can only use Balance Based together with Journal Entries." +msgstr "" + +#: ../gl/manage/gl_quick_entries.php:86 msgid "The base amount description cannot be empty." msgstr "" -#: c:\Apache2\htdocs\account228/gl/manage/gl_quick_entries.php:99 +#: ../gl/manage/gl_quick_entries.php:106 msgid "Selected quick entry has been updated" msgstr "" -#: c:\Apache2\htdocs\account228/gl/manage/gl_quick_entries.php:105 +#: ../gl/manage/gl_quick_entries.php:112 msgid "New quick entry has been added" msgstr "" -#: c:\Apache2\htdocs\account228/gl/manage/gl_quick_entries.php:117 +#: ../gl/manage/gl_quick_entries.php:124 msgid "Selected quick entry line has been updated" msgstr "" -#: c:\Apache2\htdocs\account228/gl/manage/gl_quick_entries.php:123 +#: ../gl/manage/gl_quick_entries.php:130 msgid "New quick entry line has been added" msgstr "" -#: c:\Apache2\htdocs\account228/gl/manage/gl_quick_entries.php:135 +#: ../gl/manage/gl_quick_entries.php:142 msgid "Selected quick entry has been deleted" msgstr "" -#: c:\Apache2\htdocs\account228/gl/manage/gl_quick_entries.php:140 +#: ../gl/manage/gl_quick_entries.php:147 msgid "The Quick Entry has Quick Entry Lines. Cannot be deleted." msgstr "" -#: c:\Apache2\htdocs\account228/gl/manage/gl_quick_entries.php:148 +#: ../gl/manage/gl_quick_entries.php:163 msgid "Selected quick entry line has been deleted" msgstr "" -#: c:\Apache2\htdocs\account228/gl/manage/gl_quick_entries.php:156 -#: c:\Apache2\htdocs\account228/gl/manage/gl_quick_entries.php:213 +#: ../gl/manage/gl_quick_entries.php:171 +#: ../gl/manage/gl_quick_entries.php:245 +#: ../gl/manage/gl_quick_entries.php:246 msgid "Base Amount" msgstr "" -#: c:\Apache2\htdocs\account228/gl/manage/gl_quick_entries.php:211 +#: ../gl/manage/gl_quick_entries.php:226 msgid "Entry Type" msgstr "" -#: c:\Apache2\htdocs\account228/gl/manage/gl_quick_entries.php:213 +#: ../gl/manage/gl_quick_entries.php:230 +msgid "Balance Based" +msgstr "" + +#: ../gl/manage/gl_quick_entries.php:240 +#: ../gl/includes/ui/gl_journal_ui.inc:57 +msgid "Yearly" +msgstr "" + +#: ../gl/manage/gl_quick_entries.php:246 msgid "Base Amount Description" msgstr "" -#: c:\Apache2\htdocs\account228/gl/manage/gl_quick_entries.php:215 +#: ../gl/manage/gl_quick_entries.php:247 msgid "Default Base Amount" msgstr "" -#: c:\Apache2\htdocs\account228/gl/manage/gl_quick_entries.php:226 +#: ../gl/manage/gl_quick_entries.php:256 msgid "Quick Entry Lines" msgstr "" -#: c:\Apache2\htdocs\account228/gl/manage/gl_quick_entries.php:232 -#: c:\Apache2\htdocs\account228/gl/manage/gl_quick_entries.php:234 -#: c:\Apache2\htdocs\account228/gl/manage/gl_quick_entries.php:236 +#: ../gl/manage/gl_quick_entries.php:262 +#: ../gl/manage/gl_quick_entries.php:264 +#: ../gl/manage/gl_quick_entries.php:266 msgid "Post" msgstr "" -#: c:\Apache2\htdocs\account228/gl/manage/gl_quick_entries.php:232 -#: c:\Apache2\htdocs\account228/gl/manage/gl_quick_entries.php:234 -#: c:\Apache2\htdocs\account228/gl/manage/gl_quick_entries.php:236 +#: ../gl/manage/gl_quick_entries.php:262 +#: ../gl/manage/gl_quick_entries.php:264 +#: ../gl/manage/gl_quick_entries.php:266 msgid "Account/Tax Type" msgstr "" -#: c:\Apache2\htdocs\account228/gl/manage/gl_quick_entries.php:297 +#: ../gl/manage/gl_quick_entries.php:321 msgid "Posted" msgstr "" -#: c:\Apache2\htdocs\account228/gl/manage/gl_quick_entries.php:306 +#: ../gl/manage/gl_quick_entries.php:330 +#: ../sales/customer_delivery.php:431 +#: ../sales/customer_invoice.php:443 msgid "Tax Type" msgstr "" -#: c:\Apache2\htdocs\account228/gl/manage/gl_quick_entries.php:314 +#: ../gl/manage/gl_quick_entries.php:338 msgid "Part" msgstr "" -#: c:\Apache2\htdocs\account228/gl/view/bank_transfer_view.php:17 +#: ../gl/manage/revaluate_currencies.php:23 +msgid "Revaluation of Currency Accounts" +msgstr "" + +#: ../gl/manage/revaluate_currencies.php:31 +msgid "No Revaluation was needed" +msgstr "" + +#: ../gl/manage/revaluate_currencies.php:101 +msgid "Date for Revaluation:" +msgstr "" + +#: ../gl/manage/revaluate_currencies.php:106 +msgid "Revaluate Currencies" +msgstr "" + +#: ../gl/view/accrual_trans.php:16 +msgid "Search General Ledger Transactions for account: " +msgstr "" + +#: ../gl/view/accrual_trans.php:41 +#: ../gl/view/gl_trans_view.php:26 +msgid "" +"The script must be called with a valid transaction type and transaction " +"number to review the general ledger postings for." +msgstr "" + +#: ../gl/view/bank_transfer_view.php:17 msgid "View Bank Transfer" msgstr "" -#: c:\Apache2\htdocs\account228/gl/view/bank_transfer_view.php:67 -#: c:\Apache2\htdocs\account228/gl/view/gl_payment_view.php:62 +#: ../gl/view/bank_transfer_view.php:67 +#: ../gl/view/gl_payment_view.php:62 +#: ../purchasing/view/view_supp_payment.php:54 msgid "From Bank Account" msgstr "" -#: c:\Apache2\htdocs\account228/gl/view/bank_transfer_view.php:76 -#: c:\Apache2\htdocs\account228/gl/view/gl_deposit_view.php:64 +#: ../gl/view/bank_transfer_view.php:76 +#: ../gl/view/gl_deposit_view.php:64 msgid "To Bank Account" msgstr "" -#: c:\Apache2\htdocs\account228/gl/view/bank_transfer_view.php:84 +#: ../gl/view/bank_transfer_view.php:84 msgid "Transfer Type" msgstr "" -#: c:\Apache2\htdocs\account228/gl/view/bank_transfer_view.php:92 +#: ../gl/view/bank_transfer_view.php:92 +#: ../inventory/view/view_transfer.php:76 msgid "This transfer has been voided." msgstr "" -#: c:\Apache2\htdocs\account228/gl/view/gl_deposit_view.php:17 +#: ../gl/view/gl_deposit_view.php:17 msgid "View Bank Deposit" msgstr "" -#: c:\Apache2\htdocs\account228/gl/view/gl_deposit_view.php:48 +#: ../gl/view/gl_deposit_view.php:48 msgid "GL Deposit" msgstr "" -#: c:\Apache2\htdocs\account228/gl/view/gl_deposit_view.php:71 +#: ../gl/view/gl_deposit_view.php:71 +#: ../gl/includes/db/gl_db_banking.inc:104 +#: ../reporting/reports_main.php:81 +#: ../reporting/reports_main.php:88 +#: ../reporting/reports_main.php:100 +#: ../reporting/reports_main.php:107 +#: ../reporting/reports_main.php:113 +#: ../reporting/reports_main.php:119 +#: ../reporting/reports_main.php:154 +#: ../reporting/reports_main.php:160 +#: ../reporting/reports_main.php:209 msgid "From" msgstr "" -#: c:\Apache2\htdocs\account228/gl/view/gl_deposit_view.php:72 +#: ../gl/view/gl_deposit_view.php:72 msgid "Deposit Type" msgstr "" -#: c:\Apache2\htdocs\account228/gl/view/gl_deposit_view.php:81 +#: ../gl/view/gl_deposit_view.php:81 msgid "This deposit has been voided." msgstr "" -#: c:\Apache2\htdocs\account228/gl/view/gl_deposit_view.php:87 +#: ../gl/view/gl_deposit_view.php:87 msgid "There are no items for this deposit." msgstr "" -#: c:\Apache2\htdocs\account228/gl/view/gl_deposit_view.php:92 +#: ../gl/view/gl_deposit_view.php:92 msgid "Items for this Deposit" msgstr "" -#: c:\Apache2\htdocs\account228/gl/view/gl_deposit_view.php:94 -#: c:\Apache2\htdocs\account228/gl/view/gl_payment_view.php:92 +#: ../gl/view/gl_deposit_view.php:94 +#: ../gl/view/gl_payment_view.php:92 msgid "Item Amounts are Shown in :" msgstr "" -#: c:\Apache2\htdocs\account228/gl/view/gl_deposit_view.php:99 -#: c:\Apache2\htdocs\account228/gl/view/gl_deposit_view.php:102 -#: c:\Apache2\htdocs\account228/gl/view/gl_deposit_view.php:105 -#: c:\Apache2\htdocs\account228/gl/view/gl_payment_view.php:98 -#: c:\Apache2\htdocs\account228/gl/view/gl_payment_view.php:101 -#: c:\Apache2\htdocs\account228/gl/view/gl_payment_view.php:104 -#: c:\Apache2\htdocs\account228/gl/view/gl_trans_view.php:71 -#: c:\Apache2\htdocs\account228/gl/view/gl_trans_view.php:74 -#: c:\Apache2\htdocs\account228/gl/view/gl_trans_view.php:77 +#: ../gl/view/gl_deposit_view.php:99 +#: ../gl/view/gl_deposit_view.php:102 +#: ../gl/view/gl_deposit_view.php:105 +#: ../gl/view/gl_payment_view.php:98 +#: ../gl/view/gl_payment_view.php:101 +#: ../gl/view/gl_payment_view.php:104 +#: ../gl/view/gl_trans_view.php:63 +#: ../gl/view/gl_trans_view.php:66 +#: ../gl/view/gl_trans_view.php:69 +#: ../gl/includes/ui/gl_bank_ui.inc:121 +#: ../gl/includes/ui/gl_bank_ui.inc:124 +#: ../gl/includes/ui/gl_bank_ui.inc:127 +#: ../gl/includes/ui/gl_journal_ui.inc:83 +#: ../gl/includes/ui/gl_journal_ui.inc:86 +#: ../gl/includes/ui/gl_journal_ui.inc:89 +#: ../reporting/rep701.php:106 msgid "Account Code" msgstr "" -#: c:\Apache2\htdocs\account228/gl/view/gl_deposit_view.php:99 -#: c:\Apache2\htdocs\account228/gl/view/gl_deposit_view.php:102 -#: c:\Apache2\htdocs\account228/gl/view/gl_deposit_view.php:105 -#: c:\Apache2\htdocs\account228/gl/view/gl_payment_view.php:98 -#: c:\Apache2\htdocs\account228/gl/view/gl_payment_view.php:101 -#: c:\Apache2\htdocs\account228/gl/view/gl_payment_view.php:104 +#: ../gl/view/gl_deposit_view.php:99 +#: ../gl/view/gl_deposit_view.php:102 +#: ../gl/view/gl_deposit_view.php:105 +#: ../gl/view/gl_payment_view.php:98 +#: ../gl/view/gl_payment_view.php:101 +#: ../gl/view/gl_payment_view.php:104 +#: ../gl/includes/ui/gl_bank_ui.inc:121 +#: ../gl/includes/ui/gl_bank_ui.inc:124 +#: ../gl/includes/ui/gl_bank_ui.inc:127 +#: ../gl/includes/ui/gl_journal_ui.inc:83 +#: ../gl/includes/ui/gl_journal_ui.inc:86 +#: ../gl/includes/ui/gl_journal_ui.inc:89 msgid "Account Description" msgstr "" -#: c:\Apache2\htdocs\account228/gl/view/gl_payment_view.php:17 +#: ../gl/view/gl_payment_view.php:17 msgid "View Bank Payment" msgstr "" -#: c:\Apache2\htdocs\account228/gl/view/gl_payment_view.php:46 +#: ../gl/view/gl_payment_view.php:46 msgid "GL Payment" msgstr "" -#: c:\Apache2\htdocs\account228/gl/view/gl_payment_view.php:69 +#: ../gl/view/gl_payment_view.php:69 msgid "Pay To" msgstr "" -#: c:\Apache2\htdocs\account228/gl/view/gl_payment_view.php:70 +#: ../gl/view/gl_payment_view.php:70 +#: ../purchasing/view/view_supp_payment.php:61 +#: ../sales/view/view_receipt.php:48 msgid "Payment Type" msgstr "" -#: c:\Apache2\htdocs\account228/gl/view/gl_payment_view.php:79 +#: ../gl/view/gl_payment_view.php:79 +#: ../purchasing/view/view_supp_payment.php:76 msgid "This payment has been voided." msgstr "" -#: c:\Apache2\htdocs\account228/gl/view/gl_payment_view.php:85 +#: ../gl/view/gl_payment_view.php:85 msgid "There are no items for this payment." msgstr "" -#: c:\Apache2\htdocs\account228/gl/view/gl_payment_view.php:90 +#: ../gl/view/gl_payment_view.php:90 msgid "Items for this Payment" msgstr "" -#: c:\Apache2\htdocs\account228/gl/view/gl_trans_view.php:16 -#: c:\Apache2\htdocs\account228/gl/view/gl_trans_view.php:35 +#: ../gl/view/gl_trans_view.php:16 +#: ../gl/view/gl_trans_view.php:35 msgid "General Ledger Transaction Details" msgstr "" -#: c:\Apache2\htdocs\account228/gl/view/gl_trans_view.php:26 -msgid "The script must be called with a valid transaction type and transaction number to review the general ledger postings for." -msgstr "" - -#: c:\Apache2\htdocs\account228/gl/view/gl_trans_view.php:62 +#: ../gl/view/gl_trans_view.php:54 msgid "No general ledger transactions have been created for" msgstr "" -#: c:\Apache2\htdocs\account228/gl/view/gl_trans_view.php:62 +#: ../gl/view/gl_trans_view.php:54 msgid "number" msgstr "" -#: c:\Apache2\htdocs\account228/gl/view/gl_trans_view.php:111 +#: ../gl/view/gl_trans_view.php:118 msgid "This transaction has been voided." msgstr "" -#: c:\Apache2\htdocs\account228/install/save.php:354 -msgid "Cannot create database" +#: ../gl/includes/db/gl_db_banking.inc:44 +#: ../gl/includes/db/gl_db_banking.inc:47 +msgid "Exchange Variance" msgstr "" -#: c:\Apache2\htdocs\account228/inventory/adjustments.php:28 -msgid "Item Adjustments Note" +#: ../gl/includes/db/gl_db_banking.inc:104 +#: ../reporting/reports_main.php:82 +#: ../reporting/reports_main.php:89 +#: ../reporting/reports_main.php:101 +#: ../reporting/reports_main.php:108 +#: ../reporting/reports_main.php:114 +#: ../reporting/reports_main.php:120 +#: ../reporting/reports_main.php:155 +#: ../reporting/reports_main.php:161 +#: ../reporting/reports_main.php:210 +msgid "To" msgstr "" -#: c:\Apache2\htdocs\account228/inventory/adjustments.php:32 -msgid "There are no inventory items defined in the system which can be adjusted (Purchased or Manufactured)." +#: ../gl/includes/ui/gl_bank_ui.inc:25 +#: ../gl/includes/ui/gl_journal_ui.inc:27 +#: ../inventory/includes/item_adjustments_ui.inc:39 +#: ../inventory/includes/stock_transfers_ui.inc:42 +#: ../manufacturing/work_order_add_finished.php:208 +#: ../manufacturing/work_order_costs.php:144 +#: ../purchasing/allocations/supplier_allocate.php:54 +#: ../sales/allocations/customer_allocate.php:53 +#: ../sales/includes/ui/sales_credit_ui.inc:121 +msgid "Date:" msgstr "" -#: c:\Apache2\htdocs\account228/inventory/adjustments.php:34 -#: c:\Apache2\htdocs\account228/inventory/transfers.php:34 -msgid "There are no inventory movement types defined in the system. Please define at least one inventory adjustment type." +#: ../gl/includes/ui/gl_bank_ui.inc:50 +msgid "Pay To:" msgstr "" -#: c:\Apache2\htdocs\account228/inventory/adjustments.php:43 -msgid "Items adjustment has been processed" +#: ../gl/includes/ui/gl_bank_ui.inc:55 +msgid "To the Order of:" msgstr "" -#: c:\Apache2\htdocs\account228/inventory/adjustments.php:44 -msgid "&View this adjustment" +#: ../gl/includes/ui/gl_bank_ui.inc:62 +#: ../inventory/purchasing_data.php:182 +#: ../inventory/purchasing_data.php:186 +#: ../purchasing/includes/ui/invoice_ui.inc:73 +#: ../purchasing/includes/ui/invoice_ui.inc:80 +#: ../purchasing/includes/ui/po_ui.inc:120 +#: ../purchasing/includes/ui/po_ui.inc:125 +msgid "Supplier:" msgstr "" -#: c:\Apache2\htdocs\account228/inventory/adjustments.php:46 -msgid "View the GL &Postings for this Adjustment" +#: ../gl/includes/ui/gl_bank_ui.inc:65 +#: ../sales/manage/recurrent_invoices.php:151 +#: ../sales/includes/ui/sales_credit_ui.inc:29 +#: ../sales/includes/ui/sales_order_ui.inc:279 +msgid "Customer:" msgstr "" -#: c:\Apache2\htdocs\account228/inventory/adjustments.php:48 -msgid "Enter &Another Adjustment" +#: ../gl/includes/ui/gl_bank_ui.inc:69 +#: ../sales/customer_payments.php:239 +#: ../sales/manage/recurrent_invoices.php:154 +#: ../sales/includes/ui/sales_credit_ui.inc:37 +#: ../sales/includes/ui/sales_order_ui.inc:286 +msgid "Branch:" msgstr "" -#: c:\Apache2\htdocs\account228/inventory/adjustments.php:88 -#: c:\Apache2\htdocs\account228/inventory/transfers.php:87 -msgid "You must enter at least one non empty item line." +#: ../gl/includes/ui/gl_bank_ui.inc:87 +#: ../gl/includes/ui/gl_journal_ui.inc:58 +#: ../gl/includes/ui/gl_journal_ui.inc:62 +#: ../purchasing/includes/ui/invoice_ui.inc:231 +msgid "Go" msgstr "" -#: c:\Apache2\htdocs\account228/inventory/adjustments.php:108 -#: c:\Apache2\htdocs\account228/inventory/transfers.php:105 -msgid "The entered date for the adjustment is invalid." +#: ../gl/includes/ui/gl_bank_ui.inc:156 +#: ../includes/ui/simple_crud_class.inc:52 +#: ../inventory/includes/item_adjustments_ui.inc:88 +#: ../inventory/includes/stock_transfers_ui.inc:80 +#: ../manufacturing/includes/work_order_issue_ui.inc:59 +#: ../purchasing/includes/ui/invoice_ui.inc:514 +#: ../purchasing/includes/ui/po_ui.inc:267 +#: ../sales/includes/ui/sales_credit_ui.inc:198 +#: ../sales/includes/ui/sales_order_ui.inc:204 +msgid "Edit document line" msgstr "" -#: c:\Apache2\htdocs\account228/inventory/adjustments.php:122 -msgid "The adjustment cannot be processed because an adjustment item would cause a negative inventory balance :" +#: ../gl/includes/ui/gl_bank_ui.inc:158 +#: ../includes/ui/simple_crud_class.inc:54 +#: ../inventory/includes/item_adjustments_ui.inc:90 +#: ../inventory/includes/stock_transfers_ui.inc:82 +#: ../manufacturing/includes/work_order_issue_ui.inc:61 +#: ../purchasing/includes/ui/invoice_ui.inc:285 +#: ../purchasing/includes/ui/po_ui.inc:269 +#: ../sales/includes/ui/sales_credit_ui.inc:200 +#: ../sales/includes/ui/sales_order_ui.inc:206 +msgid "Remove line from document" msgstr "" -#: c:\Apache2\htdocs\account228/inventory/adjustments.php:152 -msgid "The quantity entered is negative or invalid." +#: ../gl/includes/ui/gl_bank_ui.inc:247 +#: ../gl/includes/ui/gl_journal_ui.inc:222 +#: ../includes/ui/simple_crud_class.inc:56 +#: ../inventory/includes/item_adjustments_ui.inc:158 +#: ../inventory/includes/stock_transfers_ui.inc:138 +#: ../manufacturing/includes/work_order_issue_ui.inc:128 +#: ../purchasing/includes/ui/po_ui.inc:435 +#: ../sales/includes/ui/sales_credit_ui.inc:294 +#: ../sales/includes/ui/sales_order_ui.inc:559 +msgid "Confirm changes" msgstr "" -#: c:\Apache2\htdocs\account228/inventory/adjustments.php:159 -msgid "The entered standard cost is negative or invalid." +#: ../gl/includes/ui/gl_bank_ui.inc:249 +#: ../gl/includes/ui/gl_journal_ui.inc:224 +#: ../includes/ui/simple_crud_class.inc:58 +#: ../inventory/includes/item_adjustments_ui.inc:160 +#: ../inventory/includes/stock_transfers_ui.inc:140 +#: ../manufacturing/includes/work_order_issue_ui.inc:130 +#: ../purchasing/includes/ui/po_ui.inc:437 +#: ../sales/includes/ui/sales_credit_ui.inc:296 +#: ../sales/includes/ui/sales_order_ui.inc:561 +msgid "Cancel changes" msgstr "" -#: c:\Apache2\htdocs\account228/inventory/adjustments.php:228 -msgid "Adjustment Items" +#: ../gl/includes/ui/gl_bank_ui.inc:254 +#: ../gl/includes/ui/gl_journal_ui.inc:228 +#: ../inventory/includes/item_adjustments_ui.inc:166 +#: ../inventory/includes/stock_transfers_ui.inc:146 +#: ../manufacturing/includes/work_order_issue_ui.inc:136 +#: ../purchasing/includes/ui/po_ui.inc:443 +#: ../sales/includes/ui/sales_credit_ui.inc:302 +#: ../sales/includes/ui/sales_order_ui.inc:567 +msgid "Add Item" msgstr "" -#: c:\Apache2\htdocs\account228/inventory/adjustments.php:234 -msgid "Process Adjustment" +#: ../gl/includes/ui/gl_bank_ui.inc:255 +#: ../inventory/includes/item_adjustments_ui.inc:167 +#: ../inventory/includes/stock_transfers_ui.inc:147 +#: ../manufacturing/includes/work_order_issue_ui.inc:137 +#: ../purchasing/includes/ui/po_ui.inc:444 +#: ../sales/includes/ui/sales_credit_ui.inc:303 +#: ../sales/includes/ui/sales_order_ui.inc:568 +msgid "Add new item to document" msgstr "" -#: c:\Apache2\htdocs\account228/inventory/cost_update.php:26 -msgid "Inventory Item Cost Update" +#: ../gl/includes/ui/gl_journal_ui.inc:38 +msgid "Reverse Transaction:" msgstr "" -#: c:\Apache2\htdocs\account228/inventory/cost_update.php:30 -msgid "There are no costable inventory items defined in the system (Purchased or manufactured items)." +#: ../gl/includes/ui/gl_journal_ui.inc:46 +#: ../includes/sysnames.inc:98 +msgid "Quick Entry" msgstr "" -#: c:\Apache2\htdocs\account228/inventory/cost_update.php:51 -msgid "The entered cost is not numeric." +#: ../gl/includes/ui/gl_journal_ui.inc:57 +msgid "balance from account" msgstr "" -#: c:\Apache2\htdocs\account228/inventory/cost_update.php:57 -msgid "The new cost is the same as the old cost. Cost was not updated." +#: ../gl/includes/ui/gl_journal_ui.inc:123 +msgid "Edit journal line" msgstr "" -#: c:\Apache2\htdocs\account228/inventory/cost_update.php:67 -msgid "Cost has been updated." +#: ../gl/includes/ui/gl_journal_ui.inc:125 +msgid "Remove line from journal" msgstr "" -#: c:\Apache2\htdocs\account228/inventory/cost_update.php:71 -msgid "View the GL Journal Entries for this Cost Update" +#: ../gl/includes/ui/gl_journal_ui.inc:229 +msgid "Add new line to journal" msgstr "" -#: c:\Apache2\htdocs\account228/inventory/cost_update.php:85 -#: c:\Apache2\htdocs\account228/inventory/prices.php:56 -#: c:\Apache2\htdocs\account228/inventory/purchasing_data.php:117 -#: c:\Apache2\htdocs\account228/inventory/reorder_level.php:43 -#: c:\Apache2\htdocs\account228/inventory/inquiry/stock_movements.php:49 -#: c:\Apache2\htdocs\account228/inventory/inquiry/stock_status.php:41 -#: c:\Apache2\htdocs\account228/inventory/manage/item_codes.php:105 -msgid "Item:" +#: ../includes/access_levels.inc:56 +msgid "System administration" msgstr "" -#: c:\Apache2\htdocs\account228/inventory/cost_update.php:111 -msgid "Standard Material Cost Per Unit" +#: ../includes/access_levels.inc:57 +msgid "Company setup" msgstr "" -#: c:\Apache2\htdocs\account228/inventory/cost_update.php:114 -msgid "Standard Labour Cost Per Unit" +#: ../includes/access_levels.inc:58 +msgid "Special maintenance" msgstr "" -#: c:\Apache2\htdocs\account228/inventory/cost_update.php:115 -msgid "Standard Overhead Cost Per Unit" +#: ../includes/access_levels.inc:59 +msgid "Sales configuration" msgstr "" -#: c:\Apache2\htdocs\account228/inventory/prices.php:16 -msgid "Inventory Item Sales prices" +#: ../includes/access_levels.inc:60 +msgid "Sales transactions" msgstr "" -#: c:\Apache2\htdocs\account228/inventory/prices.php:27 -#: c:\Apache2\htdocs\account228/inventory/inquiry/stock_movements.php:30 -#: c:\Apache2\htdocs\account228/inventory/inquiry/stock_status.php:34 -msgid "There are no items defined in the system." +#: ../includes/access_levels.inc:61 +msgid "Sales related reports" msgstr "" -#: c:\Apache2\htdocs\account228/inventory/prices.php:29 -msgid "There are no sales types in the system. Please set up sales types befor entering pricing." +#: ../includes/access_levels.inc:62 +msgid "Purchase configuration" msgstr "" -#: c:\Apache2\htdocs\account228/inventory/prices.php:70 -msgid "The price entered must be numeric." +#: ../includes/access_levels.inc:63 +msgid "Purchase transactions" msgstr "" -#: c:\Apache2\htdocs\account228/inventory/prices.php:83 -msgid "This price has been updated." +#: ../includes/access_levels.inc:64 +msgid "Purchase analytics" msgstr "" -#: c:\Apache2\htdocs\account228/inventory/prices.php:91 -msgid "The new price has been added." +#: ../includes/access_levels.inc:65 +msgid "Inventory configuration" msgstr "" -#: c:\Apache2\htdocs\account228/inventory/prices.php:105 -msgid "The selected price has been deleted." +#: ../includes/access_levels.inc:66 +msgid "Inventory operations" msgstr "" -#: c:\Apache2\htdocs\account228/inventory/prices.php:133 -msgid "Sales Type" +#: ../includes/access_levels.inc:67 +msgid "Inventory analytics" msgstr "" -#: c:\Apache2\htdocs\account228/inventory/prices.php:133 -#: c:\Apache2\htdocs\account228/inventory/purchasing_data.php:150 -msgid "Price" +#: ../includes/access_levels.inc:68 +msgid "Manufacturing configuration" msgstr "" -#: c:\Apache2\htdocs\account228/inventory/prices.php:155 -msgid "There are no prices set up for this part." +#: ../includes/access_levels.inc:69 +msgid "Manufacturing transations" msgstr "" -#: c:\Apache2\htdocs\account228/inventory/prices.php:174 -msgid "Currency:" +#: ../includes/access_levels.inc:70 +msgid "Manufacturing analytics" msgstr "" -#: c:\Apache2\htdocs\account228/inventory/prices.php:176 -msgid "Sales Type:" +#: ../includes/access_levels.inc:71 +msgid "Dimensions configuration" msgstr "" -#: c:\Apache2\htdocs\account228/inventory/prices.php:184 -#: c:\Apache2\htdocs\account228/inventory/purchasing_data.php:220 -msgid "Price:" +#: ../includes/access_levels.inc:72 +#: ../inventory/manage/items.php:351 +#: ../reporting/reports_main.php:213 +msgid "Dimensions" msgstr "" -#: c:\Apache2\htdocs\account228/inventory/prices.php:184 -msgid "per" +#: ../includes/access_levels.inc:73 +msgid "Banking & GL configuration" msgstr "" -#: c:\Apache2\htdocs\account228/inventory/prices.php:188 -msgid "The price is calculated." +#: ../includes/access_levels.inc:74 +msgid "Banking & GL transactions" msgstr "" -#: c:\Apache2\htdocs\account228/inventory/purchasing_data.php:16 -msgid "Supplier Purchasing Data" +#: ../includes/access_levels.inc:75 +msgid "Banking & GL analytics" msgstr "" -#: c:\Apache2\htdocs\account228/inventory/purchasing_data.php:23 -msgid "There are no purchasable inventory items defined in the system." +#: ../includes/access_levels.inc:93 +msgid "Install/update companies" msgstr "" -#: c:\Apache2\htdocs\account228/inventory/purchasing_data.php:24 -msgid "There are no suppliers defined in the system." +#: ../includes/access_levels.inc:94 +msgid "Install/update languages" msgstr "" -#: c:\Apache2\htdocs\account228/inventory/purchasing_data.php:38 -#: c:\Apache2\htdocs\account228/inventory/manage/item_codes.php:35 -msgid "There is no item selected." +#: ../includes/access_levels.inc:95 +msgid "Install/upgrade modules" msgstr "" -#: c:\Apache2\htdocs\account228/inventory/purchasing_data.php:44 -msgid "The price entered was not numeric." +#: ../includes/access_levels.inc:96 +msgid "Software upgrades" msgstr "" -#: c:\Apache2\htdocs\account228/inventory/purchasing_data.php:50 -msgid "The conversion factor entered was not numeric. The conversion factor is the number by which the price must be divided by to get the unit price in our unit of measure." +#: ../includes/access_levels.inc:100 +msgid "Company parameters" msgstr "" -#: c:\Apache2\htdocs\account228/inventory/purchasing_data.php:67 -msgid "This supplier purchasing data has been added." +#: ../includes/access_levels.inc:101 +msgid "Access levels edition" msgstr "" -#: c:\Apache2\htdocs\account228/inventory/purchasing_data.php:78 -msgid "Supplier purchasing data has been updated." +#: ../includes/access_levels.inc:102 +msgid "Users setup" msgstr "" -#: c:\Apache2\htdocs\account228/inventory/purchasing_data.php:93 -msgid "The purchasing data item has been sucessfully deleted." +#: ../includes/access_levels.inc:103 +msgid "Point of sales definitions" msgstr "" -#: c:\Apache2\htdocs\account228/inventory/purchasing_data.php:128 -msgid "Entered item is not defined. Please re-enter." +#: ../includes/access_levels.inc:104 +msgid "Printers configuration" msgstr "" -#: c:\Apache2\htdocs\account228/inventory/purchasing_data.php:144 -msgid "There is no purchasing data set up for the part selected" +#: ../includes/access_levels.inc:105 +msgid "Print profiles" msgstr "" -#: c:\Apache2\htdocs\account228/inventory/purchasing_data.php:150 -msgid "Supplier" +#: ../includes/access_levels.inc:106 +msgid "Payment terms" msgstr "" -#: c:\Apache2\htdocs\account228/inventory/purchasing_data.php:151 -msgid "Supplier's Unit" +#: ../includes/access_levels.inc:107 +msgid "Shipping ways" msgstr "" -#: c:\Apache2\htdocs\account228/inventory/purchasing_data.php:151 -msgid "Conversion Factor" +#: ../includes/access_levels.inc:108 +msgid "Credit status definitions changes" msgstr "" -#: c:\Apache2\htdocs\account228/inventory/purchasing_data.php:151 -msgid "Supplier's Description" +#: ../includes/access_levels.inc:109 +msgid "Inventory locations changes" msgstr "" -#: c:\Apache2\htdocs\account228/inventory/purchasing_data.php:213 -#: c:\Apache2\htdocs\account228/inventory/purchasing_data.php:217 -msgid "Supplier:" +#: ../includes/access_levels.inc:110 +msgid "Inventory movement types" msgstr "" -#: c:\Apache2\htdocs\account228/inventory/purchasing_data.php:221 -msgid "Suppliers Unit of Measure:" +#: ../includes/access_levels.inc:111 +msgid "Manufacture work centres" msgstr "" -#: c:\Apache2\htdocs\account228/inventory/purchasing_data.php:227 -msgid "Conversion Factor (to our UOM):" +#: ../includes/access_levels.inc:112 +msgid "Forms setup" msgstr "" -#: c:\Apache2\htdocs\account228/inventory/purchasing_data.php:229 -msgid "Supplier's Code or Description:" +#: ../includes/access_levels.inc:113 +msgid "Contact categories" msgstr "" -#: c:\Apache2\htdocs\account228/inventory/reorder_level.php:16 -msgid "Reorder Levels" +#: ../includes/access_levels.inc:117 +msgid "Voiding transactions" msgstr "" -#: c:\Apache2\htdocs\account228/inventory/reorder_level.php:24 -#: c:\Apache2\htdocs\account228/inventory/transfers.php:32 -msgid "There are no inventory items defined in the system (Purchased or manufactured items)." +#: ../includes/access_levels.inc:118 +msgid "Database backup/restore" msgstr "" -#: c:\Apache2\htdocs\account228/inventory/reorder_level.php:57 -#: c:\Apache2\htdocs\account228/inventory/inquiry/stock_status.php:65 -#: c:\Apache2\htdocs\account228/inventory/inquiry/stock_status.php:69 -msgid "Location" +#: ../includes/access_levels.inc:119 +msgid "Common view/print transactions interface" msgstr "" -#: c:\Apache2\htdocs\account228/inventory/reorder_level.php:57 -#: c:\Apache2\htdocs\account228/inventory/inquiry/stock_movements.php:78 -#: c:\Apache2\htdocs\account228/inventory/inquiry/stock_status.php:69 -msgid "Quantity On Hand" +#: ../includes/access_levels.inc:120 +msgid "Attaching documents" msgstr "" -#: c:\Apache2\htdocs\account228/inventory/reorder_level.php:57 -#: c:\Apache2\htdocs\account228/inventory/inquiry/stock_status.php:69 -msgid "Re-Order Level" +#: ../includes/access_levels.inc:121 +msgid "Display preferences" msgstr "" -#: c:\Apache2\htdocs\account228/inventory/reorder_level.php:75 -msgid "Reorder levels has been updated." +#: ../includes/access_levels.inc:122 +msgid "Password changes" msgstr "" -#: c:\Apache2\htdocs\account228/inventory/transfers.php:28 -msgid "Inventory Location Transfers" +#: ../includes/access_levels.inc:127 +msgid "Sales types" msgstr "" -#: c:\Apache2\htdocs\account228/inventory/transfers.php:43 -msgid "Inventory transfer has been processed" +#: ../includes/access_levels.inc:128 +msgid "Sales prices edition" msgstr "" -#: c:\Apache2\htdocs\account228/inventory/transfers.php:44 -msgid "&View this transfer" +#: ../includes/access_levels.inc:129 +msgid "Sales staff maintenance" msgstr "" -#: c:\Apache2\htdocs\account228/inventory/transfers.php:46 -msgid "Enter &Another Inventory Transfer" +#: ../includes/access_levels.inc:130 +msgid "Sales areas maintenance" msgstr "" -#: c:\Apache2\htdocs\account228/inventory/transfers.php:117 -msgid "The locations to transfer from and to must be different." +#: ../includes/access_levels.inc:131 +msgid "Sales groups changes" msgstr "" -#: c:\Apache2\htdocs\account228/inventory/transfers.php:127 -msgid "The quantity entered is greater than the available quantity for this item at the source location :" +#: ../includes/access_levels.inc:132 +msgid "Sales templates" msgstr "" -#: c:\Apache2\htdocs\account228/inventory/transfers.php:160 -msgid "The quantity entered must be a positive number." +#: ../includes/access_levels.inc:133 +msgid "Recurrent invoices definitions" msgstr "" -#: c:\Apache2\htdocs\account228/inventory/transfers.php:230 -#: c:\Apache2\htdocs\account228/inventory/manage/items.php:16 -msgid "Items" +#: ../includes/access_levels.inc:135 +msgid "Sales transactions view" msgstr "" -#: c:\Apache2\htdocs\account228/inventory/transfers.php:237 -msgid "Process Transfer" +#: ../includes/access_levels.inc:136 +msgid "Sales customer and branches changes" msgstr "" -#: c:\Apache2\htdocs\account228/inventory/inquiry/stock_movements.php:27 -msgid "Inventory Item Movement" +#: ../includes/access_levels.inc:137 +msgid "Sales quotations" msgstr "" -#: c:\Apache2\htdocs\account228/inventory/inquiry/stock_movements.php:51 -msgid "From Location:" +#: ../includes/access_levels.inc:138 +msgid "Sales orders edition" msgstr "" -#: c:\Apache2\htdocs\account228/inventory/inquiry/stock_movements.php:56 -msgid "Show Movements" +#: ../includes/access_levels.inc:139 +msgid "Sales deliveries edition" msgstr "" -#: c:\Apache2\htdocs\account228/inventory/inquiry/stock_movements.php:56 -msgid "Refresh Inquiry" +#: ../includes/access_levels.inc:140 +msgid "Sales invoices edition" msgstr "" -#: c:\Apache2\htdocs\account228/inventory/inquiry/stock_movements.php:77 -msgid "Detail" +#: ../includes/access_levels.inc:141 +msgid "Sales credit notes against invoice" msgstr "" -#: c:\Apache2\htdocs\account228/inventory/inquiry/stock_movements.php:78 -msgid "Quantity In" +#: ../includes/access_levels.inc:142 +msgid "Sales freehand credit notes" msgstr "" -#: c:\Apache2\htdocs\account228/inventory/inquiry/stock_movements.php:78 -msgid "Quantity Out" +#: ../includes/access_levels.inc:143 +msgid "Customer payments entry" msgstr "" -#: c:\Apache2\htdocs\account228/inventory/inquiry/stock_movements.php:96 -msgid "Quantity on hand before" +#: ../includes/access_levels.inc:144 +msgid "Customer payments allocation" msgstr "" -#: c:\Apache2\htdocs\account228/inventory/inquiry/stock_movements.php:187 -msgid "Quantity on hand after" +#: ../includes/access_levels.inc:146 +msgid "Sales analytical reports" msgstr "" -#: c:\Apache2\htdocs\account228/inventory/inquiry/stock_status.php:18 -#: c:\Apache2\htdocs\account228/inventory/inquiry/stock_status.php:20 -msgid "Inventory Item Status" +#: ../includes/access_levels.inc:147 +msgid "Sales document bulk reports" msgstr "" -#: c:\Apache2\htdocs\account228/inventory/inquiry/stock_status.php:55 -msgid "This is a service and cannot have a stock holding, only the total quantity on outstanding sales orders is shown." +#: ../includes/access_levels.inc:148 +msgid "Sales prices listing" msgstr "" -#: c:\Apache2\htdocs\account228/inventory/inquiry/stock_status.php:65 -#: c:\Apache2\htdocs\account228/inventory/inquiry/stock_status.php:70 -msgid "Demand" +#: ../includes/access_levels.inc:149 +msgid "Sales staff listing" msgstr "" -#: c:\Apache2\htdocs\account228/inventory/inquiry/stock_status.php:70 -msgid "Available" +#: ../includes/access_levels.inc:150 +msgid "Customer bulk listing" msgstr "" -#: c:\Apache2\htdocs\account228/inventory/inquiry/stock_status.php:70 -msgid "On Order" +#: ../includes/access_levels.inc:151 +msgid "Customer status report" msgstr "" -#: c:\Apache2\htdocs\account228/inventory/manage/items.php:69 -msgid "Only jpg files are supported - a file extension of .jpg is expected" +#: ../includes/access_levels.inc:152 +msgid "Customer payments report" msgstr "" -#: c:\Apache2\htdocs\account228/inventory/manage/items.php:100 -msgid "There are no item categories defined in the system. At least one item category is required to add a item." +#: ../includes/access_levels.inc:157 +msgid "Purchase price changes" msgstr "" -#: c:\Apache2\htdocs\account228/inventory/manage/items.php:102 -msgid "There are no item tax types defined in the system. At least one item tax type is required to add a item." +#: ../includes/access_levels.inc:159 +msgid "Supplier transactions view" msgstr "" -#: c:\Apache2\htdocs\account228/inventory/manage/items.php:129 -msgid "The item name must be entered." +#: ../includes/access_levels.inc:160 +msgid "Suppliers changes" msgstr "" -#: c:\Apache2\htdocs\account228/inventory/manage/items.php:135 -msgid "The item code cannot be empty" +#: ../includes/access_levels.inc:161 +msgid "Purchase order entry" msgstr "" -#: c:\Apache2\htdocs\account228/inventory/manage/items.php:143 -msgid "The item code cannot contain any of the following characters - & + OR a space OR quotes" +#: ../includes/access_levels.inc:162 +msgid "Purchase receive" msgstr "" -#: c:\Apache2\htdocs\account228/inventory/manage/items.php:150 -#: c:\Apache2\htdocs\account228/inventory/manage/item_codes.php:55 -msgid "This item code is already assigned to stock item or sale kit." +#: ../includes/access_levels.inc:163 +msgid "Supplier invoices" msgstr "" -#: c:\Apache2\htdocs\account228/inventory/manage/items.php:179 -msgid "Item has been updated." +#: ../includes/access_levels.inc:164 +msgid "Deleting GRN items during invoice entry" msgstr "" -#: c:\Apache2\htdocs\account228/inventory/manage/items.php:192 -msgid "A new item has been added." +#: ../includes/access_levels.inc:165 +msgid "Supplier credit notes" msgstr "" -#: c:\Apache2\htdocs\account228/inventory/manage/items.php:216 -msgid "Cannot delete this item because there are stock movements that refer to this item." +#: ../includes/access_levels.inc:166 +msgid "Supplier payments" msgstr "" -#: c:\Apache2\htdocs\account228/inventory/manage/items.php:219 -msgid "Cannot delete this item record because there are bills of material that require this part as a component." +#: ../includes/access_levels.inc:167 +msgid "Supplier payments allocations" msgstr "" -#: c:\Apache2\htdocs\account228/inventory/manage/items.php:222 -#: c:\Apache2\htdocs\account228/inventory/manage/items.php:225 -msgid "Cannot delete this item because there are existing purchase order items for it." +#: ../includes/access_levels.inc:169 +msgid "Supplier analytical reports" msgstr "" -#: c:\Apache2\htdocs\account228/inventory/manage/items.php:244 -msgid "" -"This item cannot be deleted because some code aliases \n" -"\t\t\t\tor foreign codes was entered for it, or there are kits defined \n" -"\t\t\t\tusing this item as component" +#: ../includes/access_levels.inc:170 +msgid "Supplier document bulk reports" msgstr "" -#: c:\Apache2\htdocs\account228/inventory/manage/items.php:276 -msgid "Selected item has been deleted." +#: ../includes/access_levels.inc:171 +msgid "Supplier payments report" msgstr "" -#: c:\Apache2\htdocs\account228/inventory/manage/items.php:292 -msgid "Select an item:" +#: ../includes/access_levels.inc:175 +msgid "Stock items add/edit" msgstr "" -#: c:\Apache2\htdocs\account228/inventory/manage/items.php:293 -msgid "New item" +#: ../includes/access_levels.inc:176 +msgid "Sales kits" msgstr "" -#: c:\Apache2\htdocs\account228/inventory/manage/items.php:310 -msgid "Item" +#: ../includes/access_levels.inc:177 +msgid "Item categories" msgstr "" -#: c:\Apache2\htdocs\account228/inventory/manage/items.php:315 -#: c:\Apache2\htdocs\account228/inventory/manage/items.php:344 -msgid "Item Code:" +#: ../includes/access_levels.inc:178 +msgid "Units of measure" msgstr "" -#: c:\Apache2\htdocs\account228/inventory/manage/items.php:351 -#: c:\Apache2\htdocs\account228/inventory/manage/item_codes.php:178 -msgid "Description:" +#: ../includes/access_levels.inc:180 +msgid "Stock status view" msgstr "" -#: c:\Apache2\htdocs\account228/inventory/manage/items.php:353 -#: c:\Apache2\htdocs\account228/inventory/manage/item_codes.php:179 -msgid "Category:" +#: ../includes/access_levels.inc:181 +msgid "Stock transactions view" msgstr "" -#: c:\Apache2\htdocs\account228/inventory/manage/items.php:374 -#: c:\Apache2\htdocs\account228/inventory/manage/item_categories.php:191 -msgid "Item Tax Type:" +#: ../includes/access_levels.inc:182 +msgid "Foreign item codes entry" msgstr "" -#: c:\Apache2\htdocs\account228/inventory/manage/items.php:376 -#: c:\Apache2\htdocs\account228/inventory/manage/item_categories.php:193 -msgid "Item Type:" +#: ../includes/access_levels.inc:183 +msgid "Inventory location transfers" msgstr "" -#: c:\Apache2\htdocs\account228/inventory/manage/items.php:378 -#: c:\Apache2\htdocs\account228/inventory/manage/item_categories.php:195 -msgid "Units of Measure:" +#: ../includes/access_levels.inc:184 +msgid "Inventory adjustments" msgstr "" -#: c:\Apache2\htdocs\account228/inventory/manage/items.php:383 -msgid "Dimensions" +#: ../includes/access_levels.inc:186 +msgid "Reorder levels" msgstr "" -#: c:\Apache2\htdocs\account228/inventory/manage/items.php:396 -msgid "GL Accounts" +#: ../includes/access_levels.inc:187 +msgid "Items analytical reports and inquiries" msgstr "" -#: c:\Apache2\htdocs\account228/inventory/manage/items.php:419 -msgid "Other" +#: ../includes/access_levels.inc:188 +msgid "Inventory valuation report" msgstr "" -#: c:\Apache2\htdocs\account228/inventory/manage/items.php:422 -msgid "Image File (.jpg)" +#: ../includes/access_levels.inc:193 +msgid "Bill of Materials" msgstr "" -#: c:\Apache2\htdocs\account228/inventory/manage/items.php:437 -msgid "No image" +#: ../includes/access_levels.inc:195 +msgid "Manufacturing operations view" msgstr "" -#: c:\Apache2\htdocs\account228/inventory/manage/items.php:442 -msgid "Delete Image:" +#: ../includes/access_levels.inc:196 +msgid "Work order entry" msgstr "" -#: c:\Apache2\htdocs\account228/inventory/manage/items.php:444 -#: c:\Apache2\htdocs\account228/inventory/manage/item_categories.php:197 -msgid "Exclude from sales:" +#: ../includes/access_levels.inc:197 +msgid "Material issues entry" msgstr "" -#: c:\Apache2\htdocs\account228/inventory/manage/items.php:446 -msgid "Item status:" +#: ../includes/access_levels.inc:198 +msgid "Final product receive" msgstr "" -#: c:\Apache2\htdocs\account228/inventory/manage/items.php:452 -msgid "Insert New Item" +#: ../includes/access_levels.inc:199 +msgid "Work order releases" msgstr "" -#: c:\Apache2\htdocs\account228/inventory/manage/items.php:456 -msgid "Update Item" +#: ../includes/access_levels.inc:201 +msgid "Work order analytical reports and inquiries" msgstr "" -#: c:\Apache2\htdocs\account228/inventory/manage/items.php:459 -msgid "Select this items and return to document entry." +#: ../includes/access_levels.inc:202 +msgid "Manufacturing cost inquiry" msgstr "" -#: c:\Apache2\htdocs\account228/inventory/manage/items.php:460 -msgid "Clone This Item" +#: ../includes/access_levels.inc:203 +msgid "Work order bulk reports" msgstr "" -#: c:\Apache2\htdocs\account228/inventory/manage/items.php:461 -msgid "Delete This Item" +#: ../includes/access_levels.inc:204 +msgid "Bill of materials reports" msgstr "" -#: c:\Apache2\htdocs\account228/inventory/manage/item_categories.php:16 -msgid "Item Categories" +#: ../includes/access_levels.inc:208 +msgid "Dimension tags" msgstr "" -#: c:\Apache2\htdocs\account228/inventory/manage/item_categories.php:34 -msgid "The item category description cannot be empty." +#: ../includes/access_levels.inc:210 +msgid "Dimension view" msgstr "" -#: c:\Apache2\htdocs\account228/inventory/manage/item_categories.php:48 -msgid "Selected item category has been updated" +#: ../includes/access_levels.inc:212 +msgid "Dimension entry" msgstr "" -#: c:\Apache2\htdocs\account228/inventory/manage/item_categories.php:58 -msgid "New item category has been added" +#: ../includes/access_levels.inc:214 +msgid "Dimension reports" msgstr "" -#: c:\Apache2\htdocs\account228/inventory/manage/item_categories.php:75 -msgid "Cannot delete this item category because items have been created using this item category." +#: ../includes/access_levels.inc:218 +msgid "Item tax type definitions" msgstr "" -#: c:\Apache2\htdocs\account228/inventory/manage/item_categories.php:80 -msgid "Selected item category has been deleted" +#: ../includes/access_levels.inc:219 +msgid "GL accounts edition" msgstr "" -#: c:\Apache2\htdocs\account228/inventory/manage/item_categories.php:105 -msgid "Tax type" +#: ../includes/access_levels.inc:220 +msgid "GL account groups" msgstr "" -#: c:\Apache2\htdocs\account228/inventory/manage/item_categories.php:105 -#: c:\Apache2\htdocs\account228/inventory/manage/item_codes.php:122 -msgid "Units" +#: ../includes/access_levels.inc:221 +msgid "GL account classes" msgstr "" -#: c:\Apache2\htdocs\account228/inventory/manage/item_categories.php:105 -msgid "Sales Act" +#: ../includes/access_levels.inc:222 +msgid "Quick GL entry definitions" msgstr "" -#: c:\Apache2\htdocs\account228/inventory/manage/item_categories.php:106 -msgid "Inventory Account" +#: ../includes/access_levels.inc:224 +msgid "Bank accounts" msgstr "" -#: c:\Apache2\htdocs\account228/inventory/manage/item_categories.php:106 -msgid "COGS Account" +#: ../includes/access_levels.inc:225 +msgid "Tax rates" msgstr "" -#: c:\Apache2\htdocs\account228/inventory/manage/item_categories.php:106 -msgid "Adjustment Account" +#: ../includes/access_levels.inc:226 +msgid "Tax groups" msgstr "" -#: c:\Apache2\htdocs\account228/inventory/manage/item_categories.php:107 -msgid "Assembly Account" +#: ../includes/access_levels.inc:227 +msgid "Fiscal years maintenance" msgstr "" -#: c:\Apache2\htdocs\account228/inventory/manage/item_categories.php:187 -msgid "Category Name:" +#: ../includes/access_levels.inc:228 +msgid "Company GL setup" msgstr "" -#: c:\Apache2\htdocs\account228/inventory/manage/item_categories.php:189 -msgid "Default values for new items" +#: ../includes/access_levels.inc:229 +msgid "GL Account tags" msgstr "" -#: c:\Apache2\htdocs\account228/inventory/manage/item_codes.php:16 -msgid "Foreign Item Codes" +#: ../includes/access_levels.inc:230 +msgid "Allow entry on non closed Fiscal years" msgstr "" -#: c:\Apache2\htdocs\account228/inventory/manage/item_codes.php:23 -msgid "There are no inventory items defined in the system." +#: ../includes/access_levels.inc:232 +msgid "Bank transactions view" msgstr "" -#: c:\Apache2\htdocs\account228/inventory/manage/item_codes.php:41 -msgid "The price entered was not positive number." +#: ../includes/access_levels.inc:233 +msgid "GL postings view" msgstr "" -#: c:\Apache2\htdocs\account228/inventory/manage/item_codes.php:47 -msgid "Item code description cannot be empty." +#: ../includes/access_levels.inc:234 +msgid "Exchange rate table changes" msgstr "" -#: c:\Apache2\htdocs\account228/inventory/manage/item_codes.php:67 -msgid "New item code has been added." +#: ../includes/access_levels.inc:235 +msgid "Bank payments" msgstr "" -#: c:\Apache2\htdocs\account228/inventory/manage/item_codes.php:73 -msgid "Item code has been updated." +#: ../includes/access_levels.inc:236 +msgid "Bank deposits" msgstr "" -#: c:\Apache2\htdocs\account228/inventory/manage/item_codes.php:85 -msgid "Item code has been sucessfully deleted." +#: ../includes/access_levels.inc:237 +msgid "Bank account transfers" msgstr "" -#: c:\Apache2\htdocs\account228/inventory/manage/item_codes.php:122 -msgid "EAN/UPC Code" +#: ../includes/access_levels.inc:238 +msgid "Bank reconciliation" msgstr "" -#: c:\Apache2\htdocs\account228/inventory/manage/item_codes.php:122 -msgid "Quantity" +#: ../includes/access_levels.inc:239 +msgid "Manual journal entries" msgstr "" -#: c:\Apache2\htdocs\account228/inventory/manage/item_codes.php:123 -msgid "Category" +#: ../includes/access_levels.inc:240 +msgid "Journal entries to bank related accounts" msgstr "" -#: c:\Apache2\htdocs\account228/inventory/manage/item_codes.php:176 -msgid "UPC/EAN code:" +#: ../includes/access_levels.inc:241 +msgid "Budget edition" msgstr "" -#: c:\Apache2\htdocs\account228/inventory/manage/item_codes.php:177 -msgid "Quantity:" +#: ../includes/access_levels.inc:242 +msgid "Item standard costs" msgstr "" -#: c:\Apache2\htdocs\account228/inventory/manage/item_units.php:16 -msgid "Units of Measure" +#: ../includes/access_levels.inc:245 +msgid "GL analytical reports and inquiries" msgstr "" -#: c:\Apache2\htdocs\account228/inventory/manage/item_units.php:34 -msgid "The unit of measure code cannot be empty." +#: ../includes/access_levels.inc:246 +msgid "Tax reports and inquiries" msgstr "" -#: c:\Apache2\htdocs\account228/inventory/manage/item_units.php:40 -msgid "The unit of measure code is too long." +#: ../includes/access_levels.inc:247 +msgid "Bank reports and inquiries" msgstr "" -#: c:\Apache2\htdocs\account228/inventory/manage/item_units.php:46 -msgid "The unit of measure description cannot be empty." +#: ../includes/access_levels.inc:248 +msgid "GL reports and inquiries" msgstr "" -#: c:\Apache2\htdocs\account228/inventory/manage/item_units.php:53 -msgid "Selected unit has been updated" +#: ../includes/banking.inc:100 +#, php-format +msgid "" +"Cannot retrieve exchange rate for currency %s as of %s. Please add exchange " +"rate manually on Exchange Rates page." msgstr "" -#: c:\Apache2\htdocs\account228/inventory/manage/item_units.php:55 -msgid "New unit has been added" +#: ../includes/current_user.inc:79 +msgid "" +"Before software upgrade you have to include old $security_groups and " +"$security_headings arrays from old config.php file to the new one." msgstr "" -#: c:\Apache2\htdocs\account228/inventory/manage/item_units.php:69 -msgid "Cannot delete this unit of measure because items have been created using this unit." +#: ../includes/current_user.inc:80 +#: ../includes/ui/ui_controls.inc:174 +#: ../includes/ui/ui_view.inc:842 +msgid "Back" msgstr "" -#: c:\Apache2\htdocs\account228/inventory/manage/item_units.php:75 -msgid "Selected unit has been deleted" +#: ../includes/current_user.inc:90 +msgid "System is available for site admin only until full database upgrade" msgstr "" -#: c:\Apache2\htdocs\account228/inventory/manage/item_units.php:94 -msgid "Unit" +#: ../includes/current_user.inc:428 +msgid "Requesting data..." msgstr "" -#: c:\Apache2\htdocs\account228/inventory/manage/item_units.php:94 -msgid "Decimals" +#: ../includes/errors.inc:73 +msgid "in file" msgstr "" -#: c:\Apache2\htdocs\account228/inventory/manage/item_units.php:107 -#: c:\Apache2\htdocs\account228/inventory/manage/item_units.php:142 -msgid "User Quantity Decimals" +#: ../includes/errors.inc:73 +msgid "at line " msgstr "" -#: c:\Apache2\htdocs\account228/inventory/manage/item_units.php:136 -#: c:\Apache2\htdocs\account228/inventory/manage/item_units.php:139 -msgid "Unit Abbreviation:" +#: ../includes/errors.inc:120 +msgid "Debug mode database warning:" msgstr "" -#: c:\Apache2\htdocs\account228/inventory/manage/item_units.php:140 -msgid "Descriptive Name:" +#: ../includes/errors.inc:122 +msgid "DATABASE ERROR :" msgstr "" -#: c:\Apache2\htdocs\account228/inventory/manage/item_units.php:142 -msgid "Decimal Places:" +#: ../includes/errors.inc:153 +msgid "" +"The entered information is a duplicate. Please go back and enter different " +"values." msgstr "" -#: c:\Apache2\htdocs\account228/inventory/manage/locations.php:16 -msgid "Inventory Locations" +#: ../includes/main.inc:41 +msgid "This page is usable only with javascript enabled browsers." msgstr "" -#: c:\Apache2\htdocs\account228/inventory/manage/locations.php:39 -msgid "The location code must be five characters or less long (including converted special chars)." +#: ../includes/packages.inc:294 +msgid "Release file in repository is invalid, or public key is outdated." msgstr "" -#: c:\Apache2\htdocs\account228/inventory/manage/locations.php:45 -msgid "The location name must be entered." +#: ../includes/packages.inc:310 +msgid "Repository version does not match application version." msgstr "" -#: c:\Apache2\htdocs\account228/inventory/manage/locations.php:56 -msgid "Selected location has been updated" +#: ../includes/packages.inc:324 +#, php-format +msgid "" +"Security alert: broken index file in repository '%s'. Please inform " +"repository administrator about this issue." msgstr "" -#: c:\Apache2\htdocs\account228/inventory/manage/locations.php:65 -msgid "New location has been added" +#: ../includes/packages.inc:357 +#, php-format +msgid "" +"Security alert: broken package '%s' in repository. Please inform repository " +"administrator about this issue." msgstr "" -#: c:\Apache2\htdocs\account228/inventory/manage/locations.php:79 -msgid "Cannot delete this location because item movements have been created using this location." +#: ../includes/packages.inc:612 +#: ../includes/packages.inc:663 +#, php-format +msgid "Package '%s' not found." msgstr "" -#: c:\Apache2\htdocs\account228/inventory/manage/locations.php:88 -msgid "Cannot delete this location because it is used by some work orders records." +#: ../includes/session.inc:39 +msgid "Incorrect Password" msgstr "" -#: c:\Apache2\htdocs\account228/inventory/manage/locations.php:97 -msgid "Cannot delete this location because it is used by some branch records as the default location to deliver from." +#: ../includes/session.inc:40 +msgid "The user and password combination is not valid for the system." msgstr "" -#: c:\Apache2\htdocs\account228/inventory/manage/locations.php:106 -#: c:\Apache2\htdocs\account228/inventory/manage/locations.php:114 -#: c:\Apache2\htdocs\account228/inventory/manage/locations.php:122 -#: c:\Apache2\htdocs\account228/inventory/manage/locations.php:130 -#: c:\Apache2\htdocs\account228/inventory/manage/locations.php:138 -msgid "Cannot delete this location because it is used by some related records in other tables." +#: ../includes/session.inc:42 +msgid "" +"If you are not an authorized user, please contact your system administrator " +"to obtain an account to enable you to use the system." msgstr "" -#: c:\Apache2\htdocs\account228/inventory/manage/locations.php:152 -msgid "Selected location has been deleted" +#: ../includes/session.inc:43 +msgid "Try again" msgstr "" -#: c:\Apache2\htdocs\account228/inventory/manage/locations.php:171 -msgid "Location Code" +#: ../includes/session.inc:62 +msgid "Security settings have not been defined for your user account." msgstr "" -#: c:\Apache2\htdocs\account228/inventory/manage/locations.php:171 -msgid "Location Name" +#: ../includes/session.inc:63 +msgid "Please contact your system administrator." msgstr "" -#: c:\Apache2\htdocs\account228/inventory/manage/locations.php:217 -#: c:\Apache2\htdocs\account228/inventory/manage/locations.php:221 -msgid "Location Code:" +#: ../includes/session.inc:64 +msgid "" +"Please remove $security_groups and $security_headings arrays from config.php " +"file!" msgstr "" -#: c:\Apache2\htdocs\account228/inventory/manage/locations.php:224 -msgid "Location Name:" +#: ../includes/session.inc:66 +msgid "" +"Access to application has been blocked until database upgrade is completed " +"by system administrator." msgstr "" -#: c:\Apache2\htdocs\account228/inventory/manage/locations.php:225 -msgid "Contact for deliveries:" +#: ../includes/session.inc:80 +msgid "" +"The security settings on your account do not permit you to access this " +"function" msgstr "" -#: c:\Apache2\htdocs\account228/inventory/manage/locations.php:229 -msgid "Telephone No:" +#: ../includes/session.inc:89 +msgid "" +"System is blocked after source upgrade until database is updated on System/" +"Software Upgrade page" msgstr "" -#: c:\Apache2\htdocs\account228/inventory/manage/locations.php:231 -msgid "Facsimile No:" +#: ../includes/sysnames.inc:23 +#: ../includes/sysnames.inc:148 +msgid "Bank Payment" msgstr "" -#: c:\Apache2\htdocs\account228/inventory/manage/locations.php:232 -msgid "E-mail:" +#: ../includes/sysnames.inc:24 +#: ../includes/sysnames.inc:147 +msgid "Bank Deposit" msgstr "" -#: c:\Apache2\htdocs\account228/inventory/manage/movement_types.php:16 -msgid "Inventory Movement Types" +#: ../includes/sysnames.inc:25 +msgid "Funds Transfer" msgstr "" -#: c:\Apache2\htdocs\account228/inventory/manage/movement_types.php:34 -msgid "The inventory movement type name cannot be empty." +#: ../includes/sysnames.inc:26 +msgid "Sales Invoice" msgstr "" -#: c:\Apache2\htdocs\account228/inventory/manage/movement_types.php:43 -msgid "Selected movement type has been updated" +#: ../includes/sysnames.inc:27 +#: ../sales/credit_note_entry.php:37 +msgid "Customer Credit Note" msgstr "" -#: c:\Apache2\htdocs\account228/inventory/manage/movement_types.php:48 -msgid "New movement type has been added" +#: ../includes/sysnames.inc:28 +msgid "Customer Payment" msgstr "" -#: c:\Apache2\htdocs\account228/inventory/manage/movement_types.php:66 -msgid "Cannot delete this inventory movement type because item transactions have been created referring to it." +#: ../includes/sysnames.inc:29 +msgid "Delivery Note" msgstr "" -#: c:\Apache2\htdocs\account228/inventory/manage/movement_types.php:81 -msgid "Selected movement type has been deleted" +#: ../includes/sysnames.inc:30 +msgid "Location Transfer" msgstr "" -#: c:\Apache2\htdocs\account228/inventory/manage/sales_kits.php:16 -msgid "Sales Kits & Alias Codes" +#: ../includes/sysnames.inc:31 +msgid "Inventory Adjustment" msgstr "" -#: c:\Apache2\htdocs\account228/inventory/manage/sales_kits.php:42 -msgid "Stock Item" +#: ../includes/sysnames.inc:32 +#: ../purchasing/includes/ui/po_ui.inc:323 +#: ../purchasing/view/view_po.php:30 +msgid "Purchase Order" msgstr "" -#: c:\Apache2\htdocs\account228/inventory/manage/sales_kits.php:56 -msgid "kit" +#: ../includes/sysnames.inc:33 +msgid "Supplier Invoice" msgstr "" -#: c:\Apache2\htdocs\account228/inventory/manage/sales_kits.php:74 -msgid "The quantity entered must be numeric and greater than zero." +#: ../includes/sysnames.inc:34 +#: ../purchasing/supplier_credit.php:28 +msgid "Supplier Credit Note" msgstr "" -#: c:\Apache2\htdocs\account228/inventory/manage/sales_kits.php:95 -msgid "Kit/alias code cannot be empty." +#: ../includes/sysnames.inc:35 +msgid "Supplier Payment" msgstr "" -#: c:\Apache2\htdocs\account228/inventory/manage/sales_kits.php:103 -msgid "The selected component contains directly or on any lower level the kit under edition. Recursive kits are not allowed." +#: ../includes/sysnames.inc:36 +#: ../purchasing/view/view_grn.php:33 +msgid "Purchase Order Delivery" msgstr "" -#: c:\Apache2\htdocs\account228/inventory/manage/sales_kits.php:110 -msgid "The selected component is already in this kit. You can modify it's quantity but it cannot appear more than once in the same kit." +#: ../includes/sysnames.inc:37 +#: ../includes/sysnames.inc:95 +msgid "Work Order" msgstr "" -#: c:\Apache2\htdocs\account228/inventory/manage/sales_kits.php:118 -msgid "New alias code has been created." +#: ../includes/sysnames.inc:38 +msgid "Work Order Issue" msgstr "" -#: c:\Apache2\htdocs\account228/inventory/manage/sales_kits.php:121 -msgid "New component has been added to selected kit." +#: ../includes/sysnames.inc:39 +msgid "Work Order Production" msgstr "" -#: c:\Apache2\htdocs\account228/inventory/manage/sales_kits.php:131 -msgid "Component of selected kit has been updated." +#: ../includes/sysnames.inc:40 +#: ../sales/inquiry/sales_orders_view.php:134 +#: ../sales/inquiry/sales_orders_view.php:156 +msgid "Sales Order" msgstr "" -#: c:\Apache2\htdocs\account228/inventory/manage/sales_kits.php:141 -msgid "Kit common properties has been updated" +#: ../includes/sysnames.inc:41 +#: ../sales/sales_order_entry.php:592 +msgid "Sales Quotation" msgstr "" -#: c:\Apache2\htdocs\account228/inventory/manage/sales_kits.php:159 -msgid "This item cannot be deleted because it is the last item in the kit used by following kits" +#: ../includes/sysnames.inc:42 +msgid "Cost Update" msgstr "" -#: c:\Apache2\htdocs\account228/inventory/manage/sales_kits.php:170 -msgid "The component item has been deleted from this bom" +#: ../includes/sysnames.inc:47 +msgid "GJ" msgstr "" -#: c:\Apache2\htdocs\account228/inventory/manage/sales_kits.php:185 -msgid "Select a sale kit:" +#: ../includes/sysnames.inc:48 +msgid "BP" msgstr "" -#: c:\Apache2\htdocs\account228/inventory/manage/sales_kits.php:186 -msgid "New kit" +#: ../includes/sysnames.inc:49 +msgid "BD" msgstr "" -#: c:\Apache2\htdocs\account228/inventory/manage/sales_kits.php:201 -msgid "Alias/kit code:" +#: ../includes/sysnames.inc:50 +msgid "BT" msgstr "" -#: c:\Apache2\htdocs\account228/inventory/manage/sales_kits.php:210 -msgid "Update kit/alias name" +#: ../includes/sysnames.inc:51 +msgid "SI" msgstr "" -#: c:\Apache2\htdocs\account228/inventory/manage/sales_kits.php:225 -msgid "Component:" +#: ../includes/sysnames.inc:52 +msgid "CN" msgstr "" -#: c:\Apache2\htdocs\account228/inventory/manage/sales_kits.php:239 -msgid "kits" +#: ../includes/sysnames.inc:53 +msgid "CP" msgstr "" -#: c:\Apache2\htdocs\account228/inventory/view/view_adjustment.php:17 -msgid "View Inventory Adjustment" +#: ../includes/sysnames.inc:54 +#: ../sales/customer_invoice.php:446 +msgid "DN" msgstr "" -#: c:\Apache2\htdocs\account228/inventory/view/view_adjustment.php:43 -msgid "At Location" +#: ../includes/sysnames.inc:55 +msgid "IT" msgstr "" -#: c:\Apache2\htdocs\account228/inventory/view/view_adjustment.php:46 -#: c:\Apache2\htdocs\account228/inventory/view/view_transfer.php:46 -msgid "Adjustment Type" +#: ../includes/sysnames.inc:56 +msgid "IA" msgstr "" -#: c:\Apache2\htdocs\account228/inventory/view/view_adjustment.php:57 -msgid "Unit Cost" +#: ../includes/sysnames.inc:57 +msgid "PO" msgstr "" -#: c:\Apache2\htdocs\account228/inventory/view/view_adjustment.php:73 -msgid "This adjustment has been voided." +#: ../includes/sysnames.inc:58 +msgid "PI" msgstr "" -#: c:\Apache2\htdocs\account228/inventory/view/view_transfer.php:17 -msgid "View Inventory Transfer" +#: ../includes/sysnames.inc:59 +msgid "PC" msgstr "" -#: c:\Apache2\htdocs\account228/inventory/view/view_transfer.php:40 -msgid "From Location" +#: ../includes/sysnames.inc:60 +msgid "SP" msgstr "" -#: c:\Apache2\htdocs\account228/inventory/view/view_transfer.php:41 -msgid "To Location" +#: ../includes/sysnames.inc:61 +#: ../reporting/rep204.php:82 +msgid "GRN" msgstr "" -#: c:\Apache2\htdocs\account228/manufacturing/search_work_orders.php:26 -msgid "Search Outstanding Work Orders" +#: ../includes/sysnames.inc:62 +msgid "WO" msgstr "" -#: c:\Apache2\htdocs\account228/manufacturing/search_work_orders.php:31 -msgid "Search Work Orders" +#: ../includes/sysnames.inc:63 +msgid "WI" msgstr "" -#: c:\Apache2\htdocs\account228/manufacturing/search_work_orders.php:69 -msgid "at Location:" +#: ../includes/sysnames.inc:64 +msgid "WP" msgstr "" -#: c:\Apache2\htdocs\account228/manufacturing/search_work_orders.php:76 -msgid "for item:" +#: ../includes/sysnames.inc:65 +msgid "SO" msgstr "" -#: c:\Apache2\htdocs\account228/manufacturing/search_work_orders.php:78 -msgid "Select documents" +#: ../includes/sysnames.inc:66 +msgid "SQ" msgstr "" -#: c:\Apache2\htdocs\account228/manufacturing/search_work_orders.php:117 -msgid "Release" +#: ../includes/sysnames.inc:67 +msgid "CU" msgstr "" -#: c:\Apache2\htdocs\account228/manufacturing/search_work_orders.php:120 -msgid "Issue" +#: ../includes/sysnames.inc:68 +msgid "Dim" msgstr "" -#: c:\Apache2\htdocs\account228/manufacturing/search_work_orders.php:127 -msgid "Produce" +#: ../includes/sysnames.inc:76 +msgid "Savings Account" msgstr "" -#: c:\Apache2\htdocs\account228/manufacturing/search_work_orders.php:140 -msgid "Costs" +#: ../includes/sysnames.inc:77 +msgid "Chequing Account" msgstr "" -#: c:\Apache2\htdocs\account228/manufacturing/search_work_orders.php:212 -msgid "Required" +#: ../includes/sysnames.inc:78 +#: ../manufacturing/work_order_costs.php:153 +msgid "Credit Account" msgstr "" -#: c:\Apache2\htdocs\account228/manufacturing/search_work_orders.php:213 -msgid "Manufactured" +#: ../includes/sysnames.inc:79 +msgid "Cash Account" msgstr "" -#: c:\Apache2\htdocs\account228/manufacturing/search_work_orders.php:215 -msgid "Required By" +#: ../includes/sysnames.inc:83 +msgid "Transfer" msgstr "" -#: c:\Apache2\htdocs\account228/manufacturing/search_work_orders.php:224 -msgid "Marked orders are overdue." +#: ../includes/sysnames.inc:84 +msgid "Cheque" msgstr "" -#: c:\Apache2\htdocs\account228/manufacturing/work_order_add_finished.php:29 -msgid "Produce or Unassemble Finished Items From Work Order" +#: ../includes/sysnames.inc:86 +#: ../includes/sysnames.inc:180 +msgid "Cash" msgstr "" -#: c:\Apache2\htdocs\account228/manufacturing/work_order_add_finished.php:44 -msgid "The manufacturing process has been entered." +#: ../includes/sysnames.inc:96 +#: ../reporting/rep101.php:137 +#: ../reporting/rep102.php:115 +#: ../reporting/rep102.php:122 +#: ../reporting/rep105.php:107 +#: ../reporting/rep106.php:81 +#: ../reporting/rep304.php:114 +#: ../reporting/rep304.php:124 +#: ../reporting/reports_main.php:32 +#: ../reporting/reports_main.php:36 +#: ../reporting/reports_main.php:43 +#: ../reporting/reports_main.php:94 +#: ../reporting/reports_main.php:193 +#: ../sales/create_recurrent_invoices.php:98 +#: ../sales/customer_credit_invoice.php:246 +#: ../sales/customer_delivery.php:336 +#: ../sales/customer_invoice.php:367 +#: ../sales/allocations/customer_allocation_main.php:97 +#: ../sales/allocations/customer_allocation_main.php:105 +#: ../sales/manage/recurrent_invoices.php:85 +#: ../sales/view/view_credit.php:47 +#: ../sales/inquiry/customer_allocation_inquiry.php:147 +#: ../sales/inquiry/customer_allocation_inquiry.php:157 +#: ../sales/inquiry/customer_inquiry.php:218 +#: ../sales/inquiry/customer_inquiry.php:232 +#: ../sales/inquiry/sales_deliveries_view.php:180 +#: ../sales/inquiry/sales_orders_view.php:260 +#: ../sales/inquiry/sales_orders_view.php:274 +#: ../themes/exclusive/renderer.php:236 +#: ../themes/exclusive/renderer.php:254 +#: ../themes/exclusive/renderer.php:289 +msgid "Customer" msgstr "" -#: c:\Apache2\htdocs\account228/manufacturing/work_order_add_finished.php:46 -#: c:\Apache2\htdocs\account228/manufacturing/work_order_costs.php:45 -#: c:\Apache2\htdocs\account228/manufacturing/work_order_entry.php:56 -#: c:\Apache2\htdocs\account228/manufacturing/work_order_issue.php:37 -#: c:\Apache2\htdocs\account228/manufacturing/work_order_release.php:72 -msgid "View this Work Order" +#: ../includes/sysnames.inc:97 +#: ../includes/sysnames.inc:172 +#: ../inventory/purchasing_data.php:127 +#: ../purchasing/includes/ui/grn_ui.inc:20 +#: ../purchasing/includes/ui/po_ui.inc:316 +#: ../purchasing/view/view_supp_credit.php:42 +#: ../purchasing/view/view_supp_invoice.php:45 +#: ../purchasing/inquiry/po_search_completed.php:118 +#: ../purchasing/inquiry/po_search.php:132 +#: ../purchasing/inquiry/supplier_allocation_inquiry.php:128 +#: ../purchasing/inquiry/supplier_allocation_inquiry.php:141 +#: ../purchasing/inquiry/supplier_inquiry.php:165 +#: ../purchasing/inquiry/supplier_inquiry.php:179 +#: ../purchasing/allocations/supplier_allocation_main.php:98 +#: ../purchasing/allocations/supplier_allocation_main.php:106 +#: ../reporting/rep201.php:125 +#: ../reporting/rep202.php:118 +#: ../reporting/rep202.php:125 +#: ../reporting/rep203.php:98 +#: ../reporting/rep204.php:88 +#: ../reporting/reports_main.php:124 +#: ../reporting/reports_main.php:128 +#: ../reporting/reports_main.php:135 +#: ../reporting/reports_main.php:144 +#: ../reporting/reports_main.php:150 +#: ../themes/exclusive/renderer.php:333 +#: ../themes/exclusive/renderer.php:351 +#: ../themes/exclusive/renderer.php:383 +msgid "Supplier" msgstr "" -#: c:\Apache2\htdocs\account228/manufacturing/work_order_add_finished.php:48 -#: c:\Apache2\htdocs\account228/manufacturing/work_order_costs.php:47 -#: c:\Apache2\htdocs\account228/manufacturing/work_order_entry.php:65 -msgid "View the GL Journal Entries for this Work Order" +#: ../includes/sysnames.inc:105 +msgid "Assemble" msgstr "" -#: c:\Apache2\htdocs\account228/manufacturing/work_order_add_finished.php:50 -#: c:\Apache2\htdocs\account228/manufacturing/work_order_entry.php:67 -msgid "Print the GL Journal Entries for this Work Order" +#: ../includes/sysnames.inc:106 +msgid "Unassemble" msgstr "" -#: c:\Apache2\htdocs\account228/manufacturing/work_order_add_finished.php:52 -#: c:\Apache2\htdocs\account228/manufacturing/work_order_costs.php:51 -#: c:\Apache2\htdocs\account228/manufacturing/work_order_issue.php:39 -msgid "Select another &Work Order to Process" +#: ../includes/sysnames.inc:107 +msgid "Advanced Manufacture" msgstr "" -#: c:\Apache2\htdocs\account228/manufacturing/work_order_add_finished.php:64 -#: c:\Apache2\htdocs\account228/manufacturing/work_order_costs.php:63 -#: c:\Apache2\htdocs\account228/manufacturing/work_order_entry.php:340 -msgid "The order number sent is not valid." +#: ../includes/sysnames.inc:111 +msgid "Labour Cost" msgstr "" -#: c:\Apache2\htdocs\account228/manufacturing/work_order_add_finished.php:90 -msgid "The quantity entered is not a valid number or less then zero." +#: ../includes/sysnames.inc:112 +msgid "Overhead Cost" msgstr "" -#: c:\Apache2\htdocs\account228/manufacturing/work_order_add_finished.php:109 -msgid "The production date cannot be before the release date of the work order." +#: ../includes/sysnames.inc:119 +msgid "Assets" msgstr "" -#: c:\Apache2\htdocs\account228/manufacturing/work_order_add_finished.php:122 -msgid "The unassembling cannot be processed because there is insufficient stock." +#: ../includes/sysnames.inc:121 +msgid "Equity" msgstr "" -#: c:\Apache2\htdocs\account228/manufacturing/work_order_add_finished.php:140 -msgid "The production cannot be processed because a required item would cause a negative inventory balance :" +#: ../includes/sysnames.inc:122 +msgid "Income" msgstr "" -#: c:\Apache2\htdocs\account228/manufacturing/work_order_add_finished.php:197 -msgid "Produce Finished Items" +#: ../includes/sysnames.inc:123 +msgid "Cost of Goods Sold" msgstr "" -#: c:\Apache2\htdocs\account228/manufacturing/work_order_add_finished.php:197 -msgid "Return Items to Work Order" +#: ../includes/sysnames.inc:124 +msgid "Expense" msgstr "" -#: c:\Apache2\htdocs\account228/manufacturing/work_order_add_finished.php:201 -#: c:\Apache2\htdocs\account228/manufacturing/work_order_costs.php:142 -msgid "Date:" +#: ../includes/sysnames.inc:131 +#: ../themes/exclusive/renderer.php:290 +#: ../themes/exclusive/renderer.php:384 +msgid "Remainder" msgstr "" -#: c:\Apache2\htdocs\account228/manufacturing/work_order_add_finished.php:207 -msgid "Process" +#: ../includes/sysnames.inc:133 +msgid "Amount, increase base" msgstr "" -#: c:\Apache2\htdocs\account228/manufacturing/work_order_add_finished.php:208 -msgid "Process And Close Order" +#: ../includes/sysnames.inc:134 +msgid "Amount, reduce base" msgstr "" -#: c:\Apache2\htdocs\account228/manufacturing/work_order_costs.php:29 -msgid "Work Order Additional Costs" +#: ../includes/sysnames.inc:135 +msgid "% amount of base" msgstr "" -#: c:\Apache2\htdocs\account228/manufacturing/work_order_costs.php:43 -msgid "The additional cost has been entered." +#: ../includes/sysnames.inc:136 +msgid "% amount of base, increase base" msgstr "" -#: c:\Apache2\htdocs\account228/manufacturing/work_order_costs.php:49 -msgid "Enter another additional cost." +#: ../includes/sysnames.inc:137 +msgid "% amount of base, reduce base" msgstr "" -#: c:\Apache2\htdocs\account228/manufacturing/work_order_costs.php:75 -msgid "The amount entered is not a valid number or less then zero." +#: ../includes/sysnames.inc:138 +msgid "Taxes added" msgstr "" -#: c:\Apache2\htdocs\account228/manufacturing/work_order_costs.php:94 -msgid "The additional cost date cannot be before the release date of the work order." +#: ../includes/sysnames.inc:139 +msgid "Taxes added, increase base" msgstr "" -#: c:\Apache2\htdocs\account228/manufacturing/work_order_costs.php:151 -msgid "Additional Costs:" +#: ../includes/sysnames.inc:140 +msgid "Taxes added, reduce base" msgstr "" -#: c:\Apache2\htdocs\account228/manufacturing/work_order_costs.php:152 -msgid "Debit Account" +#: ../includes/sysnames.inc:141 +msgid "Taxes included" msgstr "" -#: c:\Apache2\htdocs\account228/manufacturing/work_order_costs.php:153 -msgid "Credit Account" +#: ../includes/sysnames.inc:142 +msgid "Taxes included, increase base" msgstr "" -#: c:\Apache2\htdocs\account228/manufacturing/work_order_costs.php:159 -msgid "Process Additional Cost" +#: ../includes/sysnames.inc:143 +msgid "Taxes included, reduce base" msgstr "" -#: c:\Apache2\htdocs\account228/manufacturing/work_order_entry.php:29 -msgid "Work Order Entry" +#: ../includes/sysnames.inc:150 +msgid "Supplier Invoice/Credit" msgstr "" -#: c:\Apache2\htdocs\account228/manufacturing/work_order_entry.php:32 -msgid "There are no manufacturable items defined in the system." +#: ../includes/sysnames.inc:156 +#: ../manufacturing/search_work_orders.php:165 +#: ../manufacturing/includes/manufacturing_ui.inc:278 +msgid "Manufactured" msgstr "" -#: c:\Apache2\htdocs\account228/manufacturing/work_order_entry.php:54 -msgid "The work order been added." +#: ../includes/sysnames.inc:157 +msgid "Purchased" msgstr "" -#: c:\Apache2\htdocs\account228/manufacturing/work_order_entry.php:62 -msgid "Print this Work Order" +#: ../includes/sysnames.inc:158 +msgid "Service" msgstr "" -#: c:\Apache2\htdocs\account228/manufacturing/work_order_entry.php:64 -msgid "Email this Work Order" +#: ../includes/sysnames.inc:171 +msgid "Customer branch" msgstr "" -#: c:\Apache2\htdocs\account228/manufacturing/work_order_entry.php:79 -msgid "The work order been updated." +#: ../includes/sysnames.inc:173 +msgid "Shipper" msgstr "" -#: c:\Apache2\htdocs\account228/manufacturing/work_order_entry.php:89 -msgid "Work order has been deleted." +#: ../includes/sysnames.inc:174 +msgid "Company internal" msgstr "" -#: c:\Apache2\htdocs\account228/manufacturing/work_order_entry.php:99 -msgid "This work order has been closed. There can be no more issues against it." +#: ../includes/sysnames.inc:179 +msgid "Prepayment" msgstr "" -#: c:\Apache2\htdocs\account228/manufacturing/work_order_entry.php:109 -msgid "Enter a new work order" +#: ../includes/sysnames.inc:181 +msgid "After No. of Days" msgstr "" -#: c:\Apache2\htdocs\account228/manufacturing/work_order_entry.php:110 -msgid "Select an existing work order" +#: ../includes/sysnames.inc:182 +msgid "Day In Following Month" msgstr "" -#: c:\Apache2\htdocs\account228/manufacturing/work_order_entry.php:146 -msgid "The quantity entered is invalid or less than zero." +#: ../includes/system_tests.inc:15 +#: ../includes/ui/ui_view.inc:210 +#: ../reporting/rep705.php:250 +#: ../reporting/rep705.php:261 +#: ../reporting/rep705.php:270 +msgid "Info" msgstr "" -#: c:\Apache2\htdocs\account228/manufacturing/work_order_entry.php:168 -msgid "The selected item to manufacture does not have a bom." +#: ../includes/system_tests.inc:16 +msgid "Optional" msgstr "" -#: c:\Apache2\htdocs\account228/manufacturing/work_order_entry.php:177 -msgid "The labour cost entered is invalid or less than zero." +#: ../includes/system_tests.inc:17 +msgid "Recommended" msgstr "" -#: c:\Apache2\htdocs\account228/manufacturing/work_order_entry.php:185 -msgid "The cost entered is invalid or less than zero." +#: ../includes/system_tests.inc:18 +msgid "Required " msgstr "" -#: c:\Apache2\htdocs\account228/manufacturing/work_order_entry.php:208 -msgid "The work order cannot be processed because there is an insufficient quantity for component:" +#: ../includes/system_tests.inc:24 +msgid "MySQL version" msgstr "" -#: c:\Apache2\htdocs\account228/manufacturing/work_order_entry.php:209 -msgid "Location:" +#: ../includes/system_tests.inc:28 +msgid "Upgrade MySQL server to version at least 4.1" msgstr "" -#: c:\Apache2\htdocs\account228/manufacturing/work_order_entry.php:222 -msgid "The selected item cannot be unassembled because there is insufficient stock." +#: ../includes/system_tests.inc:35 +msgid "PHP MySQL extension" msgstr "" -#: c:\Apache2\htdocs\account228/manufacturing/work_order_entry.php:248 -msgid "The quantity cannot be changed to be less than the quantity already manufactured for this order." +#: ../includes/system_tests.inc:40 +msgid "Your PHP has to have MySQL extension enabled." msgstr "" -#: c:\Apache2\htdocs\account228/manufacturing/work_order_entry.php:297 -msgid "This work order cannot be deleted because it has already been processed." +#: ../includes/system_tests.inc:46 +msgid "PHP version" msgstr "" -#: c:\Apache2\htdocs\account228/manufacturing/work_order_entry.php:348 -msgid "This work order is closed and cannot be edited." +#: ../includes/system_tests.inc:50 +msgid "Upgrade PHP to version at least 4.3.3" msgstr "" -#: c:\Apache2\htdocs\account228/manufacturing/work_order_entry.php:395 -#: c:\Apache2\htdocs\account228/manufacturing/work_order_entry.php:403 -msgid "Destination Location:" +#: ../includes/system_tests.inc:57 +msgid "Server system" msgstr "" -#: c:\Apache2\htdocs\account228/manufacturing/work_order_entry.php:414 -msgid "Quantity Required:" +#: ../includes/system_tests.inc:67 +msgid "Session save path" msgstr "" -#: c:\Apache2\htdocs\account228/manufacturing/work_order_entry.php:416 -msgid "Quantity Manufactured:" +#: ../includes/system_tests.inc:79 +msgid "Removed install wizard folder" msgstr "" -#: c:\Apache2\htdocs\account228/manufacturing/work_order_entry.php:435 -msgid "Credit Labour Account" +#: ../includes/system_tests.inc:82 +msgid "Not removed" msgstr "" -#: c:\Apache2\htdocs\account228/manufacturing/work_order_entry.php:442 -msgid "Credit Overhead Account" +#: ../includes/system_tests.inc:83 +msgid "Remove or rename install wizard folder for security reasons." msgstr "" -#: c:\Apache2\htdocs\account228/manufacturing/work_order_entry.php:447 -msgid "Released On:" +#: ../includes/system_tests.inc:90 +msgid "Browser type" msgstr "" -#: c:\Apache2\htdocs\account228/manufacturing/work_order_entry.php:457 -msgid "Save changes to work order" +#: ../includes/system_tests.inc:94 +msgid "Any browser is supported" msgstr "" -#: c:\Apache2\htdocs\account228/manufacturing/work_order_entry.php:460 -msgid "Close This Work Order" +#: ../includes/system_tests.inc:101 +msgid "Http server type" msgstr "" -#: c:\Apache2\htdocs\account228/manufacturing/work_order_entry.php:462 -msgid "Delete This Work Order" +#: ../includes/system_tests.inc:105 +msgid "Any server is supported" msgstr "" -#: c:\Apache2\htdocs\account228/manufacturing/work_order_entry.php:468 -msgid "Add Workorder" +#: ../includes/system_tests.inc:112 +msgid "Native gettext" msgstr "" -#: c:\Apache2\htdocs\account228/manufacturing/work_order_issue.php:29 -msgid "Issue Items to Work Order" +#: ../includes/system_tests.inc:116 +msgid "In case of no gettext support, php emulation is used" msgstr "" -#: c:\Apache2\htdocs\account228/manufacturing/work_order_issue.php:35 -msgid "The work order issue has been entered." +#: ../includes/system_tests.inc:124 +msgid "Debugging mode" msgstr "" -#: c:\Apache2\htdocs\account228/manufacturing/work_order_issue.php:76 -msgid "The entered date for the issue is invalid." +#: ../includes/system_tests.inc:128 +msgid "To switch debugging on set $go_debug>0 in config.php file" msgstr "" -#: c:\Apache2\htdocs\account228/manufacturing/work_order_issue.php:103 -msgid "The issue cannot be processed because an entered item would cause a negative inventory balance :" +#: ../includes/system_tests.inc:137 +msgid "Error logging" msgstr "" -#: c:\Apache2\htdocs\account228/manufacturing/work_order_issue.php:121 -msgid "The process cannot be completed because there is an insufficient total quantity for a component." +#: ../includes/system_tests.inc:145 +msgid "Disabled" msgstr "" -#: c:\Apache2\htdocs\account228/manufacturing/work_order_issue.php:122 -msgid "Component is :" +#: ../includes/system_tests.inc:148 +msgid "To switch error logging set $error_logging in config.php file" msgstr "" -#: c:\Apache2\htdocs\account228/manufacturing/work_order_issue.php:123 -msgid "From location :" +#: ../includes/system_tests.inc:151 +msgid "Log file is not writeable" msgstr "" -#: c:\Apache2\htdocs\account228/manufacturing/work_order_issue.php:216 -msgid "Items to Issue" +#: ../includes/system_tests.inc:161 +msgid "Current database version" msgstr "" -#: c:\Apache2\htdocs\account228/manufacturing/work_order_issue.php:222 -msgid "Process Issue" +#: ../includes/system_tests.inc:165 +msgid "Database structure seems to be not upgraded to current version" msgstr "" -#: c:\Apache2\htdocs\account228/manufacturing/work_order_release.php:27 -msgid "Work Order Release to Manufacturing" +#: ../includes/system_tests.inc:180 +msgid "Company subdirectories consistency" msgstr "" -#: c:\Apache2\htdocs\account228/manufacturing/work_order_release.php:49 -msgid "This work order has already been released." +#: ../includes/system_tests.inc:193 +#: ../includes/system_tests.inc:200 +#: ../includes/system_tests.inc:208 +#: ../includes/system_tests.inc:225 +#: ../includes/system_tests.inc:340 +#: ../includes/system_tests.inc:349 +#: ../includes/system_tests.inc:358 +#, php-format +msgid "'%s' is not writeable" msgstr "" -#: c:\Apache2\htdocs\account228/manufacturing/work_order_release.php:57 -msgid "This Work Order cannot be released. The selected item to manufacture does not have a bom." +#: ../includes/system_tests.inc:221 +msgid "Temporary directory" msgstr "" -#: c:\Apache2\htdocs\account228/manufacturing/work_order_release.php:70 -msgid "The work order has been released to manufacturing." +#: ../includes/system_tests.inc:233 +msgid "Language configuration consistency" msgstr "" -#: c:\Apache2\htdocs\account228/manufacturing/work_order_release.php:74 -msgid "Select another &work order" +#: ../includes/system_tests.inc:242 +msgid "Languages folder should be writeable." msgstr "" -#: c:\Apache2\htdocs\account228/manufacturing/work_order_release.php:94 -msgid "Work Order #:" +#: ../includes/system_tests.inc:251 +msgid "Languages configuration file should be writeable." msgstr "" -#: c:\Apache2\htdocs\account228/manufacturing/work_order_release.php:95 -msgid "Work Order Reference:" +#: ../includes/system_tests.inc:270 +#, php-format +msgid "Missing %s translation file." msgstr "" -#: c:\Apache2\htdocs\account228/manufacturing/work_order_release.php:97 -msgid "Released Date" +#: ../includes/system_tests.inc:275 +#, php-format +msgid "Missing system locale: %s" msgstr "" -#: c:\Apache2\htdocs\account228/manufacturing/work_order_release.php:103 -msgid "Release Work Order" +#: ../includes/system_tests.inc:288 +msgid "Main config file" msgstr "" -#: c:\Apache2\htdocs\account228/manufacturing/inquiry/bom_cost_inquiry.php:24 -#: c:\Apache2\htdocs\account228/manufacturing/manage/bom_edit.php:24 -msgid "There are no manufactured or kit items defined in the system." +#: ../includes/system_tests.inc:295 +#: ../includes/system_tests.inc:317 +#, php-format +msgid "Can't write '%s' file. Check FA directory write permissions." msgstr "" -#: c:\Apache2\htdocs\account228/manufacturing/inquiry/bom_cost_inquiry.php:35 -#: c:\Apache2\htdocs\account228/manufacturing/manage/bom_edit.php:220 -msgid "Select a manufacturable item:" +#: ../includes/system_tests.inc:296 +#: ../includes/system_tests.inc:318 +#, php-format +msgid "'%s' file exists." msgstr "" -#: c:\Apache2\htdocs\account228/manufacturing/inquiry/bom_cost_inquiry.php:38 -msgid "All Costs Are In:" +#: ../includes/system_tests.inc:300 +#, php-format +msgid "'%s' file should be read-only" msgstr "" -#: c:\Apache2\htdocs\account228/manufacturing/inquiry/where_used_inquiry.php:17 -msgid "Inventory Item Where Used Inquiry" +#: ../includes/system_tests.inc:309 +msgid "Database auth file" msgstr "" -#: c:\Apache2\htdocs\account228/manufacturing/inquiry/where_used_inquiry.php:28 -msgid "Select an item to display its parent item(s)." +#: ../includes/system_tests.inc:322 +#, php-format +msgid "" +"'%s' file should be read-only if you do not plan to add or change companies" msgstr "" -#: c:\Apache2\htdocs\account228/manufacturing/inquiry/where_used_inquiry.php:56 -msgid "Parent Item" +#: ../includes/system_tests.inc:333 +msgid "Extensions system" msgstr "" -#: c:\Apache2\htdocs\account228/manufacturing/inquiry/where_used_inquiry.php:57 -#: c:\Apache2\htdocs\account228/manufacturing/manage/bom_edit.php:104 -msgid "Work Centre" +#: ../includes/system_tests.inc:363 +msgid "Extensions configuration files and directories should be writeable" msgstr "" -#: c:\Apache2\htdocs\account228/manufacturing/inquiry/where_used_inquiry.php:59 -msgid "Quantity Required" +#: ../includes/system_tests.inc:375 +#, php-format +msgid "Non-standard theme directory '%s' is not writable" msgstr "" -#: c:\Apache2\htdocs\account228/manufacturing/manage/bom_edit.php:16 -msgid "Bill Of Materials" +#: ../includes/system_tests.inc:385 +msgid "" +"OpenSSL PHP extension have to be enabled to use extension repository system." msgstr "" -#: c:\Apache2\htdocs\account228/manufacturing/manage/bom_edit.php:26 -msgid "There are no work centres defined in the system. BOMs require at least one work centre be defined." +#: ../includes/system_tests.inc:388 +msgid "" +"OpenSSL have to be available on your server to use extension repository " +"system." msgstr "" -#: c:\Apache2\htdocs\account228/manufacturing/manage/bom_edit.php:103 -msgid "Code" +#: ../includes/system_tests.inc:411 +msgid "Test" msgstr "" -#: c:\Apache2\htdocs\account228/manufacturing/manage/bom_edit.php:150 -msgid "Selected component has been updated" +#: ../includes/system_tests.inc:411 +msgid "Test type" msgstr "" -#: c:\Apache2\htdocs\account228/manufacturing/manage/bom_edit.php:180 -msgid "A new component part has been added to the bill of material for this item." +#: ../includes/system_tests.inc:411 +#: ../includes/ui/view_package.php:37 +#: ../reporting/rep204.php:83 +#: ../reporting/rep301.php:99 +msgid "Value" msgstr "" -#: c:\Apache2\htdocs\account228/manufacturing/manage/bom_edit.php:186 -msgid "The selected component is already on this bom. You can modify it's quantity but it cannot appear more than once on the same bom." +#: ../includes/system_tests.inc:411 +#: ../reporting/reports_main.php:39 +#: ../reporting/reports_main.php:48 +#: ../reporting/reports_main.php:56 +#: ../reporting/reports_main.php:64 +#: ../reporting/reports_main.php:72 +#: ../reporting/reports_main.php:78 +#: ../reporting/reports_main.php:86 +#: ../reporting/reports_main.php:92 +#: ../reporting/reports_main.php:98 +#: ../reporting/reports_main.php:105 +#: ../reporting/reports_main.php:111 +#: ../reporting/reports_main.php:117 +#: ../reporting/reports_main.php:122 +#: ../reporting/reports_main.php:131 +#: ../reporting/reports_main.php:140 +#: ../reporting/reports_main.php:147 +#: ../reporting/reports_main.php:151 +#: ../reporting/reports_main.php:158 +#: ../reporting/reports_main.php:164 +#: ../reporting/reports_main.php:172 +#: ../reporting/reports_main.php:177 +#: ../reporting/reports_main.php:186 +#: ../reporting/reports_main.php:194 +#: ../reporting/reports_main.php:199 +#: ../reporting/reports_main.php:206 +#: ../reporting/reports_main.php:212 +#: ../reporting/reports_main.php:220 +#: ../reporting/reports_main.php:231 +#: ../reporting/reports_main.php:237 +#: ../reporting/reports_main.php:243 +#: ../reporting/reports_main.php:257 +#: ../reporting/reports_main.php:264 +#: ../reporting/reports_main.php:274 +#: ../reporting/reports_main.php:285 +#: ../reporting/reports_main.php:294 +#: ../reporting/reports_main.php:305 +#: ../reporting/reports_main.php:311 +#: ../reporting/reports_main.php:320 +#: ../reporting/reports_main.php:330 +#: ../reporting/reports_main.php:338 +#: ../reporting/reports_main.php:348 +#: ../reporting/reports_main.php:353 +#: ../reporting/reports_main.php:361 +#: ../reporting/reports_main.php:370 +#: ../reporting/reports_main.php:377 +#: ../reporting/reports_main.php:384 +#: ../reporting/reports_main.php:391 +#: ../reporting/includes/excel_report.inc:295 +#: ../reporting/includes/excel_report.inc:428 +#: ../reporting/includes/pdf_report.inc:346 +#: ../reporting/includes/pdf_report.inc:617 +#: ../sales/view/view_sales_order.php:84 +msgid "Comments" msgstr "" -#: c:\Apache2\htdocs\account228/manufacturing/manage/bom_edit.php:192 -msgid "The selected component is a parent of the current item. Recursive BOMs are not allowed." +#: ../includes/system_tests.inc:435 +msgid "Ok" msgstr "" -#: c:\Apache2\htdocs\account228/manufacturing/manage/bom_edit.php:279 -msgid "Location to Draw From:" +#: ../includes/db/audit_trail_db.inc:93 +msgid "" +"Some transactions journal GL postings were not indexed due to lack of audit " +"trail record." msgstr "" -#: c:\Apache2\htdocs\account228/manufacturing/manage/bom_edit.php:280 -msgid "Work Centre Added:" +#: ../includes/db/inventory_db.inc:227 +#, php-format +msgid "Cost was %s changed to %s for item '%s'" msgstr "" -#: c:\Apache2\htdocs\account228/manufacturing/manage/work_centres.php:16 -msgid "Work Centres" +#: ../includes/db/inventory_db.inc:285 +msgid "Cost was " msgstr "" -#: c:\Apache2\htdocs\account228/manufacturing/manage/work_centres.php:34 -msgid "The work centre name cannot be empty." +#: ../includes/db/inventory_db.inc:285 +msgid " changed to " msgstr "" -#: c:\Apache2\htdocs\account228/manufacturing/manage/work_centres.php:44 -msgid "Selected work center has been updated" +#: ../includes/db/inventory_db.inc:285 +msgid " for item " msgstr "" -#: c:\Apache2\htdocs\account228/manufacturing/manage/work_centres.php:49 -msgid "New work center has been added" +#: ../includes/ui/allocation_cart.inc:263 +#: ../purchasing/allocations/supplier_allocation_main.php:94 +#: ../sales/allocations/customer_allocation_main.php:93 +msgid "Transaction Type" msgstr "" -#: c:\Apache2\htdocs\account228/manufacturing/manage/work_centres.php:64 -msgid "Cannot delete this work centre because BOMs have been created referring to it." +#: ../includes/ui/allocation_cart.inc:263 +#: ../reporting/rep704.php:78 +#: ../reporting/rep704.php:81 +#: ../reporting/rep704.php:84 +#: ../reporting/rep709.php:107 +#: ../sales/view/view_credit.php:68 +#: ../sales/view/view_sales_order.php:95 +#: ../sales/view/view_sales_order.php:128 +#: ../sales/view/view_sales_order.php:160 +#: ../sales/inquiry/sales_orders_view.php:228 +#: ../sales/inquiry/sales_orders_view.php:259 +#: ../sales/inquiry/sales_orders_view.php:273 +msgid "Ref" msgstr "" -#: c:\Apache2\htdocs\account228/manufacturing/manage/work_centres.php:73 -msgid "Cannot delete this work centre because work order requirements have been created referring to it." +#: ../includes/ui/allocation_cart.inc:264 +msgid "Other Allocations" msgstr "" -#: c:\Apache2\htdocs\account228/manufacturing/manage/work_centres.php:89 -msgid "Selected work center has been deleted" +#: ../includes/ui/allocation_cart.inc:264 +#: ../includes/ui/ui_view.inc:481 +#: ../reporting/includes/doctext.inc:108 +msgid "This Allocation" msgstr "" -#: c:\Apache2\htdocs\account228/manufacturing/manage/work_centres.php:107 -msgid "description" +#: ../includes/ui/allocation_cart.inc:264 +#: ../includes/ui/allocation_cart.inc:311 +#: ../includes/ui/ui_view.inc:481 +#: ../purchasing/allocations/supplier_allocation_main.php:101 +#: ../reporting/includes/doctext.inc:108 +#: ../reporting/includes/doctext.inc:166 +#: ../sales/allocations/customer_allocation_main.php:100 +msgid "Left to Allocate" msgstr "" -#: c:\Apache2\htdocs\account228/manufacturing/view/work_order_view.php:26 -msgid "View Work Order" +#: ../includes/ui/allocation_cart.inc:294 +#: ../reporting/includes/doctext.inc:165 +msgid "Total Allocated" msgstr "" -#: c:\Apache2\htdocs\account228/manufacturing/view/work_order_view.php:51 -msgid "BOM for item:" +#: ../includes/ui/allocation_cart.inc:331 +msgid "The entry for one or more amounts is invalid or negative." msgstr "" -#: c:\Apache2\htdocs\account228/manufacturing/view/work_order_view.php:56 -msgid "Work Order Requirements" +#: ../includes/ui/allocation_cart.inc:340 +msgid "At least one transaction is overallocated." msgstr "" -#: c:\Apache2\htdocs\account228/manufacturing/view/work_order_view.php:61 -msgid "Issues" +#: ../includes/ui/allocation_cart.inc:358 +msgid "" +"These allocations cannot be processed because the amount allocated is more " +"than the total amount left to allocate." msgstr "" -#: c:\Apache2\htdocs\account228/manufacturing/view/work_order_view.php:64 -msgid "Productions" +#: ../includes/ui/contacts_view.inc:41 +msgid "Assignment" msgstr "" -#: c:\Apache2\htdocs\account228/manufacturing/view/work_order_view.php:67 -#: c:\Apache2\htdocs\account228/manufacturing/view/work_order_view.php:74 -msgid "Additional Costs" +#: ../includes/ui/contacts_view.inc:41 +msgid "Sec Phone" msgstr "" -#: c:\Apache2\htdocs\account228/manufacturing/view/work_order_view.php:82 -msgid "This work order has been voided." +#: ../includes/ui/contacts_view.inc:41 +#: ../reporting/rep103.php:223 +#: ../reporting/includes/header2.inc:92 +#: ../sales/manage/sales_people.php:99 +msgid "Fax" msgstr "" -#: c:\Apache2\htdocs\account228/manufacturing/view/wo_issue_view.php:19 -msgid "View Work Order Issue" +#: ../includes/ui/contacts_view.inc:42 +msgid "email" msgstr "" -#: c:\Apache2\htdocs\account228/manufacturing/view/wo_issue_view.php:45 -msgid "Issue #" +#: ../includes/ui/contacts_view.inc:90 +msgid "Contact data" msgstr "" -#: c:\Apache2\htdocs\account228/manufacturing/view/wo_issue_view.php:45 -#: c:\Apache2\htdocs\account228/manufacturing/view/wo_production_view.php:46 -msgid "For Work Order #" +#: ../includes/ui/contacts_view.inc:92 +msgid "First Name:" msgstr "" -#: c:\Apache2\htdocs\account228/manufacturing/view/wo_issue_view.php:46 -msgid "To Work Centre" +#: ../includes/ui/contacts_view.inc:93 +msgid "Last Name:" msgstr "" -#: c:\Apache2\htdocs\account228/manufacturing/view/wo_issue_view.php:46 -msgid "Date of Issue" +#: ../includes/ui/contacts_view.inc:96 +msgid "Contact active for:" msgstr "" -#: c:\Apache2\htdocs\account228/manufacturing/view/wo_issue_view.php:63 -msgid "This issue has been voided." +#: ../includes/ui/contacts_view.inc:102 +msgid "Phone:" msgstr "" -#: c:\Apache2\htdocs\account228/manufacturing/view/wo_issue_view.php:76 -msgid "There are no items for this issue." +#: ../includes/ui/contacts_view.inc:105 +#: ../inventory/manage/locations.php:207 +#: ../purchasing/manage/suppliers.php:108 +#: ../sales/manage/customer_branches.php:263 +#: ../sales/manage/sales_people.php:158 +msgid "E-mail:" msgstr "" -#: c:\Apache2\htdocs\account228/manufacturing/view/wo_issue_view.php:81 -msgid "Component" +#: ../includes/ui/contacts_view.inc:110 +#: ../purchasing/manage/suppliers.php:109 +#: ../sales/manage/customer_branches.php:264 +msgid "Document Language:" msgstr "" -#: c:\Apache2\htdocs\account228/manufacturing/view/wo_issue_view.php:118 -msgid "Items for this Issue" +#: ../includes/ui/contacts_view.inc:110 +#: ../sales/manage/customer_branches.php:264 +msgid "Customer default" msgstr "" -#: c:\Apache2\htdocs\account228/manufacturing/view/wo_production_view.php:20 -msgid "View Work Order Production" +#: ../includes/ui/contacts_view.inc:112 +msgid "Notes:" msgstr "" -#: c:\Apache2\htdocs\account228/manufacturing/view/wo_production_view.php:46 -msgid "Production #" +#: ../includes/ui/contacts_view.inc:132 +msgid "The contact name cannot be empty." msgstr "" -#: c:\Apache2\htdocs\account228/manufacturing/view/wo_production_view.php:47 -msgid "Quantity Manufactured" +#: ../includes/ui/contacts_view.inc:137 +msgid "Contact reference cannot be empty." msgstr "" -#: c:\Apache2\htdocs\account228/manufacturing/view/wo_production_view.php:63 -msgid "This production has been voided." +#: ../includes/ui/contacts_view.inc:142 +msgid "You have to select at least one category." msgstr "" -#: c:\Apache2\htdocs\account228/purchasing/po_entry_items.php:27 -msgid "Modify Purchase Order #" +#: ../includes/ui/db_pager_view.inc:166 +#: ../includes/ui/ui_input.inc:892 +msgid "Show also Inactive" msgstr "" -#: c:\Apache2\htdocs\account228/purchasing/po_entry_items.php:31 -msgid "Purchase Order Entry" +#: ../includes/ui/db_pager_view.inc:175 +msgid "First" msgstr "" -#: c:\Apache2\htdocs\account228/purchasing/po_entry_items.php:48 -msgid "Purchase Order has been entered" +#: ../includes/ui/db_pager_view.inc:176 +msgid "Prev" msgstr "" -#: c:\Apache2\htdocs\account228/purchasing/po_entry_items.php:50 -msgid "Purchase Order has been updated" +#: ../includes/ui/db_pager_view.inc:177 +msgid "Next" msgstr "" -#: c:\Apache2\htdocs\account228/purchasing/po_entry_items.php:51 -msgid "&View this order" +#: ../includes/ui/db_pager_view.inc:178 +msgid "Last" msgstr "" -#: c:\Apache2\htdocs\account228/purchasing/po_entry_items.php:53 -msgid "&Print This Order" +#: ../includes/ui/db_pager_view.inc:187 +#, php-format +msgid "Records %d-%d of %d" msgstr "" -#: c:\Apache2\htdocs\account228/purchasing/po_entry_items.php:55 -msgid "&Email This Order" +#: ../includes/ui/db_pager_view.inc:191 +msgid "No records" msgstr "" -#: c:\Apache2\htdocs\account228/purchasing/po_entry_items.php:57 -msgid "&Receive Items on this Purchase Order" +#: ../includes/ui/simple_crud_class.inc:227 +#: ../includes/ui/ui_input.inc:203 +msgid "Submit changes" msgstr "" -#: c:\Apache2\htdocs\account228/purchasing/po_entry_items.php:59 -msgid "Enter &Another Purchase Order" +#: ../includes/ui/simple_crud_class.inc:229 +#: ../includes/ui/ui_input.inc:204 +msgid "Clone" msgstr "" -#: c:\Apache2\htdocs\account228/purchasing/po_entry_items.php:61 -msgid "Select An &Outstanding Purchase Order" +#: ../includes/ui/simple_crud_class.inc:229 +#: ../includes/ui/ui_input.inc:205 +msgid "Edit new record with current data" msgstr "" -#: c:\Apache2\htdocs\account228/purchasing/po_entry_items.php:116 -msgid "This item cannot be deleted because some of it has already been received." +#: ../includes/ui/simple_crud_class.inc:231 +#: ../includes/ui/ui_input.inc:206 +msgid "Cancel edition" msgstr "" -#: c:\Apache2\htdocs\account228/purchasing/po_entry_items.php:131 -msgid "This order cannot be cancelled because some of it has already been received." +#: ../includes/ui/ui_controls.inc:123 +msgid "You should automatically be forwarded." msgstr "" -#: c:\Apache2\htdocs\account228/purchasing/po_entry_items.php:132 -msgid "The line item quantities may be modified to quantities more than already received. prices cannot be altered for lines that have already been received and quantities cannot be reduced below the quantity already received." +#: ../includes/ui/ui_controls.inc:124 +msgid "If this does not happen" msgstr "" -#: c:\Apache2\htdocs\account228/purchasing/po_entry_items.php:147 -msgid "This purchase order has been cancelled." +#: ../includes/ui/ui_controls.inc:124 +msgid "click here" msgstr "" -#: c:\Apache2\htdocs\account228/purchasing/po_entry_items.php:149 -msgid "Enter a new purchase order" +#: ../includes/ui/ui_controls.inc:124 +msgid "to continue" msgstr "" -#: c:\Apache2\htdocs\account228/purchasing/po_entry_items.php:165 -msgid "The quantity of the order item must be numeric and not less than " +#: ../includes/ui/ui_controls.inc:171 +msgid "View Attachment" msgstr "" -#: c:\Apache2\htdocs\account228/purchasing/po_entry_items.php:172 -msgid "The price entered must be numeric and not less than zero." +#: ../includes/ui/ui_controls.inc:174 +msgid "Close" msgstr "" -#: c:\Apache2\htdocs\account228/purchasing/po_entry_items.php:196 -msgid "You are attempting to make the quantity ordered a quantity less than has already been invoiced or received. This is prohibited." +#: ../includes/ui/ui_controls.inc:425 +#: ../sales/manage/customers.php:16 +msgid "Customers" msgstr "" -#: c:\Apache2\htdocs\account228/purchasing/po_entry_items.php:197 -msgid "The quantity received can only be modified by entering a negative receipt and the quantity invoiced can only be reduced by entering a credit note against this item." +#: ../includes/ui/ui_controls.inc:427 +msgid "Branches" msgstr "" -#: c:\Apache2\htdocs\account228/purchasing/po_entry_items.php:228 -msgid "The selected item is already on this order." +#: ../includes/ui/ui_controls.inc:429 +#: ../purchasing/manage/suppliers.php:16 +msgid "Suppliers" msgstr "" -#: c:\Apache2\htdocs\account228/purchasing/po_entry_items.php:257 -msgid "The selected item does not exist or it is a kit part and therefore cannot be purchased." +#: ../includes/ui/ui_controls.inc:431 +#: ../inventory/transfers.php:230 +#: ../inventory/manage/items.php:16 +msgid "Items" msgstr "" -#: c:\Apache2\htdocs\account228/purchasing/po_entry_items.php:273 -msgid "There is no supplier selected." +#: ../includes/ui/ui_controls.inc:575 +msgid "Entered data has not been saved yet.\\nDo you want to abandon changes?" msgstr "" -#: c:\Apache2\htdocs\account228/purchasing/po_entry_items.php:280 -msgid "The entered order date is invalid." +#: ../includes/ui/ui_input.inc:621 +#: ../reporting/includes/reports_classes.inc:210 +msgid "Click Here to Pick up the date" msgstr "" -#: c:\Apache2\htdocs\account228/purchasing/po_entry_items.php:289 -msgid "There is no reference entered for this purchase order." +#: ../includes/ui/ui_input.inc:904 +#: ../includes/ui/ui_lists.inc:2118 +#: ../reporting/rep301.php:147 +#: ../reporting/rep302.php:166 +#: ../reporting/rep303.php:170 +#: ../reporting/rep304.php:168 +#: ../reporting/rep304.php:172 +#: ../reporting/rep305.php:111 +#: ../sales/manage/customer_branches.php:302 +msgid "Inactive" msgstr "" -#: c:\Apache2\htdocs\account228/purchasing/po_entry_items.php:304 -msgid "There is no delivery address specified." +#: ../includes/ui/ui_input.inc:914 +#: ../includes/ui/ui_input.inc:926 +msgid "Current Credit:" msgstr "" -#: c:\Apache2\htdocs\account228/purchasing/po_entry_items.php:311 -msgid "There is no location specified to move any items into." +#: ../includes/ui/ui_lists.inc:17 +msgid "Set filter" msgstr "" -#: c:\Apache2\htdocs\account228/purchasing/po_entry_items.php:318 -msgid "The order cannot be placed because there are no lines entered on this order." +#: ../includes/ui/ui_lists.inc:100 +msgid "Press Space tab for search pattern entry" msgstr "" -#: c:\Apache2\htdocs\account228/purchasing/po_entry_items.php:415 -msgid "Update Order" +#: ../includes/ui/ui_lists.inc:104 +msgid "Enter code fragment to search or * for all" msgstr "" -#: c:\Apache2\htdocs\account228/purchasing/po_entry_items.php:417 -msgid "Place Order" +#: ../includes/ui/ui_lists.inc:105 +msgid "Enter description fragment to search or * for all" msgstr "" -#: c:\Apache2\htdocs\account228/purchasing/po_entry_items.php:418 -#: c:\Apache2\htdocs\account228/purchasing/po_entry_items.php:421 -msgid "Cancel Order" +#: ../includes/ui/ui_lists.inc:438 +#: ../includes/ui/ui_lists.inc:1356 +msgid "All Suppliers" msgstr "" -#: c:\Apache2\htdocs\account228/purchasing/po_receive_items.php:25 -msgid "Receive Purchase Order Items" +#: ../includes/ui/ui_lists.inc:442 +msgid "Press Space tab to filter by name fragment" msgstr "" -#: c:\Apache2\htdocs\account228/purchasing/po_receive_items.php:34 -msgid "Purchase Order Delivery has been processed" +#: ../includes/ui/ui_lists.inc:443 +msgid "Select supplier" msgstr "" -#: c:\Apache2\htdocs\account228/purchasing/po_receive_items.php:36 -msgid "&View this Delivery" +#: ../includes/ui/ui_lists.inc:487 +msgid "All Customers" msgstr "" -#: c:\Apache2\htdocs\account228/purchasing/po_receive_items.php:38 -msgid "Entry purchase &invoice for this receival" +#: ../includes/ui/ui_lists.inc:491 +msgid "Press Space tab to filter by name fragment; F2 - entry new customer" msgstr "" -#: c:\Apache2\htdocs\account228/purchasing/po_receive_items.php:40 -msgid "Select a different &purchase order for receiving items against" +#: ../includes/ui/ui_lists.inc:492 +msgid "Select customer" msgstr "" -#: c:\Apache2\htdocs\account228/purchasing/po_receive_items.php:49 -msgid "This page can only be opened if a purchase order has been selected. Please select a purchase order first." +#: ../includes/ui/ui_lists.inc:535 +msgid "All branches" msgstr "" -#: c:\Apache2\htdocs\account228/purchasing/po_receive_items.php:60 -msgid "Item Code" +#: ../includes/ui/ui_lists.inc:538 +msgid "Select customer branch" msgstr "" -#: c:\Apache2\htdocs\account228/purchasing/po_receive_items.php:60 -msgid "Ordered" +#: ../includes/ui/ui_lists.inc:573 +msgid "All Locations" msgstr "" -#: c:\Apache2\htdocs\account228/purchasing/po_receive_items.php:60 -msgid "Received" +#: ../includes/ui/ui_lists.inc:725 +#: ../includes/ui/ui_lists.inc:790 +msgid "All Items" msgstr "" -#: c:\Apache2\htdocs\account228/purchasing/po_receive_items.php:61 -msgid "Outstanding" +#: ../includes/ui/ui_lists.inc:1263 +msgid "All Sales Types" msgstr "" -#: c:\Apache2\htdocs\account228/purchasing/po_receive_items.php:61 -msgid "This Delivery" +#: ../includes/ui/ui_lists.inc:1592 +msgid "Use Item Sales Accounts" msgstr "" -#: c:\Apache2\htdocs\account228/purchasing/po_receive_items.php:109 -msgid "Total value of items received" +#: ../includes/ui/ui_lists.inc:1902 +#: ../includes/ui/ui_lists.inc:1919 +#: ../includes/ui/ui_lists.inc:1936 +msgid "All Types" msgstr "" -#: c:\Apache2\htdocs\account228/purchasing/po_receive_items.php:160 -#: c:\Apache2\htdocs\account228/purchasing/po_receive_items.php:209 -msgid "There is nothing to process. Please enter valid quantities greater than zero." +#: ../includes/ui/ui_lists.inc:1903 +#: ../sales/view/view_sales_order.php:126 +msgid "Sales Invoices" msgstr "" -#: c:\Apache2\htdocs\account228/purchasing/po_receive_items.php:214 -msgid "Entered quantities cannot be greater than the quantity entered on the purchase order including the allowed over-receive percentage" +#: ../includes/ui/ui_lists.inc:1904 +#: ../includes/ui/ui_lists.inc:1921 +#: ../includes/ui/ui_lists.inc:1939 +msgid "Overdue Invoices" msgstr "" -#: c:\Apache2\htdocs\account228/purchasing/po_receive_items.php:216 -msgid "Modify the ordered items on the purchase order if you wish to increase the quantities." +#: ../includes/ui/ui_lists.inc:1905 +#: ../includes/ui/ui_lists.inc:1922 +#: ../includes/ui/ui_lists.inc:1940 +msgid "Payments" msgstr "" -#: c:\Apache2\htdocs\account228/purchasing/po_receive_items.php:234 -msgid "This order has been changed or invoiced since this delivery was started to be actioned. Processing halted. To enter a delivery against this purchase order, it must be re-selected and re-read again to update the changes made by the other user." +#: ../includes/ui/ui_lists.inc:1906 +#: ../includes/ui/ui_lists.inc:1923 +#: ../includes/ui/ui_lists.inc:1941 +#: ../sales/view/view_sales_order.php:157 +msgid "Credit Notes" msgstr "" -#: c:\Apache2\htdocs\account228/purchasing/po_receive_items.php:236 -msgid "Select a different purchase order for receiving goods against" +#: ../includes/ui/ui_lists.inc:1907 +#: ../sales/view/view_sales_order.php:92 +msgid "Delivery Notes" msgstr "" -#: c:\Apache2\htdocs\account228/purchasing/po_receive_items.php:238 -msgid "Re-Read the updated purchase order for receiving goods against" +#: ../includes/ui/ui_lists.inc:1920 +#: ../includes/ui/ui_lists.inc:1938 +msgid "Invoices" msgstr "" -#: c:\Apache2\htdocs\account228/purchasing/po_receive_items.php:308 -msgid "Items to Receive" +#: ../includes/ui/ui_lists.inc:1924 +#: ../includes/ui/ui_lists.inc:1942 +msgid "Overdue Credit Notes" msgstr "" -#: c:\Apache2\htdocs\account228/purchasing/po_receive_items.php:313 -msgid "Process Receive Items" +#: ../includes/ui/ui_lists.inc:1937 +msgid "GRNs" msgstr "" -#: c:\Apache2\htdocs\account228/purchasing/po_receive_items.php:313 -msgid "Clear all GL entry fields" +#: ../includes/ui/ui_lists.inc:1955 +msgid "Automatically put balance on back order" msgstr "" -#: c:\Apache2\htdocs\account228/purchasing/supplier_credit.php:28 -msgid "Supplier Credit Note" +#: ../includes/ui/ui_lists.inc:1956 +msgid "Cancel any quantites not delivered" msgstr "" -#: c:\Apache2\htdocs\account228/purchasing/supplier_credit.php:43 -msgid "Supplier credit note has been processed." +#: ../includes/ui/ui_lists.inc:1973 +msgid "Items Returned to Inventory Location" msgstr "" -#: c:\Apache2\htdocs\account228/purchasing/supplier_credit.php:44 -msgid "View this Credit Note" +#: ../includes/ui/ui_lists.inc:1974 +msgid "Items Written Off" msgstr "" -#: c:\Apache2\htdocs\account228/purchasing/supplier_credit.php:46 -msgid "View the GL Journal Entries for this Credit Note" +#: ../includes/ui/ui_lists.inc:2144 +msgid "New role" msgstr "" -#: c:\Apache2\htdocs\account228/purchasing/supplier_credit.php:48 -msgid "Enter Another Credit Note" +#: ../includes/ui/ui_lists.inc:2202 +msgid "No tags defined." msgstr "" -#: c:\Apache2\htdocs\account228/purchasing/supplier_credit.php:49 -#: c:\Apache2\htdocs\account228/purchasing/supplier_invoice.php:52 -msgid "Add an Attachment" +#: ../includes/ui/ui_lists.inc:2202 +msgid "No active tags defined." msgstr "" -#: c:\Apache2\htdocs\account228/purchasing/supplier_credit.php:104 -#: c:\Apache2\htdocs\account228/purchasing/supplier_invoice.php:106 -msgid "The account code entered is not a valid code, this line cannot be added to the transaction." +#: ../includes/ui/ui_lists.inc:2240 +#, php-format +msgid "Activated for '%s'" msgstr "" -#: c:\Apache2\htdocs\account228/purchasing/supplier_credit.php:114 -#: c:\Apache2\htdocs\account228/purchasing/supplier_invoice.php:116 -msgid "The amount entered is not numeric. This line cannot be added to the transaction." +#: ../includes/ui/ui_lists.inc:2243 +msgid "Available and/or installed" msgstr "" -#: c:\Apache2\htdocs\account228/purchasing/supplier_credit.php:144 -msgid "The credit note cannot be processed because the there are no items or values on the invoice. Credit notes are expected to have a charge." +#: ../includes/ui/ui_lists.inc:2313 +msgid "Standard new company American COA (4 digit)" msgstr "" -#: c:\Apache2\htdocs\account228/purchasing/supplier_credit.php:151 -msgid "You must enter an credit note reference." +#: ../includes/ui/ui_lists.inc:2315 +msgid "Standard American COA (4 digit) with demo data" msgstr "" -#: c:\Apache2\htdocs\account228/purchasing/supplier_credit.php:165 -msgid "You must enter a supplier's credit note reference." +#: ../includes/ui/ui_msgs.inc:66 +msgid "in units of : " msgstr "" -#: c:\Apache2\htdocs\account228/purchasing/supplier_credit.php:172 -msgid "The credit note as entered cannot be processed because the date entered is not valid." +#: ../includes/ui/ui_view.inc:306 +msgid "Date Voided:" msgstr "" -#: c:\Apache2\htdocs\account228/purchasing/supplier_credit.php:184 -#: c:\Apache2\htdocs\account228/purchasing/supplier_invoice.php:184 -msgid "The invoice as entered cannot be processed because the due date is in an incorrect format." +#: ../includes/ui/ui_view.inc:404 +#: ../reporting/rep107.php:188 +#: ../reporting/rep109.php:182 +#: ../reporting/rep110.php:184 +#: ../reporting/rep209.php:188 +msgid "Total Tax Excluded" msgstr "" -#: c:\Apache2\htdocs\account228/purchasing/supplier_credit.php:191 -msgid "The credit note total as entered is less than the sum of the the general ledger entires (if any) and the charges for goods received. There must be a mistake somewhere, the credit note as entered will not be processed." +#: ../includes/ui/ui_view.inc:410 +#: ../includes/ui/ui_view.inc:426 +#: ../includes/ui/ui_view.inc:444 +#: ../reporting/includes/doctext.inc:149 +msgid "Included" msgstr "" -#: c:\Apache2\htdocs\account228/purchasing/supplier_credit.php:229 -msgid "The quantity to credit must be numeric and greater than zero." +#: ../includes/ui/ui_view.inc:476 +#: ../purchasing/inquiry/supplier_allocation_inquiry.php:99 +msgid "Allocations" msgstr "" -#: c:\Apache2\htdocs\account228/purchasing/supplier_credit.php:236 -msgid "The price is either not numeric or negative." +#: ../includes/ui/ui_view.inc:480 +#: ../reporting/includes/doctext.inc:108 +msgid "Total Amount" msgstr "" -#: c:\Apache2\htdocs\account228/purchasing/supplier_credit.php:340 -msgid "Enter Credit Note" +#: ../includes/ui/ui_view.inc:504 +msgid "Total Allocated:" msgstr "" -#: c:\Apache2\htdocs\account228/purchasing/supplier_invoice.php:28 -msgid "Enter Supplier Invoice" +#: ../includes/ui/ui_view.inc:508 +msgid "Left to Allocate:" msgstr "" -#: c:\Apache2\htdocs\account228/purchasing/supplier_invoice.php:43 -msgid "Supplier invoice has been processed." +#: ../includes/ui/ui_view.inc:544 +msgid "No Quick Entries are defined." msgstr "" -#: c:\Apache2\htdocs\account228/purchasing/supplier_invoice.php:44 -msgid "View this Invoice" +#: ../includes/ui/ui_view.inc:572 +msgid "No Quick Entry lines are defined." msgstr "" -#: c:\Apache2\htdocs\account228/purchasing/supplier_invoice.php:46 -msgid "View the GL Journal Entries for this Invoice" +#: ../includes/ui/ui_view.inc:753 +#: ../purchasing/includes/ui/invoice_ui.inc:446 +msgid "and" msgstr "" -#: c:\Apache2\htdocs\account228/purchasing/supplier_invoice.php:48 -msgid "Entry supplier &payment for this invoice" +#: ../includes/ui/ui_view.inc:839 +msgid "January" msgstr "" -#: c:\Apache2\htdocs\account228/purchasing/supplier_invoice.php:50 -msgid "Enter Another Invoice" +#: ../includes/ui/ui_view.inc:839 +msgid "February" msgstr "" -#: c:\Apache2\htdocs\account228/purchasing/supplier_invoice.php:145 -msgid "The invoice cannot be processed because the there are no items or values on the invoice. Invoices are expected to have a charge." +#: ../includes/ui/ui_view.inc:839 +msgid "March" msgstr "" -#: c:\Apache2\htdocs\account228/purchasing/supplier_invoice.php:151 -msgid "You must enter an invoice reference." +#: ../includes/ui/ui_view.inc:839 +msgid "April" msgstr "" -#: c:\Apache2\htdocs\account228/purchasing/supplier_invoice.php:165 -msgid "You must enter a supplier's invoice reference." +#: ../includes/ui/ui_view.inc:839 +msgid "May" msgstr "" -#: c:\Apache2\htdocs\account228/purchasing/supplier_invoice.php:172 -msgid "The invoice as entered cannot be processed because the invoice date is in an incorrect format." +#: ../includes/ui/ui_view.inc:839 +msgid "June" msgstr "" -#: c:\Apache2\htdocs\account228/purchasing/supplier_invoice.php:199 -msgid "This invoice number has already been entered. It cannot be entered again. (" +#: ../includes/ui/ui_view.inc:839 +msgid "July" msgstr "" -#: c:\Apache2\htdocs\account228/purchasing/supplier_invoice.php:236 -msgid "The quantity to invoice must be numeric and greater than zero." +#: ../includes/ui/ui_view.inc:839 +msgid "August" msgstr "" -#: c:\Apache2\htdocs\account228/purchasing/supplier_invoice.php:243 -msgid "The price is not numeric." +#: ../includes/ui/ui_view.inc:839 +msgid "September" msgstr "" -#: c:\Apache2\htdocs\account228/purchasing/supplier_invoice.php:256 -msgid "The price being invoiced is more than the purchase order price by more than the allowed over-charge percentage. The system is set up to prohibit this. See the system administrator to modify the set up parameters if necessary." +#: ../includes/ui/ui_view.inc:839 +msgid "October" msgstr "" -#: c:\Apache2\htdocs\account228/purchasing/supplier_invoice.php:257 -#: c:\Apache2\htdocs\account228/purchasing/supplier_invoice.php:270 -msgid "The over-charge percentage allowance is :" +#: ../includes/ui/ui_view.inc:839 +msgid "November" msgstr "" -#: c:\Apache2\htdocs\account228/purchasing/supplier_invoice.php:269 -msgid "The quantity being invoiced is more than the outstanding quantity by more than the allowed over-charge percentage. The system is set up to prohibit this. See the system administrator to modify the set up parameters if necessary." +#: ../includes/ui/ui_view.inc:839 +msgid "December" msgstr "" -#: c:\Apache2\htdocs\account228/purchasing/supplier_invoice.php:366 -#, php-format -msgid "All yet non-invoiced items on delivery line # %d has been removed." +#: ../includes/ui/ui_view.inc:840 +msgid "Su" msgstr "" -#: c:\Apache2\htdocs\account228/purchasing/supplier_invoice.php:408 -msgid "Enter Invoice" +#: ../includes/ui/ui_view.inc:840 +msgid "Mo" msgstr "" -#: c:\Apache2\htdocs\account228/purchasing/supplier_payment.php:31 -msgid "Supplier Payment Entry" +#: ../includes/ui/ui_view.inc:840 +msgid "Tu" msgstr "" -#: c:\Apache2\htdocs\account228/purchasing/supplier_payment.php:70 -msgid "Payment has been sucessfully entered" +#: ../includes/ui/ui_view.inc:840 +msgid "We" msgstr "" -#: c:\Apache2\htdocs\account228/purchasing/supplier_payment.php:72 -msgid "&Print This Remittance" +#: ../includes/ui/ui_view.inc:840 +msgid "Th" msgstr "" -#: c:\Apache2\htdocs\account228/purchasing/supplier_payment.php:73 -msgid "&Email This Remittance" +#: ../includes/ui/ui_view.inc:840 +msgid "Fr" msgstr "" -#: c:\Apache2\htdocs\account228/purchasing/supplier_payment.php:75 -msgid "View the GL &Journal Entries for this Payment" +#: ../includes/ui/ui_view.inc:840 +msgid "Sa" msgstr "" -#: c:\Apache2\htdocs\account228/purchasing/supplier_payment.php:79 -msgid "Enter another supplier &payment" +#: ../includes/ui/ui_view.inc:841 +msgid "W" msgstr "" -#: c:\Apache2\htdocs\account228/purchasing/supplier_payment.php:126 -msgid "The exchange rate must be numeric and greater than zero." +#: ../includes/ui/view_package.php:7 +msgid "Package Details" msgstr "" -#: c:\Apache2\htdocs\account228/purchasing/supplier_payment.php:138 -msgid "The entered discount is invalid or less than zero." +#: ../includes/ui/view_package.php:14 +msgid "" +"The script must be called with a valid package id to review the info for." msgstr "" -#: c:\Apache2\htdocs\account228/purchasing/supplier_payment.php:146 -msgid "The total of the amount and the discount is zero or negative. Please enter positive values." +#: ../includes/ui/view_package.php:19 +msgid "Available version" msgstr "" -#: c:\Apache2\htdocs\account228/purchasing/supplier_payment.php:237 -msgid "Payment To:" +#: ../includes/ui/view_package.php:20 +msgid "Package type" msgstr "" -#: c:\Apache2\htdocs\account228/purchasing/supplier_payment.php:244 -msgid "From Bank Account:" +#: ../includes/ui/view_package.php:21 +msgid "Package content" msgstr "" -#: c:\Apache2\htdocs\account228/purchasing/supplier_payment.php:250 -msgid "Date Paid" +#: ../includes/ui/view_package.php:23 +msgid "Author" msgstr "" -#: c:\Apache2\htdocs\account228/purchasing/supplier_payment.php:273 -msgid "Amount of Discount:" +#: ../includes/ui/view_package.php:24 +msgid "Home page" msgstr "" -#: c:\Apache2\htdocs\account228/purchasing/supplier_payment.php:274 -msgid "Amount of Payment:" +#: ../includes/ui/view_package.php:25 +msgid "Package maintainer" msgstr "" -#: c:\Apache2\htdocs\account228/purchasing/supplier_payment.php:280 -msgid "The amount and discount are in the bank account's currency." +#: ../includes/ui/view_package.php:26 +msgid "Installation path" msgstr "" -#: c:\Apache2\htdocs\account228/purchasing/supplier_payment.php:283 -msgid "Enter Payment" +#: ../includes/ui/view_package.php:27 +msgid "Minimal software versions" msgstr "" -#: c:\Apache2\htdocs\account228/purchasing/allocations/supplier_allocate.php:29 -msgid "Allocate Supplier Payment or Credit Note" +#: ../includes/ui/view_package.php:28 +msgid "Right to left" msgstr "" -#: c:\Apache2\htdocs\account228/purchasing/allocations/supplier_allocate.php:50 -msgid "Allocation of" +#: ../includes/ui/view_package.php:29 +msgid "Charset encoding" msgstr "" -#: c:\Apache2\htdocs\account228/purchasing/allocations/supplier_allocate.php:55 -msgid "Total:" +#: ../includes/ui/view_package.php:34 +#, php-format +msgid "Content information for package '%s'" msgstr "" -#: c:\Apache2\htdocs\account228/purchasing/allocations/supplier_allocate.php:64 -msgid "Refresh" +#: ../includes/ui/view_package.php:37 +msgid "Property" msgstr "" -#: c:\Apache2\htdocs\account228/purchasing/allocations/supplier_allocate.php:64 -msgid "Start again allocation of selected amount" +#: ../inventory/adjustments.php:28 +msgid "Item Adjustments Note" msgstr "" -#: c:\Apache2\htdocs\account228/purchasing/allocations/supplier_allocate.php:65 -msgid "Process allocations" +#: ../inventory/adjustments.php:32 +msgid "" +"There are no inventory items defined in the system which can be adjusted " +"(Purchased or Manufactured)." msgstr "" -#: c:\Apache2\htdocs\account228/purchasing/allocations/supplier_allocate.php:66 -#: c:\Apache2\htdocs\account228/purchasing/allocations/supplier_allocate.php:72 -msgid "Back to Allocations" +#: ../inventory/adjustments.php:34 +#: ../inventory/transfers.php:34 +msgid "" +"There are no inventory movement types defined in the system. Please define " +"at least one inventory adjustment type." msgstr "" -#: c:\Apache2\htdocs\account228/purchasing/allocations/supplier_allocate.php:67 -#: c:\Apache2\htdocs\account228/purchasing/allocations/supplier_allocate.php:73 -msgid "Abandon allocations and return to selection of allocatable amounts" +#: ../inventory/adjustments.php:43 +msgid "Items adjustment has been processed" msgstr "" -#: c:\Apache2\htdocs\account228/purchasing/allocations/supplier_allocate.php:71 -msgid "There are no unsettled transactions to allocate." +#: ../inventory/adjustments.php:44 +msgid "&View this adjustment" msgstr "" -#: c:\Apache2\htdocs\account228/purchasing/allocations/supplier_allocation_main.php:26 -msgid "Supplier Allocations" +#: ../inventory/adjustments.php:46 +msgid "View the GL &Postings for this Adjustment" msgstr "" -#: c:\Apache2\htdocs\account228/purchasing/allocations/supplier_allocation_main.php:36 -msgid "Select a Supplier: " +#: ../inventory/adjustments.php:48 +msgid "Enter &Another Adjustment" msgstr "" -#: c:\Apache2\htdocs\account228/purchasing/allocations/supplier_allocation_main.php:39 -msgid "Show Settled Items:" +#: ../inventory/adjustments.php:88 +#: ../inventory/transfers.php:87 +#: ../sales/sales_order_entry.php:345 +msgid "You must enter at least one non empty item line." msgstr "" -#: c:\Apache2\htdocs\account228/purchasing/allocations/supplier_allocation_main.php:70 -msgid "Allocate" +#: ../inventory/adjustments.php:108 +#: ../inventory/transfers.php:105 +msgid "The entered date for the adjustment is invalid." msgstr "" -#: c:\Apache2\htdocs\account228/purchasing/allocations/supplier_allocation_main.php:94 -msgid "Transaction Type" +#: ../inventory/adjustments.php:122 +msgid "" +"The adjustment cannot be processed because an adjustment item would cause a " +"negative inventory balance :" msgstr "" -#: c:\Apache2\htdocs\account228/purchasing/allocations/supplier_allocation_main.php:101 -msgid "Left to Allocate" +#: ../inventory/adjustments.php:152 +#: ../manufacturing/work_order_issue.php:141 +msgid "The quantity entered is negative or invalid." msgstr "" -#: c:\Apache2\htdocs\account228/purchasing/allocations/supplier_allocation_main.php:111 -msgid "Marked items are settled." +#: ../inventory/adjustments.php:159 +#: ../manufacturing/work_order_issue.php:148 +msgid "The entered standard cost is negative or invalid." msgstr "" -#: c:\Apache2\htdocs\account228/purchasing/inquiry/po_search.php:25 -msgid "Search Outstanding Purchase Orders" +#: ../inventory/adjustments.php:228 +msgid "Adjustment Items" msgstr "" -#: c:\Apache2\htdocs\account228/purchasing/inquiry/po_search.php:62 -#: c:\Apache2\htdocs\account228/purchasing/inquiry/po_search_completed.php:60 -msgid "#:" +#: ../inventory/adjustments.php:234 +msgid "Process Adjustment" msgstr "" -#: c:\Apache2\htdocs\account228/purchasing/inquiry/po_search.php:93 -msgid "Receive" +#: ../inventory/cost_update.php:26 +msgid "Inventory Item Cost Update" msgstr "" -#: c:\Apache2\htdocs\account228/purchasing/inquiry/po_search.php:173 -#: c:\Apache2\htdocs\account228/purchasing/inquiry/po_search_completed.php:157 -#: c:\Apache2\htdocs\account228/purchasing/inquiry/supplier_inquiry.php:215 -msgid "Supplier's Reference" +#: ../inventory/cost_update.php:30 +msgid "" +"There are no costable inventory items defined in the system (Purchased or " +"manufactured items)." msgstr "" -#: c:\Apache2\htdocs\account228/purchasing/inquiry/po_search.php:174 -#: c:\Apache2\htdocs\account228/purchasing/inquiry/po_search_completed.php:158 -msgid "Order Date" +#: ../inventory/cost_update.php:51 +msgid "The entered cost is not numeric." msgstr "" -#: c:\Apache2\htdocs\account228/purchasing/inquiry/po_search.php:176 -#: c:\Apache2\htdocs\account228/purchasing/inquiry/po_search_completed.php:160 -msgid "Order Total" +#: ../inventory/cost_update.php:57 +msgid "The new cost is the same as the old cost. Cost was not updated." msgstr "" -#: c:\Apache2\htdocs\account228/purchasing/inquiry/po_search.php:187 -msgid "Marked orders have overdue items." +#: ../inventory/cost_update.php:67 +msgid "Cost has been updated." msgstr "" -#: c:\Apache2\htdocs\account228/purchasing/inquiry/po_search_completed.php:24 -msgid "Search Purchase Orders" +#: ../inventory/cost_update.php:71 +msgid "View the GL Journal Entries for this Cost Update" msgstr "" -#: c:\Apache2\htdocs\account228/purchasing/inquiry/po_search_completed.php:65 -msgid "into location:" +#: ../inventory/cost_update.php:85 +#: ../inventory/prices.php:56 +#: ../inventory/purchasing_data.php:101 +#: ../inventory/reorder_level.php:43 +#: ../inventory/inquiry/stock_movements.php:49 +#: ../inventory/inquiry/stock_status.php:41 +#: ../inventory/manage/item_codes.php:105 +#: ../manufacturing/work_order_entry.php:394 +#: ../manufacturing/work_order_entry.php:399 +#: ../purchasing/inquiry/po_search.php:74 +#: ../sales/inquiry/sales_deliveries_view.php:114 +#: ../sales/inquiry/sales_orders_view.php:239 +msgid "Item:" msgstr "" -#: c:\Apache2\htdocs\account228/purchasing/inquiry/supplier_allocation_inquiry.php:23 -msgid "Supplier Allocation Inquiry" +#: ../inventory/cost_update.php:111 +msgid "Standard Material Cost Per Unit" msgstr "" -#: c:\Apache2\htdocs\account228/purchasing/inquiry/supplier_allocation_inquiry.php:48 -#: c:\Apache2\htdocs\account228/purchasing/manage/suppliers.php:178 -msgid "Select a supplier: " +#: ../inventory/cost_update.php:114 +msgid "Standard Labour Cost Per Unit" msgstr "" -#: c:\Apache2\htdocs\account228/purchasing/inquiry/supplier_allocation_inquiry.php:55 -msgid "show settled:" +#: ../inventory/cost_update.php:115 +msgid "Standard Overhead Cost Per Unit" msgstr "" -#: c:\Apache2\htdocs\account228/purchasing/inquiry/supplier_allocation_inquiry.php:99 -msgid "Allocations" +#: ../inventory/prices.php:16 +msgid "Inventory Item Sales prices" msgstr "" -#: c:\Apache2\htdocs\account228/purchasing/inquiry/supplier_allocation_inquiry.php:179 -msgid "Supp Reference" +#: ../inventory/prices.php:27 +#: ../inventory/inquiry/stock_movements.php:30 +#: ../inventory/inquiry/stock_status.php:34 +#: ../inventory/manage/sales_kits.php:24 +#: ../manufacturing/inquiry/where_used_inquiry.php:21 +#: ../sales/credit_note_entry.php:49 +msgid "There are no items defined in the system." msgstr "" -#: c:\Apache2\htdocs\account228/purchasing/inquiry/supplier_allocation_inquiry.php:185 -msgid "Allocated" +#: ../inventory/prices.php:29 +msgid "" +"There are no sales types in the system. Please set up sales types befor " +"entering pricing." msgstr "" -#: c:\Apache2\htdocs\account228/purchasing/inquiry/supplier_allocation_inquiry.php:197 -#: c:\Apache2\htdocs\account228/purchasing/inquiry/supplier_inquiry.php:236 -msgid "Marked items are overdue." +#: ../inventory/prices.php:70 +msgid "The price entered must be numeric." msgstr "" -#: c:\Apache2\htdocs\account228/purchasing/inquiry/supplier_inquiry.php:25 -msgid "Supplier Inquiry" +#: ../inventory/prices.php:83 +msgid "This price has been updated." msgstr "" -#: c:\Apache2\htdocs\account228/purchasing/inquiry/supplier_inquiry.php:47 -msgid "Select a supplier:" +#: ../inventory/prices.php:91 +msgid "The new price has been added." msgstr "" -#: c:\Apache2\htdocs\account228/purchasing/inquiry/supplier_inquiry.php:68 -#: c:\Apache2\htdocs\account228/purchasing/inquiry/supplier_inquiry.php:69 -#: c:\Apache2\htdocs\account228/purchasing/inquiry/supplier_inquiry.php:70 -msgid "Days" +#: ../inventory/prices.php:105 +msgid "The selected price has been deleted." msgstr "" -#: c:\Apache2\htdocs\account228/purchasing/inquiry/supplier_inquiry.php:70 -msgid "Over" +#: ../inventory/prices.php:133 +#: ../reporting/rep104.php:116 +#: ../sales/customer_delivery.php:353 +#: ../sales/customer_invoice.php:390 +#: ../sales/view/view_credit.php:73 +#: ../sales/view/view_dispatch.php:93 +#: ../sales/view/view_invoice.php:92 +#: ../sales/includes/ui/sales_credit_ui.inc:102 +msgid "Sales Type" msgstr "" -#: c:\Apache2\htdocs\account228/purchasing/inquiry/supplier_inquiry.php:74 -msgid "Terms" +#: ../inventory/prices.php:133 +#: ../inventory/purchasing_data.php:127 +#: ../purchasing/includes/ui/invoice_ui.inc:478 +#: ../purchasing/po_receive_items.php:59 +#: ../purchasing/view/view_grn.php:41 +#: ../purchasing/view/view_po.php:45 +#: ../reporting/rep104.php:109 +#: ../reporting/includes/doctext.inc:103 +#: ../reporting/includes/doctext.inc:111 +#: ../sales/customer_credit_invoice.php:292 +#: ../sales/customer_delivery.php:431 +#: ../sales/customer_invoice.php:443 +#: ../sales/view/view_credit.php:91 +#: ../sales/view/view_dispatch.php:113 +#: ../sales/view/view_invoice.php:114 +#: ../sales/view/view_sales_order.php:201 +#: ../sales/includes/ui/sales_credit_ui.inc:168 +msgid "Price" msgstr "" -#: c:\Apache2\htdocs\account228/purchasing/inquiry/supplier_inquiry.php:74 -msgid "Current" +#: ../inventory/prices.php:155 +msgid "There are no prices set up for this part." msgstr "" -#: c:\Apache2\htdocs\account228/purchasing/inquiry/supplier_inquiry.php:75 -msgid "Total Balance" +#: ../inventory/prices.php:174 +msgid "Currency:" msgstr "" -#: c:\Apache2\htdocs\account228/purchasing/inquiry/supplier_inquiry.php:129 -msgid "Credit This" +#: ../inventory/prices.php:176 +msgid "Sales Type:" msgstr "" -#: c:\Apache2\htdocs\account228/purchasing/inquiry/supplier_inquiry.php:151 -msgid "Print Remittance" +#: ../inventory/prices.php:184 +#: ../inventory/purchasing_data.php:189 +msgid "Price:" msgstr "" -#: c:\Apache2\htdocs\account228/purchasing/manage/suppliers.php:16 -msgid "Suppliers" +#: ../inventory/prices.php:184 +msgid "per" msgstr "" -#: c:\Apache2\htdocs\account228/purchasing/manage/suppliers.php:22 -msgid "There are no tax groups defined in the system. At least one tax group is required before proceeding." +#: ../inventory/prices.php:188 +msgid "The price is calculated." msgstr "" -#: c:\Apache2\htdocs\account228/purchasing/manage/suppliers.php:44 -msgid "The supplier name must be entered." +#: ../inventory/purchasing_data.php:16 +msgid "Supplier Purchasing Data" msgstr "" -#: c:\Apache2\htdocs\account228/purchasing/manage/suppliers.php:51 -msgid "The supplier short name must be entered." +#: ../inventory/purchasing_data.php:23 +#: ../purchasing/po_entry_items.php:64 +msgid "There are no purchasable inventory items defined in the system." msgstr "" -#: c:\Apache2\htdocs\account228/purchasing/manage/suppliers.php:90 -msgid "Supplier has been updated." +#: ../inventory/purchasing_data.php:24 +#: ../purchasing/po_entry_items.php:62 +#: ../purchasing/supplier_credit.php:32 +#: ../purchasing/supplier_invoice.php:32 +#: ../purchasing/supplier_payment.php:40 +msgid "There are no suppliers defined in the system." msgstr "" -#: c:\Apache2\htdocs\account228/purchasing/manage/suppliers.php:125 -msgid "A new supplier has been added." +#: ../inventory/purchasing_data.php:38 +#: ../inventory/manage/item_codes.php:35 +msgid "There is no item selected." msgstr "" -#: c:\Apache2\htdocs\account228/purchasing/manage/suppliers.php:145 -msgid "Cannot delete this supplier because there are transactions that refer to this supplier." +#: ../inventory/purchasing_data.php:44 +msgid "The price entered was not numeric." msgstr "" -#: c:\Apache2\htdocs\account228/purchasing/manage/suppliers.php:156 -msgid "Cannot delete the supplier record because purchase orders have been created against this supplier." +#: ../inventory/purchasing_data.php:50 +msgid "" +"The conversion factor entered was not numeric. The conversion factor is the " +"number by which the price must be divided by to get the unit price in our " +"unit of measure." msgstr "" -#: c:\Apache2\htdocs\account228/purchasing/manage/suppliers.php:179 -msgid "New supplier" +#: ../inventory/purchasing_data.php:60 +msgid "This supplier purchasing data has been added." msgstr "" -#: c:\Apache2\htdocs\account228/purchasing/manage/suppliers.php:247 -msgid "Name and Contact" +#: ../inventory/purchasing_data.php:66 +msgid "Supplier purchasing data has been updated." msgstr "" -#: c:\Apache2\htdocs\account228/purchasing/manage/suppliers.php:249 -msgid "Supplier Name:" +#: ../inventory/purchasing_data.php:77 +msgid "The purchasing data item has been sucessfully deleted." msgstr "" -#: c:\Apache2\htdocs\account228/purchasing/manage/suppliers.php:250 -msgid "Supplier Short Name:" +#: ../inventory/purchasing_data.php:112 +msgid "Entered item is not defined. Please re-enter." msgstr "" -#: c:\Apache2\htdocs\account228/purchasing/manage/suppliers.php:258 -msgid "Website:" +#: ../inventory/purchasing_data.php:121 +msgid "There is no purchasing data set up for the part selected" msgstr "" -#: c:\Apache2\htdocs\account228/purchasing/manage/suppliers.php:259 -msgid "Our Customer No:" +#: ../inventory/purchasing_data.php:128 +msgid "Supplier's Unit" msgstr "" -#: c:\Apache2\htdocs\account228/purchasing/manage/suppliers.php:261 -msgid "Addresses" +#: ../inventory/purchasing_data.php:128 +msgid "Conversion Factor" msgstr "" -#: c:\Apache2\htdocs\account228/purchasing/manage/suppliers.php:262 -msgid "Mailing Address:" +#: ../inventory/purchasing_data.php:128 +msgid "Supplier's Description" msgstr "" -#: c:\Apache2\htdocs\account228/purchasing/manage/suppliers.php:263 -msgid "Physical Address:" +#: ../inventory/purchasing_data.php:190 +msgid "Suppliers Unit of Measure:" msgstr "" -#: c:\Apache2\htdocs\account228/purchasing/manage/suppliers.php:267 -msgid "Purchasing" +#: ../inventory/purchasing_data.php:196 +msgid "Conversion Factor (to our UOM):" msgstr "" -#: c:\Apache2\htdocs\account228/purchasing/manage/suppliers.php:269 -msgid "Bank Name/Account:" +#: ../inventory/purchasing_data.php:198 +msgid "Supplier's Code or Description:" msgstr "" -#: c:\Apache2\htdocs\account228/purchasing/manage/suppliers.php:270 -msgid "Credit Limit:" +#: ../inventory/reorder_level.php:16 +msgid "Reorder Levels" msgstr "" -#: c:\Apache2\htdocs\account228/purchasing/manage/suppliers.php:273 -#: c:\Apache2\htdocs\account228/purchasing/manage/suppliers.php:278 -msgid "Supplier's Currency:" +#: ../inventory/reorder_level.php:24 +#: ../inventory/transfers.php:32 +msgid "" +"There are no inventory items defined in the system (Purchased or " +"manufactured items)." +msgstr "" + +#: ../inventory/reorder_level.php:57 +#: ../inventory/inquiry/stock_status.php:65 +#: ../inventory/inquiry/stock_status.php:69 +#: ../manufacturing/search_work_orders.php:162 +#: ../manufacturing/inquiry/where_used_inquiry.php:45 +#: ../manufacturing/manage/bom_edit.php:70 +#: ../purchasing/inquiry/po_search_completed.php:119 +#: ../purchasing/inquiry/po_search_completed.php:129 +#: ../purchasing/inquiry/po_search.php:133 +#: ../purchasing/inquiry/po_search.php:144 +#: ../reporting/rep105.php:118 +#: ../reporting/rep301.php:105 +#: ../reporting/rep302.php:130 +#: ../reporting/rep303.php:122 +#: ../reporting/rep304.php:123 +#: ../reporting/reports_main.php:170 +#: ../reporting/reports_main.php:176 +#: ../reporting/reports_main.php:181 +#: ../reporting/reports_main.php:192 +#: ../sales/manage/sales_points.php:84 +msgid "Location" msgstr "" -#: c:\Apache2\htdocs\account228/purchasing/manage/suppliers.php:281 -msgid "Tax Group:" +#: ../inventory/reorder_level.php:57 +#: ../inventory/inquiry/stock_movements.php:77 +#: ../inventory/inquiry/stock_status.php:69 +#: ../sales/sales_order_entry.php:482 +#: ../sales/includes/ui/sales_order_ui.inc:176 +msgid "Quantity On Hand" msgstr "" -#: c:\Apache2\htdocs\account228/purchasing/manage/suppliers.php:283 -msgid "Payment Terms:" +#: ../inventory/reorder_level.php:57 +#: ../inventory/inquiry/stock_status.php:69 +#: ../sales/includes/db/sales_order_db.inc:108 +#: ../sales/includes/db/sales_order_db.inc:261 +msgid "Re-Order Level" msgstr "" -#: c:\Apache2\htdocs\account228/purchasing/manage/suppliers.php:285 -msgid "Accounts" +#: ../inventory/reorder_level.php:75 +msgid "Reorder levels has been updated." msgstr "" -#: c:\Apache2\htdocs\account228/purchasing/manage/suppliers.php:287 -msgid "Accounts Payable Account:" +#: ../inventory/transfers.php:28 +msgid "Inventory Location Transfers" msgstr "" -#: c:\Apache2\htdocs\account228/purchasing/manage/suppliers.php:289 -msgid "Purchase Account:" +#: ../inventory/transfers.php:43 +msgid "Inventory transfer has been processed" msgstr "" -#: c:\Apache2\htdocs\account228/purchasing/manage/suppliers.php:306 -msgid "General" +#: ../inventory/transfers.php:44 +msgid "&View this transfer" msgstr "" -#: c:\Apache2\htdocs\account228/purchasing/manage/suppliers.php:307 -msgid "General Notes:" +#: ../inventory/transfers.php:46 +msgid "Enter &Another Inventory Transfer" msgstr "" -#: c:\Apache2\htdocs\account228/purchasing/manage/suppliers.php:308 -msgid "Supplier status:" +#: ../inventory/transfers.php:117 +msgid "The locations to transfer from and to must be different." msgstr "" -#: c:\Apache2\htdocs\account228/purchasing/manage/suppliers.php:315 -msgid "Update Supplier" +#: ../inventory/transfers.php:127 +msgid "" +"The quantity entered is greater than the available quantity for this item at " +"the source location :" msgstr "" -#: c:\Apache2\htdocs\account228/purchasing/manage/suppliers.php:316 -msgid "Update supplier data" +#: ../inventory/transfers.php:160 +msgid "The quantity entered must be a positive number." msgstr "" -#: c:\Apache2\htdocs\account228/purchasing/manage/suppliers.php:317 -msgid "Select this supplier and return to document entry." +#: ../inventory/transfers.php:237 +msgid "Process Transfer" msgstr "" -#: c:\Apache2\htdocs\account228/purchasing/manage/suppliers.php:318 -msgid "Delete Supplier" +#: ../inventory/includes/item_adjustments_ui.inc:20 +#: ../inventory/includes/stock_transfers_ui.inc:20 +#: ../manufacturing/includes/work_order_issue_ui.inc:20 +#: ../sales/includes/ui/sales_order_ui.inc:60 +msgid "For Part :" msgstr "" -#: c:\Apache2\htdocs\account228/purchasing/manage/suppliers.php:319 -msgid "Delete supplier data if have been never used" +#: ../inventory/includes/item_adjustments_ui.inc:34 +#: ../manufacturing/work_order_entry.php:209 +#: ../purchasing/inquiry/po_search.php:67 +#: ../sales/inquiry/sales_deliveries_view.php:107 +#: ../sales/inquiry/sales_orders_view.php:232 +msgid "Location:" msgstr "" -#: c:\Apache2\htdocs\account228/purchasing/manage/suppliers.php:323 -msgid "Add New Supplier Details" +#: ../inventory/includes/item_adjustments_ui.inc:43 +msgid "Detail:" msgstr "" -#: c:\Apache2\htdocs\account228/purchasing/view/view_grn.php:21 -msgid "View Purchase Order Delivery" +#: ../inventory/includes/item_adjustments_ui.inc:48 +msgid "Positive Adjustment" msgstr "" -#: c:\Apache2\htdocs\account228/purchasing/view/view_grn.php:27 -msgid "This page must be called with a Purchase Order Delivery number to review." +#: ../inventory/includes/item_adjustments_ui.inc:48 +msgid "Negative Adjustment" msgstr "" -#: c:\Apache2\htdocs\account228/purchasing/view/view_grn.php:33 -msgid "Purchase Order Delivery" +#: ../inventory/includes/item_adjustments_ui.inc:62 +#: ../inventory/includes/stock_transfers_ui.inc:60 +#: ../manufacturing/includes/work_order_issue_ui.inc:33 +#: ../purchasing/includes/ui/po_ui.inc:236 +#: ../purchasing/po_receive_items.php:58 +#: ../purchasing/view/view_grn.php:40 +#: ../purchasing/view/view_po.php:45 +#: ../reporting/includes/doctext.inc:102 +#: ../reporting/includes/doctext.inc:105 +#: ../reporting/includes/doctext.inc:110 +#: ../sales/customer_credit_invoice.php:291 +#: ../sales/customer_delivery.php:429 +#: ../sales/customer_invoice.php:442 +#: ../sales/view/view_credit.php:90 +#: ../sales/view/view_dispatch.php:112 +#: ../sales/view/view_invoice.php:113 +#: ../sales/view/view_sales_order.php:200 +#: ../sales/includes/ui/sales_credit_ui.inc:167 +#: ../sales/includes/ui/sales_order_ui.inc:141 +msgid "Item Code" msgstr "" -#: c:\Apache2\htdocs\account228/purchasing/view/view_grn.php:37 -#: c:\Apache2\htdocs\account228/purchasing/view/view_po.php:41 -msgid "Line Details" +#: ../inventory/includes/item_adjustments_ui.inc:62 +#: ../inventory/includes/stock_transfers_ui.inc:60 +#: ../manufacturing/includes/work_order_issue_ui.inc:33 +#: ../purchasing/includes/ui/po_ui.inc:236 +#: ../purchasing/view/view_grn.php:40 +#: ../purchasing/view/view_po.php:45 +#: ../reporting/includes/doctext.inc:102 +#: ../reporting/includes/doctext.inc:105 +#: ../reporting/includes/doctext.inc:110 +#: ../sales/customer_credit_invoice.php:291 +#: ../sales/customer_delivery.php:429 +#: ../sales/customer_invoice.php:442 +#: ../sales/view/view_credit.php:90 +#: ../sales/view/view_dispatch.php:112 +#: ../sales/view/view_invoice.php:113 +#: ../sales/view/view_sales_order.php:200 +#: ../sales/includes/ui/sales_credit_ui.inc:167 +#: ../sales/includes/ui/sales_order_ui.inc:141 +msgid "Item Description" msgstr "" -#: c:\Apache2\htdocs\account228/purchasing/view/view_grn.php:40 -#: c:\Apache2\htdocs\account228/purchasing/view/view_po.php:45 -msgid "Item Description" +#: ../inventory/includes/item_adjustments_ui.inc:62 +#: ../inventory/includes/stock_transfers_ui.inc:60 +#: ../inventory/manage/item_codes.php:122 +#: ../inventory/manage/sales_kits.php:40 +#: ../inventory/view/view_adjustment.php:56 +#: ../inventory/view/view_transfer.php:56 +#: ../manufacturing/view/wo_issue_view.php:77 +#: ../manufacturing/manage/bom_edit.php:71 +#: ../manufacturing/includes/manufacturing_ui.inc:29 +#: ../manufacturing/includes/manufacturing_ui.inc:157 +#: ../manufacturing/includes/manufacturing_ui.inc:332 +#: ../manufacturing/includes/work_order_issue_ui.inc:33 +#: ../purchasing/includes/ui/invoice_ui.inc:478 +#: ../purchasing/includes/ui/po_ui.inc:236 +#: ../purchasing/view/view_grn.php:40 +#: ../purchasing/view/view_po.php:45 +#: ../reporting/rep301.php:99 +#: ../reporting/rep303.php:109 +#: ../reporting/rep303.php:115 +#: ../reporting/rep401.php:69 +#: ../reporting/includes/doctext.inc:47 +#: ../reporting/includes/doctext.inc:103 +#: ../reporting/includes/doctext.inc:110 +#: ../sales/view/view_credit.php:90 +#: ../sales/view/view_dispatch.php:112 +#: ../sales/view/view_invoice.php:113 +#: ../sales/view/view_sales_order.php:200 +#: ../sales/includes/ui/sales_credit_ui.inc:167 +#: ../sales/includes/ui/sales_order_ui.inc:141 +#: ../themes/exclusive/renderer.php:433 +msgid "Quantity" msgstr "" -#: c:\Apache2\htdocs\account228/purchasing/view/view_grn.php:40 -msgid "Delivery Date" +#: ../inventory/includes/item_adjustments_ui.inc:63 +#: ../inventory/includes/stock_transfers_ui.inc:60 +#: ../inventory/manage/item_units.php:94 +#: ../manufacturing/includes/work_order_issue_ui.inc:34 +#: ../purchasing/includes/ui/po_ui.inc:237 +#: ../purchasing/view/view_grn.php:41 +#: ../purchasing/view/view_po.php:45 +#: ../reporting/includes/doctext.inc:103 +#: ../reporting/includes/doctext.inc:111 +#: ../sales/view/view_credit.php:91 +#: ../sales/view/view_dispatch.php:113 +#: ../sales/view/view_invoice.php:114 +#: ../sales/view/view_sales_order.php:200 +#: ../sales/includes/ui/sales_credit_ui.inc:167 +#: ../sales/includes/ui/sales_order_ui.inc:143 +msgid "Unit" msgstr "" -#: c:\Apache2\htdocs\account228/purchasing/view/view_grn.php:41 -#: c:\Apache2\htdocs\account228/purchasing/view/view_po.php:46 -msgid "Line Total" +#: ../inventory/includes/item_adjustments_ui.inc:63 +#: ../inventory/view/view_adjustment.php:57 +#: ../manufacturing/includes/manufacturing_ui.inc:29 +#: ../manufacturing/includes/work_order_issue_ui.inc:34 +#: ../reporting/rep301.php:99 +msgid "Unit Cost" msgstr "" -#: c:\Apache2\htdocs\account228/purchasing/view/view_grn.php:41 -#: c:\Apache2\htdocs\account228/purchasing/view/view_po.php:46 -msgid "Quantity Invoiced" +#: ../inventory/includes/stock_transfers_ui.inc:35 +#: ../inventory/inquiry/stock_movements.php:56 +#: ../manufacturing/includes/work_order_issue_ui.inc:160 +msgid "From Location:" msgstr "" -#: c:\Apache2\htdocs\account228/purchasing/view/view_grn.php:70 -#: c:\Apache2\htdocs\account228/purchasing/view/view_po.php:84 -msgid "Total Excluding Tax/Shipping" +#: ../inventory/includes/stock_transfers_ui.inc:36 +msgid "To Location:" msgstr "" -#: c:\Apache2\htdocs\account228/purchasing/view/view_grn.php:75 -msgid "This delivery has been voided." +#: ../inventory/includes/stock_transfers_ui.inc:46 +msgid "Transfer Type:" msgstr "" -#: c:\Apache2\htdocs\account228/purchasing/view/view_po.php:22 -msgid "View Purchase Order" +#: ../inventory/includes/db/items_db.inc:119 +msgid "" +"Cannot delete this item because there are stock movements that refer to this " +"item." msgstr "" -#: c:\Apache2\htdocs\account228/purchasing/view/view_po.php:27 -msgid "This page must be called with a purchase order number to review." +#: ../inventory/includes/db/items_db.inc:122 +msgid "" +"Cannot delete this item record because there are bills of material that " +"require this part as a component." msgstr "" -#: c:\Apache2\htdocs\account228/purchasing/view/view_po.php:30 -msgid "Purchase Order" +#: ../inventory/includes/db/items_db.inc:125 +#: ../inventory/includes/db/items_db.inc:128 +msgid "" +"Cannot delete this item because there are existing purchase order items for " +"it." msgstr "" -#: c:\Apache2\htdocs\account228/purchasing/view/view_po.php:46 -msgid "Requested By" +#: ../inventory/includes/db/items_db.inc:146 +msgid "" +"This item cannot be deleted because some code aliases \n" +"\t\t\t\tor foreign codes was entered for it, or there are kits defined \n" +"\t\t\t\tusing this item as component" msgstr "" -#: c:\Apache2\htdocs\account228/purchasing/view/view_po.php:46 -msgid "Quantity Received" +#: ../inventory/inquiry/stock_movements.php:27 +msgid "Inventory Item Movement" msgstr "" -#: c:\Apache2\htdocs\account228/purchasing/view/view_po.php:103 -msgid "Deliveries" +#: ../inventory/inquiry/stock_movements.php:61 +msgid "Show Movements" msgstr "" -#: c:\Apache2\htdocs\account228/purchasing/view/view_po.php:105 -msgid "Delivered On" +#: ../inventory/inquiry/stock_movements.php:61 +#: ../purchasing/includes/ui/invoice_ui.inc:447 +#: ../purchasing/inquiry/supplier_allocation_inquiry.php:57 +#: ../purchasing/inquiry/supplier_inquiry.php:54 +#: ../sales/inquiry/customer_allocation_inquiry.php:51 +#: ../sales/inquiry/customer_inquiry.php:54 +msgid "Refresh Inquiry" msgstr "" -#: c:\Apache2\htdocs\account228/purchasing/view/view_po.php:128 -msgid "Invoices/Credits" +#: ../inventory/inquiry/stock_movements.php:76 +msgid "Detail" msgstr "" -#: c:\Apache2\htdocs\account228/purchasing/view/view_supp_credit.php:23 -msgid "View Supplier Credit Note" +#: ../inventory/inquiry/stock_movements.php:77 +msgid "Quantity In" msgstr "" -#: c:\Apache2\htdocs\account228/purchasing/view/view_supp_credit.php:39 -msgid "SUPPLIER CREDIT NOTE" +#: ../inventory/inquiry/stock_movements.php:77 +msgid "Quantity Out" msgstr "" -#: c:\Apache2\htdocs\account228/purchasing/view/view_supp_credit.php:48 -#: c:\Apache2\htdocs\account228/purchasing/view/view_supp_invoice.php:51 -msgid "Invoice Date" +#: ../inventory/inquiry/stock_movements.php:92 +msgid "Quantity on hand before" msgstr "" -#: c:\Apache2\htdocs\account228/purchasing/view/view_supp_credit.php:61 -#: c:\Apache2\htdocs\account228/purchasing/view/view_supp_invoice.php:66 -msgid "Sub Total" +#: ../inventory/inquiry/stock_movements.php:180 +msgid "Quantity on hand after" msgstr "" -#: c:\Apache2\htdocs\account228/purchasing/view/view_supp_credit.php:67 -msgid "TOTAL CREDIT NOTE" +#: ../inventory/inquiry/stock_status.php:18 +#: ../inventory/inquiry/stock_status.php:20 +msgid "Inventory Item Status" msgstr "" -#: c:\Apache2\htdocs\account228/purchasing/view/view_supp_credit.php:71 -msgid "This credit note has been voided." +#: ../inventory/inquiry/stock_status.php:55 +msgid "" +"This is a service and cannot have a stock holding, only the total quantity " +"on outstanding sales orders is shown." msgstr "" -#: c:\Apache2\htdocs\account228/purchasing/view/view_supp_invoice.php:23 -msgid "View Supplier Invoice" +#: ../inventory/inquiry/stock_status.php:65 +#: ../inventory/inquiry/stock_status.php:70 +#: ../reporting/rep303.php:109 +#: ../reporting/rep303.php:115 +msgid "Demand" msgstr "" -#: c:\Apache2\htdocs\account228/purchasing/view/view_supp_invoice.php:41 -msgid "SUPPLIER INVOICE" +#: ../inventory/inquiry/stock_status.php:70 +#: ../reporting/rep303.php:109 +#: ../reporting/rep303.php:115 +msgid "On Order" msgstr "" -#: c:\Apache2\htdocs\account228/purchasing/view/view_supp_invoice.php:73 -msgid "TOTAL INVOICE" +#: ../inventory/manage/item_categories.php:16 +msgid "Item Categories" msgstr "" -#: c:\Apache2\htdocs\account228/purchasing/view/view_supp_invoice.php:77 -msgid "This invoice has been voided." +#: ../inventory/manage/item_categories.php:34 +msgid "The item category description cannot be empty." msgstr "" -#: c:\Apache2\htdocs\account228/purchasing/view/view_supp_payment.php:22 -msgid "View Payment to Supplier" +#: ../inventory/manage/item_categories.php:48 +msgid "Selected item category has been updated" msgstr "" -#: c:\Apache2\htdocs\account228/purchasing/view/view_supp_payment.php:47 -msgid "Payment to Supplier" +#: ../inventory/manage/item_categories.php:58 +msgid "New item category has been added" msgstr "" -#: c:\Apache2\htdocs\account228/purchasing/view/view_supp_payment.php:53 -msgid "To Supplier" +#: ../inventory/manage/item_categories.php:72 +msgid "" +"Cannot delete this item category because items have been created using this " +"item category." msgstr "" -#: c:\Apache2\htdocs\account228/purchasing/view/view_supp_payment.php:59 -msgid "Payment Currency" +#: ../inventory/manage/item_categories.php:77 +msgid "Selected item category has been deleted" msgstr "" -#: c:\Apache2\htdocs\account228/purchasing/view/view_supp_payment.php:66 -msgid "Supplier's Currency" +#: ../inventory/manage/item_categories.php:98 +msgid "Tax type" msgstr "" -#: c:\Apache2\htdocs\account228/reporting/rep101.php:116 -#: c:\Apache2\htdocs\account228/reporting/rep102.php:99 -msgid "Balances in Home Currency" +#: ../inventory/manage/item_categories.php:98 +#: ../inventory/manage/item_codes.php:122 +#: ../inventory/manage/sales_kits.php:40 +#: ../inventory/view/view_adjustment.php:57 +#: ../inventory/view/view_transfer.php:56 +#: ../manufacturing/view/wo_issue_view.php:77 +#: ../manufacturing/manage/bom_edit.php:71 +#: ../purchasing/po_receive_items.php:58 +#: ../sales/customer_credit_invoice.php:291 +#: ../sales/customer_delivery.php:430 +#: ../sales/customer_invoice.php:442 +msgid "Units" msgstr "" -#: c:\Apache2\htdocs\account228/reporting/rep101.php:123 -msgid "Trans Type" +#: ../inventory/manage/item_categories.php:98 +msgid "Sales Act" msgstr "" -#: c:\Apache2\htdocs\account228/reporting/rep101.php:123 -msgid "Charges" +#: ../inventory/manage/item_categories.php:99 +msgid "Inventory Account" msgstr "" -#: c:\Apache2\htdocs\account228/reporting/rep101.php:123 -msgid "Credits" +#: ../inventory/manage/item_categories.php:99 +msgid "COGS Account" msgstr "" -#: c:\Apache2\htdocs\account228/reporting/rep101.php:130 -#: c:\Apache2\htdocs\account228/reporting/rep102.php:111 -#: c:\Apache2\htdocs\account228/reporting/rep102.php:118 -#: c:\Apache2\htdocs\account228/reporting/rep105.php:107 -#: c:\Apache2\htdocs\account228/reporting/rep106.php:81 -msgid "Customer" +#: ../inventory/manage/item_categories.php:99 +msgid "Adjustment Account" msgstr "" -#: c:\Apache2\htdocs\account228/reporting/rep101.php:133 -msgid "Customer Balances" +#: ../inventory/manage/item_categories.php:100 +msgid "Assembly Account" msgstr "" -#: c:\Apache2\htdocs\account228/reporting/rep101.php:231 -#: c:\Apache2\htdocs\account228/reporting/rep102.php:207 -#: c:\Apache2\htdocs\account228/reporting/rep106.php:177 -msgid "Grand Total" +#: ../inventory/manage/item_categories.php:180 +msgid "Category Name:" msgstr "" -#: c:\Apache2\htdocs\account228/reporting/rep102.php:93 -#: c:\Apache2\htdocs\account228/reporting/rep106.php:91 -msgid "Summary Only" +#: ../inventory/manage/item_categories.php:182 +msgid "Default values for new items" msgstr "" -#: c:\Apache2\htdocs\account228/reporting/rep102.php:95 -msgid "Detailed Report" +#: ../inventory/manage/item_categories.php:184 +#: ../inventory/manage/items.php:336 +msgid "Item Tax Type:" msgstr "" -#: c:\Apache2\htdocs\account228/reporting/rep102.php:117 -msgid "End Date" +#: ../inventory/manage/item_categories.php:186 +#: ../inventory/manage/items.php:338 +msgid "Item Type:" msgstr "" -#: c:\Apache2\htdocs\account228/reporting/rep102.php:124 -msgid "Aged Customer Analysis" +#: ../inventory/manage/item_categories.php:188 +#: ../inventory/manage/items.php:340 +msgid "Units of Measure:" msgstr "" -#: c:\Apache2\htdocs\account228/reporting/rep103.php:118 -msgid "All Areas" +#: ../inventory/manage/item_categories.php:190 +#: ../inventory/manage/items.php:344 +msgid "Exclude from sales:" msgstr "" -#: c:\Apache2\htdocs\account228/reporting/rep103.php:122 -msgid "All Sales Folk" +#: ../inventory/manage/item_codes.php:16 +msgid "Foreign Item Codes" msgstr "" -#: c:\Apache2\htdocs\account228/reporting/rep103.php:126 -msgid "Greater than " +#: ../inventory/manage/item_codes.php:23 +#: ../sales/sales_order_entry.php:637 +msgid "There are no inventory items defined in the system." msgstr "" -#: c:\Apache2\htdocs\account228/reporting/rep103.php:130 -msgid "Less than " +#: ../inventory/manage/item_codes.php:41 +msgid "The price entered was not positive number." msgstr "" -#: c:\Apache2\htdocs\account228/reporting/rep103.php:139 -msgid "Customer Postal Address" +#: ../inventory/manage/item_codes.php:47 +#: ../inventory/manage/sales_kits.php:78 +msgid "Item code description cannot be empty." msgstr "" -#: c:\Apache2\htdocs\account228/reporting/rep103.php:139 -msgid "Price/Turnover" +#: ../inventory/manage/item_codes.php:55 +#: ../inventory/manage/items.php:150 +#: ../inventory/manage/sales_kits.php:88 +msgid "This item code is already assigned to stock item or sale kit." msgstr "" -#: c:\Apache2\htdocs\account228/reporting/rep103.php:139 -msgid "Branch Contact Information" +#: ../inventory/manage/item_codes.php:67 +msgid "New item code has been added." msgstr "" -#: c:\Apache2\htdocs\account228/reporting/rep103.php:140 -msgid "Branch Delivery Address" +#: ../inventory/manage/item_codes.php:73 +msgid "Item code has been updated." msgstr "" -#: c:\Apache2\htdocs\account228/reporting/rep103.php:145 -msgid "Activity Since" +#: ../inventory/manage/item_codes.php:85 +msgid "Item code has been sucessfully deleted." msgstr "" -#: c:\Apache2\htdocs\account228/reporting/rep103.php:146 -msgid "Sales Areas" +#: ../inventory/manage/item_codes.php:122 +msgid "EAN/UPC Code" msgstr "" -#: c:\Apache2\htdocs\account228/reporting/rep103.php:147 -msgid "Sales Folk" +#: ../inventory/manage/item_codes.php:123 +#: ../reporting/rep104.php:115 +#: ../reporting/rep105.php:117 +#: ../reporting/rep301.php:99 +#: ../reporting/rep301.php:104 +#: ../reporting/rep302.php:122 +#: ../reporting/rep302.php:129 +#: ../reporting/rep303.php:121 +#: ../reporting/rep304.php:114 +#: ../reporting/rep304.php:122 +msgid "Category" msgstr "" -#: c:\Apache2\htdocs\account228/reporting/rep103.php:148 -msgid "Activity" +#: ../inventory/manage/item_codes.php:176 +msgid "UPC/EAN code:" msgstr "" -#: c:\Apache2\htdocs\account228/reporting/rep103.php:150 -msgid "Customer Details Listing" +#: ../inventory/manage/item_codes.php:177 +#: ../inventory/manage/sales_kits.php:245 +#: ../manufacturing/work_order_add_finished.php:206 +#: ../manufacturing/work_order_entry.php:422 +#: ../manufacturing/manage/bom_edit.php:228 +msgid "Quantity:" msgstr "" -#: c:\Apache2\htdocs\account228/reporting/rep103.php:178 -msgid "Customers in" +#: ../inventory/manage/item_codes.php:178 +#: ../inventory/manage/items.php:311 +#: ../inventory/manage/movement_types.php:129 +#: ../inventory/manage/sales_kits.php:206 +#: ../inventory/manage/sales_kits.php:232 +#: ../manufacturing/manage/work_centres.php:138 +#: ../sales/manage/credit_status.php:145 +#: ../sales/manage/recurrent_invoices.php:147 +#: ../taxes/item_tax_types.php:168 +#: ../taxes/tax_groups.php:203 +#: ../taxes/tax_types.php:158 +msgid "Description:" msgstr "" -#: c:\Apache2\htdocs\account228/reporting/rep103.php:202 -msgid "Price List" +#: ../inventory/manage/item_codes.php:179 +#: ../inventory/manage/items.php:313 +#: ../inventory/manage/sales_kits.php:207 +#: ../inventory/manage/sales_kits.php:233 +msgid "Category:" msgstr "" -#: c:\Apache2\htdocs\account228/reporting/rep103.php:204 -msgid "Turnover" +#: ../inventory/manage/items.php:69 +msgid "Only jpg files are supported - a file extension of .jpg is expected" msgstr "" -#: c:\Apache2\htdocs\account228/reporting/rep103.php:207 -msgid "Ph" +#: ../inventory/manage/items.php:100 +msgid "" +"There are no item categories defined in the system. At least one item " +"category is required to add a item." msgstr "" -#: c:\Apache2\htdocs\account228/reporting/rep103.php:208 -msgid "Fax" +#: ../inventory/manage/items.php:102 +msgid "" +"There are no item tax types defined in the system. At least one item tax " +"type is required to add a item." msgstr "" -#: c:\Apache2\htdocs\account228/reporting/rep104.php:109 -msgid "Category/Items" +#: ../inventory/manage/items.php:129 +msgid "The item name must be entered." msgstr "" -#: c:\Apache2\htdocs\account228/reporting/rep104.php:109 -msgid "GP %" +#: ../inventory/manage/items.php:135 +msgid "The item code cannot be empty" msgstr "" -#: c:\Apache2\htdocs\account228/reporting/rep104.php:117 -msgid "Show GP %" +#: ../inventory/manage/items.php:143 +msgid "" +"The item code cannot contain any of the following characters - & + OR a " +"space OR quotes" msgstr "" -#: c:\Apache2\htdocs\account228/reporting/rep104.php:124 -msgid "Price Listing" +#: ../inventory/manage/items.php:179 +msgid "Item has been updated." msgstr "" -#: c:\Apache2\htdocs\account228/reporting/rep104.php:190 -msgid "Sales Kits" +#: ../inventory/manage/items.php:192 +msgid "A new item has been added." msgstr "" -#: c:\Apache2\htdocs\account228/reporting/rep105.php:101 -msgid "All Orders" +#: ../inventory/manage/items.php:234 +msgid "Selected item has been deleted." msgstr "" -#: c:\Apache2\htdocs\account228/reporting/rep105.php:103 -msgid "Back Orders Only" +#: ../inventory/manage/items.php:250 +msgid "Select an item:" msgstr "" -#: c:\Apache2\htdocs\account228/reporting/rep105.php:107 -msgid "Order" +#: ../inventory/manage/items.php:251 +msgid "New item" msgstr "" -#: c:\Apache2\htdocs\account228/reporting/rep105.php:107 -#: c:\Apache2\htdocs\account228/reporting/rep106.php:81 -msgid "Branch" +#: ../inventory/manage/items.php:268 +#: ../inventory/view/view_adjustment.php:56 +#: ../inventory/view/view_transfer.php:39 +#: ../inventory/view/view_transfer.php:56 +#: ../manufacturing/search_work_orders.php:163 +#: ../manufacturing/view/wo_issue_view.php:44 +#: ../manufacturing/view/wo_production_view.php:45 +#: ../purchasing/includes/ui/invoice_ui.inc:465 +#: ../purchasing/includes/ui/invoice_ui.inc:477 +#: ../reporting/rep204.php:82 +#: ../themes/exclusive/renderer.php:433 +#: ../themes/exclusive/renderer.php:452 +msgid "Item" msgstr "" -#: c:\Apache2\htdocs\account228/reporting/rep105.php:107 -#: c:\Apache2\htdocs\account228/reporting/rep106.php:81 -msgid "Customer Ref" +#: ../inventory/manage/items.php:273 +#: ../inventory/manage/items.php:304 +msgid "Item Code:" msgstr "" -#: c:\Apache2\htdocs\account228/reporting/rep105.php:108 -msgid "Ord Date" +#: ../inventory/manage/items.php:342 +msgid "Editable description:" msgstr "" -#: c:\Apache2\htdocs\account228/reporting/rep105.php:108 -msgid "Del Date" +#: ../inventory/manage/items.php:362 +#: ../sales/manage/customer_branches.php:248 +msgid "GL Accounts" msgstr "" -#: c:\Apache2\htdocs\account228/reporting/rep105.php:108 -msgid "Loc" +#: ../inventory/manage/items.php:385 +msgid "Other" msgstr "" -#: c:\Apache2\htdocs\account228/reporting/rep105.php:112 -msgid "Invoiced" +#: ../inventory/manage/items.php:388 +msgid "Image File (.jpg)" msgstr "" -#: c:\Apache2\htdocs\account228/reporting/rep105.php:119 -msgid "Selection" +#: ../inventory/manage/items.php:403 +msgid "No image" msgstr "" -#: c:\Apache2\htdocs\account228/reporting/rep105.php:124 -msgid "Order Status Listing" +#: ../inventory/manage/items.php:408 +msgid "Delete Image:" msgstr "" -#: c:\Apache2\htdocs\account228/reporting/rep106.php:81 -msgid "Invoice" +#: ../inventory/manage/items.php:410 +msgid "Item status:" msgstr "" -#: c:\Apache2\htdocs\account228/reporting/rep106.php:82 -msgid "Inv Date" +#: ../inventory/manage/items.php:416 +msgid "Insert New Item" msgstr "" -#: c:\Apache2\htdocs\account228/reporting/rep106.php:82 -#: c:\Apache2\htdocs\account228/reporting/rep106.php:86 -#: c:\Apache2\htdocs\account228/reporting/rep106.php:87 -msgid "Provision" +#: ../inventory/manage/items.php:420 +msgid "Update Item" msgstr "" -#: c:\Apache2\htdocs\account228/reporting/rep106.php:86 -msgid "Salesman" +#: ../inventory/manage/items.php:423 +msgid "Select this items and return to document entry." msgstr "" -#: c:\Apache2\htdocs\account228/reporting/rep106.php:86 -msgid "Email" +#: ../inventory/manage/items.php:424 +msgid "Clone This Item" msgstr "" -#: c:\Apache2\htdocs\account228/reporting/rep106.php:87 -msgid "Break Pt." +#: ../inventory/manage/items.php:425 +msgid "Delete This Item" msgstr "" -#: c:\Apache2\htdocs\account228/reporting/rep106.php:96 -msgid "Salesman Listing" +#: ../inventory/manage/item_units.php:16 +msgid "Units of Measure" msgstr "" -#: c:\Apache2\htdocs\account228/reporting/rep107.php:66 -#: c:\Apache2\htdocs\account228/reporting/rep107.php:98 -#: c:\Apache2\htdocs\account228/reporting/rep107.php:109 -msgid "INVOICE" +#: ../inventory/manage/item_units.php:34 +msgid "The unit of measure code cannot be empty." msgstr "" -#: c:\Apache2\htdocs\account228/reporting/rep107.php:103 -#: c:\Apache2\htdocs\account228/reporting/rep107.php:109 -msgid "CREDIT NOTE" +#: ../inventory/manage/item_units.php:40 +msgid "The unit of measure code is too long." msgstr "" -#: c:\Apache2\htdocs\account228/reporting/rep108.php:77 -#: c:\Apache2\htdocs\account228/reporting/rep108.php:106 -msgid "STATEMENT" +#: ../inventory/manage/item_units.php:46 +msgid "The unit of measure description cannot be empty." msgstr "" -#: c:\Apache2\htdocs\account228/reporting/rep109.php:64 -#: c:\Apache2\htdocs\account228/reporting/rep109.php:90 -#: c:\Apache2\htdocs\account228/reporting/rep109.php:96 -msgid "SALES ORDER" +#: ../inventory/manage/item_units.php:53 +msgid "Selected unit has been updated" msgstr "" -#: c:\Apache2\htdocs\account228/reporting/rep109.php:66 -#: c:\Apache2\htdocs\account228/reporting/rep109.php:85 -#: c:\Apache2\htdocs\account228/reporting/rep109.php:96 -msgid "QUOTE" +#: ../inventory/manage/item_units.php:55 +msgid "New unit has been added" msgstr "" -#: c:\Apache2\htdocs\account228/reporting/rep110.php:68 -msgid "DELIVERY" +#: ../inventory/manage/item_units.php:69 +msgid "" +"Cannot delete this unit of measure because items have been created using " +"this unit." msgstr "" -#: c:\Apache2\htdocs\account228/reporting/rep110.php:70 -#: c:\Apache2\htdocs\account228/reporting/rep110.php:95 -msgid "PACKING SLIP" +#: ../inventory/manage/item_units.php:75 +msgid "Selected unit has been deleted" msgstr "" -#: c:\Apache2\htdocs\account228/reporting/rep110.php:90 -#: c:\Apache2\htdocs\account228/reporting/rep110.php:101 -msgid "DELIVERY NOTE" +#: ../inventory/manage/item_units.php:94 +msgid "Decimals" msgstr "" -#: c:\Apache2\htdocs\account228/reporting/rep111.php:60 -#: c:\Apache2\htdocs\account228/reporting/rep111.php:80 -msgid "SALES QUOTATION" +#: ../inventory/manage/item_units.php:107 +#: ../inventory/manage/item_units.php:142 +msgid "User Quantity Decimals" msgstr "" -#: c:\Apache2\htdocs\account228/reporting/rep112.php:91 -#: c:\Apache2\htdocs\account228/reporting/rep112.php:110 -msgid "RECEIPT" +#: ../inventory/manage/item_units.php:136 +#: ../inventory/manage/item_units.php:139 +msgid "Unit Abbreviation:" msgstr "" -#: c:\Apache2\htdocs\account228/reporting/rep201.php:107 -msgid "Balances in Home currency" +#: ../inventory/manage/item_units.php:140 +msgid "Descriptive Name:" msgstr "" -#: c:\Apache2\htdocs\account228/reporting/rep201.php:124 -msgid "Supplier Balances" +#: ../inventory/manage/item_units.php:142 +msgid "Decimal Places:" msgstr "" -#: c:\Apache2\htdocs\account228/reporting/rep202.php:124 -msgid "currency" +#: ../inventory/manage/locations.php:16 +msgid "Inventory Locations" msgstr "" -#: c:\Apache2\htdocs\account228/reporting/rep202.php:125 -msgid "Aged Supplier Analysis" +#: ../inventory/manage/locations.php:39 +msgid "" +"The location code must be five characters or less long (including converted " +"special chars)." msgstr "" -#: c:\Apache2\htdocs\account228/reporting/rep203.php:95 -msgid "Payment Report" +#: ../inventory/manage/locations.php:45 +msgid "The location name must be entered." msgstr "" -#: c:\Apache2\htdocs\account228/reporting/rep204.php:82 -msgid "GRN" +#: ../inventory/manage/locations.php:56 +msgid "Selected location has been updated" msgstr "" -#: c:\Apache2\htdocs\account228/reporting/rep204.php:82 -msgid "Qty Recd" +#: ../inventory/manage/locations.php:65 +msgid "New location has been added" msgstr "" -#: c:\Apache2\htdocs\account228/reporting/rep204.php:82 -msgid "qty Inv" +#: ../inventory/manage/locations.php:76 +msgid "" +"Cannot delete this location because item movements have been created using " +"this location." msgstr "" -#: c:\Apache2\htdocs\account228/reporting/rep204.php:83 -msgid "Std Cost" +#: ../inventory/manage/locations.php:82 +msgid "" +"Cannot delete this location because it is used by some work orders records." msgstr "" -#: c:\Apache2\htdocs\account228/reporting/rep204.php:90 -msgid "Outstanding GRNs Report" +#: ../inventory/manage/locations.php:88 +msgid "" +"Cannot delete this location because it is used by some branch records as the " +"default location to deliver from." msgstr "" -#: c:\Apache2\htdocs\account228/reporting/rep209.php:85 -#: c:\Apache2\htdocs\account228/reporting/rep209.php:102 -#: c:\Apache2\htdocs\account228/reporting/rep209.php:107 -msgid "PURCHASE ORDER" +#: ../inventory/manage/locations.php:94 +#: ../inventory/manage/locations.php:100 +#: ../inventory/manage/locations.php:105 +#: ../inventory/manage/locations.php:110 +#: ../inventory/manage/locations.php:115 +msgid "" +"Cannot delete this location because it is used by some related records in " +"other tables." msgstr "" -#: c:\Apache2\htdocs\account228/reporting/rep210.php:93 -#: c:\Apache2\htdocs\account228/reporting/rep210.php:118 -#: c:\Apache2\htdocs\account228/reporting/rep210.php:123 -msgid "REMITTANCE" +#: ../inventory/manage/locations.php:129 +msgid "Selected location has been deleted" msgstr "" -#: c:\Apache2\htdocs\account228/reporting/rep301.php:106 -msgid "Inventory Valuation Report" +#: ../inventory/manage/locations.php:146 +msgid "Location Code" msgstr "" -#: c:\Apache2\htdocs\account228/reporting/rep301.php:146 -#: c:\Apache2\htdocs\account228/reporting/rep302.php:166 -#: c:\Apache2\htdocs\account228/reporting/rep303.php:160 -#: c:\Apache2\htdocs\account228/reporting/rep304.php:168 -#: c:\Apache2\htdocs\account228/reporting/rep304.php:172 -#: c:\Apache2\htdocs\account228/reporting/rep305.php:111 -msgid "Inactive" +#: ../inventory/manage/locations.php:146 +msgid "Location Name" msgstr "" -#: c:\Apache2\htdocs\account228/reporting/rep302.php:123 -msgid "QOH" +#: ../inventory/manage/locations.php:192 +#: ../inventory/manage/locations.php:196 +msgid "Location Code:" msgstr "" -#: c:\Apache2\htdocs\account228/reporting/rep302.php:123 -msgid "Cust Ord" +#: ../inventory/manage/locations.php:199 +msgid "Location Name:" msgstr "" -#: c:\Apache2\htdocs\account228/reporting/rep302.php:123 -msgid "Supp Ord" +#: ../inventory/manage/locations.php:200 +msgid "Contact for deliveries:" msgstr "" -#: c:\Apache2\htdocs\account228/reporting/rep302.php:123 -msgid "Sugg Ord" +#: ../inventory/manage/locations.php:204 +msgid "Telephone No:" msgstr "" -#: c:\Apache2\htdocs\account228/reporting/rep302.php:132 -msgid "Inventory Planning Report" +#: ../inventory/manage/locations.php:206 +msgid "Facsimile No:" msgstr "" -#: c:\Apache2\htdocs\account228/reporting/rep303.php:94 -msgid "Shortage" +#: ../inventory/manage/movement_types.php:16 +msgid "Inventory Movement Types" msgstr "" -#: c:\Apache2\htdocs\account228/reporting/rep303.php:104 -#: c:\Apache2\htdocs\account228/reporting/rep303.php:110 -#: c:\Apache2\htdocs\account228/reporting/rep305.php:72 -msgid "Stock ID" +#: ../inventory/manage/movement_types.php:34 +msgid "The inventory movement type name cannot be empty." msgstr "" -#: c:\Apache2\htdocs\account228/reporting/rep303.php:104 -msgid "Check" +#: ../inventory/manage/movement_types.php:43 +msgid "Selected movement type has been updated" msgstr "" -#: c:\Apache2\htdocs\account228/reporting/rep303.php:118 -msgid "Only Shortage" +#: ../inventory/manage/movement_types.php:48 +msgid "New movement type has been added" msgstr "" -#: c:\Apache2\htdocs\account228/reporting/rep303.php:125 -msgid "Stock Check Sheets" +#: ../inventory/manage/movement_types.php:61 +msgid "" +"Cannot delete this inventory movement type because item transactions have " +"been created referring to it." msgstr "" -#: c:\Apache2\htdocs\account228/reporting/rep304.php:114 -msgid "Qty" +#: ../inventory/manage/movement_types.php:76 +msgid "Selected movement type has been deleted" msgstr "" -#: c:\Apache2\htdocs\account228/reporting/rep304.php:114 -msgid "Sales" +#: ../inventory/manage/sales_kits.php:16 +msgid "Sales Kits & Alias Codes" msgstr "" -#: c:\Apache2\htdocs\account228/reporting/rep304.php:114 -msgid "Cost" +#: ../inventory/manage/sales_kits.php:40 +msgid "Stock Item" msgstr "" -#: c:\Apache2\htdocs\account228/reporting/rep304.php:114 -msgid "Contribution" +#: ../inventory/manage/sales_kits.php:54 +msgid "kit" msgstr "" -#: c:\Apache2\htdocs\account228/reporting/rep304.php:126 -msgid "Inventory Sales Report" +#: ../inventory/manage/sales_kits.php:72 +#: ../manufacturing/manage/bom_edit.php:101 +msgid "The quantity entered must be numeric and greater than zero." msgstr "" -#: c:\Apache2\htdocs\account228/reporting/rep305.php:72 -msgid "PO No" +#: ../inventory/manage/sales_kits.php:93 +msgid "Kit/alias code cannot be empty." msgstr "" -#: c:\Apache2\htdocs\account228/reporting/rep305.php:72 -msgid "Qty Received" +#: ../inventory/manage/sales_kits.php:101 +msgid "" +"The selected component contains directly or on any lower level the kit under " +"edition. Recursive kits are not allowed." msgstr "" -#: c:\Apache2\htdocs\account228/reporting/rep305.php:72 -msgid "Unit Price" +#: ../inventory/manage/sales_kits.php:108 +msgid "" +"The selected component is already in this kit. You can modify it's quantity " +"but it cannot appear more than once in the same kit." msgstr "" -#: c:\Apache2\htdocs\account228/reporting/rep305.php:72 -msgid "Actual Price" +#: ../inventory/manage/sales_kits.php:116 +msgid "New alias code has been created." msgstr "" -#: c:\Apache2\htdocs\account228/reporting/rep305.php:79 -msgid "GRN Valuation Report" +#: ../inventory/manage/sales_kits.php:119 +msgid "New component has been added to selected kit." msgstr "" -#: c:\Apache2\htdocs\account228/reporting/rep401.php:69 -msgid "Wrk Ctr" +#: ../inventory/manage/sales_kits.php:129 +msgid "Component of selected kit has been updated." msgstr "" -#: c:\Apache2\htdocs\account228/reporting/rep401.php:76 -msgid "Bill of Material Listing" +#: ../inventory/manage/sales_kits.php:139 +msgid "Kit common properties has been updated" msgstr "" -#: c:\Apache2\htdocs\account228/reporting/rep409.php:65 -#: c:\Apache2\htdocs\account228/reporting/rep409.php:82 -#: c:\Apache2\htdocs\account228/reporting/rep409.php:87 -msgid "WORK ORDER" +#: ../inventory/manage/sales_kits.php:157 +msgid "" +"This item cannot be deleted because it is the last item in the kit used by " +"following kits" msgstr "" -#: c:\Apache2\htdocs\account228/reporting/rep409.php:132 -msgid "Insufficient stock" +#: ../inventory/manage/sales_kits.php:168 +#: ../manufacturing/manage/bom_edit.php:153 +msgid "The component item has been deleted from this bom" msgstr "" -#: c:\Apache2\htdocs\account228/reporting/rep501.php:85 -msgid "YTD" +#: ../inventory/manage/sales_kits.php:183 +msgid "Select a sale kit:" msgstr "" -#: c:\Apache2\htdocs\account228/reporting/rep501.php:92 -msgid "Dimension Summary" +#: ../inventory/manage/sales_kits.php:184 +msgid "New kit" msgstr "" -#: c:\Apache2\htdocs\account228/reporting/rep601.php:83 -msgid "Bank Account" +#: ../inventory/manage/sales_kits.php:199 +msgid "Alias/kit code:" msgstr "" -#: c:\Apache2\htdocs\account228/reporting/rep601.php:144 -msgid "Total Debit / Credit" +#: ../inventory/manage/sales_kits.php:208 +msgid "Update kit/alias name" msgstr "" -#: c:\Apache2\htdocs\account228/reporting/rep601.php:161 -msgid "Net Change" +#: ../inventory/manage/sales_kits.php:223 +#: ../manufacturing/manage/bom_edit.php:204 +#: ../manufacturing/manage/bom_edit.php:211 +msgid "Component:" msgstr "" -#: c:\Apache2\htdocs\account228/reporting/rep702.php:51 -msgid "Type/Account" +#: ../inventory/manage/sales_kits.php:237 +msgid "kits" msgstr "" -#: c:\Apache2\htdocs\account228/reporting/rep702.php:51 -msgid "Date/Dim." +#: ../inventory/view/view_adjustment.php:17 +msgid "View Inventory Adjustment" msgstr "" -#: c:\Apache2\htdocs\account228/reporting/rep702.php:52 -msgid "Person/Item/Memo" +#: ../inventory/view/view_adjustment.php:43 +msgid "At Location" msgstr "" -#: c:\Apache2\htdocs\account228/reporting/rep702.php:62 -msgid "List of Journal Entries" +#: ../inventory/view/view_adjustment.php:46 +#: ../inventory/view/view_transfer.php:46 +msgid "Adjustment Type" msgstr "" -#: c:\Apache2\htdocs\account228/reporting/rep704.php:66 -msgid "GL Account Transactions" +#: ../inventory/view/view_adjustment.php:73 +msgid "This adjustment has been voided." msgstr "" -#: c:\Apache2\htdocs\account228/reporting/rep704.php:78 -#: c:\Apache2\htdocs\account228/reporting/rep704.php:81 -#: c:\Apache2\htdocs\account228/reporting/rep704.php:84 -#: c:\Apache2\htdocs\account228/reporting/rep709.php:103 -msgid "Ref" +#: ../inventory/view/view_transfer.php:17 +msgid "View Inventory Transfer" msgstr "" -#: c:\Apache2\htdocs\account228/reporting/rep705.php:234 -#: c:\Apache2\htdocs\account228/reporting/rep705.php:246 -#: c:\Apache2\htdocs\account228/reporting/rep705.php:256 -#: c:\Apache2\htdocs\account228/reporting/reports_main.php:249 -#: c:\Apache2\htdocs\account228/reporting/reports_main.php:294 -#: c:\Apache2\htdocs\account228/reporting/reports_main.php:334 -msgid "Year" +#: ../inventory/view/view_transfer.php:40 +#: ../manufacturing/view/wo_issue_view.php:44 +#: ../manufacturing/includes/manufacturing_ui.inc:29 +#: ../manufacturing/includes/manufacturing_ui.inc:83 +#: ../reporting/includes/doctext.inc:106 +msgid "From Location" msgstr "" -#: c:\Apache2\htdocs\account228/reporting/rep705.php:240 -#: c:\Apache2\htdocs\account228/reporting/rep705.php:250 -#: c:\Apache2\htdocs\account228/reporting/rep705.php:258 -msgid "Amounts in thousands" +#: ../inventory/view/view_transfer.php:41 +msgid "To Location" msgstr "" -#: c:\Apache2\htdocs\account228/reporting/rep705.php:262 -msgid "Annual Expense Breakdown" +#: ../manufacturing/search_work_orders.php:26 +msgid "Search Outstanding Work Orders" msgstr "" -#: c:\Apache2\htdocs\account228/reporting/rep706.php:174 -msgid "Close Balance" +#: ../manufacturing/search_work_orders.php:31 +msgid "Search Work Orders" msgstr "" -#: c:\Apache2\htdocs\account228/reporting/rep706.php:291 -#: c:\Apache2\htdocs\account228/reporting/rep707.php:310 -msgid "Group" +#: ../manufacturing/search_work_orders.php:69 +msgid "at Location:" msgstr "" -#: c:\Apache2\htdocs\account228/reporting/rep707.php:242 -msgid "Profit and Loss Statement" +#: ../manufacturing/search_work_orders.php:76 +#: ../purchasing/inquiry/po_search_completed.php:72 +msgid "for item:" msgstr "" -#: c:\Apache2\htdocs\account228/reporting/rep709.php:85 -msgid "Tax Report" +#: ../manufacturing/search_work_orders.php:78 +#: ../purchasing/inquiry/po_search_completed.php:74 +#: ../purchasing/inquiry/po_search.php:76 +#: ../sales/inquiry/sales_deliveries_view.php:116 +#: ../sales/inquiry/sales_orders_view.php:244 +msgid "Select documents" msgstr "" -#: c:\Apache2\htdocs\account228/reporting/rep709.php:103 -msgid "Branch Name" +#: ../manufacturing/search_work_orders.php:117 +msgid "Release" msgstr "" -#: c:\Apache2\htdocs\account228/reporting/rep709.php:104 -msgid "Net" +#: ../manufacturing/search_work_orders.php:120 +msgid "Issue" msgstr "" -#: c:\Apache2\htdocs\account228/reporting/rep709.php:104 -msgid "Rate" +#: ../manufacturing/search_work_orders.php:127 +msgid "Produce" msgstr "" -#: c:\Apache2\htdocs\account228/reporting/rep709.php:104 -msgid "Tax" +#: ../manufacturing/search_work_orders.php:140 +msgid "Costs" msgstr "" -#: c:\Apache2\htdocs\account228/reporting/rep709.php:164 -msgid "Tax Rate" +#: ../manufacturing/search_work_orders.php:164 +msgid "Required" msgstr "" -#: c:\Apache2\htdocs\account228/reporting/rep709.php:164 -msgid "Net Tax" +#: ../manufacturing/search_work_orders.php:167 +#: ../manufacturing/includes/manufacturing_ui.inc:277 +#: ../manufacturing/includes/manufacturing_ui.inc:281 +#: ../reporting/includes/doctext.inc:44 +#: ../sales/inquiry/sales_orders_view.php:264 +msgid "Required By" msgstr "" -#: c:\Apache2\htdocs\account228/reporting/rep710.php:75 -msgid "Time" +#: ../manufacturing/search_work_orders.php:176 +msgid "Marked orders are overdue." msgstr "" -#: c:\Apache2\htdocs\account228/reporting/rep710.php:75 -msgid "Trans Date" +#: ../manufacturing/work_order_add_finished.php:29 +msgid "Produce or Unassemble Finished Items From Work Order" msgstr "" -#: c:\Apache2\htdocs\account228/reporting/rep710.php:76 -msgid "Action" +#: ../manufacturing/work_order_add_finished.php:44 +msgid "The manufacturing process has been entered." msgstr "" -#: c:\Apache2\htdocs\account228/reporting/rep710.php:87 -#: c:\Apache2\htdocs\account228/reporting/reports_main.php:365 -msgid "Audit Trail" +#: ../manufacturing/work_order_add_finished.php:46 +#: ../manufacturing/work_order_costs.php:45 +#: ../manufacturing/work_order_entry.php:56 +#: ../manufacturing/work_order_issue.php:38 +#: ../manufacturing/work_order_release.php:72 +msgid "View this Work Order" msgstr "" -#: c:\Apache2\htdocs\account228/reporting/rep710.php:107 -msgid "Changed" +#: ../manufacturing/work_order_add_finished.php:48 +#: ../manufacturing/work_order_costs.php:47 +#: ../manufacturing/work_order_entry.php:65 +#: ../manufacturing/work_order_issue.php:40 +msgid "View the GL Journal Entries for this Work Order" msgstr "" -#: c:\Apache2\htdocs\account228/reporting/reports_main.php:23 -msgid "Reports and Analysis" +#: ../manufacturing/work_order_add_finished.php:50 +#: ../manufacturing/work_order_entry.php:67 +msgid "Print the GL Journal Entries for this Work Order" msgstr "" -#: c:\Apache2\htdocs\account228/reporting/reports_main.php:30 -msgid "Customer &Balances" +#: ../manufacturing/work_order_add_finished.php:52 +#: ../manufacturing/work_order_costs.php:51 +#: ../manufacturing/work_order_issue.php:42 +msgid "Select another &Work Order to Process" msgstr "" -#: c:\Apache2\htdocs\account228/reporting/reports_main.php:34 -#: c:\Apache2\htdocs\account228/reporting/reports_main.php:40 -#: c:\Apache2\htdocs\account228/reporting/reports_main.php:54 -#: c:\Apache2\htdocs\account228/reporting/reports_main.php:78 -#: c:\Apache2\htdocs\account228/reporting/reports_main.php:90 -#: c:\Apache2\htdocs\account228/reporting/reports_main.php:96 -#: c:\Apache2\htdocs\account228/reporting/reports_main.php:103 -#: c:\Apache2\htdocs\account228/reporting/reports_main.php:109 -#: c:\Apache2\htdocs\account228/reporting/reports_main.php:115 -#: c:\Apache2\htdocs\account228/reporting/reports_main.php:123 -#: c:\Apache2\htdocs\account228/reporting/reports_main.php:129 -#: c:\Apache2\htdocs\account228/reporting/reports_main.php:137 -#: c:\Apache2\htdocs\account228/reporting/reports_main.php:147 -#: c:\Apache2\htdocs\account228/reporting/reports_main.php:153 -msgid "Currency Filter" +#: ../manufacturing/work_order_add_finished.php:65 +#: ../manufacturing/work_order_costs.php:64 +#: ../manufacturing/work_order_entry.php:340 +#: ../manufacturing/includes/db/work_order_issues_db.inc:30 +#: ../manufacturing/includes/db/work_order_produce_items_db.inc:27 +msgid "The order number sent is not valid." msgstr "" -#: c:\Apache2\htdocs\account228/reporting/reports_main.php:36 -#: c:\Apache2\htdocs\account228/reporting/reports_main.php:44 -#: c:\Apache2\htdocs\account228/reporting/reports_main.php:52 -#: c:\Apache2\htdocs\account228/reporting/reports_main.php:60 -#: c:\Apache2\htdocs\account228/reporting/reports_main.php:68 -#: c:\Apache2\htdocs\account228/reporting/reports_main.php:74 -#: c:\Apache2\htdocs\account228/reporting/reports_main.php:125 -#: c:\Apache2\htdocs\account228/reporting/reports_main.php:133 -#: c:\Apache2\htdocs\account228/reporting/reports_main.php:139 -#: c:\Apache2\htdocs\account228/reporting/reports_main.php:143 -#: c:\Apache2\htdocs\account228/reporting/reports_main.php:163 -#: c:\Apache2\htdocs\account228/reporting/reports_main.php:168 -#: c:\Apache2\htdocs\account228/reporting/reports_main.php:176 -#: c:\Apache2\htdocs\account228/reporting/reports_main.php:184 -#: c:\Apache2\htdocs\account228/reporting/reports_main.php:189 -#: c:\Apache2\htdocs\account228/reporting/reports_main.php:196 -#: c:\Apache2\htdocs\account228/reporting/reports_main.php:210 -#: c:\Apache2\htdocs\account228/reporting/reports_main.php:221 -#: c:\Apache2\htdocs\account228/reporting/reports_main.php:227 -#: c:\Apache2\htdocs\account228/reporting/reports_main.php:233 -#: c:\Apache2\htdocs\account228/reporting/reports_main.php:247 -#: c:\Apache2\htdocs\account228/reporting/reports_main.php:253 -#: c:\Apache2\htdocs\account228/reporting/reports_main.php:262 -#: c:\Apache2\htdocs\account228/reporting/reports_main.php:272 -#: c:\Apache2\htdocs\account228/reporting/reports_main.php:281 -#: c:\Apache2\htdocs\account228/reporting/reports_main.php:292 -#: c:\Apache2\htdocs\account228/reporting/reports_main.php:297 -#: c:\Apache2\htdocs\account228/reporting/reports_main.php:305 -#: c:\Apache2\htdocs\account228/reporting/reports_main.php:314 -#: c:\Apache2\htdocs\account228/reporting/reports_main.php:322 -#: c:\Apache2\htdocs\account228/reporting/reports_main.php:332 -#: c:\Apache2\htdocs\account228/reporting/reports_main.php:336 -#: c:\Apache2\htdocs\account228/reporting/reports_main.php:343 -#: c:\Apache2\htdocs\account228/reporting/reports_main.php:351 -#: c:\Apache2\htdocs\account228/reporting/reports_main.php:358 -#: c:\Apache2\htdocs\account228/reporting/reports_main.php:371 -msgid "Destination" +#: ../manufacturing/work_order_add_finished.php:91 +msgid "The quantity entered is not a valid number or less then zero." msgstr "" -#: c:\Apache2\htdocs\account228/reporting/reports_main.php:37 -msgid "&Aged Customer Analysis" +#: ../manufacturing/work_order_add_finished.php:110 +msgid "" +"The production date cannot be before the release date of the work order." msgstr "" -#: c:\Apache2\htdocs\account228/reporting/reports_main.php:42 -#: c:\Apache2\htdocs\account228/reporting/reports_main.php:131 -#: c:\Apache2\htdocs\account228/reporting/reports_main.php:260 -#: c:\Apache2\htdocs\account228/reporting/reports_main.php:270 -#: c:\Apache2\htdocs\account228/reporting/reports_main.php:303 -#: c:\Apache2\htdocs\account228/reporting/reports_main.php:312 -#: c:\Apache2\htdocs\account228/reporting/reports_main.php:341 -#: c:\Apache2\htdocs\account228/reporting/reports_main.php:349 -msgid "Graphics" +#: ../manufacturing/work_order_add_finished.php:117 +msgid "" +"The production exceeds the quantity needed. Please change the Work Order." msgstr "" -#: c:\Apache2\htdocs\account228/reporting/reports_main.php:45 -msgid "Customer &Detail Listing" +#: ../manufacturing/work_order_add_finished.php:129 +msgid "" +"The unassembling cannot be processed because there is insufficient stock." msgstr "" -#: c:\Apache2\htdocs\account228/reporting/reports_main.php:49 -msgid "Activity Greater Than" +#: ../manufacturing/work_order_add_finished.php:147 +msgid "" +"The production cannot be processed because a required item would cause a " +"negative inventory balance :" msgstr "" -#: c:\Apache2\htdocs\account228/reporting/reports_main.php:50 -msgid "Activity Less Than" +#: ../manufacturing/work_order_add_finished.php:204 +msgid "Produce Finished Items" msgstr "" -#: c:\Apache2\htdocs\account228/reporting/reports_main.php:53 -msgid "&Price Listing" +#: ../manufacturing/work_order_add_finished.php:204 +msgid "Return Items to Work Order" msgstr "" -#: c:\Apache2\htdocs\account228/reporting/reports_main.php:55 -#: c:\Apache2\htdocs\account228/reporting/reports_main.php:64 -#: c:\Apache2\htdocs\account228/reporting/reports_main.php:159 -#: c:\Apache2\htdocs\account228/reporting/reports_main.php:165 -#: c:\Apache2\htdocs\account228/reporting/reports_main.php:170 -#: c:\Apache2\htdocs\account228/reporting/reports_main.php:180 -msgid "Inventory Category" +#: ../manufacturing/work_order_add_finished.php:214 +#: ../purchasing/allocations/supplier_allocate.php:65 +#: ../sales/allocations/customer_allocate.php:64 +msgid "Process" msgstr "" -#: c:\Apache2\htdocs\account228/reporting/reports_main.php:56 -msgid "Sales Types" +#: ../manufacturing/work_order_add_finished.php:215 +msgid "Process And Close Order" msgstr "" -#: c:\Apache2\htdocs\account228/reporting/reports_main.php:57 -#: c:\Apache2\htdocs\account228/reporting/reports_main.php:172 -msgid "Show Pictures" +#: ../manufacturing/work_order_costs.php:29 +msgid "Work Order Additional Costs" msgstr "" -#: c:\Apache2\htdocs\account228/reporting/reports_main.php:61 -msgid "&Order Status Listing" +#: ../manufacturing/work_order_costs.php:43 +msgid "The additional cost has been entered." msgstr "" -#: c:\Apache2\htdocs\account228/reporting/reports_main.php:65 -msgid "Stock Location" +#: ../manufacturing/work_order_costs.php:49 +msgid "Enter another additional cost." msgstr "" -#: c:\Apache2\htdocs\account228/reporting/reports_main.php:69 -msgid "&Salesman Listing" +#: ../manufacturing/work_order_costs.php:76 +msgid "The amount entered is not a valid number or less then zero." msgstr "" -#: c:\Apache2\htdocs\account228/reporting/reports_main.php:75 -msgid "Print &Invoices/Credit Notes" +#: ../manufacturing/work_order_costs.php:95 +msgid "" +"The additional cost date cannot be before the release date of the work order." msgstr "" -#: c:\Apache2\htdocs\account228/reporting/reports_main.php:77 -#: c:\Apache2\htdocs\account228/reporting/reports_main.php:84 -#: c:\Apache2\htdocs\account228/reporting/reports_main.php:95 -#: c:\Apache2\htdocs\account228/reporting/reports_main.php:102 -#: c:\Apache2\htdocs\account228/reporting/reports_main.php:108 -#: c:\Apache2\htdocs\account228/reporting/reports_main.php:114 -#: c:\Apache2\htdocs\account228/reporting/reports_main.php:146 -#: c:\Apache2\htdocs\account228/reporting/reports_main.php:152 -#: c:\Apache2\htdocs\account228/reporting/reports_main.php:199 -msgid "To" +#: ../manufacturing/work_order_costs.php:151 +msgid "Additional Costs:" msgstr "" -#: c:\Apache2\htdocs\account228/reporting/reports_main.php:79 -#: c:\Apache2\htdocs\account228/reporting/reports_main.php:85 -msgid "email Customers" +#: ../manufacturing/work_order_costs.php:152 +msgid "Debit Account" msgstr "" -#: c:\Apache2\htdocs\account228/reporting/reports_main.php:80 -msgid "Payment Link" +#: ../manufacturing/work_order_costs.php:159 +msgid "Process Additional Cost" msgstr "" -#: c:\Apache2\htdocs\account228/reporting/reports_main.php:82 -msgid "Print &Deliveries" +#: ../manufacturing/work_order_entry.php:29 +msgid "Work Order Entry" msgstr "" -#: c:\Apache2\htdocs\account228/reporting/reports_main.php:86 -msgid "Print as Packing Slip" +#: ../manufacturing/work_order_entry.php:32 +msgid "There are no manufacturable items defined in the system." msgstr "" -#: c:\Apache2\htdocs\account228/reporting/reports_main.php:88 -msgid "Print &Statements" +#: ../manufacturing/work_order_entry.php:54 +msgid "The work order been added." msgstr "" -#: c:\Apache2\htdocs\account228/reporting/reports_main.php:91 -#: c:\Apache2\htdocs\account228/reporting/reports_main.php:97 -#: c:\Apache2\htdocs\account228/reporting/reports_main.php:104 -#: c:\Apache2\htdocs\account228/reporting/reports_main.php:110 -#: c:\Apache2\htdocs\account228/reporting/reports_main.php:148 -#: c:\Apache2\htdocs\account228/reporting/reports_main.php:154 -msgid "Email Customers" +#: ../manufacturing/work_order_entry.php:62 +msgid "Print this Work Order" msgstr "" -#: c:\Apache2\htdocs\account228/reporting/reports_main.php:93 -msgid "&Print Sales Orders" +#: ../manufacturing/work_order_entry.php:64 +msgid "Email this Work Order" msgstr "" -#: c:\Apache2\htdocs\account228/reporting/reports_main.php:98 -msgid "Print as Quote" +#: ../manufacturing/work_order_entry.php:79 +msgid "The work order been updated." msgstr "" -#: c:\Apache2\htdocs\account228/reporting/reports_main.php:100 -#: c:\Apache2\htdocs\account228/reporting/reports_main.php:106 -msgid "&Print Sales Quotations" +#: ../manufacturing/work_order_entry.php:89 +msgid "Work order has been deleted." msgstr "" -#: c:\Apache2\htdocs\account228/reporting/reports_main.php:112 -msgid "Print Receipts" +#: ../manufacturing/work_order_entry.php:99 +msgid "" +"This work order has been closed. There can be no more issues against it." msgstr "" -#: c:\Apache2\htdocs\account228/reporting/reports_main.php:119 -msgid "Supplier &Balances" +#: ../manufacturing/work_order_entry.php:109 +msgid "Enter a new work order" msgstr "" -#: c:\Apache2\htdocs\account228/reporting/reports_main.php:126 -msgid "&Aged Supplier Analyses" +#: ../manufacturing/work_order_entry.php:110 +msgid "Select an existing work order" msgstr "" -#: c:\Apache2\htdocs\account228/reporting/reports_main.php:134 -msgid "&Payment Report" +#: ../manufacturing/work_order_entry.php:146 +msgid "The quantity entered is invalid or less than zero." msgstr "" -#: c:\Apache2\htdocs\account228/reporting/reports_main.php:140 -msgid "Outstanding &GRNs Report" +#: ../manufacturing/work_order_entry.php:168 +msgid "The selected item to manufacture does not have a bom." msgstr "" -#: c:\Apache2\htdocs\account228/reporting/reports_main.php:144 -msgid "Print Purchase &Orders" +#: ../manufacturing/work_order_entry.php:177 +msgid "The labour cost entered is invalid or less than zero." msgstr "" -#: c:\Apache2\htdocs\account228/reporting/reports_main.php:150 -msgid "Print Remittances" +#: ../manufacturing/work_order_entry.php:185 +msgid "The cost entered is invalid or less than zero." msgstr "" -#: c:\Apache2\htdocs\account228/reporting/reports_main.php:158 -msgid "Inventory &Valuation Report" +#: ../manufacturing/work_order_entry.php:208 +msgid "" +"The work order cannot be processed because there is an insufficient quantity " +"for component:" msgstr "" -#: c:\Apache2\htdocs\account228/reporting/reports_main.php:164 -msgid "Inventory &Planning Report" +#: ../manufacturing/work_order_entry.php:222 +msgid "" +"The selected item cannot be unassembled because there is insufficient stock." msgstr "" -#: c:\Apache2\htdocs\account228/reporting/reports_main.php:169 -msgid "Stock &Check Sheets" +#: ../manufacturing/work_order_entry.php:248 +msgid "" +"The quantity cannot be changed to be less than the quantity already " +"manufactured for this order." msgstr "" -#: c:\Apache2\htdocs\account228/reporting/reports_main.php:173 -msgid "Inventory Column" +#: ../manufacturing/work_order_entry.php:297 +msgid "" +"This work order cannot be deleted because it has already been processed." msgstr "" -#: c:\Apache2\htdocs\account228/reporting/reports_main.php:174 -msgid "Show Shortage" +#: ../manufacturing/work_order_entry.php:348 +msgid "This work order is closed and cannot be edited." msgstr "" -#: c:\Apache2\htdocs\account228/reporting/reports_main.php:177 -msgid "Inventory &Sales Report" +#: ../manufacturing/work_order_entry.php:395 +#: ../manufacturing/work_order_entry.php:403 +msgid "Destination Location:" msgstr "" -#: c:\Apache2\htdocs\account228/reporting/reports_main.php:185 -msgid "&GRN Valuation Report" +#: ../manufacturing/work_order_entry.php:414 +msgid "Quantity Required:" msgstr "" -#: c:\Apache2\htdocs\account228/reporting/reports_main.php:191 -#: c:\Apache2\htdocs\account228/reporting/reports_main.php:192 -#: c:\Apache2\htdocs\account228/reporting/reports_main.php:197 -msgid "Manufacturing" +#: ../manufacturing/work_order_entry.php:416 +msgid "Quantity Manufactured:" msgstr "" -#: c:\Apache2\htdocs\account228/reporting/reports_main.php:192 -msgid "&Bill of Material Listing" +#: ../manufacturing/work_order_entry.php:435 +msgid "Credit Labour Account" msgstr "" -#: c:\Apache2\htdocs\account228/reporting/reports_main.php:193 -msgid "From product" +#: ../manufacturing/work_order_entry.php:442 +msgid "Credit Overhead Account" msgstr "" -#: c:\Apache2\htdocs\account228/reporting/reports_main.php:194 -msgid "To product" +#: ../manufacturing/work_order_entry.php:447 +msgid "Released On:" msgstr "" -#: c:\Apache2\htdocs\account228/reporting/reports_main.php:197 -msgid "Print &Work Orders" +#: ../manufacturing/work_order_entry.php:457 +msgid "Save changes to work order" msgstr "" -#: c:\Apache2\htdocs\account228/reporting/reports_main.php:200 -msgid "Email Locations" +#: ../manufacturing/work_order_entry.php:460 +msgid "Close This Work Order" msgstr "" -#: c:\Apache2\htdocs\account228/reporting/reports_main.php:205 -msgid "Dimension &Summary" +#: ../manufacturing/work_order_entry.php:462 +msgid "Delete This Work Order" msgstr "" -#: c:\Apache2\htdocs\account228/reporting/reports_main.php:206 -msgid "From Dimension" +#: ../manufacturing/work_order_entry.php:468 +msgid "Add Workorder" msgstr "" -#: c:\Apache2\htdocs\account228/reporting/reports_main.php:207 -msgid "To Dimension" +#: ../manufacturing/work_order_issue.php:29 +msgid "Issue Items to Work Order" msgstr "" -#: c:\Apache2\htdocs\account228/reporting/reports_main.php:208 -msgid "Show Balance" +#: ../manufacturing/work_order_issue.php:36 +msgid "The work order issue has been entered." msgstr "" -#: c:\Apache2\htdocs\account228/reporting/reports_main.php:215 -#: c:\Apache2\htdocs\account228/reporting/reports_main.php:216 -msgid "Banking" +#: ../manufacturing/work_order_issue.php:79 +msgid "The entered date for the issue is invalid." msgstr "" -#: c:\Apache2\htdocs\account228/reporting/reports_main.php:216 -msgid "Bank &Statement" +#: ../manufacturing/work_order_issue.php:106 +msgid "" +"The issue cannot be processed because an entered item would cause a negative " +"inventory balance :" msgstr "" -#: c:\Apache2\htdocs\account228/reporting/reports_main.php:223 -#: c:\Apache2\htdocs\account228/reporting/reports_main.php:224 -#: c:\Apache2\htdocs\account228/reporting/reports_main.php:228 -#: c:\Apache2\htdocs\account228/reporting/reports_main.php:239 -#: c:\Apache2\htdocs\account228/reporting/reports_main.php:248 -#: c:\Apache2\htdocs\account228/reporting/reports_main.php:254 -#: c:\Apache2\htdocs\account228/reporting/reports_main.php:263 -#: c:\Apache2\htdocs\account228/reporting/reports_main.php:273 -#: c:\Apache2\htdocs\account228/reporting/reports_main.php:285 -#: c:\Apache2\htdocs\account228/reporting/reports_main.php:293 -#: c:\Apache2\htdocs\account228/reporting/reports_main.php:298 -#: c:\Apache2\htdocs\account228/reporting/reports_main.php:306 -#: c:\Apache2\htdocs\account228/reporting/reports_main.php:315 -#: c:\Apache2\htdocs\account228/reporting/reports_main.php:326 -#: c:\Apache2\htdocs\account228/reporting/reports_main.php:333 -#: c:\Apache2\htdocs\account228/reporting/reports_main.php:337 -#: c:\Apache2\htdocs\account228/reporting/reports_main.php:344 -#: c:\Apache2\htdocs\account228/reporting/reports_main.php:352 -#: c:\Apache2\htdocs\account228/reporting/reports_main.php:360 -#: c:\Apache2\htdocs\account228/reporting/reports_main.php:365 -msgid "General Ledger" +#: ../manufacturing/work_order_issue.php:124 +msgid "" +"The process cannot be completed because there is an insufficient total " +"quantity for a component." msgstr "" -#: c:\Apache2\htdocs\account228/reporting/reports_main.php:224 -msgid "Chart of &Accounts" +#: ../manufacturing/work_order_issue.php:125 +msgid "Component is :" msgstr "" -#: c:\Apache2\htdocs\account228/reporting/reports_main.php:225 -msgid "Show Balances" +#: ../manufacturing/work_order_issue.php:126 +msgid "From location :" msgstr "" -#: c:\Apache2\htdocs\account228/reporting/reports_main.php:228 -msgid "List of &Journal Entries" +#: ../manufacturing/work_order_issue.php:219 +msgid "Items to Issue" msgstr "" -#: c:\Apache2\htdocs\account228/reporting/reports_main.php:239 -#: c:\Apache2\htdocs\account228/reporting/reports_main.php:285 -#: c:\Apache2\htdocs\account228/reporting/reports_main.php:326 -msgid "GL Account &Transactions" +#: ../manufacturing/work_order_issue.php:225 +msgid "Process Issue" msgstr "" -#: c:\Apache2\htdocs\account228/reporting/reports_main.php:242 -#: c:\Apache2\htdocs\account228/reporting/reports_main.php:288 -#: c:\Apache2\htdocs\account228/reporting/reports_main.php:329 -msgid "From Account" +#: ../manufacturing/work_order_release.php:27 +msgid "Work Order Release to Manufacturing" msgstr "" -#: c:\Apache2\htdocs\account228/reporting/reports_main.php:243 -#: c:\Apache2\htdocs\account228/reporting/reports_main.php:289 -#: c:\Apache2\htdocs\account228/reporting/reports_main.php:330 -msgid "To Account" +#: ../manufacturing/work_order_release.php:49 +msgid "This work order has already been released." msgstr "" -#: c:\Apache2\htdocs\account228/reporting/reports_main.php:248 -#: c:\Apache2\htdocs\account228/reporting/reports_main.php:293 -#: c:\Apache2\htdocs\account228/reporting/reports_main.php:333 -msgid "Annual &Expense Breakdown" +#: ../manufacturing/work_order_release.php:57 +msgid "" +"This Work Order cannot be released. The selected item to manufacture does " +"not have a bom." msgstr "" -#: c:\Apache2\htdocs\account228/reporting/reports_main.php:254 -#: c:\Apache2\htdocs\account228/reporting/reports_main.php:298 -#: c:\Apache2\htdocs\account228/reporting/reports_main.php:337 -msgid "&Balance Sheet" +#: ../manufacturing/work_order_release.php:70 +msgid "The work order has been released to manufacturing." msgstr "" -#: c:\Apache2\htdocs\account228/reporting/reports_main.php:259 -#: c:\Apache2\htdocs\account228/reporting/reports_main.php:269 -#: c:\Apache2\htdocs\account228/reporting/reports_main.php:302 -#: c:\Apache2\htdocs\account228/reporting/reports_main.php:311 -#: c:\Apache2\htdocs\account228/reporting/reports_main.php:340 -#: c:\Apache2\htdocs\account228/reporting/reports_main.php:348 -msgid "Decimal values" +#: ../manufacturing/work_order_release.php:74 +msgid "Select another &work order" msgstr "" -#: c:\Apache2\htdocs\account228/reporting/reports_main.php:263 -#: c:\Apache2\htdocs\account228/reporting/reports_main.php:306 -#: c:\Apache2\htdocs\account228/reporting/reports_main.php:344 -msgid "&Profit and Loss Statement" +#: ../manufacturing/work_order_release.php:95 +msgid "Work Order #:" msgstr "" -#: c:\Apache2\htdocs\account228/reporting/reports_main.php:266 -#: c:\Apache2\htdocs\account228/reporting/reports_main.php:309 -#: c:\Apache2\htdocs\account228/reporting/reports_main.php:347 -msgid "Compare to" +#: ../manufacturing/work_order_release.php:96 +msgid "Work Order Reference:" msgstr "" -#: c:\Apache2\htdocs\account228/reporting/reports_main.php:276 -#: c:\Apache2\htdocs\account228/reporting/reports_main.php:318 -#: c:\Apache2\htdocs\account228/reporting/reports_main.php:355 -msgid "Zero values" +#: ../manufacturing/work_order_release.php:98 +#: ../manufacturing/includes/manufacturing_ui.inc:278 +msgid "Released Date" msgstr "" -#: c:\Apache2\htdocs\account228/reporting/reports_main.php:360 -msgid "Ta&x Report" +#: ../manufacturing/work_order_release.php:104 +msgid "Release Work Order" msgstr "" -#: c:\Apache2\htdocs\account228/sales/create_recurrent_invoices.php:24 -msgid "Create and Print Recurrent Invoices" +#: ../manufacturing/view/wo_issue_view.php:19 +msgid "View Work Order Issue" msgstr "" -#: c:\Apache2\htdocs\account228/sales/create_recurrent_invoices.php:118 -msgid "Template No" +#: ../manufacturing/view/wo_issue_view.php:43 +msgid "Issue #" msgstr "" -#: c:\Apache2\htdocs\account228/sales/create_recurrent_invoices.php:118 -msgid "Monthly" +#: ../manufacturing/view/wo_issue_view.php:43 +#: ../manufacturing/view/wo_production_view.php:44 +msgid "For Work Order #" msgstr "" -#: c:\Apache2\htdocs\account228/sales/create_recurrent_invoices.php:118 -msgid "Begin" +#: ../manufacturing/view/wo_issue_view.php:44 +msgid "To Work Centre" msgstr "" -#: c:\Apache2\htdocs\account228/sales/create_recurrent_invoices.php:118 -msgid "End" +#: ../manufacturing/view/wo_issue_view.php:44 +msgid "Date of Issue" msgstr "" -#: c:\Apache2\htdocs\account228/sales/create_recurrent_invoices.php:118 -msgid "Last Created" +#: ../manufacturing/view/wo_issue_view.php:61 +msgid "This issue has been voided." msgstr "" -#: c:\Apache2\htdocs\account228/sales/create_recurrent_invoices.php:162 -msgid "Create Invoices" +#: ../manufacturing/view/wo_issue_view.php:72 +msgid "There are no items for this issue." msgstr "" -#: c:\Apache2\htdocs\account228/sales/create_recurrent_invoices.php:169 -msgid "Marked items are due." +#: ../manufacturing/view/wo_issue_view.php:77 +#: ../manufacturing/includes/manufacturing_ui.inc:28 +#: ../manufacturing/includes/manufacturing_ui.inc:83 +#: ../reporting/rep401.php:69 +#: ../reporting/rep401.php:74 +msgid "Component" msgstr "" -#: c:\Apache2\htdocs\account228/sales/create_recurrent_invoices.php:171 -msgid "No recurrent invoices are due." +#: ../manufacturing/view/wo_issue_view.php:114 +msgid "Items for this Issue" msgstr "" -#: c:\Apache2\htdocs\account228/sales/credit_note_entry.php:37 -msgid "Customer Credit Note" +#: ../manufacturing/view/wo_production_view.php:20 +msgid "View Work Order Production" msgstr "" -#: c:\Apache2\htdocs\account228/sales/credit_note_entry.php:40 -#, php-format -msgid "Modifying Customer Credit Note #%d" +#: ../manufacturing/view/wo_production_view.php:44 +msgid "Production #" msgstr "" -#: c:\Apache2\htdocs\account228/sales/credit_note_entry.php:51 -#: c:\Apache2\htdocs\account228/sales/sales_order_entry.php:632 -msgid "There are no customers, or there are no customers with branches. Please define customers and customer branches." +#: ../manufacturing/view/wo_production_view.php:45 +msgid "Quantity Manufactured" msgstr "" -#: c:\Apache2\htdocs\account228/sales/credit_note_entry.php:66 -#, php-format -msgid "Credit Note # %d has been processed" +#: ../manufacturing/view/wo_production_view.php:61 +msgid "This production has been voided." msgstr "" -#: c:\Apache2\htdocs\account228/sales/credit_note_entry.php:68 -msgid "&View this credit note" +#: ../manufacturing/view/work_order_view.php:26 +msgid "View Work Order" msgstr "" -#: c:\Apache2\htdocs\account228/sales/credit_note_entry.php:70 -msgid "&Print This Credit Invoice" +#: ../manufacturing/view/work_order_view.php:51 +msgid "BOM for item:" msgstr "" -#: c:\Apache2\htdocs\account228/sales/credit_note_entry.php:71 -msgid "&Email This Credit Invoice" +#: ../manufacturing/view/work_order_view.php:56 +#: ../reporting/rep409.php:93 +msgid "Work Order Requirements" msgstr "" -#: c:\Apache2\htdocs\account228/sales/credit_note_entry.php:73 -#: c:\Apache2\htdocs\account228/sales/customer_credit_invoice.php:59 -#: c:\Apache2\htdocs\account228/sales/customer_credit_invoice.php:73 -msgid "View the GL &Journal Entries for this Credit Note" +#: ../manufacturing/view/work_order_view.php:61 +msgid "Issues" msgstr "" -#: c:\Apache2\htdocs\account228/sales/credit_note_entry.php:75 -msgid "Enter Another &Credit Note" +#: ../manufacturing/view/work_order_view.php:64 +msgid "Productions" msgstr "" -#: c:\Apache2\htdocs\account228/sales/credit_note_entry.php:153 -msgid "The entered date for the credit note is invalid." +#: ../manufacturing/view/work_order_view.php:67 +#: ../manufacturing/view/work_order_view.php:74 +msgid "Additional Costs" msgstr "" -#: c:\Apache2\htdocs\account228/sales/credit_note_entry.php:170 -msgid "For credit notes created to write off the stock, a general ledger account is required to be selected." +#: ../manufacturing/view/work_order_view.php:82 +msgid "This work order has been voided." msgstr "" -#: c:\Apache2\htdocs\account228/sales/credit_note_entry.php:171 -msgid "Please select an account to write the cost of the stock off to, then click on Process again." +#: ../manufacturing/inquiry/bom_cost_inquiry.php:24 +#: ../manufacturing/manage/bom_edit.php:24 +msgid "There are no manufactured or kit items defined in the system." msgstr "" -#: c:\Apache2\htdocs\account228/sales/credit_note_entry.php:191 -msgid "The quantity must be greater than zero." +#: ../manufacturing/inquiry/bom_cost_inquiry.php:35 +#: ../manufacturing/manage/bom_edit.php:170 +msgid "Select a manufacturable item:" msgstr "" -#: c:\Apache2\htdocs\account228/sales/credit_note_entry.php:196 -msgid "The entered price is negative or invalid." +#: ../manufacturing/inquiry/bom_cost_inquiry.php:38 +msgid "All Costs Are In:" msgstr "" -#: c:\Apache2\htdocs\account228/sales/credit_note_entry.php:201 -msgid "The entered discount percent is negative, greater than 100 or invalid." +#: ../manufacturing/inquiry/where_used_inquiry.php:17 +msgid "Inventory Item Where Used Inquiry" msgstr "" -#: c:\Apache2\htdocs\account228/sales/credit_note_entry.php:269 -msgid "Credit Note Items" +#: ../manufacturing/inquiry/where_used_inquiry.php:28 +msgid "Select an item to display its parent item(s)." msgstr "" -#: c:\Apache2\htdocs\account228/sales/credit_note_entry.php:279 -#: c:\Apache2\htdocs\account228/sales/customer_credit_invoice.php:393 -msgid "Process Credit Note" +#: ../manufacturing/inquiry/where_used_inquiry.php:43 +msgid "Parent Item" msgstr "" -#: c:\Apache2\htdocs\account228/sales/customer_credit_invoice.php:38 -#, php-format -msgid "Modifying Credit Invoice # %d." +#: ../manufacturing/inquiry/where_used_inquiry.php:44 +#: ../manufacturing/manage/bom_edit.php:71 +#: ../manufacturing/includes/manufacturing_ui.inc:28 +#: ../manufacturing/includes/manufacturing_ui.inc:83 +#: ../reporting/includes/doctext.inc:106 +msgid "Work Centre" msgstr "" -#: c:\Apache2\htdocs\account228/sales/customer_credit_invoice.php:42 -msgid "Credit all or part of an Invoice" +#: ../manufacturing/inquiry/where_used_inquiry.php:46 +#: ../manufacturing/includes/manufacturing_ui.inc:277 +#: ../manufacturing/includes/manufacturing_ui.inc:281 +msgid "Quantity Required" msgstr "" -#: c:\Apache2\htdocs\account228/sales/customer_credit_invoice.php:53 -msgid "Credit Note has been processed" +#: ../manufacturing/manage/bom_edit.php:16 +msgid "Bill Of Materials" msgstr "" -#: c:\Apache2\htdocs\account228/sales/customer_credit_invoice.php:55 -#: c:\Apache2\htdocs\account228/sales/customer_credit_invoice.php:69 -msgid "&View This Credit Note" +#: ../manufacturing/manage/bom_edit.php:26 +msgid "" +"There are no work centres defined in the system. BOMs require at least one " +"work centre be defined." msgstr "" -#: c:\Apache2\htdocs\account228/sales/customer_credit_invoice.php:57 -#: c:\Apache2\htdocs\account228/sales/customer_credit_invoice.php:71 -msgid "&Print This Credit Note" +#: ../manufacturing/manage/bom_edit.php:70 +#: ../reporting/rep105.php:112 +msgid "Code" msgstr "" -#: c:\Apache2\htdocs\account228/sales/customer_credit_invoice.php:67 -msgid "Credit Note has been updated" +#: ../manufacturing/manage/bom_edit.php:110 +msgid "Selected component has been updated" msgstr "" -#: c:\Apache2\htdocs\account228/sales/customer_credit_invoice.php:110 -msgid "The entered shipping cost is invalid or less than zero." +#: ../manufacturing/manage/bom_edit.php:130 +msgid "" +"A new component part has been added to the bill of material for this item." msgstr "" -#: c:\Apache2\htdocs\account228/sales/customer_credit_invoice.php:115 -#: c:\Apache2\htdocs\account228/sales/customer_credit_invoice.php:150 -msgid "Selected quantity cannot be less than zero nor more than quantity not credited yet." +#: ../manufacturing/manage/bom_edit.php:136 +msgid "" +"The selected component is already on this bom. You can modify it's quantity " +"but it cannot appear more than once on the same bom." msgstr "" -#: c:\Apache2\htdocs\account228/sales/customer_credit_invoice.php:148 -msgid "This page can only be opened if an invoice has been selected for crediting." +#: ../manufacturing/manage/bom_edit.php:142 +msgid "" +"The selected component is a parent of the current item. Recursive BOMs are " +"not allowed." msgstr "" -#: c:\Apache2\htdocs\account228/sales/customer_credit_invoice.php:260 -msgid "Crediting Invoice" +#: ../manufacturing/manage/bom_edit.php:224 +msgid "Location to Draw From:" msgstr "" -#: c:\Apache2\htdocs\account228/sales/customer_credit_invoice.php:281 -msgid "Credit Note Date" +#: ../manufacturing/manage/bom_edit.php:225 +msgid "Work Centre Added:" msgstr "" -#: c:\Apache2\htdocs\account228/sales/customer_credit_invoice.php:291 -msgid "Invoiced Quantity" +#: ../manufacturing/manage/work_centres.php:16 +msgid "Work Centres" msgstr "" -#: c:\Apache2\htdocs\account228/sales/customer_credit_invoice.php:292 -msgid "Credit Quantity" +#: ../manufacturing/manage/work_centres.php:34 +msgid "The work centre name cannot be empty." msgstr "" -#: c:\Apache2\htdocs\account228/sales/customer_credit_invoice.php:292 -msgid "Discount %" +#: ../manufacturing/manage/work_centres.php:44 +msgid "Selected work center has been updated" msgstr "" -#: c:\Apache2\htdocs\account228/sales/customer_credit_invoice.php:326 -msgid "Credit Shipping Cost" +#: ../manufacturing/manage/work_centres.php:49 +msgid "New work center has been added" msgstr "" -#: c:\Apache2\htdocs\account228/sales/customer_credit_invoice.php:333 -#: c:\Apache2\htdocs\account228/sales/customer_delivery.php:467 -#: c:\Apache2\htdocs\account228/sales/customer_invoice.php:504 -msgid "Sub-total" +#: ../manufacturing/manage/work_centres.php:61 +msgid "" +"Cannot delete this work centre because BOMs have been created referring to " +"it." msgstr "" -#: c:\Apache2\htdocs\account228/sales/customer_credit_invoice.php:341 -msgid "Credit Note Total" +#: ../manufacturing/manage/work_centres.php:67 +msgid "" +"Cannot delete this work centre because work order requirements have been " +"created referring to it." msgstr "" -#: c:\Apache2\htdocs\account228/sales/customer_credit_invoice.php:359 -msgid "Credit Note Type" +#: ../manufacturing/manage/work_centres.php:83 +msgid "Selected work center has been deleted" msgstr "" -#: c:\Apache2\htdocs\account228/sales/customer_credit_invoice.php:367 -msgid "Items Returned to Location" +#: ../manufacturing/manage/work_centres.php:101 +msgid "description" msgstr "" -#: c:\Apache2\htdocs\account228/sales/customer_credit_invoice.php:372 -msgid "Write off the cost of the items to" +#: ../manufacturing/includes/manufacturing_ui.inc:22 +msgid "The bill of material for this item is empty." msgstr "" -#: c:\Apache2\htdocs\account228/sales/customer_credit_invoice.php:391 -msgid "Update credit value for quantities entered" +#: ../manufacturing/includes/manufacturing_ui.inc:29 +#: ../manufacturing/includes/manufacturing_ui.inc:61 +msgid "Total Cost" msgstr "" -#: c:\Apache2\htdocs\account228/sales/customer_delivery.php:37 -#, php-format -msgid "Modifying Delivery Note # %d." +#: ../manufacturing/includes/manufacturing_ui.inc:77 +msgid "There are no Requirements for this Order." msgstr "" -#: c:\Apache2\htdocs\account228/sales/customer_delivery.php:41 -msgid "Deliver Items for a Sales Order" +#: ../manufacturing/includes/manufacturing_ui.inc:84 +#: ../reporting/includes/doctext.inc:106 +msgid "Unit Quantity" msgstr "" -#: c:\Apache2\htdocs\account228/sales/customer_delivery.php:50 -#: c:\Apache2\htdocs\account228/sales/sales_order_entry.php:173 -#, php-format -msgid "Delivery # %d has been entered." +#: ../manufacturing/includes/manufacturing_ui.inc:84 +#: ../reporting/includes/doctext.inc:106 +msgid "Total Quantity" msgstr "" -#: c:\Apache2\htdocs\account228/sales/customer_delivery.php:52 -#: c:\Apache2\htdocs\account228/sales/sales_order_entry.php:175 -msgid "&View This Delivery" +#: ../manufacturing/includes/manufacturing_ui.inc:84 +#: ../reporting/includes/doctext.inc:106 +msgid "Units Issued" msgstr "" -#: c:\Apache2\htdocs\account228/sales/customer_delivery.php:54 -#: c:\Apache2\htdocs\account228/sales/customer_delivery.php:75 -#: c:\Apache2\htdocs\account228/sales/sales_order_entry.php:177 -msgid "&Print Delivery Note" +#: ../manufacturing/includes/manufacturing_ui.inc:84 +msgid "On Hand" msgstr "" -#: c:\Apache2\htdocs\account228/sales/customer_delivery.php:55 -#: c:\Apache2\htdocs\account228/sales/customer_delivery.php:76 -#: c:\Apache2\htdocs\account228/sales/sales_order_entry.php:178 -msgid "&Email Delivery Note" +#: ../manufacturing/includes/manufacturing_ui.inc:138 +msgid "Marked items have insufficient quantities in stock." msgstr "" -#: c:\Apache2\htdocs\account228/sales/customer_delivery.php:56 -#: c:\Apache2\htdocs\account228/sales/customer_delivery.php:77 -#: c:\Apache2\htdocs\account228/sales/sales_order_entry.php:179 -msgid "P&rint as Packing Slip" +#: ../manufacturing/includes/manufacturing_ui.inc:152 +msgid "There are no Productions for this Order." msgstr "" -#: c:\Apache2\htdocs\account228/sales/customer_delivery.php:57 -#: c:\Apache2\htdocs\account228/sales/customer_delivery.php:78 -#: c:\Apache2\htdocs\account228/sales/sales_order_entry.php:180 -msgid "E&mail as Packing Slip" +#: ../manufacturing/includes/manufacturing_ui.inc:195 +msgid "There are no Issues for this Order." msgstr "" -#: c:\Apache2\htdocs\account228/sales/customer_delivery.php:59 -#: c:\Apache2\htdocs\account228/sales/sales_order_entry.php:183 -msgid "View the GL Journal Entries for this Dispatch" +#: ../manufacturing/includes/manufacturing_ui.inc:231 +msgid "There are no additional costs for this Order." msgstr "" -#: c:\Apache2\htdocs\account228/sales/customer_delivery.php:61 -msgid "Invoice This Delivery" +#: ../manufacturing/includes/manufacturing_ui.inc:269 +#: ../manufacturing/includes/manufacturing_ui.inc:325 +msgid "The work order number sent is not valid." msgstr "" -#: c:\Apache2\htdocs\account228/sales/customer_delivery.php:63 -msgid "Select Another Order For Dispatch" +#: ../manufacturing/includes/manufacturing_ui.inc:276 +#: ../manufacturing/includes/manufacturing_ui.inc:280 +#: ../manufacturing/includes/manufacturing_ui.inc:331 +#: ../reporting/includes/doctext.inc:43 +msgid "Manufactured Item" msgstr "" -#: c:\Apache2\htdocs\account228/sales/customer_delivery.php:71 -#, php-format -msgid "Delivery Note # %d has been updated." +#: ../manufacturing/includes/manufacturing_ui.inc:277 +#: ../manufacturing/includes/manufacturing_ui.inc:281 +#: ../manufacturing/includes/manufacturing_ui.inc:332 +#: ../reporting/includes/doctext.inc:46 +msgid "Into Location" msgstr "" -#: c:\Apache2\htdocs\account228/sales/customer_delivery.php:73 -msgid "View this delivery" +#: ../manufacturing/includes/manufacturing_ui.inc:311 +#: ../manufacturing/includes/manufacturing_ui.inc:356 +msgid "This work order is closed." msgstr "" -#: c:\Apache2\htdocs\account228/sales/customer_delivery.php:80 -msgid "Confirm Delivery and Invoice" +#: ../manufacturing/includes/work_order_issue_ui.inc:158 +msgid "Return Items to Location" msgstr "" -#: c:\Apache2\htdocs\account228/sales/customer_delivery.php:82 -msgid "Select A Different Delivery" +#: ../manufacturing/includes/work_order_issue_ui.inc:158 +msgid "Issue Items to Work order" msgstr "" -#: c:\Apache2\htdocs\account228/sales/customer_delivery.php:96 -msgid "Select a different sales order to delivery" +#: ../manufacturing/includes/work_order_issue_ui.inc:161 +msgid "To Work Centre:" msgstr "" -#: c:\Apache2\htdocs\account228/sales/customer_delivery.php:97 -msgid "This order has no items. There is nothing to delivery." +#: ../manufacturing/includes/work_order_issue_ui.inc:163 +msgid "Issue Date:" msgstr "" -#: c:\Apache2\htdocs\account228/sales/customer_delivery.php:115 -msgid "Select a different delivery" +#: ../manufacturing/includes/db/work_order_issues_db.inc:72 +msgid "Issue of" msgstr "" -#: c:\Apache2\htdocs\account228/sales/customer_delivery.php:116 -msgid "This delivery has all items invoiced. There is nothing to modify." +#: ../manufacturing/includes/db/work_order_issues_db.inc:80 +msgid "Issue to" msgstr "" -#: c:\Apache2\htdocs\account228/sales/customer_delivery.php:126 -msgid "This page can only be opened if an order or delivery note has been selected. Please select it first." +#: ../manufacturing/includes/db/work_order_produce_items_db.inc:65 +msgid "Production." msgstr "" -#: c:\Apache2\htdocs\account228/sales/customer_delivery.php:128 -msgid "Select a Sales Order to Delivery" +#: ../manufacturing/includes/db/work_orders_db.inc:179 +#: ../purchasing/includes/db/po_db.inc:115 +#: ../sales/includes/db/cust_trans_db.inc:109 +#: ../sales/includes/db/sales_order_db.inc:247 +msgid "Updated." msgstr "" -#: c:\Apache2\htdocs\account228/sales/customer_delivery.php:137 -msgid "Selected quantity cannot be less than quantity invoiced nor more than quantity\tnot dispatched on sales order." +#: ../manufacturing/includes/db/work_orders_db.inc:200 +msgid "Canceled." msgstr "" -#: c:\Apache2\htdocs\account228/sales/customer_delivery.php:140 -msgid "Freight cost cannot be less than zero" +#: ../manufacturing/includes/db/work_orders_db.inc:276 +msgid "Released." msgstr "" -#: c:\Apache2\htdocs\account228/sales/customer_delivery.php:152 -msgid "The entered date of delivery is invalid." +#: ../manufacturing/includes/db/work_orders_quick_db.inc:89 +msgid "Quick production." msgstr "" -#: c:\Apache2\htdocs\account228/sales/customer_delivery.php:158 -msgid "The entered date of delivery is not in fiscal year." +#: ../manufacturing/includes/db/work_orders_quick_db.inc:188 +msgid "Produced" msgstr "" -#: c:\Apache2\htdocs\account228/sales/customer_delivery.php:164 -msgid "The entered dead-line for invoice is invalid." +#: ../purchasing/includes/ui/grn_ui.inc:23 +#: ../purchasing/includes/ui/po_ui.inc:319 +#: ../sales/view/view_sales_order.php:73 +msgid "Order Currency" msgstr "" -#: c:\Apache2\htdocs\account228/sales/customer_delivery.php:187 -#: c:\Apache2\htdocs\account228/sales/customer_invoice.php:284 -msgid "The entered shipping value is not numeric." +#: ../purchasing/includes/ui/grn_ui.inc:25 +msgid "For Purchase Order" msgstr "" -#: c:\Apache2\htdocs\account228/sales/customer_delivery.php:193 -msgid "There are no item quantities on this delivery note." +#: ../purchasing/includes/ui/grn_ui.inc:28 +#: ../sales/view/view_sales_order.php:66 +msgid "Ordered On" msgstr "" -#: c:\Apache2\htdocs\account228/sales/customer_delivery.php:282 -#: c:\Apache2\htdocs\account228/sales/sales_order_entry.php:471 -msgid "The delivery cannot be processed because there is an insufficient quantity for item:" +#: ../purchasing/includes/ui/grn_ui.inc:40 +#: ../purchasing/includes/ui/grn_ui.inc:54 +#: ../purchasing/includes/ui/po_ui.inc:334 +#: ../purchasing/includes/ui/po_ui.inc:339 +msgid "Deliver Into Location" msgstr "" -#: c:\Apache2\htdocs\account228/sales/customer_delivery.php:343 -msgid "For Sales Order" +#: ../purchasing/includes/ui/grn_ui.inc:46 +msgid "Date Items Received" msgstr "" -#: c:\Apache2\htdocs\account228/sales/customer_delivery.php:352 -msgid "Delivery From" +#: ../purchasing/includes/ui/grn_ui.inc:49 +#: ../purchasing/includes/ui/grn_ui.inc:55 +#: ../purchasing/includes/ui/po_ui.inc:344 +#: ../purchasing/view/view_supp_credit.php:44 +#: ../purchasing/view/view_supp_invoice.php:47 +#: ../purchasing/inquiry/po_search_completed.php:120 +#: ../purchasing/inquiry/po_search.php:134 +#: ../purchasing/inquiry/supplier_inquiry.php:166 +msgid "Supplier's Reference" msgstr "" -#: c:\Apache2\htdocs\account228/sales/customer_delivery.php:381 -msgid "Invoice Dead-line" +#: ../purchasing/includes/ui/grn_ui.inc:62 +#: ../purchasing/includes/ui/po_ui.inc:348 +#: ../sales/view/view_sales_order.php:78 +msgid "Delivery Address" msgstr "" -#: c:\Apache2\htdocs\account228/sales/customer_delivery.php:391 -#: c:\Apache2\htdocs\account228/sales/customer_invoice.php:398 -msgid "The selected customer account is currently on hold. Please contact the credit control personnel to discuss." +#: ../purchasing/includes/ui/grn_ui.inc:65 +#: ../purchasing/includes/ui/po_ui.inc:352 +msgid "Order Comments" msgstr "" -#: c:\Apache2\htdocs\account228/sales/customer_delivery.php:396 -msgid "Delivery Items" +#: ../purchasing/includes/ui/invoice_ui.inc:96 +#: ../purchasing/includes/ui/invoice_ui.inc:99 +msgid "Supplier's Ref.:" msgstr "" -#: c:\Apache2\htdocs\account228/sales/customer_delivery.php:402 -msgid "Max. delivery" +#: ../purchasing/includes/ui/invoice_ui.inc:114 +msgid "Terms:" msgstr "" -#: c:\Apache2\htdocs\account228/sales/customer_delivery.php:402 -#: c:\Apache2\htdocs\account228/sales/customer_invoice.php:408 -msgid "Delivered" +#: ../purchasing/includes/ui/invoice_ui.inc:126 +#: ../purchasing/manage/suppliers.php:92 +#: ../purchasing/manage/suppliers.php:97 +msgid "Supplier's Currency:" msgstr "" -#: c:\Apache2\htdocs\account228/sales/customer_delivery.php:403 -#: c:\Apache2\htdocs\account228/sales/customer_invoice.php:409 -msgid "Discount" +#: ../purchasing/includes/ui/invoice_ui.inc:130 +#: ../purchasing/manage/suppliers.php:99 +#: ../sales/manage/customer_branches.php:246 +msgid "Tax Group:" msgstr "" -#: c:\Apache2\htdocs\account228/sales/customer_delivery.php:459 -#: c:\Apache2\htdocs\account228/sales/customer_invoice.php:493 -msgid "Shipping Cost" +#: ../purchasing/includes/ui/invoice_ui.inc:145 +msgid "Sub-total:" msgstr "" -#: c:\Apache2\htdocs\account228/sales/customer_delivery.php:474 -msgid "Amount Total" +#: ../purchasing/includes/ui/invoice_ui.inc:153 +msgid "Invoice Total:" msgstr "" -#: c:\Apache2\htdocs\account228/sales/customer_delivery.php:479 -msgid "Marked items have insufficient quantities in stock as on day of delivery." +#: ../purchasing/includes/ui/invoice_ui.inc:156 +#: ../sales/customer_credit_invoice.php:341 +#: ../sales/includes/ui/sales_credit_ui.inc:233 +msgid "Credit Note Total" msgstr "" -#: c:\Apache2\htdocs\account228/sales/customer_delivery.php:483 -msgid "Action For Balance" +#: ../purchasing/includes/ui/invoice_ui.inc:187 +msgid "Add GL Line" msgstr "" -#: c:\Apache2\htdocs\account228/sales/customer_delivery.php:490 -#: c:\Apache2\htdocs\account228/sales/customer_invoice.php:522 -msgid "Refresh document page" +#: ../purchasing/includes/ui/invoice_ui.inc:188 +msgid "Reset" msgstr "" -#: c:\Apache2\htdocs\account228/sales/customer_delivery.php:491 -msgid "Process Dispatch" +#: ../purchasing/includes/ui/invoice_ui.inc:189 +#: ../purchasing/po_receive_items.php:323 +msgid "Clear all GL entry fields" msgstr "" -#: c:\Apache2\htdocs\account228/sales/customer_delivery.php:492 -#: c:\Apache2\htdocs\account228/sales/customer_invoice.php:524 -#: c:\Apache2\htdocs\account228/sales/sales_order_entry.php:680 -msgid "Check entered data and save document" +#: ../purchasing/includes/ui/invoice_ui.inc:207 +msgid "GL Items for this Invoice" msgstr "" -#: c:\Apache2\htdocs\account228/sales/customer_invoice.php:37 -#, php-format -msgid "Modifying Sales Invoice # %d." +#: ../purchasing/includes/ui/invoice_ui.inc:209 +msgid "GL Items for this Credit Note" msgstr "" -#: c:\Apache2\htdocs\account228/sales/customer_invoice.php:40 -msgid "Issue an Invoice for Delivery Note" +#: ../purchasing/includes/ui/invoice_ui.inc:219 +msgid "Quick Entry:" msgstr "" -#: c:\Apache2\htdocs\account228/sales/customer_invoice.php:42 -msgid "Issue Batch Invoice for Delivery Notes" +#: ../purchasing/includes/ui/invoice_ui.inc:386 +msgid "Add to Invoice" msgstr "" -#: c:\Apache2\htdocs\account228/sales/customer_invoice.php:55 -msgid "Selected deliveries has been processed" +#: ../purchasing/includes/ui/invoice_ui.inc:388 +msgid "Add to Credit Note" msgstr "" -#: c:\Apache2\htdocs\account228/sales/customer_invoice.php:57 -#: c:\Apache2\htdocs\account228/sales/customer_invoice.php:74 -#: c:\Apache2\htdocs\account228/sales/sales_order_entry.php:202 -msgid "&View This Invoice" +#: ../purchasing/includes/ui/invoice_ui.inc:390 +#: ../sales/customer_invoice.php:497 +msgid "Remove" msgstr "" -#: c:\Apache2\htdocs\account228/sales/customer_invoice.php:59 -#: c:\Apache2\htdocs\account228/sales/customer_invoice.php:76 -msgid "&Print This Invoice" +#: ../purchasing/includes/ui/invoice_ui.inc:390 +#: ../purchasing/includes/ui/invoice_ui.inc:425 +msgid "" +"WARNING! Be careful with removal. The operation is executed immediately and " +"cannot be undone !!!" msgstr "" -#: c:\Apache2\htdocs\account228/sales/customer_invoice.php:60 -msgid "&Email This Invoice" +#: ../purchasing/includes/ui/invoice_ui.inc:392 +#, php-format +msgid "" +"You are about to remove all yet non-invoiced items from delivery line #%d. " +"This operation also irreversibly changes related order line. Do you want to " +"continue ?" msgstr "" -#: c:\Apache2\htdocs\account228/sales/customer_invoice.php:62 -#: c:\Apache2\htdocs\account228/sales/sales_order_entry.php:215 -msgid "View the GL &Journal Entries for this Invoice" +#: ../purchasing/includes/ui/invoice_ui.inc:423 +msgid "Items Received Yet to be Invoiced" msgstr "" -#: c:\Apache2\htdocs\account228/sales/customer_invoice.php:64 -msgid "Select Another &Delivery For Invoicing" +#: ../purchasing/includes/ui/invoice_ui.inc:428 +msgid "Delivery Item Selected For Adding To A Supplier Credit Note" msgstr "" -#: c:\Apache2\htdocs\account228/sales/customer_invoice.php:72 -#, php-format -msgid "Sales Invoice # %d has been updated." +#: ../purchasing/includes/ui/invoice_ui.inc:433 +msgid "Received Items Charged on this Invoice" msgstr "" -#: c:\Apache2\htdocs\account228/sales/customer_invoice.php:78 -msgid "Select A Different &Invoice to Modify" +#: ../purchasing/includes/ui/invoice_ui.inc:435 +msgid "Received Items Credited on this Note" msgstr "" -#: c:\Apache2\htdocs\account228/sales/customer_invoice.php:116 -msgid "Select a different delivery to invoice" +#: ../purchasing/includes/ui/invoice_ui.inc:445 +msgid "Received between" msgstr "" -#: c:\Apache2\htdocs\account228/sales/customer_invoice.php:117 -msgid "There are no delivered items with a quantity left to invoice. There is nothing left to invoice." +#: ../purchasing/includes/ui/invoice_ui.inc:456 +msgid "Add All Items" msgstr "" -#: c:\Apache2\htdocs\account228/sales/customer_invoice.php:132 -msgid "" -"There are no delivery notes for this invoice.
\n" -"\t\tMost likely this invoice was created in Front Accounting version prior to 2.0\n" -"\t\tand therefore can not be modified." +#: ../purchasing/includes/ui/invoice_ui.inc:465 +#: ../purchasing/includes/ui/invoice_ui.inc:477 +#: ../sales/inquiry/sales_orders_view.php:150 +msgid "Delivery" msgstr "" -#: c:\Apache2\htdocs\account228/sales/customer_invoice.php:141 -msgid "All quantities on this invoice has been credited. There is nothing to modify on this invoice" +#: ../purchasing/includes/ui/invoice_ui.inc:465 +msgid "Sequence #" msgstr "" -#: c:\Apache2\htdocs\account228/sales/customer_invoice.php:147 -msgid "This page can only be opened after delivery selection. Please select delivery to invoicing first." +#: ../purchasing/includes/ui/invoice_ui.inc:465 +msgid "P.O." msgstr "" -#: c:\Apache2\htdocs\account228/sales/customer_invoice.php:149 -msgid "Select Delivery to Invoice" +#: ../purchasing/includes/ui/invoice_ui.inc:466 +msgid "Received On" msgstr "" -#: c:\Apache2\htdocs\account228/sales/customer_invoice.php:154 -#: c:\Apache2\htdocs\account228/sales/customer_invoice.php:295 -msgid "Selected quantity cannot be less than quantity credited nor more than quantity not invoiced yet." +#: ../purchasing/includes/ui/invoice_ui.inc:466 +#: ../purchasing/view/view_po.php:46 +msgid "Quantity Received" msgstr "" -#: c:\Apache2\htdocs\account228/sales/customer_invoice.php:248 -msgid "The entered invoice date is invalid." +#: ../purchasing/includes/ui/invoice_ui.inc:466 +#: ../purchasing/view/view_grn.php:41 +#: ../purchasing/view/view_po.php:46 +msgid "Quantity Invoiced" msgstr "" -#: c:\Apache2\htdocs\account228/sales/customer_invoice.php:254 -msgid "The entered invoice date is not in fiscal year." +#: ../purchasing/includes/ui/invoice_ui.inc:467 +msgid "Qty Yet To Invoice" msgstr "" -#: c:\Apache2\htdocs\account228/sales/customer_invoice.php:260 -msgid "The entered invoice due date is invalid." +#: ../purchasing/includes/ui/invoice_ui.inc:467 +#: ../purchasing/includes/ui/po_ui.inc:238 +#: ../sales/includes/ui/sales_order_ui.inc:143 +msgid "Price after Tax" msgstr "" -#: c:\Apache2\htdocs\account228/sales/customer_invoice.php:290 -msgid "There are no item quantities on this invoice." +#: ../purchasing/includes/ui/invoice_ui.inc:467 +#: ../purchasing/includes/ui/po_ui.inc:238 +#: ../sales/includes/ui/sales_order_ui.inc:143 +msgid "Price before Tax" msgstr "" -#: c:\Apache2\htdocs\account228/sales/customer_invoice.php:362 -msgid "Delivery Notes:" +#: ../purchasing/includes/ui/invoice_ui.inc:473 +msgid "Qty Yet To Credit" msgstr "" -#: c:\Apache2\htdocs\account228/sales/customer_invoice.php:404 -msgid "Invoice Items" +#: ../purchasing/includes/ui/invoice_ui.inc:478 +msgid "Line Value" msgstr "" -#: c:\Apache2\htdocs\account228/sales/customer_invoice.php:409 -msgid "This Invoice" +#: ../purchasing/includes/ui/invoice_ui.inc:545 +msgid "" +"There are no outstanding items received from this supplier that have not " +"been invoiced by them." msgstr "" -#: c:\Apache2\htdocs\account228/sales/customer_invoice.php:412 -msgid "DN" +#: ../purchasing/includes/ui/invoice_ui.inc:548 +msgid "" +"There are no received items for the selected supplier that have been " +"invoiced." msgstr "" -#: c:\Apache2\htdocs\account228/sales/customer_invoice.php:417 -msgid "Credited" +#: ../purchasing/includes/ui/invoice_ui.inc:549 +msgid "Credits can only be applied to invoiced items." msgstr "" -#: c:\Apache2\htdocs\account228/sales/customer_invoice.php:463 -msgid "Remove" +#: ../purchasing/includes/ui/po_ui.inc:149 +msgid "Supplier Currency:" msgstr "" -#: c:\Apache2\htdocs\account228/sales/customer_invoice.php:511 -msgid "Invoice Total" +#: ../purchasing/includes/ui/po_ui.inc:178 +#: ../sales/sales_order_entry.php:661 +msgid "Order Date:" msgstr "" -#: c:\Apache2\htdocs\account228/sales/customer_invoice.php:523 -msgid "Process Invoice" +#: ../purchasing/includes/ui/po_ui.inc:179 +#: ../sales/sales_order_entry.php:648 +msgid "Delivery Date:" msgstr "" -#: c:\Apache2\htdocs\account228/sales/customer_payments.php:33 -msgid "Customer Payment Entry" +#: ../purchasing/includes/ui/po_ui.inc:179 +#: ../sales/sales_order_entry.php:642 +msgid "Invoice Date:" msgstr "" -#: c:\Apache2\htdocs\account228/sales/customer_payments.php:37 -msgid "There are no customers defined in the system." +#: ../purchasing/includes/ui/po_ui.inc:190 +msgid "Due Date:" msgstr "" -#: c:\Apache2\htdocs\account228/sales/customer_payments.php:62 -msgid "The customer payment has been successfully entered." +#: ../purchasing/includes/ui/po_ui.inc:192 +msgid "Supplier's Reference:" msgstr "" -#: c:\Apache2\htdocs\account228/sales/customer_payments.php:64 -msgid "&Print This Receipt" +#: ../purchasing/includes/ui/po_ui.inc:193 +msgid "Receive Into:" msgstr "" -#: c:\Apache2\htdocs\account228/sales/customer_payments.php:66 -msgid "&View the GL Journal Entries for this Customer Payment" +#: ../purchasing/includes/ui/po_ui.inc:218 +msgid "" +"The default stock location set up for this user is not a currently defined " +"stock location. Your system administrator needs to amend your user record." msgstr "" -#: c:\Apache2\htdocs\account228/sales/customer_payments.php:70 -msgid "Enter Another &Customer Payment" +#: ../purchasing/includes/ui/po_ui.inc:222 +msgid "Deliver to:" msgstr "" -#: c:\Apache2\htdocs\account228/sales/customer_payments.php:83 -#: c:\Apache2\htdocs\account228/sales/sales_order_entry.php:318 -msgid "There is no customer selected." +#: ../purchasing/includes/ui/po_ui.inc:231 +msgid "Order Items" msgstr "" -#: c:\Apache2\htdocs\account228/sales/customer_payments.php:90 -#: c:\Apache2\htdocs\account228/sales/sales_order_entry.php:325 -msgid "This customer has no branch defined." +#: ../purchasing/includes/ui/po_ui.inc:237 +#: ../purchasing/po_receive_items.php:58 +msgid "Received" msgstr "" -#: c:\Apache2\htdocs\account228/sales/customer_payments.php:96 -msgid "The entered date is invalid. Please enter a valid date for the payment." +#: ../purchasing/includes/ui/po_ui.inc:238 +#: ../sales/includes/ui/sales_order_ui.inc:611 +msgid "Required Delivery Date" msgstr "" -#: c:\Apache2\htdocs\account228/sales/customer_payments.php:118 -#: c:\Apache2\htdocs\account228/sales/customer_payments.php:124 -msgid "The entered amount is invalid or negative and cannot be processed." +#: ../purchasing/includes/ui/po_ui.inc:238 +#: ../purchasing/view/view_grn.php:41 +#: ../purchasing/view/view_po.php:46 +msgid "Line Total" msgstr "" -#: c:\Apache2\htdocs\account228/sales/customer_payments.php:150 -msgid "The entered discount is not a valid number." +#: ../purchasing/includes/ui/po_ui.inc:289 +#: ../purchasing/po_receive_items.php:110 +#: ../reporting/includes/doctext.inc:147 +#: ../sales/customer_credit_invoice.php:333 +#: ../sales/customer_delivery.php:499 +#: ../sales/customer_invoice.php:538 +#: ../sales/view/view_dispatch.php:146 +#: ../sales/view/view_invoice.php:148 +#: ../sales/includes/ui/sales_credit_ui.inc:217 +#: ../sales/includes/ui/sales_order_ui.inc:230 +msgid "Sub-total" msgstr "" -#: c:\Apache2\htdocs\account228/sales/customer_payments.php:157 -msgid "The balance of the amount and discout is zero or negative. Please enter valid amounts." +#: ../purchasing/includes/ui/po_ui.inc:298 +#: ../purchasing/po_receive_items.php:118 +#: ../purchasing/view/view_grn.php:79 +#: ../purchasing/view/view_po.php:93 +#: ../sales/customer_delivery.php:506 +#: ../sales/view/view_sales_order.php:243 +#: ../sales/includes/ui/sales_order_ui.inc:237 +msgid "Amount Total" msgstr "" -#: c:\Apache2\htdocs\account228/sales/customer_payments.php:242 -msgid "From Customer:" +#: ../purchasing/includes/ui/po_ui.inc:299 +#: ../purchasing/allocations/supplier_allocate.php:64 +#: ../sales/allocations/customer_allocate.php:63 +#: ../sales/includes/ui/sales_order_ui.inc:238 +msgid "Refresh" msgstr "" -#: c:\Apache2\htdocs\account228/sales/customer_payments.php:247 -msgid "Branch:" +#: ../purchasing/po_entry_items.php:38 +msgid "Modify Purchase Order #" msgstr "" -#: c:\Apache2\htdocs\account228/sales/customer_payments.php:257 -msgid "This customer account is on hold." +#: ../purchasing/po_entry_items.php:43 +msgid "Purchase Order Entry" msgstr "" -#: c:\Apache2\htdocs\account228/sales/customer_payments.php:263 -msgid "Into Bank Account:" +#: ../purchasing/po_entry_items.php:48 +msgid "Direct GRN Entry" msgstr "" -#: c:\Apache2\htdocs\account228/sales/customer_payments.php:270 -msgid "Date of Deposit:" +#: ../purchasing/po_entry_items.php:53 +msgid "Direct Purchase Invoice Entry" msgstr "" -#: c:\Apache2\htdocs\account228/sales/customer_payments.php:294 -msgid "Customer prompt payment discount :" +#: ../purchasing/po_entry_items.php:74 +msgid "Purchase Order has been entered" msgstr "" -#: c:\Apache2\htdocs\account228/sales/customer_payments.php:303 -msgid "Amount and discount are in customer's currency." +#: ../purchasing/po_entry_items.php:76 +msgid "Purchase Order has been updated" msgstr "" -#: c:\Apache2\htdocs\account228/sales/customer_payments.php:307 -msgid "Add Payment" +#: ../purchasing/po_entry_items.php:77 +msgid "&View this order" msgstr "" -#: c:\Apache2\htdocs\account228/sales/sales_order_entry.php:56 -msgid "Direct Sales Delivery" +#: ../purchasing/po_entry_items.php:79 +#: ../sales/sales_order_entry.php:105 +#: ../sales/sales_order_entry.php:125 +msgid "&Print This Order" msgstr "" -#: c:\Apache2\htdocs\account228/sales/sales_order_entry.php:61 -msgid "Direct Sales Invoice" +#: ../purchasing/po_entry_items.php:81 +#: ../sales/sales_order_entry.php:106 +#: ../sales/sales_order_entry.php:126 +msgid "&Email This Order" msgstr "" -#: c:\Apache2\htdocs\account228/sales/sales_order_entry.php:67 -#, php-format -msgid "Modifying Sales Order # %d" +#: ../purchasing/po_entry_items.php:83 +msgid "&Receive Items on this Purchase Order" msgstr "" -#: c:\Apache2\htdocs\account228/sales/sales_order_entry.php:73 -#, php-format -msgid "Modifying Sales Quotation # %d" +#: ../purchasing/po_entry_items.php:85 +msgid "Enter &Another Purchase Order" msgstr "" -#: c:\Apache2\htdocs\account228/sales/sales_order_entry.php:78 -msgid "New Sales Order Entry" +#: ../purchasing/po_entry_items.php:87 +msgid "Select An &Outstanding Purchase Order" msgstr "" -#: c:\Apache2\htdocs\account228/sales/sales_order_entry.php:82 -msgid "New Sales Quotation Entry" +#: ../purchasing/po_entry_items.php:96 +msgid "Direct GRN has been entered" msgstr "" -#: c:\Apache2\htdocs\account228/sales/sales_order_entry.php:85 -msgid "Sales Order Entry" +#: ../purchasing/po_entry_items.php:98 +msgid "&View this GRN" msgstr "" -#: c:\Apache2\htdocs\account228/sales/sales_order_entry.php:101 -#, php-format -msgid "Order # %d has been entered." +#: ../purchasing/po_entry_items.php:104 +#: ../purchasing/po_receive_items.php:38 +msgid "Entry purchase &invoice for this receival" msgstr "" -#: c:\Apache2\htdocs\account228/sales/sales_order_entry.php:103 -#: c:\Apache2\htdocs\account228/sales/sales_order_entry.php:121 -msgid "&View This Order" +#: ../purchasing/po_entry_items.php:106 +#: ../purchasing/po_entry_items.php:130 +#: ../purchasing/supplier_credit.php:49 +#: ../purchasing/supplier_invoice.php:52 +msgid "Add an Attachment" msgstr "" -#: c:\Apache2\htdocs\account228/sales/sales_order_entry.php:109 -msgid "Make &Delivery Against This Order" +#: ../purchasing/po_entry_items.php:109 +msgid "Enter &Another GRN" msgstr "" -#: c:\Apache2\htdocs\account228/sales/sales_order_entry.php:112 -msgid "Enter a &New Order" +#: ../purchasing/po_entry_items.php:118 +msgid "Direct Purchase Invoice has been entered" msgstr "" -#: c:\Apache2\htdocs\account228/sales/sales_order_entry.php:119 -#, php-format -msgid "Order # %d has been updated." +#: ../purchasing/po_entry_items.php:120 +msgid "&View this Invoice" msgstr "" -#: c:\Apache2\htdocs\account228/sales/sales_order_entry.php:127 -msgid "Confirm Order Quantities and Make &Delivery" +#: ../purchasing/po_entry_items.php:125 +#: ../purchasing/supplier_invoice.php:46 +msgid "View the GL Journal Entries for this Invoice" msgstr "" -#: c:\Apache2\htdocs\account228/sales/sales_order_entry.php:130 -msgid "Select A Different &Order" +#: ../purchasing/po_entry_items.php:127 +#: ../purchasing/supplier_invoice.php:48 +msgid "Entry supplier &payment for this invoice" msgstr "" -#: c:\Apache2\htdocs\account228/sales/sales_order_entry.php:137 -#, php-format -msgid "Quotation # %d has been entered." +#: ../purchasing/po_entry_items.php:133 +msgid "Enter &Another Direct Invoice" msgstr "" -#: c:\Apache2\htdocs\account228/sales/sales_order_entry.php:139 -#: c:\Apache2\htdocs\account228/sales/sales_order_entry.php:157 -msgid "&View This Quotation" +#: ../purchasing/po_entry_items.php:165 +msgid "" +"This item cannot be deleted because some of it has already been received." msgstr "" -#: c:\Apache2\htdocs\account228/sales/sales_order_entry.php:141 -#: c:\Apache2\htdocs\account228/sales/sales_order_entry.php:159 -msgid "&Print This Quotation" +#: ../purchasing/po_entry_items.php:180 +msgid "" +"This order cannot be cancelled because some of it has already been received." msgstr "" -#: c:\Apache2\htdocs\account228/sales/sales_order_entry.php:142 -#: c:\Apache2\htdocs\account228/sales/sales_order_entry.php:160 -msgid "&Email This Quotation" +#: ../purchasing/po_entry_items.php:181 +msgid "" +"The line item quantities may be modified to quantities more than already " +"received. prices cannot be altered for lines that have already been received " +"and quantities cannot be reduced below the quantity already received." msgstr "" -#: c:\Apache2\htdocs\account228/sales/sales_order_entry.php:145 -#: c:\Apache2\htdocs\account228/sales/sales_order_entry.php:163 -msgid "Make &Sales Order Against This Quotation" +#: ../purchasing/po_entry_items.php:196 +msgid "This purchase order has been cancelled." msgstr "" -#: c:\Apache2\htdocs\account228/sales/sales_order_entry.php:148 -msgid "Enter a New &Quotation" +#: ../purchasing/po_entry_items.php:198 +msgid "Enter a new purchase order" msgstr "" -#: c:\Apache2\htdocs\account228/sales/sales_order_entry.php:155 -#, php-format -msgid "Quotation # %d has been updated." +#: ../purchasing/po_entry_items.php:210 +#: ../sales/sales_order_entry.php:454 +msgid "Item description cannot be empty." msgstr "" -#: c:\Apache2\htdocs\account228/sales/sales_order_entry.php:166 -msgid "Select A Different &Quotation" +#: ../purchasing/po_entry_items.php:220 +msgid "The quantity of the order item must be numeric and not less than " msgstr "" -#: c:\Apache2\htdocs\account228/sales/sales_order_entry.php:185 -msgid "Make &Invoice Against This Delivery" +#: ../purchasing/po_entry_items.php:227 +msgid "The price entered must be numeric and not less than zero." msgstr "" -#: c:\Apache2\htdocs\account228/sales/sales_order_entry.php:189 -msgid "Enter a New Template &Delivery" +#: ../purchasing/po_entry_items.php:251 +msgid "" +"You are attempting to make the quantity ordered a quantity less than has " +"already been invoiced or received. This is prohibited." msgstr "" -#: c:\Apache2\htdocs\account228/sales/sales_order_entry.php:192 -msgid "Enter a &New Delivery" +#: ../purchasing/po_entry_items.php:252 +msgid "" +"The quantity received can only be modified by entering a negative receipt " +"and the quantity invoiced can only be reduced by entering a credit note " +"against this item." msgstr "" -#: c:\Apache2\htdocs\account228/sales/sales_order_entry.php:200 -#, php-format -msgid "Invoice # %d has been entered." +#: ../purchasing/po_entry_items.php:280 +msgid "The selected item is already on this order." msgstr "" -#: c:\Apache2\htdocs\account228/sales/sales_order_entry.php:204 -msgid "&Print Sales Invoice" +#: ../purchasing/po_entry_items.php:307 +msgid "" +"The selected item does not exist or it is a kit part and therefore cannot be " +"purchased." msgstr "" -#: c:\Apache2\htdocs\account228/sales/sales_order_entry.php:205 -msgid "&Email Sales Invoice" +#: ../purchasing/po_entry_items.php:323 +#: ../purchasing/supplier_invoice.php:352 +#: ../purchasing/supplier_payment.php:118 +msgid "There is no supplier selected." msgstr "" -#: c:\Apache2\htdocs\account228/sales/sales_order_entry.php:213 -msgid "Print &Receipt" +#: ../purchasing/po_entry_items.php:330 +msgid "The entered order date is invalid." msgstr "" -#: c:\Apache2\htdocs\account228/sales/sales_order_entry.php:218 -msgid "Enter a &New Template Invoice" +#: ../purchasing/po_entry_items.php:337 +msgid "The entered due date is invalid." msgstr "" -#: c:\Apache2\htdocs\account228/sales/sales_order_entry.php:221 -msgid "Enter a &New Direct Invoice" +#: ../purchasing/po_entry_items.php:346 +msgid "There is no reference entered for this purchase order." msgstr "" -#: c:\Apache2\htdocs\account228/sales/sales_order_entry.php:336 -msgid "The entered date is not in fiscal year" +#: ../purchasing/po_entry_items.php:361 +#: ../purchasing/supplier_invoice.php:161 +msgid "You must enter a supplier's invoice reference." msgstr "" -#: c:\Apache2\htdocs\account228/sales/sales_order_entry.php:347 -msgid "You must enter the person or company to whom delivery should be made to." +#: ../purchasing/po_entry_items.php:367 +msgid "There is no delivery address specified." msgstr "" -#: c:\Apache2\htdocs\account228/sales/sales_order_entry.php:354 -msgid "You should enter the street address in the box provided. Orders cannot be accepted without a valid street address." +#: ../purchasing/po_entry_items.php:373 +msgid "There is no location specified to move any items into." msgstr "" -#: c:\Apache2\htdocs\account228/sales/sales_order_entry.php:363 -msgid "The shipping cost entered is expected to be numeric." +#: ../purchasing/po_entry_items.php:380 +msgid "" +"The order cannot be placed because there are no lines entered on this order." msgstr "" -#: c:\Apache2\htdocs\account228/sales/sales_order_entry.php:369 -msgid "The Valid date is invalid." +#: ../purchasing/po_entry_items.php:506 +#: ../sales/sales_order_entry.php:665 +msgid "Place Order" msgstr "" -#: c:\Apache2\htdocs\account228/sales/sales_order_entry.php:371 -msgid "The delivery date is invalid." +#: ../purchasing/po_entry_items.php:507 +msgid "Update Order" msgstr "" -#: c:\Apache2\htdocs\account228/sales/sales_order_entry.php:378 -msgid "The requested valid date is before the date of the quotation." +#: ../purchasing/po_entry_items.php:508 +#: ../sales/sales_order_entry.php:664 +msgid "Cancel Order" msgstr "" -#: c:\Apache2\htdocs\account228/sales/sales_order_entry.php:380 -msgid "The requested delivery date is before the date of the order." +#: ../purchasing/po_entry_items.php:510 +msgid "Process GRN" msgstr "" -#: c:\Apache2\htdocs\account228/sales/sales_order_entry.php:389 -msgid "You need to define a cash account for your Sales Point." +#: ../purchasing/po_entry_items.php:511 +msgid "Update GRN" msgstr "" -#: c:\Apache2\htdocs\account228/sales/sales_order_entry.php:450 -msgid "The item could not be updated because you are attempting to set the quantity ordered to less than 0, or the discount percent to more than 100." +#: ../purchasing/po_entry_items.php:512 +msgid "Cancel GRN" msgstr "" -#: c:\Apache2\htdocs\account228/sales/sales_order_entry.php:454 -msgid "Price for item must be entered and can not be less than 0" +#: ../purchasing/po_entry_items.php:515 +#: ../sales/customer_invoice.php:557 +msgid "Process Invoice" msgstr "" -#: c:\Apache2\htdocs\account228/sales/sales_order_entry.php:461 -msgid "You attempting to make the quantity ordered a quantity less than has already been delivered. The quantity delivered cannot be modified retrospectively." +#: ../purchasing/po_entry_items.php:516 +msgid "Update Invoice" msgstr "" -#: c:\Apache2\htdocs\account228/sales/sales_order_entry.php:500 -msgid "This item cannot be deleted because some of it has already been delivered." +#: ../purchasing/po_entry_items.php:517 +#: ../sales/sales_order_entry.php:645 +msgid "Cancel Invoice" msgstr "" -#: c:\Apache2\htdocs\account228/sales/sales_order_entry.php:527 -msgid "Direct delivery entry has been cancelled as requested." +#: ../purchasing/po_receive_items.php:25 +msgid "Receive Purchase Order Items" msgstr "" -#: c:\Apache2\htdocs\account228/sales/sales_order_entry.php:528 -msgid "Enter a New Sales Delivery" +#: ../purchasing/po_receive_items.php:34 +msgid "Purchase Order Delivery has been processed" msgstr "" -#: c:\Apache2\htdocs\account228/sales/sales_order_entry.php:531 -msgid "Direct invoice entry has been cancelled as requested." +#: ../purchasing/po_receive_items.php:36 +msgid "&View this Delivery" msgstr "" -#: c:\Apache2\htdocs\account228/sales/sales_order_entry.php:532 -msgid "Enter a New Sales Invoice" +#: ../purchasing/po_receive_items.php:40 +msgid "Select a different &purchase order for receiving items against" msgstr "" -#: c:\Apache2\htdocs\account228/sales/sales_order_entry.php:537 -msgid "This order cannot be cancelled because some of it has already been invoiced or dispatched. However, the line item quantities may be modified." +#: ../purchasing/po_receive_items.php:49 +msgid "" +"This page can only be opened if a purchase order has been selected. Please " +"select a purchase order first." msgstr "" -#: c:\Apache2\htdocs\account228/sales/sales_order_entry.php:542 -msgid "This sales quotation has been cancelled as requested." +#: ../purchasing/po_receive_items.php:58 +#: ../reporting/rep105.php:112 +#: ../sales/customer_delivery.php:430 +msgid "Ordered" msgstr "" -#: c:\Apache2\htdocs\account228/sales/sales_order_entry.php:543 -msgid "Enter a New Sales Quotation" +#: ../purchasing/po_receive_items.php:59 +#: ../reporting/rep101.php:131 +#: ../reporting/rep105.php:113 +#: ../reporting/rep105.php:167 +#: ../reporting/rep201.php:119 +#: ../reporting/includes/doctext.inc:117 +msgid "Outstanding" msgstr "" -#: c:\Apache2\htdocs\account228/sales/sales_order_entry.php:547 -msgid "This sales order has been cancelled as requested." +#: ../purchasing/po_receive_items.php:59 +#: ../sales/customer_delivery.php:431 +msgid "This Delivery" msgstr "" -#: c:\Apache2\htdocs\account228/sales/sales_order_entry.php:548 -msgid "Enter a New Sales Order" +#: ../purchasing/po_receive_items.php:164 +#: ../purchasing/po_receive_items.php:213 +msgid "" +"There is nothing to process. Please enter valid quantities greater than zero." msgstr "" -#: c:\Apache2\htdocs\account228/sales/sales_order_entry.php:578 -msgid "Sales Quotation" +#: ../purchasing/po_receive_items.php:218 +msgid "" +"Entered quantities cannot be greater than the quantity entered on the " +"purchase order including the allowed over-receive percentage" msgstr "" -#: c:\Apache2\htdocs\account228/sales/sales_order_entry.php:635 -msgid "Invoice Date:" +#: ../purchasing/po_receive_items.php:220 +msgid "" +"Modify the ordered items on the purchase order if you wish to increase the " +"quantities." msgstr "" -#: c:\Apache2\htdocs\account228/sales/sales_order_entry.php:636 -msgid "Sales Invoice Items" +#: ../purchasing/po_receive_items.php:238 +msgid "" +"This order has been changed or invoiced since this delivery was started to " +"be actioned. Processing halted. To enter a delivery against this purchase " +"order, it must be re-selected and re-read again to update the changes made " +"by the other user." msgstr "" -#: c:\Apache2\htdocs\account228/sales/sales_order_entry.php:637 -msgid "Enter Delivery Details and Confirm Invoice" +#: ../purchasing/po_receive_items.php:241 +msgid "Select a different purchase order for receiving goods against" msgstr "" -#: c:\Apache2\htdocs\account228/sales/sales_order_entry.php:638 -msgid "Cancel Invoice" +#: ../purchasing/po_receive_items.php:244 +msgid "Re-Read the updated purchase order for receiving goods against" msgstr "" -#: c:\Apache2\htdocs\account228/sales/sales_order_entry.php:639 -msgid "Place Invoice" +#: ../purchasing/po_receive_items.php:318 +msgid "Items to Receive" msgstr "" -#: c:\Apache2\htdocs\account228/sales/sales_order_entry.php:641 -msgid "Delivery Date:" +#: ../purchasing/po_receive_items.php:323 +msgid "Process Receive Items" msgstr "" -#: c:\Apache2\htdocs\account228/sales/sales_order_entry.php:642 -msgid "Delivery Note Items" +#: ../purchasing/supplier_credit.php:43 +msgid "Supplier credit note has been processed." msgstr "" -#: c:\Apache2\htdocs\account228/sales/sales_order_entry.php:643 -msgid "Enter Delivery Details and Confirm Dispatch" +#: ../purchasing/supplier_credit.php:44 +msgid "View this Credit Note" msgstr "" -#: c:\Apache2\htdocs\account228/sales/sales_order_entry.php:644 -msgid "Cancel Delivery" +#: ../purchasing/supplier_credit.php:46 +msgid "View the GL Journal Entries for this Credit Note" msgstr "" -#: c:\Apache2\htdocs\account228/sales/sales_order_entry.php:645 -msgid "Place Delivery" +#: ../purchasing/supplier_credit.php:48 +msgid "Enter Another Credit Note" msgstr "" -#: c:\Apache2\htdocs\account228/sales/sales_order_entry.php:647 -msgid "Quotation Date:" +#: ../purchasing/supplier_credit.php:102 +#: ../purchasing/supplier_invoice.php:102 +msgid "" +"The account code entered is not a valid code, this line cannot be added to " +"the transaction." msgstr "" -#: c:\Apache2\htdocs\account228/sales/sales_order_entry.php:648 -msgid "Sales Quotation Items" +#: ../purchasing/supplier_credit.php:112 +#: ../purchasing/supplier_invoice.php:112 +msgid "" +"The amount entered is not numeric. This line cannot be added to the " +"transaction." msgstr "" -#: c:\Apache2\htdocs\account228/sales/sales_order_entry.php:649 -msgid "Enter Delivery Details and Confirm Quotation" +#: ../purchasing/supplier_credit.php:142 +msgid "" +"The credit note cannot be processed because the there are no items or values " +"on the invoice. Credit notes are expected to have a charge." msgstr "" -#: c:\Apache2\htdocs\account228/sales/sales_order_entry.php:650 -msgid "Cancel Quotation" +#: ../purchasing/supplier_credit.php:149 +msgid "You must enter an credit note reference." msgstr "" -#: c:\Apache2\htdocs\account228/sales/sales_order_entry.php:651 -msgid "Place Quotation" +#: ../purchasing/supplier_credit.php:163 +msgid "You must enter a supplier's credit note reference." msgstr "" -#: c:\Apache2\htdocs\account228/sales/sales_order_entry.php:652 -msgid "Commit Quotations Changes" +#: ../purchasing/supplier_credit.php:170 +msgid "" +"The credit note as entered cannot be processed because the date entered is " +"not valid." msgstr "" -#: c:\Apache2\htdocs\account228/sales/sales_order_entry.php:654 -msgid "Order Date:" +#: ../purchasing/supplier_credit.php:182 +#: ../purchasing/supplier_invoice.php:180 +msgid "" +"The invoice as entered cannot be processed because the due date is in an " +"incorrect format." msgstr "" -#: c:\Apache2\htdocs\account228/sales/sales_order_entry.php:655 -msgid "Sales Order Items" +#: ../purchasing/supplier_credit.php:189 +msgid "" +"The credit note total as entered is less than the sum of the the general " +"ledger entires (if any) and the charges for goods received. There must be a " +"mistake somewhere, the credit note as entered will not be processed." msgstr "" -#: c:\Apache2\htdocs\account228/sales/sales_order_entry.php:656 -msgid "Enter Delivery Details and Confirm Order" +#: ../purchasing/supplier_credit.php:227 +msgid "The quantity to credit must be numeric and greater than zero." msgstr "" -#: c:\Apache2\htdocs\account228/sales/sales_order_entry.php:659 -msgid "Commit Order Changes" +#: ../purchasing/supplier_credit.php:234 +msgid "The price is either not numeric or negative." msgstr "" -#: c:\Apache2\htdocs\account228/sales/sales_order_entry.php:681 -msgid "" -"You are about to void this Document.\\n" -"Do you want to continue?" +#: ../purchasing/supplier_credit.php:336 +msgid "Enter Credit Note" msgstr "" -#: c:\Apache2\htdocs\account228/sales/sales_order_entry.php:684 -msgid "Validate changes and update document" +#: ../purchasing/supplier_invoice.php:28 +msgid "Enter Supplier Invoice" msgstr "" -#: c:\Apache2\htdocs\account228/sales/sales_order_entry.php:688 -msgid "Cancels document entry or removes sales order when editing an old document" +#: ../purchasing/supplier_invoice.php:43 +msgid "Supplier invoice has been processed." msgstr "" -#: c:\Apache2\htdocs\account228/sales/allocations/customer_allocate.php:28 -msgid "Allocate Customer Payment or Credit Note" +#: ../purchasing/supplier_invoice.php:44 +msgid "View this Invoice" msgstr "" -#: c:\Apache2\htdocs\account228/sales/allocations/customer_allocate.php:48 -#, php-format -msgid "Allocation of %s # %d" +#: ../purchasing/supplier_invoice.php:50 +msgid "Enter Another Invoice" msgstr "" -#: c:\Apache2\htdocs\account228/sales/allocations/customer_allocation_main.php:22 -msgid "Customer Allocations" +#: ../purchasing/supplier_invoice.php:141 +msgid "" +"The invoice cannot be processed because the there are no items or values on " +"the invoice. Invoices are expected to have a charge." msgstr "" -#: c:\Apache2\htdocs\account228/sales/allocations/customer_allocation_main.php:32 -#: c:\Apache2\htdocs\account228/sales/inquiry/customer_allocation_inquiry.php:42 -#: c:\Apache2\htdocs\account228/sales/inquiry/customer_inquiry.php:44 -msgid "Select a customer: " +#: ../purchasing/supplier_invoice.php:147 +msgid "You must enter an invoice reference." msgstr "" -#: c:\Apache2\htdocs\account228/sales/inquiry/customer_allocation_inquiry.php:25 -msgid "Customer Allocation Inquiry" +#: ../purchasing/supplier_invoice.php:168 +msgid "" +"The invoice as entered cannot be processed because the invoice date is in an " +"incorrect format." msgstr "" -#: c:\Apache2\htdocs\account228/sales/inquiry/customer_allocation_inquiry.php:96 -msgid "Allocation" +#: ../purchasing/supplier_invoice.php:187 +msgid "" +"This invoice number has already been entered. It cannot be entered again." msgstr "" -#: c:\Apache2\htdocs\account228/sales/inquiry/customer_inquiry.php:26 -msgid "Customer Transactions" +#: ../purchasing/supplier_invoice.php:224 +msgid "The quantity to invoice must be numeric and greater than zero." msgstr "" -#: c:\Apache2\htdocs\account228/sales/inquiry/customer_inquiry.php:70 -msgid "CUSTOMER ACCOUNT IS ON HOLD" +#: ../purchasing/supplier_invoice.php:231 +msgid "The price is not numeric." msgstr "" -#: c:\Apache2\htdocs\account228/sales/inquiry/customer_inquiry.php:199 -msgid "Print Receipt" +#: ../purchasing/supplier_invoice.php:244 +msgid "" +"The price being invoiced is more than the purchase order price by more than " +"the allowed over-charge percentage. The system is set up to prohibit this. " +"See the system administrator to modify the set up parameters if necessary." msgstr "" -#: c:\Apache2\htdocs\account228/sales/inquiry/customer_inquiry.php:293 -#: c:\Apache2\htdocs\account228/sales/inquiry/customer_inquiry.php:306 -msgid "RB" +#: ../purchasing/supplier_invoice.php:245 +#: ../purchasing/supplier_invoice.php:258 +msgid "The over-charge percentage allowance is :" msgstr "" -#: c:\Apache2\htdocs\account228/sales/inquiry/sales_deliveries_view.php:29 -msgid "Search Not Invoiced Deliveries" +#: ../purchasing/supplier_invoice.php:257 +msgid "" +"The quantity being invoiced is more than the outstanding quantity by more " +"than the allowed over-charge percentage. The system is set up to prohibit " +"this. See the system administrator to modify the set up parameters if " +"necessary." msgstr "" -#: c:\Apache2\htdocs\account228/sales/inquiry/sales_deliveries_view.php:34 -msgid "Search All Deliveries" +#: ../purchasing/supplier_invoice.php:334 +#, php-format +msgid "All yet non-invoiced items on delivery line # %d has been removed." msgstr "" -#: c:\Apache2\htdocs\account228/sales/inquiry/sales_deliveries_view.php:70 -msgid "" -"For batch invoicing you should\n" -"\t\t select at least one delivery. All items must be dispatched to\n" -"\t\t the same customer branch." +#: ../purchasing/supplier_invoice.php:376 +msgid "Enter Invoice" msgstr "" -#: c:\Apache2\htdocs\account228/sales/inquiry/sales_deliveries_view.php:229 -msgid "Delivery #" +#: ../purchasing/supplier_payment.php:31 +msgid "Supplier Payment Entry" msgstr "" -#: c:\Apache2\htdocs\account228/sales/inquiry/sales_deliveries_view.php:233 -msgid "Contact" +#: ../purchasing/supplier_payment.php:89 +msgid "Invalid purchase invoice number." msgstr "" -#: c:\Apache2\htdocs\account228/sales/inquiry/sales_deliveries_view.php:235 -msgid "Cust Ref" +#: ../purchasing/supplier_payment.php:96 +msgid "Payment has been sucessfully entered" msgstr "" -#: c:\Apache2\htdocs\account228/sales/inquiry/sales_deliveries_view.php:237 -msgid "Due By" +#: ../purchasing/supplier_payment.php:98 +msgid "&Print This Remittance" msgstr "" -#: c:\Apache2\htdocs\account228/sales/inquiry/sales_deliveries_view.php:238 -msgid "Delivery Total" +#: ../purchasing/supplier_payment.php:99 +msgid "&Email This Remittance" msgstr "" -#: c:\Apache2\htdocs\account228/sales/inquiry/sales_deliveries_view.php:240 -msgid "Batch" +#: ../purchasing/supplier_payment.php:101 +msgid "View the GL &Journal Entries for this Payment" msgstr "" -#: c:\Apache2\htdocs\account228/sales/inquiry/sales_deliveries_view.php:240 -msgid "Batch Invoicing" +#: ../purchasing/supplier_payment.php:105 +msgid "Enter another supplier &payment" msgstr "" -#: c:\Apache2\htdocs\account228/sales/inquiry/sales_orders_view.php:46 -msgid "Search Outstanding Sales Orders" +#: ../purchasing/supplier_payment.php:152 +#: ../sales/customer_payments.php:139 +msgid "The exchange rate must be numeric and greater than zero." msgstr "" -#: c:\Apache2\htdocs\account228/sales/inquiry/sales_orders_view.php:51 -msgid "Search Template for Invoicing" +#: ../purchasing/supplier_payment.php:164 +msgid "The entered discount is invalid or less than zero." msgstr "" -#: c:\Apache2\htdocs\account228/sales/inquiry/sales_orders_view.php:56 -msgid "Select Template for Delivery" +#: ../purchasing/supplier_payment.php:172 +msgid "" +"The total of the amount and the discount is zero or negative. Please enter " +"positive values." msgstr "" -#: c:\Apache2\htdocs\account228/sales/inquiry/sales_orders_view.php:61 -msgid "Search All Sales Orders" +#: ../purchasing/supplier_payment.php:263 +msgid "Payment To:" msgstr "" -#: c:\Apache2\htdocs\account228/sales/inquiry/sales_orders_view.php:67 -msgid "Search All Sales Quotations" +#: ../purchasing/supplier_payment.php:267 +msgid "From Bank Account:" msgstr "" -#: c:\Apache2\htdocs\account228/sales/inquiry/sales_orders_view.php:131 -msgid "Dispatch" +#: ../purchasing/supplier_payment.php:273 +#: ../purchasing/view/view_supp_payment.php:55 +msgid "Date Paid" msgstr "" -#: c:\Apache2\htdocs\account228/sales/inquiry/sales_orders_view.php:134 -#: c:\Apache2\htdocs\account228/sales/inquiry/sales_orders_view.php:156 -msgid "Sales Order" +#: ../purchasing/supplier_payment.php:296 +#: ../sales/customer_payments.php:287 +msgid "Amount of Discount:" msgstr "" -#: c:\Apache2\htdocs\account228/sales/inquiry/sales_orders_view.php:150 -msgid "Delivery" +#: ../purchasing/supplier_payment.php:297 +msgid "Amount of Payment:" msgstr "" -#: c:\Apache2\htdocs\account228/sales/inquiry/sales_orders_view.php:171 -msgid "Set this order as a template for direct deliveries/invoices" +#: ../purchasing/supplier_payment.php:303 +msgid "The amount and discount are in the bank account's currency." msgstr "" -#: c:\Apache2\htdocs\account228/sales/inquiry/sales_orders_view.php:236 -msgid "Show All:" +#: ../purchasing/supplier_payment.php:306 +msgid "Enter Payment" msgstr "" -#: c:\Apache2\htdocs\account228/sales/inquiry/sales_orders_view.php:318 -msgid "Order #" +#: ../purchasing/view/view_grn.php:21 +msgid "View Purchase Order Delivery" msgstr "" -#: c:\Apache2\htdocs\account228/sales/inquiry/sales_orders_view.php:322 -#: c:\Apache2\htdocs\account228/sales/inquiry/sales_orders_view.php:336 -msgid "Cust Order Ref" +#: ../purchasing/view/view_grn.php:27 +msgid "" +"This page must be called with a Purchase Order Delivery number to review." msgstr "" -#: c:\Apache2\htdocs\account228/sales/inquiry/sales_orders_view.php:325 -#: c:\Apache2\htdocs\account228/sales/inquiry/sales_orders_view.php:339 -msgid "Delivery To" +#: ../purchasing/view/view_grn.php:37 +#: ../purchasing/view/view_po.php:41 +#: ../sales/view/view_sales_order.php:197 +msgid "Line Details" msgstr "" -#: c:\Apache2\htdocs\account228/sales/inquiry/sales_orders_view.php:332 -msgid "Quote #" +#: ../purchasing/view/view_grn.php:40 +#: ../reporting/includes/doctext.inc:36 +#: ../reporting/includes/doctext.inc:103 +#: ../sales/inquiry/sales_deliveries_view.php:186 +msgid "Delivery Date" msgstr "" -#: c:\Apache2\htdocs\account228/sales/inquiry/sales_orders_view.php:337 -msgid "Quote Date" +#: ../purchasing/view/view_grn.php:70 +#: ../purchasing/view/view_po.php:84 +#: ../purchasing/view/view_supp_credit.php:60 +#: ../purchasing/view/view_supp_invoice.php:65 +#: ../sales/view/view_credit.php:136 +#: ../sales/view/view_sales_order.php:233 +msgid "Sub Total" msgstr "" -#: c:\Apache2\htdocs\account228/sales/inquiry/sales_orders_view.php:338 -msgid "Valid until" +#: ../purchasing/view/view_grn.php:86 +msgid "This delivery has been voided." msgstr "" -#: c:\Apache2\htdocs\account228/sales/inquiry/sales_orders_view.php:340 -msgid "Quote Total" +#: ../purchasing/view/view_po.php:22 +msgid "View Purchase Order" msgstr "" -#: c:\Apache2\htdocs\account228/sales/inquiry/sales_orders_view.php:365 -msgid "Tmpl" +#: ../purchasing/view/view_po.php:27 +msgid "This page must be called with a purchase order number to review." msgstr "" -#: c:\Apache2\htdocs\account228/sales/manage/credit_status.php:16 -msgid "Credit Status" +#: ../purchasing/view/view_po.php:46 +msgid "Requested By" msgstr "" -#: c:\Apache2\htdocs\account228/sales/manage/credit_status.php:30 -msgid "The credit status description cannot be empty." +#: ../purchasing/view/view_po.php:100 +#: ../purchasing/inquiry/supplier_allocation_inquiry.php:147 +#: ../purchasing/inquiry/supplier_inquiry.php:187 +#: ../sales/inquiry/customer_allocation_inquiry.php:162 +#: ../sales/inquiry/customer_inquiry.php:239 +#: ../sales/inquiry/sales_deliveries_view.php:206 +#: ../sales/inquiry/sales_orders_view.php:312 +msgid "Marked items are overdue." msgstr "" -#: c:\Apache2\htdocs\account228/sales/manage/credit_status.php:44 -msgid "New credit status has been added" +#: ../purchasing/view/view_po.php:113 +#: ../sales/view/view_invoice.php:97 +#: ../sales/view/view_sales_order.php:50 +msgid "Deliveries" msgstr "" -#: c:\Apache2\htdocs\account228/sales/manage/credit_status.php:52 -msgid "Selected credit status has been updated" +#: ../purchasing/view/view_po.php:115 +msgid "Delivered On" msgstr "" -#: c:\Apache2\htdocs\account228/sales/manage/credit_status.php:67 -msgid "Cannot delete this credit status because customer accounts have been created referring to it." +#: ../purchasing/view/view_po.php:138 +#: ../sales/view/view_sales_order.php:52 +msgid "Invoices/Credits" msgstr "" -#: c:\Apache2\htdocs\account228/sales/manage/credit_status.php:83 -msgid "Selected credit status has been deleted" +#: ../purchasing/view/view_supp_credit.php:23 +msgid "View Supplier Credit Note" msgstr "" -#: c:\Apache2\htdocs\account228/sales/manage/credit_status.php:101 -msgid "Dissallow Invoices" +#: ../purchasing/view/view_supp_credit.php:38 +msgid "SUPPLIER CREDIT NOTE" msgstr "" -#: c:\Apache2\htdocs\account228/sales/manage/credit_status.php:113 -msgid "Invoice OK" +#: ../purchasing/view/view_supp_credit.php:47 +#: ../purchasing/view/view_supp_invoice.php:50 +#: ../sales/customer_credit_invoice.php:279 +#: ../sales/view/view_invoice.php:95 +msgid "Invoice Date" msgstr "" -#: c:\Apache2\htdocs\account228/sales/manage/credit_status.php:117 -msgid "NO INVOICING" +#: ../purchasing/view/view_supp_credit.php:66 +msgid "TOTAL CREDIT NOTE" msgstr "" -#: c:\Apache2\htdocs\account228/sales/manage/credit_status.php:151 -msgid "Dissallow invoicing ?" +#: ../purchasing/view/view_supp_credit.php:71 +#: ../sales/view/view_credit.php:147 +msgid "This credit note has been voided." msgstr "" -#: c:\Apache2\htdocs\account228/sales/manage/customers.php:16 -msgid "Customers" +#: ../purchasing/view/view_supp_invoice.php:23 +msgid "View Supplier Invoice" msgstr "" -#: c:\Apache2\htdocs\account228/sales/manage/customers.php:33 -msgid "The customer name cannot be empty." +#: ../purchasing/view/view_supp_invoice.php:40 +msgid "SUPPLIER INVOICE" msgstr "" -#: c:\Apache2\htdocs\account228/sales/manage/customers.php:40 -msgid "The customer short name cannot be empty." +#: ../purchasing/view/view_supp_invoice.php:72 +#: ../reporting/includes/doctext.inc:151 +#: ../sales/view/view_invoice.php:164 +msgid "TOTAL INVOICE" msgstr "" -#: c:\Apache2\htdocs\account228/sales/manage/customers.php:47 -msgid "The credit limit must be numeric and not less than zero." +#: ../purchasing/view/view_supp_invoice.php:76 +#: ../sales/view/view_invoice.php:168 +msgid "This invoice has been voided." msgstr "" -#: c:\Apache2\htdocs\account228/sales/manage/customers.php:54 -msgid "The payment discount must be numeric and is expected to be less than 100% and greater than or equal to 0." +#: ../purchasing/view/view_supp_payment.php:22 +msgid "View Payment to Supplier" msgstr "" -#: c:\Apache2\htdocs\account228/sales/manage/customers.php:61 -msgid "The discount percentage must be numeric and is expected to be less than 100% and greater than or equal to 0." +#: ../purchasing/view/view_supp_payment.php:47 +msgid "Payment to Supplier" msgstr "" -#: c:\Apache2\htdocs\account228/sales/manage/customers.php:104 -msgid "Customer has been updated." +#: ../purchasing/view/view_supp_payment.php:53 +msgid "To Supplier" msgstr "" -#: c:\Apache2\htdocs\account228/sales/manage/customers.php:127 -msgid "A new customer has been added." +#: ../purchasing/view/view_supp_payment.php:59 +#: ../sales/view/view_receipt.php:43 +msgid "Payment Currency" msgstr "" -#: c:\Apache2\htdocs\account228/sales/manage/customers.php:155 -msgid "This customer cannot be deleted because there are transactions that refer to it." +#: ../purchasing/view/view_supp_payment.php:66 +msgid "Supplier's Currency" msgstr "" -#: c:\Apache2\htdocs\account228/sales/manage/customers.php:165 -msgid "Cannot delete the customer record because orders have been created against it." +#: ../purchasing/manage/suppliers.php:21 +#: ../sales/manage/customer_branches.php:33 +msgid "" +"There are no tax groups defined in the system. At least one tax group is " +"required before proceeding." msgstr "" -#: c:\Apache2\htdocs\account228/sales/manage/customers.php:175 -msgid "Cannot delete this customer because there are branch records set up against it." +#: ../purchasing/manage/suppliers.php:83 +msgid "Basic Data" msgstr "" -#: c:\Apache2\htdocs\account228/sales/manage/customers.php:186 -msgid "Selected customer has been deleted." +#: ../purchasing/manage/suppliers.php:85 +msgid "Supplier Name:" msgstr "" -#: c:\Apache2\htdocs\account228/sales/manage/customers.php:193 -msgid "There are no sales types defined. Please define at least one sales type before adding a customer." +#: ../purchasing/manage/suppliers.php:86 +msgid "Supplier Short Name:" msgstr "" -#: c:\Apache2\htdocs\account228/sales/manage/customers.php:202 -msgid "New customer" +#: ../purchasing/manage/suppliers.php:89 +msgid "Website:" msgstr "" -#: c:\Apache2\htdocs\account228/sales/manage/customers.php:259 -msgid "Name and Address" +#: ../purchasing/manage/suppliers.php:100 +msgid "Our Customer No:" msgstr "" -#: c:\Apache2\htdocs\account228/sales/manage/customers.php:261 -msgid "Customer Name:" +#: ../purchasing/manage/suppliers.php:103 +msgid "Contact Data" msgstr "" -#: c:\Apache2\htdocs\account228/sales/manage/customers.php:262 -msgid "Customer Short Name:" +#: ../purchasing/manage/suppliers.php:109 +msgid "System default" msgstr "" -#: c:\Apache2\htdocs\account228/sales/manage/customers.php:271 -#: c:\Apache2\htdocs\account228/sales/manage/customers.php:275 -msgid "Customer's Currency:" +#: ../purchasing/manage/suppliers.php:111 +msgid "Purchasing" msgstr "" -#: c:\Apache2\htdocs\account228/sales/manage/customers.php:278 -msgid "Sales Type/Price List:" +#: ../purchasing/manage/suppliers.php:112 +msgid "Bank Name/Account:" msgstr "" -#: c:\Apache2\htdocs\account228/sales/manage/customers.php:284 -msgid "Discount Percent:" +#: ../purchasing/manage/suppliers.php:113 +#: ../sales/manage/customers.php:228 +msgid "Credit Limit:" msgstr "" -#: c:\Apache2\htdocs\account228/sales/manage/customers.php:285 -msgid "Prompt Payment Discount Percent:" +#: ../purchasing/manage/suppliers.php:114 +#: ../sales/manage/customers.php:230 +msgid "Payment Terms:" msgstr "" -#: c:\Apache2\htdocs\account228/sales/manage/customers.php:289 -msgid "Credit Status:" +#: ../purchasing/manage/suppliers.php:120 +#: ../purchasing/manage/suppliers.php:123 +msgid "Prices contain tax included:" msgstr "" -#: c:\Apache2\htdocs\account228/sales/manage/customers.php:302 -msgid "Customer branches" +#: ../purchasing/manage/suppliers.php:125 +#: ../reporting/rep704.php:91 +#: ../reporting/rep704.php:101 +#: ../reporting/rep704.php:109 +msgid "Accounts" msgstr "" -#: c:\Apache2\htdocs\account228/sales/manage/customers.php:304 -msgid "Select or &Add" +#: ../purchasing/manage/suppliers.php:126 +msgid "Accounts Payable Account:" msgstr "" -#: c:\Apache2\htdocs\account228/sales/manage/customers.php:304 -msgid "&Add or Edit " +#: ../purchasing/manage/suppliers.php:127 +msgid "Purchase Account:" msgstr "" -#: c:\Apache2\htdocs\account228/sales/manage/customers.php:311 -msgid "Customer status:" +#: ../purchasing/manage/suppliers.php:128 +msgid "Use Item Inventory/COGS Account" msgstr "" -#: c:\Apache2\htdocs\account228/sales/manage/customers.php:317 -msgid "Add New Customer" +#: ../purchasing/manage/suppliers.php:146 +#: ../sales/manage/customer_branches.php:266 +msgid "Addresses" msgstr "" -#: c:\Apache2\htdocs\account228/sales/manage/customers.php:321 -msgid "Update Customer" +#: ../purchasing/manage/suppliers.php:147 +#: ../sales/manage/customer_branches.php:267 +msgid "Mailing Address:" msgstr "" -#: c:\Apache2\htdocs\account228/sales/manage/customers.php:322 -msgid "Update customer data" +#: ../purchasing/manage/suppliers.php:148 +msgid "Physical Address:" msgstr "" -#: c:\Apache2\htdocs\account228/sales/manage/customers.php:323 -msgid "Select this customer and return to document entry." +#: ../purchasing/manage/suppliers.php:150 +msgid "General" msgstr "" -#: c:\Apache2\htdocs\account228/sales/manage/customers.php:324 -msgid "Delete Customer" +#: ../purchasing/manage/suppliers.php:151 +#: ../sales/manage/customer_branches.php:269 +#: ../sales/manage/customers.php:251 +msgid "General Notes:" msgstr "" -#: c:\Apache2\htdocs\account228/sales/manage/customers.php:325 -msgid "Delete customer data if have been never used" +#: ../purchasing/manage/suppliers.php:153 +msgid "Supplier status:" msgstr "" -#: c:\Apache2\htdocs\account228/sales/manage/customer_branches.php:18 -msgid "Customer Branches" +#: ../purchasing/manage/suppliers.php:160 +msgid "Update Supplier" msgstr "" -#: c:\Apache2\htdocs\account228/sales/manage/customer_branches.php:24 -msgid "There are no customers defined in the system. Please define a customer to add customer branches." +#: ../purchasing/manage/suppliers.php:161 +msgid "Update supplier data" msgstr "" -#: c:\Apache2\htdocs\account228/sales/manage/customer_branches.php:26 -msgid "There are no sales people defined in the system. At least one sales person is required before proceeding." +#: ../purchasing/manage/suppliers.php:162 +msgid "Select this supplier and return to document entry." msgstr "" -#: c:\Apache2\htdocs\account228/sales/manage/customer_branches.php:28 -msgid "There are no sales areas defined in the system. At least one sales area is required before proceeding." +#: ../purchasing/manage/suppliers.php:163 +msgid "Delete Supplier" msgstr "" -#: c:\Apache2\htdocs\account228/sales/manage/customer_branches.php:30 -msgid "There are no shipping companies defined in the system. At least one shipping company is required before proceeding." +#: ../purchasing/manage/suppliers.php:164 +msgid "Delete supplier data if have been never used" msgstr "" -#: c:\Apache2\htdocs\account228/sales/manage/customer_branches.php:63 -msgid "The Branch name cannot be empty." +#: ../purchasing/manage/suppliers.php:168 +msgid "Add New Supplier Details" msgstr "" -#: c:\Apache2\htdocs\account228/sales/manage/customer_branches.php:70 -msgid "The Branch short name cannot be empty." +#: ../purchasing/manage/suppliers.php:187 +msgid "The supplier name must be entered." msgstr "" -#: c:\Apache2\htdocs\account228/sales/manage/customer_branches.php:105 -msgid "Selected customer branch has been updated" +#: ../purchasing/manage/suppliers.php:194 +msgid "The supplier short name must be entered." msgstr "" -#: c:\Apache2\htdocs\account228/sales/manage/customer_branches.php:132 -msgid "New customer branch has been added" +#: ../purchasing/manage/suppliers.php:214 +msgid "Supplier has been updated." msgstr "" -#: c:\Apache2\htdocs\account228/sales/manage/customer_branches.php:156 -msgid "Cannot delete this branch because customer transactions have been created to this branch." +#: ../purchasing/manage/suppliers.php:232 +msgid "A new supplier has been added." msgstr "" -#: c:\Apache2\htdocs\account228/sales/manage/customer_branches.php:167 -msgid "Cannot delete this branch because sales orders exist for it. Purge old sales orders first." +#: ../purchasing/manage/suppliers.php:250 +msgid "" +"Cannot delete this supplier because there are transactions that refer to " +"this supplier." msgstr "" -#: c:\Apache2\htdocs\account228/sales/manage/customer_branches.php:173 -msgid "Selected customer branch has been deleted" +#: ../purchasing/manage/suppliers.php:258 +msgid "" +"Cannot delete the supplier record because purchase orders have been created " +"against this supplier." msgstr "" -#: c:\Apache2\htdocs\account228/sales/manage/customer_branches.php:243 -msgid "Short Name" +#: ../purchasing/manage/suppliers.php:279 +#: ../purchasing/inquiry/supplier_allocation_inquiry.php:48 +msgid "Select a supplier: " msgstr "" -#: c:\Apache2\htdocs\account228/sales/manage/customer_branches.php:246 -msgid "Sales Person" +#: ../purchasing/manage/suppliers.php:280 +msgid "New supplier" msgstr "" -#: c:\Apache2\htdocs\account228/sales/manage/customer_branches.php:247 -msgid "Area" +#: ../purchasing/manage/suppliers.php:298 +#: ../sales/manage/customer_branches.php:322 +#: ../sales/manage/customers.php:300 +msgid "&General settings" msgstr "" -#: c:\Apache2\htdocs\account228/sales/manage/customer_branches.php:248 -msgid "Phone No" +#: ../purchasing/manage/suppliers.php:299 +#: ../sales/manage/customer_branches.php:323 +#: ../sales/manage/customers.php:301 +msgid "&Contacts" msgstr "" -#: c:\Apache2\htdocs\account228/sales/manage/customer_branches.php:249 -msgid "Fax No" +#: ../purchasing/inquiry/po_search_completed.php:24 +msgid "Search Purchase Orders" msgstr "" -#: c:\Apache2\htdocs\account228/sales/manage/customer_branches.php:251 -msgid "Tax Group" +#: ../purchasing/inquiry/po_search_completed.php:60 +#: ../purchasing/inquiry/po_search.php:62 +#: ../sales/inquiry/sales_deliveries_view.php:103 +#: ../sales/inquiry/sales_orders_view.php:225 +msgid "#:" msgstr "" -#: c:\Apache2\htdocs\account228/sales/manage/customer_branches.php:270 -msgid "The selected customer does not have any branches. Please create at least one branch." +#: ../purchasing/inquiry/po_search_completed.php:65 +msgid "into location:" msgstr "" -#: c:\Apache2\htdocs\account228/sales/manage/customer_branches.php:322 -msgid "Main Branch" +#: ../purchasing/inquiry/po_search_completed.php:121 +#: ../purchasing/inquiry/po_search.php:135 +#: ../sales/inquiry/sales_orders_view.php:263 +msgid "Order Date" msgstr "" -#: c:\Apache2\htdocs\account228/sales/manage/customer_branches.php:347 -msgid "Branch Name:" +#: ../purchasing/inquiry/po_search_completed.php:123 +#: ../purchasing/inquiry/po_search.php:137 +#: ../sales/inquiry/sales_orders_view.php:266 +msgid "Order Total" msgstr "" -#: c:\Apache2\htdocs\account228/sales/manage/customer_branches.php:348 -msgid "Branch Short Name:" +#: ../purchasing/inquiry/po_search.php:25 +msgid "Search Outstanding Purchase Orders" msgstr "" -#: c:\Apache2\htdocs\account228/sales/manage/customer_branches.php:359 -msgid "Sales Person:" +#: ../purchasing/inquiry/po_search.php:98 +msgid "Receive" msgstr "" -#: c:\Apache2\htdocs\account228/sales/manage/customer_branches.php:361 -msgid "Sales Area:" +#: ../purchasing/inquiry/po_search.php:148 +msgid "Marked orders have overdue items." msgstr "" -#: c:\Apache2\htdocs\account228/sales/manage/customer_branches.php:363 -#: c:\Apache2\htdocs\account228/sales/manage/recurrent_invoices.php:179 -msgid "Sales Group:" +#: ../purchasing/inquiry/supplier_allocation_inquiry.php:23 +msgid "Supplier Allocation Inquiry" msgstr "" -#: c:\Apache2\htdocs\account228/sales/manage/customer_branches.php:365 -msgid "Default Inventory Location:" +#: ../purchasing/inquiry/supplier_allocation_inquiry.php:55 +#: ../sales/inquiry/customer_allocation_inquiry.php:49 +msgid "show settled:" msgstr "" -#: c:\Apache2\htdocs\account228/sales/manage/customer_branches.php:367 -msgid "Default Shipping Company:" +#: ../purchasing/inquiry/supplier_allocation_inquiry.php:129 +msgid "Supp Reference" msgstr "" -#: c:\Apache2\htdocs\account228/sales/manage/customer_branches.php:371 -msgid "Disable this Branch:" +#: ../purchasing/inquiry/supplier_allocation_inquiry.php:135 +#: ../reporting/rep101.php:131 +#: ../reporting/rep201.php:119 +#: ../reporting/includes/doctext.inc:117 +#: ../sales/inquiry/customer_allocation_inquiry.php:151 +msgid "Allocated" msgstr "" -#: c:\Apache2\htdocs\account228/sales/manage/customer_branches.php:382 -msgid "Accounts Receivable Account:" +#: ../purchasing/inquiry/supplier_inquiry.php:25 +msgid "Supplier Inquiry" msgstr "" -#: c:\Apache2\htdocs\account228/sales/manage/customer_branches.php:390 -msgid "Billing Address:" +#: ../purchasing/inquiry/supplier_inquiry.php:47 +msgid "Select a supplier:" msgstr "" -#: c:\Apache2\htdocs\account228/sales/manage/recurrent_invoices.php:23 -msgid "Recurrent Invoices" +#: ../purchasing/inquiry/supplier_inquiry.php:66 +#: ../purchasing/inquiry/supplier_inquiry.php:67 +#: ../purchasing/inquiry/supplier_inquiry.php:68 +#: ../reporting/rep102.php:110 +#: ../reporting/rep102.php:111 +#: ../reporting/rep102.php:112 +#: ../reporting/rep102.php:227 +#: ../reporting/rep202.php:112 +#: ../reporting/rep202.php:113 +#: ../reporting/rep202.php:114 +#: ../reporting/rep202.php:143 +#: ../reporting/rep202.php:144 +#: ../reporting/rep202.php:145 +#: ../reporting/rep202.php:233 +#: ../reporting/includes/doctext.inc:179 +#: ../sales/create_recurrent_invoices.php:98 +#: ../sales/manage/recurrent_invoices.php:85 +#: ../sales/inquiry/customer_inquiry.php:71 +#: ../sales/inquiry/customer_inquiry.php:72 +#: ../sales/inquiry/customer_inquiry.php:73 +#: ../themes/exclusive/renderer.php:290 +#: ../themes/exclusive/renderer.php:384 +msgid "Days" msgstr "" -#: c:\Apache2\htdocs\account228/sales/manage/recurrent_invoices.php:35 -#: c:\Apache2\htdocs\account228/sales/manage/sales_areas.php:30 -#: c:\Apache2\htdocs\account228/sales/manage/sales_groups.php:30 -msgid "The area description cannot be empty." +#: ../purchasing/inquiry/supplier_inquiry.php:68 +#: ../reporting/rep102.php:112 +#: ../reporting/rep202.php:114 +#: ../reporting/rep202.php:145 +#: ../reporting/includes/doctext.inc:180 +#: ../sales/inquiry/customer_inquiry.php:73 +msgid "Over" msgstr "" -#: c:\Apache2\htdocs\account228/sales/manage/recurrent_invoices.php:53 -msgid "Selected recurrent invoice has been updated" +#: ../purchasing/inquiry/supplier_inquiry.php:72 +#: ../sales/inquiry/customer_inquiry.php:76 +msgid "Terms" msgstr "" -#: c:\Apache2\htdocs\account228/sales/manage/recurrent_invoices.php:62 -msgid "New recurrent invoice has been added" +#: ../purchasing/inquiry/supplier_inquiry.php:72 +#: ../reporting/rep102.php:115 +#: ../reporting/rep102.php:225 +#: ../reporting/rep202.php:118 +#: ../reporting/rep202.php:231 +#: ../reporting/includes/doctext.inc:175 +#: ../sales/inquiry/customer_inquiry.php:76 +msgid "Current" msgstr "" -#: c:\Apache2\htdocs\account228/sales/manage/recurrent_invoices.php:81 -msgid "Selected recurrent invoice has been deleted" +#: ../purchasing/inquiry/supplier_inquiry.php:73 +#: ../reporting/rep102.php:116 +#: ../reporting/rep202.php:119 +#: ../reporting/includes/doctext.inc:176 +#: ../sales/inquiry/customer_inquiry.php:77 +msgid "Total Balance" msgstr "" -#: c:\Apache2\htdocs\account228/sales/manage/recurrent_invoices.php:172 -msgid "Template:" +#: ../purchasing/inquiry/supplier_inquiry.php:127 +#: ../sales/inquiry/customer_inquiry.php:158 +msgid "Credit This" msgstr "" -#: c:\Apache2\htdocs\account228/sales/manage/recurrent_invoices.php:174 -msgid "Customer:" +#: ../purchasing/inquiry/supplier_inquiry.php:149 +msgid "Print Remittance" msgstr "" -#: c:\Apache2\htdocs\account228/sales/manage/recurrent_invoices.php:181 -msgid "Days:" +#: ../purchasing/allocations/supplier_allocate.php:29 +msgid "Allocate Supplier Payment or Credit Note" msgstr "" -#: c:\Apache2\htdocs\account228/sales/manage/recurrent_invoices.php:183 -msgid "Monthly:" +#: ../purchasing/allocations/supplier_allocate.php:50 +msgid "Allocation of" msgstr "" -#: c:\Apache2\htdocs\account228/sales/manage/recurrent_invoices.php:185 -msgid "Begin:" +#: ../purchasing/allocations/supplier_allocate.php:55 +#: ../sales/allocations/customer_allocate.php:54 +msgid "Total:" msgstr "" -#: c:\Apache2\htdocs\account228/sales/manage/recurrent_invoices.php:187 -msgid "End:" +#: ../purchasing/allocations/supplier_allocate.php:64 +#: ../sales/allocations/customer_allocate.php:63 +msgid "Start again allocation of selected amount" msgstr "" -#: c:\Apache2\htdocs\account228/sales/manage/sales_areas.php:39 -msgid "Selected sales area has been updated" +#: ../purchasing/allocations/supplier_allocate.php:65 +#: ../sales/allocations/customer_allocate.php:64 +msgid "Process allocations" msgstr "" -#: c:\Apache2\htdocs\account228/sales/manage/sales_areas.php:44 -msgid "New sales area has been added" +#: ../purchasing/allocations/supplier_allocate.php:66 +#: ../purchasing/allocations/supplier_allocate.php:72 +#: ../sales/allocations/customer_allocate.php:65 +#: ../sales/allocations/customer_allocate.php:71 +msgid "Back to Allocations" msgstr "" -#: c:\Apache2\htdocs\account228/sales/manage/sales_areas.php:66 -msgid "Cannot delete this area because customer branches have been created using this area." +#: ../purchasing/allocations/supplier_allocate.php:67 +#: ../purchasing/allocations/supplier_allocate.php:73 +#: ../sales/allocations/customer_allocate.php:65 +#: ../sales/allocations/customer_allocate.php:72 +msgid "Abandon allocations and return to selection of allocatable amounts" msgstr "" -#: c:\Apache2\htdocs\account228/sales/manage/sales_areas.php:73 -msgid "Selected sales area has been deleted" +#: ../purchasing/allocations/supplier_allocate.php:71 +#: ../sales/allocations/customer_allocate.php:69 +msgid "There are no unsettled transactions to allocate." msgstr "" -#: c:\Apache2\htdocs\account228/sales/manage/sales_areas.php:95 -msgid "Area Name" +#: ../purchasing/allocations/supplier_allocation_main.php:26 +msgid "Supplier Allocations" msgstr "" -#: c:\Apache2\htdocs\account228/sales/manage/sales_areas.php:137 -msgid "Area Name:" +#: ../purchasing/allocations/supplier_allocation_main.php:36 +msgid "Select a Supplier: " msgstr "" -#: c:\Apache2\htdocs\account228/sales/manage/sales_groups.php:16 -msgid "Sales Groups" +#: ../purchasing/allocations/supplier_allocation_main.php:39 +#: ../sales/allocations/customer_allocation_main.php:35 +msgid "Show Settled Items:" msgstr "" -#: c:\Apache2\htdocs\account228/sales/manage/sales_groups.php:39 -msgid "Selected sales group has been updated" +#: ../purchasing/allocations/supplier_allocation_main.php:70 +#: ../sales/allocations/customer_allocation_main.php:74 +msgid "Allocate" msgstr "" -#: c:\Apache2\htdocs\account228/sales/manage/sales_groups.php:44 -msgid "New sales group has been added" +#: ../purchasing/allocations/supplier_allocation_main.php:111 +#: ../sales/allocations/customer_allocation_main.php:110 +msgid "Marked items are settled." msgstr "" -#: c:\Apache2\htdocs\account228/sales/manage/sales_groups.php:66 -msgid "Cannot delete this group because customers have been created using this group." +#: ../reporting/rep101.php:120 +#: ../reporting/rep102.php:100 +#: ../reporting/rep202.php:102 +#: ../reporting/rep203.php:81 +msgid "Balances in Home Currency" msgstr "" -#: c:\Apache2\htdocs\account228/sales/manage/sales_groups.php:73 -msgid "Selected sales group has been deleted" +#: ../reporting/rep101.php:130 +#: ../reporting/rep201.php:118 +#: ../reporting/rep203.php:91 +#: ../reporting/rep709.php:107 +#: ../reporting/includes/doctext.inc:108 +#: ../reporting/includes/doctext.inc:116 +msgid "Trans Type" msgstr "" -#: c:\Apache2\htdocs\account228/sales/manage/sales_groups.php:94 -msgid "Group Name" +#: ../reporting/rep101.php:130 +#: ../reporting/rep201.php:118 +#: ../reporting/includes/doctext.inc:116 +msgid "Charges" msgstr "" -#: c:\Apache2\htdocs\account228/sales/manage/sales_groups.php:135 -msgid "Group Name:" +#: ../reporting/rep101.php:130 +#: ../reporting/rep201.php:119 +#: ../reporting/includes/doctext.inc:117 +msgid "Credits" msgstr "" -#: c:\Apache2\htdocs\account228/sales/manage/sales_people.php:16 -msgid "Sales Persons" +#: ../reporting/rep101.php:139 +#: ../reporting/rep102.php:125 +#: ../reporting/rep201.php:127 +#: ../reporting/rep202.php:128 +#: ../reporting/rep203.php:100 +#: ../reporting/rep303.php:124 +#: ../reporting/reports_main.php:38 +#: ../reporting/reports_main.php:46 +#: ../reporting/reports_main.php:130 +#: ../reporting/reports_main.php:138 +#: ../reporting/reports_main.php:146 +#: ../reporting/reports_main.php:185 +msgid "Suppress Zeros" msgstr "" -#: c:\Apache2\htdocs\account228/sales/manage/sales_people.php:32 -msgid "The sales person name cannot be empty." +#: ../reporting/rep101.php:141 +msgid "Customer Balances" msgstr "" -#: c:\Apache2\htdocs\account228/sales/manage/sales_people.php:38 -msgid "Salesman provision cannot be less than 0 or more than 100%." +#: ../reporting/rep101.php:244 +#: ../reporting/rep102.php:211 +#: ../reporting/rep106.php:177 +#: ../reporting/rep201.php:231 +#: ../reporting/rep202.php:216 +#: ../reporting/rep203.php:177 +#: ../reporting/rep204.php:144 +#: ../reporting/rep301.php:171 +#: ../reporting/rep304.php:193 +#: ../reporting/rep305.php:132 +msgid "Grand Total" msgstr "" -#: c:\Apache2\htdocs\account228/sales/manage/sales_people.php:43 -msgid "Salesman provision breakpoint must be numeric and not less than 0." +#: ../reporting/rep102.php:94 +#: ../reporting/rep106.php:91 +#: ../reporting/rep202.php:96 +#: ../reporting/rep709.php:91 +#: ../reporting/reports_main.php:45 +#: ../reporting/reports_main.php:77 +#: ../reporting/reports_main.php:137 +#: ../reporting/reports_main.php:171 +#: ../reporting/reports_main.php:383 +msgid "Summary Only" msgstr "" -#: c:\Apache2\htdocs\account228/sales/manage/sales_people.php:77 -msgid "Selected sales person data have been updated" +#: ../reporting/rep102.php:96 +#: ../reporting/rep202.php:98 +#: ../reporting/rep709.php:93 +msgid "Detailed Report" msgstr "" -#: c:\Apache2\htdocs\account228/sales/manage/sales_people.php:79 -msgid "New sales person data have been added" +#: ../reporting/rep102.php:121 +#: ../reporting/rep202.php:124 +#: ../reporting/rep203.php:97 +#: ../reporting/reports_main.php:35 +#: ../reporting/reports_main.php:42 +#: ../reporting/reports_main.php:68 +#: ../reporting/reports_main.php:76 +#: ../reporting/reports_main.php:127 +#: ../reporting/reports_main.php:134 +#: ../reporting/reports_main.php:143 +#: ../reporting/reports_main.php:190 +#: ../reporting/reports_main.php:198 +#: ../reporting/reports_main.php:230 +#: ../reporting/reports_main.php:241 +#: ../reporting/reports_main.php:252 +#: ../reporting/reports_main.php:268 +#: ../reporting/reports_main.php:278 +#: ../reporting/reports_main.php:289 +#: ../reporting/reports_main.php:301 +#: ../reporting/reports_main.php:315 +#: ../reporting/reports_main.php:324 +#: ../reporting/reports_main.php:334 +#: ../reporting/reports_main.php:345 +#: ../reporting/reports_main.php:357 +#: ../reporting/reports_main.php:365 +#: ../reporting/reports_main.php:374 +#: ../reporting/reports_main.php:382 +#: ../reporting/reports_main.php:388 +msgid "End Date" msgstr "" -#: c:\Apache2\htdocs\account228/sales/manage/sales_people.php:100 -msgid "Selected sales person data have been deleted" +#: ../reporting/rep102.php:129 +msgid "Aged Customer Analysis" msgstr "" -#: c:\Apache2\htdocs\account228/sales/manage/sales_people.php:179 -msgid "Sales person name:" +#: ../reporting/rep103.php:115 +msgid "All Areas" msgstr "" -#: c:\Apache2\htdocs\account228/sales/manage/sales_people.php:180 -msgid "Telephone number:" +#: ../reporting/rep103.php:119 +msgid "All Sales Folk" msgstr "" -#: c:\Apache2\htdocs\account228/sales/manage/sales_people.php:181 -msgid "Fax number:" +#: ../reporting/rep103.php:123 +msgid "Greater than " msgstr "" -#: c:\Apache2\htdocs\account228/sales/manage/sales_people.php:184 -msgid "Break Pt.:" +#: ../reporting/rep103.php:127 +msgid "Less than " msgstr "" -#: c:\Apache2\htdocs\account228/sales/manage/sales_points.php:16 -msgid "POS settings" +#: ../reporting/rep103.php:136 +msgid "Customer Postal Address" msgstr "" -#: c:\Apache2\htdocs\account228/sales/manage/sales_points.php:28 -msgid "The POS name cannot be empty." +#: ../reporting/rep103.php:136 +msgid "Price/Turnover" msgstr "" -#: c:\Apache2\htdocs\account228/sales/manage/sales_points.php:34 -msgid "You must allow cash or credit sale." +#: ../reporting/rep103.php:136 +msgid "Branch Contact Information" msgstr "" -#: c:\Apache2\htdocs\account228/sales/manage/sales_points.php:48 -msgid "New point of sale has been added" +#: ../reporting/rep103.php:137 +msgid "Branch Delivery Address" msgstr "" -#: c:\Apache2\htdocs\account228/sales/manage/sales_points.php:59 -msgid "Selected point of sale has been updated" +#: ../reporting/rep103.php:142 +#: ../reporting/reports_main.php:51 +msgid "Activity Since" msgstr "" -#: c:\Apache2\htdocs\account228/sales/manage/sales_points.php:70 -msgid "Cannot delete this POS because it is used in users setup." +#: ../reporting/rep103.php:143 +#: ../reporting/reports_main.php:52 +#: ../sales/manage/sales_areas.php:16 +msgid "Sales Areas" msgstr "" -#: c:\Apache2\htdocs\account228/sales/manage/sales_points.php:73 -msgid "Selected point of sale has been deleted" +#: ../reporting/rep103.php:144 +#: ../reporting/reports_main.php:53 +msgid "Sales Folk" msgstr "" -#: c:\Apache2\htdocs\account228/sales/manage/sales_points.php:92 -msgid "POS Name" +#: ../reporting/rep103.php:145 +msgid "Activity" msgstr "" -#: c:\Apache2\htdocs\account228/sales/manage/sales_points.php:92 -msgid "Credit sale" +#: ../reporting/rep103.php:147 +msgid "Customer Details Listing" msgstr "" -#: c:\Apache2\htdocs\account228/sales/manage/sales_points.php:92 -msgid "Cash sale" +#: ../reporting/rep103.php:175 +msgid "Customers in" msgstr "" -#: c:\Apache2\htdocs\account228/sales/manage/sales_points.php:92 -msgid "Default account" +#: ../reporting/rep103.php:196 +#: ../sales/includes/ui/sales_order_ui.inc:416 +msgid "Price List" msgstr "" -#: c:\Apache2\htdocs\account228/sales/manage/sales_points.php:118 -msgid "To have cash POS first define at least one cash bank account." +#: ../reporting/rep103.php:207 +msgid "Turnover" msgstr "" -#: c:\Apache2\htdocs\account228/sales/manage/sales_points.php:137 -msgid "Point of Sale Name" +#: ../reporting/rep103.php:216 +msgid "Ph" msgstr "" -#: c:\Apache2\htdocs\account228/sales/manage/sales_points.php:139 -msgid "Allowed credit sale" +#: ../reporting/rep104.php:109 +msgid "Category/Items" msgstr "" -#: c:\Apache2\htdocs\account228/sales/manage/sales_points.php:140 -msgid "Allowed cash sale" +#: ../reporting/rep104.php:109 +#: ../reporting/rep301.php:99 +#: ../reporting/rep303.php:109 +#: ../reporting/rep303.php:115 +msgid "UOM" msgstr "" -#: c:\Apache2\htdocs\account228/sales/manage/sales_points.php:141 -msgid "Default cash account" +#: ../reporting/rep104.php:109 +msgid "GP %" msgstr "" -#: c:\Apache2\htdocs\account228/sales/manage/sales_points.php:147 -msgid "POS location" +#: ../reporting/rep104.php:117 +#: ../reporting/reports_main.php:63 +msgid "Show GP %" msgstr "" -#: c:\Apache2\htdocs\account228/sales/manage/sales_types.php:28 -msgid "The sales type description cannot be empty." +#: ../reporting/rep104.php:124 +msgid "Price Listing" msgstr "" -#: c:\Apache2\htdocs\account228/sales/manage/sales_types.php:35 -msgid "Calculation factor must be valid positive number." +#: ../reporting/rep104.php:191 +msgid "Sales Kits" msgstr "" -#: c:\Apache2\htdocs\account228/sales/manage/sales_types.php:48 -msgid "New sales type has been added" +#: ../reporting/rep105.php:101 +msgid "All Orders" msgstr "" -#: c:\Apache2\htdocs\account228/sales/manage/sales_types.php:59 -msgid "Selected sales type has been updated" +#: ../reporting/rep105.php:103 +#: ../reporting/reports_main.php:71 +msgid "Back Orders Only" msgstr "" -#: c:\Apache2\htdocs\account228/sales/manage/sales_types.php:76 -msgid "Cannot delete this sale type because customer transactions have been created using this sales type." +#: ../reporting/rep105.php:107 +#: ../reporting/rep204.php:82 +#: ../sales/inquiry/customer_allocation_inquiry.php:144 +#: ../sales/inquiry/customer_inquiry.php:214 +msgid "Order" msgstr "" -#: c:\Apache2\htdocs\account228/sales/manage/sales_types.php:89 -msgid "Cannot delete this sale type because customers are currently set up to use this sales type." +#: ../reporting/rep105.php:107 +#: ../reporting/rep106.php:81 +#: ../reporting/includes/doctext.inc:163 +#: ../sales/create_recurrent_invoices.php:98 +#: ../sales/customer_credit_invoice.php:247 +#: ../sales/customer_delivery.php:337 +#: ../sales/customer_invoice.php:368 +#: ../sales/manage/recurrent_invoices.php:85 +#: ../sales/view/view_credit.php:58 +#: ../sales/inquiry/customer_inquiry.php:219 +#: ../sales/inquiry/sales_deliveries_view.php:182 +#: ../sales/inquiry/sales_orders_view.php:261 +#: ../sales/inquiry/sales_orders_view.php:275 +#: ../themes/exclusive/renderer.php:289 +msgid "Branch" msgstr "" -#: c:\Apache2\htdocs\account228/sales/manage/sales_types.php:94 -msgid "Selected sales type has been deleted" +#: ../reporting/rep105.php:107 +#: ../reporting/rep106.php:81 +msgid "Customer Ref" msgstr "" -#: c:\Apache2\htdocs\account228/sales/manage/sales_types.php:114 -msgid "Type Name" +#: ../reporting/rep105.php:108 +msgid "Ord Date" msgstr "" -#: c:\Apache2\htdocs\account228/sales/manage/sales_types.php:114 -msgid "Factor" +#: ../reporting/rep105.php:108 +msgid "Del Date" msgstr "" -#: c:\Apache2\htdocs\account228/sales/manage/sales_types.php:114 -msgid "Tax Incl" +#: ../reporting/rep105.php:108 +#: ../reporting/rep401.php:69 +msgid "Loc" msgstr "" -#: c:\Apache2\htdocs\account228/sales/manage/sales_types.php:128 -msgid "Base" +#: ../reporting/rep105.php:112 +#: ../sales/customer_delivery.php:430 +#: ../sales/customer_invoice.php:442 +msgid "Invoiced" msgstr "" -#: c:\Apache2\htdocs\account228/sales/manage/sales_types.php:139 -msgid "Marked sales type is the company base pricelist for prices calculations." +#: ../reporting/rep105.php:119 +msgid "Selection" msgstr "" -#: c:\Apache2\htdocs\account228/sales/manage/sales_types.php:165 -msgid "Sales Type Name" +#: ../reporting/rep105.php:124 +msgid "Order Status Listing" msgstr "" -#: c:\Apache2\htdocs\account228/sales/manage/sales_types.php:166 -msgid "Calculation factor" +#: ../reporting/rep106.php:81 +#: ../sales/inquiry/sales_deliveries_view.php:166 +#: ../sales/inquiry/sales_orders_view.php:142 +msgid "Invoice" msgstr "" -#: c:\Apache2\htdocs\account228/sales/manage/sales_types.php:167 -msgid "Tax included" +#: ../reporting/rep106.php:82 +msgid "Inv Date" msgstr "" -#: c:\Apache2\htdocs\account228/sales/view/view_credit.php:24 -msgid "View Credit Note" +#: ../reporting/rep106.php:82 +#: ../reporting/rep106.php:86 +#: ../reporting/rep106.php:87 +#: ../sales/manage/sales_people.php:99 +#: ../sales/manage/sales_people.php:159 +#: ../sales/manage/sales_people.php:161 +msgid "Provision" msgstr "" -#: c:\Apache2\htdocs\account228/sales/view/view_credit.php:39 -#, php-format -msgid "CREDIT NOTE #%d" +#: ../reporting/rep106.php:86 +msgid "Salesman" msgstr "" -#: c:\Apache2\htdocs\account228/sales/view/view_credit.php:126 -msgid "There are no line items on this credit note." +#: ../reporting/rep106.php:86 +#: ../reporting/includes/header2.inc:98 +#: ../sales/manage/sales_people.php:99 +msgid "Email" msgstr "" -#: c:\Apache2\htdocs\account228/sales/view/view_credit.php:138 -#: c:\Apache2\htdocs\account228/sales/view/view_dispatch.php:156 -#: c:\Apache2\htdocs\account228/sales/view/view_invoice.php:158 -msgid "Shipping" +#: ../reporting/rep106.php:87 +#: ../sales/manage/sales_people.php:99 +msgid "Break Pt." msgstr "" -#: c:\Apache2\htdocs\account228/sales/view/view_credit.php:143 -msgid "TOTAL CREDIT" +#: ../reporting/rep106.php:96 +msgid "Salesman Listing" msgstr "" -#: c:\Apache2\htdocs\account228/sales/view/view_dispatch.php:23 -msgid "View Sales Dispatch" +#: ../reporting/rep107.php:66 +#: ../reporting/rep107.php:100 +#: ../reporting/rep107.php:111 +#: ../reporting/includes/doctext.inc:92 +msgid "INVOICE" msgstr "" -#: c:\Apache2\htdocs\account228/sales/view/view_dispatch.php:43 -#, php-format -msgid "DISPATCH NOTE #%d" +#: ../reporting/rep107.php:105 +#: ../reporting/rep107.php:111 +#: ../reporting/includes/doctext.inc:100 +msgid "CREDIT NOTE" msgstr "" -#: c:\Apache2\htdocs\account228/sales/view/view_dispatch.php:51 -#: c:\Apache2\htdocs\account228/sales/view/view_invoice.php:51 -msgid "Charge To" +#: ../reporting/rep108.php:84 +#: ../reporting/rep108.php:115 +#: ../reporting/includes/doctext.inc:115 +msgid "STATEMENT" msgstr "" -#: c:\Apache2\htdocs\account228/sales/view/view_dispatch.php:65 -#: c:\Apache2\htdocs\account228/sales/view/view_invoice.php:65 -msgid "Charge Branch" +#: ../reporting/rep109.php:65 +#: ../reporting/rep109.php:93 +#: ../reporting/rep109.php:99 +#: ../reporting/includes/doctext.inc:90 +msgid "SALES ORDER" msgstr "" -#: c:\Apache2\htdocs\account228/sales/view/view_dispatch.php:74 -#: c:\Apache2\htdocs\account228/sales/view/view_invoice.php:74 -msgid "Delivered To" +#: ../reporting/rep109.php:67 +#: ../reporting/rep109.php:88 +#: ../reporting/rep109.php:99 +#: ../reporting/includes/doctext.inc:90 +msgid "QUOTE" msgstr "" -#: c:\Apache2\htdocs\account228/sales/view/view_dispatch.php:87 -#: c:\Apache2\htdocs\account228/sales/view/view_invoice.php:87 -msgid "Our Order No" +#: ../reporting/rep110.php:68 +msgid "DELIVERY" msgstr "" -#: c:\Apache2\htdocs\account228/sales/view/view_dispatch.php:91 -#: c:\Apache2\htdocs\account228/sales/view/view_invoice.php:91 -msgid "Customer Order Ref." +#: ../reporting/rep110.php:70 +#: ../reporting/rep110.php:97 +#: ../reporting/includes/doctext.inc:88 +msgid "PACKING SLIP" msgstr "" -#: c:\Apache2\htdocs\account228/sales/view/view_dispatch.php:96 -msgid "Dispatch Date" +#: ../reporting/rep110.php:92 +#: ../reporting/rep110.php:103 +#: ../reporting/includes/doctext.inc:88 +msgid "DELIVERY NOTE" msgstr "" -#: c:\Apache2\htdocs\account228/sales/view/view_dispatch.php:148 -msgid "There are no line items on this dispatch." +#: ../reporting/rep111.php:60 +#: ../reporting/rep111.php:85 +#: ../reporting/includes/doctext.inc:84 +msgid "SALES QUOTATION" msgstr "" -#: c:\Apache2\htdocs\account228/sales/view/view_dispatch.php:163 -msgid "TOTAL VALUE" +#: ../reporting/rep112.php:92 +#: ../reporting/rep112.php:112 +#: ../reporting/includes/doctext.inc:98 +msgid "RECEIPT" msgstr "" -#: c:\Apache2\htdocs\account228/sales/view/view_dispatch.php:167 -msgid "This dispatch has been voided." +#: ../reporting/rep201.php:108 +msgid "Balances in Home currency" msgstr "" -#: c:\Apache2\htdocs\account228/sales/view/view_invoice.php:23 -msgid "View Sales Invoice" +#: ../reporting/rep201.php:129 +msgid "Supplier Balances" msgstr "" -#: c:\Apache2\htdocs\account228/sales/view/view_invoice.php:43 -#, php-format -msgid "SALES INVOICE #%d" +#: ../reporting/rep202.php:131 +msgid "currency" msgstr "" -#: c:\Apache2\htdocs\account228/sales/view/view_invoice.php:150 -msgid "There are no line items on this invoice." +#: ../reporting/rep202.php:132 +msgid "Aged Supplier Analysis" msgstr "" -#: c:\Apache2\htdocs\account228/sales/view/view_receipt.php:24 -msgid "View Customer Payment" +#: ../reporting/rep203.php:102 +msgid "Payment Report" msgstr "" -#: c:\Apache2\htdocs\account228/sales/view/view_receipt.php:33 -#, php-format -msgid "Customer Payment #%d" +#: ../reporting/rep204.php:82 +msgid "Qty Recd" msgstr "" -#: c:\Apache2\htdocs\account228/sales/view/view_receipt.php:38 -msgid "From Customer" +#: ../reporting/rep204.php:82 +msgid "qty Inv" msgstr "" -#: c:\Apache2\htdocs\account228/sales/view/view_receipt.php:39 -msgid "Into Bank Account" +#: ../reporting/rep204.php:83 +msgid "Act Price" msgstr "" -#: c:\Apache2\htdocs\account228/sales/view/view_receipt.php:40 -msgid "Date of Deposit" +#: ../reporting/rep204.php:90 +msgid "Outstanding GRNs Report" msgstr "" -#: c:\Apache2\htdocs\account228/sales/view/view_receipt.php:56 -msgid "This customer payment has been voided." +#: ../reporting/rep209.php:88 +#: ../reporting/rep209.php:107 +#: ../reporting/rep209.php:112 +#: ../reporting/includes/doctext.inc:86 +msgid "PURCHASE ORDER" msgstr "" -#: c:\Apache2\htdocs\account228/sales/view/view_sales_order.php:28 -msgid "View Sales Quotation" +#: ../reporting/rep210.php:94 +#: ../reporting/rep210.php:121 +#: ../reporting/rep210.php:126 +#: ../reporting/includes/doctext.inc:96 +msgid "REMITTANCE" msgstr "" -#: c:\Apache2\htdocs\account228/sales/view/view_sales_order.php:29 -#, php-format -msgid "Sales Quotation #%d" +#: ../reporting/rep301.php:107 +msgid "Inventory Valuation Report" msgstr "" -#: c:\Apache2\htdocs\account228/sales/view/view_sales_order.php:33 -msgid "View Sales Order" +#: ../reporting/rep302.php:123 +msgid "QOH" msgstr "" -#: c:\Apache2\htdocs\account228/sales/view/view_sales_order.php:34 -#, php-format -msgid "Sales Order #%d" +#: ../reporting/rep302.php:123 +msgid "Cust Ord" msgstr "" -#: c:\Apache2\htdocs\account228/sales/view/view_sales_order.php:46 -msgid "Order Information" +#: ../reporting/rep302.php:123 +msgid "Supp Ord" msgstr "" -#: c:\Apache2\htdocs\account228/sales/view/view_sales_order.php:59 -msgid "Customer Name" +#: ../reporting/rep302.php:123 +msgid "Sugg Ord" msgstr "" -#: c:\Apache2\htdocs\account228/sales/view/view_sales_order.php:63 -msgid "Deliver To Branch" +#: ../reporting/rep302.php:132 +msgid "Inventory Planning Report" msgstr "" -#: c:\Apache2\htdocs\account228/sales/view/view_sales_order.php:66 -msgid "Ordered On" +#: ../reporting/rep303.php:97 +msgid "Shortage" msgstr "" -#: c:\Apache2\htdocs\account228/sales/view/view_sales_order.php:70 -msgid "Requested Delivery" +#: ../reporting/rep303.php:109 +#: ../reporting/rep303.php:115 +#: ../reporting/rep305.php:72 +msgid "Stock ID" msgstr "" -#: c:\Apache2\htdocs\account228/sales/view/view_sales_order.php:73 -msgid "Order Currency" +#: ../reporting/rep303.php:109 +msgid "Check" msgstr "" -#: c:\Apache2\htdocs\account228/sales/view/view_sales_order.php:74 -msgid "Deliver From Location" +#: ../reporting/rep303.php:123 +msgid "Only Shortage" msgstr "" -#: c:\Apache2\htdocs\account228/sales/view/view_sales_order.php:77 -msgid "Delivery Address" +#: ../reporting/rep303.php:131 +msgid "Stock Check Sheets" msgstr "" -#: c:\Apache2\htdocs\account228/sales/view/view_sales_order.php:80 -msgid "Telephone" +#: ../reporting/rep304.php:114 +msgid "Qty" msgstr "" -#: c:\Apache2\htdocs\account228/sales/view/view_sales_order.php:91 -msgid "Delivery Notes" +#: ../reporting/rep304.php:114 +#: ../sales/manage/customer_branches.php:240 +#: ../sales/manage/customers.php:224 +msgid "Sales" msgstr "" -#: c:\Apache2\htdocs\account228/sales/view/view_sales_order.php:125 -msgid "Sales Invoices" +#: ../reporting/rep304.php:114 +msgid "Cost" msgstr "" -#: c:\Apache2\htdocs\account228/sales/view/view_sales_order.php:156 -msgid "Credit Notes" +#: ../reporting/rep304.php:114 +msgid "Contribution" msgstr "" -#: c:\Apache2\htdocs\account228/sales/view/view_sales_order.php:196 -msgid "This Sales Order is used as a Template." +#: ../reporting/rep304.php:126 +msgid "Inventory Sales Report" msgstr "" -#: c:\Apache2\htdocs\account228/sales/view/view_sales_order.php:201 -msgid "Quantity Delivered" +#: ../reporting/rep305.php:72 +msgid "PO No" msgstr "" -#: c:\Apache2\htdocs\account228/sales/view/view_sales_order.php:232 -msgid "Total Order Value" +#: ../reporting/rep305.php:72 +msgid "Qty Received" msgstr "" -#: c:\Apache2\htdocs\account228/sql/alter2.1.php:18 -msgid "Upgrade from version 2.0 to 2.1" +#: ../reporting/rep305.php:72 +msgid "Unit Price" msgstr "" -#: c:\Apache2\htdocs\account228/sql/alter2.1.php:35 -msgid "Cannot retrieve bank accounts codes" +#: ../reporting/rep305.php:72 +msgid "Actual Price" msgstr "" -#: c:\Apache2\htdocs\account228/sql/alter2.1.php:43 -msgid "Cannot update bank transactions" +#: ../reporting/rep305.php:79 +msgid "GRN Valuation Report" msgstr "" -#: c:\Apache2\htdocs\account228/sql/alter2.1.php:52 -msgid "Cannot select stock identificators" +#: ../reporting/rep401.php:69 +msgid "Wrk Ctr" msgstr "" -#: c:\Apache2\htdocs\account228/sql/alter2.1.php:63 -msgid "Cannot insert stock id into item_codes" +#: ../reporting/rep401.php:76 +msgid "Bill of Material Listing" msgstr "" -#: c:\Apache2\htdocs\account228/sql/alter2.1.php:139 -msgid "" -"Seems that system upgrade to version 2.1 has \n" -"\t\t\tbeen performed for this company already.
If something has gone \n" -"\t\t\twrong and you want to retry upgrade process you MUST perform \n" -"\t\t\tdatabase restore from last backup file first." +#: ../reporting/rep409.php:60 +#: ../reporting/rep409.php:79 +#: ../reporting/rep409.php:84 +#: ../reporting/includes/doctext.inc:94 +msgid "WORK ORDER" msgstr "" -#: c:\Apache2\htdocs\account228/sql/alter2.2.php:23 -msgid "Upgrade from version 2.1/2.2beta to 2.2" +#: ../reporting/rep409.php:134 +msgid "Insufficient stock" msgstr "" -#: c:\Apache2\htdocs\account228/sql/alter2.2.php:84 -msgid "Cannot query max sales order number." +#: ../reporting/rep409.php:147 +#: ../reporting/includes/doctext.inc:136 +msgid "Work Order No." msgstr "" -#: c:\Apache2\htdocs\account228/sql/alter2.2.php:95 -msgid "Cannot store next sales order reference." +#: ../reporting/rep501.php:85 +msgid "YTD" msgstr "" -#: c:\Apache2\htdocs\account228/sql/alter2.2.php:246 -msgid "Cannot upgrade extensions system: file /modules/installed_modules.php is not writeable" +#: ../reporting/rep501.php:92 +msgid "Dimension Summary" msgstr "" -#: c:\Apache2\htdocs\account228/taxes/item_tax_types.php:17 -msgid "Item Tax Types" +#: ../reporting/rep601.php:83 +#: ../reporting/includes/doctext.inc:70 +msgid "Bank Account" msgstr "" -#: c:\Apache2\htdocs\account228/taxes/item_tax_types.php:35 -msgid "The item tax type description cannot be empty." +#: ../reporting/rep601.php:144 +msgid "Total Debit / Credit" msgstr "" -#: c:\Apache2\htdocs\account228/taxes/item_tax_types.php:60 -msgid "Selected item tax type has been updated" +#: ../reporting/rep601.php:161 +msgid "Net Change" msgstr "" -#: c:\Apache2\htdocs\account228/taxes/item_tax_types.php:65 -msgid "New item tax type has been added" +#: ../reporting/rep702.php:51 +msgid "Type/Account" msgstr "" -#: c:\Apache2\htdocs\account228/taxes/item_tax_types.php:80 -msgid "Cannot delete this item tax type because items have been created referring to it." +#: ../reporting/rep702.php:51 +msgid "Date/Dim." msgstr "" -#: c:\Apache2\htdocs\account228/taxes/item_tax_types.php:96 -msgid "Selected item tax type has been deleted" +#: ../reporting/rep702.php:52 +msgid "Person/Item/Memo" msgstr "" -#: c:\Apache2\htdocs\account228/taxes/item_tax_types.php:115 -msgid "Tax exempt" +#: ../reporting/rep702.php:62 +msgid "List of Journal Entries" msgstr "" -#: c:\Apache2\htdocs\account228/taxes/item_tax_types.php:173 -msgid "Is Fully Tax-exempt:" +#: ../reporting/rep704.php:66 +msgid "GL Account Transactions" msgstr "" -#: c:\Apache2\htdocs\account228/taxes/item_tax_types.php:180 -msgid "Select which taxes this item tax type is exempt from." +#: ../reporting/rep705.php:243 +#: ../reporting/rep705.php:256 +#: ../reporting/rep705.php:267 +#: ../reporting/reports_main.php:260 +#: ../reporting/reports_main.php:308 +#: ../reporting/reports_main.php:351 +msgid "Year" msgstr "" -#: c:\Apache2\htdocs\account228/taxes/item_tax_types.php:183 -msgid "Tax Name" +#: ../reporting/rep705.php:249 +#: ../reporting/rep705.php:260 +#: ../reporting/rep705.php:269 +#: ../reporting/rep706.php:194 +#: ../reporting/rep706.php:202 +#: ../reporting/rep706.php:208 +#: ../reporting/rep707.php:218 +#: ../reporting/rep707.php:226 +#: ../reporting/rep707.php:232 +msgid "Tags" msgstr "" -#: c:\Apache2\htdocs\account228/taxes/item_tax_types.php:183 -msgid "Is exempt" +#: ../reporting/rep705.php:250 +#: ../reporting/rep705.php:261 +#: ../reporting/rep705.php:270 +msgid "Amounts in thousands" msgstr "" -#: c:\Apache2\htdocs\account228/taxes/tax_groups.php:17 -msgid "Tax Groups" +#: ../reporting/rep705.php:274 +msgid "Annual Expense Breakdown" msgstr "" -#: c:\Apache2\htdocs\account228/taxes/tax_groups.php:27 -msgid "There are no tax types defined. Define tax types before defining tax groups." +#: ../reporting/rep706.php:182 +msgid "Close Balance" msgstr "" -#: c:\Apache2\htdocs\account228/taxes/tax_groups.php:40 -msgid "The tax group name cannot be empty." +#: ../reporting/rep706.php:302 +#: ../reporting/rep707.php:320 +#: ../sales/create_recurrent_invoices.php:98 +#: ../sales/manage/recurrent_invoices.php:85 +msgid "Group" msgstr "" -#: c:\Apache2\htdocs\account228/taxes/tax_groups.php:84 -msgid "Selected tax group has been updated" +#: ../reporting/rep707.php:254 +msgid "Profit and Loss Statement" msgstr "" -#: c:\Apache2\htdocs\account228/taxes/tax_groups.php:89 -msgid "New tax group has been added" +#: ../reporting/rep709.php:89 +msgid "Tax Report" msgstr "" -#: c:\Apache2\htdocs\account228/taxes/tax_groups.php:107 -msgid "Cannot delete this tax group because customer branches been created referring to it." +#: ../reporting/rep709.php:107 +msgid "Branch Name" msgstr "" -#: c:\Apache2\htdocs\account228/taxes/tax_groups.php:116 -msgid "Cannot delete this tax group because suppliers been created referring to it." +#: ../reporting/rep709.php:108 +msgid "Net" msgstr "" -#: c:\Apache2\htdocs\account228/taxes/tax_groups.php:133 -msgid "Selected tax group has been deleted" +#: ../reporting/rep709.php:108 +#: ../taxes/item_tax_types.php:180 +msgid "Rate" msgstr "" -#: c:\Apache2\htdocs\account228/taxes/tax_groups.php:151 -msgid "Tax Shipping" +#: ../reporting/rep709.php:108 +#: ../taxes/tax_groups.php:213 +msgid "Tax" msgstr "" -#: c:\Apache2\htdocs\account228/taxes/tax_groups.php:209 -msgid "Tax Shipping:" +#: ../reporting/rep709.php:168 +msgid "Tax Rate" msgstr "" -#: c:\Apache2\htdocs\account228/taxes/tax_groups.php:213 -msgid "Select the taxes that are included in this group." +#: ../reporting/rep709.php:168 +msgid "Net Tax" msgstr "" -#: c:\Apache2\htdocs\account228/taxes/tax_groups.php:218 -msgid "Rate (%)" +#: ../reporting/rep710.php:75 +msgid "Time" msgstr "" -#: c:\Apache2\htdocs\account228/taxes/tax_types.php:16 -msgid "Tax Types" +#: ../reporting/rep710.php:75 +msgid "Trans Date" msgstr "" -#: c:\Apache2\htdocs\account228/taxes/tax_types.php:30 -msgid "The tax type name cannot be empty." +#: ../reporting/rep710.php:76 +msgid "Action" msgstr "" -#: c:\Apache2\htdocs\account228/taxes/tax_types.php:36 -msgid "The default tax rate must be numeric and not less than zero." +#: ../reporting/rep710.php:87 +#: ../reporting/reports_main.php:386 +msgid "Audit Trail" msgstr "" -#: c:\Apache2\htdocs\account228/taxes/tax_types.php:42 -msgid "Selected GL Accounts cannot be used by another tax type." +#: ../reporting/rep710.php:107 +msgid "Changed" msgstr "" -#: c:\Apache2\htdocs\account228/taxes/tax_types.php:56 -msgid "New tax type has been added" +#: ../reporting/reports_main.php:26 +msgid "Reports and Analysis" msgstr "" -#: c:\Apache2\htdocs\account228/taxes/tax_types.php:67 -msgid "Selected tax type has been updated" +#: ../reporting/reports_main.php:33 +msgid "Customer &Balances" msgstr "" -#: c:\Apache2\htdocs\account228/taxes/tax_types.php:80 -msgid "Cannot delete this tax type because tax groups been created referring to it." +#: ../reporting/reports_main.php:37 +#: ../reporting/reports_main.php:44 +#: ../reporting/reports_main.php:59 +#: ../reporting/reports_main.php:83 +#: ../reporting/reports_main.php:95 +#: ../reporting/reports_main.php:102 +#: ../reporting/reports_main.php:109 +#: ../reporting/reports_main.php:115 +#: ../reporting/reports_main.php:121 +#: ../reporting/reports_main.php:129 +#: ../reporting/reports_main.php:136 +#: ../reporting/reports_main.php:145 +#: ../reporting/reports_main.php:156 +#: ../reporting/reports_main.php:162 +msgid "Currency Filter" msgstr "" -#: c:\Apache2\htdocs\account228/taxes/tax_types.php:97 -msgid "Selected tax type has been deleted" +#: ../reporting/reports_main.php:40 +#: ../reporting/reports_main.php:49 +#: ../reporting/reports_main.php:57 +#: ../reporting/reports_main.php:65 +#: ../reporting/reports_main.php:73 +#: ../reporting/reports_main.php:79 +#: ../reporting/reports_main.php:132 +#: ../reporting/reports_main.php:141 +#: ../reporting/reports_main.php:148 +#: ../reporting/reports_main.php:152 +#: ../reporting/reports_main.php:173 +#: ../reporting/reports_main.php:178 +#: ../reporting/reports_main.php:187 +#: ../reporting/reports_main.php:195 +#: ../reporting/reports_main.php:200 +#: ../reporting/reports_main.php:207 +#: ../reporting/reports_main.php:221 +#: ../reporting/reports_main.php:232 +#: ../reporting/reports_main.php:238 +#: ../reporting/reports_main.php:244 +#: ../reporting/reports_main.php:258 +#: ../reporting/reports_main.php:265 +#: ../reporting/reports_main.php:275 +#: ../reporting/reports_main.php:286 +#: ../reporting/reports_main.php:295 +#: ../reporting/reports_main.php:306 +#: ../reporting/reports_main.php:312 +#: ../reporting/reports_main.php:321 +#: ../reporting/reports_main.php:331 +#: ../reporting/reports_main.php:339 +#: ../reporting/reports_main.php:349 +#: ../reporting/reports_main.php:354 +#: ../reporting/reports_main.php:362 +#: ../reporting/reports_main.php:371 +#: ../reporting/reports_main.php:378 +#: ../reporting/reports_main.php:385 +#: ../reporting/reports_main.php:392 +msgid "Destination" msgstr "" -#: c:\Apache2\htdocs\account228/taxes/tax_types.php:115 -msgid "To avoid problems with manual journal entry all tax types should have unique Sales/Purchasing GL accounts." +#: ../reporting/reports_main.php:41 +msgid "&Aged Customer Analysis" msgstr "" -#: c:\Apache2\htdocs\account228/taxes/tax_types.php:118 -msgid "Default Rate (%)" +#: ../reporting/reports_main.php:47 +#: ../reporting/reports_main.php:139 +#: ../reporting/reports_main.php:273 +#: ../reporting/reports_main.php:284 +#: ../reporting/reports_main.php:319 +#: ../reporting/reports_main.php:329 +#: ../reporting/reports_main.php:360 +#: ../reporting/reports_main.php:369 +msgid "Graphics" msgstr "" -#: c:\Apache2\htdocs\account228/taxes/tax_types.php:119 -msgid "Sales GL Account" +#: ../reporting/reports_main.php:50 +msgid "Customer &Detail Listing" msgstr "" -#: c:\Apache2\htdocs\account228/taxes/tax_types.php:119 -msgid "Purchasing GL Account" +#: ../reporting/reports_main.php:54 +msgid "Activity Greater Than" msgstr "" -#: c:\Apache2\htdocs\account228/taxes/tax_types.php:162 -msgid "Default Rate:" +#: ../reporting/reports_main.php:55 +msgid "Activity Less Than" msgstr "" -#: c:\Apache2\htdocs\account228/taxes/tax_types.php:164 -msgid "Sales GL Account:" +#: ../reporting/reports_main.php:58 +msgid "&Price Listing" msgstr "" -#: c:\Apache2\htdocs\account228/taxes/tax_types.php:165 -msgid "Purchasing GL Account:" +#: ../reporting/reports_main.php:60 +#: ../reporting/reports_main.php:69 +#: ../reporting/reports_main.php:169 +#: ../reporting/reports_main.php:175 +#: ../reporting/reports_main.php:180 +#: ../reporting/reports_main.php:191 +msgid "Inventory Category" msgstr "" -#: c:\Apache2\htdocs\account228/themes/aqua/renderer.php:16 -#: c:\Apache2\htdocs\account228/themes/cool/renderer.php:16 -#: c:\Apache2\htdocs\account228/themes/default/renderer.php:17 -msgid "Main Menu" +#: ../reporting/reports_main.php:61 +#: ../sales/manage/sales_types.php:16 +msgid "Sales Types" msgstr "" -#: c:\Apache2\htdocs\account228/themes/aqua/renderer.php:46 -#: c:\Apache2\htdocs\account228/themes/aqua/renderer.php:70 -#: c:\Apache2\htdocs\account228/themes/cool/renderer.php:46 -#: c:\Apache2\htdocs\account228/themes/cool/renderer.php:70 -#: c:\Apache2\htdocs\account228/themes/default/renderer.php:47 -#: c:\Apache2\htdocs\account228/themes/default/renderer.php:71 -msgid "Help" +#: ../reporting/reports_main.php:62 +#: ../reporting/reports_main.php:182 +msgid "Show Pictures" msgstr "" -#: c:\Apache2\htdocs\account228/themes/aqua/renderer.php:65 -#: c:\Apache2\htdocs\account228/themes/cool/renderer.php:65 -#: c:\Apache2\htdocs\account228/themes/default/renderer.php:66 -msgid "Preferences" +#: ../reporting/reports_main.php:66 +msgid "&Order Status Listing" msgstr "" -#: c:\Apache2\htdocs\account228/admin/db/maintenance_db.inc:184 -#, php-format -msgid "Cannot open the extension setup file '%s' for writing." +#: ../reporting/reports_main.php:70 +msgid "Stock Location" msgstr "" -#: c:\Apache2\htdocs\account228/admin/db/maintenance_db.inc:192 -#, php-format -msgid "Cannot write to the extensions setup file '%s'." +#: ../reporting/reports_main.php:74 +msgid "&Salesman Listing" msgstr "" -#: c:\Apache2\htdocs\account228/admin/db/maintenance_db.inc:248 -msgid "Cannot open the languages file - " +#: ../reporting/reports_main.php:80 +msgid "Print &Invoices/Credit Notes" msgstr "" -#: c:\Apache2\htdocs\account228/admin/db/maintenance_db.inc:255 -msgid "Cannot write to the language file - " +#: ../reporting/reports_main.php:84 +#: ../reporting/reports_main.php:90 +msgid "email Customers" msgstr "" -#: c:\Apache2\htdocs\account228/admin/db/maintenance_db.inc:265 -msgid "The language files folder " +#: ../reporting/reports_main.php:85 +msgid "Payment Link" msgstr "" -#: c:\Apache2\htdocs\account228/admin/db/maintenance_db.inc:431 -#, php-format -msgid "SQL script execution failed in line %d: %s" +#: ../reporting/reports_main.php:87 +msgid "Print &Deliveries" msgstr "" -#: c:\Apache2\htdocs\account228/admin/db/users_db.inc:216 -msgid "user online" +#: ../reporting/reports_main.php:91 +msgid "Print as Packing Slip" msgstr "" -#: c:\Apache2\htdocs\account228/admin/db/users_db.inc:216 -msgid "users online" +#: ../reporting/reports_main.php:93 +msgid "Print &Statements" msgstr "" -#: c:\Apache2\htdocs\account228/admin/db/voiding_db.inc:109 -msgid "Voided." +#: ../reporting/reports_main.php:96 +msgid "Show Outstanding Only" msgstr "" -#: c:\Apache2\htdocs\account228/dimensions/includes/dimensions_ui.inc:31 -msgid "There are no transactions for this dimension for the selected period." +#: ../reporting/reports_main.php:97 +#: ../reporting/reports_main.php:103 +#: ../reporting/reports_main.php:110 +#: ../reporting/reports_main.php:116 +#: ../reporting/reports_main.php:157 +#: ../reporting/reports_main.php:163 +msgid "Email Customers" msgstr "" -#: c:\Apache2\htdocs\account228/dimensions/includes/dimensions_ui.inc:35 -msgid "Balance for this Dimension" +#: ../reporting/reports_main.php:99 +msgid "&Print Sales Orders" msgstr "" -#: c:\Apache2\htdocs\account228/gl/includes/db/gl_db_banking.inc:46 -#: c:\Apache2\htdocs\account228/gl/includes/db/gl_db_banking.inc:49 -msgid "Exchange Variance" +#: ../reporting/reports_main.php:104 +msgid "Print as Quote" msgstr "" -#: c:\Apache2\htdocs\account228/gl/includes/ui/gl_bank_ui.inc:50 -msgid "Pay To:" +#: ../reporting/reports_main.php:106 +#: ../reporting/reports_main.php:112 +msgid "&Print Sales Quotations" msgstr "" -#: c:\Apache2\htdocs\account228/gl/includes/ui/gl_bank_ui.inc:55 -msgid "To the Order of:" +#: ../reporting/reports_main.php:118 +msgid "Print Receipts" msgstr "" -#: c:\Apache2\htdocs\account228/gl/includes/ui/gl_bank_ui.inc:87 -#: c:\Apache2\htdocs\account228/gl/includes/ui/gl_journal_ui.inc:53 -msgid "Go" +#: ../reporting/reports_main.php:125 +msgid "Supplier &Balances" msgstr "" -#: c:\Apache2\htdocs\account228/gl/includes/ui/gl_bank_ui.inc:159 -msgid "Edit document line" +#: ../reporting/reports_main.php:133 +msgid "&Aged Supplier Analyses" msgstr "" -#: c:\Apache2\htdocs\account228/gl/includes/ui/gl_bank_ui.inc:161 -msgid "Remove line from document" +#: ../reporting/reports_main.php:142 +msgid "&Payment Report" msgstr "" -#: c:\Apache2\htdocs\account228/gl/includes/ui/gl_bank_ui.inc:250 -#: c:\Apache2\htdocs\account228/gl/includes/ui/gl_journal_ui.inc:213 -msgid "Confirm changes" +#: ../reporting/reports_main.php:149 +msgid "Outstanding &GRNs Report" msgstr "" -#: c:\Apache2\htdocs\account228/gl/includes/ui/gl_bank_ui.inc:252 -#: c:\Apache2\htdocs\account228/gl/includes/ui/gl_journal_ui.inc:215 -msgid "Cancel changes" +#: ../reporting/reports_main.php:153 +msgid "Print Purchase &Orders" msgstr "" -#: c:\Apache2\htdocs\account228/gl/includes/ui/gl_bank_ui.inc:257 -#: c:\Apache2\htdocs\account228/gl/includes/ui/gl_journal_ui.inc:219 -msgid "Add Item" +#: ../reporting/reports_main.php:159 +msgid "Print Remittances" msgstr "" -#: c:\Apache2\htdocs\account228/gl/includes/ui/gl_bank_ui.inc:258 -msgid "Add new item to document" +#: ../reporting/reports_main.php:168 +msgid "Inventory &Valuation Report" msgstr "" -#: c:\Apache2\htdocs\account228/gl/includes/ui/gl_journal_ui.inc:38 -msgid "Reverse Transaction:" +#: ../reporting/reports_main.php:174 +msgid "Inventory &Planning Report" msgstr "" -#: c:\Apache2\htdocs\account228/gl/includes/ui/gl_journal_ui.inc:46 -msgid "Quick Entry" +#: ../reporting/reports_main.php:179 +msgid "Stock &Check Sheets" msgstr "" -#: c:\Apache2\htdocs\account228/gl/includes/ui/gl_journal_ui.inc:114 -msgid "Edit journal line" +#: ../reporting/reports_main.php:183 +msgid "Inventory Column" msgstr "" -#: c:\Apache2\htdocs\account228/gl/includes/ui/gl_journal_ui.inc:116 -msgid "Remove line from journal" +#: ../reporting/reports_main.php:184 +msgid "Show Shortage" msgstr "" -#: c:\Apache2\htdocs\account228/gl/includes/ui/gl_journal_ui.inc:220 -msgid "Add new line to journal" +#: ../reporting/reports_main.php:188 +msgid "Inventory &Sales Report" msgstr "" -#: c:\Apache2\htdocs\account228/includes/access_levels.inc:56 -msgid "System administration" +#: ../reporting/reports_main.php:196 +msgid "&GRN Valuation Report" msgstr "" -#: c:\Apache2\htdocs\account228/includes/access_levels.inc:57 -msgid "Company setup" +#: ../reporting/reports_main.php:202 +msgid "Manufacturing" msgstr "" -#: c:\Apache2\htdocs\account228/includes/access_levels.inc:58 -msgid "Special maintenance" +#: ../reporting/reports_main.php:203 +msgid "&Bill of Material Listing" msgstr "" -#: c:\Apache2\htdocs\account228/includes/access_levels.inc:59 -msgid "Sales configuration" +#: ../reporting/reports_main.php:204 +msgid "From product" msgstr "" -#: c:\Apache2\htdocs\account228/includes/access_levels.inc:60 -msgid "Sales transactions" +#: ../reporting/reports_main.php:205 +msgid "To product" msgstr "" -#: c:\Apache2\htdocs\account228/includes/access_levels.inc:61 -msgid "Sales related reports" +#: ../reporting/reports_main.php:208 +msgid "Print &Work Orders" msgstr "" -#: c:\Apache2\htdocs\account228/includes/access_levels.inc:62 -msgid "Purchase configuration" +#: ../reporting/reports_main.php:211 +msgid "Email Locations" msgstr "" -#: c:\Apache2\htdocs\account228/includes/access_levels.inc:63 -msgid "Purchase transactions" +#: ../reporting/reports_main.php:216 +msgid "Dimension &Summary" msgstr "" -#: c:\Apache2\htdocs\account228/includes/access_levels.inc:64 -msgid "Purchase analytics" +#: ../reporting/reports_main.php:217 +msgid "From Dimension" msgstr "" -#: c:\Apache2\htdocs\account228/includes/access_levels.inc:65 -msgid "Inventory configuration" +#: ../reporting/reports_main.php:218 +msgid "To Dimension" msgstr "" -#: c:\Apache2\htdocs\account228/includes/access_levels.inc:66 -msgid "Inventory operations" +#: ../reporting/reports_main.php:219 +msgid "Show Balance" msgstr "" -#: c:\Apache2\htdocs\account228/includes/access_levels.inc:67 -msgid "Inventory analytics" +#: ../reporting/reports_main.php:226 +msgid "Banking" msgstr "" -#: c:\Apache2\htdocs\account228/includes/access_levels.inc:68 -msgid "Manufacturing configuration" +#: ../reporting/reports_main.php:227 +msgid "Bank &Statement" msgstr "" -#: c:\Apache2\htdocs\account228/includes/access_levels.inc:69 -msgid "Manufacturing transations" +#: ../reporting/reports_main.php:234 +msgid "General Ledger" msgstr "" -#: c:\Apache2\htdocs\account228/includes/access_levels.inc:70 -msgid "Manufacturing analytics" +#: ../reporting/reports_main.php:235 +msgid "Chart of &Accounts" msgstr "" -#: c:\Apache2\htdocs\account228/includes/access_levels.inc:71 -msgid "Dimensions configuration" +#: ../reporting/reports_main.php:236 +msgid "Show Balances" msgstr "" -#: c:\Apache2\htdocs\account228/includes/access_levels.inc:73 -msgid "Banking & GL configuration" +#: ../reporting/reports_main.php:239 +msgid "List of &Journal Entries" msgstr "" -#: c:\Apache2\htdocs\account228/includes/access_levels.inc:74 -msgid "Banking & GL transactions" +#: ../reporting/reports_main.php:250 +#: ../reporting/reports_main.php:299 +#: ../reporting/reports_main.php:343 +msgid "GL Account &Transactions" msgstr "" -#: c:\Apache2\htdocs\account228/includes/access_levels.inc:75 -msgid "Banking & GL analytics" +#: ../reporting/reports_main.php:253 +#: ../reporting/reports_main.php:302 +#: ../reporting/reports_main.php:346 +msgid "From Account" msgstr "" -#: c:\Apache2\htdocs\account228/includes/access_levels.inc:93 -msgid "Install/update companies" +#: ../reporting/reports_main.php:254 +#: ../reporting/reports_main.php:303 +#: ../reporting/reports_main.php:347 +msgid "To Account" msgstr "" -#: c:\Apache2\htdocs\account228/includes/access_levels.inc:94 -msgid "Install/update languages" +#: ../reporting/reports_main.php:259 +#: ../reporting/reports_main.php:307 +#: ../reporting/reports_main.php:350 +msgid "Annual &Expense Breakdown" msgstr "" -#: c:\Apache2\htdocs\account228/includes/access_levels.inc:95 -msgid "Install/upgrade modules" +#: ../reporting/reports_main.php:266 +#: ../reporting/reports_main.php:313 +#: ../reporting/reports_main.php:355 +msgid "&Balance Sheet" msgstr "" -#: c:\Apache2\htdocs\account228/includes/access_levels.inc:96 -msgid "Software upgrades" +#: ../reporting/reports_main.php:272 +#: ../reporting/reports_main.php:283 +#: ../reporting/reports_main.php:318 +#: ../reporting/reports_main.php:328 +#: ../reporting/reports_main.php:359 +#: ../reporting/reports_main.php:368 +msgid "Decimal values" msgstr "" -#: c:\Apache2\htdocs\account228/includes/access_levels.inc:100 -msgid "Company parameters" +#: ../reporting/reports_main.php:276 +#: ../reporting/reports_main.php:322 +#: ../reporting/reports_main.php:363 +msgid "&Profit and Loss Statement" msgstr "" -#: c:\Apache2\htdocs\account228/includes/access_levels.inc:101 -msgid "Access levels edition" +#: ../reporting/reports_main.php:290 +#: ../reporting/reports_main.php:335 +#: ../reporting/reports_main.php:375 +msgid "Zero values" msgstr "" -#: c:\Apache2\htdocs\account228/includes/access_levels.inc:102 -msgid "Users setup" +#: ../reporting/reports_main.php:380 +msgid "Ta&x Report" msgstr "" -#: c:\Apache2\htdocs\account228/includes/access_levels.inc:103 -msgid "Point of sales definitions" +#: ../reporting/includes/doctext.inc:14 +msgid "Cust no" msgstr "" -#: c:\Apache2\htdocs\account228/includes/access_levels.inc:104 -msgid "Printers configuration" +#: ../reporting/includes/doctext.inc:18 +msgid "Order To" msgstr "" -#: c:\Apache2\htdocs\account228/includes/access_levels.inc:105 -msgid "Print profiles" +#: ../reporting/includes/doctext.inc:20 +msgid "Deliver To" msgstr "" -#: c:\Apache2\htdocs\account228/includes/access_levels.inc:106 -msgid "Payment terms" +#: ../reporting/includes/doctext.inc:22 +#: ../reporting/includes/doctext.inc:29 +#: ../sales/view/view_dispatch.php:51 +#: ../sales/view/view_invoice.php:51 +msgid "Charge To" msgstr "" -#: c:\Apache2\htdocs\account228/includes/access_levels.inc:107 -msgid "Shipping ways" +#: ../reporting/includes/doctext.inc:27 +msgid "With thanks from" msgstr "" -#: c:\Apache2\htdocs\account228/includes/access_levels.inc:108 -msgid "Credit status definitions changes" +#: ../reporting/includes/doctext.inc:30 +#: ../sales/view/view_dispatch.php:74 +msgid "Delivered To" msgstr "" -#: c:\Apache2\htdocs\account228/includes/access_levels.inc:109 -msgid "Inventory locations changes" +#: ../reporting/includes/doctext.inc:34 +#: ../sales/view/view_sales_order.php:68 +#: ../sales/inquiry/sales_orders_view.php:278 +#: ../sales/includes/ui/sales_order_ui.inc:606 +msgid "Valid until" msgstr "" -#: c:\Apache2\htdocs\account228/includes/access_levels.inc:110 -msgid "Inventory movement types" +#: ../reporting/includes/doctext.inc:39 +msgid "Your Ref" msgstr "" -#: c:\Apache2\htdocs\account228/includes/access_levels.inc:111 -msgid "Manufacture work centres" +#: ../reporting/includes/doctext.inc:54 +#: ../sales/manage/customer_branches.php:296 +msgid "Sales Person" msgstr "" -#: c:\Apache2\htdocs\account228/includes/access_levels.inc:112 -msgid "Forms setup" +#: ../reporting/includes/doctext.inc:55 +msgid "Your VAT no." msgstr "" -#: c:\Apache2\htdocs\account228/includes/access_levels.inc:116 -msgid "Voiding transactions" +#: ../reporting/includes/doctext.inc:57 +msgid "Customers Reference" msgstr "" -#: c:\Apache2\htdocs\account228/includes/access_levels.inc:117 -msgid "Database backup/restore" +#: ../reporting/includes/doctext.inc:58 +#: ../sales/view/view_dispatch.php:87 +#: ../sales/view/view_invoice.php:86 +msgid "Our Order No" msgstr "" -#: c:\Apache2\htdocs\account228/includes/access_levels.inc:118 -msgid "Common view/print transactions interface" +#: ../reporting/includes/doctext.inc:60 +msgid "Our VAT No." msgstr "" -#: c:\Apache2\htdocs\account228/includes/access_levels.inc:119 -msgid "Attaching documents" +#: ../reporting/includes/doctext.inc:61 +msgid "Domicile" msgstr "" -#: c:\Apache2\htdocs\account228/includes/access_levels.inc:120 -msgid "Display preferences" +#: ../reporting/includes/doctext.inc:66 +msgid "* Subject to Realisation of the Cheque." msgstr "" -#: c:\Apache2\htdocs\account228/includes/access_levels.inc:121 -msgid "Password changes" +#: ../reporting/includes/doctext.inc:68 +msgid "All amounts stated in" msgstr "" -#: c:\Apache2\htdocs\account228/includes/access_levels.inc:126 -msgid "Sales types" +#: ../reporting/includes/doctext.inc:72 +msgid "Please quote Invoice no. when paying. All amounts stated in" msgstr "" -#: c:\Apache2\htdocs\account228/includes/access_levels.inc:127 -msgid "Sales prices edition" +#: ../reporting/includes/doctext.inc:73 +msgid "Please quote Credit no. when paying. All amounts stated in" msgstr "" -#: c:\Apache2\htdocs\account228/includes/access_levels.inc:128 -msgid "Sales staff maintenance" +#: ../reporting/includes/doctext.inc:76 +msgid "Phone/Fax/Email" msgstr "" -#: c:\Apache2\htdocs\account228/includes/access_levels.inc:129 -msgid "Sales areas maintenance" +#: ../reporting/includes/doctext.inc:78 +#: ../reporting/includes/doctext.inc:125 +msgid "You can pay through" msgstr "" -#: c:\Apache2\htdocs\account228/includes/access_levels.inc:130 -msgid "Sales groups changes" +#: ../reporting/includes/doctext.inc:111 +#: ../sales/customer_credit_invoice.php:292 +#: ../sales/view/view_credit.php:91 +#: ../sales/view/view_dispatch.php:113 +#: ../sales/view/view_invoice.php:114 +#: ../sales/includes/ui/sales_credit_ui.inc:168 +#: ../sales/includes/ui/sales_order_ui.inc:143 +msgid "Discount %" msgstr "" -#: c:\Apache2\htdocs\account228/includes/access_levels.inc:131 -msgid "Sales templates" +#: ../reporting/includes/doctext.inc:116 +msgid "DueDate" msgstr "" -#: c:\Apache2\htdocs\account228/includes/access_levels.inc:132 -msgid "Recurrent invoices definitions" +#: ../reporting/includes/doctext.inc:122 +msgid "Dear" msgstr "" -#: c:\Apache2\htdocs\account228/includes/access_levels.inc:134 -msgid "Sales transactions view" +#: ../reporting/includes/doctext.inc:123 +msgid "Attached you will find " msgstr "" -#: c:\Apache2\htdocs\account228/includes/access_levels.inc:135 -msgid "Sales customer and branches changes" +#: ../reporting/includes/doctext.inc:124 +msgid "Kindest regards" msgstr "" -#: c:\Apache2\htdocs\account228/includes/access_levels.inc:136 -msgid "Sales quotations" +#: ../reporting/includes/doctext.inc:129 +#: ../reporting/includes/doctext.inc:138 +msgid "Delivery Note No." msgstr "" -#: c:\Apache2\htdocs\account228/includes/access_levels.inc:137 -msgid "Sales orders edition" +#: ../reporting/includes/doctext.inc:130 +msgid "Receipt No." msgstr "" -#: c:\Apache2\htdocs\account228/includes/access_levels.inc:138 -msgid "Sales deliveries edition" +#: ../reporting/includes/doctext.inc:131 +msgid "Remittance No." msgstr "" -#: c:\Apache2\htdocs\account228/includes/access_levels.inc:139 -msgid "Sales invoices edition" +#: ../reporting/includes/doctext.inc:132 +msgid "Purchase Order No." msgstr "" -#: c:\Apache2\htdocs\account228/includes/access_levels.inc:140 -msgid "Sales credit notes against invoice" +#: ../reporting/includes/doctext.inc:133 +#: ../reporting/includes/doctext.inc:139 +msgid "Order No." msgstr "" -#: c:\Apache2\htdocs\account228/includes/access_levels.inc:141 -msgid "Sales freehand credit notes" +#: ../reporting/includes/doctext.inc:134 +msgid "Quotation No." msgstr "" -#: c:\Apache2\htdocs\account228/includes/access_levels.inc:142 -msgid "Customer payments entry" +#: ../reporting/includes/doctext.inc:135 +msgid "Invoice No." msgstr "" -#: c:\Apache2\htdocs\account228/includes/access_levels.inc:143 -msgid "Customer payments allocation" +#: ../reporting/includes/doctext.inc:136 +msgid "Credit No." msgstr "" -#: c:\Apache2\htdocs\account228/includes/access_levels.inc:145 -msgid "Sales analytical reports" +#: ../reporting/includes/doctext.inc:148 +#: ../sales/view/view_credit.php:138 +#: ../sales/view/view_dispatch.php:155 +#: ../sales/view/view_invoice.php:157 +#: ../sales/view/view_sales_order.php:226 +#: ../sales/includes/ui/sales_credit_ui.inc:222 +msgid "Shipping" msgstr "" -#: c:\Apache2\htdocs\account228/includes/access_levels.inc:146 -msgid "Sales document bulk reports" +#: ../reporting/includes/doctext.inc:151 +#: ../sales/view/view_credit.php:143 +msgid "TOTAL CREDIT" msgstr "" -#: c:\Apache2\htdocs\account228/includes/access_levels.inc:147 -msgid "Sales prices listing" +#: ../reporting/includes/doctext.inc:152 +msgid "TOTAL ORDER EX VAT" msgstr "" -#: c:\Apache2\htdocs\account228/includes/access_levels.inc:148 -msgid "Sales staff listing" +#: ../reporting/includes/doctext.inc:153 +msgid "TOTAL ORDER VAT INCL." msgstr "" -#: c:\Apache2\htdocs\account228/includes/access_levels.inc:149 -msgid "Customer bulk listing" +#: ../reporting/includes/doctext.inc:154 +msgid "TOTAL PO" msgstr "" -#: c:\Apache2\htdocs\account228/includes/access_levels.inc:150 -msgid "Customer status report" +#: ../reporting/includes/doctext.inc:155 +msgid "TOTAL DELIVERY INCL. VAT" msgstr "" -#: c:\Apache2\htdocs\account228/includes/access_levels.inc:151 -msgid "Customer payments report" +#: ../reporting/includes/doctext.inc:159 +msgid "As advance / full / part / payment towards:" msgstr "" -#: c:\Apache2\htdocs\account228/includes/access_levels.inc:156 -msgid "Purchase price changes" +#: ../reporting/includes/doctext.inc:160 +msgid "By Cash / Cheque* / Draft No." msgstr "" -#: c:\Apache2\htdocs\account228/includes/access_levels.inc:158 -msgid "Supplier transactions view" +#: ../reporting/includes/doctext.inc:161 +msgid "Dated" msgstr "" -#: c:\Apache2\htdocs\account228/includes/access_levels.inc:159 -msgid "Suppliers changes" +#: ../reporting/includes/doctext.inc:162 +msgid "Drawn on Bank" msgstr "" -#: c:\Apache2\htdocs\account228/includes/access_levels.inc:160 -msgid "Purchase order entry" +#: ../reporting/includes/doctext.inc:164 +msgid "Received / Sign" msgstr "" -#: c:\Apache2\htdocs\account228/includes/access_levels.inc:161 -msgid "Purchase receive" +#: ../reporting/includes/doctext.inc:168 +msgid "TOTAL RECEIPT" msgstr "" -#: c:\Apache2\htdocs\account228/includes/access_levels.inc:162 -msgid "Supplier invoices" +#: ../reporting/includes/doctext.inc:170 +msgid "TOTAL REMITTANCE" msgstr "" -#: c:\Apache2\htdocs\account228/includes/access_levels.inc:163 -msgid "Deleting GRN items during invoice entry" +#: ../reporting/includes/doctext.inc:174 +msgid "Outstanding Transactions" msgstr "" -#: c:\Apache2\htdocs\account228/includes/access_levels.inc:164 -msgid "Supplier credit notes" +#: ../reporting/includes/doctext.inc:177 +msgid "Statement" msgstr "" -#: c:\Apache2\htdocs\account228/includes/access_levels.inc:165 -msgid "Supplier payments" +#: ../reporting/includes/doctext.inc:178 +msgid "as of" msgstr "" -#: c:\Apache2\htdocs\account228/includes/access_levels.inc:166 -msgid "Supplier payments allocations" +#: ../reporting/includes/excel_report.inc:67 +#: ../reporting/includes/pdf_report.inc:80 +msgid "" +"The security settings on your account do not permit you to print this report" msgstr "" -#: c:\Apache2\htdocs\account228/includes/access_levels.inc:168 -msgid "Supplier analytical reports" +#: ../reporting/includes/excel_report.inc:262 +#: ../reporting/includes/pdf_report.inc:316 +msgid "Print Out Date" msgstr "" -#: c:\Apache2\htdocs\account228/includes/access_levels.inc:169 -msgid "Supplier document bulk reports" +#: ../reporting/includes/excel_report.inc:268 +#: ../reporting/includes/pdf_report.inc:325 +msgid "Fiscal Year" msgstr "" -#: c:\Apache2\htdocs\account228/includes/access_levels.inc:170 -msgid "Supplier payments report" +#: ../reporting/includes/excel_report.inc:396 +msgid "Report Date" msgstr "" -#: c:\Apache2\htdocs\account228/includes/access_levels.inc:174 -msgid "Stock items add/edit" +#: ../reporting/includes/excel_report.inc:413 +#: ../reporting/includes/pdf_report.inc:599 +msgid "Generated At" msgstr "" -#: c:\Apache2\htdocs\account228/includes/access_levels.inc:175 -msgid "Sales kits" +#: ../reporting/includes/excel_report.inc:419 +#: ../reporting/includes/pdf_report.inc:608 +msgid "Generated By" msgstr "" -#: c:\Apache2\htdocs\account228/includes/access_levels.inc:176 -msgid "Item categories" +#: ../reporting/includes/header2.inc:150 +#: ../reporting/includes/pdf_report.inc:352 +#: ../reporting/includes/pdf_report.inc:499 +#: ../reporting/includes/pdf_report.inc:627 +msgid "Page" msgstr "" -#: c:\Apache2\htdocs\account228/includes/access_levels.inc:177 -msgid "Units of measure" +#: ../reporting/includes/pdf_report.inc:582 +msgid "Report Period" msgstr "" -#: c:\Apache2\htdocs\account228/includes/access_levels.inc:179 -msgid "Stock status view" +#: ../reporting/includes/pdf_report.inc:977 +msgid "You have no email contact defined for this type of document" msgstr "" -#: c:\Apache2\htdocs\account228/includes/access_levels.inc:180 -msgid "Stock transactions view" +#: ../reporting/includes/pdf_report.inc:1019 +msgid "Sending document by email failed" msgstr "" -#: c:\Apache2\htdocs\account228/includes/access_levels.inc:181 -msgid "Foreign item codes entry" +#: ../reporting/includes/pdf_report.inc:1022 +msgid "has been sent by email to destination." msgstr "" -#: c:\Apache2\htdocs\account228/includes/access_levels.inc:182 -msgid "Inventory location transfers" +#: ../reporting/includes/pdf_report.inc:1052 +msgid "Report has been sent to network printer " msgstr "" -#: c:\Apache2\htdocs\account228/includes/access_levels.inc:183 -msgid "Inventory adjustments" +#: ../reporting/includes/printer_class.inc:39 +msgid "Cannot open connection to printer" msgstr "" -#: c:\Apache2\htdocs\account228/includes/access_levels.inc:185 -msgid "Reorder levels" +#: ../reporting/includes/printer_class.inc:50 +msgid "Printer does not acept the job" msgstr "" -#: c:\Apache2\htdocs\account228/includes/access_levels.inc:186 -msgid "Items analytical reports and inquiries" +#: ../reporting/includes/printer_class.inc:61 +msgid "Error sending print job control file" msgstr "" -#: c:\Apache2\htdocs\account228/includes/access_levels.inc:187 -msgid "Inventory valuation report" +#: ../reporting/includes/printer_class.inc:68 +msgid "Print control file not accepted" msgstr "" -#: c:\Apache2\htdocs\account228/includes/access_levels.inc:192 -msgid "Bill of Materials" +#: ../reporting/includes/printer_class.inc:76 +msgid "Cannot send report to printer" msgstr "" -#: c:\Apache2\htdocs\account228/includes/access_levels.inc:194 -msgid "Manufacturing operations view" +#: ../reporting/includes/printer_class.inc:86 +msgid "No ack after report printout" msgstr "" -#: c:\Apache2\htdocs\account228/includes/access_levels.inc:195 -msgid "Work order entry" +#: ../reporting/includes/printer_class.inc:100 +msgid "Cannot flush printing queue" msgstr "" -#: c:\Apache2\htdocs\account228/includes/access_levels.inc:196 -msgid "Material issues entry" +#: ../reporting/includes/reports_classes.inc:57 +msgid "Report Classes:" msgstr "" -#: c:\Apache2\htdocs\account228/includes/access_levels.inc:197 -msgid "Final product receive" +#: ../reporting/includes/reports_classes.inc:75 +msgid "Reports For Class: " msgstr "" -#: c:\Apache2\htdocs\account228/includes/access_levels.inc:198 -msgid "Work order releases" +#: ../reporting/includes/reports_classes.inc:96 +msgid "Display: " msgstr "" -#: c:\Apache2\htdocs\account228/includes/access_levels.inc:200 -msgid "Work order analytical reports and inquiries" +#: ../reporting/includes/reports_classes.inc:143 +msgid "Unknown report parameter type:" msgstr "" -#: c:\Apache2\htdocs\account228/includes/access_levels.inc:201 -msgid "Manufacturing cost inquiry" +#: ../reporting/includes/reports_classes.inc:169 +msgid "No Currency Filter" msgstr "" -#: c:\Apache2\htdocs\account228/includes/access_levels.inc:202 -msgid "Work order bulk reports" +#: ../reporting/includes/reports_classes.inc:218 +msgid "No payment Link" msgstr "" -#: c:\Apache2\htdocs\account228/includes/access_levels.inc:203 -msgid "Bill of materials reports" +#: ../reporting/includes/reports_classes.inc:222 +msgid "PDF/Printer" msgstr "" -#: c:\Apache2\htdocs\account228/includes/access_levels.inc:207 -msgid "Dimension tags" +#: ../reporting/includes/reports_classes.inc:233 +msgid "No Graphics" msgstr "" -#: c:\Apache2\htdocs\account228/includes/access_levels.inc:209 -msgid "Dimension view" +#: ../reporting/includes/reports_classes.inc:233 +msgid "Vertical bars" msgstr "" -#: c:\Apache2\htdocs\account228/includes/access_levels.inc:211 -msgid "Dimension entry" +#: ../reporting/includes/reports_classes.inc:233 +msgid "Horizontal bars" msgstr "" -#: c:\Apache2\htdocs\account228/includes/access_levels.inc:213 -msgid "Dimension reports" +#: ../reporting/includes/reports_classes.inc:234 +msgid "Dots" msgstr "" -#: c:\Apache2\htdocs\account228/includes/access_levels.inc:217 -msgid "Item tax type definitions" +#: ../reporting/includes/reports_classes.inc:234 +msgid "Lines" msgstr "" -#: c:\Apache2\htdocs\account228/includes/access_levels.inc:218 -msgid "GL accounts edition" +#: ../reporting/includes/reports_classes.inc:234 +msgid "Pie" msgstr "" -#: c:\Apache2\htdocs\account228/includes/access_levels.inc:219 -msgid "GL account groups" +#: ../reporting/includes/reports_classes.inc:234 +msgid "Donut" msgstr "" -#: c:\Apache2\htdocs\account228/includes/access_levels.inc:220 -msgid "GL account classes" +#: ../reporting/includes/reports_classes.inc:238 +#: ../reporting/includes/reports_classes.inc:241 +msgid "No Type Filter" msgstr "" -#: c:\Apache2\htdocs\account228/includes/access_levels.inc:221 -msgid "Quick GL entry definitions" +#: ../reporting/includes/reports_classes.inc:251 +msgid "No Account Group Filter" msgstr "" -#: c:\Apache2\htdocs\account228/includes/access_levels.inc:223 -msgid "Bank accounts" +#: ../reporting/includes/reports_classes.inc:266 +#: ../reporting/includes/reports_classes.inc:272 +#: ../reporting/includes/reports_classes.inc:278 +msgid "No Dimension Filter" msgstr "" -#: c:\Apache2\htdocs\account228/includes/access_levels.inc:224 -msgid "Tax rates" +#: ../reporting/includes/reports_classes.inc:284 +msgid "No Customer Filter" msgstr "" -#: c:\Apache2\htdocs\account228/includes/access_levels.inc:225 -msgid "Tax groups" +#: ../reporting/includes/reports_classes.inc:295 +msgid "No Supplier Filter" msgstr "" -#: c:\Apache2\htdocs\account228/includes/access_levels.inc:226 -msgid "Fiscal years maintenance" +#: ../reporting/includes/reports_classes.inc:374 +msgid "No Location Filter" msgstr "" -#: c:\Apache2\htdocs\account228/includes/access_levels.inc:227 -msgid "Company GL setup" +#: ../reporting/includes/reports_classes.inc:377 +msgid "No Category Filter" msgstr "" -#: c:\Apache2\htdocs\account228/includes/access_levels.inc:228 -msgid "GL Account tags" +#: ../reporting/includes/reports_classes.inc:386 +msgid "No Sales Folk Filter" msgstr "" -#: c:\Apache2\htdocs\account228/includes/access_levels.inc:230 -msgid "Bank transactions view" +#: ../reporting/includes/reports_classes.inc:393 +msgid "No Users Filter" msgstr "" -#: c:\Apache2\htdocs\account228/includes/access_levels.inc:231 -msgid "GL postings view" +#: ../sales/create_recurrent_invoices.php:24 +msgid "Create and Print Recurrent Invoices" msgstr "" -#: c:\Apache2\htdocs\account228/includes/access_levels.inc:232 -msgid "Exchange rate table changes" +#: ../sales/create_recurrent_invoices.php:98 +#: ../sales/manage/recurrent_invoices.php:85 +msgid "Template No" msgstr "" -#: c:\Apache2\htdocs\account228/includes/access_levels.inc:233 -msgid "Bank payments" +#: ../sales/create_recurrent_invoices.php:98 +#: ../sales/manage/recurrent_invoices.php:85 +msgid "Begin" msgstr "" -#: c:\Apache2\htdocs\account228/includes/access_levels.inc:234 -msgid "Bank deposits" +#: ../sales/create_recurrent_invoices.php:98 +#: ../sales/manage/recurrent_invoices.php:85 +msgid "End" msgstr "" -#: c:\Apache2\htdocs\account228/includes/access_levels.inc:235 -msgid "Bank account transfers" +#: ../sales/create_recurrent_invoices.php:98 +#: ../sales/manage/recurrent_invoices.php:85 +msgid "Last Created" msgstr "" -#: c:\Apache2\htdocs\account228/includes/access_levels.inc:236 -msgid "Bank reconciliation" +#: ../sales/create_recurrent_invoices.php:142 +msgid "Create Invoices" msgstr "" -#: c:\Apache2\htdocs\account228/includes/access_levels.inc:237 -msgid "Manual journal entries" +#: ../sales/create_recurrent_invoices.php:149 +msgid "Marked items are due." msgstr "" -#: c:\Apache2\htdocs\account228/includes/access_levels.inc:238 -msgid "Journal entries to bank related accounts" +#: ../sales/create_recurrent_invoices.php:151 +msgid "No recurrent invoices are due." msgstr "" -#: c:\Apache2\htdocs\account228/includes/access_levels.inc:239 -msgid "Budget edition" +#: ../sales/credit_note_entry.php:40 +#, php-format +msgid "Modifying Customer Credit Note #%d" msgstr "" -#: c:\Apache2\htdocs\account228/includes/access_levels.inc:240 -msgid "Item standard costs" +#: ../sales/credit_note_entry.php:51 +#: ../sales/sales_order_entry.php:639 +msgid "" +"There are no customers, or there are no customers with branches. Please " +"define customers and customer branches." msgstr "" -#: c:\Apache2\htdocs\account228/includes/access_levels.inc:242 -msgid "GL analytical reports and inquiries" +#: ../sales/credit_note_entry.php:66 +#, php-format +msgid "Credit Note # %d has been processed" msgstr "" -#: c:\Apache2\htdocs\account228/includes/access_levels.inc:243 -msgid "Tax reports and inquiries" +#: ../sales/credit_note_entry.php:68 +msgid "&View this credit note" msgstr "" -#: c:\Apache2\htdocs\account228/includes/access_levels.inc:244 -msgid "Bank reports and inquiries" +#: ../sales/credit_note_entry.php:70 +msgid "&Print This Credit Invoice" msgstr "" -#: c:\Apache2\htdocs\account228/includes/access_levels.inc:245 -msgid "GL reports and inquiries" +#: ../sales/credit_note_entry.php:71 +msgid "&Email This Credit Invoice" msgstr "" -#: c:\Apache2\htdocs\account228/includes/banking.inc:107 -#, php-format -msgid "Cannot retrieve exchange rate for currency %s as of %s. Please add exchange rate manually on Exchange Rates page." +#: ../sales/credit_note_entry.php:73 +#: ../sales/customer_credit_invoice.php:60 +#: ../sales/customer_credit_invoice.php:75 +msgid "View the GL &Journal Entries for this Credit Note" msgstr "" -#: c:\Apache2\htdocs\account228/includes/current_user.inc:75 -msgid "Before software upgrade you have to include old $security_groups and $security_headings arrays from old config.php file to the new one." +#: ../sales/credit_note_entry.php:75 +msgid "Enter Another &Credit Note" msgstr "" -#: c:\Apache2\htdocs\account228/includes/current_user.inc:76 -msgid "Back" +#: ../sales/credit_note_entry.php:155 +msgid "The entered date for the credit note is invalid." msgstr "" -#: c:\Apache2\htdocs\account228/includes/current_user.inc:86 -msgid "System is available for site admin only until full database upgrade" +#: ../sales/credit_note_entry.php:172 +msgid "" +"For credit notes created to write off the stock, a general ledger account is " +"required to be selected." msgstr "" -#: c:\Apache2\htdocs\account228/includes/current_user.inc:434 -msgid "Requesting data..." +#: ../sales/credit_note_entry.php:173 +msgid "" +"Please select an account to write the cost of the stock off to, then click " +"on Process again." msgstr "" -#: c:\Apache2\htdocs\account228/includes/errors.inc:70 -msgid "in file" +#: ../sales/credit_note_entry.php:193 +msgid "The quantity must be greater than zero." msgstr "" -#: c:\Apache2\htdocs\account228/includes/errors.inc:70 -msgid "at line " +#: ../sales/credit_note_entry.php:198 +msgid "The entered price is negative or invalid." msgstr "" -#: c:\Apache2\htdocs\account228/includes/errors.inc:114 -msgid "Debug mode database warning:" +#: ../sales/credit_note_entry.php:203 +msgid "The entered discount percent is negative, greater than 100 or invalid." msgstr "" -#: c:\Apache2\htdocs\account228/includes/errors.inc:116 -msgid "DATABASE ERROR :" +#: ../sales/credit_note_entry.php:271 +msgid "Credit Note Items" msgstr "" -#: c:\Apache2\htdocs\account228/includes/errors.inc:144 -msgid "The entered information is a duplicate. Please go back and enter different values." +#: ../sales/credit_note_entry.php:281 +#: ../sales/customer_credit_invoice.php:393 +msgid "Process Credit Note" msgstr "" -#: c:\Apache2\htdocs\account228/includes/main.inc:43 -msgid "This page is usable only with javascript enabled browsers." +#: ../sales/customer_credit_invoice.php:38 +#, php-format +msgid "Modifying Credit Invoice # %d." msgstr "" -#: c:\Apache2\htdocs\account228/includes/session.inc:39 -msgid "Incorrect Password" +#: ../sales/customer_credit_invoice.php:42 +msgid "Credit all or part of an Invoice" msgstr "" -#: c:\Apache2\htdocs\account228/includes/session.inc:40 -msgid "The user and password combination is not valid for the system." +#: ../sales/customer_credit_invoice.php:53 +msgid "Credit Note has been processed" msgstr "" -#: c:\Apache2\htdocs\account228/includes/session.inc:42 -msgid "If you are not an authorized user, please contact your system administrator to obtain an account to enable you to use the system." +#: ../sales/customer_credit_invoice.php:55 +#: ../sales/customer_credit_invoice.php:70 +msgid "&View This Credit Note" msgstr "" -#: c:\Apache2\htdocs\account228/includes/session.inc:43 -msgid "Try again" +#: ../sales/customer_credit_invoice.php:57 +#: ../sales/customer_credit_invoice.php:72 +msgid "&Print This Credit Note" msgstr "" -#: c:\Apache2\htdocs\account228/includes/session.inc:58 -msgid "Security settings have not been defined for your user account." +#: ../sales/customer_credit_invoice.php:58 +#: ../sales/customer_credit_invoice.php:73 +msgid "&Email This Credit Note" msgstr "" -#: c:\Apache2\htdocs\account228/includes/session.inc:59 -msgid "Please contact your system administrator." +#: ../sales/customer_credit_invoice.php:68 +msgid "Credit Note has been updated" msgstr "" -#: c:\Apache2\htdocs\account228/includes/session.inc:60 -msgid "Please remove $security_groups and $security_headings arrays from config.php file!" +#: ../sales/customer_credit_invoice.php:112 +msgid "The entered shipping cost is invalid or less than zero." msgstr "" -#: c:\Apache2\htdocs\account228/includes/session.inc:72 -msgid "The security settings on your account do not permit you to access this function" +#: ../sales/customer_credit_invoice.php:117 +#: ../sales/customer_credit_invoice.php:152 +msgid "" +"Selected quantity cannot be less than zero nor more than quantity not " +"credited yet." msgstr "" -#: c:\Apache2\htdocs\account228/includes/types.inc:52 -#: c:\Apache2\htdocs\account228/includes/types.inc:256 -msgid "Bank Payment" +#: ../sales/customer_credit_invoice.php:150 +msgid "" +"This page can only be opened if an invoice has been selected for crediting." msgstr "" -#: c:\Apache2\htdocs\account228/includes/types.inc:53 -#: c:\Apache2\htdocs\account228/includes/types.inc:255 -msgid "Bank Deposit" +#: ../sales/customer_credit_invoice.php:260 +msgid "Crediting Invoice" msgstr "" -#: c:\Apache2\htdocs\account228/includes/types.inc:54 -msgid "Funds Transfer" +#: ../sales/customer_credit_invoice.php:281 +msgid "Credit Note Date" msgstr "" -#: c:\Apache2\htdocs\account228/includes/types.inc:55 -msgid "Sales Invoice" +#: ../sales/customer_credit_invoice.php:291 +msgid "Invoiced Quantity" msgstr "" -#: c:\Apache2\htdocs\account228/includes/types.inc:57 -msgid "Customer Payment" +#: ../sales/customer_credit_invoice.php:292 +msgid "Credit Quantity" msgstr "" -#: c:\Apache2\htdocs\account228/includes/types.inc:58 -msgid "Delivery Note" +#: ../sales/customer_credit_invoice.php:326 +msgid "Credit Shipping Cost" msgstr "" -#: c:\Apache2\htdocs\account228/includes/types.inc:59 -msgid "Location Transfer" +#: ../sales/customer_credit_invoice.php:359 +#: ../sales/includes/ui/sales_credit_ui.inc:323 +msgid "Credit Note Type" msgstr "" -#: c:\Apache2\htdocs\account228/includes/types.inc:60 -msgid "Inventory Adjustment" +#: ../sales/customer_credit_invoice.php:367 +#: ../sales/includes/ui/sales_credit_ui.inc:331 +msgid "Items Returned to Location" msgstr "" -#: c:\Apache2\htdocs\account228/includes/types.inc:62 -msgid "Supplier Invoice" +#: ../sales/customer_credit_invoice.php:372 +#: ../sales/includes/ui/sales_credit_ui.inc:336 +msgid "Write off the cost of the items to" msgstr "" -#: c:\Apache2\htdocs\account228/includes/types.inc:64 -msgid "Supplier Payment" +#: ../sales/customer_credit_invoice.php:391 +msgid "Update credit value for quantities entered" msgstr "" -#: c:\Apache2\htdocs\account228/includes/types.inc:66 -#: c:\Apache2\htdocs\account228/includes/types.inc:113 -msgid "Work Order" +#: ../sales/customer_delivery.php:37 +#, php-format +msgid "Modifying Delivery Note # %d." msgstr "" -#: c:\Apache2\htdocs\account228/includes/types.inc:67 -msgid "Work Order Issue" +#: ../sales/customer_delivery.php:41 +msgid "Deliver Items for a Sales Order" msgstr "" -#: c:\Apache2\htdocs\account228/includes/types.inc:68 -msgid "Work Order Production" +#: ../sales/customer_delivery.php:50 +#: ../sales/sales_order_entry.php:175 +#, php-format +msgid "Delivery # %d has been entered." msgstr "" -#: c:\Apache2\htdocs\account228/includes/types.inc:71 -msgid "Cost Update" +#: ../sales/customer_delivery.php:52 +#: ../sales/sales_order_entry.php:177 +msgid "&View This Delivery" msgstr "" -#: c:\Apache2\htdocs\account228/includes/types.inc:84 -msgid "Savings Account" +#: ../sales/customer_delivery.php:54 +#: ../sales/customer_delivery.php:75 +#: ../sales/sales_order_entry.php:179 +msgid "&Print Delivery Note" msgstr "" -#: c:\Apache2\htdocs\account228/includes/types.inc:85 -msgid "Chequing Account" +#: ../sales/customer_delivery.php:55 +#: ../sales/customer_delivery.php:76 +#: ../sales/sales_order_entry.php:180 +msgid "&Email Delivery Note" msgstr "" -#: c:\Apache2\htdocs\account228/includes/types.inc:87 -msgid "Cash Account" +#: ../sales/customer_delivery.php:56 +#: ../sales/customer_delivery.php:77 +#: ../sales/sales_order_entry.php:181 +msgid "P&rint as Packing Slip" msgstr "" -#: c:\Apache2\htdocs\account228/includes/types.inc:91 -msgid "Transfer" +#: ../sales/customer_delivery.php:57 +#: ../sales/customer_delivery.php:78 +#: ../sales/sales_order_entry.php:182 +msgid "E&mail as Packing Slip" msgstr "" -#: c:\Apache2\htdocs\account228/includes/types.inc:92 -msgid "Cheque" +#: ../sales/customer_delivery.php:59 +#: ../sales/sales_order_entry.php:185 +msgid "View the GL Journal Entries for this Dispatch" msgstr "" -#: c:\Apache2\htdocs\account228/includes/types.inc:94 -msgid "Cash" +#: ../sales/customer_delivery.php:61 +msgid "Invoice This Delivery" msgstr "" -#: c:\Apache2\htdocs\account228/includes/types.inc:189 -msgid "Assemble" +#: ../sales/customer_delivery.php:63 +msgid "Select Another Order For Dispatch" msgstr "" -#: c:\Apache2\htdocs\account228/includes/types.inc:190 -msgid "Unassemble" +#: ../sales/customer_delivery.php:71 +#, php-format +msgid "Delivery Note # %d has been updated." msgstr "" -#: c:\Apache2\htdocs\account228/includes/types.inc:191 -msgid "Advanced Manufacture" +#: ../sales/customer_delivery.php:73 +msgid "View this delivery" msgstr "" -#: c:\Apache2\htdocs\account228/includes/types.inc:198 -msgid "Labour Cost" +#: ../sales/customer_delivery.php:80 +msgid "Confirm Delivery and Invoice" msgstr "" -#: c:\Apache2\htdocs\account228/includes/types.inc:199 -msgid "Overhead Cost" +#: ../sales/customer_delivery.php:82 +msgid "Select A Different Delivery" msgstr "" -#: c:\Apache2\htdocs\account228/includes/types.inc:214 -msgid "Assets" +#: ../sales/customer_delivery.php:96 +msgid "Select a different sales order to delivery" msgstr "" -#: c:\Apache2\htdocs\account228/includes/types.inc:216 -msgid "Equity" +#: ../sales/customer_delivery.php:97 +msgid "This order has no items. There is nothing to delivery." msgstr "" -#: c:\Apache2\htdocs\account228/includes/types.inc:217 -msgid "Income" +#: ../sales/customer_delivery.php:119 +msgid "Select a different delivery" msgstr "" -#: c:\Apache2\htdocs\account228/includes/types.inc:218 -msgid "Cost of Goods Sold" +#: ../sales/customer_delivery.php:120 +msgid "This delivery has all items invoiced. There is nothing to modify." msgstr "" -#: c:\Apache2\htdocs\account228/includes/types.inc:219 -msgid "Expense" +#: ../sales/customer_delivery.php:130 +msgid "" +"This page can only be opened if an order or delivery note has been selected. " +"Please select it first." msgstr "" -#: c:\Apache2\htdocs\account228/includes/types.inc:234 -msgid "Remainder" +#: ../sales/customer_delivery.php:132 +msgid "Select a Sales Order to Delivery" msgstr "" -#: c:\Apache2\htdocs\account228/includes/types.inc:236 -msgid "Amount, increase base" +#: ../sales/customer_delivery.php:141 +msgid "" +"Selected quantity cannot be less than quantity invoiced nor more than " +"quantity\tnot dispatched on sales order." msgstr "" -#: c:\Apache2\htdocs\account228/includes/types.inc:237 -msgid "Amount, reduce base" +#: ../sales/customer_delivery.php:144 +msgid "Freight cost cannot be less than zero" msgstr "" -#: c:\Apache2\htdocs\account228/includes/types.inc:238 -msgid "% amount of base" +#: ../sales/customer_delivery.php:156 +msgid "The entered date of delivery is invalid." msgstr "" -#: c:\Apache2\htdocs\account228/includes/types.inc:239 -msgid "% amount of base, increase base" +#: ../sales/customer_delivery.php:162 +msgid "The entered date of delivery is not in fiscal year." msgstr "" -#: c:\Apache2\htdocs\account228/includes/types.inc:240 -msgid "% amount of base, reduce base" +#: ../sales/customer_delivery.php:168 +msgid "The entered dead-line for invoice is invalid." msgstr "" -#: c:\Apache2\htdocs\account228/includes/types.inc:241 -msgid "Taxes added" +#: ../sales/customer_delivery.php:191 +#: ../sales/customer_invoice.php:296 +msgid "The entered shipping value is not numeric." msgstr "" -#: c:\Apache2\htdocs\account228/includes/types.inc:242 -msgid "Taxes added, increase base" +#: ../sales/customer_delivery.php:197 +msgid "There are no item quantities on this delivery note." msgstr "" -#: c:\Apache2\htdocs\account228/includes/types.inc:243 -msgid "Taxes added, reduce base" +#: ../sales/customer_delivery.php:290 +#: ../sales/sales_order_entry.php:480 +#: ../sales/includes/ui/sales_order_ui.inc:245 +msgid "" +"The delivery cannot be processed because there is an insufficient quantity " +"for item:" msgstr "" -#: c:\Apache2\htdocs\account228/includes/types.inc:244 -msgid "Taxes included" +#: ../sales/customer_delivery.php:351 +msgid "For Sales Order" msgstr "" -#: c:\Apache2\htdocs\account228/includes/types.inc:245 -msgid "Taxes included, increase base" +#: ../sales/customer_delivery.php:360 +msgid "Delivery From" msgstr "" -#: c:\Apache2\htdocs\account228/includes/types.inc:246 -msgid "Taxes included, reduce base" +#: ../sales/customer_delivery.php:409 +msgid "Invoice Dead-line" msgstr "" -#: c:\Apache2\htdocs\account228/includes/types.inc:258 -msgid "Supplier Invoice/Credit" +#: ../sales/customer_delivery.php:419 +#: ../sales/customer_invoice.php:432 +#: ../sales/includes/ui/sales_order_ui.inc:82 +#: ../sales/includes/ui/sales_order_ui.inc:369 +msgid "" +"The selected customer account is currently on hold. Please contact the " +"credit control personnel to discuss." msgstr "" -#: c:\Apache2\htdocs\account228/includes/types.inc:274 -msgid "Purchased" +#: ../sales/customer_delivery.php:424 +msgid "Delivery Items" msgstr "" -#: c:\Apache2\htdocs\account228/includes/types.inc:275 -msgid "Service" +#: ../sales/customer_delivery.php:430 +msgid "Max. delivery" msgstr "" -#: c:\Apache2\htdocs\account228/includes/db/audit_trail_db.inc:93 -msgid "Some transactions journal GL postings were not indexed due to lack of audit trail record." +#: ../sales/customer_delivery.php:430 +#: ../sales/customer_invoice.php:442 +#: ../sales/includes/ui/sales_order_ui.inc:142 +msgid "Delivered" msgstr "" -#: c:\Apache2\htdocs\account228/includes/db/inventory_db.inc:140 -msgid "Cost was " +#: ../sales/customer_delivery.php:431 +#: ../sales/customer_invoice.php:443 +#: ../sales/view/view_receipt.php:45 +#: ../sales/view/view_sales_order.php:201 +msgid "Discount" msgstr "" -#: c:\Apache2\htdocs\account228/includes/db/inventory_db.inc:140 -msgid " changed to " +#: ../sales/customer_delivery.php:491 +#: ../sales/customer_invoice.php:527 +msgid "Shipping Cost" msgstr "" -#: c:\Apache2\htdocs\account228/includes/db/inventory_db.inc:140 -msgid " for item " +#: ../sales/customer_delivery.php:511 +#: ../sales/includes/ui/sales_order_ui.inc:243 +msgid "" +"Marked items have insufficient quantities in stock as on day of delivery." msgstr "" -#: c:\Apache2\htdocs\account228/includes/ui/allocation_cart.inc:260 -msgid "Other Allocations" +#: ../sales/customer_delivery.php:515 +msgid "Action For Balance" msgstr "" -#: c:\Apache2\htdocs\account228/includes/ui/allocation_cart.inc:260 -#: c:\Apache2\htdocs\account228/includes/ui/ui_view.inc:453 -msgid "This Allocation" +#: ../sales/customer_delivery.php:522 +#: ../sales/customer_invoice.php:556 +msgid "Refresh document page" msgstr "" -#: c:\Apache2\htdocs\account228/includes/ui/allocation_cart.inc:289 -msgid "Total Allocated" +#: ../sales/customer_delivery.php:523 +msgid "Process Dispatch" msgstr "" -#: c:\Apache2\htdocs\account228/includes/ui/allocation_cart.inc:326 -msgid "The entry for one or more amounts is invalid or negative." +#: ../sales/customer_delivery.php:524 +#: ../sales/customer_invoice.php:558 +#: ../sales/sales_order_entry.php:687 +msgid "Check entered data and save document" msgstr "" -#: c:\Apache2\htdocs\account228/includes/ui/allocation_cart.inc:351 -msgid "These allocations cannot be processed because the amount allocated is more than the total amount left to allocate." +#: ../sales/customer_invoice.php:37 +#, php-format +msgid "Modifying Sales Invoice # %d." msgstr "" -#: c:\Apache2\htdocs\account228/includes/ui/db_pager_view.inc:166 -#: c:\Apache2\htdocs\account228/includes/ui/ui_input.inc:864 -msgid "Show also Inactive" +#: ../sales/customer_invoice.php:40 +msgid "Issue an Invoice for Delivery Note" msgstr "" -#: c:\Apache2\htdocs\account228/includes/ui/db_pager_view.inc:175 -msgid "First" +#: ../sales/customer_invoice.php:42 +msgid "Issue Batch Invoice for Delivery Notes" msgstr "" -#: c:\Apache2\htdocs\account228/includes/ui/db_pager_view.inc:176 -msgid "Prev" +#: ../sales/customer_invoice.php:55 +msgid "Selected deliveries has been processed" msgstr "" -#: c:\Apache2\htdocs\account228/includes/ui/db_pager_view.inc:177 -msgid "Next" +#: ../sales/customer_invoice.php:57 +#: ../sales/customer_invoice.php:75 +#: ../sales/sales_order_entry.php:204 +msgid "&View This Invoice" msgstr "" -#: c:\Apache2\htdocs\account228/includes/ui/db_pager_view.inc:178 -msgid "Last" +#: ../sales/customer_invoice.php:59 +#: ../sales/customer_invoice.php:77 +msgid "&Print This Invoice" +msgstr "" + +#: ../sales/customer_invoice.php:60 +#: ../sales/customer_invoice.php:78 +msgid "&Email This Invoice" +msgstr "" + +#: ../sales/customer_invoice.php:62 +#: ../sales/sales_order_entry.php:217 +msgid "View the GL &Journal Entries for this Invoice" msgstr "" -#: c:\Apache2\htdocs\account228/includes/ui/db_pager_view.inc:187 +#: ../sales/customer_invoice.php:64 +msgid "Select Another &Delivery For Invoicing" +msgstr "" + +#: ../sales/customer_invoice.php:73 #, php-format -msgid "Records %d-%d of %d" +msgid "Sales Invoice # %d has been updated." msgstr "" -#: c:\Apache2\htdocs\account228/includes/ui/db_pager_view.inc:191 -msgid "No records" +#: ../sales/customer_invoice.php:80 +msgid "Select Another &Invoice to Modify" msgstr "" -#: c:\Apache2\htdocs\account228/includes/ui/ui_controls.inc:98 -msgid "You should automatically be forwarded." +#: ../sales/customer_invoice.php:118 +msgid "Select a different delivery to invoice" msgstr "" -#: c:\Apache2\htdocs\account228/includes/ui/ui_controls.inc:99 -msgid "If this does not happen" +#: ../sales/customer_invoice.php:119 +msgid "" +"There are no delivered items with a quantity left to invoice. There is " +"nothing left to invoice." msgstr "" -#: c:\Apache2\htdocs\account228/includes/ui/ui_controls.inc:99 -msgid "click here" +#: ../sales/customer_invoice.php:134 +msgid "" +"There are no delivery notes for this invoice.
\n" +"\t\tMost likely this invoice was created in Front Accounting version prior " +"to 2.0\n" +"\t\tand therefore can not be modified." +msgstr "" + +#: ../sales/customer_invoice.php:143 +msgid "" +"All quantities on this invoice has been credited. There is nothing to modify " +"on this invoice" +msgstr "" + +#: ../sales/customer_invoice.php:149 +msgid "" +"This page can only be opened after delivery selection. Please select " +"delivery to invoicing first." +msgstr "" + +#: ../sales/customer_invoice.php:151 +msgid "Select Delivery to Invoice" +msgstr "" + +#: ../sales/customer_invoice.php:156 +#: ../sales/customer_invoice.php:307 +msgid "" +"Selected quantity cannot be less than quantity credited nor more than " +"quantity not invoiced yet." +msgstr "" + +#: ../sales/customer_invoice.php:260 +msgid "The entered invoice date is invalid." +msgstr "" + +#: ../sales/customer_invoice.php:266 +msgid "The entered invoice date is not in fiscal year." +msgstr "" + +#: ../sales/customer_invoice.php:272 +msgid "The entered invoice due date is invalid." +msgstr "" + +#: ../sales/customer_invoice.php:302 +msgid "There are no item quantities on this invoice." +msgstr "" + +#: ../sales/customer_invoice.php:373 +msgid "Payment terms:" +msgstr "" + +#: ../sales/customer_invoice.php:376 +#: ../sales/includes/ui/sales_order_ui.inc:408 +#: ../sales/includes/ui/sales_order_ui.inc:412 +msgid "Payment:" +msgstr "" + +#: ../sales/customer_invoice.php:438 +msgid "Invoice Items" +msgstr "" + +#: ../sales/customer_invoice.php:443 +msgid "This Invoice" +msgstr "" + +#: ../sales/customer_invoice.php:451 +msgid "Credited" +msgstr "" + +#: ../sales/customer_invoice.php:545 +msgid "Invoice Total" +msgstr "" + +#: ../sales/customer_payments.php:33 +msgid "Customer Payment Entry" +msgstr "" + +#: ../sales/customer_payments.php:37 +msgid "There are no customers defined in the system." +msgstr "" + +#: ../sales/customer_payments.php:62 +msgid "The customer payment has been successfully entered." +msgstr "" + +#: ../sales/customer_payments.php:64 +msgid "&Print This Receipt" +msgstr "" + +#: ../sales/customer_payments.php:66 +msgid "&View the GL Journal Entries for this Customer Payment" +msgstr "" + +#: ../sales/customer_payments.php:70 +msgid "Enter Another &Customer Payment" +msgstr "" + +#: ../sales/customer_payments.php:83 +#: ../sales/sales_order_entry.php:322 +msgid "There is no customer selected." +msgstr "" + +#: ../sales/customer_payments.php:90 +#: ../sales/sales_order_entry.php:329 +msgid "This customer has no branch defined." +msgstr "" + +#: ../sales/customer_payments.php:96 +msgid "The entered date is invalid. Please enter a valid date for the payment." +msgstr "" + +#: ../sales/customer_payments.php:118 +#: ../sales/customer_payments.php:124 +msgid "The entered amount is invalid or negative and cannot be processed." +msgstr "" + +#: ../sales/customer_payments.php:150 +msgid "The entered discount is not a valid number." +msgstr "" + +#: ../sales/customer_payments.php:157 +msgid "" +"The balance of the amount and discout is zero or negative. Please enter " +"valid amounts." +msgstr "" + +#: ../sales/customer_payments.php:234 +msgid "From Customer:" +msgstr "" + +#: ../sales/customer_payments.php:249 +msgid "This customer account is on hold." +msgstr "" + +#: ../sales/customer_payments.php:255 +msgid "Into Bank Account:" +msgstr "" + +#: ../sales/customer_payments.php:262 +msgid "Date of Deposit:" +msgstr "" + +#: ../sales/customer_payments.php:286 +msgid "Customer prompt payment discount :" +msgstr "" + +#: ../sales/customer_payments.php:295 +msgid "Amount and discount are in customer's currency." +msgstr "" + +#: ../sales/customer_payments.php:299 +msgid "Add Payment" +msgstr "" + +#: ../sales/sales_order_entry.php:56 +msgid "Direct Sales Delivery" +msgstr "" + +#: ../sales/sales_order_entry.php:61 +msgid "Direct Sales Invoice" +msgstr "" + +#: ../sales/sales_order_entry.php:67 +#, php-format +msgid "Modifying Sales Order # %d" +msgstr "" + +#: ../sales/sales_order_entry.php:73 +#, php-format +msgid "Modifying Sales Quotation # %d" +msgstr "" + +#: ../sales/sales_order_entry.php:78 +msgid "New Sales Order Entry" +msgstr "" + +#: ../sales/sales_order_entry.php:82 +msgid "New Sales Quotation Entry" +msgstr "" + +#: ../sales/sales_order_entry.php:85 +msgid "Sales Order Entry" +msgstr "" + +#: ../sales/sales_order_entry.php:101 +#, php-format +msgid "Order # %d has been entered." +msgstr "" + +#: ../sales/sales_order_entry.php:103 +#: ../sales/sales_order_entry.php:123 +msgid "&View This Order" +msgstr "" + +#: ../sales/sales_order_entry.php:109 +msgid "Make &Delivery Against This Order" +msgstr "" + +#: ../sales/sales_order_entry.php:114 +msgid "Enter a &New Order" +msgstr "" + +#: ../sales/sales_order_entry.php:121 +#, php-format +msgid "Order # %d has been updated." +msgstr "" + +#: ../sales/sales_order_entry.php:129 +msgid "Confirm Order Quantities and Make &Delivery" +msgstr "" + +#: ../sales/sales_order_entry.php:132 +msgid "Select A Different &Order" +msgstr "" + +#: ../sales/sales_order_entry.php:139 +#, php-format +msgid "Quotation # %d has been entered." +msgstr "" + +#: ../sales/sales_order_entry.php:141 +#: ../sales/sales_order_entry.php:159 +msgid "&View This Quotation" +msgstr "" + +#: ../sales/sales_order_entry.php:143 +#: ../sales/sales_order_entry.php:161 +msgid "&Print This Quotation" +msgstr "" + +#: ../sales/sales_order_entry.php:144 +#: ../sales/sales_order_entry.php:162 +msgid "&Email This Quotation" +msgstr "" + +#: ../sales/sales_order_entry.php:147 +#: ../sales/sales_order_entry.php:165 +msgid "Make &Sales Order Against This Quotation" +msgstr "" + +#: ../sales/sales_order_entry.php:150 +msgid "Enter a New &Quotation" +msgstr "" + +#: ../sales/sales_order_entry.php:157 +#, php-format +msgid "Quotation # %d has been updated." +msgstr "" + +#: ../sales/sales_order_entry.php:168 +msgid "Select A Different &Quotation" +msgstr "" + +#: ../sales/sales_order_entry.php:187 +msgid "Make &Invoice Against This Delivery" +msgstr "" + +#: ../sales/sales_order_entry.php:191 +msgid "Enter a New Template &Delivery" +msgstr "" + +#: ../sales/sales_order_entry.php:194 +msgid "Enter a &New Delivery" +msgstr "" + +#: ../sales/sales_order_entry.php:202 +#, php-format +msgid "Invoice # %d has been entered." +msgstr "" + +#: ../sales/sales_order_entry.php:206 +msgid "&Print Sales Invoice" +msgstr "" + +#: ../sales/sales_order_entry.php:207 +msgid "&Email Sales Invoice" +msgstr "" + +#: ../sales/sales_order_entry.php:215 +msgid "Print &Receipt" +msgstr "" + +#: ../sales/sales_order_entry.php:220 +msgid "Enter a &New Template Invoice" +msgstr "" + +#: ../sales/sales_order_entry.php:223 +msgid "Enter a &New Direct Invoice" +msgstr "" + +#: ../sales/sales_order_entry.php:340 +msgid "The entered date is not in fiscal year" +msgstr "" + +#: ../sales/sales_order_entry.php:351 +msgid "" +"You must enter the person or company to whom delivery should be made to." +msgstr "" + +#: ../sales/sales_order_entry.php:358 +msgid "" +"You should enter the street address in the box provided. Orders cannot be " +"accepted without a valid street address." +msgstr "" + +#: ../sales/sales_order_entry.php:367 +msgid "The shipping cost entered is expected to be numeric." +msgstr "" + +#: ../sales/sales_order_entry.php:373 +msgid "The Valid date is invalid." +msgstr "" + +#: ../sales/sales_order_entry.php:375 +msgid "The delivery date is invalid." +msgstr "" + +#: ../sales/sales_order_entry.php:382 +msgid "The requested valid date is before the date of the quotation." +msgstr "" + +#: ../sales/sales_order_entry.php:384 +msgid "The requested delivery date is before the date of the order." +msgstr "" + +#: ../sales/sales_order_entry.php:393 +msgid "You need to define a cash account for your Sales Point." +msgstr "" + +#: ../sales/sales_order_entry.php:459 +msgid "" +"The item could not be updated because you are attempting to set the quantity " +"ordered to less than 0, or the discount percent to more than 100." +msgstr "" + +#: ../sales/sales_order_entry.php:463 +msgid "Price for item must be entered and can not be less than 0" +msgstr "" + +#: ../sales/sales_order_entry.php:470 +msgid "" +"You attempting to make the quantity ordered a quantity less than has already " +"been delivered. The quantity delivered cannot be modified retrospectively." +msgstr "" + +#: ../sales/sales_order_entry.php:510 +msgid "" +"This item cannot be deleted because some of it has already been delivered." +msgstr "" + +#: ../sales/sales_order_entry.php:539 +msgid "Direct delivery entry has been cancelled as requested." +msgstr "" + +#: ../sales/sales_order_entry.php:540 +msgid "Enter a New Sales Delivery" +msgstr "" + +#: ../sales/sales_order_entry.php:543 +msgid "Direct invoice entry has been cancelled as requested." +msgstr "" + +#: ../sales/sales_order_entry.php:544 +msgid "Enter a New Sales Invoice" +msgstr "" + +#: ../sales/sales_order_entry.php:549 +msgid "" +"This order cannot be cancelled because some of it has already been invoiced " +"or dispatched. However, the line item quantities may be modified." +msgstr "" + +#: ../sales/sales_order_entry.php:554 +msgid "This sales quotation has been cancelled as requested." +msgstr "" + +#: ../sales/sales_order_entry.php:555 +msgid "Enter a New Sales Quotation" +msgstr "" + +#: ../sales/sales_order_entry.php:559 +msgid "This sales order has been cancelled as requested." +msgstr "" + +#: ../sales/sales_order_entry.php:560 +msgid "Enter a New Sales Order" +msgstr "" + +#: ../sales/sales_order_entry.php:643 +msgid "Sales Invoice Items" +msgstr "" + +#: ../sales/sales_order_entry.php:644 +msgid "Enter Delivery Details and Confirm Invoice" +msgstr "" + +#: ../sales/sales_order_entry.php:646 +msgid "Place Invoice" +msgstr "" + +#: ../sales/sales_order_entry.php:649 +msgid "Delivery Note Items" +msgstr "" + +#: ../sales/sales_order_entry.php:650 +msgid "Enter Delivery Details and Confirm Dispatch" +msgstr "" + +#: ../sales/sales_order_entry.php:651 +msgid "Cancel Delivery" +msgstr "" + +#: ../sales/sales_order_entry.php:652 +msgid "Place Delivery" +msgstr "" + +#: ../sales/sales_order_entry.php:654 +msgid "Quotation Date:" +msgstr "" + +#: ../sales/sales_order_entry.php:655 +msgid "Sales Quotation Items" +msgstr "" + +#: ../sales/sales_order_entry.php:656 +msgid "Enter Delivery Details and Confirm Quotation" +msgstr "" + +#: ../sales/sales_order_entry.php:657 +msgid "Cancel Quotation" +msgstr "" + +#: ../sales/sales_order_entry.php:658 +msgid "Place Quotation" +msgstr "" + +#: ../sales/sales_order_entry.php:659 +msgid "Commit Quotations Changes" +msgstr "" + +#: ../sales/sales_order_entry.php:662 +msgid "Sales Order Items" +msgstr "" + +#: ../sales/sales_order_entry.php:663 +msgid "Enter Delivery Details and Confirm Order" +msgstr "" + +#: ../sales/sales_order_entry.php:666 +msgid "Commit Order Changes" +msgstr "" + +#: ../sales/sales_order_entry.php:688 +msgid "You are about to void this Document.\\nDo you want to continue?" +msgstr "" + +#: ../sales/sales_order_entry.php:691 +msgid "Validate changes and update document" +msgstr "" + +#: ../sales/sales_order_entry.php:695 +msgid "" +"Cancels document entry or removes sales order when editing an old document" +msgstr "" + +#: ../sales/allocations/customer_allocate.php:28 +msgid "Allocate Customer Payment or Credit Note" +msgstr "" + +#: ../sales/allocations/customer_allocate.php:48 +#, php-format +msgid "Allocation of %s # %d" +msgstr "" + +#: ../sales/allocations/customer_allocation_main.php:22 +msgid "Customer Allocations" +msgstr "" + +#: ../sales/allocations/customer_allocation_main.php:32 +#: ../sales/manage/customer_branches.php:280 +#: ../sales/manage/customers.php:280 +#: ../sales/inquiry/customer_allocation_inquiry.php:42 +#: ../sales/inquiry/customer_inquiry.php:44 +msgid "Select a customer: " +msgstr "" + +#: ../sales/manage/credit_status.php:16 +msgid "Credit Status" +msgstr "" + +#: ../sales/manage/credit_status.php:30 +msgid "The credit status description cannot be empty." +msgstr "" + +#: ../sales/manage/credit_status.php:44 +msgid "New credit status has been added" +msgstr "" + +#: ../sales/manage/credit_status.php:52 +msgid "Selected credit status has been updated" +msgstr "" + +#: ../sales/manage/credit_status.php:63 +msgid "" +"Cannot delete this credit status because customer accounts have been created " +"referring to it." +msgstr "" + +#: ../sales/manage/credit_status.php:79 +msgid "Selected credit status has been deleted" +msgstr "" + +#: ../sales/manage/credit_status.php:97 +msgid "Dissallow Invoices" +msgstr "" + +#: ../sales/manage/credit_status.php:109 +msgid "Invoice OK" +msgstr "" + +#: ../sales/manage/credit_status.php:113 +msgid "NO INVOICING" +msgstr "" + +#: ../sales/manage/credit_status.php:147 +msgid "Dissallow invoicing ?" +msgstr "" + +#: ../sales/manage/customer_branches.php:18 +msgid "Customer Branches" +msgstr "" + +#: ../sales/manage/customer_branches.php:25 +msgid "" +"There are no customers defined in the system. Please define a customer to " +"add customer branches." +msgstr "" + +#: ../sales/manage/customer_branches.php:27 +msgid "" +"There are no sales people defined in the system. At least one sales person " +"is required before proceeding." +msgstr "" + +#: ../sales/manage/customer_branches.php:29 +msgid "" +"There are no sales areas defined in the system. At least one sales area is " +"required before proceeding." +msgstr "" + +#: ../sales/manage/customer_branches.php:31 +msgid "" +"There are no shipping companies defined in the system. At least one shipping " +"company is required before proceeding." +msgstr "" + +#: ../sales/manage/customer_branches.php:63 +msgid "The Branch name cannot be empty." +msgstr "" + +#: ../sales/manage/customer_branches.php:70 +msgid "The Branch short name cannot be empty." +msgstr "" + +#: ../sales/manage/customer_branches.php:88 +msgid "Selected customer branch has been updated" +msgstr "" + +#: ../sales/manage/customer_branches.php:106 +msgid "New customer branch has been added" +msgstr "" + +#: ../sales/manage/customer_branches.php:125 +msgid "" +"Cannot delete this branch because customer transactions have been created to " +"this branch." +msgstr "" + +#: ../sales/manage/customer_branches.php:132 +msgid "" +"Cannot delete this branch because sales orders exist for it. Purge old sales " +"orders first." +msgstr "" + +#: ../sales/manage/customer_branches.php:137 +msgid "Selected customer branch has been deleted" +msgstr "" + +#: ../sales/manage/customer_branches.php:217 +msgid "Main Branch" +msgstr "" + +#: ../sales/manage/customer_branches.php:236 +msgid "Name and Contact" +msgstr "" + +#: ../sales/manage/customer_branches.php:237 +msgid "Branch Name:" +msgstr "" + +#: ../sales/manage/customer_branches.php:238 +msgid "Branch Short Name:" +msgstr "" + +#: ../sales/manage/customer_branches.php:241 +msgid "Sales Person:" +msgstr "" + +#: ../sales/manage/customer_branches.php:242 +msgid "Sales Area:" +msgstr "" + +#: ../sales/manage/customer_branches.php:243 +#: ../sales/manage/recurrent_invoices.php:156 +msgid "Sales Group:" +msgstr "" + +#: ../sales/manage/customer_branches.php:244 +msgid "Default Inventory Location:" +msgstr "" + +#: ../sales/manage/customer_branches.php:245 +msgid "Default Shipping Company:" msgstr "" -#: c:\Apache2\htdocs\account228/includes/ui/ui_controls.inc:99 -msgid "to continue" +#: ../sales/manage/customer_branches.php:252 +msgid "Accounts Receivable Account:" msgstr "" -#: c:\Apache2\htdocs\account228/includes/ui/ui_controls.inc:136 -msgid "Close" +#: ../sales/manage/customer_branches.php:258 +msgid "General contact data" msgstr "" -#: c:\Apache2\htdocs\account228/includes/ui/ui_controls.inc:341 -msgid "Branches" +#: ../sales/manage/customer_branches.php:268 +msgid "Billing Address:" msgstr "" -#: c:\Apache2\htdocs\account228/includes/ui/ui_input.inc:126 -#: c:\Apache2\htdocs\account228/includes/ui/ui_input.inc:262 -#: c:\Apache2\htdocs\account228/includes/ui/ui_lists.inc:20 -msgid "Select" +#: ../sales/manage/customer_branches.php:272 +msgid "Disable this Branch:" msgstr "" -#: c:\Apache2\htdocs\account228/includes/ui/ui_input.inc:195 -msgid "Submit changes" +#: ../sales/manage/customer_branches.php:295 +#: ../sales/inquiry/sales_deliveries_view.php:183 +msgid "Contact" msgstr "" -#: c:\Apache2\htdocs\account228/includes/ui/ui_input.inc:196 -msgid "Clone" +#: ../sales/manage/customer_branches.php:297 +msgid "Area" msgstr "" -#: c:\Apache2\htdocs\account228/includes/ui/ui_input.inc:197 -msgid "Edit new record with current data" +#: ../sales/manage/customer_branches.php:298 +msgid "Phone No" msgstr "" -#: c:\Apache2\htdocs\account228/includes/ui/ui_input.inc:198 -msgid "Cancel edition" +#: ../sales/manage/customer_branches.php:299 +msgid "Fax No" msgstr "" -#: c:\Apache2\htdocs\account228/includes/ui/ui_input.inc:593 -msgid "Click Here to Pick up the date" +#: ../sales/manage/customer_branches.php:301 +msgid "Tax Group" msgstr "" -#: c:\Apache2\htdocs\account228/includes/ui/ui_lists.inc:17 -msgid "Set filter" +#: ../sales/manage/customer_branches.php:319 +#: ../sales/includes/ui/sales_order_ui.inc:300 +msgid "" +"The selected customer does not have any branches. Please create at least one " +"branch." msgstr "" -#: c:\Apache2\htdocs\account228/includes/ui/ui_lists.inc:85 -msgid "Press Space tab for search pattern entry" +#: ../sales/manage/customers.php:35 +msgid "The customer name cannot be empty." msgstr "" -#: c:\Apache2\htdocs\account228/includes/ui/ui_lists.inc:89 -msgid "Enter code fragment to search or * for all" +#: ../sales/manage/customers.php:42 +msgid "The customer short name cannot be empty." msgstr "" -#: c:\Apache2\htdocs\account228/includes/ui/ui_lists.inc:90 -msgid "Enter description fragment to search or * for all" +#: ../sales/manage/customers.php:49 +msgid "The credit limit must be numeric and not less than zero." msgstr "" -#: c:\Apache2\htdocs\account228/includes/ui/ui_lists.inc:393 -#: c:\Apache2\htdocs\account228/includes/ui/ui_lists.inc:1307 -msgid "All Suppliers" +#: ../sales/manage/customers.php:56 +msgid "" +"The payment discount must be numeric and is expected to be less than 100% " +"and greater than or equal to 0." msgstr "" -#: c:\Apache2\htdocs\account228/includes/ui/ui_lists.inc:397 -msgid "Press Space tab to filter by name fragment" +#: ../sales/manage/customers.php:63 +msgid "" +"The discount percentage must be numeric and is expected to be less than 100% " +"and greater than or equal to 0." msgstr "" -#: c:\Apache2\htdocs\account228/includes/ui/ui_lists.inc:398 -msgid "Select supplier" +#: ../sales/manage/customers.php:91 +msgid "Customer has been updated." msgstr "" -#: c:\Apache2\htdocs\account228/includes/ui/ui_lists.inc:442 -msgid "All Customers" +#: ../sales/manage/customers.php:105 +msgid "A new customer has been added." msgstr "" -#: c:\Apache2\htdocs\account228/includes/ui/ui_lists.inc:446 -msgid "Press Space tab to filter by name fragment; F2 - entry new customer" +#: ../sales/manage/customers.php:127 +msgid "" +"This customer cannot be deleted because there are transactions that refer to " +"it." msgstr "" -#: c:\Apache2\htdocs\account228/includes/ui/ui_lists.inc:447 -msgid "Select customer" +#: ../sales/manage/customers.php:134 +msgid "" +"Cannot delete the customer record because orders have been created against " +"it." msgstr "" -#: c:\Apache2\htdocs\account228/includes/ui/ui_lists.inc:490 -msgid "All branches" +#: ../sales/manage/customers.php:141 +msgid "" +"Cannot delete this customer because there are branch records set up against " +"it." msgstr "" -#: c:\Apache2\htdocs\account228/includes/ui/ui_lists.inc:493 -msgid "Select customer branch" +#: ../sales/manage/customers.php:152 +msgid "Selected customer has been deleted." msgstr "" -#: c:\Apache2\htdocs\account228/includes/ui/ui_lists.inc:528 -msgid "All Locations" +#: ../sales/manage/customers.php:199 +msgid "Name and Address" msgstr "" -#: c:\Apache2\htdocs\account228/includes/ui/ui_lists.inc:681 -#: c:\Apache2\htdocs\account228/includes/ui/ui_lists.inc:746 -msgid "All Items" +#: ../sales/manage/customers.php:201 +msgid "Customer Name:" msgstr "" -#: c:\Apache2\htdocs\account228/includes/ui/ui_lists.inc:1214 -msgid "All Sales Types" +#: ../sales/manage/customers.php:202 +msgid "Customer Short Name:" msgstr "" -#: c:\Apache2\htdocs\account228/includes/ui/ui_lists.inc:1408 -msgid "Delayed" +#: ../sales/manage/customers.php:210 +#: ../sales/manage/customers.php:214 +msgid "Customer's Currency:" msgstr "" -#: c:\Apache2\htdocs\account228/includes/ui/ui_lists.inc:1524 -msgid "Use Item Sales Accounts" +#: ../sales/manage/customers.php:217 +msgid "Sales Type/Price List:" msgstr "" -#: c:\Apache2\htdocs\account228/includes/ui/ui_lists.inc:1832 -#: c:\Apache2\htdocs\account228/includes/ui/ui_lists.inc:1849 -msgid "All Types" +#: ../sales/manage/customers.php:220 +msgid "Customer status:" msgstr "" -#: c:\Apache2\htdocs\account228/includes/ui/ui_lists.inc:1834 -#: c:\Apache2\htdocs\account228/includes/ui/ui_lists.inc:1851 -msgid "Overdue Invoices" +#: ../sales/manage/customers.php:226 +msgid "Discount Percent:" msgstr "" -#: c:\Apache2\htdocs\account228/includes/ui/ui_lists.inc:1835 -#: c:\Apache2\htdocs\account228/includes/ui/ui_lists.inc:1852 -msgid "Payments" +#: ../sales/manage/customers.php:227 +msgid "Prompt Payment Discount Percent:" msgstr "" -#: c:\Apache2\htdocs\account228/includes/ui/ui_lists.inc:1850 -msgid "Invoices" +#: ../sales/manage/customers.php:231 +msgid "Credit Status:" msgstr "" -#: c:\Apache2\htdocs\account228/includes/ui/ui_lists.inc:1854 -msgid "Overdue Credit Notes" +#: ../sales/manage/customers.php:244 +msgid "Customer branches" msgstr "" -#: c:\Apache2\htdocs\account228/includes/ui/ui_lists.inc:1866 -msgid "Automatically put balance on back order" +#: ../sales/manage/customers.php:246 +msgid "Select or &Add" msgstr "" -#: c:\Apache2\htdocs\account228/includes/ui/ui_lists.inc:1867 -msgid "Cancel any quantites not delivered" +#: ../sales/manage/customers.php:246 +msgid "&Add or Edit " msgstr "" -#: c:\Apache2\htdocs\account228/includes/ui/ui_lists.inc:1884 -msgid "Items Returned to Inventory Location" +#: ../sales/manage/customers.php:257 +msgid "Add New Customer" msgstr "" -#: c:\Apache2\htdocs\account228/includes/ui/ui_lists.inc:1885 -msgid "Items Written Off" +#: ../sales/manage/customers.php:261 +msgid "Update Customer" msgstr "" -#: c:\Apache2\htdocs\account228/includes/ui/ui_lists.inc:2055 -msgid "New role" +#: ../sales/manage/customers.php:262 +msgid "Update customer data" msgstr "" -#: c:\Apache2\htdocs\account228/includes/ui/ui_lists.inc:2113 -msgid "No tags defined." +#: ../sales/manage/customers.php:263 +msgid "Select this customer and return to document entry." msgstr "" -#: c:\Apache2\htdocs\account228/includes/ui/ui_lists.inc:2113 -msgid "No active tags defined." +#: ../sales/manage/customers.php:264 +msgid "Delete Customer" msgstr "" -#: c:\Apache2\htdocs\account228/includes/ui/ui_lists.inc:2151 -#, php-format -msgid "Activated for '%s'" +#: ../sales/manage/customers.php:265 +msgid "Delete customer data if have been never used" msgstr "" -#: c:\Apache2\htdocs\account228/includes/ui/ui_lists.inc:2154 -msgid "Installed on system" +#: ../sales/manage/customers.php:272 +msgid "" +"There are no sales types defined. Please define at least one sales type " +"before adding a customer." msgstr "" -#: c:\Apache2\htdocs\account228/includes/ui/ui_msgs.inc:63 -msgid "in units of : " +#: ../sales/manage/customers.php:281 +msgid "New customer" msgstr "" -#: c:\Apache2\htdocs\account228/includes/ui/ui_view.inc:294 -msgid "Date Voided:" +#: ../sales/manage/recurrent_invoices.php:24 +msgid "Recurrent Invoices" msgstr "" -#: c:\Apache2\htdocs\account228/includes/ui/ui_view.inc:382 -#: c:\Apache2\htdocs\account228/includes/ui/ui_view.inc:398 -#: c:\Apache2\htdocs\account228/includes/ui/ui_view.inc:416 -msgid "Included" +#: ../sales/manage/recurrent_invoices.php:36 +#: ../sales/manage/sales_areas.php:30 +#: ../sales/manage/sales_groups.php:30 +msgid "The area description cannot be empty." msgstr "" -#: c:\Apache2\htdocs\account228/includes/ui/ui_view.inc:452 -msgid "Total Amount" +#: ../sales/manage/recurrent_invoices.php:46 +msgid "Selected recurrent invoice has been updated" msgstr "" -#: c:\Apache2\htdocs\account228/includes/ui/ui_view.inc:476 -msgid "Total Allocated:" +#: ../sales/manage/recurrent_invoices.php:52 +msgid "New recurrent invoice has been added" msgstr "" -#: c:\Apache2\htdocs\account228/includes/ui/ui_view.inc:480 -msgid "Left to Allocate:" +#: ../sales/manage/recurrent_invoices.php:69 +msgid "Selected recurrent invoice has been deleted" msgstr "" -#: c:\Apache2\htdocs\account228/includes/ui/ui_view.inc:516 -msgid "No Quick Entries are defined." +#: ../sales/manage/recurrent_invoices.php:149 +msgid "Template:" msgstr "" -#: c:\Apache2\htdocs\account228/includes/ui/ui_view.inc:707 -msgid "and" +#: ../sales/manage/recurrent_invoices.php:158 +msgid "Days:" msgstr "" -#: c:\Apache2\htdocs\account228/includes/ui/ui_view.inc:793 -msgid "January" +#: ../sales/manage/recurrent_invoices.php:160 +msgid "Monthly:" msgstr "" -#: c:\Apache2\htdocs\account228/includes/ui/ui_view.inc:793 -msgid "February" +#: ../sales/manage/recurrent_invoices.php:162 +msgid "Begin:" msgstr "" -#: c:\Apache2\htdocs\account228/includes/ui/ui_view.inc:793 -msgid "March" +#: ../sales/manage/recurrent_invoices.php:164 +msgid "End:" msgstr "" -#: c:\Apache2\htdocs\account228/includes/ui/ui_view.inc:793 -msgid "April" +#: ../sales/manage/sales_areas.php:39 +msgid "Selected sales area has been updated" msgstr "" -#: c:\Apache2\htdocs\account228/includes/ui/ui_view.inc:793 -msgid "May" +#: ../sales/manage/sales_areas.php:44 +msgid "New sales area has been added" msgstr "" -#: c:\Apache2\htdocs\account228/includes/ui/ui_view.inc:793 -msgid "June" +#: ../sales/manage/sales_areas.php:62 +msgid "" +"Cannot delete this area because customer branches have been created using " +"this area." msgstr "" -#: c:\Apache2\htdocs\account228/includes/ui/ui_view.inc:793 -msgid "July" +#: ../sales/manage/sales_areas.php:68 +msgid "Selected sales area has been deleted" msgstr "" -#: c:\Apache2\htdocs\account228/includes/ui/ui_view.inc:793 -msgid "August" +#: ../sales/manage/sales_areas.php:88 +msgid "Area Name" msgstr "" -#: c:\Apache2\htdocs\account228/includes/ui/ui_view.inc:793 -msgid "September" +#: ../sales/manage/sales_areas.php:127 +msgid "Area Name:" msgstr "" -#: c:\Apache2\htdocs\account228/includes/ui/ui_view.inc:793 -msgid "October" +#: ../sales/manage/sales_groups.php:16 +msgid "Sales Groups" msgstr "" -#: c:\Apache2\htdocs\account228/includes/ui/ui_view.inc:793 -msgid "November" +#: ../sales/manage/sales_groups.php:39 +msgid "Selected sales group has been updated" msgstr "" -#: c:\Apache2\htdocs\account228/includes/ui/ui_view.inc:793 -msgid "December" +#: ../sales/manage/sales_groups.php:44 +msgid "New sales group has been added" msgstr "" -#: c:\Apache2\htdocs\account228/includes/ui/ui_view.inc:794 -msgid "Su" +#: ../sales/manage/sales_groups.php:62 +msgid "" +"Cannot delete this group because customers have been created using this " +"group." msgstr "" -#: c:\Apache2\htdocs\account228/includes/ui/ui_view.inc:794 -msgid "Mo" +#: ../sales/manage/sales_groups.php:67 +msgid "Selected sales group has been deleted" msgstr "" -#: c:\Apache2\htdocs\account228/includes/ui/ui_view.inc:794 -msgid "Tu" +#: ../sales/manage/sales_groups.php:85 +#: ../sales/manage/sales_groups.php:120 +msgid "ID" msgstr "" -#: c:\Apache2\htdocs\account228/includes/ui/ui_view.inc:794 -msgid "We" +#: ../sales/manage/sales_groups.php:123 +msgid "Group Name:" msgstr "" -#: c:\Apache2\htdocs\account228/includes/ui/ui_view.inc:794 -msgid "Th" +#: ../sales/manage/sales_people.php:16 +msgid "Sales Persons" msgstr "" -#: c:\Apache2\htdocs\account228/includes/ui/ui_view.inc:794 -msgid "Fr" +#: ../sales/manage/sales_people.php:32 +msgid "The sales person name cannot be empty." msgstr "" -#: c:\Apache2\htdocs\account228/includes/ui/ui_view.inc:794 -msgid "Sa" +#: ../sales/manage/sales_people.php:38 +msgid "Salesman provision cannot be less than 0 or more than 100%." msgstr "" -#: c:\Apache2\htdocs\account228/includes/ui/ui_view.inc:795 -msgid "W" +#: ../sales/manage/sales_people.php:43 +msgid "Salesman provision breakpoint must be numeric and not less than 0." msgstr "" -#: c:\Apache2\htdocs\account228/inventory/includes/item_adjustments_ui.inc:20 -#: c:\Apache2\htdocs\account228/inventory/includes/stock_transfers_ui.inc:20 -msgid "For Part :" +#: ../sales/manage/sales_people.php:62 +msgid "Selected sales person data have been updated" msgstr "" -#: c:\Apache2\htdocs\account228/inventory/includes/item_adjustments_ui.inc:43 -msgid "Detail:" +#: ../sales/manage/sales_people.php:64 +msgid "New sales person data have been added" msgstr "" -#: c:\Apache2\htdocs\account228/inventory/includes/item_adjustments_ui.inc:48 -msgid "Positive Adjustment" +#: ../sales/manage/sales_people.php:81 +msgid "Selected sales person data have been deleted" msgstr "" -#: c:\Apache2\htdocs\account228/inventory/includes/item_adjustments_ui.inc:48 -msgid "Negative Adjustment" +#: ../sales/manage/sales_people.php:155 +msgid "Sales person name:" msgstr "" -#: c:\Apache2\htdocs\account228/inventory/includes/stock_transfers_ui.inc:36 -msgid "To Location:" +#: ../sales/manage/sales_people.php:156 +msgid "Telephone number:" msgstr "" -#: c:\Apache2\htdocs\account228/inventory/includes/stock_transfers_ui.inc:46 -msgid "Transfer Type:" +#: ../sales/manage/sales_people.php:157 +msgid "Fax number:" msgstr "" -#: c:\Apache2\htdocs\account228/manufacturing/includes/manufacturing_ui.inc:24 -msgid "The bill of material for this item is empty." +#: ../sales/manage/sales_people.php:160 +msgid "Break Pt.:" msgstr "" -#: c:\Apache2\htdocs\account228/manufacturing/includes/manufacturing_ui.inc:31 -#: c:\Apache2\htdocs\account228/manufacturing/includes/manufacturing_ui.inc:63 -msgid "Total Cost" +#: ../sales/manage/sales_points.php:16 +msgid "POS settings" msgstr "" -#: c:\Apache2\htdocs\account228/manufacturing/includes/manufacturing_ui.inc:79 -msgid "There are no Requirements for this Order." +#: ../sales/manage/sales_points.php:28 +msgid "The POS name cannot be empty." msgstr "" -#: c:\Apache2\htdocs\account228/manufacturing/includes/manufacturing_ui.inc:86 -msgid "Unit Quantity" +#: ../sales/manage/sales_points.php:41 +msgid "New point of sale has been added" msgstr "" -#: c:\Apache2\htdocs\account228/manufacturing/includes/manufacturing_ui.inc:86 -msgid "Total Quantity" +#: ../sales/manage/sales_points.php:52 +msgid "Selected point of sale has been updated" msgstr "" -#: c:\Apache2\htdocs\account228/manufacturing/includes/manufacturing_ui.inc:86 -msgid "Units Issued" +#: ../sales/manage/sales_points.php:62 +msgid "Cannot delete this POS because it is used in users setup." msgstr "" -#: c:\Apache2\htdocs\account228/manufacturing/includes/manufacturing_ui.inc:86 -msgid "On Hand" +#: ../sales/manage/sales_points.php:65 +msgid "Selected point of sale has been deleted" msgstr "" -#: c:\Apache2\htdocs\account228/manufacturing/includes/manufacturing_ui.inc:140 -msgid "Marked items have insufficient quantities in stock." +#: ../sales/manage/sales_points.php:84 +msgid "POS Name" msgstr "" -#: c:\Apache2\htdocs\account228/manufacturing/includes/manufacturing_ui.inc:154 -msgid "There are no Productions for this Order." +#: ../sales/manage/sales_points.php:84 +msgid "Credit sale" msgstr "" -#: c:\Apache2\htdocs\account228/manufacturing/includes/manufacturing_ui.inc:197 -msgid "There are no Issues for this Order." +#: ../sales/manage/sales_points.php:84 +msgid "Cash sale" msgstr "" -#: c:\Apache2\htdocs\account228/manufacturing/includes/manufacturing_ui.inc:234 -msgid "There are no additional costs for this Order." +#: ../sales/manage/sales_points.php:84 +msgid "Default account" msgstr "" -#: c:\Apache2\htdocs\account228/manufacturing/includes/manufacturing_ui.inc:272 -#: c:\Apache2\htdocs\account228/manufacturing/includes/manufacturing_ui.inc:328 -msgid "The work order number sent is not valid." +#: ../sales/manage/sales_points.php:110 +msgid "To have cash POS first define at least one cash bank account." msgstr "" -#: c:\Apache2\htdocs\account228/manufacturing/includes/manufacturing_ui.inc:279 -#: c:\Apache2\htdocs\account228/manufacturing/includes/manufacturing_ui.inc:283 -#: c:\Apache2\htdocs\account228/manufacturing/includes/manufacturing_ui.inc:334 -msgid "Manufactured Item" +#: ../sales/manage/sales_points.php:129 +msgid "Point of Sale Name" msgstr "" -#: c:\Apache2\htdocs\account228/manufacturing/includes/manufacturing_ui.inc:280 -#: c:\Apache2\htdocs\account228/manufacturing/includes/manufacturing_ui.inc:284 -#: c:\Apache2\htdocs\account228/manufacturing/includes/manufacturing_ui.inc:335 -msgid "Into Location" +#: ../sales/manage/sales_points.php:131 +msgid "Allowed credit sale terms selection:" msgstr "" -#: c:\Apache2\htdocs\account228/manufacturing/includes/manufacturing_ui.inc:314 -#: c:\Apache2\htdocs\account228/manufacturing/includes/manufacturing_ui.inc:359 -msgid "This work order is closed." +#: ../sales/manage/sales_points.php:132 +msgid "Allowed cash sale terms selection:" msgstr "" -#: c:\Apache2\htdocs\account228/manufacturing/includes/work_order_issue_ui.inc:158 -msgid "Return Items to Location" +#: ../sales/manage/sales_points.php:133 +msgid "Default cash account" msgstr "" -#: c:\Apache2\htdocs\account228/manufacturing/includes/work_order_issue_ui.inc:158 -msgid "Issue Items to Work order" +#: ../sales/manage/sales_points.php:139 +msgid "POS location" msgstr "" -#: c:\Apache2\htdocs\account228/manufacturing/includes/work_order_issue_ui.inc:161 -msgid "To Work Centre:" +#: ../sales/manage/sales_types.php:28 +msgid "The sales type description cannot be empty." msgstr "" -#: c:\Apache2\htdocs\account228/manufacturing/includes/work_order_issue_ui.inc:163 -msgid "Issue Date:" +#: ../sales/manage/sales_types.php:35 +msgid "Calculation factor must be valid positive number." msgstr "" -#: c:\Apache2\htdocs\account228/manufacturing/includes/db/work_orders_db.inc:164 -msgid "Updated." +#: ../sales/manage/sales_types.php:48 +msgid "New sales type has been added" msgstr "" -#: c:\Apache2\htdocs\account228/manufacturing/includes/db/work_orders_db.inc:183 -msgid "Canceled." +#: ../sales/manage/sales_types.php:59 +msgid "Selected sales type has been updated" msgstr "" -#: c:\Apache2\htdocs\account228/manufacturing/includes/db/work_orders_db.inc:259 -msgid "Released." +#: ../sales/manage/sales_types.php:71 +msgid "" +"Cannot delete this sale type because customer transactions have been created " +"using this sales type." msgstr "" -#: c:\Apache2\htdocs\account228/manufacturing/includes/db/work_orders_quick_db.inc:83 -msgid "Quick production." +#: ../sales/manage/sales_types.php:78 +msgid "" +"Cannot delete this sale type because customers are currently set up to use " +"this sales type." msgstr "" -#: c:\Apache2\htdocs\account228/manufacturing/includes/db/work_order_produce_items_db.inc:60 -msgid "Production." +#: ../sales/manage/sales_types.php:83 +msgid "Selected sales type has been deleted" msgstr "" -#: c:\Apache2\htdocs\account228/purchasing/includes/db/invoice_db.inc:245 -#: c:\Apache2\htdocs\account228/purchasing/includes/db/invoice_db.inc:249 -msgid "Cost diff." +#: ../sales/manage/sales_types.php:103 +msgid "Type Name" msgstr "" -#: c:\Apache2\htdocs\account228/purchasing/includes/ui/grn_ui.inc:25 -msgid "For Purchase Order" +#: ../sales/manage/sales_types.php:103 +msgid "Factor" msgstr "" -#: c:\Apache2\htdocs\account228/purchasing/includes/ui/grn_ui.inc:41 -#: c:\Apache2\htdocs\account228/purchasing/includes/ui/grn_ui.inc:53 -#: c:\Apache2\htdocs\account228/purchasing/includes/ui/po_ui.inc:251 -#: c:\Apache2\htdocs\account228/purchasing/includes/ui/po_ui.inc:256 -msgid "Deliver Into Location" +#: ../sales/manage/sales_types.php:103 +msgid "Tax Incl" msgstr "" -#: c:\Apache2\htdocs\account228/purchasing/includes/ui/grn_ui.inc:47 -msgid "Date Items Received" +#: ../sales/manage/sales_types.php:117 +msgid "Base" msgstr "" -#: c:\Apache2\htdocs\account228/purchasing/includes/ui/grn_ui.inc:63 -#: c:\Apache2\htdocs\account228/purchasing/includes/ui/po_ui.inc:269 -msgid "Order Comments" +#: ../sales/manage/sales_types.php:128 +msgid "" +"Marked sales type is the company base pricelist for prices calculations." msgstr "" -#: c:\Apache2\htdocs\account228/purchasing/includes/ui/invoice_ui.inc:99 -#: c:\Apache2\htdocs\account228/purchasing/includes/ui/invoice_ui.inc:102 -msgid "Supplier's Ref.:" +#: ../sales/manage/sales_types.php:154 +msgid "Sales Type Name" msgstr "" -#: c:\Apache2\htdocs\account228/purchasing/includes/ui/invoice_ui.inc:117 -msgid "Terms:" +#: ../sales/manage/sales_types.php:155 +msgid "Calculation factor" msgstr "" -#: c:\Apache2\htdocs\account228/purchasing/includes/ui/invoice_ui.inc:149 -msgid "Sub-total:" +#: ../sales/manage/sales_types.php:156 +msgid "Tax included" msgstr "" -#: c:\Apache2\htdocs\account228/purchasing/includes/ui/invoice_ui.inc:157 -msgid "Invoice Total:" +#: ../sales/view/view_credit.php:24 +msgid "View Credit Note" msgstr "" -#: c:\Apache2\htdocs\account228/purchasing/includes/ui/invoice_ui.inc:191 -msgid "Add GL Line" +#: ../sales/view/view_credit.php:39 +#, php-format +msgid "CREDIT NOTE #%d" msgstr "" -#: c:\Apache2\htdocs\account228/purchasing/includes/ui/invoice_ui.inc:192 -msgid "Reset" +#: ../sales/view/view_credit.php:126 +msgid "There are no line items on this credit note." msgstr "" -#: c:\Apache2\htdocs\account228/purchasing/includes/ui/invoice_ui.inc:211 -msgid "GL Items for this Invoice" +#: ../sales/view/view_dispatch.php:23 +msgid "View Sales Dispatch" msgstr "" -#: c:\Apache2\htdocs\account228/purchasing/includes/ui/invoice_ui.inc:213 -msgid "GL Items for this Credit Note" +#: ../sales/view/view_dispatch.php:43 +#, php-format +msgid "DISPATCH NOTE #%d" msgstr "" -#: c:\Apache2\htdocs\account228/purchasing/includes/ui/invoice_ui.inc:223 -msgid "Quick Entry:" +#: ../sales/view/view_dispatch.php:65 +#: ../sales/view/view_invoice.php:65 +msgid "Charge Branch" msgstr "" -#: c:\Apache2\htdocs\account228/purchasing/includes/ui/invoice_ui.inc:389 -msgid "Add to Invoice" +#: ../sales/view/view_dispatch.php:91 +#: ../sales/view/view_invoice.php:90 +#: ../sales/view/view_sales_order.php:62 +msgid "Customer Order Ref." msgstr "" -#: c:\Apache2\htdocs\account228/purchasing/includes/ui/invoice_ui.inc:391 -msgid "Add to Credit Note" +#: ../sales/view/view_dispatch.php:96 +msgid "Dispatch Date" msgstr "" -#: c:\Apache2\htdocs\account228/purchasing/includes/ui/invoice_ui.inc:393 -#: c:\Apache2\htdocs\account228/purchasing/includes/ui/invoice_ui.inc:428 -msgid "WARNING! Be careful with removal. The operation is executed immediately and cannot be undone !!!" +#: ../sales/view/view_dispatch.php:151 +msgid "There are no line items on this dispatch." msgstr "" -#: c:\Apache2\htdocs\account228/purchasing/includes/ui/invoice_ui.inc:395 -#, php-format -msgid "You are about to remove all yet non-invoiced items from delivery line #%d. This operation also irreversibly changes related order line. Do you want to continue ?" +#: ../sales/view/view_dispatch.php:162 +msgid "TOTAL VALUE" msgstr "" -#: c:\Apache2\htdocs\account228/purchasing/includes/ui/invoice_ui.inc:426 -msgid "Items Received Yet to be Invoiced" +#: ../sales/view/view_dispatch.php:166 +msgid "This dispatch has been voided." msgstr "" -#: c:\Apache2\htdocs\account228/purchasing/includes/ui/invoice_ui.inc:431 -msgid "Delivery Item Selected For Adding To A Supplier Credit Note" +#: ../sales/view/view_invoice.php:23 +msgid "View Sales Invoice" msgstr "" -#: c:\Apache2\htdocs\account228/purchasing/includes/ui/invoice_ui.inc:436 -msgid "Received Items Charged on this Invoice" +#: ../sales/view/view_invoice.php:43 +#, php-format +msgid "SALES INVOICE #%d" msgstr "" -#: c:\Apache2\htdocs\account228/purchasing/includes/ui/invoice_ui.inc:438 -msgid "Received Items Credited on this Note" +#: ../sales/view/view_invoice.php:152 +msgid "There are no line items on this invoice." msgstr "" -#: c:\Apache2\htdocs\account228/purchasing/includes/ui/invoice_ui.inc:448 -msgid "Received between" +#: ../sales/view/view_receipt.php:24 +msgid "View Customer Payment" msgstr "" -#: c:\Apache2\htdocs\account228/purchasing/includes/ui/invoice_ui.inc:459 -msgid "Add All Items" +#: ../sales/view/view_receipt.php:33 +#, php-format +msgid "Customer Payment #%d" msgstr "" -#: c:\Apache2\htdocs\account228/purchasing/includes/ui/invoice_ui.inc:468 -msgid "Sequence #" +#: ../sales/view/view_receipt.php:38 +msgid "From Customer" msgstr "" -#: c:\Apache2\htdocs\account228/purchasing/includes/ui/invoice_ui.inc:468 -msgid "P.O." +#: ../sales/view/view_receipt.php:39 +msgid "Into Bank Account" msgstr "" -#: c:\Apache2\htdocs\account228/purchasing/includes/ui/invoice_ui.inc:469 -msgid "Received On" +#: ../sales/view/view_receipt.php:40 +msgid "Date of Deposit" msgstr "" -#: c:\Apache2\htdocs\account228/purchasing/includes/ui/invoice_ui.inc:470 -msgid "Qty Yet To Invoice" +#: ../sales/view/view_receipt.php:56 +msgid "This customer payment has been voided." msgstr "" -#: c:\Apache2\htdocs\account228/purchasing/includes/ui/invoice_ui.inc:470 -msgid "Order Price" +#: ../sales/view/view_sales_order.php:28 +msgid "View Sales Quotation" msgstr "" -#: c:\Apache2\htdocs\account228/purchasing/includes/ui/invoice_ui.inc:475 -msgid "Qty Yet To Credit" +#: ../sales/view/view_sales_order.php:29 +#, php-format +msgid "Sales Quotation #%d" msgstr "" -#: c:\Apache2\htdocs\account228/purchasing/includes/ui/invoice_ui.inc:480 -msgid "Line Value" +#: ../sales/view/view_sales_order.php:33 +msgid "View Sales Order" msgstr "" -#: c:\Apache2\htdocs\account228/purchasing/includes/ui/invoice_ui.inc:547 -msgid "There are no outstanding items received from this supplier that have not been invoiced by them." +#: ../sales/view/view_sales_order.php:34 +#, php-format +msgid "Sales Order #%d" msgstr "" -#: c:\Apache2\htdocs\account228/purchasing/includes/ui/invoice_ui.inc:550 -msgid "There are no received items for the selected supplier that have been invoiced." +#: ../sales/view/view_sales_order.php:46 +msgid "Order Information" msgstr "" -#: c:\Apache2\htdocs\account228/purchasing/includes/ui/invoice_ui.inc:551 -msgid "Credits can only be applied to invoiced items." +#: ../sales/view/view_sales_order.php:59 +msgid "Customer Name" msgstr "" -#: c:\Apache2\htdocs\account228/purchasing/includes/ui/po_ui.inc:90 -msgid "Supplier Currency:" +#: ../sales/view/view_sales_order.php:63 +msgid "Deliver To Branch" msgstr "" -#: c:\Apache2\htdocs\account228/purchasing/includes/ui/po_ui.inc:121 -msgid "Supplier's Reference:" +#: ../sales/view/view_sales_order.php:70 +msgid "Requested Delivery" msgstr "" -#: c:\Apache2\htdocs\account228/purchasing/includes/ui/po_ui.inc:122 -msgid "Receive Into:" +#: ../sales/view/view_sales_order.php:74 +msgid "Deliver From Location" msgstr "" -#: c:\Apache2\htdocs\account228/purchasing/includes/ui/po_ui.inc:147 -msgid "The default stock location set up for this user is not a currently defined stock location. Your system administrator needs to amend your user record." +#: ../sales/view/view_sales_order.php:81 +msgid "Telephone" msgstr "" -#: c:\Apache2\htdocs\account228/purchasing/includes/ui/po_ui.inc:151 -msgid "Deliver to:" +#: ../sales/view/view_sales_order.php:196 +msgid "This Sales Order is used as a Template." msgstr "" -#: c:\Apache2\htdocs\account228/purchasing/includes/ui/po_ui.inc:162 -msgid "Order Items" +#: ../sales/view/view_sales_order.php:201 +msgid "Quantity Delivered" msgstr "" -#: c:\Apache2\htdocs\account228/purchasing/includes/ui/po_ui.inc:169 -msgid "Required Delivery Date" +#: ../sales/inquiry/customer_allocation_inquiry.php:25 +msgid "Customer Allocation Inquiry" msgstr "" -#: c:\Apache2\htdocs\account228/purchasing/includes/ui/po_ui.inc:216 -msgid "Total Excluding Shipping/Tax" +#: ../sales/inquiry/customer_allocation_inquiry.php:96 +msgid "Allocation" msgstr "" -#: c:\Apache2\htdocs\account228/reporting/includes/doctext.inc:14 -msgid "Cust no" +#: ../sales/inquiry/customer_inquiry.php:26 +msgid "Customer Transactions" msgstr "" -#: c:\Apache2\htdocs\account228/reporting/includes/doctext.inc:18 -msgid "Order To" +#: ../sales/inquiry/customer_inquiry.php:68 +msgid "CUSTOMER ACCOUNT IS ON HOLD" msgstr "" -#: c:\Apache2\htdocs\account228/reporting/includes/doctext.inc:20 -msgid "Deliver To" +#: ../sales/inquiry/customer_inquiry.php:193 +msgid "Print Receipt" msgstr "" -#: c:\Apache2\htdocs\account228/reporting/includes/doctext.inc:27 -msgid "With thanks from" +#: ../sales/inquiry/customer_inquiry.php:223 +#: ../sales/inquiry/customer_inquiry.php:236 +msgid "RB" msgstr "" -#: c:\Apache2\htdocs\account228/reporting/includes/doctext.inc:39 -msgid "Your Ref" +#: ../sales/inquiry/sales_deliveries_view.php:29 +msgid "Search Not Invoiced Deliveries" msgstr "" -#: c:\Apache2\htdocs\account228/reporting/includes/doctext.inc:55 -msgid "Your VAT no." +#: ../sales/inquiry/sales_deliveries_view.php:34 +msgid "Search All Deliveries" msgstr "" -#: c:\Apache2\htdocs\account228/reporting/includes/doctext.inc:57 -msgid "Customers Reference" +#: ../sales/inquiry/sales_deliveries_view.php:70 +msgid "" +"For batch invoicing you should\n" +"\t\t select at least one delivery. All items must be dispatched to\n" +"\t\t the same customer branch." msgstr "" -#: c:\Apache2\htdocs\account228/reporting/includes/doctext.inc:60 -msgid "Our VAT No." +#: ../sales/inquiry/sales_deliveries_view.php:179 +msgid "Delivery #" msgstr "" -#: c:\Apache2\htdocs\account228/reporting/includes/doctext.inc:61 -msgid "Domicile" +#: ../sales/inquiry/sales_deliveries_view.php:185 +msgid "Cust Ref" msgstr "" -#: c:\Apache2\htdocs\account228/reporting/includes/doctext.inc:66 -msgid "* Subject to Realisation of the Cheque." +#: ../sales/inquiry/sales_deliveries_view.php:187 +msgid "Due By" msgstr "" -#: c:\Apache2\htdocs\account228/reporting/includes/doctext.inc:68 -msgid "All amounts stated in" +#: ../sales/inquiry/sales_deliveries_view.php:188 +msgid "Delivery Total" msgstr "" -#: c:\Apache2\htdocs\account228/reporting/includes/doctext.inc:72 -msgid "Please quote Invoice no. when paying. All amounts stated in" +#: ../sales/inquiry/sales_deliveries_view.php:190 +msgid "Batch" msgstr "" -#: c:\Apache2\htdocs\account228/reporting/includes/doctext.inc:73 -msgid "Please quote Credit no. when paying. All amounts stated in" +#: ../sales/inquiry/sales_deliveries_view.php:190 +msgid "Batch Invoicing" msgstr "" -#: c:\Apache2\htdocs\account228/reporting/includes/doctext.inc:76 -msgid "Phone/Fax/Email" +#: ../sales/inquiry/sales_orders_view.php:46 +msgid "Search Outstanding Sales Orders" msgstr "" -#: c:\Apache2\htdocs\account228/reporting/includes/doctext.inc:78 -#: c:\Apache2\htdocs\account228/reporting/includes/doctext.inc:125 -msgid "You can pay through" +#: ../sales/inquiry/sales_orders_view.php:51 +msgid "Search Template for Invoicing" msgstr "" -#: c:\Apache2\htdocs\account228/reporting/includes/doctext.inc:116 -msgid "DueDate" +#: ../sales/inquiry/sales_orders_view.php:56 +msgid "Select Template for Delivery" msgstr "" -#: c:\Apache2\htdocs\account228/reporting/includes/doctext.inc:122 -msgid "Dear" +#: ../sales/inquiry/sales_orders_view.php:61 +msgid "Search All Sales Orders" msgstr "" -#: c:\Apache2\htdocs\account228/reporting/includes/doctext.inc:123 -msgid "Attached you will find " +#: ../sales/inquiry/sales_orders_view.php:67 +msgid "Search All Sales Quotations" msgstr "" -#: c:\Apache2\htdocs\account228/reporting/includes/doctext.inc:124 -msgid "Kindest regards" +#: ../sales/inquiry/sales_orders_view.php:131 +msgid "Dispatch" msgstr "" -#: c:\Apache2\htdocs\account228/reporting/includes/doctext.inc:129 -#: c:\Apache2\htdocs\account228/reporting/includes/doctext.inc:138 -msgid "Delivery Note No." +#: ../sales/inquiry/sales_orders_view.php:171 +msgid "Set this order as a template for direct deliveries/invoices" msgstr "" -#: c:\Apache2\htdocs\account228/reporting/includes/doctext.inc:130 -msgid "Receipt No." +#: ../sales/inquiry/sales_orders_view.php:242 +msgid "Show All:" msgstr "" -#: c:\Apache2\htdocs\account228/reporting/includes/doctext.inc:131 -msgid "Remittance No." +#: ../sales/inquiry/sales_orders_view.php:258 +msgid "Order #" msgstr "" -#: c:\Apache2\htdocs\account228/reporting/includes/doctext.inc:132 -msgid "Purchase Order No." +#: ../sales/inquiry/sales_orders_view.php:262 +#: ../sales/inquiry/sales_orders_view.php:276 +msgid "Cust Order Ref" msgstr "" -#: c:\Apache2\htdocs\account228/reporting/includes/doctext.inc:133 -#: c:\Apache2\htdocs\account228/reporting/includes/doctext.inc:139 -msgid "Order No." +#: ../sales/inquiry/sales_orders_view.php:265 +#: ../sales/inquiry/sales_orders_view.php:279 +msgid "Delivery To" msgstr "" -#: c:\Apache2\htdocs\account228/reporting/includes/doctext.inc:134 -msgid "Quotation No." +#: ../sales/inquiry/sales_orders_view.php:272 +msgid "Quote #" msgstr "" -#: c:\Apache2\htdocs\account228/reporting/includes/doctext.inc:135 -msgid "Invoice No." +#: ../sales/inquiry/sales_orders_view.php:277 +msgid "Quote Date" msgstr "" -#: c:\Apache2\htdocs\account228/reporting/includes/doctext.inc:136 -msgid "Work Order No." +#: ../sales/inquiry/sales_orders_view.php:280 +msgid "Quote Total" msgstr "" -#: c:\Apache2\htdocs\account228/reporting/includes/doctext.inc:136 -msgid "Credit No." +#: ../sales/inquiry/sales_orders_view.php:305 +msgid "Tmpl" msgstr "" -#: c:\Apache2\htdocs\account228/reporting/includes/doctext.inc:151 -msgid "TOTAL ORDER EX VAT" +#: ../sales/includes/cart_class.inc:357 +msgid "You have to enter valid stock code or nonempty description" msgstr "" -#: c:\Apache2\htdocs\account228/reporting/includes/doctext.inc:152 -msgid "TOTAL ORDER VAT INCL." +#: ../sales/includes/sales_ui.inc:50 +msgid "" +"This edit session has been abandoned by opening sales document in another " +"browser tab. You cannot edit more than one sales document at once." msgstr "" -#: c:\Apache2\htdocs\account228/reporting/includes/doctext.inc:153 -msgid "TOTAL PO EX VAT" +#: ../sales/includes/db/custalloc_db.inc:265 +msgid "" +"Unsuspected overallocation happened due to sparse credit notes exists for " +"this invoice.\n" +" Check all credit notes allocated to this invoice for summarized freight " +"charges." msgstr "" -#: c:\Apache2\htdocs\account228/reporting/includes/doctext.inc:154 -msgid "TOTAL DELIVERY INCL. VAT" +#: ../sales/includes/db/sales_invoice_db.inc:173 +msgid "Cash invoice" msgstr "" -#: c:\Apache2\htdocs\account228/reporting/includes/doctext.inc:158 -msgid "As advance / full / part / payment towards:" +#: ../sales/includes/db/sales_order_db.inc:105 +#: ../sales/includes/db/sales_order_db.inc:257 +msgid "Stocks below Re-Order Level at " msgstr "" -#: c:\Apache2\htdocs\account228/reporting/includes/doctext.inc:159 -msgid "By Cash / Cheque* / Draft No." +#: ../sales/includes/db/sales_order_db.inc:108 +#: ../sales/includes/db/sales_order_db.inc:262 +msgid "Below" msgstr "" -#: c:\Apache2\htdocs\account228/reporting/includes/doctext.inc:160 -msgid "Dated" +#: ../sales/includes/db/sales_order_db.inc:109 +#: ../sales/includes/db/sales_order_db.inc:263 +msgid "Please reorder" msgstr "" -#: c:\Apache2\htdocs\account228/reporting/includes/doctext.inc:161 -msgid "Drawn on Bank" +#: ../sales/includes/db/sales_order_db.inc:137 +msgid "Deleted." msgstr "" -#: c:\Apache2\htdocs\account228/reporting/includes/doctext.inc:163 -msgid "Received / Sign" +#: ../sales/includes/ui/sales_credit_ui.inc:94 +#: ../sales/includes/ui/sales_order_ui.inc:380 +msgid "Customer Currency:" msgstr "" -#: c:\Apache2\htdocs\account228/reporting/includes/doctext.inc:167 -msgid "TOTAL RECEIPT" +#: ../sales/includes/ui/sales_credit_ui.inc:112 +#: ../sales/includes/ui/sales_order_ui.inc:639 +msgid "Shipping Company:" msgstr "" -#: c:\Apache2\htdocs\account228/reporting/includes/doctext.inc:169 -msgid "TOTAL REMITTANCE" +#: ../sales/includes/ui/sales_credit_ui.inc:114 +#: ../sales/includes/ui/sales_order_ui.inc:387 +msgid "Customer Discount:" msgstr "" -#: c:\Apache2\htdocs\account228/reporting/includes/doctext.inc:173 -msgid "Outstanding Transactions" +#: ../sales/includes/ui/sales_order_ui.inc:61 +msgid "This item is already on this document. You have been warned." msgstr "" -#: c:\Apache2\htdocs\account228/reporting/includes/doctext.inc:176 -msgid "Statement" +#: ../sales/includes/ui/sales_order_ui.inc:104 +msgid "" +"The selected customer and branch are not valid, or the customer does not " +"have any branches." msgstr "" -#: c:\Apache2\htdocs\account228/reporting/includes/doctext.inc:177 -msgid "as of" +#: ../sales/includes/ui/sales_order_ui.inc:225 +msgid "Shipping Charge" msgstr "" -#: c:\Apache2\htdocs\account228/reporting/includes/excel_report.inc:63 -#: c:\Apache2\htdocs\account228/reporting/includes/pdf_report.inc:59 -msgid "The security settings on your account do not permit you to print this report" +#: ../sales/includes/ui/sales_order_ui.inc:298 +msgid "No customer found for entered text." msgstr "" -#: c:\Apache2\htdocs\account228/reporting/includes/excel_report.inc:247 -#: c:\Apache2\htdocs\account228/reporting/includes/pdf_report.inc:300 -msgid "Print Out Date" +#: ../sales/includes/ui/sales_order_ui.inc:324 +#, php-format +msgid "Customer's payment terms '%s' cannot be selected on this POS" msgstr "" -#: c:\Apache2\htdocs\account228/reporting/includes/excel_report.inc:253 -#: c:\Apache2\htdocs\account228/reporting/includes/pdf_report.inc:309 -msgid "Fiscal Year" +#: ../sales/includes/ui/sales_order_ui.inc:374 +msgid "Reference number unique for this document type" msgstr "" -#: c:\Apache2\htdocs\account228/reporting/includes/excel_report.inc:381 -msgid "Report Date" +#: ../sales/includes/ui/sales_order_ui.inc:418 +msgid "Price List:" msgstr "" -#: c:\Apache2\htdocs\account228/reporting/includes/excel_report.inc:398 -#: c:\Apache2\htdocs\account228/reporting/includes/pdf_report.inc:548 -msgid "Generated At" +#: ../sales/includes/ui/sales_order_ui.inc:435 +msgid "Date of order receive" msgstr "" -#: c:\Apache2\htdocs\account228/reporting/includes/excel_report.inc:404 -#: c:\Apache2\htdocs\account228/reporting/includes/pdf_report.inc:557 -msgid "Generated By" +#: ../sales/includes/ui/sales_order_ui.inc:585 +msgid "Cash payment" msgstr "" -#: c:\Apache2\htdocs\account228/reporting/includes/header2.inc:150 -#: c:\Apache2\htdocs\account228/reporting/includes/pdf_report.inc:336 -#: c:\Apache2\htdocs\account228/reporting/includes/pdf_report.inc:448 -#: c:\Apache2\htdocs\account228/reporting/includes/pdf_report.inc:576 -msgid "Page" +#: ../sales/includes/ui/sales_order_ui.inc:588 +#: ../sales/includes/ui/sales_order_ui.inc:617 +msgid "Deliver from Location:" msgstr "" -#: c:\Apache2\htdocs\account228/reporting/includes/pdf_report.inc:531 -msgid "Report Period" +#: ../sales/includes/ui/sales_order_ui.inc:589 +msgid "Cash account:" msgstr "" -#: c:\Apache2\htdocs\account228/reporting/includes/pdf_report.inc:955 -msgid "Sending document by email failed" +#: ../sales/includes/ui/sales_order_ui.inc:595 +msgid "Delivery Details" msgstr "" -#: c:\Apache2\htdocs\account228/reporting/includes/pdf_report.inc:958 -msgid "has been sent by email." +#: ../sales/includes/ui/sales_order_ui.inc:600 +msgid "Invoice Delivery Details" msgstr "" -#: c:\Apache2\htdocs\account228/reporting/includes/pdf_report.inc:998 -msgid "Report has been sent to network printer " +#: ../sales/includes/ui/sales_order_ui.inc:601 +msgid "Invoice before" msgstr "" -#: c:\Apache2\htdocs\account228/reporting/includes/printer_class.inc:39 -msgid "Cannot open connection to printer" +#: ../sales/includes/ui/sales_order_ui.inc:605 +msgid "Quotation Delivery Details" msgstr "" -#: c:\Apache2\htdocs\account228/reporting/includes/printer_class.inc:50 -msgid "Printer does not acept the job" +#: ../sales/includes/ui/sales_order_ui.inc:610 +msgid "Order Delivery Details" msgstr "" -#: c:\Apache2\htdocs\account228/reporting/includes/printer_class.inc:61 -msgid "Error sending print job control file" +#: ../sales/includes/ui/sales_order_ui.inc:623 +msgid "Enter requested day of delivery" msgstr "" -#: c:\Apache2\htdocs\account228/reporting/includes/printer_class.inc:68 -msgid "Print control file not accepted" +#: ../sales/includes/ui/sales_order_ui.inc:624 +msgid "Enter Valid until Date" msgstr "" -#: c:\Apache2\htdocs\account228/reporting/includes/printer_class.inc:76 -msgid "Cannot send report to printer" +#: ../sales/includes/ui/sales_order_ui.inc:625 +msgid "Deliver To:" msgstr "" -#: c:\Apache2\htdocs\account228/reporting/includes/printer_class.inc:86 -msgid "No ack after report printout" +#: ../sales/includes/ui/sales_order_ui.inc:626 +msgid "Additional identifier for delivery e.g. name of receiving person" msgstr "" -#: c:\Apache2\htdocs\account228/reporting/includes/printer_class.inc:100 -msgid "Cannot flush printing queue" +#: ../sales/includes/ui/sales_order_ui.inc:629 +msgid "Delivery address. Default is address of customer branch" msgstr "" -#: c:\Apache2\htdocs\account228/reporting/includes/reports_classes.inc:44 -msgid "Report Classes:" +#: ../sales/includes/ui/sales_order_ui.inc:633 +msgid "Contact Phone Number:" msgstr "" -#: c:\Apache2\htdocs\account228/reporting/includes/reports_classes.inc:53 -msgid "Reports For Class: " +#: ../sales/includes/ui/sales_order_ui.inc:634 +msgid "Phone number of ordering person. Defaults to branch phone number" msgstr "" -#: c:\Apache2\htdocs\account228/reporting/includes/reports_classes.inc:68 -msgid "Display: " +#: ../sales/includes/ui/sales_order_ui.inc:635 +msgid "Customer Reference:" msgstr "" -#: c:\Apache2\htdocs\account228/reporting/includes/reports_classes.inc:97 -msgid "Invalid date format" +#: ../sales/includes/ui/sales_order_ui.inc:636 +msgid "Customer reference number for this order (if any)" msgstr "" -#: c:\Apache2\htdocs\account228/reporting/includes/reports_classes.inc:133 -msgid "Unknown report parameter type:" +#: ../taxes/item_tax_types.php:17 +msgid "Item Tax Types" msgstr "" -#: c:\Apache2\htdocs\account228/reporting/includes/reports_classes.inc:158 -msgid "No Currency Filter" +#: ../taxes/item_tax_types.php:35 +msgid "The item tax type description cannot be empty." msgstr "" -#: c:\Apache2\htdocs\account228/reporting/includes/reports_classes.inc:203 -msgid "No payment Link" +#: ../taxes/item_tax_types.php:60 +msgid "Selected item tax type has been updated" msgstr "" -#: c:\Apache2\htdocs\account228/reporting/includes/reports_classes.inc:207 -msgid "PDF/Printer" +#: ../taxes/item_tax_types.php:65 +msgid "New item tax type has been added" msgstr "" -#: c:\Apache2\htdocs\account228/reporting/includes/reports_classes.inc:215 -msgid "No Graphics" +#: ../taxes/item_tax_types.php:77 +msgid "" +"Cannot delete this item tax type because items have been created referring " +"to it." msgstr "" -#: c:\Apache2\htdocs\account228/reporting/includes/reports_classes.inc:215 -msgid "Vertical bars" +#: ../taxes/item_tax_types.php:93 +msgid "Selected item tax type has been deleted" msgstr "" -#: c:\Apache2\htdocs\account228/reporting/includes/reports_classes.inc:215 -msgid "Horizontal bars" +#: ../taxes/item_tax_types.php:112 +msgid "Tax exempt" msgstr "" -#: c:\Apache2\htdocs\account228/reporting/includes/reports_classes.inc:216 -msgid "Dots" +#: ../taxes/item_tax_types.php:170 +msgid "Is Fully Tax-exempt:" msgstr "" -#: c:\Apache2\htdocs\account228/reporting/includes/reports_classes.inc:216 -msgid "Lines" +#: ../taxes/item_tax_types.php:177 +msgid "Select which taxes this item tax type is exempt from." msgstr "" -#: c:\Apache2\htdocs\account228/reporting/includes/reports_classes.inc:216 -msgid "Pie" +#: ../taxes/item_tax_types.php:180 +msgid "Tax Name" msgstr "" -#: c:\Apache2\htdocs\account228/reporting/includes/reports_classes.inc:216 -msgid "Donut" +#: ../taxes/item_tax_types.php:180 +msgid "Is exempt" msgstr "" -#: c:\Apache2\htdocs\account228/reporting/includes/reports_classes.inc:220 -#: c:\Apache2\htdocs\account228/reporting/includes/reports_classes.inc:223 -msgid "No Type Filter" +#: ../taxes/tax_groups.php:17 +msgid "Tax Groups" msgstr "" -#: c:\Apache2\htdocs\account228/reporting/includes/reports_classes.inc:234 -msgid "No Account Group Filter" +#: ../taxes/tax_groups.php:27 +msgid "" +"There are no tax types defined. Define tax types before defining tax groups." msgstr "" -#: c:\Apache2\htdocs\account228/reporting/includes/reports_classes.inc:249 -#: c:\Apache2\htdocs\account228/reporting/includes/reports_classes.inc:255 -#: c:\Apache2\htdocs\account228/reporting/includes/reports_classes.inc:261 -msgid "No Dimension Filter" +#: ../taxes/tax_groups.php:40 +msgid "The tax group name cannot be empty." msgstr "" -#: c:\Apache2\htdocs\account228/reporting/includes/reports_classes.inc:267 -msgid "No Customer Filter" +#: ../taxes/tax_groups.php:84 +msgid "Selected tax group has been updated" msgstr "" -#: c:\Apache2\htdocs\account228/reporting/includes/reports_classes.inc:278 -msgid "No Supplier Filter" +#: ../taxes/tax_groups.php:89 +msgid "New tax group has been added" msgstr "" -#: c:\Apache2\htdocs\account228/reporting/includes/reports_classes.inc:286 -msgid "IV" +#: ../taxes/tax_groups.php:104 +msgid "" +"Cannot delete this tax group because customer branches been created " +"referring to it." msgstr "" -#: c:\Apache2\htdocs\account228/reporting/includes/reports_classes.inc:287 -#: c:\Apache2\htdocs\account228/reporting/includes/reports_classes.inc:330 -#: c:\Apache2\htdocs\account228/reporting/includes/reports_classes.inc:340 -msgid "CN" +#: ../taxes/tax_groups.php:110 +msgid "" +"Cannot delete this tax group because suppliers been created referring to it." msgstr "" -#: c:\Apache2\htdocs\account228/reporting/includes/reports_classes.inc:328 -msgid "BP" +#: ../taxes/tax_groups.php:127 +msgid "Selected tax group has been deleted" msgstr "" -#: c:\Apache2\htdocs\account228/reporting/includes/reports_classes.inc:329 -msgid "SP" +#: ../taxes/tax_groups.php:146 +msgid "Shipping Tax" msgstr "" -#: c:\Apache2\htdocs\account228/reporting/includes/reports_classes.inc:338 -msgid "BD" +#: ../taxes/tax_groups.php:204 +msgid "Tax applied to Shipping:" msgstr "" -#: c:\Apache2\htdocs\account228/reporting/includes/reports_classes.inc:339 -msgid "CP" +#: ../taxes/tax_groups.php:208 +msgid "Select the taxes that are included in this group." msgstr "" -#: c:\Apache2\htdocs\account228/reporting/includes/reports_classes.inc:357 -msgid "No Location Filter" +#: ../taxes/tax_groups.php:213 +msgid "Rate (%)" msgstr "" -#: c:\Apache2\htdocs\account228/reporting/includes/reports_classes.inc:360 -msgid "No Category Filter" +#: ../taxes/tax_types.php:16 +msgid "Tax Types" msgstr "" -#: c:\Apache2\htdocs\account228/reporting/includes/reports_classes.inc:369 -msgid "No Sales Folk Filter" +#: ../taxes/tax_types.php:30 +msgid "The tax type name cannot be empty." msgstr "" -#: c:\Apache2\htdocs\account228/reporting/includes/reports_classes.inc:376 -msgid "No Users Filter" +#: ../taxes/tax_types.php:36 +msgid "The default tax rate must be numeric and not less than zero." msgstr "" -#: c:\Apache2\htdocs\account228/reporting/includes/reports_classes.inc:384 -msgid "No tags" +#: ../taxes/tax_types.php:42 +msgid "Selected GL Accounts cannot be used by another tax type." msgstr "" -#: c:\Apache2\htdocs\account228/sales/includes/sales_ui.inc:48 -msgid "This edit session has been abandoned by opening sales document in another browser tab. You cannot edit more than one sales document at once." +#: ../taxes/tax_types.php:56 +msgid "New tax type has been added" msgstr "" -#: c:\Apache2\htdocs\account228/sales/includes/db/sales_invoice_db.inc:182 -msgid "Cash invoice" +#: ../taxes/tax_types.php:67 +msgid "Selected tax type has been updated" msgstr "" -#: c:\Apache2\htdocs\account228/sales/includes/db/sales_order_db.inc:101 -#: c:\Apache2\htdocs\account228/sales/includes/db/sales_order_db.inc:251 -msgid "Stocks below Re-Order Level at " +#: ../taxes/tax_types.php:77 +msgid "" +"Cannot delete this tax type because tax groups been created referring to it." msgstr "" -#: c:\Apache2\htdocs\account228/sales/includes/db/sales_order_db.inc:104 -#: c:\Apache2\htdocs\account228/sales/includes/db/sales_order_db.inc:256 -msgid "Below" +#: ../taxes/tax_types.php:94 +msgid "Selected tax type has been deleted" msgstr "" -#: c:\Apache2\htdocs\account228/sales/includes/db/sales_order_db.inc:105 -#: c:\Apache2\htdocs\account228/sales/includes/db/sales_order_db.inc:257 -msgid "Please reorder" +#: ../taxes/tax_types.php:112 +msgid "" +"To avoid problems with manual journal entry all tax types should have unique " +"Sales/Purchasing GL accounts." msgstr "" -#: c:\Apache2\htdocs\account228/sales/includes/db/sales_order_db.inc:132 -msgid "Deleted." +#: ../taxes/tax_types.php:115 +msgid "Default Rate (%)" msgstr "" -#: c:\Apache2\htdocs\account228/sales/includes/ui/sales_credit_ui.inc:94 -#: c:\Apache2\htdocs\account228/sales/includes/ui/sales_order_ui.inc:366 -msgid "Customer Currency:" +#: ../taxes/tax_types.php:116 +msgid "Sales GL Account" msgstr "" -#: c:\Apache2\htdocs\account228/sales/includes/ui/sales_credit_ui.inc:112 -#: c:\Apache2\htdocs\account228/sales/includes/ui/sales_order_ui.inc:617 -msgid "Shipping Company:" +#: ../taxes/tax_types.php:116 +msgid "Purchasing GL Account" msgstr "" -#: c:\Apache2\htdocs\account228/sales/includes/ui/sales_credit_ui.inc:114 -#: c:\Apache2\htdocs\account228/sales/includes/ui/sales_order_ui.inc:405 -msgid "Customer Discount:" +#: ../taxes/tax_types.php:159 +msgid "Default Rate:" msgstr "" -#: c:\Apache2\htdocs\account228/sales/includes/ui/sales_order_ui.inc:61 -msgid "This item is already on this document. You have been warned." +#: ../taxes/tax_types.php:161 +msgid "Sales GL Account:" msgstr "" -#: c:\Apache2\htdocs\account228/sales/includes/ui/sales_order_ui.inc:101 -msgid "The selected customer and branch are not valid, or the customer does not have any branches." +#: ../taxes/tax_types.php:162 +msgid "Purchasing GL Account:" msgstr "" -#: c:\Apache2\htdocs\account228/sales/includes/ui/sales_order_ui.inc:224 -msgid "Shipping Charge" +#: ../themes/default/renderer.php:17 +#: ../themes/exclusive/renderer.php:19 +msgid "Main Menu" msgstr "" -#: c:\Apache2\htdocs\account228/sales/includes/ui/sales_order_ui.inc:297 -msgid "No customer found for entered text." +#: ../themes/default/renderer.php:43 +#: ../themes/default/renderer.php:66 +#: ../themes/exclusive/renderer.php:43 +#: ../themes/exclusive/renderer.php:50 +msgid "Help" msgstr "" -#: c:\Apache2\htdocs\account228/sales/includes/ui/sales_order_ui.inc:360 -msgid "Reference number unique for this document type" +#: ../themes/default/renderer.php:61 +#: ../themes/exclusive/renderer.php:46 +msgid "Preferences" msgstr "" -#: c:\Apache2\htdocs\account228/sales/includes/ui/sales_order_ui.inc:373 -msgid "Payment:" +#: ../themes/exclusive/renderer.php:232 +msgid "Top 10 customers in fiscal year" msgstr "" -#: c:\Apache2\htdocs\account228/sales/includes/ui/sales_order_ui.inc:395 -msgid "Price List:" +#: ../themes/exclusive/renderer.php:285 +msgid " overdue Sales Invoices" msgstr "" -#: c:\Apache2\htdocs\account228/sales/includes/ui/sales_order_ui.inc:414 -msgid "Date of order receive" +#: ../themes/exclusive/renderer.php:289 +#: ../themes/exclusive/renderer.php:383 +msgid "Ref." msgstr "" -#: c:\Apache2\htdocs\account228/sales/includes/ui/sales_order_ui.inc:561 -msgid "Cash payment" +#: ../themes/exclusive/renderer.php:329 +msgid "Top 10 suppliers in fiscal year" msgstr "" -#: c:\Apache2\htdocs\account228/sales/includes/ui/sales_order_ui.inc:563 -#: c:\Apache2\htdocs\account228/sales/includes/ui/sales_order_ui.inc:595 -msgid "Deliver from Location:" +#: ../themes/exclusive/renderer.php:379 +msgid " overdue Purchase Invoices" msgstr "" -#: c:\Apache2\htdocs\account228/sales/includes/ui/sales_order_ui.inc:566 -msgid "Cash account:" +#: ../themes/exclusive/renderer.php:427 +msgid "Top 10 Manufactured Items in fiscal year" msgstr "" -#: c:\Apache2\htdocs\account228/sales/includes/ui/sales_order_ui.inc:573 -msgid "Delivery Details" +#: ../themes/exclusive/renderer.php:429 +msgid "Top 10 Sold Items in fiscal year" msgstr "" -#: c:\Apache2\htdocs\account228/sales/includes/ui/sales_order_ui.inc:578 -msgid "Invoice Delivery Details" +#: ../themes/exclusive/renderer.php:484 +msgid "Top 10 Dimensions in fiscal year" msgstr "" -#: c:\Apache2\htdocs\account228/sales/includes/ui/sales_order_ui.inc:579 -msgid "Invoice before" +#: ../themes/exclusive/renderer.php:540 +msgid "Class Balances" msgstr "" -#: c:\Apache2\htdocs\account228/sales/includes/ui/sales_order_ui.inc:583 -msgid "Quotation Delivery Details" +#: ../themes/exclusive/renderer.php:569 +msgid "Class" msgstr "" -#: c:\Apache2\htdocs\account228/sales/includes/ui/sales_order_ui.inc:588 -msgid "Order Delivery Details" +#: ../sql/alter2.1.php:18 +msgid "Upgrade from version 2.0 to 2.1" msgstr "" -#: c:\Apache2\htdocs\account228/sales/includes/ui/sales_order_ui.inc:602 -msgid "Enter requested day of delivery" +#: ../sql/alter2.1.php:35 +msgid "Cannot retrieve bank accounts codes" msgstr "" -#: c:\Apache2\htdocs\account228/sales/includes/ui/sales_order_ui.inc:602 -msgid "Enter Valid until Date" +#: ../sql/alter2.1.php:43 +msgid "Cannot update bank transactions" msgstr "" -#: c:\Apache2\htdocs\account228/sales/includes/ui/sales_order_ui.inc:603 -msgid "Deliver To:" +#: ../sql/alter2.1.php:52 +msgid "Cannot select stock identificators" msgstr "" -#: c:\Apache2\htdocs\account228/sales/includes/ui/sales_order_ui.inc:604 -msgid "Additional identifier for delivery e.g. name of receiving person" +#: ../sql/alter2.1.php:63 +msgid "Cannot insert stock id into item_codes" msgstr "" -#: c:\Apache2\htdocs\account228/sales/includes/ui/sales_order_ui.inc:607 -msgid "Delivery address. Default is address of customer branch" +#: ../sql/alter2.1.php:139 +msgid "" +"Seems that system upgrade to version 2.1 has \n" +"\t\t\tbeen performed for this company already.
If something has gone \n" +"\t\t\twrong and you want to retry upgrade process you MUST perform \n" +"\t\t\tdatabase restore from last backup file first." msgstr "" -#: c:\Apache2\htdocs\account228/sales/includes/ui/sales_order_ui.inc:611 -msgid "Contact Phone Number:" +#: ../sql/alter2.2.php:23 +msgid "Upgrade from version 2.1/2.2beta to 2.2" msgstr "" -#: c:\Apache2\htdocs\account228/sales/includes/ui/sales_order_ui.inc:612 -msgid "Phone number of ordering person. Defaults to branch phone number" +#: ../sql/alter2.2.php:84 +msgid "Cannot query max sales order number." msgstr "" -#: c:\Apache2\htdocs\account228/sales/includes/ui/sales_order_ui.inc:613 -msgid "Customer Reference:" +#: ../sql/alter2.2.php:95 +msgid "Cannot store next sales order reference." msgstr "" -#: c:\Apache2\htdocs\account228/sales/includes/ui/sales_order_ui.inc:614 -msgid "Customer reference number for this order (if any)" +#: ../sql/alter2.2.php:246 +msgid "" +"Cannot upgrade extensions system: file /modules/installed_modules.php is not " +"writeable" msgstr "" +#: ../sql/alter2.3.php:20 +msgid "Upgrade from version 2.2 to 2.3" +msgstr "" diff --git a/lang/new_language_template/locale.inc b/lang/new_language_template/locale.inc index 0ff96ccc..3e3a7c4e 100644 --- a/lang/new_language_template/locale.inc +++ b/lang/new_language_template/locale.inc @@ -14,5 +14,45 @@ If your locale needs special functionality provided by hook functions copy this file to respective lang/xx_XX directory and edit templates below. You can safely remove not used function templates. + + Name it after language code e.g. hooks_en_US */ +class hooks_xx_XX extends hooks { +/* + // + // Price in words. $doc_type is set to document type and can be used to suppress + // price in words printing for selected document types. + // Used instead of built in simple english price_in_words() function. + // + // Returns: amount in words as string. + + function price_in_words($amount, $doc_type) + { + } +*/ +/* + // + // Exchange rate currency $curr as on date $date. + // Keep in mind FA has internally implemented 3 exrate providers + // If any of them supports your currency, you can simply use function below + // with apprioprate provider set, otherwise implement your own. + // Returns: $curr value in home currency units as a real number. + + function retrieve_ex_rate($curr, $date) + { + $provider = 'ECB'; // 'ECB', 'YAHOO' or 'GOOGLE' + return get_extern_rate($curr, $provider, $date); + } +*/ +/* + // Generic function called at the end of Tax Report (report 709) + // Can be used e.g. for special database updates on every report printing + // or to print special tax report footer + // + // Returns: nothing + function tax_report_done() + { + } +*/ +} ?> \ No newline at end of file diff --git a/manufacturing/includes/db/work_order_issues_db.inc b/manufacturing/includes/db/work_order_issues_db.inc index 2bdffa26..28167da7 100644 --- a/manufacturing/includes/db/work_order_issues_db.inc +++ b/manufacturing/includes/db/work_order_issues_db.inc @@ -17,6 +17,11 @@ function add_work_order_issue($woid, $ref, $to_work_order, $items, $location, $w global $Refs; begin_transaction(); + $args = func_get_args(); + $args = (object)array_combine(array('woid', 'ref', 'to_work_order', 'items', 'location', + 'workcentre', 'date_', 'memo_'), $args); + $args->trans_no = 0; + hook_db_prewrite($args, ST_MANUISSUE); $details = get_work_order($woid); @@ -42,6 +47,8 @@ function add_work_order_issue($woid, $ref, $to_work_order, $items, $location, $w $number = db_insert_id(); + $issue_total = $total_cost = 0; + foreach ($items as $item) { @@ -56,7 +63,21 @@ function add_work_order_issue($woid, $ref, $to_work_order, $items, $location, $w VALUES (".db_escape($number).", ".db_escape($item->stock_id).", " .db_escape($item->quantity).")"; db_query($sql,"A work order issue item could not be added"); - } + + $standard_cost = get_standard_cost($item->stock_id); + $issue_cost = $standard_cost * $item->quantity; + $issue = get_stock_gl_code($item->stock_id); + $stockitem = get_item($item->stock_id); + $total_cost += add_gl_trans_std_cost(ST_WORKORDER, $woid, $date_, $issue["inventory_account"], 0, 0, + $date_.": "._("Issue of")." ".$stockitem["description"], -$issue_cost); + $issue_total += $issue_cost; + } + if ($issue_total != 0) + add_issue_cost($details['stock_id'], $details['units_reqd'], $date_, $issue_total); + $issue = get_stock_gl_code($details['stock_id']); + $stockitem = get_item($details['stock_id']); + add_gl_trans_std_cost(ST_WORKORDER, $woid, $date_, $issue["inventory_account"], + 0, 0, $date_.": "._("Issue to")." ".$stockitem["description"], -$total_cost); if ($memo_) add_comments(ST_MANUISSUE, $number, $date_, $memo_); @@ -64,6 +85,8 @@ function add_work_order_issue($woid, $ref, $to_work_order, $items, $location, $w $Refs->save(ST_MANUISSUE, $number, $ref); add_audit_trail(ST_MANUISSUE, $number, $date_); + $args->trans_no = $number; + hook_db_postwrite($args, ST_MANUISSUE); commit_transaction(); } @@ -132,6 +155,7 @@ function exists_work_order_issue($issue_no) function void_work_order_issue($type_no) { begin_transaction(); + hook_db_prevoid(ST_MANUISSUE, $type_no); // void the actual issue items and their quantities $sql = "UPDATE ".TB_PREF."wo_issue_items Set qty_issued = 0 WHERE issue_id=" diff --git a/manufacturing/includes/db/work_order_produce_items_db.inc b/manufacturing/includes/db/work_order_produce_items_db.inc index b9fd16f0..9b2095c0 100644 --- a/manufacturing/includes/db/work_order_produce_items_db.inc +++ b/manufacturing/includes/db/work_order_produce_items_db.inc @@ -14,6 +14,11 @@ function work_order_produce($woid, $ref, $quantity, $date_, $memo_, $close_wo) global $Refs; begin_transaction(); + $args = func_get_args(); + $args = (object)array_combine(array('woid', 'ref', 'quantity', 'date_', 'memo_','close_wo'), + $args); + $args->trans_no = 0; + hook_db_prewrite($args, ST_MANURECEIVE); $details = get_work_order($woid); @@ -48,7 +53,7 @@ function work_order_produce($woid, $ref, $quantity, $date_, $memo_, $close_wo) // insert a +ve stock move for the item being manufactured // negative means "unproduce" or unassemble add_stock_move(ST_MANURECEIVE, $details["stock_id"], $id, - $details["loc_code"], $date_, $memo_, $quantity, 0); + $details["loc_code"], $date_, $ref, $quantity, 0); // update wo quantity and close wo if requested work_order_update_finished_quantity($woid, $quantity, $close_wo); @@ -59,6 +64,8 @@ function work_order_produce($woid, $ref, $quantity, $date_, $memo_, $close_wo) $Refs->save(ST_MANURECEIVE, $id, $ref); add_audit_trail(ST_MANURECEIVE, $id, $date_, _("Production.")); + $args->trans_no = $id; + hook_db_postwrite($args, ST_MANURECEIVE); commit_transaction(); } @@ -101,6 +108,7 @@ function exists_work_order_produce($id) function void_work_order_produce($type_no) { begin_transaction(); + hook_db_prevoid(ST_MANURECEIVE, $type_no); $row = get_work_order_produce($type_no); diff --git a/manufacturing/includes/db/work_orders_db.inc b/manufacturing/includes/db/work_orders_db.inc index b53012e1..e39d334c 100644 --- a/manufacturing/includes/db/work_orders_db.inc +++ b/manufacturing/includes/db/work_orders_db.inc @@ -20,19 +20,20 @@ function add_material_cost($stock_id, $qty, $date_) $standard_cost = get_standard_cost($bom_item['component']); $m_cost += ($bom_item['quantity'] * $standard_cost); } - $dec = user_price_dec(); - price_decimal_format($m_cost, $dec); + //$dec = user_price_dec(); + //price_decimal_format($m_cost, $dec); $sql = "SELECT material_cost FROM ".TB_PREF."stock_master WHERE stock_id = " .db_escape($stock_id); $result = db_query($sql); $myrow = db_fetch($result); $material_cost = $myrow['material_cost']; - $qoh = get_qoh_on_date($stock_id, null, $date_); + //$qoh = get_qoh_on_date($stock_id, null, $date_); + $qoh = get_qoh_on_date($stock_id); if ($qoh < 0) $qoh = 0; if ($qoh + $qty != 0) $material_cost = ($qoh * $material_cost + $qty * $m_cost) / ($qoh + $qty); - $material_cost = round2($material_cost, $dec); + //$material_cost = round2($material_cost, $dec); $sql = "UPDATE ".TB_PREF."stock_master SET material_cost=$material_cost WHERE stock_id=".db_escape($stock_id); db_query($sql,"The cost details for the inventory item could not be updated"); @@ -40,8 +41,8 @@ function add_material_cost($stock_id, $qty, $date_) function add_overhead_cost($stock_id, $qty, $date_, $costs) { - $dec = user_price_dec(); - price_decimal_format($costs, $dec); + //$dec = user_price_dec(); + //price_decimal_format($costs, $dec); if ($qty != 0) $costs /= $qty; $sql = "SELECT overhead_cost FROM ".TB_PREF."stock_master WHERE stock_id = " @@ -49,12 +50,13 @@ function add_overhead_cost($stock_id, $qty, $date_, $costs) $result = db_query($sql); $myrow = db_fetch($result); $overhead_cost = $myrow['overhead_cost']; - $qoh = get_qoh_on_date($stock_id, null, $date_); + //$qoh = get_qoh_on_date($stock_id, null, $date_); + $qoh = get_qoh_on_date($stock_id); if ($qoh < 0) $qoh = 0; if ($qoh + $qty != 0) $overhead_cost = ($qoh * $overhead_cost + $qty * $costs) / ($qoh + $qty); - $overhead_cost = round2($overhead_cost, $dec); + //$overhead_cost = round2($overhead_cost, $dec); $sql = "UPDATE ".TB_PREF."stock_master SET overhead_cost=".db_escape($overhead_cost)." WHERE stock_id=".db_escape($stock_id); db_query($sql,"The cost details for the inventory item could not be updated"); @@ -62,8 +64,8 @@ function add_overhead_cost($stock_id, $qty, $date_, $costs) function add_labour_cost($stock_id, $qty, $date_, $costs) { - $dec = user_price_dec(); - price_decimal_format($costs, $dec); + //$dec = user_price_dec(); + //price_decimal_format($costs, $dec); if ($qty != 0) $costs /= $qty; $sql = "SELECT labour_cost FROM ".TB_PREF."stock_master WHERE stock_id = " @@ -71,12 +73,13 @@ function add_labour_cost($stock_id, $qty, $date_, $costs) $result = db_query($sql); $myrow = db_fetch($result); $labour_cost = $myrow['labour_cost']; - $qoh = get_qoh_on_date($stock_id, null, $date_); + //$qoh = get_qoh_on_date($stock_id, null, $date_); + $qoh = get_qoh_on_date($stock_id); if ($qoh < 0) $qoh = 0; if ($qoh + $qty != 0) $labour_cost = ($qoh * $labour_cost + $qty * $costs) / ($qoh + $qty); - $labour_cost = round2($labour_cost, $dec); + //$labour_cost = round2($labour_cost, $dec); $sql = "UPDATE ".TB_PREF."stock_master SET labour_cost=".db_escape($labour_cost)." WHERE stock_id=".db_escape($stock_id); db_query($sql,"The cost details for the inventory item could not be updated"); @@ -91,14 +94,15 @@ function add_issue_cost($stock_id, $qty, $date_, $costs) $result = db_query($sql); $myrow = db_fetch($result); $material_cost = $myrow['material_cost']; - $dec = user_price_dec(); - price_decimal_format($material_cost, $dec); - $qoh = get_qoh_on_date($stock_id, null, $date_); + //$dec = user_price_dec(); + //price_decimal_format($material_cost, $dec); + //$qoh = get_qoh_on_date($stock_id, null, $date_); + $qoh = get_qoh_on_date($stock_id); if ($qoh < 0) $qoh = 0; if ($qoh + $qty != 0) $material_cost = ($qty * $costs) / ($qoh + $qty); - $material_cost = round2($material_cost, $dec); + //$material_cost = round2($material_cost, $dec); $sql = "UPDATE ".TB_PREF."stock_master SET material_cost=material_cost+" .db_escape($material_cost) ." WHERE stock_id=".db_escape($stock_id); @@ -114,6 +118,11 @@ function add_work_order($wo_ref, $loc_code, $units_reqd, $stock_id, return add_work_order_quick($wo_ref, $loc_code, $units_reqd, $stock_id, $type, $date_, $memo_, $costs, $cr_acc, $labour, $cr_lab_acc); begin_transaction(); + $args = func_get_args(); + $args = (object)array_combine(array('wo_ref', 'loc_code', 'units_reqd', 'stock_id', + 'type', 'date_', 'required_by', 'memo_', 'costs', 'cr_acc', 'labour', 'cr_lab_acc'), $args); + $args->woid = 0; + hook_db_prewrite($args, ST_WORKORDER); add_material_cost($stock_id, $units_reqd, $date_); @@ -134,6 +143,8 @@ function add_work_order($wo_ref, $loc_code, $units_reqd, $stock_id, $Refs->save(ST_WORKORDER, $woid, $wo_ref); add_audit_trail(ST_WORKORDER, $woid, $date_); + $args->woid = $woid; + hook_db_postwrite($args, ST_WORKORDER); commit_transaction(); return $woid; @@ -145,6 +156,10 @@ function update_work_order($woid, $loc_code, $units_reqd, $stock_id, $date_, $required_by, $memo_) { begin_transaction(); + $args = func_get_args(); + $args = (object)array_combine(array('woid', 'loc_code', 'units_reqd', 'stock_id', + 'date_', 'required_by', 'memo_'), $args); + hook_db_prewrite($args, ST_WORKORDER); add_material_cost($_POST['old_stk_id'], -$_POST['old_qty'], $date_); add_material_cost($stock_id, $units_reqd, $date_); @@ -163,12 +178,14 @@ function update_work_order($woid, $loc_code, $units_reqd, $stock_id, update_comments(ST_WORKORDER, $woid, null, $memo_); add_audit_trail(ST_WORKORDER, $woid, $date_, _("Updated.")); + hook_db_postwrite($args, ST_WORKORDER); commit_transaction(); } function delete_work_order($woid) { begin_transaction(); + hook_db_prevoid(ST_WORKORDER, $woid); add_material_cost($_POST['stock_id'], -$_POST['quantity'], $_POST['date_']); @@ -189,13 +206,13 @@ function delete_work_order($woid) function get_work_order($woid, $allow_null=false) { - $sql = "SELECT ".TB_PREF."workorders.*, ".TB_PREF."stock_master.description As StockItemName, - ".TB_PREF."locations.location_name, ".TB_PREF."locations.delivery_address - FROM ".TB_PREF."workorders, ".TB_PREF."stock_master, ".TB_PREF."locations - WHERE ".TB_PREF."stock_master.stock_id=".TB_PREF."workorders.stock_id - AND ".TB_PREF."locations.loc_code=".TB_PREF."workorders.loc_code - AND ".TB_PREF."workorders.id=".db_escape($woid)." - GROUP BY ".TB_PREF."workorders.id"; + $sql = "SELECT wo.*,st.description As StockItemName,l.location_name, + l.delivery_address,l.email, l.contact + FROM ".TB_PREF."workorders wo, ".TB_PREF."stock_master st, ".TB_PREF."locations l + WHERE st.stock_id=wo.stock_id + AND l.loc_code=wo.loc_code + AND wo.id=".db_escape($woid)." + GROUP BY wo.id"; $result = db_query($sql, "The work order issues could not be retrieved"); @@ -295,6 +312,7 @@ function work_order_update_finished_quantity($woid, $quantity, $force_close=0) function void_work_order($woid) { begin_transaction(); + hook_db_prevoid(ST_WORKORDER, $woid); $work_order = get_work_order($woid); if (!($work_order["type"] == WO_ADVANCED)) @@ -381,6 +399,78 @@ function void_work_order($woid) commit_transaction(); } +function get_sql_for_work_orders($outstanding_only, $all_items) +{ + $sql = "SELECT + workorder.id, + workorder.wo_ref, + workorder.type, + location.location_name, + item.description, + workorder.units_reqd, + workorder.units_issued, + workorder.date_, + workorder.required_by, + workorder.released_date, + workorder.closed, + workorder.released, + workorder.stock_id, + unit.decimals + FROM ".TB_PREF."workorders as workorder," + .TB_PREF."stock_master as item," + .TB_PREF."item_units as unit," + .TB_PREF."locations as location + WHERE workorder.stock_id=item.stock_id + AND workorder.loc_code=location.loc_code + AND item.units=unit.abbr"; + + if (check_value('OpenOnly') || $outstanding_only != 0) + { + $sql .= " AND workorder.closed=0"; + } + + if (isset($_POST['StockLocation']) && $_POST['StockLocation'] != $all_items) + { + $sql .= " AND workorder.loc_code=".db_escape($_POST['StockLocation']); + } + + if (isset($_POST['OrderNumber']) && $_POST['OrderNumber'] != "") + { + $sql .= " AND workorder.wo_ref LIKE ".db_escape('%'.$_POST['OrderNumber'].'%'); + } + + if (isset($_POST['SelectedStockItem']) && $_POST['SelectedStockItem'] != $all_items) + { + $sql .= " AND workorder.stock_id=".db_escape($_POST['SelectedStockItem']); + } + + if (check_value('OverdueOnly')) + { + $Today = date2sql(Today()); + + $sql .= " AND workorder.required_by < '$Today' "; + } + return $sql; +} + +function get_sql_for_where_used() +{ + $sql = "SELECT + bom.parent, + workcentre.name As WorkCentreName, + location.location_name, + bom.quantity, + parent.description + FROM ".TB_PREF."bom as bom, " + .TB_PREF."stock_master as parent, " + .TB_PREF."workcentres as workcentre, " + .TB_PREF."locations as location + WHERE bom.parent = parent.stock_id + AND bom.workcentre_added = workcentre.id + AND bom.loc_code = location.loc_code + AND bom.component=".db_escape($_POST['stock_id']); + return $sql; +} //-------------------------------------------------------------------------------------- function get_gl_wo_cost($woid, $cost_type) { diff --git a/manufacturing/includes/db/work_orders_quick_db.inc b/manufacturing/includes/db/work_orders_quick_db.inc index 92b984dd..1534e277 100644 --- a/manufacturing/includes/db/work_orders_quick_db.inc +++ b/manufacturing/includes/db/work_orders_quick_db.inc @@ -11,11 +11,17 @@ ***********************************************************************/ //-------------------------------------------------------------------------------------- -function add_work_order_quick($wo_ref, $loc_code, $units_reqd, $stock_id, $type, $date_, $memo_, $costs, $cr_acc, $labour, $cr_lab_acc) +function add_work_order_quick($wo_ref, $loc_code, $units_reqd, $stock_id, $type, + $date_, $memo_, $costs, $cr_acc, $labour, $cr_lab_acc) { global $Refs; begin_transaction(); + $args = func_get_args(); + $args = (object)array_combine(array('wo_ref', 'loc_code', 'units_reqd', 'stock_id', + 'type', 'date_', 'memo_', 'costs', 'cr_acc', 'labour', 'cr_lab_acc'), $args); + $args->woid = 0; + hook_db_prewrite($args, ST_WORKORDER); // if unassembling, reverse the stock movements if ($type == WO_UNASSEMBLY) @@ -81,6 +87,9 @@ function add_work_order_quick($wo_ref, $loc_code, $units_reqd, $stock_id, $type, $Refs->save(ST_WORKORDER, $woid, $wo_ref); add_audit_trail(ST_WORKORDER, $woid, $date_,_("Quick production.")); + + $args->woid = $woid; + hook_db_postwrite($args, ST_WORKORDER); commit_transaction(); return $woid; } @@ -100,35 +109,41 @@ function work_order_quick_costs($woid, $stock_id, $units_reqd, $date_, $advanced $bom_accounts = get_stock_gl_code($bom_item["component"]); $bom_cost = $bom_item["ComponentCost"] * $units_reqd; - + + $memo = $bom_item["quantity"] ." * ".$bom_item["description"]; if ($advanced) { + $memo = $date_.": ".$memo; update_wo_requirement_issued($woid, $bom_item['component'], $bom_item["quantity"] * $units_reqd); // insert a -ve stock move for each item add_stock_move(ST_MANURECEIVE, $bom_item["component"], $advanced, $bom_item["loc_code"], $date_, "", -$bom_item["quantity"] * $units_reqd, 0); } $total_cost += add_gl_trans_std_cost(ST_WORKORDER, $woid, $date_, $bom_accounts["inventory_account"], 0, 0, - null, -$bom_cost); + $memo, -$bom_cost); } if ($advanced) { + $wo = get_work_order($woid); // also take the additional issues + // moved to work_order_issues_db.inc + /* $res = get_additional_issues($woid); - $wo = get_work_order($woid); $issue_total = 0; while ($item = db_fetch($res)) { $standard_cost = get_standard_cost($item['stock_id']); $issue_cost = $standard_cost * $item['qty_issued'] * $units_reqd / $wo['units_reqd']; $issue = get_stock_gl_code($item['stock_id']); - $total_cost += add_gl_trans_std_cost(ST_WORKORDER, $woid, $date_, $issue["inventory_account"], 0, 0, - null, -$issue_cost); + $stockitem = get_item($item['stock_id']); + $total_cost += add_gl_trans_std_cost(ST_WORKORDER, $woid, $date_, $issue["inventory_account"], 0, 0, + $date_.": "._("Issue of")." ".$stockitem["description"], -$issue_cost); $issue_total += $issue_cost; } if ($issue_total != 0) add_issue_cost($stock_id, $units_reqd, $date_, $issue_total); + */ $lcost = get_gl_wo_cost($woid, WO_LABOUR); add_labour_cost($stock_id, $units_reqd, $date_, $lcost * $units_reqd / $wo['units_reqd']); $ocost = get_gl_wo_cost($woid, WO_OVERHEAD); @@ -169,8 +184,12 @@ function work_order_quick_costs($woid, $stock_id, $units_reqd, $date_, $advanced PT_WORKORDER, WO_LABOUR); } // debit total components $total_cost - add_gl_trans_std_cost(ST_WORKORDER, $woid, $date_, $item_accounts["inventory_account"], - 0, 0, null, -$total_cost); + $stockitem = get_item($stock_id); + $memo = _("Produced")." ".$units_reqd. " * ".$stockitem["description"]; + if ($advanced) + $memo = $date_.": ".$memo; + add_gl_trans_std_cost(ST_WORKORDER, $woid, $date_, $item_accounts["inventory_account"], + 0, 0, $memo, -$total_cost); } //-------------------------------------------------------------------------------------- diff --git a/manufacturing/includes/manufacturing_ui.inc b/manufacturing/includes/manufacturing_ui.inc index 426356d9..f2cde17f 100644 --- a/manufacturing/includes/manufacturing_ui.inc +++ b/manufacturing/includes/manufacturing_ui.inc @@ -15,8 +15,6 @@ include_once($path_to_root . "/includes/ui.inc"); function display_bom($item_check) { - global $table_style; - $result = get_bom($item_check); if (db_num_rows($result) == 0) @@ -26,7 +24,7 @@ function display_bom($item_check) else { - start_table($table_style); + start_table(TABLESTYLE); $th = array(_("Component"), _("Description"), _("Work Centre"), _("From Location"), _("Quantity"), _("Unit Cost"), _("Total Cost")); @@ -70,7 +68,7 @@ function display_bom($item_check) function display_wo_requirements($woid, $quantity, $show_qoh=false, $date=null) { - global $table_style, $SysPrefs; + global $SysPrefs; $result = get_wo_requirements($woid); @@ -81,7 +79,7 @@ function display_wo_requirements($woid, $quantity, $show_qoh=false, $date=null) else { - start_table("$table_style width=80%"); + start_table(TABLESTYLE, "width=80%"); $th = array(_("Component"), _("From Location"), _("Work Centre"), _("Unit Quantity"), _("Total Quantity"), _("Units Issued"), _("On Hand")); @@ -145,7 +143,7 @@ function display_wo_requirements($woid, $quantity, $show_qoh=false, $date=null) function display_wo_productions($woid) { - global $path_to_root, $table_style; + global $path_to_root; $result = get_work_order_productions($woid); @@ -155,7 +153,7 @@ function display_wo_productions($woid) } else { - start_table($table_style); + start_table(TABLESTYLE); $th = array(_("#"), _("Reference"), _("Date"), _("Quantity")); table_header($th); @@ -188,7 +186,7 @@ function display_wo_productions($woid) function display_wo_issues($woid) { - global $path_to_root, $table_style; + global $path_to_root; $result = get_work_order_issues($woid); @@ -198,7 +196,7 @@ function display_wo_issues($woid) } else { - start_table($table_style); + start_table(TABLESTYLE); $th = array(_("#"), _("Reference"), _("Date")); table_header($th); @@ -224,9 +222,8 @@ function display_wo_issues($woid) function display_wo_payments($woid) { - global $path_to_root, $table_style, $wo_cost_types; + global $path_to_root, $wo_cost_types; - //$result = get_bank_trans(null, null, PT_WORKORDER, $woid); $result = get_gl_wo_cost_trans($woid); if (db_num_rows($result) == 0) @@ -235,7 +232,7 @@ function display_wo_payments($woid) } else { - start_table($table_style); + start_table(TABLESTYLE); $th = array(_("#"), _("Type"), _("Date"), _("Amount")); table_header($th); @@ -263,7 +260,7 @@ function display_wo_payments($woid) function display_wo_details($woid, $suppress_view_link=false) { - global $table_style, $wo_types_array; + global $wo_types_array; $myrow = get_work_order($woid); @@ -273,7 +270,7 @@ function display_wo_details($woid, $suppress_view_link=false) exit; } - start_table("$table_style width=80%"); + start_table(TABLESTYLE, "width=80%"); if ($myrow["released"] == true) $th = array(_("#"), _("Reference"), _("Type"), _("Manufactured Item"), @@ -319,7 +316,7 @@ function display_wo_details($woid, $suppress_view_link=false) function display_wo_details_quick($woid, $suppress_view_link=false) { - global $table_style, $wo_types_array; + global $wo_types_array; $myrow = get_work_order($woid); @@ -329,7 +326,7 @@ function display_wo_details_quick($woid, $suppress_view_link=false) exit; } - start_table("$table_style width=80%"); + start_table(TABLESTYLE, "width=80%"); $th = array(_("#"), _("Reference"), _("Type"), _("Manufactured Item"), _("Into Location"), _("Date"), _("Quantity")); diff --git a/manufacturing/includes/work_order_issue_ui.inc b/manufacturing/includes/work_order_issue_ui.inc index 5924f2cc..dac556de 100644 --- a/manufacturing/includes/work_order_issue_ui.inc +++ b/manufacturing/includes/work_order_issue_ui.inc @@ -25,11 +25,11 @@ function add_to_issue(&$order, $new_item, $new_item_qty, $standard_cost) function display_issue_items($title, &$order) { - global $table_style, $path_to_root; + global $path_to_root; display_heading($title); div_start('items_table'); - start_table("$table_style width=80% colspan=7"); + start_table(TABLESTYLE, "width=80% colspan=7"); $th = array(_("Item Code"), _("Item Description"), _("Quantity"), _("Unit"), _("Unit Cost"), ''); if ( count($order->line_items)) $th[] = ''; diff --git a/manufacturing/inquiry/bom_cost_inquiry.php b/manufacturing/inquiry/bom_cost_inquiry.php index 9b311a7d..40612fe2 100644 --- a/manufacturing/inquiry/bom_cost_inquiry.php +++ b/manufacturing/inquiry/bom_cost_inquiry.php @@ -31,7 +31,7 @@ if (list_updated('stock_id')) $Ajax->activate('_page_body'); start_form(false, true); -start_table("class='tablestyle_noborder'"); +start_table(TABLESTYLE_NOBORDER); stock_manufactured_items_list_row(_("Select a manufacturable item:"), 'stock_id', null, false, true); end_table(); br(); diff --git a/manufacturing/inquiry/where_used_inquiry.php b/manufacturing/inquiry/where_used_inquiry.php index 14286c0a..10fce898 100644 --- a/manufacturing/inquiry/where_used_inquiry.php +++ b/manufacturing/inquiry/where_used_inquiry.php @@ -37,20 +37,7 @@ function select_link($row) "/manufacturing/manage/bom_edit.php?stock_id=" . $row["parent"]); } -$sql = "SELECT - bom.parent, - workcentre.name As WorkCentreName, - location.location_name, - bom.quantity, - parent.description - FROM ".TB_PREF."bom as bom, " - .TB_PREF."stock_master as parent, " - .TB_PREF."workcentres as workcentre, " - .TB_PREF."locations as location - WHERE bom.parent = parent.stock_id - AND bom.workcentre_added = workcentre.id - AND bom.loc_code = location.loc_code - AND bom.component=".db_escape($_POST['stock_id']); +$sql = get_sql_for_where_used(); $cols = array( _("Parent Item") => array('fun'=>'select_link'), diff --git a/manufacturing/manage/bom_edit.php b/manufacturing/manage/bom_edit.php index 742c2b1a..9734dfa4 100644 --- a/manufacturing/manage/bom_edit.php +++ b/manufacturing/manage/bom_edit.php @@ -62,44 +62,11 @@ else //-------------------------------------------------------------------------------------------------- -function check_for_recursive_bom($ultimate_parent, $component_to_check) -{ - - /* returns true ie 1 if the bom contains the parent part as a component - ie the bom is recursive otherwise false ie 0 */ - - $sql = "SELECT component FROM ".TB_PREF."bom WHERE parent=".db_escape($component_to_check); - $result = db_query($sql,"could not check recursive bom"); - - if ($result != 0) - { - while ($myrow = db_fetch_row($result)) - { - if ($myrow[0] == $ultimate_parent) - { - return 1; - } - - if (check_for_recursive_bom($ultimate_parent, $myrow[0])) - { - return 1; - } - } //(while loop) - } //end if $result is true - - return 0; - -} //end of function check_for_recursive_bom - -//-------------------------------------------------------------------------------------------------- - function display_bom_items($selected_parent) { - global $table_style; - $result = get_bom($selected_parent); -div_start('bom'); - start_table("$table_style width=60%"); + div_start('bom'); + start_table(TABLESTYLE, "width=60%"); $th = array(_("Code"), _("Description"), _("Location"), _("Work Centre"), _("Quantity"), _("Units"),'',''); table_header($th); @@ -122,7 +89,7 @@ div_start('bom'); } //END WHILE LIST LOOP end_table(); -div_end(); + div_end(); } //-------------------------------------------------------------------------------------------------- @@ -138,15 +105,8 @@ function on_submit($selected_parent, $selected_component=-1) if ($selected_component != -1) { - - $sql = "UPDATE ".TB_PREF."bom SET workcentre_added=".db_escape($_POST['workcentre_added']) - . ",loc_code=".db_escape($_POST['loc_code']) . ", - quantity= " . input_num('quantity') . " - WHERE parent=".db_escape($selected_parent) . " - AND id=".db_escape($selected_component); - check_db_error("Could not update this bom component", $sql); - - db_query($sql,"could not update bom"); + update_bom($selected_parent, $selected_component, $_POST['workcentre_added'], $_POST['loc_code'], + input_num('quantity')); display_notification(_('Selected component has been updated')); $Mode = 'RESET'; } @@ -162,21 +122,11 @@ function on_submit($selected_parent, $selected_component=-1) { /*Now check to see that the component is not already on the bom */ - $sql = "SELECT component FROM ".TB_PREF."bom - WHERE parent=".db_escape($selected_parent)." - AND component=".db_escape($_POST['component']) . " - AND workcentre_added=".db_escape($_POST['workcentre_added']) . " - AND loc_code=".db_escape($_POST['loc_code']); - $result = db_query($sql,"check failed"); - - if (db_num_rows($result) == 0) + if (!is_component_already_on_bom($_POST['component'], $_POST['workcentre_added'], + $_POST['loc_code'], $selected_parent)) { - $sql = "INSERT INTO ".TB_PREF."bom (parent, component, workcentre_added, loc_code, quantity) - VALUES (".db_escape($selected_parent).", ".db_escape($_POST['component']) . "," - .db_escape($_POST['workcentre_added']) . ", ".db_escape($_POST['loc_code']) . ", " - . input_num('quantity') . ")"; - - db_query($sql,"check failed"); + add_bom($selected_parent, $_POST['component'], $_POST['workcentre_added'], + $_POST['loc_code'], input_num('quantity')); display_notification(_("A new component part has been added to the bill of material for this item.")); $Mode = 'RESET'; } @@ -198,8 +148,7 @@ function on_submit($selected_parent, $selected_component=-1) if ($Mode == 'Delete') { - $sql = "DELETE FROM ".TB_PREF."bom WHERE id=".db_escape($selected_id); - db_query($sql,"Could not delete this bom components"); + delete_bom($selected_id); display_notification(_("The component item has been deleted from this bom")); $Mode = 'RESET'; @@ -216,8 +165,10 @@ if ($Mode == 'RESET') start_form(); start_form(false, true); -start_table("class='tablestyle_noborder'"); -stock_manufactured_items_list_row(_("Select a manufacturable item:"), 'stock_id', null, false, true); +start_table(TABLESTYLE_NOBORDER); +start_row(); +stock_manufactured_items_list_cells(_("Select a manufacturable item:"), 'stock_id', null, false, true); +end_row(); if (list_updated('stock_id')) $Ajax->activate('_page_body'); end_table(); @@ -238,32 +189,26 @@ start_form(); //-------------------------------------------------------------------------------------- echo '
'; - start_table($table_style2); + start_table(TABLESTYLE2); if ($selected_id != -1) { if ($Mode == 'Edit') { //editing a selected component from the link to the line item - $sql = "SELECT ".TB_PREF."bom.*,".TB_PREF."stock_master.description FROM " - .TB_PREF."bom,".TB_PREF."stock_master - WHERE id=".db_escape($selected_id)." - AND ".TB_PREF."stock_master.stock_id=".TB_PREF."bom.component"; - - $result = db_query($sql, "could not get bom"); - $myrow = db_fetch($result); + $myrow = get_component_from_bom($selected_id); $_POST['loc_code'] = $myrow["loc_code"]; $_POST['component'] = $myrow["component"]; // by Tom Moulton $_POST['workcentre_added'] = $myrow["workcentre_added"]; $_POST['quantity'] = number_format2($myrow["quantity"], get_qty_dec($myrow["component"])); - label_row(_("Component:"), $myrow["component"] . " - " . $myrow["description"]); + label_row(_("Component:"), $myrow["component"] . " - " . $myrow["description"]); } hidden('selected_id', $selected_id); } else { start_row(); - label_cell(_("Component:")); + label_cell(_("Component:"), "class='label'"); echo ""; echo stock_component_items_list('component', $selected_parent, null, false, true); diff --git a/manufacturing/manage/work_centres.php b/manufacturing/manage/work_centres.php index 03014572..10fcf365 100644 --- a/manufacturing/manage/work_centres.php +++ b/manufacturing/manage/work_centres.php @@ -56,19 +56,13 @@ if ($Mode=='ADD_ITEM' || $Mode=='UPDATE_ITEM') function can_delete($selected_id) { - $sql= "SELECT COUNT(*) FROM ".TB_PREF."bom WHERE workcentre_added=".db_escape($selected_id); - $result = db_query($sql, "check can delete work centre"); - $myrow = db_fetch_row($result); - if ($myrow[0] > 0) + if (key_in_foreign_table($selected_id, 'bom', 'workcentre_added')) { display_error(_("Cannot delete this work centre because BOMs have been created referring to it.")); return false; } - - $sql= "SELECT COUNT(*) FROM ".TB_PREF."wo_requirements WHERE workcentre=".db_escape($selected_id); - $result = db_query($sql, "check can delete work centre"); - $myrow = db_fetch_row($result); - if ($myrow[0] > 0) + + if (key_in_foreign_table($selected_id, 'wo_requirements', 'workcentre')) { display_error(_("Cannot delete this work centre because work order requirements have been created referring to it.")); return false; @@ -103,7 +97,7 @@ if ($Mode == 'RESET') $result = get_all_work_centres(check_value('show_inactive')); start_form(); -start_table("$table_style width=50%"); +start_table(TABLESTYLE, "width=50%"); $th = array(_("Name"), _("description"), "", ""); inactive_control_column($th); table_header($th); @@ -126,7 +120,7 @@ inactive_control_row($th); end_table(1); //----------------------------------------------------------------------------------- -start_table($table_style2); +start_table(TABLESTYLE2); if ($selected_id != -1) { diff --git a/manufacturing/search_work_orders.php b/manufacturing/search_work_orders.php index 3fdbf1df..05892e3e 100644 --- a/manufacturing/search_work_orders.php +++ b/manufacturing/search_work_orders.php @@ -62,7 +62,7 @@ if (isset($_GET["stock_id"])) start_form(false, false, $_SERVER['PHP_SELF'] ."?outstanding_only=$outstanding_only"); -start_table("class='tablestyle_noborder'"); +start_table(TABLESTYLE_NOBORDER); start_row(); ref_cells(_("Reference:"), 'OrderNumber', '',null, '', true); @@ -143,8 +143,8 @@ function costs_link($row) function view_gl_link($row) { - if ($row['closed'] == 0) - return ''; + //if ($row['closed'] == 0) + // return ''; return get_gl_view_str(ST_WORKORDER, $row['id']); } @@ -153,55 +153,7 @@ function dec_amount($row, $amount) return number_format2($amount, $row['decimals']); } -$sql = "SELECT - workorder.id, - workorder.wo_ref, - workorder.type, - location.location_name, - item.description, - workorder.units_reqd, - workorder.units_issued, - workorder.date_, - workorder.required_by, - workorder.released_date, - workorder.closed, - workorder.released, - workorder.stock_id, - unit.decimals - FROM ".TB_PREF."workorders as workorder," - .TB_PREF."stock_master as item," - .TB_PREF."item_units as unit," - .TB_PREF."locations as location - WHERE workorder.stock_id=item.stock_id - AND workorder.loc_code=location.loc_code - AND item.units=unit.abbr"; - -if (check_value('OpenOnly') || $outstanding_only != 0) -{ - $sql .= " AND workorder.closed=0"; -} - -if (isset($_POST['StockLocation']) && $_POST['StockLocation'] != $all_items) -{ - $sql .= " AND workorder.loc_code=".db_escape($_POST['StockLocation']); -} - -if (isset($_POST['OrderNumber']) && $_POST['OrderNumber'] != "") -{ - $sql .= " AND workorder.wo_ref LIKE ".db_escape('%'.$_POST['OrderNumber'].'%'); -} - -if (isset($_POST['SelectedStockItem']) && $_POST['SelectedStockItem'] != $all_items) -{ - $sql .= " AND workorder.stock_id=".db_escape($_POST['SelectedStockItem']); -} - -if (check_value('OverdueOnly')) -{ - $Today = date2sql(Today()); - - $sql .= " AND workorder.required_by < '$Today' "; -} +$sql = get_sql_for_work_orders($outstanding_only, $all_items); $cols = array( _("#") => array('fun'=>'view_link'), @@ -211,7 +163,7 @@ $cols = array( _("Item") => array('fun'=>'view_stock'), _("Required") => array('fun'=>'dec_amount', 'align'=>'right'), _("Manufactured") => array('fun'=>'dec_amount', 'align'=>'right'), - _("Date") => 'date', + _("Date") => array('name'=>'date_', 'type'=>'date', 'ord'=>'desc'), _("Required By") => array('type'=>'date', 'ord'=>''), array('insert'=>true, 'fun'=> 'edit_link'), array('insert'=>true, 'fun'=> 'release_link'), diff --git a/manufacturing/view/wo_issue_view.php b/manufacturing/view/wo_issue_view.php index d8cda6eb..63b815b6 100644 --- a/manufacturing/view/wo_issue_view.php +++ b/manufacturing/view/wo_issue_view.php @@ -36,12 +36,10 @@ if ($_GET['trans_no'] != "") function display_wo_issue($issue_no) { - global $table_style; - $myrow = get_work_order_issue($issue_no); br(1); - start_table($table_style); + start_table(TABLESTYLE); $th = array(_("Issue #"), _("Reference"), _("For Work Order #"), _("Item"), _("From Location"), _("To Work Centre"), _("Date of Issue")); table_header($th); @@ -67,8 +65,6 @@ function display_wo_issue($issue_no) function display_wo_issue_details($issue_no) { - global $table_style; - $result = get_work_order_issue_details($issue_no); if (db_num_rows($result) == 0) @@ -77,7 +73,7 @@ function display_wo_issue_details($issue_no) } else { - start_table($table_style); + start_table(TABLESTYLE); $th = array(_("Component"), _("Quantity"), _("Units")); table_header($th); @@ -123,7 +119,7 @@ display_wo_issue_details($wo_issue_no); echo "
"; -end_page(true); +end_page(true, false, false, ST_MANUISSUE, $wo_issue_no); ?> diff --git a/manufacturing/view/wo_production_view.php b/manufacturing/view/wo_production_view.php index 3017ac31..985bf643 100644 --- a/manufacturing/view/wo_production_view.php +++ b/manufacturing/view/wo_production_view.php @@ -37,12 +37,10 @@ if ($_GET['trans_no'] != "") function display_wo_production($prod_id) { - global $table_style; - $myrow = get_work_order_produce($prod_id); br(1); - start_table($table_style); + start_table(TABLESTYLE); $th = array(_("Production #"), _("Reference"), _("For Work Order #"), _("Item"), _("Quantity Manufactured"), _("Date")); table_header($th); @@ -73,7 +71,7 @@ display_wo_production($wo_production); br(2); -end_page(true); +end_page(true, false, false, ST_MANURECEIVE, $wo_production); ?> diff --git a/manufacturing/view/work_order_view.php b/manufacturing/view/work_order_view.php index 61dfbf3c..611fe88c 100644 --- a/manufacturing/view/work_order_view.php +++ b/manufacturing/view/work_order_view.php @@ -81,6 +81,6 @@ echo "
"; is_voided_display(ST_WORKORDER, $woid, _("This work order has been voided.")); -end_page(true); +end_page(true, false, false, ST_WORKORDER, $woid); ?> diff --git a/manufacturing/work_order_add_finished.php b/manufacturing/work_order_add_finished.php index c23dc93f..acf67f73 100644 --- a/manufacturing/work_order_add_finished.php +++ b/manufacturing/work_order_add_finished.php @@ -50,6 +50,7 @@ if (isset($_GET['AddedID'])) display_note(print_link(_("Print the GL Journal Entries for this Work Order"), 702, $ar), 1); hyperlink_no_params("search_work_orders.php", _("Select another &Work Order to Process")); + br(); end_page(); exit; @@ -110,7 +111,13 @@ function can_process() set_focus('date_'); return false; } - + // don't produce more that required. Otherwise change the Work Order. + if (input_num('quantity') > ($wo_details["units_reqd"] - $wo_details["units_issued"])) + { + display_error(_("The production exceeds the quantity needed. Please change the Work Order.")); + set_focus('quantity'); + return false; + } // if unassembling we need to check the qoh if (($_POST['ProductionType'] == 0) && !$SysPrefs->allow_negative_stock()) { @@ -185,7 +192,7 @@ $dec = get_qty_dec($wo_details["stock_id"]); if (!isset($_POST['quantity']) || $_POST['quantity'] == '') $_POST['quantity'] = qty_format(max($wo_details["units_reqd"] - $wo_details["units_issued"], 0), $wo_details["stock_id"], $dec); -start_table($table_style2); +start_table(TABLESTYLE2); br(); ref_row(_("Reference:"), 'ref', '', $Refs->get_next(29)); diff --git a/manufacturing/work_order_costs.php b/manufacturing/work_order_costs.php index 4e7f0537..50e7f7fe 100644 --- a/manufacturing/work_order_costs.php +++ b/manufacturing/work_order_costs.php @@ -49,6 +49,7 @@ if (isset($_GET['AddedID'])) hyperlink_params("work_order_costs.php", _("Enter another additional cost."), "trans_no=$id"); hyperlink_no_params("search_work_orders.php", _("Select another &Work Order to Process")); + br(); end_page(); exit; @@ -103,9 +104,10 @@ function can_process() if (isset($_POST['process']) && can_process() == true) { + $date = $_POST['date_']; begin_transaction(); add_gl_trans_std_cost(ST_WORKORDER, $_POST['selected_id'], $_POST['date_'], $_POST['cr_acc'], - 0, 0, $wo_cost_types[$_POST['PaymentType']], -input_num('costs'), PT_WORKORDER, $_POST['PaymentType']); + 0, 0, $date.": ".$wo_cost_types[$_POST['PaymentType']], -input_num('costs'), PT_WORKORDER, $_POST['PaymentType']); $is_bank_to = is_bank_account($_POST['cr_acc']); if ($is_bank_to) { @@ -115,7 +117,7 @@ if (isset($_POST['process']) && can_process() == true) } add_gl_trans_std_cost(ST_WORKORDER, $_POST['selected_id'], $_POST['date_'], $_POST['db_acc'], - $_POST['dim1'], $_POST['dim2'], $wo_cost_types[$_POST['PaymentType']], input_num('costs'), PT_WORKORDER, + $_POST['dim1'], $_POST['dim2'], $date.": ".$wo_cost_types[$_POST['PaymentType']], input_num('costs'), PT_WORKORDER, $_POST['PaymentType']); commit_transaction(); @@ -133,7 +135,7 @@ start_form(); hidden('selected_id', $_POST['selected_id']); //hidden('WOReqQuantity', $_POST['WOReqQuantity']); -start_table($table_style2); +start_table(TABLESTYLE2); br(); @@ -143,9 +145,7 @@ date_row(_("Date:"), 'date_'); $item_accounts = get_stock_gl_code($wo_details['stock_id']); $_POST['db_acc'] = $item_accounts['assembly_account']; -$sql = "SELECT DISTINCT account_code FROM ".TB_PREF."bank_accounts"; -$rs = db_query($sql,"could not get bank accounts"); -$r = db_fetch_row($rs); +$r = get_default_bank_account(get_company_pref('curr_default')); $_POST['cr_acc'] = $r[0]; amount_row(_("Additional Costs:"), 'costs'); diff --git a/manufacturing/work_order_entry.php b/manufacturing/work_order_entry.php index d6bea933..aaba58d4 100644 --- a/manufacturing/work_order_entry.php +++ b/manufacturing/work_order_entry.php @@ -326,7 +326,7 @@ if (get_post('_type_update')) start_form(); -start_table($table_style2); +start_table(TABLESTYLE2); $existing_comments = ""; diff --git a/manufacturing/work_order_issue.php b/manufacturing/work_order_issue.php index 1b129f35..dc2a4380 100644 --- a/manufacturing/work_order_issue.php +++ b/manufacturing/work_order_issue.php @@ -32,9 +32,12 @@ page(_($help_context = "Issue Items to Work Order"), false, false, "", $js); if (isset($_GET['AddedID'])) { + $id = $_GET['AddedID']; display_notification(_("The work order issue has been entered.")); - display_note(get_trans_view_str(ST_WORKORDER, $_GET['AddedID'], _("View this Work Order"))); + display_note(get_trans_view_str(ST_WORKORDER, $id, _("View this Work Order"))); + + display_note(get_gl_view_str(ST_WORKORDER, $id, _("View the GL Journal Entries for this Work Order")), 1); hyperlink_no_params("search_work_orders.php", _("Select another &Work Order to Process")); @@ -211,7 +214,7 @@ echo "
"; start_form(); -start_table("$table_style width=90%", 10); +start_table(TABLESTYLE, "width=90%", 10); echo ""; display_issue_items(_("Items to Issue"), $_SESSION['issue_items']); issue_options_controls(); diff --git a/manufacturing/work_order_release.php b/manufacturing/work_order_release.php index 0d58b749..0e9273ed 100644 --- a/manufacturing/work_order_release.php +++ b/manufacturing/work_order_release.php @@ -72,6 +72,7 @@ if (isset($_POST['release'])) display_note(get_trans_view_str(ST_WORKORDER, $selected_id, _("View this Work Order"))); hyperlink_no_params("search_work_orders.php", _("Select another &work order")); + br(); $Ajax->activate('_page_body'); end_page(); @@ -89,7 +90,7 @@ $_POST['memo_'] = ""; if (can_process($myrow)) { - start_table($table_style2); + start_table(TABLESTYLE2); label_row(_("Work Order #:"), $selected_id); label_row(_("Work Order Reference:"), $myrow["wo_ref"]); diff --git a/modules/_cache/index.php b/modules/_cache/index.php new file mode 100644 index 00000000..763940a7 --- /dev/null +++ b/modules/_cache/index.php @@ -0,0 +1,3 @@ + diff --git a/purchasing/includes/db/grn_db.inc b/purchasing/includes/db/grn_db.inc index 5d91b697..8e521288 100644 --- a/purchasing/includes/db/grn_db.inc +++ b/purchasing/includes/db/grn_db.inc @@ -10,16 +10,25 @@ See the License here . ***********************************************************************/ //------------------- update average material cost ------------------------------------------ Joe Hunt Mar-03-2008 - function update_average_material_cost($supplier, $stock_id, $price, $qty, $date, $adj_only=false) { + // probably this function should be optimized + // passing transaction cart as argument. This would + // save a couple of db calls like get_supplier() + + $supp = get_supplier($supplier); if ($supplier != null) - $currency = get_supplier_currency($supplier); + $currency = $supp['curr_code']; else $currency = null; - $dec = user_price_dec(); - price_decimal_format($price, $dec); - $price = round2($price, $dec); + + if ($supp['tax_included']) + $price = get_tax_free_price_for_item($stock_id, $price, $supp['tax_group_id'], + $supp['tax_included']); + + //$dec = user_price_dec(); + //price_decimal_format($price, $dec); + //$price = round2($price, $dec); if ($currency != null) { $ex_rate = get_exchange_rate_to_home_currency($currency, $date); @@ -38,7 +47,9 @@ function update_average_material_cost($supplier, $stock_id, $price, $qty, $date, else $exclude = 0; $cost_adjust = false; - $qoh = get_qoh_on_date($stock_id, null, $date, $exclude); + //$qoh = get_qoh_on_date($stock_id, null, $date, $exclude); + $qoh = get_qoh_on_date($stock_id); + if ($adj_only) { if ($qoh > 0) @@ -55,7 +66,8 @@ function update_average_material_cost($supplier, $stock_id, $price, $qty, $date, if ($qoh + $qty != 0) $material_cost = ($qoh * $material_cost + $qty * $price_in_home_currency) / ($qoh + $qty); } - $material_cost = round2($material_cost, $dec); + //$material_cost = round2($material_cost, $dec); + if ($cost_adjust) // new 2010-02-10 adjust_deliveries($stock_id, $material_cost, $date); $sql = "UPDATE ".TB_PREF."stock_master SET material_cost=".db_escape($material_cost)." @@ -66,15 +78,18 @@ function update_average_material_cost($supplier, $stock_id, $price, $qty, $date, //------------------------------------------------------------------------------------------------------------- -function add_grn(&$po, $date_, $reference, $location) +function add_grn(&$po) { global $Refs; + $date_ = $po->orig_order_date; + begin_transaction(); + hook_db_prewrite($po, ST_SUPPRECEIVE); - $grn = add_grn_batch($po->order_no, $po->supplier_id, $reference, $location, $date_); + $grn = add_grn_batch($po->order_no, $po->supplier_id, $po->reference, $po->Location, $date_); - foreach ($po->line_items as $order_line) + foreach ($po->line_items as $line_no => $order_line) { if ($order_line->receive_qty != 0 && $order_line->receive_qty != "" && isset($order_line->receive_qty)) @@ -82,8 +97,9 @@ function add_grn(&$po, $date_, $reference, $location) /*Update sales_order_details for the new quantity received and the standard cost used for postings to GL and recorded in the stock movements for FIFO/LIFO stocks valuations*/ //------------------- update average material cost ------------------------------------------ Joe Hunt Mar-03-2008 - update_average_material_cost($po->supplier_id, $order_line->stock_id, $order_line->price, - $order_line->receive_qty, $date_); + if (is_inventory_item($order_line->stock_id)) + update_average_material_cost($po->supplier_id, $order_line->stock_id, $order_line->price, + $order_line->receive_qty, $date_); //---------------------------------------------------------------------------------------------------------------- if ($order_line->qty_received == 0) { @@ -101,18 +117,21 @@ function add_grn(&$po, $date_, $reference, $location) $order_line->stock_id, $order_line->item_description, $order_line->standard_cost, $order_line->receive_qty, $order_line->price); - /* Update location stock records - NB a po cannot be entered for a service/kit parts */ - add_stock_move(ST_SUPPRECEIVE, $order_line->stock_id, $grn, $location, $date_, "", - $order_line->receive_qty, $order_line->standard_cost, - $po->supplier_id, 1, $order_line->price); + $po->line_items[$line_no]->grn_item_id = $grn_item; + /* Update location stock records - NB a po cannot be entered for a service/kit parts done automatically */ + add_stock_move(ST_SUPPRECEIVE, $order_line->stock_id, $grn, $po->Location, $date_, "", + $order_line->receive_qty, $order_line->standard_cost, + $po->supplier_id, 1, $order_line->price); } /*quantity received is != 0 */ } /*end of order_line loop */ - $Refs->save(ST_SUPPRECEIVE, $grn, $reference); + $Refs->save(ST_SUPPRECEIVE, $grn, $po->reference); add_audit_trail(ST_SUPPRECEIVE, $grn, $date_); + $po->trans_no = $grn; + hook_db_postwrite($po, ST_SUPPRECEIVE); commit_transaction(); return $grn; @@ -285,12 +304,12 @@ function read_grn_items_to_order($grn_batch, &$order) $units = $myrow["units"]; } - $order->add_to_order($order->lines_on_order+1, $myrow["item_code"], + $order->add_to_order($order->lines_on_order, $myrow["item_code"], 1,$myrow["description"], $myrow["unit_price"],$units, sql2date($myrow["delivery_date"]), $myrow["quantity_inv"], $myrow["qty_recd"]); - $order->line_items[$order->lines_on_order]->po_detail_rec = $myrow["po_detail_item"]; + $order->line_items[$order->lines_on_order-1]->po_detail_rec = $myrow["po_detail_item"]; } /* line po from purchase order details */ } //end of checks on returned data set } @@ -365,6 +384,7 @@ function void_grn($grn_batch) return false; begin_transaction(); + hook_db_prevoid(ST_SUPPRECEIVE, $grn_batch); void_bank_trans(ST_SUPPRECEIVE, $grn_batch, true); void_gl_trans(ST_SUPPRECEIVE, $grn_batch, true); diff --git a/purchasing/includes/db/invoice_db.inc b/purchasing/includes/db/invoice_db.inc index de1e3532..58e3aeb7 100644 --- a/purchasing/includes/db/invoice_db.inc +++ b/purchasing/includes/db/invoice_db.inc @@ -15,31 +15,30 @@ include_once($path_to_root . "/purchasing/includes/db/invoice_items_db.inc"); function read_supplier_details_to_trans(&$supp_trans, $supplier_id) { - $sql = "SELECT ".TB_PREF."suppliers.supp_name, ".TB_PREF."payment_terms.terms, " - .TB_PREF."payment_terms.days_before_due, - ".TB_PREF."payment_terms.day_in_following_month, - ".TB_PREF."suppliers.tax_group_id, ".TB_PREF."tax_groups.name As tax_group_name - From ".TB_PREF."suppliers, ".TB_PREF."payment_terms, ".TB_PREF."tax_groups - WHERE ".TB_PREF."suppliers.tax_group_id = ".TB_PREF."tax_groups.id - AND ".TB_PREF."suppliers.payment_terms=".TB_PREF."payment_terms.terms_indicator - AND ".TB_PREF."suppliers.supplier_id = ".db_escape($supplier_id); + $sql = "SELECT supp.supp_name, terms.terms, terms.days_before_due, + terms.day_in_following_month, supp.tax_included, + supp.tax_group_id, tax_group.name AS tax_group_name, + supp.credit_limit - Sum(IFNULL(IF(trans.type=".ST_SUPPCREDIT.", -1, 1) + * (ov_amount + ov_gst + ov_discount),0)) as cur_credit + FROM ".TB_PREF."suppliers supp LEFT JOIN ".TB_PREF."supp_trans trans ON supp.supplier_id = trans.supplier_id, ".TB_PREF."payment_terms terms, ".TB_PREF."tax_groups tax_group + WHERE supp.tax_group_id = tax_group.id + AND supp.payment_terms=terms.terms_indicator + AND supp.supplier_id = ".db_escape($supplier_id)." GROUP BY supp.supp_name"; $result = db_query($sql, "The supplier record selected: " . $supplier_id . " cannot be retrieved"); $myrow = db_fetch($result); $supp_trans->supplier_id = $supplier_id; + $supp_trans->tax_included = $myrow['tax_included']; $supp_trans->supplier_name = $myrow['supp_name']; - $supp_trans->terms_description = $myrow['terms']; + $supp_trans->terms = array( + 'description' => $myrow['terms'], + 'days_before_due' => $myrow['days_before_due'], + 'day_in_following_month' => $myrow['day_in_following_month'] ); + + $supp_trans->credit = $myrow['cur_credit']; - if ($myrow['days_before_due'] == 0) - { - $supp_trans->terms = "1" . $myrow['day_in_following_month']; - } - else - { - $supp_trans->terms = "0" . $myrow['days_before_due']; - } $supp_trans->tax_description = $myrow['tax_group_name']; $supp_trans->tax_group_id = $myrow['tax_group_id']; @@ -108,7 +107,8 @@ function get_diff_in_home_currency($supplier, $old_date, $date, $amount1, $amoun $ex_rate = get_exchange_rate_to_home_currency($currency, $date); $amount2 = $amount2 / $ex_rate; $diff = $amount2 - $amount1; - return round2($diff, $dec); + //return round2($diff, $dec); + return $diff; } //---------------------------------------------------------------------------------------- @@ -119,63 +119,60 @@ function add_supp_invoice($supp_trans, $invoice_no=0) // do not receive as ref b //$company_currency = get_company_currency(); /*Start an sql transaction */ begin_transaction(); - + hook_db_prewrite($supp_trans, $supp_trans->trans_type); $tax_total = 0; $taxes = $supp_trans->get_taxes($supp_trans->tax_group_id); - foreach ($taxes as $taxitem) + foreach ($taxes as $n => $taxitem) { - $taxitem['Value'] = round2($taxitem['Value'], user_price_dec()); - $tax_total += $taxitem['Value']; + $taxes[$n]['Value'] = round2($taxitem['Value'], user_price_dec()); + $tax_total += $taxes[$n]['Value']; } - $invoice_items_total = $supp_trans->get_total_charged($supp_trans->tax_group_id); + $invoice_items_total = $supp_trans->get_items_total(); +// $invoice_items_total = $supp_trans->get_total_taxfree($supp_trans->tax_group_id); - if ($supp_trans->is_invoice) - $trans_type = ST_SUPPINVOICE; - else + if($supp_trans->tax_included==0) { + $item_added_tax = $tax_total; + } else { + $item_added_tax = 0; + + } + + $trans_type = $supp_trans->trans_type; + + if ($trans_type == ST_SUPPCREDIT) { - $trans_type = ST_SUPPCREDIT; // let's negate everything because it's a credit note $invoice_items_total = -$invoice_items_total; $tax_total = -$tax_total; $supp_trans->ov_discount = -$supp_trans->ov_discount; // this isn't used at all... + $item_added_tax = -$item_added_tax; } $date_ = $supp_trans->tran_date; $ex_rate = get_exchange_rate_from_home_currency(get_supplier_currency($supp_trans->supplier_id), $date_); /*First insert the invoice into the supp_trans table*/ - $invoice_id = add_supp_trans($trans_type, $supp_trans->supplier_id, $date_, $supp_trans->due_date, + $invoice_id = write_supp_trans($trans_type, 0, $supp_trans->supplier_id, $date_, $supp_trans->due_date, $supp_trans->reference, $supp_trans->supp_reference, - $invoice_items_total, $tax_total, $supp_trans->ov_discount); + $invoice_items_total, $item_added_tax, $supp_trans->ov_discount, "", 0, $supp_trans->tax_included); $total = 0; /* Now the control account */ $supplier_accounts = get_supplier_accounts($supp_trans->supplier_id); $total += add_gl_trans_supplier($trans_type, $invoice_id, $date_, $supplier_accounts["payable_account"], 0, 0, - -($invoice_items_total + $tax_total + $supp_trans->ov_discount), + -($invoice_items_total + $item_added_tax + $supp_trans->ov_discount), $supp_trans->supplier_id, "The general ledger transaction for the control total could not be added"); - /*Loop through the GL Entries and create a debit posting for each of the accounts entered */ - - /*the postings here are a little tricky, the logic goes like this: - if its a general ledger amount it goes straight to the account specified - - if its a GRN amount invoiced then : - - The cost as originally credited to GRN suspense on arrival of items is debited to GRN suspense. Any difference - between the std cost and the currency cost charged as converted at the ex rate of of the invoice is written off - to the purchase price variance account applicable to the item being invoiced. - */ foreach ($supp_trans->gl_codes as $entered_gl_code) { /*GL Items are straight forward - just do the debit postings to the GL accounts specified - the credit is to creditors control act done later for the total invoice value + tax*/ - if (!$supp_trans->is_invoice) + if ($trans_type == ST_SUPPCREDIT) $entered_gl_code->amount = -$entered_gl_code->amount; $memo_ = $entered_gl_code->memo_; @@ -186,16 +183,16 @@ function add_supp_invoice($supp_trans, $invoice_no=0) // do not receive as ref b $entered_gl_code->amount, $memo_); // store tax details if the gl account is a tax account - if (!$supp_trans->is_invoice) + if ($trans_type == ST_SUPPCREDIT) $entered_gl_code->amount = -$entered_gl_code->amount; add_gl_tax_details($entered_gl_code->gl_code, $trans_type, $invoice_id, $entered_gl_code->amount, - $ex_rate, $date_, $supp_trans->supp_reference); + $ex_rate, $date_, $supp_trans->supp_reference, $supp_trans->tax_included); } - foreach ($supp_trans->grn_items as $entered_grn) + foreach ($supp_trans->grn_items as $line_no => $entered_grn) { - if (!$supp_trans->is_invoice) + if ($trans_type == ST_SUPPCREDIT) { $entered_grn->this_quantity_inv = -$entered_grn->this_quantity_inv; set_grn_item_credited($entered_grn, $supp_trans->supplier_id, $invoice_id, $date_); @@ -203,12 +200,16 @@ function add_supp_invoice($supp_trans, $invoice_no=0) // do not receive as ref b $line_taxfree = $entered_grn->taxfree_charge_price($supp_trans->tax_group_id); $line_tax = $entered_grn->full_charge_price($supp_trans->tax_group_id) - $line_taxfree; $stock_gl_code = get_stock_gl_code($entered_grn->item_code); - $iv_act = (is_inventory_item($entered_grn->item_code) ? $stock_gl_code["inventory_account"] : $stock_gl_code["cogs_account"]); + $iv_act = (is_inventory_item($entered_grn->item_code) ? $stock_gl_code["inventory_account"] : + ($supplier_accounts["purchase_account"] ? $supplier_accounts["purchase_account"] : $stock_gl_code["cogs_account"])); $total += add_gl_trans_supplier($trans_type, $invoice_id, $date_, $iv_act, $stock_gl_code['dimension_id'], $stock_gl_code['dimension2_id'], $entered_grn->this_quantity_inv * $line_taxfree, $supp_trans->supplier_id); + /*$total += add_gl_trans_supplier($trans_type, $invoice_id, $date_, $iv_act, + $stock_gl_code['dimension_id'], $stock_gl_code['dimension2_id'], + $entered_grn->this_quantity_inv * $line_taxfree, $supp_trans->supplier_id);*/ // -------------- if price changed since po received. 16 Aug 2008 Joe Hunt - if($supp_trans->is_invoice) + if ($trans_type == ST_SUPPINVOICE) { $old = update_supp_received_items_for_invoice($entered_grn->id, $entered_grn->po_detail_item, $entered_grn->this_quantity_inv, $entered_grn->chg_price); @@ -227,37 +228,63 @@ function add_supp_invoice($supp_trans, $invoice_no=0) // do not receive as ref b //{ //$diff = $entered_grn->chg_price - $old_price; $old_date = sql2date($old[1]); - $diff = get_diff_in_home_currency($supp_trans->supplier_id, $old_date, $date_, $old_price, - $entered_grn->chg_price); - // always return due to change in currency. - $mat_cost = update_average_material_cost(null, $entered_grn->item_code, - $diff, $entered_grn->this_quantity_inv, $old_date, true); + if (is_inventory_item($entered_grn->item_code)) + { + $diff = get_diff_in_home_currency($supp_trans->supplier_id, $old_date, $date_, $old_price, + $entered_grn->chg_price); + + // always return due to change in currency. + /*$mat_cost = update_average_material_cost(null, $entered_grn->item_code, + $diff, $entered_grn->this_quantity_inv, $old_date, true); */ + $mat_cost = update_average_material_cost(null, $entered_grn->item_code, + $diff, $entered_grn->this_quantity_inv, null, true); + + //Add GL transaction for GRN Provision in case of difference + if (($diff * $entered_grn->this_quantity_inv) != 0 ) + { + $diff_amt = $diff * $entered_grn->this_quantity_inv; + add_gl_trans($trans_type, $invoice_id, $date_, $iv_act, + $stock_gl_code['dimension_id'], $stock_gl_code['dimension2_id'], 'GRN Provision', + $diff_amt, null, null, null, + "The general ledger transaction could not be added for the GRN of the inventory item"); + + add_gl_trans($trans_type, $invoice_id, $date_, $stock_gl_code["cogs_account"], + 0, 0, 'GRN Provision', -$diff_amt, null, null, null, + "The general ledger transaction could not be added for the GRN of the inventory item"); + } + } // added 2008-12-08 Joe Hunt. Update the purchase data table add_or_update_purchase_data($supp_trans->supplier_id, $entered_grn->item_code, $entered_grn->chg_price); - $deliveries = get_deliveries_between($entered_grn->item_code, $old_date, Today()); // extend the period, if invoice is before any deliveries. + /*$deliveries = get_deliveries_between($entered_grn->item_code, $old_date, Today()); // extend the period, if invoice is before any deliveries. if ($deliveries[0] != 0) // have deliveries been done during the period? { $deliveries[1] /= $deliveries[0]; $amt = ($mat_cost - $deliveries[1]) * $deliveries[0]; // $amt in home currency if ($amt != 0.0) { + $_s = $entered_grn->item_code; + $_d = $deliveries[0]; + $_od = $old_date; + $_cd = $mat_cost - $deliveries[1]; + $memo = _("Cost difference adjustment for $_s. $_d items delivered since $_od. The cost difference is $_cd"); add_gl_trans($trans_type, $invoice_id, $date_, $stock_gl_code["cogs_account"], - $stock_gl_code['dimension_id'], $stock_gl_code['dimension2_id'], _("Cost diff."), + $stock_gl_code['dimension_id'], $stock_gl_code['dimension2_id'], $memo, $amt, null, null, null, "The general ledger transaction could not be added for the price variance of the inventory item"); add_gl_trans($trans_type, $invoice_id, $date_, $iv_act, - 0, 0, _("Cost diff."), -$amt, null, null, null, + 0, 0, $memo, -$amt, null, null, null, "The general ledger transaction could not be added for the price variance of the inventory item"); } update_stock_move_pid(ST_CUSTDELIVERY, $entered_grn->item_code, $old_date, $date_, 0, $mat_cost); - } - update_stock_move_pid(ST_SUPPRECEIVE, $entered_grn->item_code, $old_date, $old_date, $supp_trans->supplier_id, $mat_cost); + } */ + if (is_inventory_item($entered_grn->item_code)) + update_stock_move_pid(ST_SUPPRECEIVE, $entered_grn->item_code, $old_date, $old_date, $supp_trans->supplier_id, $mat_cost); //} } // ---------------------------------------------------------------------- add_supp_invoice_item($trans_type, $invoice_id, $entered_grn->item_code, - $entered_grn->item_description, 0, $line_taxfree, $line_tax, + $entered_grn->item_description, 0, $entered_grn->chg_price, $line_tax, $entered_grn->this_quantity_inv, $entered_grn->id, $entered_grn->po_detail_item, ""); } /* end of GRN postings */ /* Now the TAX account */ @@ -267,17 +294,16 @@ function add_supp_invoice($supp_trans, $invoice_no=0) // do not receive as ref b if ($taxitem['Net'] != 0) { - if (!$supp_trans->is_invoice) + if ($trans_type == ST_SUPPCREDIT) { $taxitem['Net'] = -$taxitem['Net']; $taxitem['Value'] = -$taxitem['Value']; } - // here we suppose that tax is never included in price (we are company customer). add_trans_tax_details($trans_type, $invoice_id, - $taxitem['tax_type_id'], $taxitem['rate'], 0, $taxitem['Value'], + $taxitem['tax_type_id'], $taxitem['rate'], $supp_trans->tax_included, $taxitem['Value'], $taxitem['Net'], $ex_rate, $date_, $supp_trans->supp_reference); - if (!$supp_trans->is_invoice) + if ($trans_type == ST_SUPPCREDIT) $taxitem['Value'] = -$taxitem['Value']; $total += add_gl_trans_supplier($trans_type, $invoice_id, $date_, $taxitem['purchasing_gl_code'], 0, 0, $taxitem['Value'], @@ -319,8 +345,9 @@ function add_supp_invoice($supp_trans, $invoice_no=0) // do not receive as ref b } } } - + $supp_trans->trans_no = $invoice_id; + hook_db_postwrite($supp_trans, $supp_trans->trans_type); commit_transaction(); return $invoice_id; @@ -363,12 +390,13 @@ function read_supp_invoice($trans_no, $trans_type, &$supp_trans) $supp_trans->tran_date = sql2date($trans_row["tran_date"]); $supp_trans->due_date = sql2date($trans_row["due_date"]); //$supp_trans->Comments = $trans_row["TransText"]; - $supp_trans->Comments = ""; + $supp_trans->Comments = get_comments_string($trans_type, $trans_no); $supp_trans->reference = $trans_row["reference"]; $supp_trans->supp_reference = $trans_row["supp_reference"]; $supp_trans->ov_amount = $trans_row["ov_amount"]; $supp_trans->ov_discount = $trans_row["ov_discount"]; $supp_trans->ov_gst = $trans_row["ov_gst"]; + $supp_trans->tax_included = $trans_row["tax_included"]; $id = $trans_row["trans_no"]; @@ -384,7 +412,7 @@ function read_supp_invoice($trans_no, $trans_type, &$supp_trans) { $supp_trans->add_grn_to_trans($details_row["grn_item_id"], $details_row["po_detail_item_id"], $details_row["stock_id"], $details_row["description"], 0, 0, $details_row["quantity"], 0, $details_row["FullUnitPrice"], - false, 0, 0); + 0, 0); } else { @@ -421,6 +449,7 @@ function void_supp_invoice($type, $type_no) { begin_transaction(); + hook_db_prevoid($type, $type_no); $trans = get_supp_trans($type_no, $type); void_bank_trans($type, $type_no, true); @@ -497,6 +526,47 @@ function void_supp_invoice($type, $type_no) } //---------------------------------------------------------------------------------------- +function get_gl_account_info($acc) +{ + $sql = "SELECT account_code, account_name FROM ".TB_PREF."chart_master WHERE account_code=".db_escape($acc); + return db_query($sql,"get account information"); +} + +function is_reference_already_there($supplier_id, $supp_reference) +{ + $sql = "SELECT Count(*) FROM ".TB_PREF."supp_trans WHERE supplier_id=" + .db_escape($supplier_id) . " AND supp_reference=" + .db_escape($supp_reference) + . " AND ov_amount!=0"; // ignore voided invoice references + + $result=db_query($sql,"The sql to check for the previous entry of the same invoice failed"); + + $myrow = db_fetch_row($result); + return ($myrow[0] == 1); +} + +function remove_not_invoice_item($id) +{ + begin_transaction(); + + $myrow = get_grn_item_detail($id); + + $grn = get_grn_batch($myrow['grn_batch_id']); + + $sql = "UPDATE ".TB_PREF."purch_order_details + SET quantity_received = qty_invoiced, quantity_ordered = qty_invoiced WHERE po_detail_item = ".$myrow["po_detail_item"]; + db_query($sql, "The quantity invoiced of the purchase order line could not be updated"); + $sql = "UPDATE ".TB_PREF."grn_items + SET qty_recd = quantity_inv WHERE id = ".$myrow["id"]; + db_query($sql, "The quantity invoiced off the items received record could not be updated"); + + update_average_material_cost($grn["supplier_id"], $myrow["item_code"], + $myrow["unit_price"], -$myrow["QtyOstdg"], Today()); + + add_stock_move(ST_SUPPRECEIVE, $myrow["item_code"], $myrow['grn_batch_id'], $grn['loc_code'], sql2date($grn["delivery_date"]), "", + -$myrow["QtyOstdg"], $myrow['std_cost_unit'], $grn["supplier_id"], 1, $myrow['unit_price']); + commit_transaction(); +} ?> diff --git a/purchasing/includes/db/po_db.inc b/purchasing/includes/db/po_db.inc index ee2b7d8e..64cd7d3a 100644 --- a/purchasing/includes/db/po_db.inc +++ b/purchasing/includes/db/po_db.inc @@ -13,6 +13,7 @@ function delete_po($po) { + hook_db_prevoid($po, ST_PURCHORDER); $sql = "DELETE FROM ".TB_PREF."purch_orders WHERE order_no=".db_escape($po); db_query($sql, "The order header could not be deleted"); @@ -27,16 +28,20 @@ function add_po(&$po_obj) global $Refs; begin_transaction(); + hook_db_prewrite($po_obj, ST_PURCHORDER); /*Insert to purchase order header record */ - $sql = "INSERT INTO ".TB_PREF."purch_orders (supplier_id, Comments, ord_date, reference, requisition_no, into_stock_location, delivery_address) VALUES("; + $sql = "INSERT INTO ".TB_PREF."purch_orders (supplier_id, Comments, ord_date, reference, + requisition_no, into_stock_location, delivery_address, total, tax_included) VALUES("; $sql .= db_escape($po_obj->supplier_id) . "," . db_escape($po_obj->Comments) . ",'" . date2sql($po_obj->orig_order_date) . "', " . db_escape($po_obj->reference) . ", " . - db_escape($po_obj->requisition_no) . ", " . + db_escape($po_obj->supp_ref) . ", " . db_escape($po_obj->Location) . ", " . - db_escape($po_obj->delivery_address) . ")"; + db_escape($po_obj->delivery_address) . ", " . + db_escape($po_obj->get_trans_total()). ", " . + db_escape($po_obj->tax_included) . ")"; db_query($sql, "The purchase order header record could not be inserted"); @@ -44,18 +49,16 @@ function add_po(&$po_obj) $po_obj->order_no = db_insert_id(); /*Insert the purchase order detail records */ - foreach ($po_obj->line_items as $po_line) + foreach ($po_obj->line_items as $line_no => $po_line) { - if ($po_line->Deleted == false) - { - $sql = "INSERT INTO ".TB_PREF."purch_order_details (order_no, item_code, description, delivery_date, unit_price, quantity_ordered) VALUES ("; - $sql .= $po_obj->order_no . ", " . db_escape($po_line->stock_id). "," . - db_escape($po_line->item_description). ",'" . - date2sql($po_line->req_del_date) . "'," . - db_escape($po_line->price) . ", " . - db_escape($po_line->quantity). ")"; - db_query($sql, "One of the purchase order detail records could not be inserted"); - } + $sql = "INSERT INTO ".TB_PREF."purch_order_details (order_no, item_code, description, delivery_date, unit_price, quantity_ordered) VALUES ("; + $sql .= $po_obj->order_no . ", " . db_escape($po_line->stock_id). "," . + db_escape($po_line->item_description). ",'" . + date2sql($po_line->req_del_date) . "'," . + db_escape($po_line->price) . ", " . + db_escape($po_line->quantity). ")"; + db_query($sql, "One of the purchase order detail records could not be inserted"); + $po_obj->line_items[$line_no]->po_detail_rec = db_insert_id(); } $Refs->save(ST_PURCHORDER, $po_obj->order_no, $po_obj->reference); @@ -63,6 +66,7 @@ function add_po(&$po_obj) //add_comments(ST_PURCHORDER, $po_obj->order_no, $po_obj->orig_order_date, $po_obj->Comments); add_audit_trail(ST_PURCHORDER, $po_obj->order_no, $po_obj->orig_order_date); + hook_db_postwrite($po_obj, ST_PURCHORDER); commit_transaction(); return $po_obj->order_no; @@ -73,53 +77,43 @@ function add_po(&$po_obj) function update_po(&$po_obj) { begin_transaction(); + hook_db_prewrite($po_obj, ST_PURCHORDER); /*Update the purchase order header with any changes */ $sql = "UPDATE ".TB_PREF."purch_orders SET Comments=" . db_escape($po_obj->Comments) . ", - requisition_no= ". db_escape( $po_obj->requisition_no). ", + requisition_no= ". db_escape( $po_obj->supp_ref). ", into_stock_location=" . db_escape($po_obj->Location). ", ord_date='" . date2sql($po_obj->orig_order_date) . "', - delivery_address=" . db_escape($po_obj->delivery_address); + delivery_address=" . db_escape($po_obj->delivery_address).", + total=". db_escape($po_obj->get_trans_total()).", + tax_included=". db_escape($po_obj->tax_included); $sql .= " WHERE order_no = " . $po_obj->order_no; db_query($sql, "The purchase order could not be updated"); + $sql = "DELETE FROM ".TB_PREF."purch_order_details WHERE order_no=" + .db_escape($po_obj->order_no); + db_query($sql, "could not delete old purch order details"); + /*Now Update the purchase order detail records */ foreach ($po_obj->line_items as $po_line) { - - if ($po_line->Deleted==True) - { - // Sherifoz 21.06.03 Handle deleting existing lines - if ($po_line->po_detail_rec!='') - { - $sql = "DELETE FROM ".TB_PREF."purch_order_details WHERE po_detail_item=".db_escape($po_line->po_detail_rec); - db_query($sql, "could not query purch order details"); - } - } - else if ($po_line->po_detail_rec == '') - { - // Sherifoz 21.06.03 Handle adding new lines vs. updating. if no key(po_detail_rec) then it's a new line - $sql = "INSERT INTO ".TB_PREF."purch_order_details (order_no, item_code, description, delivery_date, unit_price, quantity_ordered) VALUES ("; - $sql .= $po_obj->order_no . "," . - db_escape($po_line->stock_id). "," . - db_escape($po_line->item_description). ",'" . - date2sql($po_line->req_del_date) . "'," . - db_escape($po_line->price) . ", ".db_escape($po_line->quantity) . ")"; - } - else - { - $sql = "UPDATE ".TB_PREF."purch_order_details SET item_code=".db_escape($po_line->stock_id).", - description =" . db_escape($po_line->item_description). ", - delivery_date ='" . date2sql($po_line->req_del_date) . "', - unit_price=".db_escape($po_line->price).", - quantity_ordered=".db_escape($po_line->quantity) . " - WHERE po_detail_item=".db_escape($po_line->po_detail_rec); - } + $sql = "INSERT INTO ".TB_PREF."purch_order_details (po_detail_item, order_no, item_code, + description, delivery_date, unit_price, quantity_ordered) VALUES (" + .db_escape($po_line->po_detail_rec ? $po_line->po_detail_rec : 0). "," + .$po_obj->order_no . "," + .db_escape($po_line->stock_id). "," + .db_escape($po_line->item_description). ",'" + .date2sql($po_line->req_del_date) . "'," + .db_escape($po_line->price) . ", " + .db_escape($po_line->quantity) . ")"; + db_query($sql, "One of the purchase order detail records could not be updated"); } - //add_comments(ST_PURCHORDER, $po_obj->order_no, $po_obj->orig_order_date, $po_obj->Comments); + // add_comments(ST_PURCHORDER, $po_obj->order_no, $po_obj->orig_order_date, $po_obj->Comments); + add_audit_trail($po_obj->trans_type, $po_obj->order_no, Today(), _("Updated.")); + hook_db_postwrite($po_obj, ST_PURCHORDER); commit_transaction(); return $po_obj->order_no; @@ -129,7 +123,7 @@ function update_po(&$po_obj) function read_po_header($order_no, &$order) { - $sql = "SELECT ".TB_PREF."purch_orders.*, ".TB_PREF."suppliers.supp_name, + $sql = "SELECT ".TB_PREF."purch_orders.*, ".TB_PREF."suppliers.supp_name, ".TB_PREF."suppliers.tax_group_id, ".TB_PREF."suppliers.curr_code, ".TB_PREF."locations.location_name FROM ".TB_PREF."purch_orders, ".TB_PREF."suppliers, ".TB_PREF."locations WHERE ".TB_PREF."purch_orders.supplier_id = ".TB_PREF."suppliers.supplier_id @@ -144,14 +138,16 @@ function read_po_header($order_no, &$order) $myrow = db_fetch($result); $order->order_no = $order_no; - $order->supplier_id = $myrow["supplier_id"]; - $order->supplier_name = $myrow["supp_name"]; - $order->curr_code = $myrow["curr_code"]; + + $order->set_supplier($myrow["supplier_id"], $myrow["supp_name"], $myrow["curr_code"], + $myrow['tax_group_id'], $myrow["tax_included"]); + + $order->credit = get_current_supp_credit($order->supplier_id); $order->orig_order_date = sql2date($myrow["ord_date"]); $order->Comments = $myrow["comments"]; $order->Location = $myrow["into_stock_location"]; - $order->requisition_no = $myrow["requisition_no"]; + $order->supp_ref = $myrow["requisition_no"]; $order->reference = $myrow["reference"]; $order->delivery_address = $myrow["delivery_address"]; @@ -183,10 +179,8 @@ function read_po_items($order_no, &$order, $open_items_only=false) if (db_num_rows($result) > 0) { - while ($myrow = db_fetch($result)) { - $data = get_purchase_data($order->supplier_id, $myrow['item_code']); if ($data !== false) { @@ -204,12 +198,15 @@ function read_po_items($order_no, &$order, $open_items_only=false) $units = $myrow["units"]; } - if ($order->add_to_order($order->lines_on_order+1, $myrow["item_code"], + if ($order->add_to_order($order->lines_on_order, $myrow["item_code"], $myrow["quantity_ordered"],$myrow["description"], $myrow["unit_price"],$units, sql2date($myrow["delivery_date"]), $myrow["qty_invoiced"], $myrow["quantity_received"])) { - $order->line_items[$order->lines_on_order]->po_detail_rec = $myrow["po_detail_item"]; - $order->line_items[$order->lines_on_order]->standard_cost = $myrow["std_cost_unit"]; /*Needed for receiving goods and GL interface */ + $newline = &$order->line_items[$order->lines_on_order-1]; + $newline->po_detail_rec = $myrow["po_detail_item"]; + $newline->standard_cost = $myrow["std_cost_unit"]; /*Needed for receiving goods and GL interface */ + // set for later GRN edition +// $newline->receive_qty = $newline->quantity - $newline->qty_dispatched; } } /* line po from purchase order details */ } //end of checks on returned data set @@ -227,5 +224,126 @@ function read_po($order_no, &$order, $open_items_only=false) //---------------------------------------------------------------------------------------- +function get_po_items($order_no) +{ + $sql = "SELECT item_code, quantity_ordered, quantity_received, qty_invoiced + FROM ".TB_PREF."purch_order_details + WHERE order_no=".db_escape($order_no) + ." ORDER BY po_detail_item"; + + $result = db_query($sql, "could not query purch order details"); + check_db_error("Could not check that the details of the purchase order had not been changed by another user ", $sql); + return $result; +} +//---------------------------------------------------------------------------------------- + +function get_short_info($stock_id) +{ + $sql = "SELECT description, units, mb_flag + FROM ".TB_PREF."stock_master WHERE stock_id = ".db_escape($stock_id); + + return db_query($sql,"The stock details for " . $stock_id . " could not be retrieved"); +} +function get_sql_for_po_search_completed() +{ + global $order_number, $selected_stock_item;; + + $sql = "SELECT + porder.order_no, + porder.reference, + supplier.supp_name, + location.location_name, + porder.requisition_no, + porder.ord_date, + supplier.curr_code, + Sum(line.unit_price*line.quantity_ordered) AS OrderValue, + porder.into_stock_location + FROM ".TB_PREF."purch_orders as porder, " + .TB_PREF."purch_order_details as line, " + .TB_PREF."suppliers as supplier, " + .TB_PREF."locations as location + WHERE porder.order_no = line.order_no + AND porder.supplier_id = supplier.supplier_id + AND location.loc_code = porder.into_stock_location "; + + if (isset($order_number) && $order_number != "") + { + $sql .= "AND porder.reference LIKE ".db_escape('%'. $order_number . '%'); + } + else + { + + $data_after = date2sql($_POST['OrdersAfterDate']); + $date_before = date2sql($_POST['OrdersToDate']); + + $sql .= " AND porder.ord_date >= '$data_after'"; + $sql .= " AND porder.ord_date <= '$date_before'"; + + if (isset($_POST['StockLocation']) && $_POST['StockLocation'] != ALL_TEXT) + { + $sql .= " AND porder.into_stock_location = ".db_escape($_POST['StockLocation']); + } + if (isset($selected_stock_item)) + { + $sql .= " AND line.item_code=".db_escape($selected_stock_item); + } + + } //end not order number selected + + $sql .= " GROUP BY porder.order_no"; + return $sql; +} + +function get_sql_for_po_search() +{ + global $all_items, $order_number, $selected_stock_item;; + + $sql = "SELECT + porder.order_no, + porder.reference, + supplier.supp_name, + location.location_name, + porder.requisition_no, + porder.ord_date, + supplier.curr_code, + Sum(line.unit_price*line.quantity_ordered) AS OrderValue, + Sum(line.delivery_date < '". date2sql(Today()) ."' + AND (line.quantity_ordered > line.quantity_received)) As OverDue + FROM " + .TB_PREF."purch_orders as porder, " + .TB_PREF."purch_order_details as line, " + .TB_PREF."suppliers as supplier, " + .TB_PREF."locations as location + WHERE porder.order_no = line.order_no + AND porder.supplier_id = supplier.supplier_id + AND location.loc_code = porder.into_stock_location + AND (line.quantity_ordered > line.quantity_received) "; + + if (isset($order_number) && $order_number != "") + { + $sql .= "AND porder.reference LIKE ".db_escape('%'. $order_number . '%'); + } + else + { + $data_after = date2sql($_POST['OrdersAfterDate']); + $data_before = date2sql($_POST['OrdersToDate']); + + $sql .= " AND porder.ord_date >= '$data_after'"; + $sql .= " AND porder.ord_date <= '$data_before'"; + + if (isset($_POST['StockLocation']) && $_POST['StockLocation'] != $all_items) + { + $sql .= " AND porder.into_stock_location = ".db_escape($_POST['StockLocation']); + } + + if (isset($selected_stock_item)) + { + $sql .= " AND line.item_code=".db_escape($selected_stock_item); + } + } //end not order number selected + + $sql .= " GROUP BY porder.order_no"; + return $sql; +} ?> \ No newline at end of file diff --git a/purchasing/includes/db/supp_payment_db.inc b/purchasing/includes/db/supp_payment_db.inc index 3d848ed6..f4a0e27f 100644 --- a/purchasing/includes/db/supp_payment_db.inc +++ b/purchasing/includes/db/supp_payment_db.inc @@ -15,6 +15,11 @@ function add_supp_payment($supplier_id, $date_, $bank_account, global $Refs; begin_transaction(); + $args = func_get_args(); while (count($args) < 9) $args[] = 0; + $args = (object)array_combine(array('supplier_id', 'date_', 'bank_account', + 'amount', 'discount', 'ref', 'memo_', 'rate', 'charge'), $args); + $args->trans_no = 0; + hook_db_prewrite( $args, ST_SUPPAYMENT); $supplier_currency = get_supplier_currency($supplier_id); $bank_account_currency = get_bank_account_currency($bank_account); @@ -38,7 +43,7 @@ function add_supp_payment($supplier_id, $date_, $bank_account, $trans_type = ST_SUPPAYMENT; /* Create a supp_trans entry for the supplier payment */ - $payment_id = add_supp_trans($trans_type, $supplier_id, $date_, $date_, + $payment_id = write_supp_trans($trans_type, 0, $supplier_id, $date_, $date_, $ref, "", -$supp_amount, 0, -$supp_discount, "", $rate); // Now debit creditors account with payment + discount @@ -81,6 +86,8 @@ function add_supp_payment($supplier_id, $date_, $bank_account, $Refs->save($trans_type, $payment_id, $ref); + $args->trans_no = $payment_id; + hook_db_postwrite($args, ST_SUPPAYMENT); commit_transaction(); return $payment_id; @@ -91,6 +98,7 @@ function add_supp_payment($supplier_id, $date_, $bank_account, function void_supp_payment($type, $type_no) { begin_transaction(); + hook_db_prevoid($type, $type_no); void_bank_trans($type, $type_no, true); void_gl_trans($type, $type_no, true); diff --git a/purchasing/includes/db/supp_trans_db.inc b/purchasing/includes/db/supp_trans_db.inc index 3a95a4f5..5ed21c3a 100644 --- a/purchasing/includes/db/supp_trans_db.inc +++ b/purchasing/includes/db/supp_trans_db.inc @@ -10,17 +10,21 @@ See the License here . ***********************************************************************/ //------------------------------------------------------------------------------------------------------------- - -function add_supp_trans($type, $supplier_id, $date_, $due_date, $reference, $supp_reference, - $amount, $amount_tax, $discount, $err_msg="", $rate=0) +// +// FIXME - this should be revised for transaction update case. +// +function write_supp_trans($type, $trans_no, $supplier_id, $date_, $due_date, $reference, $supp_reference, + $amount, $amount_tax, $discount, $err_msg="", $rate=0, $included=0) { + $new = $trans_no==0; $date = date2sql($date_); if ($due_date == "") $due_date = "0000-00-00"; else $due_date = date2sql($due_date); - $trans_no = get_next_trans_no($type); + if ($new) + $trans_no = get_next_trans_no($type); $curr = get_supplier_currency($supplier_id); @@ -29,11 +33,11 @@ function add_supp_trans($type, $supplier_id, $date_, $due_date, $reference, $sup $sql = "INSERT INTO ".TB_PREF."supp_trans (trans_no, type, supplier_id, tran_date, due_date, - reference, supp_reference, ov_amount, ov_gst, rate, ov_discount) "; + reference, supp_reference, ov_amount, ov_gst, rate, ov_discount, tax_included) "; $sql .= "VALUES (".db_escape($trans_no).", ".db_escape($type) .", ".db_escape($supplier_id).", '$date', '$due_date', ".db_escape($reference).", ".db_escape($supp_reference).", ".db_escape($amount) - .", ".db_escape($amount_tax).", ".db_escape($rate).", ".db_escape($discount).")"; + .", ".db_escape($amount_tax).", ".db_escape($rate).", ".db_escape($discount).", ".db_escape($included).")"; if ($err_msg == "") $err_msg = "Cannot insert a supplier transaction record"; @@ -126,6 +130,15 @@ function void_supp_trans($type, $type_no) //---------------------------------------------------------------------------------------- +function clear_supp_trans($type, $type_no) +{ + $sql = "DELETE FROM ".TB_PREF."supp_trans + WHERE type=".db_escape($type)." AND trans_no=".db_escape($type_no); + + db_query($sql, "could not clear supp transactions for type=$type and trans_no=$type_no"); +} +//---------------------------------------------------------------------------------------- + function post_void_supp_trans($type, $type_no) { if ($type == ST_SUPPAYMENT) @@ -150,4 +163,83 @@ function post_void_supp_trans($type, $type_no) //---------------------------------------------------------------------------------------- +function get_sql_for_supplier_inquiry() +{ + $date_after = date2sql($_POST['TransAfterDate']); + $date_to = date2sql($_POST['TransToDate']); + + $sql = "SELECT trans.type, + trans.trans_no, + trans.reference, + supplier.supp_name, + trans.supp_reference, + trans.tran_date, + trans.due_date, + supplier.curr_code, + (trans.ov_amount + trans.ov_gst + trans.ov_discount) AS TotalAmount, + trans.alloc AS Allocated, + ((trans.type = ".ST_SUPPINVOICE." OR trans.type = ".ST_SUPPCREDIT.") AND trans.due_date < '" . date2sql(Today()) . "') AS OverDue, + (ABS(trans.ov_amount + trans.ov_gst + trans.ov_discount - trans.alloc) <= 0.005) AS Settled + FROM ".TB_PREF."supp_trans as trans, ".TB_PREF."suppliers as supplier + WHERE supplier.supplier_id = trans.supplier_id + AND trans.tran_date >= '$date_after' + AND trans.tran_date <= '$date_to' + AND trans.ov_amount != 0"; // exclude voided transactions + + $sql2 = "SELECT ".ST_SUPPRECEIVE." as type, + trans.id as trans_no, + trans.reference, + supplier.supp_name, + '' as supp_reference, + delivery_date as tran_date, + '' as due_date, + supplier.curr_code, + '' AS TotalAmount, + '' AS Allocated, + 0 as OverDue, + 1 as Settled + FROM ".TB_PREF."grn_batch as trans, ".TB_PREF."suppliers as supplier + WHERE supplier.supplier_id = trans.supplier_id + AND trans.delivery_date >= '$date_after' + AND trans.delivery_date <= '$date_to'"; + + if ($_POST['supplier_id'] != ALL_TEXT) { + $sql .= " AND trans.supplier_id = ".db_escape($_POST['supplier_id']); + $sql2 .= " AND trans.supplier_id = ".db_escape($_POST['supplier_id']); + } + if (($_POST['filterType'] == '6')) + { + $sql = $sql2; + } + elseif (!isset($_POST['filterType']) || $_POST['filterType'] == ALL_TEXT || $_POST['filterType'] == '6') { + $sql = "SELECT * FROM (($sql) UNION ($sql2)) as tr"; + } + + if (isset($_POST['filterType']) && $_POST['filterType'] != ALL_TEXT) + { + if (($_POST['filterType'] == '1')) + { + $sql .= " AND (trans.type = ".ST_SUPPINVOICE." OR trans.type = ".ST_BANKDEPOSIT.")"; + } + elseif (($_POST['filterType'] == '2')) + { + $sql .= " AND trans.type = ".ST_SUPPINVOICE." "; + } + elseif ($_POST['filterType'] == '3') + { + $sql .= " AND (trans.type = ".ST_SUPPAYMENT." OR trans.type = ".ST_BANKPAYMENT.") "; + } + elseif (($_POST['filterType'] == '4') || ($_POST['filterType'] == '5')) + { + $sql .= " AND trans.type = ".ST_SUPPCREDIT." "; + } + + if (($_POST['filterType'] == '2') || ($_POST['filterType'] == '5')) + { + $today = date2sql(Today()); + $sql .= " AND trans.due_date < '$today' "; + } + } + return $sql; +} ?> \ No newline at end of file diff --git a/purchasing/includes/db/suppalloc_db.inc b/purchasing/includes/db/suppalloc_db.inc index 9fbe6fa1..f9eed1a8 100644 --- a/purchasing/includes/db/suppalloc_db.inc +++ b/purchasing/includes/db/suppalloc_db.inc @@ -69,7 +69,7 @@ function clear_supp_alloctions($type, $type_no, $date="") { // clear any allocations for this transaction $sql = "SELECT * FROM ".TB_PREF."supp_allocations - WHERE (trans_type_from=$type AND trans_no_from=$type_no) + WHERE (trans_type_from=".db_escape($type)." AND trans_no_from=".db_escape($type_no).") OR (trans_type_to=".db_escape($type)." AND trans_no_to=".db_escape($type_no).")"; $result = db_query($sql, "could not void supp transactions for type=$type and trans_no=$type_no"); @@ -176,5 +176,58 @@ function get_allocatable_to_supp_transactions($supplier_id, $trans_no=null, $typ return db_query($sql." ORDER BY trans_no", "Cannot retreive alloc to transactions"); } +function get_sql_for_supplier_allocation_inquiry() +{ + $date_after = date2sql($_POST['TransAfterDate']); + $date_to = date2sql($_POST['TransToDate']); + $sql = "SELECT + trans.type, + trans.trans_no, + trans.reference, + supplier.supp_name, + trans.supp_reference, + trans.tran_date, + trans.due_date, + supplier.curr_code, + (trans.ov_amount + trans.ov_gst + trans.ov_discount) AS TotalAmount, + trans.alloc AS Allocated, + ((trans.type = ".ST_SUPPINVOICE." OR trans.type = ".ST_SUPPCREDIT.") AND trans.due_date < '" . date2sql(Today()) . "') AS OverDue + FROM " + .TB_PREF."supp_trans as trans, " + .TB_PREF."suppliers as supplier + WHERE supplier.supplier_id = trans.supplier_id + AND trans.tran_date >= '$date_after' + AND trans.tran_date <= '$date_to'"; + + if ($_POST['supplier_id'] != ALL_TEXT) + $sql .= " AND trans.supplier_id = ".db_escape($_POST['supplier_id']); + if (isset($_POST['filterType']) && $_POST['filterType'] != ALL_TEXT) + { + if (($_POST['filterType'] == '1') || ($_POST['filterType'] == '2')) + { + $sql .= " AND trans.type = ".ST_SUPPINVOICE." "; + } + elseif ($_POST['filterType'] == '3') + { + $sql .= " AND trans.type = ".ST_SUPPAYMENT." "; + } + elseif (($_POST['filterType'] == '4') || ($_POST['filterType'] == '5')) + { + $sql .= " AND trans.type = ".ST_SUPPCREDIT." "; + } + + if (($_POST['filterType'] == '2') || ($_POST['filterType'] == '5')) + { + $today = date2sql(Today()); + $sql .= " AND trans.due_date < '$today' "; + } + } + + if (!check_value('showSettled')) + { + $sql .= " AND (round(abs(ov_amount + ov_gst + ov_discount) - alloc,6) != 0) "; + } + return $sql; +} ?> \ No newline at end of file diff --git a/purchasing/includes/db/suppliers_db.inc b/purchasing/includes/db/suppliers_db.inc index dd72a6cf..8a0fdca8 100644 --- a/purchasing/includes/db/suppliers_db.inc +++ b/purchasing/includes/db/suppliers_db.inc @@ -9,6 +9,74 @@ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the License here . ***********************************************************************/ + +function add_supplier($supp_name, $supp_ref, $address, $supp_address, $gst_no, + $website, $supp_account_no, $bank_account, $credit_limit, $dimension_id, $dimension2_id, + $curr_code, $payment_terms, $payable_account, $purchase_account, $payment_discount_account, + $notes, $tax_group_id, $tax_included) +{ + $sql = "INSERT INTO ".TB_PREF."suppliers (supp_name, supp_ref, address, supp_address, gst_no, website, + supp_account_no, bank_account, credit_limit, dimension_id, dimension2_id, curr_code, + payment_terms, payable_account, purchase_account, payment_discount_account, notes, + tax_group_id, tax_included) + VALUES (".db_escape($_POST['supp_name']). ", " + .db_escape($supp_ref). ", " + .db_escape($address) . ", " + .db_escape($supp_address) . ", " + .db_escape($gst_no). ", " + .db_escape($website). ", " + .db_escape($supp_account_no). ", " + .db_escape($bank_account). ", " + .$credit_limit. ", " + .db_escape($dimension_id). ", " + .db_escape($dimension2_id). ", " + .db_escape($curr_code). ", " + .db_escape($payment_terms). ", " + .db_escape($payable_account). ", " + .db_escape($purchase_account). ", " + .db_escape($payment_discount_account). ", " + .db_escape($notes). ", " + .db_escape($tax_group_id). ", " + .db_escape($tax_included). ")"; + + db_query($sql,"The supplier could not be added"); +} + +function update_supplier($supplier_id, $supp_name, $supp_ref, $address, $supp_address, $gst_no, + $website, $supp_account_no, $bank_account, $credit_limit, $dimension_id, $dimension2_id, + $curr_code, $payment_terms, $payable_account, $purchase_account, $payment_discount_account, + $notes, $tax_group_id, $tax_included) +{ + $sql = "UPDATE ".TB_PREF."suppliers SET supp_name=".db_escape($supp_name) . ", + supp_ref=".db_escape($supp_ref) . ", + address=".db_escape($address) . ", + supp_address=".db_escape($supp_address) . ", + gst_no=".db_escape($gst_no) . ", + website=".db_escape($website) . ", + supp_account_no=".db_escape($supp_account_no) . ", + bank_account=".db_escape($bank_account) . ", + credit_limit=".$credit_limit . ", + dimension_id=".db_escape($dimension_id) . ", + dimension2_id=".db_escape($dimension2_id) . ", + curr_code=".db_escape($curr_code).", + payment_terms=".db_escape($payment_terms) . ", + payable_account=".db_escape($payable_account) . ", + purchase_account=".db_escape($purchase_account) . ", + payment_discount_account=".db_escape($payment_discount_account) . ", + notes=".db_escape($notes) . ", + tax_group_id=".db_escape($tax_group_id). ", + tax_included=".db_escape($tax_included) + ." WHERE supplier_id = ".db_escape($supplier_id); + + db_query($sql,"The supplier could not be updated"); +} + +function delete_supplier($supplier_id) +{ + $sql="DELETE FROM ".TB_PREF."suppliers WHERE supplier_id=".db_escape($supplier_id); + db_query($sql,"check failed"); +} + function get_supplier_details($supplier_id, $to=null) { @@ -20,68 +88,37 @@ function get_supplier_details($supplier_id, $to=null) $past2 = 2 * $past1; // removed - supp_trans.alloc from all summations - $value = "(".TB_PREF."supp_trans.ov_amount + ".TB_PREF."supp_trans.ov_gst + ".TB_PREF."supp_trans.ov_discount)"; - $due = "IF (".TB_PREF."supp_trans.type=".ST_SUPPINVOICE." OR ".TB_PREF."supp_trans.type=".ST_SUPPCREDIT.",".TB_PREF."supp_trans.due_date,".TB_PREF."supp_trans.tran_date)"; - $sql = "SELECT ".TB_PREF."suppliers.supp_name, ".TB_PREF."suppliers.curr_code, ".TB_PREF."payment_terms.terms, + $value = "(trans.ov_amount + trans.ov_gst + trans.ov_discount)"; + $due = "IF (trans.type=".ST_SUPPINVOICE." OR trans.type=".ST_SUPPCREDIT.",trans.due_date,trans.tran_date)"; + $sql = "SELECT supp.supp_name, supp.curr_code, ".TB_PREF."payment_terms.terms, - Sum($value) AS Balance, + Sum(IFNULL($value,0)) AS Balance, Sum(IF ((TO_DAYS('$todate') - TO_DAYS($due)) >= 0,$value,0)) AS Due, Sum(IF ((TO_DAYS('$todate') - TO_DAYS($due)) >= $past1,$value,0)) AS Overdue1, - Sum(IF ((TO_DAYS('$todate') - TO_DAYS($due)) >= $past2,$value,0)) AS Overdue2 + Sum(IF ((TO_DAYS('$todate') - TO_DAYS($due)) >= $past2,$value,0)) AS Overdue2, + supp.credit_limit - Sum(IFNULL(IF(trans.type=".ST_SUPPCREDIT.", -1, 1) + * (ov_amount + ov_gst + ov_discount),0)) as cur_credit, + supp.tax_group_id - FROM ".TB_PREF."suppliers, - ".TB_PREF."payment_terms, - ".TB_PREF."supp_trans + FROM ".TB_PREF."suppliers supp + LEFT JOIN ".TB_PREF."supp_trans trans ON supp.supplier_id = trans.supplier_id AND trans.tran_date <= '$todate', + ".TB_PREF."payment_terms WHERE - ".TB_PREF."suppliers.payment_terms = ".TB_PREF."payment_terms.terms_indicator - AND ".TB_PREF."suppliers.supplier_id = $supplier_id - AND ".TB_PREF."supp_trans.tran_date <= '$todate' - AND ".TB_PREF."suppliers.supplier_id = ".TB_PREF."supp_trans.supplier_id + supp.payment_terms = ".TB_PREF."payment_terms.terms_indicator + AND supp.supplier_id = $supplier_id GROUP BY - ".TB_PREF."suppliers.supp_name, + supp.supp_name, ".TB_PREF."payment_terms.terms, ".TB_PREF."payment_terms.days_before_due, ".TB_PREF."payment_terms.day_in_following_month"; $result = db_query($sql,"The customer details could not be retrieved"); - - if (db_num_rows($result) == 0) - { - - /*Because there is no balance - so just retrieve the header information about the customer - the choice is do one query to get the balance and transactions for those customers who have a balance and two queries for those who don't have a balance OR always do two queries - I opted for the former */ - - $nil_balance = true; - - $sql = "SELECT ".TB_PREF."suppliers.supp_name, ".TB_PREF."suppliers.curr_code, ".TB_PREF."suppliers.supplier_id, ".TB_PREF."payment_terms.terms - FROM ".TB_PREF."suppliers, - ".TB_PREF."payment_terms - WHERE - ".TB_PREF."suppliers.payment_terms = ".TB_PREF."payment_terms.terms_indicator - AND ".TB_PREF."suppliers.supplier_id = ".db_escape($supplier_id); - - $result = db_query($sql,"The customer details could not be retrieved"); - - } - else - { - $nil_balance = false; - } - $supp = db_fetch($result); - if ($nil_balance == true) - { - $supp["Balance"] = 0; - $supp["Due"] = 0; - $supp["Overdue1"] = 0; - $supp["Overdue2"] = 0; - } - return $supp; - } function get_supplier($supplier_id) @@ -113,5 +150,27 @@ function get_supplier_accounts($supplier_id) return db_fetch($result); } +function get_supplier_contacts($supplier_id, $action=null) +{ + $results = array(); + $res = get_crm_persons('supplier', $action, $supplier_id); + while($contact = db_fetch($res)) + $results[] = $contact; + + return $results; +} + +function get_current_supp_credit($supplier_id) +{ + $suppdet = get_supplier_details($supplier_id); + return $suppdet['cur_credit']; + +} +function is_new_supplier($id) +{ + $tables = array('supp_trans', 'grn_batch', 'purch_orders', 'purch_data'); + + return !key_in_foreign_table($id, $tables, 'supplier_id'); +} ?> \ No newline at end of file diff --git a/purchasing/includes/po_class.inc b/purchasing/includes/po_class.inc index b3b9c2b2..c9ab5b07 100644 --- a/purchasing/includes/po_class.inc +++ b/purchasing/includes/po_class.inc @@ -15,18 +15,24 @@ class purch_order { - var $supplier_id; - - var $line_items; /*array of objects of class line_details using the product id as the pointer */ + var $trans_type; // order/grn/invoice (direct) + var $line_items; var $curr_code; - var $requisition_no; + var $supp_ref; var $delivery_address; var $Comments; var $Location; + var $supplier_id; var $supplier_name; var $orig_order_date; + var $due_date; var $order_no; /*Only used for modification of existing orders otherwise only established when order committed */ - var $lines_on_order; + var $lines_on_order = 0; + var $credit; + var $tax_group_id; + var $tax_group_array = null; // saves db queries + var $tax_included; // type of prices + var $terms; var $reference; @@ -36,44 +42,47 @@ class purch_order $this->line_items = array(); $this->lines_on_order = $this->order_no = $this->supplier_id = 0; } - + + function set_supplier($supplier_id, $supplier_name, $curr_code, $tax_group_id, $tax_included) + { + $this->supplier_id = $supplier_id; + $this->supplier_name = $supplier_name; + $this->curr_code = $curr_code; + $this->tax_group_id = $tax_group_id; + $this->tax_included = $tax_included; + $this->tax_group_array = get_tax_group_items_as_array($tax_group_id); + } + function add_to_order($line_no, $stock_id, $qty, $item_descr, $price, $uom, $req_del_date, $qty_inv, $qty_recd) { if ($qty != 0 && isset($qty)) { - $this->line_items[$line_no] = new line_details($line_no, $stock_id, $item_descr, $qty, $price, $uom, $req_del_date, $qty_inv, $qty_recd); + $this->line_items[$line_no] = new po_line_details($line_no, $stock_id, $item_descr, $qty, $price, $uom, + $req_del_date, $qty_inv, $qty_recd); $this->lines_on_order++; - Return 1; + return 1; } - Return 0; + return 0; } - function update_order_item($line_no, $qty, $price, $req_del_date) + function update_order_item($line_no, $qty, $price, $req_del_date, $description="") { + if ($description != "") + $this->line_items[$line_no]->item_description = $description; $this->line_items[$line_no]->quantity = $qty; $this->line_items[$line_no]->price = $price; $this->line_items[$line_no]->req_del_date = $req_del_date; - $this->line_items[$line_no]->price = $price; + $this->line_items[$line_no]->item_description = $description; } function remove_from_order($line_no) { - $this->line_items[$line_no]->Deleted = true; + array_splice($this->line_items, $line_no, 1); } function order_has_items() { - if (count($this->line_items) > 0) - { - foreach ($this->line_items as $ordered_items) - { - if ($ordered_items->Deleted == false) - { - return true; - } - } - } - return false; + return count($this->line_items) != 0; } function clear_items() @@ -115,41 +124,107 @@ class purch_order } return 0; } + + function get_taxes($shipping_cost=null) + { + $items = array(); + $prices = array(); + if($shipping_cost==null) + $shipping_cost = 0;//$this->freight_cost; + + foreach ($this->line_items as $ln_itm) { + $items[] = $ln_itm->stock_id; + $prices[] = round($ln_itm->quantity * $ln_itm->price, user_price_dec()); + } + $taxes = get_tax_for_items($items, $prices, $shipping_cost, + $this->tax_group_id, $this->tax_included, $this->tax_group_array); + + // Adjustment for swiss franken, we always have 5 rappen = 1/20 franken + if ($this->curr_code == 'CHF') { + $val = $taxes['1']['Value']; + $val1 = (floatval((intval(round(($val*20),0)))/20)); + $taxes['1']['Value'] = $val1; + } + return $taxes; + } + + /* + Returns order value including all taxes + */ + function get_trans_total() { + + $total = 0; + $dec = user_price_dec(); + + foreach ($this->line_items as $ln_itm) { + $items[] = $ln_itm->stock_id; + $value = round($ln_itm->quantity * $ln_itm->price, $dec); + $prices[] =$value; + $total += $value; + } + + if (!$this->tax_included ) { + $taxes = get_tax_for_items($items, $prices, 0, $this->tax_group_id, + $this->tax_included, $this->tax_group_array); + + foreach($taxes as $tax) + $total += round($tax['Value'], $dec); + } + return $total; + } + } /* end of class defintion */ -class line_details +class po_line_details { - Var $line_no; - Var $po_detail_rec; - Var $stock_id; - Var $item_description; - Var $quantity; - Var $price; - Var $units; - Var $req_del_date; - Var $qty_inv; - Var $qty_received; - Var $standard_cost; - Var $receive_qty; - Var $Deleted; - - function line_details($line_no, $stock_item, $item_descr, $qty, $prc, $uom, $req_del_date, $qty_inv, $qty_recd) + var $line_no; + var $po_detail_rec; + var $grn_item_id; + var $stock_id; + var $item_description; + var $price; + var $units; + var $req_del_date; + var $tax_type; + var $tax_type_name; + + var $quantity; // current/entry quantity of PO line + var $qty_inv; // quantity already invoiced against this line + var $receive_qty; // current/entry GRN quantity + var $qty_received; // quantity already received against this line + + var $standard_cost; + var $descr_editable; + + function po_line_details($line_no, $stock_item, $item_descr, $qty, $prc, $uom, $req_del_date, + $qty_inv, $qty_recd, $grn_item_id=0) { /* Constructor function to add a new LineDetail object with passed params */ $this->line_no = $line_no; $this->stock_id = $stock_item; - $this->item_description = $item_descr; + $item_row = get_item($stock_item); + if (!$item_row) + return; + + $this->descr_editable = $item_row["editable"]; + if ($item_descr == null || !$this->descr_editable) + $this->item_description = $item_row["description"]; + else + $this->item_description = $item_descr; $this->quantity = $qty; $this->req_del_date = $req_del_date; $this->price = $prc; - $this->units = $uom; +// $this->units = $uom; + $this->tax_type = $item_row["tax_type_id"]; + $this->tax_type_name = $item_row["tax_type_name"]; + $this->units = $item_row["units"]; $this->qty_received = $qty_recd; $this->qty_inv = $qty_inv; $this->receive_qty = 0; /*initialise these last two only */ $this->standard_cost =0; - $this->Deleted = false; + $this->grn_item_id = $grn_item_id; } } diff --git a/purchasing/includes/supp_trans_class.inc b/purchasing/includes/supp_trans_class.inc index 98bd4fcd..130354d7 100644 --- a/purchasing/includes/supp_trans_class.inc +++ b/purchasing/includes/supp_trans_class.inc @@ -17,17 +17,17 @@ include_once($path_to_root . "/taxes/tax_calc.inc"); class supp_trans { - var $grn_items; /*array of objects of class GRNDetails using the GRN No as the pointer */ + var $grn_items; /*array of objects of class grn_item using the id as the pointer */ var $gl_codes; /*array of objects of class gl_codes using a counter as the pointer */ var $supplier_id; var $supplier_name; - var $terms_description; var $terms; var $tax_description; var $tax_group_id; + var $tax_included; - var $is_invoice; + var $trans_type; // invoice or credit var $Comments; var $tran_date; @@ -39,9 +39,11 @@ class supp_trans var $ov_discount; var $ov_gst; var $gl_codes_counter=0; + var $credit = 0; - function supp_trans() + function supp_trans($trans_type) { + $this->trans_type = $trans_type; /*Constructor function initialises a new Supplier Transaction object */ $this->grn_items = array(); $this->gl_codes = array(); @@ -49,11 +51,11 @@ class supp_trans function add_grn_to_trans($grn_item_id, $po_detail_item, $item_code, $item_description, $qty_recd, $prev_quantity_inv, $this_quantity_inv, $order_price, $chg_price, - $Complete, $std_cost_unit, $gl_code) + $std_cost_unit, $gl_code) { $this->grn_items[$grn_item_id] = new grn_item($grn_item_id, $po_detail_item, $item_code, $item_description, $qty_recd, $prev_quantity_inv, $this_quantity_inv, - $order_price, $chg_price, $Complete, $std_cost_unit, $gl_code); + $order_price, $chg_price, $std_cost_unit, $gl_code, $this->tax_included); return 1; } @@ -65,11 +67,11 @@ class supp_trans return 1; } - function remove_grn_from_trans(&$grn_item_id) + function remove_grn_from_trans($grn_item_id) { unset($this->grn_items[$grn_item_id]); } - function remove_gl_codes_from_trans(&$gl_code_counter) + function remove_gl_codes_from_trans($gl_code_counter) { unset($this->gl_codes[$gl_code_counter]); } @@ -87,7 +89,7 @@ class supp_trans $this->ov_amount = $this->ov_discount = $this->supplier_id = 0; $this->grn_items = array(); - $this->gl_codes = array(); + $this->gl_codes = array(); } function get_taxes($tax_group_id=null, $shipping_cost=0, $gl_codes=true) @@ -104,14 +106,15 @@ class supp_trans foreach ($this->grn_items as $ln_itm) { $items[] = $ln_itm->item_code; - $prices[] =round( ($ln_itm->this_quantity_inv * $ln_itm->taxfree_charge_price($tax_group_id, $tax_group)), +// $prices[] =round( ($ln_itm->this_quantity_inv * $ln_itm->taxfree_charge_price($tax_group_id, $tax_group)), + $prices[] =round( ($ln_itm->this_quantity_inv * $ln_itm->chg_price), user_price_dec()); } if ($tax_group_id == null) - $tax_group_id = $this->tax_group_id; - - $taxes = get_tax_for_items($items, $prices, $shipping_cost, $tax_group_id); + $tax_group_id = $this->tax_group_id; + $taxes = get_tax_for_items($items, $prices, $shipping_cost, $tax_group_id, + $this->tax_included); ///////////////// Joe Hunt 2009.08.18 @@ -129,8 +132,10 @@ class supp_trans //////////////// return $taxes; } - - function get_total_charged($tax_group_id=null) + // + // Returns total invoice amount without taxes. + // + function get_total_taxfree($tax_group_id=null) { $total = 0; @@ -152,6 +157,20 @@ class supp_trans return $total; } + function get_items_total() + { + $total = 0; + + foreach ($this->grn_items as $ln_itm) + $total += round($ln_itm->this_quantity_inv * $ln_itm->chg_price, user_price_dec()); + + foreach ($this->gl_codes as $gl_line) + { //////// 2010-10-10 Joe Hunt + if (!is_tax_account($gl_line->gl_code) || $this->tax_included) + $total += $gl_line->amount; + } + return $total; + } } /* end of class defintion */ class grn_item @@ -169,13 +188,13 @@ all the info to do the necessary entries without looking up ie additional querie var $this_quantity_inv; var $order_price; var $chg_price; - var $Complete; var $std_cost_unit; var $gl_code; + var $tax_included; function grn_item ($id, $po_detail_item, $item_code, $item_description, $qty_recd, - $prev_quantity_inv, $this_quantity_inv, $order_price, $chg_price, $Complete, - $std_cost_unit, $gl_code) + $prev_quantity_inv, $this_quantity_inv, $order_price, $chg_price, + $std_cost_unit, $gl_code, $tax_included) { $this->id = $id; @@ -187,15 +206,15 @@ all the info to do the necessary entries without looking up ie additional querie $this->this_quantity_inv = $this_quantity_inv; $this->order_price =$order_price; $this->chg_price = $chg_price; - $this->Complete = $Complete; $this->std_cost_unit = $std_cost_unit; $this->gl_code = $gl_code; + $this->tax_included = $tax_included; } function full_charge_price($tax_group_id, $tax_group=null) { return get_full_price_for_item($this->item_code, - $this->chg_price, $tax_group_id, 0, $tax_group); + $this->chg_price, $tax_group_id, $this->tax_included, $tax_group); } function taxfree_charge_price($tax_group_id, $tax_group=null) @@ -203,7 +222,7 @@ all the info to do the necessary entries without looking up ie additional querie // if ($tax_group_id==null) // return $this->chg_price; return get_tax_free_price_for_item($this->item_code, $this->chg_price, - $tax_group_id, 0, $tax_group); + $tax_group_id, $this->tax_included, $tax_group); } } diff --git a/purchasing/includes/ui/grn_ui.inc b/purchasing/includes/ui/grn_ui.inc index a0fdae4b..cfb2f26c 100644 --- a/purchasing/includes/ui/grn_ui.inc +++ b/purchasing/includes/ui/grn_ui.inc @@ -13,8 +13,8 @@ function display_grn_summary(&$po, $editable=false) { - global $table_style2, $Refs; - start_table("$table_style2 width=90%"); + global $Refs; + start_table(TABLESTYLE2, "width=90%"); start_row(); label_cells(_("Supplier"), $po->supplier_name, "class='tableheader2'"); @@ -26,7 +26,6 @@ function display_grn_summary(&$po, $editable=false) "class='tableheader2'"); label_cells(_("Ordered On"), $po->orig_order_date, "class='tableheader2'"); - label_cells(_("Supplier's Reference"), $po->requisition_no, "class='tableheader2'"); end_row(); start_row(); @@ -45,12 +44,15 @@ function display_grn_summary(&$po, $editable=false) $_POST['DefaultReceivedDate'] = new_doc_date(); date_cells(_("Date Items Received"), 'DefaultReceivedDate', '', true, 0, 0, 0, "class='tableheader2'"); - + // currently this is related order supp reference +// ref_cells(_("Supplier's Reference"), 'supp_ref', _("Supplier's Reference"), null, "class='tableheader2'"); + label_cells(_("Supplier's Reference"), $po->supp_ref, "class='tableheader2'"); } else { label_cells(_("Reference"), $po->reference, "class='tableheader2'"); label_cells(_("Deliver Into Location"), get_location_name($po->Location), "class='tableheader2'"); + label_cells(_("Supplier's Reference"), $po->supp_ref, "class='tableheader2'"); } end_row(); diff --git a/purchasing/includes/ui/invoice_ui.inc b/purchasing/includes/ui/invoice_ui.inc index 94f4d916..41ae4b3b 100644 --- a/purchasing/includes/ui/invoice_ui.inc +++ b/purchasing/includes/ui/invoice_ui.inc @@ -45,7 +45,7 @@ function copy_to_trans(&$supp_trans) foreach ( $supp_trans->gl_codes as $gl_line) { ////////// 2009-08-18 Joe Hunt - if (!is_tax_account($gl_line->gl_code)) + if (!is_tax_account($gl_line->gl_code) || $supp_trans->tax_included) $supp_trans->ov_amount += $gl_line->amount; } } @@ -55,13 +55,13 @@ function copy_to_trans(&$supp_trans) function invoice_header(&$supp_trans) { - global $Ajax, $table_style2, $Refs; + global $Ajax, $Refs; // if vars have been lost, recopy if (!isset($_POST['tran_date'])) copy_from_trans($supp_trans); - start_outer_table("width=95% $table_style2"); + start_outer_table(TABLESTYLE2, "width=95%"); table_section(1); @@ -89,10 +89,7 @@ function invoice_header(&$supp_trans) copy_from_trans($supp_trans); } - if ($supp_trans->is_invoice) - ref_row(_("Reference:"), 'reference', '', $Refs->get_next(ST_SUPPINVOICE)); - else - ref_row(_("Reference:"), 'reference', '', $Refs->get_next(ST_SUPPCREDIT)); + ref_row(_("Reference:"), 'reference', '', $Refs->get_next($supp_trans->trans_type)); if (isset($_POST['invoice_no'])) { @@ -114,7 +111,7 @@ function invoice_header(&$supp_trans) date_row(_("Due Date") . ":", 'due_date'); - label_row(_("Terms:"), $supp_trans->terms_description); + label_row(_("Terms:"), $supp_trans->terms['description']); table_section(3, "33%"); @@ -131,6 +128,7 @@ function invoice_header(&$supp_trans) } label_row(_("Tax Group:"), $supp_trans->tax_description); + supplier_credit_row($supp_trans->supplier_id, $supp_trans->credit); end_outer_table(1); } @@ -139,28 +137,27 @@ function invoice_header(&$supp_trans) function invoice_totals(&$supp_trans) { - global $table_style, $table_style2; - copy_to_trans($supp_trans); $dim = get_company_pref('use_dimension'); $colspan = ($dim == 2 ? 7 : ($dim == 1 ? 6 : 5)); - start_table("$table_style width=95%"); + start_table(TABLESTYLE, "width=95%"); label_row(_("Sub-total:"), price_format( $supp_trans->ov_amount), "colspan=$colspan align=right", "align=right"); $taxes = $supp_trans->get_taxes($supp_trans->tax_group_id); - $tax_total = display_edit_tax_items($taxes, $colspan, 0); // tax_included==0 (we are the company) + $tax_total = display_edit_tax_items($taxes, $colspan, $supp_trans->tax_included); $display_total = price_format($supp_trans->ov_amount + $tax_total); - if ($supp_trans->is_invoice) - label_row(_("Invoice Total:"), $display_total, "colspan=$colspan align=right style='font-weight:bold;'", "align=right style='font-weight:bold;'"); + if ($supp_trans->trans_type == ST_SUPPINVOICE) + label_row(_("Invoice Total:"), + $display_total, "colspan=$colspan align=right style='font-weight:bold;'", "align=right style='font-weight:bold;'"); else label_row(_("Credit Note Total"), $display_total, "colspan=$colspan align=right style='font-weight:bold;color:red;'", "nowrap align=right style='font-weight:bold;color:red;'"); end_table(1); - start_table($table_style2); + start_table(TABLESTYLE2); textarea_row(_("Memo:"), "Comments", null, 50, 3); end_table(1); } @@ -168,10 +165,9 @@ function invoice_totals(&$supp_trans) //-------------------------------------------------------------------------------------------------- function display_gl_controls(&$supp_trans, $k) { - global $table_style, $table_style2; - $accs = get_supplier_accounts($supp_trans->supplier_id); - $_POST['gl_code'] = $accs['purchase_account']; + $_POST['gl_code'] = $accs['purchase_account'] ? + $accs['purchase_account'] : get_company_pref('default_cogs_act'); alt_table_row_color($k); echo gl_all_accounts_list('gl_code', null, true, true); @@ -201,18 +197,18 @@ function display_gl_controls(&$supp_trans, $k) function display_gl_items(&$supp_trans, $mode=0) { - global $table_style, $table_style2, $path_to_root, $Ajax; + global $path_to_root, $Ajax; // if displaying in form, and no items, exit if (($mode == 2 || $mode == 3) && count($supp_trans->gl_codes) == 0) return 0; - if ($supp_trans->is_invoice) + if ($supp_trans->trans_type == ST_SUPPINVOICE) $heading = _("GL Items for this Invoice"); else $heading = _("GL Items for this Credit Note"); - start_outer_table("$table_style width=95%"); + start_outer_table(TABLESTYLE, "width=95%"); if ($mode == 1) { @@ -242,7 +238,7 @@ function display_gl_items(&$supp_trans, $mode=0) end_outer_table(0, false); div_start('gl_items'); - start_table("$table_style width=95%"); + start_table(TABLESTYLE, "width=95%"); $dim = get_company_pref('use_dimension'); if ($dim == 2) @@ -258,7 +254,7 @@ function display_gl_items(&$supp_trans, $mode=0) $th[] = ""; } table_header($th); - $total_gl_value=0; + $total_gl_value=$total = 0; $i = $k = 0; if (count($supp_trans->gl_codes) > 0) @@ -291,10 +287,13 @@ function display_gl_items(&$supp_trans, $mode=0) } end_row(); /////////// 2009-08-18 Joe Hunt - if ($mode > 1 && !is_tax_account($entered_gl_code->gl_code)) - $total_gl_value += $entered_gl_code->amount; + if ($mode > 1) { + if ($supp_trans->tax_included || !is_tax_account($entered_gl_code->gl_code)) + $total_gl_value += $entered_gl_code->amount; + } else $total_gl_value += $entered_gl_code->amount; + $total += $entered_gl_code->amount; $i++; if ($i > 15) { @@ -307,7 +306,7 @@ function display_gl_items(&$supp_trans, $mode=0) if ($mode == 1) display_gl_controls($supp_trans, $k); $colspan = ($dim == 2 ? 4 : ($dim == 1 ? 3 : 2)); - label_row(_("Total"), price_format($total_gl_value), + label_row(_("Total"), price_format($total), "colspan=".$colspan." align=right", "nowrap align=right", ($mode==1?3:1)); end_table(1); @@ -320,9 +319,7 @@ function display_gl_items(&$supp_trans, $mode=0) function display_grn_items_for_selection(&$supp_trans, $k) { - global $table_style; - - if ($supp_trans->is_invoice) + if ($supp_trans->trans_type == ST_SUPPINVOICE) $result = get_grn_items(0, $supp_trans->supplier_id, true); else { @@ -373,7 +370,7 @@ function display_grn_items_for_selection(&$supp_trans, $k) $dec = get_qty_dec($myrow["item_code"]); qty_cell($myrow["qty_recd"], false, $dec); qty_cell($myrow["quantity_inv"], false, $dec); - if ($supp_trans->is_invoice) + if ($supp_trans->trans_type == ST_SUPPINVOICE) qty_cells(null, 'this_quantity_inv'.$n, number_format2($myrow["qty_recd"] - $myrow["quantity_inv"], $dec), null, null, $dec); else @@ -381,15 +378,15 @@ function display_grn_items_for_selection(&$supp_trans, $k) null, null, $dec); $dec2 = 0; amount_cells(null, 'ChgPrice'.$n, price_decimal_format($myrow["unit_price"], $dec2), null, null, $dec2); - if ($supp_trans->is_invoice) + if ($supp_trans->trans_type == ST_SUPPINVOICE) amount_cell(round2($myrow["unit_price"] * ($myrow["qty_recd"] - $myrow["quantity_inv"]), user_price_dec())); else amount_cell(round2($myrow["unit_price"] * max($myrow['quantity_inv'], 0), user_price_dec())); - if ($supp_trans->is_invoice) + if ($supp_trans->trans_type == ST_SUPPINVOICE) submit_cells('grn_item_id'.$n, _("Add"), '', _("Add to Invoice"), true); else submit_cells('grn_item_id'.$n, _("Add"), '', _("Add to Credit Note"), true); - if ($supp_trans->is_invoice && $_SESSION["wa_current_user"]->can_access('SA_GRNDELETE')) { // Added 2008-10-18 by Joe Hunt. Special access rights needed. + if (($supp_trans->trans_type == ST_SUPPINVOICE) && $_SESSION["wa_current_user"]->can_access('SA_GRNDELETE')) { // Added 2008-10-18 by Joe Hunt. Special access rights needed. submit_cells('void_item_id'.$n, _("Remove"), '', _("WARNING! Be careful with removal. The operation is executed immediately and cannot be undone !!!"), true); submit_js_confirm('void_item_id'.$n, sprintf(_('You are about to remove all yet non-invoiced items from delivery line #%d. This operation also irreversibly changes related order line. Do you want to continue ?'), $n)); @@ -409,7 +406,7 @@ function display_grn_items_for_selection(&$supp_trans, $k) function display_grn_items(&$supp_trans, $mode=0) { - global $table_style, $path_to_root; + global $path_to_root; $ret = true; // if displaying in form, and no items, exit @@ -421,7 +418,7 @@ function display_grn_items(&$supp_trans, $mode=0) $heading2 = ""; if ($mode == 1) { - if ($supp_trans->is_invoice) + if ($supp_trans->trans_type == ST_SUPPINVOICE) { $heading = _("Items Received Yet to be Invoiced"); if ($_SESSION["wa_current_user"]->can_access('SA_GRNDELETE')) // Added 2008-10-18 by Joe Hunt. Only admins can remove GRNs @@ -432,7 +429,7 @@ function display_grn_items(&$supp_trans, $mode=0) } else { - if ($supp_trans->is_invoice) + if ($supp_trans->trans_type == ST_SUPPINVOICE) $heading = _("Received Items Charged on this Invoice"); else $heading = _("Received Items Credited on this Note"); @@ -442,7 +439,7 @@ function display_grn_items(&$supp_trans, $mode=0) if ($mode == 1) { - if (!$supp_trans->is_invoice && !isset($_POST['invoice_no'])) + if ($supp_trans->trans_type == ST_SUPPCREDIT && !isset($_POST['invoice_no'])) { echo ""; date_cells(_("Received between"), 'receive_begin', "", null, -30, 0, 0, "valign=middle"); @@ -462,15 +459,16 @@ function display_grn_items(&$supp_trans, $mode=0) end_outer_table(0, false); div_start('grn_items'); - start_table("$table_style width=95%"); + start_table(TABLESTYLE, "width=95%"); if ($mode == 1) { $th = array(_("Delivery"), _("Sequence #"), _("P.O."), _("Item"), _("Description"), _("Received On"), _("Quantity Received"), _("Quantity Invoiced"), - _("Qty Yet To Invoice"), _("Order Price"), _("Total"), ""); - if ($supp_trans->is_invoice && $_SESSION["wa_current_user"]->can_access('SA_GRNDELETE')) // Added 2008-10-18 by Joe Hunt. Only admins can remove GRNs + _("Qty Yet To Invoice"), $supp_trans->tax_included ? _("Price after Tax") : _("Price before Tax"), + _("Total"), ""); + if (($supp_trans->trans_type == ST_SUPPINVOICE) && $_SESSION["wa_current_user"]->can_access('SA_GRNDELETE')) // Added 2008-10-18 by Joe Hunt. Only admins can remove GRNs $th[] = ""; - if (!$supp_trans->is_invoice) + if ($supp_trans->trans_type == ST_SUPPCREDIT) { $th[8] = _("Qty Yet To Credit"); } @@ -514,7 +512,7 @@ function display_grn_items(&$supp_trans, $mode=0) if ($mode == 1) { delete_button_cell("Delete" . $entered_grn->id, _("Edit"), _('Edit document line')); - if ($supp_trans->is_invoice && $_SESSION["wa_current_user"]->can_access('SA_GRNDELETE')) + if (($supp_trans->trans_type == ST_SUPPINVOICE) && $_SESSION["wa_current_user"]->can_access('SA_GRNDELETE')) label_cell(""); } end_row(); @@ -543,7 +541,7 @@ function display_grn_items(&$supp_trans, $mode=0) { start_row(); echo ""; - if ($supp_trans->is_invoice) + if ($supp_trans->trans_type == ST_SUPPINVOICE) display_note(_("There are no outstanding items received from this supplier that have not been invoiced by them."), 0, 0); else { @@ -560,19 +558,22 @@ function display_grn_items(&$supp_trans, $mode=0) } //-------------------------------------------------------------------------------------------------- -function get_duedate_from_terms(&$supp_trans) +function get_duedate_from_terms(&$trans) { - if (!is_date($supp_trans->tran_date)) + $date = get_class($trans) == 'purch_order' ? $trans->orig_order_date : $trans->tran_date; + + if (!is_date($date)) { - $supp_trans->tran_date = Today(); + $date = Today(); } - if (substr( $supp_trans->terms, 0, 1) == "1") + if ($trans->terms['day_in_following_month']) { /*Its a day in the following month when due */ - $supp_trans->due_date = add_days(end_month($supp_trans->tran_date), (int) substr( $supp_trans->terms,1)); + $trans->due_date = + add_days(end_month($date), $trans->terms["day_in_following_month"]); } else { /*Use the Days Before Due to add to the invoice date */ - $supp_trans->due_date = add_days($supp_trans->tran_date, (int) substr( $supp_trans->terms,1)); + $trans->due_date = add_days($date, $trans->terms["days_before_due"]); } } diff --git a/purchasing/includes/ui/po_ui.inc b/purchasing/includes/ui/po_ui.inc index 9e5eba8c..5f713a48 100644 --- a/purchasing/includes/ui/po_ui.inc +++ b/purchasing/includes/ui/po_ui.inc @@ -11,50 +11,105 @@ ***********************************************************************/ include_once($path_to_root . "/purchasing/includes/purchasing_db.inc"); +//-------------------------------------------------------------------------------------------------- + +function copy_from_cart() +{ + $cart = &$_SESSION['PO']; + + $_POST['supplier_id'] = $cart->supplier_id; + $_POST['OrderDate'] = $cart->orig_order_date; + if ($cart->trans_type==ST_SUPPINVOICE) + $_POST['due_date'] = $cart->due_date; + $_POST['supp_ref'] = $cart->supp_ref; + $_POST['ref'] = $cart->reference; + $_POST['Comments'] = $cart->Comments; + $_POST['StkLocation'] = $cart->Location; + $_POST['delivery_address'] = $cart->delivery_address; +} + +function copy_to_cart() +{ + $cart = &$_SESSION['PO']; + + $cart->supplier_id = $_POST['supplier_id']; + $cart->orig_order_date = $_POST['OrderDate']; + if ($cart->trans_type==ST_SUPPINVOICE) + $cart->due_date = $_POST['due_date']; + $cart->reference = $_POST['ref']; + $cart->supp_ref = $_POST['supp_ref']; + $cart->Comments = $_POST['Comments']; + $cart->Location = $_POST['StkLocation']; + $cart->delivery_address = $_POST['delivery_address']; +} // ------------------------------------------------------------------------------ function get_supplier_details_to_order(&$order, $supplier_id) { - $sql = "SELECT curr_code,supp_name FROM ".TB_PREF."suppliers - WHERE supplier_id = '$supplier_id'"; + $sql = "SELECT curr_code, supp_name, tax_group_id, supp.tax_included, + supp.credit_limit - Sum(IFNULL(IF(trans.type=".ST_SUPPCREDIT.", -1, 1) + * (ov_amount + ov_gst + ov_discount),0)) as cur_credit, + terms.terms, terms.days_before_due, terms.day_in_following_month + FROM ".TB_PREF."suppliers supp + LEFT JOIN ".TB_PREF."supp_trans trans ON supp.supplier_id = trans.supplier_id + LEFT JOIN ".TB_PREF."payment_terms terms ON supp.payment_terms=terms.terms_indicator + WHERE supp.supplier_id = ".db_escape($supplier_id)." + GROUP BY + supp.supp_name"; + $result = db_query($sql, "The supplier details could not be retreived"); $myrow = db_fetch($result); - - $order->curr_code = $_POST['curr_code'] = $myrow["curr_code"]; - $order->supplier_name = $_POST['supplier_name'] = $myrow["supp_name"]; - $order->supplier_id = $_POST['supplier_id'] = $supplier_id; + $order->credit = $myrow["cur_credit"]; + $order->terms = array( + 'description' => $myrow['terms'], + 'days_before_due' => $myrow['days_before_due'], + 'day_in_following_month' => $myrow['day_in_following_month'] ); + + $_POST['supplier_id'] = $supplier_id; + $_POST['supplier_name'] = $myrow["supp_name"]; + $_POST['curr_code'] = $myrow["curr_code"]; + + $order->set_supplier($supplier_id, $myrow["supp_name"], $myrow["curr_code"], + $myrow["tax_group_id"], $myrow["tax_included"]); } //--------------------------------------------------------------------------------------------------- -function create_new_po() +function create_new_po($trans_type, $trans_no) { - if (isset($_SESSION['PO'])) - { - unset ($_SESSION['PO']->line_items); - $_SESSION['PO']->lines_on_order = 0; - unset ($_SESSION['PO']); - } + global $Refs; - //session_register("PO"); + if (isset($_SESSION['PO'])) + unset ($_SESSION['PO']->line_items, $_SESSION['PO']); - $_SESSION['PO'] = new purch_order; + $cart = new purch_order; $_POST['OrderDate'] = new_doc_date(); if (!is_date_in_fiscalyear($_POST['OrderDate'])) $_POST['OrderDate'] = end_fiscalyear(); - $_SESSION['PO']->orig_order_date = $_POST['OrderDate']; + $cart->due_date = $cart->orig_order_date = $_POST['OrderDate']; + + + $cart->trans_type = $trans_type; + $cart->order_no = $trans_no; + /*read in all the selected order into the Items cart */ + if ($trans_no) { + read_po($trans_no, $cart); + $cart->order_no = $trans_no; + } else + $cart->reference = $Refs->get_next($trans_type); + $_SESSION['PO'] = &$cart; } //--------------------------------------------------------------------------------------------------- function display_po_header(&$order) { - global $table_style2, $Ajax, $Refs; + global $Ajax, $Refs; $editable = ($order->order_no == 0); - start_outer_table("width=80% $table_style2"); + start_outer_table(TABLESTYLE2, "width=80%"); table_section(1); if ($editable) @@ -72,7 +127,10 @@ function display_po_header(&$order) if ($order->supplier_id != get_post('supplier_id',-1)) { $old_supp = $order->supplier_id; - get_supplier_details_to_order($order, $_POST['supplier_id']); + get_supplier_details_to_order($order, $_POST['supplier_id']); + get_duedate_from_terms($order); + $_POST['due_date'] = $order->due_date; + // supplier default price update foreach ($order->line_items as $line_no=>$item) { $line = &$order->line_items[$line_no]; @@ -82,6 +140,7 @@ function display_po_header(&$order) *get_purchase_conversion_factor ($order->supplier_id, $line->stock_id); } $Ajax->activate('items_table'); + $Ajax->activate('due_date'); } set_global_supplier($_POST['supplier_id']); @@ -92,9 +151,12 @@ function display_po_header(&$order) $_POST['OrderDate']); } + supplier_credit_row($order->supplier_id, $order->credit); + + if ($editable) { - ref_row(_("Reference:"), 'ref', '', $Refs->get_next(ST_PURCHORDER)); + ref_row(_("Reference:"), 'ref'); } else { @@ -113,12 +175,21 @@ function display_po_header(&$order) // if (!is_date_in_fiscalyear($_POST['OrderDate'])) // $_POST['OrderDate'] = end_fiscalyear(); //} - date_row(_("Order Date:"), 'OrderDate', '', true, 0, 0, 0, null, true); + date_row($order->trans_type==ST_PURCHORDER ? _("Order Date:") : + ($order->trans_type==ST_SUPPRECEIVE ? _("Delivery Date:") : _("Invoice Date:")), + 'OrderDate', '', true, 0, 0, 0, null, true); + if (isset($_POST['_OrderDate_changed'])) { + $order->orig_order_date = $_POST['OrderDate']; + get_duedate_from_terms($order); + $_POST['due_date'] = $order->due_date; $Ajax->activate('_ex_rate'); + $Ajax->activate('due_date'); } + if ($order->trans_type==ST_SUPPINVOICE) + date_row(_("Due Date:"), 'due_date', '', false, 0, 0, 0, null, true); - text_row(_("Supplier's Reference:"), 'Requisition', null, 16, 15); + text_row(_("Supplier's Reference:"), 'supp_ref', null, 16, 15); locations_list_row(_("Receive Into:"), 'StkLocation', null, false, true); table_section(3); @@ -130,7 +201,7 @@ function display_po_header(&$order) /*If this is the first time the form loaded set up defaults */ //$_POST['StkLocation'] = $_SESSION['UserStockLocation']; - $sql = "SELECT delivery_address, phone FROM ".TB_PREF."locations WHERE loc_code='" . $_POST['StkLocation'] . "'"; + $sql = "SELECT delivery_address, phone FROM ".TB_PREF."locations WHERE loc_code='" . db_escape($_POST['StkLocation']) . "'"; $result = db_query($sql,"could not get location info"); if (db_num_rows($result) == 1) @@ -157,17 +228,17 @@ function display_po_header(&$order) function display_po_items(&$order, $editable=true) { - global $table_style; - display_heading(_("Order Items")); div_start('items_table'); - start_table("$table_style width=80%"); + start_table(TABLESTYLE, "width=80%"); $th = array(_("Item Code"), _("Item Description"), _("Quantity"), _("Received"), _("Unit"), - _("Required Delivery Date"), _("Price"), _("Line Total"), ""); - + _("Required Delivery Date"), $order->tax_included ? _("Price after Tax") : _("Price before Tax"), _("Line Total"), ""); + if ($order->trans_type != ST_PURCHORDER) + array_remove($th, 5); + if (count($order->line_items)) $th[] = ''; table_header($th); @@ -176,45 +247,58 @@ function display_po_items(&$order, $editable=true) $k = 0; foreach ($order->line_items as $line_no => $po_line) { - - if ($po_line->Deleted == false) + $line_total = round($po_line->quantity * $po_line->price, user_price_dec()); + if (!$editable || ($id != $line_no)) { - $line_total = round($po_line->quantity * $po_line->price, user_price_dec()); - if (!$editable || ($id != $line_no)) + alt_table_row_color($k); + label_cell($po_line->stock_id); + label_cell($po_line->item_description); + qty_cell($po_line->quantity, false, get_qty_dec($po_line->stock_id)); + qty_cell($po_line->qty_received, false, get_qty_dec($po_line->stock_id)); + label_cell($po_line->units); + if ($order->trans_type == ST_PURCHORDER) + label_cell($po_line->req_del_date); + amount_decimal_cell($po_line->price); + amount_cell($line_total); + + if ($editable) { - alt_table_row_color($k); - label_cell($po_line->stock_id); - label_cell($po_line->item_description); - qty_cell($po_line->quantity, false, get_qty_dec($po_line->stock_id)); - qty_cell($po_line->qty_received, false, get_qty_dec($po_line->stock_id)); - label_cell($po_line->units); - label_cell($po_line->req_del_date); - amount_decimal_cell($po_line->price); - amount_cell($line_total); - - if ($editable) - { edit_button_cell("Edit$line_no", _("Edit"), _('Edit document line')); delete_button_cell("Delete$line_no", _("Delete"), - _('Remove line from document')); - } - end_row(); - } - else - { - po_item_controls($order, $po_line->stock_id); + _('Remove line from document')); } - $total += $line_total; + end_row(); + } + else + { + po_item_controls($order, $k, $line_no); } + $total += $line_total; } if ($id==-1 && $editable) - po_item_controls($order); + po_item_controls($order, $k); + + $colspan = count($th)-2; + if (count($order->line_items)) + $colspan--; + + $display_sub_total = price_format($total); + + label_row(_("Sub-total"), $display_sub_total, "colspan=$colspan align=right","align=right", 2); + + $taxes = $order->get_taxes(input_num('freight_cost')); + + $tax_total = display_edit_tax_items($taxes, $colspan, $order->tax_included, 2); - $display_total = price_format($total); - label_row(_("Total Excluding Shipping/Tax"), $display_total, "colspan=7 align=right", - "nowrap align=right", 2); + $display_total = price_format(($total + input_num('freight_cost') + $tax_total)); + + start_row(); + label_cells(_("Amount Total"), $display_total, "colspan=$colspan align='right'","align='right'"); + $order->order_no ? submit_cells('update', _("Update"), "colspan=2 align='center'", _("Refresh"), true) + : label_cell('', "colspan=2"); + end_row(); end_table(1); div_end(); @@ -224,8 +308,7 @@ function display_po_items(&$order, $editable=true) function display_po_summary(&$po, $is_self=false, $editable=false) { - global $table_style; - start_table("$table_style width=90%"); + start_table(TABLESTYLE, "width=90%"); start_row(); label_cells(_("Reference"), $po->reference, "class='tableheader2'"); @@ -257,8 +340,8 @@ function display_po_summary(&$po, $is_self=false, $editable=false) "class='tableheader2'"); } - if ($po->requisition_no != "") - label_cells(_("Supplier's Reference"), $po->requisition_no, "class='tableheader2'"); + if ($po->supp_ref != "") + label_cells(_("Supplier's Reference"), $po->supp_ref, "class='tableheader2'"); end_row(); if (!$editable) @@ -273,35 +356,46 @@ function display_po_summary(&$po, $is_self=false, $editable=false) //-------------------------------------------------------------------------------- -function po_item_controls(&$order, $stock_id=null) +function po_item_controls(&$order, &$rowcounter, $line_no=-1) { global $Ajax; - start_row(); + + alt_table_row_color($rowcounter); $dec2 = 0; $id = find_submit('Edit'); - if (($id != -1) && $stock_id != null) + if (($id != -1) && $line_no == $id) { - hidden('line_no', $id); +// hidden('line_no', $id); $_POST['stock_id'] = $order->line_items[$id]->stock_id; - $dec = get_qty_dec($_POST['stock_id']); + $dec = get_qty_dec($_POST['stock_id']); $_POST['qty'] = qty_format($order->line_items[$id]->quantity, $_POST['stock_id'], $dec); //$_POST['price'] = price_format($order->line_items[$id]->price); $_POST['price'] = price_decimal_format($order->line_items[$id]->price, $dec2); - $_POST['req_del_date'] = $order->line_items[$id]->req_del_date; + if ($order->trans_type == ST_PURCHORDER) + $_POST['req_del_date'] = $order->line_items[$id]->req_del_date; $_POST['units'] = $order->line_items[$id]->units; + $_POST['item_description'] = $order->line_items[$id]->item_description; hidden('stock_id', $_POST['stock_id']); label_cell($_POST['stock_id']); - label_cell($order->line_items[$id]->item_description); + + if ($order->line_items[$id]->descr_editable) + text_cells(null,'item_description', null, 45, 150); + else { + hidden('item_description', $_POST['item_description']); +// label_cell($_POST['item_description']); + label_cell($order->line_items[$id]->item_description); + } + $Ajax->activate('items_table'); $qty_rcvd = $order->line_items[$id]->qty_received; } else { - hidden('line_no', ($_SESSION['PO']->lines_on_order + 1)); +// hidden('line_no', ($_SESSION['PO']->lines_on_order + 1)); stock_purchasable_items_list_cells(null, 'stock_id', null, false, true, true); if (list_updated('stock_id')) { @@ -318,7 +412,8 @@ function po_item_controls(&$order, $stock_id=null) $_POST['qty'] = number_format2(get_purchase_conversion_factor ($order->supplier_id, $_POST['stock_id']), $dec); //$_POST['price'] = price_format(get_purchase_price ($order->supplier_id, $_POST['stock_id'])); $_POST['price'] = price_decimal_format(get_purchase_price ($order->supplier_id, $_POST['stock_id']), $dec2); - $_POST['req_del_date'] = add_days(Today(), 10); + if ($order->trans_type == ST_PURCHORDER) + $_POST['req_del_date'] = add_days(Today(), 10); $qty_rcvd = ''; } @@ -326,7 +421,8 @@ function po_item_controls(&$order, $stock_id=null) qty_cell($qty_rcvd, false, $dec); label_cell($_POST['units'], '', 'units'); - date_cells(null, 'req_del_date', '', null, 0, 0, 0); + if ($order->trans_type == ST_PURCHORDER) + date_cells(null, 'req_del_date', '', null, 0, 0, 0); amount_cells(null, 'price', null, null, null, $dec2); //$line_total = $_POST['qty'] * $_POST['price'] * (1 - $_POST['Disc'] / 100); @@ -339,11 +435,12 @@ function po_item_controls(&$order, $stock_id=null) _('Confirm changes'), ICON_UPDATE); button_cell('CancelUpdate', _("Cancel"), _('Cancel changes'), ICON_CANCEL); + hidden('line_no', $line_no); set_focus('qty'); } else { - submit_cells('EnterLine', _("Add Item"), "colspan=2", + submit_cells('EnterLine', _("Add Item"), "colspan=2 align='center'", _('Add new item to document'), true); } diff --git a/purchasing/inquiry/po_search.php b/purchasing/inquiry/po_search.php index b43a99ff..220b1e1a 100644 --- a/purchasing/inquiry/po_search.php +++ b/purchasing/inquiry/po_search.php @@ -57,7 +57,7 @@ if (get_post('SearchOrders')) start_form(); -start_table("class='tablestyle_noborder'"); +start_table(TABLESTYLE_NOBORDER); start_row(); ref_cells(_("#:"), 'order_number', '',null, '', true); @@ -65,12 +65,17 @@ date_cells(_("from:"), 'OrdersAfterDate', '', null, -30); date_cells(_("to:"), 'OrdersToDate'); locations_list_cells(_("Location:"), 'StockLocation', null, true); +end_row(); +end_table(); + +start_table(TABLESTYLE_NOBORDER); +start_row(); stock_items_list_cells(_("Item:"), 'SelectStockFromList', null, true); submit_cells('SearchOrders', _("Search"),'',_('Select documents'), 'default'); end_row(); -end_table(); +end_table(1); //--------------------------------------------------------------------------------------------- function trans_view($trans) { @@ -116,53 +121,9 @@ else } //figure out the sql required from the inputs available -$sql = "SELECT - porder.order_no, - porder.reference, - supplier.supp_name, - location.location_name, - porder.requisition_no, - porder.ord_date, - supplier.curr_code, - Sum(line.unit_price*line.quantity_ordered) AS OrderValue, - Sum(line.delivery_date < '". date2sql(Today()) ."' - AND (line.quantity_ordered > line.quantity_received)) As OverDue - FROM " - .TB_PREF."purch_orders as porder, " - .TB_PREF."purch_order_details as line, " - .TB_PREF."suppliers as supplier, " - .TB_PREF."locations as location - WHERE porder.order_no = line.order_no - AND porder.supplier_id = supplier.supplier_id - AND location.loc_code = porder.into_stock_location - AND (line.quantity_ordered > line.quantity_received) "; - -if (isset($order_number) && $order_number != "") -{ - $sql .= "AND porder.reference LIKE ".db_escape('%'. $order_number . '%'); -} -else -{ - $data_after = date2sql($_POST['OrdersAfterDate']); - $data_before = date2sql($_POST['OrdersToDate']); - - $sql .= " AND porder.ord_date >= '$data_after'"; - $sql .= " AND porder.ord_date <= '$data_before'"; - - if (isset($_POST['StockLocation']) && $_POST['StockLocation'] != $all_items) - { - $sql .= " AND porder.into_stock_location = ".db_escape($_POST['StockLocation']); - } - - if (isset($selected_stock_item)) - { - $sql .= " AND line.item_code=".db_escape($selected_stock_item); - } -} //end not order number selected - -$sql .= " GROUP BY porder.order_no"; +$sql = get_sql_for_po_search(); -$result = db_query($sql,"No orders were returned"); +//$result = db_query($sql,"No orders were returned"); /*show a table of the orders returned by the sql */ $cols = array( diff --git a/purchasing/inquiry/po_search_completed.php b/purchasing/inquiry/po_search_completed.php index 1632f5b4..ba77bf7a 100644 --- a/purchasing/inquiry/po_search_completed.php +++ b/purchasing/inquiry/po_search_completed.php @@ -55,7 +55,7 @@ if (get_post('SearchOrders')) start_form(); -start_table("class='tablestyle_noborder'"); +start_table(TABLESTYLE_NOBORDER); start_row(); ref_cells(_("#:"), 'order_number', '',null, '', true); @@ -63,12 +63,17 @@ date_cells(_("from:"), 'OrdersAfterDate', '', null, -30); date_cells(_("to:"), 'OrdersToDate'); locations_list_cells(_("into location:"), 'StockLocation', null, true); +end_row(); +end_table(); + +start_table(TABLESTYLE_NOBORDER); +start_row(); stock_items_list_cells(_("for item:"), 'SelectStockFromList', null, true); submit_cells('SearchOrders', _("Search"),'',_('Select documents'), 'default'); end_row(); -end_table(); +end_table(1); //--------------------------------------------------------------------------------------------- if (isset($_POST['order_number'])) { @@ -105,49 +110,7 @@ function prt_link($row) //--------------------------------------------------------------------------------------------- -$sql = "SELECT - porder.order_no, - porder.reference, - supplier.supp_name, - location.location_name, - porder.requisition_no, - porder.ord_date, - supplier.curr_code, - Sum(line.unit_price*line.quantity_ordered) AS OrderValue, - porder.into_stock_location - FROM ".TB_PREF."purch_orders as porder, " - .TB_PREF."purch_order_details as line, " - .TB_PREF."suppliers as supplier, " - .TB_PREF."locations as location - WHERE porder.order_no = line.order_no - AND porder.supplier_id = supplier.supplier_id - AND location.loc_code = porder.into_stock_location "; - -if (isset($order_number) && $order_number != "") -{ - $sql .= "AND porder.reference LIKE ".db_escape('%'. $order_number . '%'); -} -else -{ - - $data_after = date2sql($_POST['OrdersAfterDate']); - $date_before = date2sql($_POST['OrdersToDate']); - - $sql .= " AND porder.ord_date >= '$data_after'"; - $sql .= " AND porder.ord_date <= '$date_before'"; - - if (isset($_POST['StockLocation']) && $_POST['StockLocation'] != ALL_TEXT) - { - $sql .= " AND porder.into_stock_location = ".db_escape($_POST['StockLocation']); - } - if (isset($selected_stock_item)) - { - $sql .= " AND line.item_code=".db_escape($selected_stock_item); - } - -} //end not order number selected - -$sql .= " GROUP BY porder.order_no"; +$sql = get_sql_for_po_search_completed(); $cols = array( _("#") => array('fun'=>'trans_view', 'ord'=>''), diff --git a/purchasing/inquiry/supplier_allocation_inquiry.php b/purchasing/inquiry/supplier_allocation_inquiry.php index 850dfc30..eb7cedc1 100644 --- a/purchasing/inquiry/supplier_allocation_inquiry.php +++ b/purchasing/inquiry/supplier_allocation_inquiry.php @@ -42,7 +42,7 @@ start_form(); if (!isset($_POST['supplier_id'])) $_POST['supplier_id'] = get_global_supplier(); -start_table("class='tablestyle_noborder'"); +start_table(TABLESTYLE_NOBORDER); start_row(); supplier_list_cells(_("Select a supplier: "), 'supplier_id', $_POST['supplier_id'], true); @@ -119,57 +119,7 @@ function fmt_credit($row) } //------------------------------------------------------------------------------------------------ - $date_after = date2sql($_POST['TransAfterDate']); - $date_to = date2sql($_POST['TransToDate']); - - // Sherifoz 22.06.03 Also get the description - $sql = "SELECT - trans.type, - trans.trans_no, - trans.reference, - supplier.supp_name, - trans.supp_reference, - trans.tran_date, - trans.due_date, - supplier.curr_code, - (trans.ov_amount + trans.ov_gst + trans.ov_discount) AS TotalAmount, - trans.alloc AS Allocated, - ((trans.type = ".ST_SUPPINVOICE." OR trans.type = ".ST_SUPPCREDIT.") AND trans.due_date < '" . date2sql(Today()) . "') AS OverDue - FROM " - .TB_PREF."supp_trans as trans, " - .TB_PREF."suppliers as supplier - WHERE supplier.supplier_id = trans.supplier_id - AND trans.tran_date >= '$date_after' - AND trans.tran_date <= '$date_to'"; - - if ($_POST['supplier_id'] != ALL_TEXT) - $sql .= " AND trans.supplier_id = ".db_escape($_POST['supplier_id']); - if (isset($_POST['filterType']) && $_POST['filterType'] != ALL_TEXT) - { - if (($_POST['filterType'] == '1') || ($_POST['filterType'] == '2')) - { - $sql .= " AND trans.type = ".ST_SUPPINVOICE." "; - } - elseif ($_POST['filterType'] == '3') - { - $sql .= " AND trans.type = ".ST_SUPPAYMENT." "; - } - elseif (($_POST['filterType'] == '4') || ($_POST['filterType'] == '5')) - { - $sql .= " AND trans.type = ".ST_SUPPCREDIT." "; - } - - if (($_POST['filterType'] == '2') || ($_POST['filterType'] == '5')) - { - $today = date2sql(Today()); - $sql .= " AND trans.due_date < '$today' "; - } - } - - if (!check_value('showSettled')) - { - $sql .= " AND (round(abs(ov_amount + ov_gst + ov_discount) - alloc,6) != 0) "; - } +$sql = get_sql_for_supplier_allocation_inquiry(); $cols = array( _("Type") => array('fun'=>'systype_name'), diff --git a/purchasing/inquiry/supplier_inquiry.php b/purchasing/inquiry/supplier_inquiry.php index 613db1e4..822654ec 100644 --- a/purchasing/inquiry/supplier_inquiry.php +++ b/purchasing/inquiry/supplier_inquiry.php @@ -22,7 +22,7 @@ if ($use_popup_windows) $js .= get_js_open_window(900, 500); if ($use_date_picker) $js .= get_js_date_picker(); -page(_($help_context = "Supplier Inquiry"), false, false, "", $js); +page(_($help_context = "Supplier Inquiry"), isset($_GET['supplier_id']), false, "", $js); if (isset($_GET['supplier_id'])){ $_POST['supplier_id'] = $_GET['supplier_id']; @@ -41,7 +41,7 @@ start_form(); if (!isset($_POST['supplier_id'])) $_POST['supplier_id'] = get_global_supplier(); -start_table("class='tablestyle_noborder'"); +start_table(TABLESTYLE_NOBORDER); start_row(); supplier_list_cells(_("Select a supplier:"), 'supplier_id', null, true); @@ -49,7 +49,7 @@ supplier_list_cells(_("Select a supplier:"), 'supplier_id', null, true); date_cells(_("From:"), 'TransAfterDate', '', null, -30); date_cells(_("To:"), 'TransToDate'); -supp_allocations_list_cell("filterType", null); +supp_transactions_list_cell("filterType", null, true); submit_cells('RefreshInquiry', _("Search"),'',_('Refresh Inquiry'), 'default'); @@ -61,8 +61,6 @@ set_global_supplier($_POST['supplier_id']); function display_supplier_summary($supplier_record) { - global $table_style; - $past1 = get_company_pref('past_due_days'); $past2 = 2 * $past1; $nowdue = "1-" . $past1 . " " . _('Days'); @@ -70,7 +68,7 @@ function display_supplier_summary($supplier_record) $pastdue2 = _('Over') . " " . $past2 . " " . _('Days'); - start_table("width=80% $table_style"); + start_table(TABLESTYLE, "width=80%"); $th = array(_("Currency"), _("Terms"), _("Current"), $nowdue, $pastdue1, $pastdue2, _("Total Balance")); @@ -135,7 +133,7 @@ function credit_link($row) function fmt_debit($row) { $value = $row["TotalAmount"]; - return $value>=0 ? price_format($value) : ''; + return $value>0 ? price_format($value) : ''; } @@ -158,54 +156,7 @@ function check_overdue($row) } //------------------------------------------------------------------------------------------------ - $date_after = date2sql($_POST['TransAfterDate']); - $date_to = date2sql($_POST['TransToDate']); - - // Sherifoz 22.06.03 Also get the description - $sql = "SELECT trans.type, - trans.trans_no, - trans.reference, - supplier.supp_name, - trans.supp_reference, - trans.tran_date, - trans.due_date, - supplier.curr_code, - (trans.ov_amount + trans.ov_gst + trans.ov_discount) AS TotalAmount, - trans.alloc AS Allocated, - ((trans.type = ".ST_SUPPINVOICE." OR trans.type = ".ST_SUPPCREDIT.") AND trans.due_date < '" . date2sql(Today()) . "') AS OverDue, - (ABS(trans.ov_amount + trans.ov_gst + trans.ov_discount - trans.alloc) <= 0.005) AS Settled - FROM ".TB_PREF."supp_trans as trans, ".TB_PREF."suppliers as supplier - WHERE supplier.supplier_id = trans.supplier_id - AND trans.tran_date >= '$date_after' - AND trans.tran_date <= '$date_to' - AND trans.ov_amount != 0"; // exclude voided transactions - if ($_POST['supplier_id'] != ALL_TEXT) - $sql .= " AND trans.supplier_id = ".db_escape($_POST['supplier_id']); - if (isset($_POST['filterType']) && $_POST['filterType'] != ALL_TEXT) - { - if (($_POST['filterType'] == '1')) - { - $sql .= " AND (trans.type = ".ST_SUPPINVOICE." OR trans.type = ".ST_BANKDEPOSIT.")"; - } - elseif (($_POST['filterType'] == '2')) - { - $sql .= " AND trans.type = ".ST_SUPPINVOICE." "; - } - elseif ($_POST['filterType'] == '3') - { - $sql .= " AND (trans.type = ".ST_SUPPAYMENT." OR trans.type = ".ST_BANKPAYMENT.") "; - } - elseif (($_POST['filterType'] == '4') || ($_POST['filterType'] == '5')) - { - $sql .= " AND trans.type = ".ST_SUPPCREDIT." "; - } - - if (($_POST['filterType'] == '2') || ($_POST['filterType'] == '5')) - { - $today = date2sql(Today()); - $sql .= " AND trans.due_date < '$today' "; - } - } +$sql = get_sql_for_supplier_inquiry(); $cols = array( _("Type") => array('fun'=>'systype_name', 'ord'=>''), diff --git a/purchasing/manage/suppliers.php b/purchasing/manage/suppliers.php index 0c94f251..a2c2b450 100644 --- a/purchasing/manage/suppliers.php +++ b/purchasing/manage/suppliers.php @@ -15,9 +15,8 @@ include($path_to_root . "/includes/session.inc"); page(_($help_context = "Suppliers"), @$_REQUEST['popup']); -//include($path_to_root . "/includes/date_functions.inc"); - -include($path_to_root . "/includes/ui.inc"); +include_once($path_to_root . "/includes/ui.inc"); +include_once($path_to_root . "/includes/ui/contacts_view.inc"); check_db_has_tax_groups(_("There are no tax groups defined in the system. At least one tax group is required before proceeding.")); @@ -25,7 +24,151 @@ if (isset($_GET['supplier_id'])) { $_POST['supplier_id'] = $_GET['supplier_id']; } -$new_supplier = get_post('supplier_id') == ''; + +$supplier_id = get_post('supplier_id'); +//-------------------------------------------------------------------------------------------- +function supplier_settings(&$supplier_id) +{ + + start_outer_table(TABLESTYLE2); + + table_section(1); + + if ($supplier_id) + { + //SupplierID exists - either passed when calling the form or from the form itself + $myrow = get_supplier($_POST['supplier_id']); + + $_POST['supp_name'] = $myrow["supp_name"]; + $_POST['supp_ref'] = $myrow["supp_ref"]; + $_POST['address'] = $myrow["address"]; + $_POST['supp_address'] = $myrow["supp_address"]; + + $_POST['gst_no'] = $myrow["gst_no"]; + $_POST['website'] = $myrow["website"]; + $_POST['supp_account_no'] = $myrow["supp_account_no"]; + $_POST['bank_account'] = $myrow["bank_account"]; + $_POST['dimension_id'] = $myrow["dimension_id"]; + $_POST['dimension2_id'] = $myrow["dimension2_id"]; + $_POST['curr_code'] = $myrow["curr_code"]; + $_POST['payment_terms'] = $myrow["payment_terms"]; + $_POST['credit_limit'] = price_format($myrow["credit_limit"]); + $_POST['tax_group_id'] = $myrow["tax_group_id"]; + $_POST['tax_included'] = $myrow["tax_included"]; + $_POST['payable_account'] = $myrow["payable_account"]; + $_POST['purchase_account'] = $myrow["purchase_account"]; + $_POST['payment_discount_account'] = $myrow["payment_discount_account"]; + $_POST['notes'] = $myrow["notes"]; + $_POST['inactive'] = $myrow["inactive"]; + } + else + { + $_POST['supp_name'] = $_POST['supp_ref'] = $_POST['address'] = $_POST['supp_address'] = + $_POST['tax_group_id'] = $_POST['website'] = $_POST['supp_account_no'] = $_POST['notes'] = ''; + $_POST['dimension_id'] = 0; + $_POST['dimension2_id'] = 0; + $_POST['tax_included'] = 0; + $_POST['sales_type'] = -1; + $_POST['gst_no'] = $_POST['bank_account'] = ''; + $_POST['payment_terms'] = ''; + $_POST['credit_limit'] = price_format(0); + + $company_record = get_company_prefs(); + $_POST['curr_code'] = $company_record["curr_default"]; + $_POST['payable_account'] = $company_record["creditors_act"]; + $_POST['purchase_account'] = ''; // default/item's cogs account + $_POST['payment_discount_account'] = $company_record['pyt_discount_act']; + } + + table_section_title(_("Basic Data")); + + text_row(_("Supplier Name:"), 'supp_name', null, 42, 40); + text_row(_("Supplier Short Name:"), 'supp_ref', null, 30, 30); + + text_row(_("GSTNo:"), 'gst_no', null, 42, 40); + link_row(_("Website:"), 'website', null, 35, 55); + if ($supplier_id && !is_new_supplier($supplier_id)) + { + label_row(_("Supplier's Currency:"), $_POST['curr_code']); + hidden('curr_code', $_POST['curr_code']); + } + else + { + currencies_list_row(_("Supplier's Currency:"), 'curr_code', null); + } + tax_groups_list_row(_("Tax Group:"), 'tax_group_id', null); + text_row(_("Our Customer No:"), 'supp_account_no', null, 42, 40); + + if (!$supplier_id) { + table_section_title(_("Contact Data")); + text_row(_("Contact Person:"), 'contact', null, 42, 40); + text_row(_("Phone Number:"), 'phone', null, 32, 30); + text_row(_("Secondary Phone Number:"), 'phone2', null, 32, 30); + text_row(_("Fax Number:"), 'fax', null, 32, 30); + email_row(_("E-mail:"), 'email', null, 35, 55); + languages_list_row(_("Document Language:"), 'rep_lang', null, _('System default')); + } + table_section_title(_("Purchasing")); + text_row(_("Bank Name/Account:"), 'bank_account', null, 42, 40); + amount_row(_("Credit Limit:"), 'credit_limit', null); + payment_terms_list_row(_("Payment Terms:"), 'payment_terms', null); + // + // tax_included option from supplier record is used directly in update_average_cost() function, + // therefore we can't edit the option after any transaction waas done for the supplier. + // + if (is_new_supplier($supplier_id)) + check_row(_("Prices contain tax included:"), 'tax_included'); + else { + hidden('tax_included'); + label_row(_("Prices contain tax included:"), $_POST['tax_included'] ? _('Yes') : _('No')); + } + table_section_title(_("Accounts")); + gl_all_accounts_list_row(_("Accounts Payable Account:"), 'payable_account', $_POST['payable_account']); + gl_all_accounts_list_row(_("Purchase Account:"), 'purchase_account', $_POST['purchase_account'], + false, false, _("Use Item Inventory/COGS Account")); + gl_all_accounts_list_row(_("Purchase Discount Account:"), 'payment_discount_account', $_POST['payment_discount_account']); + + table_section(2); + $dim = get_company_pref('use_dimension'); + if ($dim >= 1) + { + table_section_title(_("Dimension")); + dimensions_list_row(_("Dimension")." 1:", 'dimension_id', null, true, " ", false, 1); + if ($dim > 1) + dimensions_list_row(_("Dimension")." 2:", 'dimension2_id', null, true, " ", false, 2); + } + if ($dim < 1) + hidden('dimension_id', 0); + if ($dim < 2) + hidden('dimension2_id', 0); + + + table_section_title(_("Addresses")); + textarea_row(_("Mailing Address:"), 'address', null, 35, 5); + textarea_row(_("Physical Address:"), 'supp_address', null, 35, 5); + + table_section_title(_("General")); + textarea_row(_("General Notes:"), 'notes', null, 35, 5); + if ($supplier_id) + record_status_list_row(_("Supplier status:"), 'inactive'); + + end_outer_table(1); + + div_start('controls'); + if ($supplier_id) + { + submit_center_first('submit', _("Update Supplier"), + _('Update supplier data'), @$_REQUEST['popup'] ? true : 'default'); + submit_return('select', get_post('supplier_id'), _("Select this supplier and return to document entry.")); + submit_center_last('delete', _("Delete Supplier"), + _('Delete supplier data if have been never used'), true); + } + else + { + submit_center('submit', _("Add New Supplier Details"), true, '', 'default'); + } + div_end(); +} if (isset($_POST['submit'])) { @@ -55,34 +198,15 @@ if (isset($_POST['submit'])) if ($input_error !=1 ) { - if (!$new_supplier) + begin_transaction(); + if ($supplier_id) { - - $sql = "UPDATE ".TB_PREF."suppliers SET supp_name=".db_escape($_POST['supp_name']) . ", - supp_ref=".db_escape($_POST['supp_ref']) . ", - address=".db_escape($_POST['address']) . ", - supp_address=".db_escape($_POST['supp_address']) . ", - phone=".db_escape($_POST['phone']) . ", - phone2=".db_escape($_POST['phone2']) . ", - fax=".db_escape($_POST['fax']) . ", - gst_no=".db_escape($_POST['gst_no']) . ", - email=".db_escape($_POST['email']) . ", - website=".db_escape($_POST['website']) . ", - contact=".db_escape($_POST['contact']) . ", - supp_account_no=".db_escape($_POST['supp_account_no']) . ", - bank_account=".db_escape($_POST['bank_account']) . ", - credit_limit=".input_num('credit_limit', 0) . ", - dimension_id=".db_escape($_POST['dimension_id']) . ", - dimension2_id=".db_escape($_POST['dimension2_id']) . ", - curr_code=".db_escape($_POST['curr_code']).", - payment_terms=".db_escape($_POST['payment_terms']) . ", - payable_account=".db_escape($_POST['payable_account']) . ", - purchase_account=".db_escape($_POST['purchase_account']) . ", - payment_discount_account=".db_escape($_POST['payment_discount_account']) . ", - notes=".db_escape($_POST['notes']) . ", - tax_group_id=".db_escape($_POST['tax_group_id']) . " WHERE supplier_id = ".db_escape($_POST['supplier_id']); - - db_query($sql,"The supplier could not be updated"); + update_supplier($_POST['supplier_id'], $_POST['supp_name'], $_POST['supp_ref'], $_POST['address'], + $_POST['supp_address'], $_POST['gst_no'], + $_POST['website'], $_POST['supp_account_no'], $_POST['bank_account'], + input_num('credit_limit', 0), $_POST['dimension_id'], $_POST['dimension2_id'], $_POST['curr_code'], + $_POST['payment_terms'], $_POST['payable_account'], $_POST['purchase_account'], $_POST['payment_discount_account'], + $_POST['notes'], $_POST['tax_group_id'], @$_POST['tax_included']); update_record_status($_POST['supplier_id'], $_POST['inactive'], 'suppliers', 'supplier_id'); @@ -91,40 +215,24 @@ if (isset($_POST['submit'])) } else { + add_supplier($_POST['supp_name'], $_POST['supp_ref'], $_POST['address'], $_POST['supp_address'], + $_POST['gst_no'], $_POST['website'], $_POST['supp_account_no'], $_POST['bank_account'], + input_num('credit_limit',0), $_POST['dimension_id'], $_POST['dimension2_id'], + $_POST['curr_code'], $_POST['payment_terms'], $_POST['payable_account'], $_POST['purchase_account'], + $_POST['payment_discount_account'], $_POST['notes'], $_POST['tax_group_id'], check_value('tax_included')); + + $supplier_id = $_POST['supplier_id'] = db_insert_id(); + + add_crm_person($_POST['supp_ref'], $_POST['contact'], '', $_POST['address'], + $_POST['phone'], $_POST['phone2'], $_POST['fax'], $_POST['email'], + $_POST['rep_lang'], ''); + + add_crm_contact('supplier', 'general', $supplier_id, db_insert_id()); - $sql = "INSERT INTO ".TB_PREF."suppliers (supp_name, supp_ref, address, supp_address, phone, phone2, fax, gst_no, email, website, - contact, supp_account_no, bank_account, credit_limit, dimension_id, dimension2_id, curr_code, - payment_terms, payable_account, purchase_account, payment_discount_account, notes, tax_group_id) - VALUES (".db_escape($_POST['supp_name']). ", " - .db_escape($_POST['supp_ref']). ", " - .db_escape($_POST['address']) . ", " - .db_escape($_POST['supp_address']) . ", " - .db_escape($_POST['phone']). ", " - .db_escape($_POST['phone2']). ", " - .db_escape($_POST['fax']). ", " - .db_escape($_POST['gst_no']). ", " - .db_escape($_POST['email']). ", " - .db_escape($_POST['website']). ", " - .db_escape($_POST['contact']). ", " - .db_escape($_POST['supp_account_no']). ", " - .db_escape($_POST['bank_account']). ", " - .input_num('credit_limit',0). ", " - .db_escape($_POST['dimension_id']). ", " - .db_escape($_POST['dimension2_id']). ", " - .db_escape($_POST['curr_code']). ", " - .db_escape($_POST['payment_terms']). ", " - .db_escape($_POST['payable_account']). ", " - .db_escape($_POST['purchase_account']). ", " - .db_escape($_POST['payment_discount_account']). ", " - .db_escape($_POST['notes']). ", " - .db_escape($_POST['tax_group_id']). ")"; - - db_query($sql,"The supplier could not be added"); - $_POST['supplier_id'] = db_insert_id(); - $new_supplier = false; display_notification(_("A new supplier has been added.")); $Ajax->activate('_page_body'); } + commit_transaction(); } } @@ -136,10 +244,7 @@ elseif (isset($_POST['delete']) && $_POST['delete'] != "") // PREVENT DELETES IF DEPENDENT RECORDS IN 'supp_trans' , purch_orders - $sql= "SELECT COUNT(*) FROM ".TB_PREF."supp_trans WHERE supplier_id=".db_escape($_POST['supplier_id']); - $result = db_query($sql,"check failed"); - $myrow = db_fetch_row($result); - if ($myrow[0] > 0) + if (key_in_foreign_table($_POST['supplier_id'], 'supp_trans', 'supplier_id')) { $cancel_delete = 1; display_error(_("Cannot delete this supplier because there are transactions that refer to this supplier.")); @@ -147,10 +252,7 @@ elseif (isset($_POST['delete']) && $_POST['delete'] != "") } else { - $sql= "SELECT COUNT(*) FROM ".TB_PREF."purch_orders WHERE supplier_id=".db_escape($_POST['supplier_id']); - $result = db_query($sql,"check failed"); - $myrow = db_fetch_row($result); - if ($myrow[0] > 0) + if (key_in_foreign_table($_POST['supplier_id'], 'purch_orders', 'supplier_id')) { $cancel_delete = 1; display_error(_("Cannot delete the supplier record because purchase orders have been created against this supplier.")); @@ -159,11 +261,10 @@ elseif (isset($_POST['delete']) && $_POST['delete'] != "") } if ($cancel_delete == 0) { - $sql="DELETE FROM ".TB_PREF."suppliers WHERE supplier_id=".db_escape($_POST['supplier_id']); - db_query($sql,"check failed"); + delete_supplier($_POST['supplier_id']); unset($_SESSION['supplier_id']); - $new_supplier = true; + $supplier_id = ''; $Ajax->activate('_page_body'); } //end if Delete supplier } @@ -172,8 +273,8 @@ start_form(); if (db_has_suppliers()) { - start_table("", 3); -// start_table("class = 'tablestyle_noborder'"); + start_table(false, "", 3); +// start_table(TABLESTYLE_NOBORDER); start_row(); supplier_list_cells(_("Select a supplier: "), 'supplier_id', null, _('New supplier'), true, check_value('show_inactive')); @@ -190,139 +291,27 @@ else hidden('supplier_id', get_post('supplier_id')); } -start_outer_table($table_style2, 5); - -table_section(1); - -if (!$new_supplier) -{ - //SupplierID exists - either passed when calling the form or from the form itself - $myrow = get_supplier($_POST['supplier_id']); - - $_POST['supp_name'] = $myrow["supp_name"]; - $_POST['supp_ref'] = $myrow["supp_ref"]; - $_POST['address'] = $myrow["address"]; - $_POST['supp_address'] = $myrow["supp_address"]; - $_POST['phone'] = $myrow["phone"]; - $_POST['phone2'] = $myrow["phone2"]; - $_POST['fax'] = $myrow["fax"]; - $_POST['gst_no'] = $myrow["gst_no"]; - $_POST['email'] = $myrow["email"]; - $_POST['website'] = $myrow["website"]; - $_POST['contact'] = $myrow["contact"]; - $_POST['supp_account_no'] = $myrow["supp_account_no"]; - $_POST['bank_account'] = $myrow["bank_account"]; - $_POST['dimension_id'] = $myrow["dimension_id"]; - $_POST['dimension2_id'] = $myrow["dimension2_id"]; - $_POST['curr_code'] = $myrow["curr_code"]; - $_POST['payment_terms'] = $myrow["payment_terms"]; - $_POST['credit_limit'] = price_format($myrow["credit_limit"]); - $_POST['tax_group_id'] = $myrow["tax_group_id"]; - $_POST['payable_account'] = $myrow["payable_account"]; - $_POST['purchase_account'] = $myrow["purchase_account"]; - $_POST['payment_discount_account'] = $myrow["payment_discount_account"]; - $_POST['notes'] = $myrow["notes"]; - $_POST['inactive'] = $myrow["inactive"]; -} -else -{ - $_POST['supp_name'] = $_POST['supp_ref'] = $_POST['address'] = $_POST['supp_address'] = - $_POST['tax_group_id'] = $_POST['website'] = $_POST['supp_account_no'] = $_POST['notes'] = ''; - $_POST['dimension_id'] = 0; - $_POST['dimension2_id'] = 0; - $_POST['sales_type'] = -1; - $_POST['email'] = $_POST['phone'] = $_POST['phone2'] = $_POST['fax'] = - $_POST['gst_no'] = $_POST['contact'] = $_POST['bank_account'] = ''; - $_POST['payment_terms'] = ''; - $_POST['credit_limit'] = price_format(0); - - $company_record = get_company_prefs(); - $_POST['curr_code'] = $company_record["curr_default"]; - $_POST['payable_account'] = $company_record["creditors_act"]; - $_POST['purchase_account'] = $company_record["default_cogs_act"]; - $_POST['payment_discount_account'] = $company_record['pyt_discount_act']; - $_POST['inactive'] = 0; -} - -table_section_title(_("Name and Contact")); - -text_row(_("Supplier Name:"), 'supp_name', null, 42, 40); -text_row(_("Supplier Short Name:"), 'supp_ref', null, 30, 30); -text_row(_("Contact Person:"), 'contact', null, 42, 40); - -text_row(_("Phone Number:"), 'phone', null, 32, 30); -text_row(_("Secondary Phone Number:"), 'phone2', null, 32, 30); -text_row(_("Fax Number:"), 'fax', null, 32, 30); - -email_row(_("E-mail:"), 'email', null, 35, 55); -link_row(_("Website:"), 'website', null, 35, 55); -text_row(_("Our Customer No:"), 'supp_account_no', null, 42, 40); - -table_section_title(_("Addresses")); -textarea_row(_("Mailing Address:"), 'address', null, 35, 5); -textarea_row(_("Physical Address:"), 'supp_address', null, 35, 5); - -table_section(2); - -table_section_title(_("Purchasing")); -text_row(_("GSTNo:"), 'gst_no', null, 42, 40); -text_row(_("Bank Name/Account:"), 'bank_account', null, 42, 40); -amount_row(_("Credit Limit:"), 'credit_limit', null); -if (!$new_supplier) -{ - label_row(_("Supplier's Currency:"), $_POST['curr_code']); - hidden('curr_code', $_POST['curr_code']); -} -else -{ - currencies_list_row(_("Supplier's Currency:"), 'curr_code', null); -} - -tax_groups_list_row(_("Tax Group:"), 'tax_group_id', null); - -payment_terms_list_row(_("Payment Terms:"), 'payment_terms', null); - -table_section_title(_("Accounts")); - -gl_all_accounts_list_row(_("Accounts Payable Account:"), 'payable_account', $_POST['payable_account']); - -gl_all_accounts_list_row(_("Purchase Account:"), 'purchase_account', $_POST['purchase_account']); - -gl_all_accounts_list_row(_("Purchase Discount Account:"), 'payment_discount_account', $_POST['payment_discount_account']); - -$dim = get_company_pref('use_dimension'); -if ($dim >= 1) -{ - table_section_title(_("Dimension")); - - dimensions_list_row(_("Dimension")." 1:", 'dimension_id', null, true, " ", false, 1); - if ($dim > 1) - dimensions_list_row(_("Dimension")." 2:", 'dimension2_id', null, true, " ", false, 2); -} -if ($dim < 1) - hidden('dimension_id', 0); -if ($dim < 2) - hidden('dimension2_id', 0); -table_section_title(_("General")); -textarea_row(_("General Notes:"), 'notes', null, 35, 5); -record_status_list_row(_("Supplier status:"), 'inactive'); - -end_outer_table(1); - -div_start('controls'); -if (!$new_supplier) -{ - submit_center_first('submit', _("Update Supplier"), - _('Update supplier data'), @$_REQUEST['popup'] ? true : 'default'); - submit_return('select', get_post('supplier_id'), _("Select this supplier and return to document entry.")); - submit_center_last('delete', _("Delete Supplier"), - _('Delete supplier data if have been never used'), true); -} -else -{ - submit_center('submit', _("Add New Supplier Details"), true, '', 'default'); -} -div_end(); +if (!$supplier_id) + unset($_POST['_tabs_sel']); // force settings tab for new customer + +tabbed_content_start('tabs', array( + 'settings' => array(_('&General settings'), $supplier_id), + 'contacts' => array(_('&Contacts'), $supplier_id), + )); + + switch (get_post('_tabs_sel')) { + default: + case 'settings': + supplier_settings($supplier_id); + break; + case 'contacts': + $contacts = new contacts('contacts', $supplier_id, 'supplier'); + $contacts->show(); + break; + case 'orders': + }; +br(); +tabbed_content_end(); hidden('popup', @$_REQUEST['popup']); end_form(); diff --git a/purchasing/po_entry_items.php b/purchasing/po_entry_items.php index f055e8fa..d707dbfe 100644 --- a/purchasing/po_entry_items.php +++ b/purchasing/po_entry_items.php @@ -9,28 +9,54 @@ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the License here . ***********************************************************************/ -$page_security = 'SA_PURCHASEORDER'; $path_to_root = ".."; +$page_security = 'SA_PURCHASEORDER'; include_once($path_to_root . "/purchasing/includes/po_class.inc"); include_once($path_to_root . "/includes/session.inc"); include_once($path_to_root . "/purchasing/includes/purchasing_ui.inc"); +include_once($path_to_root . "/purchasing/includes/db/suppliers_db.inc"); include_once($path_to_root . "/reporting/includes/reporting.inc"); +set_page_security( @$_SESSION['PO']->trans_type, + array( ST_PURCHORDER => 'SA_PURCHASEORDER', + ST_SUPPRECEIVE => 'SA_GRN', + ST_SUPPINVOICE => 'SA_SUPPLIERINVOICE'), + array( 'NewOrder' => 'SA_PURCHASEORDER', + 'ModifyOrderNumber' => 'SA_PURCHASEORDER', + 'NewGRN' => 'SA_GRN', + 'NewInvoice' => 'SA_SUPPLIERINVOICE') +); + $js = ''; if ($use_popup_windows) $js .= get_js_open_window(900, 500); if ($use_date_picker) $js .= get_js_date_picker(); -if (isset($_GET['ModifyOrderNumber'])) -{ - page(_($help_context = "Modify Purchase Order #") . $_GET['ModifyOrderNumber'], false, false, "", $js); -} -else -{ - page(_($help_context = "Purchase Order Entry"), false, false, "", $js); +if (isset($_GET['ModifyOrderNumber']) && is_numeric($_GET['ModifyOrderNumber'])) { + + $_SESSION['page_title'] = _($help_context = "Modify Purchase Order #") . $_GET['ModifyOrderNumber']; + create_new_po(ST_PURCHORDER, $_GET['ModifyOrderNumber']); + copy_from_cart(); +} elseif (isset($_GET['NewOrder'])) { + + $_SESSION['page_title'] = _($help_context = "Purchase Order Entry"); + create_new_po(ST_PURCHORDER, 0); + copy_from_cart(); +} elseif (isset($_GET['NewGRN'])) { + + $_SESSION['page_title'] = _($help_context = "Direct GRN Entry"); + create_new_po(ST_SUPPRECEIVE, 0); + copy_from_cart(); +} elseif (isset($_GET['NewInvoice'])) { + + $_SESSION['page_title'] = _($help_context = "Direct Purchase Invoice Entry"); + create_new_po(ST_SUPPINVOICE, 0); + copy_from_cart(); } +page($_SESSION['page_title'], false, false, "", $js); + //--------------------------------------------------------------------------------------------------- check_db_has_suppliers(_("There are no suppliers defined in the system.")); @@ -61,29 +87,52 @@ if (isset($_GET['AddedID'])) hyperlink_no_params($path_to_root."/purchasing/inquiry/po_search.php", _("Select An &Outstanding Purchase Order")); display_footer_exit(); -} -//-------------------------------------------------------------------------------------------------- -function copy_from_cart() -{ - $_POST['supplier_id'] = $_SESSION['PO']->supplier_id; - $_POST['OrderDate'] = $_SESSION['PO']->orig_order_date; - $_POST['Requisition'] = $_SESSION['PO']->requisition_no; - $_POST['ref'] = $_SESSION['PO']->reference; - $_POST['Comments'] = $_SESSION['PO']->Comments; - $_POST['StkLocation'] = $_SESSION['PO']->Location; - $_POST['delivery_address'] = $_SESSION['PO']->delivery_address; -} +} elseif (isset($_GET['AddedGRN'])) { -function copy_to_cart() -{ - $_SESSION['PO']->supplier_id = $_POST['supplier_id']; - $_SESSION['PO']->orig_order_date = $_POST['OrderDate']; - $_SESSION['PO']->reference = $_POST['ref']; - $_SESSION['PO']->requisition_no = $_POST['Requisition']; - $_SESSION['PO']->Comments = $_POST['Comments']; - $_SESSION['PO']->Location = $_POST['StkLocation']; - $_SESSION['PO']->delivery_address = $_POST['delivery_address']; + $trans_no = $_GET['AddedGRN']; + $trans_type = ST_SUPPRECEIVE; + + display_notification_centered(_("Direct GRN has been entered")); + + display_note(get_trans_view_str($trans_type, $trans_no, _("&View this GRN")), 0); + +// not yet +// display_note(print_document_link($trans_no, _("&Print This GRN"), true, $trans_type), 0, 1); + + hyperlink_params("$path_to_root/purchasing/supplier_invoice.php", + _("Entry purchase &invoice for this receival"), "New=1"); + + hyperlink_params("$path_to_root/admin/attachments.php", _("Add an Attachment"), + "filterType=$trans_type&trans_no=$trans_no"); + + hyperlink_params($_SERVER['PHP_SELF'], _("Enter &Another GRN"), "NewGRN=Yes"); + + display_footer_exit(); + +} elseif (isset($_GET['AddedPI'])) { + + $trans_no = $_GET['AddedPI']; + $trans_type = ST_SUPPINVOICE; + + display_notification_centered(_("Direct Purchase Invoice has been entered")); + + display_note(get_trans_view_str($trans_type, $trans_no, _("&View this Invoice")), 0); + +// not yet +// display_note(print_document_link($trans_no, _("&Print This Invoice"), true, $trans_type), 0, 1); + + display_note(get_gl_view_str($trans_type, $trans_no, _("View the GL Journal Entries for this Invoice")), 1); + + hyperlink_params("$path_to_root/purchasing/supplier_payment.php", _("Entry supplier &payment for this invoice"), + "PInvoice=".$trans_no); + + hyperlink_params("$path_to_root/admin/attachments.php", _("Add an Attachment"), + "filterType=$trans_type&trans_no=$trans_no"); + + hyperlink_params($_SERVER['PHP_SELF'], _("Enter &Another Direct Invoice"), "NewInvoice=Yes"); + + display_footer_exit(); } //-------------------------------------------------------------------------------------------------- @@ -157,6 +206,12 @@ function handle_cancel_po() function check_data() { + if(!get_post('stock_id_text', true)) { + display_error( _("Item description cannot be empty.")); + set_focus('stock_id_edit'); + return false; + } + $dec = get_qty_dec($_POST['stock_id']); $min = 1 / pow(10, $dec); if (!check_num('qty',$min)) @@ -173,7 +228,7 @@ function check_data() set_focus('price'); return false; } - if (!is_date($_POST['req_del_date'])){ + if ($_SESSION['PO']->trans_type == ST_PURCHORDER && !is_date($_POST['req_del_date'])){ display_error(_("The date entered is in an invalid format.")); set_focus('req_del_date'); return false; @@ -200,7 +255,7 @@ function handle_update_item() } $_SESSION['PO']->update_order_item($_POST['line_no'], input_num('qty'), input_num('price'), - $_POST['req_del_date']); + @$_POST['req_del_date'], $_POST['item_description'] ); unset_form_variables(); } line_start_focus(); @@ -218,36 +273,31 @@ function handle_add_new_item() { foreach ($_SESSION['PO']->line_items as $order_item) { - /* do a loop round the items on the order to see that the item is not already on this order */ - if (($order_item->stock_id == $_POST['stock_id']) && - ($order_item->Deleted == false)) + if (($order_item->stock_id == $_POST['stock_id'])) { - $allow_update = false; - display_error(_("The selected item is already on this order.")); + display_warning(_("The selected item is already on this order.")); } } /* end of the foreach loop to look for pre-existing items of the same code */ } if ($allow_update == true) { - $sql = "SELECT description, units, mb_flag - FROM ".TB_PREF."stock_master WHERE stock_id = ".db_escape($_POST['stock_id']); + $result = get_short_info($_POST['stock_id']); - $result = db_query($sql,"The stock details for " . $_POST['stock_id'] . " could not be retrieved"); - - if (db_num_rows($result) == 0) - { + if (db_num_rows($result) == 0) + { $allow_update = false; - } + } if ($allow_update) - { + { $myrow = db_fetch($result); - $_SESSION['PO']->add_to_order ($_POST['line_no'], $_POST['stock_id'], input_num('qty'), - $myrow["description"], input_num('price'), $myrow["units"], - $_POST['req_del_date'], 0, 0); + $_SESSION['PO']->add_to_order (count($_SESSION['PO']->line_items), $_POST['stock_id'], input_num('qty'), + get_post('stock_id_text'), //$myrow["description"], + input_num('price'), '', // $myrow["units"], (retrived in cart) + $_SESSION['PO']->trans_type == ST_PURCHORDER ? $_POST['req_del_date'] : '', 0, 0); unset_form_variables(); $_POST['stock_id'] = ""; @@ -282,6 +332,13 @@ function can_commit() return false; } + if (($_SESSION['PO']->trans_type==ST_SUPPINVOICE) && !is_date($_POST['due_date'])) + { + display_error(_("The entered due date is invalid.")); + set_focus('due_date'); + return false; + } + if (!$_SESSION['PO']->order_no) { if (!$Refs->is_valid(get_post('ref'))) @@ -291,7 +348,7 @@ function can_commit() return false; } - if (!is_new_reference(get_post('ref'), ST_PURCHORDER)) + if (!is_new_reference(get_post('ref'), $_SESSION['PO']->trans_type)) { display_error(_("The entered reference is already in use.")); set_focus('ref'); @@ -299,13 +356,18 @@ function can_commit() } } - if (get_post('delivery_address') == '') + if ($_SESSION['PO']->trans_type == ST_SUPPINVOICE && !$Refs->is_valid(get_post('supp_ref'))) + { + display_error(_("You must enter a supplier's invoice reference.")); + set_focus('supp_ref'); + return false; + } + if ($_SESSION['PO']->trans_type == ST_PURCHORDER && get_post('delivery_address') == '') { display_error(_("There is no delivery address specified.")); set_focus('delivery_address'); return false; } - if (get_post('StkLocation') == '') { display_error(_("There is no location specified to move any items into.")); @@ -326,33 +388,80 @@ function can_commit() function handle_commit_order() { + $cart = &$_SESSION['PO']; - if (can_commit()) - { - copy_to_cart(); + if (can_commit()) { - if ($_SESSION['PO']->order_no == 0) - { - + copy_to_cart(); + if ($cart->trans_type != ST_PURCHORDER) { + // for direct grn/invoice set same dates for lines as for whole document + foreach ($cart->line_items as $line_no =>$line) + $cart->line_items[$line_no]->req_del_date = $cart->orig_order_date; + } + if ($cart->order_no == 0) { // new po/grn/invoice /*its a new order to be inserted */ - $order_no = add_po($_SESSION['PO']); - new_doc_date($_SESSION['PO']->orig_order_date); - unset($_SESSION['PO']); - - meta_forward($_SERVER['PHP_SELF'], "AddedID=$order_no"); - - } - else - { - - /*its an existing order need to update the old order info */ - $order_no = update_po($_SESSION['PO']); + $ref = $cart->reference; + if ($cart->trans_type != ST_PURCHORDER) { + $cart->reference = 'auto'; + begin_transaction(); // all db changes as single transaction for direct document + } + $order_no = add_po($cart); + new_doc_date($cart->orig_order_date); + $cart->order_no = $order_no; + + if ($cart->trans_type == ST_PURCHORDER) { + unset($_SESSION['PO']); + meta_forward($_SERVER['PHP_SELF'], "AddedID=$order_no"); + } + //Direct GRN + if ($cart->trans_type == ST_SUPPRECEIVE) + $cart->reference = $ref; + $cart->Comments = $cart->reference; //grn does not hold supp_ref + foreach($cart->line_items as $key => $line) + $cart->line_items[$key]->receive_qty = $line->quantity; + $grn_no = add_grn($cart); + if ($cart->trans_type == ST_SUPPRECEIVE) { + commit_transaction(); // save PO+GRN + unset($_SESSION['PO']); + meta_forward($_SERVER['PHP_SELF'], "AddedGRN=$grn_no"); + } +// Direct Purchase Invoice + $inv = new supp_trans(ST_SUPPINVOICE); + $inv->Comments = $cart->Comments; + $inv->supplier_id = $cart->supplier_id; + $inv->tran_date = $cart->orig_order_date; + $inv->due_date = $cart->due_date; + $inv->reference = $ref; + $inv->supp_reference = $cart->supp_ref; + $inv->tax_included = $cart->tax_included; + $supp = get_supplier($cart->supplier_id); + $inv->tax_group_id = $supp['tax_group_id']; +// $inv->ov_discount 'this isn't used at all' + $inv->ov_amount = $inv->ov_gst = 0; + foreach($cart->line_items as $key => $line) { + $inv->add_grn_to_trans($line->grn_item_id, $line->po_detail_rec, $line->stock_id, + $line->item_description, $line->receive_qty, 0, $line->receive_qty, + $line->price, $line->price, true, get_standard_cost($line->stock_id), ''); + $inv->ov_amount += round2(($line->receive_qty * $line->price), user_price_dec()); + } + $taxes = $inv->get_taxes($inv->tax_group_id, 0, false); + foreach( $taxes as $taxitem) { + $inv->ov_gst += round2($taxitem['Value'], user_price_dec()); + } + $inv_no = add_supp_invoice($inv); + commit_transaction(); // save PO+GRN+PI + // FIXME payment for cash terms. (Needs cash account selection) + unset($_SESSION['PO']); + meta_forward($_SERVER['PHP_SELF'], "AddedPI=$inv_no"); + } + else { // order modification + + $order_no = update_po($cart); unset($_SESSION['PO']); - meta_forward($_SERVER['PHP_SELF'], "AddedID=$order_no&Updated=1"); } - } + } } //--------------------------------------------------------------------------------------------------- $id = find_submit('Delete'); @@ -375,25 +484,10 @@ if (isset($_POST['CancelOrder'])) if (isset($_POST['CancelUpdate'])) unset_form_variables(); -if (isset($_GET['ModifyOrderNumber']) && $_GET['ModifyOrderNumber'] != "") -{ - create_new_po(); - - $_SESSION['PO']->order_no = $_GET['ModifyOrderNumber']; - - /*read in all the selected order into the Items cart */ - read_po($_SESSION['PO']->order_no, $_SESSION['PO']); - - copy_from_cart(); -} - if (isset($_POST['CancelUpdate']) || isset($_POST['UpdateLine'])) { line_start_focus(); } -if (isset($_GET['NewOrder'])) - create_new_po(); - //--------------------------------------------------------------------------------------------------- start_form(); @@ -403,22 +497,35 @@ echo "
"; display_po_items($_SESSION['PO']); -start_table($table_style2); +start_table(TABLESTYLE2); textarea_row(_("Memo:"), 'Comments', null, 70, 4); end_table(1); div_start('controls', 'items_table'); +$process_txt = _("Place Order"); +$update_txt = _("Update Order"); +$cancel_txt = _("Cancel Order"); +if ($_SESSION['PO']->trans_type == ST_SUPPRECEIVE) { + $process_txt = _("Process GRN"); + $update_txt = _("Update GRN"); + $cancel_txt = _("Cancel GRN"); +} +elseif ($_SESSION['PO']->trans_type == ST_SUPPINVOICE) { + $process_txt = _("Process Invoice"); + $update_txt = _("Update Invoice"); + $cancel_txt = _("Cancel Invoice"); +} if ($_SESSION['PO']->order_has_items()) { if ($_SESSION['PO']->order_no) - submit_center_first('Commit', _("Update Order"), '', 'default'); + submit_center_first('Commit', $update_txt, '', 'default'); else - submit_center_first('Commit', _("Place Order"), '', 'default'); - submit_center_last('CancelOrder', _("Cancel Order")); + submit_center_first('Commit', $process_txt, '', 'default'); + submit_center_last('CancelOrder', $cancel_txt); } else - submit_center('CancelOrder', _("Cancel Order"), true, false, 'cancel'); + submit_center('CancelOrder', $cancel_txt, true, false, 'cancel'); div_end(); //--------------------------------------------------------------------------------------------------- diff --git a/purchasing/po_receive_items.php b/purchasing/po_receive_items.php index bfb8371c..c7e7cb13 100644 --- a/purchasing/po_receive_items.php +++ b/purchasing/po_receive_items.php @@ -53,10 +53,8 @@ if ((!isset($_GET['PONumber']) || $_GET['PONumber'] == 0) && !isset($_SESSION['P function display_po_receive_items() { - global $table_style; - div_start('grn_items'); - start_table("colspan=7 $table_style width=90%"); + start_table(TABLESTYLE, "colspan=7 width=90%"); $th = array(_("Item Code"), _("Description"), _("Ordered"), _("Units"), _("Received"), _("Outstanding"), _("This Delivery"), _("Price"), _("Total")); table_header($th); @@ -105,9 +103,20 @@ function display_po_receive_items() } } - $display_total = number_format2($total,user_price_dec()); - label_row(_("Total value of items received"), $display_total, "colspan=8 align=right", - "nowrap align=right"); + $colspan = count($th)-1; + + $display_sub_total = price_format($total/* + input_num('freight_cost')*/); + + label_row(_("Sub-total"), $display_sub_total, "colspan=$colspan align=right","align=right"); + $taxes = $_SESSION['PO']->get_taxes(input_num('freight_cost')); + + $tax_total = display_edit_tax_items($taxes, $colspan, $_SESSION['PO']->tax_included); + + $display_total = price_format(($total + input_num('freight_cost') + $tax_total)); + + start_row(); + label_cells(_("Amount Total"), $display_total, "colspan=$colspan align='right'","align='right'"); + end_row(); end_table(); div_end(); } @@ -116,18 +125,13 @@ function display_po_receive_items() function check_po_changed() { - /*Now need to check that the order details are the same as they were when they were read into the Items array. If they've changed then someone else must have altered them */ + /*Now need to check that the order details are the same as they were when they were read + into the Items array. If they've changed then someone else must have altered them */ // Sherifoz 22.06.03 Compare against COMPLETED items only !! // Otherwise if you try to fullfill item quantities separately will give error. - $sql = "SELECT item_code, quantity_ordered, quantity_received, qty_invoiced - FROM ".TB_PREF."purch_order_details - WHERE order_no=".db_escape($_SESSION['PO']->order_no) - ." ORDER BY po_detail_item"; - - $result = db_query($sql, "could not query purch order details"); - check_db_error("Could not check that the details of the purchase order had not been changed by another user ", $sql); + $result = get_po_items($_SESSION['PO']->order_no); - $line_no = 1; + $line_no = 0; while ($myrow = db_fetch($result)) { $ln_item = $_SESSION['PO']->line_items[$line_no]; @@ -232,37 +236,43 @@ function process_receive_po() if (check_po_changed()) { display_error(_("This order has been changed or invoiced since this delivery was started to be actioned. Processing halted. To enter a delivery against this purchase order, it must be re-selected and re-read again to update the changes made by the other user.")); + hyperlink_no_params("$path_to_root/purchasing/inquiry/po_search.php", _("Select a different purchase order for receiving goods against")); + hyperlink_params("$path_to_root/purchasing/po_receive_items.php", _("Re-Read the updated purchase order for receiving goods against"), "PONumber=" . $_SESSION['PO']->order_no); + unset($_SESSION['PO']->line_items); unset($_SESSION['PO']); unset($_POST['ProcessGoodsReceived']); $Ajax->activate('_page_body'); display_footer_exit(); } + + $grn = &$_SESSION['PO']; + $grn->orig_order_date = $_POST['DefaultReceivedDate']; + $grn->reference = $_POST['ref']; + $grn->Location = $_POST['Location']; - $grn = add_grn($_SESSION['PO'], $_POST['DefaultReceivedDate'], - $_POST['ref'], $_POST['Location']); + $grn_no = add_grn($grn); new_doc_date($_POST['DefaultReceivedDate']); unset($_SESSION['PO']->line_items); unset($_SESSION['PO']); - meta_forward($_SERVER['PHP_SELF'], "AddedID=$grn"); + meta_forward($_SERVER['PHP_SELF'], "AddedID=$grn_no"); } //-------------------------------------------------------------------------------------------------- if (isset($_GET['PONumber']) && $_GET['PONumber'] > 0 && !isset($_POST['Update'])) { - - create_new_po(); - - /*read in all the selected order into the Items cart */ - read_po($_GET['PONumber'], $_SESSION['PO']); + create_new_po(ST_PURCHORDER, $_GET['PONumber']); + $_SESSION['PO']->trans_type = ST_SUPPRECEIVE; + $_SESSION['PO']->reference = $Refs->get_next(ST_SUPPRECEIVE); + copy_from_cart(); } //-------------------------------------------------------------------------------------------------- @@ -315,7 +325,6 @@ submit_center_last('ProcessGoodsReceived', _("Process Receive Items"), _("Clear end_form(); //-------------------------------------------------------------------------------------------------- - end_page(); ?> diff --git a/purchasing/supplier_credit.php b/purchasing/supplier_credit.php index ff2fa175..4db923b9 100644 --- a/purchasing/supplier_credit.php +++ b/purchasing/supplier_credit.php @@ -62,8 +62,7 @@ if (isset($_GET['New'])) unset ($_SESSION['supp_trans']); } - $_SESSION['supp_trans'] = new supp_trans; - $_SESSION['supp_trans']->is_invoice = false; + $_SESSION['supp_trans'] = new supp_trans(ST_SUPPCREDIT); if (isset($_GET['invoice_no'])) { $_SESSION['supp_trans']->supp_reference = $_POST['invoice_no'] = $_GET['invoice_no']; @@ -97,8 +96,7 @@ if (isset($_POST['AddGLCodeToTrans'])){ $Ajax->activate('gl_items'); $input_error = false; - $sql = "SELECT account_code, account_name FROM ".TB_PREF."chart_master WHERE account_code=".db_escape($_POST['gl_code']); - $result = db_query($sql,"get account information"); + $result = get_gl_account_info($_POST['gl_code']); if (db_num_rows($result) == 0) { display_error(_("The account code entered is not a valid code, this line cannot be added to the transaction.")); @@ -245,13 +243,11 @@ function commit_item_data($n) { if (check_item_data($n)) { - $complete = False; - $_SESSION['supp_trans']->add_grn_to_trans($n, $_POST['po_detail_item'.$n], $_POST['item_code'.$n], $_POST['item_description'.$n], $_POST['qty_recd'.$n], $_POST['prev_quantity_inv'.$n], input_num('This_QuantityCredited'.$n), - $_POST['order_price'.$n], input_num('ChgPrice'.$n), $complete, + $_POST['order_price'.$n], input_num('ChgPrice'.$n), $_POST['std_cost_unit'.$n], ""); } } diff --git a/purchasing/supplier_invoice.php b/purchasing/supplier_invoice.php index 3dde32cd..b0434e68 100644 --- a/purchasing/supplier_invoice.php +++ b/purchasing/supplier_invoice.php @@ -65,10 +65,7 @@ if (isset($_GET['New'])) unset ($_SESSION['supp_trans']); } - //session_register("SuppInv"); - //session_register("supp_trans"); - $_SESSION['supp_trans'] = new supp_trans; - $_SESSION['supp_trans']->is_invoice = true; + $_SESSION['supp_trans'] = new supp_trans(ST_SUPPINVOICE); } //-------------------------------------------------------------------------------------------------- @@ -99,8 +96,7 @@ if (isset($_POST['AddGLCodeToTrans'])){ $Ajax->activate('gl_items'); $input_error = false; - $sql = "SELECT account_code, account_name FROM ".TB_PREF."chart_master WHERE account_code=".db_escape($_POST['gl_code']); - $result = db_query($sql,"get account information"); + $result = get_gl_account_info($_POST['gl_code']); if (db_num_rows($result) == 0) { display_error(_("The account code entered is not a valid code, this line cannot be added to the transaction.")); @@ -186,17 +182,9 @@ function check_data() return false; } - $sql = "SELECT Count(*) FROM ".TB_PREF."supp_trans WHERE supplier_id=" - .db_escape($_SESSION['supp_trans']->supplier_id) . " AND supp_reference=" - .db_escape( $_POST['supp_reference']) - . " AND ov_amount!=0"; // ignore voided invoice references - - $result=db_query($sql,"The sql to check for the previous entry of the same invoice failed"); - - $myrow = db_fetch_row($result); - if ($myrow[0] == 1) + if (is_reference_already_there($_SESSION['supp_trans']->supplier_id, $_POST['supp_reference'])) { /*Transaction reference already entered */ - display_error(_("This invoice number has already been entered. It cannot be entered again." . " (" . $_POST['supp_reference'] . ")")); + display_error(_("This invoice number has already been entered. It cannot be entered again.") . " (" . $_POST['supp_reference'] . ")"); return false; } @@ -342,27 +330,7 @@ if ($_SESSION["wa_current_user"]->can_access('SA_GRNDELETE')) $id2 = find_submit('void_item_id'); if ($id2 != -1) { - begin_transaction(); - - $myrow = get_grn_item_detail($id2); - - $grn = get_grn_batch($myrow['grn_batch_id']); - - $sql = "UPDATE ".TB_PREF."purch_order_details - SET quantity_received = qty_invoiced, quantity_ordered = qty_invoiced WHERE po_detail_item = ".$myrow["po_detail_item"]; - db_query($sql, "The quantity invoiced of the purchase order line could not be updated"); - - $sql = "UPDATE ".TB_PREF."grn_items - SET qty_recd = quantity_inv WHERE id = ".$myrow["id"]; - db_query($sql, "The quantity invoiced off the items received record could not be updated"); - - update_average_material_cost($grn["supplier_id"], $myrow["item_code"], - $myrow["unit_price"], -$myrow["QtyOstdg"], Today()); - - add_stock_move(ST_SUPPRECEIVE, $myrow["item_code"], $myrow['grn_batch_id'], $grn['loc_code'], sql2date($grn["delivery_date"]), "", - -$myrow["QtyOstdg"], $myrow['std_cost_unit'], $grn["supplier_id"], 1, $myrow['unit_price']); - - commit_transaction(); + remove_not_invoice_item($id2); display_notification(sprintf(_('All yet non-invoiced items on delivery line # %d has been removed.'), $id2)); } diff --git a/purchasing/supplier_payment.php b/purchasing/supplier_payment.php index 265fe536..0d094ba3 100644 --- a/purchasing/supplier_payment.php +++ b/purchasing/supplier_payment.php @@ -63,8 +63,34 @@ if (list_updated('supplier_id') || list_updated('bank_account')) { } //---------------------------------------------------------------------------------------- -if (isset($_GET['AddedID'])) -{ +if (!isset($_POST['bank_account'])) { // first page call + $_SESSION['alloc'] = new allocation(ST_SUPPAYMENT, 0); + + if (isset($_GET['PInvoice'])) { + // get date and supplier + $inv = get_supp_trans($_GET['PInvoice'], ST_SUPPINVOICE); + if($inv) { + $_POST['supplier_id'] = $inv['supplier_id']; + $_POST['DatePaid'] = sql2date($inv['tran_date']); +// $_POST['discount'] = price_format(0); +// $_POST['bank_account'], $_POST['ref'] + $_POST['memo_'] = $inv['supp_reference']; + foreach($_SESSION['alloc']->allocs as $line => $trans) { + if ($trans->type == ST_SUPPINVOICE && $trans->type_no == $_GET['PInvoice']) { + $_POST['amount'] = + $_SESSION['alloc']->amount = price_format($_SESSION['alloc']->allocs[$line]->amount); + $_SESSION['alloc']->allocs[$line]->current_allocated = + $_SESSION['alloc']->allocs[$line]->amount; + break; + } + } + unset($inv); + } else + display_error(_("Invalid purchase invoice number.")); + + } +} +if (isset($_GET['AddedID'])) { $payment_id = $_GET['AddedID']; display_notification_centered( _("Payment has been sucessfully entered")); @@ -230,15 +256,12 @@ if (isset($_POST['ProcessSuppPayment'])) start_form(); - start_outer_table("$table_style2 width=60%", 5); + start_outer_table(TABLESTYLE2, "width=60%", 5); table_section(1); supplier_list_row(_("Payment To:"), 'supplier_id', null, false, true); - if (!isset($_POST['bank_account'])) // first page call - $_SESSION['alloc'] = new allocation(ST_SUPPAYMENT, 0); - set_global_supplier($_POST['supplier_id']); bank_accounts_list_row(_("From Bank Account:"), 'bank_account', null, true); @@ -269,7 +292,7 @@ start_form(); div_end(); } - start_table("$table_style width=60%"); + start_table(TABLESTYLE, "width=60%"); amount_row(_("Amount of Discount:"), 'discount'); amount_row(_("Amount of Payment:"), 'amount'); textarea_row(_("Memo:"), 'memo_', null, 22, 4); diff --git a/purchasing/view/view_grn.php b/purchasing/view/view_grn.php index 71b5d120..31126c97 100644 --- a/purchasing/view/view_grn.php +++ b/purchasing/view/view_grn.php @@ -36,7 +36,7 @@ display_grn_summary($purchase_order); display_heading2(_("Line Details")); -start_table("colspan=9 $table_style width=90%"); +start_table(TABLESTYLE, "colspan=9 width=90%"); $th = array(_("Item Code"), _("Item Description"), _("Delivery Date"), _("Quantity"), _("Unit"), _("Price"), _("Line Total"), _("Quantity Invoiced")); @@ -66,14 +66,25 @@ foreach ($purchase_order->line_items as $stock_item) $total += $line_total; } -$display_total = number_format2($total,user_price_dec()); -label_row(_("Total Excluding Tax/Shipping"), $display_total, - "colspan=6", "nowrap align=right"); +$display_sub_tot = number_format2($total,user_price_dec()); +label_row(_("Sub Total"), $display_sub_tot, + "align=right colspan=6", "nowrap align=right", 1); + +$taxes = $purchase_order->get_taxes(); +$tax_total = display_edit_tax_items($taxes, 6, $purchase_order->tax_included, 1); + +$display_total = price_format(($total + $tax_total)); + +start_row(); +label_cells(_("Amount Total"), $display_total, "colspan=6 align='right'","align='right'"); +label_cell(''); +end_row(); + end_table(1); is_voided_display(ST_SUPPRECEIVE, $_GET['trans_no'], _("This delivery has been voided.")); -end_page(true); +end_page(true, false, false, ST_SUPPRECEIVE, $_GET['trans_no']); ?> diff --git a/purchasing/view/view_po.php b/purchasing/view/view_po.php index 32bd576d..ef54291f 100644 --- a/purchasing/view/view_po.php +++ b/purchasing/view/view_po.php @@ -35,15 +35,15 @@ read_po($_GET['trans_no'], $purchase_order); echo "
"; display_po_summary($purchase_order, true); -start_table("$table_style width=90%", 6); +start_table(TABLESTYLE, "width=90%", 6); echo ""; // outer table display_heading2(_("Line Details")); -start_table("colspan=9 $table_style width=100%"); +start_table(TABLESTYLE, "colspan=9 width=100%"); $th = array(_("Item Code"), _("Item Description"), _("Quantity"), _("Unit"), _("Price"), - _("Line Total"), _("Requested By"), _("Quantity Received"), _("Quantity Invoiced")); + _("Requested By"), _("Line Total"), _("Quantity Received"), _("Quantity Invoiced")); table_header($th); $total = $k = 0; $overdue_items = false; @@ -71,8 +71,8 @@ foreach ($purchase_order->line_items as $stock_item) qty_cell($stock_item->quantity, false, $dec); label_cell($stock_item->units); amount_decimal_cell($stock_item->price); - amount_cell($line_total); label_cell($stock_item->req_del_date); + amount_cell($line_total); qty_cell($stock_item->qty_received, false, $dec); qty_cell($stock_item->qty_inv, false, $dec); end_row(); @@ -80,9 +80,19 @@ foreach ($purchase_order->line_items as $stock_item) $total += $line_total; } -$display_total = number_format2($total,user_price_dec()); -label_row(_("Total Excluding Tax/Shipping"), $display_total, - "align=right colspan=5", "nowrap align=right", 3); +$display_sub_tot = number_format2($total,user_price_dec()); +label_row(_("Sub Total"), $display_sub_tot, + "align=right colspan=6", "nowrap align=right",2); + +$taxes = $purchase_order->get_taxes(); +$tax_total = display_edit_tax_items($taxes, 6, $purchase_order->tax_included,2); + +$display_total = price_format(($total + $tax_total)); + +start_row(); +label_cells(_("Amount Total"), $display_total, "colspan=6 align='right'","align='right'"); +label_cell('', "colspan=2"); +end_row(); end_table(); @@ -101,7 +111,7 @@ if (db_num_rows($grns_result) > 0) echo ""; // outer table display_heading2(_("Deliveries")); - start_table($table_style); + start_table(TABLESTYLE); $th = array(_("#"), _("Reference"), _("Delivered On")); table_header($th); while ($myrow = db_fetch($grns_result)) @@ -126,7 +136,7 @@ if (db_num_rows($invoice_result) > 0) echo ""; // outer table display_heading2(_("Invoices/Credits")); - start_table($table_style); + start_table(TABLESTYLE); $th = array(_("#"), _("Date"), _("Total")); table_header($th); while ($myrow = db_fetch($invoice_result)) @@ -147,6 +157,6 @@ end_table(1); // outer table //---------------------------------------------------------------------------------------------------- -end_page(true); +end_page(true, false, false, ST_PURCHORDER, $_GET['trans_no']); ?> diff --git a/purchasing/view/view_supp_credit.php b/purchasing/view/view_supp_credit.php index c0d921ec..cdaeb3fe 100644 --- a/purchasing/view/view_supp_credit.php +++ b/purchasing/view/view_supp_credit.php @@ -31,14 +31,13 @@ elseif (isset($_POST["trans_no"])) $trans_no = $_POST["trans_no"]; } -$supp_trans = new supp_trans(); -$supp_trans->is_invoice = false; +$supp_trans = new supp_trans(ST_SUPPCREDIT); read_supp_invoice($trans_no, ST_SUPPCREDIT, $supp_trans); -display_heading(_("SUPPLIER CREDIT NOTE") . " # " . $trans_no); +display_heading("" . _("SUPPLIER CREDIT NOTE") . " # " . $trans_no . ""); echo "
"; -start_table($table_style2); +start_table(TABLESTYLE, "width=95%"); start_row(); label_cells(_("Supplier"), $supp_trans->supplier_name, "class='tableheader2'"); label_cells(_("Reference"), $supp_trans->reference, "class='tableheader2'"); @@ -57,14 +56,15 @@ $total_grn = display_grn_items($supp_trans, 2); $display_sub_tot = number_format2($total_gl+$total_grn,user_price_dec()); -start_table("$table_style width=95%"); +start_table(TABLESTYLE, "width=95%"); label_row(_("Sub Total"), $display_sub_tot, "align=right", "nowrap align=right width=17%"); $tax_items = get_trans_tax_details(ST_SUPPCREDIT, $trans_no); display_supp_trans_tax_details($tax_items, 1); $display_total = number_format2(-($supp_trans->ov_amount + $supp_trans->ov_gst),user_price_dec()); -label_row(_("TOTAL CREDIT NOTE"), $display_total, "colspan=1 align=right", "nowrap align=right"); +label_row("" . _("TOTAL CREDIT NOTE") . "$display_total", + "colspan=1 align=right", "nowrap align=right"); end_table(1); @@ -75,6 +75,6 @@ if (!$voided) display_allocations_from(PT_SUPPLIER, $supp_trans->supplier_id, ST_SUPPCREDIT, $trans_no, -($supp_trans->ov_amount + $supp_trans->ov_gst)); } -end_page(true); +end_page(true, false, false, ST_SUPPCREDIT, $trans_no); ?> \ No newline at end of file diff --git a/purchasing/view/view_supp_invoice.php b/purchasing/view/view_supp_invoice.php index ae97355f..b13ef416 100644 --- a/purchasing/view/view_supp_invoice.php +++ b/purchasing/view/view_supp_invoice.php @@ -31,8 +31,7 @@ elseif (isset($_POST["trans_no"])) $trans_no = $_POST["trans_no"]; } -$supp_trans = new supp_trans(); -$supp_trans->is_invoice = true; +$supp_trans = new supp_trans(ST_SUPPINVOICE); read_supp_invoice($trans_no, ST_SUPPINVOICE, $supp_trans); @@ -41,7 +40,7 @@ $supplier_curr_code = get_supplier_currency($supp_trans->supplier_id); display_heading(_("SUPPLIER INVOICE") . " # " . $trans_no); echo "
"; -start_table("$table_style width=95%"); +start_table(TABLESTYLE, "width=95%"); start_row(); label_cells(_("Supplier"), $supp_trans->supplier_name, "class='tableheader2'"); label_cells(_("Reference"), $supp_trans->reference, "class='tableheader2'"); @@ -62,7 +61,7 @@ $total_grn = display_grn_items($supp_trans, 2); $display_sub_tot = number_format2($total_gl+$total_grn,user_price_dec()); -start_table("width=95% $table_style"); +start_table(TABLESTYLE, "width=95%"); label_row(_("Sub Total"), $display_sub_tot, "align=right", "nowrap align=right width=15%"); $tax_items = get_trans_tax_details(ST_SUPPINVOICE, $trans_no); @@ -76,6 +75,6 @@ end_table(1); is_voided_display(ST_SUPPINVOICE, $trans_no, _("This invoice has been voided.")); -end_page(true); +end_page(true, false, false, ST_SUPPINVOICE, $trans_no); ?> \ No newline at end of file diff --git a/purchasing/view/view_supp_payment.php b/purchasing/view/view_supp_payment.php index 34fa9576..f37d0a77 100644 --- a/purchasing/view/view_supp_payment.php +++ b/purchasing/view/view_supp_payment.php @@ -47,7 +47,7 @@ echo "
"; display_heading(_("Payment to Supplier") . " #$trans_no"); echo "
"; -start_table("$table_style2 width=80%"); +start_table(TABLESTYLE2, "width=80%"); start_row(); label_cells(_("To Supplier"), $receipt['supplier_name'], "class='tableheader2'"); @@ -81,5 +81,5 @@ if (!$voided) display_allocations_from(PT_SUPPLIER, $receipt['supplier_id'], ST_SUPPAYMENT, $trans_no, -$receipt['Total']); } -end_page(true); +end_page(true, false, false, ST_SUPPAYMENT, $trans_no); ?> \ No newline at end of file diff --git a/reporting/fonts/LiberationSans-Regular.ttf b/reporting/fonts/LiberationSans-Regular.ttf new file mode 100644 index 0000000000000000000000000000000000000000..2de10634e06d48ae3c079deedfc6446a9d348fb1 GIT binary patch literal 138908 zcmcG$30zc1)+k=5?!Dc8S-P90*`d2>nw{>378FFdB48sbi=ZqbsECM0ki`W}#9eX2 z#F%J^8e@!GVrz`Sm_(8|Stg54_C=#+`?BchWHR|Oi8SxjZA_fZH~;s4zu$XTtE+D9 zb?Tf`XQ>MTLWm#!@Whs%Up8UFt(D&q8qtNhVPkXi^67ajq25#R-7vPeXwnZKecz4m zZxW(CId)Qc&V89H3-Ns!mSd?k<-bGLt|bKe@V##4UDI2{hJ9*6y!H~Jq%#+`8^%05 z<~u^dR}(@58d_%G)%LE*i4)k5<-+XgZ7n2-h}hqFY_FX?Z%ISiv^Nq7iTaYjsj|jd z)9ZhF_oW}P|4b}TYs3t7q3SVwZ^!qj#=F`VXEu4@cr=I*kM(nBwa$O`lRrH};L{O= z=&I&5&z$~)v>wOP_YxxH-!*-4i&Ck)fbAc|_J;Y>@0wL|@ft_q=5|6<U!I$xXi6Coi-ag6r~gB@t5PLY=UP^-!O2hpoAgOJzeoxE~8cGV5s zr<$#F;Jb=YmWvOzQ)am)k};}&SDoue)oi&ZcbWW4_puzh4@yZH*+c|vsU=oYMF_WB z=qETs!tu{Q50RSDEn!Bh6|dkH;OOcwuoyZhwPlg1E<7=NY0 zyRH(jE3@E49U*%ze~3tsA*{f9214mIlFM4q!x+-#aGHKdrtob<#1NniCk4V};(&Fe z5$i0+;KhX#BY%|CWBopSug3TcYm4=ZG4x`XjbS1ND~3`GjTq)&sKih=RKE}Vn8o^$ z<2F*J(vwGUEFQx_;Z@Rz;UG)%Uyy@}bTXU0W83F>oVlFehWUr(x~zOU%adbwyBcg~ z!8W@wUsP@;BE}XBNtizx`?;6R8H1L4k$CWJgI94aO*lWc_SHBBizl;ptP?(z-U6?Z z4e;vV+gRR>>24faJ!n_Ol+#)3Kc%-`8MTDZDy3fN>xO0Yfr9N+PL0d4|Qf z{;AmJ2dujeLk5NgI3E`)$8;N(B?(^A>p4u~Foa@o z@V#UcKb{oh_-F8a5r$&i=TO#Gag>Z03Izy#uZ_ThHGJz#y}_*-yJ49@=+5btsjPXCsVV|rj%hvUDC zu?pKVxNjPYS^D>YaKSMWF>m9)1hxllq?_#pTRWzw{9BCp$HvDw|EKsM|2>(Ek=AgWBpi?JuT1ZlPR2e*-x)Ld#lHKoj*J5g=NaDN+Qwqt#M^VdJr`V;n@=7l zc6xa562A9hz%c(8;AT6`xI=XoVOF5aFVQ3WRpp_#<%3L7)@e1%R{&v zRD4e?d^yg)A9+0D1zRTuC5~ZGbr4^b4(q&+bq--29T|@G*jjl(8d@`JJC|rM@1Sxf z3FF@-VxC3#9`nn|UM2Ra?80%&iA9Oy z%VYJEIczT2t`1=`g}tyrf`Re3D+qo7%bU&a6gtMkWK~G#k?&7LEhLe=WXHHJPD@DiH|&f8}dFjwhrfl zw8ZujdBM*J=eLy-@l>!ev5q_k#^bP0?ptz@8%MU>ri(wu2m_f;5NE4d!1gG>xC5Rq zS8I*CC>9S(ndc_cGcnBXJLIt zYZpZ%H_^IwE&td!L6lTQdw@3w^QNmrKLjr~*-1n~#ca~vTNvlW`1_wn6 zTn_87eDC15oRt`;WAGcsUWP�ZbA8XIcJ5{RA=QB4)fqx`=}0kb7V`+zW#=l)g$| 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

!dO-+`52pU`(Aw`Z6B1O12kQ~HmvlJ<}FpXfi; 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�oG*n`(Ju8he! z!kDv=dyM#ERypf1qntU_CveoLFXI%weA390Ma!H~nAgp$+-o?yk7U|1kDBvOj|9$W zCqz$rjM?Z$n}#Ijhf@k|hzQM1kVGq~$4SwWS;nXF$6RpM)FtPdV>DbcdpQn!^hJ&` zBpNf{N$Lq(gCk$YHZs29T|-l3hC?HIg5x-(ALeSN8u%wur9UKVfPAH*B-{sD*qB~DY8+F?33k^c~UPKC(X<>3Feu!5hsl75uj}) zZzPyAf@~4yitIp^$S&lEFel`jxgh(Q1%eEaujhX-_ru8i_-5XRk@Io-8~GlWgLxi* gLWVfAHTZOdPam{5-cR4j&m)7o*YWes=<4_W551S&&Hw-a literal 0 HcmV?d00001 diff --git a/reporting/forms/index.php b/reporting/forms/index.php new file mode 100644 index 00000000..763940a7 --- /dev/null +++ b/reporting/forms/index.php @@ -0,0 +1,3 @@ + diff --git a/reporting/includes/Workbook.php b/reporting/includes/Workbook.php index 56e4c483..5c8a32e8 100644 --- a/reporting/includes/Workbook.php +++ b/reporting/includes/Workbook.php @@ -4878,7 +4878,7 @@ class Spreadsheet_Excel_Writer_Worksheet extends Spreadsheet_Excel_Writer_BIFFwr */ function setInputEncoding($encoding) { - global $encoding_string; + global $encoding_string; if ($encoding != 'UTF-16LE' && !function_exists('iconv')) { die("Using an input encoding other than UTF-16LE requires PHP support for iconv"); } @@ -8265,6 +8265,8 @@ class Spreadsheet_Excel_Writer_Workbook extends Spreadsheet_Excel_Writer_BIFFwri */ function _storeSharedStringsTable() { + global $encoding_string; + $record = 0x00fc; // Record identifier // sizes are upside down $this->_block_sizes = array_reverse($this->_block_sizes); @@ -8287,7 +8289,7 @@ class Spreadsheet_Excel_Writer_Workbook extends Spreadsheet_Excel_Writer_BIFFwri foreach (array_keys($this->_str_table) as $string) { $string_length = strlen($string); - $encoding = 0; // assume there are no Unicode strings + $encoding = $encoding_string ? 1:0; // this is FA specific assumption $split_string = 0; // Block length is the total length of the strings that will be diff --git a/reporting/includes/class.graphic.inc b/reporting/includes/class.graphic.inc index c1133648..75e03519 100644 --- a/reporting/includes/class.graphic.inc +++ b/reporting/includes/class.graphic.inc @@ -147,11 +147,18 @@ class graph var $h3d = 15; // 3D height var $built_in = true; var $fontfile = ""; - + var $encoding; + function graph() { - $this->x = $this->y = $this->z = array(); + $this->encoding = $_SESSION['language']->encoding; + $path = dirname(__FILE__).'/../fonts/'; + // If you use utf-8 encoding you have to download and install FreeSans.ttf font. + // It is not bundled with application due to its size. + $this->fontfile = $this->encoding=='UTF-8' ? $path.'FreeSans.ttf' : $path.'LiberationSans-Regular.ttf'; + + $this->x = $this->y = $this->z = array(); $this->biggest_x = NULL; $this->biggest_y = NULL; $this->alternate_x = false; @@ -203,6 +210,8 @@ class graph } $this->sum_total = array_sum($this->y); + if ($this->sum_total == 0) + $this->sum_total = 1; $this->space_between_bars += ($this->graphic_2_exists == true) ? 10 : 0; $this->calculate_higher_value(); @@ -942,6 +951,14 @@ class graph { if ($alt && strlen($string) > 12) $string = substr($string, 0, 12); + + if ($this->encoding != 'UTF-8') { + if (function_exists('iconv')) + $string = iconv($this->encoding, 'UTF-8', $string); + else + $string = mb_convert_encoding($string, 'UTF-8', $this->encoding); + } + if ($this->built_in) { imagestring($img, $size, $x, $y + $alt, $string, $col); @@ -963,6 +980,7 @@ class graph // $angle = -15; //else $angle = 0; + imagettftext($img, $size, $angle, $x, $y + $alt, $col, $this->fontfile, $string); } } diff --git a/reporting/includes/class.mail.inc b/reporting/includes/class.mail.inc index 7e6be6f9..e5e0e67b 100644 --- a/reporting/includes/class.mail.inc +++ b/reporting/includes/class.mail.inc @@ -9,6 +9,23 @@ Homepage: http://www.danielkaefer.de Leave this header in this file! +------------------------------------------------------------------ + Updated: 2010-10-25 + Updated by: Michael Hahn (MPH) + + Problem: The Suhosin patch for PHP was blocking the email before it ever reached + the email server due to double line feeds (\n) in the header of the email. + Also, the body of the message was included in the header. This would also + trip the security measure everytime it spotted a double line feed. + Fix: Remove any double line feed from the header info and seperate the body of + the message from the header. + Other updates: I'm not sure about RFC compliance but, every other email I've look at had + certain information included in double quotes. More than likely to avoid + erroneous file naming. I tried to emulate this mindset. + Added line length and EOL char for file chunking. For some reason without + it there were extra line feeds in the chunked file. + + * Lots of fixes for FA */ class email @@ -21,11 +38,12 @@ class email var $header = ""; var $subject = ""; var $body = ""; - + var $charset = 'ISO-8859-1'; + function email($name, $mail) { $this->boundary = md5(uniqid(time())); - $this->header .= "From: $name <$mail>\n"; + $this->header = "From: $name <$mail>\n"; } function to($mail) @@ -55,15 +73,17 @@ class email function text($text) { - $this->body = "Content-Type: text/plain; charset=ISO-8859-1\n"; - $this->body .= "Content-Transfer-Encoding: 8bit\n\n"; + $this->body = "--$this->boundary\n"; + $this->body .= "Content-Type: text/plain; charset=\"{$this->charset}\"\n"; + $this->body .= "Content-Transfer-Encoding: 8bit\n"; $this->body .= $text."\n"; } function html($html) { - $this->body = "Content-Type: text/html; charset=ISO-8859-1\n"; - $this->body .= "Content-Transfer-Encoding: quoted-printable\n\n"; + $this->body = "--$this->boundary\n"; + $this->body .= "Content-Type: text/html; charset=\"{$this->charset}\"\n"; + $this->body .= "Content-Transfer-Encoding: quoted-printable\n"; $this->body .= "\n".$html."\n\n"; } @@ -110,11 +130,9 @@ class email } $this->header .= "\n"; } - $this->header .= "MIME-Version: 1.0\n"; - $this->header .= "Content-Type: multipart/mixed; boundary=$this->boundary\n\n"; - $this->header .= "This is a multi-part message in MIME format\n"; - $this->header .= "--$this->boundary\n"; - $this->header .= $this->body; + $this->header .= "MIME-Version: 1.0\n"; + $this->header .= "Content-Type: multipart/mixed;\n boundary=\"$this->boundary\"\n"; + $this->header .= "This is a multi-part message in MIME format.\n"; // Attachment hinzufügen $max = count($this->attachment); @@ -123,19 +141,19 @@ class email for ($i = 0; $i < $max; $i++) { $file = fread(fopen($this->attachment[$i], "r"), filesize($this->attachment[$i])); - $this->header .= "--".$this->boundary."\n"; - $this->header .= "Content-Type: " .$this->mime_type(basename($this->attachment[$i])). "; name=".basename($this->attachment[$i])."\n"; - $this->header .= "Content-Transfer-Encoding: base64\n"; - $this->header .= "Content-Disposition: attachment; filename=".basename($this->attachment[$i])."\n\n"; - $this->header .= chunk_split(base64_encode($file))."\n"; + $this->body .= "--".$this->boundary."\n"; + $this->body .= "Content-Type: " .$this->mime_type(basename($this->attachment[$i])). "; name=\"".basename($this->attachment[$i])."\"\n"; + $this->body .= "Content-Transfer-Encoding: base64\n"; + $this->body .= "Content-Disposition: attachment; filename=\"".basename($this->attachment[$i])."\"\n\n"; + $this->body .= chunk_split(base64_encode($file),"72","\n"); $file = ""; } } - $this->header .= "--".$this->boundary."--\n\n"; + $this->body .= "--".$this->boundary."--\n"; foreach($this->to as $mail) { - $ret = mail($mail, $this->subject, "", $this->header); + $ret = mail($mail, $this->subject, $this->body, $this->header); } return $ret; } diff --git a/reporting/includes/class.pdf.inc b/reporting/includes/class.pdf.inc index 778459dc..44b62b43 100644 --- a/reporting/includes/class.pdf.inc +++ b/reporting/includes/class.pdf.inc @@ -59,29 +59,71 @@ define("K_RE_PATTERN_ARABIC", "/( )/x"); include_once (dirname(__FILE__).'/tcpdf.php'); +include_once (dirname(__FILE__).'/fpdi/fpdi.php'); -class Cpdf extends TCPDF { +class Cpdf extends FPDI { - function Cpdf($pageSize='A4', $l=array(), $pageOrientation='P') + function Cpdf($pageSize='A4', $lang=null, $pageOrientation='P') { + $this->TCPDF($pageOrientation, 'pt', $pageSize);//, $uni, $enc); + $this->SetLang($lang); + $this->setPrintHeader(false); + $this->setPrintFooter(false); + $this->setPDFVersion("1.3"); + $this->setAutoPageBreak(0); + $this->SetLineWidth(1); + $this->cMargin = 0; + } + /* + Set lamguage for next report + */ + function SetLang($code=null) + { + global $installed_languages, $dflt_lang, $path_to_root, $local_path_to_root; + + if (!$code) + $code = $dflt_lang; + + $lang = array_search_value($code, $installed_languages, 'code'); + $_SESSION['get_text']->set_language($lang['code'], strtoupper($lang['encoding'])); + + // $local_path_to_root is set inside find_custom_file. + // Select extension domain if po file is provided + // otherwise use global translation. + if (file_exists($local_path_to_root.'/lang/'.$lang['code'].'/LC_MESSAGES/'.$lang['code'].'.po')) + $_SESSION['get_text']->add_domain($lang['code'], $local_path_to_root . "/lang"); + else + $_SESSION['get_text']->add_domain($lang['code'], $path_to_root . "/lang", @$lang['version']); + // re-read translated sys names. + include($path_to_root.'/includes/sysnames.inc'); + + $l = array('a_meta_charset' => strtoupper($lang['encoding']), + 'a_meta_dir' => @$lang['rtl'] ? 'rtl' : 'ltr', + 'a_meta_language' => $code, 'w_page' => 'page'); + if (!isset($l['a_meta_charset'])) $l = array('a_meta_charset' => 'ISO-8859-1', 'a_meta_dir' => 'ltr', 'a_meta_language' => 'en_GB', 'w_page' => 'page'); $enc = $l['a_meta_charset']; $uni = ($enc == 'UTF-8' || $enc == 'GB2312' ? true : false); if ($uni) ini_set("memory_limit", "48M"); - $this->TCPDF($pageOrientation, 'pt', $pageSize, $uni, $enc); + + $this->isunicode = $uni; $this->setLanguageArray($l); - $this->setPrintHeader(false); - $this->setPrintFooter(false); - $this->setPDFVersion("1.3"); - $this->setAutoPageBreak(0); - $this->AddPage(); + if ($uni) + { + global $unicode, $unicode_mirror, $unicode_arlet, $laa_array, $diacritics; + include_once(dirname(__FILE__)."/unicode_data2.php"); + } + $this->encoding = strtoupper($lang['encoding']); - $this->SetLineWidth(1); - $this->cMargin = 0; + $this->FontFamily = 'helvetica'; + $this->FontStyle = ''; + $this->FontSizePt = 12; +// $this->utf8Bidi(array("")); } + // $fontname should be a standard PDF font (like 'times', 'helvetica' or 'courier') // or one that's been installed on your system. An empty string can also be used // which will retain the font currently in use. @@ -172,24 +214,9 @@ class Cpdf extends TCPDF { function addInfo($label,$value) { - if($label=='Title') - { - $this->SetTitle($value); - } - if ($label=='Subject') - { - $this->SetSubject($value); - } - if($label=='Creator') - { - // The Creator info in source is not exactly it should be ;) - $value = str_replace( "ros.co.nz", "tcpdf.org", $value ); - $value = str_replace( "R&OS", "", $value ); - $this->SetCreator( $value ); - } - if($label=='Author') - { - $this->SetAuthor($value); + if (in_array($label, array( 'Title', 'Subject', 'Author', 'Creator'))) { + $seter = "Set{$label}"; + $this->$seter($value); } } @@ -224,14 +251,14 @@ class Cpdf extends TCPDF { * nSeg is not allowed to be less than 2, as this will simply draw a line (and will even draw a * pretty crappy shape at 2, as we are approximating with bezier curves. */ - function ellipse($x0,$y0,$r1,$r2=0,$angle=0,$nSeg=8,$astart=0,$afinish=360,$close=1,$fill=0) + function ellipse($x0,$y0,$r1,$r2=0,$angle=0,$nSeg=8,$astart=0,$afinish=360,$close=1,$fill=0, $dummy=null) { parent::Ellipse($x0, $y0, $r1, $r2, $angle, $astart. $afinish, ($close?'C':''), "", "", $nSeg); } - function Stream() + function Stream($fname='') { - parent::Output('', 'I'); + parent::Output($fname, 'I'); } function calcTextWrap($txt, $width, $spacebreak=false) diff --git a/reporting/includes/doctext.inc b/reporting/includes/doctext.inc index 6d957d11..4f52bd2c 100644 --- a/reporting/includes/doctext.inc +++ b/reporting/includes/doctext.inc @@ -140,6 +140,7 @@ if (isset($header2type) || isset($linetype)) } if (isset($linetype)) { + if ($doctype == ST_SALESQUOTE || $doctype == ST_PURCHORDER || $doctype == ST_SALESORDER || $doctype == ST_SALESINVOICE || $doctype == ST_CUSTCREDIT || $doctype == ST_CUSTDELIVERY) { @@ -150,10 +151,10 @@ if (isset($linetype)) $doc_TOTAL_INVOICE = $doctype ==ST_SALESINVOICE ? _("TOTAL INVOICE") : _("TOTAL CREDIT"); $doc_TOTAL_ORDER = _("TOTAL ORDER EX VAT"); $doc_TOTAL_ORDER2 = _("TOTAL ORDER VAT INCL."); - $doc_TOTAL_PO = _("TOTAL PO EX VAT"); + $doc_TOTAL_PO = _("TOTAL PO"); $doc_TOTAL_DELIVERY = _("TOTAL DELIVERY INCL. VAT"); } - elseif ($doctype == ST_SUPPAYMENT || ST_CUSTPAYMENT) + elseif ($doctype == ST_SUPPAYMENT || $doctype == ST_CUSTPAYMENT) { $doc_Towards = _("As advance / full / part / payment towards:"); $doc_by_Cheque = _("By Cash / Cheque* / Draft No."); @@ -179,4 +180,4 @@ if (isset($linetype)) $doc_Over = _("Over"); } } -?> \ No newline at end of file +?> diff --git a/reporting/includes/excel_report.inc b/reporting/includes/excel_report.inc index c24c09a5..996d290c 100644 --- a/reporting/includes/excel_report.inc +++ b/reporting/includes/excel_report.inc @@ -11,6 +11,7 @@ ***********************************************************************/ include_once($path_to_root . "/reporting/includes/Workbook.php"); include_once($path_to_root . "/admin/db/company_db.inc"); +include_once($path_to_root . "/admin/db/fiscalyears_db.inc"); include_once($path_to_root . "/config.php"); // xls version class FrontReport extends Spreadsheet_Excel_Writer_Workbook @@ -28,6 +29,8 @@ class FrontReport extends Spreadsheet_Excel_Writer_Workbook var $bottomMargin = 0; var $lineHeight; var $leftMargin = 0; + var $pageWidth; // dummy + var $rightMargin; // dummy var $cols; var $params; @@ -52,12 +55,13 @@ class FrontReport extends Spreadsheet_Excel_Writer_Workbook var $formatHeaderRight; var $formatFooter; var $formatAmount = array(); + var $headerFunc; var $sheet; function FrontReport($title, $filename, $size = 'A4', $fontsize = 9, $orientation = 'P', $margins = NULL, $excelColWidthFactor = 6.5) { - global $comp_path, $dateseps, $page_security; + global $dateseps, $page_security; if (!$_SESSION["wa_current_user"]->can_access_page($page_security)) { display_error(_("The security settings on your account do not permit you to print this report")); @@ -68,7 +72,7 @@ class FrontReport extends Spreadsheet_Excel_Writer_Workbook $this->title = $title; $this->lineHeight = 12; $this->endLine = 760; - $this->fontSize = $fontsize; + $this->SetFontSize($fontsize); $this->oldFontSize = 0; $this->y = 0; $this->currency = ''; @@ -77,7 +81,7 @@ class FrontReport extends Spreadsheet_Excel_Writer_Workbook $this->code = strtolower($_SESSION['language']->encoding); $this->filename = $filename.".xls"; $this->unique_name = uniqid('').".xls"; - $this->path = $comp_path.'/'.user_company(). '/pdf_files'; + $this->path = company_path(). '/pdf_files'; $this->Spreadsheet_Excel_Writer_Workbook($this->path."/".$this->unique_name); //$this->setCountry(48); if ($this->code != "iso-8859-1") @@ -165,9 +169,16 @@ class FrontReport extends Spreadsheet_Excel_Writer_Workbook $this->formatFooter =& $this->addFormat(); $this->formatFooter->setTop(2); $this->formatFooter->setTopColor('gray'); + $this->SetHeaderType("header"); } + /* + Set header handler + */ + function SetHeaderType($name) { + $this->headerFunc = $name; + } // Check a given name to see if it's a valid Excel worksheet name, // and fix if necessary function worksheetNameGenerator($name) @@ -205,6 +216,11 @@ class FrontReport extends Spreadsheet_Excel_Writer_Workbook function Font($fontname = '', $style = 'normal') { } + + function SetFontSize($size) + { + $this->fontSize = $size; + } function Info($params, $cols, $headers, $aligns, $cols2 = null, $headers2 = null, $aligns2 = null) @@ -549,7 +565,7 @@ class FrontReport extends Spreadsheet_Excel_Writer_Workbook { if (!$conv) $txt = date2sql($txt); - list($year, $mo, $day) = explode("-", $txt); + list($year, $mo, $day) = explode("-", $txt); $date = $this->ymd2date((int)$year, (int)$mo, (int)$day); $this->sheet->writeNumber($this->y, $c, $date, $this->formatDate); } @@ -630,7 +646,13 @@ class FrontReport extends Spreadsheet_Excel_Writer_Workbook { $this->y += $l; } - + + function NewPage() + { + if (method_exists($this, $this->headerFunc)) // draw predefined page layout if any + $this->{$this->headerFunc}(); + } + function ymd2Date($year, $mon, $day) // XLS internal date representation is a number between 1900-01-01 and 2078-12-31 { // if we need the time part too, we have to add this value after a decimalpoint. $mo = array(0,31,28,31,30,31,30,31,31,30,31,30,31); @@ -673,6 +695,7 @@ class FrontReport extends Spreadsheet_Excel_Writer_Workbook function End($email=0, $subject=null, $myrow=null, $doctype = 0) { + ++$this->y; for ($i = 0; $i < $this->numcols; $i++) $this->sheet->writeBlank($this->y, $i, $this->formatFooter); $this->sheet->mergeCells($this->y, 0, $this->y, $this->numcols - 1); diff --git a/reporting/includes/fpdi/decoders/ASCII85Decode.php b/reporting/includes/fpdi/decoders/ASCII85Decode.php new file mode 100644 index 00000000..1f9492c1 --- /dev/null +++ b/reporting/includes/fpdi/decoders/ASCII85Decode.php @@ -0,0 +1,95 @@ +fpdi =& $fpdi; + } + + + function decode($in) { + $out = ""; + $state = 0; + $chn = null; + + $l = strlen($in); + + for ($k = 0; $k < $l; ++$k) { + $ch = ord($in[$k]) & 0xff; + + if ($ch == ORD_tilde) { + break; + } + if (preg_match("/^\s$/",chr($ch))) { + continue; + } + if ($ch == ORD_z && $state == 0) { + $out .= chr(0).chr(0).chr(0).chr(0); + continue; + } + if ($ch < ORD_exclmark || $ch > ORD_u) { + $this->fpdi->error("Illegal character in ASCII85Decode."); + } + + $chn[$state++] = $ch - ORD_exclmark; + + if ($state == 5) { + $state = 0; + $r = 0; + for ($j = 0; $j < 5; ++$j) + $r = $r * 85 + $chn[$j]; + $out .= chr($r >> 24); + $out .= chr($r >> 16); + $out .= chr($r >> 8); + $out .= chr($r); + } + } + $r = 0; + + if ($state == 1) + $this->fpdi->error("Illegal length in ASCII85Decode."); + if ($state == 2) { + $r = $chn[0] * 85 * 85 * 85 * 85 + ($chn[1]+1) * 85 * 85 * 85; + $out .= chr($r >> 24); + } + else if ($state == 3) { + $r = $chn[0] * 85 * 85 * 85 * 85 + $chn[1] * 85 * 85 * 85 + ($chn[2]+1) * 85 * 85; + $out .= chr($r >> 24); + $out .= chr($r >> 16); + } + else if ($state == 4) { + $r = $chn[0] * 85 * 85 * 85 * 85 + $chn[1] * 85 * 85 * 85 + $chn[2] * 85 * 85 + ($chn[3]+1) * 85 ; + $out .= chr($r >> 24); + $out .= chr($r >> 16); + $out .= chr($r >> 8); + } + + return $out; + } +} \ No newline at end of file diff --git a/reporting/includes/fpdi/decoders/LZWDecode.php b/reporting/includes/fpdi/decoders/LZWDecode.php new file mode 100644 index 00000000..59d1b487 --- /dev/null +++ b/reporting/includes/fpdi/decoders/LZWDecode.php @@ -0,0 +1,147 @@ +fpdi =& $fpdi; + } + + /** + * Method to decode LZW compressed data. + * + * @param string data The compressed data. + */ + function decode($data) { + + if($data[0] == 0x00 && $data[1] == 0x01) { + $this->fpdi->error("LZW flavour not supported."); + } + + $this->initsTable(); + + $this->data = $data; + + // Initialize pointers + $this->bytePointer = 0; + $this->bitPointer = 0; + + $this->nextData = 0; + $this->nextBits = 0; + + $oldCode = 0; + + $string = ""; + $uncompData = ""; + + while (($code = $this->getNextCode()) != 257) { + if ($code == 256) { + $this->initsTable(); + $code = $this->getNextCode(); + + if ($code == 257) { + break; + } + + $uncompData .= $this->sTable[$code]; + $oldCode = $code; + + } else { + + if ($code < $this->tIdx) { + $string = $this->sTable[$code]; + $uncompData .= $string; + + $this->addStringToTable($this->sTable[$oldCode], $string[0]); + $oldCode = $code; + } else { + $string = $this->sTable[$oldCode]; + $string = $string.$string[0]; + $uncompData .= $string; + + $this->addStringToTable($string); + $oldCode = $code; + } + } + } + + return $uncompData; + } + + + /** + * Initialize the string table. + */ + function initsTable() { + $this->sTable = array(); + + for ($i = 0; $i < 256; $i++) + $this->sTable[$i] = chr($i); + + $this->tIdx = 258; + $this->bitsToGet = 9; + } + + /** + * Add a new string to the string table. + */ + function addStringToTable ($oldString, $newString="") { + $string = $oldString.$newString; + + // Add this new String to the table + $this->sTable[$this->tIdx++] = $string; + + if ($this->tIdx == 511) { + $this->bitsToGet = 10; + } else if ($this->tIdx == 1023) { + $this->bitsToGet = 11; + } else if ($this->tIdx == 2047) { + $this->bitsToGet = 12; + } + } + + // Returns the next 9, 10, 11 or 12 bits + function getNextCode() { + if ($this->bytePointer == strlen($this->data)) + return 257; + + $this->nextData = ($this->nextData << 8) | (ord($this->data[$this->bytePointer++]) & 0xff); + $this->nextBits += 8; + + if ($this->nextBits < $this->bitsToGet) { + $this->nextData = ($this->nextData << 8) | (ord($this->data[$this->bytePointer++]) & 0xff); + $this->nextBits += 8; + } + + $code = ($this->nextData >> ($this->nextBits - $this->bitsToGet)) & $this->andTable[$this->bitsToGet-9]; + $this->nextBits -= $this->bitsToGet; + + return $code; + } +} \ No newline at end of file diff --git a/reporting/includes/fpdi/fpdf_tpl.php b/reporting/includes/fpdi/fpdf_tpl.php new file mode 100644 index 00000000..8189953a --- /dev/null +++ b/reporting/includes/fpdi/fpdf_tpl.php @@ -0,0 +1,409 @@ +page <= 0) + $this->error("You have to add a page to fpdf first!"); + + if ($x == null) + $x = 0; + if ($y == null) + $y = 0; + if ($w == null) + $w = $this->w; + if ($h == null) + $h = $this->h; + + // Save settings + $this->tpl++; + $tpl =& $this->tpls[$this->tpl]; + $tpl = array( + 'o_x' => $this->x, + 'o_y' => $this->y, + 'o_AutoPageBreak' => $this->AutoPageBreak, + 'o_bMargin' => $this->bMargin, + 'o_tMargin' => $this->tMargin, + 'o_lMargin' => $this->lMargin, + 'o_rMargin' => $this->rMargin, + 'o_h' => $this->h, + 'o_w' => $this->w, + 'buffer' => '', + 'x' => $x, + 'y' => $y, + 'w' => $w, + 'h' => $h + ); + + $this->SetAutoPageBreak(false); + + // Define own high and width to calculate possitions correct + $this->h = $h; + $this->w = $w; + + $this->_intpl = true; + $this->SetXY($x+$this->lMargin, $y+$this->tMargin); + $this->SetRightMargin($this->w-$w+$this->rMargin); + + return $this->tpl; + } + + /** + * End Template + * + * This method ends a template and reset initiated variables on beginTemplate. + * + * @return mixed If a template is opened, the ID is returned. If not a false is returned. + */ + function endTemplate() { + if ($this->_intpl) { + $this->_intpl = false; + $tpl =& $this->tpls[$this->tpl]; + $this->SetXY($tpl['o_x'], $tpl['o_y']); + $this->tMargin = $tpl['o_tMargin']; + $this->lMargin = $tpl['o_lMargin']; + $this->rMargin = $tpl['o_rMargin']; + $this->h = $tpl['o_h']; + $this->w = $tpl['o_w']; + $this->SetAutoPageBreak($tpl['o_AutoPageBreak'], $tpl['o_bMargin']); + + return $this->tpl; + } else { + return false; + } + } + + /** + * Use a Template in current Page or other Template + * + * You can use a template in a page or in another template. + * You can give the used template a new size like you use the Image()-method. + * All parameters are optional. The width or height is calculated automaticaly + * if one is given. If no parameter is given the origin size as defined in + * beginTemplate() is used. + * The calculated or used width and height are returned as an array. + * + * @param int $tplidx A valid template-Id + * @param int $_x The x-position + * @param int $_y The y-position + * @param int $_w The new width of the template + * @param int $_h The new height of the template + * @retrun array The height and width of the template + */ + function useTemplate($tplidx, $_x=null, $_y=null, $_w=0, $_h=0) { + if ($this->page <= 0) + $this->error("You have to add a page to fpdf first!"); + + if (!isset($this->tpls[$tplidx])) + $this->error("Template does not exist!"); + + if ($this->_intpl) { + $this->_res['tpl'][$this->tpl]['tpls'][$tplidx] =& $this->tpls[$tplidx]; + } + + $tpl =& $this->tpls[$tplidx]; + $w = $tpl['w']; + $h = $tpl['h']; + + if ($_x == null) + $_x = 0; + if ($_y == null) + $_y = 0; + + $_x += $tpl['x']; + $_y += $tpl['y']; + + $wh = $this->getTemplateSize($tplidx, $_w, $_h); + $_w = $wh['w']; + $_h = $wh['h']; + + $tData = array( + 'x' => $this->x, + 'y' => $this->y, + 'w' => $_w, + 'h' => $_h, + 'scaleX' => ($_w/$w), + 'scaleY' => ($_h/$h), + 'tx' => $_x, + 'ty' => ($this->h-$_y-$_h), + 'lty' => ($this->h-$_y-$_h) - ($this->h-$h) * ($_h/$h) + ); + + $this->_out(sprintf("q %.4F 0 0 %.4F %.4F %.4F cm", $tData['scaleX'], $tData['scaleY'], $tData['tx']*$this->k, $tData['ty']*$this->k)); // Translate + $this->_out(sprintf('%s%d Do Q', $this->tplprefix, $tplidx)); + + $this->lastUsedTemplateData = $tData; + + return array("w" => $_w, "h" => $_h); + } + + /** + * Get The calculated Size of a Template + * + * If one size is given, this method calculates the other one. + * + * @param int $tplidx A valid template-Id + * @param int $_w The width of the template + * @param int $_h The height of the template + * @return array The height and width of the template + */ + function getTemplateSize($tplidx, $_w=0, $_h=0) { + if (!$this->tpls[$tplidx]) + return false; + + $tpl =& $this->tpls[$tplidx]; + $w = $tpl['w']; + $h = $tpl['h']; + + if ($_w == 0 and $_h == 0) { + $_w = $w; + $_h = $h; + } + + if($_w==0) + $_w = $_h*$w/$h; + if($_h==0) + $_h = $_w*$h/$w; + + return array("w" => $_w, "h" => $_h); + } + + /** + * See FPDF/TCPDF-Documentation ;-) + */ + function SetFont($family, $style='', $size=0, $fontfile='') { + if (!is_subclass_of($this, 'TCPDF') && func_num_args() > 3) { + $this->Error('More than 3 arguments for the SetFont method are only available in TCPDF.'); + } + /** + * force the resetting of font changes in a template + */ + if ($this->_intpl) + $this->FontFamily = ''; + + parent::SetFont($family, $style, $size, $fontfile); + + $fontkey = $this->FontFamily.$this->FontStyle; + + if ($this->_intpl) { + $this->_res['tpl'][$this->tpl]['fonts'][$fontkey] =& $this->fonts[$fontkey]; + } else { + $this->_res['page'][$this->page]['fonts'][$fontkey] =& $this->fonts[$fontkey]; + } + } + + /** + * See FPDF/TCPDF-Documentation ;-) + */ + function Image($file, $x, $y, $w=0, $h=0, $type='', $link='', $align='', $resize=false, $dpi=300, $palign='', $ismask=false, $imgmask=false, $border=0, $fitbox = false, $hidden = false) { + if (!is_subclass_of($this, 'TCPDF') && func_num_args() > 7) { + $this->Error('More than 7 arguments for the Image method are only available in TCPDF.'); + } + + parent::Image($file, $x, $y, $w, $h, $type, $link, $align, $resize, $dpi, $palign, $ismask, $imgmask, $border, $fitbox, $hidden); + if ($this->_intpl) { + $this->_res['tpl'][$this->tpl]['images'][$file] =& $this->images[$file]; + } else { + $this->_res['page'][$this->page]['images'][$file] =& $this->images[$file]; + } + } + + /** + * See FPDF-Documentation ;-) + * + * AddPage is not available when you're "in" a template. + */ + function AddPage($orientation='', $format='') { + if ($this->_intpl) + $this->Error('Adding pages in templates isn\'t possible!'); + parent::AddPage($orientation, $format); + } + + /** + * Preserve adding Links in Templates ...won't work + */ + function Link($x, $y, $w, $h, $link, $spaces=0) { + if (!is_subclass_of($this, 'TCPDF') && func_num_args() > 5) { + $this->Error('More than 5 arguments for the Image method are only available in TCPDF.'); + } + + if ($this->_intpl) + $this->Error('Using links in templates aren\'t possible!'); + parent::Link($x, $y, $w, $h, $link, $spaces); + } + + function AddLink() { + if ($this->_intpl) + $this->Error('Adding links in templates aren\'t possible!'); + return parent::AddLink(); + } + + function SetLink($link, $y=0, $page=-1) { + if ($this->_intpl) + $this->Error('Setting links in templates aren\'t possible!'); + parent::SetLink($link, $y, $page); + } + + /** + * Private Method that writes the form xobjects + */ + function _putformxobjects() { + $filter=($this->compress) ? '/Filter /FlateDecode ' : ''; + reset($this->tpls); + foreach($this->tpls AS $tplidx => $tpl) { + + $p=($this->compress) ? gzcompress($tpl['buffer']) : $tpl['buffer']; + $this->_newobj(); + $this->tpls[$tplidx]['n'] = $this->n; + $this->_out('<<'.$filter.'/Type /XObject'); + $this->_out('/Subtype /Form'); + $this->_out('/FormType 1'); + $this->_out(sprintf('/BBox [%.2F %.2F %.2F %.2F]', + // llx + $tpl['x']*$this->k, + // lly + -$tpl['y']*$this->k, + // urx + ($tpl['w']+$tpl['x'])*$this->k, + // ury + ($tpl['h']-$tpl['y'])*$this->k + )); + + if ($tpl['x'] != 0 || $tpl['y'] != 0) { + $this->_out(sprintf('/Matrix [1 0 0 1 %.5F %.5F]', + -$tpl['x']*$this->k*2, $tpl['y']*$this->k*2 + )); + } + + $this->_out('/Resources '); + + $this->_out('<_res['tpl'][$tplidx]['fonts']) && count($this->_res['tpl'][$tplidx]['fonts'])) { + $this->_out('/Font <<'); + foreach($this->_res['tpl'][$tplidx]['fonts'] as $font) + $this->_out('/F'.$font['i'].' '.$font['n'].' 0 R'); + $this->_out('>>'); + } + if(isset($this->_res['tpl'][$tplidx]['images']) && count($this->_res['tpl'][$tplidx]['images']) || + isset($this->_res['tpl'][$tplidx]['tpls']) && count($this->_res['tpl'][$tplidx]['tpls'])) + { + $this->_out('/XObject <<'); + if (isset($this->_res['tpl'][$tplidx]['images']) && count($this->_res['tpl'][$tplidx]['images'])) { + foreach($this->_res['tpl'][$tplidx]['images'] as $image) + $this->_out('/I'.$image['i'].' '.$image['n'].' 0 R'); + } + if (isset($this->_res['tpl'][$tplidx]['tpls']) && count($this->_res['tpl'][$tplidx]['tpls'])) { + foreach($this->_res['tpl'][$tplidx]['tpls'] as $i => $tpl) + $this->_out($this->tplprefix.$i.' '.$tpl['n'].' 0 R'); + } + $this->_out('>>'); + } + $this->_out('>>'); + + $this->_out('/Length '.strlen($p).' >>'); + $this->_putstream($p); + $this->_out('endobj'); + } + } + + /** + * Overwritten to add _putformxobjects() after _putimages() + * + */ + function _putimages() { + parent::_putimages(); + $this->_putformxobjects(); + } + + function _putxobjectdict() { + parent::_putxobjectdict(); + + if (count($this->tpls)) { + foreach($this->tpls as $tplidx => $tpl) { + $this->_out(sprintf('%s%d %d 0 R', $this->tplprefix, $tplidx, $tpl['n'])); + } + } + } + + /** + * Private Method + */ + function _out($s) { + if ($this->state==2 && $this->_intpl) { + $this->tpls[$this->tpl]['buffer'] .= $s."\n"; + } else { + parent::_out($s); + } + } +} diff --git a/reporting/includes/fpdi/fpdi.php b/reporting/includes/fpdi/fpdi.php new file mode 100644 index 00000000..4b78389d --- /dev/null +++ b/reporting/includes/fpdi/fpdi.php @@ -0,0 +1,500 @@ +current_filename = $filename; + $fn =& $this->current_filename; + + if (!isset($this->parsers[$fn])) + $this->parsers[$fn] = new fpdi_pdf_parser($fn,$this); + $this->current_parser =& $this->parsers[$fn]; + + return $this->parsers[$fn]->getPageCount(); + } + + /** + * Import a page + * + * @param int $pageno pagenumber + * @return int Index of imported page - to use with fpdf_tpl::useTemplate() + */ + function importPage($pageno, $boxName='/CropBox') { + if ($this->_intpl) { + return $this->error("Please import the desired pages before creating a new template."); + } + + $fn =& $this->current_filename; + + // check if page already imported + $pageKey = $fn.((int)$pageno).$boxName; + if (isset($this->_importedPages[$pageKey])) + return $this->_importedPages[$pageKey]; + + $parser =& $this->parsers[$fn]; + $parser->setPageno($pageno); + + $this->tpl++; + $this->tpls[$this->tpl] = array(); + $tpl =& $this->tpls[$this->tpl]; + $tpl['parser'] =& $parser; + $tpl['resources'] = $parser->getPageResources(); + $tpl['buffer'] = $parser->getContent(); + + if (!in_array($boxName, $parser->availableBoxes)) + return $this->Error(sprintf("Unknown box: %s", $boxName)); + $pageboxes = $parser->getPageBoxes($pageno); + + /** + * MediaBox + * CropBox: Default -> MediaBox + * BleedBox: Default -> CropBox + * TrimBox: Default -> CropBox + * ArtBox: Default -> CropBox + */ + if (!isset($pageboxes[$boxName]) && ($boxName == "/BleedBox" || $boxName == "/TrimBox" || $boxName == "/ArtBox")) + $boxName = "/CropBox"; + if (!isset($pageboxes[$boxName]) && $boxName == "/CropBox") + $boxName = "/MediaBox"; + + if (!isset($pageboxes[$boxName])) + return false; + $this->lastUsedPageBox = $boxName; + + $box = $pageboxes[$boxName]; + $tpl['box'] = $box; + + // To build an array that can be used by PDF_TPL::useTemplate() + $this->tpls[$this->tpl] = array_merge($this->tpls[$this->tpl],$box); + // An imported page will start at 0,0 everytime. Translation will be set in _putformxobjects() + $tpl['x'] = 0; + $tpl['y'] = 0; + + $page =& $parser->pages[$parser->pageno]; + + // fix for rotated pages + $rotation = $parser->getPageRotation($pageno); + if (isset($rotation[1]) && ($angle = $rotation[1] % 360) != 0) { + $steps = $angle / 90; + + $_w = $tpl['w']; + $_h = $tpl['h']; + $tpl['w'] = $steps % 2 == 0 ? $_w : $_h; + $tpl['h'] = $steps % 2 == 0 ? $_h : $_w; + + if ($steps % 2 != 0) { + $x = $y = ($steps == 1 || $steps == -3) ? $tpl['h'] : $tpl['w']; + } else { + $x = $tpl['w']; + $y = $tpl['h']; + } + + $cx=($x/2+$tpl['box']['x'])*$this->k; + $cy=($y/2+$tpl['box']['y'])*$this->k; + + $angle*=-1; + + $angle*=M_PI/180; + $c=cos($angle); + $s=sin($angle); + + $tpl['buffer'] = sprintf('q %.5f %.5f %.5f %.5f %.2f %.2f cm 1 0 0 1 %.2f %.2f cm %s Q',$c,$s,-$s,$c,$cx,$cy,-$cx,-$cy, $tpl['buffer']); + } + + $this->_importedPages[$pageKey] = $this->tpl; + + return $this->tpl; + } + + function getLastUsedPageBox() { + return $this->lastUsedPageBox; + } + + function useTemplate($tplidx, $_x=null, $_y=null, $_w=0, $_h=0) { + $this->_out('q 0 J 1 w 0 j 0 G 0 g'); // reset standard values + $s = parent::useTemplate($tplidx, $_x, $_y, $_w, $_h); + $this->_out('Q'); + return $s; + } + + /** + * Private method, that rebuilds all needed objects of source files + */ + function _putimportedobjects() { + if (is_array($this->parsers) && count($this->parsers) > 0) { + foreach($this->parsers AS $filename => $p) { + $this->current_parser =& $this->parsers[$filename]; + if (isset($this->_obj_stack[$filename]) && is_array($this->_obj_stack[$filename])) { + while($n = key($this->_obj_stack[$filename])) { + $nObj = $this->current_parser->pdf_resolve_object($this->current_parser->c,$this->_obj_stack[$filename][$n][1]); + + $this->_newobj($this->_obj_stack[$filename][$n][0]); + + if ($nObj[0] == PDF_TYPE_STREAM) { + $this->pdf_write_value ($nObj); + } else { + $this->pdf_write_value ($nObj[1]); + } + + $this->_out('endobj'); + $this->_obj_stack[$filename][$n] = null; // free memory + unset($this->_obj_stack[$filename][$n]); + reset($this->_obj_stack[$filename]); + } + } + } + } + } + + /** + * Put resources + */ + function _putresources() { + if (!is_subclass_of($this, 'TCPDF')) { + $this->_putfonts(); + $this->_putimages(); + $this->_putformxobjects(); + $this->_putimportedobjects(); + //Resource dictionary + $this->offsets[2]=strlen($this->buffer); + $this->_out('2 0 obj'); + $this->_out('<<'); + $this->_putresourcedict(); + $this->_out('>>'); + $this->_out('endobj'); + + } else { // TCPDF - Part + $this->_putextgstates(); + $this->_putocg(); + $this->_putfonts(); + $this->_putimages(); + $this->_putshaders(); + $this->_putformxobjects(); + $this->_putimportedobjects(); + //Resource dictionary + $this->offsets[2]=strlen($this->buffer); + $this->_out('2 0 obj'); + $this->_out('<<'); + $this->_putresourcedict(); + $this->_out('>>'); + $this->_out('endobj'); + $this->_putjavascript(); + $this->_putbookmarks(); + // encryption + if ($this->encrypted) { + $this->_newobj(); + $this->enc_obj_id = $this->n; + $this->_out('<<'); + $this->_putencryption(); + $this->_out('>>'); + $this->_out('endobj'); + } + } + } + + /** + * Private Method that writes the form xobjects + */ + function _putformxobjects() { + $filter=($this->compress) ? '/Filter /FlateDecode ' : ''; + reset($this->tpls); + foreach($this->tpls AS $tplidx => $tpl) { + $p=($this->compress) ? gzcompress($tpl['buffer']) : $tpl['buffer']; + $this->_newobj(); + $cN = $this->n; // TCPDF/Protection: rem current "n" + + $this->tpls[$tplidx]['n'] = $this->n; + $this->_out('<<'.$filter.'/Type /XObject'); + $this->_out('/Subtype /Form'); + $this->_out('/FormType 1'); + + $this->_out(sprintf('/BBox [%.2f %.2f %.2f %.2f]', + ($tpl['x'] + (isset($tpl['box']['x'])?$tpl['box']['x']:0))*$this->k, + ($tpl['h'] + (isset($tpl['box']['y'])?$tpl['box']['y']:0) - $tpl['y'])*$this->k, + ($tpl['w'] + (isset($tpl['box']['x'])?$tpl['box']['x']:0))*$this->k, + ($tpl['h'] + (isset($tpl['box']['y'])?$tpl['box']['y']:0) - $tpl['y']-$tpl['h'])*$this->k) + ); + + if (isset($tpl['box'])) + $this->_out(sprintf('/Matrix [1 0 0 1 %.5f %.5f]',-$tpl['box']['x']*$this->k, -$tpl['box']['y']*$this->k)); + + $this->_out('/Resources '); + + if (isset($tpl['resources'])) { + $this->current_parser =& $tpl['parser']; + $this->pdf_write_value($tpl['resources']); // "n" will be changed + } else { + $this->_out('<_res['tpl'][$tplidx]['fonts']) && count($this->_res['tpl'][$tplidx]['fonts'])) { + $this->_out('/Font <<'); + foreach($this->_res['tpl'][$tplidx]['fonts'] as $font) + $this->_out('/F'.$font['i'].' '.$font['n'].' 0 R'); + $this->_out('>>'); + } + if(isset($this->_res['tpl'][$tplidx]['images']) && count($this->_res['tpl'][$tplidx]['images']) || + isset($this->_res['tpl'][$tplidx]['tpls']) && count($this->_res['tpl'][$tplidx]['tpls'])) + { + $this->_out('/XObject <<'); + if (isset($this->_res['tpl'][$tplidx]['images']) && count($this->_res['tpl'][$tplidx]['images'])) { + foreach($this->_res['tpl'][$tplidx]['images'] as $image) + $this->_out('/I'.$image['i'].' '.$image['n'].' 0 R'); + } + if (isset($this->_res['tpl'][$tplidx]['tpls']) && count($this->_res['tpl'][$tplidx]['tpls'])) { + foreach($this->_res['tpl'][$tplidx]['tpls'] as $i => $tpl) + $this->_out($this->tplprefix.$i.' '.$tpl['n'].' 0 R'); + } + $this->_out('>>'); + } + $this->_out('>>'); + } + + $nN = $this->n; // TCPDF: rem new "n" + $this->n = $cN; // TCPDF: reset to current "n" + $this->_out('/Length '.strlen($p).' >>'); + $this->_putstream($p); + $this->_out('endobj'); + $this->n = $nN; // TCPDF: reset to new "n" + } + } + + /** + * Rewritten to handle existing own defined objects + */ + function _newobj($obj_id=false,$onlynewobj=false) { + if (!$obj_id) { + $obj_id = ++$this->n; + } + + //Begin a new object + if (!$onlynewobj) { + $this->offsets[$obj_id] = strlen($this->buffer); + $this->_out($obj_id.' 0 obj'); + $this->_current_obj_id = $obj_id; // for later use with encryption + } + } + + /** + * Writes a value + * Needed to rebuild the source document + * + * @param mixed $value A PDF-Value. Structure of values see cases in this method + */ + function pdf_write_value(&$value) + { + if (is_subclass_of($this, 'TCPDF')) { + parent::pdf_write_value($value); + } + + switch ($value[0]) { + + case PDF_TYPE_NUMERIC : + case PDF_TYPE_TOKEN : + case PDF_TYPE_REAL : + // A numeric value or a token. + // Simply output them + $this->_out($value[1]." ", false); + break; + + case PDF_TYPE_ARRAY : + + // An array. Output the proper + // structure and move on. + + $this->_out("[",false); + for ($i = 0; $i < count($value[1]); $i++) { + $this->pdf_write_value($value[1][$i]); + } + + $this->_out("]"); + break; + + case PDF_TYPE_DICTIONARY : + + // A dictionary. + $this->_out("<<",false); + + reset ($value[1]); + + while (list($k, $v) = each($value[1])) { + $this->_out($k . " ",false); + $this->pdf_write_value($v); + } + + $this->_out(">>"); + break; + + case PDF_TYPE_OBJREF : + + // An indirect object reference + // Fill the object stack if needed + $cpfn =& $this->current_parser->filename; + if (!isset($this->_don_obj_stack[$cpfn][$value[1]])) { + $this->_newobj(false,true); + $this->_obj_stack[$cpfn][$value[1]] = array($this->n, $value); + $this->_don_obj_stack[$cpfn][$value[1]] = array($this->n, $value); // Value is maybee obsolete!!! + } + $objid = $this->_don_obj_stack[$cpfn][$value[1]][0]; + + $this->_out("{$objid} 0 R"); + break; + + case PDF_TYPE_STRING : + + // A string. + $this->_out('('.$value[1].')'); + + break; + + case PDF_TYPE_STREAM : + + // A stream. First, output the + // stream dictionary, then the + // stream data itself. + $this->pdf_write_value($value[1]); + $this->_out("stream"); + $this->_out($value[2][1]); + $this->_out("endstream"); + break; + case PDF_TYPE_HEX : + + $this->_out("<".$value[1].">"); + break; + + case PDF_TYPE_BOOLEAN : + $this->_out($value[1] ? 'true ' : 'false ', false); + break; + + case PDF_TYPE_NULL : + // The null object. + + $this->_out("null"); + break; + } + } + + + /** + * Modified so not each call will add a newline to the output. + */ + function _out($s, $ln=true) { + //Add a line to the document + if ($this->state==2) { + if (!$this->_intpl) { + if (is_subclass_of($this, 'TCPDF') && isset($this->footerlen[$this->page]) AND ($this->footerlen[$this->page] > 0)) { + // puts data before page footer + $page = substr($this->pages[$this->page], 0, -$this->footerlen[$this->page]); + $footer = substr($this->pages[$this->page], -$this->footerlen[$this->page]); + $this->pages[$this->page] = $page." ".$s."\n".$footer; + } else { + $this->pages[$this->page] .= $s.($ln == true ? "\n" : ''); + } + } else + $this->tpls[$this->tpl]['buffer'] .= $s.($ln == true ? "\n" : ''); + } else { + $this->buffer.=$s.($ln == true ? "\n" : ''); + } + } + + /** + * rewritten to close opened parsers + * + */ + function _enddoc() { + parent::_enddoc(); + $this->_closeParsers(); + } + + /** + * close all files opened by parsers + */ + function _closeParsers() { + if ($this->state > 2 && count($this->parsers) > 0) { + foreach ($this->parsers as $k => $_){ + $this->parsers[$k]->closeFile(); + $this->parsers[$k] = null; + unset($this->parsers[$k]); + } + return true; + } + return false; + } + +} \ No newline at end of file diff --git a/reporting/includes/fpdi/fpdi2tcpdf_bridge.php b/reporting/includes/fpdi/fpdi2tcpdf_bridge.php new file mode 100644 index 00000000..b72baea9 --- /dev/null +++ b/reporting/includes/fpdi/fpdi2tcpdf_bridge.php @@ -0,0 +1,136 @@ +PDFVersion; + case 'k': + return $this->k; + case 'lastUsedPageBox': + return $this->lastUsedPageBox; + case 'pageNumber': + return $this->pageNumber; + default: + // Error handling + $this->Error('Cannot access protected property '.get_class($this).':$'.$name.' / Undefined property: '.get_class($this).'::$'.$name); + } + } + + function __set($name, $value) { + switch ($name) { + case 'PDFVersion': + $this->PDFVersion = $value; + break; + default: + // Error handling + $this->Error('Cannot access protected property '.get_class($this).':$'.$name.' / Undefined property: '.get_class($this).'::$'.$name); + } + } + + /** + * Encryption of imported data by FPDI + * + * @param array $value + */ + function pdf_write_value(&$value) { + switch ($value[0]) { + case PDF_TYPE_STRING : + if ($this->encrypted) { + $value[1] = $this->_unescape($value[1]); + $value[1] = $this->_RC4($this->_objectkey($this->_current_obj_id), $value[1]); + $value[1] = $this->_escape($value[1]); + } + break; + + case PDF_TYPE_STREAM : + if ($this->encrypted) { + $value[2][1] = $this->_RC4($this->_objectkey($this->_current_obj_id), $value[2][1]); + } + break; + + case PDF_TYPE_HEX : + if ($this->encrypted) { + $value[1] = $this->hex2str($value[1]); + $value[1] = $this->_RC4($this->_objectkey($this->_current_obj_id), $value[1]); + + // remake hexstring of encrypted string + $value[1] = $this->str2hex($value[1]); + } + break; + } + } + + /** + * Unescapes a PDF string + * + * @param string $s + * @return string + */ + function _unescape($s) { + return strtr($s, array( + '\\\\' => "\\", + '\)' => ')', + '\(' => '(', + '\\f' => chr(0x0C), + '\\b' => chr(0x08), + '\\t' => chr(0x09), + '\\r' => chr(0x0D), + '\\n' => chr(0x0A), + )); + } + + /** + * Hexadecimal to string + * + * @param string $hex + * @return string + */ + function hex2str($hex) { + return pack("H*", str_replace(array("\r", "\n", " "), "", $hex)); + } + + /** + * String to hexadecimal + * + * @param string $str + * @return string + */ + function str2hex($str) { + return current(unpack("H*", $str)); + } +} \ No newline at end of file diff --git a/reporting/includes/fpdi/fpdi_pdf_parser.php b/reporting/includes/fpdi/fpdi_pdf_parser.php new file mode 100644 index 00000000..8d9288e4 --- /dev/null +++ b/reporting/includes/fpdi/fpdi_pdf_parser.php @@ -0,0 +1,380 @@ +fpdi =& $fpdi; + $this->filename = $filename; + + parent::pdf_parser($filename); + + // resolve Pages-Dictonary + $pages = $this->pdf_resolve_object($this->c, $this->root[1][1]['/Pages']); + + // Read pages + $this->read_pages($this->c, $pages, $this->pages); + + // count pages; + $this->page_count = count($this->pages); + } + + /** + * Overwrite parent::error() + * + * @param string $msg Error-Message + */ + function error($msg) { + $this->fpdi->error($msg); + } + + /** + * Get pagecount from sourcefile + * + * @return int + */ + function getPageCount() { + return $this->page_count; + } + + + /** + * Set pageno + * + * @param int $pageno Pagenumber to use + */ + function setPageno($pageno) { + $pageno = ((int) $pageno) - 1; + + if ($pageno < 0 || $pageno >= $this->getPageCount()) { + $this->fpdi->error("Pagenumber is wrong!"); + } + + $this->pageno = $pageno; + } + + /** + * Get page-resources from current page + * + * @return array + */ + function getPageResources() { + return $this->_getPageResources($this->pages[$this->pageno]); + } + + /** + * Get page-resources from /Page + * + * @param array $obj Array of pdf-data + */ + function _getPageResources ($obj) { // $obj = /Page + $obj = $this->pdf_resolve_object($this->c, $obj); + + // If the current object has a resources + // dictionary associated with it, we use + // it. Otherwise, we move back to its + // parent object. + if (isset ($obj[1][1]['/Resources'])) { + $res = $this->pdf_resolve_object($this->c, $obj[1][1]['/Resources']); + if ($res[0] == PDF_TYPE_OBJECT) + return $res[1]; + return $res; + } else { + if (!isset ($obj[1][1]['/Parent'])) { + return false; + } else { + $res = $this->_getPageResources($obj[1][1]['/Parent']); + if ($res[0] == PDF_TYPE_OBJECT) + return $res[1]; + return $res; + } + } + } + + + /** + * Get content of current page + * + * If more /Contents is an array, the streams are concated + * + * @return string + */ + function getContent() { + $buffer = ""; + + if (isset($this->pages[$this->pageno][1][1]['/Contents'])) { + $contents = $this->_getPageContent($this->pages[$this->pageno][1][1]['/Contents']); + foreach($contents AS $tmp_content) { + $buffer .= $this->_rebuildContentStream($tmp_content).' '; + } + } + + return $buffer; + } + + + /** + * Resolve all content-objects + * + * @param array $content_ref + * @return array + */ + function _getPageContent($content_ref) { + $contents = array(); + + if ($content_ref[0] == PDF_TYPE_OBJREF) { + $content = $this->pdf_resolve_object($this->c, $content_ref); + if ($content[1][0] == PDF_TYPE_ARRAY) { + $contents = $this->_getPageContent($content[1]); + } else { + $contents[] = $content; + } + } else if ($content_ref[0] == PDF_TYPE_ARRAY) { + foreach ($content_ref[1] AS $tmp_content_ref) { + $contents = array_merge($contents,$this->_getPageContent($tmp_content_ref)); + } + } + + return $contents; + } + + + /** + * Rebuild content-streams + * + * @param array $obj + * @return string + */ + function _rebuildContentStream($obj) { + $filters = array(); + + if (isset($obj[1][1]['/Filter'])) { + $_filter = $obj[1][1]['/Filter']; + + if ($_filter[0] == PDF_TYPE_TOKEN) { + $filters[] = $_filter; + } else if ($_filter[0] == PDF_TYPE_ARRAY) { + $filters = $_filter[1]; + } + } + + $stream = $obj[2][1]; + + foreach ($filters AS $_filter) { + switch ($_filter[1]) { + case "/FlateDecode": + if (function_exists('gzuncompress')) { + $stream = (strlen($stream) > 0) ? @gzuncompress($stream) : ''; + } else { + $this->fpdi->error(sprintf("To handle %s filter, please compile php with zlib support.",$_filter[1])); + } + if ($stream === false) { + $this->fpdi->error("Error while decompressing stream."); + } + break; + case null: + $stream = $stream; + break; + default: + if (preg_match("/^\/[a-z85]*$/i", $_filter[1], $filterName) && @include_once('decoders'.$_filter[1].'.php')) { + $filterName = substr($_filter[1],1); + if (class_exists($filterName)) { + $decoder = new $filterName($this->fpdi); + $stream = $decoder->decode(trim($stream)); + } else { + $this->fpdi->error(sprintf("Unsupported Filter: %s",$_filter[1])); + } + } else { + $this->fpdi->error(sprintf("Unsupported Filter: %s",$_filter[1])); + } + } + } + + return $stream; + } + + + /** + * Get a Box from a page + * Arrayformat is same as used by fpdf_tpl + * + * @param array $page a /Page + * @param string $box_index Type of Box @see $availableBoxes + * @return array + */ + function getPageBox($page, $box_index) { + $page = $this->pdf_resolve_object($this->c,$page); + $box = null; + if (isset($page[1][1][$box_index])) + $box =& $page[1][1][$box_index]; + + if (!is_null($box) && $box[0] == PDF_TYPE_OBJREF) { + $tmp_box = $this->pdf_resolve_object($this->c,$box); + $box = $tmp_box[1]; + } + + if (!is_null($box) && $box[0] == PDF_TYPE_ARRAY) { + $b =& $box[1]; + return array("x" => $b[0][1]/$this->fpdi->k, + "y" => $b[1][1]/$this->fpdi->k, + "w" => abs($b[0][1]-$b[2][1])/$this->fpdi->k, + "h" => abs($b[1][1]-$b[3][1])/$this->fpdi->k); + } else if (!isset ($page[1][1]['/Parent'])) { + return false; + } else { + return $this->getPageBox($this->pdf_resolve_object($this->c, $page[1][1]['/Parent']), $box_index); + } + } + + function getPageBoxes($pageno) { + return $this->_getPageBoxes($this->pages[$pageno-1]); + } + + /** + * Get all Boxes from /Page + * + * @param array a /Page + * @return array + */ + function _getPageBoxes($page) { + $boxes = array(); + + foreach($this->availableBoxes AS $box) { + if ($_box = $this->getPageBox($page,$box)) { + $boxes[$box] = $_box; + } + } + + return $boxes; + } + + /** + * Get the page rotation by pageno + * + * @param integer $pageno + * @return array + */ + function getPageRotation($pageno) { + return $this->_getPageRotation($this->pages[$pageno-1]); + } + + function _getPageRotation ($obj) { // $obj = /Page + $obj = $this->pdf_resolve_object($this->c, $obj); + if (isset ($obj[1][1]['/Rotate'])) { + $res = $this->pdf_resolve_object($this->c, $obj[1][1]['/Rotate']); + if ($res[0] == PDF_TYPE_OBJECT) + return $res[1]; + return $res; + } else { + if (!isset ($obj[1][1]['/Parent'])) { + return false; + } else { + $res = $this->_getPageRotation($obj[1][1]['/Parent']); + if ($res[0] == PDF_TYPE_OBJECT) + return $res[1]; + return $res; + } + } + } + + /** + * Read all /Page(es) + * + * @param object pdf_context + * @param array /Pages + * @param array the result-array + */ + function read_pages (&$c, &$pages, &$result) { + // Get the kids dictionary + $kids = $this->pdf_resolve_object ($c, $pages[1][1]['/Kids']); + + if (!is_array($kids)) + $this->fpdi->Error("Cannot find /Kids in current /Page-Dictionary"); + foreach ($kids[1] as $v) { + $pg = $this->pdf_resolve_object ($c, $v); + if ($pg[1][1]['/Type'][1] === '/Pages') { + // If one of the kids is an embedded + // /Pages array, resolve it as well. + $this->read_pages ($c, $pg, $result); + } else { + $result[] = $pg; + } + } + } + + + + /** + * Get PDF-Version + * + * And reset the PDF Version used in FPDI if needed + */ + function getPDFVersion() { + parent::getPDFVersion(); + $this->fpdi->PDFVersion = max($this->fpdi->PDFVersion, $this->pdfVersion); + } + +} \ No newline at end of file diff --git a/reporting/includes/fpdi/pdf_context.php b/reporting/includes/fpdi/pdf_context.php new file mode 100644 index 00000000..ce0b0e0c --- /dev/null +++ b/reporting/includes/fpdi/pdf_context.php @@ -0,0 +1,82 @@ +file = $f; + $this->reset(); + } + + // Optionally move the file + // pointer to a new location + // and reset the buffered data + + function reset($pos = null, $l = 100) { + if (!is_null ($pos)) { + fseek ($this->file, $pos); + } + + $this->buffer = $l > 0 ? fread($this->file, $l) : ''; + $this->length = strlen($this->buffer); + if ($this->length < $l) + $this->increase_length($l - $this->length); + $this->offset = 0; + $this->stack = array(); + } + + // Make sure that there is at least one + // character beyond the current offset in + // the buffer to prevent the tokenizer + // from attempting to access data that does + // not exist + + function ensure_content() { + if ($this->offset >= $this->length - 1) { + return $this->increase_length(); + } else { + return true; + } + } + + // Forcefully read more data into the buffer + + function increase_length($l=100) { + if (feof($this->file)) { + return false; + } else { + $totalLength = $this->length + $l; + do { + $this->buffer .= fread($this->file, $totalLength-$this->length); + } while ((($this->length = strlen($this->buffer)) != $totalLength) && !feof($this->file)); + + return true; + } + } + +} \ No newline at end of file diff --git a/reporting/includes/fpdi/pdf_parser.php b/reporting/includes/fpdi/pdf_parser.php new file mode 100644 index 00000000..b47ea7ac --- /dev/null +++ b/reporting/includes/fpdi/pdf_parser.php @@ -0,0 +1,690 @@ +filename = $filename; + + $this->f = @fopen($this->filename, "rb"); + + if (!$this->f) + $this->error(sprintf("Cannot open %s !", $filename)); + + $this->getPDFVersion(); + + $this->c = new pdf_context($this->f); + // Read xref-Data + $this->pdf_read_xref($this->xref, $this->pdf_find_xref()); + + // Check for Encryption + $this->getEncryption(); + + // Read root + $this->pdf_read_root(); + } + + /** + * Close the opened file + */ + function closeFile() { + if (isset($this->f)) { + fclose($this->f); + unset($this->f); + } + } + + /** + * Print Error and die + * + * @param string $msg Error-Message + */ + function error($msg) { + die("PDF-Parser Error: ".$msg); + } + + /** + * Check Trailer for Encryption + */ + function getEncryption() { + if (isset($this->xref['trailer'][1]['/Encrypt'])) { + $this->error("File is encrypted!"); + } + } + + /** + * Find/Return /Root + * + * @return array + */ + function pdf_find_root() { + if ($this->xref['trailer'][1]['/Root'][0] != PDF_TYPE_OBJREF) { + $this->error("Wrong Type of Root-Element! Must be an indirect reference"); + } + return $this->xref['trailer'][1]['/Root']; + } + + /** + * Read the /Root + */ + function pdf_read_root() { + // read root + $this->root = $this->pdf_resolve_object($this->c, $this->pdf_find_root()); + } + + /** + * Get PDF-Version + * + * And reset the PDF Version used in FPDI if needed + */ + function getPDFVersion() { + fseek($this->f, 0); + preg_match("/\d\.\d/",fread($this->f,16),$m); + if (isset($m[0])) + $this->pdfVersion = $m[0]; + return $this->pdfVersion; + } + + /** + * Find the xref-Table + */ + function pdf_find_xref() { + $toRead = 1500; + + $stat = fseek ($this->f, -$toRead, SEEK_END); + if ($stat === -1) { + fseek ($this->f, 0); + } + $data = fread($this->f, $toRead); + + $pos = strlen($data) - strpos(strrev($data), strrev('startxref')); + $data = substr($data, $pos); + + if (!preg_match('/\s*(\d+).*$/s', $data, $matches)) { + $this->error("Unable to find pointer to xref table"); + } + + return (int) $matches[1]; + } + + /** + * Read xref-table + * + * @param array $result Array of xref-table + * @param integer $offset of xref-table + */ + function pdf_read_xref(&$result, $offset) { + fseek($this->f, $o_pos = $offset-20); // set some bytes backwards to fetch errorious docs + + $data = fread($this->f, 100); + + $xrefPos = strpos($data, 'xref'); + + if ($xrefPos === false) { + $this->error('Unable to find xref table.'); + } + + if (!isset($result['xref_location'])) { + $result['xref_location'] = $o_pos+$xrefPos; + $result['max_object'] = 0; + } + + $cylces = -1; + $bytesPerCycle = 100; + + fseek($this->f, $o_pos = $o_pos+$xrefPos+4); // set the handle directly after the "xref"-keyword + $data = fread($this->f, $bytesPerCycle); + + while (($trailerPos = strpos($data, 'trailer', max($bytesPerCycle*$cylces++, 0))) === false && !feof($this->f)) { + $data .= fread($this->f, $bytesPerCycle); + } + + if ($trailerPos === false) { + $this->error('Trailer keyword not found after xref table'); + } + + $data = substr($data, 0, $trailerPos); + + // get Line-Ending + preg_match_all("/(\r\n|\n|\r)/", substr($data, 0, 100), $m); // check the first 100 bytes for linebreaks + + $differentLineEndings = count(array_unique($m[0])); + if ($differentLineEndings > 1) { + $lines = preg_split("/(\r\n|\n|\r)/", $data, -1, PREG_SPLIT_NO_EMPTY); + } else { + $lines = explode($m[0][1], $data); + } + + $data = $differentLineEndings = $m = null; + unset($data, $differentLineEndings, $m); + + $linesCount = count($lines); + + $start = 1; + + for ($i = 0; $i < $linesCount; $i++) { + $line = trim($lines[$i]); + if ($line) { + $pieces = explode(" ", $line); + $c = count($pieces); + switch($c) { + case 2: + $start = (int)$pieces[0]; + $end = $start+(int)$pieces[1]; + if ($end > $result['max_object']) + $result['max_object'] = $end; + break; + case 3: + if (!isset($result['xref'][$start])) + $result['xref'][$start] = array(); + + if (!array_key_exists($gen = (int) $pieces[1], $result['xref'][$start])) { + $result['xref'][$start][$gen] = $pieces[2] == 'n' ? (int) $pieces[0] : null; + } + $start++; + break; + default: + $this->error('Unexpected data in xref table'); + } + } + } + + $lines = $pieces = $line = $start = $end = $gen = null; + unset($lines, $pieces, $line, $start, $end, $gen); + + fseek($this->f, $o_pos+$trailerPos+7); + + $c = new pdf_context($this->f); + $trailer = $this->pdf_read_value($c); + + $c = null; + unset($c); + + if (!isset($result['trailer'])) { + $result['trailer'] = $trailer; + } + + if (isset($trailer[1]['/Prev'])) { + $this->pdf_read_xref($result, $trailer[1]['/Prev'][1]); + } + + $trailer = null; + unset($trailer); + + return true; + } + + /** + * Reads an Value + * + * @param object $c pdf_context + * @param string $token a Token + * @return mixed + */ + function pdf_read_value(&$c, $token = null) { + if (is_null($token)) { + $token = $this->pdf_read_token($c); + } + + if ($token === false) { + return false; + } + + switch ($token) { + case '<': + // This is a hex string. + // Read the value, then the terminator + + $pos = $c->offset; + + while(1) { + + $match = strpos ($c->buffer, '>', $pos); + + // If you can't find it, try + // reading more data from the stream + + if ($match === false) { + if (!$c->increase_length()) { + return false; + } else { + continue; + } + } + + $result = substr ($c->buffer, $c->offset, $match - $c->offset); + $c->offset = $match + 1; + + return array (PDF_TYPE_HEX, $result); + } + + break; + case '<<': + // This is a dictionary. + + $result = array(); + + // Recurse into this function until we reach + // the end of the dictionary. + while (($key = $this->pdf_read_token($c)) !== '>>') { + if ($key === false) { + return false; + } + + if (($value = $this->pdf_read_value($c)) === false) { + return false; + } + $result[$key] = $value; + } + + return array (PDF_TYPE_DICTIONARY, $result); + + case '[': + // This is an array. + + $result = array(); + + // Recurse into this function until we reach + // the end of the array. + while (($token = $this->pdf_read_token($c)) !== ']') { + if ($token === false) { + return false; + } + + if (($value = $this->pdf_read_value($c, $token)) === false) { + return false; + } + + $result[] = $value; + } + + return array (PDF_TYPE_ARRAY, $result); + + case '(' : + // This is a string + $pos = $c->offset; + + $openBrackets = 1; + do { + for (; $openBrackets != 0 && $pos < $c->length; $pos++) { + switch (ord($c->buffer[$pos])) { + case 0x28: // '(' + $openBrackets++; + break; + case 0x29: // ')' + $openBrackets--; + break; + case 0x5C: // backslash + $pos++; + } + } + } while($openBrackets != 0 && $c->increase_length()); + + $result = substr($c->buffer, $c->offset, $pos - $c->offset - 1); + $c->offset = $pos; + + return array (PDF_TYPE_STRING, $result); + + + case "stream": + $o_pos = ftell($c->file)-strlen($c->buffer); + $o_offset = $c->offset; + + $c->reset($startpos = $o_pos + $o_offset); + + $e = 0; // ensure line breaks in front of the stream + if ($c->buffer[0] == chr(10) || $c->buffer[0] == chr(13)) + $e++; + if ($c->buffer[1] == chr(10) && $c->buffer[0] != chr(10)) + $e++; + + if ($this->actual_obj[1][1]['/Length'][0] == PDF_TYPE_OBJREF) { + $tmp_c = new pdf_context($this->f); + $tmp_length = $this->pdf_resolve_object($tmp_c,$this->actual_obj[1][1]['/Length']); + $length = $tmp_length[1][1]; + } else { + $length = $this->actual_obj[1][1]['/Length'][1]; + } + + if ($length > 0) { + $c->reset($startpos+$e,$length); + $v = $c->buffer; + } else { + $v = ''; + } + $c->reset($startpos+$e+$length+9); // 9 = strlen("endstream") + + return array(PDF_TYPE_STREAM, $v); + + case '%': + // this is a comment - just jump over it + $pos = $c->offset; + while(1) { + // PHP 4.3.3 required + #$match = preg_match("/(\r\n|\r|\n)/", $c->buffer, $m, PREG_OFFSET_CAPTURE, $pos); + // alternative + $match = preg_match("/(\r\n|\r|\n)/", substr($c->buffer, $pos), $m); + if ($match === false) { + if (!$c->increase_length()) { + return false; + } else { + continue; + } + } + + // PHP 4.3.3 required + #$c->offset = $m[0][1]+strlen($m[0][0]); + // alternative + $c->offset = strpos($c->buffer, $m[0], $pos)+strlen($m[0]); + + return $this->pdf_read_value($c); + } + + default : + if (is_numeric ($token)) { + // A numeric token. Make sure that + // it is not part of something else. + if (($tok2 = $this->pdf_read_token ($c)) !== false) { + if (is_numeric ($tok2)) { + + // Two numeric tokens in a row. + // In this case, we're probably in + // front of either an object reference + // or an object specification. + // Determine the case and return the data + if (($tok3 = $this->pdf_read_token ($c)) !== false) { + switch ($tok3) { + case 'obj' : + return array (PDF_TYPE_OBJDEC, (int) $token, (int) $tok2); + case 'R' : + return array (PDF_TYPE_OBJREF, (int) $token, (int) $tok2); + } + // If we get to this point, that numeric value up + // there was just a numeric value. Push the extra + // tokens back into the stack and return the value. + array_push ($c->stack, $tok3); + } + } + + array_push ($c->stack, $tok2); + } + + if ($token === (string)((int)$token)) + return array (PDF_TYPE_NUMERIC, (int)$token); + else + return array (PDF_TYPE_REAL, (float)$token); + } else if ($token == 'true' || $token == 'false') { + return array (PDF_TYPE_BOOLEAN, $token == 'true'); + } else { + + // Just a token. Return it. + return array (PDF_TYPE_TOKEN, $token); + } + + } + } + + /** + * Resolve an object + * + * @param object $c pdf_context + * @param array $obj_spec The object-data + * @param boolean $encapsulate Must set to true, cause the parsing and fpdi use this method only without this para + */ + function pdf_resolve_object(&$c, $obj_spec, $encapsulate = true) { + // Exit if we get invalid data + if (!is_array($obj_spec)) { + return false; + } + + if ($obj_spec[0] == PDF_TYPE_OBJREF) { + + // This is a reference, resolve it + if (isset($this->xref['xref'][$obj_spec[1]][$obj_spec[2]])) { + + // Save current file position + // This is needed if you want to resolve + // references while you're reading another object + // (e.g.: if you need to determine the length + // of a stream) + + $old_pos = ftell($c->file); + + // Reposition the file pointer and + // load the object header. + + $c->reset($this->xref['xref'][$obj_spec[1]][$obj_spec[2]]); + + $header = $this->pdf_read_value($c,null,true); + + if ($header[0] != PDF_TYPE_OBJDEC || $header[1] != $obj_spec[1] || $header[2] != $obj_spec[2]) { + $this->error("Unable to find object ({$obj_spec[1]}, {$obj_spec[2]}) at expected location"); + } + + // If we're being asked to store all the information + // about the object, we add the object ID and generation + // number for later use + $this->actual_obj =& $result; + if ($encapsulate) { + $result = array ( + PDF_TYPE_OBJECT, + 'obj' => $obj_spec[1], + 'gen' => $obj_spec[2] + ); + } else { + $result = array(); + } + + // Now simply read the object data until + // we encounter an end-of-object marker + while(1) { + $value = $this->pdf_read_value($c); + if ($value === false || count($result) > 4) { + // in this case the parser coudn't find an endobj so we break here + break; + } + + if ($value[0] == PDF_TYPE_TOKEN && $value[1] === 'endobj') { + break; + } + + $result[] = $value; + } + + $c->reset($old_pos); + + if (isset($result[2][0]) && $result[2][0] == PDF_TYPE_STREAM) { + $result[0] = PDF_TYPE_STREAM; + } + + return $result; + } + } else { + return $obj_spec; + } + } + + + + /** + * Reads a token from the file + * + * @param object $c pdf_context + * @return mixed + */ + function pdf_read_token(&$c) + { + // If there is a token available + // on the stack, pop it out and + // return it. + + if (count($c->stack)) { + return array_pop($c->stack); + } + + // Strip away any whitespace + + do { + if (!$c->ensure_content()) { + return false; + } + $c->offset += _strspn($c->buffer, " \n\r\t", $c->offset); + } while ($c->offset >= $c->length - 1); + + // Get the first character in the stream + + $char = $c->buffer[$c->offset++]; + + switch ($char) { + + case '[' : + case ']' : + case '(' : + case ')' : + + // This is either an array or literal string + // delimiter, Return it + + return $char; + + case '<' : + case '>' : + + // This could either be a hex string or + // dictionary delimiter. Determine the + // appropriate case and return the token + + if ($c->buffer[$c->offset] == $char) { + if (!$c->ensure_content()) { + return false; + } + $c->offset++; + return $char . $char; + } else { + return $char; + } + + default : + + // This is "another" type of token (probably + // a dictionary entry or a numeric value) + // Find the end and return it. + + if (!$c->ensure_content()) { + return false; + } + + while(1) { + + // Determine the length of the token + + $pos = _strcspn($c->buffer, " []<>()\r\n\t/", $c->offset); + if ($c->offset + $pos <= $c->length - 1) { + break; + } else { + // If the script reaches this point, + // the token may span beyond the end + // of the current buffer. Therefore, + // we increase the size of the buffer + // and try again--just to be safe. + + $c->increase_length(); + } + } + + $result = substr($c->buffer, $c->offset - 1, $pos + 1); + + $c->offset += $pos; + return $result; + } + } + + +} \ No newline at end of file diff --git a/reporting/includes/fpdi/wrapper_functions.php b/reporting/includes/fpdi/wrapper_functions.php new file mode 100644 index 00000000..61eae274 --- /dev/null +++ b/reporting/includes/fpdi/wrapper_functions.php @@ -0,0 +1,70 @@ +NewLine(); if ($this->company['coy_logo'] != '') { - $logo = $comp_path .'/'. user_company() . "/images/" . $this->company['coy_logo']; + $logo = company_path() . "/images/" . $this->company['coy_logo']; $this->AddImage($logo, $ccol, $this->row, 0, 40); } else @@ -122,28 +122,28 @@ $this->NewLine(3); $this->Text($mcol + 100, $doc_Date); if ($doctype == ST_SALESQUOTE || $doctype == ST_PURCHORDER || $doctype == ST_SALESORDER) - $this->Text($mcol + 180, sql2date($myrow['ord_date'])); + $this->Text($mcol + 180, sql2date($this->formData['ord_date'])); elseif ($doctype == ST_WORKORDER) - $this->Text($mcol + 180, sql2date($myrow['date_'])); + $this->Text($mcol + 180, sql2date($this->formData['date_'])); else - $this->Text($mcol + 180, sql2date($myrow['tran_date'])); + $this->Text($mcol + 180, sql2date($this->formData['tran_date'])); $this->NewLine(); $this->Text($mcol + 100, $doc_Invoice_no); if ($doctype == ST_SALESQUOTE || $doctype == ST_PURCHORDER || $doctype == ST_SALESORDER) // QUOTE, PO or SO { if ($print_invoice_no == 1) - $this->Text($mcol + 180, $myrow['order_no']); + $this->Text($mcol + 180, $this->formData['order_no']); else - $this->Text($mcol + 180, $myrow['reference']); + $this->Text($mcol + 180, $this->formData['reference']); } elseif ($doctype == ST_WORKORDER) - $this->Text($mcol + 180, $myrow['id']); - else if (isset($myrow['trans_no']) && isset($myrow['reference'])) // INV/CRE/STA + $this->Text($mcol + 180, $this->formData['id']); + else if (isset($this->formData['trans_no']) && isset($this->formData['reference'])) // INV/CRE/STA { if ($print_invoice_no == 1) - $this->Text($mcol + 180, $myrow['trans_no']); + $this->Text($mcol + 180, $this->formData['trans_no']); else - $this->Text($mcol + 180, $myrow['reference']); + $this->Text($mcol + 180, $this->formData['reference']); } if ($this->pageNumber > 1 && !strstr($this->filename, "Bulk")) @@ -159,44 +159,48 @@ $temp = $this->row; if ($doctype == ST_SALESQUOTE || $doctype == ST_SALESORDER) { - $this->Text($ccol, $myrow['name'], $icol); + $this->Text($ccol, $this->formData['name'], $icol); } elseif ($doctype == ST_WORKORDER) { - $this->Text($ccol, $myrow['location_name'], $icol); + $this->Text($ccol, $this->formData['location_name'], $icol); $this->NewLine(); - $this->TextWrapLines($ccol, $icol - $ccol, $myrow['delivery_address']); + $this->TextWrapLines($ccol, $icol - $ccol, $this->formData['delivery_address']); } else { if ($doctype == ST_PURCHORDER || $doctype == ST_SUPPAYMENT) { - $name = $myrow['supp_name']; - $addr = $myrow['address']; + $name = $this->formData['supp_name']; + $addr = $this->formData['address']; } else { - if (trim($branch['br_address']) != '') { - $name = $branch['br_name']; - $addr = $branch['br_address']; + if (isset($this->formData['br_address']) && + trim($this->formData['br_address']) != '') { + $name = $this->formData['br_name']; + $addr = $this->formData['br_address']; } else { - $name = $myrow['DebtorName']; - $addr = $myrow['address']; + $name = $this->formData['DebtorName']; + $addr = $this->formData['address']; } } $this->Text($ccol, $name, $icol); $this->NewLine(); $this->TextWrapLines($ccol, $icol - $ccol, $addr); } - if ($sales_order != NULL) + $this->row = $temp; + if (isset($this->formData['deliver_to'])) { - $this->row = $temp; - if ($doctype != ST_SUPPAYMENT && isset($sales_order['deliver_to'])) + if ($doctype == ST_PURCHORDER) + $this->Text($mcol, $this->company['coy_name']); + elseif ($doctype != ST_SUPPAYMENT && isset($this->formData['deliver_to'])) { - $this->Text($mcol, $sales_order['deliver_to']); + $this->Text($mcol, $this->formData['deliver_to']); $this->NewLine(); } - // if you need the company name in purchase order then write it as first line in location addresss. - if ($doctype != ST_SUPPAYMENT && isset($sales_order['delivery_address'])) - $this->TextWrapLines($mcol, $this->rightMargin - $mcol, $sales_order['delivery_address']); - } + if ($doctype != ST_SUPPAYMENT && isset($this->formData['delivery_address'])) + $this->TextWrapLines($mcol, $this->rightMargin - $mcol, $this->formData['delivery_address']); + } // if you need the company name in purchase order then write it as first line in location addresss. + elseif ($doctype == ST_PURCHORDER && isset($this->formData['delivery_address'])) + $this->TextWrapLines($mcol, $this->rightMargin - $mcol, $this->formData['delivery_address']); $this->row = $iline2 - $this->lineHeight - 1; $col = $this->leftMargin; $this->TextWrap($col, $this->row, $width, $doc_Customers_Ref, 'C'); @@ -214,83 +218,76 @@ $this->row = $iline3 - $this->lineHeight - 1; $col = $this->leftMargin; if ($doctype == ST_PURCHORDER || $doctype == ST_SUPPAYMENT) - $this->TextWrap($col, $this->row, $width, $myrow['supp_account_no'], 'C'); + $this->TextWrap($col, $this->row, $width, $this->formData['supp_account_no'], 'C'); elseif ($doctype == ST_WORKORDER) - $this->TextWrap($col, $this->row, $width, $myrow['wo_ref'], 'C'); - elseif (isset($sales_order["customer_ref"])) - $this->TextWrap($col, $this->row, $width, $sales_order["customer_ref"], 'C'); - elseif (isset($myrow["debtor_ref"])) - $this->TextWrap($col, $this->row, $width, $myrow["debtor_ref"], 'C'); + $this->TextWrap($col, $this->row, $width, $this->formData['wo_ref'], 'C'); + elseif (isset($this->formData["customer_ref"])) + $this->TextWrap($col, $this->row, $width, $this->formData["customer_ref"], 'C'); + elseif (isset($this->formData["debtor_ref"])) + $this->TextWrap($col, $this->row, $width, $this->formData["debtor_ref"], 'C'); $col += $width; - if ($branch != null) + if (isset($this->formData['salesman'])) { - $id = $branch['salesman']; - $sql = "SELECT salesman_name FROM ".TB_PREF."salesman WHERE salesman_code='$id'"; - $result = db_query($sql,"could not get sales person"); - $row = db_fetch($result); - $this->TextWrap($col, $this->row, $width, $row['salesman_name'], 'C'); + $id = $this->formData['salesman']; + //$sql = "SELECT salesman_name FROM ".TB_PREF."salesman WHERE salesman_code='$id'"; + //$result = db_query($sql,"could not get sales person"); + //$row = db_fetch($result); + //$this->TextWrap($col, $this->row, $width, $row['salesman_name'], 'C'); + $this->TextWrap($col, $this->row, $width, get_salesman_name($id), 'C'); } elseif ($doctype == ST_SUPPAYMENT || $doctype == ST_CUSTPAYMENT) - $this->TextWrap($col, $this->row, $width, $systypes_array[$myrow["type"]], 'C'); + $this->TextWrap($col, $this->row, $width, $systypes_array[$this->formData["type"]], 'C'); elseif ($doctype == ST_WORKORDER) - $this->TextWrap($col, $this->row, $width, $wo_types_array[$myrow["type"]], 'C'); + $this->TextWrap($col, $this->row, $width, $wo_types_array[$this->formData["type"]], 'C'); $col += $width; if ($doctype == ST_WORKORDER) - $this->TextWrap($col, $this->row, $width, $myrow["StockItemName"], 'C'); - elseif ($doctype != ST_PURCHORDER && isset($myrow['tax_id'])) - $this->TextWrap($col, $this->row, $width, $myrow['tax_id'], 'C'); + $this->TextWrap($col, $this->row, $width, $this->formData["StockItemName"], 'C'); + elseif ($doctype != ST_PURCHORDER && isset($this->formData['tax_id'])) + $this->TextWrap($col, $this->row, $width, $this->formData['tax_id'], 'C'); $col += $width; if ($doctype == ST_SALESINVOICE) { - $deliveries = get_parent_trans(ST_SALESINVOICE, $myrow['trans_no']); - $line = ""; - foreach ($deliveries as $delivery) + $deliveries = get_sales_parent_numbers(ST_SALESINVOICE, $this->formData['trans_no']); + if ($print_invoice_no == 0) { - if ($print_invoice_no == 0) - { - $ref = get_reference(ST_CUSTDELIVERY, $delivery); - if ($ref) - $delivery = $ref; - } - if ($line == "") - $line .= "$delivery"; - else - $line .= ",$delivery"; - } - $this->TextWrap($col, $this->row, $width, $line, 'C'); + foreach($deliveries as $n => $delivery) { + $deliveries[$n] = get_reference(ST_CUSTDELIVERY, $delivery); + } + } + $this->TextWrap($col, $this->row, $width, implode(',', $deliveries), 'C'); } elseif ($doctype == ST_CUSTDELIVERY) { - $ref = $myrow['order_']; + $ref = $this->formData['order_']; if ($print_invoice_no == 0) { - $ref = get_reference(ST_SALESORDER, $myrow['order_']); + $ref = get_reference(ST_SALESORDER, $this->formData['order_']); if (!$ref) - $ref = $myrow['order_']; + $ref = $this->formData['order_']; } $this->TextWrap($col, $this->row, $width, $ref, 'C'); } elseif ($doctype == ST_WORKORDER) - $this->TextWrap($col, $this->row, $width, $myrow["location_name"], 'C'); - elseif (isset($myrow['order_']) && $myrow['order_'] != 0) - $this->TextWrap($col, $this->row, $width, $myrow['order_'], 'C'); + $this->TextWrap($col, $this->row, $width, $this->formData["location_name"], 'C'); + elseif (isset($this->formData['order_']) && $this->formData['order_'] != 0) + $this->TextWrap($col, $this->row, $width, $this->formData['order_'], 'C'); $col += $width; if ($doctype == ST_SALESORDER || $doctype == ST_SALESQUOTE) - $this->TextWrap($col, $this->row, $width, sql2date($myrow['delivery_date']), 'C'); + $this->TextWrap($col, $this->row, $width, sql2date($this->formData['delivery_date']), 'C'); elseif ($doctype == ST_WORKORDER) - $this->TextWrap($col, $this->row, $width, $myrow["units_issued"], 'C'); + $this->TextWrap($col, $this->row, $width, $this->formData["units_issued"], 'C'); elseif ($doctype != ST_PURCHORDER && $doctype != ST_CUSTCREDIT && $doctype != ST_CUSTPAYMENT && - $doctype != ST_SUPPAYMENT && isset($myrow['due_date'])) - $this->TextWrap($col, $this->row, $width, sql2date($myrow['due_date']), 'C'); - if (!isset($packing_slip) || $packing_slip == 0) + $doctype != ST_SUPPAYMENT && isset($this->formData['due_date'])) + $this->TextWrap($col, $this->row, $width, sql2date($this->formData['due_date']), 'C'); + if ((!isset($packing_slip) || $packing_slip == 0) && ($doctype != ST_STATEMENT)) //! { $this->row -= (2 * $this->lineHeight); if ($doctype == ST_WORKORDER) - $str = sql2date($myrow["required_by"]); + $str = sql2date($this->formData["required_by"]); else { - $id = $myrow['payment_terms']; - $sql = "SELECT terms FROM ".TB_PREF."payment_terms WHERE terms_indicator='$id'"; + $id = $this->formData['payment_terms']; + $sql = "SELECT terms FROM ".TB_PREF."payment_terms WHERE terms_indicator=".db_escape($id); $result = db_query($sql,"could not get paymentterms"); $row = db_fetch($result); $str = $row["terms"]; @@ -309,24 +306,24 @@ $this->Font('italic'); $this->row = $iline7 - $this->lineHeight - 6; if ($doctype != ST_WORKORDER) - $this->TextWrap($ccol, $this->row, $right - $ccol, $doc_Please_Quote . " - " . $myrow['curr_code'], 'C'); + $this->TextWrap($ccol, $this->row, $right - $ccol, $doc_Please_Quote . " - " . $this->formData['curr_code'], 'C'); $this->row -= $this->lineHeight; - if (isset($bankaccount['bank_name'])) + if (isset($this->formData['bank_name'])) { - $txt = $doc_Bank . ": ".$bankaccount['bank_name']. ", " . $doc_Bank_Account . ": " . $bankaccount['bank_account_number']; + $txt = $doc_Bank . ": ".$this->formData['bank_name']. ", " . $doc_Bank_Account . ": " . $this->formData['bank_account_number']; $this->TextWrap($ccol, $this->row, $right - $ccol, $txt, 'C'); $this->row -= $this->lineHeight; } - if ($doctype == ST_SALESINVOICE && $branch['disable_branch'] > 0) // payment links + if ($doctype == ST_SALESINVOICE && $this->formData['disable_branch'] > 0) // payment links { - if ($branch['disable_branch'] == 1) + if ($this->formData['disable_branch'] == 1) { - $amt = number_format($myrow["ov_freight"] + $myrow["ov_gst"] + $myrow["ov_amount"], user_price_dec()); + $amt = number_format($this->formData["ov_freight"] + $this->formData["ov_gst"] + $this->formData["ov_amount"], user_price_dec()); $txt = $doc_Payment_Link . " PayPal: "; - $name = urlencode($this->title . " " . $myrow['reference']); + $name = urlencode($this->title . " " . $this->formData['reference']); $url = "https://www.paypal.com/xclick/business=" . $this->company['email'] . "&item_name=" . - $name . "&amount=" . $amt . "¤cy_code=" . $myrow['curr_code']; + $name . "&amount=" . $amt . "¤cy_code=" . $this->formData['curr_code']; $this->fontSize -= 2; $this->TextWrap($ccol, $this->row, $right - $ccol, $txt, 'C'); $this->row -= $this->lineHeight; diff --git a/reporting/includes/pdf_report.inc b/reporting/includes/pdf_report.inc index 908df737..daacbd2d 100644 --- a/reporting/includes/pdf_report.inc +++ b/reporting/includes/pdf_report.inc @@ -9,12 +9,22 @@ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the License here . ***********************************************************************/ -//include_once($path_to_root . "reporting/includes/class.pdf.inc"); +/* + TODO: + . add StartReport/EndReport handlers for better bulk report support, with + . email/printer destination option should be selected on class creation instead + of End() + . add/use setter function for Header2 parameters (currently passed globally) + . in report files pass already prepared options to SetCommonData() to avoid need for + selection inside FrontReport generic class. +*/ include_once(dirname(__FILE__)."/class.pdf.inc"); include_once(dirname(__FILE__)."/printer_class.inc"); include_once($path_to_root . "/admin/db/company_db.inc"); +include_once($path_to_root . "/admin/db/fiscalyears_db.inc"); include_once($path_to_root . "/admin/db/printers_db.inc"); include_once($path_to_root . "/config.php"); + class FrontReport extends Cpdf { var $size; @@ -34,6 +44,7 @@ class FrontReport extends Cpdf var $lineHeight; //var $rtl; + var $row; var $cols; var $params; var $headers; @@ -49,11 +60,21 @@ class FrontReport extends Cpdf var $scaleLogoWidth; var $footerEnable; // select whether to print a page footer or not var $footerText; // store user-generated footer text - var $headerFunc; // store the name of the currently selected header function + var $headerTmpl; // store the name of the currently selected header template + var $tmplSize; // pdf header template size in pages + var $rep_id; + var $formData; // common data used for printing headers footers etc. + var $contactData; // contact data for sending emials/reportlanguage selection + + var $dest; // destination: email or printer + function FrontReport($title, $filename, $size = 'A4', $fontsize = 9, $orientation = 'P', $margins = NULL, $excelColWidthFactor = NULL) { global $page_security; + + $this->rep_id = $_POST['REP_ID']; // FIXME + if (!$_SESSION["wa_current_user"]->can_access_page($page_security)) { display_error(_("The security settings on your account do not permit you to print this report")); @@ -198,15 +219,11 @@ class FrontReport extends Cpdf $this->row = $this->pageHeight - $this->topMargin; $this->currency = ''; $this->scaleLogoWidth = false; // if Logo, scale on width (else height). - $this->headerFunc = 'Header'; // default to the original header template - $rtl = ($_SESSION['language']->dir === 'rtl' ? 'rtl' : 'ltr'); - $code = $_SESSION['language']->code; - $enc = strtoupper($_SESSION['language']->encoding); - // for the language array in class.pdf.inc - $l = array('a_meta_charset' => $enc, 'a_meta_dir' => $rtl, 'a_meta_language' => $code, 'w_page' => 'page'); - $this->Cpdf($size, $l, $orientation); - } + $this->SetHeaderType('Header'); // default + $this->Cpdf($size, $_SESSION['language']->code, $orientation); + } + /* * Select the font and style to use for following output until * it's changed again. @@ -273,15 +290,14 @@ class FrontReport extends Cpdf $this->footerEnable = $footerenable; $this->footerText = $footertext; } - + // + // Header for listings + // function Header() { $companyCol = $this->endLine - 150; $titleCol = $this->leftMargin + 100; - $this->pageNumber++; - if ($this->pageNumber > 1) - $this->newPage(); $this->row = $this->pageHeight - $this->topMargin; $this->SetDrawColor(128, 128, 128); @@ -354,27 +370,69 @@ class FrontReport extends Cpdf $this->NewLine(2); } - - function Header2($myrow, $branch, $sales_order, $bankaccount, $doctype) + /* + Transition function + */ + function SetCommonData($myrow, $branch, $sales_order, $bankaccount, $doctype, $contacts) + { +// $this->formData = array_merge($myrow, $branch, $sales_order, +// $bank_account, array('doctype' => $doctype)); + + $this->formData = array(); + $datnames = array( + 'myrow' => array('ord_date', 'date_', 'tran_date', + 'order_no','reference', 'id', 'trans_no', 'name', 'location_name', + 'delivery_address', 'supp_name', 'address', + 'DebtorName', 'supp_account_no', 'wo_ref', 'debtor_ref','type', 'trans_no', + 'StockItemName', 'tax_id', 'order_', 'delivery_date', 'units_issued', + 'due_date', 'required_by', 'payment_terms', 'curr_code', + 'ov_freight', 'ov_gst', 'ov_amount'), + 'branch' => array('br_address', 'br_name', 'salesman', 'disable_branch'), + 'sales_order' => array('deliver_to', 'delivery_address', 'customer_ref'), + 'bankaccount' => array('bank_name', 'bank_account_number') + ); + + foreach($datnames as $var => $fields) { + if (isset($$var)) { + foreach($fields as $locname) { + if (isset(${$var}[$locname]) && (${$var}[$locname]!==null)) { + $this->formData[$locname] = ${$var}[$locname]; + } + } + } + } + $this->formData['doctype'] = $doctype; + if (count($contacts)) { + if (!is_array($contacts[0])) + $contacts = array($contacts); // change to array when single contact passed + $this->contactData = $contacts; + // as report is currently generated once despite number of email recipients + // we select language for the first recipient as report language + $this->formData['rep_lang'] = $contacts[0]['lang']; + } + } + /* + Set header handler + */ + function SetHeaderType($name) { + $this->headerTmpl = $name; + } + /* + Header for sales/purchase documents + */ + function Header2() { - global $comp_path, $path_to_root, $print_as_quote, $print_invoice_no, $packing_slip; + global $path_to_root, $print_as_quote, + $print_invoice_no, $packing_slip, $dflt_lang; // FIXME should be passed as params - $this->pageNumber++; - if ($this->pageNumber > 1) - $this->newPage(); + $doctype = $this->formData['doctype']; $header2type = true; - // leave layout files names without path to enable including - // modified versions from comapny/x/reporting directory - if (isset($myrow['curr_code']) && $this->currency != $myrow['curr_code']) - { - include("includes/doctext2.inc"); - } - else - { - include("includes/doctext.inc"); - } + $this->SetLang(@$this->formData['rep_lang'] ? $this->formData['rep_lang'] : $dflt_lang); + // leave layout files names without path to enable including + // modified versions from company/x/reporting directory + include("includes/doctext.inc"); include("includes/header2.inc"); $this->row = $temp; @@ -383,18 +441,13 @@ class FrontReport extends Cpdf // Alternate header style which also supports a simple footer function Header3() { - global $comp_path; - - // Make this header the default for the current report ( used by NewLine() ) - $this->headerFunc = 'Header3'; - // Turn off cell padding for the main report header, restoring the current setting later $oldcMargin = $this->cMargin; $this->SetCellPadding(0); // Set some constants which control header item layout // only set them once or the PHP interpreter gets angry - if ($this->pageNumber == 0) + if ($this->pageNumber == 1) { define('COMPANY_WIDTH', 150); define('LOGO_HEIGHT', 50); @@ -415,17 +468,15 @@ class FrontReport extends Cpdf $footerRow = $this->bottomMargin - FOOTER_MARGIN; // Calling this function generates a new PDF page after the first instance - $this->pageNumber++; - if ($this->pageNumber > 1) - { +// { // // TODO: experimenting with line drawing to highlight current period // $this->SetLineWidth(1); // $this->LineTo($this->cols[3], 33, $this->cols[3], 534); // $this->LineTo($this->cols[4], 33, $this->cols[4], 534); // $this->SetLineWidth(0.1); - $this->newPage(); - } +// $this->newPage(); +// } $this->row = $this->pageHeight - $this->topMargin; // Set the color of dividing lines we'll draw @@ -470,7 +521,7 @@ class FrontReport extends Cpdf if ($this->companyLogoEnable && ($this->company['coy_logo'] != '')) { // Build a string specifying the location of the company logo file - $logo = $comp_path .'/'. user_company() . "/images/" . $this->company['coy_logo']; + $logo = company_path() . "/images/" . $this->company['coy_logo']; // Width being zero means that the image will be scaled to the specified height // keeping its aspect ratio intact. @@ -664,25 +715,6 @@ class FrontReport extends Cpdf return $drawColor; } - function SetDrawColor($r, $g, $b) - { - parent::SetDrawColor($r, $g, $b); - } - - function SetTextColor($r, $g, $b) - { - parent::SetTextColor($r, $g, $b); - } - - /** - * Set the fill color for table cells. - * @see reporting/includes/TCPDF#SetFillColor($col1, $col2, $col3, $col4) - */ - function SetFillColor($r, $g, $b) - { - parent::SetFillColor($r, $g, $b); - } - // Get current cell padding setting from TCPDF object function GetCellPadding() { @@ -816,7 +848,7 @@ class FrontReport extends Cpdf parent::line($from, $row, $to, $row2); } - function Line($row, $height = 0) + function Line($row, $height = 0, $dummy1=null, $dummy2=null, $dummy3=null) { $oldLineWidth = $this->GetLineWidth(); $this->SetLineWidth($height + 1); @@ -872,16 +904,46 @@ class FrontReport extends Cpdf // Move one line down the page $this->row -= ($l * $h); - // Reset the "current line height" for the new line - $this->curLineHeight = $this->fontSize; + // Check to see if we're at the bottom and should insert a page break if ($this->row < $this->bottomMargin + ($np * $h)) - $this->{$this->headerFunc}(); // call header template chosen by current report + $this->NewPage(); + } + + function NewPage() + { + if ($this->pageNumber==0) + { + // check if there is pdf header template for this report + // and set if it is found + $tmpl_pdf = find_custom_file("/reporting/forms/".$this->headerTmpl.".pdf"); + if ($tmpl_pdf) { + $this->tmplSize = $this->setSourceFile($tmpl_pdf); + } + } + + $this->pageNumber++; + parent::newPage(); + + if ($this->tmplSize) { + $this->row = $this->pageHeight - $this->topMargin; // reset row + $id = $this->importPage(min($this->pageNumber, $this->tmplSize)); + $this->useTemplate($id); + } + + // include related php file if any + $tmpl_php = find_custom_file("/reporting/forms/".$this->headerTmpl.".php"); + if ($tmpl_php) { + include($tmpl_php); + } + + if (method_exists($this, $this->headerTmpl)) // draw predefined page layout if any + $this->{$this->headerTmpl}(); } function End($email=0, $subject=null, $myrow=null, $doctype = 0) { - global $pdf_debug, $path_to_root, $comp_path; + global $pdf_debug, $path_to_root; if ($pdf_debug == 1) { @@ -890,18 +952,11 @@ class FrontReport extends Cpdf echo ''; echo trim($pdfcode); echo ''; - //header("Content-Length: $len"); - //header("Content-Disposition: inline; filename=" . $this->filename); - //header('Expires: 0'); - //header('Cache-Control: must-revalidate, post-check=0, pre-check=0'); - //header('Pragma: public'); - - //$this->pdf->stream(); } else { - $dir = $comp_path.'/'.user_company(). '/pdf_files'; + $dir = company_path(). '/pdf_files'; //save the file if (!file_exists($dir)) { @@ -914,55 +969,64 @@ class FrontReport extends Cpdf else $fname = $dir.'/'.uniqid('').'.pdf'; $this->Output($fname, 'F'); + if ($email == 1) { - $emailtype = true; - if ($this->currency != $myrow['curr_code']) - { - include("includes/doctext2.inc"); - } - else - { - include("includes/doctext.inc"); - } - require_once($path_to_root . "/reporting/includes/class.mail.inc"); - $mail = new email(str_replace(",", "", $this->company['coy_name']), $this->company['email']); - if (!isset($myrow['email']) || $myrow['email'] == '') - $myrow['email'] = isset($myrow['contact_email']) ? $myrow['contact_email'] : ''; - $to = str_replace(",", "", $myrow['DebtorName']) . " <" . $myrow['email'] . ">"; - $msg = $doc_Dear_Sirs . " " . $myrow['DebtorName'] . ",\n\n" . $doc_AttachedFile . " " . $subject . - "\n\n"; - if (isset($myrow['dimension_id']) && $myrow['dimension_id'] > 0 && $doctype == ST_SALESINVOICE) // helper for payment links - { - if ($myrow['dimension_id'] == 1) - { - $amt = number_format($myrow["ov_freight"] + $myrow["ov_gst"] + $myrow["ov_amount"], user_price_dec()); - $txt = $doc_Payment_Link . " PayPal: "; - $nn = urlencode($this->title . " " . $myrow['reference']); - $url = "https://www.paypal.com/xclick/business=" . $this->company['email'] . "&item_name=" . - $nn . "&amount=" . $amt . "¤cy_code=" . $myrow['curr_code']; - $msg .= $txt . $url . "\n\n"; - } + if(!count($this->contactData)) { + $this->SetLang(user_language()); + display_error(_("You have no email contact defined for this type of document")); + } else { + $sent = 0; + foreach($this->contactData as $contact) { + if (!isset($contact['email'])) + continue; + $emailtype = true; + $this->SetLang($contact['lang']); + include("includes/doctext.inc"); + + require_once($path_to_root . "/reporting/includes/class.mail.inc"); + $mail = new email(str_replace(",", "", $this->company['coy_name']), + $this->company['email']); + $mail->charset = $this->encoding; + + $to = str_replace(",", "", $contact['name'].' '.$contact['name2']) + ." <" . $contact['email'] . ">"; + $msg = $doc_Dear_Sirs . " " . $contact['name2'] . ",\n\n" + . $doc_AttachedFile . " " . $subject ."\n\n"; + if (isset($myrow['dimension_id']) && $myrow['dimension_id'] > 0 && $doctype == ST_SALESINVOICE) // helper for payment links + { + if ($myrow['dimension_id'] == 1) + { + $amt = number_format($myrow["ov_freight"] + $myrow["ov_gst"] + $myrow["ov_amount"], user_price_dec()); + $txt = $doc_Payment_Link . " PayPal: "; + $nn = urlencode($this->title . " " . $myrow['reference']); + $url = "https://www.paypal.com/xclick/business=" . $this->company['email'] . "&item_name=" . + $nn . "&amount=" . $amt . "¤cy_code=" . $myrow['curr_code']; + $msg .= $txt . $url . "\n\n"; + } + } + $msg .= $doc_Kindest_regards . "\n\n"; + $sender = $this->user . "\n" . $this->company['coy_name'] . "\n" . $this->company['postal_address'] . "\n" . $this->company['email'] . "\n" . $this->company['phone']; + $mail->to($to); + $mail->subject($subject); + $mail->text($msg . $sender); + $mail->attachment($fname); + if ($mail->send()) $sent++; + } // foreach contact + unlink($fname); + $this->SetLang(user_language()); + if (!$sent) + display_error(_("Sending document by email failed")); + else + display_notification($this->title . " " . $myrow['reference'] . " " + . _("has been sent by email to destination.")); } - $msg .= $doc_Kindest_regards . "\n\n"; - $sender = $this->user . "\n" . $this->company['coy_name'] . "\n" . $this->company['postal_address'] . "\n" . $this->company['email'] . "\n" . $this->company['phone']; - $mail->to($to); - $mail->subject($subject); - $mail->text($msg . $sender); - $mail->attachment($fname); - $ret = $mail->send(); - if (!$ret) - display_error(_("Sending document by email failed")); - else - display_notification($this->title . " " . $myrow['reference'] . " " - . _("has been sent by email.")); - unlink($fname); } else { - $printer = get_report_printer(user_print_profile(), $_POST['REP_ID']); + $printer = get_report_printer(user_print_profile(), $this->rep_id); if ($printer == false) { - if(in_ajax()) { + if (in_ajax()) { global $Ajax; if (user_rep_popup()) @@ -970,23 +1034,13 @@ class FrontReport extends Cpdf else $Ajax->redirect($fname); // otherwise use faster method } else { - //echo ' - // - // - // - // - // click here if you are not re-directed. - // - // '; - header('Content-type: application/pdf'); - header("Content-Disposition: inline; filename=$this->filename"); - header('Expires: 0'); - header('Cache-Control: must-revalidate, post-check=0, pre-check=0'); - header('Pragma: public'); - - $this->Stream(); + header('Content-type: application/pdf'); + header('Content-Disposition: inline; filename='.$this->filename); + header('Expires: 0'); + header('Cache-Control: must-revalidate, post-check=0, pre-check=0'); + header('Pragma: public'); +// $this->Stream(basename($fname)); + $this->Stream($this->filename); } } else { // send report to network printer $prn = new remote_printer($printer['queue'],$printer['host'], diff --git a/reporting/includes/reporting.inc b/reporting/includes/reporting.inc index 2bfa4257..9491c0c0 100644 --- a/reporting/includes/reporting.inc +++ b/reporting/includes/reporting.inc @@ -96,6 +96,16 @@ function print_document_link($doc_no, $link_text, $link=true, $type_no, 'PARAM_3' => $email, 'PARAM_4' => ''); break; + case ST_WORKORDER : + $rep = 409; + // from, to, currency, bank acc, email, comments + $ar = array( + 'PARAM_0' => $doc_no, + 'PARAM_1' => $doc_no, + 'PARAM_2' => $email, + 'PARAM_3' => '', + 'PARAM_4' => ''); + break; // default: $ar = array(); } diff --git a/reporting/includes/reports_classes.inc b/reporting/includes/reports_classes.inc index aee1c00e..2faf00ae 100644 --- a/reporting/includes/reports_classes.inc +++ b/reporting/includes/reports_classes.inc @@ -9,9 +9,20 @@ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the License here . ***********************************************************************/ + +// Standard report classess +define('RC_CUSTOMER', 0); +define('RC_SUPPLIER', 1); +define('RC_INVENTORY', 2); +define('RC_MANUFACTURE', 3); +define('RC_DIMENSIONS', 4); +define('RC_BANKING', 5); +define('RC_GL', 6); + class BoxReports { - var $ar_classes; + var $ar_classes; // report class names + var $ar_reports; var $ctrl_handlers = array(); function ReportClasses() @@ -19,45 +30,62 @@ class BoxReports $this->ar_classes = array(); } - function addReportClass($class_name) + function addReportClass($class_name, $class_id=null) { - $this->ar_classes[$class_name] = array(); + if (!$class_id) + $class_id = count($this->ar_classes); + $this->ar_classes[$class_id] = $class_name; + + return $class_id; } - function addReport($class_name, $id, $rep_name, $params=null) + function addReport($class, $id, $rep_name, $params=null) { - unset($this->ar_classes[$class_name][$id]); // unset std report if any - $this->ar_classes[$class_name][$id] = new Report($id, $rep_name, $params); + unset($this->ar_reports[$class][$id]); // unset std report if any + $this->ar_reports[$class][$id] = new Report($id, $rep_name, $params); } function getDisplay($class=null) { - global $table_style, $comp_path, $path_to_root, $pdf_debug, $Ajax; + global $path_to_root, $pdf_debug, $Ajax; $temp = array_values($this->ar_classes); $display_class = $class==null ? $temp[0] : $this->ar_classes[$class]; - $class_counter = 0; - $rep_counter = 0; $st_reports = ""; $st_params = ""; $st_classes = "" . _("Report Classes:") . "
"; - foreach($this->ar_classes as $key=>$value) + + if (isset($_GET['Class'])) + set_focus('class'.$_GET['Class']); + + foreach($this->ar_classes as $class_id => $name) { - $style = $class_counter==$_REQUEST['Class'] ? '' : "style='display:none'"; - $acc = access_string($key); + if (!isset($this->ar_reports[$class_id])) + continue; // e.g. no dimensions + + $acc = access_string($name); $st_classes .= "$acc[0]
"; - $st_reports .= "\n"; - foreach($value as $report) + .$_SERVER['PHP_SELF']."?Class=$class_id'" + ." style='font-weight:". ($_REQUEST['Class'] == $class_id ? 'bold' : 'normal')."'" + ." class='repclass_link' id='".'class'.$class_id."'" + ."$acc[1]>$acc[0]
"; + + $style = $class_id==$_REQUEST['Class'] ? '' : "style='display:none'"; + $st_reports .= "
" . _("Reports For Class: ") . " $key
\n"; + foreach($this->ar_reports[$class_id] as $rep_id => $report) { $acc = access_string($report->name); - $st_reports .= "
" . _("Reports For Class: ") . " $name
id'" - ." id='".default_focus()."'" + $st_reports .= "
id'" + ." style='font-weight:". (@$_GET['rep_id'] == $report->id ? 'bold' : 'normal')."'" + ." id='".$id = default_focus()."'" ."$acc[1]>$acc[0]
\n"; + + if (@$_REQUEST['rep_id'] == $report->id) { + $Ajax->activate($id); + } + if (isset($_REQUEST['rep_id']) && $_REQUEST['rep_id']==$report->id) { $action = $path_to_root.'/reporting/prn_redirect.php'; @@ -67,39 +95,19 @@ class BoxReports $st_params .= submit('Rep'.$report->id, _("Display: ") . access_string($report->name, true), false, '', $pdf_debug ? false : 'default process') . hidden('REP_ID', $report->id, false).'

'; - $st_params .= $this->getOptions($report->get_controls()); + $st_params .= $this->getOptions($report->get_controls(), $report->id); $st_params .= "\n
\n"; set_focus('Rep'.$report->id); $Ajax->addUpdate(true, 'rep_form', $st_params); } } $st_reports .= ""; - $class_counter++; } $st_params = "

". "$st_params
"; - - $st = " - "; - $st .= ""; + $st = "
"; $st .= ""; $st .= ""; $st .= ""; @@ -108,7 +116,7 @@ class BoxReports return $st; } - function getOptions($controls) + function getOptions($controls, $id = 0) { $st = ''; if ($controls == null) @@ -123,6 +131,8 @@ class BoxReports if ($ctrl) break; } if ($ctrl == '') { + if (isset($_COOKIE['select'][$id][$cnt])) // saved parameters 2010-10-06 Joe Hunt + $_POST['PARAM_'.$cnt] = $_COOKIE['select'][$id][$cnt]; $ctrl = $this->get_ctrl('PARAM_'.$cnt, $type); } if ($ctrl != '') { @@ -148,7 +158,8 @@ class BoxReports // function get_ctrl($name, $type) { - global $path_to_root, $use_date_picker, $pdf_debug, $print_invoice_no, $def_print_destination; + global $path_to_root, $use_date_picker, $pdf_debug, $print_invoice_no, + $def_print_destination, $type_shortcuts; $st = ''; switch ($type) @@ -164,31 +175,35 @@ class BoxReports case 'DATEENDM': case 'DATEBEGINTAX': case 'DATEENDTAX': - if ($type == 'DATEBEGIN') - $date = begin_fiscalyear(); - elseif ($type == 'DATEEND') - $date = end_fiscalyear(); - else - $date = Today(); - if ($type == 'DATEBEGINM') - $date = begin_month($date); - elseif ($type == 'DATEENDM') - $date = end_month($date); - elseif ($type == 'DATEBEGINTAX' || $type == 'DATEENDTAX') + if (!isset($_POST[$name])) { - $row = get_company_prefs(); - $edate = add_months($date, -$row['tax_last']); - $edate = end_month($edate); - if ($type == 'DATEENDTAX') - $date = $edate; + if ($type == 'DATEBEGIN') + $date = begin_fiscalyear(); + elseif ($type == 'DATEEND') + $date = end_fiscalyear(); else + $date = Today(); + if ($type == 'DATEBEGINM') + $date = begin_month($date); + elseif ($type == 'DATEENDM') + $date = end_month($date); + elseif ($type == 'DATEBEGINTAX' || $type == 'DATEENDTAX') { - $bdate = begin_month($edate); - $bdate = add_months($bdate, -$row['tax_prd'] + 1); - $date = $bdate; + $row = get_company_prefs(); + $edate = add_months($date, -$row['tax_last']); + $edate = end_month($edate); + if ($type == 'DATEENDTAX') + $date = $edate; + else + { + $bdate = begin_month($edate); + $bdate = add_months($bdate, -$row['tax_prd'] + 1); + $date = $bdate; + } } } - + else // saved parameters 2010-10-16 Joe Hunt + $date = $_POST[$name]; $st = ""; if ($use_date_picker) $st .= "" @@ -229,11 +244,10 @@ class BoxReports return ""; case 'TEXTBOX': - return ""; + $value = (isset($_POST[$name]) ? $_POST[$name] : ""); + return ""; case 'ACCOUNTS': // not used -// $sql = "SELECT id, name FROM ".TB_PREF."chart_types"; -// return combo_input($name, '', $sql, 'id', 'name',array('spec_option'=>_("No Account Group Filter"),'spec_id'=>ALL_NUMERIC)); return gl_account_types_list($name, null, _("No Account Group Filter"), true); case 'ACCOUNTS_NO_FILTER': // not used @@ -286,8 +300,8 @@ class BoxReports // return supplier_list($name); case 'INVOICE': - $IV = _("IV"); - $CN = _("CN"); + $IV = $type_shortcuts[ST_SALESINVOICE]; + $CN = $type_shortcuts[ST_CUSTCREDIT]; $ref = ($print_invoice_no == 1 ? "trans_no" : "reference"); $sql = "SELECT concat(".TB_PREF."debtor_trans.trans_no, '-', ".TB_PREF."debtor_trans.type) AS TNO, concat(".TB_PREF."debtor_trans.$ref, if (type=".ST_SALESINVOICE.", ' $IV ', ' $CN '), ".TB_PREF."debtors_master.name) as IName @@ -295,7 +309,7 @@ class BoxReports return combo_input($name, '', $sql, 'TNO', 'IName',array('order'=>false)); case 'DELIVERY': - $DN = _("DN"); + $DN = $type_shortcuts[ST_CUSTDELIVERY]; $sql = "SELECT concat(".TB_PREF."debtor_trans.trans_no, '-', ".TB_PREF."debtor_trans.type) AS TNO, concat(".TB_PREF."debtor_trans.trans_no, ' $DN ', ".TB_PREF."debtors_master.name) as IName @@ -328,9 +342,9 @@ class BoxReports return combo_input($name, '', $sql, 'order_no', 'IName',array('order'=>false)); case 'REMITTANCE': - $BP = _("BP"); - $SP = _("SP"); - $CN = _("CN"); + $BP = $type_shortcuts[ST_BANKPAYMENT]; + $SP = $type_shortcuts[ST_SUPPAYMENT]; + $CN = $type_shortcuts[ST_SUPPCREDIT]; $ref = ($print_invoice_no == 1 ? "trans_no" : "reference"); $sql = "SELECT concat(".TB_PREF."supp_trans.trans_no, '-', ".TB_PREF."supp_trans.type) AS TNO, concat(".TB_PREF."supp_trans.$ref, if (type=".ST_BANKPAYMENT.", ' $BP ', if (type=".ST_SUPPAYMENT.", ' $SP ', ' $CN ')), ".TB_PREF."suppliers.supp_name) as IName @@ -338,9 +352,9 @@ class BoxReports return combo_input($name, '', $sql, 'TNO', 'IName',array('order'=>false)); case 'RECEIPT': - $BD = _("BD"); - $CP = _("CP"); - $CN = _("CN"); + $BD = $type_shortcuts[ST_BANKDEPOSIT]; + $CP = $type_shortcuts[ST_CUSTPAYMENT]; + $CN = $type_shortcuts[ST_CUSTCREDIT]; $ref = ($print_invoice_no == 1 ? "trans_no" : "reference"); $sql = "SELECT concat(".TB_PREF."debtor_trans.trans_no, '-', ".TB_PREF."debtor_trans.type) AS TNO, concat(".TB_PREF."debtor_trans.$ref, if (type=".ST_BANKDEPOSIT.", ' $BD ', if (type=".ST_CUSTPAYMENT.", ' $CP ', ' $CN ')), ".TB_PREF."debtors_master.name) as IName @@ -384,7 +398,8 @@ class BoxReports $tag_type = TAG_ACCOUNT; else $tag_type = TAG_DIMENSION; - return tag_list($name, 5, $tag_type, true, _("No tags")); + //return tag_list($name, 5, $tag_type, true, false, _("No tags")); + return tag_list($name, 5, $tag_type, true); } return ''; @@ -434,23 +449,28 @@ function gl_systypes_list($name, $value=null, $spec_opt=false) ) ); } - +/* + Add extension/custom reports to report manager. +*/ function add_custom_reports(&$reports) { - global $installed_extensions, $path_to_root, $comp_path; + global $installed_extensions, $path_to_root; // include reports installed inside extension modules if (count($installed_extensions) > 0) { $extensions = $installed_extensions; foreach ($extensions as $ext) - if (($ext['active'] && $ext['type'] == 'module')) { + if (($ext['active'] && $ext['type'] == 'extension')) { $file = $path_to_root.'/'.$ext['path']."/reporting/reports_custom.php"; - if (file_exists($file)) + if (file_exists($file)) { + set_ext_domain($ext['path']); include_once($file); + set_ext_domain(); + } } } - $file = $comp_path.'/'.user_company()."/reporting/reports_custom.php"; + $file = company_path()."/reporting/reports_custom.php"; if (file_exists($file)) include_once($file); } diff --git a/reporting/includes/tcpdf.php b/reporting/includes/tcpdf.php index e30155a4..0f6f48d7 100644 --- a/reporting/includes/tcpdf.php +++ b/reporting/includes/tcpdf.php @@ -148,8 +148,8 @@ * ------------------------------------------------------------------------------- */ if (!defined("K_PATH_FONTS")) - define ("K_PATH_FONTS", '../reporting/fonts/'); -define ("K_PATH_CACHE", '../reporting/fonts/'); + define ("K_PATH_FONTS", dirname(__FILE__)."/../fonts/"); +define ("K_PATH_CACHE", dirname(__FILE__)."/../fonts/"); define("K_CELL_HEIGHT_RATIO", 1.25); //require_once(dirname(__FILE__).'/config/tcpdf_config.php'); @@ -3597,8 +3597,8 @@ if (!class_exists('TCPDF')) { if ($type == "jpg") { $type = "jpeg"; } - $mqr = get_magic_quotes_runtime(); - set_magic_quotes_runtime(0); + $mqr = ini_get('magic_quotes_runtime'); + ini_set('magic_quotes_runtime', 0); // Specific image handlers $mtd = '_parse'.$type; // GD image handler function @@ -3625,7 +3625,7 @@ if (!class_exists('TCPDF')) { //If false, we cannot process image return; } - set_magic_quotes_runtime($mqr); + ini_set('magic_quotes_runtime', $mqr); $info['i'] = count($this->images) + 1; // add image to document $this->images[$file] = $info; @@ -4505,8 +4505,8 @@ if (!class_exists('TCPDF')) { $this->_out('<>'); $this->_out('endobj'); } - $mqr = get_magic_quotes_runtime(); - set_magic_quotes_runtime(0); + $mqr = ini_get('magic_quotes_runtime'); + ini_set('magic_quotes_runtime', 0); foreach($this->FontFiles as $file => $info) { //Font file embedding $this->_newobj(); @@ -4536,7 +4536,7 @@ if (!class_exists('TCPDF')) { $this->_putstream($font); $this->_out('endobj'); } - set_magic_quotes_runtime($mqr); + ini_set('magic_quotes_runtime', $mqr); foreach($this->fonts as $k => $font) { //Font objects $this->fonts[$k]['n'] = $this->n + 1; diff --git a/reporting/prn_redirect.php b/reporting/prn_redirect.php index 3f38f708..d827aaa3 100644 --- a/reporting/prn_redirect.php +++ b/reporting/prn_redirect.php @@ -17,44 +17,20 @@ $path_to_root = ".."; $page_security = 'SA_OPEN'; // this level is later overriden in rep file include_once($path_to_root . "/includes/session.inc"); -function find_report_file($rep) { - global $installed_extensions, $comp_path, $path_to_root; - - // customized per company versions - $path = $comp_path.'/'.user_company()."/reporting"; - $rep_file = $path."/rep$rep.php"; - if (file_exists($rep_file)) { - // add local include path for custom reports - set_include_path($path.PATH_SEPARATOR.get_include_path()); - return $rep_file; - } - // reports added by active extension modules - if (count($installed_extensions) > 0) - { - $extensions = $installed_extensions; - foreach ($extensions as $ext) - if (($ext['active'] && $ext['type'] == 'module')) { - $path = $path_to_root.'/'.$ext['path']."/reporting"; - $rep_file = $path."/rep$rep.php"; - if (file_exists($rep_file)) { - set_include_path($path.PATH_SEPARATOR.get_include_path()); - return $rep_file; - } - } +if (isset($save_report_selections) && $save_report_selections > 0 && isset($_POST['REP_ID'])) { // save parameters from Report Center + for($i=0; $i<10; $i++) { // 2010-10-06 Joe Hunt + if (isset($_POST['PARAM_'.$i]) && !is_array($_POST['PARAM_'.$i])) { + $rep = $_POST['REP_ID']; + setcookie("select[$rep][$i]", $_POST['PARAM_'.$i], time()+60*60*24*$save_report_selections); // days from $save_report_selections + } } - // standard reports - $rep_file = $path_to_root ."/reporting/rep$rep.php"; - if (file_exists($rep_file)) - return $rep_file; - - return null; -} +} if (isset($_GET['xls'])) { $filename = $_GET['filename']; - $unique_name = $_GET['unique']; - $path = $comp_path.'/'.user_company(). '/pdf_files/'; + $unique_name = preg_replace('/[^0-9a-z.]/i', '', $_GET['unique']); + $path = company_path(). '/pdf_files/'; header("Content-type: application/vnd.ms-excel"); header("Content-Disposition: attachment; filename=$filename" ); header("Expires: 0"); @@ -66,8 +42,8 @@ if (isset($_GET['xls'])) elseif (isset($_GET['xml'])) { $filename = $_GET['filename']; - $unique_name = $_GET['unique']; - $path = $comp_path.'/'.user_company(). '/pdf_files/'; + $unique_name = preg_replace('/[^0-9a-z.]/i', '', $_GET['unique']); + $path = company_path(). '/pdf_files/'; header("content-type: text/xml"); header("Content-Disposition: attachment; filename=$filename"); header("Expires: 0"); @@ -85,10 +61,15 @@ if (!isset($_POST['REP_ID'])) { // print link clicked ? $_GET['PARAM_'.$i] : $def_pars[$i]; } } -$rep = $_POST['REP_ID']; -$rep_file = find_report_file($rep); -require($rep_file); +$rep = preg_replace('/[^a-z_0-9]/i', '', $_POST['REP_ID']); + +$rep_file = find_custom_file("/reporting/rep$rep.php"); + +if ($rep_file) { + require($rep_file); +} else + display_error("Cannot find report file '$rep'"); exit(); ?> \ No newline at end of file diff --git a/reporting/rep101.php b/reporting/rep101.php index be617e44..dc027b5a 100644 --- a/reporting/rep101.php +++ b/reporting/rep101.php @@ -23,6 +23,7 @@ include_once($path_to_root . "/includes/session.inc"); include_once($path_to_root . "/includes/date_functions.inc"); include_once($path_to_root . "/includes/data_checks.inc"); include_once($path_to_root . "/gl/includes/gl_db.inc"); +include_once($path_to_root . "/sales/includes/db/customers_db.inc"); //---------------------------------------------------------------------------------------------------- @@ -31,36 +32,38 @@ print_customer_balances(); function get_open_balance($debtorno, $to, $convert) { - $to = date2sql($to); + if($to) + $to = date2sql($to); - $sql = "SELECT SUM(IF(".TB_PREF."debtor_trans.type = ".ST_SALESINVOICE.", (".TB_PREF."debtor_trans.ov_amount + ".TB_PREF."debtor_trans.ov_gst + - ".TB_PREF."debtor_trans.ov_freight + ".TB_PREF."debtor_trans.ov_freight_tax + ".TB_PREF."debtor_trans.ov_discount)"; + $sql = "SELECT SUM(IF(t.type = ".ST_SALESINVOICE.", + (t.ov_amount + t.ov_gst + t.ov_freight + t.ov_freight_tax + t.ov_discount)"; if ($convert) $sql .= " * rate"; $sql .= ", 0)) AS charges, - SUM(IF(".TB_PREF."debtor_trans.type <> ".ST_SALESINVOICE.", (".TB_PREF."debtor_trans.ov_amount + ".TB_PREF."debtor_trans.ov_gst + - ".TB_PREF."debtor_trans.ov_freight + ".TB_PREF."debtor_trans.ov_freight_tax + ".TB_PREF."debtor_trans.ov_discount)"; + SUM(IF(t.type <> ".ST_SALESINVOICE.", + (t.ov_amount + t.ov_gst + t.ov_freight + t.ov_freight_tax + t.ov_discount)"; if ($convert) $sql .= " * rate"; $sql .= " * -1, 0)) AS credits, - SUM(".TB_PREF."debtor_trans.alloc"; + SUM(t.alloc"; if ($convert) $sql .= " * rate"; $sql .= ") AS Allocated, - SUM(IF(".TB_PREF."debtor_trans.type = ".ST_SALESINVOICE.", (".TB_PREF."debtor_trans.ov_amount + ".TB_PREF."debtor_trans.ov_gst + - ".TB_PREF."debtor_trans.ov_freight + ".TB_PREF."debtor_trans.ov_freight_tax + ".TB_PREF."debtor_trans.ov_discount - ".TB_PREF."debtor_trans.alloc)"; + SUM(IF(t.type = ".ST_SALESINVOICE.", + (t.ov_amount + t.ov_gst + t.ov_freight + t.ov_freight_tax + t.ov_discount - t.alloc)"; if ($convert) $sql .= " * rate"; $sql .= ", - ((".TB_PREF."debtor_trans.ov_amount + ".TB_PREF."debtor_trans.ov_gst + ".TB_PREF."debtor_trans.ov_freight + - ".TB_PREF."debtor_trans.ov_freight_tax + ".TB_PREF."debtor_trans.ov_discount) * -1 + ".TB_PREF."debtor_trans.alloc)"; + ((t.ov_amount + t.ov_gst + t.ov_freight + t.ov_freight_tax + t.ov_discount) * -1 + t.alloc)"; if ($convert) $sql .= " * rate"; $sql .= ")) AS OutStanding - FROM ".TB_PREF."debtor_trans - WHERE ".TB_PREF."debtor_trans.tran_date < '$to' - AND ".TB_PREF."debtor_trans.debtor_no = ".db_escape($debtorno)." - AND ".TB_PREF."debtor_trans.type <> ".ST_CUSTDELIVERY." GROUP BY debtor_no"; + FROM ".TB_PREF."debtor_trans t + WHERE t.debtor_no = ".db_escape($debtorno) + ." AND t.type <> ".ST_CUSTDELIVERY; + if ($to) + $sql .= " AND t.tran_date < '$to'"; + $sql .= " GROUP BY debtor_no"; $result = db_query($sql,"No transactions were returned"); return db_fetch($result); @@ -129,17 +132,16 @@ function print_customer_balances() $aligns = array('left', 'left', 'left', 'left', 'right', 'right', 'right', 'right'); - $params = array( 0 => $comments, - 1 => array('text' => _('Period'), 'from' => $from, 'to' => $to), - 2 => array('text' => _('Customer'), 'from' => $cust, 'to' => ''), - 3 => array('text' => _('Currency'), 'from' => $currency, 'to' => ''), - 4 => array('text' => _('Suppress Zeros'), 'from' => $nozeros, 'to' => '')); - - $rep = new FrontReport(_('Customer Balances'), "CustomerBalances", user_pagesize()); + $params = array( 0 => $comments, + 1 => array('text' => _('Period'), 'from' => $from, 'to' => $to), + 2 => array('text' => _('Customer'), 'from' => $cust, 'to' => ''), + 3 => array('text' => _('Currency'), 'from' => $currency, 'to' => ''), + 4 => array('text' => _('Suppress Zeros'), 'from' => $nozeros, 'to' => '')); - $rep->Font(); - $rep->Info($params, $cols, $headers, $aligns); - $rep->Header(); + $rep = new FrontReport(_('Customer Balances'), "CustomerBalances", user_pagesize()); + $rep->Font(); + $rep->Info($params, $cols, $headers, $aligns); + $rep->NewPage(); $grandtotal = array(0,0,0,0); diff --git a/reporting/rep102.php b/reporting/rep102.php index bba5c018..04a55fae 100644 --- a/reporting/rep102.php +++ b/reporting/rep102.php @@ -50,7 +50,7 @@ function get_invoices($customer_id, $to) ".TB_PREF."debtor_trans WHERE ".TB_PREF."debtor_trans.type <> ".ST_CUSTDELIVERY." - AND ".TB_PREF."debtors_master.payment_terms = ".TB_PREF."payment_terms.terms_indicator + AND ".TB_PREF."debtor_trans.payment_terms = ".TB_PREF."payment_terms.terms_indicator AND ".TB_PREF."debtors_master.debtor_no = ".TB_PREF."debtor_trans.debtor_no AND ".TB_PREF."debtor_trans.debtor_no = $customer_id AND ".TB_PREF."debtor_trans.tran_date <= '$todate' @@ -64,7 +64,7 @@ function get_invoices($customer_id, $to) function print_aged_customer_analysis() { - global $comp_path, $path_to_root, $systypes_array; + global $path_to_root, $systypes_array; $to = $_POST['PARAM_0']; $fromcust = $_POST['PARAM_1']; @@ -128,9 +128,9 @@ function print_aged_customer_analysis() $headers[2] = _('Currency'); $rep = new FrontReport(_('Aged Customer Analysis'), "AgedCustomerAnalysis", user_pagesize()); - $rep->Font(); - $rep->Info($params, $cols, $headers, $aligns); - $rep->Header(); + $rep->Font(); + $rep->Info($params, $cols, $headers, $aligns); + $rep->NewPage(); $total = array(0,0,0,0, 0); @@ -230,16 +230,15 @@ function print_aged_customer_analysis() $pg->type = $graphics; $pg->skin = $graph_skin; $pg->built_in = false; - $pg->fontfile = $path_to_root . "/reporting/fonts/Vera.ttf"; $pg->latin_notation = ($decseps[$_SESSION["wa_current_user"]->prefs->dec_sep()] != "."); - $filename = $comp_path .'/'. user_company(). "/images/test.png"; + $filename = company_path(). "/pdf_files/". uniqid("").".png"; $pg->display($filename, true); $w = $pg->width / 1.5; $h = $pg->height / 1.5; $x = ($rep->pageWidth - $w) / 2; $rep->NewLine(2); if ($rep->row - $h < $rep->bottomMargin) - $rep->Header(); + $rep->NewPage(); $rep->AddImage($filename, $x, $rep->row - $h, $w, $h); } $rep->NewLine(); diff --git a/reporting/rep103.php b/reporting/rep103.php index 8ee0abbe..3a5fa144 100644 --- a/reporting/rep103.php +++ b/reporting/rep103.php @@ -1,12 +1,12 @@ . ***********************************************************************/ $page_security = 'SA_CUSTBULKREP'; @@ -27,7 +27,7 @@ include_once($path_to_root . "/gl/includes/gl_db.inc"); print_customer_details_listing(); -function get_customer_details_for_report($area=0, $salesid=0) +function get_customer_details_for_report($area=0, $salesid=0) { $sql = "SELECT ".TB_PREF."debtors_master.debtor_no, ".TB_PREF."debtors_master.name, @@ -37,14 +37,11 @@ function get_customer_details_for_report($area=0, $salesid=0) ".TB_PREF."cust_branch.br_name, ".TB_PREF."cust_branch.br_address, ".TB_PREF."cust_branch.contact_name, - ".TB_PREF."cust_branch.phone, - ".TB_PREF."cust_branch.fax, - ".TB_PREF."cust_branch.email, ".TB_PREF."cust_branch.area, ".TB_PREF."cust_branch.salesman, ".TB_PREF."areas.description, ".TB_PREF."salesman.salesman_name - FROM ".TB_PREF."debtors_master + FROM ".TB_PREF."debtors_master INNER JOIN ".TB_PREF."cust_branch ON ".TB_PREF."debtors_master.debtor_no=".TB_PREF."cust_branch.debtor_no INNER JOIN ".TB_PREF."sales_types @@ -56,9 +53,9 @@ function get_customer_details_for_report($area=0, $salesid=0) if ($area != 0) { if ($salesid != 0) - $sql .= " WHERE ".TB_PREF."salesman.salesman_code=".db_escape($salesid)." + $sql .= " WHERE ".TB_PREF."salesman.salesman_code=".db_escape($salesid)." AND ".TB_PREF."areas.area_code=".db_escape($area); - else + else $sql .= " WHERE ".TB_PREF."areas.area_code=".db_escape($area); } elseif ($salesid != 0) @@ -71,7 +68,7 @@ function get_customer_details_for_report($area=0, $salesid=0) return db_query($sql,"No transactions were returned"); } - + function getTransactions($debtorno, $branchcode, $date) { $date = date2sql($date); @@ -81,7 +78,7 @@ function getTransactions($debtorno, $branchcode, $date) WHERE debtor_no=".db_escape($debtorno)." AND branch_code=".db_escape($branchcode)." AND (type=".ST_SALESINVOICE." OR type=".ST_CUSTCREDIT.") - AND trandate >='$date'"; + AND tran_date >='$date'"; $result = db_query($sql,"No transactions were returned"); @@ -106,7 +103,7 @@ function print_customer_details_listing() include_once($path_to_root . "/reporting/includes/excel_report.inc"); else include_once($path_to_root . "/reporting/includes/pdf_report.inc"); - + $dec = 0; if ($area == ALL_NUMERIC) @@ -130,8 +127,8 @@ function print_customer_details_listing() $lessstr = _('Less than ') . number_format2($less, $dec); else $lessstr = ''; - - $more = (double)$more; + + $more = (double)$more; $less = (double)$less; $cols = array(0, 150, 300, 400, 550); @@ -151,13 +148,13 @@ function print_customer_details_listing() $rep->Font(); $rep->Info($params, $cols, $headers, $aligns); - $rep->Header(); + $rep->NewPage(); $result = get_customer_details_for_report($area, $folk); - + $carea = ''; $sman = ''; - while ($myrow=db_fetch($result)) + while ($myrow=db_fetch($result)) { $printcustomer = true; if ($more != '' || $less != '') @@ -167,25 +164,25 @@ function print_customer_details_listing() $printcustomer = false; if ($less != 0.0 && $turnover >= (double)$less) $printcustomer = false; - } + } if ($printcustomer) { if ($carea != $myrow['description']) { $rep->fontSize += 2; $rep->NewLine(2, 7); - $rep->Font('bold'); + $rep->Font('bold'); $rep->TextCol(0, 3, _('Customers in') . " " . $myrow['description']); $carea = $myrow['description']; $rep->fontSize -= 2; $rep->Font(); $rep->NewLine(); - } + } if ($sman != $myrow['salesman_name']) { $rep->fontSize += 2; $rep->NewLine(1, 7); - $rep->Font('bold'); + $rep->Font('bold'); $rep->TextCol(0, 3, $myrow['salesman_name']); $sman = $myrow['salesman_name']; $rep->fontSize -= 2; @@ -193,28 +190,77 @@ function print_customer_details_listing() $rep->NewLine(); } $rep->NewLine(); + // Here starts the new report lines 2010-11-02 Joe Hunt + $contacts = get_branch_contacts($myrow['branch_code']); + $rep->TextCol(0, 1, $myrow['name']); + $rep->TextCol(1, 2, _('Price List') . ": " . $myrow['sales_type']); + $rep->TextCol(2, 3, $myrow['br_name']); + $rep->NewLine(); + $adr = Explode("\n", $myrow['address']); + $adr2 = Explode("\n", $myrow['br_address']); + $count1 = count($adr); + $count2 = count($adr2); + $count1 = max($count1, $count2); + if (isset($adr[0])) + $rep->TextCol(0, 1, $adr[0]); + if ($more != 0.0 || $less != 0.0) + $rep->TextCol(1, 2, _('Turnover') . ": " . number_format2($turnover, $dec)); + if (isset($contacts[0])) + $rep->TextCol(2, 3, $contacts[0]['name']); + if (isset($adr2[0])) + $rep->TextCol(3, 4, $adr2[0]); + $rep->NewLine(); + if (isset($adr[1])) + $rep->TextCol(0, 1, $adr[1]); + if (isset($contacts[0])) + $rep->TextCol(2, 3, _('Ph') . ": " . $contacts[0]['phone']); + if (isset($adr2[1])) + $rep->TextCol(3, 4, $adr2[1]); + $rep->NewLine(); + if (isset($adr[2])) + $rep->TextCol(0, 1, $adr[2]); + if (isset($contacts[0])) + $rep->TextCol(2, 3, _('Fax') . ": " . $contacts[0]['fax']); + if (isset($adr2[2])) + $rep->TextCol(3, 4, $adr2[2]); + for ($i = 3; $i < $count1; $i++) + { + $rep->NewLine(); + if (isset($adr[$i])) + $rep->TextCol(0, 1, $adr[$i]); + if (isset($adr2[$i])) + $rep->TextCol(0, 1, $adr2[$i]); + } + $rep->NewLine(); + /* $rep->TextCol(0, 1, $myrow['name']); $adr = Explode("\n", $myrow['address']); $count1 = count($adr); for ($i = 0; $i < $count1; $i++) $rep->TextCol(0, 1, $adr[$i], 0, ($i + 1) * $rep->lineHeight); - $count1++; + $count1++; $rep->TextCol(1, 2, _('Price List') . ": " . $myrow['sales_type']); if ($more != 0.0 || $less != 0.0) $rep->TextCol(1, 2, _('Turnover') . ": " . number_format2($turnover, $dec), 0, $rep->lineHeight); $rep->TextCol(2, 3, $myrow['br_name']); - $rep->TextCol(2, 3, $myrow['contact_name'], 0, $rep->lineHeight); - $rep->TextCol(2, 3, _('Ph') . ": " . $myrow['phone'], 0, 2 * $rep->lineHeight); - $rep->TextCol(2, 3, _('Fax') . ": " . $myrow['fax'], 0, 3 * $rep->lineHeight); + + $contacts = get_branch_contacts($myrow['branch_code']); + if (isset($contacts[0])) + { + $rep->TextCol(2, 3, $contacts[0]['name'], 0, $rep->lineHeight); + $rep->TextCol(2, 3, _('Ph') . ": " . $contacts[0]['phone'], 0, 2 * $rep->lineHeight); + $rep->TextCol(2, 3, _('Fax') . ": " . $contacts[0]['fax'], 0, 3 * $rep->lineHeight); + } $adr = Explode("\n", $myrow['br_address']); $count2 = count($adr); for ($i = 0; $i < $count2; $i++) $rep->TextCol(3, 4, $adr[$i], 0, ($i + 1) * $rep->lineHeight); - $rep->TextCol(3, 4, $myrow['email'], 0, ($count2 + 1) * $rep->lineHeight); + //$rep->TextCol(3, 4, $myrow['email'], 0, ($count2 + 1) * $rep->lineHeight); $count2++; $count1 = Max($count1, $count2); $count1 = Max($count1, 4); - $rep->NewLine($count1); + $rep->NewLine($count3); + */ $rep->Line($rep->row + 8); $rep->NewLine(0, 3); } diff --git a/reporting/rep104.php b/reporting/rep104.php index b7888ad7..a9bec54b 100644 --- a/reporting/rep104.php +++ b/reporting/rep104.php @@ -1,12 +1,12 @@ . ***********************************************************************/ $page_security = 'SA_PRICEREP'; @@ -34,7 +34,7 @@ function fetch_items($category=0) { $sql = "SELECT ".TB_PREF."stock_master.stock_id, ".TB_PREF."stock_master.description AS name, ".TB_PREF."stock_master.material_cost+".TB_PREF."stock_master.labour_cost+".TB_PREF."stock_master.overhead_cost AS Standardcost, - ".TB_PREF."stock_master.category_id, + ".TB_PREF."stock_master.category_id,".TB_PREF."stock_master.units, ".TB_PREF."stock_category.description FROM ".TB_PREF."stock_master, ".TB_PREF."stock_category @@ -66,7 +66,7 @@ function get_kits($category=0) function print_price_listing() { - global $comp_path, $path_to_root, $pic_height, $pic_width; + global $path_to_root, $pic_height, $pic_width; $currency = $_POST['PARAM_0']; $category = $_POST['PARAM_1']; @@ -104,11 +104,11 @@ function print_price_listing() else $GP = _('Yes'); - $cols = array(0, 100, 385, 450, 515); + $cols = array(0, 100, 360, 385, 450, 515); - $headers = array(_('Category/Items'), _('Description'), _('Price'), _('GP %')); + $headers = array(_('Category/Items'), _('Description'), _('UOM'), _('Price'), _('GP %')); - $aligns = array('left', 'left', 'right', 'right'); + $aligns = array('left', 'left', 'left', 'right', 'right'); $params = array( 0 => $comments, 1 => array('text' => _('Currency'), 'from' => $curr_sel, 'to' => ''), @@ -125,7 +125,7 @@ function print_price_listing() $rep->Font(); $rep->Info($params, $cols, $headers, $aligns); - $rep->Header(); + $rep->NewPage(); $result = fetch_items($category); @@ -146,8 +146,9 @@ function print_price_listing() $rep->NewLine(); $rep->TextCol(0, 1, $myrow['stock_id']); $rep->TextCol(1, 2, $myrow['name']); + $rep->TextCol(2, 3, $myrow['units']); $price = get_price($myrow['stock_id'], $currency, $salestype); - $rep->AmountCol(2, 3, $price, $dec); + $rep->AmountCol(3, 4, $price, $dec); if ($showGP) { $price2 = get_price($myrow['stock_id'], $home_curr, $salestype); @@ -155,17 +156,17 @@ function print_price_listing() $disp = ($price2 - $myrow['Standardcost']) * 100 / $price2; else $disp = 0.0; - $rep->TextCol(3, 4, number_format2($disp, user_percent_dec()) . " %"); + $rep->TextCol(4, 5, number_format2($disp, user_percent_dec()) . " %"); } if ($pictures) { - $image = $comp_path . '/'. $user_comp . "/images/" + $image = company_path(). "/images/" . item_img_name($myrow['stock_id']) . ".jpg"; if (file_exists($image)) { $rep->NewLine(); if ($rep->row - $pic_height < $rep->bottomMargin) - $rep->Header(); + $rep->NewPage(); $rep->AddImage($image, $rep->cols[1], $rep->row - $pic_height, 0, $pic_height); $rep->row -= $pic_height; $rep->NewLine(); @@ -189,7 +190,7 @@ function print_price_listing() $rep->fontSize += 2; $rep->TextCol(0, 3, _("Sales Kits")); $rep->fontSize -= 2; - } + } $rep->Line($rep->row - $rep->lineHeight); $rep->NewLine(2); $rep->fontSize += 2; @@ -200,9 +201,9 @@ function print_price_listing() } $rep->NewLine(); $rep->TextCol(0, 1, $myrow['kit_code']); - $rep->TextCol(1, 2, $myrow['kit_name']); + $rep->TextCol(1, 3, $myrow['kit_name']); $price = get_kit_price($myrow['kit_code'], $currency, $salestype); - $rep->AmountCol(2, 3, $price, $dec); + $rep->AmountCol(3, 4, $price, $dec); $rep->NewLine(0, 1); } $rep->Line($rep->row - 4); diff --git a/reporting/rep105.php b/reporting/rep105.php index 6b391a63..ad6e6ce4 100644 --- a/reporting/rep105.php +++ b/reporting/rep105.php @@ -125,7 +125,7 @@ function print_order_status_list() $rep->Font(); $rep->Info($params, $cols, $headers, $aligns, $cols2, $headers2, $aligns2); - $rep->Header(); + $rep->NewPage(); $orderno = 0; $result = GetSalesOrders($from, $to, $category, $location, $backorder); @@ -135,7 +135,7 @@ function print_order_status_list() if ($rep->row < $rep->bottomMargin + (2 * $rep->lineHeight)) { $orderno = 0; - $rep->Header(); + $rep->NewPage(); } $rep->NewLine(0, 2, false, $orderno); if ($orderno != $myrow['order_no']) @@ -171,7 +171,7 @@ function print_order_status_list() if ($rep->row < $rep->bottomMargin + (2 * $rep->lineHeight)) { $orderno = 0; - $rep->Header(); + $rep->NewPage(); } } $rep->Line($rep->row); diff --git a/reporting/rep106.php b/reporting/rep106.php index 4aac08ab..42a02083 100644 --- a/reporting/rep106.php +++ b/reporting/rep106.php @@ -97,7 +97,7 @@ function print_salesman_list() $rep->Font(); $rep->Info($params, $cols, $headers, $aligns, $cols2, $headers2, $aligns2); - $rep->Header(); + $rep->NewPage(); $salesman = 0; $subtotal = $total = $subprov = $provtotal = 0; @@ -108,7 +108,7 @@ function print_salesman_list() if ($rep->row < $rep->bottomMargin + (2 * $rep->lineHeight)) { $salesman = 0; - $rep->Header(); + $rep->NewPage(); } $rep->NewLine(0, 2, false, $salesman); if ($salesman != $myrow['salesman_code']) @@ -155,7 +155,7 @@ function print_salesman_list() if ($rep->row < $rep->bottomMargin + (2 * $rep->lineHeight)) { $salesman = 0; - $rep->Header(); + $rep->NewPage(); } } $subtotal += $amt; diff --git a/reporting/rep107.php b/reporting/rep107.php index e9df284d..1f081ee2 100644 --- a/reporting/rep107.php +++ b/reporting/rep107.php @@ -32,7 +32,7 @@ print_invoices(); function print_invoices() { - global $path_to_root; + global $path_to_root, $alternative_tax_include_on_docs, $suppress_tax_rates; include_once($path_to_root . "/reporting/includes/pdf_report.inc"); @@ -64,6 +64,7 @@ function print_invoices() if ($email == 0) { $rep = new FrontReport(_('INVOICE'), "InvoiceBulk", user_pagesize()); + $rep->SetHeaderType('Header2'); $rep->currency = $cur; $rep->Font(); $rep->Info($params, $cols, null, $aligns); @@ -91,6 +92,7 @@ function print_invoices() if ($email == 1) { $rep = new FrontReport("", "", user_pagesize()); + $rep->SetHeaderType('Header2'); $rep->currency = $cur; $rep->Font(); if ($j == ST_SALESINVOICE) @@ -107,7 +109,9 @@ function print_invoices() } else $rep->title = ($j == ST_SALESINVOICE) ? _('INVOICE') : _('CREDIT NOTE'); - $rep->Header2($myrow, $branch, $sales_order, $baccount, $j); + $contacts = get_branch_contacts($branch['branch_code'], 'invoice', $branch['debtor_no']); + $rep->SetCommonData($myrow, $branch, $sales_order, $baccount, $j, $contacts); + $rep->NewPage(); $result = get_customer_trans_details($j, $i); $SubTotal = 0; @@ -139,7 +143,7 @@ function print_invoices() $rep->row = $newrow; //$rep->NewLine(1); if ($rep->row < $rep->bottomMargin + (15 * $rep->lineHeight)) - $rep->Header2($myrow, $branch, $sales_order, $baccount,$j); + $rep->NewPage(); } $comments = get_comments($j, $i); @@ -156,14 +160,7 @@ function print_invoices() $rep->row = $rep->bottomMargin + (15 * $rep->lineHeight); $linetype = true; $doctype = $j; - if ($rep->currency != $myrow['curr_code']) - { - include($path_to_root . "/reporting/includes/doctext2.inc"); - } - else - { - include($path_to_root . "/reporting/includes/doctext.inc"); - } + include($path_to_root . "/reporting/includes/doctext.inc"); $rep->TextCol(3, 6, $doc_Sub_total, -2); $rep->TextCol(6, 7, $DisplaySubTot, -2); @@ -172,19 +169,36 @@ function print_invoices() $rep->TextCol(6, 7, $DisplayFreight, -2); $rep->NewLine(); $tax_items = get_trans_tax_details($j, $i); + $first = true; while ($tax_item = db_fetch($tax_items)) { $DisplayTax = number_format2($sign*$tax_item['amount'], $dec); + + if (isset($suppress_tax_rates) && $suppress_tax_rates == 1) + $tax_type_name = $tax_item['tax_type_name']; + else + $tax_type_name = $tax_item['tax_type_name']." (".$tax_item['rate']."%) "; if ($tax_item['included_in_price']) { - $rep->TextCol(3, 7, $doc_Included . " " . $tax_item['tax_type_name'] . - " (" . $tax_item['rate'] . "%) " . $doc_Amount . ": " . $DisplayTax, -2); + if (isset($alternative_tax_include_on_docs) && $alternative_tax_include_on_docs == 1) + { + if ($first) + { + $rep->TextCol(3, 6, _("Total Tax Excluded"), -2); + $rep->TextCol(6, 7, number_format2($sign*$tax_item['net_amount'], $dec), -2); + $rep->NewLine(); + } + $rep->TextCol(3, 6, $tax_type_name, -2); + $rep->TextCol(6, 7, $DisplayTax, -2); + $first = false; + } + else + $rep->TextCol(3, 7, $doc_Included . " " . $tax_type_name . $doc_Amount . ": " . $DisplayTax, -2); } else { - $rep->TextCol(3, 6, $tax_item['tax_type_name'] . " (" . - $tax_item['rate'] . "%)", -2); + $rep->TextCol(3, 6, $tax_type_name, -2); $rep->TextCol(6, 7, $DisplayTax, -2); } $rep->NewLine(); @@ -205,11 +219,6 @@ function print_invoices() if ($email == 1) { $myrow['dimension_id'] = $paylink; // helper for pmt link - if ($myrow['email'] == '') - { - $myrow['email'] = $branch['email']; - $myrow['DebtorName'] = $branch['br_name']; - } $rep->End($email, $doc_Invoice_no . " " . $myrow['reference'], $myrow, $j); } } diff --git a/reporting/rep108.php b/reporting/rep108.php index f4a8aa32..0247f7cc 100644 --- a/reporting/rep108.php +++ b/reporting/rep108.php @@ -1,12 +1,12 @@ . ***********************************************************************/ $page_security = 'SA_CUSTSTATREP'; @@ -22,6 +22,7 @@ include_once($path_to_root . "/includes/session.inc"); include_once($path_to_root . "/includes/date_functions.inc"); include_once($path_to_root . "/includes/data_checks.inc"); include_once($path_to_root . "/sales/includes/sales_db.inc"); +include_once($path_to_root . "/includes/db/crm_contacts_db.inc"); //---------------------------------------------------------------------------------------------------- @@ -29,10 +30,10 @@ print_statements(); //---------------------------------------------------------------------------------------------------- -function getTransactions($debtorno, $date) +function getTransactions($debtorno, $date, $outstanding) { $sql = "SELECT ".TB_PREF."debtor_trans.*, - (".TB_PREF."debtor_trans.ov_amount + ".TB_PREF."debtor_trans.ov_gst + ".TB_PREF."debtor_trans.ov_freight + + (".TB_PREF."debtor_trans.ov_amount + ".TB_PREF."debtor_trans.ov_gst + ".TB_PREF."debtor_trans.ov_freight + ".TB_PREF."debtor_trans.ov_freight_tax + ".TB_PREF."debtor_trans.ov_discount) AS TotalAmount, ".TB_PREF."debtor_trans.alloc AS Allocated, ((".TB_PREF."debtor_trans.type = ".ST_SALESINVOICE.") @@ -40,9 +41,12 @@ function getTransactions($debtorno, $date) FROM ".TB_PREF."debtor_trans WHERE ".TB_PREF."debtor_trans.tran_date <= '$date' AND ".TB_PREF."debtor_trans.debtor_no = ".db_escape($debtorno)." AND ".TB_PREF."debtor_trans.type <> ".ST_CUSTDELIVERY." - AND (".TB_PREF."debtor_trans.ov_amount + ".TB_PREF."debtor_trans.ov_gst + ".TB_PREF."debtor_trans.ov_freight + - ".TB_PREF."debtor_trans.ov_freight_tax + ".TB_PREF."debtor_trans.ov_discount) != 0 - ORDER BY ".TB_PREF."debtor_trans.tran_date"; + AND (".TB_PREF."debtor_trans.ov_amount + ".TB_PREF."debtor_trans.ov_gst + ".TB_PREF."debtor_trans.ov_freight + + ".TB_PREF."debtor_trans.ov_freight_tax + ".TB_PREF."debtor_trans.ov_discount) != 0"; + if ($outstanding) + $sql .= " AND ABS(".TB_PREF."debtor_trans.ov_amount + ".TB_PREF."debtor_trans.ov_gst + ".TB_PREF."debtor_trans.ov_freight + + ".TB_PREF."debtor_trans.ov_freight_tax + ".TB_PREF."debtor_trans.ov_discount) - alloc <> 0"; + $sql .= " ORDER BY ".TB_PREF."debtor_trans.tran_date"; return db_query($sql,"No transactions were returned"); } @@ -57,8 +61,9 @@ function print_statements() $customer = $_POST['PARAM_0']; $currency = $_POST['PARAM_1']; - $email = $_POST['PARAM_2']; - $comments = $_POST['PARAM_3']; + $outstanding = $_POST['PARAM_2']; + $email = $_POST['PARAM_3']; + $comments = $_POST['PARAM_4']; $dec = user_price_dec(); @@ -77,12 +82,13 @@ function print_statements() if ($email == 0) { $rep = new FrontReport(_('STATEMENT'), "StatementBulk", user_pagesize()); + $rep->SetHeaderType('Header2'); $rep->currency = $cur; $rep->Font(); $rep->Info($params, $cols, null, $aligns); } - $sql = "SELECT debtor_no, name AS DebtorName, address, tax_id, email, curr_code, curdate() AS tran_date, payment_terms FROM ".TB_PREF."debtors_master"; + $sql = "SELECT debtor_no, name AS DebtorName, address, tax_id, curr_code, curdate() AS tran_date FROM ".TB_PREF."debtors_master"; if ($customer != ALL_NUMERIC) $sql .= " WHERE debtor_no = ".db_escape($customer); else @@ -95,7 +101,7 @@ function print_statements() $myrow['order_'] = ""; - $TransResult = getTransactions($myrow['debtor_no'], $date); + $TransResult = getTransactions($myrow['debtor_no'], $date, $outstanding); $baccount = get_default_bank_account($myrow['curr_code']); $params['bankaccount'] = $baccount['id']; if (db_num_rows($TransResult) == 0) @@ -103,24 +109,21 @@ function print_statements() if ($email == 1) { $rep = new FrontReport("", "", user_pagesize()); + $rep->SetHeaderType('Header2'); $rep->currency = $cur; $rep->Font(); $rep->title = _('STATEMENT'); $rep->filename = "Statement" . $myrow['debtor_no'] . ".pdf"; $rep->Info($params, $cols, null, $aligns); } - $rep->Header2($myrow, null, null, $baccount, ST_STATEMENT); + $contacts = get_customer_contacts($myrow['debtor_no'], 'invoice'); + //= get_branch_contacts($branch['branch_code'], 'invoice', $branch['debtor_no']); + $rep->SetCommonData($myrow, null, null, $baccount, ST_STATEMENT, $contacts); + $rep->NewPage(); $rep->NewLine(); $linetype = true; $doctype = ST_STATEMENT; - if ($rep->currency != $myrow['curr_code']) - { - include($path_to_root . "/reporting/includes/doctext2.inc"); - } - else - { - include($path_to_root . "/reporting/includes/doctext.inc"); - } + include($path_to_root . "/reporting/includes/doctext.inc"); $rep->fontSize += 2; $rep->TextCol(0, 8, $doc_Outstanding); $rep->fontSize -= 2; @@ -136,7 +139,7 @@ function print_statements() $rep->TextCol(2, 3, sql2date($myrow2['tran_date']), -2); if ($myrow2['type'] == ST_SALESINVOICE) $rep->TextCol(3, 4, sql2date($myrow2['due_date']), -2); - if ($myrow2['type'] == ST_SALESINVOICE) + if ($myrow2['type'] == ST_SALESINVOICE || $myrow2['type'] == ST_BANKPAYMENT) $rep->TextCol(4, 5, $DisplayTotal, -2); else $rep->TextCol(5, 6, $DisplayTotal, -2); @@ -144,7 +147,7 @@ function print_statements() $rep->TextCol(7, 8, $DisplayNet, -2); $rep->NewLine(); if ($rep->row < $rep->bottomMargin + (10 * $rep->lineHeight)) - $rep->Header2($myrow, null, null, $baccount, ST_STATEMENT); + $rep->NewPage(); } $nowdue = "1-" . $PastDueDays1 . " " . $doc_Days; $pastdue1 = $PastDueDays1 + 1 . "-" . $PastDueDays2 . " " . $doc_Days; diff --git a/reporting/rep109.php b/reporting/rep109.php index 2c3bb116..845d0ac7 100644 --- a/reporting/rep109.php +++ b/reporting/rep109.php @@ -23,6 +23,7 @@ include_once($path_to_root . "/includes/session.inc"); include_once($path_to_root . "/includes/date_functions.inc"); include_once($path_to_root . "/includes/data_checks.inc"); include_once($path_to_root . "/sales/includes/sales_db.inc"); +include_once($path_to_root . "/taxes/tax_calc.inc"); //---------------------------------------------------------------------------------------------------- @@ -64,6 +65,7 @@ function print_sales_orders() $rep = new FrontReport(_("SALES ORDER"), "SalesOrderBulk", user_pagesize()); else $rep = new FrontReport(_("QUOTE"), "QuoteBulk", user_pagesize()); + $rep->SetHeaderType('Header2'); $rep->currency = $cur; $rep->Font(); $rep->Info($params, $cols, null, $aligns); @@ -78,6 +80,7 @@ function print_sales_orders() if ($email == 1) { $rep = new FrontReport("", "", user_pagesize()); + $rep->SetHeaderType('Header2'); $rep->currency = $cur; $rep->Font(); if ($print_as_quote == 1) @@ -94,14 +97,20 @@ function print_sales_orders() } else $rep->title = ($print_as_quote==1 ? _("QUOTE") : _("SALES ORDER")); - $rep->Header2($myrow, $branch, $myrow, $baccount, ST_SALESORDER); + + $contacts = get_branch_contacts($branch['branch_code'], 'order', $branch['debtor_no']); + $rep->SetCommonData($myrow, $branch, $myrow, $baccount, ST_SALESORDER, $contacts); + $rep->NewPage(); $result = get_sales_order_details($i, ST_SALESORDER); $SubTotal = 0; + $items = $prices = array(); while ($myrow2=db_fetch($result)) { $Net = round2(((1 - $myrow2["discount_percent"]) * $myrow2["unit_price"] * $myrow2["quantity"]), user_price_dec()); + $prices[] = $Net; + $items[] = $myrow2['stk_code']; $SubTotal += $Net; $DisplayPrice = number_format2($myrow2["unit_price"],$dec); $DisplayQty = number_format2($myrow2["quantity"],get_qty_dec($myrow2['stk_code'])); @@ -123,7 +132,7 @@ function print_sales_orders() $rep->row = $newrow; //$rep->NewLine(1); if ($rep->row < $rep->bottomMargin + (15 * $rep->lineHeight)) - $rep->Header2($myrow, $branch, $myrow, $baccount, ST_SALESORDER); + $rep->NewPage(); } if ($myrow['comments'] != "") { @@ -136,14 +145,7 @@ function print_sales_orders() $rep->row = $rep->bottomMargin + (15 * $rep->lineHeight); $linetype = true; $doctype = ST_SALESORDER; - if ($rep->currency != $myrow['curr_code']) - { - include($path_to_root . "/reporting/includes/doctext2.inc"); - } - else - { - include($path_to_root . "/reporting/includes/doctext.inc"); - } + include($path_to_root . "/reporting/includes/doctext.inc"); $rep->TextCol(3, 6, $doc_Sub_total, -2); $rep->TextCol(6, 7, $DisplaySubTot, -2); @@ -151,12 +153,57 @@ function print_sales_orders() $rep->TextCol(3, 6, $doc_Shipping, -2); $rep->TextCol(6, 7, $DisplayFreight, -2); $rep->NewLine(); + $DisplayTotal = number_format2($myrow["freight_cost"] + $SubTotal, $dec); - $rep->Font('bold'); - if ($myrow['tax_included'] == 0) + if ($myrow['tax_included'] == 0) { $rep->TextCol(3, 6, $doc_TOTAL_ORDER, - 2); - else - $rep->TextCol(3, 6, $doc_TOTAL_ORDER2, - 2); + $rep->TextCol(6, 7, $DisplayTotal, -2); + $rep->NewLine(); + } + + $tax_items = get_tax_for_items($items, $prices, $myrow["freight_cost"], + $myrow['tax_group_id'], $myrow['tax_included'], null); + $first = true; + foreach($tax_items as $tax_item) + { + $DisplayTax = number_format2($tax_item['Value'], $dec); + + if (isset($suppress_tax_rates) && $suppress_tax_rates == 1) + $tax_type_name = $tax_item['tax_type_name']; + else + $tax_type_name = $tax_item['tax_type_name']." (".$tax_item['rate']."%) "; + + if ($myrow['tax_included']) + { + if (isset($alternative_tax_include_on_docs) && $alternative_tax_include_on_docs == 1) + { + if ($first) + { + $rep->TextCol(3, 6, _("Total Tax Excluded"), -2); + $rep->TextCol(6, 7, number_format2($sign*$tax_item['net_amount'], $dec), -2); + $rep->NewLine(); + } + $rep->TextCol(3, 6, $tax_type_name, -2); + $rep->TextCol(6, 7, $DisplayTax, -2); + $first = false; + } + else + $rep->TextCol(3, 7, $doc_Included . " " . $tax_type_name . $doc_Amount . ": " . $DisplayTax, -2); + } + else + { + $SubTotal += $tax_item['Value']; + $rep->TextCol(3, 6, $tax_type_name, -2); + $rep->TextCol(6, 7, $DisplayTax, -2); + } + $rep->NewLine(); + } + + $rep->NewLine(); + + $DisplayTotal = number_format2($myrow["freight_cost"] + $SubTotal, $dec); + $rep->Font('bold'); + $rep->TextCol(3, 6, $doc_TOTAL_ORDER2, - 2); $rep->TextCol(6, 7, $DisplayTotal, -2); $words = price_in_words($myrow["freight_cost"] + $SubTotal, ST_SALESORDER); if ($words != "") @@ -167,14 +214,6 @@ function print_sales_orders() $rep->Font(); if ($email == 1) { - if ($myrow['contact_email'] == '') - { - $myrow['contact_email'] = $branch['email']; - if ($myrow['contact_email'] == '') - $myrow['contact_email'] = $myrow['master_email']; - $myrow['DebtorName'] = $branch['br_name']; - } - //$myrow['reference'] = $i; $rep->End($email, $doc_Invoice_no . " " . $i, $myrow); } } diff --git a/reporting/rep110.php b/reporting/rep110.php index 9f418f7c..6b392cd0 100644 --- a/reporting/rep110.php +++ b/reporting/rep110.php @@ -34,7 +34,7 @@ print_deliveries(); function print_deliveries() { - global $path_to_root, $packing_slip; + global $path_to_root, $packing_slip, $alternative_tax_include_on_docs, $suppress_tax_rates; include_once($path_to_root . "/reporting/includes/pdf_report.inc"); @@ -68,6 +68,7 @@ function print_deliveries() $rep = new FrontReport(_('DELIVERY'), "DeliveryNoteBulk", user_pagesize()); else $rep = new FrontReport(_('PACKING SLIP'), "PackingSlipBulk", user_pagesize()); + $rep->SetHeaderType('Header2'); $rep->currency = $cur; $rep->Font(); $rep->Info($params, $cols, null, $aligns); @@ -83,6 +84,7 @@ function print_deliveries() if ($email == 1) { $rep = new FrontReport("", "", user_pagesize()); + $rep->SetHeaderType('Header2'); $rep->currency = $cur; $rep->Font(); if ($packing_slip == 0) @@ -99,7 +101,9 @@ function print_deliveries() } else $rep->title = _('DELIVERY NOTE'); - $rep->Header2($myrow, $branch, $sales_order, '', ST_CUSTDELIVERY); + $contacts = get_branch_contacts($branch['branch_code'], 'delivery', $branch['debtor_no']); + $rep->SetCommonData($myrow, $branch, $sales_order, '', ST_CUSTDELIVERY, $contacts); + $rep->NewPage(); $result = get_customer_trans_details(ST_CUSTDELIVERY, $i); $SubTotal = 0; @@ -134,7 +138,7 @@ function print_deliveries() $rep->row = $newrow; //$rep->NewLine(1); if ($rep->row < $rep->bottomMargin + (15 * $rep->lineHeight)) - $rep->Header2($myrow, $branch, $sales_order,'',ST_CUSTDELIVERY); + $rep->NewPage(); } $comments = get_comments(ST_CUSTDELIVERY, $i); @@ -151,14 +155,7 @@ function print_deliveries() $rep->row = $rep->bottomMargin + (15 * $rep->lineHeight); $linetype = true; $doctype=ST_CUSTDELIVERY; - if ($rep->currency != $myrow['curr_code']) - { - include($path_to_root . "/reporting/includes/doctext2.inc"); - } - else - { - include($path_to_root . "/reporting/includes/doctext.inc"); - } + include($path_to_root . "/reporting/includes/doctext.inc"); if ($packing_slip == 0) { $rep->TextCol(3, 6, $doc_Sub_total, -2); @@ -168,18 +165,36 @@ function print_deliveries() $rep->TextCol(6, 7, $DisplayFreight, -2); $rep->NewLine(); $tax_items = get_trans_tax_details(ST_CUSTDELIVERY, $i); + $first = true; while ($tax_item = db_fetch($tax_items)) { $DisplayTax = number_format2($tax_item['amount'], $dec); - if ($tax_item['included_in_price']) + + if (isset($suppress_tax_rates) && $suppress_tax_rates == 1) + $tax_type_name = $tax_item['tax_type_name']; + else + $tax_type_name = $tax_item['tax_type_name']." (".$tax_item['rate']."%) "; + + if ($tax_item['included_in_price']) { - $rep->TextCol(3, 7, $doc_Included . " " . $tax_item['tax_type_name'] . - " (" . $tax_item['rate'] . "%) " . $doc_Amount . ": " . $DisplayTax, -2); + if (isset($alternative_tax_include_on_docs) && $alternative_tax_include_on_docs == 1) + { + if ($first) + { + $rep->TextCol(3, 6, _("Total Tax Excluded"), -2); + $rep->TextCol(6, 7, number_format2($tax_item['net_amount'], $dec), -2); + $rep->NewLine(); + } + $rep->TextCol(3, 6, $tax_type_name, -2); + $rep->TextCol(6, 7, $DisplayTax, -2); + $first = false; + } + else + $rep->TextCol(3, 7, $doc_Included . " " . $tax_type_name . $doc_Amount . ": " . $DisplayTax, -2); } else { - $rep->TextCol(3, 6, $tax_item['tax_type_name'] . " (" . - $tax_item['rate'] . "%)", -2); + $rep->TextCol(3, 6, $tax_type_name, -2); $rep->TextCol(6, 7, $DisplayTax, -2); } $rep->NewLine(); @@ -200,11 +215,6 @@ function print_deliveries() } if ($email == 1) { - if ($myrow['email'] == '') - { - $myrow['email'] = $branch['email']; - $myrow['DebtorName'] = $branch['br_name']; - } $rep->End($email, $doc_Delivery_no . " " . $myrow['reference'], $myrow, ST_CUSTDELIVERY); } } diff --git a/reporting/rep111.php b/reporting/rep111.php index 5db2f9d0..02285fca 100644 --- a/reporting/rep111.php +++ b/reporting/rep111.php @@ -30,7 +30,7 @@ print_sales_quotations(); function print_sales_quotations() { - global $path_to_root, $print_as_quote; + global $path_to_root, $print_as_quote, $print_invoice_no; include_once($path_to_root . "/reporting/includes/pdf_report.inc"); @@ -58,6 +58,7 @@ function print_sales_quotations() if ($email == 0) { $rep = new FrontReport(_("SALES QUOTATION"), "SalesQuotationBulk", user_pagesize()); + $rep->SetHeaderType('Header2'); $rep->currency = $cur; $rep->Font(); $rep->Info($params, $cols, null, $aligns); @@ -72,13 +73,20 @@ function print_sales_quotations() if ($email == 1) { $rep = new FrontReport("", "", user_pagesize()); + $rep->SetHeaderType('Header2'); $rep->currency = $cur; $rep->Font(); - $rep->filename = "SalesQuotation" . $i . ".pdf"; + if ($print_invoice_no == 1) + $rep->filename = "SalesQuotation" . $i . ".pdf"; + else + $rep->filename = "SalesQuotation" . $myrow['reference'] . ".pdf"; $rep->Info($params, $cols, null, $aligns); } $rep->title = _("SALES QUOTATION"); - $rep->Header2($myrow, $branch, $myrow, $baccount, ST_SALESQUOTE); + $contacts = get_branch_contacts($branch['branch_code'], 'order', $branch['debtor_no']); + $rep->SetCommonData($myrow, $branch, $myrow, $baccount, ST_SALESQUOTE, $contacts); + //$rep->headerFunc = 'Header2'; + $rep->NewPage(); $result = get_sales_order_details($i, ST_SALESQUOTE); $SubTotal = 0; @@ -107,7 +115,7 @@ function print_sales_quotations() $rep->row = $newrow; //$rep->NewLine(1); if ($rep->row < $rep->bottomMargin + (15 * $rep->lineHeight)) - $rep->Header2($myrow, $branch, $myrow, $baccount, ST_SALESQUOTE); + $rep->NewPage(); } if ($myrow['comments'] != "") { @@ -120,14 +128,7 @@ function print_sales_quotations() $rep->row = $rep->bottomMargin + (15 * $rep->lineHeight); $linetype = true; $doctype = ST_SALESQUOTE; - if ($rep->currency != $myrow['curr_code']) - { - include($path_to_root . "/reporting/includes/doctext2.inc"); - } - else - { - include($path_to_root . "/reporting/includes/doctext.inc"); - } + include($path_to_root . "/reporting/includes/doctext.inc"); $rep->TextCol(3, 6, $doc_Sub_total, -2); $rep->TextCol(6, 7, $DisplaySubTot, -2); @@ -151,15 +152,9 @@ function print_sales_quotations() $rep->Font(); if ($email == 1) { - if ($myrow['contact_email'] == '') - { - $myrow['contact_email'] = $branch['email']; - if ($myrow['contact_email'] == '') - $myrow['contact_email'] = $myrow['master_email']; - $myrow['DebtorName'] = $branch['br_name']; - } - //$myrow['reference'] = $i; - $rep->End($email, $doc_Invoice_no . " " . $i, $myrow); + if ($print_invoice_no == 1) + $myrow['reference'] = $i; + $rep->End($email, $doc_Invoice_no . " " . $myrow['reference'], $myrow); } } if ($email == 0) diff --git a/reporting/rep112.php b/reporting/rep112.php index 87d87ce5..b5238a26 100644 --- a/reporting/rep112.php +++ b/reporting/rep112.php @@ -16,7 +16,7 @@ $page_security = $_POST['PARAM_0'] == $_POST['PARAM_1'] ? // $ Revision: 2.0 $ // Creator: Joe Hunt // date_: 2005-05-19 -// Title: Purchase Orders +// Title: Receipts // ---------------------------------------------------------------- $path_to_root=".."; @@ -35,9 +35,10 @@ function get_receipt($type, $trans_no) (".TB_PREF."debtor_trans.ov_amount + ".TB_PREF."debtor_trans.ov_gst + ".TB_PREF."debtor_trans.ov_freight + ".TB_PREF."debtor_trans.ov_freight_tax + ".TB_PREF."debtor_trans.ov_discount) AS Total, ".TB_PREF."debtors_master.name AS DebtorName, ".TB_PREF."debtors_master.debtor_ref, - ".TB_PREF."debtors_master.curr_code, ".TB_PREF."debtors_master.payment_terms, ".TB_PREF."debtors_master.tax_id AS tax_id, - ".TB_PREF."debtors_master.email, ".TB_PREF."debtors_master.address - FROM ".TB_PREF."debtor_trans, ".TB_PREF."debtors_master + ".TB_PREF."debtors_master.curr_code, ".TB_PREF."debtors_master.payment_terms, " + .TB_PREF."debtors_master.tax_id AS tax_id, + ".TB_PREF."debtors_master.address + FROM ".TB_PREF."debtor_trans, ".TB_PREF."debtors_master WHERE ".TB_PREF."debtor_trans.debtor_no = ".TB_PREF."debtors_master.debtor_no AND ".TB_PREF."debtor_trans.type = ".db_escape($type)." AND ".TB_PREF."debtor_trans.trans_no = ".db_escape($trans_no); @@ -89,6 +90,7 @@ function print_receipts() $cur = get_company_Pref('curr_default'); $rep = new FrontReport(_('RECEIPT'), "ReceiptBulk", user_pagesize()); + $rep->SetHeaderType('Header2'); $rep->currency = $cur; $rep->Font(); $rep->Info($params, $cols, null, $aligns); @@ -108,19 +110,14 @@ function print_receipts() $params['bankaccount'] = $baccount['id']; $rep->title = _('RECEIPT'); - $rep->Header2($myrow, null, $myrow, $baccount, ST_CUSTPAYMENT); + $contacts = get_branch_contacts($myrow['branch_code'], 'invoice', $myrow['debtor_no']); + $rep->SetCommonData($myrow, null, $myrow, $baccount, ST_CUSTPAYMENT, $contacts); + $rep->NewPage(); $result = get_allocations_for_receipt($myrow['debtor_no'], $myrow['type'], $myrow['trans_no']); $linetype = true; $doctype = ST_CUSTPAYMENT; - if ($rep->currency != $myrow['curr_code']) - { - include($path_to_root . "/reporting/includes/doctext2.inc"); - } - else - { - include($path_to_root . "/reporting/includes/doctext.inc"); - } + include($path_to_root . "/reporting/includes/doctext.inc"); $total_allocated = 0; $rep->TextCol(0, 4, $doc_Towards, -2); @@ -139,7 +136,7 @@ function print_receipts() $total_allocated += $myrow2['amt']; $rep->NewLine(1); if ($rep->row < $rep->bottomMargin + (15 * $rep->lineHeight)) - $rep->Header2($myrow, null, $myrow, $baccount, ST_CUSTPAYMENT); + $rep->NewPage(); } $rep->row = $rep->bottomMargin + (15 * $rep->lineHeight); diff --git a/reporting/rep201.php b/reporting/rep201.php index 567d12f1..1c1ee438 100644 --- a/reporting/rep201.php +++ b/reporting/rep201.php @@ -130,7 +130,7 @@ function print_supplier_balances() $rep->Font(); $rep->Info($params, $cols, $headers, $aligns); - $rep->Header(); + $rep->NewPage(); $total = array(); $grandtotal = array(0,0,0,0); diff --git a/reporting/rep202.php b/reporting/rep202.php index fc3c6f48..2eb27559 100644 --- a/reporting/rep202.php +++ b/reporting/rep202.php @@ -1,12 +1,12 @@ . ***********************************************************************/ $page_security = 'SA_SUPPLIERANALYTIC'; @@ -65,16 +65,17 @@ function get_invoices($supplier_id, $to) function print_aged_supplier_analysis() { - global $comp_path, $path_to_root, $systypes_array; + global $path_to_root, $systypes_array; - $to = $_POST['PARAM_0']; - $fromsupp = $_POST['PARAM_1']; - $currency = $_POST['PARAM_2']; + $to = $_POST['PARAM_0']; + $fromsupp = $_POST['PARAM_1']; + $currency = $_POST['PARAM_2']; $summaryOnly = $_POST['PARAM_3']; - $no_zeros = $_POST['PARAM_4']; - $graphics = $_POST['PARAM_5']; - $comments = $_POST['PARAM_6']; + $no_zeros = $_POST['PARAM_4']; + $graphics = $_POST['PARAM_5']; + $comments = $_POST['PARAM_6']; $destination = $_POST['PARAM_7']; + if ($destination) include_once($path_to_root . "/reporting/includes/excel_report.inc"); else @@ -130,9 +131,9 @@ function print_aged_supplier_analysis() $headers[2] = _('currency'); $rep = new FrontReport(_('Aged Supplier Analysis'), "AgedSupplierAnalysis", user_pagesize()); - $rep->Font(); - $rep->Info($params, $cols, $headers, $aligns); - $rep->Header(); + $rep->Font(); + $rep->Info($params, $cols, $headers, $aligns); + $rep->NewPage(); $total = array(); $total[0] = $total[1] = $total[2] = $total[3] = $total[4] = 0.0; @@ -235,16 +236,15 @@ function print_aged_supplier_analysis() $pg->type = $graphics; $pg->skin = $graph_skin; $pg->built_in = false; - $pg->fontfile = $path_to_root . "/reporting/fonts/Vera.ttf"; $pg->latin_notation = ($decseps[$_SESSION["wa_current_user"]->prefs->dec_sep()] != "."); - $filename = $comp_path.'/'.user_company(). "/pdf_files/test.png"; + $filename = company_path(). "/pdf_files/". uniqid("").".png"; $pg->display($filename, true); $w = $pg->width / 1.5; $h = $pg->height / 1.5; $x = ($rep->pageWidth - $w) / 2; $rep->NewLine(2); if ($rep->row - $h < $rep->bottomMargin) - $rep->Header(); + $rep->NewPage(); $rep->AddImage($filename, $x, $rep->row - $h, $w, $h); } $rep->End(); diff --git a/reporting/rep203.php b/reporting/rep203.php index b1a42730..e6f00ce8 100644 --- a/reporting/rep203.php +++ b/reporting/rep203.php @@ -103,7 +103,7 @@ function print_payment_report() $rep->Font(); $rep->Info($params, $cols, $headers, $aligns); - $rep->Header(); + $rep->NewPage(); $total = array(); $grandtotal = array(0,0); diff --git a/reporting/rep204.php b/reporting/rep204.php index 2c8250cd..61034d35 100644 --- a/reporting/rep204.php +++ b/reporting/rep204.php @@ -80,7 +80,7 @@ function print_outstanding_GRN() $cols = array(0, 40, 80, 190, 250, 320, 385, 450, 515); $headers = array(_('GRN'), _('Order'), _('Item') . '/' . _('Description'), _('Qty Recd'), _('qty Inv'), _('Balance'), - _('Std Cost'), _('Value')); + _('Act Price'), _('Value')); $aligns = array('left', 'left', 'left', 'right', 'right', 'right', 'right', 'right'); @@ -91,7 +91,7 @@ function print_outstanding_GRN() $rep->Font(); $rep->Info($params, $cols, $headers, $aligns); - $rep->Header(); + $rep->NewPage(); $Tot_Val=0; $Supplier = ''; @@ -122,9 +122,9 @@ function print_outstanding_GRN() $rep->AmountCol(3, 4, $GRNs['qty_recd'], $dec2); $rep->AmountCol(4, 5, $GRNs['quantity_inv'], $dec2); $QtyOstg = $GRNs['qty_recd'] - $GRNs['quantity_inv']; - $Value = ($GRNs['qty_recd'] - $GRNs['quantity_inv']) * $GRNs['std_cost_unit']; + $Value = ($GRNs['qty_recd'] - $GRNs['quantity_inv']) * $GRNs['act_price']; $rep->AmountCol(5, 6, $QtyOstg, $dec2); - $rep->AmountCol(6, 7, $GRNs['std_cost_unit'], $dec); + $rep->AmountCol(6, 7, $GRNs['act_price'], $dec); $rep->AmountCol(7, 8, $Value, $dec); $Tot_Val += $Value; $SuppTot_Val += $Value; diff --git a/reporting/rep209.php b/reporting/rep209.php index 55153ee0..1d297de5 100644 --- a/reporting/rep209.php +++ b/reporting/rep209.php @@ -1,12 +1,12 @@ . ***********************************************************************/ @@ -23,6 +23,8 @@ $path_to_root=".."; include_once($path_to_root . "/includes/session.inc"); include_once($path_to_root . "/includes/date_functions.inc"); include_once($path_to_root . "/includes/data_checks.inc"); +include_once($path_to_root . "/includes/db/crm_contacts_db.inc"); +include_once($path_to_root . "/taxes/tax_calc.inc"); //---------------------------------------------------------------------------------------------------- @@ -31,9 +33,10 @@ print_po(); //---------------------------------------------------------------------------------------------------- function get_po($order_no) { - $sql = "SELECT ".TB_PREF."purch_orders.*, ".TB_PREF."suppliers.supp_name, ".TB_PREF."suppliers.supp_account_no, + $sql = "SELECT ".TB_PREF."purch_orders.*, ".TB_PREF."suppliers.supp_name, " + .TB_PREF."suppliers.supp_account_no,".TB_PREF."suppliers.tax_included, ".TB_PREF."suppliers.curr_code, ".TB_PREF."suppliers.payment_terms, ".TB_PREF."locations.location_name, - ".TB_PREF."suppliers.email, ".TB_PREF."suppliers.address, ".TB_PREF."suppliers.contact + ".TB_PREF."suppliers.address, ".TB_PREF."suppliers.contact, ".TB_PREF."suppliers.tax_group_id FROM ".TB_PREF."purch_orders, ".TB_PREF."suppliers, ".TB_PREF."locations WHERE ".TB_PREF."purch_orders.supplier_id = ".TB_PREF."suppliers.supplier_id AND ".TB_PREF."locations.loc_code = into_stock_location @@ -83,6 +86,7 @@ function print_po() if ($email == 0) { $rep = new FrontReport(_('PURCHASE ORDER'), "PurchaseOrderBulk", user_pagesize()); + $rep->SetHeaderType('Header2'); $rep->currency = $cur; $rep->Font(); $rep->Info($params, $cols, null, $aligns); @@ -97,6 +101,7 @@ function print_po() if ($email == 1) { $rep = new FrontReport("", "", user_pagesize()); + $rep->SetHeaderType('Header2'); $rep->currency = $cur; $rep->Font(); $rep->title = _('PURCHASE ORDER'); @@ -105,10 +110,13 @@ function print_po() } else $rep->title = _('PURCHASE ORDER'); - $rep->Header2($myrow, null, $myrow, $baccount, ST_PURCHORDER); + $contacts = get_supplier_contacts($myrow['supplier_id'], 'order'); + $rep->SetCommonData($myrow, null, $myrow, $baccount, ST_PURCHORDER, $contacts); + $rep->NewPage(); $result = get_po_details($i); $SubTotal = 0; + $items = $prices = array(); while ($myrow2=db_fetch($result)) { $data = get_purchase_data($myrow['supplier_id'], $myrow2['item_code']); @@ -123,8 +131,10 @@ function print_po() $myrow2['unit_price'] = round2($myrow2['unit_price'] * $data['conversion_factor'], user_price_dec()); $myrow2['quantity_ordered'] = round2($myrow2['quantity_ordered'] / $data['conversion_factor'], user_qty_dec()); } - } + } $Net = round2(($myrow2["unit_price"] * $myrow2["quantity_ordered"]), user_price_dec()); + $prices[] = $Net; + $items[] = $myrow2['item_code']; $SubTotal += $Net; $dec2 = 0; $DisplayPrice = price_decimal_format($myrow2["unit_price"],$dec2); @@ -139,7 +149,7 @@ function print_po() $rep->TextCol(6, 7, $DisplayNet, -2); $rep->NewLine(1); if ($rep->row < $rep->bottomMargin + (15 * $rep->lineHeight)) - $rep->Header2($myrow, $branch, $myrow, $baccount, ST_PURCHORDER); + $rep->NewPage(); } if ($myrow['comments'] != "") { @@ -151,17 +161,50 @@ function print_po() $rep->row = $rep->bottomMargin + (15 * $rep->lineHeight); $linetype = true; $doctype = ST_PURCHORDER; - if ($rep->currency != $myrow['curr_code']) - { - include($path_to_root . "/reporting/includes/doctext2.inc"); - } - else - { - include($path_to_root . "/reporting/includes/doctext.inc"); - } + include($path_to_root . "/reporting/includes/doctext.inc"); $rep->TextCol(3, 6, $doc_Sub_total, -2); $rep->TextCol(6, 7, $DisplaySubTot, -2); + $rep->NewLine(); + + $tax_items = get_tax_for_items($items, $prices, 0, + $myrow['tax_group_id'], $myrow['tax_included'], null); + $first = true; + foreach($tax_items as $tax_item) + { + $DisplayTax = number_format2($tax_item['Value'], $dec); + + if (isset($suppress_tax_rates) && $suppress_tax_rates == 1) + $tax_type_name = $tax_item['tax_type_name']; + else + $tax_type_name = $tax_item['tax_type_name']." (".$tax_item['rate']."%) "; + + if ($myrow['tax_included']) + { + if (isset($alternative_tax_include_on_docs) && $alternative_tax_include_on_docs == 1) + { + if ($first) + { + $rep->TextCol(3, 6, _("Total Tax Excluded"), -2); + $rep->TextCol(6, 7, number_format2($sign*$tax_item['net_amount'], $dec), -2); + $rep->NewLine(); + } + $rep->TextCol(3, 6, $tax_type_name, -2); + $rep->TextCol(6, 7, $DisplayTax, -2); + $first = false; + } + else + $rep->TextCol(3, 7, $doc_Included . " " . $tax_type_name . $doc_Amount . ": " . $DisplayTax, -2); + } + else + { + $SubTotal += $tax_item['Value']; + $rep->TextCol(3, 6, $tax_type_name, -2); + $rep->TextCol(6, 7, $DisplayTax, -2); + } + $rep->NewLine(); + } + $rep->NewLine(); $DisplayTotal = number_format2($SubTotal, $dec); $rep->Font('bold'); @@ -172,13 +215,12 @@ function print_po() { $rep->NewLine(1); $rep->TextCol(1, 7, $myrow['curr_code'] . ": " . $words, - 2); - } + } $rep->Font(); if ($email == 1) { - $myrow['contact_email'] = $myrow['email']; $myrow['DebtorName'] = $myrow['supp_name']; - if ($myrow['contact'] != '') $myrow['DebtorName'] = $myrow['contact']; + if ($myrow['reference'] == "") $myrow['reference'] = $myrow['order_no']; $rep->End($email, $doc_Order_no . " " . $myrow['reference'], $myrow); diff --git a/reporting/rep210.php b/reporting/rep210.php index 27d56cd7..7f6b53b6 100644 --- a/reporting/rep210.php +++ b/reporting/rep210.php @@ -16,13 +16,14 @@ $page_security = $_POST['PARAM_0'] == $_POST['PARAM_1'] ? // $ Revision: 2.0 $ // Creator: Joe Hunt // date_: 2005-05-19 -// Title: Purchase Orders +// Title: Purchase Remittance // ---------------------------------------------------------------- $path_to_root=".."; include_once($path_to_root . "/includes/session.inc"); include_once($path_to_root . "/includes/date_functions.inc"); include_once($path_to_root . "/includes/data_checks.inc"); +include_once($path_to_root . "/includes/db/crm_contacts_db.inc"); //---------------------------------------------------------------------------------------------------- @@ -33,9 +34,9 @@ function get_remittance($type, $trans_no) { $sql = "SELECT ".TB_PREF."supp_trans.*, (".TB_PREF."supp_trans.ov_amount+".TB_PREF."supp_trans.ov_gst+".TB_PREF."supp_trans.ov_discount) AS Total, - ".TB_PREF."suppliers.supp_name, ".TB_PREF."suppliers.supp_account_no, + ".TB_PREF."suppliers.supp_name, ".TB_PREF."suppliers.supp_account_no, ".TB_PREF."suppliers.curr_code, ".TB_PREF."suppliers.payment_terms, ".TB_PREF."suppliers.gst_no AS tax_id, - ".TB_PREF."suppliers.email, ".TB_PREF."suppliers.address, ".TB_PREF."suppliers.contact + ".TB_PREF."suppliers.address FROM ".TB_PREF."supp_trans, ".TB_PREF."suppliers WHERE ".TB_PREF."supp_trans.supplier_id = ".TB_PREF."suppliers.supplier_id AND ".TB_PREF."supp_trans.type = ".db_escape($type)." @@ -91,6 +92,7 @@ function print_remittances() if ($email == 0) { $rep = new FrontReport(_('REMITTANCE'), "RemittanceBulk", user_pagesize()); + $rep->SetHeaderType('Header2'); $rep->currency = $cur; $rep->Font(); $rep->Info($params, $cols, null, $aligns); @@ -113,6 +115,7 @@ function print_remittances() if ($email == 1) { $rep = new FrontReport("", "", user_pagesize()); + $rep->SetHeaderType('Header2'); $rep->currency = $cur; $rep->Font(); $rep->title = _('REMITTANCE'); @@ -121,19 +124,14 @@ function print_remittances() } else $rep->title = _('REMITTANCE'); - $rep->Header2($myrow, null, $myrow, $baccount, ST_SUPPAYMENT); + $contacts = get_supplier_contacts($myrow['supplier_id'], 'invoice'); + $rep->SetCommonData($myrow, null, $myrow, $baccount, ST_SUPPAYMENT, $contacts); + $rep->NewPage(); $result = get_allocations_for_remittance($myrow['supplier_id'], $myrow['type'], $myrow['trans_no']); $linetype = true; $doctype = ST_SUPPAYMENT; - if ($rep->currency != $myrow['curr_code']) - { - include($path_to_root . "/reporting/includes/doctext2.inc"); - } - else - { - include($path_to_root . "/reporting/includes/doctext.inc"); - } + include($path_to_root . "/reporting/includes/doctext.inc"); $total_allocated = 0; $rep->TextCol(0, 4, $doc_Towards, -2); @@ -152,7 +150,7 @@ function print_remittances() $total_allocated += $myrow2['amt']; $rep->NewLine(1); if ($rep->row < $rep->bottomMargin + (15 * $rep->lineHeight)) - $rep->Header2($myrow, null, $myrow, $baccount, ST_SUPPAYMENT); + $rep->NewPage(); } $rep->row = $rep->bottomMargin + (15 * $rep->lineHeight); @@ -176,9 +174,7 @@ function print_remittances() $rep->Font(); if ($email == 1) { - $myrow['contact_email'] = $myrow['email']; $myrow['DebtorName'] = $myrow['supp_name']; - if ($myrow['contact'] != '') $myrow['DebtorName'] = $myrow['contact']; $rep->End($email, $doc_Order_no . " " . $myrow['reference'], $myrow); } } diff --git a/reporting/rep301.php b/reporting/rep301.php index 5c123e42..56398b71 100644 --- a/reporting/rep301.php +++ b/reporting/rep301.php @@ -1,12 +1,12 @@ . ***********************************************************************/ $page_security = 'SA_ITEMSVALREP'; @@ -33,6 +33,7 @@ function getTransactions($category, $location) $sql = "SELECT ".TB_PREF."stock_master.category_id, ".TB_PREF."stock_category.description AS cat_description, ".TB_PREF."stock_master.stock_id, + ".TB_PREF."stock_master.units, ".TB_PREF."stock_master.description, ".TB_PREF."stock_master.inactive, ".TB_PREF."stock_moves.loc_code, SUM(".TB_PREF."stock_moves.qty) AS QtyOnHand, @@ -93,11 +94,11 @@ function print_inventory_valuation_report() else $loc = get_location_name($location); - $cols = array(0, 100, 250, 350, 450, 515); + $cols = array(0, 75, 225, 250, 350, 450, 515); - $headers = array(_('Category'), '', _('Quantity'), _('Unit Cost'), _('Value')); + $headers = array(_('Category'), '', _('UOM'), _('Quantity'), _('Unit Cost'), _('Value')); - $aligns = array('left', 'left', 'right', 'right', 'right'); + $aligns = array('left', 'left', 'left', 'right', 'right', 'right'); $params = array( 0 => $comments, 1 => array('text' => _('Category'), 'from' => $cat, 'to' => ''), @@ -107,7 +108,7 @@ function print_inventory_valuation_report() $rep->Font(); $rep->Info($params, $cols, $headers, $aligns); - $rep->Header(); + $rep->NewPage(); $res = getTransactions($category, $location); $total = $grandtotal = 0.0; @@ -123,7 +124,7 @@ function print_inventory_valuation_report() $rep->NewLine(2, 3); $rep->TextCol(0, 4, _('Total')); } - $rep->AmountCol(4, 5, $total, $dec); + $rep->AmountCol(5, 6, $total, $dec); if ($detail) { $rep->Line($rep->row - 2); @@ -141,13 +142,16 @@ function print_inventory_valuation_report() if ($detail) { $rep->NewLine(); - $rep->fontsize -= 2; + $rep->fontSize -= 2; $rep->TextCol(0, 1, $trans['stock_id']); $rep->TextCol(1, 2, $trans['description'].($trans['inactive']==1 ? " ("._("Inactive").")" : ""), -1); - $rep->AmountCol(2, 3, $trans['QtyOnHand'], get_qty_dec($trans['stock_id'])); - $rep->AmountCol(3, 4, $trans['UnitCost'], $dec); - $rep->AmountCol(4, 5, $trans['ItemTotal'], $dec); - $rep->fontsize += 2; + $rep->TextCol(2, 3, $trans['units']); + $rep->AmountCol(3, 4, $trans['QtyOnHand'], get_qty_dec($trans['stock_id'])); + $dec2 = 0; + price_decimal_format($trans['UnitCost'], $dec2); + $rep->AmountCol(4, 5, $trans['UnitCost'], $dec2); + $rep->AmountCol(5, 6, $trans['ItemTotal'], $dec); + $rep->fontSize += 2; } $total += $trans['ItemTotal']; $grandtotal += $trans['ItemTotal']; @@ -157,7 +161,7 @@ function print_inventory_valuation_report() $rep->NewLine(2, 3); $rep->TextCol(0, 4, _('Total')); } - $rep->Amountcol(4, 5, $total, $dec); + $rep->Amountcol(5, 6, $total, $dec); if ($detail) { $rep->Line($rep->row - 2); @@ -165,7 +169,7 @@ function print_inventory_valuation_report() } $rep->NewLine(2, 1); $rep->TextCol(0, 4, _('Grand Total')); - $rep->AmountCol(4, 5, $grandtotal, $dec); + $rep->AmountCol(5, 6, $grandtotal, $dec); $rep->Line($rep->row - 4); $rep->NewLine(); $rep->End(); diff --git a/reporting/rep302.php b/reporting/rep302.php index 0a633335..75feef57 100644 --- a/reporting/rep302.php +++ b/reporting/rep302.php @@ -133,7 +133,7 @@ function print_inventory_planning() $rep->Font(); $rep->Info($params, $cols, $headers, $aligns); - $rep->Header(); + $rep->NewPage(); $res = getTransactions($category, $location); $catt = ''; diff --git a/reporting/rep303.php b/reporting/rep303.php index cc1eeec0..d9904bfc 100644 --- a/reporting/rep303.php +++ b/reporting/rep303.php @@ -1,12 +1,12 @@ . ***********************************************************************/ $page_security = 'SA_ITEMSVALREP'; @@ -34,6 +34,7 @@ function getTransactions($category, $location) $sql = "SELECT ".TB_PREF."stock_master.category_id, ".TB_PREF."stock_category.description AS cat_description, ".TB_PREF."stock_master.stock_id, + ".TB_PREF."stock_master.units, ".TB_PREF."stock_master.description, ".TB_PREF."stock_master.inactive, IF(".TB_PREF."stock_moves.stock_id IS NULL, '', ".TB_PREF."stock_moves.loc_code) AS loc_code, SUM(IF(".TB_PREF."stock_moves.stock_id IS NULL,0,".TB_PREF."stock_moves.qty)) AS QtyOnHand @@ -61,7 +62,7 @@ function getTransactions($category, $location) function print_stock_check() { - global $comp_path, $path_to_root, $pic_height; + global $path_to_root, $pic_height; $category = $_POST['PARAM_0']; $location = $_POST['PARAM_1']; @@ -70,7 +71,8 @@ function print_stock_check() $shortage = $_POST['PARAM_4']; $no_zeros = $_POST['PARAM_5']; $comments = $_POST['PARAM_6']; - $destination = $_POST['PARAM_7']; + $destination = $_POST['PARAM_7']; + if ($destination) include_once($path_to_root . "/reporting/includes/excel_report.inc"); else @@ -93,7 +95,7 @@ function print_stock_check() { $short = _('Yes'); $available = _('Shortage'); - } + } else { $short = _('No'); @@ -103,15 +105,15 @@ function print_stock_check() else $nozeros = _('No'); if ($check) { - $cols = array(0, 100, 250, 295, 345, 390, 445, 515); - $headers = array(_('Stock ID'), _('Description'), _('Quantity'), _('Check'), _('Demand'), $available, _('On Order')); - $aligns = array('left', 'left', 'right', 'right', 'right', 'right', 'right'); + $cols = array(0, 75, 225, 250, 295, 345, 390, 445, 515); + $headers = array(_('Stock ID'), _('Description'), _('UOM'), _('Quantity'), _('Check'), _('Demand'), $available, _('On Order')); + $aligns = array('left', 'left', 'left', 'right', 'right', 'right', 'right', 'right'); } else { - $cols = array(0, 100, 250, 315, 380, 445, 515); - $headers = array(_('Stock ID'), _('Description'), _('Quantity'), _('Demand'), $available, _('On Order')); - $aligns = array('left', 'left', 'right', 'right', 'right', 'right'); + $cols = array(0, 75, 225, 250, 315, 380, 445, 515); + $headers = array(_('Stock ID'), _('Description'), _('UOM'), _('Quantity'), _('Demand'), $available, _('On Order')); + $aligns = array('left', 'left', 'left', 'right', 'right', 'right', 'right'); } @@ -126,11 +128,11 @@ function print_stock_check() else $user_comp = ""; - $rep = new FrontReport(_('Stock Check Sheets'), "StockCheckSheet", user_pagesize()); + $rep = new FrontReport(_('Stock Check Sheets'), "StockCheckSheet", user_pagesize()); - $rep->Font(); - $rep->Info($params, $cols, $headers, $aligns); - $rep->Header(); + $rep->Font(); + $rep->Info($params, $cols, $headers, $aligns); + $rep->NewPage(); $res = getTransactions($category, $location); $catt = ''; @@ -166,29 +168,30 @@ function print_stock_check() $dec = get_qty_dec($trans['stock_id']); $rep->TextCol(0, 1, $trans['stock_id']); $rep->TextCol(1, 2, $trans['description'].($trans['inactive']==1 ? " ("._("Inactive").")" : ""), -1); - $rep->AmountCol(2, 3, $trans['QtyOnHand'], $dec); + $rep->TextCol(2, 3, $trans['units']); + $rep->AmountCol(3, 4, $trans['QtyOnHand'], $dec); if ($check) { - $rep->TextCol(3, 4, "_________"); - $rep->AmountCol(4, 5, $demandqty, $dec); - $rep->AmountCol(5, 6, $trans['QtyOnHand'] - $demandqty, $dec); - $rep->AmountCol(6, 7, $onorder, $dec); + $rep->TextCol(4, 5, "_________"); + $rep->AmountCol(5, 6, $demandqty, $dec); + $rep->AmountCol(6, 7, $trans['QtyOnHand'] - $demandqty, $dec); + $rep->AmountCol(7, 8, $onorder, $dec); } else { - $rep->AmountCol(3, 4, $demandqty, $dec); - $rep->AmountCol(4, 5, $trans['QtyOnHand'] - $demandqty, $dec); - $rep->AmountCol(5, 6, $onorder, $dec); + $rep->AmountCol(4, 5, $demandqty, $dec); + $rep->AmountCol(5, 6, $trans['QtyOnHand'] - $demandqty, $dec); + $rep->AmountCol(6, 7, $onorder, $dec); } if ($pictures) { - $image = $comp_path .'/'. $user_comp . '/images/' + $image = company_path() . '/images/' . item_img_name($trans['stock_id']) . '.jpg'; if (file_exists($image)) { $rep->NewLine(); if ($rep->row - $pic_height < $rep->bottomMargin) - $rep->Header(); + $rep->NewPage(); $rep->AddImage($image, $rep->cols[1], $rep->row - $pic_height, 0, $pic_height); $rep->row -= $pic_height; $rep->NewLine(); diff --git a/reporting/rep304.php b/reporting/rep304.php index d847b024..ac59e881 100644 --- a/reporting/rep304.php +++ b/reporting/rep304.php @@ -43,7 +43,7 @@ function getTransactions($category, $location, $fromcust, $from, $to) ".TB_PREF."stock_moves.tran_date, SUM(-".TB_PREF."stock_moves.qty) AS qty, SUM(-".TB_PREF."stock_moves.qty*".TB_PREF."stock_moves.price*(1-".TB_PREF."stock_moves.discount_percent)) AS amt, - SUM(-".TB_PREF."stock_moves.qty *(".TB_PREF."stock_master.material_cost + ".TB_PREF."stock_master.labour_cost + ".TB_PREF."stock_master.overhead_cost)) AS cost + SUM(-IF(".TB_PREF."stock_moves.standard_cost <> 0, ".TB_PREF."stock_moves.qty * ".TB_PREF."stock_moves.standard_cost, ".TB_PREF."stock_moves.qty *(".TB_PREF."stock_master.material_cost + ".TB_PREF."stock_master.labour_cost + ".TB_PREF."stock_master.overhead_cost))) AS cost FROM ".TB_PREF."stock_master, ".TB_PREF."stock_category, ".TB_PREF."debtor_trans, @@ -127,7 +127,7 @@ function print_inventory_sales() $rep->Font(); $rep->Info($params, $cols, $headers, $aligns); - $rep->Header(); + $rep->NewPage(); $res = getTransactions($category, $location, $fromcust, $from, $to); $total = $grandtotal = 0.0; @@ -161,7 +161,7 @@ function print_inventory_sales() $trans['amt'] *= $rate; $cb = $trans['amt'] - $trans['cost']; $rep->NewLine(); - $rep->fontsize -= 2; + $rep->fontSize -= 2; $rep->TextCol(0, 1, $trans['stock_id']); if ($fromcust == ALL_NUMERIC) { @@ -174,7 +174,7 @@ function print_inventory_sales() $rep->AmountCol(4, 5, $trans['amt'], $dec); $rep->AmountCol(5, 6, $trans['cost'], $dec); $rep->AmountCol(6, 7, $cb, $dec); - $rep->fontsize += 2; + $rep->fontSize += 2; $total += $trans['amt']; $total1 += $trans['cost']; $total2 += $cb; diff --git a/reporting/rep305.php b/reporting/rep305.php index 334a6d20..6711d9b7 100644 --- a/reporting/rep305.php +++ b/reporting/rep305.php @@ -80,7 +80,7 @@ function print_grn_valuation() $rep->Font(); $rep->Info($params, $cols, $headers, $aligns); - $rep->Header(); + $rep->NewPage(); $res = getTransactions($from, $to); $total = $qtotal = $grandtotal = 0.0; diff --git a/reporting/rep401.php b/reporting/rep401.php index e72f163c..341c2247 100644 --- a/reporting/rep401.php +++ b/reporting/rep401.php @@ -77,7 +77,7 @@ function print_bill_of_material() $rep->Font(); $rep->Info($params, $cols, $headers, $aligns); - $rep->Header(); + $rep->NewPage(); $res = getTransactions($frompart, $topart); $parent = ''; diff --git a/reporting/rep409.php b/reporting/rep409.php index bf6bb3d4..60f58b04 100644 --- a/reporting/rep409.php +++ b/reporting/rep409.php @@ -12,12 +12,7 @@ $page_security = $_POST['PARAM_0'] == $_POST['PARAM_1'] ? 'SA_MANUFTRANSVIEW' : 'SA_MANUFBULKREP'; // ---------------------------------------------------------------- -// $ Revision: 2.0 $ -// Creator: Janusz Dobrowolski -// date_: 2008-01-14 -// Title: Print Workorders -// draft version! -// ---------------------------------------------------------------- +// Title: Work Orders $path_to_root=".."; include_once($path_to_root . "/includes/session.inc"); @@ -33,7 +28,7 @@ print_workorders(); function print_workorders() { - global $path_to_root, $SysPrefs; + global $path_to_root, $SysPrefs, $dflt_lang; include_once($path_to_root . "/reporting/includes/pdf_report.inc"); @@ -63,6 +58,7 @@ function print_workorders() if ($email == 0) { $rep = new FrontReport(_('WORK ORDER'), "WorkOrderBulk", user_pagesize()); + $rep->SetHeaderType('Header2'); $rep->currency = $cur; $rep->Font(); $rep->Info($params, $cols, null, $aligns); @@ -73,19 +69,25 @@ function print_workorders() $myrow = get_work_order($i); if ($myrow === false) continue; - $date_ = sql2date($myrow["date_"]); + $date_ = sql2date($myrow["date_"]); if ($email == 1) { $rep = new FrontReport("", "", user_pagesize()); + $rep->SetHeaderType('Header2'); $rep->currency = $cur; $rep->Font(); $rep->title = _('WORK ORDER'); - $rep->filename = "WorkOrder" . $myrow['reference'] . ".pdf"; + $rep->filename = "WorkOrder" . $myrow['wo_ref'] . ".pdf"; $rep->Info($params, $cols, null, $aligns); } else $rep->title = _('WORK ORDER'); - $rep->Header2($myrow, null, null, '', 26); + + $contact[] = array('email' =>$myrow['email'],'lang' => $dflt_lang, + 'name' => $myrow['contact'], 'name2' => '', 'contact'); + + $rep->SetCommonData($myrow, null, null, '', 26, $contact); + $rep->NewPage(); $result = get_wo_requirements($i); $rep->TextCol(0, 5,_("Work Order Requirements"), -2); @@ -126,7 +128,7 @@ function print_workorders() $rep->AmountCol(6, 7, $myrow2['units_issued'], $dec, -2); $rep->NewLine(1); if ($rep->row < $rep->bottomMargin + (15 * $rep->lineHeight)) - $rep->Header2($myrow, null, null,'',26); + $rep->NewPage(); } $rep->NewLine(1); $rep->TextCol(0, 5," *** = "._("Insufficient stock"), -2); @@ -138,6 +140,12 @@ function print_workorders() while ($comment=db_fetch($comments)) $rep->TextColLines(0, 6, $comment['memo_'], -2); } + if ($email == 1) + { + $myrow['DebtorName'] = $myrow['contact']; + $myrow['reference'] = $myrow['wo_ref']; + $rep->End($email, _("Work Order No.") . " " . $myrow['wo_ref'], $myrow); + } } if ($email == 0) $rep->End(); diff --git a/reporting/rep501.php b/reporting/rep501.php index 45047adc..22c00c34 100644 --- a/reporting/rep501.php +++ b/reporting/rep501.php @@ -32,8 +32,8 @@ function getTransactions($from, $to) $sql = "SELECT * FROM ".TB_PREF."dimensions - WHERE reference >= ".db_escape($from)." - AND reference <= ".db_escape($to)." + WHERE id >= ".db_escape($from)." + AND id <= ".db_escape($to)." ORDER BY reference"; @@ -87,13 +87,13 @@ function print_dimension_summary() $aligns = array('left', 'left', 'left', 'left', 'left', 'left', 'right'); $params = array( 0 => $comments, - 1 => array('text' => _('Dimension'), 'from' => $fromdim, 'to' => $todim)); + 1 => array('text' => _('Dimension'), 'from' => get_dimension_string($fromdim), 'to' => get_dimension_string($todim))); $rep = new FrontReport(_('Dimension Summary'), "DimensionSummary", user_pagesize()); $rep->Font(); $rep->Info($params, $cols, $headers, $aligns); - $rep->Header(); + $rep->NewPage(); $res = getTransactions($fromdim, $todim); while ($trans=db_fetch($res)) diff --git a/reporting/rep601.php b/reporting/rep601.php index 7e443fb2..1d47bc78 100644 --- a/reporting/rep601.php +++ b/reporting/rep601.php @@ -84,7 +84,7 @@ function print_bank_transactions() $rep->Font(); $rep->Info($params, $cols, $headers, $aligns); - $rep->Header(); + $rep->NewPage(); $prev_balance = get_bank_balance_to($from, $account["id"]); @@ -104,11 +104,11 @@ function print_bank_transactions() $rep->Font(); $total = $prev_balance; $rep->NewLine(2); + $total_debit = $total_credit = 0; if ($rows > 0) { // Keep a running total as we loop through // the transactions. - $total_debit = $total_credit = 0; while ($myrow=db_fetch($trans)) { @@ -134,7 +134,7 @@ function print_bank_transactions() if ($rep->row < $rep->bottomMargin + $rep->lineHeight) { $rep->Line($rep->row - 2); - $rep->Header(); + $rep->NewPage(); } } $rep->NewLine(); diff --git a/reporting/rep701.php b/reporting/rep701.php index 82bb0390..b4f54c96 100644 --- a/reporting/rep701.php +++ b/reporting/rep701.php @@ -38,8 +38,10 @@ function display_type ($type, $typename, &$dec, &$rep, $showbalance) { $printtitle = 1; $rep->row -= 4; + $rep->Font('bold'); $rep->TextCol(0, 1, $type); $rep->TextCol(1, 4, $typename); + $rep->Font(); $rep->row -= 4; $rep->Line($rep->row); $rep->NewLine(); @@ -111,7 +113,7 @@ function print_Chart_of_Accounts() $rep->Font(); $rep->Info($params, $cols, $headers, $aligns); - $rep->Header(); + $rep->NewPage(); $classresult = get_account_classes(false); while ($class = db_fetch($classresult)) diff --git a/reporting/rep702.php b/reporting/rep702.php index 10bcfef7..01d3606a 100644 --- a/reporting/rep702.php +++ b/reporting/rep702.php @@ -63,7 +63,7 @@ function print_list_of_journal_entries() $rep->Font(); $rep->Info($params, $cols, $headers, $aligns); - $rep->Header(); + $rep->NewPage(); if ($systype == -1) $systype = null; @@ -71,13 +71,22 @@ function print_list_of_journal_entries() $trans = get_gl_transactions($from, $to, -1, null, 0, 0, $systype); $typeno = $type = 0; + $debit = $credit = 0.0; + $totdeb = $totcre = 0.0; while ($myrow=db_fetch($trans)) { if ($type != $myrow['type'] || $typeno != $myrow['type_no']) { if ($typeno != 0) { - $rep->Line($rep->row + 4); + $rep->Line($rep->row += 6); + $rep->NewLine(); + $rep->AmountCol(4, 5, $debit, $dec); + $rep->AmountCol(5, 6, abs($credit), $dec); + $totdeb += $debit; + $totcre += $credit; + $debit = $credit = 0.0; + $rep->Line($rep->row -= 4); $rep->NewLine(); } $typeno = $myrow['type_no']; @@ -106,13 +115,31 @@ function print_list_of_journal_entries() $dim_str .= "/".$dim_str2; $rep->TextCol(2, 3, $dim_str); $rep->TextCol(3, 4, $myrow['memo_']); - if ($myrow['amount'] > 0.0) + if ($myrow['amount'] > 0.0) { + $debit += $myrow['amount']; $rep->AmountCol(4, 5, abs($myrow['amount']), $dec); - else + } + else { + $credit += $myrow['amount']; $rep->AmountCol(5, 6, abs($myrow['amount']), $dec); + } $rep->NewLine(1, 2); } - $rep->Line($rep->row + 4); + if ($typeno != 0) + { + $rep->Line($rep->row += 6); + $rep->NewLine(); + $rep->AmountCol(4, 5, $debit, $dec); + $rep->AmountCol(5, 6, abs($credit), $dec); + $totdeb += $debit; + $totcre += $credit; + $rep->Line($rep->row -= 4); + $rep->NewLine(); + $rep->TextCol(0, 4, _("Total")); + $rep->AmountCol(4, 5, $totdeb, $dec); + $rep->AmountCol(5, 6, abs($totcre), $dec); + $rep->Line($rep->row -= 4); + } $rep->End(); } diff --git a/reporting/rep704.php b/reporting/rep704.php index 3926defa..08391fbd 100644 --- a/reporting/rep704.php +++ b/reporting/rep704.php @@ -111,7 +111,7 @@ function print_GL_transactions() $rep->Font(); $rep->Info($params, $cols, $headers, $aligns); - $rep->Header(); + $rep->NewPage(); $accounts = get_gl_accounts($fromacc, $toacc); @@ -176,7 +176,7 @@ function print_GL_transactions() if ($rep->row < $rep->bottomMargin + $rep->lineHeight) { $rep->Line($rep->row - 2); - $rep->Header(); + $rep->NewPage(); } } $rep->NewLine(); diff --git a/reporting/rep705.php b/reporting/rep705.php index 2c14360d..25830743 100644 --- a/reporting/rep705.php +++ b/reporting/rep705.php @@ -22,6 +22,7 @@ include_once($path_to_root . "/includes/session.inc"); include_once($path_to_root . "/includes/date_functions.inc"); include_once($path_to_root . "/includes/data_checks.inc"); include_once($path_to_root . "/gl/includes/gl_db.inc"); +include_once($path_to_root . "/admin/db/tags_db.inc"); //---------------------------------------------------------------------------------------------------- @@ -71,7 +72,7 @@ function getPeriods($yr, $mo, $account, $dimension, $dimension2) //---------------------------------------------------------------------------------------------------- -function display_type ($type, $typename, $yr, $mo, $convert, &$dec, &$rep, $dimension, $dimension2) +function display_type ($type, $typename, $yr, $mo, $convert, &$dec, &$rep, $dimension, $dimension2, $tags) { $ctotal = array(1 => 0,0,0,0,0,0,0,0,0,0,0,0,0,0); $total = array(1 => 0,0,0,0,0,0,0,0,0,0,0,0,0,0); @@ -83,6 +84,11 @@ function display_type ($type, $typename, $yr, $mo, $convert, &$dec, &$rep, $dime $result = get_gl_accounts(null, null, $type); while ($account=db_fetch($result)) { + if ($tags != -1 && is_array($tags) && $tags[0] != false) + { + if (!is_record_in_tags($tags, TAG_ACCOUNT, $account['account_code'])) + continue; + } $bal = getPeriods($yr, $mo, $account["account_code"], $dimension, $dimension2); if (!$bal['per01'] && !$bal['per02'] && !$bal['per03'] && !$bal['per04'] && !$bal['per05'] && !$bal['per06'] && !$bal['per07'] && !$bal['per08'] && !$bal['per09'] && !$bal['per10'] && @@ -130,7 +136,7 @@ function display_type ($type, $typename, $yr, $mo, $convert, &$dec, &$rep, $dime $rep->NewLine(); } - $totals_arr = display_type($accounttype["id"], $accounttype["name"], $yr, $mo, $convert, $dec, $rep, $dimension, $dimension2); + $totals_arr = display_type($accounttype["id"], $accounttype["name"], $yr, $mo, $convert, $dec, $rep, $dimension, $dimension2, $tags); for ($i = 1; $i <= 12; $i++) { $total[$i] += $totals_arr[$i]; @@ -167,21 +173,24 @@ function print_annual_expense_breakdown() $year = $_POST['PARAM_0']; $dimension = $_POST['PARAM_1']; $dimension2 = $_POST['PARAM_2']; - $comments = $_POST['PARAM_3']; - $destination = $_POST['PARAM_4']; + $tags = (isset($_POST['PARAM_3']) ? $_POST['PARAM_3'] : -1); + $comments = $_POST['PARAM_4']; + $destination = $_POST['PARAM_5']; } else if ($dim == 1) { $year = $_POST['PARAM_0']; $dimension = $_POST['PARAM_1']; - $comments = $_POST['PARAM_2']; - $destination = $_POST['PARAM_3']; + $tags = (isset($_POST['PARAM_2']) ? $_POST['PARAM_2'] : -1); + $comments = $_POST['PARAM_3']; + $destination = $_POST['PARAM_4']; } else { $year = $_POST['PARAM_0']; - $comments = $_POST['PARAM_1']; - $destination = $_POST['PARAM_2']; + $tags = (isset($_POST['PARAM_1']) ? $_POST['PARAM_1'] : -1); + $comments = $_POST['PARAM_2']; + $destination = $_POST['PARAM_3']; } if ($destination) include_once($path_to_root . "/reporting/includes/excel_report.inc"); @@ -237,7 +246,8 @@ function print_annual_expense_breakdown() 'from' => get_dimension_string($dimension), 'to' => ''), 3 => array('text' => _("Dimension")." 2", 'from' => get_dimension_string($dimension2), 'to' => ''), - 4 => array('text' => _('Info'), 'from' => _('Amounts in thousands'), + 4 => array('text' => _('Tags'), 'from' => get_tag_names($tags), 'to' => ''), + 5 => array('text' => _('Info'), 'from' => _('Amounts in thousands'), 'to' => '')); } else if ($dim == 1) @@ -247,7 +257,8 @@ function print_annual_expense_breakdown() 'from' => $year, 'to' => ''), 2 => array('text' => _('Dimension'), 'from' => get_dimension_string($dimension), 'to' => ''), - 3 => array('text' => _('Info'), 'from' => _('Amounts in thousands'), + 3 => array('text' => _('Tags'), 'from' => get_tag_names($tags), 'to' => ''), + 4 => array('text' => _('Info'), 'from' => _('Amounts in thousands'), 'to' => '')); } else @@ -255,7 +266,8 @@ function print_annual_expense_breakdown() $params = array( 0 => $comments, 1 => array('text' => _("Year"), 'from' => $year, 'to' => ''), - 2 => array('text' => _('Info'), 'from' => _('Amounts in thousands'), + 2 => array('text' => _('Tags'), 'from' => get_tag_names($tags), 'to' => ''), + 3 => array('text' => _('Info'), 'from' => _('Amounts in thousands'), 'to' => '')); } @@ -263,7 +275,7 @@ function print_annual_expense_breakdown() $rep->Font(); $rep->Info($params, $cols, $headers, $aligns); - $rep->Header(); + $rep->NewPage(); $sales = Array(1 => 0,0,0,0,0,0,0,0,0,0,0,0,0,0); @@ -283,7 +295,8 @@ function print_annual_expense_breakdown() $typeresult = get_account_types(false, $class['cid'], -1); while ($accounttype=db_fetch($typeresult)) { - $classtotal = display_type($accounttype["id"], $accounttype["name"], $yr, $mo, $convert, $dec, $rep, $dimension, $dimension2); + $classtotal = display_type($accounttype["id"], $accounttype["name"], $yr, $mo, $convert, $dec, $rep, $dimension, + $dimension2, $tags); for ($i = 1; $i <= 12; $i++) $ctotal[$i] += $classtotal[$i]; } diff --git a/reporting/rep706.php b/reporting/rep706.php index e5cf4ce6..8a0e4d45 100644 --- a/reporting/rep706.php +++ b/reporting/rep706.php @@ -22,16 +22,16 @@ include_once($path_to_root . "/includes/session.inc"); include_once($path_to_root . "/includes/date_functions.inc"); include_once($path_to_root . "/includes/data_checks.inc"); include_once($path_to_root . "/gl/includes/gl_db.inc"); +include_once($path_to_root . "/admin/db/tags_db.inc"); //---------------------------------------------------------------------------------------------------- -function display_type ($type, $typename, $from, $to, $convert, &$dec, &$rep, $dimension, $dimension2, &$pg, $graphics) +function display_type ($type, $typename, $from, $to, $convert, &$dec, &$rep, $dimension, $dimension2, $tags, &$pg, $graphics) { $code_open_balance = 0; $code_period_balance = 0; $open_balance_total = 0; $period_balance_total = 0; - unset($totals_arr); $totals_arr = array(); $printtitle = 0; //Flag for printing type name @@ -40,6 +40,11 @@ function display_type ($type, $typename, $from, $to, $convert, &$dec, &$rep, $di $result = get_gl_accounts(null, null, $type); while ($account=db_fetch($result)) { + if ($tags != -1 && is_array($tags) && $tags[0] != false) + { + if (!is_record_in_tags($tags, TAG_ACCOUNT, $account['account_code'])) + continue; + } $prev_balance = get_gl_balance_from_to("", $from, $account["account_code"], $dimension, $dimension2); $curr_balance = get_gl_trans_from_to($from, $to, $account["account_code"], $dimension, $dimension2); @@ -87,7 +92,7 @@ function display_type ($type, $typename, $from, $to, $convert, &$dec, &$rep, $di } $totals_arr = display_type($accounttype["id"], $accounttype["name"], $from, $to, $convert, $dec, - $rep, $dimension, $dimension2, $pg, $graphics); + $rep, $dimension, $dimension2, $tags, $pg, $graphics); $open_balance_total += $totals_arr[0]; $period_balance_total += $totals_arr[1]; } @@ -122,7 +127,7 @@ print_balance_sheet(); function print_balance_sheet() { - global $comp_path, $path_to_root; + global $path_to_root; $dim = get_company_pref('use_dimension'); $dimension = $dimension2 = 0; @@ -133,26 +138,29 @@ function print_balance_sheet() { $dimension = $_POST['PARAM_2']; $dimension2 = $_POST['PARAM_3']; + $tags = (isset($_POST['PARAM_4']) ? $_POST['PARAM_4'] : -1); + $decimals = $_POST['PARAM_5']; + $graphics = $_POST['PARAM_6']; + $comments = $_POST['PARAM_7']; + $destination = $_POST['PARAM_8']; + } + else if ($dim == 1) + { + $dimension = $_POST['PARAM_2']; + $tags = (isset($_POST['PARAM_3']) ? $_POST['PARAM_3'] : -1); $decimals = $_POST['PARAM_4']; $graphics = $_POST['PARAM_5']; $comments = $_POST['PARAM_6']; $destination = $_POST['PARAM_7']; } - else if ($dim == 1) + else { - $dimension = $_POST['PARAM_2']; + $tags = (isset($_POST['PARAM_2']) ? $_POST['PARAM_2'] : -1); $decimals = $_POST['PARAM_3']; $graphics = $_POST['PARAM_4']; $comments = $_POST['PARAM_5']; $destination = $_POST['PARAM_6']; } - else - { - $decimals = $_POST['PARAM_2']; - $graphics = $_POST['PARAM_3']; - $comments = $_POST['PARAM_4']; - $destination = $_POST['PARAM_5']; - } if ($destination) include_once($path_to_root . "/reporting/includes/excel_report.inc"); else @@ -182,25 +190,28 @@ function print_balance_sheet() 2 => array('text' => _('Dimension')." 1", 'from' => get_dimension_string($dimension), 'to' => ''), 3 => array('text' => _('Dimension')." 2", - 'from' => get_dimension_string($dimension2), 'to' => '')); + 'from' => get_dimension_string($dimension2), 'to' => ''), + 4 => array('text' => _('Tags'), 'from' => get_tag_names($tags), 'to' => '')); } else if ($dim == 1) { $params = array( 0 => $comments, 1 => array('text' => _('Period'),'from' => $from, 'to' => $to), 2 => array('text' => _('Dimension'), - 'from' => get_dimension_string($dimension), 'to' => '')); + 'from' => get_dimension_string($dimension), 'to' => ''), + 3 => array('text' => _('Tags'), 'from' => get_tag_names($tags), 'to' => '')); } else { $params = array( 0 => $comments, - 1 => array('text' => _('Period'),'from' => $from, 'to' => $to)); + 1 => array('text' => _('Period'),'from' => $from, 'to' => $to), + 2 => array('text' => _('Tags'), 'from' => get_tag_names($tags), 'to' => '')); } $rep = new FrontReport(_('Balance Sheet'), "BalanceSheet", user_pagesize()); $rep->Font(); $rep->Info($params, $cols, $headers, $aligns); - $rep->Header(); + $rep->NewPage(); $calc_open = $calc_period = 0.0; $equity_open = $equity_period = 0.0; @@ -225,7 +236,7 @@ function print_balance_sheet() while ($accounttype=db_fetch($typeresult)) { $classtotal = display_type($accounttype["id"], $accounttype["name"], $from, $to, $convert, $dec, - $rep, $dimension, $dimension2, $pg, $graphics); + $rep, $dimension, $dimension2, $tags, $pg, $graphics); $class_open_total += $classtotal[0]; $class_period_total += $classtotal[1]; } @@ -295,16 +306,15 @@ function print_balance_sheet() $pg->type = $graphics; $pg->skin = $graph_skin; $pg->built_in = false; - $pg->fontfile = $path_to_root . "/reporting/fonts/Vera.ttf"; $pg->latin_notation = ($decseps[$_SESSION["wa_current_user"]->prefs->dec_sep()] != "."); - $filename = $comp_path.'/'.user_company(). "/pdf_files/test.png"; + $filename = company_path(). "/pdf_files/". uniqid("").".png"; $pg->display($filename, true); $w = $pg->width / 1.5; $h = $pg->height / 1.5; $x = ($rep->pageWidth - $w) / 2; $rep->NewLine(2); if ($rep->row - $h < $rep->bottomMargin) - $rep->Header(); + $rep->NewPage(); $rep->AddImage($filename, $x, $rep->row - $h, $w, $h); } $rep->End(); diff --git a/reporting/rep707.php b/reporting/rep707.php index 14112f24..211e504f 100644 --- a/reporting/rep707.php +++ b/reporting/rep707.php @@ -22,16 +22,17 @@ include_once($path_to_root . "/includes/session.inc"); include_once($path_to_root . "/includes/date_functions.inc"); include_once($path_to_root . "/includes/data_checks.inc"); include_once($path_to_root . "/gl/includes/gl_db.inc"); +include_once($path_to_root . "/admin/db/tags_db.inc"); //---------------------------------------------------------------------------------------------------- -function display_type ($type, $typename, $from, $to, $begin, $end, $compare, $convert, &$dec, &$pdec, &$rep, $dimension, $dimension2, &$pg, $graphics) +function display_type ($type, $typename, $from, $to, $begin, $end, $compare, $convert, &$dec, &$pdec, &$rep, $dimension, $dimension2, + $tags, &$pg, $graphics) { $code_per_balance = 0; $code_acc_balance = 0; $per_balance_total = 0; $acc_balance_total = 0; - unset($totals_arr); $totals_arr = array(); $printtitle = 0; //Flag for printing type name @@ -40,6 +41,11 @@ function display_type ($type, $typename, $from, $to, $begin, $end, $compare, $co $result = get_gl_accounts(null, null, $type); while ($account=db_fetch($result)) { + if ($tags != -1 && is_array($tags) && $tags[0] != false) + { + if (!is_record_in_tags($tags, TAG_ACCOUNT, $account['account_code'])) + continue; + } $per_balance = get_gl_trans_from_to($from, $to, $account["account_code"], $dimension, $dimension2); if ($compare == 2) @@ -72,7 +78,7 @@ function display_type ($type, $typename, $from, $to, $begin, $end, $compare, $co if ($rep->row < $rep->bottomMargin + 3 * $rep->lineHeight) { $rep->Line($rep->row - 2); - $rep->Header(); + $rep->NewPage(); } $code_per_balance += $per_balance; @@ -95,7 +101,7 @@ function display_type ($type, $typename, $from, $to, $begin, $end, $compare, $co } $totals_arr = display_type($accounttype["id"], $accounttype["name"], $from, $to, $begin, $end, $compare, $convert, $dec, - $pdec, $rep, $dimension, $dimension2, $pg, $graphics); + $pdec, $rep, $dimension, $dimension2, $tags, $pg, $graphics); $per_balance_total += $totals_arr[0]; $acc_balance_total += $totals_arr[1]; } @@ -144,7 +150,7 @@ function Achieve($d1, $d2) function print_profit_and_loss_statement() { - global $comp_path, $path_to_root; + global $path_to_root; $dim = get_company_pref('use_dimension'); $dimension = $dimension2 = 0; @@ -156,26 +162,29 @@ function print_profit_and_loss_statement() { $dimension = $_POST['PARAM_3']; $dimension2 = $_POST['PARAM_4']; + $tags = (isset($_POST['PARAM_5']) ? $_POST['PARAM_5'] : -1); + $decimals = $_POST['PARAM_6']; + $graphics = $_POST['PARAM_7']; + $comments = $_POST['PARAM_8']; + $destination = $_POST['PARAM_9']; + } + else if ($dim == 1) + { + $dimension = $_POST['PARAM_3']; + $tags = (isset($_POST['PARAM_4']) ? $_POST['PARAM_4'] : -1); $decimals = $_POST['PARAM_5']; $graphics = $_POST['PARAM_6']; $comments = $_POST['PARAM_7']; $destination = $_POST['PARAM_8']; } - else if ($dim == 1) + else { - $dimension = $_POST['PARAM_3']; + $tags = (isset($_POST['PARAM_3']) ? $_POST['PARAM_3'] : -1); $decimals = $_POST['PARAM_4']; $graphics = $_POST['PARAM_5']; $comments = $_POST['PARAM_6']; $destination = $_POST['PARAM_7']; } - else - { - $decimals = $_POST['PARAM_3']; - $graphics = $_POST['PARAM_4']; - $comments = $_POST['PARAM_5']; - $destination = $_POST['PARAM_6']; - } if ($destination) include_once($path_to_root . "/reporting/includes/excel_report.inc"); else @@ -205,19 +214,22 @@ function print_profit_and_loss_statement() 2 => array('text' => _('Dimension')." 1", 'from' => get_dimension_string($dimension), 'to' => ''), 3 => array('text' => _('Dimension')." 2", - 'from' => get_dimension_string($dimension2), 'to' => '')); + 'from' => get_dimension_string($dimension2), 'to' => ''), + 4 => array('text' => _('Tags'), 'from' => get_tag_names($tags), 'to' => '')); } else if ($dim == 1) { $params = array( 0 => $comments, 1 => array('text' => _('Period'),'from' => $from, 'to' => $to), 2 => array('text' => _('Dimension'), - 'from' => get_dimension_string($dimension), 'to' => '')); + 'from' => get_dimension_string($dimension), 'to' => ''), + 3 => array('text' => _('Tags'), 'from' => get_tag_names($tags), 'to' => '')); } else { $params = array( 0 => $comments, - 1 => array('text' => _('Period'),'from' => $from, 'to' => $to)); + 1 => array('text' => _('Period'),'from' => $from, 'to' => $to), + 2 => array('text' => _('Tags'), 'from' => get_tag_names($tags), 'to' => '')); } @@ -243,10 +255,8 @@ function print_profit_and_loss_statement() $rep->Font(); $rep->Info($params, $cols, $headers, $aligns); - $rep->Header(); + $rep->NewPage(); - $classper = 0.0; - $classacc = 0.0; $salesper = 0.0; $salesacc = 0.0; @@ -268,7 +278,7 @@ function print_profit_and_loss_statement() while ($accounttype=db_fetch($typeresult)) { $classtotal = display_type($accounttype["id"], $accounttype["name"], $from, $to, $begin, $end, $compare, $convert, $dec, - $pdec, $rep, $dimension, $dimension2, $pg, $graphics); + $pdec, $rep, $dimension, $dimension2, $tags, $pg, $graphics); $class_per_total += $classtotal[0]; $class_acc_total += $classtotal[1]; } @@ -314,16 +324,15 @@ function print_profit_and_loss_statement() $pg->type = $graphics; $pg->skin = $graph_skin; $pg->built_in = false; - $pg->fontfile = $path_to_root . "/reporting/fonts/Vera.ttf"; $pg->latin_notation = ($decseps[$_SESSION["wa_current_user"]->prefs->dec_sep()] != "."); - $filename = $comp_path.'/'.user_company(). "/pdf_files/test.png"; + $filename = company_path(). "/pdf_files/". uniqid("").".png"; $pg->display($filename, true); $w = $pg->width / 1.5; $h = $pg->height / 1.5; $x = ($rep->pageWidth - $w) / 2; $rep->NewLine(2); if ($rep->row - $h < $rep->bottomMargin) - $rep->Header(); + $rep->NewPage(); $rep->AddImage($filename, $x, $rep->row - $h, $w, $h); } diff --git a/reporting/rep708.php b/reporting/rep708.php index 9e95275a..20956029 100644 --- a/reporting/rep708.php +++ b/reporting/rep708.php @@ -19,6 +19,7 @@ $page_security = 'SA_GLANALYTIC'; $path_to_root=".."; include_once($path_to_root . "/includes/session.inc"); +include_once($path_to_root . "/includes/ui.inc"); include_once($path_to_root . "/includes/date_functions.inc"); include_once($path_to_root . "/includes/data_checks.inc"); include_once($path_to_root . "/gl/includes/gl_db.inc"); @@ -107,7 +108,7 @@ function print_trial_balance() $rep->Font(); $rep->Info($params, $cols, $headers, $aligns, $cols2, $headers2, $aligns2); - $rep->Header(); + $rep->NewPage(); $accounts = get_gl_accounts(); @@ -165,7 +166,7 @@ function print_trial_balance() if ($rep->row < $rep->bottomMargin + $rep->lineHeight) { $rep->Line($rep->row - 2); - $rep->Header(); + $rep->NewPage(); } } $rep->Line($rep->row); @@ -202,9 +203,14 @@ function print_trial_balance() else $rep->AmountCol(7, 8, abs($tbal), $dec); $rep->NewLine(); - + $rep->Line($rep->row); - + if (($pbal = round2($pbal, $dec)) != 0.0) + { + $rep->NewLine(2); + $rep->Font(); + $rep->TextCol(0, 8, _("The Opening Balance is not in balance, probably due to a non closed Previous Fiscalyear.")); + } $rep->End(); } diff --git a/reporting/rep709.php b/reporting/rep709.php index 29fbc025..e52f2933 100644 --- a/reporting/rep709.php +++ b/reporting/rep709.php @@ -71,7 +71,7 @@ function getTaxInfo($id) function print_tax_report() { - global $path_to_root, $trans_dir, $Hooks, $systypes_array; + global $path_to_root, $trans_dir, $systypes_array; $from = $_POST['PARAM_0']; $to = $_POST['PARAM_1']; @@ -111,7 +111,7 @@ function print_tax_report() $rep->Info($params, $cols, $headers, $aligns); if (!$summaryOnly) { - $rep->Header(); + $rep->NewPage(); } $totalnet = 0.0; @@ -144,7 +144,7 @@ function print_tax_report() if ($rep->row < $rep->bottomMargin + $rep->lineHeight) { $rep->Line($rep->row - 2); - $rep->Header(); + $rep->NewPage(); } } if ($trans['trans_type']==ST_JOURNAL && $trans['amount']<0) { @@ -174,10 +174,9 @@ function print_tax_report() //for ($i = 0; $i < count($cols2); $i++) // $rep->cols[$i] = $rep->leftMargin + $cols2[$i]; - //$rep->numcols = count($headers2); - //$rep->headers = $headers2; - //$rep->aligns = $aligns2; - $rep->Header(); + $rep->headers = $headers2; + $rep->aligns = $aligns2; + $rep->NewPage(); $taxtotal = 0; foreach( $taxes as $id=>$sum) @@ -203,10 +202,7 @@ function print_tax_report() $rep->Font(); $rep->NewLine(); - if (method_exists($Hooks, 'TaxFunction')) - { - $Hooks->TaxFunction(); - } + hook_tax_report_done(); $rep->End(); } diff --git a/reporting/rep710.php b/reporting/rep710.php index befed437..06485b2c 100644 --- a/reporting/rep710.php +++ b/reporting/rep710.php @@ -88,7 +88,7 @@ function print_audit_trail() $rep->Font(); $rep->Info($params, $cols, $headers, $aligns); - $rep->Header(); + $rep->NewPage(); $trans = getTransactions($from, $to, $systype, $user); diff --git a/reporting/reports_main.php b/reporting/reports_main.php index a35ce845..718484a0 100644 --- a/reporting/reports_main.php +++ b/reporting/reports_main.php @@ -1,12 +1,12 @@ . ***********************************************************************/ $path_to_root=".."; @@ -20,14 +20,17 @@ include_once($path_to_root . "/reporting/includes/reports_classes.inc"); $js = ""; if ($use_date_picker) $js .= get_js_date_picker(); + +add_js_file('reports.js'); + page(_($help_context = "Reports and Analysis"), false, false, "", $js); $reports = new BoxReports; $dim = get_company_pref('use_dimension'); -$reports->addReportClass(_('Customer')); -$reports->addReport(_('Customer'),101,_('Customer &Balances'), +$reports->addReportClass(_('Customer'), RC_CUSTOMER); +$reports->addReport(RC_CUSTOMER, 101, _('Customer &Balances'), array( _('Start Date') => 'DATEBEGIN', _('End Date') => 'DATEENDM', _('Customer') => 'CUSTOMERS_NO_FILTER', @@ -35,7 +38,7 @@ $reports->addReport(_('Customer'),101,_('Customer &Balances'), _('Suppress Zeros') => 'YES_NO', _('Comments') => 'TEXTBOX', _('Destination') => 'DESTINATION')); -$reports->addReport(_('Customer'),102,_('&Aged Customer Analysis'), +$reports->addReport(RC_CUSTOMER, 102, _('&Aged Customer Analysis'), array( _('End Date') => 'DATE', _('Customer') => 'CUSTOMERS_NO_FILTER', _('Currency Filter') => 'CURRENCY', @@ -44,7 +47,7 @@ $reports->addReport(_('Customer'),102,_('&Aged Customer Analysis'), _('Graphics') => 'GRAPHIC', _('Comments') => 'TEXTBOX', _('Destination') => 'DESTINATION')); -$reports->addReport(_('Customer'),103,_('Customer &Detail Listing'), +$reports->addReport(RC_CUSTOMER, 103, _('Customer &Detail Listing'), array( _('Activity Since') => 'DATEBEGIN', _('Sales Areas') => 'AREAS', _('Sales Folk') => 'SALESMEN', @@ -52,7 +55,7 @@ $reports->addReport(_('Customer'),103,_('Customer &Detail Listing'), _('Activity Less Than') => 'TEXT', _('Comments') => 'TEXTBOX', _('Destination') => 'DESTINATION')); -$reports->addReport(_('Customer'),104,_('&Price Listing'), +$reports->addReport(RC_CUSTOMER, 104, _('&Price Listing'), array( _('Currency Filter') => 'CURRENCY', _('Inventory Category') => 'CATEGORIES', _('Sales Types') => 'SALESTYPES', @@ -60,7 +63,7 @@ $reports->addReport(_('Customer'),104,_('&Price Listing'), _('Show GP %') => 'YES_NO', _('Comments') => 'TEXTBOX', _('Destination') => 'DESTINATION')); -$reports->addReport(_('Customer'),105,_('&Order Status Listing'), +$reports->addReport(RC_CUSTOMER, 105, _('&Order Status Listing'), array( _('Start Date') => 'DATEBEGINM', _('End Date') => 'DATEENDM', _('Inventory Category') => 'CATEGORIES', @@ -68,57 +71,58 @@ $reports->addReport(_('Customer'),105,_('&Order Status Listing'), _('Back Orders Only') => 'YES_NO', _('Comments') => 'TEXTBOX', _('Destination') => 'DESTINATION')); -$reports->addReport(_('Customer'),106,_('&Salesman Listing'), +$reports->addReport(RC_CUSTOMER, 106, _('&Salesman Listing'), array( _('Start Date') => 'DATEBEGINM', _('End Date') => 'DATEENDM', _('Summary Only') => 'YES_NO', _('Comments') => 'TEXTBOX', _('Destination') => 'DESTINATION')); -$reports->addReport(_('Customer'),107,_('Print &Invoices/Credit Notes'), +$reports->addReport(RC_CUSTOMER, 107, _('Print &Invoices/Credit Notes'), array( _('From') => 'INVOICE', _('To') => 'INVOICE', _('Currency Filter') => 'CURRENCY', _('email Customers') => 'YES_NO', _('Payment Link') => 'PAYMENT_LINK', _('Comments') => 'TEXTBOX')); -$reports->addReport(_('Customer'),110,_('Print &Deliveries'), +$reports->addReport(RC_CUSTOMER, 110, _('Print &Deliveries'), array( _('From') => 'DELIVERY', _('To') => 'DELIVERY', _('email Customers') => 'YES_NO', _('Print as Packing Slip') => 'YES_NO', _('Comments') => 'TEXTBOX')); -$reports->addReport(_('Customer'),108,_('Print &Statements'), +$reports->addReport(RC_CUSTOMER, 108, _('Print &Statements'), array( _('Customer') => 'CUSTOMERS_NO_FILTER', _('Currency Filter') => 'CURRENCY', + _('Show Outstanding Only') => 'YES_NO', _('Email Customers') => 'YES_NO', _('Comments') => 'TEXTBOX')); -$reports->addReport(_('Customer'),109,_('&Print Sales Orders'), +$reports->addReport(RC_CUSTOMER, 109, _('&Print Sales Orders'), array( _('From') => 'ORDERS', _('To') => 'ORDERS', _('Currency Filter') => 'CURRENCY', _('Email Customers') => 'YES_NO', _('Print as Quote') => 'YES_NO', _('Comments') => 'TEXTBOX')); -$reports->addReport(_('Customer'),111,_('&Print Sales Quotations'), +$reports->addReport(RC_CUSTOMER, 111, _('&Print Sales Quotations'), array( _('From') => 'QUOTATIONS', _('To') => 'QUOTATIONS', _('Currency Filter') => 'CURRENCY', _('Email Customers') => 'YES_NO', _('Comments') => 'TEXTBOX')); -$reports->addReport(_('Customer'),111,_('&Print Sales Quotations'), +$reports->addReport(RC_CUSTOMER, 111, _('&Print Sales Quotations'), array( _('From') => 'QUOTATIONS', _('To') => 'QUOTATIONS', _('Currency Filter') => 'CURRENCY', _('Email Customers') => 'YES_NO', _('Comments') => 'TEXTBOX')); -$reports->addReport(_('Customer'),112,_('Print Receipts'), +$reports->addReport(RC_CUSTOMER, 112, _('Print Receipts'), array( _('From') => 'RECEIPT', _('To') => 'RECEIPT', _('Currency Filter') => 'CURRENCY', _('Comments') => 'TEXTBOX')); -$reports->addReportClass(_('Supplier')); -$reports->addReport(_('Supplier'),201,_('Supplier &Balances'), +$reports->addReportClass(_('Supplier'), RC_SUPPLIER); +$reports->addReport(RC_SUPPLIER, 201, _('Supplier &Balances'), array( _('Start Date') => 'DATEBEGIN', _('End Date') => 'DATEENDM', _('Supplier') => 'SUPPLIERS_NO_FILTER', @@ -126,7 +130,7 @@ $reports->addReport(_('Supplier'),201,_('Supplier &Balances'), _('Suppress Zeros') => 'YES_NO', _('Comments') => 'TEXTBOX', _('Destination') => 'DESTINATION')); -$reports->addReport(_('Supplier'),202,_('&Aged Supplier Analyses'), +$reports->addReport(RC_SUPPLIER, 202, _('&Aged Supplier Analyses'), array( _('End Date') => 'DATE', _('Supplier') => 'SUPPLIERS_NO_FILTER', _('Currency Filter') => 'CURRENCY', @@ -135,43 +139,44 @@ $reports->addReport(_('Supplier'),202,_('&Aged Supplier Analyses'), _('Graphics') => 'GRAPHIC', _('Comments') => 'TEXTBOX', _('Destination') => 'DESTINATION')); -$reports->addReport(_('Supplier'),203,_('&Payment Report'), +$reports->addReport(RC_SUPPLIER, 203, _('&Payment Report'), array( _('End Date') => 'DATE', _('Supplier') => 'SUPPLIERS_NO_FILTER', _('Currency Filter') => 'CURRENCY', _('Suppress Zeros') => 'YES_NO', _('Comments') => 'TEXTBOX', _('Destination') => 'DESTINATION')); -$reports->addReport(_('Supplier'),204,_('Outstanding &GRNs Report'), +$reports->addReport(RC_SUPPLIER, 204, _('Outstanding &GRNs Report'), array( _('Supplier') => 'SUPPLIERS_NO_FILTER', _('Comments') => 'TEXTBOX', _('Destination') => 'DESTINATION')); -$reports->addReport(_('Supplier'),209,_('Print Purchase &Orders'), +$reports->addReport(RC_SUPPLIER, 209, _('Print Purchase &Orders'), array( _('From') => 'PO', _('To') => 'PO', _('Currency Filter') => 'CURRENCY', _('Email Customers') => 'YES_NO', _('Comments') => 'TEXTBOX')); -$reports->addReport(_('Supplier'),210,_('Print Remittances'), +$reports->addReport(RC_SUPPLIER, 210, _('Print Remittances'), array( _('From') => 'REMITTANCE', _('To') => 'REMITTANCE', _('Currency Filter') => 'CURRENCY', _('Email Customers') => 'YES_NO', _('Comments') => 'TEXTBOX')); -$reports->addReportClass(_('Inventory')); -$reports->addReport(_('Inventory'),301,_('Inventory &Valuation Report'), +$reports->addReportClass(_('Inventory'), RC_INVENTORY); + +$reports->addReport(RC_INVENTORY, 301, _('Inventory &Valuation Report'), array( _('Inventory Category') => 'CATEGORIES', _('Location') => 'LOCATIONS', _('Summary Only') => 'YES_NO', _('Comments') => 'TEXTBOX', _('Destination') => 'DESTINATION')); -$reports->addReport(_('Inventory'),302,_('Inventory &Planning Report'), +$reports->addReport(RC_INVENTORY, 302, _('Inventory &Planning Report'), array( _('Inventory Category') => 'CATEGORIES', _('Location') => 'LOCATIONS', _('Comments') => 'TEXTBOX', _('Destination') => 'DESTINATION')); -$reports->addReport(_('Inventory'),303,_('Stock &Check Sheets'), +$reports->addReport(RC_INVENTORY, 303, _('Stock &Check Sheets'), array( _('Inventory Category') => 'CATEGORIES', _('Location') => 'LOCATIONS', _('Show Pictures') => 'YES_NO', @@ -180,7 +185,7 @@ $reports->addReport(_('Inventory'),303,_('Stock &Check Sheets'), _('Suppress Zeros') => 'YES_NO', _('Comments') => 'TEXTBOX', _('Destination') => 'DESTINATION')); -$reports->addReport(_('Inventory'),304,_('Inventory &Sales Report'), +$reports->addReport(RC_INVENTORY, 304, _('Inventory &Sales Report'), array( _('Start Date') => 'DATEBEGINM', _('End Date') => 'DATEENDM', _('Inventory Category') => 'CATEGORIES', @@ -188,61 +193,61 @@ $reports->addReport(_('Inventory'),304,_('Inventory &Sales Report'), _('Customer') => 'CUSTOMERS_NO_FILTER', _('Comments') => 'TEXTBOX', _('Destination') => 'DESTINATION')); -$reports->addReport(_('Inventory'),305,_('&GRN Valuation Report'), +$reports->addReport(RC_INVENTORY, 305, _('&GRN Valuation Report'), array( _('Start Date') => 'DATEBEGINM', _('End Date') => 'DATEENDM', _('Comments') => 'TEXTBOX', _('Destination') => 'DESTINATION')); -$reports->addReportClass(_('Manufacturing')); -$reports->addReport(_('Manufacturing'),401,_('&Bill of Material Listing'), +$reports->addReportClass(_('Manufacturing'), RC_MANUFACTURE); +$reports->addReport(RC_MANUFACTURE, 401, _('&Bill of Material Listing'), array( _('From product') => 'ITEMS', _('To product') => 'ITEMS', _('Comments') => 'TEXTBOX', _('Destination') => 'DESTINATION')); -$reports->addReport(_('Manufacturing'),409,_('Print &Work Orders'), +$reports->addReport(RC_MANUFACTURE, 409, _('Print &Work Orders'), array( _('From') => 'WORKORDER', _('To') => 'WORKORDER', _('Email Locations') => 'YES_NO', _('Comments') => 'TEXTBOX')); -$reports->addReportClass(_('Dimensions')); +$reports->addReportClass(_('Dimensions'), RC_DIMENSIONS); if ($dim > 0) { - $reports->addReport(_('Dimensions'),501,_('Dimension &Summary'), + $reports->addReport(RC_DIMENSIONS, 501, _('Dimension &Summary'), array( _('From Dimension') => 'DIMENSION', _('To Dimension') => 'DIMENSION', _('Show Balance') => 'YES_NO', _('Comments') => 'TEXTBOX', _('Destination') => 'DESTINATION')); - //$reports->addReport(_('Dimensions'),502,_('Dimension Details'), + //$reports->addReport(_('Dimensions'),502, _('Dimension Details'), //array( _('Dimension'),'DIMENSIONS'), // _('Comments'),'TEXTBOX'))); } -$reports->addReportClass(_('Banking')); - $reports->addReport(_('Banking'),601,_('Bank &Statement'), +$reports->addReportClass(_('Banking'), RC_BANKING); + $reports->addReport(RC_BANKING, 601, _('Bank &Statement'), array( _('Bank Accounts') => 'BANK_ACCOUNTS', _('Start Date') => 'DATEBEGINM', _('End Date') => 'DATEENDM', _('Comments') => 'TEXTBOX', _('Destination') => 'DESTINATION')); -$reports->addReportClass(_('General Ledger')); -$reports->addReport(_('General Ledger'),701,_('Chart of &Accounts'), +$reports->addReportClass(_('General Ledger'), RC_GL); +$reports->addReport(RC_GL, 701, _('Chart of &Accounts'), array( _('Show Balances') => 'YES_NO', _('Comments') => 'TEXTBOX', _('Destination') => 'DESTINATION')); -$reports->addReport(_('General Ledger'),702,_('List of &Journal Entries'), +$reports->addReport(RC_GL, 702, _('List of &Journal Entries'), array( _('Start Date') => 'DATEBEGINM', _('End Date') => 'DATEENDM', _('Type') => 'SYS_TYPES', _('Comments') => 'TEXTBOX', _('Destination') => 'DESTINATION')); -//$reports->addReport(_('General Ledger'),703,_('GL Account Group Summary'), +//$reports->addReport(RC_GL, 703, _('GL Account Group Summary'), // array( _('Comments'),'TEXTBOX'))); if ($dim == 2) { - $reports->addReport(_('General Ledger'),704,_('GL Account &Transactions'), + $reports->addReport(RC_GL, 704, _('GL Account &Transactions'), array( _('Start Date') => 'DATEBEGINM', _('End Date') => 'DATEENDM', _('From Account') => 'GL_ACCOUNTS', @@ -251,32 +256,35 @@ if ($dim == 2) _('Dimension')." 2" => 'DIMENSIONS2', _('Comments') => 'TEXTBOX', _('Destination') => 'DESTINATION')); - $reports->addReport(_('General Ledger'),705,_('Annual &Expense Breakdown'), + $reports->addReport(RC_GL, 705, _('Annual &Expense Breakdown'), array( _('Year') => 'TRANS_YEARS', _('Dimension')." 1" => 'DIMENSIONS1', _('Dimension')." 2" => 'DIMENSIONS2', + _('Account Tags') => 'ACCOUNTTAGS', _('Comments') => 'TEXTBOX', _('Destination') => 'DESTINATION')); - $reports->addReport(_('General Ledger'),706,_('&Balance Sheet'), + $reports->addReport(RC_GL, 706, _('&Balance Sheet'), array( _('Start Date') => 'DATEBEGIN', _('End Date') => 'DATEENDM', _('Dimension')." 1" => 'DIMENSIONS1', _('Dimension')." 2" => 'DIMENSIONS2', + _('Account Tags') => 'ACCOUNTTAGS', _('Decimal values') => 'YES_NO', _('Graphics') => 'GRAPHIC', _('Comments') => 'TEXTBOX', _('Destination') => 'DESTINATION')); - $reports->addReport(_('General Ledger'),707,_('&Profit and Loss Statement'), + $reports->addReport(RC_GL, 707, _('&Profit and Loss Statement'), array( _('Start Date') => 'DATEBEGINM', _('End Date') => 'DATEENDM', _('Compare to') => 'COMPARE', _('Dimension')." 1" => 'DIMENSIONS1', _('Dimension')." 2" => 'DIMENSIONS2', + _('Account Tags') => 'ACCOUNTTAGS', _('Decimal values') => 'YES_NO', _('Graphics') => 'GRAPHIC', _('Comments') => 'TEXTBOX', _('Destination') => 'DESTINATION')); - $reports->addReport(_('General Ledger'),708,_('Trial &Balance'), + $reports->addReport(RC_GL, 708, _('Trial &Balance'), array( _('Start Date') => 'DATEBEGINM', _('End Date') => 'DATEENDM', _('Zero values') => 'YES_NO', @@ -288,7 +296,7 @@ if ($dim == 2) } else if ($dim == 1) { - $reports->addReport(_('General Ledger'),704,_('GL Account &Transactions'), + $reports->addReport(RC_GL, 704, _('GL Account &Transactions'), array( _('Start Date') => 'DATEBEGINM', _('End Date') => 'DATEENDM', _('From Account') => 'GL_ACCOUNTS', @@ -296,29 +304,32 @@ else if ($dim == 1) _('Dimension') => 'DIMENSIONS1', _('Comments') => 'TEXTBOX', _('Destination') => 'DESTINATION')); - $reports->addReport(_('General Ledger'),705,_('Annual &Expense Breakdown'), + $reports->addReport(RC_GL, 705, _('Annual &Expense Breakdown'), array( _('Year') => 'TRANS_YEARS', _('Dimension') => 'DIMENSIONS1', + _('Account Tags') => 'ACCOUNTTAGS', _('Comments') => 'TEXTBOX', _('Destination') => 'DESTINATION')); - $reports->addReport(_('General Ledger'),706,_('&Balance Sheet'), + $reports->addReport(RC_GL, 706, _('&Balance Sheet'), array( _('Start Date') => 'DATEBEGIN', _('End Date') => 'DATEENDM', _('Dimension') => 'DIMENSIONS1', + _('Account Tags') => 'ACCOUNTTAGS', _('Decimal values') => 'YES_NO', _('Graphics') => 'GRAPHIC', _('Comments') => 'TEXTBOX', _('Destination') => 'DESTINATION')); - $reports->addReport(_('General Ledger'),707,_('&Profit and Loss Statement'), + $reports->addReport(RC_GL, 707, _('&Profit and Loss Statement'), array( _('Start Date') => 'DATEBEGINM', _('End Date') => 'DATEENDM', _('Compare to') => 'COMPARE', _('Dimension') => 'DIMENSIONS1', + _('Account Tags') => 'ACCOUNTTAGS', _('Decimal values') => 'YES_NO', _('Graphics') => 'GRAPHIC', _('Comments') => 'TEXTBOX', _('Destination') => 'DESTINATION')); - $reports->addReport(_('General Ledger'),708,_('Trial &Balance'), + $reports->addReport(RC_GL, 708, _('Trial &Balance'), array( _('Start Date') => 'DATEBEGINM', _('End Date') => 'DATEENDM', _('Zero values') => 'YES_NO', @@ -329,33 +340,36 @@ else if ($dim == 1) } else { - $reports->addReport(_('General Ledger'),704,_('GL Account &Transactions'), + $reports->addReport(RC_GL, 704, _('GL Account &Transactions'), array( _('Start Date') => 'DATEBEGINM', _('End Date') => 'DATEENDM', _('From Account') => 'GL_ACCOUNTS', _('To Account') => 'GL_ACCOUNTS', _('Comments') => 'TEXTBOX', _('Destination') => 'DESTINATION')); - $reports->addReport(_('General Ledger'),705,_('Annual &Expense Breakdown'), + $reports->addReport(RC_GL, 705, _('Annual &Expense Breakdown'), array( _('Year') => 'TRANS_YEARS', + _('Account Tags') => 'ACCOUNTTAGS', _('Comments') => 'TEXTBOX', _('Destination') => 'DESTINATION')); - $reports->addReport(_('General Ledger'),706,_('&Balance Sheet'), + $reports->addReport(RC_GL, 706, _('&Balance Sheet'), array( _('Start Date') => 'DATEBEGIN', _('End Date') => 'DATEENDM', + _('Account Tags') => 'ACCOUNTTAGS', _('Decimal values') => 'YES_NO', _('Graphics') => 'GRAPHIC', _('Comments') => 'TEXTBOX', _('Destination') => 'DESTINATION')); - $reports->addReport(_('General Ledger'),707,_('&Profit and Loss Statement'), + $reports->addReport(RC_GL, 707, _('&Profit and Loss Statement'), array( _('Start Date') => 'DATEBEGINM', _('End Date') => 'DATEENDM', _('Compare to') => 'COMPARE', + _('Account Tags') => 'ACCOUNTTAGS', _('Decimal values') => 'YES_NO', _('Graphics') => 'GRAPHIC', _('Comments') => 'TEXTBOX', _('Destination') => 'DESTINATION')); - $reports->addReport(_('General Ledger'),708,_('Trial &Balance'), + $reports->addReport(RC_GL, 708, _('Trial &Balance'), array( _('Start Date') => 'DATEBEGINM', _('End Date') => 'DATEENDM', _('Zero values') => 'YES_NO', @@ -363,13 +377,13 @@ else _('Comments') => 'TEXTBOX', _('Destination') => 'DESTINATION')); } -$reports->addReport(_('General Ledger'),709,_('Ta&x Report'), +$reports->addReport(RC_GL, 709, _('Ta&x Report'), array( _('Start Date') => 'DATEBEGINTAX', _('End Date') => 'DATEENDTAX', _('Summary Only') => 'YES_NO', _('Comments') => 'TEXTBOX', _('Destination') => 'DESTINATION')); -$reports->addReport(_('General Ledger'),710,_('Audit Trail'), +$reports->addReport(RC_GL, 710, _('Audit Trail'), array( _('Start Date') => 'DATEBEGINM', _('End Date') => 'DATEENDM', _('Type') => 'SYS_TYPES_ALL', @@ -379,13 +393,6 @@ $reports->addReport(_('General Ledger'),710,_('Audit Trail'), add_custom_reports($reports); -echo " -"; echo $reports->getDisplay(); end_page(); diff --git a/sales/create_recurrent_invoices.php b/sales/create_recurrent_invoices.php index 1f71ae42..dcc9cffe 100644 --- a/sales/create_recurrent_invoices.php +++ b/sales/create_recurrent_invoices.php @@ -23,13 +23,6 @@ if ($use_popup_windows) page(_($help_context = "Create and Print Recurrent Invoices"), false, false, "", $js); -function set_last_sent($id, $date) -{ - $date = date2sql($date); - $sql = "UPDATE ".TB_PREF."recurrent_invoices SET last_sent='$date' WHERE id=".db_escape($id); - db_query($sql,"The recurrent invoice could not be updated or added"); -} - function create_recurrent_invoices($customer_id, $branch_id, $order_no, $tmpl_no) { global $Refs; @@ -42,7 +35,7 @@ function create_recurrent_invoices($customer_id, $branch_id, $order_no, $tmpl_no $doc->trans_no = 0; $doc->document_date = Today(); // 2006-06-15. Added so Invoices and Deliveries get current day - $doc->due_date = get_invoice_duedate($doc->customer_id, $doc->document_date); + $doc->due_date = get_invoice_duedate($doc->payment, $doc->document_date); $doc->reference = $Refs->get_next($doc->trans_type); //$doc->Comments=''; @@ -55,7 +48,7 @@ function create_recurrent_invoices($customer_id, $branch_id, $order_no, $tmpl_no $cart->trans_type = ST_SALESINVOICE; $cart->reference = $Refs->get_next($cart->trans_type); $invno = $cart->write(1); - set_last_sent($tmpl_no, $cart->document_date); + update_last_sent_recurrent_invoice($tmpl_no, $cart->document_date); return $invno; } @@ -65,10 +58,7 @@ if (isset($_GET['recurrent'])) if (is_date_in_fiscalyear($date)) { $invs = array(); - $sql = "SELECT * FROM ".TB_PREF."recurrent_invoices WHERE id=".db_escape($_GET['recurrent']); - - $result = db_query($sql,"could not get recurrent invoice"); - $myrow = db_fetch($result); + $myrow = get_recurrent_invoice($_GET['recurrent']); if ($myrow['debtor_no'] == 0) { $cust = get_cust_branches_from_group($myrow['group_no']); @@ -100,21 +90,11 @@ if (isset($_GET['recurrent'])) } else display_error(_("The entered date is not in fiscal year.")); -} - -//------------------------------------------------------------------------------------------------- -function get_sales_group_name($group_no) -{ - $sql = "SELECT description FROM ".TB_PREF."groups WHERE id = ".db_escape($group_no); - $result = db_query($sql, "could not get group"); - $row = db_fetch($result); - return $row[0]; } -$sql = "SELECT * FROM ".TB_PREF."recurrent_invoices ORDER BY description, group_no, debtor_no"; -$result = db_query($sql,"could not get recurrent invoices"); +$result = get_recurrent_invoices(); -start_table("$table_style width=70%"); +start_table(TABLESTYLE, "width=70%"); $th = array(_("Description"), _("Template No"),_("Customer"),_("Branch")."/"._("Group"),_("Days"),_("Monthly"),_("Begin"),_("End"),_("Last Created"),""); table_header($th); $k = 0; @@ -170,7 +150,7 @@ if ($due) else display_note(_("No recurrent invoices are due."), 1, 0); -echo '
'; +br(); end_page(); ?> diff --git a/sales/credit_note_entry.php b/sales/credit_note_entry.php index 9a4ee5db..513fb25e 100644 --- a/sales/credit_note_entry.php +++ b/sales/credit_note_entry.php @@ -67,8 +67,8 @@ if (isset($_GET['AddedID'])) { display_note(get_customer_trans_view_str($trans_type, $credit_no, _("&View this credit note")), 0, 1); - display_note(print_document_link($credit_no, _("&Print This Credit Invoice"), true, ST_CUSTCREDIT),0, 1); - display_note(print_document_link($credit_no, _("&Email This Credit Invoice"), true, ST_CUSTCREDIT, false, "printlink", "", 1),0, 1); + display_note(print_document_link($credit_no."-".$trans_type, _("&Print This Credit Invoice"), true, ST_CUSTCREDIT),0, 1); + display_note(print_document_link($credit_no."-".$trans_type, _("&Email This Credit Invoice"), true, ST_CUSTCREDIT, false, "printlink", "", 1),0, 1); display_note(get_gl_view_str($trans_type, $credit_no, _("View the GL &Journal Entries for this Credit Note"))); @@ -96,7 +96,8 @@ function copy_to_cn() $cart->freight_cost = input_num('ChargeFreightCost'); $cart->Location = $_POST["Location"]; $cart->sales_type = $_POST['sales_type_id']; - $cart->reference = $_POST['ref']; + if ($cart->trans_no == 0) + $cart->reference = $_POST['ref']; $cart->ship_via = $_POST['ShipperID']; $cart->dimension_id = $_POST['dimension_id']; $cart->dimension2_id = $_POST['dimension2_id']; @@ -112,7 +113,8 @@ function copy_from_cn() $_POST['ChargeFreightCost'] = price_format($cart->freight_cost); $_POST['Location'] = $cart->Location; $_POST['sales_type_id'] = $cart->sales_type; - $_POST['ref'] = $cart->reference; + if ($cart->trans_no == 0) + $_POST['ref'] = $cart->reference; $_POST['ShipperID'] = $cart->ship_via; $_POST['dimension_id'] = $cart->dimension_id; $_POST['dimension2_id'] = $cart->dimension2_id; @@ -264,7 +266,7 @@ hidden('cart_id'); $customer_error = display_credit_header($_SESSION['Items']); if ($customer_error == "") { - start_table("$table_style width=80%", 10); + start_table(TABLESTYLE, "width=80%", 10); echo "
'; + hyperlink_params_td($path_to_root . "/sales/manage/customer_branches.php", + ''. (@$_REQUEST['popup'] ? _("Select or &Add") : _("&Add or Edit ")).'', + "debtor_no=".$selected_id.(@$_REQUEST['popup'] ? '&popup=1':'')); + end_row(); + } + + textarea_row(_("General Notes:"), 'notes', null, 35, 5); + end_outer_table(1); + + div_start('controls'); + if (!$selected_id) + { + submit_center('submit', _("Add New Customer"), true, '', 'default'); + } + else + { + submit_center_first('submit', _("Update Customer"), + _('Update customer data'), @$_REQUEST['popup'] ? true : 'default'); + submit_return('select', $selected_id, _("Select this customer and return to document entry.")); + submit_center_last('delete', _("Delete Customer"), + _('Delete customer data if have been never used'), true); + } + div_end(); +} + +//-------------------------------------------------------------------------------------------- + check_db_has_sales_types(_("There are no sales types defined. Please define at least one sales type before adding a customer.")); start_form(); if (db_has_customers()) { - start_table("class = 'tablestyle_noborder'"); + start_table(TABLESTYLE_NOBORDER); start_row(); customer_list_cells(_("Select a customer: "), 'customer_id', null, _('New customer'), true, check_value('show_inactive')); check_cells(_("Show inactive:"), 'show_inactive', null, true); end_row(); end_table(); + if (get_post('_show_inactive_update')) { $Ajax->activate('customer_id'); set_focus('customer_id'); @@ -213,118 +293,28 @@ else hidden('customer_id'); } -if ($new_customer) -{ - $_POST['CustName'] = $_POST['cust_ref'] = $_POST['address'] = $_POST['tax_id'] = ''; - $_POST['dimension_id'] = 0; - $_POST['dimension2_id'] = 0; - $_POST['sales_type'] = -1; - $_POST['email'] = ''; - $_POST['curr_code'] = get_company_currency(); - $_POST['credit_status'] = -1; - $_POST['payment_terms'] = $_POST['notes'] = ''; - - $_POST['discount'] = $_POST['pymt_discount'] = percent_format(0); - $_POST['credit_limit'] = price_format($SysPrefs->default_credit_limit()); - $_POST['inactive'] = 0; -} -else -{ - - $sql = "SELECT * FROM ".TB_PREF."debtors_master WHERE debtor_no = ".db_escape($_POST['customer_id']); - $result = db_query($sql,"check failed"); - - $myrow = db_fetch($result); - - $_POST['CustName'] = $myrow["name"]; - $_POST['cust_ref'] = $myrow["debtor_ref"]; - $_POST['address'] = $myrow["address"]; - $_POST['tax_id'] = $myrow["tax_id"]; - $_POST['email'] = $myrow["email"]; - $_POST['dimension_id'] = $myrow["dimension_id"]; - $_POST['dimension2_id'] = $myrow["dimension2_id"]; - $_POST['sales_type'] = $myrow["sales_type"]; - $_POST['curr_code'] = $myrow["curr_code"]; - $_POST['credit_status'] = $myrow["credit_status"]; - $_POST['payment_terms'] = $myrow["payment_terms"]; - $_POST['discount'] = percent_format($myrow["discount"] * 100); - $_POST['pymt_discount'] = percent_format($myrow["pymt_discount"] * 100); - $_POST['credit_limit'] = price_format($myrow["credit_limit"]); - $_POST['notes'] = $myrow["notes"]; - $_POST['inactive'] = $myrow["inactive"]; -} - -start_outer_table($table_style2, 5); -table_section(1); -table_section_title(_("Name and Address")); - -text_row(_("Customer Name:"), 'CustName', $_POST['CustName'], 40, 80); -text_row(_("Customer Short Name:"), 'cust_ref', null, 30, 30); -textarea_row(_("Address:"), 'address', $_POST['address'], 35, 5); - -email_row(_("E-mail:"), 'email', null, 40, 40); -text_row(_("GSTNo:"), 'tax_id', null, 40, 40); - +if (!$selected_id) + unset($_POST['_tabs_sel']); // force settings tab for new customer -if ($new_customer) -{ - currencies_list_row(_("Customer's Currency:"), 'curr_code', $_POST['curr_code']); -} -else -{ - label_row(_("Customer's Currency:"), $_POST['curr_code']); - hidden('curr_code', $_POST['curr_code']); -} -sales_types_list_row(_("Sales Type/Price List:"), 'sales_type', $_POST['sales_type']); - -table_section(2); - -table_section_title(_("Sales")); - -percent_row(_("Discount Percent:"), 'discount', $_POST['discount']); -percent_row(_("Prompt Payment Discount Percent:"), 'pymt_discount', $_POST['pymt_discount']); -amount_row(_("Credit Limit:"), 'credit_limit', $_POST['credit_limit']); - -payment_terms_list_row(_("Payment Terms:"), 'payment_terms', $_POST['payment_terms']); -credit_status_list_row(_("Credit Status:"), 'credit_status', $_POST['credit_status']); -$dim = get_company_pref('use_dimension'); -if ($dim >= 1) - dimensions_list_row(_("Dimension")." 1:", 'dimension_id', $_POST['dimension_id'], true, " ", false, 1); -if ($dim > 1) - dimensions_list_row(_("Dimension")." 2:", 'dimension2_id', $_POST['dimension2_id'], true, " ", false, 2); -if ($dim < 1) - hidden('dimension_id', 0); -if ($dim < 2) - hidden('dimension2_id', 0); - -if (!$new_customer) { - start_row(); - echo ''; - hyperlink_params_td($path_to_root . "/sales/manage/customer_branches.php", - ''. (@$_REQUEST['popup'] ? _("Select or &Add") : _("&Add or Edit ")).'', - "debtor_no=".$_POST['customer_id'].(@$_REQUEST['popup'] ? '&popup=1':'')); - end_row(); - -} - -textarea_row(_("General Notes:"), 'notes', null, 35, 5); -record_status_list_row(_("Customer status:"), 'inactive'); -end_outer_table(1); +tabbed_content_start('tabs', array( + 'settings' => array(_('&General settings'), $selected_id), + 'contacts' => array(_('&Contacts'), $selected_id), + )); + + switch (get_post('_tabs_sel')) { + default: + case 'settings': + customer_settings($selected_id); + break; + case 'contacts': + $contacts = new contacts('contacts', $selected_id, 'customer'); + $contacts->show(); + break; + case 'orders': + }; +br(); +tabbed_content_end(); -div_start('controls'); -if ($new_customer) -{ - submit_center('submit', _("Add New Customer"), true, '', 'default'); -} -else -{ - submit_center_first('submit', _("Update Customer"), - _('Update customer data'), @$_REQUEST['popup'] ? true : 'default'); - submit_return('select', get_post('customer_id'), _("Select this customer and return to document entry.")); - submit_center_last('delete', _("Delete Customer"), - _('Delete customer data if have been never used'), true); -} -div_end(); hidden('popup', @$_REQUEST['popup']); end_form(); end_page(); diff --git a/sales/manage/recurrent_invoices.php b/sales/manage/recurrent_invoices.php index f646ff2a..a595815e 100644 --- a/sales/manage/recurrent_invoices.php +++ b/sales/manage/recurrent_invoices.php @@ -13,6 +13,7 @@ $page_security = 'SA_SRECURRENT'; $path_to_root = "../.."; include($path_to_root . "/includes/session.inc"); include($path_to_root . "/includes/ui.inc"); +include_once($path_to_root . "/sales/includes/sales_db.inc"); $js = ""; if ($use_popup_windows) @@ -40,29 +41,17 @@ if ($Mode=='ADD_ITEM' || $Mode=='UPDATE_ITEM') { if ($selected_id != -1) { - $sql = "UPDATE ".TB_PREF."recurrent_invoices SET - description=".db_escape($_POST['description']).", - order_no=".db_escape($_POST['order_no']).", - debtor_no=".db_escape($_POST['debtor_no']).", - group_no=".db_escape($_POST['group_no']).", - days=".input_num('days', 0).", - monthly=".input_num('monthly', 0).", - begin='".date2sql($_POST['begin'])."', - end='".date2sql($_POST['end'])."' - WHERE id = ".db_escape($selected_id); + update_recurrent_invoice($selected_id, $_POST['description'], $_POST['order_no'], $_POST['debtor_no'], + $_POST['group_no'], input_num('days', 0), input_num('monthly', 0), $_POST['begin'], $_POST['end']); $note = _('Selected recurrent invoice has been updated'); } else { - $sql = "INSERT INTO ".TB_PREF."recurrent_invoices (description, order_no, debtor_no, - group_no, days, monthly, begin, end, last_sent) VALUES (".db_escape($_POST['description']) . ", " - .db_escape($_POST['order_no']).", ".db_escape($_POST['debtor_no']).", " - .db_escape($_POST['group_no']).", ".input_num('days', 0).", ".input_num('monthly', 0).", '" - .date2sql($_POST['begin'])."', '".date2sql($_POST['end'])."', '".date2sql(Add_Years($_POST['begin'], -5))."')"; + add_recurrent_invoice($_POST['description'], $_POST['order_no'], $_POST['debtor_no'], $_POST['group_no'], + input_num('days', 0), input_num('monthly', 0), $_POST['begin'], $_POST['end']); $note = _('New recurrent invoice has been added'); } - db_query($sql,"The recurrent invoice could not be updated or added"); display_notification($note); $Mode = 'RESET'; } @@ -75,8 +64,7 @@ if ($Mode == 'Delete') if ($cancel_delete == 0) { - $sql="DELETE FROM ".TB_PREF."recurrent_invoices WHERE id=".db_escape($selected_id); - db_query($sql,"could not delete recurrent invoice"); + delete_recurrent_invoice($selected_id); display_notification(_('Selected recurrent invoice has been deleted')); } //end if Delete area @@ -89,19 +77,11 @@ if ($Mode == 'RESET') unset($_POST); } //------------------------------------------------------------------------------------------------- -function get_sales_group_name($group_no) -{ - $sql = "SELECT description FROM ".TB_PREF."groups WHERE id = ".db_escape($group_no); - $result = db_query($sql, "could not get group"); - $row = db_fetch($result); - return $row[0]; -} -$sql = "SELECT * FROM ".TB_PREF."recurrent_invoices ORDER BY description, group_no, debtor_no"; -$result = db_query($sql,"could not get recurrent invoices"); +$result = get_recurrent_invoices(); start_form(); -start_table("$table_style width=70%"); +start_table(TABLESTYLE, "width=70%"); $th = array(_("Description"), _("Template No"),_("Customer"),_("Branch")."/"._("Group"),_("Days"),_("Monthly"),_("Begin"),_("End"),_("Last Created"),"", ""); table_header($th); $k = 0; @@ -143,16 +123,13 @@ echo '
'; start_form(); -start_table($table_style2); +start_table(TABLESTYLE2); if ($selected_id != -1) { if ($Mode == 'Edit') { //editing an existing area - $sql = "SELECT * FROM ".TB_PREF."recurrent_invoices WHERE id=".db_escape($selected_id); - - $result = db_query($sql,"could not get recurrent invoice"); - $myrow = db_fetch($result); + $myrow = get_recurrent_invoice($selected_id); $_POST['description'] = $myrow["description"]; $_POST['order_no'] = $myrow["order_no"]; diff --git a/sales/manage/sales_areas.php b/sales/manage/sales_areas.php index 8bb0ffd1..4793ce7e 100644 --- a/sales/manage/sales_areas.php +++ b/sales/manage/sales_areas.php @@ -35,16 +35,15 @@ if ($Mode=='ADD_ITEM' || $Mode=='UPDATE_ITEM') { if ($selected_id != -1) { - $sql = "UPDATE ".TB_PREF."areas SET description=".db_escape($_POST['description'])." WHERE area_code = ".db_escape($selected_id); + update_sales_area($selected_id, $_POST['description']); $note = _('Selected sales area has been updated'); } else { - $sql = "INSERT INTO ".TB_PREF."areas (description) VALUES (".db_escape($_POST['description']) . ")"; + add_sales_area($_POST['description']); $note = _('New sales area has been added'); } - db_query($sql,"The sales area could not be updated or added"); display_notification($note); $Mode = 'RESET'; } @@ -57,18 +56,14 @@ if ($Mode == 'Delete') // PREVENT DELETES IF DEPENDENT RECORDS IN 'debtors_master' - $sql= "SELECT COUNT(*) FROM ".TB_PREF."cust_branch WHERE area=".db_escape($selected_id); - $result = db_query($sql,"check failed"); - $myrow = db_fetch_row($result); - if ($myrow[0] > 0) + if (key_in_foreign_table($selected_id, 'cust_branch', 'area')) { $cancel_delete = 1; display_error(_("Cannot delete this area because customer branches have been created using this area.")); } if ($cancel_delete == 0) { - $sql="DELETE FROM ".TB_PREF."areas WHERE area_code=".db_escape($selected_id); - db_query($sql,"could not delete sales area"); + delete_sales_area($selected_id); display_notification(_('Selected sales area has been deleted')); } //end if Delete area @@ -85,12 +80,10 @@ if ($Mode == 'RESET') //------------------------------------------------------------------------------------------------- -$sql = "SELECT * FROM ".TB_PREF."areas"; -if (!check_value('show_inactive')) $sql .= " WHERE !inactive"; -$result = db_query($sql,"could not get areas"); +$result = get_sales_areas(check_value('show_inactive')); start_form(); -start_table("$table_style width=30%"); +start_table(TABLESTYLE, "width=30%"); $th = array(_("Area Name"), "", ""); inactive_control_column($th); @@ -118,16 +111,13 @@ echo '
'; //------------------------------------------------------------------------------------------------- -start_table($table_style2); +start_table(TABLESTYLE2); if ($selected_id != -1) { if ($Mode == 'Edit') { //editing an existing area - $sql = "SELECT * FROM ".TB_PREF."areas WHERE area_code=".db_escape($selected_id); - - $result = db_query($sql,"could not get area"); - $myrow = db_fetch($result); + $myrow = get_sales_area($selected_id); $_POST['description'] = $myrow["description"]; } diff --git a/sales/manage/sales_groups.php b/sales/manage/sales_groups.php index 2ee95bad..a67dc49a 100644 --- a/sales/manage/sales_groups.php +++ b/sales/manage/sales_groups.php @@ -35,16 +35,15 @@ if ($Mode=='ADD_ITEM' || $Mode=='UPDATE_ITEM') { if ($selected_id != -1) { - $sql = "UPDATE ".TB_PREF."groups SET description=".db_escape($_POST['description'])." WHERE id = ".db_escape($selected_id); + update_sales_group($selected_id, $_POST['description']); $note = _('Selected sales group has been updated'); } else { - $sql = "INSERT INTO ".TB_PREF."groups (description) VALUES (".db_escape($_POST['description']) . ")"; + add_sales_group($_POST['description']); $note = _('New sales group has been added'); } - db_query($sql,"The sales group could not be updated or added"); display_notification($note); $Mode = 'RESET'; } @@ -57,19 +56,14 @@ if ($Mode == 'Delete') // PREVENT DELETES IF DEPENDENT RECORDS IN 'debtors_master' - $sql= "SELECT COUNT(*) FROM ".TB_PREF."cust_branch WHERE group_no=".db_escape($selected_id); - $result = db_query($sql,"check failed"); - $myrow = db_fetch_row($result); - if ($myrow[0] > 0) + if (key_in_foreign_table($selected_id, 'cust_branch', 'group_no')) { $cancel_delete = 1; display_error(_("Cannot delete this group because customers have been created using this group.")); } if ($cancel_delete == 0) { - $sql="DELETE FROM ".TB_PREF."groups WHERE id=".db_escape($selected_id); - db_query($sql,"could not delete sales group"); - + delete_sales_group($selected_id); display_notification(_('Selected sales group has been deleted')); } //end if Delete area $Mode = 'RESET'; @@ -84,14 +78,11 @@ if ($Mode == 'RESET') } //------------------------------------------------------------------------------------------------- -$sql = "SELECT * FROM ".TB_PREF."groups"; -if (!check_value('show_inactive')) $sql .= " WHERE !inactive"; -$sql .= " ORDER BY description"; -$result = db_query($sql,"could not get groups"); +$result = get_sales_groups(check_value('show_inactive')); start_form(); -start_table("$table_style width=30%"); -$th = array(_("Group Name"), "", ""); +start_table(TABLESTYLE, "width=30%"); +$th = array(_("ID"), _("Group Name"), "", ""); inactive_control_column($th); table_header($th); @@ -102,6 +93,7 @@ while ($myrow = db_fetch($result)) alt_table_row_color($k); + label_cell($myrow["id"]); label_cell($myrow["description"]); inactive_control_cell($myrow["id"], $myrow["inactive"], 'groups', 'id'); edit_button_cell("Edit".$myrow["id"], _("Edit")); @@ -110,26 +102,22 @@ while ($myrow = db_fetch($result)) } inactive_control_row($th); -end_table(); - -echo '
'; +end_table(1); //------------------------------------------------------------------------------------------------- -start_table($table_style2); +start_table(TABLESTYLE2); if ($selected_id != -1) { if ($Mode == 'Edit') { //editing an existing area - $sql = "SELECT * FROM ".TB_PREF."groups WHERE id=".db_escape($selected_id); - - $result = db_query($sql,"could not get group"); - $myrow = db_fetch($result); + $myrow = get_sales_group($selected_id); $_POST['description'] = $myrow["description"]; } hidden("selected_id", $selected_id); + label_row(_("ID"), $myrow["id"]); } text_row_ex(_("Group Name:"), 'description', 30); diff --git a/sales/manage/sales_people.php b/sales/manage/sales_people.php index 1c398b61..7969b692 100644 --- a/sales/manage/sales_people.php +++ b/sales/manage/sales_people.php @@ -48,31 +48,16 @@ if ($Mode=='ADD_ITEM' || $Mode=='UPDATE_ITEM') if ($selected_id != -1) { /*selected_id could also exist if submit had not been clicked this code would not run in this case cos submit is false of course see the delete code below*/ - - $sql = "UPDATE ".TB_PREF."salesman SET salesman_name=".db_escape($_POST['salesman_name']) . ", - salesman_phone=".db_escape($_POST['salesman_phone']) . ", - salesman_fax=".db_escape($_POST['salesman_fax']) . ", - salesman_email=".db_escape($_POST['salesman_email']) . ", - provision=".input_num('provision').", - break_pt=".input_num('break_pt').", - provision2=".input_num('provision2')." - WHERE salesman_code = ".db_escape($selected_id); + update_salesman($selected_id, $_POST['salesman_name'], $_POST['salesman_phone'], $_POST['salesman_fax'], + $_POST['salesman_email'], input_num('provision'), input_num('break_pt'), input_num('provision2')); } else { /*Selected group is null cos no item selected on first time round so must be adding a record must be submitting new entries in the new Sales-person form */ - $sql = "INSERT INTO ".TB_PREF."salesman (salesman_name, salesman_phone, salesman_fax, salesman_email, - provision, break_pt, provision2) - VALUES (".db_escape($_POST['salesman_name']) . ", " - .db_escape($_POST['salesman_phone']) . ", " - .db_escape($_POST['salesman_fax']) . ", " - .db_escape($_POST['salesman_email']) . ", ". - input_num('provision').", ".input_num('break_pt').", " - .input_num('provision2').")"; + add_salesman($_POST['salesman_name'], $_POST['salesman_phone'], $_POST['salesman_fax'], + $_POST['salesman_email'], input_num('provision'), input_num('break_pt'), input_num('provision2')); } - //run the sql from either of the above possibilites - db_query($sql,"The insert or update of the sales person failed"); if ($selected_id != -1) display_notification(_('Selected sales person data have been updated')); else @@ -86,17 +71,13 @@ if ($Mode == 'Delete') // PREVENT DELETES IF DEPENDENT RECORDS IN 'debtors_master' - $sql= "SELECT COUNT(*) FROM ".TB_PREF."cust_branch WHERE salesman=".db_escape($selected_id); - $result = db_query($sql,"check failed"); - $myrow = db_fetch_row($result); - if ($myrow[0] > 0) + if (key_in_foreign_table($selected_id, 'cust_branch', 'salesman')) { display_error("Cannot delete this sales-person because branches are set up referring to this sales-person - first alter the branches concerned."); } else { - $sql="DELETE FROM ".TB_PREF."salesman WHERE salesman_code=".db_escape($selected_id); - db_query($sql,"The sales-person could not be deleted"); + delete_salesman($selected_id); display_notification(_('Selected sales person data have been deleted')); } $Mode = 'RESET'; @@ -111,12 +92,10 @@ if ($Mode == 'RESET') } //------------------------------------------------------------------------------------------------ -$sql = "SELECT * FROM ".TB_PREF."salesman"; -if (!check_value('show_inactive')) $sql .= " WHERE !inactive"; -$result = db_query($sql,"could not get sales persons"); +$result = get_salesmen(check_value('show_inactive')); start_form(); -start_table("$table_style width=60%"); +start_table(TABLESTYLE, "width=60%"); $th = array(_("Name"), _("Phone"), _("Fax"), _("Email"), _("Provision"), _("Break Pt."), _("Provision")." 2", "", ""); inactive_control_column($th); table_header($th); @@ -154,10 +133,7 @@ if ($selected_id != -1) { if ($Mode == 'Edit') { //editing an existing Sales-person - $sql = "SELECT * FROM ".TB_PREF."salesman WHERE salesman_code=".db_escape($selected_id); - - $result = db_query($sql,"could not get sales person"); - $myrow = db_fetch($result); + $myrow = get_salesman($selected_id); $_POST['salesman_name'] = $myrow["salesman_name"]; $_POST['salesman_phone'] = $myrow["salesman_phone"]; @@ -174,7 +150,7 @@ if ($selected_id != -1) $_POST['provision2'] = percent_format(0); } -start_table($table_style2); +start_table(TABLESTYLE2); text_row_ex(_("Sales person name:"), 'salesman_name', 30); text_row_ex(_("Telephone number:"), 'salesman_phone', 20); diff --git a/sales/manage/sales_points.php b/sales/manage/sales_points.php index e46e7b74..aa1089d6 100644 --- a/sales/manage/sales_points.php +++ b/sales/manage/sales_points.php @@ -29,13 +29,6 @@ function can_process() set_focus('pos_name'); return false; } - if (!check_value('cash') && !check_value('credit')) - { - display_error(_("You must allow cash or credit sale.")); - set_focus('credit'); - return false; - } - return true; } @@ -64,9 +57,8 @@ if ($Mode=='UPDATE_ITEM' && can_process()) if ($Mode == 'Delete') { - $sql = "SELECT * FROM ".TB_PREF."users WHERE pos=".db_escape($selected_id); - $res = db_query($sql, "canot check pos usage"); - if (db_num_rows($res)) { + if (key_in_foreign_table($selected_id, 'users', 'pos')) + { display_error(_("Cannot delete this POS because it is used in users setup.")); } else { delete_sales_point($selected_id); @@ -87,7 +79,7 @@ if ($Mode == 'RESET') $result = get_all_sales_points(check_value('show_inactive')); start_form(); -start_table("$table_style"); +start_table(TABLESTYLE); $th = array (_('POS Name'), _('Credit sale'), _('Cash sale'), _('Location'), _('Default account'), '',''); @@ -117,7 +109,7 @@ $cash = db_has_cash_accounts(); if (!$cash) display_note(_("To have cash POS first define at least one cash bank account.")); -start_table($table_style2); +start_table(TABLESTYLE2); if ($selected_id != -1) { @@ -136,8 +128,8 @@ if ($selected_id != -1) text_row_ex(_("Point of Sale Name").':', 'name', 20, 30); if($cash) { - check_row(_('Allowed credit sale'), 'credit', check_value('credit_sale')); - check_row(_('Allowed cash sale'), 'cash', check_value('cash_sale')); + check_row(_('Allowed credit sale terms selection:'), 'credit', check_value('credit_sale')); + check_row(_('Allowed cash sale terms selection:'), 'cash', check_value('cash_sale')); cash_accounts_list_row(_("Default cash account").':', 'account'); } else { hidden('credit', 1); diff --git a/sales/manage/sales_types.php b/sales/manage/sales_types.php index 7ebd7685..1a5c1f61 100644 --- a/sales/manage/sales_types.php +++ b/sales/manage/sales_types.php @@ -65,26 +65,15 @@ if ($Mode=='UPDATE_ITEM' && can_process()) if ($Mode == 'Delete') { // PREVENT DELETES IF DEPENDENT RECORDS IN 'debtor_trans' - - $sql= "SELECT COUNT(*) FROM ".TB_PREF."debtor_trans WHERE tpe=".db_escape($selected_id); - $result = db_query($sql,"check failed"); - check_db_error("The number of transactions using this Sales type record could not be retrieved", $sql); - - $myrow = db_fetch_row($result); - if ($myrow[0] > 0) + + if (key_in_foreign_table($selected_id, 'debtor_trans', 'tpe')) { display_error(_("Cannot delete this sale type because customer transactions have been created using this sales type.")); } else { - - $sql = "SELECT COUNT(*) FROM ".TB_PREF."debtors_master WHERE sales_type=".db_escape($selected_id); - $result = db_query($sql,"check failed"); - check_db_error("The number of customers using this Sales type record could not be retrieved", $sql); - - $myrow = db_fetch_row($result); - if ($myrow[0] > 0) + if (key_in_foreign_table($selected_id, 'debtors_master', 'sales_type')) { display_error(_("Cannot delete this sale type because customers are currently set up to use this sales type.")); } @@ -109,7 +98,7 @@ if ($Mode == 'RESET') $result = get_all_sales_types(check_value('show_inactive')); start_form(); -start_table("$table_style width=30%"); +start_table(TABLESTYLE, "width=30%"); $th = array (_('Type Name'), _('Factor'), _('Tax Incl'), '',''); inactive_control_column($th); @@ -145,7 +134,7 @@ display_note(_("Marked sales type is the company base pricelist for prices calcu if (!isset($_POST['base'])) $_POST['base'] = 0; -start_table($table_style2); +start_table(TABLESTYLE2); if ($selected_id != -1) { diff --git a/sales/sales_order_entry.php b/sales/sales_order_entry.php index 625ce897..4a473695 100644 --- a/sales/sales_order_entry.php +++ b/sales/sales_order_entry.php @@ -109,6 +109,8 @@ if (isset($_GET['AddedID'])) { submenu_option(_("Make &Delivery Against This Order"), "/sales/customer_delivery.php?OrderNumber=$order_no"); + submenu_option(_("Work &Order Entry"), "/manufacturing/work_order_entry.php?"); + submenu_option(_("Enter a &New Order"), "/sales/sales_order_entry.php?NewOrder=0"); display_footer_exit(); @@ -235,9 +237,12 @@ function copy_to_cart() $cart->Comments = $_POST['Comments']; $cart->document_date = $_POST['OrderDate']; - if ($cart->trans_type == ST_SALESINVOICE) - $cart->cash = $_POST['cash']; - if ($cart->cash) { +// if ($cart->trans_type == ST_SALESINVOICE) { + if (isset($_POST['payment']) && ($cart->payment != $_POST['payment'])) { + $cart->payment = $_POST['payment']; + $cart->payment_terms = get_payment_terms($_POST['payment']); + } + if ($cart->payment_terms['cash_sale']) { $cart->due_date = $cart->document_date; $cart->phone = $cart->cust_ref = $cart->delivery_address = ''; $cart->freight_cost = input_num('freight_cost'); @@ -291,8 +296,7 @@ function copy_from_cart() $_POST['branch_id'] = $cart->Branch; $_POST['sales_type'] = $cart->sales_type; // POS - if ($cart->trans_type == ST_SALESINVOICE) - $_POST['cash'] = $cart->cash; + $_POST['payment'] = $cart->payment; if ($cart->trans_type!=ST_SALESORDER && $cart->trans_type!=ST_SALESQUOTE) { // 2008-11-12 Joe Hunt $_POST['dimension_id'] = $cart->dimension_id; $_POST['dimension2_id'] = $cart->dimension2_id; @@ -342,7 +346,7 @@ function can_process() { set_focus('AddItem'); return false; } - if ($_SESSION['Items']->cash == 0) { + if ($_SESSION['Items']->payment_terms['cash_sale'] == 0) { if (strlen($_POST['deliver_to']) <= 1) { display_error(_("You must enter the person or company to whom delivery should be made to.")); set_focus('deliver_to'); @@ -445,8 +449,13 @@ if (isset($_POST['update'])) { function check_item_data() { global $SysPrefs; - - if (!check_num('qty', 0) || !check_num('Disc', 0, 100)) { + + if(!get_post('stock_id_text', true)) { + display_error( _("Item description cannot be empty.")); + set_focus('stock_id_edit'); + return false; + } + elseif (!check_num('qty', 0) || !check_num('Disc', 0, 100)) { display_error( _("The item could not be updated because you are attempting to set the quantity ordered to less than 0, or the discount percent to more than 100.")); set_focus('qty'); return false; @@ -487,6 +496,7 @@ function handle_update_item() input_num('qty'), input_num('price'), input_num('Disc') / 100, $_POST['item_description'] ); } + page_modified(); line_start_focus(); } @@ -510,9 +520,11 @@ function handle_new_item() if (!check_item_data()) { return; } - add_to_order($_SESSION['Items'], $_POST['stock_id'], input_num('qty'), - input_num('price'), input_num('Disc') / 100); - $_POST['_stock_id_edit'] = $_POST['stock_id'] = ""; + add_to_order($_SESSION['Items'], get_post('stock_id'), input_num('qty'), + input_num('price'), input_num('Disc') / 100, get_post('stock_id_text')); + + unset($_POST['_stock_id_edit'], $_POST['stock_id']); + page_modified(); line_start_focus(); } @@ -564,8 +576,10 @@ function create_cart($type, $trans_no) { global $Refs; + if (!$_SESSION['SysPrefs']->db_ok) // create_cart is called before page() where the check is done + return; + processing_start(); - $doc_type = $type; if (isset($_GET['NewQuoteToSalesOrder'])) { @@ -579,21 +593,14 @@ function create_cart($type, $trans_no) $_SESSION['Items'] = $doc; } elseif($type != ST_SALESORDER && $type != ST_SALESQUOTE && $trans_no != 0) { // this is template - $doc_type = ST_SALESORDER; $doc = new Cart(ST_SALESORDER, array($trans_no)); $doc->trans_type = $type; $doc->trans_no = 0; $doc->document_date = new_doc_date(); if ($type == ST_SALESINVOICE) { - $doc->due_date = get_invoice_duedate($doc->customer_id, $doc->document_date); - $doc->pos = user_pos(); - $pos = get_sales_point($doc->pos); - $doc->cash = $pos['cash_sale']; - if (!$pos['cash_sale'] || !$pos['credit_sale']) - $doc->pos = -1; // mark not editable payment type - else - $doc->cash = date_diff2($doc->due_date, Today(), 'd')<2; + $doc->due_date = get_invoice_duedate($doc->payment, $doc->document_date); + $doc->pos = get_sales_point(user_pos()); } else $doc->due_date = $doc->document_date; $doc->reference = $Refs->get_next($doc->trans_type); @@ -603,7 +610,7 @@ function create_cart($type, $trans_no) } $_SESSION['Items'] = $doc; } else - $_SESSION['Items'] = new Cart($type,array($trans_no)); + $_SESSION['Items'] = new Cart($type, array($trans_no)); copy_from_cart(); } @@ -665,7 +672,7 @@ $customer_error = display_order_header($_SESSION['Items'], ($_SESSION['Items']->any_already_delivered() == 0), $idate); if ($customer_error == "") { - start_table("$table_style width=80%", 10); + start_table(TABLESTYLE, "width=80%", 10); echo "
"; @@ -691,5 +698,4 @@ if ($customer_error == "") { } end_form(); end_page(); - ?> \ No newline at end of file diff --git a/sales/view/view_credit.php b/sales/view/view_credit.php index 0ca3c7f9..4291d9dc 100644 --- a/sales/view/view_credit.php +++ b/sales/view/view_credit.php @@ -39,11 +39,11 @@ $branch = get_branch($myrow["branch_code"]); display_heading("" . sprintf(_("CREDIT NOTE #%d"), $trans_id). ""); echo "
"; -start_table("$table_style2 width=95%"); +start_table(TABLESTYLE2, "width=95%"); echo "
"; echo "
$st_classes$st_reports$st_params
"; display_credit_items(_("Credit Note Items"), $_SESSION['Items']); credit_options_controls($_SESSION['Items']); diff --git a/sales/customer_credit_invoice.php b/sales/customer_credit_invoice.php index f3594f3d..48f3f0d5 100644 --- a/sales/customer_credit_invoice.php +++ b/sales/customer_credit_invoice.php @@ -54,7 +54,8 @@ if (isset($_GET['AddedID'])) { display_note(get_customer_trans_view_str($trans_type, $credit_no, _("&View This Credit Note")), 0, 0); - display_note(print_document_link($credit_no, _("&Print This Credit Note"), true, $trans_type),1); + display_note(print_document_link($credit_no."-".$trans_type, _("&Print This Credit Note"), true, $trans_type),1); + display_note(print_document_link($credit_no."-".$trans_type, _("&Email This Credit Note"), true, $trans_type, false, "printlink", "", 1),1); display_note(get_gl_view_str($trans_type, $credit_no, _("View the GL &Journal Entries for this Credit Note")),1); @@ -68,7 +69,8 @@ if (isset($_GET['AddedID'])) { display_note(get_customer_trans_view_str($trans_type, $credit_no, _("&View This Credit Note")), 0, 0); - display_note(print_document_link($credit_no, _("&Print This Credit Note"), true, $trans_type),1); + display_note(print_document_link($credit_no."-".$trans_type, _("&Print This Credit Note"), true, $trans_type),1); + display_note(print_document_link($credit_no."-".$trans_type, _("&Email This Credit Note"), true, $trans_type, false, "printlink", "", 1),1); display_note(get_gl_view_str($trans_type, $credit_no, _("View the GL &Journal Entries for this Credit Note")),1); @@ -233,15 +235,13 @@ if (isset($_POST['Location'])) { function display_credit_items() { - global $table_style, $table_style2; - start_form(); hidden('cart_id'); - start_table("$table_style2 width=80%", 5); + start_table(TABLESTYLE2, "width=80%", 5); echo "
"; // outer table - start_table("$table_style width=100%"); + start_table(TABLESTYLE, "width=100%"); start_row(); label_cells(_("Customer"), $_SESSION['Items']->customer_name, "class='tableheader2'"); label_cells(_("Branch"), get_branch_name($_SESSION['Items']->Branch), "class='tableheader2'"); @@ -274,7 +274,7 @@ function display_credit_items() echo "";// outer table - start_table("$table_style width=100%"); + start_table(TABLESTYLE, "width=100%"); label_row(_("Invoice Date"), $_SESSION['Items']->src_date, "class='tableheader2'"); @@ -287,7 +287,7 @@ function display_credit_items() end_table(1); // outer table div_start('credit_items'); - start_table("$table_style width=80%"); + start_table(TABLESTYLE, "width=80%"); $th = array(_("Item Code"), _("Item Description"), _("Invoiced Quantity"), _("Units"), _("Credit Quantity"), _("Price"), _("Discount %"), _("Total")); table_header($th); @@ -347,14 +347,14 @@ function display_credit_items() //----------------------------------------------------------------------------- function display_credit_options() { - global $table_style2, $Ajax; - echo "
"; + global $Ajax; + br(); -if (isset($_POST['_CreditType_update'])) - $Ajax->activate('options'); + if (isset($_POST['_CreditType_update'])) + $Ajax->activate('options'); - div_start('options'); - start_table("$table_style2"); + div_start('options'); + start_table(TABLESTYLE2); credit_type_list_row(_("Credit Note Type"), 'CreditType', null, true); diff --git a/sales/customer_delivery.php b/sales/customer_delivery.php index 36574efa..ee19660c 100644 --- a/sales/customer_delivery.php +++ b/sales/customer_delivery.php @@ -103,6 +103,10 @@ if (isset($_GET['OrderNumber']) && $_GET['OrderNumber'] > 0) { $ord->trans_no = 0; $ord->reference = $Refs->get_next(ST_CUSTDELIVERY); $ord->document_date = new_doc_date(); + $cust = get_customer($ord->customer_id); + // 2010-09-03 Joe Hunt + $ord->dimension_id = $cust['dimension_id']; + $ord->dimension2_id = $cust['dimension2_id']; $_SESSION['Items'] = $ord; copy_from_cart(); @@ -210,6 +214,8 @@ function copy_to_cart() $cart->due_date = $_POST['due_date']; $cart->Location = $_POST['Location']; $cart->Comments = $_POST['Comments']; + $cart->dimension_id = $_POST['dimension_id']; + $cart->dimension2_id = $_POST['dimension2_id']; if ($cart->trans_no == 0) $cart->reference = $_POST['ref']; @@ -225,6 +231,8 @@ function copy_from_cart() $_POST['due_date'] = $cart->due_date; $_POST['Location'] = $cart->Location; $_POST['Comments'] = $cart->Comments; + $_POST['dimension_id'] = $cart->dimension_id; + $_POST['dimension2_id'] = $cart->dimension2_id; $_POST['cart_id'] = $cart->cart_id; $_POST['ref'] = $cart->reference; } @@ -320,10 +328,10 @@ if (isset($_POST['Update']) || isset($_POST['_Location_update'])) { start_form(); hidden('cart_id'); -start_table("$table_style2 width=80%", 5); +start_table(TABLESTYLE2, "width=80%", 5); echo "
"; // outer table -start_table("$table_style width=100%"); +start_table(TABLESTYLE, "width=100%"); start_row(); label_cells(_("Customer"), $_SESSION['Items']->customer_name, "class='tableheader2'"); label_cells(_("Branch"), get_branch_name($_SESSION['Items']->Branch), "class='tableheader2'"); @@ -372,11 +380,31 @@ end_table(); echo "";// outer table -start_table("$table_style width=90%"); +start_table(TABLESTYLE, "width=90%"); if (!isset($_POST['due_date']) || !is_date($_POST['due_date'])) { - $_POST['due_date'] = get_invoice_duedate($_SESSION['Items']->customer_id, $_POST['DispatchDate']); + $_POST['due_date'] = get_invoice_duedate($_SESSION['Items']->payment, $_POST['DispatchDate']); } +customer_credit_row($_SESSION['Items']->customer_id, $_SESSION['Items']->credit, "class='tableheader2'"); +// 2010-09-03 Joe Hunt +$dim = get_company_pref('use_dimension'); +if ($dim > 0) { + start_row(); + label_cell(_("Dimension").":", "class='tableheader2'"); + dimensions_list_cells(null, 'dimension_id', null, true, ' ', false, 1, false); + end_row(); +} +else + hidden('dimension_id', 0); +if ($dim > 1) { + start_row(); + label_cell(_("Dimension")." 2:", "class='tableheader2'"); + dimensions_list_cells(null, 'dimension2_id', null, true, ' ', false, 2, false); + end_row(); +} +else + hidden('dimension2_id', 0); +//--------- start_row(); date_cells(_("Invoice Dead-line"), 'due_date', '', null, 0, 0, 0, "class='tableheader2'"); end_row(); @@ -395,7 +423,7 @@ if ($row['dissallow_invoices'] == 1) } display_heading(_("Delivery Items")); div_start('Items'); -start_table("$table_style width=80%"); +start_table(TABLESTYLE, "width=80%"); $new = $_SESSION['Items']->trans_no==0; $th = array(_("Item Code"), _("Item Description"), @@ -430,7 +458,11 @@ foreach ($_SESSION['Items']->line_items as $line=>$ln_itm) { } view_stock_status_cell($ln_itm->stock_id); - text_cells(null, 'Line'.$line.'Desc', $ln_itm->item_description, 30, 50); + if ($ln_itm->descr_editable) + text_cells(null, 'Line'.$line.'Desc', $ln_itm->item_description, 30, 50); + else + label_cell($ln_itm->item_description); + $dec = get_qty_dec($ln_itm->stock_id); qty_cell($ln_itm->quantity, false, $dec); label_cell($ln_itm->units); @@ -478,7 +510,7 @@ end_table(1); if ($has_marked) { display_note(_("Marked items have insufficient quantities in stock as on day of delivery."), 0, 1, "class='red'"); } -start_table($table_style2); +start_table(TABLESTYLE2); policy_list_row(_("Action For Balance"), "bo_policy", null); diff --git a/sales/customer_invoice.php b/sales/customer_invoice.php index cd98d460..560ea687 100644 --- a/sales/customer_invoice.php +++ b/sales/customer_invoice.php @@ -56,8 +56,8 @@ if (isset($_GET['AddedID'])) { display_note(get_customer_trans_view_str($trans_type, $invoice_no, _("&View This Invoice")), 0, 1); - display_note(print_document_link($invoice_no, _("&Print This Invoice"), true, ST_SALESINVOICE)); - display_note(print_document_link($invoice_no, _("&Email This Invoice"), true, ST_SALESINVOICE, false, "printlink", "", 1),1); + display_note(print_document_link($invoice_no."-".$trans_type, _("&Print This Invoice"), true, ST_SALESINVOICE)); + display_note(print_document_link($invoice_no."-".$trans_type, _("&Email This Invoice"), true, ST_SALESINVOICE, false, "printlink", "", 1),1); display_note(get_gl_view_str($trans_type, $invoice_no, _("View the GL &Journal Entries for this Invoice")),1); @@ -68,14 +68,16 @@ if (isset($_GET['AddedID'])) { } elseif (isset($_GET['UpdatedID'])) { $invoice_no = $_GET['UpdatedID']; + $trans_type = ST_SALESINVOICE; display_notification_centered(sprintf(_('Sales Invoice # %d has been updated.'),$invoice_no)); display_note(get_trans_view_str(ST_SALESINVOICE, $invoice_no, _("&View This Invoice"))); echo '
'; - display_note(print_document_link($invoice_no, _("&Print This Invoice"), true, ST_SALESINVOICE)); + display_note(print_document_link($invoice_no."-".$trans_type, _("&Print This Invoice"), true, ST_SALESINVOICE)); + display_note(print_document_link($invoice_no."-".$trans_type, _("&Email This Invoice"), true, ST_SALESINVOICE, false, "printlink", "", 1),1); - hyperlink_no_params($path_to_root . "/sales/inquiry/customer_inquiry.php", _("Select A Different &Invoice to Modify")); + hyperlink_no_params($path_to_root . "/sales/inquiry/customer_inquiry.php", _("Select Another &Invoice to Modify")); display_footer_exit(); @@ -121,14 +123,14 @@ if ( (isset($_GET['DeliveryNumber']) && ($_GET['DeliveryNumber'] > 0) ) $dn->src_docs = $dn->trans_no; $dn->trans_no = 0; $dn->reference = $Refs->get_next(ST_SALESINVOICE); - $dn->due_date = get_invoice_duedate($dn->customer_id, $dn->document_date); + $dn->due_date = get_invoice_duedate($dn->payment, $dn->document_date); $_SESSION['Items'] = $dn; copy_from_cart(); } elseif (isset($_GET['ModifyInvoice']) && $_GET['ModifyInvoice'] > 0) { - if ( get_parent_trans(ST_SALESINVOICE, $_GET['ModifyInvoice']) == 0) { // 1.xx compatibility hack + if ( get_sales_parent_numbers(ST_SALESINVOICE, $_GET['ModifyInvoice']) == 0) { // 1.xx compatibility hack echo"

" . _("There are no delivery notes for this invoice.
Most likely this invoice was created in Front Accounting version prior to 2.0 and therefore can not be modified.") . "
"; @@ -157,8 +159,12 @@ if (isset($_POST['Update'])) { $Ajax->activate('Items'); } if (isset($_POST['_InvoiceDate_changed'])) { - $_POST['due_date'] = get_invoice_duedate($_SESSION['Items']->customer_id, - $_POST['InvoiceDate']); + $_POST['due_date'] = get_invoice_duedate($_SESSION['Items']->payment, $_POST['InvoiceDate']); + $Ajax->activate('due_date'); +} +if (list_updated('payment')) { + $_SESSION['Items']->payment = get_post('payment'); + $_POST['due_date'] = get_invoice_duedate($_SESSION['Items']->payment, $_POST['InvoiceDate']); $Ajax->activate('due_date'); } @@ -220,9 +226,14 @@ function copy_to_cart() $cart->freight_cost = input_num('ChargeFreightCost'); $cart->document_date = $_POST['InvoiceDate']; $cart->due_date = $_POST['due_date']; + if ($cart->pos['cash_sale'] || $cart->pos['credit_sale']) { + $cart->payment = $_POST['payment']; + $cart->payment_terms = get_payment_terms($_POST['payment']); + } $cart->Comments = $_POST['Comments']; if ($_SESSION['Items']->trans_no == 0) $cart->reference = $_POST['ref']; + } //----------------------------------------------------------------------------- @@ -236,6 +247,7 @@ function copy_from_cart() $_POST['Comments']= $cart->Comments; $_POST['cart_id'] = $cart->cart_id; $_POST['ref'] = $cart->reference; + $_POST['payment'] = $cart->payment; } //----------------------------------------------------------------------------- @@ -305,9 +317,10 @@ if (isset($_POST['process_invoice']) && check_data()) { $newinvoice= $_SESSION['Items']->trans_no == 0; copy_to_cart(); if ($newinvoice) new_doc_date($_SESSION['Items']->document_date); - $invoice_no = $_SESSION['Items']->write(); + $invoice_no = $_SESSION['Items']->write(); processing_end(); + if ($newinvoice) { meta_forward($_SERVER['PHP_SELF'], "AddedID=$invoice_no"); } else { @@ -344,12 +357,24 @@ $is_edition = $_SESSION['Items']->trans_type == ST_SALESINVOICE && $_SESSION['It start_form(); hidden('cart_id'); -start_table("$table_style2 width=80%", 5); +start_table(TABLESTYLE2, "width=80%", 5); start_row(); +$colspan = 1; +$dim = get_company_pref('use_dimension'); +if ($dim > 0) + $colspan = 3; label_cells(_("Customer"), $_SESSION['Items']->customer_name, "class='tableheader2'"); label_cells(_("Branch"), get_branch_name($_SESSION['Items']->Branch), "class='tableheader2'"); -label_cells(_("Currency"), $_SESSION['Items']->customer_currency, "class='tableheader2'"); +if ($_SESSION['Items']->pos['credit_sale'] || $_SESSION['Items']->pos['cash_sale']) { + // editable payment type + $paymcat = !$_SESSION['Items']->pos['cash_sale'] ? PM_CREDIT : + (!$_SESSION['Items']->pos['credit_sale'] ? PM_CASH : PM_ANY); + label_cells(_("Payment terms:"), sale_payment_list('payment', $paymcat), + "class='tableheader2'", "colspan=$colspan"); +} else + label_cells(_('Payment:'), $_SESSION['Items']->payment_terms['terms'], "class='tableheader2'", "colspan=$colspan"); + end_row(); start_row(); @@ -359,11 +384,16 @@ if ($_SESSION['Items']->trans_no == 0) { label_cells(_("Reference"), $_SESSION['Items']->reference, "class='tableheader2'"); } -label_cells(_("Delivery Notes:"), -get_customer_trans_view_str(ST_CUSTDELIVERY, array_keys($_SESSION['Items']->src_docs)), "class='tableheader2'"); +//label_cells(_("Delivery Notes:"), +//get_customer_trans_view_str(ST_CUSTDELIVERY, array_keys($_SESSION['Items']->src_docs)), "class='tableheader2'"); label_cells(_("Sales Type"), $_SESSION['Items']->sales_type_name, "class='tableheader2'"); +label_cells(_("Currency"), $_SESSION['Items']->customer_currency, "class='tableheader2'"); +// 2010-09-03 Joe Hunt +if ($dim > 0) + label_cells(_("Dimension"), get_dimension_string($_SESSION['Items']->dimension_id), "class='tableheader2'"); + end_row(); start_row(); @@ -384,10 +414,14 @@ date_cells(_("Date"), 'InvoiceDate', '', $_SESSION['Items']->trans_no == 0, 0, 0, 0, "class='tableheader2'", true); if (!isset($_POST['due_date']) || !is_date($_POST['due_date'])) { - $_POST['due_date'] = get_invoice_duedate($_SESSION['Items']->customer_id, $_POST['InvoiceDate']); + $_POST['due_date'] = get_invoice_duedate($_SESSION['Items']->payment, $_POST['InvoiceDate']); } date_cells(_("Due Date"), 'due_date', '', null, 0, 0, 0, "class='tableheader2'"); +if ($dim > 1) + label_cells(_("Dimension"). " 2", get_dimension_string($_SESSION['Items']->dimension2_id), "class='tableheader2'"); +else if ($dim > 0) + label_cell(" ", "colspan=2"); end_row(); end_table(); @@ -404,7 +438,7 @@ if ($row['dissallow_invoices'] == 1) display_heading(_("Invoice Items")); div_start('Items'); -start_table("$table_style width=80%"); +start_table(TABLESTYLE, "width=80%"); $th = array(_("Item Code"), _("Item Description"), _("Delivered"), _("Units"), _("Invoiced"), _("This Invoice"), _("Price"), _("Tax Type"), _("Discount"), _("Total")); @@ -513,7 +547,7 @@ label_row(_("Invoice Total"), $display_total, "colspan=$colspan align=right","al end_table(1); div_end(); -start_table($table_style2); +start_table(TABLESTYLE2); textarea_row(_("Memo"), 'Comments', null, 50, 4); end_table(1); diff --git a/sales/customer_payments.php b/sales/customer_payments.php index ae46441d..b67df99c 100644 --- a/sales/customer_payments.php +++ b/sales/customer_payments.php @@ -217,26 +217,18 @@ function read_customer_data() { global $Refs; - $sql = "SELECT ".TB_PREF."debtors_master.pymt_discount, - ".TB_PREF."credit_status.dissallow_invoices - FROM ".TB_PREF."debtors_master, ".TB_PREF."credit_status - WHERE ".TB_PREF."debtors_master.credit_status = ".TB_PREF."credit_status.id - AND ".TB_PREF."debtors_master.debtor_no = ".db_escape($_POST['customer_id']); - - $result = db_query($sql, "could not query customers"); - - $myrow = db_fetch($result); + $myrow = get_customer_habit($_POST['customer_id']); $_POST['HoldAccount'] = $myrow["dissallow_invoices"]; $_POST['pymt_discount'] = $myrow["pymt_discount"]; - $_POST['ref'] = $Refs->get_next(12); + $_POST['ref'] = $Refs->get_next(ST_CUSTPAYMENT); } //---------------------------------------------------------------------------------------------- start_form(); - start_outer_table("$table_style2 width=60%", 5); + start_outer_table(TABLESTYLE2, "width=60%", 5); table_section(1); customer_list_row(_("From Customer:"), 'customer_id', null, false, true); @@ -289,7 +281,7 @@ start_form(); div_end(); } - start_table("$table_style width=60%"); + start_table(TABLESTYLE, "width=60%"); label_row(_("Customer prompt payment discount :"), $display_discount_percent); amount_row(_("Amount of Discount:"), 'discount'); diff --git a/sales/includes/cart_class.inc b/sales/includes/cart_class.inc index 1ba84ea6..286f9f37 100644 --- a/sales/includes/cart_class.inc +++ b/sales/includes/cart_class.inc @@ -55,7 +55,6 @@ class cart var $Location; var $location_name; var $order_no; // the original order number - var $trans_link = 0; var $ship_via; var $freight_cost = 0; @@ -66,19 +65,22 @@ class cart var $price_factor; // ditto for price calculations var $pos; // user assigned POS - var $cash; // cash transaction var $cash_account; var $account_name; var $cash_discount; // not used as of FA 2.1 var $dimension_id; var $dimension2_id; + var $payment; + var $payment_terms; // cached payment terms + var $credit; + //------------------------------------------------------------------------- // // $trans_no==0 => open new/direct document - // $trans_no!=0 && $view==false => read for view - // $trans_no!=0 && $view==true => read for edit (qty update from parent doc) + // $trans_no!=0 && $no_edit==false => update with parent constarints for reedition + // $trans_no!=0 && $no_edit==true => read only: for view, or later child doc entry // - function Cart($type, $trans_no=0, $view=false ) { + function Cart($type, $trans_no=0, $no_edit=false) { /*Constructor function initialises a new shopping cart */ $this->line_items = array(); $this->sales_type = ""; @@ -88,29 +90,92 @@ class cart $this->trans_type = ST_SALESORDER; $this->dimension_id = 0; $this->dimension2_id = 0; - $this->read($type, $trans_no, $view ); + $this->pos = get_sales_point(user_pos()); + $this->read($type, $trans_no, $no_edit); $this->cart_id = uniqid(''); } + + // + // Prepare cart to new child document entry, just after initial parent doc read. + // + function prepare_child() + { + global $Refs; + + $type = get_child_type($this->trans_type); + + $this->trans_type = $type; + $this->reference = $Refs->get_next($this->trans_type); + $this->document_date = new_doc_date(); + + for($line_no = 0; $line_no < count($this->line_items); $line_no++) { + $line = &$this->line_items[$line_no]; + $line->src_id = $line->id; // save src line ids for update + $line->qty_dispatched = $type == ST_CUSTCREDIT ? '0' : $line->quantity - $line->qty_done; + $line->qty_old = 0; + } + unset($line); + + if ($type == ST_CUSTDELIVERY) + $this->order_no = key($this->trans_no); + + if ($type == ST_SALESINVOICE) { + $this->due_date = get_invoice_duedate($this->payment, $this->document_date); + } + if ($type == ST_CUSTCREDIT) + $this->src_date = $this->document_date; + + $this->src_docs = $this->trans_no; + $this->trans_no = 0; + } + + // + // Prepares transaction for reedition updating with parent transaction data + // + function set_parent_constraints($sodata, $src_no) { + + $srcdetails = get_sales_parent_lines($this->trans_type, $src_no); + + $src_type = get_parent_type($this->trans_type); + if ($src_type == ST_SALESORDER || $src_type == 0) { + $this->src_docs = array( $sodata['order_no']=>$sodata['version']); + } else { // get src_data from debtor_trans + $srcnum = array(); + while ($line = db_fetch($srcdetails)) { + $srcnum[] = $line['debtor_trans_no']; + } + $this->src_docs = get_customer_trans_version($src_type, array_values($srcnum)); + } + // calculate & save: qtys on other docs and free qtys on src doc + $line_no = 0; + // Loop speed optimisation below depends on fact + // that child line_items contains subset of parent lines in _the_same_ order ! + while ($line_no < count($this->line_items) && $srcline = db_fetch($srcdetails)) { + $line = &$this->line_items[$line_no]; + if ($srcline['id'] == $line->src_id) { + if ($this->trans_type == ST_SALESINVOICE) + $line->src_no = $srcline['debtor_trans_no']; + $line->qty_old = $line->qty_dispatched = $line->quantity; + $line->quantity += $srcline['quantity'] - + ($src_type==ST_SALESORDER ? $srcline['qty_sent'] : $srcline['qty_done']); // add free qty on src doc + $line_no++; + break; + } + } + } //------------------------------------------------------------------------- // Reading document into cart // - function read($type, $trans_no = 0, $view=false ) { + function read($type, $trans_no = 0, $no_edit=false) { global $SysPrefs, $Refs; if (!is_array($trans_no)) $trans_no = array($trans_no); - if ($trans_no[0]) // read old transaction - { + + if ($trans_no[0]) { // read old transaction if ($type == ST_SALESORDER || $type == ST_SALESQUOTE) { // sales order || sales quotation read_sales_order($trans_no[0], $this, $type); - if ($view) { // prepare for DN/IV entry - for($line_no = 0; $line_no < count($this->line_items); $line_no++) { - $line = &$this->line_items[$line_no]; - $line->src_id = $line->id; // save src line ids for update - $line->qty_dispatched = $line->quantity - $line->qty_done; - } - } } else { // other type of sales transaction read_sales_trans($type, $trans_no, $this); if ($this->order_no) { // free hand credit notes have no order_no @@ -120,34 +185,19 @@ class cart // $this->customer_currency = $sodata["curr_code"]; $this->delivery_to = $sodata["deliver_to"]; $this->delivery_address = $sodata["delivery_address"]; + // child transaction reedition - update with parent info unless it is freehand + if (!$no_edit) + $this->set_parent_constraints($sodata, $trans_no[0]); } - // old derivative transaction edit - if (!$view && ($type!=ST_CUSTCREDIT || $this->trans_link!=0)) { - $src_type = get_parent_type($type); - if ($src_type == ST_SALESORDER) { // get src data from sales_orders - $this->src_docs = array( $sodata['order_no']=>$sodata['version']); - $srcdetails = get_sales_order_details($this->order_no, ST_SALESORDER); - } else { // get src_data from debtor_trans - $this->src_docs = get_customer_trans_version($src_type, get_parent_trans($type,$trans_no[0])); - $srcdetails = get_customer_trans_details($src_type,array_keys($this->src_docs)); - } - // calculate & save: qtys on other docs and free qtys on src doc - for($line_no = 0; $srcline = db_fetch($srcdetails); $line_no++) { - $sign = 1; // $type==13 ? 1 : -1; // this is strange debtor_trans atavism - $line = &$this->line_items[$line_no]; - - $line->src_id = $srcline['id']; // save src line ids for update - $line->qty_old = $line->qty_dispatched = $line->quantity; - $line->quantity += $sign * ($srcline['quantity'] - $srcline['qty_done']); // add free qty on src doc - } - } else { // prepare qtys for derivative document entry (not used in display) - for($line_no = 0; $line_no < count($this->line_items); $line_no++) { - $line = &$this->line_items[$line_no]; - $line->src_id = $line->id; // save src line ids for update - $line->qty_dispatched = $line->quantity - $line->qty_done; - } - } + } + // prepare qtys for derivative document entry (not used in display) + if($no_edit) { + for($line_no = 0; $line_no < count($this->line_items); $line_no++) { + $line = &$this->line_items[$line_no]; + $line->src_id = $line->id; // save src line ids for update + $line->qty_dispatched = $line->quantity - $line->qty_done; } + } } else { // new document $this->trans_type = $type; $this->trans_no = 0; @@ -183,25 +233,13 @@ class cart } } if ($type == ST_SALESINVOICE) { - $this->due_date = - get_invoice_duedate($this->customer_id, $this->document_date); - $this->pos = user_pos(); - $pos = get_sales_point($this->pos); - $this->cash = !$pos['credit_sale']; - if (!$pos['cash_sale'] || !$pos['credit_sale']) - $this->pos = -1; // mark not editable payment type - else - $this->cash = date_diff2($this->due_date, Today(), 'd')<2; - if ($this->cash) { - $this->Location = $pos['pos_location']; - $this->location_name = $pos['location_name']; - $this->cash_account = $pos['pos_account']; - $this->account_name = $pos['bank_account_name']; - } + $this->due_date = + get_invoice_duedate($this->payment, $this->document_date); } else - $this->due_date = - add_days($this->document_date, $SysPrefs->default_delivery_required_by()); - } + $this->due_date = + add_days($this->document_date, $SysPrefs->default_delivery_required_by()); + } + $this->credit = get_current_cust_credit($this->customer_id); } //------------------------------------------------------------------------- @@ -209,6 +247,7 @@ class cart // Makes parent documents for direct delivery/invoice by recurent call. // $policy - 0 or 1: writeoff/return for IV, back order/cancel for DN function write($policy=0) { + begin_transaction(); // prevents partial database changes in case of direct delivery/invoice if (count($this->src_docs) == 0 && ($this->trans_type == ST_SALESINVOICE || $this->trans_type == ST_CUSTDELIVERY)) { // this is direct document - first add parent $src = (PHP_VERSION<5) ? $this : clone( $this ); // make local copy of this cart @@ -236,27 +275,41 @@ class cart } switch($this->trans_type) { case ST_SALESINVOICE: - return write_sales_invoice($this); + $ret = write_sales_invoice($this); break; case ST_CUSTCREDIT: - return write_credit_note($this, $policy); + $ret = write_credit_note($this, $policy); break; case ST_CUSTDELIVERY: - return write_sales_delivery($this, $policy); + $ret = write_sales_delivery($this, $policy); break; case ST_SALESORDER: case ST_SALESQUOTE: if ($this->trans_no==0) // new document - return add_sales_order($this); + $ret = add_sales_order($this); else - return update_sales_order($this); + $ret = update_sales_order($this); } + + commit_transaction(); + + return $ret; } - function set_customer($customer_id, $customer_name, $currency, $discount, $cdiscount=0) + function set_customer($customer_id, $customer_name, $currency, $discount, $payment, $cdiscount=0) { $this->customer_name = $customer_name; $this->customer_id = $customer_id; $this->default_discount = $discount; - $this->cash_discount = $cdiscount; $this->customer_currency = $currency; + $this->payment = $payment; + $this->payment_terms = get_payment_terms($payment); + $this->cash_discount = $cdiscount; + + if ($this->payment_terms['cash_sale']) { + $this->Location = $this->pos['pos_location']; + $this->location_name = $this->pos['location_name']; + $this->cash_account = $this->pos['pos_account']; + $this->account_name = $this->pos['bank_account_name']; + } + $this->credit = get_current_cust_credit($customer_id); } function set_branch($branch_id, $tax_group_id, $tax_group_name, $phone='', $email='') @@ -291,16 +344,17 @@ class cart $this->freight_cost = $freight_cost; } - function add_to_cart($line_no,$stock_id, $qty, $price, $disc, $qty_done=0, $standard_cost=0, $description=null, $id=0, $src_no=0) + function add_to_cart($line_no, $stock_id, $qty, $price, $disc, $qty_done=0, $standard_cost=0, $description=null, $id=0, $src_no=0, + $src_id=0) { - if (isset($stock_id) && $stock_id != "" && isset($qty)/* && $qty > 0*/) { - $this->line_items[$line_no] = new line_details($stock_id, $qty, $price, $disc, - $qty_done, $standard_cost, $description, $id, $src_no); + $line = new line_details($stock_id, $qty, $price, $disc, + $qty_done, $standard_cost, $description, $id, $src_no, $src_id); + + if ($line->valid) { + $this->line_items[$line_no] = $line; return 1; - } else { - // shouldn't come here under normal circumstances - display_db_error("unexpected - adding an invalid item or null quantity", "", true); - } + } else + display_error(_("You have to enter valid stock code or nonempty description")); return 0; } @@ -408,7 +462,8 @@ class cart foreach ($this->line_items as $ln_itm) { $items[] = $ln_itm->stock_id; - $prices[] = round(($ln_itm->qty_dispatched * + $prices[] = round((( + $this->trans_type==ST_SALESORDER ? $ln_itm->quantity : $ln_itm->qty_dispatched) * $ln_itm->line_price()* (1 - $ln_itm->discount_percent)), user_price_dec()); } @@ -418,7 +473,7 @@ class cart // Adjustment for swiss franken, we always have 5 rappen = 1/20 franken if ($this->customer_currency == 'CHF') { $val = $taxes['1']['Value']; - $val1 = (floatval((intval(round(($val*20),0)))/20)); + $val1 = (floatval((intval(round(($val*20),0)))/20)); $taxes['1']['Value'] = $val1; } return $taxes; @@ -452,7 +507,22 @@ class cart else return round($this->freight_cost*$tax_rate/100, user_price_dec()); } + /* + Returns transaction value including all taxes + */ + function get_trans_total() { + + $total = $this->get_items_total() + $this->freight_cost; + $dec = user_price_dec(); + if (!$this->tax_included ) { + $total += $this->get_shipping_tax(); + $taxes = $this->get_taxes(); + foreach($taxes as $tax) + $total += round($tax['Value'], $dec); + } + return $total; + } } /* end of class defintion */ class line_details @@ -466,36 +536,63 @@ class line_details var $tax_type_name; var $src_no; // number of src doc for this line var $src_id; - var $quantity; var $price; var $discount_percent; - var $qty_done; // quantity processed on child documents - var $qty_dispatched; // quantity selected to process - var $qty_old=0; // quantity dispatched before edition + var $standard_cost; + var $descr_editable; + + var $valid; // validation in constructor + /* + Line quantity properties in various cart create modes: + + view: + $quantity - quantity on current document + $qty_done - quantity processed on all child documents + $qty_dispatched - not used + $qty_old - not used + + edit: + $quantity - free parent quantity including this doc (= max allowed quantity) + $qty_done - qty processed on child documents (= min allowed qty) + $qty_dispatched - quantity currently selected to process + $qty_old - quantity processed on this document before reedition + + new child entry (view parent followed by prepare_child() call): + $quantity - max allowed quantity (get from parent) + $qty_done - qty processed on other child documents + $qty_dispatched - quantity currently selected to process + $qty_old - 0; not used + */ + var $quantity; + var $qty_done; + var $qty_dispatched; + var $qty_old = 0; + function line_details ($stock_id, $qty, $prc, $disc_percent, - $qty_done, $standard_cost, $description, $id=0, $src_no=0 ) + $qty_done, $standard_cost, $description, $id=0, $src_no=0, $src_id=0) { /* Constructor function to add a new LineDetail object with passed params */ $this->id = $id; $this->src_no = $src_no; + $this->src_id = $src_id; $item_row = get_item($stock_id); - if ($item_row == null) - display_db_error("invalid item added to order : $stock_id", ""); - + if (!$item_row) + return; + $this->mb_flag = $item_row["mb_flag"]; $this->units = $item_row["units"]; - if ($description == null) + $this->descr_editable = $item_row["editable"]; + if ($description == null || !$this->descr_editable) $this->item_description = $item_row["description"]; else $this->item_description = $description; //$this->standard_cost = $item_row["material_cost"] + $item_row["labour_cost"] + $item_row["overhead_cost"]; $this->tax_type = $item_row["tax_type_id"]; $this->tax_type_name = $item_row["tax_type_name"]; - $this->stock_id = $stock_id; $this->quantity = $qty; $this->qty_dispatched = $qty; @@ -503,6 +600,7 @@ class line_details $this->discount_percent = $disc_percent; $this->qty_done = $qty_done; $this->standard_cost = $standard_cost; + $this->valid = true; } // get unit price as stated on document diff --git a/sales/includes/db/branches_db.inc b/sales/includes/db/branches_db.inc index 97d6fa20..2688d1b3 100644 --- a/sales/includes/db/branches_db.inc +++ b/sales/includes/db/branches_db.inc @@ -9,6 +9,76 @@ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the License here . ***********************************************************************/ +function add_branch($customer_id, $br_name, $br_ref, $br_address, $salesman, $area, + $tax_group_id, $sales_account, $sales_discount_account, $receivables_account, + $payment_discount_account, $default_location, $br_post_address, $disable_trans, $group_no, + $default_ship_via, $notes) +{ + $sql = "INSERT INTO ".TB_PREF."cust_branch (debtor_no, br_name, branch_ref, br_address, + salesman, area, tax_group_id, sales_account, receivables_account, payment_discount_account, + sales_discount_account, default_location, + br_post_address, disable_trans, group_no, default_ship_via, notes) + VALUES (".db_escape($customer_id). ",".db_escape($br_name) . ", " + .db_escape($br_ref) . ", " + .db_escape($br_address) . ", ".db_escape($salesman) . ", " + .db_escape($area) . "," + .db_escape($tax_group_id) . ", " + .db_escape($sales_account) . ", " + .db_escape($receivables_account) . ", " + .db_escape($payment_discount_account) . ", " + .db_escape($sales_discount_account) . ", " + .db_escape($default_location) . ", " + .db_escape($br_post_address) . "," + .db_escape($disable_trans) . ", " + .db_escape($group_no) . ", " + .db_escape($default_ship_via). ", " + .db_escape($notes).")"; + db_query($sql,"The branch record could not be added"); +} + +function update_branch($customer_id, $branch_code, $br_name, $br_ref, $br_address, + $salesman, $area, $tax_group_id, $sales_account, $sales_discount_account, $receivables_account, + $payment_discount_account, $default_location, $br_post_address, $disable_trans, $group_no, + $default_ship_via, $notes) +{ + $sql = "UPDATE ".TB_PREF."cust_branch SET br_name = " . db_escape($br_name) . ", + branch_ref = " . db_escape($br_ref) . ", + br_address = ".db_escape($br_address). ", + salesman= ".db_escape($salesman) . ", + area=".db_escape($area) . ", + tax_group_id=".db_escape($tax_group_id). ", + sales_account=".db_escape($sales_account) . ", + sales_discount_account=".db_escape($sales_discount_account) . ", + receivables_account=".db_escape($receivables_account) . ", + payment_discount_account=".db_escape($payment_discount_account) . ", + default_location=".db_escape($default_location) . ", + br_post_address =".db_escape($br_post_address) . ", + disable_trans=".db_escape($disable_trans) . ", + group_no=".db_escape($group_no) . ", + default_ship_via=".db_escape($default_ship_via) . ", + notes=".db_escape($notes) . " + WHERE branch_code =".db_escape($branch_code) . " + AND debtor_no=".db_escape($customer_id); + db_query($sql,"The branch record could not be updated"); +} + +function delete_branch($customer_id, $branch_code) +{ + delete_entity_contacts('cust_branch', $branch_code); + + $sql="DELETE FROM ".TB_PREF."cust_branch WHERE branch_code=".db_escape($branch_code)." AND debtor_no=".db_escape($customer_id); + db_query($sql,"could not delete branch"); +} + +function branch_in_foreign_table($customer_id, $branch_code, $table) +{ + $sql= "SELECT COUNT(*) FROM ".TB_PREF."$table WHERE branch_code=".db_escape($branch_code) + ." AND debtor_no = ".db_escape($customer_id); + $result = db_query($sql,"could not query $table"); + $myrow = db_fetch_row($result); + return ($myrow[0] > 0); +} + function get_branch($branch_id) { $sql = "SELECT ".TB_PREF."cust_branch.*,".TB_PREF."salesman.salesman_name @@ -18,7 +88,16 @@ function get_branch($branch_id) $result = db_query($sql, "Cannot retreive a customer branch"); - return db_fetch($result); + return db_fetch($result); +} + +function get_cust_branch($customer_id, $branch_code) +{ + $sql = "SELECT * FROM ".TB_PREF."cust_branch + WHERE branch_code=".db_escape($branch_code)." + AND debtor_no=".db_escape($customer_id); + $result = db_query($sql,"check failed"); + return db_fetch($result); } function get_branch_accounts($branch_id) @@ -28,7 +107,7 @@ function get_branch_accounts($branch_id) $result = db_query($sql, "Cannot retreive a customer branch"); - return db_fetch($result); + return db_fetch($result); } function get_branch_name($branch_id) @@ -38,7 +117,7 @@ function get_branch_name($branch_id) $result = db_query($sql,"could not retreive name for branch" . $branch_id); - $myrow = db_fetch_row($result); + $myrow = db_fetch_row($result); return $myrow[0]; } @@ -49,4 +128,127 @@ function get_cust_branches_from_group($group_no) return db_query($sql,"could not retreive branches for group " . $group_no); } + +function get_default_info_for_branch($customer_id) +{ + $sql = "SELECT name, address, debtor_ref + FROM ".TB_PREF."debtors_master WHERE debtor_no = ".db_escape($customer_id); + $result = db_query($sql,"check failed"); + return db_fetch($result); +} + +function get_sql_for_customer_branches() +{ + $sql = "SELECT " + ."b.branch_code, " + ."b.branch_ref, " + ."b.br_name, " + ."p.name as contact_name, " + ."s.salesman_name, " + ."a.description, " + ."p.phone, " + ."p.fax, " + ."p.email, " + ."t.name AS tax_group_name, " + ."b.inactive + FROM ".TB_PREF."cust_branch b " + . "LEFT JOIN ".TB_PREF."crm_contacts c + ON c.entity_id=b.branch_code AND c.type='cust_branch' AND c.action='general' + LEFT JOIN ".TB_PREF."crm_persons p on c.person_id=p.id," + .TB_PREF."areas a, " + .TB_PREF."salesman s, " + .TB_PREF."tax_groups t + WHERE b.tax_group_id=t.id + AND b.area=a.area_code + AND b.salesman=s.salesman_code + AND b.debtor_no = ".db_escape($_POST['customer_id']); + + if (!get_post('show_inactive')) $sql .= " AND !b.inactive"; + $sql .= " ORDER BY branch_ref"; + + return $sql; +} +/* + Get contacts of given type for customer branch. + $branch_code - branch id + $action - type of contact + $customer_id - if passed: get also customer contacts for given action + $default - return only single record selected with defaults order defined in $defs array, + otherways get all $action contacts +*/ +function get_branch_contacts($branch_code, $action=null, $customer_id=null, $default = true) +{ + $defs = array('cust_branch.'.$action, + 'customer.'.$action, + 'cust_branch.general', + 'customer.general'); + + $sql = "SELECT p.*, r.action, r.type, CONCAT(r.type,'.',r.action) as ext_type + FROM ".TB_PREF."crm_persons p," + .TB_PREF."crm_contacts r WHERE r.person_id=p.id AND ((r.type='cust_branch' + AND r.entity_id=".db_escape($branch_code).')'; + if($customer_id) { + $sql .= " OR (r.type='customer' AND r.entity_id=".db_escape($customer_id).")"; + } + $sql .= ')'; + + if ($action) + $sql .= ' AND (r.action='.db_escape($action).($default ? " OR r.action='general'" : '').')'; + + $res = db_query($sql, "can't retrieve branch contacts"); + + $results = array(); + while($contact = db_fetch($res)) + $results[] = $contact; + + if ($results && $default) { + // select first available contact in $defs order + foreach($defs as $type) { + if ($n = array_search_value($type, $results, 'ext_type')) + return $n; + } + return null; + } + return $results; +} + +function _get_branch_contacts($branch_code, $action=null, $customer_id=null, $default = false) +{ + $sql = "SELECT p.*, r.action, r.type, CONCAT(r.type,'.',r.action) as ext_type + FROM ".TB_PREF."crm_persons p," + .TB_PREF."crm_contacts r WHERE r.person_id=p.id AND r.type='cust_branch' + AND r.entity_id=".db_escape($branch_code); + + if ($action) + $sql .= ' AND (r.action='.db_escape($action).($default ? " OR r.action='general'":'').')'; + + if($customer_id) { + $sql = "($sql) UNION (SELECT p.*, r.action, r.type, CONCAT(r.type,'.',r.action) as ext_type + FROM ".TB_PREF."crm_persons p," + .TB_PREF."crm_contacts r WHERE r.person_id=p.id AND r.type='customer' + AND r.entity_id=".db_escape($customer_id); + if ($action) + $sql .= ' AND (r.action='.db_escape($action).($default ? " OR r.action='general'":'').')'; + $sql .= ')'; + } + + $res = db_query($sql, "can't retrieve branch contacts"); + $results = array(); + $type = ''; + while($contact = db_fetch($res)) { + if ($type && $type != $contact['type']) break; // skip cust when branch contacts found + $results[] = $contact; + $type = $contact['type']; + } + if ($results && $default) { + // here we have general and action contacts selected + if ($n = array_search_value($action, $results, 'action')) { + return $n; + } + // only general contact found + return $results[0]; + } + return $results; +} + ?> \ No newline at end of file diff --git a/sales/includes/db/cust_trans_db.inc b/sales/includes/db/cust_trans_db.inc index 2ab21e17..2b3cd451 100644 --- a/sales/includes/db/cust_trans_db.inc +++ b/sales/includes/db/cust_trans_db.inc @@ -9,38 +9,6 @@ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the License here . ***********************************************************************/ -//------------------------------------------------------------------------------ -// Retreive parent document number(s) for given transaction -// -function get_parent_trans($trans_type, $trans_no) { - - $sql = 'SELECT trans_link FROM - '.TB_PREF.'debtor_trans WHERE - (trans_no='.db_escape($trans_no).' AND type='.db_escape($trans_type).' AND trans_link!=0)'; - - $result = db_query($sql, 'Parent document numbers cannot be retrieved'); - - if (db_num_rows($result)) { - $link = db_fetch($result); - return array($link['trans_link']); - } - if ($trans_type!=ST_SALESINVOICE) return 0; // this is credit note with no parent invoice - // invoice: find batch invoice parent trans. - $sql = 'SELECT trans_no FROM - '.TB_PREF.'debtor_trans WHERE - (trans_link='.db_escape($trans_no).' AND type='. get_parent_type($trans_type) .')'; - - $result = db_query($sql, 'Delivery links cannot be retrieved'); - - $delivery = array(); - if(db_num_rows($result)>0) { - while($link = db_fetch($result)) { - $delivery[] = $link['trans_no']; - } - } - return count($delivery) ? $delivery : 0; -} - //---------------------------------------------------------------------------------------- // Mark changes in debtor_trans_details // @@ -70,7 +38,7 @@ function get_customer_trans_version($type, $trans_no) { WHERE type='.db_escape($type).' AND ('; foreach ($trans_no as $key=>$trans) - $trans_no[$key] = 'trans_no='.$trans_no[$key]; + $trans_no[$key] = 'trans_no='.db_escape($trans_no[$key]); $sql .= implode(' OR ', $trans_no) . ')'; @@ -87,8 +55,8 @@ function get_customer_trans_version($type, $trans_no) { // date_ is display date (non-sql) function write_customer_trans($trans_type, $trans_no, $debtor_no, $BranchNo, $date_, $reference, $Total, $discount=0, $Tax=0, $Freight=0, $FreightTax=0, - $sales_type=0, $order_no=0, $trans_link=0, $ship_via=0, $due_date="", - $AllocAmt=0, $rate=0, $dimension_id=0, $dimension2_id=0) + $sales_type=0, $order_no=0, $ship_via=0, $due_date="", + $AllocAmt=0, $rate=0, $dimension_id=0, $dimension2_id=0, $payment_terms=null) { $new = $trans_no==0; $curr = get_customer_currency($debtor_no); @@ -114,15 +82,16 @@ function write_customer_trans($trans_type, $trans_no, $debtor_no, $BranchNo, reference, tpe, order_, ov_amount, ov_discount, ov_gst, ov_freight, ov_freight_tax, - rate, ship_via, alloc, trans_link, - dimension_id, dimension2_id - ) VALUES ($trans_no, ".db_escape($trans_type).", + rate, ship_via, alloc, + dimension_id, dimension2_id, payment_terms + ) VALUES (".db_escape($trans_no).", ".db_escape($trans_type).", ".db_escape($debtor_no).", ".db_escape($BranchNo).", '$SQLDate', '$SQLDueDate', ".db_escape($reference).", ".db_escape($sales_type).", ".db_escape($order_no).", $Total, ".db_escape($discount).", $Tax, ".db_escape($Freight).", - $FreightTax, $rate, ".db_escape($ship_via).", $AllocAmt, ".db_escape($trans_link).", - ".db_escape($dimension_id).", ".db_escape($dimension2_id).")"; + $FreightTax, $rate, ".db_escape($ship_via).", $AllocAmt, + ".db_escape($dimension_id).", ".db_escape($dimension2_id).", " + .db_escape($payment_terms).")"; } else { // may be optional argument should stay unchanged ? $sql = "UPDATE ".TB_PREF."debtor_trans SET debtor_no=".db_escape($debtor_no)." , branch_code=".db_escape($BranchNo).", @@ -130,9 +99,10 @@ function write_customer_trans($trans_type, $trans_no, $debtor_no, $BranchNo, reference=".db_escape($reference).", tpe=".db_escape($sales_type).", order_=".db_escape($order_no).", ov_amount=$Total, ov_discount=".db_escape($discount).", ov_gst=$Tax, ov_freight=".db_escape($Freight).", ov_freight_tax=$FreightTax, rate=$rate, - ship_via=".db_escape($ship_via).", alloc=$AllocAmt, trans_link=$trans_link, - dimension_id=".db_escape($dimension_id).", dimension2_id=".db_escape($dimension2_id)." - WHERE trans_no=$trans_no AND type=".db_escape($trans_type); + ship_via=".db_escape($ship_via).", alloc=$AllocAmt, + dimension_id=".db_escape($dimension_id).", dimension2_id=".db_escape($dimension2_id).", + payment_terms=".db_escape($payment_terms)." + WHERE trans_no=".db_escape($trans_no)." AND type=".db_escape($trans_type); } db_query($sql, "The debtor transaction record could not be inserted"); @@ -140,15 +110,15 @@ function write_customer_trans($trans_type, $trans_no, $debtor_no, $BranchNo, return $trans_no; } - //---------------------------------------------------------------------------------------- function get_customer_trans($trans_id, $trans_type) { - $sql = "SELECT ".TB_PREF."debtor_trans.*, - ov_amount+ov_gst+ov_freight+ov_freight_tax+ov_discount AS Total, - ".TB_PREF."debtors_master.name AS DebtorName, ".TB_PREF."debtors_master.address, ".TB_PREF."debtors_master.email AS email2, - ".TB_PREF."debtors_master.curr_code, ".TB_PREF."debtors_master.tax_id, ".TB_PREF."debtors_master.payment_terms "; + $sql = "SELECT trans.*," + ."ov_amount+ov_gst+ov_freight+ov_freight_tax+ov_discount AS Total," + ."cust.name AS DebtorName, cust.address, " + ."cust.curr_code, " + ."cust.tax_id "; if ($trans_type == ST_CUSTPAYMENT) { // it's a payment so also get the bank account @@ -161,14 +131,13 @@ function get_customer_trans($trans_id, $trans_type) $sql .= ", ".TB_PREF."shippers.shipper_name, " .TB_PREF."sales_types.sales_type, " .TB_PREF."sales_types.tax_included, " - .TB_PREF."cust_branch.*, " - .TB_PREF."debtors_master.discount, " + ."branch.*, " + ."cust.discount, " .TB_PREF."tax_groups.name AS tax_group_name, " .TB_PREF."tax_groups.id AS tax_group_id "; } - - $sql .= " FROM ".TB_PREF."debtor_trans, ".TB_PREF."debtors_master "; + $sql .= " FROM ".TB_PREF."debtor_trans trans, ".TB_PREF."debtors_master cust"; if ($trans_type == ST_CUSTPAYMENT) { // it's a payment so also get the bank account @@ -177,25 +146,28 @@ function get_customer_trans($trans_id, $trans_type) if ($trans_type == ST_SALESINVOICE || $trans_type == ST_CUSTCREDIT || $trans_type == ST_CUSTDELIVERY) { // it's an invoice so also get the shipper, salestypes - $sql .= ", ".TB_PREF."shippers, ".TB_PREF."sales_types, ".TB_PREF."cust_branch, ".TB_PREF."tax_groups "; + $sql .= ", ".TB_PREF."shippers, " + .TB_PREF."sales_types, " + .TB_PREF."cust_branch branch, " + .TB_PREF."tax_groups "; } - $sql .= " WHERE ".TB_PREF."debtor_trans.trans_no=".db_escape($trans_id)." - AND ".TB_PREF."debtor_trans.type=".db_escape($trans_type)." - AND ".TB_PREF."debtor_trans.debtor_no=".TB_PREF."debtors_master.debtor_no"; + $sql .= " WHERE trans.trans_no=".db_escape($trans_id)." + AND trans.type=".db_escape($trans_type)." + AND trans.debtor_no=cust.debtor_no"; if ($trans_type == ST_CUSTPAYMENT) { // it's a payment so also get the bank account - $sql .= " AND ".TB_PREF."bank_trans.trans_no =$trans_id + $sql .= " AND ".TB_PREF."bank_trans.trans_no =".db_escape($trans_id)." AND ".TB_PREF."bank_trans.type=$trans_type AND ".TB_PREF."bank_accounts.id=".TB_PREF."bank_trans.bank_act "; } if ($trans_type == ST_SALESINVOICE || $trans_type == ST_CUSTCREDIT || $trans_type == ST_CUSTDELIVERY) { // it's an invoice so also get the shipper - $sql .= " AND ".TB_PREF."shippers.shipper_id=".TB_PREF."debtor_trans.ship_via - AND ".TB_PREF."sales_types.id = ".TB_PREF."debtor_trans.tpe - AND ".TB_PREF."cust_branch.branch_code = ".TB_PREF."debtor_trans.branch_code - AND ".TB_PREF."cust_branch.tax_group_id = ".TB_PREF."tax_groups.id "; + $sql .= " AND ".TB_PREF."shippers.shipper_id=trans.ship_via + AND ".TB_PREF."sales_types.id = trans.tpe + AND branch.branch_code = trans.branch_code + AND branch.tax_group_id = ".TB_PREF."tax_groups.id "; } $result = db_query($sql, "Cannot retreive a debtor transaction"); @@ -212,9 +184,7 @@ function get_customer_trans($trans_id, $trans_type) exit; } - //return db_fetch($result); $row = db_fetch($result); - $row['email'] = $row['email2']; return $row; } @@ -272,6 +242,15 @@ function void_customer_trans($type, $type_no) //---------------------------------------------------------------------------------------- +function clear_customer_trans($type, $type_no) +{ + // Delete + $sql = "DELETE FROM ".TB_PREF."debtor_trans WHERE type=".db_escape($type)." AND trans_no=".db_escape($type_no); + + db_query($sql, "could not clear debtor transactions for type=$type and trans_no=$type_no"); +} +//---------------------------------------------------------------------------------------- + function post_void_customer_trans($type, $type_no) { switch ($type) { @@ -290,13 +269,143 @@ function post_void_customer_trans($type, $type_no) //---------------------------------------------------------------------------------------- -function get_customer_trans_link($type, $type_no) +function get_sql_for_customer_inquiry() { - $row = db_query("SELECT trans_link from ".TB_PREF."debtor_trans - WHERE type=".db_escape($type)." AND trans_no=".db_escape($type_no), - "could not get transaction link for type=$type and trans_no=$type_no"); - return $row[0]; + $date_after = date2sql($_POST['TransAfterDate']); + $date_to = date2sql($_POST['TransToDate']); + + $sql = "SELECT + trans.type, + trans.trans_no, + trans.order_, + trans.reference, + trans.tran_date, + trans.due_date, + debtor.name, + branch.br_name, + debtor.curr_code, + (trans.ov_amount + trans.ov_gst + trans.ov_freight + + trans.ov_freight_tax + trans.ov_discount) AS TotalAmount, "; + if ($_POST['filterType'] != ALL_TEXT) + $sql .= "@bal := @bal+(trans.ov_amount + trans.ov_gst + trans.ov_freight + trans.ov_freight_tax + trans.ov_discount), "; + +// else +// $sql .= "IF(trans.type=".ST_CUSTDELIVERY.",'', IF(trans.type=".ST_SALESINVOICE." OR trans.type=".ST_BANKPAYMENT.",@bal := @bal+ +// (trans.ov_amount + trans.ov_gst + trans.ov_freight + trans.ov_freight_tax + trans.ov_discount), @bal := @bal- +// (trans.ov_amount + trans.ov_gst + trans.ov_freight + trans.ov_freight_tax + trans.ov_discount))) , "; + $sql .= "trans.alloc AS Allocated, + ((trans.type = ".ST_SALESINVOICE.") + AND trans.due_date < '" . date2sql(Today()) . "') AS OverDue , + Sum(line.quantity-line.qty_done) AS Outstanding + FROM " + .TB_PREF."debtor_trans as trans + LEFT JOIN ".TB_PREF."debtor_trans_details as line + ON trans.trans_no=line.debtor_trans_no AND trans.type=line.debtor_trans_type," + .TB_PREF."debtors_master as debtor, " + .TB_PREF."cust_branch as branch + WHERE debtor.debtor_no = trans.debtor_no + AND trans.tran_date >= '$date_after' + AND trans.tran_date <= '$date_to' + AND trans.branch_code = branch.branch_code"; + + if ($_POST['customer_id'] != ALL_TEXT) + $sql .= " AND trans.debtor_no = ".db_escape($_POST['customer_id']); + + if ($_POST['filterType'] != ALL_TEXT) + { + if ($_POST['filterType'] == '1') + { + $sql .= " AND (trans.type = ".ST_SALESINVOICE." OR trans.type = ".ST_BANKPAYMENT.") "; + } + elseif ($_POST['filterType'] == '2') + { + $sql .= " AND (trans.type = ".ST_SALESINVOICE.") "; + } + elseif ($_POST['filterType'] == '3') + { + $sql .= " AND (trans.type = " . ST_CUSTPAYMENT + ." OR trans.type = ".ST_BANKDEPOSIT.") "; + } + elseif ($_POST['filterType'] == '4') + { + $sql .= " AND trans.type = ".ST_CUSTCREDIT." "; + } + elseif ($_POST['filterType'] == '5') + { + $sql .= " AND trans.type = ".ST_CUSTDELIVERY." "; + } + + if ($_POST['filterType'] == '2') + { + $today = date2sql(Today()); + $sql .= " AND trans.due_date < '$today' + AND (trans.ov_amount + trans.ov_gst + trans.ov_freight_tax + + trans.ov_freight + trans.ov_discount - trans.alloc > 0) "; + } + } + $sql .= " GROUP BY trans.trans_no, trans.type"; + + return $sql; } -//---------------------------------------------------------------------------------------- +function get_sql_for_sales_deliveries_view($selected_customer, $selected_stock_item=null) +{ + $sql = "SELECT trans.trans_no, + debtor.name, + branch.branch_code, + branch.br_name, + sorder.deliver_to, + trans.reference, + sorder.customer_ref, + trans.tran_date, + trans.due_date, + (ov_amount+ov_gst+ov_freight+ov_freight_tax) AS DeliveryValue, + debtor.curr_code, + Sum(line.quantity-line.qty_done) AS Outstanding, + Sum(line.qty_done) AS Done + FROM " + .TB_PREF."sales_orders as sorder, " + .TB_PREF."debtor_trans as trans, " + .TB_PREF."debtor_trans_details as line, " + .TB_PREF."debtors_master as debtor, " + .TB_PREF."cust_branch as branch + WHERE + sorder.order_no = trans.order_ AND + trans.debtor_no = debtor.debtor_no + AND trans.type = ".ST_CUSTDELIVERY." + AND line.debtor_trans_no = trans.trans_no + AND line.debtor_trans_type = trans.type + AND trans.branch_code = branch.branch_code + AND trans.debtor_no = branch.debtor_no "; + + if ($_POST['OutstandingOnly'] == true) { + $sql .= " AND line.qty_done < line.quantity "; + } + + //figure out the sql required from the inputs available + if (isset($_POST['DeliveryNumber']) && $_POST['DeliveryNumber'] != "") + { + $delivery = "%".$_POST['DeliveryNumber']; + $sql .= " AND trans.trans_no LIKE ".db_escape($delivery); + $sql .= " GROUP BY trans.trans_no"; + } + else + { + $sql .= " AND trans.tran_date >= '".date2sql($_POST['DeliveryAfterDate'])."'"; + $sql .= " AND trans.tran_date <= '".date2sql($_POST['DeliveryToDate'])."'"; + + if ($selected_customer != -1) + $sql .= " AND trans.debtor_no=".db_escape($selected_customer)." "; + + if (isset($selected_stock_item)) + $sql .= " AND line.stock_id=".db_escape($selected_stock_item)." "; + + if (isset($_POST['StockLocation']) && $_POST['StockLocation'] != ALL_TEXT) + $sql .= " AND sorder.from_stk_loc = ".db_escape($_POST['StockLocation'])." "; + + $sql .= " GROUP BY trans.trans_no "; + + } //end no delivery number selected + return $sql; +} ?> \ No newline at end of file diff --git a/sales/includes/db/cust_trans_details_db.inc b/sales/includes/db/cust_trans_details_db.inc index 86310ffa..2656e544 100644 --- a/sales/includes/db/cust_trans_details_db.inc +++ b/sales/includes/db/cust_trans_details_db.inc @@ -25,7 +25,7 @@ if (!is_array($debtor_trans_no)) $tr=array(); foreach ($debtor_trans_no as $trans_no) - $tr[] = 'debtor_trans_no='.$trans_no; + $tr[] = 'debtor_trans_no='.db_escape($trans_no); $sql .= implode(' OR ', $tr); @@ -41,7 +41,7 @@ if (!is_array($debtor_trans_no)) function void_customer_trans_details($type, $type_no) { $sql = "UPDATE ".TB_PREF."debtor_trans_details SET quantity=0, unit_price=0, - unit_tax=0, discount_percent=0, standard_cost=0 + unit_tax=0, discount_percent=0, standard_cost=0, src_id=0 WHERE debtor_trans_no=".db_escape($type_no)." AND debtor_trans_type=".db_escape($type); @@ -53,7 +53,7 @@ function void_customer_trans_details($type, $type_no) //---------------------------------------------------------------------------------------- function write_customer_trans_detail_item($debtor_trans_type, $debtor_trans_no, $stock_id, $description, - $quantity, $unit_price, $unit_tax, $discount_percent, $std_cost, $line_id=0) + $quantity, $unit_price, $unit_tax, $discount_percent, $std_cost, $src_id, $line_id=0) { if ($line_id!=0) $sql = "UPDATE ".TB_PREF."debtor_trans_details SET @@ -63,15 +63,17 @@ function write_customer_trans_detail_item($debtor_trans_type, $debtor_trans_no, unit_price=$unit_price, unit_tax=$unit_tax, discount_percent=$discount_percent, - standard_cost=$std_cost WHERE + standard_cost=$std_cost, + src_id=".db_escape($src_id)." WHERE id=".db_escape($line_id); else $sql = "INSERT INTO ".TB_PREF."debtor_trans_details (debtor_trans_no, debtor_trans_type, stock_id, description, quantity, unit_price, - unit_tax, discount_percent, standard_cost) + unit_tax, discount_percent, standard_cost, src_id) VALUES (".db_escape($debtor_trans_no).", ".db_escape($debtor_trans_type).", ".db_escape($stock_id). ", ".db_escape($description).", - $quantity, $unit_price, $unit_tax, $discount_percent, $std_cost)"; + $quantity, $unit_price, $unit_tax, + $discount_percent, $std_cost,".db_escape($src_id).")"; db_query($sql, "The debtor transaction detail could not be written"); } diff --git a/sales/includes/db/custalloc_db.inc b/sales/includes/db/custalloc_db.inc index b25c49e8..16f9227e 100644 --- a/sales/includes/db/custalloc_db.inc +++ b/sales/includes/db/custalloc_db.inc @@ -34,19 +34,6 @@ function delete_cust_allocation($trans_id) //---------------------------------------------------------------------------------------- -function get_DebtorTrans_allocation_balance($trans_type, $trans_no) -{ - - $sql = "SELECT (ov_amount+ov_gst+ov_freight+ov_freight_tax-ov_discount-alloc) AS BalToAllocate - FROM ".TB_PREF."debtor_trans WHERE trans_no=".db_escape($trans_no)." AND type=".db_escape($trans_type); - $result = db_query($sql,"calculate the allocation"); - $myrow = db_fetch_row($result); - - return $myrow[0]; -} - -//---------------------------------------------------------------------------------------- - function update_debtor_trans_allocation($trans_type, $trans_no, $alloc) { $sql = "UPDATE ".TB_PREF."debtor_trans SET alloc = alloc + $alloc @@ -153,8 +140,8 @@ function get_allocatable_to_cust_transactions($customer_id, $trans_no=null, $typ { $sql = get_alloc_trans_sql("amt", "trans.trans_no = alloc.trans_no_to AND trans.type = alloc.trans_type_to - AND alloc.trans_no_from=$trans_no - AND alloc.trans_type_from=$type + AND alloc.trans_no_from=".db_escape($trans_no)." + AND alloc.trans_type_from=".db_escape($type)." AND trans.debtor_no=".db_escape($customer_id), "".TB_PREF."cust_allocations as alloc"); } @@ -171,5 +158,121 @@ function get_allocatable_to_cust_transactions($customer_id, $trans_no=null, $typ return db_query($sql." ORDER BY trans_no", "Cannot retreive alloc to transactions"); } +function get_sql_for_customer_allocation_inquiry() +{ + $data_after = date2sql($_POST['TransAfterDate']); + $date_to = date2sql($_POST['TransToDate']); + + $sql = "SELECT + trans.type, + trans.trans_no, + trans.reference, + trans.order_, + trans.tran_date, + trans.due_date, + debtor.name, + debtor.curr_code, + (trans.ov_amount + trans.ov_gst + trans.ov_freight + + trans.ov_freight_tax + trans.ov_discount) AS TotalAmount, + trans.alloc AS Allocated, + ((trans.type = ".ST_SALESINVOICE.") + AND trans.due_date < '" . date2sql(Today()) . "') AS OverDue + FROM " + .TB_PREF."debtor_trans as trans, " + .TB_PREF."debtors_master as debtor + WHERE debtor.debtor_no = trans.debtor_no + AND (trans.ov_amount + trans.ov_gst + trans.ov_freight + + trans.ov_freight_tax + trans.ov_discount != 0) + AND trans.tran_date >= '$data_after' + AND trans.tran_date <= '$date_to'"; + + if ($_POST['customer_id'] != ALL_TEXT) + $sql .= " AND trans.debtor_no = ".db_escape($_POST['customer_id']); + + if (isset($_POST['filterType']) && $_POST['filterType'] != ALL_TEXT) + { + if ($_POST['filterType'] == '1' || $_POST['filterType'] == '2') + { + $sql .= " AND trans.type = ".ST_SALESINVOICE." "; + } + elseif ($_POST['filterType'] == '3') + { + $sql .= " AND trans.type = " . ST_CUSTPAYMENT; + } + elseif ($_POST['filterType'] == '4') + { + $sql .= " AND trans.type = ".ST_CUSTCREDIT." "; + } + + if ($_POST['filterType'] == '2') + { + $today = date2sql(Today()); + $sql .= " AND trans.due_date < '$today' + AND (round(abs(trans.ov_amount + " + ."trans.ov_gst + trans.ov_freight + " + ."trans.ov_freight_tax + trans.ov_discount) - trans.alloc,6) > 0) "; + } + } + else + { + $sql .= " AND trans.type <> ".ST_CUSTDELIVERY." "; + } + + + if (!check_value('showSettled')) + { + $sql .= " AND (round(abs(trans.ov_amount + trans.ov_gst + " + ."trans.ov_freight + trans.ov_freight_tax + " + ."trans.ov_discount) - trans.alloc,6) != 0) "; + } + return $sql; +} + +function credit_sales_invoice_allocate($invoice_no, $credit_no, $amount, $date) +{ + + $sql = "SELECT ov_freight+ov_gst+ov_amount+ov_freight_tax as total, alloc FROM ".TB_PREF."debtor_trans + WHERE (`type`=".ST_SALESINVOICE." AND trans_no=".db_escape($invoice_no).")"; + $result = db_query($sql, "can't retrieve invoice totals"); + $invoice = db_fetch($result); + $free = $invoice['total'] - $invoice['alloc']; + + if ($free < $amount) { + // if there is not enough unallocated amount - remove some payment allocations + $sql = "SELECT * FROM ".TB_PREF."cust_allocations + WHERE (trans_type_to=".ST_SALESINVOICE." AND trans_no_to=".db_escape($invoice_no).") + AND trans_type_from <> ".ST_CUSTCREDIT; + $result = db_query($sql, "can't retrieve invoice allocations"); + + while(($free < $amount) && ($alloc = db_fetch($result))) { + $unalloc = min($alloc['amt'], $amount-$free); + update_debtor_trans_allocation($alloc['trans_type_to'], $alloc['trans_no_to'], + -$unalloc); + update_debtor_trans_allocation($alloc['trans_type_from'], $alloc['trans_no_from'], + -$unalloc); + + delete_cust_allocation($alloc['id']); + if ($unalloc < $alloc['amt']) + add_cust_allocation($alloc['amt']-$unalloc, $alloc['trans_type_from'], + $alloc['trans_no_from'], ST_SALESINVOICE, $invoice_no); + + $free += $unalloc; + } + } + if ($free < $amount) { + // this should never happen unless sparse credit notices were allocated to + // the invoice, or summarized freight costs on credit notes is more than those on invoice. + display_error(_("Unsuspected overallocation happened due to sparse credit notes exists for this invoice. + Check all credit notes allocated to this invoice for summarized freight charges.")); + return false; + } + update_debtor_trans_allocation(ST_SALESINVOICE, $invoice_no, $amount); + update_debtor_trans_allocation(ST_CUSTCREDIT, $credit_no, $amount); + add_cust_allocation($amount, ST_CUSTCREDIT, $credit_no, ST_SALESINVOICE, $invoice_no); + + exchange_variation(ST_CUSTCREDIT, $credit_no, ST_SALESINVOICE, $invoice_no, $date, + $amount, PT_CUSTOMER); + return true; +} ?> \ No newline at end of file diff --git a/sales/includes/db/customers_db.inc b/sales/includes/db/customers_db.inc index 1670c426..bd5b8d34 100644 --- a/sales/includes/db/customers_db.inc +++ b/sales/includes/db/customers_db.inc @@ -9,6 +9,58 @@ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the License here . ***********************************************************************/ + +function add_customer($CustName, $cust_ref, $address, $tax_id, $curr_code, + $dimension_id, $dimension2_id, $credit_status, $payment_terms, $discount, $pymt_discount, + $credit_limit, $sales_type, $notes) +{ + $sql = "INSERT INTO ".TB_PREF."debtors_master (name, debtor_ref, address, tax_id, + dimension_id, dimension2_id, curr_code, credit_status, payment_terms, discount, + pymt_discount,credit_limit, sales_type, notes) VALUES (" + .db_escape($CustName) .", " .db_escape($cust_ref) .", " + .db_escape($address) . ", " . db_escape($tax_id) . "," + .db_escape($dimension_id) . ", " + .db_escape($dimension2_id) . ", ".db_escape($curr_code) . ", + " . db_escape($credit_status) . ", ".db_escape($payment_terms) . ", " . $discount . ", + " . $pymt_discount . ", " . $credit_limit + .", ".db_escape($sales_type).", ".db_escape($notes) . ")"; + + db_query($sql,"The customer could not be added"); +} + +function update_customer($customer_id, $CustName, $cust_ref, $address, $tax_id, $curr_code, + $dimension_id, $dimension2_id, $credit_status, $payment_terms, $discount, $pymt_discount, + $credit_limit, $sales_type, $notes) +{ + $sql = "UPDATE ".TB_PREF."debtors_master SET name=" . db_escape($CustName) . ", + debtor_ref=" . db_escape($cust_ref) . ", + address=".db_escape($address) . ", + tax_id=".db_escape($tax_id) . ", + curr_code=".db_escape($curr_code) . ", + dimension_id=".db_escape($dimension_id) . ", + dimension2_id=".db_escape($dimension2_id) . ", + credit_status=".db_escape($credit_status) . ", + payment_terms=".db_escape($payment_terms) . ", + discount=" . $discount . ", + pymt_discount=" . $pymt_discount . ", + credit_limit=" . $credit_limit . ", + sales_type = ".db_escape($sales_type) . ", + notes=".db_escape($notes) ." + WHERE debtor_no = ".db_escape($customer_id); + + db_query($sql,"The customer could not be updated"); +} + +function delete_customer($customer_id) +{ + begin_transaction(); + delete_entity_contacts('customer', $customer_id); + + $sql = "DELETE FROM ".TB_PREF."debtors_master WHERE debtor_no=".db_escape($customer_id);; + db_query($sql,"cannot delete customer"); + commit_transaction(); +} + function get_customer_details($customer_id, $to=null) { @@ -20,33 +72,29 @@ function get_customer_details($customer_id, $to=null) $past2 = 2 * $past1; // removed - debtor_trans.alloc from all summations - $value = "IF(".TB_PREF."debtor_trans.type=11 OR ".TB_PREF."debtor_trans.type=12 OR ".TB_PREF."debtor_trans.type=2, - -1, 1) *". - "(".TB_PREF."debtor_trans.ov_amount + ".TB_PREF."debtor_trans.ov_gst + " - .TB_PREF."debtor_trans.ov_freight + ".TB_PREF."debtor_trans.ov_freight_tax + " - .TB_PREF."debtor_trans.ov_discount)"; - $due = "IF (".TB_PREF."debtor_trans.type=10,".TB_PREF."debtor_trans.due_date,".TB_PREF."debtor_trans.tran_date)"; + $value = "IFNULL(IF(trans.type=11 OR trans.type=12 OR trans.type=2, -1, 1) + * (trans.ov_amount + trans.ov_gst + trans.ov_freight + trans.ov_freight_tax + trans.ov_discount),0)"; + + $due = "IF (trans.type=10, trans.due_date, trans.tran_date)"; $sql = "SELECT ".TB_PREF."debtors_master.name, ".TB_PREF."debtors_master.curr_code, ".TB_PREF."payment_terms.terms, ".TB_PREF."debtors_master.credit_limit, ".TB_PREF."credit_status.dissallow_invoices, ".TB_PREF."credit_status.reason_description, - Sum(".$value.") AS Balance, - + Sum(IFNULL($value,0)) AS Balance, Sum(IF ((TO_DAYS('$todate') - TO_DAYS($due)) >= 0,$value,0)) AS Due, Sum(IF ((TO_DAYS('$todate') - TO_DAYS($due)) >= $past1,$value,0)) AS Overdue1, Sum(IF ((TO_DAYS('$todate') - TO_DAYS($due)) >= $past2,$value,0)) AS Overdue2 - FROM ".TB_PREF."debtors_master, + FROM ".TB_PREF."debtors_master + LEFT JOIN ".TB_PREF."debtor_trans trans ON + trans.tran_date <= '$todate' AND ".TB_PREF."debtors_master.debtor_no = trans.debtor_no AND trans.type <> 13 +, ".TB_PREF."payment_terms, - ".TB_PREF."credit_status, - ".TB_PREF."debtor_trans + ".TB_PREF."credit_status WHERE ".TB_PREF."debtors_master.payment_terms = ".TB_PREF."payment_terms.terms_indicator - AND ".TB_PREF."debtors_master.credit_status = ".TB_PREF."credit_status.id + AND ".TB_PREF."debtors_master.credit_status = ".TB_PREF."credit_status.id AND ".TB_PREF."debtors_master.debtor_no = ".db_escape($customer_id)." - AND ".TB_PREF."debtor_trans.tran_date <= '$todate' - AND ".TB_PREF."debtor_trans.type <> 13 - AND ".TB_PREF."debtors_master.debtor_no = ".TB_PREF."debtor_trans.debtor_no GROUP BY ".TB_PREF."debtors_master.name, @@ -58,46 +106,13 @@ function get_customer_details($customer_id, $to=null) ".TB_PREF."credit_status.reason_description"; $result = db_query($sql,"The customer details could not be retrieved"); - if (db_num_rows($result) == 0) - { - - /*Because there is no balance - so just retrieve the header information about the customer - the choice is do one query to get the balance and transactions for those customers who have a balance and two queries for those who don't have a balance OR always do two queries - I opted for the former */ - - $nil_balance = true; - - $sql = "SELECT ".TB_PREF."debtors_master.name, ".TB_PREF."debtors_master.curr_code, ".TB_PREF."debtors_master.debtor_no, ".TB_PREF."payment_terms.terms, - ".TB_PREF."debtors_master.credit_limit, ".TB_PREF."credit_status.dissallow_invoices, ".TB_PREF."credit_status.reason_description - FROM ".TB_PREF."debtors_master, - ".TB_PREF."payment_terms, - ".TB_PREF."credit_status - - WHERE - ".TB_PREF."debtors_master.payment_terms = ".TB_PREF."payment_terms.terms_indicator - AND ".TB_PREF."debtors_master.credit_status = ".TB_PREF."credit_status.id - AND ".TB_PREF."debtors_master.debtor_no = ".db_escape($customer_id); - - $result = db_query($sql,"The customer details could not be retrieved"); - - } - else - { - $nil_balance = false; - } - $customer_record = db_fetch($result); - if ($nil_balance == true) - { - $customer_record["Balance"] = 0; - $customer_record["Due"] = 0; - $customer_record["Overdue1"] = 0; - $customer_record["Overdue2"] = 0; - } - return $customer_record; } + function get_customer($customer_id) { $sql = "SELECT * FROM ".TB_PREF."debtors_master WHERE debtor_no=".db_escape($customer_id); @@ -118,27 +133,41 @@ function get_customer_name($customer_id) return $row[0]; } -function get_area_name($id) +function get_customer_habit($customer_id) { - $sql = "SELECT description FROM ".TB_PREF."areas WHERE area_code=".db_escape($id); + $sql = "SELECT ".TB_PREF."debtors_master.pymt_discount, + ".TB_PREF."credit_status.dissallow_invoices + FROM ".TB_PREF."debtors_master, ".TB_PREF."credit_status + WHERE ".TB_PREF."debtors_master.credit_status = ".TB_PREF."credit_status.id + AND ".TB_PREF."debtors_master.debtor_no = ".db_escape($customer_id); - $result = db_query($sql, "could not get sales type"); + $result = db_query($sql, "could not query customers"); - $row = db_fetch_row($result); - return $row[0]; + return db_fetch($result); } -function get_salesman_name($id) +function get_customer_contacts($customer_id, $action=null) { - $sql = "SELECT salesman_name FROM ".TB_PREF."salesman WHERE salesman_code=".db_escape($id); + $results = array(); + $res = get_crm_persons('customer', $action, $customer_id); + while($contact = db_fetch($res)) + $results[] = $contact; - $result = db_query($sql, "could not get sales type"); - - $row = db_fetch_row($result); - return $row[0]; + return $results; } +function get_current_cust_credit($customer_id) +{ + $custdet = get_customer_details($customer_id); + + return $custdet['credit_limit']-$custdet['Balance']; +} +function is_new_customer($id) +{ + $tables = array('cust_branch', 'debtor_trans', 'recurrent_invoices', 'sales_orders'); + return !key_in_foreign_table($id, $tables, 'debtor_no'); +} ?> \ No newline at end of file diff --git a/sales/includes/db/payment_db.inc b/sales/includes/db/payment_db.inc index a73bc8ad..8b92dd1c 100644 --- a/sales/includes/db/payment_db.inc +++ b/sales/includes/db/payment_db.inc @@ -18,11 +18,15 @@ function write_customer_payment($trans_no, $customer_id, $branch_id, $bank_accou global $Refs; begin_transaction(); + $args = func_get_args(); while (count($args) < 11) $args[] = 0; + $args = (object)array_combine(array('trans_no', 'customer_id', 'branch_id', 'bank_account', + 'date_', 'ref', 'amount', 'discount', 'memo_','rate','charge'), $args); + hook_db_prewrite($args, ST_CUSTPAYMENT); $company_record = get_company_prefs(); $payment_no = write_customer_trans(ST_CUSTPAYMENT, $trans_no, $customer_id, $branch_id, - $date_, $ref, $amount, $discount, 0, 0, 0, 0, 0, 0, 0, "", 0, $rate); + $date_, $ref, $amount, $discount, 0, 0, 0, 0, 0, 0, "", 0, $rate); $bank_gl_account = get_bank_gl_account($bank_account); @@ -82,6 +86,8 @@ function write_customer_payment($trans_no, $customer_id, $branch_id, $bank_accou $Refs->save(ST_CUSTPAYMENT, $payment_no, $ref); + $args->trans_no = $payment_no; + hook_db_postwrite($args, ST_CUSTPAYMENT); commit_transaction(); return $payment_no; @@ -93,6 +99,7 @@ function void_customer_payment($type, $type_no) { begin_transaction(); + hook_db_prevoid($type, $type_no); void_bank_trans($type, $type_no, true); void_gl_trans($type, $type_no, true); void_cust_allocations($type, $type_no); diff --git a/sales/includes/db/recurrent_invoices_db.inc b/sales/includes/db/recurrent_invoices_db.inc new file mode 100644 index 00000000..4ff68549 --- /dev/null +++ b/sales/includes/db/recurrent_invoices_db.inc @@ -0,0 +1,66 @@ +. +***********************************************************************/ + +function add_recurrent_invoice($description, $order_no, $debtor_no, $group_no, $days, $monthly, + $begin, $end) +{ + $sql = "INSERT INTO ".TB_PREF."recurrent_invoices (description, order_no, debtor_no, + group_no, days, monthly, begin, end, last_sent) VALUES (".db_escape($description) . ", " + .db_escape($order_no).", ".db_escape($debtor_no).", " + .db_escape($group_no).", ".$days.", ".$monthly.", '" + .date2sql($begin)."', '".date2sql($end)."', '".date2sql(Add_Years($begin, -5))."')"; + db_query($sql,"The recurrent invoice could not be added"); +} + +function update_recurrent_invoice($selected_id, $description, $order_no, $debtor_no, $group_no, $days, $monthly, + $begin, $end) +{ + $sql = "UPDATE ".TB_PREF."recurrent_invoices SET + description=".db_escape($description).", + order_no=".db_escape($order_no).", + debtor_no=".db_escape($debtor_no).", + group_no=".db_escape($group_no).", + days=".$days.", + monthly=".$monthly.", + begin='".date2sql($begin)."', + end='".date2sql($end)."' + WHERE id = ".db_escape($selected_id); + db_query($sql,"The recurrent invoice could not be updated"); +} + +function update_last_sent_recurrent_invoice($id, $date) +{ + $date = date2sql($date); + $sql = "UPDATE ".TB_PREF."recurrent_invoices SET last_sent='$date' WHERE id=".db_escape($id); + db_query($sql,"The recurrent invoice could not be updated"); +} + +function delete_recurrent_invoice($selected_id) +{ + $sql="DELETE FROM ".TB_PREF."recurrent_invoices WHERE id=".db_escape($selected_id); + db_query($sql,"could not delete recurrent invoice"); +} + +function get_recurrent_invoices() +{ + $sql = "SELECT * FROM ".TB_PREF."recurrent_invoices ORDER BY description, group_no, debtor_no"; + return db_query($sql,"could not get recurrent invoices"); +} + +function get_recurrent_invoice($selected_id) +{ + $sql = "SELECT * FROM ".TB_PREF."recurrent_invoices WHERE id=".db_escape($selected_id); + + $result = db_query($sql,"could not get recurrent invoice"); + return db_fetch($result); +} +?> \ No newline at end of file diff --git a/sales/includes/db/sales_credit_db.inc b/sales/includes/db/sales_credit_db.inc index a71d686a..ce1cb17f 100644 --- a/sales/includes/db/sales_credit_db.inc +++ b/sales/includes/db/sales_credit_db.inc @@ -13,7 +13,7 @@ // if ($writeoff_acc==0) return goods into $cart->Location // if src_docs!=0 => credit invoice else credit note // -function write_credit_note($credit_note, $write_off_acc) +function write_credit_note(&$credit_note, $write_off_acc) { global $Refs; @@ -31,6 +31,7 @@ function write_credit_note($credit_note, $write_off_acc) $credit_type = $write_off_acc == 0 ? 'Return' : 'WriteOff'; begin_transaction(); + hook_db_prewrite($credit_note, ST_CUSTCREDIT); $company_data = get_company_prefs(); $branch_data = get_branch_accounts($credit_note->Branch); @@ -71,14 +72,13 @@ function write_credit_note($credit_note, $write_off_acc) $credit_note->Branch, $credit_date, $credit_note->reference, $credit_note_total, 0, $items_added_tax, $credit_note->freight_cost, $freight_added_tax, - $credit_note->sales_type, - $credit_note->order_no, $credit_invoice, $credit_note->ship_via, - null, $alloc, 0, $credit_note->dimension_id, $credit_note->dimension2_id); + $credit_note->sales_type, $credit_note->order_no, $credit_note->ship_via, + null, $alloc, 0, $credit_note->dimension_id, $credit_note->dimension2_id, + $credit_note->payment); // 2008-06-14 extra $alloc, 2008-11-12 dimension_id Joe Hunt if ($trans_no==0) { $credit_note->trans_no = array($credit_no=>0); - set_document_parent($credit_note); } else { delete_comments(ST_CUSTCREDIT, $credit_no); void_cust_allocations(ST_CUSTCREDIT, $credit_no, $credit_date); @@ -87,34 +87,20 @@ function write_credit_note($credit_note, $write_off_acc) void_trans_tax_details(ST_CUSTCREDIT, $credit_no); } if ($credit_invoice) { - $invoice_alloc_balance = get_DebtorTrans_allocation_balance(ST_SALESINVOICE, $credit_invoice); update_customer_trans_version(get_parent_type(ST_CUSTCREDIT), $credit_note->src_docs ); - if ($invoice_alloc_balance > 0) { //the invoice is not already fully allocated - $total = $credit_note_total + $credit_note->freight_cost + - $items_added_tax + $freight_added_tax; - $allocate_amount = ($invoice_alloc_balance > $total) ? $total : $invoice_alloc_balance; - /*Now insert the allocation record if > 0 */ - if ($allocate_amount != 0) { - update_debtor_trans_allocation(ST_SALESINVOICE, $credit_invoice, $allocate_amount); - update_debtor_trans_allocation(ST_CUSTCREDIT, $credit_no, $allocate_amount); // *** - add_cust_allocation($allocate_amount, ST_CUSTCREDIT, $credit_no, ST_SALESINVOICE, $credit_invoice); - // Exchange Variations Joe Hunt 2008-09-20 //////////////////////////////////////// + $total = $credit_note_total + $credit_note->freight_cost + $items_added_tax + + $freight_added_tax; - exchange_variation(ST_CUSTCREDIT, $credit_no, ST_SALESINVOICE, $credit_invoice, $credit_date, - $allocate_amount, PT_CUSTOMER); - - /////////////////////////////////////////////////////////////////////////// - - } - } + if (!credit_sales_invoice_allocate($credit_invoice, $credit_no, $total, $credit_date)) + return false; } $total = 0; foreach ($credit_note->line_items as $credit_line) { if ($credit_invoice && $credit_line->qty_dispatched!=$credit_line->qty_old ) { - update_parent_line(11, $credit_line->src_id,($credit_line->qty_dispatched + update_parent_line(ST_CUSTCREDIT, $credit_line->src_id,($credit_line->qty_dispatched -$credit_line->qty_old)); } @@ -127,7 +113,7 @@ function write_credit_note($credit_note, $write_off_acc) write_customer_trans_detail_item(ST_CUSTCREDIT, $credit_no, $credit_line->stock_id, $credit_line->item_description, $credit_line->qty_dispatched, $credit_line->line_price(), $line_tax, $credit_line->discount_percent, - $credit_line->standard_cost, $trans_no==0 ? 0: $credit_line->id); + $credit_line->standard_cost, $credit_line->src_id, $trans_no==0 ? 0: $credit_line->id); add_credit_movements_item($credit_note, $credit_line, $credit_type, $line_taxfree_price+$line_tax, $credit_invoice); @@ -175,7 +161,7 @@ function write_credit_note($credit_note, $write_off_acc) if ($trans_no == 0) { $Refs->save(ST_CUSTCREDIT, $credit_no, $credit_note->reference); } - + hook_db_postwrite($credit_note, ST_CUSTCREDIT); commit_transaction(); return $credit_no; diff --git a/sales/includes/db/sales_delivery_db.inc b/sales/includes/db/sales_delivery_db.inc index 2cfda5e4..5c269406 100644 --- a/sales/includes/db/sales_delivery_db.inc +++ b/sales/includes/db/sales_delivery_db.inc @@ -20,6 +20,8 @@ function write_sales_delivery(&$delivery,$bo_policy) if (is_array($trans_no)) $trans_no = key($trans_no); begin_transaction(); + $delivery->bo_policy = $bo_policy; + hook_db_prewrite($delivery, ST_CUSTDELIVERY); $customer = get_customer($delivery->customer_id); $delivery_items_total = $delivery->get_items_total_dispatch(); @@ -42,8 +44,9 @@ function write_sales_delivery(&$delivery,$bo_policy) $delivery->tax_included ? 0 : $tax_total-$freight_tax, $delivery->freight_cost, $delivery->tax_included ? 0 : $freight_tax, - $delivery->sales_type, $delivery->order_no, 0, - $delivery->ship_via, $delivery->due_date, 0, 0, $delivery->dimension_id, $delivery->dimension2_id); + $delivery->sales_type, $delivery->order_no, + $delivery->ship_via, $delivery->due_date, 0, 0, $delivery->dimension_id, + $delivery->dimension2_id, $delivery->payment); if ($trans_no == 0) { $delivery->trans_no = array($delivery_no=>0); @@ -71,7 +74,7 @@ function write_sales_delivery(&$delivery,$bo_policy) write_customer_trans_detail_item(ST_CUSTDELIVERY, $delivery_no, $delivery_line->stock_id, $delivery_line->item_description, $delivery_line->qty_dispatched, $delivery_line->line_price(), $line_tax, - $delivery_line->discount_percent, $delivery_line->standard_cost, + $delivery_line->discount_percent, $delivery_line->standard_cost, $delivery_line->src_id, $trans_no ? $delivery_line->id : 0); // Now update sales_order_details for the quantity delivered @@ -89,7 +92,7 @@ function write_sales_delivery(&$delivery,$bo_policy) $stock_gl_code = get_stock_gl_code($delivery_line->stock_id); /* insert gl_trans to credit stock and debit cost of sales at standard cost*/ - if ($delivery_line->standard_cost != 0) { + if (is_inventory_item($delivery_line->stock_id) && $delivery_line->standard_cost != 0) { /*first the cost of sales entry*/ // 2008-08-01. If there is a Customer Dimension, then override with this, @@ -139,6 +142,7 @@ function write_sales_delivery(&$delivery,$bo_policy) $Refs->save(ST_CUSTDELIVERY, $delivery_no, $delivery->reference); } + hook_db_postwrite($delivery, ST_CUSTDELIVERY); commit_transaction(); return $delivery_no; @@ -146,10 +150,13 @@ function write_sales_delivery(&$delivery,$bo_policy) //-------------------------------------------------------------------------------------------------- -function void_sales_delivery($type, $type_no) +function void_sales_delivery($type, $type_no, $transactions=true) { - begin_transaction(); + if ($transactions) + begin_transaction(); + hook_db_prevoid($type, $type_no); + void_gl_trans($type, $type_no, true); // reverse all the changes in the sales order @@ -158,10 +165,11 @@ function void_sales_delivery($type, $type_no) $order = get_customer_trans_order($type, $type_no); if ($order) { + $auto = (get_reference(ST_SALESORDER, $order) == "auto"); $order_items = get_sales_order_details($order, ST_SALESORDER); while ($row = db_fetch($items_result)) { $order_line = db_fetch($order_items); - update_parent_line(ST_CUSTDELIVERY, $order_line['id'], -$row['quantity']); + update_parent_line(ST_CUSTDELIVERY, $order_line['id'], -$row['quantity'], $auto); } } @@ -176,6 +184,7 @@ function void_sales_delivery($type, $type_no) // DO NOT MOVE THIS ABOVE VOIDING or we can end up with trans with alloc < 0 void_customer_trans($type, $type_no); - commit_transaction(); + if ($transactions) + commit_transaction(); } ?> \ No newline at end of file diff --git a/sales/includes/db/sales_groups_db.inc b/sales/includes/db/sales_groups_db.inc new file mode 100644 index 00000000..57d15fc2 --- /dev/null +++ b/sales/includes/db/sales_groups_db.inc @@ -0,0 +1,159 @@ +. +***********************************************************************/ + +function add_sales_group($description) +{ + $sql = "INSERT INTO ".TB_PREF."groups (description) VALUES (".db_escape($description) . ")"; + db_query($sql,"The sales group could not be added"); +} + +function update_sales_group($selected_id, $description) +{ + $sql = "UPDATE ".TB_PREF."groups SET description=".db_escape($description)." WHERE id = ".db_escape($selected_id); + db_query($sql,"The sales group could not be updated"); +} + +function delete_sales_group($selected_id) +{ + $sql="DELETE FROM ".TB_PREF."groups WHERE id=".db_escape($selected_id); + db_query($sql,"could not delete sales group"); +} + +function get_sales_groups($show_inactive) +{ + $sql = "SELECT * FROM ".TB_PREF."groups"; + if (!$show_inactive) $sql .= " WHERE !inactive"; + $sql .= " ORDER BY description"; + return db_query($sql,"could not get groups"); +} + +function get_sales_group($selected_id) +{ + $sql = "SELECT * FROM ".TB_PREF."groups WHERE id=".db_escape($selected_id); + + $result = db_query($sql,"could not get group"); + return db_fetch($result); +} + +function get_sales_group_name($group_no) +{ + $sql = "SELECT description FROM ".TB_PREF."groups WHERE id = ".db_escape($group_no); + $result = db_query($sql, "could not get group"); + $row = db_fetch($result); + return $row[0]; +} + +function add_sales_area($description) +{ + $sql = "INSERT INTO ".TB_PREF."areas (description) VALUES (".db_escape($description) . ")"; + db_query($sql,"The sales area could not be added"); +} + +function update_sales_area($selected_id, $description) +{ + $sql = "UPDATE ".TB_PREF."areas SET description=".db_escape($description)." WHERE area_code = ".db_escape($selected_id); + db_query($sql,"The sales area could not be updated"); +} + +function delete_sales_area($selected_id) +{ + $sql="DELETE FROM ".TB_PREF."areas WHERE area_code=".db_escape($selected_id); + db_query($sql,"could not delete sales area"); +} + +function get_sales_areas($show_inactive) +{ + $sql = "SELECT * FROM ".TB_PREF."areas"; + if (!$show_inactive) $sql .= " WHERE !inactive"; + return db_query($sql,"could not get areas"); +} + +function get_sales_area($selected_id) +{ + $sql = "SELECT * FROM ".TB_PREF."areas WHERE area_code=".db_escape($selected_id); + + $result = db_query($sql,"could not get area"); + return db_fetch($result); +} + +function get_area_name($id) +{ + $sql = "SELECT description FROM ".TB_PREF."areas WHERE area_code=".db_escape($id); + + $result = db_query($sql, "could not get sales type"); + + $row = db_fetch_row($result); + return $row[0]; +} + +function add_salesman($salesman_name, $salesman_phone, $salesman_fax, + $salesman_email, $provision, $break_pt, $provision2) +{ + $sql = "INSERT INTO ".TB_PREF."salesman (salesman_name, salesman_phone, salesman_fax, salesman_email, + provision, break_pt, provision2) + VALUES (".db_escape($salesman_name) . ", " + .db_escape($salesman_phone) . ", " + .db_escape($salesman_fax) . ", " + .db_escape($salesman_email) . ", ". + $provision.", ".$break_pt.", " + .$provision2.")"; + db_query($sql,"The insert of the sales person failed"); +} + +function update_salesman($selected_id, $salesman_name, $salesman_phone, $salesman_fax, + $salesman_email, $provision, $break_pt, $provision2) +{ + $sql = "UPDATE ".TB_PREF."salesman SET salesman_name=".db_escape($salesman_name) . ", + salesman_phone=".db_escape($salesman_phone) . ", + salesman_fax=".db_escape($salesman_fax) . ", + salesman_email=".db_escape($salesman_email) . ", + provision=".$provision.", + break_pt=".$break_pt.", + provision2=".$provision2." + WHERE salesman_code = ".db_escape($selected_id); + db_query($sql,"The update of the sales person failed"); +} + +function delete_salesman($selected_id) +{ + $sql="DELETE FROM ".TB_PREF."salesman WHERE salesman_code=".db_escape($selected_id); + db_query($sql,"The sales-person could not be deleted"); +} + +function get_salesmen($show_inactive) +{ + $sql = "SELECT * FROM ".TB_PREF."salesman"; + if (!$show_inactive) $sql .= " WHERE !inactive"; + return db_query($sql,"could not get sales persons"); +} + +function get_salesman($selected_id) +{ + $sql = "SELECT * FROM ".TB_PREF."salesman WHERE salesman_code=".db_escape($selected_id); + + $result = db_query($sql,"could not get sales person"); + return db_fetch($result); +} + +function get_salesman_name($id) +{ + $sql = "SELECT salesman_name FROM ".TB_PREF."salesman WHERE salesman_code=".db_escape($id); + + $result = db_query($sql, "could not get sales type"); + + $row = db_fetch_row($result); + return $row[0]; +} + + + +?> \ No newline at end of file diff --git a/sales/includes/db/sales_invoice_db.inc b/sales/includes/db/sales_invoice_db.inc index f0798af5..df56eb4d 100644 --- a/sales/includes/db/sales_invoice_db.inc +++ b/sales/includes/db/sales_invoice_db.inc @@ -25,6 +25,7 @@ function write_sales_invoice(&$invoice) begin_transaction(); + hook_db_prewrite($invoice, ST_SALESINVOICE); $company_data = get_company_prefs(); $branch_data = get_branch_accounts($invoice->Branch); @@ -35,10 +36,6 @@ function write_sales_invoice(&$invoice) $items_total = $invoice->get_items_total_dispatch(); $freight_tax = $invoice->get_shipping_tax(); - $delivery_no = $invoice->src_docs; - if (is_array($delivery_no)) - $delivery_no = 0; - update_customer_trans_version(get_parent_type(ST_SALESINVOICE), $invoice->src_docs); $ov_gst = 0; @@ -56,12 +53,6 @@ function write_sales_invoice(&$invoice) $items_added_tax = 0; $freight_added_tax = 0; } - // 2006-06-14. If the Customer Branch AR Account is set to a Bank Account, - // the transaction will be settled at once. - if (is_bank_account($branch_data['receivables_account'])) - $alloc = $items_total + $items_added_tax + $invoice->freight_cost + $freight_added_tax; - else - $alloc = 0; /* Insert/update the debtor_trans */ $sales_order = $invoice->order_no; @@ -71,13 +62,13 @@ function write_sales_invoice(&$invoice) $invoice_no = write_customer_trans(ST_SALESINVOICE, $trans_no, $invoice->customer_id, $invoice->Branch, $date_, $invoice->reference, $items_total, 0, $items_added_tax, $invoice->freight_cost, $freight_added_tax, - $invoice->sales_type, $sales_order, $delivery_no, - $invoice->ship_via, $invoice->due_date, $alloc, 0, $invoice->dimension_id, $invoice->dimension2_id); + $invoice->sales_type, $sales_order, $invoice->ship_via, + $invoice->due_date, 0, 0, $invoice->dimension_id, + $invoice->dimension2_id, $invoice->payment); // 2008-06-14 extra $alloc, 2008-11-12 added dimension_id Joe Hunt if ($trans_no == 0) { $invoice->trans_no = array($invoice_no=>0); - set_document_parent($invoice); } else { delete_comments(ST_SALESINVOICE, $invoice_no); void_gl_trans(ST_SALESINVOICE, $invoice_no, true); @@ -98,7 +89,7 @@ function write_sales_invoice(&$invoice) write_customer_trans_detail_item(ST_SALESINVOICE, $invoice_no, $invoice_line->stock_id, $invoice_line->item_description, $invoice_line->qty_dispatched, $invoice_line->line_price(), $line_tax, $invoice_line->discount_percent, - $invoice_line->standard_cost, + $invoice_line->standard_cost, $invoice_line->src_id, $trans_no ? $invoice_line->id : 0); // Update delivery items for the quantity invoiced @@ -168,7 +159,7 @@ function write_sales_invoice(&$invoice) if ($trans_no == 0) { $Refs->save(ST_SALESINVOICE, $invoice_no, $invoice->reference); - if ($invoice->cash) { + if ($invoice->payment_terms['cash_sale']) { $amount = $items_total + $items_added_tax + $invoice->freight_cost + $freight_added_tax; @@ -186,6 +177,7 @@ function write_sales_invoice(&$invoice) update_debtor_trans_allocation(ST_CUSTPAYMENT, $pmtno, $amount); } } + hook_db_postwrite($invoice, ST_SALESINVOICE); commit_transaction(); return $invoice_no; @@ -197,19 +189,29 @@ function void_sales_invoice($type, $type_no) { begin_transaction(); + hook_db_prevoid($type, $type_no); void_bank_trans($type, $type_no, true); void_gl_trans($type, $type_no, true); // reverse all the changes in parent document(s) - $items_result = get_customer_trans_details($type, $type_no); - $deliveries = get_parent_trans($type, $type_no); + $deliveries = get_sales_parent_numbers($type, $type_no); if ($deliveries !== 0) { - $srcdetails = get_customer_trans_details(get_parent_type($type), $deliveries); - while ($row = db_fetch($items_result)) { - $src_line = db_fetch($srcdetails); - update_parent_line($type, $src_line['id'], -$row['quantity']); + if (count($deliveries) == 1 && get_reference(ST_CUSTDELIVERY, $deliveries[0]) == "auto") + { + void_sales_delivery(ST_CUSTDELIVERY, $deliveries[0], false); + $date_ = Today(); + add_audit_trail(ST_CUSTDELIVERY, $deliveries[0], $date_, _("Voided.")); + add_voided_entry(ST_CUSTDELIVERY, $deliveries[0], $date_, ""); + } + else + { + + $srcdetails = get_sales_parent_lines($type, $type_no); + while ($row = db_fetch($src_details)) { + update_parent_line($type, $row['id'], -$row['quantity']); + } } } // clear details after they've been reversed in the sales order diff --git a/sales/includes/db/sales_order_db.inc b/sales/includes/db/sales_order_db.inc index b12011d4..eb5665ab 100644 --- a/sales/includes/db/sales_order_db.inc +++ b/sales/includes/db/sales_order_db.inc @@ -15,13 +15,14 @@ function add_sales_order(&$order) global $loc_notification, $path_to_root, $Refs; begin_transaction(); - + hook_db_prewrite($order, $order->trans_type); $order_no = get_next_trans_no($order->trans_type); $del_date = date2sql($order->due_date); $order_type = 0; // this is default on new order + $total = $order->get_trans_total(); $sql = "INSERT INTO ".TB_PREF."sales_orders (order_no, type, debtor_no, trans_type, branch_code, customer_ref, reference, comments, ord_date, order_type, ship_via, deliver_to, delivery_address, contact_phone, - contact_email, freight_cost, from_stk_loc, delivery_date) + freight_cost, from_stk_loc, delivery_date, payment_terms, total) VALUES (" .db_escape($order_no) . "," .db_escape($order_type) . "," . db_escape($order->customer_id) . ", " .db_escape($order->trans_type) . "," .db_escape($order->Branch) . ", ". db_escape($order->cust_ref) .",". @@ -33,10 +34,11 @@ function add_sales_order(&$order) db_escape($order->deliver_to) . "," . db_escape($order->delivery_address) . ", " . db_escape($order->phone) . ", " . - db_escape($order->email) . ", " . db_escape($order->freight_cost) .", " . db_escape($order->Location) .", " . - db_escape($del_date) . ")"; + db_escape($del_date) . "," . + db_escape($order->payment) . "," . + db_escape($total). ")"; db_query($sql, "order Cannot be Added"); @@ -89,6 +91,8 @@ function add_sales_order(&$order) add_audit_trail($order->trans_type, $order_no, $order->document_date); $Refs->save($order->trans_type, $order_no, $order->reference); + + hook_db_postwrite($order, $order->trans_type); commit_transaction(); if ($loc_notification == 1 && count($st_ids) > 0) @@ -117,6 +121,7 @@ function add_sales_order(&$order) function delete_sales_order($order_no, $trans_type) { begin_transaction(); + hook_db_prevoid($trans_type, $order_no); $sql = "DELETE FROM ".TB_PREF."sales_orders WHERE order_no=" . db_escape($order_no) . " AND trans_type=".db_escape($trans_type); @@ -139,7 +144,7 @@ function delete_sales_order($order_no, $trans_type) function update_sales_order_version($order) { foreach ($order as $so_num => $so_ver) { - $sql= 'UPDATE '.TB_PREF.'sales_orders SET version=version+1 WHERE order_no='. $so_num. + $sql= 'UPDATE '.TB_PREF.'sales_orders SET version=version+1 WHERE order_no='. db_escape($so_num). ' AND version='.$so_ver . " AND trans_type=30"; db_query($sql, 'Concurrent editing conflict while sales order update'); } @@ -155,6 +160,7 @@ function update_sales_order($order) $ord_date = date2sql($order->document_date); $order_no = key($order->trans_no); $version= current($order->trans_no); + $total = $order->get_trans_total(); begin_transaction(); @@ -170,16 +176,17 @@ function update_sales_order($order) deliver_to = " . db_escape($order->deliver_to) . ", delivery_address = " . db_escape($order->delivery_address) . ", contact_phone = " .db_escape($order->phone) . ", - contact_email = " .db_escape($order->email) . ", freight_cost = " .db_escape($order->freight_cost) .", from_stk_loc = " .db_escape($order->Location) .", delivery_date = " .db_escape($del_date). ", - version = ".($version+1)." - WHERE order_no=" . $order_no ." + version = ".($version+1).", + payment_terms = " .db_escape($order->payment). ", + total = ". db_escape($total) ." + WHERE order_no=" . db_escape($order_no) ." AND trans_type=".$order->trans_type." AND version=".$version; db_query($sql, "order Cannot be Updated, this can be concurrent edition conflict"); - $sql = "DELETE FROM ".TB_PREF."sales_order_details WHERE order_no =" . $order_no . " AND trans_type=".$order->trans_type; + $sql = "DELETE FROM ".TB_PREF."sales_order_details WHERE order_no =" . db_escape($order_no) . " AND trans_type=".$order->trans_type; db_query($sql, "Old order Cannot be Deleted"); @@ -238,7 +245,6 @@ function update_sales_order($order) } /* inserted line items into sales order details */ add_audit_trail($order->trans_type, $order_no, $order->document_date, _("Updated.")); - $Refs->delete($order->trans_type, $order_no); $Refs->save($order->trans_type, $order_no, $order->reference); commit_transaction(); if ($loc_notification == 1 && count($st_ids) > 0) @@ -267,48 +273,46 @@ function update_sales_order($order) function get_sales_order_header($order_no, $trans_type) { - $sql = "SELECT ".TB_PREF."sales_orders.*, " - .TB_PREF."debtors_master.name, " - .TB_PREF."debtors_master.curr_code, " - .TB_PREF."debtors_master.email AS master_email, " - .TB_PREF."locations.location_name, " - .TB_PREF."debtors_master.payment_terms, " - .TB_PREF."debtors_master.discount, " - .TB_PREF."sales_types.sales_type, " - .TB_PREF."sales_types.id AS sales_type_id, " - .TB_PREF."sales_types.tax_included, " - .TB_PREF."shippers.shipper_name, " - .TB_PREF."tax_groups.name AS tax_group_name , " - .TB_PREF."tax_groups.id AS tax_group_id - FROM ".TB_PREF."sales_orders, " - .TB_PREF."debtors_master, " - .TB_PREF."sales_types, " - .TB_PREF."tax_groups, " - .TB_PREF."cust_branch, " - .TB_PREF."locations, " - .TB_PREF."shippers - WHERE ".TB_PREF."sales_orders.order_type=".TB_PREF."sales_types.id - AND ".TB_PREF."cust_branch.branch_code = ".TB_PREF."sales_orders.branch_code - AND ".TB_PREF."cust_branch.tax_group_id = ".TB_PREF."tax_groups.id - AND ".TB_PREF."sales_orders.debtor_no = ".TB_PREF."debtors_master.debtor_no - AND ".TB_PREF."locations.loc_code = ".TB_PREF."sales_orders.from_stk_loc - AND ".TB_PREF."shippers.shipper_id = ".TB_PREF."sales_orders.ship_via - AND ".TB_PREF."sales_orders.trans_type = " . db_escape($trans_type) ." - AND ".TB_PREF."sales_orders.order_no = " . db_escape($order_no ); + $sql = "SELECT sorder.*, " + ."cust.name, " + ."cust.curr_code, " + ."loc.location_name, " + ."cust.discount, " + ."stype.sales_type, " + ."stype.id AS sales_type_id, " + ."stype.tax_included, " + ."ship.shipper_name, " + ."tax_group.name AS tax_group_name , " + ."tax_group.id AS tax_group_id " + ."FROM ".TB_PREF."sales_orders sorder, " + .TB_PREF."debtors_master cust," + .TB_PREF."sales_types stype, " + .TB_PREF."tax_groups tax_group, " + .TB_PREF."cust_branch branch," + .TB_PREF."locations loc, " + .TB_PREF."shippers ship + WHERE sorder.order_type=stype.id + AND branch.branch_code = sorder.branch_code + AND branch.tax_group_id = tax_group.id + AND sorder.debtor_no = cust.debtor_no + AND loc.loc_code = sorder.from_stk_loc + AND ship.shipper_id = sorder.ship_via + AND sorder.trans_type = " . db_escape($trans_type) ." + AND sorder.order_no = " . db_escape($order_no ); $result = db_query($sql, "order Retreival"); $num = db_num_rows($result); if ($num > 1) { - display_db_error("FATAL : sales order query returned a duplicate - " . db_num_rows($result), $sql, true); + display_warning("You have duplicate document in database: (type:$trans_type, number:$order_no)."); } else if ($num == 1) { return db_fetch($result); } else - display_db_error("FATAL : sales order return nothing - " . db_num_rows($result), $sql, true); + display_warning("You have missing or invalid sales document in database (type:$trans_type, number:$order_no)."); } @@ -335,6 +339,7 @@ function get_sales_order_details($order_no, $trans_type) { function read_sales_order($order_no, &$order, $trans_type) { + $myrow = get_sales_order_header($order_no, $trans_type); $order->trans_type = $myrow['trans_type']; @@ -342,10 +347,10 @@ function read_sales_order($order_no, &$order, $trans_type) $order->trans_no = array($order_no=> $myrow["version"]); $order->set_customer($myrow["debtor_no"], $myrow["name"], - $myrow["curr_code"], $myrow["discount"]); + $myrow["curr_code"], $myrow["discount"], $myrow["payment_terms"]); $order->set_branch($myrow["branch_code"], $myrow["tax_group_id"], - $myrow["tax_group_name"], $myrow["contact_phone"], $myrow["contact_email"]); + $myrow["tax_group_name"], $myrow["contact_phone"]); $order->set_sales_type($myrow["sales_type_id"], $myrow["sales_type"], $myrow["tax_included"], 0); // no default price calculations on edit @@ -384,7 +389,7 @@ function sales_order_has_deliveries($order_no) { $sql = "SELECT SUM(qty_sent) FROM ".TB_PREF. "sales_order_details WHERE order_no=".db_escape($order_no) - ." AND trans_type=".ST_SALESORDER.""; + ." AND trans_type=".ST_SALESORDER; $result = db_query($sql, "could not query for sales order usage"); @@ -404,28 +409,25 @@ function close_sales_order($order_no) // set the quantity of each item to the already sent quantity. this will mark item as closed. $sql = "UPDATE ".TB_PREF."sales_order_details SET quantity = qty_sent WHERE order_no = ".db_escape($order_no) - ." AND trans_type=".ST_SALESORDER.""; + ." AND trans_type=".ST_SALESORDER; db_query($sql, "The sales order detail record could not be updated"); } //--------------------------------------------------------------------------------------------------------------- -function get_invoice_duedate($debtorno, $invdate) +function get_invoice_duedate($terms, $invdate) { if (!is_date($invdate)) { return new_doc_date(); } - $sql = "SELECT ".TB_PREF."debtors_master.debtor_no, ".TB_PREF."debtors_master.payment_terms, ".TB_PREF."payment_terms.* FROM ".TB_PREF."debtors_master, - ".TB_PREF."payment_terms WHERE ".TB_PREF."debtors_master.payment_terms = ".TB_PREF."payment_terms.terms_indicator AND - ".TB_PREF."debtors_master.debtor_no = ".db_escape($debtorno); - - $result = db_query($sql,"The customer details could not be retrieved"); - $myrow = db_fetch($result); - - if (db_num_rows($result) == 0) + + $myrow = get_payment_terms($terms); + + if (!$myrow) return $invdate; + if ($myrow['day_in_following_month'] > 0) $duedate = add_days(end_month($invdate), $myrow['day_in_following_month']); else @@ -436,25 +438,29 @@ function get_invoice_duedate($debtorno, $invdate) function get_customer_to_order($customer_id) { // Now check to ensure this account is not on hold */ - $sql = "SELECT ".TB_PREF."debtors_master.name, " - .TB_PREF."debtors_master.address, " - .TB_PREF."credit_status.dissallow_invoices, " - .TB_PREF."debtors_master.sales_type AS salestype, " - .TB_PREF."debtors_master.dimension_id, " - .TB_PREF."debtors_master.dimension2_id, " - .TB_PREF."sales_types.sales_type, " - .TB_PREF."sales_types.tax_included, " - .TB_PREF."sales_types.factor, " - .TB_PREF."debtors_master.curr_code, " - .TB_PREF."debtors_master.discount," - .TB_PREF."debtors_master.pymt_discount - FROM ".TB_PREF."debtors_master, " + $sql = "SELECT cust.name, + cust.address, " + .TB_PREF."credit_status.dissallow_invoices, + cust.sales_type AS salestype, + cust.dimension_id, + cust.dimension2_id, + stype.sales_type, + stype.tax_included, + stype.factor, + cust.curr_code, + cust.discount, + cust.payment_terms, + cust.pymt_discount, + cust.credit_limit - Sum(IFNULL(IF(trans.type=11 OR trans.type=12 OR trans.type=2, + -1, 1) * (ov_amount + ov_gst + ov_freight + ov_freight_tax + ov_discount),0)) as cur_credit + FROM ".TB_PREF."debtors_master cust + LEFT JOIN ".TB_PREF."debtor_trans trans ON trans.type!=".ST_CUSTDELIVERY." AND trans.debtor_no = cust.debtor_no," .TB_PREF."credit_status, " - .TB_PREF."sales_types - WHERE ".TB_PREF."debtors_master.sales_type=" - .TB_PREF."sales_types.id - AND ".TB_PREF."debtors_master.credit_status=".TB_PREF."credit_status.id - AND ".TB_PREF."debtors_master.debtor_no = ".db_escape($customer_id); + .TB_PREF."sales_types stype + WHERE cust.sales_type=stype.id + AND cust.credit_status=".TB_PREF."credit_status.id + AND cust.debtor_no = ".db_escape($customer_id) + ." GROUP by cust.debtor_no"; $result =db_query($sql,"Customer Record Retreive"); return db_fetch($result); @@ -466,9 +472,7 @@ function get_branch_to_order($customer_id, $branch_id) { $sql = "SELECT ".TB_PREF."cust_branch.br_name, " .TB_PREF."cust_branch.br_address, " .TB_PREF."cust_branch.br_post_address, " - .TB_PREF."cust_branch.phone, " - .TB_PREF."cust_branch.email, - default_location, location_name, default_ship_via, " + ." default_location, location_name, default_ship_via, " .TB_PREF."tax_groups.name AS tax_group_name, " .TB_PREF."tax_groups.id AS tax_group_id FROM ".TB_PREF."cust_branch, " @@ -481,4 +485,85 @@ function get_branch_to_order($customer_id, $branch_id) { return db_query($sql,"Customer Branch Record Retreive"); } + +function get_sql_for_sales_orders_view($selected_customer, $trans_type) +{ + global $selected_stock_item; + + $sql = "SELECT + sorder.order_no, + sorder.reference, + debtor.name, + branch.br_name," + .($_POST['order_view_mode']=='InvoiceTemplates' + || $_POST['order_view_mode']=='DeliveryTemplates' ? + "sorder.comments, " : "sorder.customer_ref, ") + ."sorder.ord_date, + sorder.delivery_date, + sorder.deliver_to, + Sum(line.unit_price*line.quantity*(1-line.discount_percent))+freight_cost AS OrderValue, + sorder.type, + debtor.curr_code, + Sum(line.qty_sent) AS TotDelivered, + Sum(line.quantity) AS TotQuantity + FROM ".TB_PREF."sales_orders as sorder, " + .TB_PREF."sales_order_details as line, " + .TB_PREF."debtors_master as debtor, " + .TB_PREF."cust_branch as branch + WHERE sorder.order_no = line.order_no + AND sorder.trans_type = line.trans_type + AND sorder.trans_type = ".db_escape($trans_type)." + AND sorder.debtor_no = debtor.debtor_no + AND sorder.branch_code = branch.branch_code + AND debtor.debtor_no = branch.debtor_no"; + + if (isset($_POST['OrderNumber']) && $_POST['OrderNumber'] != "") + { + // search orders with number like + $number_like = "%".$_POST['OrderNumber']; + $sql .= " AND sorder.order_no LIKE ".db_escape($number_like) + ." GROUP BY sorder.order_no"; + } + elseif (isset($_POST['OrderReference']) && $_POST['OrderReference'] != "") + { + // search orders with reference like + $number_like = "%".$_POST['OrderReference']."%"; + $sql .= " AND sorder.reference LIKE ".db_escape($number_like) + ." GROUP BY sorder.order_no"; + } + else // ... or select inquiry constraints + { + if ($_POST['order_view_mode']!='DeliveryTemplates' && $_POST['order_view_mode']!='InvoiceTemplates') + { + $date_after = date2sql($_POST['OrdersAfterDate']); + $date_before = date2sql($_POST['OrdersToDate']); + + $sql .= " AND sorder.ord_date >= '$date_after'" + ." AND sorder.ord_date <= '$date_before'"; + } + if ($trans_type == ST_SALESQUOTE && !check_value('show_all')) + $sql .= " AND sorder.delivery_date >= '".date2sql(Today())."'"; + if ($selected_customer != -1) + $sql .= " AND sorder.debtor_no=".db_escape($selected_customer); + + if (isset($selected_stock_item)) + $sql .= " AND line.stk_code=".db_escape($selected_stock_item); + + if (isset($_POST['StockLocation']) && $_POST['StockLocation'] != ALL_TEXT) + $sql .= " AND sorder.from_stk_loc = ".db_escape($_POST['StockLocation']); + + if ($_POST['order_view_mode']=='OutstandingOnly') + $sql .= " AND line.qty_sent < line.quantity"; + elseif ($_POST['order_view_mode']=='InvoiceTemplates' || $_POST['order_view_mode']=='DeliveryTemplates') + $sql .= " AND sorder.type=1"; + + $sql .= " GROUP BY sorder.order_no, + sorder.debtor_no, + sorder.branch_code, + sorder.customer_ref, + sorder.ord_date, + sorder.deliver_to"; + } + return $sql; +} ?> \ No newline at end of file diff --git a/sales/includes/sales_db.inc b/sales/includes/sales_db.inc index cd5d9997..5e6913d1 100644 --- a/sales/includes/sales_db.inc +++ b/sales/includes/sales_db.inc @@ -17,6 +17,8 @@ include_once($path_to_root . "/sales/includes/db/sales_invoice_db.inc"); include_once($path_to_root . "/sales/includes/db/sales_delivery_db.inc"); include_once($path_to_root . "/sales/includes/db/sales_types_db.inc"); include_once($path_to_root . "/sales/includes/db/sales_points_db.inc"); +include_once($path_to_root . "/sales/includes/db/sales_groups_db.inc"); +include_once($path_to_root . "/sales/includes/db/recurrent_invoices_db.inc"); include_once($path_to_root . "/sales/includes/db/custalloc_db.inc"); include_once($path_to_root . "/sales/includes/db/cust_trans_db.inc"); include_once($path_to_root . "/sales/includes/db/cust_trans_details_db.inc"); @@ -172,7 +174,7 @@ function get_kit_price($item_code, $currency, $sales_type_id, $factor=null, $kit_price = get_price( $item_code, $currency, $sales_type_id, $factor, $date); - if ($kit_price !== false) { + if ($kit_price !== 0) { return $kit_price; } } @@ -194,68 +196,25 @@ function get_kit_price($item_code, $currency, $sales_type_id, $factor=null, return $kit_price; } -//----------------------------------------------------------------------------- - -function set_document_parent($cart) -{ - $inv_no = key($cart->trans_no); - - if (count($cart->src_docs) == 1) { - - // if this child document has only one parent - update child link - $src = array_keys($cart->src_docs); - $del_no = reset($src); - - $sql = 'UPDATE '.TB_PREF.'debtor_trans SET trans_link = ' . $del_no . - ' WHERE type='.db_escape($cart->trans_type).' AND trans_no='. $inv_no ; - db_query($sql, 'Child document link cannot be updated'); - - } - if ($cart->trans_type != ST_SALESINVOICE) - return 0; - - // the rest is batch invoice specific - - foreach ($cart->line_items as $line) { - if ($line->quantity != $line->qty_dispatched) { - return 1; // this is partial invoice - } - } - - $sql = 'UPDATE '.TB_PREF.'debtor_trans SET trans_link = ' . $inv_no . - ' WHERE type='.get_parent_type($cart->trans_type).' AND ('; - - $deliveries = array_keys($cart->src_docs); - - foreach ($deliveries as $key=>$del) - $deliveries[$key] = 'trans_no='.$del; - - $sql .= implode(' OR ', $deliveries) . ')'; - db_query($sql, 'Delivery links cannot be updated'); - - return 0; // batch or complete invoice -} - -//-------------------------------------------------------------------------------------------------- -function get_parent_type($type) -{ - $parent_types = array( ST_CUSTCREDIT => ST_SALESINVOICE, ST_SALESINVOICE => ST_CUSTDELIVERY, ST_CUSTDELIVERY => ST_SALESORDER ); - return isset($parent_types[$type]) ? $parent_types[$type] : 0; -} - //-------------------------------------------------------------------------------------------------- -function update_parent_line($doc_type, $line_id, $qty_dispatched) +function update_parent_line($doc_type, $line_id, $qty_dispatched, $auto=false) { $doc_type = get_parent_type($doc_type); + $qty_dispatched = (float)$qty_dispatched; + // echo "update line: $line_id, $doc_type, $qty_dispatched"; if ($doc_type==0) return false; else { if ($doc_type==ST_SALESORDER) + { $sql = "UPDATE ".TB_PREF."sales_order_details - SET qty_sent = qty_sent + $qty_dispatched - WHERE id=".db_escape($line_id); + SET qty_sent = qty_sent + $qty_dispatched"; + if ($auto) + $sql .= ", quantity = quantity + $qty_dispatched"; + $sql .= " WHERE id=".db_escape($line_id); + } else $sql = "UPDATE ".TB_PREF."debtor_trans_details SET qty_done = qty_done + $qty_dispatched @@ -308,14 +267,13 @@ function read_sales_trans($doc_type, $trans_no, &$cart) $cart->set_sales_type($myrow["tpe"], $myrow["sales_type"], $myrow["tax_included"],0); $cart->set_customer($myrow["debtor_no"], $myrow["DebtorName"], - $myrow["curr_code"], $myrow["discount"]); + $myrow["curr_code"], $myrow["discount"], $myrow["payment_terms"]); $cart->set_branch($myrow["branch_code"], $myrow["tax_group_id"], - $myrow["tax_group_name"], $myrow["phone"], $myrow["email"]); + $myrow["tax_group_name"]); $cart->reference = $myrow["reference"]; $cart->order_no = $myrow["order_"]; - $cart->trans_link = $myrow["trans_link"]; $cart->due_date = sql2date($myrow["due_date"]); $cart->document_date = sql2date($myrow["tran_date"]); $cart->dimension_id = $myrow['dimension_id']; // added 2.1 Joe Hunt 2008-11-12 @@ -344,7 +302,8 @@ function read_sales_trans($doc_type, $trans_no, &$cart) $myrow["stock_id"],$myrow["quantity"], $myrow["unit_price"], $myrow["discount_percent"], $myrow["qty_done"], $myrow["standard_cost"], - $myrow["StockDescription"],$myrow["id"], $myrow["debtor_trans_no"]); + $myrow["StockDescription"],$myrow["id"], $myrow["debtor_trans_no"], + @$myrow["src_id"]); } } } // !newdoc @@ -352,4 +311,99 @@ function read_sales_trans($doc_type, $trans_no, &$cart) return true; } //---------------------------------------------------------------------------------------- + +function get_sales_child_lines($trans_type, $trans_no, $lines=true) +{ + if (!($ctype = get_child_type($trans_type))) + return false; + if (!is_array($trans_no)) { + $trans_no = array($trans_no); + } + + $par_tbl = $trans_type == ST_SALESORDER ? "sales_order_details" : "debtor_trans_details"; + $par_no = $trans_type == ST_SALESORDER ? "trans.order_no" : "trans.debtor_trans_no"; + + foreach($trans_no as $n => $trans) { + $trans_no[$n] = db_escape($trans); + } + $sql = "SELECT child.* + FROM + ".TB_PREF."debtor_trans_details child + LEFT JOIN ".TB_PREF."$par_tbl trans + ON child.src_id=trans.id AND child.debtor_trans_type=$ctype + WHERE $par_no IN(". implode(',', array_values($trans_no)).")"; + + if (!$lines) + $sql .= " GROUP BY child.debtor_trans_no"; + + $sql .= " ORDER BY child.debtor_trans_no"; + + return db_query($sql, "can't retrieve child trans"); +} + +function get_sales_child_numbers($trans_type, $trans_no) +{ + $trans = array(); + $res = get_sales_child_lines($trans_type, $trans_no, false); + while ($line = db_fetch($res)) { + $trans[] = $line['debtor_trans_no']; + } + return $trans; +} + +function get_sales_parent_lines($trans_type, $trans_no, $lines=true) +{ + $partype = get_parent_type($trans_type); + + if (!$partype) + return false; + + $par_tbl = $partype == ST_SALESORDER ? "sales_order_details" : "debtor_trans_details"; + $par_no = $partype == ST_SALESORDER ? "parent.order_no" : "parent.debtor_trans_no"; + $sql = "SELECT parent.* + FROM + ".TB_PREF."$par_tbl parent + LEFT JOIN ".TB_PREF."debtor_trans_details trans + ON trans.src_id=parent.id + WHERE + trans.debtor_trans_type=".db_escape($trans_type) + ." AND trans.debtor_trans_no=".db_escape($trans_no); + if (!$lines) + $sql .= " GROUP BY $par_no"; + + $sql .= " ORDER BY $par_no"; + + return db_query($sql, "can't retrieve child trans"); + +} + +function get_sales_parent_numbers($trans_type, $trans_no) +{ + $trans = array(); + $res = get_sales_parent_lines($trans_type, $trans_no, false); + while ($line = db_fetch($res)) + $trans[] = $line[$trans_type==ST_CUSTDELIVERY ? 'order_no' : 'debtor_trans_no']; + return $trans; +} + +//---------------------------------------------------------------------------------------- + +function get_sales_child_documents($trans_type, $trans_no) +{ + // FIXME - credit notes retrieved here should be those linked to invoices containing + // at least one line from related invoice + + if (!count($trans_no)) + return false; + $childs = get_sales_child_numbers($trans_type, $trans_no, false); + if (!count($childs)) + return false; + + $sql = "SELECT * FROM ".TB_PREF."debtor_trans + WHERE type=".get_child_type($trans_type)." AND trans_no IN(". implode(',', array_values($childs)).")"; + + return db_query($sql,"The related credit notes could not be retreived"); +} + + ?> \ No newline at end of file diff --git a/sales/includes/sales_ui.inc b/sales/includes/sales_ui.inc index 7e7f7afd..8e2048cf 100644 --- a/sales/includes/sales_ui.inc +++ b/sales/includes/sales_ui.inc @@ -19,12 +19,14 @@ include_once($path_to_root . "/includes/banking.inc"); // function processing_start() { + page_processing(false); processing_end(); $_SESSION['Processing'] = $_SERVER['PHP_SELF']; } function processing_end() { + page_processing(true); unset($_SESSION['Processing']); if ( isset($_SESSION['Items']) ) { unset($_SESSION['Items']->line_items); diff --git a/sales/includes/ui/sales_credit_ui.inc b/sales/includes/ui/sales_credit_ui.inc index 6f281c6f..ac9c932f 100644 --- a/sales/includes/ui/sales_credit_ui.inc +++ b/sales/includes/ui/sales_credit_ui.inc @@ -15,9 +15,9 @@ include_once($path_to_root . "/includes/ui.inc"); function display_credit_header(&$order) { - global $table_style, $Ajax, $Refs; + global $Ajax, $Refs; - start_outer_table("width=80% $table_style"); + start_outer_table(TABLESTYLE, "width=80%"); table_section(1); $customer_error = ""; @@ -80,11 +80,11 @@ function display_credit_header(&$order) set_global_customer($_POST['customer_id']); if (!isset($_POST['ref'])) - $_POST['ref'] = $Refs->get_next(11); + $_POST['ref'] = $Refs->get_next(ST_CUSTCREDIT); if ($order->trans_no==0) ref_row(_("Reference").':', 'ref'); else - label_row(_("Reference").':', $_POST['ref'] ); + label_row(_("Reference").':', $order->reference); if (!is_company_currency($order->customer_currency)) @@ -159,11 +159,11 @@ function display_credit_header(&$order) function display_credit_items($title, &$order) { - global $table_style, $path_to_root; + global $path_to_root; display_heading($title); div_start('items_table'); - start_table("$table_style width=90%"); + start_table(TABLESTYLE, "width=90%"); $th = array(_("Item Code"), _("Item Description"), _("Quantity"), _("Unit"), _("Price"), _("Discount %"), _("Total"),''); @@ -247,10 +247,11 @@ function credit_edit_item_controls(&$order, $rowcounter, $line_no=-1) if ($line_no!=-1 && $line_no == $id) { $_POST['stock_id'] = $order->line_items[$id]->stock_id; + $dec = get_qty_dec($_POST['stock_id']); $_POST['qty'] = qty_format($order->line_items[$id]->qty_dispatched, $_POST['stock_id'], $dec); $_POST['price'] = price_format($order->line_items[$id]->price); $_POST['Disc'] = percent_format(($order->line_items[$id]->discount_percent)*100); - $_POST['units'] = $order->line_items[$id]->units; + $units = $order->line_items[$id]->units; hidden('stock_id', $_POST['stock_id']); label_cell($_POST['stock_id']); label_cell($order->line_items[$id]->item_description, "nowrap"); @@ -269,21 +270,23 @@ function credit_edit_item_controls(&$order, $rowcounter, $line_no=-1) $dec = $item_info['decimals']; $_POST['qty'] = number_format2(0, $dec); - $_POST['units'] = $item_info["units"]; - $_POST['price'] = price_format(get_price($_POST['stock_id'], $order->customer_currency, - $order->sales_type, $order->price_factor, $order->document_date)); - + $units = $item_info["units"]; + $price = get_price($_POST['stock_id'], + $order->customer_currency, $order->sales_type, + $order->price_factor, get_post('OrderDate')); + $_POST['price'] = price_format($price); + // default to the customer's discount % $_POST['Disc'] = percent_format($order->default_discount * 100); } qty_cells(null, 'qty', $_POST['qty'], null, null, $dec); - label_cell($_POST['units']); - amount_cells(null, 'price', null); - small_amount_cells(null, 'Disc', percent_format(0), null, null, user_percent_dec()); + label_cell($units, '', 'units'); + amount_cells(null, 'price'); + small_amount_cells(null, 'Disc', percent_format($_POST['Disc']), null, null, user_percent_dec()); - amount_cell(input_num('qty') * input_num('price') * (1 - input_num('Disc')/100)); + amount_cell(input_num('qty') * input_num('price') * (1 - input_num('Disc')/100), false, '', 'line_total'); if ($id!=-1) { @@ -308,14 +311,14 @@ function credit_edit_item_controls(&$order, $rowcounter, $line_no=-1) function credit_options_controls($credit) { - global $table_style2, $Ajax; - echo "
"; + global $Ajax; + br(); -if (isset($_POST['_CreditType_update'])) - $Ajax->activate('options'); + if (isset($_POST['_CreditType_update'])) + $Ajax->activate('options'); - div_start('options'); - start_table("$table_style2"); + div_start('options'); + start_table(TABLESTYLE2); credit_type_list_row(_("Credit Note Type"), 'CreditType', null, true); diff --git a/sales/includes/ui/sales_order_ui.inc b/sales/includes/ui/sales_order_ui.inc index de12daf9..fbb669fd 100644 --- a/sales/includes/ui/sales_order_ui.inc +++ b/sales/includes/ui/sales_order_ui.inc @@ -13,7 +13,7 @@ include_once($path_to_root . "/sales/includes/cart_class.inc"); include_once($path_to_root . "/includes/manufacturing.inc"); //-------------------------------------------------------------------------------- -function add_to_order(&$order, $new_item, $new_item_qty, $price, $discount) +function add_to_order(&$order, $new_item, $new_item_qty, $price, $discount, $description='') { // calculate item price to sum of kit element prices factor for // value distribution over all exploded kit items @@ -47,7 +47,7 @@ function add_to_order(&$order, $new_item, $new_item_qty, $price, $discount) if (!$item['is_foreign'] && $item['item_code'] != $item['stock_id']) { // this is sales kit - recurse add_to_order($order, $item['stock_id'], $new_item_qty*$item['quantity'], - $item_price, $discount, $std_price); + $item_price, $discount); } else { // stock item record eventually with foreign code @@ -63,9 +63,10 @@ function add_to_order(&$order, $new_item, $new_item_qty, $price, $discount) } } $order->add_to_cart (count($order->line_items), $item['stock_id'], - $new_item_qty*$item['quantity'], $item_price, $discount); + $new_item_qty*$item['quantity'], $item_price, $discount, 0,0, $description); } } + } //--------------------------------------------------------------------------------- @@ -83,12 +84,14 @@ function get_customer_details_to_order(&$order, $customer_id, $branch_id) $deliver = $myrow['address']; // in case no branch address use company address $order->set_customer($customer_id, $name, $myrow['curr_code'], - $myrow['discount'], $myrow['pymt_discount']); + $myrow['discount'], $myrow['payment_terms'], $myrow['pymt_discount']); // the sales type determines the price list to be used by default $order->set_sales_type($myrow['salestype'], $myrow['sales_type'], $myrow['tax_included'], $myrow['factor']); + $order->credit = $myrow['cur_credit']; + if ($order->trans_type != ST_SALESORDER && $order->trans_type != ST_SALESQUOTE) { $order->dimension_id = $myrow['dimension_id']; @@ -103,24 +106,22 @@ function get_customer_details_to_order(&$order, $customer_id, $branch_id) $myrow = db_fetch($result); + // FIX - implement editable contact selector in sales order + $contact = get_branch_contacts($branch_id, 'order', $customer_id); + $order->set_branch($branch_id, $myrow["tax_group_id"], - $myrow["tax_group_name"], $myrow["phone"], $myrow["email"]); + $myrow["tax_group_name"], @$contact[0]["phone"], @$contact[0]["email"]); $address = trim($myrow["br_post_address"]) != '' ? $myrow["br_post_address"] : (trim($myrow["br_address"]) != '' ? $myrow["br_address"]:$deliver); $order->set_delivery($myrow["default_ship_via"], $myrow["br_name"], $address); - if ($order->trans_type == ST_SALESINVOICE) { - $order->due_date = get_invoice_duedate($customer_id, $order->document_date); - if ($order->pos != -1) - $order->cash = date_diff2($order->due_date, Today(), 'd')<2; + if ($order->trans_type == ST_SALESINVOICE || $order->trans_type == ST_SALESORDER) { + $order->due_date = get_invoice_duedate($order->payment, $order->document_date); } - if($order->cash ) { - if($order->pos != -1) { - $paym = get_sales_point($order->pos); - $order->set_location($paym["pos_location"], $paym["location_name"]); - } + if($order->payment_terms['cash_sale']) { + $order->set_location($order->pos["pos_location"], $order->pos["location_name"]); } else $order->set_location($myrow["default_location"], $myrow["location_name"]); @@ -131,15 +132,15 @@ function get_customer_details_to_order(&$order, $customer_id, $branch_id) function display_order_summary($title, &$order, $editable_items=false) { - global $table_style, $path_to_root, $SysPrefs; + global $SysPrefs; display_heading($title); div_start('items_table'); - start_table("$table_style colspan=7 width=90%"); + start_table(TABLESTYLE, "colspan=7 width=90%"); $th = array(_("Item Code"), _("Item Description"), _("Quantity"), _("Delivered"), - _("Unit"), _("Price"), _("Discount %"), _("Total"), ""); + _("Unit"), $order->tax_included ? _("Price after Tax") : _("Price before Tax"), _("Discount %"), _("Total"), ""); if ($order->trans_no == 0) { unset( $th[3] ); @@ -234,7 +235,7 @@ function display_order_summary($title, &$order, $editable_items=false) start_row(); label_cells(_("Amount Total"), $display_total, "colspan=$colspan align=right","align=right"); - submit_cells('update', _("Update"), "colspan=2", _("Refresh"), true); + submit_cells('update', _("Update"), "colspan=2 align='center'", _("Refresh"), true); end_row(); end_table(); @@ -249,11 +250,11 @@ function display_order_summary($title, &$order, $editable_items=false) // ------------------------------------------------------------------------------ -function display_order_header(&$order, $editable, $date_text, $display_tax_group=false) +function display_order_header(&$order, $editable, $date_text) { - global $table_style2, $Ajax, $SysPrefs; + global $Ajax, $SysPrefs; - start_outer_table("width=80% $table_style2"); + start_outer_table(TABLESTYLE2, "width=80%"); table_section(1); @@ -287,7 +288,7 @@ function display_order_header(&$order, $editable, $date_text, $display_tax_group if( ($order->customer_id != get_post('customer_id', -1)) || ($order->Branch != get_post('branch_id', -1)) || - list_updated('customer_id')) + list_updated('customer_id')) { if (!isset($_POST['branch_id']) || $_POST['branch_id'] == "") @@ -310,10 +311,23 @@ function display_order_header(&$order, $editable, $date_text, $display_tax_group $_POST['deliver_to'] = $order->deliver_to; $_POST['delivery_address'] = $order->delivery_address; $_POST['phone'] = $order->phone; - if (get_post('cash') !== $order->cash) { - $_POST['cash'] = $order->cash; + $_POST['delivery_date'] = $order->due_date; + + if (!in_array($order->trans_type, array(ST_SALESQUOTE, ST_SALESORDER)) + && ($order->pos['cash_sale'] != $order->pos['credit_sale']) + && (($order->payment_terms['cash_sale'] && !$order->pos['cash_sale']) || + (!$order->payment_terms['cash_sale'] && !$order->pos['credit_sale']))) { + // force payment terms refresh if terms are editable + // and pos have no permitions for terms selected in customer record. + // Terms are set to first terms in allowed category below. + display_warning( + sprintf(_("Customer's payment terms '%s' cannot be selected on this POS"), + $order->payment_terms['terms'])); + $order->payment = ''; + } elseif (get_post('payment') !== $order->payment) { + $_POST['payment'] = $order->payment; $Ajax->activate('delivery'); - $Ajax->activate('cash'); + $Ajax->activate('payment'); } else { if ($order->trans_type == ST_SALESINVOICE) { @@ -359,35 +373,44 @@ function display_order_header(&$order, $editable, $date_text, $display_tax_group ref_row(_("Reference").':', 'ref', _('Reference number unique for this document type'), null, ''); + table_section(2); + if (!is_company_currency($order->customer_currency)) { - table_section(2); - label_row(_("Customer Currency:"), $order->customer_currency); exchange_rate_display($order->customer_currency, get_company_currency(), ($editable ? $_POST['OrderDate'] : $order->document_date)); } - table_section(3); - if ($order->trans_type == ST_SALESINVOICE && $order->pos != -1) { - sale_payment_list_cells(_('Payment:'), 'cash', null, true); - $cash_payment = get_post('cash', 0); - // current user can issue both credit and cash invoices - if ($order->cash != $cash_payment) { - $order->cash = $cash_payment; - if ($cash_payment) { - $paym = get_sales_point(user_pos()); - $order->cash_account = $paym['pos_account']; - $order->account_name = $paym['bank_account_name']; - $_POST['Location'] = $order->Location = $paym['pos_location']; - $order->location_name = $paym['location_name']; + customer_credit_row($_POST['customer_id'], $order->credit); + + label_row(_("Customer Discount:"), ($order->default_discount * 100) . "%"); + + table_section(3); + if ($order->pos['cash_sale'] || $order->pos['credit_sale']) { + // editable payment type + if (get_post('payment') !== $order->payment) { + $order->payment = get_post('payment'); + $order->payment_terms = get_payment_terms($order->payment); + $order->due_date = get_invoice_duedate($order->payment, $order->document_date); + if ($order->payment_terms['cash_sale']) { + $order->cash_account = $order->pos['pos_account']; + $order->account_name = $order->pos['bank_account_name']; + $_POST['Location'] = $order->Location = $order->pos['pos_location']; + $order->location_name = $order->pos['location_name']; } $Ajax->activate('items_table'); $Ajax->activate('delivery'); - set_focus($order->pos == -1 ? 'delivery_date' : 'account'); } - } else - hidden('cash', $order->cash); + $paymcat = !$order->pos['cash_sale'] ? PM_CREDIT : + (!$order->pos['credit_sale'] ? PM_CASH : PM_ANY); + // all terms are available for SO + sale_payment_list_cells(_('Payment:'), 'payment', + (in_array($order->trans_type, array(ST_SALESQUOTE, ST_SALESORDER)) + ? PM_ANY : $paymcat), null); + } else { + label_cells(_('Payment:'), $order->payment_terms['terms']); + } if($editable) { $str = sales_types_list_row(_("Price List"), 'sales_type', null, true); @@ -402,8 +425,6 @@ function display_order_header(&$order, $editable, $date_text, $display_tax_group $change_prices = 1; } - label_row(_("Customer Discount:"), ($order->default_discount * 100) . "%"); - table_section(4); if ($editable) @@ -413,14 +434,14 @@ function display_order_header(&$order, $editable, $date_text, $display_tax_group date_row($date_text, 'OrderDate', _('Date of order receive'), $order->trans_no==0, 0, 0, 0, null, true); - if (isset($_POST['_OrderDate_changed'])) { + if (isset($_POST['_OrderDate_changed']) || list_updated('payment')) { if (!is_company_currency($order->customer_currency) && (get_base_sales_type()>0)) { $change_prices = 1; } $Ajax->activate('_ex_rate'); if ($order->trans_type == ST_SALESINVOICE) { - $_POST['delivery_date'] = get_invoice_duedate(get_post('customer_id'), get_post('OrderDate')); + $_POST['delivery_date'] = get_invoice_duedate(get_post('payment'), get_post('OrderDate')); } else $_POST['delivery_date'] = add_days(get_post('OrderDate'), $SysPrefs->default_delivery_required_by()); $Ajax->activate('items_table'); @@ -447,12 +468,6 @@ function display_order_header(&$order, $editable, $date_text, $display_tax_group hidden('OrderDate', $order->document_date); } - if ($display_tax_group) - { - label_row(_("Tax Group:"), $order->tax_group_name); - hidden('tax_group_id', $order->tax_group_id); - } - end_outer_table(1); // outer table if ($change_prices != 0) { @@ -484,11 +499,19 @@ function sales_order_item_controls(&$order, &$rowcounter, $line_no=-1) $_POST['qty'] = number_format2($order->line_items[$id]->qty_dispatched, $dec); $_POST['price'] = price_format($order->line_items[$id]->price); $_POST['Disc'] = percent_format($order->line_items[$id]->discount_percent*100); - $_POST['item_description'] = $order->line_items[$id]->item_description; $units = $order->line_items[$id]->units; + $_POST['item_description'] = $order->line_items[$id]->item_description; hidden('stock_id', $_POST['stock_id']); label_cell($_POST['stock_id']); - text_cells(null,'item_description', null, 45, 150); + if ($order->line_items[$id]->descr_editable) + text_cells(null,'item_description', null, 45, 150); + else { + hidden('item_description', $_POST['item_description']); + label_cell($_POST['item_description']); + } +// } else { +// sales_items_list_cells(null,'item_description', null, false, true); +// } //label_cell($order->line_items[$line_no]->item_description, "nowrap"); $Ajax->activate('items_table'); } @@ -522,7 +545,7 @@ function sales_order_item_controls(&$order, &$rowcounter, $line_no=-1) label_cell($units, '', 'units'); - $str = amount_cells(null, 'price'); + amount_cells(null, 'price'); small_amount_cells(null, 'Disc', percent_format($_POST['Disc']), null, null, user_percent_dec()); @@ -541,7 +564,7 @@ function sales_order_item_controls(&$order, &$rowcounter, $line_no=-1) } else { - submit_cells('AddItem', _("Add Item"), "colspan=2", + submit_cells('AddItem', _("Add Item"), "colspan=2 align='center'", _('Add new item to document'), true); } @@ -552,22 +575,21 @@ function sales_order_item_controls(&$order, &$rowcounter, $line_no=-1) function display_delivery_details(&$order) { - global $table_style2, $Ajax; + global $Ajax; div_start('delivery'); - if (get_post('cash', 0)) { // Direct payment sale + + if ($order->payment_terms['cash_sale']) { // Direct payment sale $Ajax->activate('items_table'); display_heading(_('Cash payment')); - start_table("$table_style2 width=60%"); - label_row(_("Deliver from Location:"), $order->location_name); + start_table(TABLESTYLE2, "width=60%"); - hidden('Location', $order->Location); + locations_list_row(_("Deliver from Location:"), 'Location', null, false, true); label_row(_("Cash account:"), $order->account_name); textarea_row(_("Comments:"), "Comments", $order->Comments, 31, 5); end_table(); } else { - if ($order->trans_type==ST_SALESINVOICE) { $title = _("Delivery Details"); @@ -589,17 +611,17 @@ function display_delivery_details(&$order) $delname = _("Required Delivery Date").':'; } display_heading($title); - start_outer_table("$table_style2 width=90%"); + start_outer_table(TABLESTYLE2, "width=90%"); table_section(1); - locations_list_row(_("Deliver from Location:"), 'Location', null, - false, true); + locations_list_row(_("Deliver from Location:"), 'Location', null, false, true); if (list_updated('Location')) $Ajax->activate('items_table'); date_row($delname, 'delivery_date', - $order->trans_type==ST_SALESORDER ? _('Enter requested day of delivery') : $order->trans_type==ST_SALESQUOTE ? _('Enter Valid until Date') : ''); + $order->trans_type==ST_SALESORDER ? _('Enter requested day of delivery') + : $order->trans_type==ST_SALESQUOTE ? _('Enter Valid until Date') : ''); text_row(_("Deliver To:"), 'deliver_to', $order->deliver_to, 40, 40, _('Additional identifier for delivery e.g. name of receiving person')); diff --git a/sales/inquiry/customer_allocation_inquiry.php b/sales/inquiry/customer_allocation_inquiry.php index 84e5416f..f32bd6cb 100644 --- a/sales/inquiry/customer_allocation_inquiry.php +++ b/sales/inquiry/customer_allocation_inquiry.php @@ -36,7 +36,7 @@ if (!isset($_POST['customer_id'])) start_form(); -start_table("class='tablestyle_noborder'"); +start_table(TABLESTYLE_NOBORDER); start_row(); customer_list_cells(_("Select a customer: "), 'customer_id', $_POST['customer_id'], true); @@ -133,70 +133,8 @@ function fmt_credit($row) } //------------------------------------------------------------------------------------------------ - $data_after = date2sql($_POST['TransAfterDate']); - $date_to = date2sql($_POST['TransToDate']); - - $sql = "SELECT - trans.type, - trans.trans_no, - trans.reference, - trans.order_, - trans.tran_date, - trans.due_date, - debtor.name, - debtor.curr_code, - (trans.ov_amount + trans.ov_gst + trans.ov_freight - + trans.ov_freight_tax + trans.ov_discount) AS TotalAmount, - trans.alloc AS Allocated, - ((trans.type = ".ST_SALESINVOICE.") - AND trans.due_date < '" . date2sql(Today()) . "') AS OverDue - FROM " - .TB_PREF."debtor_trans as trans, " - .TB_PREF."debtors_master as debtor - WHERE debtor.debtor_no = trans.debtor_no - AND (trans.ov_amount + trans.ov_gst + trans.ov_freight - + trans.ov_freight_tax + trans.ov_discount != 0) - AND trans.tran_date >= '$data_after' - AND trans.tran_date <= '$date_to'"; - - if ($_POST['customer_id'] != ALL_TEXT) - $sql .= " AND trans.debtor_no = ".db_escape($_POST['customer_id']); - - if (isset($_POST['filterType']) && $_POST['filterType'] != ALL_TEXT) - { - if ($_POST['filterType'] == '1' || $_POST['filterType'] == '2') - { - $sql .= " AND trans.type = ".ST_SALESINVOICE." "; - } - elseif ($_POST['filterType'] == '3') - { - $sql .= " AND trans.type = " . ST_CUSTPAYMENT; - } - elseif ($_POST['filterType'] == '4') - { - $sql .= " AND trans.type = ".ST_CUSTCREDIT." "; - } - - if ($_POST['filterType'] == '2') - { - $today = date2sql(Today()); - $sql .= " AND trans.due_date < '$today' - AND (round(abs(trans.ov_amount + " - ."trans.ov_gst + trans.ov_freight + " - ."trans.ov_freight_tax + trans.ov_discount) - trans.alloc,6) > 0) "; - } - }else - { - $sql .= " AND trans.type <> ".ST_CUSTDELIVERY." "; - } - - - if (!check_value('showSettled')) - { - $sql .= " AND (round(abs(trans.ov_amount + trans.ov_gst + " - ."trans.ov_freight + trans.ov_freight_tax + " - ."trans.ov_discount) - trans.alloc,6) != 0) "; - } +$sql = get_sql_for_customer_allocation_inquiry(); + //------------------------------------------------------------------------------------------------ $cols = array( diff --git a/sales/inquiry/customer_inquiry.php b/sales/inquiry/customer_inquiry.php index 426e135b..92c640d4 100644 --- a/sales/inquiry/customer_inquiry.php +++ b/sales/inquiry/customer_inquiry.php @@ -23,7 +23,7 @@ if ($use_popup_windows) $js .= get_js_open_window(900, 500); if ($use_date_picker) $js .= get_js_date_picker(); -page(_($help_context = "Customer Transactions"), false, false, "", $js); +page(_($help_context = "Customer Transactions"), isset($_GET['customer_id']), false, "", $js); if (isset($_GET['customer_id'])) @@ -38,7 +38,7 @@ start_form(); if (!isset($_POST['customer_id'])) $_POST['customer_id'] = get_global_customer(); -start_table("class='tablestyle_noborder'"); +start_table(TABLESTYLE_NOBORDER); start_row(); customer_list_cells(_("Select a customer: "), 'customer_id', null, true); @@ -61,8 +61,6 @@ set_global_customer($_POST['customer_id']); function display_customer_summary($customer_record) { - global $table_style; - $past1 = get_company_pref('past_due_days'); $past2 = 2 * $past1; if ($customer_record["dissallow_invoices"] != 0) @@ -74,7 +72,7 @@ function display_customer_summary($customer_record) $pastdue1 = $past1 + 1 . "-" . $past2 . " " . _('Days'); $pastdue2 = _('Over') . " " . $past2 . " " . _('Days'); - start_table("width=80% $table_style"); + start_table(TABLESTYLE, "width=80%"); $th = array(_("Currency"), _("Terms"), _("Current"), $nowdue, $pastdue1, $pastdue2, _("Total Balance")); table_header($th); @@ -156,11 +154,9 @@ function fmt_credit($row) function credit_link($row) { - return $row['type'] == ST_SALESINVOICE && $row["TotalAmount"] - $row["Allocated"] > 0 ? - pager_link(_("Credit This"), - "/sales/customer_credit_invoice.php?InvoiceNumber=". - $row['trans_no'], ICON_CREDIT) - : ''; + return $row['type'] == ST_SALESINVOICE && $row["Outstanding"] > 0 ? + pager_link(_("Credit This") , + "/sales/customer_credit_invoice.php?InvoiceNumber=". $row['trans_no'], ICON_CREDIT):''; } function edit_link($row) @@ -193,10 +189,12 @@ function edit_link($row) function prt_link($row) { - if ($row['type'] != ST_CUSTPAYMENT && $row['type'] != ST_BANKDEPOSIT) // customer payment or bank deposit printout not defined yet. - return print_document_link($row['trans_no']."-".$row['type'], _("Print"), true, $row['type'], ICON_PRINT); - else + if ($row['type'] == ST_CUSTPAYMENT || $row['type'] == ST_BANKDEPOSIT) return print_document_link($row['trans_no']."-".$row['type'], _("Print Receipt"), true, ST_CUSTPAYMENT, ICON_PRINT); + elseif ($row['type'] == ST_BANKPAYMENT) // bank payment printout not defined yet. + return ''; + else + return print_document_link($row['trans_no']."-".$row['type'], _("Print"), true, $row['type'], ICON_PRINT); } function check_overdue($row) @@ -205,75 +203,7 @@ function check_overdue($row) && (abs($row["TotalAmount"]) - $row["Allocated"] != 0); } //------------------------------------------------------------------------------------------------ - $date_after = date2sql($_POST['TransAfterDate']); - $date_to = date2sql($_POST['TransToDate']); - - $sql = "SELECT - trans.type, - trans.trans_no, - trans.order_, - trans.reference, - trans.tran_date, - trans.due_date, - debtor.name, - branch.br_name, - debtor.curr_code, - (trans.ov_amount + trans.ov_gst + trans.ov_freight - + trans.ov_freight_tax + trans.ov_discount) AS TotalAmount, "; - if ($_POST['filterType'] != ALL_TEXT) - $sql .= "@bal := @bal+(trans.ov_amount + trans.ov_gst + trans.ov_freight + trans.ov_freight_tax + trans.ov_discount), "; - -// else -// $sql .= "IF(trans.type=".ST_CUSTDELIVERY.",'', IF(trans.type=".ST_SALESINVOICE." OR trans.type=".ST_BANKPAYMENT.",@bal := @bal+ -// (trans.ov_amount + trans.ov_gst + trans.ov_freight + trans.ov_freight_tax + trans.ov_discount), @bal := @bal- -// (trans.ov_amount + trans.ov_gst + trans.ov_freight + trans.ov_freight_tax + trans.ov_discount))) , "; - $sql .= "trans.alloc AS Allocated, - ((trans.type = ".ST_SALESINVOICE.") - AND trans.due_date < '" . date2sql(Today()) . "') AS OverDue - FROM " - .TB_PREF."debtor_trans as trans, " - .TB_PREF."debtors_master as debtor, " - .TB_PREF."cust_branch as branch - WHERE debtor.debtor_no = trans.debtor_no - AND trans.tran_date >= '$date_after' - AND trans.tran_date <= '$date_to' - AND trans.branch_code = branch.branch_code"; - - if ($_POST['customer_id'] != ALL_TEXT) - $sql .= " AND trans.debtor_no = ".db_escape($_POST['customer_id']); - - if ($_POST['filterType'] != ALL_TEXT) - { - if ($_POST['filterType'] == '1') - { - $sql .= " AND (trans.type = ".ST_SALESINVOICE." OR trans.type = ".ST_BANKPAYMENT.") "; - } - elseif ($_POST['filterType'] == '2') - { - $sql .= " AND (trans.type = ".ST_SALESINVOICE.") "; - } - elseif ($_POST['filterType'] == '3') - { - $sql .= " AND (trans.type = " . ST_CUSTPAYMENT - ." OR trans.type = ".ST_BANKDEPOSIT.") "; - } - elseif ($_POST['filterType'] == '4') - { - $sql .= " AND trans.type = ".ST_CUSTCREDIT." "; - } - elseif ($_POST['filterType'] == '5') - { - $sql .= " AND trans.type = ".ST_CUSTDELIVERY." "; - } - - if ($_POST['filterType'] == '2') - { - $today = date2sql(Today()); - $sql .= " AND trans.due_date < '$today' - AND (trans.ov_amount + trans.ov_gst + trans.ov_freight_tax + - trans.ov_freight + trans.ov_discount - trans.alloc > 0) "; - } - } +$sql = get_sql_for_customer_inquiry(); //------------------------------------------------------------------------------------------------ db_query("set @bal:=0"); diff --git a/sales/inquiry/sales_deliveries_view.php b/sales/inquiry/sales_deliveries_view.php index e65602bf..5a29b434 100644 --- a/sales/inquiry/sales_deliveries_view.php +++ b/sales/inquiry/sales_deliveries_view.php @@ -98,13 +98,18 @@ if (get_post('_DeliveryNumber_changed')) start_form(false, false, $_SERVER['PHP_SELF'] ."?OutstandingOnly=".$_POST['OutstandingOnly']); -start_table("class='tablestyle_noborder'"); +start_table(TABLESTYLE_NOBORDER); start_row(); ref_cells(_("#:"), 'DeliveryNumber', '',null, '', true); date_cells(_("from:"), 'DeliveryAfterDate', '', null, -30); date_cells(_("to:"), 'DeliveryToDate', '', null, 1); locations_list_cells(_("Location:"), 'StockLocation', null, true); +end_row(); + +end_table(); +start_table(TABLESTYLE_NOBORDER); +start_row(); stock_items_list_cells(_("Item:"), 'SelectStockFromList', null, true); @@ -114,7 +119,7 @@ hidden('OutstandingOnly', $_POST['OutstandingOnly']); end_row(); -end_table(); +end_table(1); //--------------------------------------------------------------------------------------------- if (isset($_POST['SelectStockFromList']) && ($_POST['SelectStockFromList'] != "") && @@ -124,7 +129,7 @@ if (isset($_POST['SelectStockFromList']) && ($_POST['SelectStockFromList'] != "" } else { - unset($selected_stock_item); + $selected_stock_item = null; } //--------------------------------------------------------------------------------------------- @@ -168,62 +173,7 @@ function check_overdue($row) $row["Outstanding"]!=0; } //------------------------------------------------------------------------------------------------ -$sql = "SELECT trans.trans_no, - debtor.name, - branch.branch_code, - branch.br_name, - sorder.deliver_to, - trans.reference, - sorder.customer_ref, - trans.tran_date, - trans.due_date, - (ov_amount+ov_gst+ov_freight+ov_freight_tax) AS DeliveryValue, - debtor.curr_code, - Sum(line.quantity-line.qty_done) AS Outstanding, - Sum(line.qty_done) AS Done - FROM " - .TB_PREF."sales_orders as sorder, " - .TB_PREF."debtor_trans as trans, " - .TB_PREF."debtor_trans_details as line, " - .TB_PREF."debtors_master as debtor, " - .TB_PREF."cust_branch as branch - WHERE - sorder.order_no = trans.order_ AND - trans.debtor_no = debtor.debtor_no - AND trans.type = ".ST_CUSTDELIVERY." - AND line.debtor_trans_no = trans.trans_no - AND line.debtor_trans_type = trans.type - AND trans.branch_code = branch.branch_code - AND trans.debtor_no = branch.debtor_no "; - -if ($_POST['OutstandingOnly'] == true) { - $sql .= " AND line.qty_done < line.quantity "; -} - -//figure out the sql required from the inputs available -if (isset($_POST['DeliveryNumber']) && $_POST['DeliveryNumber'] != "") -{ - $delivery = "%".$_POST['DeliveryNumber']; - $sql .= " AND trans.trans_no LIKE ".db_escape($delivery); - $sql .= " GROUP BY trans.trans_no"; -} -else -{ - $sql .= " AND trans.tran_date >= '".date2sql($_POST['DeliveryAfterDate'])."'"; - $sql .= " AND trans.tran_date <= '".date2sql($_POST['DeliveryToDate'])."'"; - - if ($selected_customer != -1) - $sql .= " AND trans.debtor_no=".db_escape($selected_customer)." "; - - if (isset($selected_stock_item)) - $sql .= " AND line.stock_id=".db_escape($selected_stock_item)." "; - - if (isset($_POST['StockLocation']) && $_POST['StockLocation'] != ALL_TEXT) - $sql .= " AND sorder.from_stk_loc = ".db_escape($_POST['StockLocation'])." "; - - $sql .= " GROUP BY trans.trans_no "; - -} //end no delivery number selected +$sql = get_sql_for_sales_deliveries_view($selected_customer, $selected_stock_item); $cols = array( _("Delivery #") => array('fun'=>'trans_view'), diff --git a/sales/inquiry/sales_orders_view.php b/sales/inquiry/sales_orders_view.php index 2f5fe249..53de2699 100644 --- a/sales/inquiry/sales_orders_view.php +++ b/sales/inquiry/sales_orders_view.php @@ -220,7 +220,7 @@ if (get_post('_OrderNumber_changed')) // enable/disable selection controls start_form(); -start_table("class='tablestyle_noborder'"); +start_table(TABLESTYLE_NOBORDER); start_row(); ref_cells(_("#:"), 'OrderNumber', '',null, '', true); if ($_POST['order_view_mode'] != 'DeliveryTemplates' && $_POST['order_view_mode'] != 'InvoiceTemplates') @@ -230,13 +230,18 @@ if ($_POST['order_view_mode'] != 'DeliveryTemplates' && $_POST['order_view_mode' date_cells(_("to:"), 'OrdersToDate', '', null, 1); } locations_list_cells(_("Location:"), 'StockLocation', null, true); +end_row(); +end_table(); + +start_table(TABLESTYLE_NOBORDER); +start_row(); stock_items_list_cells(_("Item:"), 'SelectStockFromList', null, true); if ($trans_type == ST_SALESQUOTE) check_cells(_("Show All:"), 'show_all'); -submit_cells('SearchOrders', _("Search"),'',_('Select documents'), 'default'); +submit_cells('SearchOrders', _("Search"),'',_('Select documents'), 'default'); hidden('order_view_mode', $_POST['order_view_mode']); hidden('type', $trans_type); @@ -246,80 +251,7 @@ end_table(1); //--------------------------------------------------------------------------------------------- // Orders inquiry table // -$sql = "SELECT - sorder.order_no, - sorder.reference, - debtor.name, - branch.br_name," - .($_POST['order_view_mode']=='InvoiceTemplates' - || $_POST['order_view_mode']=='DeliveryTemplates' ? - "sorder.comments, " : "sorder.customer_ref, ") - ."sorder.ord_date, - sorder.delivery_date, - sorder.deliver_to, - Sum(line.unit_price*line.quantity*(1-line.discount_percent))+freight_cost AS OrderValue, - sorder.type, - debtor.curr_code, - Sum(line.qty_sent) AS TotDelivered, - Sum(line.quantity) AS TotQuantity - FROM ".TB_PREF."sales_orders as sorder, " - .TB_PREF."sales_order_details as line, " - .TB_PREF."debtors_master as debtor, " - .TB_PREF."cust_branch as branch - WHERE sorder.order_no = line.order_no - AND sorder.trans_type = line.trans_type - AND sorder.trans_type = $trans_type - AND sorder.debtor_no = debtor.debtor_no - AND sorder.branch_code = branch.branch_code - AND debtor.debtor_no = branch.debtor_no"; - -if (isset($_POST['OrderNumber']) && $_POST['OrderNumber'] != "") -{ - // search orders with number like - $number_like = "%".$_POST['OrderNumber']; - $sql .= " AND sorder.order_no LIKE ".db_escape($number_like) - ." GROUP BY sorder.order_no"; -} -elseif (isset($_POST['OrderReference']) && $_POST['OrderReference'] != "") -{ - // search orders with reference like - $number_like = "%".$_POST['OrderReference']."%"; - $sql .= " AND sorder.reference LIKE ".db_escape($number_like) - ." GROUP BY sorder.order_no"; -} -else // ... or select inquiry constraints -{ - if ($_POST['order_view_mode']!='DeliveryTemplates' && $_POST['order_view_mode']!='InvoiceTemplates') - { - $date_after = date2sql($_POST['OrdersAfterDate']); - $date_before = date2sql($_POST['OrdersToDate']); - - $sql .= " AND sorder.ord_date >= '$date_after'" - ." AND sorder.ord_date <= '$date_before'"; - } - if ($trans_type == 32 && !check_value('show_all')) - $sql .= " AND sorder.delivery_date >= '".date2sql(Today())."'"; - if ($selected_customer != -1) - $sql .= " AND sorder.debtor_no=".db_escape($selected_customer); - - if (isset($selected_stock_item)) - $sql .= " AND line.stk_code=".db_escape($selected_stock_item); - - if (isset($_POST['StockLocation']) && $_POST['StockLocation'] != ALL_TEXT) - $sql .= " AND sorder.from_stk_loc = ".db_escape($_POST['StockLocation']); - - if ($_POST['order_view_mode']=='OutstandingOnly') - $sql .= " AND line.qty_sent < line.quantity"; - elseif ($_POST['order_view_mode']=='InvoiceTemplates' || $_POST['order_view_mode']=='DeliveryTemplates') - $sql .= " AND sorder.type=1"; - - $sql .= " GROUP BY sorder.order_no, - sorder.debtor_no, - sorder.branch_code, - sorder.customer_ref, - sorder.ord_date, - sorder.deliver_to"; -} +$sql = get_sql_for_sales_orders_view($selected_customer, $trans_type); if ($trans_type == ST_SALESORDER) $cols = array( diff --git a/sales/manage/credit_status.php b/sales/manage/credit_status.php index aed0b1ff..1706a9bc 100644 --- a/sales/manage/credit_status.php +++ b/sales/manage/credit_status.php @@ -58,11 +58,7 @@ if ($Mode=='UPDATE_ITEM' && can_process()) function can_delete($selected_id) { - $sql= "SELECT COUNT(*) FROM ".TB_PREF."debtors_master - WHERE credit_status=".db_escape($selected_id); - $result = db_query($sql, "could not query customers"); - $myrow = db_fetch_row($result); - if ($myrow[0] > 0) + if (key_in_foreign_table($selected_id, 'debtors_master', 'credit_status')) { display_error(_("Cannot delete this credit status because customer accounts have been created referring to it.")); return false; @@ -97,7 +93,7 @@ if ($Mode == 'RESET') $result = get_all_credit_status(check_value('show_inactive')); start_form(); -start_table("$table_style width=40%"); +start_table(TABLESTYLE, "width=40%"); $th = array(_("Description"), _("Dissallow Invoices"),'',''); inactive_control_column($th); table_header($th); @@ -131,7 +127,7 @@ echo '
'; //----------------------------------------------------------------------------------- -start_table($table_style2); +start_table(TABLESTYLE2); if ($selected_id != -1) { diff --git a/sales/manage/customer_branches.php b/sales/manage/customer_branches.php index 2248b761..5ab27166 100644 --- a/sales/manage/customer_branches.php +++ b/sales/manage/customer_branches.php @@ -10,14 +10,15 @@ See the License here . ***********************************************************************/ $page_security = 'SA_CUSTOMER'; -//$page_security = 3; $path_to_root="../.."; + include($path_to_root . "/includes/db_pager.inc"); include($path_to_root . "/includes/session.inc"); page(_($help_context = "Customer Branches"), @$_REQUEST['popup']); include($path_to_root . "/includes/ui.inc"); +include($path_to_root . "/includes/ui/contacts_view.inc"); //----------------------------------------------------------------------------------------------- @@ -38,6 +39,7 @@ if (isset($_GET['debtor_no'])) { $_POST['customer_id'] = strtoupper($_GET['debtor_no']); } + $_POST['branch_code'] = $selected_id; if (isset($_GET['SelectedBranch'])) @@ -55,8 +57,6 @@ if ($Mode=='ADD_ITEM' || $Mode=='UPDATE_ITEM') //initialise no input errors assumed initially before we test $input_error = 0; - //first off validate inputs sensible - if (strlen($_POST['br_name']) == 0) { $input_error = 1; @@ -74,70 +74,42 @@ if ($Mode=='ADD_ITEM' || $Mode=='UPDATE_ITEM') if ($input_error != 1) { + begin_transaction(); if ($selected_id != -1) { - /*SelectedBranch could also exist if submit had not been clicked this code would not run in this case cos submit is false of course see the delete code below*/ - - $sql = "UPDATE ".TB_PREF."cust_branch SET br_name = " . db_escape($_POST['br_name']) . ", - branch_ref = " . db_escape($_POST['br_ref']) . ", - br_address = ".db_escape($_POST['br_address']). ", - phone=".db_escape($_POST['phone']). ", - phone2=".db_escape($_POST['phone2']). ", - fax=".db_escape($_POST['fax']).", - contact_name=".db_escape($_POST['contact_name']) . ", - salesman= ".db_escape($_POST['salesman']) . ", - area=".db_escape($_POST['area']) . ", - email=".db_escape($_POST['email']) . ", - tax_group_id=".db_escape($_POST['tax_group_id']). ", - sales_account=".db_escape($_POST['sales_account']) . ", - sales_discount_account=".db_escape($_POST['sales_discount_account']) . ", - receivables_account=".db_escape($_POST['receivables_account']) . ", - payment_discount_account=".db_escape($_POST['payment_discount_account']) . ", - default_location=".db_escape($_POST['default_location']) . ", - br_post_address =".db_escape($_POST['br_post_address']) . ", - disable_trans=".db_escape($_POST['disable_trans']) . ", - group_no=".db_escape($_POST['group_no']) . ", - default_ship_via=".db_escape($_POST['default_ship_via']) . ", - notes=".db_escape($_POST['notes']) . " - WHERE branch_code =".db_escape($_POST['branch_code']) . " - AND debtor_no=".db_escape($_POST['customer_id']); + update_branch($_POST['customer_id'], $_POST['branch_code'], $_POST['br_name'], $_POST['br_ref'], + $_POST['br_address'], $_POST['salesman'], $_POST['area'], $_POST['tax_group_id'], $_POST['sales_account'], + $_POST['sales_discount_account'], $_POST['receivables_account'], $_POST['payment_discount_account'], + $_POST['default_location'], $_POST['br_post_address'], $_POST['disable_trans'], $_POST['group_no'], + $_POST['default_ship_via'], $_POST['notes']); +// update_record_status($_POST['supplier_id'], $_POST['inactive'], +// 'cust_branch', 'branch_code'); $note =_('Selected customer branch has been updated'); - } + } else { - /*Selected branch is null cos no item selected on first time round so must be adding a record must be submitting new entries in the new Customer Branches form */ - $sql = "INSERT INTO ".TB_PREF."cust_branch (debtor_no, br_name, branch_ref, br_address, - salesman, phone, phone2, fax, - contact_name, area, email, tax_group_id, sales_account, receivables_account, payment_discount_account, sales_discount_account, default_location, - br_post_address, disable_trans, group_no, default_ship_via, notes) - VALUES (".db_escape($_POST['customer_id']). ",".db_escape($_POST['br_name']) . ", " - .db_escape($_POST['br_ref']) . ", " - .db_escape($_POST['br_address']) . ", ".db_escape($_POST['salesman']) . ", " - .db_escape($_POST['phone']) . ", ".db_escape($_POST['phone2']) . ", " - .db_escape($_POST['fax']) . "," - .db_escape($_POST['contact_name']) . ", ".db_escape($_POST['area']) . "," - .db_escape($_POST['email']) . ", ".db_escape($_POST['tax_group_id']) . ", " - .db_escape($_POST['sales_account']) . ", " - .db_escape($_POST['receivables_account']) . ", " - .db_escape($_POST['payment_discount_account']) . ", " - .db_escape($_POST['sales_discount_account']) . ", " - .db_escape($_POST['default_location']) . ", " - .db_escape($_POST['br_post_address']) . "," - .db_escape($_POST['disable_trans']) . ", " - .db_escape($_POST['group_no']) . ", " - .db_escape($_POST['default_ship_via']). ", " - .db_escape($_POST['notes']) . ")"; + add_branch($_POST['customer_id'], $_POST['br_name'], $_POST['br_ref'], + $_POST['br_address'], $_POST['salesman'], $_POST['area'], $_POST['tax_group_id'], $_POST['sales_account'], + $_POST['sales_discount_account'], $_POST['receivables_account'], $_POST['payment_discount_account'], + $_POST['default_location'], $_POST['br_post_address'], 0, $_POST['group_no'], + $_POST['default_ship_via'], $_POST['notes']); + $selected_id = db_insert_id(); + + add_crm_person($_POST['contact_name'], $_POST['contact_name'], '', $_POST['br_post_address'], + $_POST['phone'], $_POST['phone2'], $_POST['fax'], $_POST['email'], + $_POST['rep_lang'], ''); + + add_crm_contact('cust_branch', 'general', $selected_id, db_insert_id()); + $note = _('New customer branch has been added'); } - //run the sql from either of the above possibilites - db_query($sql,"The branch record could not be inserted or updated"); + commit_transaction(); display_notification($note); - $Mode = 'RESET'; +// $Mode = 'RESET'; if (@$_REQUEST['popup']) { - set_focus("Select".($_POST['branch_code'] == -1 - ? db_insert_id(): $_POST['branch_code'])); + set_focus("Select".($_POST['branch_code'] == -1 ? $selected_id: $_POST['branch_code'])); } } @@ -148,28 +120,20 @@ elseif ($Mode == 'Delete') // PREVENT DELETES IF DEPENDENT RECORDS IN 'debtor_trans' - $sql= "SELECT COUNT(*) FROM ".TB_PREF."debtor_trans WHERE branch_code=".db_escape($_POST['branch_code'])." AND debtor_no = ".db_escape($_POST['customer_id']); - $result = db_query($sql,"could not query debtortrans"); - $myrow = db_fetch_row($result); - if ($myrow[0] > 0) + if (branch_in_foreign_table($_POST['customer_id'], $_POST['branch_code'], 'debtor_trans')) { display_error(_("Cannot delete this branch because customer transactions have been created to this branch.")); } else { - $sql= "SELECT COUNT(*) FROM ".TB_PREF."sales_orders WHERE branch_code=".db_escape($_POST['branch_code'])." AND debtor_no = ".db_escape($_POST['customer_id']); - $result = db_query($sql,"could not query sales orders"); - - $myrow = db_fetch_row($result); - if ($myrow[0] > 0) + if (branch_in_foreign_table($_POST['customer_id'], $_POST['branch_code'], 'sales_orders')) { display_error(_("Cannot delete this branch because sales orders exist for it. Purge old sales orders first.")); } else { - $sql="DELETE FROM ".TB_PREF."cust_branch WHERE branch_code=".db_escape($_POST['branch_code'])." AND debtor_no=".db_escape($_POST['customer_id']); - db_query($sql,"could not delete branch"); + delete_branch($_POST['customer_id'], $_POST['branch_code']); display_notification(_('Selected customer branch has been deleted')); } } //end ifs to test if the branch can be deleted @@ -203,6 +167,114 @@ function select_link($row) { return button("Select".$row["branch_code"], $row["branch_code"], '', ICON_ADD, 'selector'); } +function branch_settings($selected_id) { + global $Mode, $num_branches; + + start_outer_table(TABLESTYLE2); + + table_section(1); + + $_POST['email'] = ""; + if ($selected_id != -1) + { + if ($Mode == 'Edit' || !isset($_POST['br_name'])) { + //editing an existing branch + $myrow = get_cust_branch($_POST['customer_id'], $_POST['branch_code']); + set_focus('br_name'); + $_POST['branch_code'] = $myrow["branch_code"]; + $_POST['br_name'] = $myrow["br_name"]; + $_POST['br_ref'] = $myrow["branch_ref"]; + $_POST['br_address'] = $myrow["br_address"]; + $_POST['br_post_address'] = $myrow["br_post_address"]; +// $_POST['contact_name'] = $myrow["contact_name"]; + $_POST['salesman'] =$myrow["salesman"]; + $_POST['area'] =$myrow["area"]; +// $_POST['rep_lang'] =$myrow["rep_lang"]; +// $_POST['phone'] =$myrow["phone"]; +// $_POST['phone2'] =$myrow["phone2"]; +// $_POST['fax'] =$myrow["fax"]; +// $_POST['email'] =$myrow["email"]; + $_POST['tax_group_id'] = $myrow["tax_group_id"]; + $_POST['disable_trans'] = $myrow['disable_trans']; + $_POST['default_location'] = $myrow["default_location"]; + $_POST['default_ship_via'] = $myrow['default_ship_via']; + $_POST['sales_account'] = $myrow["sales_account"]; + $_POST['sales_discount_account'] = $myrow['sales_discount_account']; + $_POST['receivables_account'] = $myrow['receivables_account']; + $_POST['payment_discount_account'] = $myrow['payment_discount_account']; + $_POST['group_no'] = $myrow["group_no"]; + $_POST['notes'] = $myrow["notes"]; + + } + } + elseif ($Mode != 'ADD_ITEM') + { //end of if $SelectedBranch only do the else when a new record is being entered + $myrow = get_default_info_for_branch($_POST['customer_id']); +// $_POST['rep_lang'] = $myrow['rep_lang']; + if(!$num_branches) { + $_POST['br_name'] = $myrow["name"]; + $_POST['br_ref'] = $myrow["debtor_ref"]; + $_POST['contact_name'] = _('Main Branch'); + $_POST['br_address'] = $_POST['br_post_address'] = $myrow["address"]; + } + $_POST['branch_code'] = ""; + if (!isset($_POST['sales_account']) || !isset($_POST['sales_discount_account'])) + { + $company_record = get_company_prefs(); + + // We use the Item Sales Account as default! + // $_POST['sales_account'] = $company_record["default_sales_act"]; + $_POST['sales_account'] = $_POST['notes'] = ''; + $_POST['sales_discount_account'] = $company_record['default_sales_discount_act']; + $_POST['receivables_account'] = $company_record['debtors_act']; + $_POST['payment_discount_account'] = $company_record['default_prompt_payment_act']; + } + + } + hidden('popup', @$_REQUEST['popup']); + + table_section_title(_("Name and Contact")); + text_row(_("Branch Name:"), 'br_name', null, 35, 40); + text_row(_("Branch Short Name:"), 'br_ref', null, 30, 30); + + table_section_title(_("Sales")); + sales_persons_list_row( _("Sales Person:"), 'salesman', null); + sales_areas_list_row( _("Sales Area:"), 'area', null); + sales_groups_list_row(_("Sales Group:"), 'group_no', null, true); + locations_list_row(_("Default Inventory Location:"), 'default_location', null); + shippers_list_row(_("Default Shipping Company:"), 'default_ship_via', null); + tax_groups_list_row(_("Tax Group:"), 'tax_group_id', null); + + table_section_title(_("GL Accounts")); + // 2006-06-14. Changed gl_al_accounts_list to have an optional all_option 'Use Item Sales Accounts' + gl_all_accounts_list_row(_("Sales Account:"), 'sales_account', null, false, false, true); + gl_all_accounts_list_row(_("Sales Discount Account:"), 'sales_discount_account'); + gl_all_accounts_list_row(_("Accounts Receivable Account:"), 'receivables_account', null, true); + gl_all_accounts_list_row(_("Prompt Payment Discount Account:"), 'payment_discount_account'); + + table_section(2); + +if($selected_id==-1) { + table_section_title(_("General contact data")); + text_row(_("Contact Person:"), 'contact_name', null, 35, 40); + text_row(_("Phone Number:"), 'phone', null, 32, 30); + text_row(_("Secondary Phone Number:"), 'phone2', null, 32, 30); + text_row(_("Fax Number:"), 'fax', null, 32, 30); + email_row(_("E-mail:"), 'email', null, 35, 55); + languages_list_row( _("Document Language:"), 'rep_lang', null, _("Customer default")); +} + table_section_title(_("Addresses")); + textarea_row(_("Mailing Address:"), 'br_post_address', null, 35, 4); + textarea_row(_("Billing Address:"), 'br_address', null, 35, 4); + textarea_row(_("General Notes:"), 'notes', null, 35, 4); + +if($selected_id!=-1) + yesno_list_row(_("Disable this Branch:"), 'disable_trans', null); + + end_outer_table(1); + submit_add_or_update_center($selected_id == -1, '', 'both'); +} + start_form(); echo "
" . _("Select a customer: ") . "  "; @@ -211,30 +283,8 @@ echo "

"; $num_branches = db_customer_has_branches($_POST['customer_id']); - $sql = "SELECT " - ."b.branch_code, " - ."b.branch_ref, " - ."b.br_name, " - ."b.contact_name, " - ."s.salesman_name, " - ."a.description, " - ."b.phone, " - ."b.fax, " - ."b.email, " - ."t.name AS tax_group_name, " - ."b.inactive - FROM ".TB_PREF."cust_branch b, " - .TB_PREF."debtors_master c, " - .TB_PREF."areas a, " - .TB_PREF."salesman s, " - .TB_PREF."tax_groups t - WHERE b.debtor_no=c.debtor_no - AND b.tax_group_id=t.id - AND b.area=a.area_code - AND b.salesman=s.salesman_code - AND b.debtor_no = ".db_escape($_POST['customer_id']); - - if (!get_post('show_inactive')) $sql .= " AND !b.inactive"; +$sql = get_sql_for_customer_branches(); + //------------------------------------------------------------------------------------------------ if ($num_branches) { @@ -259,7 +309,6 @@ $cols = array( if (!@$_REQUEST['popup']) { $cols[' '] = 'skip'; } - $table =& new_db_pager('branch_tbl', $sql, $cols, 'cust_branch'); $table->set_inactive_ctrl('cust_branch', 'branch_code'); @@ -269,131 +318,28 @@ display_db_pager($table); else display_note(_("The selected customer does not have any branches. Please create at least one branch.")); -start_outer_table($table_style2, 5); - -table_section(1); - -$_POST['email'] = ""; -if ($selected_id != -1) -{ - if ($Mode == 'Edit') { - - //editing an existing branch - $sql = "SELECT * FROM ".TB_PREF."cust_branch - WHERE branch_code=".db_escape($_POST['branch_code'])." - AND debtor_no=".db_escape($_POST['customer_id']); - $result = db_query($sql,"check failed"); - $myrow = db_fetch($result); - set_focus('br_name'); - $_POST['branch_code'] = $myrow["branch_code"]; - $_POST['br_name'] = $myrow["br_name"]; - $_POST['br_ref'] = $myrow["branch_ref"]; - $_POST['br_address'] = $myrow["br_address"]; - $_POST['br_post_address'] = $myrow["br_post_address"]; - $_POST['contact_name'] = $myrow["contact_name"]; - $_POST['salesman'] =$myrow["salesman"]; - $_POST['area'] =$myrow["area"]; - $_POST['phone'] =$myrow["phone"]; - $_POST['phone2'] =$myrow["phone2"]; - $_POST['fax'] =$myrow["fax"]; - $_POST['email'] =$myrow["email"]; - $_POST['tax_group_id'] = $myrow["tax_group_id"]; - $_POST['disable_trans'] = $myrow['disable_trans']; - $_POST['default_location'] = $myrow["default_location"]; - $_POST['default_ship_via'] = $myrow['default_ship_via']; - $_POST['sales_account'] = $myrow["sales_account"]; - $_POST['sales_discount_account'] = $myrow['sales_discount_account']; - $_POST['receivables_account'] = $myrow['receivables_account']; - $_POST['payment_discount_account'] = $myrow['payment_discount_account']; - $_POST['group_no'] = $myrow["group_no"]; - $_POST['notes'] = $myrow["notes"]; - - } -} -elseif ($Mode != 'ADD_ITEM') -{ //end of if $SelectedBranch only do the else when a new record is being entered - if(!$num_branches) { - $sql = "SELECT name, address, email, debtor_ref - FROM ".TB_PREF."debtors_master WHERE debtor_no = ".db_escape($_POST['customer_id']); - $result = db_query($sql,"check failed"); - $myrow = db_fetch($result); - $_POST['br_name'] = $myrow["name"]; - $_POST['br_ref'] = $myrow["debtor_ref"]; - $_POST['contact_name'] = _('Main Branch'); - $_POST['br_address'] = $_POST['br_post_address'] = $myrow["address"]; - $_POST['email'] = $myrow['email']; - } - $_POST['branch_code'] = ""; - if (!isset($_POST['sales_account']) || !isset($_POST['sales_discount_account'])) - { - $company_record = get_company_prefs(); - - // We use the Item Sales Account as default! - // $_POST['sales_account'] = $company_record["default_sales_act"]; - $_POST['sales_account'] = $_POST['notes'] = ''; - $_POST['sales_discount_account'] = $company_record['default_sales_discount_act']; - $_POST['receivables_account'] = $company_record['debtors_act']; - $_POST['payment_discount_account'] = $company_record['default_prompt_payment_act']; - - } - -} -hidden('selected_id', $selected_id); -hidden('branch_code'); -hidden('popup', @$_REQUEST['popup']); - -table_section_title(_("Name and Contact")); - -text_row(_("Branch Name:"), 'br_name', null, 35, 40); -text_row(_("Branch Short Name:"), 'br_ref', null, 30, 30); -text_row(_("Contact Person:"), 'contact_name', null, 35, 40); - -text_row(_("Phone Number:"), 'phone', null, 32, 30); -text_row(_("Secondary Phone Number:"), 'phone2', null, 32, 30); -text_row(_("Fax Number:"), 'fax', null, 32, 30); - -email_row(_("E-mail:"), 'email', null, 35, 55); - -table_section_title(_("Sales")); - -sales_persons_list_row( _("Sales Person:"), 'salesman', null); - -sales_areas_list_row( _("Sales Area:"), 'area', null); - -sales_groups_list_row(_("Sales Group:"), 'group_no', null, true); - -locations_list_row(_("Default Inventory Location:"), 'default_location', null); - -shippers_list_row(_("Default Shipping Company:"), 'default_ship_via', null); - -tax_groups_list_row(_("Tax Group:"), 'tax_group_id', null); - -yesno_list_row(_("Disable this Branch:"), 'disable_trans', null); - -table_section(2); - -table_section_title(_("GL Accounts")); - -// 2006-06-14. Changed gl_al_accounts_list to have an optional all_option 'Use Item Sales Accounts' -gl_all_accounts_list_row(_("Sales Account:"), 'sales_account', null, false, false, true); - -gl_all_accounts_list_row(_("Sales Discount Account:"), 'sales_discount_account'); - -gl_all_accounts_list_row(_("Accounts Receivable Account:"), 'receivables_account'); - -gl_all_accounts_list_row(_("Prompt Payment Discount Account:"), 'payment_discount_account'); - -table_section_title(_("Addresses")); - -textarea_row(_("Mailing Address:"), 'br_post_address', null, 35, 4); - -textarea_row(_("Billing Address:"), 'br_address', null, 35, 4); - -textarea_row(_("General Notes:"), 'notes', null, 35, 4); - -end_outer_table(1); +tabbed_content_start('tabs', array( + 'settings' => array(_('&General settings'), $selected_id!=-1), + 'contacts' => array(_('&Contacts'), $selected_id!=-1), +// 'orders' => array('S&ales orders', $selected_id!=-1) // not implemented + )); + + switch (get_post('_tabs_sel')) { + default: + case 'settings': + branch_settings($selected_id); + break; + case 'contacts': + $contacts = new contacts('contacts', $selected_id, 'cust_branch'); + $contacts->show(); + break; + case 'orders': + }; + hidden('branch_code'); + hidden('selected_id', $selected_id); +br(); +tabbed_content_end(); -submit_add_or_update_center($selected_id == -1, '', 'both'); end_form(); diff --git a/sales/manage/customers.php b/sales/manage/customers.php index dd264683..13350530 100644 --- a/sales/manage/customers.php +++ b/sales/manage/customers.php @@ -18,12 +18,14 @@ page(_($help_context = "Customers"), @$_REQUEST['popup']); include_once($path_to_root . "/includes/date_functions.inc"); include_once($path_to_root . "/includes/banking.inc"); include_once($path_to_root . "/includes/ui.inc"); +include_once($path_to_root . "/includes/ui/contacts_view.inc"); if (isset($_GET['debtor_no'])) { $_POST['customer_id'] = $_GET['debtor_no']; } -$new_customer = (!isset($_POST['customer_id']) || $_POST['customer_id'] == ""); + +$selected_id = get_post('customer_id',''); //-------------------------------------------------------------------------------------------- function can_process() @@ -68,34 +70,19 @@ function can_process() //-------------------------------------------------------------------------------------------- -function handle_submit() +function handle_submit(&$selected_id) { - global $path_to_root, $new_customer, $Ajax; + global $path_to_root, $Ajax; if (!can_process()) return; - if ($new_customer == false) + if ($selected_id) { - - $sql = "UPDATE ".TB_PREF."debtors_master SET name=" . db_escape($_POST['CustName']) . ", - debtor_ref=" . db_escape($_POST['cust_ref']) . ", - address=".db_escape($_POST['address']) . ", - tax_id=".db_escape($_POST['tax_id']) . ", - curr_code=".db_escape($_POST['curr_code']) . ", - email=".db_escape($_POST['email']) . ", - dimension_id=".db_escape($_POST['dimension_id']) . ", - dimension2_id=".db_escape($_POST['dimension2_id']) . ", - credit_status=".db_escape($_POST['credit_status']) . ", - payment_terms=".db_escape($_POST['payment_terms']) . ", - discount=" . input_num('discount') / 100 . ", - pymt_discount=" . input_num('pymt_discount') / 100 . ", - credit_limit=" . input_num('credit_limit') . ", - sales_type = ".db_escape($_POST['sales_type']) . ", - notes=".db_escape($_POST['notes']) . " - WHERE debtor_no = ".db_escape($_POST['customer_id']); - - db_query($sql,"The customer could not be updated"); + update_customer($_POST['customer_id'], $_POST['CustName'], $_POST['cust_ref'], $_POST['address'], + $_POST['tax_id'], $_POST['curr_code'], $_POST['dimension_id'], $_POST['dimension2_id'], + $_POST['credit_status'], $_POST['payment_terms'], input_num('discount') / 100, input_num('pymt_discount') / 100, + input_num('credit_limit'), $_POST['sales_type'], $_POST['notes']); update_record_status($_POST['customer_id'], $_POST['inactive'], 'debtors_master', 'debtor_no'); @@ -107,25 +94,15 @@ function handle_submit() { //it is a new customer begin_transaction(); + add_customer($_POST['CustName'], $_POST['cust_ref'], $_POST['address'], + $_POST['tax_id'], $_POST['curr_code'], $_POST['dimension_id'], $_POST['dimension2_id'], + $_POST['credit_status'], $_POST['payment_terms'], input_num('discount') / 100, input_num('pymt_discount') / 100, + input_num('credit_limit'), $_POST['sales_type'], $_POST['notes']); - $sql = "INSERT INTO ".TB_PREF."debtors_master (name, debtor_ref, address, tax_id, email, dimension_id, dimension2_id, - curr_code, credit_status, payment_terms, discount, pymt_discount,credit_limit, - sales_type, notes) VALUES (".db_escape($_POST['CustName']) .", " .db_escape($_POST['cust_ref']) .", " - .db_escape($_POST['address']) . ", " . db_escape($_POST['tax_id']) . "," - .db_escape($_POST['email']) . ", ".db_escape($_POST['dimension_id']) . ", " - .db_escape($_POST['dimension2_id']) . ", ".db_escape($_POST['curr_code']) . ", - " . db_escape($_POST['credit_status']) . ", ".db_escape($_POST['payment_terms']) . ", " . input_num('discount')/100 . ", - " . input_num('pymt_discount')/100 . ", " . input_num('credit_limit') - .", ".db_escape($_POST['sales_type']).", ".db_escape($_POST['notes']) . ")"; - - db_query($sql,"The customer could not be added"); - - $_POST['customer_id'] = db_insert_id(); - $new_customer = false; - commit_transaction(); + $selected_id = $_POST['customer_id'] = db_insert_id(); + commit_transaction(); display_notification(_("A new customer has been added.")); - $Ajax->activate('_page_body'); } } @@ -133,43 +110,32 @@ function handle_submit() if (isset($_POST['submit'])) { - handle_submit(); + handle_submit($selected_id); } //-------------------------------------------------------------------------------------------- if (isset($_POST['delete'])) { - //the link to delete a selected record was clicked instead of the submit button - $cancel_delete = 0; // PREVENT DELETES IF DEPENDENT RECORDS IN 'debtor_trans' - $sel_id = db_escape($_POST['customer_id']); - $sql= "SELECT COUNT(*) FROM ".TB_PREF."debtor_trans WHERE debtor_no=$sel_id"; - $result = db_query($sql,"check failed"); - $myrow = db_fetch_row($result); - if ($myrow[0] > 0) + + if (key_in_foreign_table($selected_id, 'debtor_trans', 'debtor_no', true)) { $cancel_delete = 1; display_error(_("This customer cannot be deleted because there are transactions that refer to it.")); } else { - $sql= "SELECT COUNT(*) FROM ".TB_PREF."sales_orders WHERE debtor_no=$sel_id"; - $result = db_query($sql,"check failed"); - $myrow = db_fetch_row($result); - if ($myrow[0] > 0) + if (key_in_foreign_table($selected_id, 'sales_orders', 'debtor_no', true)) { $cancel_delete = 1; display_error(_("Cannot delete the customer record because orders have been created against it.")); } else { - $sql = "SELECT COUNT(*) FROM ".TB_PREF."cust_branch WHERE debtor_no=$sel_id"; - $result = db_query($sql,"check failed"); - $myrow = db_fetch_row($result); - if ($myrow[0] > 0) + if (key_in_foreign_table($selected_id, 'cust_branch', 'debtor_no', true)) { $cancel_delete = 1; display_error(_("Cannot delete this customer because there are branch records set up against it.")); @@ -180,29 +146,143 @@ if (isset($_POST['delete'])) if ($cancel_delete == 0) { //ie not cancelled the delete as a result of above tests - $sql = "DELETE FROM ".TB_PREF."debtors_master WHERE debtor_no=$sel_id"; - db_query($sql,"cannot delete customer"); + + delete_customer($selected_id); display_notification(_("Selected customer has been deleted.")); unset($_POST['customer_id']); - $new_customer = true; + $selected_id = ''; $Ajax->activate('_page_body'); } //end if Delete Customer } +function customer_settings($selected_id) +{ + global $SysPrefs, $path_to_root; + + if (!$selected_id) + { + $_POST['CustName'] = $_POST['cust_ref'] = $_POST['address'] = $_POST['tax_id'] = ''; + $_POST['dimension_id'] = 0; + $_POST['dimension2_id'] = 0; + $_POST['sales_type'] = -1; + $_POST['curr_code'] = get_company_currency(); + $_POST['credit_status'] = -1; + $_POST['payment_terms'] = $_POST['notes'] = ''; + + $_POST['discount'] = $_POST['pymt_discount'] = percent_format(0); + $_POST['credit_limit'] = price_format($SysPrefs->default_credit_limit()); + } + else + { + $myrow = get_customer($selected_id); + + $_POST['CustName'] = $myrow["name"]; + $_POST['cust_ref'] = $myrow["debtor_ref"]; + $_POST['address'] = $myrow["address"]; + $_POST['tax_id'] = $myrow["tax_id"]; + $_POST['dimension_id'] = $myrow["dimension_id"]; + $_POST['dimension2_id'] = $myrow["dimension2_id"]; + $_POST['sales_type'] = $myrow["sales_type"]; + $_POST['curr_code'] = $myrow["curr_code"]; + $_POST['credit_status'] = $myrow["credit_status"]; + $_POST['payment_terms'] = $myrow["payment_terms"]; + $_POST['discount'] = percent_format($myrow["discount"] * 100); + $_POST['pymt_discount'] = percent_format($myrow["pymt_discount"] * 100); + $_POST['credit_limit'] = price_format($myrow["credit_limit"]); + $_POST['notes'] = $myrow["notes"]; + $_POST['inactive'] = $myrow["inactive"]; + } + + start_outer_table(TABLESTYLE2); + table_section(1); + table_section_title(_("Name and Address")); + + text_row(_("Customer Name:"), 'CustName', $_POST['CustName'], 40, 80); + text_row(_("Customer Short Name:"), 'cust_ref', null, 30, 30); + textarea_row(_("Address:"), 'address', $_POST['address'], 35, 5); + + text_row(_("GSTNo:"), 'tax_id', null, 40, 40); + + + if (!$selected_id || is_new_customer($selected_id)) + { + currencies_list_row(_("Customer's Currency:"), 'curr_code', $_POST['curr_code']); + } + else + { + label_row(_("Customer's Currency:"), $_POST['curr_code']); + hidden('curr_code', $_POST['curr_code']); + } + sales_types_list_row(_("Sales Type/Price List:"), 'sales_type', $_POST['sales_type']); + + if($selected_id) + record_status_list_row(_("Customer status:"), 'inactive'); + + table_section(2); + + table_section_title(_("Sales")); + + percent_row(_("Discount Percent:"), 'discount', $_POST['discount']); + percent_row(_("Prompt Payment Discount Percent:"), 'pymt_discount', $_POST['pymt_discount']); + amount_row(_("Credit Limit:"), 'credit_limit', $_POST['credit_limit']); + + payment_terms_list_row(_("Payment Terms:"), 'payment_terms', $_POST['payment_terms']); + credit_status_list_row(_("Credit Status:"), 'credit_status', $_POST['credit_status']); + $dim = get_company_pref('use_dimension'); + if ($dim >= 1) + dimensions_list_row(_("Dimension")." 1:", 'dimension_id', $_POST['dimension_id'], true, " ", false, 1); + if ($dim > 1) + dimensions_list_row(_("Dimension")." 2:", 'dimension2_id', $_POST['dimension2_id'], true, " ", false, 2); + if ($dim < 1) + hidden('dimension_id', 0); + if ($dim < 2) + hidden('dimension2_id', 0); + + if ($selected_id) { + start_row(); + echo '
'._('Customer branches').':'._('Customer branches').':
"; display_order_summary($orderitems, $_SESSION['Items'], true); echo "
"; // outer table /*Now the customer charged to details in a sub table*/ -start_table("$table_style width=100%"); +start_table(TABLESTYLE, "width=100%"); $th = array(_("Customer")); table_header($th); @@ -54,7 +54,7 @@ end_table(); echo ""; // outer table -start_table("$table_style width=100%"); +start_table(TABLESTYLE, "width=100%"); $th = array(_("Branch")); table_header($th); @@ -63,7 +63,7 @@ end_table(); echo ""; // outer table -start_table("$table_style width=100%"); +start_table(TABLESTYLE, "width=100%"); start_row(); label_cells(_("Ref"), $myrow["reference"], "class='tableheader2'"); label_cells(_("Date"), sql2date($myrow["tran_date"]), "class='tableheader2'"); @@ -83,7 +83,7 @@ $sub_total = 0; $result = get_customer_trans_details(ST_CUSTCREDIT, $trans_id); -start_table("$table_style width=95%"); +start_table(TABLESTYLE, "width=95%"); if (db_num_rows($result) > 0) { @@ -152,6 +152,6 @@ if (!$voided) /* end of check to see that there was an invoice record to print */ -end_page(true); +end_page(true, false, false, ST_CUSTCREDIT, $trans_id); ?> \ No newline at end of file diff --git a/sales/view/view_dispatch.php b/sales/view/view_dispatch.php index a5a14813..7ed8c304 100644 --- a/sales/view/view_dispatch.php +++ b/sales/view/view_dispatch.php @@ -43,11 +43,11 @@ $sales_order = get_sales_order_header($myrow["order_"], ST_SALESORDER); display_heading(sprintf(_("DISPATCH NOTE #%d"),$trans_id)); echo "
"; -start_table("$table_style2 width=95%"); +start_table(TABLESTYLE2, "width=95%"); echo "
"; // outer table /*Now the customer charged to details in a sub table*/ -start_table("$table_style width=100%"); +start_table(TABLESTYLE, "width=100%"); $th = array(_("Charge To")); table_header($th); @@ -61,7 +61,7 @@ echo ""; // outer table /*end of the main table showing the company name and charge to details */ -start_table("$table_style width=100%"); +start_table(TABLESTYLE, "width=100%"); $th = array(_("Charge Branch")); table_header($th); @@ -70,7 +70,7 @@ end_table(); echo ""; // outer table -start_table("$table_style width=100%"); +start_table(TABLESTYLE, "width=100%"); $th = array(_("Delivered To")); table_header($th); @@ -80,7 +80,7 @@ end_table(); echo ""; // outer table -start_table("$table_style width=100%"); +start_table(TABLESTYLE, "width=100%"); start_row(); label_cells(_("Reference"), $myrow["reference"], "class='tableheader2'"); label_cells(_("Currency"), $sales_order["curr_code"], "class='tableheader2'"); @@ -105,7 +105,7 @@ end_table(1); // outer table $result = get_customer_trans_details(ST_CUSTDELIVERY, $trans_id); -start_table("$table_style width=95%"); +start_table(TABLESTYLE, "width=95%"); if (db_num_rows($result) > 0) { @@ -142,17 +142,16 @@ if (db_num_rows($result) > 0) amount_cell($value); end_row(); } //end while there are line items to print out + $display_sub_tot = price_format($sub_total); + label_row(_("Sub-total"), $display_sub_tot, "colspan=6 align=right", + "nowrap align=right width=15%"); } else display_note(_("There are no line items on this dispatch."), 1, 2); -$display_sub_tot = price_format($sub_total); $display_freight = price_format($myrow["ov_freight"]); -/*Print out the delivery note text entered */ -label_row(_("Sub-total"), $display_sub_tot, "colspan=6 align=right", - "nowrap align=right width=15%"); label_row(_("Shipping"), $display_freight, "colspan=6 align=right", "nowrap align=right"); $tax_items = get_trans_tax_details(ST_CUSTDELIVERY, $trans_id); @@ -166,6 +165,6 @@ end_table(1); is_voided_display(ST_CUSTDELIVERY, $trans_id, _("This dispatch has been voided.")); -end_page(true); +end_page(true, false, false, ST_CUSTDELIVERY, $trans_id); ?> \ No newline at end of file diff --git a/sales/view/view_invoice.php b/sales/view/view_invoice.php index c93a794c..61fc0b56 100644 --- a/sales/view/view_invoice.php +++ b/sales/view/view_invoice.php @@ -43,11 +43,11 @@ $sales_order = get_sales_order_header($myrow["order_"], ST_SALESORDER); display_heading(sprintf(_("SALES INVOICE #%d"),$trans_id)); echo "
"; -start_table("$table_style2 width=95%"); +start_table(TABLESTYLE2, "width=95%"); echo "
"; // outer table /*Now the customer charged to details in a sub table*/ -start_table("$table_style width=100%"); +start_table(TABLESTYLE, "width=100%"); $th = array(_("Charge To")); table_header($th); @@ -61,7 +61,7 @@ echo ""; // outer table /*end of the main table showing the company name and charge to details */ -start_table("$table_style width=100%"); +start_table(TABLESTYLE, "width=100%"); $th = array(_("Charge Branch")); table_header($th); @@ -70,17 +70,16 @@ end_table(); echo ""; // outer table -start_table("$table_style width=100%"); -$th = array(_("Delivered To")); -table_header($th); - -label_row(null, $sales_order["deliver_to"] . "
" . nl2br($sales_order["delivery_address"]), - "nowrap"); +start_table(TABLESTYLE, "width=100%"); +$th = array(_("Payment Terms")); +table_header($th); +$paym = get_payment_terms($myrow['payment_terms']); +label_row(null, $paym["terms"], "nowrap"); end_table(); echo "
"; // outer table -start_table("$table_style width=100%"); +start_table(TABLESTYLE, "width=100%"); start_row(); label_cells(_("Reference"), $myrow["reference"], "class='tableheader2'"); label_cells(_("Currency"), $sales_order["curr_code"], "class='tableheader2'"); @@ -96,7 +95,7 @@ start_row(); label_cells(_("Invoice Date"), sql2date($myrow["tran_date"]), "class='tableheader2'", "nowrap"); label_cells(_("Due Date"), sql2date($myrow["due_date"]), "class='tableheader2'", "nowrap"); label_cells(_("Deliveries"), get_customer_trans_view_str(ST_CUSTDELIVERY, - get_parent_trans(ST_SALESINVOICE,$trans_id)), "class='tableheader2'"); + get_sales_parent_numbers(ST_SALESINVOICE, $trans_id)), "class='tableheader2'"); end_row(); comments_display_row(ST_SALESINVOICE, $trans_id); end_table(); @@ -107,7 +106,7 @@ end_table(1); // outer table $result = get_customer_trans_details(ST_SALESINVOICE, $trans_id); -start_table("$table_style width=95%"); +start_table(TABLESTYLE, "width=95%"); if (db_num_rows($result) > 0) { @@ -145,16 +144,16 @@ if (db_num_rows($result) > 0) end_row(); } //end while there are line items to print out + $display_sub_tot = price_format($sub_total); + label_row(_("Sub-total"), $display_sub_tot, "colspan=6 align=right", + "nowrap align=right width=15%"); } else display_note(_("There are no line items on this invoice."), 1, 2); -$display_sub_tot = price_format($sub_total); $display_freight = price_format($myrow["ov_freight"]); /*Print out the invoice text entered */ -label_row(_("Sub-total"), $display_sub_tot, "colspan=6 align=right", - "nowrap align=right width=15%"); label_row(_("Shipping"), $display_freight, "colspan=6 align=right", "nowrap align=right"); $tax_items = get_trans_tax_details(ST_SALESINVOICE, $trans_id); @@ -168,6 +167,6 @@ end_table(1); is_voided_display(ST_SALESINVOICE, $trans_id, _("This invoice has been voided.")); -end_page(true); +end_page(true, false, false, ST_SALESINVOICE, $trans_id); ?> \ No newline at end of file diff --git a/sales/view/view_receipt.php b/sales/view/view_receipt.php index 8153b3ff..f829fda5 100644 --- a/sales/view/view_receipt.php +++ b/sales/view/view_receipt.php @@ -33,7 +33,7 @@ $receipt = get_customer_trans($trans_id, ST_CUSTPAYMENT); display_heading(sprintf(_("Customer Payment #%d"),$trans_id)); echo "
"; -start_table("$table_style width=80%"); +start_table(TABLESTYLE, "width=80%"); start_row(); label_cells(_("From Customer"), $receipt['DebtorName'], "class='tableheader2'"); label_cells(_("Into Bank Account"), $receipt['bank_account_name'], "class='tableheader2'"); @@ -60,5 +60,5 @@ if (!$voided) display_allocations_from(PT_CUSTOMER, $receipt['debtor_no'], ST_CUSTPAYMENT, $trans_id, $receipt['Total']); } -end_page(true); +end_page(true, false, false, ST_CUSTPAYMENT, $trans_id); ?> \ No newline at end of file diff --git a/sales/view/view_sales_order.php b/sales/view/view_sales_order.php index 082c41c3..ff88393c 100644 --- a/sales/view/view_sales_order.php +++ b/sales/view/view_sales_order.php @@ -41,7 +41,7 @@ if (isset($_SESSION['View'])) $_SESSION['View'] = new Cart($_GET['trans_type'], $_GET['trans_no'], true); -start_table("$table_style2 width=95%", 5); +start_table(TABLESTYLE2, "width=95%", 5); echo "
"; display_heading2(_("Order Information")); if ($_GET['trans_type'] != ST_SALESQUOTE) @@ -55,7 +55,7 @@ echo "
"; -start_table("$table_style width=95%"); +start_table(TABLESTYLE, "width=95%"); label_row(_("Customer Name"), $_SESSION['View']->customer_name, "class='tableheader2'", "colspan=3"); start_row(); @@ -74,6 +74,7 @@ label_cells(_("Order Currency"), $_SESSION['View']->customer_currency, "class='t label_cells(_("Deliver From Location"), $_SESSION['View']->location_name, "class='tableheader2'"); end_row(); +label_row(_("Payment Terms"), $_SESSION['View']->payment_terms['terms'], "class='tableheader2'", "colspan=3"); label_row(_("Delivery Address"), nl2br($_SESSION['View']->delivery_address), "class='tableheader2'", "colspan=3"); label_row(_("Reference"), $_SESSION['View']->reference, "class='tableheader2'", "colspan=3"); @@ -87,34 +88,33 @@ if ($_GET['trans_type'] != ST_SALESQUOTE) { echo ""; - start_table($table_style); + start_table(TABLESTYLE); display_heading2(_("Delivery Notes")); $th = array(_("#"), _("Ref"), _("Date"), _("Total")); table_header($th); - $sql = "SELECT * FROM ".TB_PREF."debtor_trans WHERE type=".ST_CUSTDELIVERY." AND order_=".db_escape($_GET['trans_no']); - $result = db_query($sql,"The related delivery notes could not be retreived"); - - $delivery_total = 0; - $k = 0; $dn_numbers = array(); - - while ($del_row = db_fetch($result)) - { + $delivery_total = 0; - alt_table_row_color($k); - $dn_numbers[] = $del_row["trans_link"]; - $this_total = $del_row["ov_freight"]+ $del_row["ov_amount"] + $del_row["ov_freight_tax"] + $del_row["ov_gst"] ; - $delivery_total += $this_total; + if ($result = get_sales_child_documents(ST_SALESORDER, $_GET['trans_no'])) { - label_cell(get_customer_trans_view_str($del_row["type"], $del_row["trans_no"])); - label_cell($del_row["reference"]); - label_cell(sql2date($del_row["tran_date"])); - amount_cell($this_total); - end_row(); + $k = 0; + while ($del_row = db_fetch($result)) + { + + alt_table_row_color($k); + $dn_numbers[] = $del_row["trans_no"]; + $this_total = $del_row["ov_freight"]+ $del_row["ov_amount"] + $del_row["ov_freight_tax"] + $del_row["ov_gst"] ; + $delivery_total += $this_total; + label_cell(get_customer_trans_view_str($del_row["type"], $del_row["trans_no"])); + label_cell($del_row["reference"]); + label_cell(sql2date($del_row["tran_date"])); + amount_cell($this_total); + end_row(); + } } label_row(null, price_format($delivery_total), " ", "colspan=4 align=right"); @@ -122,27 +122,21 @@ if ($_GET['trans_type'] != ST_SALESQUOTE) end_table(); echo ""; - start_table($table_style); + start_table(TABLESTYLE); display_heading2(_("Sales Invoices")); $th = array(_("#"), _("Ref"), _("Date"), _("Total")); table_header($th); - + $inv_numbers = array(); $invoices_total = 0; - if (count($dn_numbers)) { - - $sql = "SELECT * FROM ".TB_PREF."debtor_trans WHERE type=".ST_SALESINVOICE - ." AND trans_no IN(". implode(',', array_values($dn_numbers)).")"; - - $result = db_query($sql,"The related invoices could not be retreived"); + if ($result = get_sales_child_documents(ST_CUSTDELIVERY, $dn_numbers)) { $k = 0; while ($inv_row = db_fetch($result)) { - alt_table_row_color($k); $this_total = $inv_row["ov_freight"] + $inv_row["ov_freight_tax"] + $inv_row["ov_gst"] + $inv_row["ov_amount"]; @@ -154,7 +148,6 @@ if ($_GET['trans_type'] != ST_SALESQUOTE) label_cell(sql2date($inv_row["tran_date"])); amount_cell($this_total); end_row(); - } } label_row(null, price_format($invoices_total), " ", "colspan=4 align=right"); @@ -163,20 +156,13 @@ if ($_GET['trans_type'] != ST_SALESQUOTE) display_heading2(_("Credit Notes")); - start_table($table_style); + start_table(TABLESTYLE); $th = array(_("#"), _("Ref"), _("Date"), _("Total")); table_header($th); - + $credits_total = 0; - if (count($inv_numbers)) { - // FIXME - credit notes retrieved here should be those linked to invoices containing - // at least one line from this order - $sql = "SELECT * FROM ".TB_PREF."debtor_trans WHERE type=".ST_CUSTCREDIT - ." AND trans_link IN(". implode(',', array_values($inv_numbers)).")"; - - $result = db_query($sql,"The related credit notes could not be retreived"); - + if ($result = get_sales_child_documents(ST_SALESINVOICE, $inv_numbers)) { $k = 0; while ($credits_row = db_fetch($result)) @@ -194,6 +180,7 @@ if ($_GET['trans_type'] != ST_SALESQUOTE) end_row(); } + } label_row(null, "" . price_format(-$credits_total) . "", " ", "colspan=4 align=right"); @@ -209,7 +196,7 @@ if ($_SESSION['View']->so_type == 1) display_note(_("This Sales Order is used as a Template."), 0, 0, "class='currentfg'"); display_heading2(_("Line Details")); -start_table("colspan=9 width=95% $table_style"); +start_table(TABLESTYLE, "colspan=9 width=95%"); $th = array(_("Item Code"), _("Item Description"), _("Quantity"), _("Unit"), _("Price"), _("Discount"), _("Total"), _("Quantity Delivered")); table_header($th); @@ -236,17 +223,28 @@ foreach ($_SESSION['View']->line_items as $stock_item) { end_row(); } -$items_total = $_SESSION['View']->get_items_total(); - -$display_total = price_format($items_total + $_SESSION['View']->freight_cost); - label_row(_("Shipping"), price_format($_SESSION['View']->freight_cost), "align=right colspan=6", "nowrap align=right", 1); -label_row(_("Total Order Value"), $display_total, "align=right colspan=6", + +$sub_tot = $_SESSION['View']->get_items_total() + $_SESSION['View']->freight_cost; + +$display_sub_tot = price_format($sub_tot); + +label_row(_("Sub Total"), $display_sub_tot, "align=right colspan=6", "nowrap align=right", 1); +$taxes = $_SESSION['View']->get_taxes(); + +$tax_total = display_edit_tax_items($taxes, 6, $_SESSION['View']->tax_included,2); + +$display_total = price_format($sub_tot + $tax_total); + +start_row(); +label_cells(_("Amount Total"), $display_total, "colspan=6 align='right'","align='right'"); +label_cell('', "colspan=2"); +end_row(); end_table(2); -end_page(true); +end_page(true, false, false, $_GET['trans_type'], $_GET['trans_no']); ?> diff --git a/sql/alter2.1.php b/sql/alter2.1.php index fae78321..ff9467a2 100644 --- a/sql/alter2.1.php +++ b/sql/alter2.1.php @@ -150,9 +150,9 @@ class fa2_1 { // Test if patch was applied before. // function installed($pref) { - $n = 5; // number of features to be installed + $n = 4; // number of features to be installed if (!check_table($pref, 'item_codes')) $n--; - if (!check_table($pref, 'company', 'foreign_codes')) $n--; +// if (!check_table($pref, 'company', 'foreign_codes')) $n--; if (!check_table($pref, 'suppliers', 'credit_limit')) $n--; if (!check_table($pref, 'bank_trans', 'reconciled', array('Type'=>'date'))) $n--; diff --git a/sql/alter2.3.php b/sql/alter2.3.php new file mode 100644 index 00000000..bdeab5c6 --- /dev/null +++ b/sql/alter2.3.php @@ -0,0 +1,377 @@ +. +***********************************************************************/ +class fa2_3 { + var $version = '2.3'; // version installed + var $description; + var $sql = 'alter2.3.sql'; + var $preconf = true; + var $beta = false; // upgrade from 2.2 or 2.3beta; + + function fa2_3() { + $this->description = _('Upgrade from version 2.2 to 2.3'); + } + + // + // Install procedure. All additional changes + // not included in sql file should go here. + // + function install($pref, $force) + { + global $db_version, $dflt_lang; + + if (!$this->preconf) + return false; + + if (!$this->beta) { + // all specials below are already done on 2.3beta + + $sql = "SELECT debtor_no, payment_terms FROM {$pref}debtors_master"; + + $result = db_query($sql); + if (!$result) { + display_error("Cannot read customers" + .':
'. db_error_msg($db)); + return false; + } + // update all sales orders and transactions with customer std payment terms + while($cust = db_fetch($result)) { + $sql = "UPDATE {$pref}debtor_trans SET " + ."payment_terms = '" .$cust['payment_terms'] + ."' WHERE debtor_no='".$cust['debtor_no']."'"; + if (db_query($sql)==false) { + display_error("Cannot update cust trans payment" + .':
'. db_error_msg($db)); + return false; + } + $sql = "UPDATE {$pref}sales_orders SET " + ."payment_terms = '" .$cust['payment_terms'] + ."' WHERE debtor_no='".$cust['debtor_no']."'"; + if (db_query($sql)==false) { + display_error("Cannot update sales order payment" + .':
'. db_error_msg($db)); + return false; + } + } + if (!$this->update_totals($pref)) { + display_error("Cannot update order totals"); + return false; + } + if (!$this->update_line_relations($pref)) { + display_error("Cannot update sales document links"); + return false; + } + //remove obsolete and temporary columns. + // this have to be done here as db_import rearranges alter query order + $dropcol = array( + 'crm_persons' => array('tmp_id','tmp_class'), + 'debtors_master' => array('email'), + 'cust_branch' => array('phone', 'phone2', 'fax', 'email'), + 'suppliers' => array('phone', 'phone2', 'fax', 'email'), + 'debtor_trans' => array('trans_link') + ); + + foreach($dropcol as $table => $columns) + foreach($columns as $col) { + if (db_query("ALTER TABLE `{$pref}{$table}` DROP `$col`")==false) { + display_error("Cannot drop {$table}.{$col} column:
".db_error_msg($db)); + return false; + } + } + // remove old preferences table after upgrade script has been executed + $sql = "DROP TABLE IF EXISTS `{$pref}company`"; + if (!db_query($sql)) + return false; + } + $this->update_lang_cfg(); + return update_company_prefs(array('version_id'=>$db_version), $pref); + } + // + // Checking before install + // + function pre_check($pref, $force) + { + + if ($this->beta && !$force) + $this->sql = 'alter2.3rc.sql'; + + return true; + } + // + // Test if patch was applied before. + // + function installed($pref) { + $this->beta = !check_table($pref, 'suppliers', 'tax_included'); + $this->preconf = $this->fix_extensions(); + + $n = 1; // number of patches to be installed + $patchcnt = 0; + + if (!$this->beta) { + $n += 3; + if (!check_table($pref, 'comments', 'type', array('Key'=>'MUL'))) $patchcnt++; + if (!check_table($pref, 'sys_prefs')) $patchcnt++; + if (!check_table($pref, 'sales_orders', 'payment_terms')) $patchcnt++; + } + if (!check_table($pref, 'purch_orders', 'tax_included')) $patchcnt++; + return $n == $patchcnt ? true : ($patchcnt ? ($patchcnt.'/'. $n) : 0); + } + //========================================================================================= + // 2.3 specific update functions + // + + /* + Update order totals + */ + function update_totals($pref) + { + global $path_to_root; + + include_once("$path_to_root/sales/includes/cart_class.inc"); + include_once("$path_to_root/purchasing/includes/po_class.inc"); + $cart = new cart(ST_SALESORDER); + $sql = "SELECT order_no, trans_type FROM {$pref}sales_orders"; + $orders = db_query($sql); + if (!$orders) + return false; + while ($order = db_fetch($orders)) { + read_sales_order($order['order_no'], $cart, $order['trans_type']); + $result = db_query("UPDATE {$pref}sales_orders + SET total=".$cart->get_trans_total() + ." WHERE order_no=".$order[0]); + unset($cart->line_items); + } + unset($cart); + $cart = new purch_order(); + $sql = "SELECT order_no FROM {$pref}purch_orders"; + $orders = db_query($sql); + if (!$orders) + return false; + while ($order_no = db_fetch($orders)) { + read_po($order_no[0], $cart); + $result = db_query("UPDATE {$pref}purch_orders SET total=".$cart->get_trans_total()); + unset($cart->line_items); + } + return true; + } + + //------------------------------------------------------------------------------ + // Retreive parent document number(s) for given transaction + // + function get_parent_trans_2_2($trans_type, $trans_no) { + + $sql = 'SELECT trans_link FROM + '.TB_PREF.'debtor_trans WHERE trans_no='.db_escape($trans_no) + .' AND type='.db_escape($trans_type).' AND trans_link!=0'; + + $result = db_query($sql, 'Parent document numbers cannot be retrieved'); + + if (db_num_rows($result)) { + $link = db_fetch($result); + return array($link['trans_link']); + } + if ($trans_type!=ST_SALESINVOICE) return 0; // this is credit note with no parent invoice + // invoice: find batch invoice parent trans. + $sql = 'SELECT trans_no FROM + '.TB_PREF.'debtor_trans WHERE + (trans_link='.db_escape($trans_no).' AND type='. get_parent_type($trans_type) .')'; + + $result = db_query($sql, 'Delivery links cannot be retrieved'); + + $delivery = array(); + if(db_num_rows($result)>0) { + while($link = db_fetch($result)) { + $delivery[] = $link['trans_no']; + } + } + return count($delivery) ? $delivery : 0; + } + + /* + Reorganizing document relations. Due to the design issue in pre 2.3 db structure + there can be sales documents with lines not properly linked to parents. This rare + cases will be described in error log. + */ + function update_line_relations($pref) + { + global $path_to_root, $systypes_array; + + require_once("$path_to_root/includes/sysnames.inc"); + + $sql = "SELECT d.type, trans_no, order_ FROM {$pref}debtor_trans d + LEFT JOIN {$pref}voided v ON d.type=v.type AND d.trans_no=v.id + WHERE ISNULL(v.type) AND + (d.type=".ST_CUSTDELIVERY + ." OR d.type=".ST_SALESINVOICE + ." OR d.type=".ST_CUSTCREDIT.")"; + $result = db_query($sql); + if (!$result) + return false; + + while ($trans = db_fetch($result)) { + $type = $trans['type']; + $trans_no = $trans['trans_no']; + $invalid = 0; + $msg =''; + + $lines = get_customer_trans_details($type, $trans_no); + $n = db_num_rows($lines); + + if ($type==ST_CUSTDELIVERY) + $src_lines = get_sales_order_details($trans['order_'], ST_SALESORDER); + else + $src_lines = get_customer_trans_details(get_parent_type($type), + $this->get_parent_trans_2_2($type, $trans_no)); + + $src_n = db_num_rows($src_lines); + + if (($type == ST_CUSTCREDIT) && ($src_n == 0)) + continue; // free credit note has no src lines + + $max = $type == ST_CUSTDELIVERY ? $n : max($src_n, $n); + + for($i = 0, $j=0; $i < $max; $i++) { + if (!($doc_line = @db_fetch($lines))) + break; + + if(!($src_line = @db_fetch($src_lines))) + break; + + if ($type == ST_CUSTDELIVERY) + $src_line['stock_id'] = $src_line['stk_code']; // SO details has another field name + + if ($src_line['stock_id'] == $doc_line['stock_id'] + && ($src_line['quantity'] >= $doc_line['quantity'])) { + + $sql = "UPDATE {$pref}debtor_trans_details SET src_id = {$src_line['id']} + WHERE id = {$doc_line['id']}"; + if (!db_query($sql)) + return false; + $j++; + } + } + if ($j != $n) { + error_log("Line level relations error for ".$systypes_array[$type]." #$trans_no."); + } + } + return true; + } + + function fix_extensions() + { + global $path_to_root, $next_extension_id, $installed_languages; + + $lang_chd = false; + foreach($installed_languages as $i => $lang) { + if (!isset($lang['path'])) { + $code = $lang['code']; + $installed_languages[$i]['path'] = 'lang/'.$code; + $installed_languages[$i]['package'] = $code; + $lang_chd = true; + } + } + if ($lang_chd) + write_lang(); + + + $installed_extensions= get_company_extensions(); + if (!isset($next_extension_id)) + $next_extension_id = 1; + $new_exts = array(); + +/* Old extension modules are uninstalled - they need manual porting after + heavy changes in extension system in FA2.3 + + foreach($installed_extensions as $i => $ext) + { + if (isset($ext['title'])) // old type entry + { + if ($ext['type'] == 'module') { + $new['type'] = 'extension'; + $new['tabs'][] = array( + 'url' => $ext['filename'], + 'access' => isset($ext['access']) ? $ext['access'] : 'SA_OPEN', + 'tab_id' => $ext['tab'], + 'title' => $ext['title'] + ); + $new['path'] = $ext['path']; + } + else // plugin + { + $new['type'] = 'extension'; + $new['tabs'] = array(); + $new['path'] = 'modules/'.$ext['path']; + $new['entries'][] = array( + 'url' => $ext['filename'], + 'access' => isset($ext['access']) ? $ext['access'] : 'SA_OPEN', + 'tab_id' => $ext['tab'], + 'title' => $ext['title'] + ); + } + if (isset($ext['acc_file'])) + $new['acc_file'] = $ext['acc_file']; + $new['name'] = $ext['name']; + $new['package'] = $new['package'] = ''; + $new['active'] = 1; + + $new_exts[$i] = $new; + } + } +*/ + // Preserve non-standard themes + $path = $path_to_root.'/themes/'; + $themes = array(); + $themedir = opendir($path); + while (false !== ($fname = readdir($themedir))) + { + if ($fname!='.' && $fname!='..' && $fname!='CVS' && is_dir($path.$fname) + && !in_array($fname, array('aqua', 'cool', 'default'))) + { + foreach($installed_extensions as $ext) + if ($ext['path'] == 'themes/'.$fname) // skip if theme is already listed + continue 2; + $new_exts[$next_extension_id++] = array( + 'name' => 'Theme '. ucwords($fname), + 'package' => $fname, + 'type' => 'theme', + 'active' => true, + 'path' => 'themes/'.$fname + ); + } + } + closedir($themedir); + + if (count($new_exts)) { + return update_extensions($new_exts); + } else + return true; + } + + function update_lang_cfg() + { + global $dflt_lang, $installed_languages; + + foreach($installed_languages as $n => $lang) { + if ($lang['code'] == 'en_GB') { + $installed_languages[$n] = array('code'=>'C','name'=>'English', + 'encoding'=>'iso-8859-1', 'path' => '', 'package' => ''); + if ($dflt_lang == 'en_GB') + $dflt_lang = 'C'; + write_lang(); + } + } + } + +} + +$install = new fa2_3; + +?> \ No newline at end of file diff --git a/sql/alter2.3.sql b/sql/alter2.3.sql new file mode 100644 index 00000000..af668bc8 --- /dev/null +++ b/sql/alter2.3.sql @@ -0,0 +1,251 @@ +ALTER TABLE 0_comments ADD KEY `type_and_id` (`type`, `id`); +ALTER TABLE 0_quick_entries ADD COLUMN `bal_type` TINYINT(1) NOT NULL default '0'; + +# Key optimizations +ALTER TABLE 0_fiscal_year ADD UNIQUE KEY(`begin`), ADD UNIQUE KEY(`end`); +ALTER TABLE 0_useronline ADD KEY(`ip`); +ALTER TABLE 0_dimensions ADD KEY(`date_`), ADD KEY(`due_date`), ADD KEY(`type_`); +ALTER TABLE 0_gl_trans ADD KEY (`dimension_id`), ADD KEY (`dimension2_id`), ADD KEY (`tran_date`), ADD KEY `account_and_tran_date` (`account`, `tran_date`); +ALTER TABLE 0_chart_master DROP KEY `account_code`; +ALTER TABLE 0_chart_types ADD KEY(`class_id`); +ALTER TABLE 0_bank_accounts ADD KEY (`account_code`); +ALTER TABLE 0_bank_trans ADD KEY (`bank_act`,`reconciled`), ADD KEY (`bank_act`,`trans_date`); +ALTER TABLE 0_budget_trans ADD KEY `Account` (`account`, `tran_date`, `dimension_id`, `dimension2_id`); +ALTER TABLE 0_trans_tax_details ADD KEY `Type_and_Number` (`trans_type`,`trans_no`), ADD KEY (`tran_date`); +ALTER TABLE 0_audit_trail DROP KEY `fiscal_year`, ADD KEY `Seq` (`fiscal_year`, `gl_date`, `gl_seq`), ADD KEY `Type_and_Number` (`type`,`trans_no`); +ALTER TABLE 0_item_codes ADD KEY (`item_code`); +ALTER TABLE 0_stock_moves ADD KEY `Move` (`stock_id`,`loc_code`, `tran_date`); +ALTER TABLE 0_wo_issues ADD KEY (`workorder_id`); +ALTER TABLE 0_wo_manufacture ADD KEY (`workorder_id`); +ALTER TABLE 0_wo_requirements ADD KEY (`workorder_id`); +ALTER TABLE 0_bom DROP KEY `Parent_2`; +ALTER TABLE 0_refs ADD KEY `Type_and_Reference` (`type`,`reference`); +ALTER TABLE 0_grn_items ADD KEY (`grn_batch_id`); +ALTER TABLE 0_grn_batch ADD KEY (`delivery_date`), ADD KEY (`purch_order_no`); +ALTER TABLE 0_supp_invoice_items ADD KEY `Transaction` (`supp_trans_type`, `supp_trans_no`, `stock_id`); +ALTER TABLE 0_purch_order_details ADD KEY `order` (`order_no`, `po_detail_item`); +ALTER TABLE 0_purch_orders ADD KEY (`ord_date`); +ALTER TABLE 0_supp_trans ADD KEY (`tran_date`), DROP PRIMARY KEY, ADD PRIMARY KEY (`type`, `trans_no`); +ALTER TABLE 0_suppliers ADD KEY (`supp_ref`); +ALTER TABLE 0_supp_allocations ADD KEY `From` (`trans_type_from`, `trans_no_from`), ADD KEY `To` (`trans_type_to`, `trans_no_to`); +ALTER TABLE 0_cust_branch DROP KEY `br_name`, ADD KEY (`branch_ref`), ADD KEY (`group_no`); +ALTER TABLE 0_debtors_master ADD KEY (`debtor_ref`); +ALTER TABLE 0_debtor_trans DROP PRIMARY KEY, ADD PRIMARY KEY (`type`, `trans_no`), ADD KEY (`tran_date`); +ALTER TABLE 0_debtor_trans_details ADD KEY `Transaction` (`debtor_trans_type`, `debtor_trans_no`); +ALTER TABLE 0_cust_allocations ADD KEY `From` (`trans_type_from`, `trans_no_from`), ADD KEY `To` (`trans_type_to`, `trans_no_to`); +ALTER TABLE 0_sales_order_details ADD KEY `sorder` (`trans_type`, `order_no`); +ALTER TABLE 0_chart_master ADD KEY `accounts_by_type` (`account_type`, `account_code`); +# fix invalid constraint on databases generated from 2.2 version on en_US-new.sql +#ALTER TABLE `0_tax_types` DROP KEY `name`; + +DROP TABLE IF EXISTS `0_sys_prefs`; + +CREATE TABLE `0_sys_prefs` ( + `name` varchar(35) NOT NULL default '', + `category` varchar(30), + `type` varchar(20) NOT NULL default '', + `length` smallint(6), + `value` tinytext NULL, + PRIMARY KEY (`name`), + KEY (`category`) +) TYPE=MyISAM; + + +INSERT INTO `0_sys_prefs` SELECT 'coy_name','setup.company', 'varchar','60', c.coy_name FROM `0_company` c; +INSERT INTO `0_sys_prefs` SELECT 'gst_no','setup.company', 'varchar','25', c.gst_no FROM `0_company` c; +INSERT INTO `0_sys_prefs` SELECT 'coy_no','setup.company', 'varchar','25', c.coy_no FROM `0_company` c; +INSERT INTO `0_sys_prefs` SELECT 'tax_prd','setup.company', 'int','11', c.tax_prd FROM `0_company` c; +INSERT INTO `0_sys_prefs` SELECT 'tax_last','setup.company', 'int','11', c.tax_last FROM `0_company` c; +INSERT INTO `0_sys_prefs` SELECT 'postal_address','setup.company', 'tinytext','0', c.postal_address FROM `0_company` c; +INSERT INTO `0_sys_prefs` SELECT 'phone','setup.company', 'varchar','30', c.phone FROM `0_company` c; +INSERT INTO `0_sys_prefs` SELECT 'fax','setup.company', 'varchar','30',c.fax FROM `0_company` c; +INSERT INTO `0_sys_prefs` SELECT 'email','setup.company', 'varchar','100', c.email FROM `0_company` c; +INSERT INTO `0_sys_prefs` SELECT 'coy_logo','setup.company', 'varchar','100', c.coy_logo FROM `0_company` c; +INSERT INTO `0_sys_prefs` SELECT 'domicile','setup.company', 'varchar','55', c.domicile FROM `0_company` c; +INSERT INTO `0_sys_prefs` SELECT 'curr_default','setup.company', 'char','3', c.curr_default FROM `0_company` c; +INSERT INTO `0_sys_prefs` SELECT 'use_dimension','setup.company', 'tinyint','1', c.use_dimension FROM `0_company` c; +INSERT INTO `0_sys_prefs` SELECT 'f_year','setup.company', 'int','11', c.f_year FROM `0_company` c; +INSERT INTO `0_sys_prefs` SELECT 'no_item_list','setup.company', 'tinyint','1', c.no_item_list FROM `0_company` c; +INSERT INTO `0_sys_prefs` SELECT 'no_customer_list','setup.company', 'tinyint','1', c.no_customer_list FROM `0_company` c; +INSERT INTO `0_sys_prefs` SELECT 'no_supplier_list','setup.company', 'tinyint','1', c.no_supplier_list FROM `0_company` c; +INSERT INTO `0_sys_prefs` SELECT 'base_sales','setup.company', 'int','11', c.base_sales FROM `0_company` c; +INSERT INTO `0_sys_prefs` SELECT 'time_zone','setup.company', 'tinyint','1', c.time_zone FROM `0_company` c; +INSERT INTO `0_sys_prefs` SELECT 'add_pct','setup.company', 'int','5', c.add_pct FROM `0_company` c; +INSERT INTO `0_sys_prefs` SELECT 'round_to','setup.company', 'int','5', c.round_to FROM `0_company` c; +INSERT INTO `0_sys_prefs` SELECT 'login_tout','setup.company', 'smallint','6', c.login_tout FROM `0_company` c; +#INSERT INTO `0_sys_prefs` SELECT 'foreign_codes','setup.company', 'tinyint','1', c.foreign_codes FROM `0_company` c; + +INSERT INTO `0_sys_prefs` SELECT 'past_due_days','glsetup.general', 'int','11', c.past_due_days FROM `0_company` c; +INSERT INTO `0_sys_prefs` SELECT 'profit_loss_year_act','glsetup.general', 'varchar','15', c.profit_loss_year_act FROM `0_company` c; +INSERT INTO `0_sys_prefs` SELECT 'retained_earnings_act','glsetup.general', 'varchar','15', c.retained_earnings_act FROM `0_company` c; +INSERT INTO `0_sys_prefs` SELECT 'bank_charge_act','glsetup.general', 'varchar','15', c.bank_charge_act FROM `0_company` c; +INSERT INTO `0_sys_prefs` SELECT 'exchange_diff_act','glsetup.general', 'varchar','15', c.exchange_diff_act FROM `0_company` c; + +INSERT INTO `0_sys_prefs` SELECT 'default_credit_limit','glsetup.customer', 'int','11', c.default_credit_limit FROM `0_company` c; +INSERT INTO `0_sys_prefs` SELECT 'accumulate_shipping','glsetup.customer', 'tinyint','1', c.accumulate_shipping FROM `0_company` c; +INSERT INTO `0_sys_prefs` SELECT 'legal_text','glsetup.customer', 'tinytext','0', c.legal_text FROM `0_company` c; +INSERT INTO `0_sys_prefs` SELECT 'freight_act','glsetup.customer', 'varchar','15', c.freight_act FROM `0_company` c; + +INSERT INTO `0_sys_prefs` SELECT 'debtors_act','glsetup.sales', 'varchar','15', c.debtors_act FROM `0_company` c; +INSERT INTO `0_sys_prefs` SELECT 'default_sales_act','glsetup.sales', 'varchar','15', c.default_sales_act FROM `0_company` c; +INSERT INTO `0_sys_prefs` SELECT 'default_sales_discount_act','glsetup.sales', 'varchar','15', c.default_sales_discount_act FROM `0_company` c; +INSERT INTO `0_sys_prefs` SELECT 'default_prompt_payment_act','glsetup.sales', 'varchar','15', c.default_prompt_payment_act FROM `0_company` c; +INSERT INTO `0_sys_prefs` SELECT 'default_delivery_required','glsetup.sales', 'smallint','6', c.default_delivery_required FROM `0_company` c; + +INSERT INTO `0_sys_prefs` SELECT 'default_dim_required','glsetup.dims', 'int','11', c.default_dim_required FROM `0_company` c; + +INSERT INTO `0_sys_prefs` SELECT 'pyt_discount_act','glsetup.purchase', 'varchar','15', c.pyt_discount_act FROM `0_company` c; +INSERT INTO `0_sys_prefs` SELECT 'creditors_act','glsetup.purchase', 'varchar','15', c.creditors_act FROM `0_company` c; +INSERT INTO `0_sys_prefs` SELECT 'po_over_receive','glsetup.purchase', 'int','11', c.po_over_receive FROM `0_company` c; +INSERT INTO `0_sys_prefs` SELECT 'po_over_charge','glsetup.purchase', 'int','11', c.po_over_charge FROM `0_company` c; + +INSERT INTO `0_sys_prefs` SELECT 'allow_negative_stock','glsetup.inventory', 'tinyint','1', c.allow_negative_stock FROM `0_company` c; + +INSERT INTO `0_sys_prefs` SELECT 'default_inventory_act','glsetup.items', 'varchar','15', c.default_inventory_act FROM `0_company` c; +INSERT INTO `0_sys_prefs` SELECT 'default_cogs_act','glsetup.items', 'varchar','15', c.default_cogs_act FROM `0_company` c; +INSERT INTO `0_sys_prefs` SELECT 'default_adj_act','glsetup.items', 'varchar','15', c.default_adj_act FROM `0_company` c; +INSERT INTO `0_sys_prefs` SELECT 'default_inv_sales_act','glsetup.items', 'varchar','15', c.default_inv_sales_act FROM `0_company` c; +INSERT INTO `0_sys_prefs` SELECT 'default_assembly_act','glsetup.items', 'varchar','15', c.default_assembly_act FROM `0_company` c; + +INSERT INTO `0_sys_prefs` SELECT 'default_workorder_required','glsetup.manuf', 'int', '11', c.default_workorder_required FROM `0_company` c; + +#INSERT INTO `0_sys_prefs` SELECT 'payroll_act','glsetup.payroll', 'varchar','15', c.payroll_act FROM `0_company` c; +INSERT INTO `0_sys_prefs` SELECT 'version_id', 'system', 'varchar', '11', c.version_id FROM `0_company` c; + +ALTER TABLE `0_stock_master` ADD COLUMN `editable` TINYINT(1) NOT NULL default '0'; +ALTER TABLE `0_debtor_trans` ADD COLUMN `payment_terms` int(11) default NULL; +ALTER TABLE `0_sales_orders` ADD COLUMN `payment_terms` int(11) default NULL; +ALTER TABLE `0_sales_orders` ADD COLUMN `total` double NOT NULL default '0'; +ALTER TABLE `0_purch_orders` ADD COLUMN `total` double NOT NULL default '0'; + +# change account, groups and classes id's +ALTER TABLE `0_bank_accounts` CHANGE `account_code` `account_code` VARCHAR(15) NOT NULL DEFAULT ''; +ALTER TABLE `0_bank_trans` CHANGE `bank_act` `bank_act` VARCHAR(15) NOT NULL DEFAULT ''; +ALTER TABLE `0_budget_trans` CHANGE `account` `account` VARCHAR(15) NOT NULL DEFAULT ''; +ALTER TABLE `0_chart_master` CHANGE `account_code` `account_code` VARCHAR(15) NOT NULL DEFAULT ''; +ALTER TABLE `0_chart_master` CHANGE `account_code2` `account_code2` VARCHAR(15) NOT NULL DEFAULT ''; +ALTER TABLE `0_cust_branch` CHANGE `sales_account` `sales_account` VARCHAR(15) NOT NULL DEFAULT ''; +ALTER TABLE `0_cust_branch` CHANGE `sales_discount_account` `sales_discount_account` VARCHAR(15) NOT NULL DEFAULT ''; +ALTER TABLE `0_cust_branch` CHANGE `receivables_account` `receivables_account` VARCHAR(15) NOT NULL DEFAULT ''; +ALTER TABLE `0_cust_branch` CHANGE `payment_discount_account` `payment_discount_account` VARCHAR(15) NOT NULL DEFAULT ''; +ALTER TABLE `0_gl_trans` CHANGE `account` `account` VARCHAR(15) NOT NULL DEFAULT ''; +ALTER TABLE `0_quick_entry_lines` CHANGE `dest_id` `dest_id` VARCHAR(15) NOT NULL DEFAULT ''; +ALTER TABLE `0_stock_category` CHANGE `dflt_sales_act` `dflt_sales_act` VARCHAR(15) NOT NULL DEFAULT ''; +ALTER TABLE `0_stock_category` CHANGE `dflt_cogs_act` `dflt_cogs_act` VARCHAR(15) NOT NULL DEFAULT ''; +ALTER TABLE `0_stock_category` CHANGE `dflt_inventory_act` `dflt_inventory_act` VARCHAR(15) NOT NULL DEFAULT ''; +ALTER TABLE `0_stock_category` CHANGE `dflt_adjustment_act` `dflt_adjustment_act` VARCHAR(15) NOT NULL DEFAULT ''; +ALTER TABLE `0_stock_category` CHANGE `dflt_assembly_act` `dflt_assembly_act` VARCHAR(15) NOT NULL DEFAULT ''; +ALTER TABLE `0_stock_master` CHANGE `sales_account` `sales_account` VARCHAR(15) NOT NULL DEFAULT ''; +ALTER TABLE `0_stock_master` CHANGE `cogs_account` `cogs_account` VARCHAR(15) NOT NULL DEFAULT ''; +ALTER TABLE `0_stock_master` CHANGE `inventory_account` `inventory_account` VARCHAR(15) NOT NULL DEFAULT ''; +ALTER TABLE `0_stock_master` CHANGE `adjustment_account` `adjustment_account` VARCHAR(15) NOT NULL DEFAULT ''; +ALTER TABLE `0_stock_master` CHANGE `assembly_account` `assembly_account` VARCHAR(15) NOT NULL DEFAULT ''; +ALTER TABLE `0_supp_invoice_items` CHANGE `gl_code` `gl_code` VARCHAR(15) NOT NULL DEFAULT ''; +ALTER TABLE `0_suppliers` CHANGE `purchase_account` `purchase_account` VARCHAR(15) NOT NULL DEFAULT ''; +ALTER TABLE `0_suppliers` CHANGE `payable_account` `payable_account` VARCHAR(15) NOT NULL DEFAULT ''; +ALTER TABLE `0_suppliers` CHANGE `payment_discount_account` `payment_discount_account` VARCHAR(15) NOT NULL DEFAULT ''; +ALTER TABLE `0_tax_types` CHANGE `sales_gl_code` `sales_gl_code` VARCHAR(15) NOT NULL DEFAULT ''; +ALTER TABLE `0_tax_types` CHANGE `purchasing_gl_code` `purchasing_gl_code` VARCHAR(15) NOT NULL DEFAULT ''; +ALTER TABLE `0_tag_associations` CHANGE `record_id` `record_id` VARCHAR(15) NOT NULL; +ALTER TABLE `0_chart_class` CHANGE `cid` `cid` VARCHAR(3) NOT NULL; +ALTER TABLE `0_chart_master` CHANGE `account_type` `account_type` VARCHAR(10) NOT NULL DEFAULT '0'; +ALTER TABLE `0_chart_types` CHANGE `id` `id` VARCHAR(10) NOT NULL; +ALTER TABLE `0_chart_types` CHANGE `parent` `parent` VARCHAR(10) NOT NULL DEFAULT '-1'; +ALTER TABLE `0_chart_types` CHANGE `class_id` `class_id` VARCHAR(3) NOT NULL DEFAULT ''; +. +UPDATE `0_chart_types` SET parent='' WHERE parent='0' OR parent='-1'; + +INSERT INTO `0_sys_prefs` (name, category, type, length, value) VALUES ('auto_curr_reval','setup.company', 'smallint','6', '1'); + +DROP TABLE IF EXISTS `0_crm_categories`; +CREATE TABLE `0_crm_categories` ( + `id` int(11) NOT NULL auto_increment COMMENT 'pure technical key', + `type` varchar(20) NOT NULL COMMENT 'contact type e.g. customer' , + `action` varchar(20) NOT NULL COMMENT 'detailed usage e.g. department', + `name` varchar(30) NOT NULL COMMENT 'for category selector', + `description` tinytext NOT NULL COMMENT 'usage description', + `system` tinyint(1) NOT NULL default '0' COMMENT 'nonzero for core system usage', + `inactive` tinyint(1) NOT NULL default '0', + PRIMARY KEY (`id`), + UNIQUE KEY(`type`, `action`), + UNIQUE KEY(`type`, `name`) +) TYPE=InnoDB ; + + +INSERT INTO `0_crm_categories` VALUES (1, 'cust_branch', 'general', 'General', 'General contact data for customer branch (overrides company setting)', 1, 0); +INSERT INTO `0_crm_categories` VALUES (2, 'cust_branch', 'invoice', 'Invoices', 'Invoice posting (overrides company setting)', 1, 0); +INSERT INTO `0_crm_categories` VALUES (3, 'cust_branch', 'order', 'Orders', 'Order confirmation (overrides company setting)', 1, 0); +INSERT INTO `0_crm_categories` VALUES (4, 'cust_branch', 'delivery', 'Deliveries', 'Delivery coordination (overrides company setting)', 1, 0); +INSERT INTO `0_crm_categories` VALUES (5, 'customer', 'general', 'General', 'General contact data for customer', 1, 0); +INSERT INTO `0_crm_categories` VALUES (6, 'customer', 'order', 'Orders', 'Order confirmation', 1, 0); +INSERT INTO `0_crm_categories` VALUES (7, 'customer', 'delivery', 'Deliveries', 'Delivery coordination', 1, 0); +INSERT INTO `0_crm_categories` VALUES (8, 'customer', 'invoice', 'Invoices', 'Invoice posting', 1, 0); +INSERT INTO `0_crm_categories` VALUES (9, 'supplier', 'general', 'General', 'General contact data for supplier', 1, 0); +INSERT INTO `0_crm_categories` VALUES (10,'supplier', 'order', 'Orders', 'Order confirmation', 1, 0); +INSERT INTO `0_crm_categories` VALUES (11,'supplier', 'delivery', 'Deliveries', 'Delivery coordination', 1, 0); +INSERT INTO `0_crm_categories` VALUES (12,'supplier', 'invoice', 'Invoices', 'Invoice posting', 1, 0); + +DROP TABLE IF EXISTS `0_crm_persons`; + +CREATE TABLE `0_crm_persons` ( + `id` int(11) NOT NULL auto_increment, + `ref` varchar(30) NOT NULL, + `name` varchar(60) NOT NULL, + `name2` varchar(60) default NULL, + `address` tinytext default NULL, + `phone` varchar(30) default NULL, + `phone2` varchar(30) default NULL, + `fax` varchar(30) default NULL, + `email` varchar(100) default NULL, + `lang` char(5) default NULL, + `notes` tinytext NOT NULL, + `tmp_id` varchar(11), + `tmp_class` varchar(20), + `inactive` tinyint(1) NOT NULL default '0', + PRIMARY KEY (`id`), + KEY (`ref`) +) TYPE=InnoDB AUTO_INCREMENT=1 ; + +DROP TABLE IF EXISTS `0_crm_contacts`; + +CREATE TABLE `0_crm_contacts` ( + `id` int(11) NOT NULL auto_increment, + `person_id` int(11) NOT NULL default '0' COMMENT 'foreign key to crm_contacts', + `type` varchar(20) NOT NULL COMMENT 'foreign key to crm_categories', + `action` varchar(20) NOT NULL COMMENT 'foreign key to crm_categories', + `entity_id` varchar(11) NULL COMMENT 'entity id in related class table', + PRIMARY KEY (`id`), + KEY(`type`, `action`) +) TYPE=InnoDB ; + + +# +# tmp_id, tmp_class fields are used temporarily during upgrade to makethe process easier +# +INSERT INTO `0_crm_persons` (`ref`, `email`, `lang`, `tmp_id`, `tmp_class`) + SELECT `debtor_ref`, `email`, if(`curr_code`=d.`lang`, NULL, 'en_GB'), `debtor_no`, 'customer' + FROM `0_debtors_master`, + (SELECT `value` as lang FROM `0_sys_prefs` WHERE name='curr_default') d; + +INSERT INTO `0_crm_persons` (`ref`, `name`, `address`, `phone`, `phone2`, + `fax`,`email`, `tmp_id`,`tmp_class`) + SELECT `branch_ref`, `contact_name`, `br_address`, `phone`, `phone2`, + `fax`,`email`,`branch_code`, 'cust_branch' FROM `0_cust_branch`; + +INSERT INTO `0_crm_persons` (`ref`, `name`, `address`, `phone`, `phone2`, + `fax`,`email`,`lang`,`tmp_id`,`tmp_class`) + SELECT `supp_ref`, `contact`, `supp_address`, `phone`, `phone2`, + `fax`,`email`,if(`curr_code`=d.`lang`, NULL, 'en_GB'),`supplier_id`,'supplier' + FROM `0_suppliers`, + (SELECT `value` as lang FROM `0_sys_prefs` WHERE name='curr_default') d; + + +INSERT INTO `0_crm_contacts` (`person_id`, `type`, `action`, `entity_id`) + SELECT `id`, `tmp_class`, 'general', `tmp_id` + FROM `0_crm_persons`; + +ALTER TABLE `0_debtor_trans_details` ADD COLUMN `src_id` int(11) default NULL; +ALTER TABLE `0_debtor_trans_details` ADD KEY (`src_id`); +ALTER TABLE `0_suppliers` ADD COLUMN `tax_included` tinyint(1) NOT NULL default '0' AFTER `payment_terms`; +ALTER TABLE `0_supp_trans` ADD COLUMN `tax_included` tinyint(1) NOT NULL default '0'; +ALTER TABLE `0_purch_orders` ADD COLUMN `tax_included` tinyint(1) NOT NULL default '0'; diff --git a/sql/alter2.3rc.sql b/sql/alter2.3rc.sql new file mode 100644 index 00000000..cb14d6ea --- /dev/null +++ b/sql/alter2.3rc.sql @@ -0,0 +1,5 @@ +ALTER TABLE `0_supp_trans` ADD COLUMN `tax_included` tinyint(1) NOT NULL default '0'; +ALTER TABLE `0_purch_orders` ADD COLUMN `tax_included` tinyint(1) NOT NULL default '0'; +UPDATE `0_crm_persons` SET `lang`='C' WHERE `lang`='en_GB'; +UPDATE `0_users` SET `language`='C' WHERE `language`='en_GB'; +UPDATE `0_suppliers` SET `purchase_account`=''; diff --git a/sql/en_US-demo.sql b/sql/en_US-demo.sql index 5847e883..49057301 100644 --- a/sql/en_US-demo.sql +++ b/sql/en_US-demo.sql @@ -1,33 +1,45 @@ -# Built by FrontAccounting 2.1.2 -# http://frontaccounting.net -# Company: Training Co. -# User: Administrator -# COA: en_US-demo.sql +-- phpMyAdmin SQL Dump +-- version 2.11.8.1deb5 +-- http://www.phpmyadmin.net +-- +-- Host: localhost +-- Generation Time: May 11, 2010 at 11:32 PM +-- Server version: 5.0.51 +-- PHP Version: 5.2.6-1+lenny2 +-- +-- Database: `fatest` +-- -### Structure of table `0_areas` ### +-- -------------------------------------------------------- -DROP TABLE IF EXISTS `0_areas`; +-- +-- Table structure for table `0_areas` +-- -CREATE TABLE `0_areas` ( +DROP TABLE IF EXISTS `0_areas`; +CREATE TABLE IF NOT EXISTS `0_areas` ( `area_code` int(11) NOT NULL auto_increment, `description` varchar(60) NOT NULL default '', `inactive` tinyint(1) NOT NULL default '0', PRIMARY KEY (`area_code`), UNIQUE KEY `description` (`description`) -) TYPE=MyISAM AUTO_INCREMENT=2 ; - +) TYPE=MyISAM AUTO_INCREMENT=2 ; -### Data of table `0_areas` ### +-- +-- Dumping data for table `0_areas` +-- -INSERT INTO `0_areas` VALUES ('1', 'Global', '0'); +INSERT INTO `0_areas` VALUES(1, 'Global', 0); +-- -------------------------------------------------------- -### Structure of table `0_attachments` ### +-- +-- Table structure for table `0_attachments` +-- DROP TABLE IF EXISTS `0_attachments`; - -CREATE TABLE `0_attachments` ( +CREATE TABLE IF NOT EXISTS `0_attachments` ( `id` int(11) unsigned NOT NULL auto_increment, `description` varchar(60) NOT NULL default '', `type_no` int(11) NOT NULL default '0', @@ -39,17 +51,22 @@ CREATE TABLE `0_attachments` ( `filetype` varchar(60) NOT NULL default '', PRIMARY KEY (`id`), KEY `type_no` (`type_no`,`trans_no`) -) TYPE=MyISAM AUTO_INCREMENT=1 ; +) TYPE=MyISAM AUTO_INCREMENT=1 ; +-- +-- Dumping data for table `0_attachments` +-- -### Data of table `0_attachments` ### -### Structure of table `0_audit_trail` ### +-- -------------------------------------------------------- -DROP TABLE IF EXISTS `0_audit_trail`; +-- +-- Table structure for table `0_audit_trail` +-- -CREATE TABLE `0_audit_trail` ( - `id` int(11) NOT NULL AUTO_INCREMENT, +DROP TABLE IF EXISTS `0_audit_trail`; +CREATE TABLE IF NOT EXISTS `0_audit_trail` ( + `id` int(11) NOT NULL auto_increment, `type` smallint(6) unsigned NOT NULL default '0', `trans_no` int(11) unsigned NOT NULL default '0', `user` smallint(6) unsigned NOT NULL default '0', @@ -58,54 +75,61 @@ CREATE TABLE `0_audit_trail` ( `fiscal_year` int(11) NOT NULL, `gl_date` date NOT NULL default '0000-00-00', `gl_seq` int(11) unsigned default NULL, - PRIMARY KEY (`id`), - KEY (`fiscal_year`, `gl_seq`) -) TYPE=InnoDB ; - -### Data of table `0_audit_trail` ### - + PRIMARY KEY (`id`), + KEY `Seq` (`fiscal_year`,`gl_date`,`gl_seq`), + KEY `Type_and_Number` (`type`,`trans_no`) +) TYPE=InnoDB AUTO_INCREMENT=1 ; +-- +-- Dumping data for table `0_audit_trail` +-- +-- -------------------------------------------------------- -### Structure of table `0_bank_accounts` ### +-- +-- Table structure for table `0_bank_accounts` +-- DROP TABLE IF EXISTS `0_bank_accounts`; - -CREATE TABLE `0_bank_accounts` ( - `account_code` varchar(11) NOT NULL default '', +CREATE TABLE IF NOT EXISTS `0_bank_accounts` ( + `account_code` varchar(15) NOT NULL default '', `account_type` smallint(6) NOT NULL default '0', `bank_account_name` varchar(60) NOT NULL default '', `bank_account_number` varchar(100) NOT NULL default '', `bank_name` varchar(60) NOT NULL default '', `bank_address` tinytext, `bank_curr_code` char(3) NOT NULL default '', - `dflt_curr_act` TINYINT(1) NOT NULL default '0', + `dflt_curr_act` tinyint(1) NOT NULL default '0', `id` smallint(6) NOT NULL auto_increment, `last_reconciled_date` timestamp NOT NULL default '0000-00-00 00:00:00', `ending_reconcile_balance` double NOT NULL default '0', `inactive` tinyint(1) NOT NULL default '0', PRIMARY KEY (`id`), KEY `bank_account_name` (`bank_account_name`), - KEY `bank_account_number` (`bank_account_number`) -) TYPE=MyISAM AUTO_INCREMENT=3 ; + KEY `bank_account_number` (`bank_account_number`), + KEY `account_code` (`account_code`) +) TYPE=MyISAM AUTO_INCREMENT=3 ; +-- +-- Dumping data for table `0_bank_accounts` +-- -### Data of table `0_bank_accounts` ### - -INSERT INTO `0_bank_accounts` VALUES ('1060', '0', 'Current account', '9999999999', 'Wachovia Bank', '', 'USD', '1', '1', '0000-00-00 00:00:00', '0', '0'); -INSERT INTO `0_bank_accounts` VALUES ('1065', '3', 'Petty Cash account', 'N/A', 'N/A', '', 'USD', '0', '2', '0000-00-00 00:00:00', '0', '0'); +INSERT INTO `0_bank_accounts` VALUES('1060', 0, 'Current account', '9999999999', 'Wachovia Bank', '', 'USD', 1, 1, '0000-00-00 00:00:00', 0, 0); +INSERT INTO `0_bank_accounts` VALUES('1065', 3, 'Petty Cash account', 'N/A', 'N/A', '', 'USD', 0, 2, '0000-00-00 00:00:00', 0, 0); +-- -------------------------------------------------------- -### Structure of table `0_bank_trans` ### +-- +-- Table structure for table `0_bank_trans` +-- DROP TABLE IF EXISTS `0_bank_trans`; - -CREATE TABLE `0_bank_trans` ( +CREATE TABLE IF NOT EXISTS `0_bank_trans` ( `id` int(11) NOT NULL auto_increment, `type` smallint(6) default NULL, `trans_no` int(11) default NULL, - `bank_act` varchar(11) default NULL, + `bank_act` varchar(15) NOT NULL default '', `ref` varchar(40) default NULL, `trans_date` date NOT NULL default '0000-00-00', `amount` double default NULL, @@ -116,30 +140,35 @@ CREATE TABLE `0_bank_trans` ( `reconciled` date default NULL, PRIMARY KEY (`id`), KEY `bank_act` (`bank_act`,`ref`), - KEY `type` (`type`,`trans_no`) -) TYPE=InnoDB AUTO_INCREMENT=12 ; + KEY `type` (`type`,`trans_no`), + KEY `bank_act_2` (`bank_act`,`reconciled`), + KEY `bank_act_3` (`bank_act`,`trans_date`) +) TYPE=InnoDB AUTO_INCREMENT=12 ; +-- +-- Dumping data for table `0_bank_trans` +-- -### Data of table `0_bank_trans` ### - -INSERT INTO `0_bank_trans` VALUES ('1', '22', '4', '1', '1', '2009-06-21', '-3465', '0', '0', '3', '2', NULL); -INSERT INTO `0_bank_trans` VALUES ('2', '26', '1', '1', '', '2009-06-21', '-10', '0', '0', '1', '1', NULL); -INSERT INTO `0_bank_trans` VALUES ('3', '26', '1', '1', '', '2009-06-21', '-20', '0', '0', '1', '0', NULL); -INSERT INTO `0_bank_trans` VALUES ('4', '0', '18', '1', '1', '2009-02-20', '1000', '0', '0', '0', '', NULL); -INSERT INTO `0_bank_trans` VALUES ('5', '0', '19', '1', '2', '2009-02-21', '4000', '0', '0', '0', '', NULL); -INSERT INTO `0_bank_trans` VALUES ('6', '2', '5', '1', '1', '2009-06-21', '100', '0', '0', '4', '3', NULL); -INSERT INTO `0_bank_trans` VALUES ('7', '1', '8', '1', '1', '2009-06-21', '-50', '0', '0', '4', '1', NULL); -INSERT INTO `0_bank_trans` VALUES ('8', '26', '5', '1', '', '2009-06-21', '-10', '0', '0', '1', '1', NULL); -INSERT INTO `0_bank_trans` VALUES ('9', '26', '5', '1', '', '2009-06-21', '-20', '0', '0', '1', '0', NULL); -INSERT INTO `0_bank_trans` VALUES ('10', '26', '7', '1', '', '2009-06-21', '-10', '0', '0', '1', '1', NULL); -INSERT INTO `0_bank_trans` VALUES ('11', '26', '7', '1', '', '2009-06-21', '-20', '0', '0', '1', '0', NULL); +INSERT INTO `0_bank_trans` VALUES(1, 22, 4, '1', '1', '2009-06-21', -3465, 0, 0, 3, '2', NULL); +INSERT INTO `0_bank_trans` VALUES(2, 26, 1, '1', '', '2009-06-21', -10, 0, 0, 1, '1', NULL); +INSERT INTO `0_bank_trans` VALUES(3, 26, 1, '1', '', '2009-06-21', -20, 0, 0, 1, '0', NULL); +INSERT INTO `0_bank_trans` VALUES(4, 0, 18, '1', '1', '2009-02-20', 1000, 0, 0, 0, '', NULL); +INSERT INTO `0_bank_trans` VALUES(5, 0, 19, '1', '2', '2009-02-21', 4000, 0, 0, 0, '', NULL); +INSERT INTO `0_bank_trans` VALUES(6, 2, 5, '1', '1', '2009-06-21', 100, 0, 0, 4, '3', NULL); +INSERT INTO `0_bank_trans` VALUES(7, 1, 8, '1', '1', '2009-06-21', -50, 0, 0, 4, '1', NULL); +INSERT INTO `0_bank_trans` VALUES(8, 26, 5, '1', '', '2009-06-21', -10, 0, 0, 1, '1', NULL); +INSERT INTO `0_bank_trans` VALUES(9, 26, 5, '1', '', '2009-06-21', -20, 0, 0, 1, '0', NULL); +INSERT INTO `0_bank_trans` VALUES(10, 26, 7, '1', '', '2009-06-21', -10, 0, 0, 1, '1', NULL); +INSERT INTO `0_bank_trans` VALUES(11, 26, 7, '1', '', '2009-06-21', -20, 0, 0, 1, '0', NULL); +-- -------------------------------------------------------- -### Structure of table `0_bom` ### +-- +-- Table structure for table `0_bom` +-- DROP TABLE IF EXISTS `0_bom`; - -CREATE TABLE `0_bom` ( +CREATE TABLE IF NOT EXISTS `0_bom` ( `id` int(11) NOT NULL auto_increment, `parent` char(20) NOT NULL default '', `component` char(20) NOT NULL default '', @@ -151,28 +180,30 @@ CREATE TABLE `0_bom` ( KEY `id` (`id`), KEY `loc_code` (`loc_code`), KEY `parent` (`parent`,`loc_code`), - KEY `Parent_2` (`parent`), KEY `workcentre_added` (`workcentre_added`) -) TYPE=MyISAM AUTO_INCREMENT=4 ; +) TYPE=MyISAM AUTO_INCREMENT=4 ; +-- +-- Dumping data for table `0_bom` +-- -### Data of table `0_bom` ### - -INSERT INTO `0_bom` VALUES ('1', '3400', '102', '1', 'DEF', '1'); -INSERT INTO `0_bom` VALUES ('2', '3400', '103', '1', 'DEF', '1'); -INSERT INTO `0_bom` VALUES ('3', '3400', '104', '1', 'DEF', '1'); +INSERT INTO `0_bom` VALUES(1, '3400', '102', 1, 'DEF', 1); +INSERT INTO `0_bom` VALUES(2, '3400', '103', 1, 'DEF', 1); +INSERT INTO `0_bom` VALUES(3, '3400', '104', 1, 'DEF', 1); +-- -------------------------------------------------------- -### Structure of table `0_budget_trans` ### +-- +-- Table structure for table `0_budget_trans` +-- DROP TABLE IF EXISTS `0_budget_trans`; - -CREATE TABLE `0_budget_trans` ( +CREATE TABLE IF NOT EXISTS `0_budget_trans` ( `counter` int(11) NOT NULL auto_increment, `type` smallint(6) NOT NULL default '0', `type_no` bigint(16) NOT NULL default '1', `tran_date` date NOT NULL default '0000-00-00', - `account` varchar(11) NOT NULL default '', + `account` varchar(15) NOT NULL default '', `memo_` tinytext NOT NULL, `amount` double NOT NULL default '0', `dimension_id` int(11) default '0', @@ -180,270 +211,333 @@ CREATE TABLE `0_budget_trans` ( `person_type_id` int(11) default NULL, `person_id` tinyblob, PRIMARY KEY (`counter`), - KEY `Type_and_Number` (`type`,`type_no`) -) TYPE=InnoDB AUTO_INCREMENT=1 ; + KEY `Type_and_Number` (`type`,`type_no`), + KEY `Account` (`account`,`tran_date`,`dimension_id`,`dimension2_id`) +) TYPE=InnoDB AUTO_INCREMENT=1 ; - -### Data of table `0_budget_trans` ### +-- +-- Dumping data for table `0_budget_trans` +-- +-- -------------------------------------------------------- -### Structure of table `0_chart_class` ### +-- +-- Table structure for table `0_chart_class` +-- DROP TABLE IF EXISTS `0_chart_class`; - -CREATE TABLE `0_chart_class` ( - `cid` int(11) NOT NULL default '0', +CREATE TABLE IF NOT EXISTS `0_chart_class` ( + `cid` varchar(3) NOT NULL, `class_name` varchar(60) NOT NULL default '', `ctype` tinyint(1) NOT NULL default '0', `inactive` tinyint(1) NOT NULL default '0', PRIMARY KEY (`cid`) -) TYPE=MyISAM ; - +) TYPE=MyISAM; -### Data of table `0_chart_class` ### +-- +-- Dumping data for table `0_chart_class` +-- -INSERT INTO `0_chart_class` VALUES ('1', 'Assets', '1', '0'); -INSERT INTO `0_chart_class` VALUES ('2', 'Liabilities', '2', '0'); -INSERT INTO `0_chart_class` VALUES ('3', 'Income', '4', '0'); -INSERT INTO `0_chart_class` VALUES ('4', 'Costs', '6', '0'); +INSERT INTO `0_chart_class` VALUES('1', 'Assets', 1, 0); +INSERT INTO `0_chart_class` VALUES('2', 'Liabilities', 2, 0); +INSERT INTO `0_chart_class` VALUES('3', 'Income', 4, 0); +INSERT INTO `0_chart_class` VALUES('4', 'Costs', 6, 0); +-- -------------------------------------------------------- -### Structure of table `0_chart_master` ### +-- +-- Table structure for table `0_chart_master` +-- DROP TABLE IF EXISTS `0_chart_master`; - -CREATE TABLE `0_chart_master` ( - `account_code` varchar(11) NOT NULL default '', - `account_code2` varchar(11) default '', +CREATE TABLE IF NOT EXISTS `0_chart_master` ( + `account_code` varchar(15) NOT NULL default '', + `account_code2` varchar(15) NOT NULL default '', `account_name` varchar(60) NOT NULL default '', - `account_type` int(11) NOT NULL default '0', + `account_type` varchar(10) NOT NULL default '0', `inactive` tinyint(1) NOT NULL default '0', PRIMARY KEY (`account_code`), - KEY `account_code` (`account_code`), - KEY `account_name` (`account_name`) -) TYPE=MyISAM ; - - -### Data of table `0_chart_master` ### - -INSERT INTO `0_chart_master` VALUES ('1060', '', 'Checking Account', '1', '0'); -INSERT INTO `0_chart_master` VALUES ('1065', '', 'Petty Cash', '1', '0'); -INSERT INTO `0_chart_master` VALUES ('1200', '', 'Accounts Receivables', '1', '0'); -INSERT INTO `0_chart_master` VALUES ('1205', '', 'Allowance for doubtful accounts', '1', '0'); -INSERT INTO `0_chart_master` VALUES ('1510', '', 'Inventory', '2', '0'); -INSERT INTO `0_chart_master` VALUES ('1520', '', 'Stocks of Raw Materials', '2', '0'); -INSERT INTO `0_chart_master` VALUES ('1530', '', 'Stocks of Work In Progress', '2', '0'); -INSERT INTO `0_chart_master` VALUES ('1540', '', 'Stocks of Finsihed Goods', '2', '0'); -INSERT INTO `0_chart_master` VALUES ('1550', '', 'Goods Received Clearing account', '2', '0'); -INSERT INTO `0_chart_master` VALUES ('1820', '', 'Office Furniture & Equipment', '3', '0'); -INSERT INTO `0_chart_master` VALUES ('1825', '', 'Accum. Amort. -Furn. & Equip.', '3', '0'); -INSERT INTO `0_chart_master` VALUES ('1840', '', 'Vehicle', '3', '0'); -INSERT INTO `0_chart_master` VALUES ('1845', '', 'Accum. Amort. -Vehicle', '3', '0'); -INSERT INTO `0_chart_master` VALUES ('2100', '', 'Accounts Payable', '4', '0'); -INSERT INTO `0_chart_master` VALUES ('2110', '', 'Accrued Income Tax - Federal', '4', '0'); -INSERT INTO `0_chart_master` VALUES ('2120', '', 'Accrued Income Tax - State', '4', '0'); -INSERT INTO `0_chart_master` VALUES ('2130', '', 'Accrued Franchise Tax', '4', '0'); -INSERT INTO `0_chart_master` VALUES ('2140', '', 'Accrued Real & Personal Prop Tax', '4', '0'); -INSERT INTO `0_chart_master` VALUES ('2145', '', 'Purchase Tax', '4', '0'); -INSERT INTO `0_chart_master` VALUES ('2150', '', 'Sales Tax', '4', '0'); -INSERT INTO `0_chart_master` VALUES ('2160', '', 'Accrued Use Tax Payable', '4', '0'); -INSERT INTO `0_chart_master` VALUES ('2210', '', 'Accrued Wages', '4', '0'); -INSERT INTO `0_chart_master` VALUES ('2220', '', 'Accrued Comp Time', '4', '0'); -INSERT INTO `0_chart_master` VALUES ('2230', '', 'Accrued Holiday Pay', '4', '0'); -INSERT INTO `0_chart_master` VALUES ('2240', '', 'Accrued Vacation Pay', '4', '0'); -INSERT INTO `0_chart_master` VALUES ('2310', '', 'Accr. Benefits - 401K', '4', '0'); -INSERT INTO `0_chart_master` VALUES ('2320', '', 'Accr. Benefits - Stock Purchase', '4', '0'); -INSERT INTO `0_chart_master` VALUES ('2330', '', 'Accr. Benefits - Med, Den', '4', '0'); -INSERT INTO `0_chart_master` VALUES ('2340', '', 'Accr. Benefits - Payroll Taxes', '4', '0'); -INSERT INTO `0_chart_master` VALUES ('2350', '', 'Accr. Benefits - Credit Union', '4', '0'); -INSERT INTO `0_chart_master` VALUES ('2360', '', 'Accr. Benefits - Savings Bond', '4', '0'); -INSERT INTO `0_chart_master` VALUES ('2370', '', 'Accr. Benefits - Garnish', '4', '0'); -INSERT INTO `0_chart_master` VALUES ('2380', '', 'Accr. Benefits - Charity Cont.', '4', '0'); -INSERT INTO `0_chart_master` VALUES ('2620', '', 'Bank Loans', '5', '0'); -INSERT INTO `0_chart_master` VALUES ('2680', '', 'Loans from Shareholders', '5', '0'); -INSERT INTO `0_chart_master` VALUES ('3350', '', 'Common Shares', '6', '0'); -INSERT INTO `0_chart_master` VALUES ('3590', '', 'Retained Earnings - prior years', '7', '0'); -INSERT INTO `0_chart_master` VALUES ('4010', '', 'Sales', '8', '0'); -INSERT INTO `0_chart_master` VALUES ('4430', '', 'Shipping & Handling', '9', '0'); -INSERT INTO `0_chart_master` VALUES ('4440', '', 'Interest', '9', '0'); -INSERT INTO `0_chart_master` VALUES ('4450', '', 'Foreign Exchange Gain', '9', '0'); -INSERT INTO `0_chart_master` VALUES ('4500', '', 'Prompt Payment Discounts', '9', '0'); -INSERT INTO `0_chart_master` VALUES ('4510', '', 'Discounts Given', '9', '0'); -INSERT INTO `0_chart_master` VALUES ('5010', '', 'Cost of Goods Sold - Retail', '10', '0'); -INSERT INTO `0_chart_master` VALUES ('5020', '', 'Material Usage Varaiance', '10', '0'); -INSERT INTO `0_chart_master` VALUES ('5030', '', 'Consumable Materials', '10', '0'); -INSERT INTO `0_chart_master` VALUES ('5040', '', 'Purchase price Variance', '10', '0'); -INSERT INTO `0_chart_master` VALUES ('5050', '', 'Purchases of materials', '10', '0'); -INSERT INTO `0_chart_master` VALUES ('5060', '', 'Discounts Received', '10', '0'); -INSERT INTO `0_chart_master` VALUES ('5100', '', 'Freight', '10', '0'); -INSERT INTO `0_chart_master` VALUES ('5410', '', 'Wages & Salaries', '11', '0'); -INSERT INTO `0_chart_master` VALUES ('5420', '', 'Wages - Overtime', '11', '0'); -INSERT INTO `0_chart_master` VALUES ('5430', '', 'Benefits - Comp Time', '11', '0'); -INSERT INTO `0_chart_master` VALUES ('5440', '', 'Benefits - Payroll Taxes', '11', '0'); -INSERT INTO `0_chart_master` VALUES ('5450', '', 'Benefits - Workers Comp', '11', '0'); -INSERT INTO `0_chart_master` VALUES ('5460', '', 'Benefits - Pension', '11', '0'); -INSERT INTO `0_chart_master` VALUES ('5470', '', 'Benefits - General Benefits', '11', '0'); -INSERT INTO `0_chart_master` VALUES ('5510', '', 'Inc Tax Exp - Federal', '11', '0'); -INSERT INTO `0_chart_master` VALUES ('5520', '', 'Inc Tax Exp - State', '11', '0'); -INSERT INTO `0_chart_master` VALUES ('5530', '', 'Taxes - Real Estate', '11', '0'); -INSERT INTO `0_chart_master` VALUES ('5540', '', 'Taxes - Personal Property', '11', '0'); -INSERT INTO `0_chart_master` VALUES ('5550', '', 'Taxes - Franchise', '11', '0'); -INSERT INTO `0_chart_master` VALUES ('5560', '', 'Taxes - Foreign Withholding', '11', '0'); -INSERT INTO `0_chart_master` VALUES ('5610', '', 'Accounting & Legal', '12', '0'); -INSERT INTO `0_chart_master` VALUES ('5615', '', 'Advertising & Promotions', '12', '0'); -INSERT INTO `0_chart_master` VALUES ('5620', '', 'Bad Debts', '12', '0'); -INSERT INTO `0_chart_master` VALUES ('5660', '', 'Amortization Expense', '12', '0'); -INSERT INTO `0_chart_master` VALUES ('5685', '', 'Insurance', '12', '0'); -INSERT INTO `0_chart_master` VALUES ('5690', '', 'Interest & Bank Charges', '12', '0'); -INSERT INTO `0_chart_master` VALUES ('5700', '', 'Office Supplies', '12', '0'); -INSERT INTO `0_chart_master` VALUES ('5760', '', 'Rent', '12', '0'); -INSERT INTO `0_chart_master` VALUES ('5765', '', 'Repair & Maintenance', '12', '0'); -INSERT INTO `0_chart_master` VALUES ('5780', '', 'Telephone', '12', '0'); -INSERT INTO `0_chart_master` VALUES ('5785', '', 'Travel & Entertainment', '12', '0'); -INSERT INTO `0_chart_master` VALUES ('5790', '', 'Utilities', '12', '0'); -INSERT INTO `0_chart_master` VALUES ('5795', '', 'Registrations', '12', '0'); -INSERT INTO `0_chart_master` VALUES ('5800', '', 'Licenses', '12', '0'); -INSERT INTO `0_chart_master` VALUES ('5810', '', 'Foreign Exchange Loss', '12', '0'); -INSERT INTO `0_chart_master` VALUES ('9990', '', 'Year Profit/Loss', '12', '0'); - -### Structure of table `0_chart_types` ### + KEY `account_name` (`account_name`), + KEY `accounts_by_type` (`account_type`,`account_code`) +) TYPE=MyISAM; -DROP TABLE IF EXISTS `0_chart_types`; +-- +-- Dumping data for table `0_chart_master` +-- -CREATE TABLE `0_chart_types` ( - `id` int(11) NOT NULL auto_increment, +INSERT INTO `0_chart_master` VALUES('1060', '', 'Checking Account', '1', 0); +INSERT INTO `0_chart_master` VALUES('1065', '', 'Petty Cash', '1', 0); +INSERT INTO `0_chart_master` VALUES('1200', '', 'Accounts Receivables', '1', 0); +INSERT INTO `0_chart_master` VALUES('1205', '', 'Allowance for doubtful accounts', '1', 0); +INSERT INTO `0_chart_master` VALUES('1510', '', 'Inventory', '2', 0); +INSERT INTO `0_chart_master` VALUES('1520', '', 'Stocks of Raw Materials', '2', 0); +INSERT INTO `0_chart_master` VALUES('1530', '', 'Stocks of Work In Progress', '2', 0); +INSERT INTO `0_chart_master` VALUES('1540', '', 'Stocks of Finsihed Goods', '2', 0); +INSERT INTO `0_chart_master` VALUES('1550', '', 'Goods Received Clearing account', '2', 0); +INSERT INTO `0_chart_master` VALUES('1820', '', 'Office Furniture & Equipment', '3', 0); +INSERT INTO `0_chart_master` VALUES('1825', '', 'Accum. Amort. -Furn. & Equip.', '3', 0); +INSERT INTO `0_chart_master` VALUES('1840', '', 'Vehicle', '3', 0); +INSERT INTO `0_chart_master` VALUES('1845', '', 'Accum. Amort. -Vehicle', '3', 0); +INSERT INTO `0_chart_master` VALUES('2100', '', 'Accounts Payable', '4', 0); +INSERT INTO `0_chart_master` VALUES('2110', '', 'Accrued Income Tax - Federal', '4', 0); +INSERT INTO `0_chart_master` VALUES('2120', '', 'Accrued Income Tax - State', '4', 0); +INSERT INTO `0_chart_master` VALUES('2130', '', 'Accrued Franchise Tax', '4', 0); +INSERT INTO `0_chart_master` VALUES('2140', '', 'Accrued Real & Personal Prop Tax', '4', 0); +INSERT INTO `0_chart_master` VALUES('2150', '', 'Sales Tax', '4', 0); +INSERT INTO `0_chart_master` VALUES('2160', '', 'Accrued Use Tax Payable', '4', 0); +INSERT INTO `0_chart_master` VALUES('2210', '', 'Accrued Wages', '4', 0); +INSERT INTO `0_chart_master` VALUES('2220', '', 'Accrued Comp Time', '4', 0); +INSERT INTO `0_chart_master` VALUES('2230', '', 'Accrued Holiday Pay', '4', 0); +INSERT INTO `0_chart_master` VALUES('2240', '', 'Accrued Vacation Pay', '4', 0); +INSERT INTO `0_chart_master` VALUES('2310', '', 'Accr. Benefits - 401K', '4', 0); +INSERT INTO `0_chart_master` VALUES('2320', '', 'Accr. Benefits - Stock Purchase', '4', 0); +INSERT INTO `0_chart_master` VALUES('2330', '', 'Accr. Benefits - Med, Den', '4', 0); +INSERT INTO `0_chart_master` VALUES('2340', '', 'Accr. Benefits - Payroll Taxes', '4', 0); +INSERT INTO `0_chart_master` VALUES('2350', '', 'Accr. Benefits - Credit Union', '4', 0); +INSERT INTO `0_chart_master` VALUES('2360', '', 'Accr. Benefits - Savings Bond', '4', 0); +INSERT INTO `0_chart_master` VALUES('2370', '', 'Accr. Benefits - Garnish', '4', 0); +INSERT INTO `0_chart_master` VALUES('2380', '', 'Accr. Benefits - Charity Cont.', '4', 0); +INSERT INTO `0_chart_master` VALUES('2620', '', 'Bank Loans', '5', 0); +INSERT INTO `0_chart_master` VALUES('2680', '', 'Loans from Shareholders', '5', 0); +INSERT INTO `0_chart_master` VALUES('3350', '', 'Common Shares', '6', 0); +INSERT INTO `0_chart_master` VALUES('3590', '', 'Retained Earnings - prior years', '7', 0); +INSERT INTO `0_chart_master` VALUES('4010', '', 'Sales', '8', 0); +INSERT INTO `0_chart_master` VALUES('4430', '', 'Shipping & Handling', '9', 0); +INSERT INTO `0_chart_master` VALUES('4440', '', 'Interest', '9', 0); +INSERT INTO `0_chart_master` VALUES('4450', '', 'Foreign Exchange Gain', '9', 0); +INSERT INTO `0_chart_master` VALUES('4500', '', 'Prompt Payment Discounts', '9', 0); +INSERT INTO `0_chart_master` VALUES('4510', '', 'Discounts Given', '9', 0); +INSERT INTO `0_chart_master` VALUES('5010', '', 'Cost of Goods Sold - Retail', '10', 0); +INSERT INTO `0_chart_master` VALUES('5020', '', 'Material Usage Varaiance', '10', 0); +INSERT INTO `0_chart_master` VALUES('5030', '', 'Consumable Materials', '10', 0); +INSERT INTO `0_chart_master` VALUES('5040', '', 'Purchase price Variance', '10', 0); +INSERT INTO `0_chart_master` VALUES('5050', '', 'Purchases of materials', '10', 0); +INSERT INTO `0_chart_master` VALUES('5060', '', 'Discounts Received', '10', 0); +INSERT INTO `0_chart_master` VALUES('5100', '', 'Freight', '10', 0); +INSERT INTO `0_chart_master` VALUES('5410', '', 'Wages & Salaries', '11', 0); +INSERT INTO `0_chart_master` VALUES('5420', '', 'Wages - Overtime', '11', 0); +INSERT INTO `0_chart_master` VALUES('5430', '', 'Benefits - Comp Time', '11', 0); +INSERT INTO `0_chart_master` VALUES('5440', '', 'Benefits - Payroll Taxes', '11', 0); +INSERT INTO `0_chart_master` VALUES('5450', '', 'Benefits - Workers Comp', '11', 0); +INSERT INTO `0_chart_master` VALUES('5460', '', 'Benefits - Pension', '11', 0); +INSERT INTO `0_chart_master` VALUES('5470', '', 'Benefits - General Benefits', '11', 0); +INSERT INTO `0_chart_master` VALUES('5510', '', 'Inc Tax Exp - Federal', '11', 0); +INSERT INTO `0_chart_master` VALUES('5520', '', 'Inc Tax Exp - State', '11', 0); +INSERT INTO `0_chart_master` VALUES('5530', '', 'Taxes - Real Estate', '11', 0); +INSERT INTO `0_chart_master` VALUES('5540', '', 'Taxes - Personal Property', '11', 0); +INSERT INTO `0_chart_master` VALUES('5550', '', 'Taxes - Franchise', '11', 0); +INSERT INTO `0_chart_master` VALUES('5560', '', 'Taxes - Foreign Withholding', '11', 0); +INSERT INTO `0_chart_master` VALUES('5610', '', 'Accounting & Legal', '12', 0); +INSERT INTO `0_chart_master` VALUES('5615', '', 'Advertising & Promotions', '12', 0); +INSERT INTO `0_chart_master` VALUES('5620', '', 'Bad Debts', '12', 0); +INSERT INTO `0_chart_master` VALUES('5660', '', 'Amortization Expense', '12', 0); +INSERT INTO `0_chart_master` VALUES('5685', '', 'Insurance', '12', 0); +INSERT INTO `0_chart_master` VALUES('5690', '', 'Interest & Bank Charges', '12', 0); +INSERT INTO `0_chart_master` VALUES('5700', '', 'Office Supplies', '12', 0); +INSERT INTO `0_chart_master` VALUES('5760', '', 'Rent', '12', 0); +INSERT INTO `0_chart_master` VALUES('5765', '', 'Repair & Maintenance', '12', 0); +INSERT INTO `0_chart_master` VALUES('5780', '', 'Telephone', '12', 0); +INSERT INTO `0_chart_master` VALUES('5785', '', 'Travel & Entertainment', '12', 0); +INSERT INTO `0_chart_master` VALUES('5790', '', 'Utilities', '12', 0); +INSERT INTO `0_chart_master` VALUES('5795', '', 'Registrations', '12', 0); +INSERT INTO `0_chart_master` VALUES('5800', '', 'Licenses', '12', 0); +INSERT INTO `0_chart_master` VALUES('5810', '', 'Foreign Exchange Loss', '12', 0); +INSERT INTO `0_chart_master` VALUES('9990', '', 'Year Profit/Loss', '12', 0); + +-- -------------------------------------------------------- + +-- +-- Table structure for table `0_chart_types` +-- + +DROP TABLE IF EXISTS `0_chart_types`; +CREATE TABLE IF NOT EXISTS `0_chart_types` ( + `id` varchar(10) NOT NULL, `name` varchar(60) NOT NULL default '', - `class_id` tinyint(1) NOT NULL default '0', - `parent` int(11) NOT NULL default '-1', + `class_id` varchar(3) NOT NULL default '', + `parent` varchar(10) NOT NULL default '-1', `inactive` tinyint(1) NOT NULL default '0', PRIMARY KEY (`id`), - KEY `name` (`name`) -) TYPE=MyISAM AUTO_INCREMENT=13 ; - + KEY `name` (`name`), + KEY `class_id` (`class_id`) +) TYPE=MyISAM ; -### Data of table `0_chart_types` ### - -INSERT INTO `0_chart_types` VALUES ('1', 'Current Assets', '1', '-1', '0'); -INSERT INTO `0_chart_types` VALUES ('2', 'Inventory Assets', '1', '-1', '0'); -INSERT INTO `0_chart_types` VALUES ('3', 'Capital Assets', '1', '-1', '0'); -INSERT INTO `0_chart_types` VALUES ('4', 'Current Liabilities', '2', '-1', '0'); -INSERT INTO `0_chart_types` VALUES ('5', 'Long Term Liabilities', '2', '-1', '0'); -INSERT INTO `0_chart_types` VALUES ('6', 'Share Capital', '2', '-1', '0'); -INSERT INTO `0_chart_types` VALUES ('7', 'Retained Earnings', '2', '-1', '0'); -INSERT INTO `0_chart_types` VALUES ('8', 'Sales Revenue', '3', '-1', '0'); -INSERT INTO `0_chart_types` VALUES ('9', 'Other Revenue', '3', '-1', '0'); -INSERT INTO `0_chart_types` VALUES ('10', 'Cost of Goods Sold', '4', '-1', '0'); -INSERT INTO `0_chart_types` VALUES ('11', 'Payroll Expenses', '4', '-1', '0'); -INSERT INTO `0_chart_types` VALUES ('12', 'General & Administrative expenses', '4', '-1', '0'); +-- +-- Dumping data for table `0_chart_types` +-- +INSERT INTO `0_chart_types` VALUES('1', 'Current Assets', '1', '', 0); +INSERT INTO `0_chart_types` VALUES('2', 'Inventory Assets', '1', '', 0); +INSERT INTO `0_chart_types` VALUES('3', 'Capital Assets', '1', '', 0); +INSERT INTO `0_chart_types` VALUES('4', 'Current Liabilities', '2', '', 0); +INSERT INTO `0_chart_types` VALUES('5', 'Long Term Liabilities', '2', '', 0); +INSERT INTO `0_chart_types` VALUES('6', 'Share Capital', '2', '', 0); +INSERT INTO `0_chart_types` VALUES('7', 'Retained Earnings', '2', '', 0); +INSERT INTO `0_chart_types` VALUES('8', 'Sales Revenue', '3', '', 0); +INSERT INTO `0_chart_types` VALUES('9', 'Other Revenue', '3', '', 0); +INSERT INTO `0_chart_types` VALUES('10', 'Cost of Goods Sold', '4', '', 0); +INSERT INTO `0_chart_types` VALUES('11', 'Payroll Expenses', '4', '', 0); +INSERT INTO `0_chart_types` VALUES('12', 'General & Administrative expenses', '4', '', 0); + +-- -------------------------------------------------------- -### Structure of table `0_comments` ### +-- +-- Table structure for table `0_comments` +-- DROP TABLE IF EXISTS `0_comments`; - -CREATE TABLE `0_comments` ( +CREATE TABLE IF NOT EXISTS `0_comments` ( `type` int(11) NOT NULL default '0', `id` int(11) NOT NULL default '0', `date_` date default '0000-00-00', - `memo_` tinytext -) TYPE=InnoDB ; - - -### Data of table `0_comments` ### - + `memo_` tinytext, + KEY `type_and_id` (`type`,`id`) +) TYPE=InnoDB; +-- +-- Dumping data for table `0_comments` +-- -### Structure of table `0_company` ### -DROP TABLE IF EXISTS `0_company`; +-- -------------------------------------------------------- -CREATE TABLE `0_company` ( - `coy_code` int(11) NOT NULL default '1', - `coy_name` varchar(60) NOT NULL default '', - `gst_no` varchar(25) NOT NULL default '', - `coy_no` varchar(25) NOT NULL default '0', - `tax_prd` int(11) NOT NULL default '1', - `tax_last` int(11) NOT NULL default '1', - `postal_address` tinytext NOT NULL, - `phone` varchar(30) NOT NULL default '', - `fax` varchar(30) NOT NULL default '', - `email` varchar(100) NOT NULL default '', - `coy_logo` varchar(100) NOT NULL default '', - `domicile` varchar(55) NOT NULL default '', - `curr_default` char(3) NOT NULL default '', - `debtors_act` varchar(11) NOT NULL default '', - `pyt_discount_act` varchar(11) NOT NULL default '', - `creditors_act` varchar(11) NOT NULL default '', - `bank_charge_act` varchar(11) NOT NULL default '', - `exchange_diff_act` varchar(11) NOT NULL default '', - `profit_loss_year_act` varchar(11) NOT NULL default '', - `retained_earnings_act` varchar(11) NOT NULL default '', - `freight_act` varchar(11) NOT NULL default '', - `default_sales_act` varchar(11) NOT NULL default '', - `default_sales_discount_act` varchar(11) NOT NULL default '', - `default_prompt_payment_act` varchar(11) NOT NULL default '', - `default_inventory_act` varchar(11) NOT NULL default '', - `default_cogs_act` varchar(11) NOT NULL default '', - `default_adj_act` varchar(11) NOT NULL default '', - `default_inv_sales_act` varchar(11) NOT NULL default '', - `default_assembly_act` varchar(11) NOT NULL default '', - `payroll_act` varchar(11) NOT NULL default '', - `allow_negative_stock` tinyint(1) NOT NULL default '0', - `po_over_receive` int(11) NOT NULL default '10', - `po_over_charge` int(11) NOT NULL default '10', - `default_credit_limit` int(11) NOT NULL default '1000', - `default_workorder_required` int(11) NOT NULL default '20', - `default_dim_required` int(11) NOT NULL default '20', - `past_due_days` int(11) NOT NULL default '30', - `use_dimension` tinyint(1) default '0', - `f_year` int(11) NOT NULL default '1', - `no_item_list` tinyint(1) NOT NULL default '0', - `no_customer_list` tinyint(1) NOT NULL default '0', - `no_supplier_list` tinyint(1) NOT NULL default '0', - `base_sales` int(11) NOT NULL default '-1', - `foreign_codes` tinyint(1) NOT NULL default '0', - `accumulate_shipping` tinyint(1) NOT NULL default '0', - `legal_text` tinytext NOT NULL, - `default_delivery_required` smallint(6) NOT NULL default '1', - `version_id` varchar(11) NOT NULL default '', - `time_zone` tinyint(1) NOT NULL default '0', - `add_pct` int(5) NOT NULL default '-1', - `round_to` int(5) NOT NULL default '1', - `login_tout` SMALLINT(6) NOT NULL DEFAULT '600', - PRIMARY KEY (`coy_code`) -) TYPE=MyISAM ; - -### Data of table `0_company` ### - -INSERT INTO `0_company` VALUES ('1', 'Training Co.', '9876543', '123456789', '1', '1', 'Address 1\r\nAddress 2\r\nAddress 3', '(222) 111.222.333', '', 'delta@delta.com', 'logo_frontaccounting.jpg', '', 'USD', '1200', '5060', '2100', '5690', '4450', '9990', '3590', '4430', '4010', '4510', '4500', '1510', '5010', '5040', '4010', '1530', '5000', '0', '10', '10', '1000', '20', '20', '30', '1', '3', '0', '0', '0', '1', '0', '0', '', '1', '2.2', '0', '-1', '1', '600'); - -### Structure of table `0_credit_status` ### +-- +-- Table structure for table `0_credit_status` +-- DROP TABLE IF EXISTS `0_credit_status`; - -CREATE TABLE `0_credit_status` ( +CREATE TABLE IF NOT EXISTS `0_credit_status` ( `id` int(11) NOT NULL auto_increment, `reason_description` char(100) NOT NULL default '', `dissallow_invoices` tinyint(1) NOT NULL default '0', `inactive` tinyint(1) NOT NULL default '0', PRIMARY KEY (`id`), UNIQUE KEY `reason_description` (`reason_description`) -) TYPE=MyISAM AUTO_INCREMENT=5 ; +) TYPE=MyISAM AUTO_INCREMENT=5 ; + +-- +-- Dumping data for table `0_credit_status` +-- + +INSERT INTO `0_credit_status` VALUES(1, 'Good History', 0, 0); +INSERT INTO `0_credit_status` VALUES(3, 'No more work until payment received', 1, 0); +INSERT INTO `0_credit_status` VALUES(4, 'In liquidation', 1, 0); + +-- -------------------------------------------------------- + +-- +-- Table structure for table `0_crm_categories` +-- + +DROP TABLE IF EXISTS `0_crm_categories`; +CREATE TABLE IF NOT EXISTS `0_crm_categories` ( + `id` int(11) NOT NULL auto_increment COMMENT 'pure technical key', + `type` varchar(20) NOT NULL COMMENT 'contact type e.g. customer', + `action` varchar(20) NOT NULL COMMENT 'detailed usage e.g. department', + `name` varchar(30) NOT NULL COMMENT 'for category selector', + `description` tinytext NOT NULL COMMENT 'usage description', + `system` tinyint(1) NOT NULL default '0' COMMENT 'nonzero for core system usage', + `inactive` tinyint(1) NOT NULL default '0', + PRIMARY KEY (`id`), + UNIQUE KEY `type` (`type`,`action`), + UNIQUE KEY `type_2` (`type`,`name`) +) TYPE=InnoDB AUTO_INCREMENT=13 ; + +-- +-- Dumping data for table `0_crm_categories` +-- +INSERT INTO `0_crm_categories` VALUES(1, 'cust_branch', 'general', 'General', 'General contact data for customer branch (overrides company setting)', 1, 0); +INSERT INTO `0_crm_categories` VALUES(2, 'cust_branch', 'invoice', 'Invoices', 'Invoice posting (overrides company setting)', 1, 0); +INSERT INTO `0_crm_categories` VALUES(3, 'cust_branch', 'order', 'Orders', 'Order confirmation (overrides company setting)', 1, 0); +INSERT INTO `0_crm_categories` VALUES(4, 'cust_branch', 'delivery', 'Deliveries', 'Delivery coordination (overrides company setting)', 1, 0); +INSERT INTO `0_crm_categories` VALUES(5, 'customer', 'general', 'General', 'General contact data for customer', 1, 0); +INSERT INTO `0_crm_categories` VALUES(6, 'customer', 'order', 'Orders', 'Order confirmation', 1, 0); +INSERT INTO `0_crm_categories` VALUES(7, 'customer', 'delivery', 'Deliveries', 'Delivery coordination', 1, 0); +INSERT INTO `0_crm_categories` VALUES(8, 'customer', 'invoice', 'Invoices', 'Invoice posting', 1, 0); +INSERT INTO `0_crm_categories` VALUES(9, 'supplier', 'general', 'General', 'General contact data for supplier', 1, 0); +INSERT INTO `0_crm_categories` VALUES(10, 'supplier', 'order', 'Orders', 'Order confirmation', 1, 0); +INSERT INTO `0_crm_categories` VALUES(11, 'supplier', 'delivery', 'Deliveries', 'Delivery coordination', 1, 0); +INSERT INTO `0_crm_categories` VALUES(12, 'supplier', 'invoice', 'Invoices', 'Invoice posting', 1, 0); + +-- -------------------------------------------------------- -### Data of table `0_credit_status` ### +-- +-- Table structure for table `0_crm_contacts` +-- + +DROP TABLE IF EXISTS `0_crm_contacts`; +CREATE TABLE IF NOT EXISTS `0_crm_contacts` ( + `id` int(11) NOT NULL auto_increment, + `person_id` int(11) NOT NULL default '0' COMMENT 'foreign key to crm_contacts', + `type` varchar(20) NOT NULL COMMENT 'foreign key to crm_categories', + `action` varchar(20) NOT NULL COMMENT 'foreign key to crm_categories', + `entity_id` varchar(11) default NULL COMMENT 'entity id in related class table', + PRIMARY KEY (`id`), + KEY `type` (`type`,`action`) +) TYPE=InnoDB AUTO_INCREMENT=10 ; -INSERT INTO `0_credit_status` VALUES ('1', 'Good History', '0', '0'); -INSERT INTO `0_credit_status` VALUES ('3', 'No more work until payment received', '1', '0'); -INSERT INTO `0_credit_status` VALUES ('4', 'In liquidation', '1', '0'); +-- +-- Dumping data for table `0_crm_contacts` +-- +INSERT INTO `0_crm_contacts` VALUES(1, 1, 'customer', 'general', '1'); +INSERT INTO `0_crm_contacts` VALUES(2, 2, 'customer', 'general', '2'); +INSERT INTO `0_crm_contacts` VALUES(3, 3, 'customer', 'general', '3'); +INSERT INTO `0_crm_contacts` VALUES(4, 4, 'cust_branch', 'general', '1'); +INSERT INTO `0_crm_contacts` VALUES(5, 5, 'cust_branch', 'general', '2'); +INSERT INTO `0_crm_contacts` VALUES(6, 6, 'cust_branch', 'general', '3'); +INSERT INTO `0_crm_contacts` VALUES(7, 7, 'supplier', 'general', '1'); +INSERT INTO `0_crm_contacts` VALUES(8, 8, 'supplier', 'general', '2'); +INSERT INTO `0_crm_contacts` VALUES(9, 9, 'supplier', 'general', '3'); -### Structure of table `0_currencies` ### +-- -------------------------------------------------------- -DROP TABLE IF EXISTS `0_currencies`; +-- +-- Table structure for table `0_crm_persons` +-- + +DROP TABLE IF EXISTS `0_crm_persons`; +CREATE TABLE IF NOT EXISTS `0_crm_persons` ( + `id` int(11) NOT NULL auto_increment, + `ref` varchar(30) NOT NULL, + `name` varchar(60) NOT NULL, + `name2` varchar(60) default NULL, + `address` tinytext, + `phone` varchar(30) default NULL, + `phone2` varchar(30) default NULL, + `fax` varchar(30) default NULL, + `email` varchar(100) default NULL, + `lang` char(5) default NULL, + `notes` tinytext NOT NULL, + `inactive` tinyint(1) NOT NULL default '0', + PRIMARY KEY (`id`), + KEY `ref` (`ref`) +) TYPE=InnoDB AUTO_INCREMENT=10 ; + +-- +-- Dumping data for table `0_crm_persons` +-- + +INSERT INTO `0_crm_persons` VALUES(1, 'Beefeater', '', NULL, NULL, NULL, NULL, NULL, '', 'C', '', 0); +INSERT INTO `0_crm_persons` VALUES(2, 'Ghostbusters', '', NULL, NULL, NULL, NULL, NULL, '', NULL, '', 0); +INSERT INTO `0_crm_persons` VALUES(3, 'Brezan', '', NULL, NULL, NULL, NULL, NULL, '', 'C', '', 0); +INSERT INTO `0_crm_persons` VALUES(4, 'Beefeater', 'Main Branch', NULL, '', '', '', '', '', NULL, '', 0); +INSERT INTO `0_crm_persons` VALUES(5, 'Ghostbusters', 'Main Branch', NULL, 'Address 1\nAddress 2\nAddress 3', '', '', '', '', NULL, '', 0); +INSERT INTO `0_crm_persons` VALUES(6, 'Brezan', 'Main Branch', NULL, 'Address 1\nAddress 2\nAddress 3', '', '', '', '', NULL, '', 0); +INSERT INTO `0_crm_persons` VALUES(7, 'Junk Beer', 'Contact', NULL, 'Address 1\nAddress 2\nAddress 3', '+45 55667788', '', '', '', 'C', '', 0); +INSERT INTO `0_crm_persons` VALUES(8, 'Lucky Luke', 'Luke', NULL, 'Address 1\nAddress 2\nAddress 3', '(111) 222.333.444', '', '', '', NULL, '', 0); +INSERT INTO `0_crm_persons` VALUES(9, 'Money Makers', 'Makers', NULL, 'Address 1\nAddress 2\nAddress 3', '+44 444 555 666', '', '', '', 'C', '', 0); + +-- -------------------------------------------------------- + +-- +-- Table structure for table `0_currencies` +-- -CREATE TABLE `0_currencies` ( +DROP TABLE IF EXISTS `0_currencies`; +CREATE TABLE IF NOT EXISTS `0_currencies` ( `currency` varchar(60) NOT NULL default '', `curr_abrev` char(3) NOT NULL default '', `curr_symbol` varchar(10) NOT NULL default '', @@ -452,22 +546,26 @@ CREATE TABLE `0_currencies` ( `auto_update` tinyint(1) NOT NULL default '1', `inactive` tinyint(1) NOT NULL default '0', PRIMARY KEY (`curr_abrev`) -) TYPE=MyISAM ; +) TYPE=MyISAM; +-- +-- Dumping data for table `0_currencies` +-- -### Data of table `0_currencies` ### +INSERT INTO `0_currencies` VALUES('US Dollars', 'USD', '$', 'United States', 'Cents', 1, 0); +INSERT INTO `0_currencies` VALUES('CA Dollars', 'CAD', '$', 'Canada', 'Cents', 1, 0); +INSERT INTO `0_currencies` VALUES('Euro', 'EUR', '?', 'Europe', 'Cents', 1, 0); +INSERT INTO `0_currencies` VALUES('Pounds', 'GBP', '?', 'England', 'Pence', 1, 0); +INSERT INTO `0_currencies` VALUES('DK Kroner', 'DKK', '?', 'Denmark', 'Ore', 1, 0); -INSERT INTO `0_currencies` VALUES ('US Dollars', 'USD', '$', 'United States', 'Cents', '1', '0'); -INSERT INTO `0_currencies` VALUES ('CA Dollars', 'CAD', '$', 'Canada', 'Cents', '1', '0'); -INSERT INTO `0_currencies` VALUES ('Euro', 'EUR', '?', 'Europe', 'Cents', '1', '0'); -INSERT INTO `0_currencies` VALUES ('Pounds', 'GBP', '?', 'England', 'Pence', '1', '0'); -INSERT INTO `0_currencies` VALUES ('DK Kroner', 'DKK', '?', 'Denmark', 'Ore', '1', '0'); +-- -------------------------------------------------------- -### Structure of table `0_cust_allocations` ### +-- +-- Table structure for table `0_cust_allocations` +-- DROP TABLE IF EXISTS `0_cust_allocations`; - -CREATE TABLE `0_cust_allocations` ( +CREATE TABLE IF NOT EXISTS `0_cust_allocations` ( `id` int(11) NOT NULL auto_increment, `amt` double unsigned default NULL, `date_alloc` date NOT NULL default '0000-00-00', @@ -475,38 +573,39 @@ CREATE TABLE `0_cust_allocations` ( `trans_type_from` int(11) default NULL, `trans_no_to` int(11) default NULL, `trans_type_to` int(11) default NULL, - PRIMARY KEY (`id`) -) TYPE=InnoDB AUTO_INCREMENT=2 ; - + PRIMARY KEY (`id`), + KEY `From` (`trans_type_from`,`trans_no_from`), + KEY `To` (`trans_type_to`,`trans_no_to`) +) TYPE=InnoDB AUTO_INCREMENT=2 ; -### Data of table `0_cust_allocations` ### +-- +-- Dumping data for table `0_cust_allocations` +-- -INSERT INTO `0_cust_allocations` VALUES ('1', '37.68', '2009-06-21', '3', '11', '18', '10'); +INSERT INTO `0_cust_allocations` VALUES(1, 37.68, '2009-06-21', 3, 11, 18, 10); +-- -------------------------------------------------------- -### Structure of table `0_cust_branch` ### +-- +-- Table structure for table `0_cust_branch` +-- DROP TABLE IF EXISTS `0_cust_branch`; - -CREATE TABLE `0_cust_branch` ( +CREATE TABLE IF NOT EXISTS `0_cust_branch` ( `branch_code` int(11) NOT NULL auto_increment, `debtor_no` int(11) NOT NULL default '0', `br_name` varchar(60) NOT NULL default '', - `branch_ref` varchar(30) NOT NULL default '', + `branch_ref` varchar(30) NOT NULL default '', `br_address` tinytext NOT NULL, `area` int(11) default NULL, `salesman` int(11) NOT NULL default '0', - `phone` varchar(30) NOT NULL default '', - `phone2` varchar(30) NOT NULL default '', - `fax` varchar(30) NOT NULL default '', `contact_name` varchar(60) NOT NULL default '', - `email` varchar(100) NOT NULL default '', `default_location` varchar(5) NOT NULL default '', `tax_group_id` int(11) default NULL, - `sales_account` varchar(11) default NULL, - `sales_discount_account` varchar(11) default NULL, - `receivables_account` varchar(11) default NULL, - `payment_discount_account` varchar(11) default NULL, + `sales_account` varchar(15) NOT NULL default '', + `sales_discount_account` varchar(15) NOT NULL default '', + `receivables_account` varchar(15) NOT NULL default '', + `payment_discount_account` varchar(15) NOT NULL default '', `default_ship_via` int(11) NOT NULL default '1', `disable_trans` tinyint(4) NOT NULL default '0', `br_post_address` tinytext NOT NULL, @@ -515,22 +614,63 @@ CREATE TABLE `0_cust_branch` ( `inactive` tinyint(1) NOT NULL default '0', PRIMARY KEY (`branch_code`,`debtor_no`), KEY `branch_code` (`branch_code`), - KEY `br_name` (`br_name`) -) TYPE=MyISAM AUTO_INCREMENT=4 ; + KEY `branch_ref` (`branch_ref`), + KEY `group_no` (`group_no`) +) TYPE=MyISAM AUTO_INCREMENT=4 ; + +-- +-- Dumping data for table `0_cust_branch` +-- + +INSERT INTO `0_cust_branch` VALUES(1, 1, 'Beefeater Ltd.', 'Beefeater', '', 1, 1, 'Main Branch', 'DEF', 2, '', '4510', '1200', '4500', 1, 0, 'Address 1\nAddress 2\nAddress 3', 0, '', 0); +INSERT INTO `0_cust_branch` VALUES(2, 2, 'Ghostbusters Corp.', 'Ghostbusters', 'Address 1\nAddress 2\nAddress 3', 1, 1, 'Main Branch', 'DEF', 1, '', '4510', '1200', '4500', 1, 0, 'Address 1\nAddress 2\nAddress 3', 0, '', 0); +INSERT INTO `0_cust_branch` VALUES(3, 3, 'Brezan', 'Brezan', 'Address 1\nAddress 2\nAddress 3', 1, 1, 'Main Branch', 'DEF', 1, '', '4510', '1200', '4500', 1, 0, 'Address 1\nAddress 2\nAddress 3', 0, '', 0); +-- -------------------------------------------------------- + +-- +-- Table structure for table `0_debtors_master` +-- + +DROP TABLE IF EXISTS `0_debtors_master`; +CREATE TABLE IF NOT EXISTS `0_debtors_master` ( + `debtor_no` int(11) NOT NULL auto_increment, + `name` varchar(100) NOT NULL default '', + `debtor_ref` varchar(30) NOT NULL, + `address` tinytext, + `tax_id` varchar(55) NOT NULL default '', + `curr_code` char(3) NOT NULL default '', + `sales_type` int(11) NOT NULL default '1', + `dimension_id` int(11) NOT NULL default '0', + `dimension2_id` int(11) NOT NULL default '0', + `credit_status` int(11) NOT NULL default '0', + `payment_terms` int(11) default NULL, + `discount` double NOT NULL default '0', + `pymt_discount` double NOT NULL default '0', + `credit_limit` float NOT NULL default '1000', + `notes` tinytext NOT NULL, + `inactive` tinyint(1) NOT NULL default '0', + PRIMARY KEY (`debtor_no`), + KEY `name` (`name`), + UNIQUE KEY `debtor_ref` (`debtor_ref`) +) TYPE=MyISAM AUTO_INCREMENT=4 ; -### Data of table `0_cust_branch` ### +-- +-- Dumping data for table `0_debtors_master` +-- -INSERT INTO `0_cust_branch` VALUES ('1', '1', 'Beefeater Ltd.', 'Beefeater', '', '1', '1', '', '', '', 'Main Branch', '', 'DEF', '2', '', '4510', '1200', '4500', '1', '0', 'Address 1\r\nAddress 2\r\nAddress 3', '0', '', '0'); -INSERT INTO `0_cust_branch` VALUES ('2', '2', 'Ghostbusters Corp.', 'Ghostbusters', 'Address 1\r\nAddress 2\r\nAddress 3', '1', '1', '', '', '', 'Main Branch', '', 'DEF', '1', '', '4510', '1200', '4500', '1', '0', 'Address 1\r\nAddress 2\r\nAddress 3', '0', '', '0'); -INSERT INTO `0_cust_branch` VALUES ('3', '3', 'Brezan', 'Brezan', 'Address 1\r\nAddress 2\r\nAddress 3', '1', '1', '', '', '', 'Main Branch', '', 'DEF', '1', '', '4510', '1200', '4500', '1', '0', 'Address 1\r\nAddress 2\r\nAddress 3', '0', '', '0'); +INSERT INTO `0_debtors_master` VALUES(1, 'Beefeater Ltd.', 'Beefeater', 'Addr 1\nAddr 2\nAddr 3', '345678', 'GBP', 2, 0, 0, 1, 3, 0, 0, 1000, '', 0); +INSERT INTO `0_debtors_master` VALUES(2, 'Ghostbusters Corp.', 'Ghostbusters', 'Address 1\nAddress 2\nAddress 3', '2222222', 'USD', 1, 0, 0, 1, 4, 0, 0, 1000, '', 0); +INSERT INTO `0_debtors_master` VALUES(3, 'Brezan', 'Brezan', 'Address 1\nAddress 2\nAddress 3', '7777777', 'EUR', 2, 0, 0, 1, 3, 0, 0, 1000, '', 0); +-- -------------------------------------------------------- -### Structure of table `0_debtor_trans` ### +-- +-- Table structure for table `0_debtor_trans` +-- DROP TABLE IF EXISTS `0_debtor_trans`; - -CREATE TABLE `0_debtor_trans` ( +CREATE TABLE IF NOT EXISTS `0_debtor_trans` ( `trans_no` int(11) unsigned NOT NULL default '0', `type` smallint(6) unsigned NOT NULL default '0', `version` tinyint(1) unsigned NOT NULL default '0', @@ -549,31 +689,35 @@ CREATE TABLE `0_debtor_trans` ( `alloc` double NOT NULL default '0', `rate` double NOT NULL default '1', `ship_via` int(11) default NULL, - `trans_link` int(11) NOT NULL default '0', `dimension_id` int(11) NOT NULL default '0', `dimension2_id` int(11) NOT NULL default '0', - PRIMARY KEY (`trans_no`,`type`), - KEY `debtor_no` (`debtor_no`,`branch_code`) -) TYPE=InnoDB ; - + `payment_terms` int(11) default NULL, + PRIMARY KEY (`type`,`trans_no`), + KEY `debtor_no` (`debtor_no`,`branch_code`), + KEY `tran_date` (`tran_date`) +) TYPE=InnoDB; -### Data of table `0_debtor_trans` ### +-- +-- Dumping data for table `0_debtor_trans` +-- -INSERT INTO `0_debtor_trans` VALUES ('2', '13', '0', '1', '1', '2009-06-21', '2009-06-22', '1', '2', '1', '60.8', '0', '10', '0', '0', '0', '1.6445729799917', '1', '0', '0', '0'); -INSERT INTO `0_debtor_trans` VALUES ('3', '11', '0', '3', '3', '2009-06-21', '0000-00-00', '1', '2', '3', '35.89', '1.79', '0', '0', '0', '37.68', '1.3932', '1', '18', '2', '0'); -INSERT INTO `0_debtor_trans` VALUES ('3', '13', '1', '2', '2', '2009-06-21', '2009-06-22', 'auto', '1', '2', '50', '2.5', '0', '0', '0', '0', '1', '1', '17', '0', '0'); -INSERT INTO `0_debtor_trans` VALUES ('4', '13', '1', '3', '3', '2009-06-21', '2009-07-01', 'auto', '2', '3', '35.89', '1.79', '0', '0', '0', '0', '1.3932', '1', '18', '2', '0'); -INSERT INTO `0_debtor_trans` VALUES ('5', '13', '1', '2', '2', '2009-06-21', '2009-06-22', 'auto', '1', '5', '50', '0', '5', '0', '0', '0', '1', '1', '19', '0', '0'); -INSERT INTO `0_debtor_trans` VALUES ('17', '10', '0', '2', '2', '2009-06-21', '2009-06-22', '1', '1', '2', '50', '2.5', '0', '0', '0', '0', '1', '1', '3', '0', '0'); -INSERT INTO `0_debtor_trans` VALUES ('18', '10', '1', '3', '3', '2009-06-21', '2009-07-01', '2', '2', '3', '35.89', '1.79', '0', '0', '0', '37.68', '1.3932', '1', '4', '2', '0'); -INSERT INTO `0_debtor_trans` VALUES ('19', '10', '0', '2', '2', '2009-06-21', '2009-06-22', '3', '1', '5', '50', '0', '5', '0', '0', '0', '1', '1', '5', '0', '0'); +INSERT INTO `0_debtor_trans` VALUES(17, 10, 0, 2, 2, '2009-06-21', '2009-06-22', '1', 1, 2, 50, 2.5, 0, 0, 0, 0, 1, 1, 0, 0, 4); +INSERT INTO `0_debtor_trans` VALUES(18, 10, 1, 3, 3, '2009-06-21', '2009-07-01', '2', 2, 3, 35.89, 1.79, 0, 0, 0, 37.68, 1.3932, 1, 2, 0, 3); +INSERT INTO `0_debtor_trans` VALUES(19, 10, 0, 2, 2, '2009-06-21', '2009-06-22', '3', 1, 5, 50, 0, 5, 0, 0, 0, 1, 1, 0, 0, 4); +INSERT INTO `0_debtor_trans` VALUES(3, 11, 0, 3, 3, '2009-06-21', '0000-00-00', '1', 2, 3, 35.89, 1.79, 0, 0, 0, 37.68, 1.3932, 1, 2, 0, 3); +INSERT INTO `0_debtor_trans` VALUES(2, 13, 0, 1, 1, '2009-06-21', '2009-06-22', '1', 2, 1, 60.8, 0, 10, 0, 0, 0, 1.6445729799917, 1, 0, 0, 3); +INSERT INTO `0_debtor_trans` VALUES(3, 13, 1, 2, 2, '2009-06-21', '2009-06-22', 'auto', 1, 2, 50, 2.5, 0, 0, 0, 0, 1, 1, 0, 0, 4); +INSERT INTO `0_debtor_trans` VALUES(4, 13, 1, 3, 3, '2009-06-21', '2009-07-01', 'auto', 2, 3, 35.89, 1.79, 0, 0, 0, 0, 1.3932, 1, 2, 0, 3); +INSERT INTO `0_debtor_trans` VALUES(5, 13, 1, 2, 2, '2009-06-21', '2009-06-22', 'auto', 1, 5, 50, 0, 5, 0, 0, 0, 1, 1, 0, 0, 4); +-- -------------------------------------------------------- -### Structure of table `0_debtor_trans_details` ### +-- +-- Table structure for table `0_debtor_trans_details` +-- DROP TABLE IF EXISTS `0_debtor_trans_details`; - -CREATE TABLE `0_debtor_trans_details` ( +CREATE TABLE IF NOT EXISTS `0_debtor_trans_details` ( `id` int(11) NOT NULL auto_increment, `debtor_trans_no` int(11) default NULL, `debtor_trans_type` int(11) default NULL, @@ -585,61 +729,33 @@ CREATE TABLE `0_debtor_trans_details` ( `discount_percent` double NOT NULL default '0', `standard_cost` double NOT NULL default '0', `qty_done` double NOT NULL default '0', - PRIMARY KEY (`id`) -) TYPE=InnoDB AUTO_INCREMENT=9 ; - - -### Data of table `0_debtor_trans_details` ### - -INSERT INTO `0_debtor_trans_details` VALUES ('1', '2', '13', '102', '17inch VGA Monitor', '30.4', '0', '2', '0', '10', '0'); -INSERT INTO `0_debtor_trans_details` VALUES ('2', '3', '13', '102', '17inch VGA Monitor', '50', '2.5', '1', '0', '10', '1'); -INSERT INTO `0_debtor_trans_details` VALUES ('3', '17', '10', '102', '17inch VGA Monitor', '50', '2.5', '1', '0', '10', '0'); -INSERT INTO `0_debtor_trans_details` VALUES ('4', '4', '13', '102', '17inch VGA Monitor', '35.89', '1.79', '1', '0', '10', '1'); -INSERT INTO `0_debtor_trans_details` VALUES ('5', '18', '10', '102', '17inch VGA Monitor', '35.89', '1.79', '1', '0', '10', '1'); -INSERT INTO `0_debtor_trans_details` VALUES ('6', '5', '13', '102', '17inch VGA Monitor', '50', '2.38', '1', '0', '10', '1'); -INSERT INTO `0_debtor_trans_details` VALUES ('7', '19', '10', '102', '17inch VGA Monitor', '50', '2.38', '1', '0', '10', '0'); -INSERT INTO `0_debtor_trans_details` VALUES ('8', '3', '11', '102', '17inch VGA Monitor', '35.89', '1.79', '1', '0', '10', '0'); - - -### Structure of table `0_debtors_master` ### - -DROP TABLE IF EXISTS `0_debtors_master`; - -CREATE TABLE `0_debtors_master` ( - `debtor_no` int(11) NOT NULL auto_increment, - `name` varchar(100) NOT NULL default '', - `debtor_ref` varchar(30) NOT NULL, - `address` tinytext, - `email` varchar(100) NOT NULL default '', - `tax_id` varchar(55) NOT NULL default '', - `curr_code` char(3) NOT NULL default '', - `sales_type` int(11) NOT NULL default '1', - `dimension_id` int(11) NOT NULL default '0', - `dimension2_id` int(11) NOT NULL default '0', - `credit_status` int(11) NOT NULL default '0', - `payment_terms` int(11) default NULL, - `discount` double NOT NULL default '0', - `pymt_discount` double NOT NULL default '0', - `credit_limit` float NOT NULL default '1000', - `notes` tinytext NOT NULL, - `inactive` tinyint(1) NOT NULL default '0', - PRIMARY KEY (`debtor_no`), - UNIQUE KEY `name` (`name`) -) TYPE=MyISAM AUTO_INCREMENT=4 ; - + `src_id` int(11) NOT NULL, + PRIMARY KEY (`id`), + KEY `Transaction` (`debtor_trans_type`,`debtor_trans_no`), + KEY (`src_id`) +) TYPE=InnoDB AUTO_INCREMENT=9 ; -### Data of table `0_debtors_master` ### +-- +-- Dumping data for table `0_debtor_trans_details` +-- -INSERT INTO `0_debtors_master` VALUES ('1', 'Beefeater Ltd.', 'Beefeater', 'Addr 1\r\nAddr 2\r\nAddr 3', '', '345678', 'GBP', '2', '0', '0', '1', '3', '0', '0', '1000', '', '0'); -INSERT INTO `0_debtors_master` VALUES ('2', 'Ghostbusters Corp.', 'Ghostbusters', 'Address 1\r\nAddress 2\r\nAddress 3', '', '2222222', 'USD', '1', '0', '0', '1', '4', '0', '0', '1000', '', '0'); -INSERT INTO `0_debtors_master` VALUES ('3', 'Brezan', 'Brezan', 'Address 1\r\nAddress 2\r\nAddress 3', '', '7777777', 'EUR', '2', '0', '0', '1', '3', '0', '0', '1000', '', '0'); +INSERT INTO `0_debtor_trans_details` VALUES(1, 2, 13, '102', '17inch VGA Monitor', 30.4, 0, 2, 0, 10, 0, 1); +INSERT INTO `0_debtor_trans_details` VALUES(2, 3, 13, '102', '17inch VGA Monitor', 50, 2.5, 1, 0, 10, 1, 2); +INSERT INTO `0_debtor_trans_details` VALUES(3, 17, 10, '102', '17inch VGA Monitor', 50, 2.5, 1, 0, 10, 2, 2); +INSERT INTO `0_debtor_trans_details` VALUES(4, 4, 13, '102', '17inch VGA Monitor', 35.89, 1.79, 1, 0, 10, 1,3); +INSERT INTO `0_debtor_trans_details` VALUES(5, 18, 10, '102', '17inch VGA Monitor', 35.89, 1.79, 1, 0, 10, 1,4); +INSERT INTO `0_debtor_trans_details` VALUES(6, 5, 13, '102', '17inch VGA Monitor', 50, 2.38, 1, 0, 10, 1,5); +INSERT INTO `0_debtor_trans_details` VALUES(7, 19, 10, '102', '17inch VGA Monitor', 50, 2.38, 1, 0, 10, 0,6); +INSERT INTO `0_debtor_trans_details` VALUES(8, 3, 11, '102', '17inch VGA Monitor', 35.89, 1.79, 1, 0, 10, 0,5); +-- -------------------------------------------------------- -### Structure of table `0_dimensions` ### +-- +-- Table structure for table `0_dimensions` +-- DROP TABLE IF EXISTS `0_dimensions`; - -CREATE TABLE `0_dimensions` ( +CREATE TABLE IF NOT EXISTS `0_dimensions` ( `id` int(11) NOT NULL auto_increment, `reference` varchar(60) NOT NULL default '', `name` varchar(60) NOT NULL default '', @@ -648,21 +764,27 @@ CREATE TABLE `0_dimensions` ( `date_` date NOT NULL default '0000-00-00', `due_date` date NOT NULL default '0000-00-00', PRIMARY KEY (`id`), - UNIQUE KEY `reference` (`reference`) -) TYPE=InnoDB AUTO_INCREMENT=3 ; + UNIQUE KEY `reference` (`reference`), + KEY `date_` (`date_`), + KEY `due_date` (`due_date`), + KEY `type_` (`type_`) +) TYPE=InnoDB AUTO_INCREMENT=3 ; +-- +-- Dumping data for table `0_dimensions` +-- -### Data of table `0_dimensions` ### - -INSERT INTO `0_dimensions` VALUES ('1', '1', 'Support', '1', '0', '2009-06-21', '2015-07-11'); -INSERT INTO `0_dimensions` VALUES ('2', '2', 'Development', '1', '0', '2009-06-21', '2015-07-11'); +INSERT INTO `0_dimensions` VALUES(1, '1', 'Support', 1, 0, '2009-06-21', '2015-07-11'); +INSERT INTO `0_dimensions` VALUES(2, '2', 'Development', 1, 0, '2009-06-21', '2015-07-11'); +-- -------------------------------------------------------- -### Structure of table `0_exchange_rates` ### +-- +-- Table structure for table `0_exchange_rates` +-- DROP TABLE IF EXISTS `0_exchange_rates`; - -CREATE TABLE `0_exchange_rates` ( +CREATE TABLE IF NOT EXISTS `0_exchange_rates` ( `id` int(11) NOT NULL auto_increment, `curr_code` char(3) NOT NULL default '', `rate_buy` double NOT NULL default '0', @@ -670,46 +792,52 @@ CREATE TABLE `0_exchange_rates` ( `date_` date NOT NULL default '0000-00-00', PRIMARY KEY (`id`), UNIQUE KEY `curr_code` (`curr_code`,`date_`) -) TYPE=MyISAM AUTO_INCREMENT=4 ; +) TYPE=MyISAM AUTO_INCREMENT=4 ; +-- +-- Dumping data for table `0_exchange_rates` +-- -### Data of table `0_exchange_rates` ### - -INSERT INTO `0_exchange_rates` VALUES ('1', 'DKK', '0.18717252868313', '0.18717252868313', '2009-06-21'); -INSERT INTO `0_exchange_rates` VALUES ('2', 'GBP', '1.6445729799917', '1.6445729799917', '2009-06-21'); -INSERT INTO `0_exchange_rates` VALUES ('3', 'EUR', '1.3932', '1.3932', '2009-06-21'); +INSERT INTO `0_exchange_rates` VALUES(1, 'DKK', 0.18717252868313, 0.18717252868313, '2009-06-21'); +INSERT INTO `0_exchange_rates` VALUES(2, 'GBP', 1.6445729799917, 1.6445729799917, '2009-06-21'); +INSERT INTO `0_exchange_rates` VALUES(3, 'EUR', 1.3932, 1.3932, '2009-06-21'); +-- -------------------------------------------------------- -### Structure of table `0_fiscal_year` ### +-- +-- Table structure for table `0_fiscal_year` +-- DROP TABLE IF EXISTS `0_fiscal_year`; - -CREATE TABLE `0_fiscal_year` ( +CREATE TABLE IF NOT EXISTS `0_fiscal_year` ( `id` int(11) NOT NULL auto_increment, `begin` date default '0000-00-00', `end` date default '0000-00-00', `closed` tinyint(1) NOT NULL default '0', - PRIMARY KEY (`id`) -) TYPE=InnoDB AUTO_INCREMENT=3 ; - - -### Data of table `0_fiscal_year` ### + PRIMARY KEY (`id`), + UNIQUE KEY `begin` (`begin`), + UNIQUE KEY `end` (`end`) +) TYPE=InnoDB AUTO_INCREMENT=4 ; -INSERT INTO `0_fiscal_year` VALUES ('1', '2008-01-01', '2008-12-31', '0'); -INSERT INTO `0_fiscal_year` VALUES ('2', '2009-01-01', '2009-12-31', '0'); -INSERT INTO `0_fiscal_year` VALUES ('3', '2010-01-01', '2010-12-31', '0'); +-- +-- Dumping data for table `0_fiscal_year` +-- +INSERT INTO `0_fiscal_year` VALUES(1, '2008-01-01', '2008-12-31', 1); +INSERT INTO `0_fiscal_year` VALUES(2, '2009-01-01', '2009-12-31', 1); +INSERT INTO `0_fiscal_year` VALUES(3, '2010-01-01', '2010-12-31', 0); -### Structure of table `0_gl_trans` ### +-- +-- Table structure for table `0_gl_trans` +-- DROP TABLE IF EXISTS `0_gl_trans`; - -CREATE TABLE `0_gl_trans` ( +CREATE TABLE IF NOT EXISTS `0_gl_trans` ( `counter` int(11) NOT NULL auto_increment, `type` smallint(6) NOT NULL default '0', `type_no` bigint(16) NOT NULL default '1', `tran_date` date NOT NULL default '0000-00-00', - `account` varchar(11) NOT NULL default '', + `account` varchar(15) NOT NULL default '', `memo_` tinytext NOT NULL, `amount` double NOT NULL default '0', `dimension_id` int(11) NOT NULL default '0', @@ -717,122 +845,136 @@ CREATE TABLE `0_gl_trans` ( `person_type_id` int(11) default NULL, `person_id` tinyblob, PRIMARY KEY (`counter`), - KEY `Type_and_Number` (`type`,`type_no`) -) TYPE=InnoDB AUTO_INCREMENT=84 ; - - -### Data of table `0_gl_trans` ### - -INSERT INTO `0_gl_trans` VALUES ('1', '20', '7', '2009-06-21', '2100', '', '-3465', '0', '0', '3', '2'); -INSERT INTO `0_gl_trans` VALUES ('2', '20', '7', '2009-06-21', '1510', '', '1000', '0', '0', '3', '2'); -INSERT INTO `0_gl_trans` VALUES ('3', '20', '7', '2009-06-21', '1510', '', '1100', '0', '0', '3', '2'); -INSERT INTO `0_gl_trans` VALUES ('4', '20', '7', '2009-06-21', '1510', '', '1200', '0', '0', '3', '2'); -INSERT INTO `0_gl_trans` VALUES ('5', '20', '7', '2009-06-21', '2150', '', '165', '0', '0', '3', '2'); -INSERT INTO `0_gl_trans` VALUES ('6', '22', '4', '2009-06-21', '2100', '', '3465', '0', '0', '3', '2'); -INSERT INTO `0_gl_trans` VALUES ('7', '22', '4', '2009-06-21', '1060', '', '-3465', '0', '0', '3', '2'); -INSERT INTO `0_gl_trans` VALUES ('8', '26', '1', '2009-06-21', '1510', '', '-100', '0', '0', NULL, ''); -INSERT INTO `0_gl_trans` VALUES ('9', '26', '1', '2009-06-21', '1510', '', '-110', '0', '0', NULL, ''); -INSERT INTO `0_gl_trans` VALUES ('10', '26', '1', '2009-06-21', '1510', '', '-120', '0', '0', NULL, ''); -INSERT INTO `0_gl_trans` VALUES ('11', '26', '1', '2009-06-21', '1060', 'Overhead Cost', '-10', '0', '0', '1', '1'); -INSERT INTO `0_gl_trans` VALUES ('12', '26', '1', '2009-06-21', '1530', 'Overhead Cost', '10', '0', '0', '1', '1'); -INSERT INTO `0_gl_trans` VALUES ('13', '26', '1', '2009-06-21', '1060', 'Labour Cost', '-20', '0', '0', '1', '0'); -INSERT INTO `0_gl_trans` VALUES ('14', '26', '1', '2009-06-21', '1530', 'Labour Cost', '20', '0', '0', '1', '0'); -INSERT INTO `0_gl_trans` VALUES ('15', '26', '1', '2009-06-21', '1510', '', '330', '0', '0', NULL, ''); -INSERT INTO `0_gl_trans` VALUES ('16', '13', '2', '2009-06-21', '5010', '', '20', '0', '0', '2', '1'); -INSERT INTO `0_gl_trans` VALUES ('17', '13', '2', '2009-06-21', '1510', '', '-20', '0', '0', '2', '1'); -INSERT INTO `0_gl_trans` VALUES ('18', '13', '3', '2009-06-21', '5010', '', '10', '0', '0', '2', '2'); -INSERT INTO `0_gl_trans` VALUES ('19', '13', '3', '2009-06-21', '1510', '', '-10', '0', '0', '2', '2'); -INSERT INTO `0_gl_trans` VALUES ('20', '10', '17', '2009-06-21', '4010', '', '-50', '0', '0', '2', '2'); -INSERT INTO `0_gl_trans` VALUES ('21', '10', '17', '2009-06-21', '1200', '', '52.5', '0', '0', '2', '2'); -INSERT INTO `0_gl_trans` VALUES ('22', '10', '17', '2009-06-21', '2150', '', '-2.5', '0', '0', '2', '2'); -INSERT INTO `0_gl_trans` VALUES ('23', '13', '4', '2009-06-21', '5010', '', '10', '2', '0', '2', '3'); -INSERT INTO `0_gl_trans` VALUES ('24', '13', '4', '2009-06-21', '1510', '', '-10', '0', '0', '2', '3'); -INSERT INTO `0_gl_trans` VALUES ('25', '10', '18', '2009-06-21', '4010', '', '-50', '2', '0', '2', '3'); -INSERT INTO `0_gl_trans` VALUES ('26', '10', '18', '2009-06-21', '1200', '', '52.5', '0', '0', '2', '3'); -INSERT INTO `0_gl_trans` VALUES ('27', '10', '18', '2009-06-21', '2150', '', '-2.5', '0', '0', '2', '3'); -INSERT INTO `0_gl_trans` VALUES ('28', '0', '18', '2009-02-20', '1060', '', '1000', '0', '0', NULL, ''); -INSERT INTO `0_gl_trans` VALUES ('29', '0', '18', '2009-02-20', '3350', '', '-1000', '0', '0', NULL, ''); -INSERT INTO `0_gl_trans` VALUES ('30', '0', '19', '2009-02-21', '1060', '', '4000', '0', '0', NULL, ''); -INSERT INTO `0_gl_trans` VALUES ('31', '0', '19', '2009-02-21', '3350', '', '-4000', '0', '0', NULL, ''); -INSERT INTO `0_gl_trans` VALUES ('32', '26', '3', '2009-06-21', '1510', '', '-20', '0', '0', NULL, ''); -INSERT INTO `0_gl_trans` VALUES ('33', '26', '3', '2009-06-21', '1510', '', '-22', '0', '0', NULL, ''); -INSERT INTO `0_gl_trans` VALUES ('34', '26', '3', '2009-06-21', '1510', '', '-24', '0', '0', NULL, ''); -INSERT INTO `0_gl_trans` VALUES ('35', '26', '3', '2009-06-21', '1540', '', '66', '0', '0', NULL, ''); -INSERT INTO `0_gl_trans` VALUES ('36', '2', '5', '2009-06-21', '2150', 'Cash Sales', '-4.76', '0', '0', '4', '3'); -INSERT INTO `0_gl_trans` VALUES ('37', '2', '5', '2009-06-21', '4010', 'Cash Sales', '-95.24', '0', '0', '4', '3'); -INSERT INTO `0_gl_trans` VALUES ('38', '2', '5', '2009-06-21', '1060', '', '100', '0', '0', '4', '3'); -INSERT INTO `0_gl_trans` VALUES ('39', '1', '8', '2009-06-21', '2150', 'Maintenance', '2.38', '0', '0', '4', '1'); -INSERT INTO `0_gl_trans` VALUES ('40', '1', '8', '2009-06-21', '5765', 'Maintenance', '47.62', '0', '0', '4', '1'); -INSERT INTO `0_gl_trans` VALUES ('41', '1', '8', '2009-06-21', '1060', '', '-50', '0', '0', '4', '1'); -INSERT INTO `0_gl_trans` VALUES ('42', '20', '8', '2009-06-21', '2100', '', '-20', '0', '0', '3', '2'); -INSERT INTO `0_gl_trans` VALUES ('43', '20', '8', '2009-06-21', '2150', '', '0.95', '0', '0', '3', '2'); -INSERT INTO `0_gl_trans` VALUES ('44', '20', '8', '2009-06-21', '5780', '', '19.05', '0', '0', '3', '2'); -INSERT INTO `0_gl_trans` VALUES ('45', '26', '4', '2009-06-21', '1510', '', '-40', '0', '0', NULL, ''); -INSERT INTO `0_gl_trans` VALUES ('46', '26', '4', '2009-06-21', '1510', '', '-44', '0', '0', NULL, ''); -INSERT INTO `0_gl_trans` VALUES ('47', '26', '4', '2009-06-21', '1510', '', '-48', '0', '0', NULL, ''); -INSERT INTO `0_gl_trans` VALUES ('48', '26', '4', '2009-06-21', '1540', '', '132', '0', '0', NULL, ''); -INSERT INTO `0_gl_trans` VALUES ('49', '26', '2', '2009-06-21', '1510', '', '-20', '0', '0', NULL, ''); -INSERT INTO `0_gl_trans` VALUES ('50', '26', '2', '2009-06-21', '1510', '', '-22', '0', '0', NULL, ''); -INSERT INTO `0_gl_trans` VALUES ('51', '26', '2', '2009-06-21', '1510', '', '-24', '0', '0', NULL, ''); -INSERT INTO `0_gl_trans` VALUES ('52', '26', '2', '2009-06-21', '1540', '', '66', '0', '0', NULL, ''); -INSERT INTO `0_gl_trans` VALUES ('53', '26', '5', '2009-06-21', '1510', '', '-50', '0', '0', NULL, ''); -INSERT INTO `0_gl_trans` VALUES ('54', '26', '5', '2009-06-21', '1510', '', '-55', '0', '0', NULL, ''); -INSERT INTO `0_gl_trans` VALUES ('55', '26', '5', '2009-06-21', '1510', '', '-60', '0', '0', NULL, ''); -INSERT INTO `0_gl_trans` VALUES ('56', '26', '5', '2009-06-21', '1060', 'Overhead Cost', '-10', '0', '0', '1', '1'); -INSERT INTO `0_gl_trans` VALUES ('57', '26', '5', '2009-06-21', '1530', 'Overhead Cost', '10', '0', '0', '1', '1'); -INSERT INTO `0_gl_trans` VALUES ('58', '26', '5', '2009-06-21', '1060', 'Labour Cost', '-20', '0', '0', '1', '0'); -INSERT INTO `0_gl_trans` VALUES ('59', '26', '5', '2009-06-21', '1530', 'Labour Cost', '20', '0', '0', '1', '0'); -INSERT INTO `0_gl_trans` VALUES ('60', '26', '5', '2009-06-21', '1540', '', '165', '0', '0', NULL, ''); -INSERT INTO `0_gl_trans` VALUES ('61', '26', '6', '2009-06-21', '1510', '', '50', '0', '0', NULL, ''); -INSERT INTO `0_gl_trans` VALUES ('62', '26', '6', '2009-06-21', '1510', '', '55', '0', '0', NULL, ''); -INSERT INTO `0_gl_trans` VALUES ('63', '26', '6', '2009-06-21', '1510', '', '60', '0', '0', NULL, ''); -INSERT INTO `0_gl_trans` VALUES ('64', '26', '6', '2009-06-21', '1540', '', '-165', '0', '0', NULL, ''); -INSERT INTO `0_gl_trans` VALUES ('65', '26', '7', '2009-06-21', '1510', '', '20', '0', '0', NULL, ''); -INSERT INTO `0_gl_trans` VALUES ('66', '26', '7', '2009-06-21', '1510', '', '22', '0', '0', NULL, ''); -INSERT INTO `0_gl_trans` VALUES ('67', '26', '7', '2009-06-21', '1510', '', '24', '0', '0', NULL, ''); -INSERT INTO `0_gl_trans` VALUES ('68', '26', '7', '2009-06-21', '1060', 'Overhead Cost', '-10', '0', '0', '1', '1'); -INSERT INTO `0_gl_trans` VALUES ('69', '26', '7', '2009-06-21', '1530', 'Overhead Cost', '10', '0', '0', '1', '1'); -INSERT INTO `0_gl_trans` VALUES ('70', '26', '7', '2009-06-21', '1060', 'Labour Cost', '-20', '0', '0', '1', '0'); -INSERT INTO `0_gl_trans` VALUES ('71', '26', '7', '2009-06-21', '1530', 'Labour Cost', '20', '0', '0', '1', '0'); -INSERT INTO `0_gl_trans` VALUES ('72', '26', '7', '2009-06-21', '1540', '', '-66', '0', '0', NULL, ''); -INSERT INTO `0_gl_trans` VALUES ('73', '13', '5', '2009-06-21', '5010', '', '10', '0', '0', '2', '2'); -INSERT INTO `0_gl_trans` VALUES ('74', '13', '5', '2009-06-21', '1510', '', '-10', '0', '0', '2', '2'); -INSERT INTO `0_gl_trans` VALUES ('75', '10', '19', '2009-06-21', '4010', '', '-47.62', '0', '0', '2', '2'); -INSERT INTO `0_gl_trans` VALUES ('76', '10', '19', '2009-06-21', '1200', '', '55', '0', '0', '2', '2'); -INSERT INTO `0_gl_trans` VALUES ('77', '10', '19', '2009-06-21', '4430', '', '-5', '0', '0', '2', '2'); -INSERT INTO `0_gl_trans` VALUES ('78', '10', '19', '2009-06-21', '2150', '', '-2.38', '0', '0', '2', '2'); -INSERT INTO `0_gl_trans` VALUES ('79', '11', '3', '2009-06-21', '5010', '', '-10', '2', '0', '2', '3'); -INSERT INTO `0_gl_trans` VALUES ('80', '11', '3', '2009-06-21', '1510', '', '10', '0', '0', '2', '3'); -INSERT INTO `0_gl_trans` VALUES ('81', '11', '3', '2009-06-21', '4010', '', '50', '2', '0', '2', '3'); -INSERT INTO `0_gl_trans` VALUES ('82', '11', '3', '2009-06-21', '1200', '', '-52.5', '0', '0', '2', '3'); -INSERT INTO `0_gl_trans` VALUES ('83', '11', '3', '2009-06-21', '2150', '', '2.5', '0', '0', '2', '3'); - - -### Structure of table `0_grn_batch` ### + KEY `Type_and_Number` (`type`,`type_no`), + KEY `dimension_id` (`dimension_id`), + KEY `dimension2_id` (`dimension2_id`), + KEY `tran_date` (`tran_date`), + KEY `account_and_tran_date` (`account`,`tran_date`) +) TYPE=InnoDB AUTO_INCREMENT=84 ; -DROP TABLE IF EXISTS `0_grn_batch`; +-- +-- Dumping data for table `0_gl_trans` +-- + +INSERT INTO `0_gl_trans` VALUES(1, 20, 7, '2009-06-21', '2100', '', -3465, 0, 0, 3, '2'); +INSERT INTO `0_gl_trans` VALUES(2, 20, 7, '2009-06-21', '1510', '', 1000, 0, 0, 3, '2'); +INSERT INTO `0_gl_trans` VALUES(3, 20, 7, '2009-06-21', '1510', '', 1100, 0, 0, 3, '2'); +INSERT INTO `0_gl_trans` VALUES(4, 20, 7, '2009-06-21', '1510', '', 1200, 0, 0, 3, '2'); +INSERT INTO `0_gl_trans` VALUES(5, 20, 7, '2009-06-21', '2150', '', 165, 0, 0, 3, '2'); +INSERT INTO `0_gl_trans` VALUES(6, 22, 4, '2009-06-21', '2100', '', 3465, 0, 0, 3, '2'); +INSERT INTO `0_gl_trans` VALUES(7, 22, 4, '2009-06-21', '1060', '', -3465, 0, 0, 3, '2'); +INSERT INTO `0_gl_trans` VALUES(8, 26, 1, '2009-06-21', '1510', '', -100, 0, 0, NULL, ''); +INSERT INTO `0_gl_trans` VALUES(9, 26, 1, '2009-06-21', '1510', '', -110, 0, 0, NULL, ''); +INSERT INTO `0_gl_trans` VALUES(10, 26, 1, '2009-06-21', '1510', '', -120, 0, 0, NULL, ''); +INSERT INTO `0_gl_trans` VALUES(11, 26, 1, '2009-06-21', '1060', 'Overhead Cost', -10, 0, 0, 1, '1'); +INSERT INTO `0_gl_trans` VALUES(12, 26, 1, '2009-06-21', '1530', 'Overhead Cost', 10, 0, 0, 1, '1'); +INSERT INTO `0_gl_trans` VALUES(13, 26, 1, '2009-06-21', '1060', 'Labour Cost', -20, 0, 0, 1, '0'); +INSERT INTO `0_gl_trans` VALUES(14, 26, 1, '2009-06-21', '1530', 'Labour Cost', 20, 0, 0, 1, '0'); +INSERT INTO `0_gl_trans` VALUES(15, 26, 1, '2009-06-21', '1510', '', 330, 0, 0, NULL, ''); +INSERT INTO `0_gl_trans` VALUES(16, 13, 2, '2009-06-21', '5010', '', 20, 0, 0, 2, '1'); +INSERT INTO `0_gl_trans` VALUES(17, 13, 2, '2009-06-21', '1510', '', -20, 0, 0, 2, '1'); +INSERT INTO `0_gl_trans` VALUES(18, 13, 3, '2009-06-21', '5010', '', 10, 0, 0, 2, '2'); +INSERT INTO `0_gl_trans` VALUES(19, 13, 3, '2009-06-21', '1510', '', -10, 0, 0, 2, '2'); +INSERT INTO `0_gl_trans` VALUES(20, 10, 17, '2009-06-21', '4010', '', -50, 0, 0, 2, '2'); +INSERT INTO `0_gl_trans` VALUES(21, 10, 17, '2009-06-21', '1200', '', 52.5, 0, 0, 2, '2'); +INSERT INTO `0_gl_trans` VALUES(22, 10, 17, '2009-06-21', '2150', '', -2.5, 0, 0, 2, '2'); +INSERT INTO `0_gl_trans` VALUES(23, 13, 4, '2009-06-21', '5010', '', 10, 2, 0, 2, '3'); +INSERT INTO `0_gl_trans` VALUES(24, 13, 4, '2009-06-21', '1510', '', -10, 0, 0, 2, '3'); +INSERT INTO `0_gl_trans` VALUES(25, 10, 18, '2009-06-21', '4010', '', -50, 2, 0, 2, '3'); +INSERT INTO `0_gl_trans` VALUES(26, 10, 18, '2009-06-21', '1200', '', 52.5, 0, 0, 2, '3'); +INSERT INTO `0_gl_trans` VALUES(27, 10, 18, '2009-06-21', '2150', '', -2.5, 0, 0, 2, '3'); +INSERT INTO `0_gl_trans` VALUES(28, 0, 18, '2009-02-20', '1060', '', 1000, 0, 0, NULL, ''); +INSERT INTO `0_gl_trans` VALUES(29, 0, 18, '2009-02-20', '3350', '', -1000, 0, 0, NULL, ''); +INSERT INTO `0_gl_trans` VALUES(30, 0, 19, '2009-02-21', '1060', '', 4000, 0, 0, NULL, ''); +INSERT INTO `0_gl_trans` VALUES(31, 0, 19, '2009-02-21', '3350', '', -4000, 0, 0, NULL, ''); +INSERT INTO `0_gl_trans` VALUES(32, 26, 3, '2009-06-21', '1510', '', -20, 0, 0, NULL, ''); +INSERT INTO `0_gl_trans` VALUES(33, 26, 3, '2009-06-21', '1510', '', -22, 0, 0, NULL, ''); +INSERT INTO `0_gl_trans` VALUES(34, 26, 3, '2009-06-21', '1510', '', -24, 0, 0, NULL, ''); +INSERT INTO `0_gl_trans` VALUES(35, 26, 3, '2009-06-21', '1540', '', 66, 0, 0, NULL, ''); +INSERT INTO `0_gl_trans` VALUES(36, 2, 5, '2009-06-21', '2150', 'Cash Sales', -4.76, 0, 0, 4, '3'); +INSERT INTO `0_gl_trans` VALUES(37, 2, 5, '2009-06-21', '4010', 'Cash Sales', -95.24, 0, 0, 4, '3'); +INSERT INTO `0_gl_trans` VALUES(38, 2, 5, '2009-06-21', '1060', '', 100, 0, 0, 4, '3'); +INSERT INTO `0_gl_trans` VALUES(39, 1, 8, '2009-06-21', '2150', 'Maintenance', 2.38, 0, 0, 4, '1'); +INSERT INTO `0_gl_trans` VALUES(40, 1, 8, '2009-06-21', '5765', 'Maintenance', 47.62, 0, 0, 4, '1'); +INSERT INTO `0_gl_trans` VALUES(41, 1, 8, '2009-06-21', '1060', '', -50, 0, 0, 4, '1'); +INSERT INTO `0_gl_trans` VALUES(42, 20, 8, '2009-06-21', '2100', '', -20, 0, 0, 3, '2'); +INSERT INTO `0_gl_trans` VALUES(43, 20, 8, '2009-06-21', '2150', '', 0.95, 0, 0, 3, '2'); +INSERT INTO `0_gl_trans` VALUES(44, 20, 8, '2009-06-21', '5780', '', 19.05, 0, 0, 3, '2'); +INSERT INTO `0_gl_trans` VALUES(45, 26, 4, '2009-06-21', '1510', '', -40, 0, 0, NULL, ''); +INSERT INTO `0_gl_trans` VALUES(46, 26, 4, '2009-06-21', '1510', '', -44, 0, 0, NULL, ''); +INSERT INTO `0_gl_trans` VALUES(47, 26, 4, '2009-06-21', '1510', '', -48, 0, 0, NULL, ''); +INSERT INTO `0_gl_trans` VALUES(48, 26, 4, '2009-06-21', '1540', '', 132, 0, 0, NULL, ''); +INSERT INTO `0_gl_trans` VALUES(49, 26, 2, '2009-06-21', '1510', '', -20, 0, 0, NULL, ''); +INSERT INTO `0_gl_trans` VALUES(50, 26, 2, '2009-06-21', '1510', '', -22, 0, 0, NULL, ''); +INSERT INTO `0_gl_trans` VALUES(51, 26, 2, '2009-06-21', '1510', '', -24, 0, 0, NULL, ''); +INSERT INTO `0_gl_trans` VALUES(52, 26, 2, '2009-06-21', '1540', '', 66, 0, 0, NULL, ''); +INSERT INTO `0_gl_trans` VALUES(53, 26, 5, '2009-06-21', '1510', '', -50, 0, 0, NULL, ''); +INSERT INTO `0_gl_trans` VALUES(54, 26, 5, '2009-06-21', '1510', '', -55, 0, 0, NULL, ''); +INSERT INTO `0_gl_trans` VALUES(55, 26, 5, '2009-06-21', '1510', '', -60, 0, 0, NULL, ''); +INSERT INTO `0_gl_trans` VALUES(56, 26, 5, '2009-06-21', '1060', 'Overhead Cost', -10, 0, 0, 1, '1'); +INSERT INTO `0_gl_trans` VALUES(57, 26, 5, '2009-06-21', '1530', 'Overhead Cost', 10, 0, 0, 1, '1'); +INSERT INTO `0_gl_trans` VALUES(58, 26, 5, '2009-06-21', '1060', 'Labour Cost', -20, 0, 0, 1, '0'); +INSERT INTO `0_gl_trans` VALUES(59, 26, 5, '2009-06-21', '1530', 'Labour Cost', 20, 0, 0, 1, '0'); +INSERT INTO `0_gl_trans` VALUES(60, 26, 5, '2009-06-21', '1540', '', 165, 0, 0, NULL, ''); +INSERT INTO `0_gl_trans` VALUES(61, 26, 6, '2009-06-21', '1510', '', 50, 0, 0, NULL, ''); +INSERT INTO `0_gl_trans` VALUES(62, 26, 6, '2009-06-21', '1510', '', 55, 0, 0, NULL, ''); +INSERT INTO `0_gl_trans` VALUES(63, 26, 6, '2009-06-21', '1510', '', 60, 0, 0, NULL, ''); +INSERT INTO `0_gl_trans` VALUES(64, 26, 6, '2009-06-21', '1540', '', -165, 0, 0, NULL, ''); +INSERT INTO `0_gl_trans` VALUES(65, 26, 7, '2009-06-21', '1510', '', 20, 0, 0, NULL, ''); +INSERT INTO `0_gl_trans` VALUES(66, 26, 7, '2009-06-21', '1510', '', 22, 0, 0, NULL, ''); +INSERT INTO `0_gl_trans` VALUES(67, 26, 7, '2009-06-21', '1510', '', 24, 0, 0, NULL, ''); +INSERT INTO `0_gl_trans` VALUES(68, 26, 7, '2009-06-21', '1060', 'Overhead Cost', -10, 0, 0, 1, '1'); +INSERT INTO `0_gl_trans` VALUES(69, 26, 7, '2009-06-21', '1530', 'Overhead Cost', 10, 0, 0, 1, '1'); +INSERT INTO `0_gl_trans` VALUES(70, 26, 7, '2009-06-21', '1060', 'Labour Cost', -20, 0, 0, 1, '0'); +INSERT INTO `0_gl_trans` VALUES(71, 26, 7, '2009-06-21', '1530', 'Labour Cost', 20, 0, 0, 1, '0'); +INSERT INTO `0_gl_trans` VALUES(72, 26, 7, '2009-06-21', '1540', '', -66, 0, 0, NULL, ''); +INSERT INTO `0_gl_trans` VALUES(73, 13, 5, '2009-06-21', '5010', '', 10, 0, 0, 2, '2'); +INSERT INTO `0_gl_trans` VALUES(74, 13, 5, '2009-06-21', '1510', '', -10, 0, 0, 2, '2'); +INSERT INTO `0_gl_trans` VALUES(75, 10, 19, '2009-06-21', '4010', '', -47.62, 0, 0, 2, '2'); +INSERT INTO `0_gl_trans` VALUES(76, 10, 19, '2009-06-21', '1200', '', 55, 0, 0, 2, '2'); +INSERT INTO `0_gl_trans` VALUES(77, 10, 19, '2009-06-21', '4430', '', -5, 0, 0, 2, '2'); +INSERT INTO `0_gl_trans` VALUES(78, 10, 19, '2009-06-21', '2150', '', -2.38, 0, 0, 2, '2'); +INSERT INTO `0_gl_trans` VALUES(79, 11, 3, '2009-06-21', '5010', '', -10, 2, 0, 2, '3'); +INSERT INTO `0_gl_trans` VALUES(80, 11, 3, '2009-06-21', '1510', '', 10, 0, 0, 2, '3'); +INSERT INTO `0_gl_trans` VALUES(81, 11, 3, '2009-06-21', '4010', '', 50, 2, 0, 2, '3'); +INSERT INTO `0_gl_trans` VALUES(82, 11, 3, '2009-06-21', '1200', '', -52.5, 0, 0, 2, '3'); +INSERT INTO `0_gl_trans` VALUES(83, 11, 3, '2009-06-21', '2150', '', 2.5, 0, 0, 2, '3'); +INSERT INTO `0_gl_trans` VALUES ('84', '0', '20', '2009-12-31', '3590', 'Closing Year', '-91.19', '0', '0', NULL, NULL); +INSERT INTO `0_gl_trans` VALUES ('85', '0', '20', '2009-12-31', '9990', 'Closing Year', '91.19', '0', '0', NULL, NULL); + +-- -------------------------------------------------------- + +-- +-- Table structure for table `0_grn_batch` +-- -CREATE TABLE `0_grn_batch` ( +DROP TABLE IF EXISTS `0_grn_batch`; +CREATE TABLE IF NOT EXISTS `0_grn_batch` ( `id` int(11) NOT NULL auto_increment, `supplier_id` int(11) NOT NULL default '0', `purch_order_no` int(11) default NULL, `reference` varchar(60) NOT NULL default '', `delivery_date` date NOT NULL default '0000-00-00', `loc_code` varchar(5) default NULL, - PRIMARY KEY (`id`) -) TYPE=InnoDB AUTO_INCREMENT=2 ; - + PRIMARY KEY (`id`), + KEY `delivery_date` (`delivery_date`), + KEY `purch_order_no` (`purch_order_no`) +) TYPE=InnoDB AUTO_INCREMENT=2 ; -### Data of table `0_grn_batch` ### +-- +-- Dumping data for table `0_grn_batch` +-- -INSERT INTO `0_grn_batch` VALUES ('1', '2', '1', '1', '2009-06-21', 'DEF'); +INSERT INTO `0_grn_batch` VALUES(1, 2, 1, '1', '2009-06-21', 'DEF'); +-- -------------------------------------------------------- -### Structure of table `0_grn_items` ### +-- +-- Table structure for table `0_grn_items` +-- DROP TABLE IF EXISTS `0_grn_items`; - -CREATE TABLE `0_grn_items` ( +CREATE TABLE IF NOT EXISTS `0_grn_items` ( `id` int(11) NOT NULL auto_increment, `grn_batch_id` int(11) default NULL, `po_detail_item` int(11) NOT NULL default '0', @@ -840,42 +982,49 @@ CREATE TABLE `0_grn_items` ( `description` tinytext, `qty_recd` double NOT NULL default '0', `quantity_inv` double NOT NULL default '0', - PRIMARY KEY (`id`) -) TYPE=InnoDB AUTO_INCREMENT=4 ; - + PRIMARY KEY (`id`), + KEY `grn_batch_id` (`grn_batch_id`) +) TYPE=InnoDB AUTO_INCREMENT=4 ; -### Data of table `0_grn_items` ### +-- +-- Dumping data for table `0_grn_items` +-- -INSERT INTO `0_grn_items` VALUES ('1', '1', '1', '102', '17inch VGA Monitor', '100', '100'); -INSERT INTO `0_grn_items` VALUES ('2', '1', '2', '103', '32MB VGA Card', '100', '100'); -INSERT INTO `0_grn_items` VALUES ('3', '1', '3', '104', '52x CD Drive', '100', '100'); +INSERT INTO `0_grn_items` VALUES(1, 1, 1, '102', '17inch VGA Monitor', 100, 100); +INSERT INTO `0_grn_items` VALUES(2, 1, 2, '103', '32MB VGA Card', 100, 100); +INSERT INTO `0_grn_items` VALUES(3, 1, 3, '104', '52x CD Drive', 100, 100); +-- -------------------------------------------------------- -### Structure of table `0_groups` ### +-- +-- Table structure for table `0_groups` +-- DROP TABLE IF EXISTS `0_groups`; - -CREATE TABLE `0_groups` ( +CREATE TABLE IF NOT EXISTS `0_groups` ( `id` smallint(6) unsigned NOT NULL auto_increment, `description` varchar(60) NOT NULL default '', `inactive` tinyint(1) NOT NULL default '0', PRIMARY KEY (`id`), UNIQUE KEY `description` (`description`) -) TYPE=MyISAM AUTO_INCREMENT=4 AUTO_INCREMENT=4 ; - +) TYPE=MyISAM AUTO_INCREMENT=4 ; -### Data of table `0_groups` ### +-- +-- Dumping data for table `0_groups` +-- -INSERT INTO `0_groups` VALUES ('1', 'Small', '0'); -INSERT INTO `0_groups` VALUES ('2', 'Medium', '0'); -INSERT INTO `0_groups` VALUES ('3', 'Large', '0'); +INSERT INTO `0_groups` VALUES(1, 'Small', 0); +INSERT INTO `0_groups` VALUES(2, 'Medium', 0); +INSERT INTO `0_groups` VALUES(3, 'Large', 0); +-- -------------------------------------------------------- -### Structure of table `0_item_codes` ### +-- +-- Table structure for table `0_item_codes` +-- DROP TABLE IF EXISTS `0_item_codes`; - -CREATE TABLE `0_item_codes` ( +CREATE TABLE IF NOT EXISTS `0_item_codes` ( `id` int(11) unsigned NOT NULL auto_increment, `item_code` varchar(20) NOT NULL, `stock_id` varchar(20) NOT NULL, @@ -885,99 +1034,91 @@ CREATE TABLE `0_item_codes` ( `is_foreign` tinyint(1) NOT NULL default '0', `inactive` tinyint(1) NOT NULL default '0', PRIMARY KEY (`id`), - UNIQUE KEY `stock_id` (`stock_id`,`item_code`) -) TYPE=MyISAM AUTO_INCREMENT=6 ; - - -### Data of table `0_item_codes` ### - -INSERT INTO `0_item_codes` VALUES ('1', '102', '102', '17inch VGA Monitor', '1', '1', '0', '0'); -INSERT INTO `0_item_codes` VALUES ('2', '103', '103', '32MB VGA Card', '1', '1', '0', '0'); -INSERT INTO `0_item_codes` VALUES ('3', '104', '104', '52x CD Drive', '1', '1', '0', '0'); -INSERT INTO `0_item_codes` VALUES ('4', '3400', '3400', 'P4 Business System', '3', '1', '0', '0'); -INSERT INTO `0_item_codes` VALUES ('5', '201', '201', 'Assembly Labour', '4', '1', '0', '0'); - - -### Structure of table `0_item_tax_type_exemptions` ### - -DROP TABLE IF EXISTS `0_item_tax_type_exemptions`; + UNIQUE KEY `stock_id` (`stock_id`,`item_code`), + KEY `item_code` (`item_code`) +) TYPE=MyISAM AUTO_INCREMENT=6 ; -CREATE TABLE `0_item_tax_type_exemptions` ( - `item_tax_type_id` int(11) NOT NULL default '0', - `tax_type_id` int(11) NOT NULL default '0', - PRIMARY KEY (`item_tax_type_id`,`tax_type_id`) -) TYPE=InnoDB ; - - -### Data of table `0_item_tax_type_exemptions` ### +-- +-- Dumping data for table `0_item_codes` +-- +INSERT INTO `0_item_codes` VALUES(1, '102', '102', '17inch VGA Monitor', 1, 1, 0, 0); +INSERT INTO `0_item_codes` VALUES(2, '103', '103', '32MB VGA Card', 1, 1, 0, 0); +INSERT INTO `0_item_codes` VALUES(3, '104', '104', '52x CD Drive', 1, 1, 0, 0); +INSERT INTO `0_item_codes` VALUES(4, '3400', '3400', 'P4 Business System', 3, 1, 0, 0); +INSERT INTO `0_item_codes` VALUES(5, '201', '201', 'Assembly Labour', 4, 1, 0, 0); +-- -------------------------------------------------------- -### Structure of table `0_item_tax_types` ### +-- +-- Table structure for table `0_item_tax_types` +-- DROP TABLE IF EXISTS `0_item_tax_types`; - -CREATE TABLE `0_item_tax_types` ( +CREATE TABLE IF NOT EXISTS `0_item_tax_types` ( `id` int(11) NOT NULL auto_increment, `name` varchar(60) NOT NULL default '', `exempt` tinyint(1) NOT NULL default '0', `inactive` tinyint(1) NOT NULL default '0', PRIMARY KEY (`id`), UNIQUE KEY `name` (`name`) -) TYPE=InnoDB AUTO_INCREMENT=2 ; +) TYPE=InnoDB AUTO_INCREMENT=2 ; +-- +-- Dumping data for table `0_item_tax_types` +-- -### Data of table `0_item_tax_types` ### +INSERT INTO `0_item_tax_types` VALUES(1, 'Regular', 0, 0); -INSERT INTO `0_item_tax_types` VALUES ('1', 'Regular', '0', '0'); +-- -------------------------------------------------------- -### Structure of table `0_item_units` ### +-- +-- Table structure for table `0_item_tax_type_exemptions` +-- + +DROP TABLE IF EXISTS `0_item_tax_type_exemptions`; +CREATE TABLE IF NOT EXISTS `0_item_tax_type_exemptions` ( + `item_tax_type_id` int(11) NOT NULL default '0', + `tax_type_id` int(11) NOT NULL default '0', + PRIMARY KEY (`item_tax_type_id`,`tax_type_id`) +) TYPE=InnoDB; + +-- +-- Dumping data for table `0_item_tax_type_exemptions` +-- -DROP TABLE IF EXISTS `0_item_units`; -CREATE TABLE `0_item_units` ( +-- -------------------------------------------------------- + +-- +-- Table structure for table `0_item_units` +-- + +DROP TABLE IF EXISTS `0_item_units`; +CREATE TABLE IF NOT EXISTS `0_item_units` ( `abbr` varchar(20) NOT NULL, `name` varchar(40) NOT NULL, `decimals` tinyint(2) NOT NULL, `inactive` tinyint(1) NOT NULL default '0', PRIMARY KEY (`abbr`), UNIQUE KEY `name` (`name`) -) TYPE=MyISAM ; - - -### Data of table `0_item_units` ### - -INSERT INTO `0_item_units` VALUES ('ea.', 'Each', '0', '0'); -INSERT INTO `0_item_units` VALUES ('hrs', 'Hours', '1', '0'); - - -### Structure of table `0_loc_stock` ### - -DROP TABLE IF EXISTS `0_loc_stock`; - -CREATE TABLE `0_loc_stock` ( - `loc_code` char(5) NOT NULL default '', - `stock_id` char(20) NOT NULL default '', - `reorder_level` bigint(20) NOT NULL default '0', - PRIMARY KEY (`loc_code`,`stock_id`), - KEY `stock_id` (`stock_id`) -) TYPE=InnoDB ; - +) TYPE=MyISAM; -### Data of table `0_loc_stock` ### +-- +-- Dumping data for table `0_item_units` +-- -INSERT INTO `0_loc_stock` VALUES ('DEF', '102', '0'); -INSERT INTO `0_loc_stock` VALUES ('DEF', '103', '0'); -INSERT INTO `0_loc_stock` VALUES ('DEF', '104', '0'); -INSERT INTO `0_loc_stock` VALUES ('DEF', '201', '0'); -INSERT INTO `0_loc_stock` VALUES ('DEF', '3400', '0'); +INSERT INTO `0_item_units` VALUES('ea.', 'Each', 0, 0); +INSERT INTO `0_item_units` VALUES('hrs', 'Hours', 1, 0); +-- -------------------------------------------------------- -### Structure of table `0_locations` ### +-- +-- Table structure for table `0_locations` +-- DROP TABLE IF EXISTS `0_locations`; - -CREATE TABLE `0_locations` ( +CREATE TABLE IF NOT EXISTS `0_locations` ( `loc_code` varchar(5) NOT NULL default '', `location_name` varchar(60) NOT NULL default '', `delivery_address` tinytext NOT NULL, @@ -988,37 +1129,68 @@ CREATE TABLE `0_locations` ( `contact` varchar(30) NOT NULL default '', `inactive` tinyint(1) NOT NULL default '0', PRIMARY KEY (`loc_code`) -) TYPE=MyISAM ; +) TYPE=MyISAM; + +-- +-- Dumping data for table `0_locations` +-- + +INSERT INTO `0_locations` VALUES('DEF', 'Default', 'Delivery 1\nDelivery 2\nDelivery 3', '', '', '', '', '', 0); + +-- -------------------------------------------------------- + +-- +-- Table structure for table `0_loc_stock` +-- +DROP TABLE IF EXISTS `0_loc_stock`; +CREATE TABLE IF NOT EXISTS `0_loc_stock` ( + `loc_code` char(5) NOT NULL default '', + `stock_id` char(20) NOT NULL default '', + `reorder_level` bigint(20) NOT NULL default '0', + PRIMARY KEY (`loc_code`,`stock_id`), + KEY `stock_id` (`stock_id`) +) TYPE=InnoDB; -### Data of table `0_locations` ### +-- +-- Dumping data for table `0_loc_stock` +-- -INSERT INTO `0_locations` VALUES ('DEF', 'Default', 'Delivery 1\r\nDelivery 2\r\nDelivery 3', '', '', '', '', '', '0'); +INSERT INTO `0_loc_stock` VALUES('DEF', '102', 0); +INSERT INTO `0_loc_stock` VALUES('DEF', '103', 0); +INSERT INTO `0_loc_stock` VALUES('DEF', '104', 0); +INSERT INTO `0_loc_stock` VALUES('DEF', '201', 0); +INSERT INTO `0_loc_stock` VALUES('DEF', '3400', 0); +-- -------------------------------------------------------- -### Structure of table `0_movement_types` ### +-- +-- Table structure for table `0_movement_types` +-- DROP TABLE IF EXISTS `0_movement_types`; - -CREATE TABLE `0_movement_types` ( +CREATE TABLE IF NOT EXISTS `0_movement_types` ( `id` int(11) NOT NULL auto_increment, `name` varchar(60) NOT NULL default '', `inactive` tinyint(1) NOT NULL default '0', PRIMARY KEY (`id`), UNIQUE KEY `name` (`name`) -) TYPE=MyISAM AUTO_INCREMENT=2 ; +) TYPE=MyISAM AUTO_INCREMENT=2 ; +-- +-- Dumping data for table `0_movement_types` +-- -### Data of table `0_movement_types` ### - -INSERT INTO `0_movement_types` VALUES ('1', 'Adjustment', '0'); +INSERT INTO `0_movement_types` VALUES(1, 'Adjustment', 0); +-- -------------------------------------------------------- -### Structure of table `0_payment_terms` ### +-- +-- Table structure for table `0_payment_terms` +-- DROP TABLE IF EXISTS `0_payment_terms`; - -CREATE TABLE `0_payment_terms` ( +CREATE TABLE IF NOT EXISTS `0_payment_terms` ( `terms_indicator` int(11) NOT NULL auto_increment, `terms` char(80) NOT NULL default '', `days_before_due` smallint(6) NOT NULL default '0', @@ -1026,22 +1198,25 @@ CREATE TABLE `0_payment_terms` ( `inactive` tinyint(1) NOT NULL default '0', PRIMARY KEY (`terms_indicator`), UNIQUE KEY `terms` (`terms`) -) TYPE=MyISAM AUTO_INCREMENT=5 ; +) TYPE=MyISAM AUTO_INCREMENT=5 ; +-- +-- Dumping data for table `0_payment_terms` +-- -### Data of table `0_payment_terms` ### - -INSERT INTO `0_payment_terms` VALUES ('1', 'Due 15th Of the Following Month', '0', '17', '0'); -INSERT INTO `0_payment_terms` VALUES ('2', 'Due By End Of The Following Month', '0', '30', '0'); -INSERT INTO `0_payment_terms` VALUES ('3', 'Payment due within 10 days', '10', '0', '0'); -INSERT INTO `0_payment_terms` VALUES ('4', 'Cash Only', '1', '0', '0'); +INSERT INTO `0_payment_terms` VALUES(1, 'Due 15th Of the Following Month', 0, 17, 0); +INSERT INTO `0_payment_terms` VALUES(2, 'Due By End Of The Following Month', 0, 30, 0); +INSERT INTO `0_payment_terms` VALUES(3, 'Payment due within 10 days', 10, 0, 0); +INSERT INTO `0_payment_terms` VALUES(4, 'Cash Only', 0, 0, 0); +-- -------------------------------------------------------- -### Structure of table `0_prices` ### +-- +-- Table structure for table `0_prices` +-- DROP TABLE IF EXISTS `0_prices`; - -CREATE TABLE `0_prices` ( +CREATE TABLE IF NOT EXISTS `0_prices` ( `id` int(11) NOT NULL auto_increment, `stock_id` varchar(20) NOT NULL default '', `sales_type_id` int(11) NOT NULL default '0', @@ -1049,49 +1224,25 @@ CREATE TABLE `0_prices` ( `price` double NOT NULL default '0', PRIMARY KEY (`id`), UNIQUE KEY `price` (`stock_id`,`sales_type_id`,`curr_abrev`) -) TYPE=MyISAM AUTO_INCREMENT=5 ; - - -### Data of table `0_prices` ### - -INSERT INTO `0_prices` VALUES ('1', '3400', '1', 'USD', '100'); -INSERT INTO `0_prices` VALUES ('2', '102', '1', 'USD', '50'); -INSERT INTO `0_prices` VALUES ('3', '103', '1', 'USD', '55'); -INSERT INTO `0_prices` VALUES ('4', '104', '1', 'USD', '60'); - - -### Structure of table `0_print_profiles` ### - -DROP TABLE IF EXISTS `0_print_profiles`; - -CREATE TABLE `0_print_profiles` ( - `id` smallint(6) unsigned NOT NULL auto_increment, - `profile` varchar(30) NOT NULL, - `report` varchar(5) default NULL, - `printer` tinyint(3) unsigned default NULL, - PRIMARY KEY (`id`), - UNIQUE KEY `profile` (`profile`,`report`) -) TYPE=MyISAM AUTO_INCREMENT=10 ; +) TYPE=MyISAM AUTO_INCREMENT=5 ; +-- +-- Dumping data for table `0_prices` +-- -### Data of table `0_print_profiles` ### - -INSERT INTO `0_print_profiles` VALUES ('1', 'Out of office', '', '0'); -INSERT INTO `0_print_profiles` VALUES ('2', 'Sales Department', '', '0'); -INSERT INTO `0_print_profiles` VALUES ('3', 'Central', '', '2'); -INSERT INTO `0_print_profiles` VALUES ('4', 'Sales Department', '104', '2'); -INSERT INTO `0_print_profiles` VALUES ('5', 'Sales Department', '105', '2'); -INSERT INTO `0_print_profiles` VALUES ('6', 'Sales Department', '107', '2'); -INSERT INTO `0_print_profiles` VALUES ('7', 'Sales Department', '109', '2'); -INSERT INTO `0_print_profiles` VALUES ('8', 'Sales Department', '110', '2'); -INSERT INTO `0_print_profiles` VALUES ('9', 'Sales Department', '201', '2'); +INSERT INTO `0_prices` VALUES(1, '3400', 1, 'USD', 100); +INSERT INTO `0_prices` VALUES(2, '102', 1, 'USD', 50); +INSERT INTO `0_prices` VALUES(3, '103', 1, 'USD', 55); +INSERT INTO `0_prices` VALUES(4, '104', 1, 'USD', 60); +-- -------------------------------------------------------- -### Structure of table `0_printers` ### +-- +-- Table structure for table `0_printers` +-- DROP TABLE IF EXISTS `0_printers`; - -CREATE TABLE `0_printers` ( +CREATE TABLE IF NOT EXISTS `0_printers` ( `id` tinyint(3) unsigned NOT NULL auto_increment, `name` varchar(20) NOT NULL, `description` varchar(60) NOT NULL, @@ -1101,21 +1252,54 @@ CREATE TABLE `0_printers` ( `timeout` tinyint(3) unsigned NOT NULL, PRIMARY KEY (`id`), UNIQUE KEY `name` (`name`) -) TYPE=MyISAM AUTO_INCREMENT=4 ; +) TYPE=MyISAM AUTO_INCREMENT=4 ; + +-- +-- Dumping data for table `0_printers` +-- + +INSERT INTO `0_printers` VALUES(1, 'QL500', 'Label printer', 'QL500', 'server', 127, 20); +INSERT INTO `0_printers` VALUES(2, 'Samsung', 'Main network printer', 'scx4521F', 'server', 515, 5); +INSERT INTO `0_printers` VALUES(3, 'Local', 'Local print server at user IP', 'lp', '', 515, 10); +-- -------------------------------------------------------- + +-- +-- Table structure for table `0_print_profiles` +-- -### Data of table `0_printers` ### +DROP TABLE IF EXISTS `0_print_profiles`; +CREATE TABLE IF NOT EXISTS `0_print_profiles` ( + `id` smallint(6) unsigned NOT NULL auto_increment, + `profile` varchar(30) NOT NULL, + `report` varchar(5) default NULL, + `printer` tinyint(3) unsigned default NULL, + PRIMARY KEY (`id`), + UNIQUE KEY `profile` (`profile`,`report`) +) TYPE=MyISAM AUTO_INCREMENT=10 ; -INSERT INTO `0_printers` VALUES ('1', 'QL500', 'Label printer', 'QL500', 'server', '127', '20'); -INSERT INTO `0_printers` VALUES ('2', 'Samsung', 'Main network printer', 'scx4521F', 'server', '515', '5'); -INSERT INTO `0_printers` VALUES ('3', 'Local', 'Local print server at user IP', 'lp', '', '515', '10'); +-- +-- Dumping data for table `0_print_profiles` +-- +INSERT INTO `0_print_profiles` VALUES(1, 'Out of office', '', 0); +INSERT INTO `0_print_profiles` VALUES(2, 'Sales Department', '', 0); +INSERT INTO `0_print_profiles` VALUES(3, 'Central', '', 2); +INSERT INTO `0_print_profiles` VALUES(4, 'Sales Department', '104', 2); +INSERT INTO `0_print_profiles` VALUES(5, 'Sales Department', '105', 2); +INSERT INTO `0_print_profiles` VALUES(6, 'Sales Department', '107', 2); +INSERT INTO `0_print_profiles` VALUES(7, 'Sales Department', '109', 2); +INSERT INTO `0_print_profiles` VALUES(8, 'Sales Department', '110', 2); +INSERT INTO `0_print_profiles` VALUES(9, 'Sales Department', '201', 2); -### Structure of table `0_purch_data` ### +-- -------------------------------------------------------- -DROP TABLE IF EXISTS `0_purch_data`; +-- +-- Table structure for table `0_purch_data` +-- -CREATE TABLE `0_purch_data` ( +DROP TABLE IF EXISTS `0_purch_data`; +CREATE TABLE IF NOT EXISTS `0_purch_data` ( `supplier_id` int(11) NOT NULL default '0', `stock_id` char(20) NOT NULL default '', `price` double NOT NULL default '0', @@ -1123,21 +1307,53 @@ CREATE TABLE `0_purch_data` ( `conversion_factor` double NOT NULL default '1', `supplier_description` char(50) NOT NULL default '', PRIMARY KEY (`supplier_id`,`stock_id`) -) TYPE=MyISAM ; +) TYPE=MyISAM; + +-- +-- Dumping data for table `0_purch_data` +-- + +INSERT INTO `0_purch_data` VALUES(2, '102', 10, '', 1, '17inch VGA Monitor'); +INSERT INTO `0_purch_data` VALUES(2, '103', 11, '', 1, '32MB VGA Card'); +INSERT INTO `0_purch_data` VALUES(2, '104', 12, '', 1, '52x CD Drive'); + +-- -------------------------------------------------------- +-- +-- Table structure for table `0_purch_orders` +-- + +DROP TABLE IF EXISTS `0_purch_orders`; +CREATE TABLE IF NOT EXISTS `0_purch_orders` ( + `order_no` int(11) NOT NULL auto_increment, + `supplier_id` int(11) NOT NULL default '0', + `comments` tinytext, + `ord_date` date NOT NULL default '0000-00-00', + `reference` tinytext NOT NULL, + `requisition_no` tinytext, + `into_stock_location` varchar(5) NOT NULL default '', + `delivery_address` tinytext NOT NULL, + `total` double NOT NULL default '0', + `tax_included` tinyint(1) NOT NULL default '0', + PRIMARY KEY (`order_no`), + KEY `ord_date` (`ord_date`) +) TYPE=InnoDB AUTO_INCREMENT=3 ; -### Data of table `0_purch_data` ### +-- +-- Dumping data for table `0_purch_orders` +-- -INSERT INTO `0_purch_data` VALUES ('2', '102', '10', '', '1', '17inch VGA Monitor'); -INSERT INTO `0_purch_data` VALUES ('2', '103', '11', '', '1', '32MB VGA Card'); -INSERT INTO `0_purch_data` VALUES ('2', '104', '12', '', '1', '52x CD Drive'); +INSERT INTO `0_purch_orders` VALUES(1, 2, '', '2009-06-01', '1', '', 'DEF', 'Delivery 1\nDelivery 2\nDelivery 3', 0, 0); +INSERT INTO `0_purch_orders` VALUES(2, 3, '', '2009-06-21', '2', '', 'DEF', 'Delivery 1\nDelivery 2\nDelivery 3', 0, 0); +-- -------------------------------------------------------- -### Structure of table `0_purch_order_details` ### +-- +-- Table structure for table `0_purch_order_details` +-- DROP TABLE IF EXISTS `0_purch_order_details`; - -CREATE TABLE `0_purch_order_details` ( +CREATE TABLE IF NOT EXISTS `0_purch_order_details` ( `po_detail_item` int(11) NOT NULL auto_increment, `order_no` int(11) NOT NULL default '0', `item_code` varchar(20) NOT NULL default '', @@ -1149,96 +1365,84 @@ CREATE TABLE `0_purch_order_details` ( `std_cost_unit` double NOT NULL default '0', `quantity_ordered` double NOT NULL default '0', `quantity_received` double NOT NULL default '0', - PRIMARY KEY (`po_detail_item`) -) TYPE=InnoDB AUTO_INCREMENT=6 ; - - -### Data of table `0_purch_order_details` ### - -INSERT INTO `0_purch_order_details` VALUES ('1', '1', '102', '17inch VGA Monitor', '2009-07-01', '100', '10', '10', '10', '100', '100'); -INSERT INTO `0_purch_order_details` VALUES ('2', '1', '103', '32MB VGA Card', '2009-07-01', '100', '11', '11', '11', '100', '100'); -INSERT INTO `0_purch_order_details` VALUES ('3', '1', '104', '52x CD Drive', '2009-07-01', '100', '12', '12', '12', '100', '100'); -INSERT INTO `0_purch_order_details` VALUES ('4', '2', '102', '17inch VGA Monitor', '2009-07-01', '0', '5', '0', '0', '1', '0'); -INSERT INTO `0_purch_order_details` VALUES ('5', '2', '103', '32MB VGA Card', '2009-07-01', '0', '5', '0', '0', '1', '0'); - - -### Structure of table `0_purch_orders` ### - -DROP TABLE IF EXISTS `0_purch_orders`; + PRIMARY KEY (`po_detail_item`), + KEY `order` (`order_no`,`po_detail_item`) +) TYPE=InnoDB AUTO_INCREMENT=6 ; -CREATE TABLE `0_purch_orders` ( - `order_no` int(11) NOT NULL auto_increment, - `supplier_id` int(11) NOT NULL default '0', - `comments` tinytext, - `ord_date` date NOT NULL default '0000-00-00', - `reference` tinytext NOT NULL, - `requisition_no` tinytext, - `into_stock_location` varchar(5) NOT NULL default '', - `delivery_address` tinytext NOT NULL, - PRIMARY KEY (`order_no`) -) TYPE=InnoDB AUTO_INCREMENT=3 ; - - -### Data of table `0_purch_orders` ### +-- +-- Dumping data for table `0_purch_order_details` +-- -INSERT INTO `0_purch_orders` VALUES ('1', '2', '', '2009-06-01', '1', '', 'DEF', 'Delivery 1\r\nDelivery 2\r\nDelivery 3'); -INSERT INTO `0_purch_orders` VALUES ('2', '3', '', '2009-06-21', '2', '', 'DEF', 'Delivery 1\r\nDelivery 2\r\nDelivery 3'); +INSERT INTO `0_purch_order_details` VALUES(1, 1, '102', '17inch VGA Monitor', '2009-07-01', 100, 10, 10, 10, 100, 100); +INSERT INTO `0_purch_order_details` VALUES(2, 1, '103', '32MB VGA Card', '2009-07-01', 100, 11, 11, 11, 100, 100); +INSERT INTO `0_purch_order_details` VALUES(3, 1, '104', '52x CD Drive', '2009-07-01', 100, 12, 12, 12, 100, 100); +INSERT INTO `0_purch_order_details` VALUES(4, 2, '102', '17inch VGA Monitor', '2009-07-01', 0, 5, 0, 0, 1, 0); +INSERT INTO `0_purch_order_details` VALUES(5, 2, '103', '32MB VGA Card', '2009-07-01', 0, 5, 0, 0, 1, 0); +-- -------------------------------------------------------- -### Structure of table `0_quick_entries` ### +-- +-- Table structure for table `0_quick_entries` +-- DROP TABLE IF EXISTS `0_quick_entries`; - -CREATE TABLE `0_quick_entries` ( +CREATE TABLE IF NOT EXISTS `0_quick_entries` ( `id` smallint(6) unsigned NOT NULL auto_increment, `type` tinyint(1) NOT NULL default '0', `description` varchar(60) NOT NULL, `base_amount` double NOT NULL default '0', `base_desc` varchar(60) default NULL, + `bal_type` tinyint(1) NOT NULL default '0', PRIMARY KEY (`id`), KEY `description` (`description`) -) TYPE=MyISAM AUTO_INCREMENT=4 ; - +) TYPE=MyISAM AUTO_INCREMENT=4 ; -### Data of table `0_quick_entries` ### +-- +-- Dumping data for table `0_quick_entries` +-- -INSERT INTO `0_quick_entries` VALUES ('1', '1', 'Maintenance', '0', 'Amount'); -INSERT INTO `0_quick_entries` VALUES ('2', '4', 'Phone', '0', 'Amount'); -INSERT INTO `0_quick_entries` VALUES ('3', '2', 'Cash Sales', '0', 'Amount'); +INSERT INTO `0_quick_entries` VALUES(1, 1, 'Maintenance', 0, 'Amount', 0); +INSERT INTO `0_quick_entries` VALUES(2, 4, 'Phone', 0, 'Amount', 0); +INSERT INTO `0_quick_entries` VALUES(3, 2, 'Cash Sales', 0, 'Amount', 0); +-- -------------------------------------------------------- -### Structure of table `0_quick_entry_lines` ### +-- +-- Table structure for table `0_quick_entry_lines` +-- DROP TABLE IF EXISTS `0_quick_entry_lines`; - -CREATE TABLE `0_quick_entry_lines` ( +CREATE TABLE IF NOT EXISTS `0_quick_entry_lines` ( `id` smallint(6) unsigned NOT NULL auto_increment, `qid` smallint(6) unsigned NOT NULL, `amount` double default '0', `action` varchar(2) NOT NULL, - `dest_id` varchar(11) NOT NULL, + `dest_id` varchar(15) NOT NULL default '', `dimension_id` smallint(6) unsigned default NULL, `dimension2_id` smallint(6) unsigned default NULL, PRIMARY KEY (`id`), KEY `qid` (`qid`) -) TYPE=MyISAM AUTO_INCREMENT=8 ; - +) TYPE=MyISAM AUTO_INCREMENT=8 ; -### Data of table `0_quick_entry_lines` ### +-- +-- Dumping data for table `0_quick_entry_lines` +-- -INSERT INTO `0_quick_entry_lines` VALUES ('1', '1', '0', 't-', '1', '0', '0'); -INSERT INTO `0_quick_entry_lines` VALUES ('2', '2', '0', 't-', '1', '0', '0'); -INSERT INTO `0_quick_entry_lines` VALUES ('3', '3', '0', 't-', '1', '0', '0'); -INSERT INTO `0_quick_entry_lines` VALUES ('4', '3', '0', '=', '4010', '0', '0'); -INSERT INTO `0_quick_entry_lines` VALUES ('5', '1', '0', '=', '5765', '0', '0'); -INSERT INTO `0_quick_entry_lines` VALUES ('6', '2', '0', '=', '5780', '0', '0'); +INSERT INTO `0_quick_entry_lines` VALUES(1, 1, 0, 't-', '1', 0, 0); +INSERT INTO `0_quick_entry_lines` VALUES(2, 2, 0, 't-', '1', 0, 0); +INSERT INTO `0_quick_entry_lines` VALUES(3, 3, 0, 't-', '1', 0, 0); +INSERT INTO `0_quick_entry_lines` VALUES(4, 3, 0, '=', '4010', 0, 0); +INSERT INTO `0_quick_entry_lines` VALUES(5, 1, 0, '=', '5765', 0, 0); +INSERT INTO `0_quick_entry_lines` VALUES(6, 2, 0, '=', '5780', 0, 0); +-- -------------------------------------------------------- -### Structure of table `0_recurrent_invoices` ### +-- +-- Table structure for table `0_recurrent_invoices` +-- DROP TABLE IF EXISTS `0_recurrent_invoices`; - -CREATE TABLE `0_recurrent_invoices` ( +CREATE TABLE IF NOT EXISTS `0_recurrent_invoices` ( `id` smallint(6) unsigned NOT NULL auto_increment, `description` varchar(60) NOT NULL default '', `order_no` int(11) unsigned NOT NULL, @@ -1251,63 +1455,70 @@ CREATE TABLE `0_recurrent_invoices` ( `last_sent` date NOT NULL default '0000-00-00', PRIMARY KEY (`id`), UNIQUE KEY `description` (`description`) -) TYPE=InnoDB AUTO_INCREMENT=1 ; - +) TYPE=InnoDB AUTO_INCREMENT=1 ; -### Data of table `0_recurrent_invoices` ### +-- +-- Dumping data for table `0_recurrent_invoices` +-- +-- -------------------------------------------------------- -### Structure of table `0_refs` ### +-- +-- Table structure for table `0_refs` +-- DROP TABLE IF EXISTS `0_refs`; - -CREATE TABLE `0_refs` ( +CREATE TABLE IF NOT EXISTS `0_refs` ( `id` int(11) NOT NULL default '0', `type` int(11) NOT NULL default '0', `reference` varchar(100) NOT NULL default '', - PRIMARY KEY (`id`,`type`) -) TYPE=InnoDB ; - - -### Data of table `0_refs` ### - -INSERT INTO `0_refs` VALUES ('18', '0', '1'); -INSERT INTO `0_refs` VALUES ('19', '0', '2'); + PRIMARY KEY (`id`,`type`), + KEY `Type_and_Reference` (`type`,`reference`) +) TYPE=InnoDB; +-- +-- Dumping data for table `0_refs` +-- -### Structure of table `0_sales_order_details` ### +INSERT INTO `0_refs` VALUES(18, 0, '1'); +INSERT INTO `0_refs` VALUES(19, 0, '2'); -DROP TABLE IF EXISTS `0_sales_order_details`; +-- -------------------------------------------------------- -CREATE TABLE `0_sales_order_details` ( - `id` int(11) NOT NULL auto_increment, - `order_no` int(11) NOT NULL default '0', - `trans_type` smallint(6) NOT NULL default '30', - `stk_code` varchar(20) NOT NULL default '', - `description` tinytext, - `qty_sent` double NOT NULL default '0', - `unit_price` double NOT NULL default '0', - `quantity` double NOT NULL default '0', - `discount_percent` double NOT NULL default '0', - PRIMARY KEY (`id`) -) TYPE=InnoDB AUTO_INCREMENT=6 ; +-- +-- Table structure for table `0_salesman` +-- +DROP TABLE IF EXISTS `0_salesman`; +CREATE TABLE IF NOT EXISTS `0_salesman` ( + `salesman_code` int(11) NOT NULL auto_increment, + `salesman_name` char(60) NOT NULL default '', + `salesman_phone` char(30) NOT NULL default '', + `salesman_fax` char(30) NOT NULL default '', + `salesman_email` varchar(100) NOT NULL default '', + `provision` double NOT NULL default '0', + `break_pt` double NOT NULL default '0', + `provision2` double NOT NULL default '0', + `inactive` tinyint(1) NOT NULL default '0', + PRIMARY KEY (`salesman_code`), + UNIQUE KEY `salesman_name` (`salesman_name`) +) TYPE=MyISAM AUTO_INCREMENT=2 ; -### Data of table `0_sales_order_details` ### +-- +-- Dumping data for table `0_salesman` +-- -INSERT INTO `0_sales_order_details` VALUES ('1', '1', '30', '102', '17inch VGA Monitor', '2', '30.4', '2', '0'); -INSERT INTO `0_sales_order_details` VALUES ('2', '2', '30', '102', '17inch VGA Monitor', '1', '50', '1', '0'); -INSERT INTO `0_sales_order_details` VALUES ('3', '3', '30', '102', '17inch VGA Monitor', '1', '35.89', '1', '0'); -INSERT INTO `0_sales_order_details` VALUES ('4', '4', '30', '102', '17inch VGA Monitor', '0', '21.28', '2', '0'); -INSERT INTO `0_sales_order_details` VALUES ('5', '5', '30', '102', '17inch VGA Monitor', '1', '50', '1', '0'); +INSERT INTO `0_salesman` VALUES(1, 'Sales Person', '', '', '', 5, 1000, 4, 0); +-- -------------------------------------------------------- -### Structure of table `0_sales_orders` ### +-- +-- Table structure for table `0_sales_orders` +-- DROP TABLE IF EXISTS `0_sales_orders`; - -CREATE TABLE `0_sales_orders` ( +CREATE TABLE IF NOT EXISTS `0_sales_orders` ( `order_no` int(11) NOT NULL, `trans_type` smallint(6) NOT NULL default '30', `version` tinyint(1) unsigned NOT NULL default '0', @@ -1327,45 +1538,85 @@ CREATE TABLE `0_sales_orders` ( `freight_cost` double NOT NULL default '0', `from_stk_loc` varchar(5) NOT NULL default '', `delivery_date` date NOT NULL default '0000-00-00', - PRIMARY KEY (`trans_type`, `order_no`) + `payment_terms` int(11) default NULL, + `total` double NOT NULL default '0', + PRIMARY KEY (`trans_type`,`order_no`) ) TYPE=InnoDB; -### Data of table `0_sales_orders` ### - -INSERT INTO `0_sales_orders` VALUES ('1', '30', '1', '0', '1', '1', '1', '', '', '2009-06-21', '2', '1', 'Address 1\r\nAddress 2\r\nAddress 3', '', '', 'Beefeater Ltd.', '10', 'DEF', '2009-06-22'); -INSERT INTO `0_sales_orders` VALUES ('2', '30', '1', '0', '2', '2', '2', '', '', '2009-06-21', '1', '1', 'Address 1\r\nAddress 2\r\nAddress 3', '', '', 'Ghostbusters Corp.', '0', 'DEF', '2009-06-22'); -INSERT INTO `0_sales_orders` VALUES ('3', '30', '1', '0', '3', '3', '3', '', '', '2009-06-21', '2', '1', 'Address 1\r\nAddress 2\r\nAddress 3', '', '', 'Brezan', '0', 'DEF', '2009-07-01'); -INSERT INTO `0_sales_orders` VALUES ('4', '30', '0', '0', '1', '1', '4', '', '', '2009-06-21', '2', '1', 'Address 1\r\nAddress 2\r\nAddress 3', '', '', 'Beefeater Ltd.', '0', 'DEF', '2009-06-22'); -INSERT INTO `0_sales_orders` VALUES ('5', '30', '1', '0', '2', '2', '5', '', '', '2009-06-21', '1', '1', 'Address 1\r\nAddress 2\r\nAddress 3', '', '', 'Ghostbusters Corp.', '5', 'DEF', '2009-06-22'); +-- +-- Dumping data for table `0_sales_orders` +-- +INSERT INTO `0_sales_orders` VALUES(1, 30, 1, 0, 1, 1, '1', '', '', '2009-06-21', 2, 1, 'Address 1\nAddress 2\nAddress 3', '', '', 'Beefeater Ltd.', 10, 'DEF', '2009-06-22', 3, 0); +INSERT INTO `0_sales_orders` VALUES(2, 30, 1, 0, 2, 2, '2', '', '', '2009-06-21', 1, 1, 'Address 1\nAddress 2\nAddress 3', '', '', 'Ghostbusters Corp.', 0, 'DEF', '2009-06-22', 4, 0); +INSERT INTO `0_sales_orders` VALUES(3, 30, 1, 0, 3, 3, '3', '', '', '2009-06-21', 2, 1, 'Address 1\nAddress 2\nAddress 3', '', '', 'Brezan', 0, 'DEF', '2009-07-01', 3, 0); +INSERT INTO `0_sales_orders` VALUES(4, 30, 0, 0, 1, 1, '4', '', '', '2009-06-21', 2, 1, 'Address 1\nAddress 2\nAddress 3', '', '', 'Beefeater Ltd.', 0, 'DEF', '2009-06-22', 3, 0); +INSERT INTO `0_sales_orders` VALUES(5, 30, 1, 0, 2, 2, '5', '', '', '2009-06-21', 1, 1, 'Address 1\nAddress 2\nAddress 3', '', '', 'Ghostbusters Corp.', 5, 'DEF', '2009-06-22', 4, 0); -### Structure of table `0_sales_pos` ### +-- -------------------------------------------------------- -DROP TABLE IF EXISTS `0_sales_pos`; +-- +-- Table structure for table `0_sales_order_details` +-- -CREATE TABLE `0_sales_pos` ( - `id` smallint(6) unsigned NOT NULL auto_increment, - `pos_name` varchar(30) NOT NULL, - `cash_sale` tinyint(1) NOT NULL, - `credit_sale` tinyint(1) NOT NULL, +DROP TABLE IF EXISTS `0_sales_order_details`; +CREATE TABLE IF NOT EXISTS `0_sales_order_details` ( + `id` int(11) NOT NULL auto_increment, + `order_no` int(11) NOT NULL default '0', + `trans_type` smallint(6) NOT NULL default '30', + `stk_code` varchar(20) NOT NULL default '', + `description` tinytext, + `qty_sent` double NOT NULL default '0', + `unit_price` double NOT NULL default '0', + `quantity` double NOT NULL default '0', + `discount_percent` double NOT NULL default '0', + PRIMARY KEY (`id`), + KEY `sorder` (`trans_type`,`order_no`) +) TYPE=InnoDB AUTO_INCREMENT=6 ; + +-- +-- Dumping data for table `0_sales_order_details` +-- + +INSERT INTO `0_sales_order_details` VALUES(1, 1, 30, '102', '17inch VGA Monitor', 2, 30.4, 2, 0); +INSERT INTO `0_sales_order_details` VALUES(2, 2, 30, '102', '17inch VGA Monitor', 1, 50, 1, 0); +INSERT INTO `0_sales_order_details` VALUES(3, 3, 30, '102', '17inch VGA Monitor', 1, 35.89, 1, 0); +INSERT INTO `0_sales_order_details` VALUES(4, 4, 30, '102', '17inch VGA Monitor', 0, 21.28, 2, 0); +INSERT INTO `0_sales_order_details` VALUES(5, 5, 30, '102', '17inch VGA Monitor', 1, 50, 1, 0); + +-- -------------------------------------------------------- + +-- +-- Table structure for table `0_sales_pos` +-- + +DROP TABLE IF EXISTS `0_sales_pos`; +CREATE TABLE IF NOT EXISTS `0_sales_pos` ( + `id` smallint(6) unsigned NOT NULL auto_increment, + `pos_name` varchar(30) NOT NULL, + `cash_sale` tinyint(1) NOT NULL, + `credit_sale` tinyint(1) NOT NULL, `pos_location` varchar(5) NOT NULL, `pos_account` smallint(6) unsigned NOT NULL, `inactive` tinyint(1) NOT NULL default '0', PRIMARY KEY (`id`), UNIQUE KEY `pos_name` (`pos_name`) -) TYPE=MyISAM AUTO_INCREMENT=2 ; - +) TYPE=MyISAM AUTO_INCREMENT=2 ; -### Data of table `0_sales_pos` ### +-- +-- Dumping data for table `0_sales_pos` +-- -INSERT INTO `0_sales_pos` VALUES ('1', 'Default', '1', '1', 'DEF', '2', '0'); +INSERT INTO `0_sales_pos` VALUES(1, 'Default', 1, 1, 'DEF', 2, 0); +-- -------------------------------------------------------- -### Structure of table `0_sales_types` ### +-- +-- Table structure for table `0_sales_types` +-- DROP TABLE IF EXISTS `0_sales_types`; - -CREATE TABLE `0_sales_types` ( +CREATE TABLE IF NOT EXISTS `0_sales_types` ( `id` int(11) NOT NULL auto_increment, `sales_type` char(50) NOT NULL default '', `tax_included` int(1) NOT NULL default '0', @@ -1373,39 +1624,20 @@ CREATE TABLE `0_sales_types` ( `inactive` tinyint(1) NOT NULL default '0', PRIMARY KEY (`id`), UNIQUE KEY `sales_type` (`sales_type`) -) TYPE=MyISAM AUTO_INCREMENT=3 ; - - -### Data of table `0_sales_types` ### - -INSERT INTO `0_sales_types` VALUES ('1', 'Retail', '1', '1', '0'); -INSERT INTO `0_sales_types` VALUES ('2', 'Wholesale', '0', '0.7', '0'); - - -### Structure of table `0_salesman` ### - -DROP TABLE IF EXISTS `0_salesman`; - -CREATE TABLE `0_salesman` ( - `salesman_code` int(11) NOT NULL auto_increment, - `salesman_name` char(60) NOT NULL default '', - `salesman_phone` char(30) NOT NULL default '', - `salesman_fax` char(30) NOT NULL default '', - `salesman_email` varchar(100) NOT NULL default '', - `provision` double NOT NULL default '0', - `break_pt` double NOT NULL default '0', - `provision2` double NOT NULL default '0', - `inactive` tinyint(1) NOT NULL default '0', - PRIMARY KEY (`salesman_code`), - UNIQUE KEY `salesman_name` (`salesman_name`) -) TYPE=MyISAM AUTO_INCREMENT=2 ; +) TYPE=MyISAM AUTO_INCREMENT=3 ; +-- +-- Dumping data for table `0_sales_types` +-- -### Data of table `0_salesman` ### +INSERT INTO `0_sales_types` VALUES(1, 'Retail', 1, 1, 0); +INSERT INTO `0_sales_types` VALUES(2, 'Wholesale', 0, 0.7, 0); -INSERT INTO `0_salesman` VALUES ('1', 'Sales Person', '', '', '', '5', '1000', '4', '0'); +-- -------------------------------------------------------- -### Structure of table `0_security_roles` ### +-- +-- Table structure for table `0_security_roles` +-- DROP TABLE IF EXISTS `0_security_roles`; CREATE TABLE IF NOT EXISTS `0_security_roles` ( @@ -1420,25 +1652,28 @@ CREATE TABLE IF NOT EXISTS `0_security_roles` ( ) TYPE=MyISAM AUTO_INCREMENT=11 ; -- --- Data of table `0_security_roles` +-- Dumping data for table `0_security_roles` -- -INSERT INTO `0_security_roles` VALUES (1, 'Inquiries', 'Inquiries', '768;2816;3072;3328;5632;5888;8192;8448;10752;11008;13312;15872;16128', '257;258;259;260;513;514;515;516;517;518;519;520;521;522;523;524;525;773;774;2822;3073;3075;3076;3077;3329;3330;3331;3332;3333;3334;3335;5377;5633;5640;5889;5890;5891;7937;7938;7939;7940;8193;8194;8450;8451;10497;10753;11009;11010;11012;13313;13315;15617;15618;15619;15620;15621;15622;15623;15624;15625;15626;15873;15882;16129;16130;16131;16132', 0); -INSERT INTO `0_security_roles` VALUES (2, 'System Administrator', 'System Administrator', '256;512;768;2816;3072;3328;5376;5632;5888;7936;8192;8448;10496;10752;11008;13056;13312;15616;15872;16128', '257;258;259;260;513;514;515;516;517;518;519;520;521;522;523;524;525;769;770;771;772;773;774;2817;2818;2819;2820;2821;2822;2823;3073;3074;3082;3075;3076;3077;3078;3079;3080;3081;3329;3330;3331;3332;3333;3334;3335;5377;5633;5634;5635;5636;5637;5641;5638;5639;5640;5889;5890;5891;7937;7938;7939;7940;8193;8194;8195;8196;8197;8449;8450;8451;10497;10753;10754;10755;10756;10757;11009;11010;11011;11012;13057;13313;13314;13315;15617;15618;15619;15620;15621;15622;15623;15624;15628;15625;15626;15627;15873;15874;15875;15876;15877;15878;15879;15880;15883;15881;15882;16129;16130;16131;16132', 0); -INSERT INTO `0_security_roles` VALUES (3, 'Salesman', 'Salesman', '768;3072;5632;8192;15872', '773;774;3073;3075;3081;5633;8194;15873', 0); -INSERT INTO `0_security_roles` VALUES (4, 'Stock Manager', 'Stock Manager', '2816;3072;3328;5632;5888;8192;8448;10752;11008;13312;15872;16128', '2818;2822;3073;3076;3077;3329;3330;3330;3330;3331;3331;3332;3333;3334;3335;5633;5640;5889;5890;5891;8193;8194;8450;8451;10753;11009;11010;11012;13313;13315;15882;16129;16130;16131;16132', 0); -INSERT INTO `0_security_roles` VALUES (5, 'Production Manager', 'Production Manager', '512;2816;3072;3328;5632;5888;8192;8448;10752;11008;13312;15616;15872;16128', '521;523;524;2818;2819;2820;2821;2822;2823;3073;3074;3076;3077;3078;3079;3080;3081;3329;3330;3330;3330;3331;3331;3332;3333;3334;3335;5633;5640;5640;5889;5890;5891;8193;8194;8196;8197;8450;8451;10753;10755;11009;11010;11012;13313;13315;15617;15619;15620;15621;15624;15624;15876;15877;15880;15882;16129;16130;16131;16132', 0); -INSERT INTO `0_security_roles` VALUES (6, 'Purchase Officer', 'Purchase Officer', '512;2816;3072;3328;5376;5632;5888;8192;8448;10752;11008;13312;15616;15872;16128', '521;523;524;2818;2819;2820;2821;2822;2823;3073;3074;3076;3077;3078;3079;3080;3081;3329;3330;3330;3330;3331;3331;3332;3333;3334;3335;5377;5633;5635;5640;5640;5889;5890;5891;8193;8194;8196;8197;8449;8450;8451;10753;10755;11009;11010;11012;13313;13315;15617;15619;15620;15621;15624;15624;15876;15877;15880;15882;16129;16130;16131;16132', 0); -INSERT INTO `0_security_roles` VALUES (7, 'AR Officer', 'AR Officer', '512;768;2816;3072;3328;5632;5888;8192;8448;10752;11008;13312;15616;15872;16128', '521;523;524;771;773;774;2818;2819;2820;2821;2822;2823;3073;3073;3074;3075;3076;3077;3078;3079;3080;3081;3081;3329;3330;3330;3330;3331;3331;3332;3333;3334;3335;5633;5633;5634;5637;5638;5639;5640;5640;5889;5890;5891;8193;8194;8194;8196;8197;8450;8451;10753;10755;11009;11010;11012;13313;13315;15617;15619;15620;15621;15624;15624;15873;15876;15877;15878;15880;15882;16129;16130;16131;16132', 0); -INSERT INTO `0_security_roles` VALUES (8, 'AP Officer', 'AP Officer', '512;2816;3072;3328;5376;5632;5888;8192;8448;10752;11008;13312;15616;15872;16128', '257;258;259;260;521;523;524;769;770;771;772;773;774;2818;2819;2820;2821;2822;2823;3073;3074;3082;3076;3077;3078;3079;3080;3081;3329;3330;3331;3332;3333;3334;3335;5377;5633;5635;5640;5889;5890;5891;7937;7938;7939;7940;8193;8194;8196;8197;8449;8450;8451;10497;10753;10755;11009;11010;11012;13057;13313;13315;15617;15619;15620;15621;15624;15876;15877;15880;15882;16129;16130;16131;16132', 0); -INSERT INTO `0_security_roles` VALUES (9, 'Accountant', 'New Accountant', '512;768;2816;3072;3328;5376;5632;5888;8192;8448;10752;11008;13312;15616;15872;16128', '257;258;259;260;521;523;524;771;772;773;774;2818;2819;2820;2821;2822;2823;3073;3074;3075;3076;3077;3078;3079;3080;3081;3329;3330;3331;3332;3333;3334;3335;5377;5633;5634;5635;5637;5638;5639;5640;5889;5890;5891;7937;7938;7939;7940;8193;8194;8196;8197;8449;8450;8451;10497;10753;10755;11009;11010;11012;13313;13315;15617;15618;15619;15620;15621;15624;15873;15876;15877;15878;15880;15882;16129;16130;16131;16132', 0); -INSERT INTO `0_security_roles` VALUES (10, 'Sub Admin', 'Sub Admin', '512;768;2816;3072;3328;5376;5632;5888;8192;8448;10752;11008;13312;15616;15872;16128', '257;258;259;260;521;523;524;771;772;773;774;2818;2819;2820;2821;2822;2823;3073;3074;3082;3075;3076;3077;3078;3079;3080;3081;3329;3330;3331;3332;3333;3334;3335;5377;5633;5634;5635;5637;5638;5639;5640;5889;5890;5891;7937;7938;7939;7940;8193;8194;8196;8197;8449;8450;8451;10497;10753;10755;11009;11010;11012;13057;13313;13315;15617;15619;15620;15621;15624;15873;15874;15876;15877;15878;15879;15880;15882;16129;16130;16131;16132', 0); +INSERT INTO `0_security_roles` VALUES(1, 'Inquiries', 'Inquiries', '768;2816;3072;3328;5632;5888;8192;8448;10752;11008;13312;15872;16128', '257;258;259;260;513;514;515;516;517;518;519;520;521;522;523;524;525;773;774;2822;3073;3075;3076;3077;3329;3330;3331;3332;3333;3334;3335;5377;5633;5640;5889;5890;5891;7937;7938;7939;7940;8193;8194;8450;8451;10497;10753;11009;11010;11012;13313;13315;15617;15618;15619;15620;15621;15622;15623;15624;15625;15626;15873;15882;16129;16130;16131;16132', 0); +INSERT INTO `0_security_roles` VALUES(2, 'System Administrator', 'System Administrator', '256;512;768;2816;3072;3328;5376;5632;5888;7936;8192;8448;10496;10752;11008;13056;13312;15616;15872;16128', '257;258;259;260;513;514;515;516;517;518;519;520;521;522;523;524;525;526;769;770;771;772;773;774;2817;2818;2819;2820;2821;2822;2823;3073;3074;3082;3075;3076;3077;3078;3079;3080;3081;3329;3330;3331;3332;3333;3334;3335;5377;5633;5634;5635;5636;5637;5641;5638;5639;5640;5889;5890;5891;7937;7938;7939;7940;8193;8194;8195;8196;8197;8449;8450;8451;10497;10753;10754;10755;10756;10757;11009;11010;11011;11012;13057;13313;13314;13315;15617;15618;15619;15620;15621;15622;15623;15624;15628;15625;15626;15627;15873;15874;15875;15876;15877;15878;15879;15880;15883;15881;15882;16129;16130;16131;16132', 0); +INSERT INTO `0_security_roles` VALUES(3, 'Salesman', 'Salesman', '768;3072;5632;8192;15872', '773;774;3073;3075;3081;5633;8194;15873', 0); +INSERT INTO `0_security_roles` VALUES(4, 'Stock Manager', 'Stock Manager', '2816;3072;3328;5632;5888;8192;8448;10752;11008;13312;15872;16128', '2818;2822;3073;3076;3077;3329;3330;3330;3330;3331;3331;3332;3333;3334;3335;5633;5640;5889;5890;5891;8193;8194;8450;8451;10753;11009;11010;11012;13313;13315;15882;16129;16130;16131;16132', 0); +INSERT INTO `0_security_roles` VALUES(5, 'Production Manager', 'Production Manager', '512;2816;3072;3328;5632;5888;8192;8448;10752;11008;13312;15616;15872;16128', '521;523;524;2818;2819;2820;2821;2822;2823;3073;3074;3076;3077;3078;3079;3080;3081;3329;3330;3330;3330;3331;3331;3332;3333;3334;3335;5633;5640;5640;5889;5890;5891;8193;8194;8196;8197;8450;8451;10753;10755;11009;11010;11012;13313;13315;15617;15619;15620;15621;15624;15624;15876;15877;15880;15882;16129;16130;16131;16132', 0); +INSERT INTO `0_security_roles` VALUES(6, 'Purchase Officer', 'Purchase Officer', '512;2816;3072;3328;5376;5632;5888;8192;8448;10752;11008;13312;15616;15872;16128', '521;523;524;2818;2819;2820;2821;2822;2823;3073;3074;3076;3077;3078;3079;3080;3081;3329;3330;3330;3330;3331;3331;3332;3333;3334;3335;5377;5633;5635;5640;5640;5889;5890;5891;8193;8194;8196;8197;8449;8450;8451;10753;10755;11009;11010;11012;13313;13315;15617;15619;15620;15621;15624;15624;15876;15877;15880;15882;16129;16130;16131;16132', 0); +INSERT INTO `0_security_roles` VALUES(7, 'AR Officer', 'AR Officer', '512;768;2816;3072;3328;5632;5888;8192;8448;10752;11008;13312;15616;15872;16128', '521;523;524;771;773;774;2818;2819;2820;2821;2822;2823;3073;3073;3074;3075;3076;3077;3078;3079;3080;3081;3081;3329;3330;3330;3330;3331;3331;3332;3333;3334;3335;5633;5633;5634;5637;5638;5639;5640;5640;5889;5890;5891;8193;8194;8194;8196;8197;8450;8451;10753;10755;11009;11010;11012;13313;13315;15617;15619;15620;15621;15624;15624;15873;15876;15877;15878;15880;15882;16129;16130;16131;16132', 0); +INSERT INTO `0_security_roles` VALUES(8, 'AP Officer', 'AP Officer', '512;2816;3072;3328;5376;5632;5888;8192;8448;10752;11008;13312;15616;15872;16128', '257;258;259;260;521;523;524;769;770;771;772;773;774;2818;2819;2820;2821;2822;2823;3073;3074;3082;3076;3077;3078;3079;3080;3081;3329;3330;3331;3332;3333;3334;3335;5377;5633;5635;5640;5889;5890;5891;7937;7938;7939;7940;8193;8194;8196;8197;8449;8450;8451;10497;10753;10755;11009;11010;11012;13057;13313;13315;15617;15619;15620;15621;15624;15876;15877;15880;15882;16129;16130;16131;16132', 0); +INSERT INTO `0_security_roles` VALUES(9, 'Accountant', 'New Accountant', '512;768;2816;3072;3328;5376;5632;5888;8192;8448;10752;11008;13312;15616;15872;16128', '257;258;259;260;521;523;524;771;772;773;774;2818;2819;2820;2821;2822;2823;3073;3074;3075;3076;3077;3078;3079;3080;3081;3329;3330;3331;3332;3333;3334;3335;5377;5633;5634;5635;5637;5638;5639;5640;5889;5890;5891;7937;7938;7939;7940;8193;8194;8196;8197;8449;8450;8451;10497;10753;10755;11009;11010;11012;13313;13315;15617;15618;15619;15620;15621;15624;15873;15876;15877;15878;15880;15882;16129;16130;16131;16132', 0); +INSERT INTO `0_security_roles` VALUES(10, 'Sub Admin', 'Sub Admin', '512;768;2816;3072;3328;5376;5632;5888;8192;8448;10752;11008;13312;15616;15872;16128', '257;258;259;260;521;523;524;771;772;773;774;2818;2819;2820;2821;2822;2823;3073;3074;3082;3075;3076;3077;3078;3079;3080;3081;3329;3330;3331;3332;3333;3334;3335;5377;5633;5634;5635;5637;5638;5639;5640;5889;5890;5891;7937;7938;7939;7940;8193;8194;8196;8197;8449;8450;8451;10497;10753;10755;11009;11010;11012;13057;13313;13315;15617;15619;15620;15621;15624;15873;15874;15876;15877;15878;15879;15880;15882;16129;16130;16131;16132', 0); -### Structure of table `0_shippers` ### +-- -------------------------------------------------------- -DROP TABLE IF EXISTS `0_shippers`; +-- +-- Table structure for table `0_shippers` +-- -CREATE TABLE `0_shippers` ( +DROP TABLE IF EXISTS `0_shippers`; +CREATE TABLE IF NOT EXISTS `0_shippers` ( `shipper_id` int(11) NOT NULL auto_increment, `shipper_name` varchar(60) NOT NULL default '', `phone` varchar(30) NOT NULL default '', @@ -1448,67 +1683,77 @@ CREATE TABLE `0_shippers` ( `inactive` tinyint(1) NOT NULL default '0', PRIMARY KEY (`shipper_id`), UNIQUE KEY `name` (`shipper_name`) -) TYPE=MyISAM AUTO_INCREMENT=2 ; - +) TYPE=MyISAM AUTO_INCREMENT=2 ; -### Data of table `0_shippers` ### +-- +-- Dumping data for table `0_shippers` +-- -INSERT INTO `0_shippers` VALUES ('1', 'Default', '', '', '', '', '0'); +INSERT INTO `0_shippers` VALUES(1, 'Default', '', '', '', '', 0); +-- -------------------------------------------------------- -### Structure of table `0_sql_trail` ### +-- +-- Table structure for table `0_sql_trail` +-- DROP TABLE IF EXISTS `0_sql_trail`; - -CREATE TABLE `0_sql_trail` ( +CREATE TABLE IF NOT EXISTS `0_sql_trail` ( `id` int(11) unsigned NOT NULL auto_increment, `sql` text NOT NULL, `result` tinyint(1) NOT NULL, `msg` varchar(255) NOT NULL, PRIMARY KEY (`id`) -) TYPE=MyISAM AUTO_INCREMENT=1 ; - +) TYPE=MyISAM AUTO_INCREMENT=1 ; -### Data of table `0_sql_trail` ### +-- +-- Dumping data for table `0_sql_trail` +-- +-- -------------------------------------------------------- -### Structure of table `0_stock_category` ### +-- +-- Table structure for table `0_stock_category` +-- DROP TABLE IF EXISTS `0_stock_category`; - -CREATE TABLE `0_stock_category` ( +CREATE TABLE IF NOT EXISTS `0_stock_category` ( `category_id` int(11) NOT NULL auto_increment, `description` varchar(60) NOT NULL default '', `dflt_tax_type` int(11) NOT NULL default '1', `dflt_units` varchar(20) NOT NULL default 'each', `dflt_mb_flag` char(1) NOT NULL default 'B', - `dflt_sales_act` varchar(11) NOT NULL default '', - `dflt_cogs_act` varchar(11) NOT NULL default '', - `dflt_inventory_act` varchar(11) NOT NULL default '', - `dflt_adjustment_act` varchar(11) NOT NULL default '', - `dflt_assembly_act` varchar(11) NOT NULL default '', + `dflt_sales_act` varchar(15) NOT NULL default '', + `dflt_cogs_act` varchar(15) NOT NULL default '', + `dflt_inventory_act` varchar(15) NOT NULL default '', + `dflt_adjustment_act` varchar(15) NOT NULL default '', + `dflt_assembly_act` varchar(15) NOT NULL default '', `dflt_dim1` int(11) default NULL, `dflt_dim2` int(11) default NULL, `inactive` tinyint(1) NOT NULL default '0', `dflt_no_sale` tinyint(1) NOT NULL default '0', PRIMARY KEY (`category_id`), UNIQUE KEY `description` (`description`) -) TYPE=MyISAM AUTO_INCREMENT=5 ; +) TYPE=MyISAM AUTO_INCREMENT=5 ; -### Data of table `0_stock_category` ### +-- +-- Dumping data for table `0_stock_category` +-- -INSERT INTO `0_stock_category` VALUES ('1', 'Components', '1', 'each', 'B', '4010', '5010', '1510', '5040', '1530', '0', '0', '0', '0'); -INSERT INTO `0_stock_category` VALUES ('2', 'Charges', '1', 'each', 'D', '4010', '5010', '1510', '5040', '1530', '0', '0', '0', '0'); -INSERT INTO `0_stock_category` VALUES ('3', 'Systems', '1', 'each', 'M', '4010', '5010', '1510', '5040', '1530', '0', '0', '0', '0'); -INSERT INTO `0_stock_category` VALUES ('4', 'Services', '1', 'hrs', 'D', '4010', '5010', '1510', '5040', '1530', '0', '0', '0', '0'); +INSERT INTO `0_stock_category` VALUES(1, 'Components', 1, 'each', 'B', '4010', '5010', '1510', '5040', '1530', 0, 0, 0, 0); +INSERT INTO `0_stock_category` VALUES(2, 'Charges', 1, 'each', 'D', '4010', '5010', '1510', '5040', '1530', 0, 0, 0, 0); +INSERT INTO `0_stock_category` VALUES(3, 'Systems', 1, 'each', 'M', '4010', '5010', '1510', '5040', '1530', 0, 0, 0, 0); +INSERT INTO `0_stock_category` VALUES(4, 'Services', 1, 'hrs', 'D', '4010', '5010', '1510', '5040', '1530', 0, 0, 0, 0); +-- -------------------------------------------------------- -### Structure of table `0_stock_master` ### +-- +-- Table structure for table `0_stock_master` +-- DROP TABLE IF EXISTS `0_stock_master`; - -CREATE TABLE `0_stock_master` ( +CREATE TABLE IF NOT EXISTS `0_stock_master` ( `stock_id` varchar(20) NOT NULL default '', `category_id` int(11) NOT NULL default '0', `tax_type_id` int(11) NOT NULL default '0', @@ -1516,11 +1761,11 @@ CREATE TABLE `0_stock_master` ( `long_description` tinytext NOT NULL, `units` varchar(20) NOT NULL default 'each', `mb_flag` char(1) NOT NULL default 'B', - `sales_account` varchar(11) NOT NULL default '', - `cogs_account` varchar(11) NOT NULL default '', - `inventory_account` varchar(11) NOT NULL default '', - `adjustment_account` varchar(11) NOT NULL default '', - `assembly_account` varchar(11) NOT NULL default '', + `sales_account` varchar(15) NOT NULL default '', + `cogs_account` varchar(15) NOT NULL default '', + `inventory_account` varchar(15) NOT NULL default '', + `adjustment_account` varchar(15) NOT NULL default '', + `assembly_account` varchar(15) NOT NULL default '', `dimension_id` int(11) default NULL, `dimension2_id` int(11) default NULL, `actual_cost` double NOT NULL default '0', @@ -1530,24 +1775,28 @@ CREATE TABLE `0_stock_master` ( `overhead_cost` double NOT NULL default '0', `inactive` tinyint(1) NOT NULL default '0', `no_sale` tinyint(1) NOT NULL default '0', + `editable` tinyint(1) NOT NULL default '0', PRIMARY KEY (`stock_id`) -) TYPE=InnoDB ; - +) TYPE=InnoDB; -### Data of table `0_stock_master` ### +-- +-- Dumping data for table `0_stock_master` +-- -INSERT INTO `0_stock_master` VALUES ('102', '1', '1', '17inch VGA Monitor', '', 'ea.', 'B', '4010', '5010', '1510', '5040', '1530', '0', '0', '0', '0', '10', '0', '0', '0', '0'); -INSERT INTO `0_stock_master` VALUES ('103', '1', '1', '32MB VGA Card', '', 'ea.', 'B', '4010', '5010', '1510', '5040', '1530', '0', '0', '0', '0', '11', '0', '0', '0', '0'); -INSERT INTO `0_stock_master` VALUES ('104', '1', '1', '52x CD Drive', '', 'ea.', 'B', '4010', '5010', '1510', '5040', '1530', '0', '0', '0', '0', '12', '0', '0', '0', '0'); -INSERT INTO `0_stock_master` VALUES ('201', '4', '1', 'Assembly Labour', '', 'hrs', 'D', '4010', '5010', '5010', '5040', '1530', '0', '0', '0', '0', '0', '0', '0', '0', '0'); -INSERT INTO `0_stock_master` VALUES ('3400', '3', '1', 'P4 Business System', '', 'ea.', 'M', '4010', '5010', '1540', '5040', '1530', '0', '0', '0', '0', '33', '3.9999999999999', '2', '0', '0'); +INSERT INTO `0_stock_master` VALUES('102', 1, 1, '17inch VGA Monitor', '', 'ea.', 'B', '4010', '5010', '1510', '5040', '1530', 0, 0, 0, 0, 10, 0, 0, 0, 0, 0); +INSERT INTO `0_stock_master` VALUES('103', 1, 1, '32MB VGA Card', '', 'ea.', 'B', '4010', '5010', '1510', '5040', '1530', 0, 0, 0, 0, 11, 0, 0, 0, 0, 0); +INSERT INTO `0_stock_master` VALUES('104', 1, 1, '52x CD Drive', '', 'ea.', 'B', '4010', '5010', '1510', '5040', '1530', 0, 0, 0, 0, 12, 0, 0, 0, 0, 0); +INSERT INTO `0_stock_master` VALUES('201', 4, 1, 'Assembly Labour', '', 'hrs', 'D', '4010', '5010', '5010', '5040', '1530', 0, 0, 0, 0, 0, 0, 0, 0, 0, 0); +INSERT INTO `0_stock_master` VALUES('3400', 3, 1, 'P4 Business System', '', 'ea.', 'M', '4010', '5010', '1540', '5040', '1530', 0, 0, 0, 0, 33, 3.9999999999999, 2, 0, 0, 0); +-- -------------------------------------------------------- -### Structure of table `0_stock_moves` ### +-- +-- Table structure for table `0_stock_moves` +-- DROP TABLE IF EXISTS `0_stock_moves`; - -CREATE TABLE `0_stock_moves` ( +CREATE TABLE IF NOT EXISTS `0_stock_moves` ( `trans_id` int(11) NOT NULL auto_increment, `trans_no` int(11) NOT NULL default '0', `stock_id` char(20) NOT NULL default '', @@ -1562,55 +1811,101 @@ CREATE TABLE `0_stock_moves` ( `standard_cost` double NOT NULL default '0', `visible` tinyint(1) NOT NULL default '1', PRIMARY KEY (`trans_id`), - KEY `type` (`type`,`trans_no`) -) TYPE=InnoDB AUTO_INCREMENT=37 ; - - -### Data of table `0_stock_moves` ### - -INSERT INTO `0_stock_moves` VALUES ('1', '1', '102', '25', 'DEF', '2009-06-21', '2', '10', '', '100', '0', '10', '1'); -INSERT INTO `0_stock_moves` VALUES ('2', '1', '103', '25', 'DEF', '2009-06-21', '2', '11', '', '100', '0', '11', '1'); -INSERT INTO `0_stock_moves` VALUES ('3', '1', '104', '25', 'DEF', '2009-06-21', '2', '12', '', '100', '0', '12', '1'); -INSERT INTO `0_stock_moves` VALUES ('4', '1', '102', '26', 'DEF', '2009-06-21', '0', '0', '1', '-10', '0', '0', '1'); -INSERT INTO `0_stock_moves` VALUES ('5', '1', '103', '26', 'DEF', '2009-06-21', '0', '0', '1', '-10', '0', '0', '1'); -INSERT INTO `0_stock_moves` VALUES ('6', '1', '104', '26', 'DEF', '2009-06-21', '0', '0', '1', '-10', '0', '0', '1'); -INSERT INTO `0_stock_moves` VALUES ('7', '1', '3400', '26', 'DEF', '2009-06-21', '0', '0', '1', '10', '0', '0', '1'); -INSERT INTO `0_stock_moves` VALUES ('8', '2', '102', '13', 'DEF', '2009-06-21', '0', '30.4', '1', '-2', '0', '10', '1'); -INSERT INTO `0_stock_moves` VALUES ('9', '3', '102', '13', 'DEF', '2009-06-21', '0', '50', 'auto', '-1', '0', '10', '1'); -INSERT INTO `0_stock_moves` VALUES ('10', '4', '102', '13', 'DEF', '2009-06-21', '0', '35.89', 'auto', '-1', '0', '10', '1'); -INSERT INTO `0_stock_moves` VALUES ('11', '3', '102', '26', 'DEF', '2009-06-21', '0', '0', '3', '-2', '0', '0', '1'); -INSERT INTO `0_stock_moves` VALUES ('12', '3', '103', '26', 'DEF', '2009-06-21', '0', '0', '3', '-2', '0', '0', '1'); -INSERT INTO `0_stock_moves` VALUES ('13', '3', '104', '26', 'DEF', '2009-06-21', '0', '0', '3', '-2', '0', '0', '1'); -INSERT INTO `0_stock_moves` VALUES ('14', '3', '3400', '26', 'DEF', '2009-06-21', '0', '0', '3', '2', '0', '0', '1'); -INSERT INTO `0_stock_moves` VALUES ('15', '4', '102', '26', 'DEF', '2009-06-21', '0', '0', '4', '-4', '0', '0', '1'); -INSERT INTO `0_stock_moves` VALUES ('16', '4', '103', '26', 'DEF', '2009-06-21', '0', '0', '4', '-4', '0', '0', '1'); -INSERT INTO `0_stock_moves` VALUES ('17', '4', '104', '26', 'DEF', '2009-06-21', '0', '0', '4', '-4', '0', '0', '1'); -INSERT INTO `0_stock_moves` VALUES ('18', '4', '3400', '26', 'DEF', '2009-06-21', '0', '0', '4', '4', '0', '0', '1'); -INSERT INTO `0_stock_moves` VALUES ('19', '2', '102', '26', 'DEF', '2009-06-21', '0', '0', '', '-2', '0', '0', '1'); -INSERT INTO `0_stock_moves` VALUES ('20', '2', '103', '26', 'DEF', '2009-06-21', '0', '0', '', '-2', '0', '0', '1'); -INSERT INTO `0_stock_moves` VALUES ('21', '2', '104', '26', 'DEF', '2009-06-21', '0', '0', '', '-2', '0', '0', '1'); -INSERT INTO `0_stock_moves` VALUES ('22', '1', '3400', '29', 'DEF', '2009-06-21', '0', '0', '', '2', '0', '0', '1'); -INSERT INTO `0_stock_moves` VALUES ('23', '5', '102', '26', 'DEF', '2009-06-21', '0', '0', '5', '-5', '0', '0', '1'); -INSERT INTO `0_stock_moves` VALUES ('24', '5', '103', '26', 'DEF', '2009-06-21', '0', '0', '5', '-5', '0', '0', '1'); -INSERT INTO `0_stock_moves` VALUES ('25', '5', '104', '26', 'DEF', '2009-06-21', '0', '0', '5', '-5', '0', '0', '1'); -INSERT INTO `0_stock_moves` VALUES ('26', '5', '3400', '26', 'DEF', '2009-06-21', '0', '0', '5', '5', '0', '0', '1'); -INSERT INTO `0_stock_moves` VALUES ('27', '6', '102', '26', 'DEF', '2009-06-21', '0', '0', '6', '5', '0', '0', '1'); -INSERT INTO `0_stock_moves` VALUES ('28', '6', '103', '26', 'DEF', '2009-06-21', '0', '0', '6', '5', '0', '0', '1'); -INSERT INTO `0_stock_moves` VALUES ('29', '6', '104', '26', 'DEF', '2009-06-21', '0', '0', '6', '5', '0', '0', '1'); -INSERT INTO `0_stock_moves` VALUES ('30', '6', '3400', '26', 'DEF', '2009-06-21', '0', '0', '6', '-5', '0', '0', '1'); -INSERT INTO `0_stock_moves` VALUES ('31', '7', '102', '26', 'DEF', '2009-06-21', '0', '0', '7', '2', '0', '0', '1'); -INSERT INTO `0_stock_moves` VALUES ('32', '7', '103', '26', 'DEF', '2009-06-21', '0', '0', '7', '2', '0', '0', '1'); -INSERT INTO `0_stock_moves` VALUES ('33', '7', '104', '26', 'DEF', '2009-06-21', '0', '0', '7', '2', '0', '0', '1'); -INSERT INTO `0_stock_moves` VALUES ('34', '7', '3400', '26', 'DEF', '2009-06-21', '0', '0', '7', '-2', '0', '0', '1'); -INSERT INTO `0_stock_moves` VALUES ('35', '5', '102', '13', 'DEF', '2009-06-21', '0', '50', 'auto', '-1', '0', '10', '1'); -INSERT INTO `0_stock_moves` VALUES ('36', '3', '102', '11', 'DEF', '2009-06-21', '0', '37.68', 'Return Ex Inv: 18', '1', '0', '10', '0'); - - -### Structure of table `0_supp_allocations` ### + KEY `type` (`type`,`trans_no`), + KEY `Move` (`stock_id`,`loc_code`,`tran_date`) +) TYPE=InnoDB AUTO_INCREMENT=37 ; -DROP TABLE IF EXISTS `0_supp_allocations`; +-- +-- Dumping data for table `0_stock_moves` +-- + +INSERT INTO `0_stock_moves` VALUES(1, 1, '102', 25, 'DEF', '2009-06-21', 2, 10, '', 100, 0, 10, 1); +INSERT INTO `0_stock_moves` VALUES(2, 1, '103', 25, 'DEF', '2009-06-21', 2, 11, '', 100, 0, 11, 1); +INSERT INTO `0_stock_moves` VALUES(3, 1, '104', 25, 'DEF', '2009-06-21', 2, 12, '', 100, 0, 12, 1); +INSERT INTO `0_stock_moves` VALUES(4, 1, '102', 26, 'DEF', '2009-06-21', 0, 0, '1', -10, 0, 0, 1); +INSERT INTO `0_stock_moves` VALUES(5, 1, '103', 26, 'DEF', '2009-06-21', 0, 0, '1', -10, 0, 0, 1); +INSERT INTO `0_stock_moves` VALUES(6, 1, '104', 26, 'DEF', '2009-06-21', 0, 0, '1', -10, 0, 0, 1); +INSERT INTO `0_stock_moves` VALUES(7, 1, '3400', 26, 'DEF', '2009-06-21', 0, 0, '1', 10, 0, 0, 1); +INSERT INTO `0_stock_moves` VALUES(8, 2, '102', 13, 'DEF', '2009-06-21', 0, 30.4, '1', -2, 0, 10, 1); +INSERT INTO `0_stock_moves` VALUES(9, 3, '102', 13, 'DEF', '2009-06-21', 0, 50, 'auto', -1, 0, 10, 1); +INSERT INTO `0_stock_moves` VALUES(10, 4, '102', 13, 'DEF', '2009-06-21', 0, 35.89, 'auto', -1, 0, 10, 1); +INSERT INTO `0_stock_moves` VALUES(11, 3, '102', 26, 'DEF', '2009-06-21', 0, 0, '3', -2, 0, 0, 1); +INSERT INTO `0_stock_moves` VALUES(12, 3, '103', 26, 'DEF', '2009-06-21', 0, 0, '3', -2, 0, 0, 1); +INSERT INTO `0_stock_moves` VALUES(13, 3, '104', 26, 'DEF', '2009-06-21', 0, 0, '3', -2, 0, 0, 1); +INSERT INTO `0_stock_moves` VALUES(14, 3, '3400', 26, 'DEF', '2009-06-21', 0, 0, '3', 2, 0, 0, 1); +INSERT INTO `0_stock_moves` VALUES(15, 4, '102', 26, 'DEF', '2009-06-21', 0, 0, '4', -4, 0, 0, 1); +INSERT INTO `0_stock_moves` VALUES(16, 4, '103', 26, 'DEF', '2009-06-21', 0, 0, '4', -4, 0, 0, 1); +INSERT INTO `0_stock_moves` VALUES(17, 4, '104', 26, 'DEF', '2009-06-21', 0, 0, '4', -4, 0, 0, 1); +INSERT INTO `0_stock_moves` VALUES(18, 4, '3400', 26, 'DEF', '2009-06-21', 0, 0, '4', 4, 0, 0, 1); +INSERT INTO `0_stock_moves` VALUES(19, 2, '102', 26, 'DEF', '2009-06-21', 0, 0, '', -2, 0, 0, 1); +INSERT INTO `0_stock_moves` VALUES(20, 2, '103', 26, 'DEF', '2009-06-21', 0, 0, '', -2, 0, 0, 1); +INSERT INTO `0_stock_moves` VALUES(21, 2, '104', 26, 'DEF', '2009-06-21', 0, 0, '', -2, 0, 0, 1); +INSERT INTO `0_stock_moves` VALUES(22, 1, '3400', 29, 'DEF', '2009-06-21', 0, 0, '', 2, 0, 0, 1); +INSERT INTO `0_stock_moves` VALUES(23, 5, '102', 26, 'DEF', '2009-06-21', 0, 0, '5', -5, 0, 0, 1); +INSERT INTO `0_stock_moves` VALUES(24, 5, '103', 26, 'DEF', '2009-06-21', 0, 0, '5', -5, 0, 0, 1); +INSERT INTO `0_stock_moves` VALUES(25, 5, '104', 26, 'DEF', '2009-06-21', 0, 0, '5', -5, 0, 0, 1); +INSERT INTO `0_stock_moves` VALUES(26, 5, '3400', 26, 'DEF', '2009-06-21', 0, 0, '5', 5, 0, 0, 1); +INSERT INTO `0_stock_moves` VALUES(27, 6, '102', 26, 'DEF', '2009-06-21', 0, 0, '6', 5, 0, 0, 1); +INSERT INTO `0_stock_moves` VALUES(28, 6, '103', 26, 'DEF', '2009-06-21', 0, 0, '6', 5, 0, 0, 1); +INSERT INTO `0_stock_moves` VALUES(29, 6, '104', 26, 'DEF', '2009-06-21', 0, 0, '6', 5, 0, 0, 1); +INSERT INTO `0_stock_moves` VALUES(30, 6, '3400', 26, 'DEF', '2009-06-21', 0, 0, '6', -5, 0, 0, 1); +INSERT INTO `0_stock_moves` VALUES(31, 7, '102', 26, 'DEF', '2009-06-21', 0, 0, '7', 2, 0, 0, 1); +INSERT INTO `0_stock_moves` VALUES(32, 7, '103', 26, 'DEF', '2009-06-21', 0, 0, '7', 2, 0, 0, 1); +INSERT INTO `0_stock_moves` VALUES(33, 7, '104', 26, 'DEF', '2009-06-21', 0, 0, '7', 2, 0, 0, 1); +INSERT INTO `0_stock_moves` VALUES(34, 7, '3400', 26, 'DEF', '2009-06-21', 0, 0, '7', -2, 0, 0, 1); +INSERT INTO `0_stock_moves` VALUES(35, 5, '102', 13, 'DEF', '2009-06-21', 0, 50, 'auto', -1, 0, 10, 1); +INSERT INTO `0_stock_moves` VALUES(36, 3, '102', 11, 'DEF', '2009-06-21', 0, 37.68, 'Return Ex Inv: 18', 1, 0, 10, 0); + +-- -------------------------------------------------------- + +-- +-- Table structure for table `0_suppliers` +-- -CREATE TABLE `0_supp_allocations` ( +DROP TABLE IF EXISTS `0_suppliers`; +CREATE TABLE IF NOT EXISTS `0_suppliers` ( + `supplier_id` int(11) NOT NULL auto_increment, + `supp_name` varchar(60) NOT NULL default '', + `supp_ref` varchar(30) NOT NULL default '', + `address` tinytext NOT NULL, + `supp_address` tinytext NOT NULL, + `gst_no` varchar(25) NOT NULL default '', + `contact` varchar(60) NOT NULL default '', + `supp_account_no` varchar(40) NOT NULL default '', + `website` varchar(100) NOT NULL default '', + `bank_account` varchar(60) NOT NULL default '', + `curr_code` char(3) default NULL, + `payment_terms` int(11) default NULL, + `tax_included` tinyint(1) NOT NULL default '0', + `dimension_id` int(11) default '0', + `dimension2_id` int(11) default '0', + `tax_group_id` int(11) default NULL, + `credit_limit` double NOT NULL default '0', + `purchase_account` varchar(15) NOT NULL default '', + `payable_account` varchar(15) NOT NULL default '', + `payment_discount_account` varchar(15) NOT NULL default '', + `notes` tinytext NOT NULL, + `inactive` tinyint(1) NOT NULL default '0', + PRIMARY KEY (`supplier_id`), + KEY `supp_ref` (`supp_ref`) +) TYPE=MyISAM AUTO_INCREMENT=4 ; + +-- +-- Dumping data for table `0_suppliers` +-- + +INSERT INTO `0_suppliers` VALUES(1, 'Junk Beer ApS', 'Junk Beer', 'Mailing 1\nMailing 2\nMailing 3', 'Address 1\nAddress 2\nAddress 3', '123456', 'Contact', '111', '', '', 'DKK', 3, 0, 1, 0, 2, 1000, '', '2100', '5060', 'A supplier with junk beers.', 0); +INSERT INTO `0_suppliers` VALUES(2, 'Lucky Luke Inc.', 'Lucky Luke', 'Mailing 1\nMailing 2\nMailing 3', 'Address 1\nAddress 2\nAddress 3', '654321', 'Luke', '333', '', '', 'USD', 3, 0, 0, 0, 1, 500, '', '2100', '5060', '', 0); +INSERT INTO `0_suppliers` VALUES(3, 'Money Makers Ltd.', 'Money Makers', 'Mailing 1\nMailing 2\nMailing 3', 'Address 1\nAddress 2\nAddress 3', '987654', 'Makers', '222', '', '', 'GBP', 3, 0, 0, 0, 2, 300, '', '2100', '5060', '', 0); + +-- -------------------------------------------------------- + +-- +-- Table structure for table `0_supp_allocations` +-- + +DROP TABLE IF EXISTS `0_supp_allocations`; +CREATE TABLE IF NOT EXISTS `0_supp_allocations` ( `id` int(11) NOT NULL auto_increment, `amt` double unsigned default NULL, `date_alloc` date NOT NULL default '0000-00-00', @@ -1618,24 +1913,29 @@ CREATE TABLE `0_supp_allocations` ( `trans_type_from` int(11) default NULL, `trans_no_to` int(11) default NULL, `trans_type_to` int(11) default NULL, - PRIMARY KEY (`id`) -) TYPE=InnoDB AUTO_INCREMENT=2 ; - + PRIMARY KEY (`id`), + KEY `From` (`trans_type_from`,`trans_no_from`), + KEY `To` (`trans_type_to`,`trans_no_to`) +) TYPE=InnoDB AUTO_INCREMENT=2 ; -### Data of table `0_supp_allocations` ### +-- +-- Dumping data for table `0_supp_allocations` +-- -INSERT INTO `0_supp_allocations` VALUES ('1', '3465', '2009-06-21', '4', '22', '7', '20'); +INSERT INTO `0_supp_allocations` VALUES(1, 3465, '2009-06-21', 4, 22, 7, 20); +-- -------------------------------------------------------- -### Structure of table `0_supp_invoice_items` ### +-- +-- Table structure for table `0_supp_invoice_items` +-- DROP TABLE IF EXISTS `0_supp_invoice_items`; - -CREATE TABLE `0_supp_invoice_items` ( +CREATE TABLE IF NOT EXISTS `0_supp_invoice_items` ( `id` int(11) NOT NULL auto_increment, `supp_trans_no` int(11) default NULL, `supp_trans_type` int(11) default NULL, - `gl_code` varchar(11) NOT NULL default '0', + `gl_code` varchar(15) NOT NULL default '', `grn_item_id` int(11) default NULL, `po_detail_item_id` int(11) default NULL, `stock_id` varchar(20) NOT NULL default '', @@ -1644,24 +1944,28 @@ CREATE TABLE `0_supp_invoice_items` ( `unit_price` double NOT NULL default '0', `unit_tax` double NOT NULL default '0', `memo_` tinytext, - PRIMARY KEY (`id`) -) TYPE=InnoDB AUTO_INCREMENT=6 ; - + PRIMARY KEY (`id`), + KEY `Transaction` (`supp_trans_type`,`supp_trans_no`,`stock_id`) +) TYPE=InnoDB AUTO_INCREMENT=6 ; -### Data of table `0_supp_invoice_items` ### +-- +-- Dumping data for table `0_supp_invoice_items` +-- -INSERT INTO `0_supp_invoice_items` VALUES ('1', '7', '20', '0', '1', '1', '102', '17inch VGA Monitor', '100', '10', '0.5', ''); -INSERT INTO `0_supp_invoice_items` VALUES ('2', '7', '20', '0', '2', '2', '103', '32MB VGA Card', '100', '11', '0.55', ''); -INSERT INTO `0_supp_invoice_items` VALUES ('3', '7', '20', '0', '3', '3', '104', '52x CD Drive', '100', '12', '0.6', ''); -INSERT INTO `0_supp_invoice_items` VALUES ('4', '8', '20', '2150', '0', '0', '', '', '0', '0.95', '0', 'Phone'); -INSERT INTO `0_supp_invoice_items` VALUES ('5', '8', '20', '5780', '0', '0', '', '', '0', '19.05', '0', 'Phone'); +INSERT INTO `0_supp_invoice_items` VALUES(1, 7, 20, '0', 1, 1, '102', '17inch VGA Monitor', 100, 10, 0.5, ''); +INSERT INTO `0_supp_invoice_items` VALUES(2, 7, 20, '0', 2, 2, '103', '32MB VGA Card', 100, 11, 0.55, ''); +INSERT INTO `0_supp_invoice_items` VALUES(3, 7, 20, '0', 3, 3, '104', '52x CD Drive', 100, 12, 0.6, ''); +INSERT INTO `0_supp_invoice_items` VALUES(4, 8, 20, '2150', 0, 0, '', '', 0, 0.95, 0, 'Phone'); +INSERT INTO `0_supp_invoice_items` VALUES(5, 8, 20, '5780', 0, 0, '', '', 0, 19.05, 0, 'Phone'); +-- -------------------------------------------------------- -### Structure of table `0_supp_trans` ### +-- +-- Table structure for table `0_supp_trans` +-- DROP TABLE IF EXISTS `0_supp_trans`; - -CREATE TABLE `0_supp_trans` ( +CREATE TABLE IF NOT EXISTS `0_supp_trans` ( `trans_no` int(11) unsigned NOT NULL default '0', `type` smallint(6) unsigned NOT NULL default '0', `supplier_id` int(11) unsigned default NULL, @@ -1674,159 +1978,249 @@ CREATE TABLE `0_supp_trans` ( `ov_gst` double NOT NULL default '0', `rate` double NOT NULL default '1', `alloc` double NOT NULL default '0', - PRIMARY KEY (`trans_no`,`type`), + `tax_included` tinyint(1) NOT NULL default '0', + PRIMARY KEY (`type`,`trans_no`), KEY `supplier_id` (`supplier_id`), KEY `SupplierID_2` (`supplier_id`,`supp_reference`), - KEY `type` (`type`) -) TYPE=InnoDB ; - - -### Data of table `0_supp_trans` ### - -INSERT INTO `0_supp_trans` VALUES ('4', '22', '2', '1', '', '2009-06-21', '2009-06-21', '-3465', '0', '0', '1', '3465'); -INSERT INTO `0_supp_trans` VALUES ('7', '20', '2', '1', '5t', '2009-06-21', '2009-07-01', '3300', '0', '165', '1', '3465'); -INSERT INTO `0_supp_trans` VALUES ('8', '20', '2', '2', 'cc', '2009-06-21', '2009-07-01', '20', '0', '0', '1', '0'); + KEY `type` (`type`), + KEY `tran_date` (`tran_date`) +) TYPE=InnoDB; +-- +-- Dumping data for table `0_supp_trans` +-- -### Structure of table `0_suppliers` ### +INSERT INTO `0_supp_trans` VALUES(7, 20, 2, '1', '5t', '2009-06-21', '2009-07-01', 3300, 0, 165, 1, 3465, 0); +INSERT INTO `0_supp_trans` VALUES(8, 20, 2, '2', 'cc', '2009-06-21', '2009-07-01', 20, 0, 0, 1, 0, 0); +INSERT INTO `0_supp_trans` VALUES(4, 22, 2, '1', '', '2009-06-21', '2009-06-21', -3465, 0, 0, 1, 3465, 0); -DROP TABLE IF EXISTS `0_suppliers`; - -CREATE TABLE `0_suppliers` ( - `supplier_id` int(11) NOT NULL auto_increment, - `supp_name` varchar(60) NOT NULL default '', - `supp_ref` varchar(30) NOT NULL default '', - `address` tinytext NOT NULL, - `supp_address` tinytext NOT NULL, - `phone` varchar(30) NOT NULL default '', - `phone2` varchar(30) NOT NULL default '', - `fax` varchar(30) NOT NULL default '', - `gst_no` varchar(25) NOT NULL default '', - `contact` varchar(60) NOT NULL default '', - `supp_account_no` varchar(40) NOT NULL default '', - `email` varchar(100) NOT NULL default '', - `website` varchar(100) NOT NULL default '', - `bank_account` varchar(60) NOT NULL default '', - `curr_code` char(3) default NULL, - `payment_terms` int(11) default NULL, - `dimension_id` int(11) default '0', - `dimension2_id` int(11) default '0', - `tax_group_id` int(11) default NULL, - `credit_limit` double NOT NULL default '0', - `purchase_account` varchar(11) default NULL, - `payable_account` varchar(11) default NULL, - `payment_discount_account` varchar(11) default NULL, - `notes` tinytext NOT NULL, - `inactive` tinyint(1) NOT NULL default '0', - PRIMARY KEY (`supplier_id`) -) TYPE=MyISAM AUTO_INCREMENT=4 ; +-- -------------------------------------------------------- +-- +-- Table structure for table `0_sys_prefs` +-- -### Data of table `0_suppliers` ### +DROP TABLE IF EXISTS `0_sys_prefs`; +CREATE TABLE IF NOT EXISTS `0_sys_prefs` ( + `name` varchar(35) NOT NULL default '', + `category` varchar(30) default NULL, + `type` varchar(20) NOT NULL default '', + `length` smallint(6) default NULL, + `value` tinytext, + PRIMARY KEY (`name`), + KEY `category` (`category`) +) TYPE=MyISAM; -INSERT INTO `0_suppliers` VALUES ('1', 'Junk Beer ApS', 'Junk Beer', 'Mailing 1\r\nMailing 2\r\nMailing 3', 'Address 1\r\nAddress 2\r\nAddress 3', '+45 55667788', '', '', '123456', 'Contact', '111', '', '', '', 'DKK', '3', '1', '0', '2', '1', '5010', '2100', '5060', 'A supplier with junk beers.', '0'); -INSERT INTO `0_suppliers` VALUES ('2', 'Lucky Luke Inc.', 'Lucky Luke', 'Mailing 1\r\nMailing 2\r\nMailing 3', 'Address 1\r\nAddress 2\r\nAddress 3', '(111) 222.333.444', '', '', '654321', 'Luke', '333', '', '', '', 'USD', '3', '0', '0', '1', '1', '5010', '2100', '5060', '', '0'); -INSERT INTO `0_suppliers` VALUES ('3', 'Money Makers Ltd.', 'Money Makers', 'Mailing 1\r\nMailing 2\r\nMailing 3', 'Address 1\r\nAddress 2\r\nAddress 3', '+44 444 555 666', '', '', '987654', 'Makers', '222', '', '', '', 'GBP', '3', '0', '0', '2', '1', '5010', '2100', '5060', '', '0'); +-- +-- Dumping data for table `0_sys_prefs` +-- +INSERT INTO `0_sys_prefs` VALUES('coy_name', 'setup.company', 'varchar', 60, 'Training Co.'); +INSERT INTO `0_sys_prefs` VALUES('gst_no', 'setup.company', 'varchar', 25, '9876543'); +INSERT INTO `0_sys_prefs` VALUES('coy_no', 'setup.company', 'varchar', 25, '123456789'); +INSERT INTO `0_sys_prefs` VALUES('tax_prd', 'setup.company', 'int', 11, '1'); +INSERT INTO `0_sys_prefs` VALUES('tax_last', 'setup.company', 'int', 11, '1'); +INSERT INTO `0_sys_prefs` VALUES('postal_address', 'setup.company', 'tinytext', 0, 'Address 1\nAddress 2\nAddress 3'); +INSERT INTO `0_sys_prefs` VALUES('phone', 'setup.company', 'varchar', 30, '(222) 111.222.333'); +INSERT INTO `0_sys_prefs` VALUES('fax', 'setup.company', 'varchar', 30, ''); +INSERT INTO `0_sys_prefs` VALUES('email', 'setup.company', 'varchar', 100, 'delta@delta.com'); +INSERT INTO `0_sys_prefs` VALUES('coy_logo', 'setup.company', 'varchar', 100, 'logo_frontaccounting.jpg'); +INSERT INTO `0_sys_prefs` VALUES('domicile', 'setup.company', 'varchar', 55, ''); +INSERT INTO `0_sys_prefs` VALUES('curr_default', 'setup.company', 'char', 3, 'USD'); +INSERT INTO `0_sys_prefs` VALUES('use_dimension', 'setup.company', 'tinyint', 1, '1'); +INSERT INTO `0_sys_prefs` VALUES('f_year', 'setup.company', 'int', 11, '3'); +INSERT INTO `0_sys_prefs` VALUES('no_item_list', 'setup.company', 'tinyint', 1, '0'); +INSERT INTO `0_sys_prefs` VALUES('no_customer_list', 'setup.company', 'tinyint', 1, '0'); +INSERT INTO `0_sys_prefs` VALUES('no_supplier_list', 'setup.company', 'tinyint', 1, '0'); +INSERT INTO `0_sys_prefs` VALUES('base_sales', 'setup.company', 'int', 11, '1'); +INSERT INTO `0_sys_prefs` VALUES('time_zone', 'setup.company', 'tinyint', 1, '0'); +INSERT INTO `0_sys_prefs` VALUES('add_pct', 'setup.company', 'int', 5, '-1'); +INSERT INTO `0_sys_prefs` VALUES('round_to', 'setup.company', 'int', 5, '1'); +INSERT INTO `0_sys_prefs` VALUES('login_tout', 'setup.company', 'smallint', 6, '600'); +INSERT INTO `0_sys_prefs` VALUES('past_due_days', 'glsetup.general', 'int', 11, '30'); +INSERT INTO `0_sys_prefs` VALUES('profit_loss_year_act', 'glsetup.general', 'varchar', 15, '9990'); +INSERT INTO `0_sys_prefs` VALUES('retained_earnings_act', 'glsetup.general', 'varchar', 15, '3590'); +INSERT INTO `0_sys_prefs` VALUES('bank_charge_act', 'glsetup.general', 'varchar', 15, '5690'); +INSERT INTO `0_sys_prefs` VALUES('exchange_diff_act', 'glsetup.general', 'varchar', 15, '4450'); +INSERT INTO `0_sys_prefs` VALUES('default_credit_limit', 'glsetup.customer', 'int', 11, '1000'); +INSERT INTO `0_sys_prefs` VALUES('accumulate_shipping', 'glsetup.customer', 'tinyint', 1, '0'); +INSERT INTO `0_sys_prefs` VALUES('legal_text', 'glsetup.customer', 'tinytext', 0, ''); +INSERT INTO `0_sys_prefs` VALUES('freight_act', 'glsetup.customer', 'varchar', 15, '4430'); +INSERT INTO `0_sys_prefs` VALUES('debtors_act', 'glsetup.sales', 'varchar', 15, '1200'); +INSERT INTO `0_sys_prefs` VALUES('default_sales_act', 'glsetup.sales', 'varchar', 15, '4010'); +INSERT INTO `0_sys_prefs` VALUES('default_sales_discount_act', 'glsetup.sales', 'varchar', 15, '4510'); +INSERT INTO `0_sys_prefs` VALUES('default_prompt_payment_act', 'glsetup.sales', 'varchar', 15, '4500'); +INSERT INTO `0_sys_prefs` VALUES('default_delivery_required', 'glsetup.sales', 'smallint', 6, '1'); +INSERT INTO `0_sys_prefs` VALUES('default_dim_required', 'glsetup.dims', 'int', 11, '20'); +INSERT INTO `0_sys_prefs` VALUES('pyt_discount_act', 'glsetup.purchase', 'varchar', 15, '5060'); +INSERT INTO `0_sys_prefs` VALUES('creditors_act', 'glsetup.purchase', 'varchar', 15, '2100'); +INSERT INTO `0_sys_prefs` VALUES('po_over_receive', 'glsetup.purchase', 'int', 11, '10'); +INSERT INTO `0_sys_prefs` VALUES('po_over_charge', 'glsetup.purchase', 'int', 11, '10'); +INSERT INTO `0_sys_prefs` VALUES('allow_negative_stock', 'glsetup.inventory', 'tinyint', 1, '0'); +INSERT INTO `0_sys_prefs` VALUES('default_inventory_act', 'glsetup.items', 'varchar', 15, '1510'); +INSERT INTO `0_sys_prefs` VALUES('default_cogs_act', 'glsetup.items', 'varchar', 15, '5010'); +INSERT INTO `0_sys_prefs` VALUES('default_adj_act', 'glsetup.items', 'varchar', 15, '5040'); +INSERT INTO `0_sys_prefs` VALUES('default_inv_sales_act', 'glsetup.items', 'varchar', 15, '4010'); +INSERT INTO `0_sys_prefs` VALUES('default_assembly_act', 'glsetup.items', 'varchar', 15, '1530'); +INSERT INTO `0_sys_prefs` VALUES('default_workorder_required', 'glsetup.manuf', 'int', 11, '20'); +INSERT INTO `0_sys_prefs` VALUES('version_id', 'system', 'varchar', 11, '2.3rc'); +INSERT INTO `0_sys_prefs` VALUES('auto_curr_reval', 'setup.company', 'smallint', 6, '1'); + +-- -------------------------------------------------------- -### Structure of table `0_sys_types` ### +-- +-- Table structure for table `0_sys_types` +-- DROP TABLE IF EXISTS `0_sys_types`; - -CREATE TABLE `0_sys_types` ( +CREATE TABLE IF NOT EXISTS `0_sys_types` ( `type_id` smallint(6) NOT NULL default '0', `type_no` int(11) NOT NULL default '1', `next_reference` varchar(100) NOT NULL default '', PRIMARY KEY (`type_id`) -) TYPE=InnoDB ; - - -### Data of table `0_sys_types` ### - -INSERT INTO `0_sys_types` VALUES ('0', '19', '3'); -INSERT INTO `0_sys_types` VALUES ('1', '8', '2'); -INSERT INTO `0_sys_types` VALUES ('2', '5', '2'); -INSERT INTO `0_sys_types` VALUES ('4', '3', '1'); -INSERT INTO `0_sys_types` VALUES ('10', '19', '4'); -INSERT INTO `0_sys_types` VALUES ('11', '3', '2'); -INSERT INTO `0_sys_types` VALUES ('12', '6', '1'); -INSERT INTO `0_sys_types` VALUES ('13', '5', '2'); -INSERT INTO `0_sys_types` VALUES ('16', '2', '1'); -INSERT INTO `0_sys_types` VALUES ('17', '2', '1'); -INSERT INTO `0_sys_types` VALUES ('18', '1', '3'); -INSERT INTO `0_sys_types` VALUES ('20', '8', '3'); -INSERT INTO `0_sys_types` VALUES ('21', '1', '1'); -INSERT INTO `0_sys_types` VALUES ('22', '4', '2'); -INSERT INTO `0_sys_types` VALUES ('25', '1', '2'); -INSERT INTO `0_sys_types` VALUES ('26', '1', '8'); -INSERT INTO `0_sys_types` VALUES ('28', '1', '1'); -INSERT INTO `0_sys_types` VALUES ('29', '1', '2'); -INSERT INTO `0_sys_types` VALUES ('30', '5', '6'); -INSERT INTO `0_sys_types` VALUES ('32', '0', '1'); -INSERT INTO `0_sys_types` VALUES ('35', '1', '1'); -INSERT INTO `0_sys_types` VALUES ('40', '1', '3'); - - -### Structure of table `0_tax_group_items` ### +) TYPE=InnoDB; -DROP TABLE IF EXISTS `0_tax_group_items`; +-- +-- Dumping data for table `0_sys_types` +-- -CREATE TABLE `0_tax_group_items` ( - `tax_group_id` int(11) NOT NULL default '0', - `tax_type_id` int(11) NOT NULL default '0', - `rate` double NOT NULL default '0', - PRIMARY KEY (`tax_group_id`,`tax_type_id`) -) TYPE=InnoDB ; +INSERT INTO `0_sys_types` VALUES(0, 19, '3'); +INSERT INTO `0_sys_types` VALUES(1, 8, '2'); +INSERT INTO `0_sys_types` VALUES(2, 5, '2'); +INSERT INTO `0_sys_types` VALUES(4, 3, '1'); +INSERT INTO `0_sys_types` VALUES(10, 19, '4'); +INSERT INTO `0_sys_types` VALUES(11, 3, '2'); +INSERT INTO `0_sys_types` VALUES(12, 6, '1'); +INSERT INTO `0_sys_types` VALUES(13, 5, '2'); +INSERT INTO `0_sys_types` VALUES(16, 2, '1'); +INSERT INTO `0_sys_types` VALUES(17, 2, '1'); +INSERT INTO `0_sys_types` VALUES(18, 1, '3'); +INSERT INTO `0_sys_types` VALUES(20, 8, '3'); +INSERT INTO `0_sys_types` VALUES(21, 1, '1'); +INSERT INTO `0_sys_types` VALUES(22, 4, '2'); +INSERT INTO `0_sys_types` VALUES(25, 1, '2'); +INSERT INTO `0_sys_types` VALUES(26, 1, '8'); +INSERT INTO `0_sys_types` VALUES(28, 1, '1'); +INSERT INTO `0_sys_types` VALUES(29, 1, '2'); +INSERT INTO `0_sys_types` VALUES(30, 5, '6'); +INSERT INTO `0_sys_types` VALUES(32, 0, '1'); +INSERT INTO `0_sys_types` VALUES(35, 1, '1'); +INSERT INTO `0_sys_types` VALUES(40, 1, '3'); + +-- -------------------------------------------------------- +-- +-- Table structure for table `0_tags` +-- -### Data of table `0_tax_group_items` ### +DROP TABLE IF EXISTS `0_tags`; +CREATE TABLE IF NOT EXISTS `0_tags` ( + `id` int(11) NOT NULL auto_increment, + `type` smallint(6) NOT NULL, + `name` varchar(30) NOT NULL, + `description` varchar(60) default NULL, + `inactive` tinyint(1) NOT NULL default '0', + PRIMARY KEY (`id`), + UNIQUE KEY `type` (`type`,`name`) +) TYPE=MyISAM AUTO_INCREMENT=1 ; -INSERT INTO `0_tax_group_items` VALUES ('1', '1', '5'); +-- +-- Dumping data for table `0_tags` +-- -### Structure of table `0_tax_groups` ### +-- -------------------------------------------------------- -DROP TABLE IF EXISTS `0_tax_groups`; +-- +-- Table structure for table `0_tag_associations` +-- + +DROP TABLE IF EXISTS `0_tag_associations`; +CREATE TABLE IF NOT EXISTS `0_tag_associations` ( + `record_id` varchar(15) NOT NULL, + `tag_id` int(11) NOT NULL, + UNIQUE KEY `record_id` (`record_id`,`tag_id`) +) TYPE=MyISAM; + +-- +-- Dumping data for table `0_tag_associations` +-- + + +-- -------------------------------------------------------- -CREATE TABLE `0_tax_groups` ( +-- +-- Table structure for table `0_tax_groups` +-- + +DROP TABLE IF EXISTS `0_tax_groups`; +CREATE TABLE IF NOT EXISTS `0_tax_groups` ( `id` int(11) NOT NULL auto_increment, `name` varchar(60) NOT NULL default '', `tax_shipping` tinyint(1) NOT NULL default '0', `inactive` tinyint(1) NOT NULL default '0', PRIMARY KEY (`id`), UNIQUE KEY `name` (`name`) -) TYPE=InnoDB AUTO_INCREMENT=3 ; +) TYPE=InnoDB AUTO_INCREMENT=3 ; +-- +-- Dumping data for table `0_tax_groups` +-- -### Data of table `0_tax_groups` ### +INSERT INTO `0_tax_groups` VALUES(1, 'Tax', 0, 0); +INSERT INTO `0_tax_groups` VALUES(2, 'Tax Exempt', 0, 0); -INSERT INTO `0_tax_groups` VALUES ('1', 'Tax', '0', '0'); -INSERT INTO `0_tax_groups` VALUES ('2', 'Tax Exempt', '0', '0'); +-- -------------------------------------------------------- -### Structure of table `0_tax_types` ### +-- +-- Table structure for table `0_tax_group_items` +-- -DROP TABLE IF EXISTS `0_tax_types`; +DROP TABLE IF EXISTS `0_tax_group_items`; +CREATE TABLE IF NOT EXISTS `0_tax_group_items` ( + `tax_group_id` int(11) NOT NULL default '0', + `tax_type_id` int(11) NOT NULL default '0', + `rate` double NOT NULL default '0', + PRIMARY KEY (`tax_group_id`,`tax_type_id`) +) TYPE=InnoDB; + +-- +-- Dumping data for table `0_tax_group_items` +-- -CREATE TABLE `0_tax_types` ( +INSERT INTO `0_tax_group_items` VALUES(1, 1, 5); + +-- -------------------------------------------------------- + +-- +-- Table structure for table `0_tax_types` +-- + +DROP TABLE IF EXISTS `0_tax_types`; +CREATE TABLE IF NOT EXISTS `0_tax_types` ( `id` int(11) NOT NULL auto_increment, `rate` double NOT NULL default '0', - `sales_gl_code` varchar(11) NOT NULL default '', - `purchasing_gl_code` varchar(11) NOT NULL default '', + `sales_gl_code` varchar(15) NOT NULL default '', + `purchasing_gl_code` varchar(15) NOT NULL default '', `name` varchar(60) NOT NULL default '', `inactive` tinyint(1) NOT NULL default '0', PRIMARY KEY (`id`) -) TYPE=InnoDB AUTO_INCREMENT=5 AUTO_INCREMENT=5 ; +) TYPE=InnoDB AUTO_INCREMENT=2 ; +-- +-- Dumping data for table `0_tax_types` +-- -### Data of table `0_tax_types` ### +INSERT INTO `0_tax_types` VALUES(1, 5, '2150', '2150', 'Tax', 0); -INSERT INTO `0_tax_types` VALUES ('1', '5', '2150', '2145', 'Tax', '0'); +-- -------------------------------------------------------- -### Structure of table `0_trans_tax_details` ### +-- +-- Table structure for table `0_trans_tax_details` +-- DROP TABLE IF EXISTS `0_trans_tax_details`; - -CREATE TABLE `0_trans_tax_details` ( +CREATE TABLE IF NOT EXISTS `0_trans_tax_details` ( `id` int(11) NOT NULL auto_increment, `trans_type` smallint(6) default NULL, `trans_no` int(11) default NULL, @@ -1838,30 +2232,58 @@ CREATE TABLE `0_trans_tax_details` ( `net_amount` double NOT NULL default '0', `amount` double NOT NULL default '0', `memo` tinytext, - PRIMARY KEY (`id`) -) TYPE=InnoDB AUTO_INCREMENT=12 ; + PRIMARY KEY (`id`), + KEY `Type_and_Number` (`trans_type`,`trans_no`), + KEY `tran_date` (`tran_date`) +) TYPE=InnoDB AUTO_INCREMENT=12 ; +-- +-- Dumping data for table `0_trans_tax_details` +-- -### Data of table `0_trans_tax_details` ### +INSERT INTO `0_trans_tax_details` VALUES(1, 20, 7, '2009-06-21', 1, 5, 1, 0, 3300, 165, '5t'); +INSERT INTO `0_trans_tax_details` VALUES(2, 13, 3, '2009-06-21', 1, 5, 1, 0, 50, 2.5, 'auto'); +INSERT INTO `0_trans_tax_details` VALUES(3, 10, 17, '2009-06-21', 1, 5, 1, 0, 50, 2.5, '1'); +INSERT INTO `0_trans_tax_details` VALUES(4, 13, 4, '2009-06-21', 1, 5, 1.3932, 0, 35.89, 1.7945, 'auto'); +INSERT INTO `0_trans_tax_details` VALUES(5, 10, 18, '2009-06-21', 1, 5, 1.3932, 0, 35.89, 1.7945, '2'); +INSERT INTO `0_trans_tax_details` VALUES(6, 2, 5, '2009-06-21', 1, 5, 1, 0, 95.2, 4.76, ''); +INSERT INTO `0_trans_tax_details` VALUES(7, 1, 8, '2009-06-21', 1, 5, 1, 0, -47.6, -2.38, ''); +INSERT INTO `0_trans_tax_details` VALUES(8, 20, 8, '2009-06-21', 1, 5, 1, 0, -19, -0.95, 'cc'); +INSERT INTO `0_trans_tax_details` VALUES(9, 13, 5, '2009-06-21', 1, 5, 1, 1, 47.619047619048, 2.3809523809524, 'auto'); +INSERT INTO `0_trans_tax_details` VALUES(10, 10, 19, '2009-06-21', 1, 5, 1, 1, 47.619047619048, 2.3809523809524, '3'); +INSERT INTO `0_trans_tax_details` VALUES(11, 11, 3, '2009-06-21', 1, 5, 1.3932, 0, 35.89, 1.7945, '1'); -INSERT INTO `0_trans_tax_details` VALUES ('1', '20', '7', '2009-06-21', '1', '5', '1', '0', '3300', '165', '5t'); -INSERT INTO `0_trans_tax_details` VALUES ('2', '13', '3', '2009-06-21', '1', '5', '1', '0', '50', '2.5', 'auto'); -INSERT INTO `0_trans_tax_details` VALUES ('3', '10', '17', '2009-06-21', '1', '5', '1', '0', '50', '2.5', '1'); -INSERT INTO `0_trans_tax_details` VALUES ('4', '13', '4', '2009-06-21', '1', '5', '1.3932', '0', '35.89', '1.7945', 'auto'); -INSERT INTO `0_trans_tax_details` VALUES ('5', '10', '18', '2009-06-21', '1', '5', '1.3932', '0', '35.89', '1.7945', '2'); -INSERT INTO `0_trans_tax_details` VALUES ('6', '2', '5', '2009-06-21', '1', '5', '1', '0', '95.2', '4.76', ''); -INSERT INTO `0_trans_tax_details` VALUES ('7', '1', '8', '2009-06-21', '1', '5', '1', '0', '-47.6', '-2.38', ''); -INSERT INTO `0_trans_tax_details` VALUES ('8', '20', '8', '2009-06-21', '1', '5', '1', '0', '-19', '-0.95', 'cc'); -INSERT INTO `0_trans_tax_details` VALUES ('9', '13', '5', '2009-06-21', '1', '5', '1', '1', '47.619047619048', '2.3809523809524', 'auto'); -INSERT INTO `0_trans_tax_details` VALUES ('10', '10', '19', '2009-06-21', '1', '5', '1', '1', '47.619047619048', '2.3809523809524', '3'); -INSERT INTO `0_trans_tax_details` VALUES ('11', '11', '3', '2009-06-21', '1', '5', '1.3932', '0', '35.89', '1.7945', '1'); +-- -------------------------------------------------------- -### Structure of table `0_users` ### +-- +-- Table structure for table `0_useronline` +-- + +DROP TABLE IF EXISTS `0_useronline`; +CREATE TABLE IF NOT EXISTS `0_useronline` ( + `id` int(11) NOT NULL auto_increment, + `timestamp` int(15) NOT NULL default '0', + `ip` varchar(40) NOT NULL default '', + `file` varchar(100) NOT NULL default '', + PRIMARY KEY (`id`), + KEY `timestamp` (`timestamp`), + KEY `ip` (`ip`) +) TYPE=MyISAM AUTO_INCREMENT=1 ; + +-- +-- Dumping data for table `0_useronline` +-- -DROP TABLE IF EXISTS `0_users`; -CREATE TABLE `0_users` ( - `id` SMALLINT(6) AUTO_INCREMENT, +-- -------------------------------------------------------- + +-- +-- Table structure for table `0_users` +-- + +DROP TABLE IF EXISTS `0_users`; +CREATE TABLE IF NOT EXISTS `0_users` ( + `id` smallint(6) NOT NULL auto_increment, `user_id` varchar(60) NOT NULL default '', `password` varchar(100) NOT NULL default '', `real_name` varchar(100) NOT NULL default '', @@ -1892,153 +2314,66 @@ CREATE TABLE `0_users` ( `startup_tab` varchar(20) NOT NULL default '', `inactive` tinyint(1) NOT NULL default '0', PRIMARY KEY (`id`), - UNIQUE KEY (`user_id`) -) TYPE=MyISAM AUTO_INCREMENT=2; + UNIQUE KEY `user_id` (`user_id`) +) TYPE=MyISAM AUTO_INCREMENT=3 ; +-- +-- Dumping data for table `0_users` +-- -### Data of table `0_users` ### +INSERT INTO `0_users` VALUES(1, 'admin', '5f4dcc3b5aa765d61d8327deb882cf99', 'Administrator', 2, '', 'adm@adm.com', 'en_US', 0, 0, 0, 0, 'default', 'Letter', 2, 2, 4, 1, 1, 0, 0, '2010-05-11 23:27:46', 10, 1, 1, '1', 1, 0, 'orders', 0); +INSERT INTO `0_users` VALUES(2, 'demouser', '5f4dcc3b5aa765d61d8327deb882cf99', 'Demo User', 9, '999-999-999', 'demo@demo.nu', 'en_US', 0, 0, 0, 0, 'default', 'Letter', 2, 2, 3, 1, 1, 0, 0, '2008-02-06 19:02:35', 10, 1, 1, '1', 1, 0, 'orders', 0); -INSERT INTO `0_users` VALUES ('1', 'admin', '5f4dcc3b5aa765d61d8327deb882cf99', 'Administrator', '2', '', 'adm@adm.com', 'en_US', '0', '0', '0', '0', 'default', 'Letter', '2', '2', '4', '1', '1', '0', '0', '2009-01-30 09:39:03', '10', '1', '1', '1', '1', '0', 'orders', '0'); -INSERT INTO `0_users` VALUES ('2', 'demouser', '5f4dcc3b5aa765d61d8327deb882cf99', 'Demo User', '9', '999-999-999', 'demo@demo.nu', 'en_US', '0', '0', '0', '0', 'default', 'Letter', '2', '2', '3', '1', '1', '0', '0', '2008-02-06 19:02:35', '10', '1', '1', '1', '1', '0', 'orders', '0'); +-- -------------------------------------------------------- -### Structure of table `0_voided` ### +-- +-- Table structure for table `0_voided` +-- DROP TABLE IF EXISTS `0_voided`; - -CREATE TABLE `0_voided` ( +CREATE TABLE IF NOT EXISTS `0_voided` ( `type` int(11) NOT NULL default '0', `id` int(11) NOT NULL default '0', `date_` date NOT NULL default '0000-00-00', `memo_` tinytext NOT NULL, UNIQUE KEY `id` (`type`,`id`) -) TYPE=InnoDB ; - - -### Data of table `0_voided` ### - - - -### Structure of table `0_wo_issue_items` ### - -DROP TABLE IF EXISTS `0_wo_issue_items`; - -CREATE TABLE `0_wo_issue_items` ( - `id` int(11) NOT NULL auto_increment, - `stock_id` varchar(40) default NULL, - `issue_id` int(11) default NULL, - `qty_issued` double default NULL, - PRIMARY KEY (`id`) -) TYPE=InnoDB AUTO_INCREMENT=1 ; - - -### Data of table `0_wo_issue_items` ### - - - -### Structure of table `0_wo_issues` ### - -DROP TABLE IF EXISTS `0_wo_issues`; - -CREATE TABLE `0_wo_issues` ( - `issue_no` int(11) NOT NULL auto_increment, - `workorder_id` int(11) NOT NULL default '0', - `reference` varchar(100) default NULL, - `issue_date` date default NULL, - `loc_code` varchar(5) default NULL, - `workcentre_id` int(11) default NULL, - PRIMARY KEY (`issue_no`) -) TYPE=InnoDB AUTO_INCREMENT=1 ; - - -### Data of table `0_wo_issues` ### - - - -### Structure of table `0_wo_manufacture` ### - -DROP TABLE IF EXISTS `0_wo_manufacture`; - -CREATE TABLE `0_wo_manufacture` ( - `id` int(11) NOT NULL auto_increment, - `reference` varchar(100) default NULL, - `workorder_id` int(11) NOT NULL default '0', - `quantity` double NOT NULL default '0', - `date_` date NOT NULL default '0000-00-00', - PRIMARY KEY (`id`) -) TYPE=InnoDB AUTO_INCREMENT=2 ; - - -### Data of table `0_wo_manufacture` ### - -INSERT INTO `0_wo_manufacture` VALUES ('1', '1', '2', '2', '2009-06-21'); +) TYPE=InnoDB; +-- +-- Dumping data for table `0_voided` +-- -### Structure of table `0_wo_requirements` ### -DROP TABLE IF EXISTS `0_wo_requirements`; +-- -------------------------------------------------------- -CREATE TABLE `0_wo_requirements` ( - `id` int(11) NOT NULL auto_increment, - `workorder_id` int(11) NOT NULL default '0', - `stock_id` char(20) NOT NULL default '', - `workcentre` int(11) NOT NULL default '0', - `units_req` double NOT NULL default '1', - `std_cost` double NOT NULL default '0', - `loc_code` char(5) NOT NULL default '', - `units_issued` double NOT NULL default '0', - PRIMARY KEY (`id`) -) TYPE=InnoDB AUTO_INCREMENT=22 ; - - -### Data of table `0_wo_requirements` ### - -INSERT INTO `0_wo_requirements` VALUES ('1', '1', '102', '1', '1', '0', 'DEF', '10'); -INSERT INTO `0_wo_requirements` VALUES ('2', '1', '103', '1', '1', '0', 'DEF', '10'); -INSERT INTO `0_wo_requirements` VALUES ('3', '1', '104', '1', '1', '0', 'DEF', '10'); -INSERT INTO `0_wo_requirements` VALUES ('4', '2', '102', '1', '1', '0', 'DEF', '0'); -INSERT INTO `0_wo_requirements` VALUES ('5', '2', '103', '1', '1', '0', 'DEF', '0'); -INSERT INTO `0_wo_requirements` VALUES ('6', '2', '104', '1', '1', '0', 'DEF', '0'); -INSERT INTO `0_wo_requirements` VALUES ('7', '3', '102', '1', '1', '0', 'DEF', '2'); -INSERT INTO `0_wo_requirements` VALUES ('8', '3', '103', '1', '1', '0', 'DEF', '2'); -INSERT INTO `0_wo_requirements` VALUES ('9', '3', '104', '1', '1', '0', 'DEF', '2'); -INSERT INTO `0_wo_requirements` VALUES ('10', '4', '102', '1', '1', '0', 'DEF', '4'); -INSERT INTO `0_wo_requirements` VALUES ('11', '4', '103', '1', '1', '0', 'DEF', '4'); -INSERT INTO `0_wo_requirements` VALUES ('12', '4', '104', '1', '1', '0', 'DEF', '4'); -INSERT INTO `0_wo_requirements` VALUES ('13', '5', '102', '1', '1', '0', 'DEF', '5'); -INSERT INTO `0_wo_requirements` VALUES ('14', '5', '103', '1', '1', '0', 'DEF', '5'); -INSERT INTO `0_wo_requirements` VALUES ('15', '5', '104', '1', '1', '0', 'DEF', '5'); -INSERT INTO `0_wo_requirements` VALUES ('16', '6', '102', '1', '1', '0', 'DEF', '-5'); -INSERT INTO `0_wo_requirements` VALUES ('17', '6', '103', '1', '1', '0', 'DEF', '-5'); -INSERT INTO `0_wo_requirements` VALUES ('18', '6', '104', '1', '1', '0', 'DEF', '-5'); -INSERT INTO `0_wo_requirements` VALUES ('19', '7', '102', '1', '1', '0', 'DEF', '-2'); -INSERT INTO `0_wo_requirements` VALUES ('20', '7', '103', '1', '1', '0', 'DEF', '-2'); -INSERT INTO `0_wo_requirements` VALUES ('21', '7', '104', '1', '1', '0', 'DEF', '-2'); - - -### Structure of table `0_workcentres` ### +-- +-- Table structure for table `0_workcentres` +-- DROP TABLE IF EXISTS `0_workcentres`; - -CREATE TABLE `0_workcentres` ( +CREATE TABLE IF NOT EXISTS `0_workcentres` ( `id` int(11) NOT NULL auto_increment, `name` char(40) NOT NULL default '', `description` char(50) NOT NULL default '', `inactive` tinyint(1) NOT NULL default '0', PRIMARY KEY (`id`), UNIQUE KEY `name` (`name`) -) TYPE=MyISAM AUTO_INCREMENT=2 ; +) TYPE=MyISAM AUTO_INCREMENT=2 ; +-- +-- Dumping data for table `0_workcentres` +-- -### Data of table `0_workcentres` ### - -INSERT INTO `0_workcentres` VALUES ('1', 'Workshop', 'Workshop in Alabama', '0'); +INSERT INTO `0_workcentres` VALUES(1, 'Workshop', 'Workshop in Alabama', 0); +-- -------------------------------------------------------- -### Structure of table `0_workorders` ### +-- +-- Table structure for table `0_workorders` +-- DROP TABLE IF EXISTS `0_workorders`; - -CREATE TABLE `0_workorders` ( +CREATE TABLE IF NOT EXISTS `0_workorders` ( `id` int(11) NOT NULL auto_increment, `wo_ref` varchar(60) NOT NULL default '', `loc_code` varchar(5) NOT NULL default '', @@ -2054,60 +2389,128 @@ CREATE TABLE `0_workorders` ( `additional_costs` double NOT NULL default '0', PRIMARY KEY (`id`), UNIQUE KEY `wo_ref` (`wo_ref`) -) TYPE=InnoDB AUTO_INCREMENT=8 ; +) TYPE=InnoDB AUTO_INCREMENT=8 ; +-- +-- Dumping data for table `0_workorders` +-- -### Data of table `0_workorders` ### +INSERT INTO `0_workorders` VALUES(1, '1', 'DEF', 10, '3400', '2009-06-21', 0, '2009-06-21', '2009-06-21', 10, 1, 1, 10); +INSERT INTO `0_workorders` VALUES(2, '2', 'DEF', 3, '3400', '2009-06-21', 2, '2009-07-11', '2009-06-21', 2, 0, 1, 0); +INSERT INTO `0_workorders` VALUES(3, '3', 'DEF', 2, '3400', '2009-06-21', 0, '2009-06-21', '2009-06-21', 2, 1, 1, 0); +INSERT INTO `0_workorders` VALUES(4, '4', 'DEF', 4, '3400', '2009-06-21', 0, '2009-06-21', '2009-06-21', 4, 1, 1, 0); +INSERT INTO `0_workorders` VALUES(5, '5', 'DEF', 5, '3400', '2009-06-21', 0, '2009-06-21', '2009-06-21', 5, 1, 1, 10); +INSERT INTO `0_workorders` VALUES(6, '6', 'DEF', -5, '3400', '2009-06-21', 1, '2009-06-21', '2009-06-21', -5, 1, 1, 0); +INSERT INTO `0_workorders` VALUES(7, '7', 'DEF', -2, '3400', '2009-06-21', 1, '2009-06-21', '2009-06-21', -2, 1, 1, 10); -INSERT INTO `0_workorders` VALUES ('1', '1', 'DEF', '10', '3400', '2009-06-21', '0', '2009-06-21', '2009-06-21', '10', '1', '1', '10'); -INSERT INTO `0_workorders` VALUES ('2', '2', 'DEF', '3', '3400', '2009-06-21', '2', '2009-07-11', '2009-06-21', '2', '0', '1', '0'); -INSERT INTO `0_workorders` VALUES ('3', '3', 'DEF', '2', '3400', '2009-06-21', '0', '2009-06-21', '2009-06-21', '2', '1', '1', '0'); -INSERT INTO `0_workorders` VALUES ('4', '4', 'DEF', '4', '3400', '2009-06-21', '0', '2009-06-21', '2009-06-21', '4', '1', '1', '0'); -INSERT INTO `0_workorders` VALUES ('5', '5', 'DEF', '5', '3400', '2009-06-21', '0', '2009-06-21', '2009-06-21', '5', '1', '1', '10'); -INSERT INTO `0_workorders` VALUES ('6', '6', 'DEF', '-5', '3400', '2009-06-21', '1', '2009-06-21', '2009-06-21', '-5', '1', '1', '0'); -INSERT INTO `0_workorders` VALUES ('7', '7', 'DEF', '-2', '3400', '2009-06-21', '1', '2009-06-21', '2009-06-21', '-2', '1', '1', '10'); +-- -------------------------------------------------------- +-- +-- Table structure for table `0_wo_issues` +-- -### Structure of table `0_tags` ### +DROP TABLE IF EXISTS `0_wo_issues`; +CREATE TABLE IF NOT EXISTS `0_wo_issues` ( + `issue_no` int(11) NOT NULL auto_increment, + `workorder_id` int(11) NOT NULL default '0', + `reference` varchar(100) default NULL, + `issue_date` date default NULL, + `loc_code` varchar(5) default NULL, + `workcentre_id` int(11) default NULL, + PRIMARY KEY (`issue_no`), + KEY `workorder_id` (`workorder_id`) +) TYPE=InnoDB AUTO_INCREMENT=1 ; -DROP TABLE IF EXISTS `0_tags`; +-- +-- Dumping data for table `0_wo_issues` +-- + + +-- -------------------------------------------------------- + +-- +-- Table structure for table `0_wo_issue_items` +-- -CREATE TABLE `0_tags` ( +DROP TABLE IF EXISTS `0_wo_issue_items`; +CREATE TABLE IF NOT EXISTS `0_wo_issue_items` ( `id` int(11) NOT NULL auto_increment, - `type` smallint(6) NOT NULL, - `name` varchar(30) NOT NULL, - `description` varchar(60) default NULL, - `inactive` tinyint(1) NOT NULL default '0', - PRIMARY KEY (`id`), - UNIQUE KEY(`type`,`name`) -) TYPE=MyISAM AUTO_INCREMENT=1; + `stock_id` varchar(40) default NULL, + `issue_id` int(11) default NULL, + `qty_issued` double default NULL, + PRIMARY KEY (`id`) +) TYPE=InnoDB AUTO_INCREMENT=1 ; +-- +-- Dumping data for table `0_wo_issue_items` +-- -### Data of table `0_chart_tags` ### +-- -------------------------------------------------------- +-- +-- Table structure for table `0_wo_manufacture` +-- -### Structure of table `0_tag_associations` ### +DROP TABLE IF EXISTS `0_wo_manufacture`; +CREATE TABLE IF NOT EXISTS `0_wo_manufacture` ( + `id` int(11) NOT NULL auto_increment, + `reference` varchar(100) default NULL, + `workorder_id` int(11) NOT NULL default '0', + `quantity` double NOT NULL default '0', + `date_` date NOT NULL default '0000-00-00', + PRIMARY KEY (`id`), + KEY `workorder_id` (`workorder_id`) +) TYPE=InnoDB AUTO_INCREMENT=2 ; -DROP TABLE IF EXISTS `0_tag_associations`; +-- +-- Dumping data for table `0_wo_manufacture` +-- -CREATE TABLE `0_tag_associations` ( - `record_id` varchar(11) NOT NULL, - `tag_id` int(11) NOT NULL, - UNIQUE KEY(`record_id`,`tag_id`) -) TYPE=MyISAM; +INSERT INTO `0_wo_manufacture` VALUES(1, '1', 2, 2, '2009-06-21'); +-- -------------------------------------------------------- -### Data of table `0_tag_associations` ### +-- +-- Table structure for table `0_wo_requirements` +-- -DROP TABLE IF EXISTS `0_useronline` ; +DROP TABLE IF EXISTS `0_wo_requirements`; +CREATE TABLE IF NOT EXISTS `0_wo_requirements` ( + `id` int(11) NOT NULL auto_increment, + `workorder_id` int(11) NOT NULL default '0', + `stock_id` char(20) NOT NULL default '', + `workcentre` int(11) NOT NULL default '0', + `units_req` double NOT NULL default '1', + `std_cost` double NOT NULL default '0', + `loc_code` char(5) NOT NULL default '', + `units_issued` double NOT NULL default '0', + PRIMARY KEY (`id`), + KEY `workorder_id` (`workorder_id`) +) TYPE=InnoDB AUTO_INCREMENT=22 ; -CREATE TABLE `0_useronline` ( - `id` int(11) NOT NULL AUTO_INCREMENT , - `timestamp` int(15) NOT NULL default '0', - `ip` varchar(40) NOT NULL default '', - `file` varchar(100) NOT NULL default '', - PRIMARY KEY `id` (`id`) , - KEY (`timestamp`) -) TYPE=MYISAM AUTO_INCREMENT=1; +-- +-- Dumping data for table `0_wo_requirements` +-- +INSERT INTO `0_wo_requirements` VALUES(1, 1, '102', 1, 1, 0, 'DEF', 10); +INSERT INTO `0_wo_requirements` VALUES(2, 1, '103', 1, 1, 0, 'DEF', 10); +INSERT INTO `0_wo_requirements` VALUES(3, 1, '104', 1, 1, 0, 'DEF', 10); +INSERT INTO `0_wo_requirements` VALUES(4, 2, '102', 1, 1, 0, 'DEF', 0); +INSERT INTO `0_wo_requirements` VALUES(5, 2, '103', 1, 1, 0, 'DEF', 0); +INSERT INTO `0_wo_requirements` VALUES(6, 2, '104', 1, 1, 0, 'DEF', 0); +INSERT INTO `0_wo_requirements` VALUES(7, 3, '102', 1, 1, 0, 'DEF', 2); +INSERT INTO `0_wo_requirements` VALUES(8, 3, '103', 1, 1, 0, 'DEF', 2); +INSERT INTO `0_wo_requirements` VALUES(9, 3, '104', 1, 1, 0, 'DEF', 2); +INSERT INTO `0_wo_requirements` VALUES(10, 4, '102', 1, 1, 0, 'DEF', 4); +INSERT INTO `0_wo_requirements` VALUES(11, 4, '103', 1, 1, 0, 'DEF', 4); +INSERT INTO `0_wo_requirements` VALUES(12, 4, '104', 1, 1, 0, 'DEF', 4); +INSERT INTO `0_wo_requirements` VALUES(13, 5, '102', 1, 1, 0, 'DEF', 5); +INSERT INTO `0_wo_requirements` VALUES(14, 5, '103', 1, 1, 0, 'DEF', 5); +INSERT INTO `0_wo_requirements` VALUES(15, 5, '104', 1, 1, 0, 'DEF', 5); +INSERT INTO `0_wo_requirements` VALUES(16, 6, '102', 1, 1, 0, 'DEF', -5); +INSERT INTO `0_wo_requirements` VALUES(17, 6, '103', 1, 1, 0, 'DEF', -5); +INSERT INTO `0_wo_requirements` VALUES(18, 6, '104', 1, 1, 0, 'DEF', -5); +INSERT INTO `0_wo_requirements` VALUES(19, 7, '102', 1, 1, 0, 'DEF', -2); +INSERT INTO `0_wo_requirements` VALUES(20, 7, '103', 1, 1, 0, 'DEF', -2); +INSERT INTO `0_wo_requirements` VALUES(21, 7, '104', 1, 1, 0, 'DEF', -2); diff --git a/sql/en_US-new.sql b/sql/en_US-new.sql index 19f66087..041bced2 100644 --- a/sql/en_US-new.sql +++ b/sql/en_US-new.sql @@ -1,32 +1,45 @@ -# Built by FrontAccounting 2.1.2 -# http://frontaccounting.net -# Company: Company name -# User: Administrator -# COA: en_US-new.sql +-- phpMyAdmin SQL Dump +-- version 2.11.8.1deb5 +-- http://www.phpmyadmin.net +-- +-- Host: localhost +-- Generation Time: May 11, 2010 at 11:37 PM +-- Server version: 5.0.51 +-- PHP Version: 5.2.6-1+lenny2 +-- +-- Database: `fatest` +-- -### Structure of table `0_areas` ### +-- -------------------------------------------------------- -DROP TABLE IF EXISTS `0_areas`; +-- +-- Table structure for table `0_areas` +-- -CREATE TABLE `0_areas` ( +DROP TABLE IF EXISTS `0_areas`; +CREATE TABLE IF NOT EXISTS `0_areas` ( `area_code` int(11) NOT NULL auto_increment, `description` varchar(60) NOT NULL default '', `inactive` tinyint(1) NOT NULL default '0', PRIMARY KEY (`area_code`), UNIQUE KEY `description` (`description`) -) TYPE=MyISAM AUTO_INCREMENT=2 ; +) TYPE=MyISAM AUTO_INCREMENT=2 ; +-- +-- Dumping data for table `0_areas` +-- -### Data of table `0_areas` ### +INSERT INTO `0_areas` VALUES(1, 'Global', 0); -INSERT INTO `0_areas` VALUES ('1', 'Global', '0'); +-- -------------------------------------------------------- -### Structure of table `0_attachments` ### +-- +-- Table structure for table `0_attachments` +-- DROP TABLE IF EXISTS `0_attachments`; - -CREATE TABLE `0_attachments` ( +CREATE TABLE IF NOT EXISTS `0_attachments` ( `id` int(11) unsigned NOT NULL auto_increment, `description` varchar(60) NOT NULL default '', `type_no` int(11) NOT NULL default '0', @@ -38,17 +51,22 @@ CREATE TABLE `0_attachments` ( `filetype` varchar(60) NOT NULL default '', PRIMARY KEY (`id`), KEY `type_no` (`type_no`,`trans_no`) -) TYPE=MyISAM AUTO_INCREMENT=1 ; +) TYPE=MyISAM AUTO_INCREMENT=1 ; +-- +-- Dumping data for table `0_attachments` +-- -### Data of table `0_attachments` ### -### Structure of table `0_audit_trail` ### +-- -------------------------------------------------------- -DROP TABLE IF EXISTS `0_audit_trail`; +-- +-- Table structure for table `0_audit_trail` +-- -CREATE TABLE `0_audit_trail` ( - `id` int(11) NOT NULL AUTO_INCREMENT, +DROP TABLE IF EXISTS `0_audit_trail`; +CREATE TABLE IF NOT EXISTS `0_audit_trail` ( + `id` int(11) NOT NULL auto_increment, `type` smallint(6) unsigned NOT NULL default '0', `trans_no` int(11) unsigned NOT NULL default '0', `user` smallint(6) unsigned NOT NULL default '0', @@ -57,52 +75,61 @@ CREATE TABLE `0_audit_trail` ( `fiscal_year` int(11) NOT NULL, `gl_date` date NOT NULL default '0000-00-00', `gl_seq` int(11) unsigned default NULL, - PRIMARY KEY (`id`), - KEY (`fiscal_year`, `gl_seq`) -) TYPE=InnoDB ; + PRIMARY KEY (`id`), + KEY `Seq` (`fiscal_year`,`gl_date`,`gl_seq`), + KEY `Type_and_Number` (`type`,`trans_no`) +) TYPE=InnoDB AUTO_INCREMENT=1 ; -### Data of table `0_audit_trail` ### +-- +-- Dumping data for table `0_audit_trail` +-- +-- -------------------------------------------------------- -### Structure of table `0_bank_accounts` ### +-- +-- Table structure for table `0_bank_accounts` +-- DROP TABLE IF EXISTS `0_bank_accounts`; - -CREATE TABLE `0_bank_accounts` ( - `account_code` varchar(11) NOT NULL default '', +CREATE TABLE IF NOT EXISTS `0_bank_accounts` ( + `account_code` varchar(15) NOT NULL default '', `account_type` smallint(6) NOT NULL default '0', `bank_account_name` varchar(60) NOT NULL default '', `bank_account_number` varchar(100) NOT NULL default '', `bank_name` varchar(60) NOT NULL default '', `bank_address` tinytext, `bank_curr_code` char(3) NOT NULL default '', - `dflt_curr_act` TINYINT(1) NOT NULL default '0', + `dflt_curr_act` tinyint(1) NOT NULL default '0', `id` smallint(6) NOT NULL auto_increment, `last_reconciled_date` timestamp NOT NULL default '0000-00-00 00:00:00', `ending_reconcile_balance` double NOT NULL default '0', `inactive` tinyint(1) NOT NULL default '0', PRIMARY KEY (`id`), KEY `bank_account_name` (`bank_account_name`), - KEY `bank_account_number` (`bank_account_number`) -) TYPE=MyISAM AUTO_INCREMENT=3 ; + KEY `bank_account_number` (`bank_account_number`), + KEY `account_code` (`account_code`) +) TYPE=MyISAM AUTO_INCREMENT=3 ; +-- +-- Dumping data for table `0_bank_accounts` +-- -### Data of table `0_bank_accounts` ### - -INSERT INTO `0_bank_accounts` VALUES ('1060', '0', 'Current account', 'N/A', 'N/A', '', 'USD', '1', '1', '0000-00-00 00:00:00', '0', '0'); -INSERT INTO `0_bank_accounts` VALUES ('1065', '3', 'Petty Cash account', 'N/A', 'N/A', '', 'USD', '0', '2', '0000-00-00 00:00:00', '0', '0'); +INSERT INTO `0_bank_accounts` VALUES('1060', 0, 'Current account', 'N/A', 'N/A', '', 'USD', 1, 1, '0000-00-00 00:00:00', 0, 0); +INSERT INTO `0_bank_accounts` VALUES('1065', 3, 'Petty Cash account', 'N/A', 'N/A', '', 'USD', 0, 2, '0000-00-00 00:00:00', 0, 0); +-- -------------------------------------------------------- -### Structure of table `0_bank_trans` ### +-- +-- Table structure for table `0_bank_trans` +-- DROP TABLE IF EXISTS `0_bank_trans`; - -CREATE TABLE `0_bank_trans` ( +CREATE TABLE IF NOT EXISTS `0_bank_trans` ( `id` int(11) NOT NULL auto_increment, `type` smallint(6) default NULL, `trans_no` int(11) default NULL, - `bank_act` varchar(11) default NULL, + `bank_act` varchar(15) NOT NULL default '', `ref` varchar(40) default NULL, `trans_date` date NOT NULL default '0000-00-00', `amount` double default NULL, @@ -113,19 +140,24 @@ CREATE TABLE `0_bank_trans` ( `reconciled` date default NULL, PRIMARY KEY (`id`), KEY `bank_act` (`bank_act`,`ref`), - KEY `type` (`type`,`trans_no`) -) TYPE=InnoDB AUTO_INCREMENT=1 ; - + KEY `type` (`type`,`trans_no`), + KEY `bank_act_2` (`bank_act`,`reconciled`), + KEY `bank_act_3` (`bank_act`,`trans_date`) +) TYPE=InnoDB AUTO_INCREMENT=1 ; -### Data of table `0_bank_trans` ### +-- +-- Dumping data for table `0_bank_trans` +-- +-- -------------------------------------------------------- -### Structure of table `0_bom` ### +-- +-- Table structure for table `0_bom` +-- DROP TABLE IF EXISTS `0_bom`; - -CREATE TABLE `0_bom` ( +CREATE TABLE IF NOT EXISTS `0_bom` ( `id` int(11) NOT NULL auto_increment, `parent` char(20) NOT NULL default '', `component` char(20) NOT NULL default '', @@ -137,25 +169,27 @@ CREATE TABLE `0_bom` ( KEY `id` (`id`), KEY `loc_code` (`loc_code`), KEY `parent` (`parent`,`loc_code`), - KEY `Parent_2` (`parent`), KEY `workcentre_added` (`workcentre_added`) -) TYPE=MyISAM AUTO_INCREMENT=1 ; - +) TYPE=MyISAM AUTO_INCREMENT=1 ; -### Data of table `0_bom` ### +-- +-- Dumping data for table `0_bom` +-- +-- -------------------------------------------------------- -### Structure of table `0_budget_trans` ### +-- +-- Table structure for table `0_budget_trans` +-- DROP TABLE IF EXISTS `0_budget_trans`; - -CREATE TABLE `0_budget_trans` ( +CREATE TABLE IF NOT EXISTS `0_budget_trans` ( `counter` int(11) NOT NULL auto_increment, `type` smallint(6) NOT NULL default '0', `type_no` bigint(16) NOT NULL default '1', `tran_date` date NOT NULL default '0000-00-00', - `account` varchar(11) NOT NULL default '', + `account` varchar(15) NOT NULL default '', `memo_` tinytext NOT NULL, `amount` double NOT NULL default '0', `dimension_id` int(11) default '0', @@ -163,270 +197,314 @@ CREATE TABLE `0_budget_trans` ( `person_type_id` int(11) default NULL, `person_id` tinyblob, PRIMARY KEY (`counter`), - KEY `Type_and_Number` (`type`,`type_no`) -) TYPE=InnoDB AUTO_INCREMENT=1 ; - + KEY `Type_and_Number` (`type`,`type_no`), + KEY `Account` (`account`,`tran_date`,`dimension_id`,`dimension2_id`) +) TYPE=InnoDB AUTO_INCREMENT=1 ; -### Data of table `0_budget_trans` ### +-- +-- Dumping data for table `0_budget_trans` +-- +-- -------------------------------------------------------- -### Structure of table `0_chart_class` ### +-- +-- Table structure for table `0_chart_class` +-- DROP TABLE IF EXISTS `0_chart_class`; - -CREATE TABLE `0_chart_class` ( - `cid` int(11) NOT NULL default '0', +CREATE TABLE IF NOT EXISTS `0_chart_class` ( + `cid` varchar(3) NOT NULL, `class_name` varchar(60) NOT NULL default '', `ctype` tinyint(1) NOT NULL default '0', `inactive` tinyint(1) NOT NULL default '0', PRIMARY KEY (`cid`) -) TYPE=MyISAM ; +) TYPE=MyISAM; +-- +-- Dumping data for table `0_chart_class` +-- -### Data of table `0_chart_class` ### +INSERT INTO `0_chart_class` VALUES('1', 'Assets', 1, 0); +INSERT INTO `0_chart_class` VALUES('2', 'Liabilities', 2, 0); +INSERT INTO `0_chart_class` VALUES('3', 'Income', 4, 0); +INSERT INTO `0_chart_class` VALUES('4', 'Costs', 6, 0); -INSERT INTO `0_chart_class` VALUES ('1', 'Assets', '1', '0'); -INSERT INTO `0_chart_class` VALUES ('2', 'Liabilities', '2', '0'); -INSERT INTO `0_chart_class` VALUES ('3', 'Income', '4', '0'); -INSERT INTO `0_chart_class` VALUES ('4', 'Costs', '6', '0'); +-- -------------------------------------------------------- -### Structure of table `0_chart_master` ### +-- +-- Table structure for table `0_chart_master` +-- DROP TABLE IF EXISTS `0_chart_master`; - -CREATE TABLE `0_chart_master` ( - `account_code` varchar(11) NOT NULL default '', - `account_code2` varchar(11) default '', +CREATE TABLE IF NOT EXISTS `0_chart_master` ( + `account_code` varchar(15) NOT NULL default '', + `account_code2` varchar(15) NOT NULL default '', `account_name` varchar(60) NOT NULL default '', - `account_type` int(11) NOT NULL default '0', + `account_type` varchar(10) NOT NULL default '0', `inactive` tinyint(1) NOT NULL default '0', PRIMARY KEY (`account_code`), - KEY `account_code` (`account_code`), - KEY `account_name` (`account_name`) -) TYPE=MyISAM ; - - -### Data of table `0_chart_master` ### - -INSERT INTO `0_chart_master` VALUES ('1060', '', 'Checking Account', '1', '0'); -INSERT INTO `0_chart_master` VALUES ('1065', '', 'Petty Cash', '1', '0'); -INSERT INTO `0_chart_master` VALUES ('1200', '', 'Accounts Receivables', '1', '0'); -INSERT INTO `0_chart_master` VALUES ('1205', '', 'Allowance for doubtful accounts', '1', '0'); -INSERT INTO `0_chart_master` VALUES ('1510', '', 'Inventory', '2', '0'); -INSERT INTO `0_chart_master` VALUES ('1520', '', 'Stocks of Raw Materials', '2', '0'); -INSERT INTO `0_chart_master` VALUES ('1530', '', 'Stocks of Work In Progress', '2', '0'); -INSERT INTO `0_chart_master` VALUES ('1540', '', 'Stocks of Finsihed Goods', '2', '0'); -INSERT INTO `0_chart_master` VALUES ('1550', '', 'Goods Received Clearing account', '2', '0'); -INSERT INTO `0_chart_master` VALUES ('1820', '', 'Office Furniture & Equipment', '3', '0'); -INSERT INTO `0_chart_master` VALUES ('1825', '', 'Accum. Amort. -Furn. & Equip.', '3', '0'); -INSERT INTO `0_chart_master` VALUES ('1840', '', 'Vehicle', '3', '0'); -INSERT INTO `0_chart_master` VALUES ('1845', '', 'Accum. Amort. -Vehicle', '3', '0'); -INSERT INTO `0_chart_master` VALUES ('2100', '', 'Accounts Payable', '4', '0'); -INSERT INTO `0_chart_master` VALUES ('2110', '', 'Accrued Income Tax - Federal', '4', '0'); -INSERT INTO `0_chart_master` VALUES ('2120', '', 'Accrued Income Tax - State', '4', '0'); -INSERT INTO `0_chart_master` VALUES ('2130', '', 'Accrued Franchise Tax', '4', '0'); -INSERT INTO `0_chart_master` VALUES ('2140', '', 'Accrued Real & Personal Prop Tax', '4', '0'); -INSERT INTO `0_chart_master` VALUES ('2145', '', 'Purchase Tax', '4', '0'); -INSERT INTO `0_chart_master` VALUES ('2150', '', 'Sales Tax', '4', '0'); -INSERT INTO `0_chart_master` VALUES ('2160', '', 'Accrued Use Tax Payable', '4', '0'); -INSERT INTO `0_chart_master` VALUES ('2210', '', 'Accrued Wages', '4', '0'); -INSERT INTO `0_chart_master` VALUES ('2220', '', 'Accrued Comp Time', '4', '0'); -INSERT INTO `0_chart_master` VALUES ('2230', '', 'Accrued Holiday Pay', '4', '0'); -INSERT INTO `0_chart_master` VALUES ('2240', '', 'Accrued Vacation Pay', '4', '0'); -INSERT INTO `0_chart_master` VALUES ('2310', '', 'Accr. Benefits - 401K', '4', '0'); -INSERT INTO `0_chart_master` VALUES ('2320', '', 'Accr. Benefits - Stock Purchase', '4', '0'); -INSERT INTO `0_chart_master` VALUES ('2330', '', 'Accr. Benefits - Med, Den', '4', '0'); -INSERT INTO `0_chart_master` VALUES ('2340', '', 'Accr. Benefits - Payroll Taxes', '4', '0'); -INSERT INTO `0_chart_master` VALUES ('2350', '', 'Accr. Benefits - Credit Union', '4', '0'); -INSERT INTO `0_chart_master` VALUES ('2360', '', 'Accr. Benefits - Savings Bond', '4', '0'); -INSERT INTO `0_chart_master` VALUES ('2370', '', 'Accr. Benefits - Garnish', '4', '0'); -INSERT INTO `0_chart_master` VALUES ('2380', '', 'Accr. Benefits - Charity Cont.', '4', '0'); -INSERT INTO `0_chart_master` VALUES ('2620', '', 'Bank Loans', '5', '0'); -INSERT INTO `0_chart_master` VALUES ('2680', '', 'Loans from Shareholders', '5', '0'); -INSERT INTO `0_chart_master` VALUES ('3350', '', 'Common Shares', '6', '0'); -INSERT INTO `0_chart_master` VALUES ('3590', '', 'Retained Earnings - prior years', '7', '0'); -INSERT INTO `0_chart_master` VALUES ('4010', '', 'Sales', '8', '0'); -INSERT INTO `0_chart_master` VALUES ('4430', '', 'Shipping & Handling', '9', '0'); -INSERT INTO `0_chart_master` VALUES ('4440', '', 'Interest', '9', '0'); -INSERT INTO `0_chart_master` VALUES ('4450', '', 'Foreign Exchange Gain', '9', '0'); -INSERT INTO `0_chart_master` VALUES ('4500', '', 'Prompt Payment Discounts', '9', '0'); -INSERT INTO `0_chart_master` VALUES ('4510', '', 'Discounts Given', '9', '0'); -INSERT INTO `0_chart_master` VALUES ('5010', '', 'Cost of Goods Sold - Retail', '10', '0'); -INSERT INTO `0_chart_master` VALUES ('5020', '', 'Material Usage Varaiance', '10', '0'); -INSERT INTO `0_chart_master` VALUES ('5030', '', 'Consumable Materials', '10', '0'); -INSERT INTO `0_chart_master` VALUES ('5040', '', 'Purchase price Variance', '10', '0'); -INSERT INTO `0_chart_master` VALUES ('5050', '', 'Purchases of materials', '10', '0'); -INSERT INTO `0_chart_master` VALUES ('5060', '', 'Discounts Received', '10', '0'); -INSERT INTO `0_chart_master` VALUES ('5100', '', 'Freight', '10', '0'); -INSERT INTO `0_chart_master` VALUES ('5410', '', 'Wages & Salaries', '11', '0'); -INSERT INTO `0_chart_master` VALUES ('5420', '', 'Wages - Overtime', '11', '0'); -INSERT INTO `0_chart_master` VALUES ('5430', '', 'Benefits - Comp Time', '11', '0'); -INSERT INTO `0_chart_master` VALUES ('5440', '', 'Benefits - Payroll Taxes', '11', '0'); -INSERT INTO `0_chart_master` VALUES ('5450', '', 'Benefits - Workers Comp', '11', '0'); -INSERT INTO `0_chart_master` VALUES ('5460', '', 'Benefits - Pension', '11', '0'); -INSERT INTO `0_chart_master` VALUES ('5470', '', 'Benefits - General Benefits', '11', '0'); -INSERT INTO `0_chart_master` VALUES ('5510', '', 'Inc Tax Exp - Federal', '11', '0'); -INSERT INTO `0_chart_master` VALUES ('5520', '', 'Inc Tax Exp - State', '11', '0'); -INSERT INTO `0_chart_master` VALUES ('5530', '', 'Taxes - Real Estate', '11', '0'); -INSERT INTO `0_chart_master` VALUES ('5540', '', 'Taxes - Personal Property', '11', '0'); -INSERT INTO `0_chart_master` VALUES ('5550', '', 'Taxes - Franchise', '11', '0'); -INSERT INTO `0_chart_master` VALUES ('5560', '', 'Taxes - Foreign Withholding', '11', '0'); -INSERT INTO `0_chart_master` VALUES ('5610', '', 'Accounting & Legal', '12', '0'); -INSERT INTO `0_chart_master` VALUES ('5615', '', 'Advertising & Promotions', '12', '0'); -INSERT INTO `0_chart_master` VALUES ('5620', '', 'Bad Debts', '12', '0'); -INSERT INTO `0_chart_master` VALUES ('5660', '', 'Amortization Expense', '12', '0'); -INSERT INTO `0_chart_master` VALUES ('5685', '', 'Insurance', '12', '0'); -INSERT INTO `0_chart_master` VALUES ('5690', '', 'Interest & Bank Charges', '12', '0'); -INSERT INTO `0_chart_master` VALUES ('5700', '', 'Office Supplies', '12', '0'); -INSERT INTO `0_chart_master` VALUES ('5760', '', 'Rent', '12', '0'); -INSERT INTO `0_chart_master` VALUES ('5765', '', 'Repair & Maintenance', '12', '0'); -INSERT INTO `0_chart_master` VALUES ('5780', '', 'Telephone', '12', '0'); -INSERT INTO `0_chart_master` VALUES ('5785', '', 'Travel & Entertainment', '12', '0'); -INSERT INTO `0_chart_master` VALUES ('5790', '', 'Utilities', '12', '0'); -INSERT INTO `0_chart_master` VALUES ('5795', '', 'Registrations', '12', '0'); -INSERT INTO `0_chart_master` VALUES ('5800', '', 'Licenses', '12', '0'); -INSERT INTO `0_chart_master` VALUES ('5810', '', 'Foreign Exchange Loss', '12', '0'); -INSERT INTO `0_chart_master` VALUES ('9990', '', 'Year Profit/Loss', '12', '0'); - - -### Structure of table `0_chart_types` ### + KEY `account_name` (`account_name`), + KEY `accounts_by_type` (`account_type`,`account_code`) +) TYPE=MyISAM; -DROP TABLE IF EXISTS `0_chart_types`; +-- +-- Dumping data for table `0_chart_master` +-- -CREATE TABLE `0_chart_types` ( - `id` int(11) NOT NULL auto_increment, +INSERT INTO `0_chart_master` VALUES('1060', '', 'Checking Account', '1', 0); +INSERT INTO `0_chart_master` VALUES('1065', '', 'Petty Cash', '1', 0); +INSERT INTO `0_chart_master` VALUES('1200', '', 'Accounts Receivables', '1', 0); +INSERT INTO `0_chart_master` VALUES('1205', '', 'Allowance for doubtful accounts', '1', 0); +INSERT INTO `0_chart_master` VALUES('1510', '', 'Inventory', '2', 0); +INSERT INTO `0_chart_master` VALUES('1520', '', 'Stocks of Raw Materials', '2', 0); +INSERT INTO `0_chart_master` VALUES('1530', '', 'Stocks of Work In Progress', '2', 0); +INSERT INTO `0_chart_master` VALUES('1540', '', 'Stocks of Finsihed Goods', '2', 0); +INSERT INTO `0_chart_master` VALUES('1550', '', 'Goods Received Clearing account', '2', 0); +INSERT INTO `0_chart_master` VALUES('1820', '', 'Office Furniture & Equipment', '3', 0); +INSERT INTO `0_chart_master` VALUES('1825', '', 'Accum. Amort. -Furn. & Equip.', '3', 0); +INSERT INTO `0_chart_master` VALUES('1840', '', 'Vehicle', '3', 0); +INSERT INTO `0_chart_master` VALUES('1845', '', 'Accum. Amort. -Vehicle', '3', 0); +INSERT INTO `0_chart_master` VALUES('2100', '', 'Accounts Payable', '4', 0); +INSERT INTO `0_chart_master` VALUES('2110', '', 'Accrued Income Tax - Federal', '4', 0); +INSERT INTO `0_chart_master` VALUES('2120', '', 'Accrued Income Tax - State', '4', 0); +INSERT INTO `0_chart_master` VALUES('2130', '', 'Accrued Franchise Tax', '4', 0); +INSERT INTO `0_chart_master` VALUES('2140', '', 'Accrued Real & Personal Prop Tax', '4', 0); +INSERT INTO `0_chart_master` VALUES('2150', '', 'Sales Tax', '4', 0); +INSERT INTO `0_chart_master` VALUES('2160', '', 'Accrued Use Tax Payable', '4', 0); +INSERT INTO `0_chart_master` VALUES('2210', '', 'Accrued Wages', '4', 0); +INSERT INTO `0_chart_master` VALUES('2220', '', 'Accrued Comp Time', '4', 0); +INSERT INTO `0_chart_master` VALUES('2230', '', 'Accrued Holiday Pay', '4', 0); +INSERT INTO `0_chart_master` VALUES('2240', '', 'Accrued Vacation Pay', '4', 0); +INSERT INTO `0_chart_master` VALUES('2310', '', 'Accr. Benefits - 401K', '4', 0); +INSERT INTO `0_chart_master` VALUES('2320', '', 'Accr. Benefits - Stock Purchase', '4', 0); +INSERT INTO `0_chart_master` VALUES('2330', '', 'Accr. Benefits - Med, Den', '4', 0); +INSERT INTO `0_chart_master` VALUES('2340', '', 'Accr. Benefits - Payroll Taxes', '4', 0); +INSERT INTO `0_chart_master` VALUES('2350', '', 'Accr. Benefits - Credit Union', '4', 0); +INSERT INTO `0_chart_master` VALUES('2360', '', 'Accr. Benefits - Savings Bond', '4', 0); +INSERT INTO `0_chart_master` VALUES('2370', '', 'Accr. Benefits - Garnish', '4', 0); +INSERT INTO `0_chart_master` VALUES('2380', '', 'Accr. Benefits - Charity Cont.', '4', 0); +INSERT INTO `0_chart_master` VALUES('2620', '', 'Bank Loans', '5', 0); +INSERT INTO `0_chart_master` VALUES('2680', '', 'Loans from Shareholders', '5', 0); +INSERT INTO `0_chart_master` VALUES('3350', '', 'Common Shares', '6', 0); +INSERT INTO `0_chart_master` VALUES('3590', '', 'Retained Earnings - prior years', '7', 0); +INSERT INTO `0_chart_master` VALUES('4010', '', 'Sales', '8', 0); +INSERT INTO `0_chart_master` VALUES('4430', '', 'Shipping & Handling', '9', 0); +INSERT INTO `0_chart_master` VALUES('4440', '', 'Interest', '9', 0); +INSERT INTO `0_chart_master` VALUES('4450', '', 'Foreign Exchange Gain', '9', 0); +INSERT INTO `0_chart_master` VALUES('4500', '', 'Prompt Payment Discounts', '9', 0); +INSERT INTO `0_chart_master` VALUES('4510', '', 'Discounts Given', '9', 0); +INSERT INTO `0_chart_master` VALUES('5010', '', 'Cost of Goods Sold - Retail', '10', 0); +INSERT INTO `0_chart_master` VALUES('5020', '', 'Material Usage Varaiance', '10', 0); +INSERT INTO `0_chart_master` VALUES('5030', '', 'Consumable Materials', '10', 0); +INSERT INTO `0_chart_master` VALUES('5040', '', 'Purchase price Variance', '10', 0); +INSERT INTO `0_chart_master` VALUES('5050', '', 'Purchases of materials', '10', 0); +INSERT INTO `0_chart_master` VALUES('5060', '', 'Discounts Received', '10', 0); +INSERT INTO `0_chart_master` VALUES('5100', '', 'Freight', '10', 0); +INSERT INTO `0_chart_master` VALUES('5410', '', 'Wages & Salaries', '11', 0); +INSERT INTO `0_chart_master` VALUES('5420', '', 'Wages - Overtime', '11', 0); +INSERT INTO `0_chart_master` VALUES('5430', '', 'Benefits - Comp Time', '11', 0); +INSERT INTO `0_chart_master` VALUES('5440', '', 'Benefits - Payroll Taxes', '11', 0); +INSERT INTO `0_chart_master` VALUES('5450', '', 'Benefits - Workers Comp', '11', 0); +INSERT INTO `0_chart_master` VALUES('5460', '', 'Benefits - Pension', '11', 0); +INSERT INTO `0_chart_master` VALUES('5470', '', 'Benefits - General Benefits', '11', 0); +INSERT INTO `0_chart_master` VALUES('5510', '', 'Inc Tax Exp - Federal', '11', 0); +INSERT INTO `0_chart_master` VALUES('5520', '', 'Inc Tax Exp - State', '11', 0); +INSERT INTO `0_chart_master` VALUES('5530', '', 'Taxes - Real Estate', '11', 0); +INSERT INTO `0_chart_master` VALUES('5540', '', 'Taxes - Personal Property', '11', 0); +INSERT INTO `0_chart_master` VALUES('5550', '', 'Taxes - Franchise', '11', 0); +INSERT INTO `0_chart_master` VALUES('5560', '', 'Taxes - Foreign Withholding', '11', 0); +INSERT INTO `0_chart_master` VALUES('5610', '', 'Accounting & Legal', '12', 0); +INSERT INTO `0_chart_master` VALUES('5615', '', 'Advertising & Promotions', '12', 0); +INSERT INTO `0_chart_master` VALUES('5620', '', 'Bad Debts', '12', 0); +INSERT INTO `0_chart_master` VALUES('5660', '', 'Amortization Expense', '12', 0); +INSERT INTO `0_chart_master` VALUES('5685', '', 'Insurance', '12', 0); +INSERT INTO `0_chart_master` VALUES('5690', '', 'Interest & Bank Charges', '12', 0); +INSERT INTO `0_chart_master` VALUES('5700', '', 'Office Supplies', '12', 0); +INSERT INTO `0_chart_master` VALUES('5760', '', 'Rent', '12', 0); +INSERT INTO `0_chart_master` VALUES('5765', '', 'Repair & Maintenance', '12', 0); +INSERT INTO `0_chart_master` VALUES('5780', '', 'Telephone', '12', 0); +INSERT INTO `0_chart_master` VALUES('5785', '', 'Travel & Entertainment', '12', 0); +INSERT INTO `0_chart_master` VALUES('5790', '', 'Utilities', '12', 0); +INSERT INTO `0_chart_master` VALUES('5795', '', 'Registrations', '12', 0); +INSERT INTO `0_chart_master` VALUES('5800', '', 'Licenses', '12', 0); +INSERT INTO `0_chart_master` VALUES('5810', '', 'Foreign Exchange Loss', '12', 0); +INSERT INTO `0_chart_master` VALUES('9990', '', 'Year Profit/Loss', '12', 0); + +-- -------------------------------------------------------- + +-- +-- Table structure for table `0_chart_types` +-- + +DROP TABLE IF EXISTS `0_chart_types`; +CREATE TABLE IF NOT EXISTS `0_chart_types` ( + `id` varchar(10) NOT NULL, `name` varchar(60) NOT NULL default '', - `class_id` tinyint(1) NOT NULL default '0', - `parent` int(11) NOT NULL default '-1', + `class_id` varchar(3) NOT NULL default '', + `parent` varchar(10) NOT NULL default '-1', `inactive` tinyint(1) NOT NULL default '0', PRIMARY KEY (`id`), - KEY `name` (`name`) -) TYPE=MyISAM AUTO_INCREMENT=13 ; + KEY `name` (`name`), + KEY `class_id` (`class_id`) +) TYPE=MyISAM ; +-- +-- Dumping data for table `0_chart_types` +-- -### Data of table `0_chart_types` ### - -INSERT INTO `0_chart_types` VALUES ('1', 'Current Assets', '1', '-1', '0'); -INSERT INTO `0_chart_types` VALUES ('2', 'Inventory Assets', '1', '-1', '0'); -INSERT INTO `0_chart_types` VALUES ('3', 'Capital Assets', '1', '-1', '0'); -INSERT INTO `0_chart_types` VALUES ('4', 'Current Liabilities', '2', '-1', '0'); -INSERT INTO `0_chart_types` VALUES ('5', 'Long Term Liabilities', '2', '-1', '0'); -INSERT INTO `0_chart_types` VALUES ('6', 'Share Capital', '2', '-1', '0'); -INSERT INTO `0_chart_types` VALUES ('7', 'Retained Earnings', '2', '-1', '0'); -INSERT INTO `0_chart_types` VALUES ('8', 'Sales Revenue', '3', '-1', '0'); -INSERT INTO `0_chart_types` VALUES ('9', 'Other Revenue', '3', '-1', '0'); -INSERT INTO `0_chart_types` VALUES ('10', 'Cost of Goods Sold', '4', '-1', '0'); -INSERT INTO `0_chart_types` VALUES ('11', 'Payroll Expenses', '4', '-1', '0'); -INSERT INTO `0_chart_types` VALUES ('12', 'General & Administrative expenses', '4', -1, '0'); - +INSERT INTO `0_chart_types` VALUES('1', 'Current Assets', '1', '', 0); +INSERT INTO `0_chart_types` VALUES('2', 'Inventory Assets', '1', '', 0); +INSERT INTO `0_chart_types` VALUES('3', 'Capital Assets', '1', '', 0); +INSERT INTO `0_chart_types` VALUES('4', 'Current Liabilities', '2', '', 0); +INSERT INTO `0_chart_types` VALUES('5', 'Long Term Liabilities', '2', '', 0); +INSERT INTO `0_chart_types` VALUES('6', 'Share Capital', '2', '', 0); +INSERT INTO `0_chart_types` VALUES('7', 'Retained Earnings', '2', '', 0); +INSERT INTO `0_chart_types` VALUES('8', 'Sales Revenue', '3', '', 0); +INSERT INTO `0_chart_types` VALUES('9', 'Other Revenue', '3', '', 0); +INSERT INTO `0_chart_types` VALUES('10', 'Cost of Goods Sold', '4', '', 0); +INSERT INTO `0_chart_types` VALUES('11', 'Payroll Expenses', '4', '', 0); +INSERT INTO `0_chart_types` VALUES('12', 'General & Administrative expenses', '4', '', 0); + +-- -------------------------------------------------------- -### Structure of table `0_comments` ### +-- +-- Table structure for table `0_comments` +-- DROP TABLE IF EXISTS `0_comments`; - -CREATE TABLE `0_comments` ( +CREATE TABLE IF NOT EXISTS `0_comments` ( `type` int(11) NOT NULL default '0', `id` int(11) NOT NULL default '0', `date_` date default '0000-00-00', - `memo_` tinytext -) TYPE=InnoDB ; - - -### Data of table `0_comments` ### - + `memo_` tinytext, + KEY `type_and_id` (`type`,`id`) +) TYPE=InnoDB; +-- +-- Dumping data for table `0_comments` +-- -### Structure of table `0_company` ### -DROP TABLE IF EXISTS `0_company`; +-- -------------------------------------------------------- -CREATE TABLE `0_company` ( - `coy_code` int(11) NOT NULL default '1', - `coy_name` varchar(60) NOT NULL default '', - `gst_no` varchar(25) NOT NULL default '', - `coy_no` varchar(25) NOT NULL default '0', - `tax_prd` int(11) NOT NULL default '1', - `tax_last` int(11) NOT NULL default '1', - `postal_address` tinytext NOT NULL, - `phone` varchar(30) NOT NULL default '', - `fax` varchar(30) NOT NULL default '', - `email` varchar(100) NOT NULL default '', - `coy_logo` varchar(100) NOT NULL default '', - `domicile` varchar(55) NOT NULL default '', - `curr_default` char(3) NOT NULL default '', - `debtors_act` varchar(11) NOT NULL default '', - `pyt_discount_act` varchar(11) NOT NULL default '', - `creditors_act` varchar(11) NOT NULL default '', - `bank_charge_act` varchar(11) NOT NULL default '', - `exchange_diff_act` varchar(11) NOT NULL default '', - `profit_loss_year_act` varchar(11) NOT NULL default '', - `retained_earnings_act` varchar(11) NOT NULL default '', - `freight_act` varchar(11) NOT NULL default '', - `default_sales_act` varchar(11) NOT NULL default '', - `default_sales_discount_act` varchar(11) NOT NULL default '', - `default_prompt_payment_act` varchar(11) NOT NULL default '', - `default_inventory_act` varchar(11) NOT NULL default '', - `default_cogs_act` varchar(11) NOT NULL default '', - `default_adj_act` varchar(11) NOT NULL default '', - `default_inv_sales_act` varchar(11) NOT NULL default '', - `default_assembly_act` varchar(11) NOT NULL default '', - `payroll_act` varchar(11) NOT NULL default '', - `allow_negative_stock` tinyint(1) NOT NULL default '0', - `po_over_receive` int(11) NOT NULL default '10', - `po_over_charge` int(11) NOT NULL default '10', - `default_credit_limit` int(11) NOT NULL default '1000', - `default_workorder_required` int(11) NOT NULL default '20', - `default_dim_required` int(11) NOT NULL default '20', - `past_due_days` int(11) NOT NULL default '30', - `use_dimension` tinyint(1) default '0', - `f_year` int(11) NOT NULL default '1', - `no_item_list` tinyint(1) NOT NULL default '0', - `no_customer_list` tinyint(1) NOT NULL default '0', - `no_supplier_list` tinyint(1) NOT NULL default '0', - `base_sales` int(11) NOT NULL default '-1', - `foreign_codes` tinyint(1) NOT NULL default '0', - `accumulate_shipping` tinyint(1) NOT NULL default '0', - `legal_text` tinytext NOT NULL, - `default_delivery_required` smallint(6) NOT NULL default '1', - `version_id` varchar(11) NOT NULL default '', - `time_zone` tinyint(1) NOT NULL default '0', - `add_pct` int(5) NOT NULL default '-1', - `round_to` int(5) NOT NULL default '1', - `login_tout` SMALLINT(6) NOT NULL DEFAULT '600', - PRIMARY KEY (`coy_code`) -) TYPE=MyISAM ; - -### Data of table `0_company` ### - -INSERT INTO `0_company` VALUES ('1', 'Company name', '', '', '1', '1', 'N/A', '', '', '', '', '', 'USD', '1200', '5060', '2100', '5690', '4450', '9990', '3590', '4430', '4010', '4510', '4500', '1510', '5010', '5040', '4010', '1530', '5000', '0', '10', '10', '1000', '20', '20', '30', '1', '3', '0', '0', '0', '1', '0', '0', '', '1', '2.2', '0', '-1', '1', '600'); - -### Structure of table `0_credit_status` ### +-- +-- Table structure for table `0_credit_status` +-- DROP TABLE IF EXISTS `0_credit_status`; - -CREATE TABLE `0_credit_status` ( +CREATE TABLE IF NOT EXISTS `0_credit_status` ( `id` int(11) NOT NULL auto_increment, `reason_description` char(100) NOT NULL default '', `dissallow_invoices` tinyint(1) NOT NULL default '0', `inactive` tinyint(1) NOT NULL default '0', PRIMARY KEY (`id`), UNIQUE KEY `reason_description` (`reason_description`) -) TYPE=MyISAM AUTO_INCREMENT=5 ; +) TYPE=MyISAM AUTO_INCREMENT=5 ; +-- +-- Dumping data for table `0_credit_status` +-- -### Data of table `0_credit_status` ### +INSERT INTO `0_credit_status` VALUES(1, 'Good History', 0, 0); +INSERT INTO `0_credit_status` VALUES(3, 'No more work until payment received', 1, 0); +INSERT INTO `0_credit_status` VALUES(4, 'In liquidation', 1, 0); -INSERT INTO `0_credit_status` VALUES ('1', 'Good History', '0', '0'); -INSERT INTO `0_credit_status` VALUES ('3', 'No more work until payment received', '1', '0'); -INSERT INTO `0_credit_status` VALUES ('4', 'In liquidation', '1', '0'); +-- -------------------------------------------------------- +-- +-- Table structure for table `0_crm_categories` +-- -### Structure of table `0_currencies` ### +DROP TABLE IF EXISTS `0_crm_categories`; +CREATE TABLE IF NOT EXISTS `0_crm_categories` ( + `id` int(11) NOT NULL auto_increment COMMENT 'pure technical key', + `type` varchar(20) NOT NULL COMMENT 'contact type e.g. customer', + `action` varchar(20) NOT NULL COMMENT 'detailed usage e.g. department', + `name` varchar(30) NOT NULL COMMENT 'for category selector', + `description` tinytext NOT NULL COMMENT 'usage description', + `system` tinyint(1) NOT NULL default '0' COMMENT 'nonzero for core system usage', + `inactive` tinyint(1) NOT NULL default '0', + PRIMARY KEY (`id`), + UNIQUE KEY `type` (`type`,`action`), + UNIQUE KEY `type_2` (`type`,`name`) +) TYPE=InnoDB AUTO_INCREMENT=13 ; -DROP TABLE IF EXISTS `0_currencies`; +-- +-- Dumping data for table `0_crm_categories` +-- + +INSERT INTO `0_crm_categories` VALUES(1, 'cust_branch', 'general', 'General', 'General contact data for customer branch (overrides company setting)', 1, 0); +INSERT INTO `0_crm_categories` VALUES(2, 'cust_branch', 'invoice', 'Invoices', 'Invoice posting (overrides company setting)', 1, 0); +INSERT INTO `0_crm_categories` VALUES(3, 'cust_branch', 'order', 'Orders', 'Order confirmation (overrides company setting)', 1, 0); +INSERT INTO `0_crm_categories` VALUES(4, 'cust_branch', 'delivery', 'Deliveries', 'Delivery coordination (overrides company setting)', 1, 0); +INSERT INTO `0_crm_categories` VALUES(5, 'customer', 'general', 'General', 'General contact data for customer', 1, 0); +INSERT INTO `0_crm_categories` VALUES(6, 'customer', 'order', 'Orders', 'Order confirmation', 1, 0); +INSERT INTO `0_crm_categories` VALUES(7, 'customer', 'delivery', 'Deliveries', 'Delivery coordination', 1, 0); +INSERT INTO `0_crm_categories` VALUES(8, 'customer', 'invoice', 'Invoices', 'Invoice posting', 1, 0); +INSERT INTO `0_crm_categories` VALUES(9, 'supplier', 'general', 'General', 'General contact data for supplier', 1, 0); +INSERT INTO `0_crm_categories` VALUES(10, 'supplier', 'order', 'Orders', 'Order confirmation', 1, 0); +INSERT INTO `0_crm_categories` VALUES(11, 'supplier', 'delivery', 'Deliveries', 'Delivery coordination', 1, 0); +INSERT INTO `0_crm_categories` VALUES(12, 'supplier', 'invoice', 'Invoices', 'Invoice posting', 1, 0); + +-- -------------------------------------------------------- + +-- +-- Table structure for table `0_crm_contacts` +-- + +DROP TABLE IF EXISTS `0_crm_contacts`; +CREATE TABLE IF NOT EXISTS `0_crm_contacts` ( + `id` int(11) NOT NULL auto_increment, + `person_id` int(11) NOT NULL default '0' COMMENT 'foreign key to crm_contacts', + `type` varchar(20) NOT NULL COMMENT 'foreign key to crm_categories', + `action` varchar(20) NOT NULL COMMENT 'foreign key to crm_categories', + `entity_id` varchar(11) default NULL COMMENT 'entity id in related class table', + PRIMARY KEY (`id`), + KEY `type` (`type`,`action`) +) TYPE=InnoDB AUTO_INCREMENT=1 ; + +-- +-- Dumping data for table `0_crm_contacts` +-- + +-- -------------------------------------------------------- + +-- +-- Table structure for table `0_crm_persons` +-- + +DROP TABLE IF EXISTS `0_crm_persons`; +CREATE TABLE IF NOT EXISTS `0_crm_persons` ( + `id` int(11) NOT NULL auto_increment, + `ref` varchar(30) NOT NULL, + `name` varchar(60) NOT NULL, + `name2` varchar(60) default NULL, + `address` tinytext, + `phone` varchar(30) default NULL, + `phone2` varchar(30) default NULL, + `fax` varchar(30) default NULL, + `email` varchar(100) default NULL, + `lang` char(5) default NULL, + `notes` tinytext NOT NULL, + `inactive` tinyint(1) NOT NULL default '0', + PRIMARY KEY (`id`), + KEY `ref` (`ref`) +) TYPE=InnoDB AUTO_INCREMENT=1 ; + +-- +-- Dumping data for table `0_crm_persons` +-- + + +-- -------------------------------------------------------- + +-- +-- Table structure for table `0_currencies` +-- -CREATE TABLE `0_currencies` ( +DROP TABLE IF EXISTS `0_currencies`; +CREATE TABLE IF NOT EXISTS `0_currencies` ( `currency` varchar(60) NOT NULL default '', `curr_abrev` char(3) NOT NULL default '', `curr_symbol` varchar(10) NOT NULL default '', @@ -435,21 +513,25 @@ CREATE TABLE `0_currencies` ( `auto_update` tinyint(1) NOT NULL default '1', `inactive` tinyint(1) NOT NULL default '0', PRIMARY KEY (`curr_abrev`) -) TYPE=MyISAM ; +) TYPE=MyISAM; +-- +-- Dumping data for table `0_currencies` +-- -### Data of table `0_currencies` ### +INSERT INTO `0_currencies` VALUES('US Dollars', 'USD', '$', 'United States', 'Cents', 1, 0); +INSERT INTO `0_currencies` VALUES('CA Dollars', 'CAD', '$', 'Canada', 'Cents', 1, 0); +INSERT INTO `0_currencies` VALUES('Euro', 'EUR', '?', 'Europe', 'Cents', 1, 0); +INSERT INTO `0_currencies` VALUES('Pounds', 'GBP', '?', 'England', 'Pence', 1, 0); -INSERT INTO `0_currencies` VALUES ('US Dollars', 'USD', '$', 'United States', 'Cents', '1', '0'); -INSERT INTO `0_currencies` VALUES ('CA Dollars', 'CAD', '$', 'Canada', 'Cents', '1', '0'); -INSERT INTO `0_currencies` VALUES ('Euro', 'EUR', '?', 'Europe', 'Cents', '1', '0'); -INSERT INTO `0_currencies` VALUES ('Pounds', 'GBP', '?', 'England', 'Pence', '1', '0'); +-- -------------------------------------------------------- -### Structure of table `0_cust_allocations` ### +-- +-- Table structure for table `0_cust_allocations` +-- DROP TABLE IF EXISTS `0_cust_allocations`; - -CREATE TABLE `0_cust_allocations` ( +CREATE TABLE IF NOT EXISTS `0_cust_allocations` ( `id` int(11) NOT NULL auto_increment, `amt` double unsigned default NULL, `date_alloc` date NOT NULL default '0000-00-00', @@ -457,37 +539,38 @@ CREATE TABLE `0_cust_allocations` ( `trans_type_from` int(11) default NULL, `trans_no_to` int(11) default NULL, `trans_type_to` int(11) default NULL, - PRIMARY KEY (`id`) -) TYPE=InnoDB AUTO_INCREMENT=1 ; - + PRIMARY KEY (`id`), + KEY `From` (`trans_type_from`,`trans_no_from`), + KEY `To` (`trans_type_to`,`trans_no_to`) +) TYPE=InnoDB AUTO_INCREMENT=1 ; -### Data of table `0_cust_allocations` ### +-- +-- Dumping data for table `0_cust_allocations` +-- +-- -------------------------------------------------------- -### Structure of table `0_cust_branch` ### +-- +-- Table structure for table `0_cust_branch` +-- DROP TABLE IF EXISTS `0_cust_branch`; - -CREATE TABLE `0_cust_branch` ( +CREATE TABLE IF NOT EXISTS `0_cust_branch` ( `branch_code` int(11) NOT NULL auto_increment, `debtor_no` int(11) NOT NULL default '0', `br_name` varchar(60) NOT NULL default '', - `branch_ref` varchar(30) NOT NULL default '', + `branch_ref` varchar(30) NOT NULL default '', `br_address` tinytext NOT NULL, `area` int(11) default NULL, `salesman` int(11) NOT NULL default '0', - `phone` varchar(30) NOT NULL default '', - `phone2` varchar(30) NOT NULL default '', - `fax` varchar(30) NOT NULL default '', `contact_name` varchar(60) NOT NULL default '', - `email` varchar(100) NOT NULL default '', `default_location` varchar(5) NOT NULL default '', `tax_group_id` int(11) default NULL, - `sales_account` varchar(11) default NULL, - `sales_discount_account` varchar(11) default NULL, - `receivables_account` varchar(11) default NULL, - `payment_discount_account` varchar(11) default NULL, + `sales_account` varchar(15) NOT NULL default '', + `sales_discount_account` varchar(15) NOT NULL default '', + `receivables_account` varchar(15) NOT NULL default '', + `payment_discount_account` varchar(15) NOT NULL default '', `default_ship_via` int(11) NOT NULL default '1', `disable_trans` tinyint(4) NOT NULL default '0', `br_post_address` tinytext NOT NULL, @@ -496,19 +579,57 @@ CREATE TABLE `0_cust_branch` ( `inactive` tinyint(1) NOT NULL default '0', PRIMARY KEY (`branch_code`,`debtor_no`), KEY `branch_code` (`branch_code`), - KEY `br_name` (`br_name`) -) TYPE=MyISAM AUTO_INCREMENT=1 ; + KEY `branch_ref` (`branch_ref`), + KEY `group_no` (`group_no`) +) TYPE=MyISAM AUTO_INCREMENT=1 ; + +-- +-- Dumping data for table `0_cust_branch` +-- -### Data of table `0_cust_branch` ### +-- -------------------------------------------------------- + +-- +-- Table structure for table `0_debtors_master` +-- + +DROP TABLE IF EXISTS `0_debtors_master`; +CREATE TABLE IF NOT EXISTS `0_debtors_master` ( + `debtor_no` int(11) NOT NULL auto_increment, + `name` varchar(100) NOT NULL default '', + `debtor_ref` varchar(30) NOT NULL, + `address` tinytext, + `tax_id` varchar(55) NOT NULL default '', + `curr_code` char(3) NOT NULL default '', + `sales_type` int(11) NOT NULL default '1', + `dimension_id` int(11) NOT NULL default '0', + `dimension2_id` int(11) NOT NULL default '0', + `credit_status` int(11) NOT NULL default '0', + `payment_terms` int(11) default NULL, + `discount` double NOT NULL default '0', + `pymt_discount` double NOT NULL default '0', + `credit_limit` float NOT NULL default '1000', + `notes` tinytext NOT NULL, + `inactive` tinyint(1) NOT NULL default '0', + PRIMARY KEY (`debtor_no`), + KEY `name` (`name`), + UNIQUE KEY `debtor_ref` (`debtor_ref`) +) TYPE=MyISAM AUTO_INCREMENT=1 ; + +-- +-- Dumping data for table `0_debtors_master` +-- +-- -------------------------------------------------------- -### Structure of table `0_debtor_trans` ### +-- +-- Table structure for table `0_debtor_trans` +-- DROP TABLE IF EXISTS `0_debtor_trans`; - -CREATE TABLE `0_debtor_trans` ( +CREATE TABLE IF NOT EXISTS `0_debtor_trans` ( `trans_no` int(11) unsigned NOT NULL default '0', `type` smallint(6) unsigned NOT NULL default '0', `version` tinyint(1) unsigned NOT NULL default '0', @@ -527,23 +648,27 @@ CREATE TABLE `0_debtor_trans` ( `alloc` double NOT NULL default '0', `rate` double NOT NULL default '1', `ship_via` int(11) default NULL, - `trans_link` int(11) NOT NULL default '0', `dimension_id` int(11) NOT NULL default '0', `dimension2_id` int(11) NOT NULL default '0', - PRIMARY KEY (`trans_no`,`type`), - KEY `debtor_no` (`debtor_no`,`branch_code`) -) TYPE=InnoDB ; - + `payment_terms` int(11) default NULL, + PRIMARY KEY (`type`,`trans_no`), + KEY `debtor_no` (`debtor_no`,`branch_code`), + KEY `tran_date` (`tran_date`) +) TYPE=InnoDB; -### Data of table `0_debtor_trans` ### +-- +-- Dumping data for table `0_debtor_trans` +-- +-- -------------------------------------------------------- -### Structure of table `0_debtor_trans_details` ### +-- +-- Table structure for table `0_debtor_trans_details` +-- DROP TABLE IF EXISTS `0_debtor_trans_details`; - -CREATE TABLE `0_debtor_trans_details` ( +CREATE TABLE IF NOT EXISTS `0_debtor_trans_details` ( `id` int(11) NOT NULL auto_increment, `debtor_trans_no` int(11) default NULL, `debtor_trans_type` int(11) default NULL, @@ -555,50 +680,25 @@ CREATE TABLE `0_debtor_trans_details` ( `discount_percent` double NOT NULL default '0', `standard_cost` double NOT NULL default '0', `qty_done` double NOT NULL default '0', - PRIMARY KEY (`id`) -) TYPE=InnoDB AUTO_INCREMENT=1 ; - - -### Data of table `0_debtor_trans_details` ### - - - -### Structure of table `0_debtors_master` ### - -DROP TABLE IF EXISTS `0_debtors_master`; - -CREATE TABLE `0_debtors_master` ( - `debtor_no` int(11) NOT NULL auto_increment, - `name` varchar(100) NOT NULL default '', - `debtor_ref` varchar(30) NOT NULL, - `address` tinytext, - `email` varchar(100) NOT NULL default '', - `tax_id` varchar(55) NOT NULL default '', - `curr_code` char(3) NOT NULL default '', - `sales_type` int(11) NOT NULL default '1', - `dimension_id` int(11) NOT NULL default '0', - `dimension2_id` int(11) NOT NULL default '0', - `credit_status` int(11) NOT NULL default '0', - `payment_terms` int(11) default NULL, - `discount` double NOT NULL default '0', - `pymt_discount` double NOT NULL default '0', - `credit_limit` float NOT NULL default '1000', - `notes` tinytext NOT NULL, - `inactive` tinyint(1) NOT NULL default '0', - PRIMARY KEY (`debtor_no`), - UNIQUE KEY `name` (`name`) -) TYPE=MyISAM AUTO_INCREMENT=1 ; - + `src_id` int(11) NOT NULL, + PRIMARY KEY (`id`), + KEY `Transaction` (`debtor_trans_type`,`debtor_trans_no`), + KEY (`src_id`) +) TYPE=InnoDB AUTO_INCREMENT=1 ; -### Data of table `0_debtors_master` ### +-- +-- Dumping data for table `0_debtor_trans_details` +-- +-- -------------------------------------------------------- -### Structure of table `0_dimensions` ### +-- +-- Table structure for table `0_dimensions` +-- DROP TABLE IF EXISTS `0_dimensions`; - -CREATE TABLE `0_dimensions` ( +CREATE TABLE IF NOT EXISTS `0_dimensions` ( `id` int(11) NOT NULL auto_increment, `reference` varchar(60) NOT NULL default '', `name` varchar(60) NOT NULL default '', @@ -607,19 +707,25 @@ CREATE TABLE `0_dimensions` ( `date_` date NOT NULL default '0000-00-00', `due_date` date NOT NULL default '0000-00-00', PRIMARY KEY (`id`), - UNIQUE KEY `reference` (`reference`) -) TYPE=InnoDB AUTO_INCREMENT=1 ; - + UNIQUE KEY `reference` (`reference`), + KEY `date_` (`date_`), + KEY `due_date` (`due_date`), + KEY `type_` (`type_`) +) TYPE=InnoDB AUTO_INCREMENT=1 ; -### Data of table `0_dimensions` ### +-- +-- Dumping data for table `0_dimensions` +-- +-- -------------------------------------------------------- -### Structure of table `0_exchange_rates` ### +-- +-- Table structure for table `0_exchange_rates` +-- DROP TABLE IF EXISTS `0_exchange_rates`; - -CREATE TABLE `0_exchange_rates` ( +CREATE TABLE IF NOT EXISTS `0_exchange_rates` ( `id` int(11) NOT NULL auto_increment, `curr_code` char(3) NOT NULL default '', `rate_buy` double NOT NULL default '0', @@ -627,43 +733,49 @@ CREATE TABLE `0_exchange_rates` ( `date_` date NOT NULL default '0000-00-00', PRIMARY KEY (`id`), UNIQUE KEY `curr_code` (`curr_code`,`date_`) -) TYPE=MyISAM AUTO_INCREMENT=1 ; - +) TYPE=MyISAM AUTO_INCREMENT=1 ; -### Data of table `0_exchange_rates` ### +-- +-- Dumping data for table `0_exchange_rates` +-- +-- -------------------------------------------------------- -### Structure of table `0_fiscal_year` ### +-- +-- Table structure for table `0_fiscal_year` +-- DROP TABLE IF EXISTS `0_fiscal_year`; - -CREATE TABLE `0_fiscal_year` ( +CREATE TABLE IF NOT EXISTS `0_fiscal_year` ( `id` int(11) NOT NULL auto_increment, `begin` date default '0000-00-00', `end` date default '0000-00-00', `closed` tinyint(1) NOT NULL default '0', - PRIMARY KEY (`id`) -) TYPE=InnoDB AUTO_INCREMENT=2 ; - - -### Data of table `0_fiscal_year` ### + PRIMARY KEY (`id`), + UNIQUE KEY `begin` (`begin`), + UNIQUE KEY `end` (`end`) +) TYPE=InnoDB AUTO_INCREMENT=4 ; -INSERT INTO `0_fiscal_year` VALUES ('1', '2008-01-01', '2008-12-31', '0'); -INSERT INTO `0_fiscal_year` VALUES ('2', '2009-01-01', '2009-12-31', '0'); -INSERT INTO `0_fiscal_year` VALUES ('3', '2010-01-01', '2010-12-31', '0'); +-- +-- Dumping data for table `0_fiscal_year` +-- +INSERT INTO `0_fiscal_year` VALUES(1, '2008-01-01', '2008-12-31', 0); +INSERT INTO `0_fiscal_year` VALUES(2, '2009-01-01', '2009-12-31', 0); +INSERT INTO `0_fiscal_year` VALUES(3, '2010-01-01', '2010-12-31', 0); -### Structure of table `0_gl_trans` ### +-- +-- Table structure for table `0_gl_trans` +-- DROP TABLE IF EXISTS `0_gl_trans`; - -CREATE TABLE `0_gl_trans` ( +CREATE TABLE IF NOT EXISTS `0_gl_trans` ( `counter` int(11) NOT NULL auto_increment, `type` smallint(6) NOT NULL default '0', `type_no` bigint(16) NOT NULL default '1', `tran_date` date NOT NULL default '0000-00-00', - `account` varchar(11) NOT NULL default '', + `account` varchar(15) NOT NULL default '', `memo_` tinytext NOT NULL, `amount` double NOT NULL default '0', `dimension_id` int(11) NOT NULL default '0', @@ -671,38 +783,50 @@ CREATE TABLE `0_gl_trans` ( `person_type_id` int(11) default NULL, `person_id` tinyblob, PRIMARY KEY (`counter`), - KEY `Type_and_Number` (`type`,`type_no`) -) TYPE=InnoDB AUTO_INCREMENT=1 ; - + KEY `Type_and_Number` (`type`,`type_no`), + KEY `dimension_id` (`dimension_id`), + KEY `dimension2_id` (`dimension2_id`), + KEY `tran_date` (`tran_date`), + KEY `account_and_tran_date` (`account`,`tran_date`) +) TYPE=InnoDB AUTO_INCREMENT=1 ; -### Data of table `0_gl_trans` ### +-- +-- Dumping data for table `0_gl_trans` +-- +-- -------------------------------------------------------- -### Structure of table `0_grn_batch` ### +-- +-- Table structure for table `0_grn_batch` +-- DROP TABLE IF EXISTS `0_grn_batch`; - -CREATE TABLE `0_grn_batch` ( +CREATE TABLE IF NOT EXISTS `0_grn_batch` ( `id` int(11) NOT NULL auto_increment, `supplier_id` int(11) NOT NULL default '0', `purch_order_no` int(11) default NULL, `reference` varchar(60) NOT NULL default '', `delivery_date` date NOT NULL default '0000-00-00', `loc_code` varchar(5) default NULL, - PRIMARY KEY (`id`) -) TYPE=InnoDB AUTO_INCREMENT=1 ; + PRIMARY KEY (`id`), + KEY `delivery_date` (`delivery_date`), + KEY `purch_order_no` (`purch_order_no`) +) TYPE=InnoDB AUTO_INCREMENT=1 ; - -### Data of table `0_grn_batch` ### +-- +-- Dumping data for table `0_grn_batch` +-- +-- -------------------------------------------------------- -### Structure of table `0_grn_items` ### +-- +-- Table structure for table `0_grn_items` +-- DROP TABLE IF EXISTS `0_grn_items`; - -CREATE TABLE `0_grn_items` ( +CREATE TABLE IF NOT EXISTS `0_grn_items` ( `id` int(11) NOT NULL auto_increment, `grn_batch_id` int(11) default NULL, `po_detail_item` int(11) NOT NULL default '0', @@ -710,39 +834,46 @@ CREATE TABLE `0_grn_items` ( `description` tinytext, `qty_recd` double NOT NULL default '0', `quantity_inv` double NOT NULL default '0', - PRIMARY KEY (`id`) -) TYPE=InnoDB AUTO_INCREMENT=1 ; - + PRIMARY KEY (`id`), + KEY `grn_batch_id` (`grn_batch_id`) +) TYPE=InnoDB AUTO_INCREMENT=1 ; -### Data of table `0_grn_items` ### +-- +-- Dumping data for table `0_grn_items` +-- +-- -------------------------------------------------------- -### Structure of table `0_groups` ### +-- +-- Table structure for table `0_groups` +-- DROP TABLE IF EXISTS `0_groups`; - -CREATE TABLE `0_groups` ( +CREATE TABLE IF NOT EXISTS `0_groups` ( `id` smallint(6) unsigned NOT NULL auto_increment, `description` varchar(60) NOT NULL default '', `inactive` tinyint(1) NOT NULL default '0', PRIMARY KEY (`id`), UNIQUE KEY `description` (`description`) -) TYPE=MyISAM AUTO_INCREMENT=4 ; - +) TYPE=MyISAM AUTO_INCREMENT=4 ; -### Data of table `0_groups` ### +-- +-- Dumping data for table `0_groups` +-- -INSERT INTO `0_groups` VALUES ('1', 'Small', '0'); -INSERT INTO `0_groups` VALUES ('2', 'Medium', '0'); -INSERT INTO `0_groups` VALUES ('3', 'Large', '0'); +INSERT INTO `0_groups` VALUES(1, 'Small', 0); +INSERT INTO `0_groups` VALUES(2, 'Medium', 0); +INSERT INTO `0_groups` VALUES(3, 'Large', 0); +-- -------------------------------------------------------- -### Structure of table `0_item_codes` ### +-- +-- Table structure for table `0_item_codes` +-- DROP TABLE IF EXISTS `0_item_codes`; - -CREATE TABLE `0_item_codes` ( +CREATE TABLE IF NOT EXISTS `0_item_codes` ( `id` int(11) unsigned NOT NULL auto_increment, `item_code` varchar(20) NOT NULL, `stock_id` varchar(20) NOT NULL, @@ -752,89 +883,85 @@ CREATE TABLE `0_item_codes` ( `is_foreign` tinyint(1) NOT NULL default '0', `inactive` tinyint(1) NOT NULL default '0', PRIMARY KEY (`id`), - UNIQUE KEY `stock_id` (`stock_id`,`item_code`) -) TYPE=MyISAM AUTO_INCREMENT=1 ; - - -### Data of table `0_item_codes` ### - - - -### Structure of table `0_item_tax_type_exemptions` ### - -DROP TABLE IF EXISTS `0_item_tax_type_exemptions`; - -CREATE TABLE `0_item_tax_type_exemptions` ( - `item_tax_type_id` int(11) NOT NULL default '0', - `tax_type_id` int(11) NOT NULL default '0', - PRIMARY KEY (`item_tax_type_id`,`tax_type_id`) -) TYPE=InnoDB ; + UNIQUE KEY `stock_id` (`stock_id`,`item_code`), + KEY `item_code` (`item_code`) +) TYPE=MyISAM AUTO_INCREMENT=1 ; - -### Data of table `0_item_tax_type_exemptions` ### +-- +-- Dumping data for table `0_item_codes` +-- +-- -------------------------------------------------------- -### Structure of table `0_item_tax_types` ### +-- +-- Table structure for table `0_item_tax_types` +-- DROP TABLE IF EXISTS `0_item_tax_types`; - -CREATE TABLE `0_item_tax_types` ( +CREATE TABLE IF NOT EXISTS `0_item_tax_types` ( `id` int(11) NOT NULL auto_increment, `name` varchar(60) NOT NULL default '', `exempt` tinyint(1) NOT NULL default '0', `inactive` tinyint(1) NOT NULL default '0', PRIMARY KEY (`id`), UNIQUE KEY `name` (`name`) -) TYPE=InnoDB AUTO_INCREMENT=2 ; +) TYPE=InnoDB AUTO_INCREMENT=2 ; +-- +-- Dumping data for table `0_item_tax_types` +-- -### Data of table `0_item_tax_types` ### +INSERT INTO `0_item_tax_types` VALUES(1, 'Regular', 0, 0); -INSERT INTO `0_item_tax_types` VALUES ('1', 'Regular', '0', '0'); +-- -------------------------------------------------------- +-- +-- Table structure for table `0_item_tax_type_exemptions` +-- -### Structure of table `0_item_units` ### +DROP TABLE IF EXISTS `0_item_tax_type_exemptions`; +CREATE TABLE IF NOT EXISTS `0_item_tax_type_exemptions` ( + `item_tax_type_id` int(11) NOT NULL default '0', + `tax_type_id` int(11) NOT NULL default '0', + PRIMARY KEY (`item_tax_type_id`,`tax_type_id`) +) TYPE=InnoDB; -DROP TABLE IF EXISTS `0_item_units`; +-- +-- Dumping data for table `0_item_tax_type_exemptions` +-- + + +-- -------------------------------------------------------- -CREATE TABLE `0_item_units` ( +-- +-- Table structure for table `0_item_units` +-- + +DROP TABLE IF EXISTS `0_item_units`; +CREATE TABLE IF NOT EXISTS `0_item_units` ( `abbr` varchar(20) NOT NULL, `name` varchar(40) NOT NULL, `decimals` tinyint(2) NOT NULL, `inactive` tinyint(1) NOT NULL default '0', PRIMARY KEY (`abbr`), UNIQUE KEY `name` (`name`) -) TYPE=MyISAM ; - - -### Data of table `0_item_units` ### - -INSERT INTO `0_item_units` VALUES ('ea.', 'Each', '0', '0'); - - -### Structure of table `0_loc_stock` ### - -DROP TABLE IF EXISTS `0_loc_stock`; - -CREATE TABLE `0_loc_stock` ( - `loc_code` char(5) NOT NULL default '', - `stock_id` char(20) NOT NULL default '', - `reorder_level` bigint(20) NOT NULL default '0', - PRIMARY KEY (`loc_code`,`stock_id`), - KEY `stock_id` (`stock_id`) -) TYPE=InnoDB ; - +) TYPE=MyISAM; -### Data of table `0_loc_stock` ### +-- +-- Dumping data for table `0_item_units` +-- +INSERT INTO `0_item_units` VALUES('ea.', 'Each', 0, 0); +-- -------------------------------------------------------- -### Structure of table `0_locations` ### +-- +-- Table structure for table `0_locations` +-- DROP TABLE IF EXISTS `0_locations`; - -CREATE TABLE `0_locations` ( +CREATE TABLE IF NOT EXISTS `0_locations` ( `loc_code` varchar(5) NOT NULL default '', `location_name` varchar(60) NOT NULL default '', `delivery_address` tinytext NOT NULL, @@ -845,37 +972,63 @@ CREATE TABLE `0_locations` ( `contact` varchar(30) NOT NULL default '', `inactive` tinyint(1) NOT NULL default '0', PRIMARY KEY (`loc_code`) -) TYPE=MyISAM ; +) TYPE=MyISAM; + +-- +-- Dumping data for table `0_locations` +-- +INSERT INTO `0_locations` VALUES('DEF', 'Default', 'N/A', '', '', '', '', '', 0); -### Data of table `0_locations` ### +-- -------------------------------------------------------- -INSERT INTO `0_locations` VALUES ('DEF', 'Default', 'N/A', '', '', '', '', '', '0'); +-- +-- Table structure for table `0_loc_stock` +-- + +DROP TABLE IF EXISTS `0_loc_stock`; +CREATE TABLE IF NOT EXISTS `0_loc_stock` ( + `loc_code` char(5) NOT NULL default '', + `stock_id` char(20) NOT NULL default '', + `reorder_level` bigint(20) NOT NULL default '0', + PRIMARY KEY (`loc_code`,`stock_id`), + KEY `stock_id` (`stock_id`) +) TYPE=InnoDB; + +-- +-- Dumping data for table `0_loc_stock` +-- -### Structure of table `0_movement_types` ### +-- -------------------------------------------------------- -DROP TABLE IF EXISTS `0_movement_types`; +-- +-- Table structure for table `0_movement_types` +-- -CREATE TABLE `0_movement_types` ( +DROP TABLE IF EXISTS `0_movement_types`; +CREATE TABLE IF NOT EXISTS `0_movement_types` ( `id` int(11) NOT NULL auto_increment, `name` varchar(60) NOT NULL default '', `inactive` tinyint(1) NOT NULL default '0', PRIMARY KEY (`id`), UNIQUE KEY `name` (`name`) -) TYPE=MyISAM AUTO_INCREMENT=2 ; - +) TYPE=MyISAM AUTO_INCREMENT=2 ; -### Data of table `0_movement_types` ### +-- +-- Dumping data for table `0_movement_types` +-- -INSERT INTO `0_movement_types` VALUES ('1', 'Adjustment', '0'); +INSERT INTO `0_movement_types` VALUES(1, 'Adjustment', 0); +-- -------------------------------------------------------- -### Structure of table `0_payment_terms` ### +-- +-- Table structure for table `0_payment_terms` +-- DROP TABLE IF EXISTS `0_payment_terms`; - -CREATE TABLE `0_payment_terms` ( +CREATE TABLE IF NOT EXISTS `0_payment_terms` ( `terms_indicator` int(11) NOT NULL auto_increment, `terms` char(80) NOT NULL default '', `days_before_due` smallint(6) NOT NULL default '0', @@ -883,22 +1036,25 @@ CREATE TABLE `0_payment_terms` ( `inactive` tinyint(1) NOT NULL default '0', PRIMARY KEY (`terms_indicator`), UNIQUE KEY `terms` (`terms`) -) TYPE=MyISAM AUTO_INCREMENT=5 ; - +) TYPE=MyISAM AUTO_INCREMENT=5 ; -### Data of table `0_payment_terms` ### +-- +-- Dumping data for table `0_payment_terms` +-- -INSERT INTO `0_payment_terms` VALUES ('1', 'Due 15th Of the Following Month', '0', '17', '0'); -INSERT INTO `0_payment_terms` VALUES ('2', 'Due By End Of The Following Month', '0', '30', '0'); -INSERT INTO `0_payment_terms` VALUES ('3', 'Payment due within 10 days', '10', '0', '0'); -INSERT INTO `0_payment_terms` VALUES ('4', 'Cash Only', '1', '0', '0'); +INSERT INTO `0_payment_terms` VALUES(1, 'Due 15th Of the Following Month', 0, 17, 0); +INSERT INTO `0_payment_terms` VALUES(2, 'Due By End Of The Following Month', 0, 30, 0); +INSERT INTO `0_payment_terms` VALUES(3, 'Payment due within 10 days', 10, 0, 0); +INSERT INTO `0_payment_terms` VALUES(4, 'Cash Only', 0, 0, 0); +-- -------------------------------------------------------- -### Structure of table `0_prices` ### +-- +-- Table structure for table `0_prices` +-- DROP TABLE IF EXISTS `0_prices`; - -CREATE TABLE `0_prices` ( +CREATE TABLE IF NOT EXISTS `0_prices` ( `id` int(11) NOT NULL auto_increment, `stock_id` varchar(20) NOT NULL default '', `sales_type_id` int(11) NOT NULL default '0', @@ -906,45 +1062,21 @@ CREATE TABLE `0_prices` ( `price` double NOT NULL default '0', PRIMARY KEY (`id`), UNIQUE KEY `price` (`stock_id`,`sales_type_id`,`curr_abrev`) -) TYPE=MyISAM AUTO_INCREMENT=1 ; - - -### Data of table `0_prices` ### - +) TYPE=MyISAM AUTO_INCREMENT=1 ; +-- +-- Dumping data for table `0_prices` +-- -### Structure of table `0_print_profiles` ### - -DROP TABLE IF EXISTS `0_print_profiles`; - -CREATE TABLE `0_print_profiles` ( - `id` smallint(6) unsigned NOT NULL auto_increment, - `profile` varchar(30) NOT NULL, - `report` varchar(5) default NULL, - `printer` tinyint(3) unsigned default NULL, - PRIMARY KEY (`id`), - UNIQUE KEY `profile` (`profile`,`report`) -) TYPE=MyISAM AUTO_INCREMENT=10 ; - - -### Data of table `0_print_profiles` ### - -INSERT INTO `0_print_profiles` VALUES ('1', 'Out of office', '', '0'); -INSERT INTO `0_print_profiles` VALUES ('2', 'Sales Department', '', '0'); -INSERT INTO `0_print_profiles` VALUES ('3', 'Central', '', '2'); -INSERT INTO `0_print_profiles` VALUES ('4', 'Sales Department', '104', '2'); -INSERT INTO `0_print_profiles` VALUES ('5', 'Sales Department', '105', '2'); -INSERT INTO `0_print_profiles` VALUES ('6', 'Sales Department', '107', '2'); -INSERT INTO `0_print_profiles` VALUES ('7', 'Sales Department', '109', '2'); -INSERT INTO `0_print_profiles` VALUES ('8', 'Sales Department', '110', '2'); -INSERT INTO `0_print_profiles` VALUES ('9', 'Sales Department', '201', '2'); +-- -------------------------------------------------------- -### Structure of table `0_printers` ### +-- +-- Table structure for table `0_printers` +-- DROP TABLE IF EXISTS `0_printers`; - -CREATE TABLE `0_printers` ( +CREATE TABLE IF NOT EXISTS `0_printers` ( `id` tinyint(3) unsigned NOT NULL auto_increment, `name` varchar(20) NOT NULL, `description` varchar(60) NOT NULL, @@ -954,21 +1086,54 @@ CREATE TABLE `0_printers` ( `timeout` tinyint(3) unsigned NOT NULL, PRIMARY KEY (`id`), UNIQUE KEY `name` (`name`) -) TYPE=MyISAM AUTO_INCREMENT=4 ; +) TYPE=MyISAM AUTO_INCREMENT=4 ; + +-- +-- Dumping data for table `0_printers` +-- +INSERT INTO `0_printers` VALUES(1, 'QL500', 'Label printer', 'QL500', 'server', 127, 20); +INSERT INTO `0_printers` VALUES(2, 'Samsung', 'Main network printer', 'scx4521F', 'server', 515, 5); +INSERT INTO `0_printers` VALUES(3, 'Local', 'Local print server at user IP', 'lp', '', 515, 10); -### Data of table `0_printers` ### +-- -------------------------------------------------------- -INSERT INTO `0_printers` VALUES ('1', 'QL500', 'Label printer', 'QL500', 'server', '127', '20'); -INSERT INTO `0_printers` VALUES ('2', 'Samsung', 'Main network printer', 'scx4521F', 'server', '515', '5'); -INSERT INTO `0_printers` VALUES ('3', 'Local', 'Local print server at user IP', 'lp', '', '515', '10'); +-- +-- Table structure for table `0_print_profiles` +-- +DROP TABLE IF EXISTS `0_print_profiles`; +CREATE TABLE IF NOT EXISTS `0_print_profiles` ( + `id` smallint(6) unsigned NOT NULL auto_increment, + `profile` varchar(30) NOT NULL, + `report` varchar(5) default NULL, + `printer` tinyint(3) unsigned default NULL, + PRIMARY KEY (`id`), + UNIQUE KEY `profile` (`profile`,`report`) +) TYPE=MyISAM AUTO_INCREMENT=10 ; -### Structure of table `0_purch_data` ### +-- +-- Dumping data for table `0_print_profiles` +-- -DROP TABLE IF EXISTS `0_purch_data`; +INSERT INTO `0_print_profiles` VALUES(1, 'Out of office', '', 0); +INSERT INTO `0_print_profiles` VALUES(2, 'Sales Department', '', 0); +INSERT INTO `0_print_profiles` VALUES(3, 'Central', '', 2); +INSERT INTO `0_print_profiles` VALUES(4, 'Sales Department', '104', 2); +INSERT INTO `0_print_profiles` VALUES(5, 'Sales Department', '105', 2); +INSERT INTO `0_print_profiles` VALUES(6, 'Sales Department', '107', 2); +INSERT INTO `0_print_profiles` VALUES(7, 'Sales Department', '109', 2); +INSERT INTO `0_print_profiles` VALUES(8, 'Sales Department', '110', 2); +INSERT INTO `0_print_profiles` VALUES(9, 'Sales Department', '201', 2); -CREATE TABLE `0_purch_data` ( +-- -------------------------------------------------------- + +-- +-- Table structure for table `0_purch_data` +-- + +DROP TABLE IF EXISTS `0_purch_data`; +CREATE TABLE IF NOT EXISTS `0_purch_data` ( `supplier_id` int(11) NOT NULL default '0', `stock_id` char(20) NOT NULL default '', `price` double NOT NULL default '0', @@ -976,18 +1141,48 @@ CREATE TABLE `0_purch_data` ( `conversion_factor` double NOT NULL default '1', `supplier_description` char(50) NOT NULL default '', PRIMARY KEY (`supplier_id`,`stock_id`) -) TYPE=MyISAM ; +) TYPE=MyISAM; + +-- +-- Dumping data for table `0_purch_data` +-- + + +-- -------------------------------------------------------- + +-- +-- Table structure for table `0_purch_orders` +-- +DROP TABLE IF EXISTS `0_purch_orders`; +CREATE TABLE IF NOT EXISTS `0_purch_orders` ( + `order_no` int(11) NOT NULL auto_increment, + `supplier_id` int(11) NOT NULL default '0', + `comments` tinytext, + `ord_date` date NOT NULL default '0000-00-00', + `reference` tinytext NOT NULL, + `requisition_no` tinytext, + `into_stock_location` varchar(5) NOT NULL default '', + `delivery_address` tinytext NOT NULL, + `total` double NOT NULL default '0', + `tax_included` tinyint(1) NOT NULL default '0', + PRIMARY KEY (`order_no`), + KEY `ord_date` (`ord_date`) +) TYPE=InnoDB AUTO_INCREMENT=1 ; -### Data of table `0_purch_data` ### +-- +-- Dumping data for table `0_purch_orders` +-- +-- -------------------------------------------------------- -### Structure of table `0_purch_order_details` ### +-- +-- Table structure for table `0_purch_order_details` +-- DROP TABLE IF EXISTS `0_purch_order_details`; - -CREATE TABLE `0_purch_order_details` ( +CREATE TABLE IF NOT EXISTS `0_purch_order_details` ( `po_detail_item` int(11) NOT NULL auto_increment, `order_no` int(11) NOT NULL default '0', `item_code` varchar(20) NOT NULL default '', @@ -999,89 +1194,79 @@ CREATE TABLE `0_purch_order_details` ( `std_cost_unit` double NOT NULL default '0', `quantity_ordered` double NOT NULL default '0', `quantity_received` double NOT NULL default '0', - PRIMARY KEY (`po_detail_item`) -) TYPE=InnoDB AUTO_INCREMENT=1 ; - - -### Data of table `0_purch_order_details` ### - - - -### Structure of table `0_purch_orders` ### - -DROP TABLE IF EXISTS `0_purch_orders`; - -CREATE TABLE `0_purch_orders` ( - `order_no` int(11) NOT NULL auto_increment, - `supplier_id` int(11) NOT NULL default '0', - `comments` tinytext, - `ord_date` date NOT NULL default '0000-00-00', - `reference` tinytext NOT NULL, - `requisition_no` tinytext, - `into_stock_location` varchar(5) NOT NULL default '', - `delivery_address` tinytext NOT NULL, - PRIMARY KEY (`order_no`) -) TYPE=InnoDB AUTO_INCREMENT=1 ; - + PRIMARY KEY (`po_detail_item`), + KEY `order` (`order_no`,`po_detail_item`) +) TYPE=InnoDB AUTO_INCREMENT=1 ; -### Data of table `0_purch_orders` ### +-- +-- Dumping data for table `0_purch_order_details` +-- +-- -------------------------------------------------------- -### Structure of table `0_quick_entries` ### +-- +-- Table structure for table `0_quick_entries` +-- DROP TABLE IF EXISTS `0_quick_entries`; - -CREATE TABLE `0_quick_entries` ( +CREATE TABLE IF NOT EXISTS `0_quick_entries` ( `id` smallint(6) unsigned NOT NULL auto_increment, `type` tinyint(1) NOT NULL default '0', `description` varchar(60) NOT NULL, `base_amount` double NOT NULL default '0', `base_desc` varchar(60) default NULL, + `bal_type` tinyint(1) NOT NULL default '0', PRIMARY KEY (`id`), KEY `description` (`description`) -) TYPE=MyISAM AUTO_INCREMENT=4 ; +) TYPE=MyISAM AUTO_INCREMENT=4 ; +-- +-- Dumping data for table `0_quick_entries` +-- -### Data of table `0_quick_entries` ### - -INSERT INTO `0_quick_entries` VALUES ('1', '1', 'Maintenance', '0', 'Amount'); -INSERT INTO `0_quick_entries` VALUES ('2', '4', 'Phone', '0', 'Amount'); -INSERT INTO `0_quick_entries` VALUES ('3', '2', 'Cash Sales', '0', 'Amount'); +INSERT INTO `0_quick_entries` VALUES(1, 1, 'Maintenance', 0, 'Amount', 0); +INSERT INTO `0_quick_entries` VALUES(2, 4, 'Phone', 0, 'Amount', 0); +INSERT INTO `0_quick_entries` VALUES(3, 2, 'Cash Sales', 0, 'Amount', 0); +-- -------------------------------------------------------- -### Structure of table `0_quick_entry_lines` ### +-- +-- Table structure for table `0_quick_entry_lines` +-- DROP TABLE IF EXISTS `0_quick_entry_lines`; - -CREATE TABLE `0_quick_entry_lines` ( +CREATE TABLE IF NOT EXISTS `0_quick_entry_lines` ( `id` smallint(6) unsigned NOT NULL auto_increment, `qid` smallint(6) unsigned NOT NULL, `amount` double default '0', `action` varchar(2) NOT NULL, - `dest_id` varchar(11) NOT NULL, + `dest_id` varchar(15) NOT NULL default '', `dimension_id` smallint(6) unsigned default NULL, `dimension2_id` smallint(6) unsigned default NULL, PRIMARY KEY (`id`), KEY `qid` (`qid`) -) TYPE=MyISAM AUTO_INCREMENT=7 ; +) TYPE=MyISAM AUTO_INCREMENT=7 ; +-- +-- Dumping data for table `0_quick_entry_lines` +-- -### Data of table `0_quick_entry_lines` ### - -INSERT INTO `0_quick_entry_lines` VALUES ('1', '1', '0', 't-', '1', '0', '0'); -INSERT INTO `0_quick_entry_lines` VALUES ('2', '2', '0', 't-', '1', '0', '0'); -INSERT INTO `0_quick_entry_lines` VALUES ('3', '3', '0', 't-', '1', '0', '0'); -INSERT INTO `0_quick_entry_lines` VALUES ('4', '3', '0', '=', '4010', '0', '0'); -INSERT INTO `0_quick_entry_lines` VALUES ('5', '1', '0', '=', '5765', '0', '0'); -INSERT INTO `0_quick_entry_lines` VALUES ('6', '2', '0', '=', '5780', '0', '0'); +INSERT INTO `0_quick_entry_lines` VALUES(1, 1, 0, 't-', '1', 0, 0); +INSERT INTO `0_quick_entry_lines` VALUES(2, 2, 0, 't-', '1', 0, 0); +INSERT INTO `0_quick_entry_lines` VALUES(3, 3, 0, 't-', '1', 0, 0); +INSERT INTO `0_quick_entry_lines` VALUES(4, 3, 0, '=', '4010', 0, 0); +INSERT INTO `0_quick_entry_lines` VALUES(5, 1, 0, '=', '5765', 0, 0); +INSERT INTO `0_quick_entry_lines` VALUES(6, 2, 0, '=', '5780', 0, 0); +-- -------------------------------------------------------- -### Structure of table `0_recurrent_invoices` ### +-- +-- Table structure for table `0_recurrent_invoices` +-- DROP TABLE IF EXISTS `0_recurrent_invoices`; - -CREATE TABLE `0_recurrent_invoices` ( +CREATE TABLE IF NOT EXISTS `0_recurrent_invoices` ( `id` smallint(6) unsigned NOT NULL auto_increment, `description` varchar(60) NOT NULL default '', `order_no` int(11) unsigned NOT NULL, @@ -1094,56 +1279,68 @@ CREATE TABLE `0_recurrent_invoices` ( `last_sent` date NOT NULL default '0000-00-00', PRIMARY KEY (`id`), UNIQUE KEY `description` (`description`) -) TYPE=InnoDB AUTO_INCREMENT=1 ; - +) TYPE=InnoDB AUTO_INCREMENT=1 ; -### Data of table `0_recurrent_invoices` ### +-- +-- Dumping data for table `0_recurrent_invoices` +-- +-- -------------------------------------------------------- -### Structure of table `0_refs` ### +-- +-- Table structure for table `0_refs` +-- DROP TABLE IF EXISTS `0_refs`; - -CREATE TABLE `0_refs` ( +CREATE TABLE IF NOT EXISTS `0_refs` ( `id` int(11) NOT NULL default '0', `type` int(11) NOT NULL default '0', `reference` varchar(100) NOT NULL default '', - PRIMARY KEY (`id`,`type`) -) TYPE=InnoDB ; - - -### Data of table `0_refs` ### - + PRIMARY KEY (`id`,`type`), + KEY `Type_and_Reference` (`type`,`reference`) +) TYPE=InnoDB; +-- +-- Dumping data for table `0_refs` +-- -### Structure of table `0_sales_order_details` ### -DROP TABLE IF EXISTS `0_sales_order_details`; +-- -------------------------------------------------------- -CREATE TABLE `0_sales_order_details` ( - `id` int(11) NOT NULL auto_increment, - `order_no` int(11) NOT NULL default '0', - `trans_type` smallint(6) NOT NULL default '30', - `stk_code` varchar(20) NOT NULL default '', - `description` tinytext, - `qty_sent` double NOT NULL default '0', - `unit_price` double NOT NULL default '0', - `quantity` double NOT NULL default '0', - `discount_percent` double NOT NULL default '0', - PRIMARY KEY (`id`) -) TYPE=InnoDB AUTO_INCREMENT=1 ; +-- +-- Table structure for table `0_salesman` +-- +DROP TABLE IF EXISTS `0_salesman`; +CREATE TABLE IF NOT EXISTS `0_salesman` ( + `salesman_code` int(11) NOT NULL auto_increment, + `salesman_name` char(60) NOT NULL default '', + `salesman_phone` char(30) NOT NULL default '', + `salesman_fax` char(30) NOT NULL default '', + `salesman_email` varchar(100) NOT NULL default '', + `provision` double NOT NULL default '0', + `break_pt` double NOT NULL default '0', + `provision2` double NOT NULL default '0', + `inactive` tinyint(1) NOT NULL default '0', + PRIMARY KEY (`salesman_code`), + UNIQUE KEY `salesman_name` (`salesman_name`) +) TYPE=MyISAM AUTO_INCREMENT=2 ; -### Data of table `0_sales_order_details` ### +-- +-- Dumping data for table `0_salesman` +-- +INSERT INTO `0_salesman` VALUES(1, 'Sales Person', '', '', '', 5, 1000, 4, 0); +-- -------------------------------------------------------- -### Structure of table `0_sales_orders` ### +-- +-- Table structure for table `0_sales_orders` +-- DROP TABLE IF EXISTS `0_sales_orders`; - -CREATE TABLE `0_sales_orders` ( +CREATE TABLE IF NOT EXISTS `0_sales_orders` ( `order_no` int(11) NOT NULL, `trans_type` smallint(6) NOT NULL default '30', `version` tinyint(1) unsigned NOT NULL default '0', @@ -1163,19 +1360,50 @@ CREATE TABLE `0_sales_orders` ( `freight_cost` double NOT NULL default '0', `from_stk_loc` varchar(5) NOT NULL default '', `delivery_date` date NOT NULL default '0000-00-00', - PRIMARY KEY (`trans_type`, `order_no`) + `payment_terms` int(11) default NULL, + `total` double NOT NULL default '0', + PRIMARY KEY (`trans_type`,`order_no`) ) TYPE=InnoDB; +-- +-- Dumping data for table `0_sales_orders` +-- -### Data of table `0_sales_orders` ### +-- -------------------------------------------------------- +-- +-- Table structure for table `0_sales_order_details` +-- -### Structure of table `0_sales_pos` ### +DROP TABLE IF EXISTS `0_sales_order_details`; +CREATE TABLE IF NOT EXISTS `0_sales_order_details` ( + `id` int(11) NOT NULL auto_increment, + `order_no` int(11) NOT NULL default '0', + `trans_type` smallint(6) NOT NULL default '30', + `stk_code` varchar(20) NOT NULL default '', + `description` tinytext, + `qty_sent` double NOT NULL default '0', + `unit_price` double NOT NULL default '0', + `quantity` double NOT NULL default '0', + `discount_percent` double NOT NULL default '0', + PRIMARY KEY (`id`), + KEY `sorder` (`trans_type`,`order_no`) +) TYPE=InnoDB AUTO_INCREMENT=1 ; -DROP TABLE IF EXISTS `0_sales_pos`; +-- +-- Dumping data for table `0_sales_order_details` +-- + + +-- -------------------------------------------------------- + +-- +-- Table structure for table `0_sales_pos` +-- -CREATE TABLE `0_sales_pos` ( +DROP TABLE IF EXISTS `0_sales_pos`; +CREATE TABLE IF NOT EXISTS `0_sales_pos` ( `id` smallint(6) unsigned NOT NULL auto_increment, `pos_name` varchar(30) NOT NULL, `cash_sale` tinyint(1) NOT NULL, @@ -1185,19 +1413,22 @@ CREATE TABLE `0_sales_pos` ( `inactive` tinyint(1) NOT NULL default '0', PRIMARY KEY (`id`), UNIQUE KEY `pos_name` (`pos_name`) -) TYPE=MyISAM AUTO_INCREMENT=2 ; - +) TYPE=MyISAM AUTO_INCREMENT=2 ; -### Data of table `0_sales_pos` ### +-- +-- Dumping data for table `0_sales_pos` +-- -INSERT INTO `0_sales_pos` VALUES ('1', 'Default', '1', '1', 'DEF', '2', '0'); +INSERT INTO `0_sales_pos` VALUES(1, 'Default', 1, 1, 'DEF', 2, 0); +-- -------------------------------------------------------- -### Structure of table `0_sales_types` ### +-- +-- Table structure for table `0_sales_types` +-- DROP TABLE IF EXISTS `0_sales_types`; - -CREATE TABLE `0_sales_types` ( +CREATE TABLE IF NOT EXISTS `0_sales_types` ( `id` int(11) NOT NULL auto_increment, `sales_type` char(50) NOT NULL default '', `tax_included` int(1) NOT NULL default '0', @@ -1205,39 +1436,20 @@ CREATE TABLE `0_sales_types` ( `inactive` tinyint(1) NOT NULL default '0', PRIMARY KEY (`id`), UNIQUE KEY `sales_type` (`sales_type`) -) TYPE=MyISAM AUTO_INCREMENT=3 ; - - -### Data of table `0_sales_types` ### - -INSERT INTO `0_sales_types` VALUES ('1', 'Retail', '1', '1', '0'); -INSERT INTO `0_sales_types` VALUES ('2', 'Wholesale', '0', '0.7', '0'); - - -### Structure of table `0_salesman` ### - -DROP TABLE IF EXISTS `0_salesman`; - -CREATE TABLE `0_salesman` ( - `salesman_code` int(11) NOT NULL auto_increment, - `salesman_name` char(60) NOT NULL default '', - `salesman_phone` char(30) NOT NULL default '', - `salesman_fax` char(30) NOT NULL default '', - `salesman_email` varchar(100) NOT NULL default '', - `provision` double NOT NULL default '0', - `break_pt` double NOT NULL default '0', - `provision2` double NOT NULL default '0', - `inactive` tinyint(1) NOT NULL default '0', - PRIMARY KEY (`salesman_code`), - UNIQUE KEY `salesman_name` (`salesman_name`) -) TYPE=MyISAM AUTO_INCREMENT=2 ; +) TYPE=MyISAM AUTO_INCREMENT=3 ; +-- +-- Dumping data for table `0_sales_types` +-- -### Data of table `0_salesman` ### +INSERT INTO `0_sales_types` VALUES(1, 'Retail', 1, 1, 0); +INSERT INTO `0_sales_types` VALUES(2, 'Wholesale', 0, 0.7, 0); -INSERT INTO `0_salesman` VALUES ('1', 'Sales Person', '', '', '', '5', '1000', '4', '0'); +-- -------------------------------------------------------- -### Structure of table `0_security_roles` ### +-- +-- Table structure for table `0_security_roles` +-- DROP TABLE IF EXISTS `0_security_roles`; CREATE TABLE IF NOT EXISTS `0_security_roles` ( @@ -1252,25 +1464,28 @@ CREATE TABLE IF NOT EXISTS `0_security_roles` ( ) TYPE=MyISAM AUTO_INCREMENT=11 ; -- --- Data of table `0_security_roles` +-- Dumping data for table `0_security_roles` -- -INSERT INTO `0_security_roles` VALUES (1, 'Inquiries', 'Inquiries', '768;2816;3072;3328;5632;5888;8192;8448;10752;11008;13312;15872;16128', '257;258;259;260;513;514;515;516;517;518;519;520;521;522;523;524;525;773;774;2822;3073;3075;3076;3077;3329;3330;3331;3332;3333;3334;3335;5377;5633;5640;5889;5890;5891;7937;7938;7939;7940;8193;8194;8450;8451;10497;10753;11009;11010;11012;13313;13315;15617;15618;15619;15620;15621;15622;15623;15624;15625;15626;15873;15882;16129;16130;16131;16132', 0); -INSERT INTO `0_security_roles` VALUES (2, 'System Administrator', 'System Administrator', '256;512;768;2816;3072;3328;5376;5632;5888;7936;8192;8448;10496;10752;11008;13056;13312;15616;15872;16128', '257;258;259;260;513;514;515;516;517;518;519;520;521;522;523;524;525;769;770;771;772;773;774;2817;2818;2819;2820;2821;2822;2823;3073;3074;3082;3075;3076;3077;3078;3079;3080;3081;3329;3330;3331;3332;3333;3334;3335;5377;5633;5634;5635;5636;5637;5641;5638;5639;5640;5889;5890;5891;7937;7938;7939;7940;8193;8194;8195;8196;8197;8449;8450;8451;10497;10753;10754;10755;10756;10757;11009;11010;11011;11012;13057;13313;13314;13315;15617;15618;15619;15620;15621;15622;15623;15624;15628;15625;15626;15627;15873;15874;15875;15876;15877;15878;15879;15880;15883;15881;15882;16129;16130;16131;16132', 0); -INSERT INTO `0_security_roles` VALUES (3, 'Salesman', 'Salesman', '768;3072;5632;8192;15872', '773;774;3073;3075;3081;5633;8194;15873', 0); -INSERT INTO `0_security_roles` VALUES (4, 'Stock Manager', 'Stock Manager', '2816;3072;3328;5632;5888;8192;8448;10752;11008;13312;15872;16128', '2818;2822;3073;3076;3077;3329;3330;3330;3330;3331;3331;3332;3333;3334;3335;5633;5640;5889;5890;5891;8193;8194;8450;8451;10753;11009;11010;11012;13313;13315;15882;16129;16130;16131;16132', 0); -INSERT INTO `0_security_roles` VALUES (5, 'Production Manager', 'Production Manager', '512;2816;3072;3328;5632;5888;8192;8448;10752;11008;13312;15616;15872;16128', '521;523;524;2818;2819;2820;2821;2822;2823;3073;3074;3076;3077;3078;3079;3080;3081;3329;3330;3330;3330;3331;3331;3332;3333;3334;3335;5633;5640;5640;5889;5890;5891;8193;8194;8196;8197;8450;8451;10753;10755;11009;11010;11012;13313;13315;15617;15619;15620;15621;15624;15624;15876;15877;15880;15882;16129;16130;16131;16132', 0); -INSERT INTO `0_security_roles` VALUES (6, 'Purchase Officer', 'Purchase Officer', '512;2816;3072;3328;5376;5632;5888;8192;8448;10752;11008;13312;15616;15872;16128', '521;523;524;2818;2819;2820;2821;2822;2823;3073;3074;3076;3077;3078;3079;3080;3081;3329;3330;3330;3330;3331;3331;3332;3333;3334;3335;5377;5633;5635;5640;5640;5889;5890;5891;8193;8194;8196;8197;8449;8450;8451;10753;10755;11009;11010;11012;13313;13315;15617;15619;15620;15621;15624;15624;15876;15877;15880;15882;16129;16130;16131;16132', 0); -INSERT INTO `0_security_roles` VALUES (7, 'AR Officer', 'AR Officer', '512;768;2816;3072;3328;5632;5888;8192;8448;10752;11008;13312;15616;15872;16128', '521;523;524;771;773;774;2818;2819;2820;2821;2822;2823;3073;3073;3074;3075;3076;3077;3078;3079;3080;3081;3081;3329;3330;3330;3330;3331;3331;3332;3333;3334;3335;5633;5633;5634;5637;5638;5639;5640;5640;5889;5890;5891;8193;8194;8194;8196;8197;8450;8451;10753;10755;11009;11010;11012;13313;13315;15617;15619;15620;15621;15624;15624;15873;15876;15877;15878;15880;15882;16129;16130;16131;16132', 0); -INSERT INTO `0_security_roles` VALUES (8, 'AP Officer', 'AP Officer', '512;2816;3072;3328;5376;5632;5888;8192;8448;10752;11008;13312;15616;15872;16128', '257;258;259;260;521;523;524;769;770;771;772;773;774;2818;2819;2820;2821;2822;2823;3073;3074;3082;3076;3077;3078;3079;3080;3081;3329;3330;3331;3332;3333;3334;3335;5377;5633;5635;5640;5889;5890;5891;7937;7938;7939;7940;8193;8194;8196;8197;8449;8450;8451;10497;10753;10755;11009;11010;11012;13057;13313;13315;15617;15619;15620;15621;15624;15876;15877;15880;15882;16129;16130;16131;16132', 0); -INSERT INTO `0_security_roles` VALUES (9, 'Accountant', 'New Accountant', '512;768;2816;3072;3328;5376;5632;5888;8192;8448;10752;11008;13312;15616;15872;16128', '257;258;259;260;521;523;524;771;772;773;774;2818;2819;2820;2821;2822;2823;3073;3074;3075;3076;3077;3078;3079;3080;3081;3329;3330;3331;3332;3333;3334;3335;5377;5633;5634;5635;5637;5638;5639;5640;5889;5890;5891;7937;7938;7939;7940;8193;8194;8196;8197;8449;8450;8451;10497;10753;10755;11009;11010;11012;13313;13315;15617;15618;15619;15620;15621;15624;15873;15876;15877;15878;15880;15882;16129;16130;16131;16132', 0); -INSERT INTO `0_security_roles` VALUES (10, 'Sub Admin', 'Sub Admin', '512;768;2816;3072;3328;5376;5632;5888;8192;8448;10752;11008;13312;15616;15872;16128', '257;258;259;260;521;523;524;771;772;773;774;2818;2819;2820;2821;2822;2823;3073;3074;3082;3075;3076;3077;3078;3079;3080;3081;3329;3330;3331;3332;3333;3334;3335;5377;5633;5634;5635;5637;5638;5639;5640;5889;5890;5891;7937;7938;7939;7940;8193;8194;8196;8197;8449;8450;8451;10497;10753;10755;11009;11010;11012;13057;13313;13315;15617;15619;15620;15621;15624;15873;15874;15876;15877;15878;15879;15880;15882;16129;16130;16131;16132', 0); +INSERT INTO `0_security_roles` VALUES(1, 'Inquiries', 'Inquiries', '768;2816;3072;3328;5632;5888;8192;8448;10752;11008;13312;15872;16128', '257;258;259;260;513;514;515;516;517;518;519;520;521;522;523;524;525;773;774;2822;3073;3075;3076;3077;3329;3330;3331;3332;3333;3334;3335;5377;5633;5640;5889;5890;5891;7937;7938;7939;7940;8193;8194;8450;8451;10497;10753;11009;11010;11012;13313;13315;15617;15618;15619;15620;15621;15622;15623;15624;15625;15626;15873;15882;16129;16130;16131;16132', 0); +INSERT INTO `0_security_roles` VALUES(2, 'System Administrator', 'System Administrator', '256;512;768;2816;3072;3328;5376;5632;5888;7936;8192;8448;10496;10752;11008;13056;13312;15616;15872;16128', '257;258;259;260;513;514;515;516;517;518;519;520;521;522;523;524;525;526;769;770;771;772;773;774;2817;2818;2819;2820;2821;2822;2823;3073;3074;3082;3075;3076;3077;3078;3079;3080;3081;3329;3330;3331;3332;3333;3334;3335;5377;5633;5634;5635;5636;5637;5641;5638;5639;5640;5889;5890;5891;7937;7938;7939;7940;8193;8194;8195;8196;8197;8449;8450;8451;10497;10753;10754;10755;10756;10757;11009;11010;11011;11012;13057;13313;13314;13315;15617;15618;15619;15620;15621;15622;15623;15624;15628;15625;15626;15627;15873;15874;15875;15876;15877;15878;15879;15880;15883;15881;15882;16129;16130;16131;16132', 0); +INSERT INTO `0_security_roles` VALUES(3, 'Salesman', 'Salesman', '768;3072;5632;8192;15872', '773;774;3073;3075;3081;5633;8194;15873', 0); +INSERT INTO `0_security_roles` VALUES(4, 'Stock Manager', 'Stock Manager', '2816;3072;3328;5632;5888;8192;8448;10752;11008;13312;15872;16128', '2818;2822;3073;3076;3077;3329;3330;3330;3330;3331;3331;3332;3333;3334;3335;5633;5640;5889;5890;5891;8193;8194;8450;8451;10753;11009;11010;11012;13313;13315;15882;16129;16130;16131;16132', 0); +INSERT INTO `0_security_roles` VALUES(5, 'Production Manager', 'Production Manager', '512;2816;3072;3328;5632;5888;8192;8448;10752;11008;13312;15616;15872;16128', '521;523;524;2818;2819;2820;2821;2822;2823;3073;3074;3076;3077;3078;3079;3080;3081;3329;3330;3330;3330;3331;3331;3332;3333;3334;3335;5633;5640;5640;5889;5890;5891;8193;8194;8196;8197;8450;8451;10753;10755;11009;11010;11012;13313;13315;15617;15619;15620;15621;15624;15624;15876;15877;15880;15882;16129;16130;16131;16132', 0); +INSERT INTO `0_security_roles` VALUES(6, 'Purchase Officer', 'Purchase Officer', '512;2816;3072;3328;5376;5632;5888;8192;8448;10752;11008;13312;15616;15872;16128', '521;523;524;2818;2819;2820;2821;2822;2823;3073;3074;3076;3077;3078;3079;3080;3081;3329;3330;3330;3330;3331;3331;3332;3333;3334;3335;5377;5633;5635;5640;5640;5889;5890;5891;8193;8194;8196;8197;8449;8450;8451;10753;10755;11009;11010;11012;13313;13315;15617;15619;15620;15621;15624;15624;15876;15877;15880;15882;16129;16130;16131;16132', 0); +INSERT INTO `0_security_roles` VALUES(7, 'AR Officer', 'AR Officer', '512;768;2816;3072;3328;5632;5888;8192;8448;10752;11008;13312;15616;15872;16128', '521;523;524;771;773;774;2818;2819;2820;2821;2822;2823;3073;3073;3074;3075;3076;3077;3078;3079;3080;3081;3081;3329;3330;3330;3330;3331;3331;3332;3333;3334;3335;5633;5633;5634;5637;5638;5639;5640;5640;5889;5890;5891;8193;8194;8194;8196;8197;8450;8451;10753;10755;11009;11010;11012;13313;13315;15617;15619;15620;15621;15624;15624;15873;15876;15877;15878;15880;15882;16129;16130;16131;16132', 0); +INSERT INTO `0_security_roles` VALUES(8, 'AP Officer', 'AP Officer', '512;2816;3072;3328;5376;5632;5888;8192;8448;10752;11008;13312;15616;15872;16128', '257;258;259;260;521;523;524;769;770;771;772;773;774;2818;2819;2820;2821;2822;2823;3073;3074;3082;3076;3077;3078;3079;3080;3081;3329;3330;3331;3332;3333;3334;3335;5377;5633;5635;5640;5889;5890;5891;7937;7938;7939;7940;8193;8194;8196;8197;8449;8450;8451;10497;10753;10755;11009;11010;11012;13057;13313;13315;15617;15619;15620;15621;15624;15876;15877;15880;15882;16129;16130;16131;16132', 0); +INSERT INTO `0_security_roles` VALUES(9, 'Accountant', 'New Accountant', '512;768;2816;3072;3328;5376;5632;5888;8192;8448;10752;11008;13312;15616;15872;16128', '257;258;259;260;521;523;524;771;772;773;774;2818;2819;2820;2821;2822;2823;3073;3074;3075;3076;3077;3078;3079;3080;3081;3329;3330;3331;3332;3333;3334;3335;5377;5633;5634;5635;5637;5638;5639;5640;5889;5890;5891;7937;7938;7939;7940;8193;8194;8196;8197;8449;8450;8451;10497;10753;10755;11009;11010;11012;13313;13315;15617;15618;15619;15620;15621;15624;15873;15876;15877;15878;15880;15882;16129;16130;16131;16132', 0); +INSERT INTO `0_security_roles` VALUES(10, 'Sub Admin', 'Sub Admin', '512;768;2816;3072;3328;5376;5632;5888;8192;8448;10752;11008;13312;15616;15872;16128', '257;258;259;260;521;523;524;771;772;773;774;2818;2819;2820;2821;2822;2823;3073;3074;3082;3075;3076;3077;3078;3079;3080;3081;3329;3330;3331;3332;3333;3334;3335;5377;5633;5634;5635;5637;5638;5639;5640;5889;5890;5891;7937;7938;7939;7940;8193;8194;8196;8197;8449;8450;8451;10497;10753;10755;11009;11010;11012;13057;13313;13315;15617;15619;15620;15621;15624;15873;15874;15876;15877;15878;15879;15880;15882;16129;16130;16131;16132', 0); -### Structure of table `0_shippers` ### +-- -------------------------------------------------------- -DROP TABLE IF EXISTS `0_shippers`; +-- +-- Table structure for table `0_shippers` +-- -CREATE TABLE `0_shippers` ( +DROP TABLE IF EXISTS `0_shippers`; +CREATE TABLE IF NOT EXISTS `0_shippers` ( `shipper_id` int(11) NOT NULL auto_increment, `shipper_name` varchar(60) NOT NULL default '', `phone` varchar(30) NOT NULL default '', @@ -1280,68 +1495,77 @@ CREATE TABLE `0_shippers` ( `inactive` tinyint(1) NOT NULL default '0', PRIMARY KEY (`shipper_id`), UNIQUE KEY `name` (`shipper_name`) -) TYPE=MyISAM AUTO_INCREMENT=2 ; - +) TYPE=MyISAM AUTO_INCREMENT=2 ; -### Data of table `0_shippers` ### +-- +-- Dumping data for table `0_shippers` +-- -INSERT INTO `0_shippers` VALUES ('1', 'Default', '', '', '', '', '0'); +INSERT INTO `0_shippers` VALUES(1, 'Default', '', '', '', '', 0); +-- -------------------------------------------------------- -### Structure of table `0_sql_trail` ### +-- +-- Table structure for table `0_sql_trail` +-- DROP TABLE IF EXISTS `0_sql_trail`; - -CREATE TABLE `0_sql_trail` ( +CREATE TABLE IF NOT EXISTS `0_sql_trail` ( `id` int(11) unsigned NOT NULL auto_increment, `sql` text NOT NULL, `result` tinyint(1) NOT NULL, `msg` varchar(255) NOT NULL, PRIMARY KEY (`id`) -) TYPE=MyISAM AUTO_INCREMENT=1 ; - +) TYPE=MyISAM AUTO_INCREMENT=1 ; -### Data of table `0_sql_trail` ### +-- +-- Dumping data for table `0_sql_trail` +-- +-- -------------------------------------------------------- -### Structure of table `0_stock_category` ### +-- +-- Table structure for table `0_stock_category` +-- DROP TABLE IF EXISTS `0_stock_category`; - -CREATE TABLE `0_stock_category` ( +CREATE TABLE IF NOT EXISTS `0_stock_category` ( `category_id` int(11) NOT NULL auto_increment, `description` varchar(60) NOT NULL default '', `dflt_tax_type` int(11) NOT NULL default '1', `dflt_units` varchar(20) NOT NULL default 'each', `dflt_mb_flag` char(1) NOT NULL default 'B', - `dflt_sales_act` varchar(11) NOT NULL default '', - `dflt_cogs_act` varchar(11) NOT NULL default '', - `dflt_inventory_act` varchar(11) NOT NULL default '', - `dflt_adjustment_act` varchar(11) NOT NULL default '', - `dflt_assembly_act` varchar(11) NOT NULL default '', + `dflt_sales_act` varchar(15) NOT NULL default '', + `dflt_cogs_act` varchar(15) NOT NULL default '', + `dflt_inventory_act` varchar(15) NOT NULL default '', + `dflt_adjustment_act` varchar(15) NOT NULL default '', + `dflt_assembly_act` varchar(15) NOT NULL default '', `dflt_dim1` int(11) default NULL, `dflt_dim2` int(11) default NULL, `inactive` tinyint(1) NOT NULL default '0', `dflt_no_sale` tinyint(1) NOT NULL default '0', PRIMARY KEY (`category_id`), UNIQUE KEY `description` (`description`) -) TYPE=MyISAM AUTO_INCREMENT=5 ; - +) TYPE=MyISAM AUTO_INCREMENT=5 ; -### Data of table `0_stock_category` ### +-- +-- Dumping data for table `0_stock_category` +-- -INSERT INTO `0_stock_category` VALUES ('1', 'Components', '1', 'each', 'B', '4010', '5010', '1510', '5040', '1530', '0', '0', '0', '0'); -INSERT INTO `0_stock_category` VALUES ('2', 'Charges', '1', 'each', 'D', '4010', '5010', '1510', '5040', '1530', '0', '0', '0', '0'); -INSERT INTO `0_stock_category` VALUES ('3', 'Systems', '1', 'each', 'M', '4010', '5010', '1510', '5040', '1530', '0', '0', '0', '0'); -INSERT INTO `0_stock_category` VALUES ('4', 'Services', '1', 'hrs', 'D', '4010', '5010', '1510', '5040', '1530', '0', '0', '0', '0'); +INSERT INTO `0_stock_category` VALUES(1, 'Components', 1, 'each', 'B', '4010', '5010', '1510', '5040', '1530', 0, 0, 0, 0); +INSERT INTO `0_stock_category` VALUES(2, 'Charges', 1, 'each', 'D', '4010', '5010', '1510', '5040', '1530', 0, 0, 0, 0); +INSERT INTO `0_stock_category` VALUES(3, 'Systems', 1, 'each', 'M', '4010', '5010', '1510', '5040', '1530', 0, 0, 0, 0); +INSERT INTO `0_stock_category` VALUES(4, 'Services', 1, 'hrs', 'D', '4010', '5010', '1510', '5040', '1530', 0, 0, 0, 0); +-- -------------------------------------------------------- -### Structure of table `0_stock_master` ### +-- +-- Table structure for table `0_stock_master` +-- DROP TABLE IF EXISTS `0_stock_master`; - -CREATE TABLE `0_stock_master` ( +CREATE TABLE IF NOT EXISTS `0_stock_master` ( `stock_id` varchar(20) NOT NULL default '', `category_id` int(11) NOT NULL default '0', `tax_type_id` int(11) NOT NULL default '0', @@ -1349,11 +1573,11 @@ CREATE TABLE `0_stock_master` ( `long_description` tinytext NOT NULL, `units` varchar(20) NOT NULL default 'each', `mb_flag` char(1) NOT NULL default 'B', - `sales_account` varchar(11) NOT NULL default '', - `cogs_account` varchar(11) NOT NULL default '', - `inventory_account` varchar(11) NOT NULL default '', - `adjustment_account` varchar(11) NOT NULL default '', - `assembly_account` varchar(11) NOT NULL default '', + `sales_account` varchar(15) NOT NULL default '', + `cogs_account` varchar(15) NOT NULL default '', + `inventory_account` varchar(15) NOT NULL default '', + `adjustment_account` varchar(15) NOT NULL default '', + `assembly_account` varchar(15) NOT NULL default '', `dimension_id` int(11) default NULL, `dimension2_id` int(11) default NULL, `actual_cost` double NOT NULL default '0', @@ -1363,19 +1587,23 @@ CREATE TABLE `0_stock_master` ( `overhead_cost` double NOT NULL default '0', `inactive` tinyint(1) NOT NULL default '0', `no_sale` tinyint(1) NOT NULL default '0', + `editable` tinyint(1) NOT NULL default '0', PRIMARY KEY (`stock_id`) -) TYPE=InnoDB ; - +) TYPE=InnoDB; -### Data of table `0_stock_master` ### +-- +-- Dumping data for table `0_stock_master` +-- +-- -------------------------------------------------------- -### Structure of table `0_stock_moves` ### +-- +-- Table structure for table `0_stock_moves` +-- DROP TABLE IF EXISTS `0_stock_moves`; - -CREATE TABLE `0_stock_moves` ( +CREATE TABLE IF NOT EXISTS `0_stock_moves` ( `trans_id` int(11) NOT NULL auto_increment, `trans_no` int(11) NOT NULL default '0', `stock_id` char(20) NOT NULL default '', @@ -1390,19 +1618,62 @@ CREATE TABLE `0_stock_moves` ( `standard_cost` double NOT NULL default '0', `visible` tinyint(1) NOT NULL default '1', PRIMARY KEY (`trans_id`), - KEY `type` (`type`,`trans_no`) -) TYPE=InnoDB AUTO_INCREMENT=1 ; + KEY `type` (`type`,`trans_no`), + KEY `Move` (`stock_id`,`loc_code`,`tran_date`) +) TYPE=InnoDB AUTO_INCREMENT=1 ; +-- +-- Dumping data for table `0_stock_moves` +-- -### Data of table `0_stock_moves` ### +-- -------------------------------------------------------- +-- +-- Table structure for table `0_suppliers` +-- -### Structure of table `0_supp_allocations` ### +DROP TABLE IF EXISTS `0_suppliers`; +CREATE TABLE IF NOT EXISTS `0_suppliers` ( + `supplier_id` int(11) NOT NULL auto_increment, + `supp_name` varchar(60) NOT NULL default '', + `supp_ref` varchar(30) NOT NULL default '', + `address` tinytext NOT NULL, + `supp_address` tinytext NOT NULL, + `gst_no` varchar(25) NOT NULL default '', + `contact` varchar(60) NOT NULL default '', + `supp_account_no` varchar(40) NOT NULL default '', + `website` varchar(100) NOT NULL default '', + `bank_account` varchar(60) NOT NULL default '', + `curr_code` char(3) default NULL, + `payment_terms` int(11) default NULL, + `tax_included` tinyint(1) NOT NULL default '0', + `dimension_id` int(11) default '0', + `dimension2_id` int(11) default '0', + `tax_group_id` int(11) default NULL, + `credit_limit` double NOT NULL default '0', + `purchase_account` varchar(15) NOT NULL default '', + `payable_account` varchar(15) NOT NULL default '', + `payment_discount_account` varchar(15) NOT NULL default '', + `notes` tinytext NOT NULL, + `inactive` tinyint(1) NOT NULL default '0', + PRIMARY KEY (`supplier_id`), + KEY `supp_ref` (`supp_ref`) +) TYPE=MyISAM AUTO_INCREMENT=1 ; -DROP TABLE IF EXISTS `0_supp_allocations`; +-- +-- Dumping data for table `0_suppliers` +-- + + +-- -------------------------------------------------------- + +-- +-- Table structure for table `0_supp_allocations` +-- -CREATE TABLE `0_supp_allocations` ( +DROP TABLE IF EXISTS `0_supp_allocations`; +CREATE TABLE IF NOT EXISTS `0_supp_allocations` ( `id` int(11) NOT NULL auto_increment, `amt` double unsigned default NULL, `date_alloc` date NOT NULL default '0000-00-00', @@ -1410,23 +1681,28 @@ CREATE TABLE `0_supp_allocations` ( `trans_type_from` int(11) default NULL, `trans_no_to` int(11) default NULL, `trans_type_to` int(11) default NULL, - PRIMARY KEY (`id`) -) TYPE=InnoDB AUTO_INCREMENT=1 ; - + PRIMARY KEY (`id`), + KEY `From` (`trans_type_from`,`trans_no_from`), + KEY `To` (`trans_type_to`,`trans_no_to`) +) TYPE=InnoDB AUTO_INCREMENT=1 ; -### Data of table `0_supp_allocations` ### +-- +-- Dumping data for table `0_supp_allocations` +-- +-- -------------------------------------------------------- -### Structure of table `0_supp_invoice_items` ### +-- +-- Table structure for table `0_supp_invoice_items` +-- DROP TABLE IF EXISTS `0_supp_invoice_items`; - -CREATE TABLE `0_supp_invoice_items` ( +CREATE TABLE IF NOT EXISTS `0_supp_invoice_items` ( `id` int(11) NOT NULL auto_increment, `supp_trans_no` int(11) default NULL, `supp_trans_type` int(11) default NULL, - `gl_code` varchar(11) NOT NULL default '0', + `gl_code` varchar(15) NOT NULL default '', `grn_item_id` int(11) default NULL, `po_detail_item_id` int(11) default NULL, `stock_id` varchar(20) NOT NULL default '', @@ -1435,19 +1711,23 @@ CREATE TABLE `0_supp_invoice_items` ( `unit_price` double NOT NULL default '0', `unit_tax` double NOT NULL default '0', `memo_` tinytext, - PRIMARY KEY (`id`) -) TYPE=InnoDB AUTO_INCREMENT=1 ; - + PRIMARY KEY (`id`), + KEY `Transaction` (`supp_trans_type`,`supp_trans_no`,`stock_id`) +) TYPE=InnoDB AUTO_INCREMENT=1 ; -### Data of table `0_supp_invoice_items` ### +-- +-- Dumping data for table `0_supp_invoice_items` +-- +-- -------------------------------------------------------- -### Structure of table `0_supp_trans` ### +-- +-- Table structure for table `0_supp_trans` +-- DROP TABLE IF EXISTS `0_supp_trans`; - -CREATE TABLE `0_supp_trans` ( +CREATE TABLE IF NOT EXISTS `0_supp_trans` ( `trans_no` int(11) unsigned NOT NULL default '0', `type` smallint(6) unsigned NOT NULL default '0', `supplier_id` int(11) unsigned default NULL, @@ -1460,155 +1740,246 @@ CREATE TABLE `0_supp_trans` ( `ov_gst` double NOT NULL default '0', `rate` double NOT NULL default '1', `alloc` double NOT NULL default '0', - PRIMARY KEY (`trans_no`,`type`), + `tax_included` tinyint(1) NOT NULL default '0', + PRIMARY KEY (`type`,`trans_no`), KEY `supplier_id` (`supplier_id`), KEY `SupplierID_2` (`supplier_id`,`supp_reference`), - KEY `type` (`type`) -) TYPE=InnoDB ; - - -### Data of table `0_supp_trans` ### - - + KEY `type` (`type`), + KEY `tran_date` (`tran_date`) +) TYPE=InnoDB; -### Structure of table `0_suppliers` ### +-- +-- Dumping data for table `0_supp_trans` +-- -DROP TABLE IF EXISTS `0_suppliers`; -CREATE TABLE `0_suppliers` ( - `supplier_id` int(11) NOT NULL auto_increment, - `supp_name` varchar(60) NOT NULL default '', - `supp_ref` varchar(30) NOT NULL default '', - `address` tinytext NOT NULL, - `supp_address` tinytext NOT NULL, - `phone` varchar(30) NOT NULL default '', - `phone2` varchar(30) NOT NULL default '', - `fax` varchar(30) NOT NULL default '', - `gst_no` varchar(25) NOT NULL default '', - `contact` varchar(60) NOT NULL default '', - `supp_account_no` varchar(40) NOT NULL default '', - `email` varchar(100) NOT NULL default '', - `website` varchar(100) NOT NULL default '', - `bank_account` varchar(60) NOT NULL default '', - `curr_code` char(3) default NULL, - `payment_terms` int(11) default NULL, - `dimension_id` int(11) default '0', - `dimension2_id` int(11) default '0', - `tax_group_id` int(11) default NULL, - `credit_limit` double NOT NULL default '0', - `purchase_account` varchar(11) default NULL, - `payable_account` varchar(11) default NULL, - `payment_discount_account` varchar(11) default NULL, - `notes` tinytext NOT NULL, - `inactive` tinyint(1) NOT NULL default '0', - PRIMARY KEY (`supplier_id`) -) TYPE=MyISAM AUTO_INCREMENT=1 ; +-- -------------------------------------------------------- +-- +-- Table structure for table `0_sys_prefs` +-- -### Data of table `0_suppliers` ### +DROP TABLE IF EXISTS `0_sys_prefs`; +CREATE TABLE IF NOT EXISTS `0_sys_prefs` ( + `name` varchar(35) NOT NULL default '', + `category` varchar(30) default NULL, + `type` varchar(20) NOT NULL default '', + `length` smallint(6) default NULL, + `value` tinytext, + PRIMARY KEY (`name`), + KEY `category` (`category`) +) TYPE=MyISAM; +-- +-- Dumping data for table `0_sys_prefs` +-- +INSERT INTO `0_sys_prefs` VALUES('coy_name', 'setup.company', 'varchar', 60, 'Company name'); +INSERT INTO `0_sys_prefs` VALUES('gst_no', 'setup.company', 'varchar', 25, ''); +INSERT INTO `0_sys_prefs` VALUES('coy_no', 'setup.company', 'varchar', 25, ''); +INSERT INTO `0_sys_prefs` VALUES('tax_prd', 'setup.company', 'int', 11, '1'); +INSERT INTO `0_sys_prefs` VALUES('tax_last', 'setup.company', 'int', 11, '1'); +INSERT INTO `0_sys_prefs` VALUES('postal_address', 'setup.company', 'tinytext', 0, 'N/A'); +INSERT INTO `0_sys_prefs` VALUES('phone', 'setup.company', 'varchar', 30, ''); +INSERT INTO `0_sys_prefs` VALUES('fax', 'setup.company', 'varchar', 30, ''); +INSERT INTO `0_sys_prefs` VALUES('email', 'setup.company', 'varchar', 100, ''); +INSERT INTO `0_sys_prefs` VALUES('coy_logo', 'setup.company', 'varchar', 100, ''); +INSERT INTO `0_sys_prefs` VALUES('domicile', 'setup.company', 'varchar', 55, ''); +INSERT INTO `0_sys_prefs` VALUES('curr_default', 'setup.company', 'char', 3, 'USD'); +INSERT INTO `0_sys_prefs` VALUES('use_dimension', 'setup.company', 'tinyint', 1, '1'); +INSERT INTO `0_sys_prefs` VALUES('f_year', 'setup.company', 'int', 11, '3'); +INSERT INTO `0_sys_prefs` VALUES('no_item_list', 'setup.company', 'tinyint', 1, '0'); +INSERT INTO `0_sys_prefs` VALUES('no_customer_list', 'setup.company', 'tinyint', 1, '0'); +INSERT INTO `0_sys_prefs` VALUES('no_supplier_list', 'setup.company', 'tinyint', 1, '0'); +INSERT INTO `0_sys_prefs` VALUES('base_sales', 'setup.company', 'int', 11, '1'); +INSERT INTO `0_sys_prefs` VALUES('time_zone', 'setup.company', 'tinyint', 1, '0'); +INSERT INTO `0_sys_prefs` VALUES('add_pct', 'setup.company', 'int', 5, '-1'); +INSERT INTO `0_sys_prefs` VALUES('round_to', 'setup.company', 'int', 5, '1'); +INSERT INTO `0_sys_prefs` VALUES('login_tout', 'setup.company', 'smallint', 6, '600'); +INSERT INTO `0_sys_prefs` VALUES('past_due_days', 'glsetup.general', 'int', 11, '30'); +INSERT INTO `0_sys_prefs` VALUES('profit_loss_year_act', 'glsetup.general', 'varchar', 15, '9990'); +INSERT INTO `0_sys_prefs` VALUES('retained_earnings_act', 'glsetup.general', 'varchar', 15, '3590'); +INSERT INTO `0_sys_prefs` VALUES('bank_charge_act', 'glsetup.general', 'varchar', 15, '5690'); +INSERT INTO `0_sys_prefs` VALUES('exchange_diff_act', 'glsetup.general', 'varchar', 15, '4450'); +INSERT INTO `0_sys_prefs` VALUES('default_credit_limit', 'glsetup.customer', 'int', 11, '1000'); +INSERT INTO `0_sys_prefs` VALUES('accumulate_shipping', 'glsetup.customer', 'tinyint', 1, '0'); +INSERT INTO `0_sys_prefs` VALUES('legal_text', 'glsetup.customer', 'tinytext', 0, ''); +INSERT INTO `0_sys_prefs` VALUES('freight_act', 'glsetup.customer', 'varchar', 15, '4430'); +INSERT INTO `0_sys_prefs` VALUES('debtors_act', 'glsetup.sales', 'varchar', 15, '1200'); +INSERT INTO `0_sys_prefs` VALUES('default_sales_act', 'glsetup.sales', 'varchar', 15, '4010'); +INSERT INTO `0_sys_prefs` VALUES('default_sales_discount_act', 'glsetup.sales', 'varchar', 15, '4510'); +INSERT INTO `0_sys_prefs` VALUES('default_prompt_payment_act', 'glsetup.sales', 'varchar', 15, '4500'); +INSERT INTO `0_sys_prefs` VALUES('default_delivery_required', 'glsetup.sales', 'smallint', 6, '1'); +INSERT INTO `0_sys_prefs` VALUES('default_dim_required', 'glsetup.dims', 'int', 11, '20'); +INSERT INTO `0_sys_prefs` VALUES('pyt_discount_act', 'glsetup.purchase', 'varchar', 15, '5060'); +INSERT INTO `0_sys_prefs` VALUES('creditors_act', 'glsetup.purchase', 'varchar', 15, '2100'); +INSERT INTO `0_sys_prefs` VALUES('po_over_receive', 'glsetup.purchase', 'int', 11, '10'); +INSERT INTO `0_sys_prefs` VALUES('po_over_charge', 'glsetup.purchase', 'int', 11, '10'); +INSERT INTO `0_sys_prefs` VALUES('allow_negative_stock', 'glsetup.inventory', 'tinyint', 1, '0'); +INSERT INTO `0_sys_prefs` VALUES('default_inventory_act', 'glsetup.items', 'varchar', 15, '1510'); +INSERT INTO `0_sys_prefs` VALUES('default_cogs_act', 'glsetup.items', 'varchar', 15, '5010'); +INSERT INTO `0_sys_prefs` VALUES('default_adj_act', 'glsetup.items', 'varchar', 15, '5040'); +INSERT INTO `0_sys_prefs` VALUES('default_inv_sales_act', 'glsetup.items', 'varchar', 15, '4010'); +INSERT INTO `0_sys_prefs` VALUES('default_assembly_act', 'glsetup.items', 'varchar', 15, '1530'); +INSERT INTO `0_sys_prefs` VALUES('default_workorder_required', 'glsetup.manuf', 'int', 11, '20'); +INSERT INTO `0_sys_prefs` VALUES('version_id', 'system', 'varchar', 11, '2.3rc'); +INSERT INTO `0_sys_prefs` VALUES('auto_curr_reval', 'setup.company', 'smallint', 6, '1'); + +-- -------------------------------------------------------- -### Structure of table `0_sys_types` ### +-- +-- Table structure for table `0_sys_types` +-- DROP TABLE IF EXISTS `0_sys_types`; - -CREATE TABLE `0_sys_types` ( +CREATE TABLE IF NOT EXISTS `0_sys_types` ( `type_id` smallint(6) NOT NULL default '0', `type_no` int(11) NOT NULL default '1', `next_reference` varchar(100) NOT NULL default '', PRIMARY KEY (`type_id`) -) TYPE=InnoDB ; - - -### Data of table `0_sys_types` ### - -INSERT INTO `0_sys_types` VALUES ('0', '17', '1'); -INSERT INTO `0_sys_types` VALUES ('1', '7', '1'); -INSERT INTO `0_sys_types` VALUES ('2', '4', '1'); -INSERT INTO `0_sys_types` VALUES ('4', '3', '1'); -INSERT INTO `0_sys_types` VALUES ('10', '16', '1'); -INSERT INTO `0_sys_types` VALUES ('11', '2', '1'); -INSERT INTO `0_sys_types` VALUES ('12', '6', '1'); -INSERT INTO `0_sys_types` VALUES ('13', '1', '1'); -INSERT INTO `0_sys_types` VALUES ('16', '2', '1'); -INSERT INTO `0_sys_types` VALUES ('17', '2', '1'); -INSERT INTO `0_sys_types` VALUES ('18', '1', '1'); -INSERT INTO `0_sys_types` VALUES ('20', '6', '1'); -INSERT INTO `0_sys_types` VALUES ('21', '1', '1'); -INSERT INTO `0_sys_types` VALUES ('22', '3', '1'); -INSERT INTO `0_sys_types` VALUES ('25', '1', '1'); -INSERT INTO `0_sys_types` VALUES ('26', '1', '1'); -INSERT INTO `0_sys_types` VALUES ('28', '1', '1'); -INSERT INTO `0_sys_types` VALUES ('29', '1', '1'); -INSERT INTO `0_sys_types` VALUES ('30', '0', '1'); -INSERT INTO `0_sys_types` VALUES ('32', '0', '1'); -INSERT INTO `0_sys_types` VALUES ('35', '1', '1'); -INSERT INTO `0_sys_types` VALUES ('40', '1', '1'); - - -### Structure of table `0_tax_group_items` ### +) TYPE=InnoDB; -DROP TABLE IF EXISTS `0_tax_group_items`; +-- +-- Dumping data for table `0_sys_types` +-- -CREATE TABLE `0_tax_group_items` ( - `tax_group_id` int(11) NOT NULL default '0', - `tax_type_id` int(11) NOT NULL default '0', - `rate` double NOT NULL default '0', - PRIMARY KEY (`tax_group_id`,`tax_type_id`) -) TYPE=InnoDB ; +INSERT INTO `0_sys_types` VALUES(0, 17, '1'); +INSERT INTO `0_sys_types` VALUES(1, 7, '1'); +INSERT INTO `0_sys_types` VALUES(2, 4, '1'); +INSERT INTO `0_sys_types` VALUES(4, 3, '1'); +INSERT INTO `0_sys_types` VALUES(10, 16, '1'); +INSERT INTO `0_sys_types` VALUES(11, 2, '1'); +INSERT INTO `0_sys_types` VALUES(12, 6, '1'); +INSERT INTO `0_sys_types` VALUES(13, 1, '1'); +INSERT INTO `0_sys_types` VALUES(16, 2, '1'); +INSERT INTO `0_sys_types` VALUES(17, 2, '1'); +INSERT INTO `0_sys_types` VALUES(18, 1, '1'); +INSERT INTO `0_sys_types` VALUES(20, 6, '1'); +INSERT INTO `0_sys_types` VALUES(21, 1, '1'); +INSERT INTO `0_sys_types` VALUES(22, 3, '1'); +INSERT INTO `0_sys_types` VALUES(25, 1, '1'); +INSERT INTO `0_sys_types` VALUES(26, 1, '1'); +INSERT INTO `0_sys_types` VALUES(28, 1, '1'); +INSERT INTO `0_sys_types` VALUES(29, 1, '1'); +INSERT INTO `0_sys_types` VALUES(30, 0, '1'); +INSERT INTO `0_sys_types` VALUES(32, 0, '1'); +INSERT INTO `0_sys_types` VALUES(35, 1, '1'); +INSERT INTO `0_sys_types` VALUES(40, 1, '1'); + +-- -------------------------------------------------------- + +-- +-- Table structure for table `0_tags` +-- +DROP TABLE IF EXISTS `0_tags`; +CREATE TABLE IF NOT EXISTS `0_tags` ( + `id` int(11) NOT NULL auto_increment, + `type` smallint(6) NOT NULL, + `name` varchar(30) NOT NULL, + `description` varchar(60) default NULL, + `inactive` tinyint(1) NOT NULL default '0', + PRIMARY KEY (`id`), + UNIQUE KEY `type` (`type`,`name`) +) TYPE=MyISAM AUTO_INCREMENT=1 ; -### Data of table `0_tax_group_items` ### +-- +-- Dumping data for table `0_tags` +-- -INSERT INTO `0_tax_group_items` VALUES ('1', '1', '5'); +-- -------------------------------------------------------- -### Structure of table `0_tax_groups` ### +-- +-- Table structure for table `0_tag_associations` +-- -DROP TABLE IF EXISTS `0_tax_groups`; +DROP TABLE IF EXISTS `0_tag_associations`; +CREATE TABLE IF NOT EXISTS `0_tag_associations` ( + `record_id` varchar(15) NOT NULL, + `tag_id` int(11) NOT NULL, + UNIQUE KEY `record_id` (`record_id`,`tag_id`) +) TYPE=MyISAM; + +-- +-- Dumping data for table `0_tag_associations` +-- -CREATE TABLE `0_tax_groups` ( + +-- -------------------------------------------------------- + +-- +-- Table structure for table `0_tax_groups` +-- + +DROP TABLE IF EXISTS `0_tax_groups`; +CREATE TABLE IF NOT EXISTS `0_tax_groups` ( `id` int(11) NOT NULL auto_increment, `name` varchar(60) NOT NULL default '', `tax_shipping` tinyint(1) NOT NULL default '0', `inactive` tinyint(1) NOT NULL default '0', PRIMARY KEY (`id`), UNIQUE KEY `name` (`name`) -) TYPE=InnoDB AUTO_INCREMENT=3 ; +) TYPE=InnoDB AUTO_INCREMENT=3 ; +-- +-- Dumping data for table `0_tax_groups` +-- -### Data of table `0_tax_groups` ### +INSERT INTO `0_tax_groups` VALUES(1, 'Tax', 0, 0); +INSERT INTO `0_tax_groups` VALUES(2, 'Tax Exempt', 0, 0); -INSERT INTO `0_tax_groups` VALUES ('1', 'Tax', '0', '0'); -INSERT INTO `0_tax_groups` VALUES ('2', 'Tax Exempt', '0', '0'); +-- -------------------------------------------------------- +-- +-- Table structure for table `0_tax_group_items` +-- + +DROP TABLE IF EXISTS `0_tax_group_items`; +CREATE TABLE IF NOT EXISTS `0_tax_group_items` ( + `tax_group_id` int(11) NOT NULL default '0', + `tax_type_id` int(11) NOT NULL default '0', + `rate` double NOT NULL default '0', + PRIMARY KEY (`tax_group_id`,`tax_type_id`) +) TYPE=InnoDB; + +-- +-- Dumping data for table `0_tax_group_items` +-- -### Structure of table `0_tax_types` ### +INSERT INTO `0_tax_group_items` VALUES(1, 1, 5); -DROP TABLE IF EXISTS `0_tax_types`; +-- -------------------------------------------------------- -CREATE TABLE `0_tax_types` ( +-- +-- Table structure for table `0_tax_types` +-- + +DROP TABLE IF EXISTS `0_tax_types`; +CREATE TABLE IF NOT EXISTS `0_tax_types` ( `id` int(11) NOT NULL auto_increment, `rate` double NOT NULL default '0', - `sales_gl_code` varchar(11) NOT NULL default '', - `purchasing_gl_code` varchar(11) NOT NULL default '', + `sales_gl_code` varchar(15) NOT NULL default '', + `purchasing_gl_code` varchar(15) NOT NULL default '', `name` varchar(60) NOT NULL default '', `inactive` tinyint(1) NOT NULL default '0', PRIMARY KEY (`id`) -) TYPE=InnoDB AUTO_INCREMENT=2 ; - +) TYPE=InnoDB AUTO_INCREMENT=2 ; -### Data of table `0_tax_types` ### +-- +-- Dumping data for table `0_tax_types` +-- -INSERT INTO `0_tax_types` VALUES ('1', '5', '2150', '2145', 'Tax', '0'); +INSERT INTO `0_tax_types` VALUES(1, 5, '2150', '2150', 'Tax', 0); +-- -------------------------------------------------------- -### Structure of table `0_trans_tax_details` ### +-- +-- Table structure for table `0_trans_tax_details` +-- DROP TABLE IF EXISTS `0_trans_tax_details`; - -CREATE TABLE `0_trans_tax_details` ( +CREATE TABLE IF NOT EXISTS `0_trans_tax_details` ( `id` int(11) NOT NULL auto_increment, `trans_type` smallint(6) default NULL, `trans_no` int(11) default NULL, @@ -1620,20 +1991,47 @@ CREATE TABLE `0_trans_tax_details` ( `net_amount` double NOT NULL default '0', `amount` double NOT NULL default '0', `memo` tinytext, - PRIMARY KEY (`id`) + PRIMARY KEY (`id`), + KEY `Type_and_Number` (`trans_type`,`trans_no`), + KEY `tran_date` (`tran_date`) ) TYPE=InnoDB AUTO_INCREMENT=1 ; +-- +-- Dumping data for table `0_trans_tax_details` +-- + -### Data of table `0_trans_tax_details` ### +-- -------------------------------------------------------- + +-- +-- Table structure for table `0_useronline` +-- +DROP TABLE IF EXISTS `0_useronline`; +CREATE TABLE IF NOT EXISTS `0_useronline` ( + `id` int(11) NOT NULL auto_increment, + `timestamp` int(15) NOT NULL default '0', + `ip` varchar(40) NOT NULL default '', + `file` varchar(100) NOT NULL default '', + PRIMARY KEY (`id`), + KEY `timestamp` (`timestamp`), + KEY `ip` (`ip`) +) TYPE=MyISAM AUTO_INCREMENT=1 ; +-- +-- Dumping data for table `0_useronline` +-- -### Structure of table `0_users` ### -DROP TABLE IF EXISTS `0_users`; +-- -------------------------------------------------------- -CREATE TABLE `0_users` ( - `id` SMALLINT(6) AUTO_INCREMENT, +-- +-- Table structure for table `0_users` +-- + +DROP TABLE IF EXISTS `0_users`; +CREATE TABLE IF NOT EXISTS `0_users` ( + `id` smallint(6) NOT NULL auto_increment, `user_id` varchar(60) NOT NULL default '', `password` varchar(100) NOT NULL default '', `real_name` varchar(100) NOT NULL default '', @@ -1664,129 +2062,64 @@ CREATE TABLE `0_users` ( `startup_tab` varchar(20) NOT NULL default '', `inactive` tinyint(1) NOT NULL default '0', PRIMARY KEY (`id`), - UNIQUE KEY (`user_id`) -) TYPE=MyISAM AUTO_INCREMENT=2; + UNIQUE KEY `user_id` (`user_id`) +) TYPE=MyISAM AUTO_INCREMENT=2 ; +-- +-- Dumping data for table `0_users` +-- -### Data of table `0_users` ### +INSERT INTO `0_users` VALUES(1, 'admin', '5f4dcc3b5aa765d61d8327deb882cf99', 'Administrator', 2, '', 'adm@adm.com', 'en_US', 0, 0, 0, 0, 'default', 'Letter', 2, 2, 4, 1, 1, 0, 0, '2008-04-04 12:34:29', 10, 1, 1, '1', 1, 0, 'orders', 0); -INSERT INTO `0_users` VALUES ('1', 'admin', '5f4dcc3b5aa765d61d8327deb882cf99', 'Administrator', '2', '', 'adm@adm.com', 'en_US', '0', '0', '0', '0', 'default', 'Letter', '2', '2', '4', '1', '1', '0', '0', '2008-04-04 12:34:29', '10', '1', '1', '1', '1', '0', 'orders', '0'); +-- -------------------------------------------------------- -### Structure of table `0_voided` ### +-- +-- Table structure for table `0_voided` +-- DROP TABLE IF EXISTS `0_voided`; - -CREATE TABLE `0_voided` ( +CREATE TABLE IF NOT EXISTS `0_voided` ( `type` int(11) NOT NULL default '0', `id` int(11) NOT NULL default '0', `date_` date NOT NULL default '0000-00-00', `memo_` tinytext NOT NULL, UNIQUE KEY `id` (`type`,`id`) -) TYPE=InnoDB ; - - -### Data of table `0_voided` ### - - - -### Structure of table `0_wo_issue_items` ### - -DROP TABLE IF EXISTS `0_wo_issue_items`; - -CREATE TABLE `0_wo_issue_items` ( - `id` int(11) NOT NULL auto_increment, - `stock_id` varchar(40) default NULL, - `issue_id` int(11) default NULL, - `qty_issued` double default NULL, - PRIMARY KEY (`id`) -) TYPE=InnoDB AUTO_INCREMENT=1 ; - - -### Data of table `0_wo_issue_items` ### - - - -### Structure of table `0_wo_issues` ### - -DROP TABLE IF EXISTS `0_wo_issues`; - -CREATE TABLE `0_wo_issues` ( - `issue_no` int(11) NOT NULL auto_increment, - `workorder_id` int(11) NOT NULL default '0', - `reference` varchar(100) default NULL, - `issue_date` date default NULL, - `loc_code` varchar(5) default NULL, - `workcentre_id` int(11) default NULL, - PRIMARY KEY (`issue_no`) -) TYPE=InnoDB AUTO_INCREMENT=1 ; - - -### Data of table `0_wo_issues` ### - - - -### Structure of table `0_wo_manufacture` ### - -DROP TABLE IF EXISTS `0_wo_manufacture`; - -CREATE TABLE `0_wo_manufacture` ( - `id` int(11) NOT NULL auto_increment, - `reference` varchar(100) default NULL, - `workorder_id` int(11) NOT NULL default '0', - `quantity` double NOT NULL default '0', - `date_` date NOT NULL default '0000-00-00', - PRIMARY KEY (`id`) -) TYPE=InnoDB AUTO_INCREMENT=1 ; - - -### Data of table `0_wo_manufacture` ### - - - -### Structure of table `0_wo_requirements` ### - -DROP TABLE IF EXISTS `0_wo_requirements`; - -CREATE TABLE `0_wo_requirements` ( - `id` int(11) NOT NULL auto_increment, - `workorder_id` int(11) NOT NULL default '0', - `stock_id` char(20) NOT NULL default '', - `workcentre` int(11) NOT NULL default '0', - `units_req` double NOT NULL default '1', - `std_cost` double NOT NULL default '0', - `loc_code` char(5) NOT NULL default '', - `units_issued` double NOT NULL default '0', - PRIMARY KEY (`id`) -) TYPE=InnoDB AUTO_INCREMENT=1 ; - +) TYPE=InnoDB; -### Data of table `0_wo_requirements` ### +-- +-- Dumping data for table `0_voided` +-- +-- -------------------------------------------------------- -### Structure of table `0_workcentres` ### +-- +-- Table structure for table `0_workcentres` +-- DROP TABLE IF EXISTS `0_workcentres`; - -CREATE TABLE `0_workcentres` ( +CREATE TABLE IF NOT EXISTS `0_workcentres` ( `id` int(11) NOT NULL auto_increment, `name` char(40) NOT NULL default '', `description` char(50) NOT NULL default '', `inactive` tinyint(1) NOT NULL default '0', PRIMARY KEY (`id`), UNIQUE KEY `name` (`name`) -) TYPE=MyISAM AUTO_INCREMENT=1 ; - +) TYPE=MyISAM AUTO_INCREMENT=1 ; -### Data of table `0_workcentres` ### +-- +-- Dumping data for table `0_workcentres` +-- +-- -------------------------------------------------------- -### Structure of table `0_workorders` ### +-- +-- Table structure for table `0_workorders` +-- DROP TABLE IF EXISTS `0_workorders`; - -CREATE TABLE `0_workorders` ( +CREATE TABLE IF NOT EXISTS `0_workorders` ( `id` int(11) NOT NULL auto_increment, `wo_ref` varchar(60) NOT NULL default '', `loc_code` varchar(5) NOT NULL default '', @@ -1802,53 +2135,99 @@ CREATE TABLE `0_workorders` ( `additional_costs` double NOT NULL default '0', PRIMARY KEY (`id`), UNIQUE KEY `wo_ref` (`wo_ref`) -) TYPE=InnoDB AUTO_INCREMENT=1 ; +) TYPE=InnoDB AUTO_INCREMENT=1 ; +-- +-- Dumping data for table `0_workorders` +-- -### Data of table `0_workorders` ### +-- -------------------------------------------------------- +-- +-- Table structure for table `0_wo_issues` +-- -### Structure of table `0_tags` ### +DROP TABLE IF EXISTS `0_wo_issues`; +CREATE TABLE IF NOT EXISTS `0_wo_issues` ( + `issue_no` int(11) NOT NULL auto_increment, + `workorder_id` int(11) NOT NULL default '0', + `reference` varchar(100) default NULL, + `issue_date` date default NULL, + `loc_code` varchar(5) default NULL, + `workcentre_id` int(11) default NULL, + PRIMARY KEY (`issue_no`), + KEY `workorder_id` (`workorder_id`) +) TYPE=InnoDB AUTO_INCREMENT=1 ; -DROP TABLE IF EXISTS `0_tags`; +-- +-- Dumping data for table `0_wo_issues` +-- -CREATE TABLE `0_tags` ( + +-- -------------------------------------------------------- + +-- +-- Table structure for table `0_wo_issue_items` +-- + +DROP TABLE IF EXISTS `0_wo_issue_items`; +CREATE TABLE IF NOT EXISTS `0_wo_issue_items` ( `id` int(11) NOT NULL auto_increment, - `type` smallint(6) NOT NULL, - `name` varchar(30) NOT NULL, - `description` varchar(60) default NULL, - `inactive` tinyint(1) NOT NULL default '0', - PRIMARY KEY (`id`), - UNIQUE KEY(`type`,`name`) -) TYPE=MyISAM AUTO_INCREMENT=1; + `stock_id` varchar(40) default NULL, + `issue_id` int(11) default NULL, + `qty_issued` double default NULL, + PRIMARY KEY (`id`) +) TYPE=InnoDB AUTO_INCREMENT=1 ; +-- +-- Dumping data for table `0_wo_issue_items` +-- -### Data of table `0_chart_tags` ### +-- -------------------------------------------------------- +-- +-- Table structure for table `0_wo_manufacture` +-- -### Structure of table `0_tag_associations` ### +DROP TABLE IF EXISTS `0_wo_manufacture`; +CREATE TABLE IF NOT EXISTS `0_wo_manufacture` ( + `id` int(11) NOT NULL auto_increment, + `reference` varchar(100) default NULL, + `workorder_id` int(11) NOT NULL default '0', + `quantity` double NOT NULL default '0', + `date_` date NOT NULL default '0000-00-00', + PRIMARY KEY (`id`), + KEY `workorder_id` (`workorder_id`) +) TYPE=InnoDB AUTO_INCREMENT=1 ; -DROP TABLE IF EXISTS `0_tag_associations`; +-- +-- Dumping data for table `0_wo_manufacture` +-- -CREATE TABLE `0_tag_associations` ( - `record_id` varchar(11) NOT NULL, - `tag_id` int(11) NOT NULL, - UNIQUE KEY(`record_id`,`tag_id`) -) TYPE=MyISAM; +-- -------------------------------------------------------- -### Data of table `0_tag_associations` ### +-- +-- Table structure for table `0_wo_requirements` +-- -DROP TABLE IF EXISTS `0_useronline` ; +DROP TABLE IF EXISTS `0_wo_requirements`; +CREATE TABLE IF NOT EXISTS `0_wo_requirements` ( + `id` int(11) NOT NULL auto_increment, + `workorder_id` int(11) NOT NULL default '0', + `stock_id` char(20) NOT NULL default '', + `workcentre` int(11) NOT NULL default '0', + `units_req` double NOT NULL default '1', + `std_cost` double NOT NULL default '0', + `loc_code` char(5) NOT NULL default '', + `units_issued` double NOT NULL default '0', + PRIMARY KEY (`id`), + KEY `workorder_id` (`workorder_id`) +) TYPE=InnoDB AUTO_INCREMENT=1 ; -CREATE TABLE `0_useronline` ( - `id` int(11) NOT NULL AUTO_INCREMENT , - `timestamp` int(15) NOT NULL default '0', - `ip` varchar(40) NOT NULL default '', - `file` varchar(100) NOT NULL default '', - PRIMARY KEY `id` (`id`) , - KEY (`timestamp`) -) TYPE=MYISAM AUTO_INCREMENT=1; +-- +-- Dumping data for table `0_wo_requirements` +-- diff --git a/taxes/db/tax_types_db.inc b/taxes/db/tax_types_db.inc index e57ffb35..f42470ef 100644 --- a/taxes/db/tax_types_db.inc +++ b/taxes/db/tax_types_db.inc @@ -113,4 +113,18 @@ function is_tax_gl_unique($gl_code, $gl_code2=-1, $selected_id=-1) { return $gl_code2 == -1 ? ($row[0] <= 1) : ($row[0] == 0); } + +function is_tax_account($account_code) +{ + $sql= "SELECT id FROM ".TB_PREF."tax_types WHERE + sales_gl_code=".db_escape($account_code)." OR purchasing_gl_code=".db_escape($account_code); + $result = db_query($sql, "checking account is tax account"); + if (db_num_rows($result) > 0) { + $acct = db_fetch($result); + return $acct['id']; + } else + return false; +} + + ?> \ No newline at end of file diff --git a/taxes/item_tax_types.php b/taxes/item_tax_types.php index 43fa1214..4f93fa59 100644 --- a/taxes/item_tax_types.php +++ b/taxes/item_tax_types.php @@ -72,10 +72,7 @@ if ($Mode=='ADD_ITEM' || $Mode=='UPDATE_ITEM') function can_delete($selected_id) { - $sql= "SELECT COUNT(*) FROM ".TB_PREF."stock_master WHERE tax_type_id=".db_escape($selected_id); - $result = db_query($sql, "could not query stock master"); - $myrow = db_fetch_row($result); - if ($myrow[0] > 0) + if (key_in_foreign_table($selected_id, 'stock_master', 'tax_type_id')) { display_error(_("Cannot delete this item tax type because items have been created referring to it.")); return false; @@ -111,7 +108,7 @@ if ($Mode == 'RESET') $result2 = $result = get_all_item_tax_types(check_value('show_inactive')); start_form(); -start_table("$table_style width=30%"); +start_table(TABLESTYLE, "width=30%"); $th = array(_("Name"), _("Tax exempt"),'',''); inactive_control_column($th); table_header($th); @@ -143,7 +140,7 @@ inactive_control_row($th); end_table(1); //----------------------------------------------------------------------------------- -start_table($table_style2); +start_table(TABLESTYLE2); if ($selected_id != -1) { @@ -179,7 +176,7 @@ if (!isset($_POST['exempt']) || $_POST['exempt'] == 0) display_note(_("Select which taxes this item tax type is exempt from."), 0, 1); - start_table($table_style2); + start_table(TABLESTYLE2); $th = array(_("Tax Name"), _("Rate"), _("Is exempt")); table_header($th); diff --git a/taxes/tax_calc.inc b/taxes/tax_calc.inc index f0be7323..3f54bd22 100644 --- a/taxes/tax_calc.inc +++ b/taxes/tax_calc.inc @@ -212,16 +212,4 @@ function get_tax_for_items($items, $prices, $shipping_cost, $tax_group, $tax_inc return $ret_tax_array; } -function is_tax_account($account_code) -{ - $sql= "SELECT id FROM ".TB_PREF."tax_types WHERE - sales_gl_code=".db_escape($account_code)." OR purchasing_gl_code=".db_escape($account_code); - $result = db_query($sql, "checking account is tax account"); - if (db_num_rows($result) > 0) { - $acct = db_fetch($result); - return $acct['id']; - } else - return false; -} - ?> \ No newline at end of file diff --git a/taxes/tax_groups.php b/taxes/tax_groups.php index 4d096b9f..bf888159 100644 --- a/taxes/tax_groups.php +++ b/taxes/tax_groups.php @@ -99,21 +99,15 @@ function can_delete($selected_id) { if ($selected_id == -1) return false; - $sql = "SELECT COUNT(*) FROM ".TB_PREF."cust_branch WHERE tax_group_id=".db_escape($selected_id); - $result = db_query($sql, "could not query customers"); - $myrow = db_fetch_row($result); - if ($myrow[0] > 0) + if (key_in_foreign_table($selected_id, 'cust_branch', 'tax_group_id')) { - display_note(_("Cannot delete this tax group because customer branches been created referring to it.")); + display_error(_("Cannot delete this tax group because customer branches been created referring to it.")); return false; } - $sql = "SELECT COUNT(*) FROM ".TB_PREF."suppliers WHERE tax_group_id=".db_escape($selected_id); - $result = db_query($sql, "could not query suppliers"); - $myrow = db_fetch_row($result); - if ($myrow[0] > 0) + if (key_in_foreign_table($selected_id, 'suppliers', 'tax_group_id')) { - display_note(_("Cannot delete this tax group because suppliers been created referring to it.")); + display_error(_("Cannot delete this tax group because suppliers been created referring to it.")); return false; } @@ -147,9 +141,11 @@ if ($Mode == 'RESET') $result = get_all_tax_groups(check_value('show_inactive')); start_form(); -start_table($table_style); + +start_table(TABLESTYLE); $th = array(_("Description"), _("Shipping Tax"), "", ""); inactive_control_column($th); + table_header($th); $k = 0; @@ -179,7 +175,7 @@ end_table(1); //----------------------------------------------------------------------------------- -start_table($table_style2); +start_table(TABLESTYLE2); if ($selected_id != -1) { @@ -210,9 +206,9 @@ yesno_list_row(_("Tax applied to Shipping:"), 'tax_shipping', null, "", "", true end_table(); -display_note(_("Select the taxes that are included in this group."), 1); +display_note(_("Select the taxes that are included in this group."), 1, 1); -start_table($table_style2); +start_table(TABLESTYLE2); //$th = array(_("Tax"), _("Default Rate (%)"), _("Rate (%)")); //Editable rate has been removed 090920 Joe Hunt $th = array(_("Tax"), _("Rate (%)")); diff --git a/taxes/tax_types.php b/taxes/tax_types.php index 4dfebf7f..6b9c8832 100644 --- a/taxes/tax_types.php +++ b/taxes/tax_types.php @@ -72,10 +72,7 @@ if ($Mode=='UPDATE_ITEM' && can_process()) function can_delete($selected_id) { - $sql= "SELECT COUNT(*) FROM ".TB_PREF."tax_group_items WHERE tax_type_id=".db_escape($selected_id); - $result = db_query($sql, "could not query tax groups"); - $myrow = db_fetch_row($result); - if ($myrow[0] > 0) + if (key_in_foreign_table($selected_id, 'tax_group_items', 'tax_type_id')) { display_error(_("Cannot delete this tax type because tax groups been created referring to it.")); @@ -112,8 +109,8 @@ $result = get_all_tax_types(check_value('show_inactive')); start_form(); -display_note(_("To avoid problems with manual journal entry all tax types should have unique Sales/Purchasing GL accounts.")); -start_table($table_style); +display_note(_("To avoid problems with manual journal entry all tax types should have unique Sales/Purchasing GL accounts."), 0, 1); +start_table(TABLESTYLE); $th = array(_("Description"), _("Default Rate (%)"), _("Sales GL Account"), _("Purchasing GL Account"), "", ""); @@ -142,7 +139,7 @@ inactive_control_row($th); end_table(1); //----------------------------------------------------------------------------------- -start_table($table_style2); +start_table(TABLESTYLE2); if ($selected_id != -1) { diff --git a/themes/aqua/default.css b/themes/aqua/default.css index b41ad16e..3b3596a3 100644 --- a/themes/aqua/default.css +++ b/themes/aqua/default.css @@ -334,7 +334,7 @@ div.tabs a:hover { color: #ff6666; } -.redfg { +.redfg, a.redfg { color: red; font-weight: bold; } @@ -479,7 +479,7 @@ ul.ajaxtabs li{ display: inline; } -ul.ajaxtabs li input{ +ul.ajaxtabs li button{ background-color: #dee7ec; /* background-repeat: repeat-x; background-position: top; */ @@ -492,7 +492,7 @@ ul.ajaxtabs li input{ font-weight: bold; } -ul.ajaxtabs li input:hover{ +ul.ajaxtabs li button:hover{ border-top: 1px solid #8cacbb; color:#FFFFFF; } @@ -510,7 +510,7 @@ div.contentBox{ margin: 0 3px 3px 3px } -ul.ajaxtabs li input.current, ul.ajaxtabs li input.current:hover{ +ul.ajaxtabs li button.current, ul.ajaxtabs li button.current:hover{ border-left: 1px solid #8cacbb; background-color: #8cacbb; color:#FFFFFF; diff --git a/themes/aqua/renderer.php b/themes/aqua/renderer.php index 5c3f5310..8ee81f2d 100644 --- a/themes/aqua/renderer.php +++ b/themes/aqua/renderer.php @@ -24,10 +24,6 @@ function menu_header($title, $no_menu, $is_index) { global $path_to_root, $help_base_url, $db_connections; - // you can owerride the table styles from config.php here, if you want. - //global $table_style, $table_style2; - //$table_style = "cellpadding=3 border=1 bordercolor='#8cacbb' style='border-collapse: collapse'"; - //$table_style2 = "cellpadding=3 border=1 bordercolor='#cccccc' style='border-collapse: collapse'"; echo "\n"; echo "\n"; echo ""; $indicator = "$path_to_root/themes/".user_theme(). "/images/ajax-loader.gif"; echo ""; - echo "
\n"; @@ -50,8 +46,8 @@ foreach($applications as $app) { $acc = access_string($app->name); - echo "id ? "class='selected' " : ""). - "href='$local_path_to_root/index.php?application=".$app->id + echo "" .$acc[0] . ""; } echo ""; @@ -62,14 +58,14 @@ echo "
" . $db_connections[$_SESSION["wa_current_user"]->company]["name"] . " | " . $_SERVER['SERVER_NAME'] . " | " . $_SESSION["wa_current_user"]->name . "" . _("Preferences") . "   \n"; - echo " " . _("Change password") . "   \n"; + echo " " . _("Preferences") . "   \n"; + echo " " . _("Change password") . "   \n"; if ($help_base_url != null) { echo "$himg" . _("Help") . "   "; } - echo "$img" . _("Logout") . "   "; + echo "$img" . _("Logout") . "   "; echo "
"; } echo "
"; diff --git a/themes/cool/default.css b/themes/cool/default.css index d48d1aa3..aad3058a 100644 --- a/themes/cool/default.css +++ b/themes/cool/default.css @@ -338,7 +338,7 @@ div.tabs a:hover { color: #ff6666; } -.redfg { +.redfg, a.redfg { color: red; font-weight: bold; } @@ -483,7 +483,7 @@ ul.ajaxtabs li{ display: inline; } -ul.ajaxtabs li input{ +ul.ajaxtabs li button{ background-color: #dee7ec; /* background-repeat: repeat-x; background-position: top; */ @@ -496,7 +496,7 @@ ul.ajaxtabs li input{ font-weight: bold; } -ul.ajaxtabs li input:hover{ +ul.ajaxtabs li button:hover{ border-top: 1px solid #8cacbb; color:#FFFFFF; } @@ -514,7 +514,7 @@ div.contentBox{ margin: 0 3px 3px 3px } -ul.ajaxtabs li input.current, ul.ajaxtabs li input.current:hover{ +ul.ajaxtabs li button.current, ul.ajaxtabs li button.current:hover{ border-left: 1px solid #8cacbb; background-color: #8cacbb; color:#FFFFFF; diff --git a/themes/cool/renderer.php b/themes/cool/renderer.php index cd959edc..9bf46c95 100644 --- a/themes/cool/renderer.php +++ b/themes/cool/renderer.php @@ -24,10 +24,6 @@ function menu_header($title, $no_menu, $is_index) { global $path_to_root, $help_base_url, $db_connections; - // you can owerride the table styles from config.php here, if you want. - //global $table_style, $table_style2; - //$table_style = "cellpadding=3 border=1 bordercolor='#8cacbb' style='border-collapse: collapse'"; - //$table_style2 = "cellpadding=3 border=1 bordercolor='#cccccc' style='border-collapse: collapse'"; echo "\n"; echo "\n"; echo ""; $indicator = "$path_to_root/themes/".user_theme(). "/images/ajax-loader.gif"; echo ""; - echo "
\n"; @@ -50,8 +46,8 @@ foreach($applications as $app) { $acc = access_string($app->name); - echo "id ? "class='selected' " : ""). - "href='$local_path_to_root/index.php?application=".$app->id + echo "" .$acc[0] . ""; } echo ""; @@ -62,14 +58,14 @@ echo "
" . $db_connections[$_SESSION["wa_current_user"]->company]["name"] . " | " . $_SERVER['SERVER_NAME'] . " | " . $_SESSION["wa_current_user"]->name . "" . _("Preferences") . "   \n"; - echo " " . _("Change password") . "   \n"; + echo " " . _("Preferences") . "   \n"; + echo " " . _("Change password") . "   \n"; if ($help_base_url != null) { echo "$himg" . _("Help") . "   "; } - echo "$img" . _("Logout") . "   "; + echo "$img" . _("Logout") . "   "; echo "
"; } echo ""; diff --git a/themes/default/default.css b/themes/default/default.css index 2e261acc..c21a8486 100644 --- a/themes/default/default.css +++ b/themes/default/default.css @@ -329,7 +329,7 @@ div.tabs a:hover { color: #ff6666; } -.redfg { +.redfg, a.redfg { color: red; font-weight: bold; } @@ -474,7 +474,7 @@ ul.ajaxtabs li{ display: inline; } -ul.ajaxtabs li input{ +ul.ajaxtabs li button{ background-color: #dee7ec; /* background-repeat: repeat-x; background-position: top; */ @@ -487,7 +487,7 @@ ul.ajaxtabs li input{ font-weight: bold; } -ul.ajaxtabs li input:hover{ +ul.ajaxtabs li button:hover{ border-top: 1px solid #8cacbb; color:#FFFFFF; } @@ -505,7 +505,7 @@ div.contentBox{ margin: 0 3px 3px 3px } -ul.ajaxtabs li input.current, ul.ajaxtabs li input.current:hover{ +ul.ajaxtabs li button.current, ul.ajaxtabs li button.current:hover{ border-left: 1px solid #8cacbb; background-color: #8cacbb; color:#FFFFFF; diff --git a/themes/default/renderer.php b/themes/default/renderer.php index 5ba820da..03a56f24 100644 --- a/themes/default/renderer.php +++ b/themes/default/renderer.php @@ -25,10 +25,6 @@ function menu_header($title, $no_menu, $is_index) { global $path_to_root, $help_base_url, $db_connections; - // you can owerride the table styles from config.php here, if you want. - //global $table_style, $table_style2; - //$table_style = "cellpadding=3 border=1 bordercolor='#8cacbb' style='border-collapse: collapse'"; - //$table_style2 = "cellpadding=3 border=1 bordercolor='#cccccc' style='border-collapse: collapse'"; echo "\n"; echo "\n"; echo ""; $indicator = "$path_to_root/themes/".user_theme(). "/images/ajax-loader.gif"; echo ""; - echo "
\n"; @@ -51,9 +47,8 @@ foreach($applications as $app) { $acc = access_string($app->name); - echo "id ? - ("class='selected'") : "") - ." href='$local_path_to_root/index.php?application=".$app->id + echo "" .$acc[0] . ""; } echo ""; @@ -63,14 +58,14 @@ echo "
" . $db_connections[$_SESSION["wa_current_user"]->company]["name"] . " | " . $_SERVER['SERVER_NAME'] . " | " . $_SESSION["wa_current_user"]->name . "" . _("Preferences") . "   \n"; - echo " " . _("Change password") . "   \n"; + echo " " . _("Preferences") . "   \n"; + echo " " . _("Change password") . "   \n"; if ($help_base_url != null) { echo "$himg" . _("Help") . "   "; } - echo "$img" . _("Logout") . "   "; + echo "$img" . _("Logout") . "   "; echo "
"; echo "
"; } diff --git a/update.html b/update.html index 0e8e7810..6cdf420b 100644 --- a/update.html +++ b/update.html @@ -1,47 +1,152 @@ - - - + + + + + FrontAccounting Update + + + +

FrontAccounting +Update

+

Important Notes

+

Upgrade process can be done only by administrator of the first +company created during FrontAccounting installation. This person is +considered as a site admin who have granted access to potentially +dangerous setup options, like Setup/Software Upgrade.

+

In the following description sections related to older FA versions are +prefixed with [color tags] +. You can skip tagged fragment safely if currently FA +application is newer than the version in tag.

+

Upgrade process consists of up to four stages, some of them are +optional:

+
    +
  1. Application source files update +

    +
  2. Database upgrade – this step is needed only during + upgrade which involves change in major application version number + (e.g. from 2.2.x to 2.3.x), and sometimes during upgrade from beta + release to stable version. Otherwise this step can be skipped.

    +
  3. Final cleanup – is needed when some old source files, + obsoleted by new release should be removed.

    +
  4. New features configuration – this is optional step + needed for most major releases and some minor ones. +

    +
+

Before starting upgrade ensure nobody +is using the application and make database backup for all companies. +To be on safe side backup also old source files, especially those +locally customized (if any).

+

Log into admin account of first company. If +you use a theme other than the standard 3 (aqua, cool or default), +switch to one of these before going further.

+

1. Application files update

+

a. Source +files update

+

Extract distribution +zip/tar.gz file in empty directory, and copy all the files to your +FrontAccounting directory overwriting old files. If it is major +release upgrade you can skip next step and go directly to cleanup.

+

b. Configuration +files update

+

Compare new +config.default.php +file with the old +config.php and +add all new +settings (if any). +

+

[<FA +2.2beta]

+

$show_users_online = 0;

+

$def_print_destination += 0;

+

$dflt_date_fmt=0;

+

$dflt_date_sep=0;

+

$table_style,table_style2 +changed

+

[<FA +2.3beta]

+

$alternative_tax_include_on_doc=0;

+

$suppress_tax_rates = 0;

+

[<FA +2.3RC1] +

+

Application version +information and a couple of other private FA variables are stored in +version.php +file. The +application version displayed in footer is defined in $version +variable unless this is set in config.php file. If you want current +release version to be displayed on every FA update just remove or +comment out $version variable in config.php.

+

[<FA +2.3RC2]

+

$save_report_selections  = 0;  // A value > 0 means days to save the report selections

- - FrontAccounting Update - -
FrontAccounting Update
-
-

Important Notes

- -
    -
  • You can easily upload all the files to your installation folder on the -server overwriting the existing files. From 2.2 RC, your existing configuration files, - config_db.php, config.php, /lang/installed_languages.inc and installed_extensions.php - will nolonger be installed. They are created the first time you install FrontAccounting and don't need further updates.
      -
    • Backup  (download) the following files to another folder: -
      • if you have made changes to other files than above mentioned, like themes or so, backup -these files.
        -
      - -
    • Upload all the new files. -
    • Look into the file, config.default.php and compare with your own config.php file. You should update the the following in your config.php:

      • Change the $version in your config.php file, about line 59, from "2.X.X" to "2.2.11".
      • Change in line  67 to:
        $power_url         = "http://frontaccounting.com";

        Change in line 92 to:
        // $help_base_url = 'http://frontaccounting.com/fawiki/index.php?n=Help.';

        Paste these 2 lines into line 83:
         /* default print destination. 0 = PDF/Printer, 1 = Excel */
         $def_print_destination = 0;

        if this is an update from 2.2.6, 2.2.7, 2.2.8 , 2.2.9, 2.2.10 to 2.2.11 
        you are done and  should ignore the the rest of the items in this note.
      • Copy  the 2 lines from config.default file, about line  122:

        $table_style     = "class='tablestyle'";
        $table_style2     = "class='tablestyle2'";

        into config.php about line  122 and replace these 4 lines:

        if (!isset($_SESSION['bordercolor']))
            $_SESSION['bordercolor'] = "#8cacbb";
        $table_style     = "cellpadding=3 border=1 bordercolor='".$_SESSION['bordercolor']."' class='tablestyle'";
        $table_style2     = "cellpadding=3 border=1 bordercolor='#cccccc' class='tablestyle2'";

        If this is an update from 2.2.3, 2.2.4 , 2.2.5 to 2.2.11 
        you are done and  should ignore the the rest of the items in this note.
      • Copy these 2 lines from config.default.php about line 80-82 into config.php about line 80:

        /* Show users online discretetely in the footer */
        $show_users_online = 0;
        Change this to 1 if you want to show users online.
      • Remove these 2 lines from config.php about line 176-177:

        /* default start-up tab (orders/AP/stock/manuf/proj/GL/system) */
        $def_app = "orders";
      • Copy these 3 lines from config.default.php about line 113-115

        // defalt dateformats and dateseps indexes used before user login

        $dflt_date_fmt = 0;
        $dflt_date_sep = 0;
      • Copy these 2 lines from config.default.php about line 211-212:

        define("ICON_SUBMIT", "ok.gif");        // new in 2.2
        define("ICON_ESCAPE", "escape.png");    // new in 2.2
      • And paste them into config.php about line 209
      • If you use gregorian calendar and have non-workdays on Friday and first day of week = Saturday
        then you  should  set this line in config.php about line  95.
        $date_system = 3;
      • If you want to use FrontAccounting help wiki then set this line in config.php about line 85
        $help_base_url = "http://frontaccounting.net/fawiki?n=Help.";
    • Rename or remove the /install folder (you have already performed the install -process earlier).
      - - - -
    -
  • There are no database changes during a major and minor release. Like from 2.2 to 2.2.1 - 2.2.X .
  • If you are upgrading from an earlier installation you -must immediately -login on company 0, the first company you created, as admin -(called the superadmin). If you use a theme other than the standard 3, -aqua, cool or default, switch to one of these before going further. You -can download a new one of the new themes on the download page -later.  Go -to the 'Setup' tab and run 'Software -Upgrade'. -Mark the checkbox 'Install' and press 'Upgrade System'.  You must -also do this if you upgrade from 2.2 Beta to 2.2 RC. This will -upgrade ALL your companies.
  • If something goes wrong during upgrade, you can enter here again and try 'Force Upgrade', and press 'Upgrade System' again.
  • Enter -'Setup' tab, 'System and Generel GL Setup'.  Set the correct -Accounts for Retained Earnings, Profit/Loss Year and Bank Charge.
  • Enter -'Setup' tab, 'Access Setup'. Check all the roles and change as you -please. The roles have been converted from the former Access Roles and -may need some changes.
  • Enter -'Setup' tab, 'Company Setup'. If you want Automatic Item Price -Calculations from Standard Cost, add a percent to add and -eventually round to the nearest XX Cent. Also check that Base for Auto -Price calculations is set.
\ No newline at end of file +

2. Database upgrade

+

This step can be skipped +for small version updates i.e. when you have already installed +FrontAccounting version 2.3.1 or later. Before database upgrade is +done on all company databases backup file is created automatically to +enable database restore after failure.

+

After major version +upgrade overwriting files in first step makes the system unaccessible +for all users but site admin, who have to run upgrade procedures to +update all company databases to the new version provided with the +release. After logging to administrator account of first installed +company go directly to Setup/Software Upgrade screen, mark all +subsequent 'Install' checkboxes and press 'Upgrade System'.

+

If something goes wrong during +upgrade, you can eventually try forced upgrade option. Forced upgrade +ignores some smaller errors which can arise during upgrade due to +some exotic database configuration. This is depreciated option, so +first read error messages if any, try to fix signalized problems, +restore databases from backup and retry normal installation. To run +upgrade in forced mode check box 'Force Upgrade', and press 'Upgrade +System' again.

+

3. Final cleanup

+

Remove or rename install folder in main FrontAccounting directory. +

+

After upgrade is installed you can remove files obsoleted by new +FrontAccounting version. Also old, unused settings can +be removed from config.php +file.

+

a. +Source files cleanup

+

[<FA +2.2beta]

+

/includes/reserved.inc +– removed.

+

[<FA +2.1] +

+

/admin/db/v_banktrans.inc +- removed

+

b. +Config.php cleanup +

+

[<FA +2.2RC1] +

+

$security_headings, +$security_groups arrays – moved to database (see Access Setup) + +

+

$def_app – moved +to user configuration in database.

+

$version +– moved to version.php +file. Remove

+

4. New features configuration

+

During upgrade process new features are initialized to default +status, and sometimes old settings are also changed to conform with +new security policy. This automatic process is designed to be as +neutral for end users as possible, however sometimes site or company +admin intervention can be necessary to set thing after changes to +their best state. Below you will find description of new settings +available after upgrade.

+



+

+

----------------------

+
    + \ No newline at end of file diff --git a/version.php b/version.php new file mode 100644 index 00000000..3e920e54 --- /dev/null +++ b/version.php @@ -0,0 +1,25 @@ + 'anonymous', + 'pass' => 'password', + 'host' => 'repo.frontaccounting.eu', // repo server address + 'branch' => '2.3' // Repository branch for current sources version +); -- 2.30.2