From b17df731b4bb055c2fdd568bc4be9e5caa0ee07b Mon Sep 17 00:00:00 2001 From: Joe Hunt Date: Tue, 25 Nov 2008 00:35:19 +0000 Subject: [PATCH] Inserted Copyright Notice and fixed graphic items --- CHANGELOG.txt | 37 ++++++++ access/login.php | 10 +++ access/logout.php | 11 ++- admin/attachments.php | 17 +++- admin/backups.php | 11 ++- admin/change_current_user_password.php | 11 ++- admin/db/company_db.inc | 12 ++- admin/db/maintenance_db.inc | 11 ++- admin/db/printers_db.inc | 10 +++ admin/db/users_db.inc | 2 +- admin/db/v_banktrans.inc | 11 ++- admin/db/voiding_db.inc | 11 ++- admin/display_prefs.php | 2 +- admin/fiscalyears.php | 13 ++- admin/forms_setup.php | 11 ++- admin/gl_setup.php | 11 ++- admin/inst_upgrade.php | 11 ++- admin/payment_terms.php | 13 ++- admin/print_profiles.php | 10 +++ admin/printers.php | 13 ++- admin/shipping_companies.php | 14 ++- admin/users.php | 13 ++- admin/view_print_transaction.php | 15 +++- admin/void_transaction.php | 11 ++- gl/gl_journal.php | 11 ++- gl/includes/ui/gl_bank_ui.inc | 27 ++++-- gl/includes/ui/gl_journal_ui.inc | 27 ++++-- gl/inquiry/bank_inquiry.php | 15 +++- gl/inquiry/tax_inquiry.php | 15 +++- gl/manage/bank_accounts.php | 13 ++- includes/ui/ui_controls.inc | 6 +- reporting/includes/pdf_report.inc | 10 +++ reporting/rep709.php | 113 +++++++++++++++---------- sales/includes/ui/sales_credit_ui.inc | 21 +++-- sql/alter2.1.php | 10 +++ 35 files changed, 444 insertions(+), 115 deletions(-) diff --git a/CHANGELOG.txt b/CHANGELOG.txt index 60ab21c4..f90bd180 100644 --- a/CHANGELOG.txt +++ b/CHANGELOG.txt @@ -19,6 +19,43 @@ Legend: ! -> Note $ -> Affected files +25-Nov-2008 Joe Hunt +! Inserted Copyright Notice and fixed graphic items +$ /access/login.php + /access/logout.php + /admin/attachments.php + /admin/backups.php + /admin/change_current_user_password.php + /admin/db/company_db.inc + /admin/db/maintenence_db.inc + /admin/db/printers_db.inc + /admin/db/users_db.inc + /admin/db/v_banktrans.inc + /admin/db/voiding_db.inc + /admin/display_prefs.php + /admin/fiscalyears.php + /admin/forms_setup.php + /admin/gl_setup.php + /admin/inst_upgrade.php + /admin/payment_terms.php + /admin/print_profiles.php + /admin/printers.php + /admin/shipping_companies.php + /admin/users.php + /admin/view_print_transaction.php + /admin/void_transaction.php + /gl/gl_journal.php + /gl/includes/ui/gl_bank_ui.inc + /gl/includes/ui/gl_journal_ui.inc + /gl/inquiry/bank_inquiry.php + /gl/inquiry/tax_inquiry.php + /gl/manage/bank_accounts.php + /includes/ui/ui_controls.inc + /reporting/includes/pdf_report.inc + /reporting/rep709.php + /sales/includes/ui/sales_credit_ui.inc + /sql/alter2.1.php + 24-Nov-2008 Janusz Dobrowolski + Added alias/foreign item codes and sales kits support. $ /applications/inventory.php diff --git a/access/login.php b/access/login.php index 56441518..dc2a1965 100644 --- a/access/login.php +++ b/access/login.php @@ -1,4 +1,14 @@ . +***********************************************************************/ if (!isset($path_to_root) || isset($_GET['path_to_root']) || isset($_POST['path_to_root'])) die("Restricted access"); include_once($path_to_root . "/includes/ui/ui_view.inc"); diff --git a/access/logout.php b/access/logout.php index a52b4249..fc2a2d67 100644 --- a/access/logout.php +++ b/access/logout.php @@ -1,5 +1,14 @@ . +***********************************************************************/ $page_security = 1; $path_to_root=".."; include($path_to_root . "/includes/session.inc"); diff --git a/admin/attachments.php b/admin/attachments.php index a36801d4..fb5b5e68 100644 --- a/admin/attachments.php +++ b/admin/attachments.php @@ -1,5 +1,14 @@ . +***********************************************************************/ $path_to_root=".."; $page_security = 8; @@ -170,9 +179,9 @@ function display_rows($type) label_cell($row['filetype']); label_cell(sql2date($row['tran_date'])); edit_button_cell("Edit".$row['id'], _("Edit")); - edit_button_cell("view".$row['id'], _("View")); - edit_button_cell("download".$row['id'], _("Download")); - edit_button_cell("Delete".$row['id'], _("Delete")); + button_cell("view".$row['id'], _("View"), false, ICON_VIEW); + button_cell("download".$row['id'], _("Download"), false, ICON_DOWN); + delete_button_cell("Delete".$row['id'], _("Delete")); end_row(); } end_table(1); diff --git a/admin/backups.php b/admin/backups.php index 76c595a4..8dfec9a1 100644 --- a/admin/backups.php +++ b/admin/backups.php @@ -1,5 +1,14 @@ . +***********************************************************************/ $page_security = 15; $path_to_root=".."; diff --git a/admin/change_current_user_password.php b/admin/change_current_user_password.php index 1f739243..abfd8529 100644 --- a/admin/change_current_user_password.php +++ b/admin/change_current_user_password.php @@ -1,5 +1,14 @@ . +***********************************************************************/ $page_security=1; $path_to_root=".."; include_once($path_to_root . "/includes/session.inc"); diff --git a/admin/db/company_db.inc b/admin/db/company_db.inc index fde84cfe..817b5d19 100644 --- a/admin/db/company_db.inc +++ b/admin/db/company_db.inc @@ -1,6 +1,14 @@ . +***********************************************************************/ function update_company_gl_setup($debtors_act, $pyt_discount_act, $creditors_act, $freight_act, $exchange_diff_act, diff --git a/admin/db/maintenance_db.inc b/admin/db/maintenance_db.inc index 1a73d00a..d5124981 100644 --- a/admin/db/maintenance_db.inc +++ b/admin/db/maintenance_db.inc @@ -1,5 +1,14 @@ . +***********************************************************************/ function write_config_db($new = false) { global $path_to_root, $def_coy, $db_connections, $tb_pref_counter; diff --git a/admin/db/printers_db.inc b/admin/db/printers_db.inc index 043268a6..4d3fa96c 100644 --- a/admin/db/printers_db.inc +++ b/admin/db/printers_db.inc @@ -1,4 +1,14 @@ . +***********************************************************************/ function write_printer_def($id, $name, $descr, $queue, $host, $port, $timeout) { if ($id>0) diff --git a/admin/db/users_db.inc b/admin/db/users_db.inc index 876f183f..53f3c40c 100644 --- a/admin/db/users_db.inc +++ b/admin/db/users_db.inc @@ -1,6 +1,6 @@ . +***********************************************************************/ include_once($path_to_root . "/gl/includes/gl_db.inc"); function validate_bank_trans() diff --git a/admin/db/voiding_db.inc b/admin/db/voiding_db.inc index e81dd1b0..96e46a26 100644 --- a/admin/db/voiding_db.inc +++ b/admin/db/voiding_db.inc @@ -1,5 +1,14 @@ . +***********************************************************************/ include_once($path_to_root . "/sales/includes/sales_db.inc"); include_once($path_to_root . "/purchasing/includes/purchasing_db.inc"); include_once($path_to_root . "/inventory/includes/inventory_db.inc"); diff --git a/admin/display_prefs.php b/admin/display_prefs.php index 384c0e5b..d23363e1 100644 --- a/admin/display_prefs.php +++ b/admin/display_prefs.php @@ -1,6 +1,6 @@ . +***********************************************************************/ $page_security = 9; $path_to_root=".."; include_once($path_to_root . "/includes/session.inc"); @@ -141,7 +150,7 @@ function display_fiscalyears() label_cell($closed_text); edit_button_cell("Edit".$myrow['id'], _("Edit")); if ($myrow["id"] != $company_year) - edit_button_cell("Delete".$myrow['id'], _("Delete")); + delete_button_cell("Delete".$myrow['id'], _("Delete")); else label_cell(''); end_row(); diff --git a/admin/forms_setup.php b/admin/forms_setup.php index b4a8aa28..828a36fd 100644 --- a/admin/forms_setup.php +++ b/admin/forms_setup.php @@ -1,5 +1,14 @@ . +***********************************************************************/ $page_security =10; $path_to_root=".."; include($path_to_root . "/includes/session.inc"); diff --git a/admin/gl_setup.php b/admin/gl_setup.php index b6939747..e457da5c 100644 --- a/admin/gl_setup.php +++ b/admin/gl_setup.php @@ -1,5 +1,14 @@ . +***********************************************************************/ $page_security =10; $path_to_root=".."; include($path_to_root . "/includes/session.inc"); diff --git a/admin/inst_upgrade.php b/admin/inst_upgrade.php index 793e050b..9141808d 100644 --- a/admin/inst_upgrade.php +++ b/admin/inst_upgrade.php @@ -1,5 +1,14 @@ . +***********************************************************************/ $page_security = 20; $path_to_root=".."; include_once($path_to_root . "/includes/session.inc"); diff --git a/admin/payment_terms.php b/admin/payment_terms.php index 24969c94..2b323d27 100644 --- a/admin/payment_terms.php +++ b/admin/payment_terms.php @@ -1,5 +1,14 @@ . +***********************************************************************/ $page_security = 10; $path_to_root=".."; include($path_to_root . "/includes/session.inc"); @@ -164,7 +173,7 @@ while ($myrow = db_fetch($result)) label_cell($full_text); label_cell($after_text); edit_button_cell("Edit".$myrow["terms_indicator"], _("Edit")); - edit_button_cell("Delete".$myrow["terms_indicator"], _("Delete")); + delete_button_cell("Delete".$myrow["terms_indicator"], _("Delete")); end_row(); diff --git a/admin/print_profiles.php b/admin/print_profiles.php index 05e5b70a..49a8723f 100644 --- a/admin/print_profiles.php +++ b/admin/print_profiles.php @@ -1,4 +1,14 @@ . +***********************************************************************/ $page_security = 15; $path_to_root=".."; include($path_to_root . "/includes/session.inc"); diff --git a/admin/printers.php b/admin/printers.php index 89d64476..1b6d063b 100644 --- a/admin/printers.php +++ b/admin/printers.php @@ -1,5 +1,14 @@ . +***********************************************************************/ $page_security = 15; $path_to_root=".."; include($path_to_root . "/includes/session.inc"); @@ -89,7 +98,7 @@ while ($myrow = db_fetch($result)) label_cell($myrow['host']); label_cell($myrow['queue']); edit_button_cell("Edit".$myrow['id'], _("Edit")); - edit_button_cell("Delete".$myrow['id'], _("Delete")); + delete_button_cell("Delete".$myrow['id'], _("Delete")); end_row(); diff --git a/admin/shipping_companies.php b/admin/shipping_companies.php index 1c16fa3f..94dfd489 100644 --- a/admin/shipping_companies.php +++ b/admin/shipping_companies.php @@ -1,6 +1,14 @@ . +***********************************************************************/ $page_security = 14; $path_to_root=".."; include($path_to_root . "/includes/session.inc"); @@ -113,7 +121,7 @@ while ($myrow = db_fetch($result)) label_cell($myrow["phone"]); label_cell($myrow["address"]); edit_button_cell("Edit".$myrow[0], _("Edit")); - edit_button_cell("Delete".$myrow[0], _("Delete")); + delete_button_cell("Delete".$myrow[0], _("Delete")); end_row(); } diff --git a/admin/users.php b/admin/users.php index 05e9adc9..d99edc62 100644 --- a/admin/users.php +++ b/admin/users.php @@ -1,5 +1,14 @@ . +***********************************************************************/ $page_security=15; $path_to_root=".."; include_once($path_to_root . "/includes/session.inc"); @@ -122,7 +131,7 @@ while ($myrow = db_fetch($result)) edit_button_cell("Edit".$myrow["user_id"], _("Edit")); if (strcasecmp($myrow["user_id"], $_SESSION["wa_current_user"]->username) && $_SESSION["wa_current_user"]->access == 2) - edit_button_cell("Delete".$myrow["user_id"], _("Delete")); + delete_button_cell("Delete".$myrow["user_id"], _("Delete")); else label_cell(''); end_row(); diff --git a/admin/view_print_transaction.php b/admin/view_print_transaction.php index 8f4c319c..dbae9f34 100644 --- a/admin/view_print_transaction.php +++ b/admin/view_print_transaction.php @@ -1,5 +1,14 @@ . +***********************************************************************/ $path_to_root=".."; $page_security = 5; @@ -132,9 +141,9 @@ function handle_search() label_cell($line[$trans_no_name]); if ($trans_ref) label_cell($line[$trans_ref]); - label_cell(get_trans_view_str($_POST['filterType'],$line[$trans_no_name], _("View"))); + label_cell(get_trans_view_str($_POST['filterType'],$line[$trans_no_name], _("View"), ICON_VIEW)); if ($print_out) - label_cell(print_document_link($line[$trans_no_name], _("Print"), true, $print_type)); + label_cell(print_document_link($line[$trans_no_name], _("Print"), true, $print_type, ICON_PRINT)); label_cell(get_gl_view_str($_POST['filterType'], $line[$trans_no_name])); end_row(); diff --git a/admin/void_transaction.php b/admin/void_transaction.php index 4b566940..0e116ab9 100644 --- a/admin/void_transaction.php +++ b/admin/void_transaction.php @@ -1,5 +1,14 @@ . +***********************************************************************/ $path_to_root=".."; $page_security = 14; include_once($path_to_root . "/includes/session.inc"); diff --git a/gl/gl_journal.php b/gl/gl_journal.php index 2cef81c8..fe4b56c2 100644 --- a/gl/gl_journal.php +++ b/gl/gl_journal.php @@ -1,5 +1,14 @@ . +***********************************************************************/ $page_security = 3; $path_to_root=".."; include_once($path_to_root . "/includes/ui/items_cart.inc"); diff --git a/gl/includes/ui/gl_bank_ui.inc b/gl/includes/ui/gl_bank_ui.inc index fa6a500f..16266576 100644 --- a/gl/includes/ui/gl_bank_ui.inc +++ b/gl/includes/ui/gl_bank_ui.inc @@ -1,5 +1,14 @@ . +***********************************************************************/ function display_bank_header(&$order) { global $table_style2, $Ajax; @@ -114,13 +123,13 @@ function display_gl_items($title, &$order) if ($dim == 2) $th = array(_("Account Code"), _("Account Description"), _("Dimension")." 1", - _("Dimension")." 2", _("Amount"), _("Memo")); + _("Dimension")." 2", _("Amount"), _("Memo"), ""); else if ($dim == 1) $th = array(_("Account Code"), _("Account Description"), _("Dimension"), - _("Amount"), _("Memo")); + _("Amount"), _("Memo"), ""); else $th = array(_("Account Code"), _("Account Description"), - _("Amount"), _("Memo")); + _("Amount"), _("Memo"), ""); if (count($order->gl_items)) $th[] = ''; @@ -149,7 +158,7 @@ function display_gl_items($title, &$order) edit_button_cell("Edit$item->index", _("Edit"), _('Edit document line')); - edit_button_cell("Delete$item->index", _("Delete"), + delete_button_cell("Delete$item->index", _("Delete"), _('Remove line from document')); end_row(); } @@ -240,10 +249,10 @@ function gl_edit_item_controls(&$order, $dim, $Index=null) if ($id != -1) { - edit_button_cell('UpdateItem', _("Update"), - _('Confirm changes')); - edit_button_cell('CancelItemChanges', _("Cancel"), - _('Cancel changes')); + button_cell('UpdateItem', _("Update"), + _('Confirm changes'), ICON_UPDATE); + button_cell('CancelItemChanges', _("Cancel"), + _('Cancel changes'), ICON_CANCEL); set_focus('amount'); } else diff --git a/gl/includes/ui/gl_journal_ui.inc b/gl/includes/ui/gl_journal_ui.inc index 01a22ad3..c5b5eb15 100644 --- a/gl/includes/ui/gl_journal_ui.inc +++ b/gl/includes/ui/gl_journal_ui.inc @@ -1,5 +1,14 @@ . +***********************************************************************/ include_once($path_to_root . "/includes/ui.inc"); include_once($path_to_root . "/includes/ui/items_cart.inc"); @@ -64,13 +73,13 @@ function display_gl_items($title, &$order) start_table("$table_style colspan=7 width=95%"); if ($dim == 2) $th = array(_("Account Code"), _("Account Description"), _("Dimension")." 1", - _("Dimension")." 2", _("Debit"), _("Credit"), _("Memo")); + _("Dimension")." 2", _("Debit"), _("Credit"), _("Memo"), ""); else if ($dim == 1) $th = array(_("Account Code"), _("Account Description"), _("Dimension"), - _("Debit"), _("Credit"), _("Memo")); + _("Debit"), _("Credit"), _("Memo"), ""); else $th = array(_("Account Code"), _("Account Description"), - _("Debit"), _("Credit"), _("Memo")); + _("Debit"), _("Credit"), _("Memo"), ""); if (count($order->gl_items)) $th[] = ''; @@ -104,7 +113,7 @@ function display_gl_items($title, &$order) edit_button_cell("Edit$item->index", _("Edit"), _('Edit journal line')); - edit_button_cell("Delete$item->index", _("Delete"), + delete_button_cell("Delete$item->index", _("Delete"), _('Remove line from journal')); end_row(); } @@ -199,10 +208,10 @@ function gl_edit_item_controls(&$order, $dim, $Index=null) if ($id != -1) { - edit_button_cell('UpdateItem', _("Update"), - _('Confirm changes')); - edit_button_cell('CancelItemChanges', _("Cancel"), - _('Cancel changes')); + button_cell('UpdateItem', _("Update"), + _('Confirm changes'), ICON_UPDATE); + button_cell('CancelItemChanges', _("Cancel"), + _('Cancel changes'), ICON_CANCEL); set_focus('amount'); } else diff --git a/gl/inquiry/bank_inquiry.php b/gl/inquiry/bank_inquiry.php index 3d1ad53a..642db5ef 100644 --- a/gl/inquiry/bank_inquiry.php +++ b/gl/inquiry/bank_inquiry.php @@ -1,5 +1,14 @@ . +***********************************************************************/ $page_security = 8; $path_to_root="../.."; include_once($path_to_root . "/includes/session.inc"); @@ -72,7 +81,7 @@ $sql = "SELECT SUM(amount) FROM ".TB_PREF."bank_trans WHERE bank_act='" . $_POST $before_qty = db_query($sql, "The starting balance on hand could not be calculated"); start_row("class='inquirybg'"); -label_cell(""._("Opening Balance")." - ".$_POST['TransAfterDate']."", "colspan=5"); +label_cell(""._("Opening Balance")." - ".$_POST['TransAfterDate']."", "colspan=4"); $bfw_row = db_fetch_row($before_qty); $bfw = $bfw_row[0]; display_debit_or_credit_cells($bfw); @@ -110,7 +119,7 @@ while ($myrow = db_fetch($result)) //end of while loop start_row("class='inquirybg'"); -label_cell("" . _("Ending Balance")." - ". $_POST['TransToDate']. "", "colspan=5"); +label_cell("" . _("Ending Balance")." - ". $_POST['TransToDate']. "", "colspan=4"); display_debit_or_credit_cells($running_total); label_cell(""); end_row(); diff --git a/gl/inquiry/tax_inquiry.php b/gl/inquiry/tax_inquiry.php index 1de48969..0dc7d8f2 100644 --- a/gl/inquiry/tax_inquiry.php +++ b/gl/inquiry/tax_inquiry.php @@ -1,5 +1,14 @@ . +***********************************************************************/ $page_security = 8; $path_to_root="../.."; include_once($path_to_root . "/includes/session.inc"); @@ -123,8 +132,8 @@ function show_results() amount_cell($payable); end_row(); alt_table_row_color($k); - label_cell($tx['name'] . " " . $tx['rate'] . "%"); - label_cell(_("Net payable or collectible") . ":"); + label_cell("".$tx['name'] . " " . $tx['rate'] . "%"); + label_cell(""._("Net payable or collectible") . ":"); amount_cell($net, true); end_row(); } diff --git a/gl/manage/bank_accounts.php b/gl/manage/bank_accounts.php index 64cff25f..a3a59b3e 100644 --- a/gl/manage/bank_accounts.php +++ b/gl/manage/bank_accounts.php @@ -1,5 +1,14 @@ . +***********************************************************************/ $page_security = 10; $path_to_root="../.."; include($path_to_root . "/includes/session.inc"); @@ -119,7 +128,7 @@ while ($myrow = db_fetch($result)) label_cell($myrow["bank_account_number"], "nowrap"); label_cell($myrow["bank_address"]); edit_button_cell("Edit".$myrow["id"], _("Edit")); - edit_button_cell("Delete".$myrow["id"], _("Delete")); + delete_button_cell("Delete".$myrow["id"], _("Delete")); end_row(); } diff --git a/includes/ui/ui_controls.inc b/includes/ui/ui_controls.inc index 46744ae8..d851544c 100644 --- a/includes/ui/ui_controls.inc +++ b/includes/ui/ui_controls.inc @@ -187,10 +187,10 @@ function table_header($labels) //----------------------------------------------------------------------------------- -function set_icon($icon, $title) +function set_icon($icon, $title=false) { global $path_to_root; - return "\n"; + return "\n"; } function button($name, $value, $title=false, $icon=false) @@ -203,7 +203,7 @@ function button($name, $value, $title=false, $icon=false) $icon = ICON_DELETE; echo "