frontaccounting-cvs_updates Mailing List for FrontAccounting
Brought to you by:
frontaccounting,
itronics
You can subscribe to this list here.
| 2008 |
Jan
|
Feb
|
Mar
(10) |
Apr
(103) |
May
(94) |
Jun
(247) |
Jul
(134) |
Aug
(117) |
Sep
(87) |
Oct
(232) |
Nov
(307) |
Dec
(180) |
|---|---|---|---|---|---|---|---|---|---|---|---|---|
| 2009 |
Jan
(272) |
Feb
(194) |
Mar
(300) |
Apr
(115) |
May
(168) |
Jun
(215) |
Jul
(129) |
Aug
(162) |
Sep
(262) |
Oct
(251) |
Nov
(136) |
Dec
(174) |
| 2010 |
Jan
(202) |
Feb
(186) |
Mar
(77) |
Apr
(88) |
May
(69) |
Jun
(134) |
Jul
(92) |
Aug
(166) |
Sep
(74) |
Oct
(141) |
Nov
(142) |
Dec
(134) |
| 2011 |
Jan
(120) |
Feb
|
Mar
(11) |
Apr
(55) |
May
(42) |
Jun
(26) |
Jul
(21) |
Aug
(22) |
Sep
(14) |
Oct
(21) |
Nov
(24) |
Dec
(6) |
| 2012 |
Jan
(22) |
Feb
(19) |
Mar
(12) |
Apr
(19) |
May
(10) |
Jun
(12) |
Jul
(1) |
Aug
(8) |
Sep
(27) |
Oct
(19) |
Nov
(34) |
Dec
(5) |
| 2013 |
Jan
(48) |
Feb
(18) |
Mar
(20) |
Apr
(18) |
May
(27) |
Jun
(17) |
Jul
(8) |
Aug
(11) |
Sep
(22) |
Oct
(19) |
Nov
(9) |
Dec
(9) |
| 2014 |
Jan
(6) |
Feb
(4) |
Mar
(7) |
Apr
(5) |
May
(15) |
Jun
(4) |
Jul
(5) |
Aug
(4) |
Sep
(23) |
Oct
(6) |
Nov
(8) |
Dec
(20) |
| 2015 |
Jan
(43) |
Feb
(18) |
Mar
(19) |
Apr
|
May
|
Jun
|
Jul
|
Aug
|
Sep
|
Oct
|
Nov
|
Dec
|
| 2020 |
Jan
|
Feb
|
Mar
|
Apr
|
May
|
Jun
|
Jul
|
Aug
|
Sep
(1) |
Oct
|
Nov
|
Dec
|
|
From: Abhinav C. <abh...@gm...> - 2020-09-18 19:15:29
|
hello ,
Please Provide me csv templates of master data ..how to import
master
Thanks and regards
|
|
From: FrontAccounting <fro...@us...> - 2015-03-24 09:51:32
|
details: http://frontaccounting.hg.sourceforge.net:8000/hgroot/frontaccounting/frontaccounting/hg/p/frontaccounting/mercurial/rev/88bf73f9bf4a changeset: 3544:88bf73f9bf4a user: Janusz Dobrowolski <ja...@fr...> date: Tue Mar 24 10:45:05 2015 +0100 description: Reverting mistakenly added/removed files diffstat: admin/includes/fa_patch.class.inc | 256 -------- admin/includes/index.php | 2 - admin/view/view_package.php | 60 -- admin/view/view_upgrade_log.php | 38 - doc/api_changes.txt | 71 -- gl/manage/close_period.php | 108 --- includes/app_entries.inc | 54 - includes/db/allocations_db.inc | 117 ---- includes/db/connect_db_mysql.inc | 272 --------- includes/db/connect_db_mysqli.inc | 277 --------- includes/lang/gettext.inc | 570 ------------------- includes/lang/gettext.php | 572 ++++++++++++++++++++ includes/lang/language.inc | 92 --- includes/lang/language.php | 96 +++ includes/systypes.inc | 83 ++ includes/ui/view_package.php | 60 ++ manufacturing/includes/db/work_order_costing_db.inc | 302 ---------- manufacturing/view/wo_costs_view.php | 71 -- reporting/rep602.php | 219 ------- sql/alter2.4.php | 267 --------- sql/alter2.4.sql | 153 ----- themes/aqua/images/closed.png | Bin themes/aqua/images/log.png | Bin themes/cool/images/closed.png | Bin themes/cool/images/log.png | Bin themes/default/images/closed.png | Bin themes/default/images/log.png | Bin 27 files changed, 811 insertions(+), 2929 deletions(-) diffs (truncated from 3838 to 300 lines): diff -r 74ca7a515436 -r 88bf73f9bf4a admin/includes/fa_patch.class.inc --- a/admin/includes/fa_patch.class.inc Tue Mar 24 09:55:19 2015 +0100 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,256 +0,0 @@ -<?php -/********************************************************************** - 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 <http://www.gnu.org/licenses/gpl-3.0.html>. -***********************************************************************/ - -// -// Utility class contains basic database upgrade routines. -// -class fa_patch { - var $previous; // previous database version - var $version; // version after upgrade - var $description; // short patch description - - var $sql; // basic sql file - - var $cur_company; - var $backup; // pre-upgrade backup filename - - var $errors = array(); - var $ma_upgrade_time = 300; - - function fa_patch() - { - global $path_to_root; - - include $path_to_root."/config_db.php"; - - $this->companies = $db_connections; - - return $this->companies; - } - - /* - Collect/log messages generated during upgrade process. - */ - function log_error($msg, $type='Error') - { - if ($type == 'Error') - $this->errors[] = $msg; - error_log(sprintf('[%s] %s', $type, $msg)); - return false; - } - - /* - Pre-install maintenance: login to company, open upgrade log, make a backup - */ - function pre_install($company) - { - global $SysPrefs; - - $this->cur_company = $company; - $this->errors = array(); - $this->backup = null; - - $this->save_log = ini_set('error_log', dirname(__FILE__).'/../../tmp/upgrade.'.$this->cur_company.'.log'); - $this->log_error(sprintf(_("Upgrade started for company %s."), $this->cur_company), 'Info'); - - if (!set_global_connection($this->cur_company)) - return $this->log_error(_("Cannot connect to company database.")); - - $cur_ver = get_company_pref('version_id', true); - if ($cur_ver != $this->previous) - return $this->log_error(sprintf(_("Cannot upgrade company %s: database version is incompatible ('%s' instead of '%s')."), - $this->cur_company, $cur_ver, $this->previous)); - - if (!$this->prepare()) // fetch params, perform additional checks (if any) - return false; - - if (!$this->sql) - return true; // skip security backup if database content is not changed - - $this->backup = db_backup($this->companies[$this->cur_company], 'no', 'Security backup before upgrade', - $SysPrefs->backup_dir($this->cur_company)); - - if (!$this->backup) - return $this->log_error(_("Security backup failed.")); - - $this->log_error(sprintf(_("Security backup in file %s done."), $this->backup), 'Info'); - return true; - } - - /* - Basic install procedure using sql file. - */ - function sql_install($company, $force=false) - { - global $path_to_root; - - if ($this->sql != '') // perform basic upgrade operations defined in sql file - { - $result = true; - - if ($result === true) - $result = db_import($path_to_root. '/sql/'.$this->sql, $this->companies[$company], - $force, true, false, true); - - if ($result !== true) - { - if (is_array($result)) - { - foreach($result as $err) - $this->log_error($err[1] . ':'. $err[0]); - } else - { - $this->log_error($result); - unset($this->backup); // prevent restore (database was not touched due to other errors) - } - return false; - } - } - return true; - } - - /* - Post install procedures: update database version, or restore databse from backup file in case of errors - */ - function post_install($result=true) - { - global $db_version; - - if ($result !== true) - { - if ($this->backup) - { - if (!set_global_connection($this->cur_company)) // reset connection to clear encoding - return $this->log_error(_("Cannot connect to company database for database restore.")); - - set_time_limit($this->max_upgrade_time); - $result = db_import($this->backup, $this->companies[$this->cur_company], true, false); - if ($result) - $this->log_error(_("Upgrade failed. Original database content restored successfully."), 'Info'); - else - $thi->log_error(sprintf(_("Database restore operation failed. Original database content is in %s file."), $this->backup)); - $this->post_fail($this->cur_company); - } - } else { - update_company_prefs(array('version_id' => $this->version)); - } - - $this->log_error(sprintf(_("Upgrade for company %s finished."), $this->cur_company), 'Info'); - - set_global_connection(); - ini_set('error_log', $this->save_log); - - if (db_fixed()) - db_set_encoding(); - - return $result; - } - - /* - Main routine for single company upgrade. - */ - function upgrade_company($comp, $force=false) - { - $result = $this->pre_install($comp) && $this->sql_install($comp, $force) && $this->install($comp, $force); - - $this->post_install($result); - - return count($this->errors) == 0; - } - - /* - Additional version specific php/sql upgrade procedures. - This procedure is performed after basic sql upgrade script is run. - */ - function install($company, $force=false) - { - return true; - } - /* - Optional cleanup procedure. - This procedure is run in case of upgrade failure, before the backup is restored. - */ - function post_fail($company) - { - } - - /* - Present upgrade parameters to administrator - This function presents upgrade choices, after selection company to be upgraded. - */ - function show_params($comp) - { - } - - /* - Fetch & check upgrade parameters, check additional upgrade pre-conditions. - This function is run after successfull switching to target database connection. - */ - function prepare() - { - return true; - } - -} - -/* - Return databases status info. -*/ -function get_site_status($connections) -{ - $info = array(); - - foreach($connections as $i => $conn) - { - $info[$i]['status'] = set_global_connection($i) !== false; - - $info[$i]['name'] = $conn['name']; - $info[$i]['table_set'] = $conn['host'].'/'.$conn['dbname'].':'.$conn['tbpref'].'*'; - if ($info[$i]['status']) - { - $info[$i]['version'] = get_company_pref('version_id'); - } - } - set_global_connection(); - refresh_sys_prefs(); - - return $info; -} - -/* - Creates table of installer objects sorted by applicable db scheme version. -*/ -function get_installers() -{ - global $path_to_root; - - $patchdir = $path_to_root."/sql/"; - $upgrades = array(); - $datadir = @opendir($patchdir); - - if ($datadir) - { - while(false !== ($fname = readdir($datadir))) - { // check all php files but index.php - if (!is_dir($patchdir . $fname) && ($fname != 'index.php') - && stristr($fname, '.php') != false && $fname[0] != '.') - { - unset($install); - include_once($patchdir . $fname); - if (isset($install)) // add installer if found - $upgrades[$install->previous] = $install; - } - } - ksort($upgrades); // sort by file name - } - return $upgrades; -} diff -r 74ca7a515436 -r 88bf73f9bf4a admin/includes/index.php --- a/admin/includes/index.php Tue Mar 24 09:55:19 2015 +0100 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,2 +0,0 @@ -<?php -header("Location: ../index.php"); diff -r 74ca7a515436 -r 88bf73f9bf4a admin/view/view_package.php --- a/admin/view/view_package.php Tue Mar 24 09:55:19 2015 +0100 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,60 +0,0 @@ -<?php -/********************************************************************** - 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 <http://www.gnu.org/licenses/gpl-3.0.html>. -***********************************************************************/ -$page_security = 'SA_OPEN'; -$path_to_root = "../.."; -include_once($path_to_root . "/includes/session.inc"); -include_once($path_to_root . "/includes/packages.inc"); - -page(_($help_context = "Package Details"), true); - -include_once($path_to_root . "/includes/ui.inc"); - -if (!isset($_GET['id'])) -{ - /*Script was not passed the correct parameters */ - display_note(_("The script must be called with a valid package id to review the info for.")); - end_page(); -} - -$filter = array( - 'Version' => _('Available version'), - 'Type' => _('Package type'), |
|
From: FrontAccounting <fro...@us...> - 2015-03-24 07:42:04
|
details: http://frontaccounting.hg.sourceforge.net:8000/hgroot/frontaccounting/frontaccounting/hg/p/frontaccounting/mercurial/rev/c3ecb6c1b597 changeset: 3542:c3ecb6c1b597 user: Janusz Dobrowolski <ja...@fr...> date: Tue Mar 24 08:40:37 2015 +0100 description: Reverting last 11 commits pushed to defualt instead of unstable. diffstat: admin/backups.php | 2 +- admin/company_preferences.php | 14 + admin/db/company_db.inc | 13 +- admin/db/fiscalyears_db.inc | 24 +- admin/db/transactions_db.inc | 46 +- admin/db/voiding_db.inc | 41 +- admin/gl_setup.php | 49 +++ admin/includes/fa_patch.class.inc | 4 +- admin/void_transaction.php | 6 +- gl/accruals.php | 51 +- gl/gl_journal.php | 312 ++----------------- gl/includes/db/gl_db_accounts.inc | 12 - gl/includes/db/gl_db_bank_accounts.inc | 20 +- gl/includes/db/gl_db_banking.inc | 47 +-- gl/includes/db/gl_db_trans.inc | 314 +++++++++++-------- gl/includes/db/gl_journal.inc | 166 ---------- gl/includes/gl_db.inc | 1 - gl/includes/ui/gl_journal_ui.inc | 93 ++--- gl/inquiry/journal_inquiry.php | 31 +- gl/manage/gl_quick_entries.php | 32 +- gl/view/gl_trans_view.php | 62 +-- includes/db/audit_trail_db.inc | 24 +- includes/db/connect_db_mysql.inc | 3 +- includes/db/connect_db_mysqli.inc | 4 +- includes/db/inventory_db.inc | 47 +- includes/prefs/sysprefs.inc | 8 +- includes/session.inc | 2 +- includes/types.inc | 3 - includes/ui/allocation_cart.inc | 63 +-- includes/ui/items_cart.inc | 310 +++---------------- includes/ui/ui_controls.inc | 59 +-- includes/ui/ui_input.inc | 8 - includes/ui/ui_lists.inc | 21 - includes/ui/ui_view.inc | 138 +++----- inventory/includes/db/items_trans_db.inc | 20 +- manufacturing/includes/db/work_order_costing_db.inc | 14 +- purchasing/allocations/supplier_allocation_main.php | 4 +- purchasing/includes/db/invoice_db.inc | 23 +- purchasing/includes/db/po_db.inc | 6 +- purchasing/includes/db/supp_trans_db.inc | 16 +- purchasing/includes/db/suppalloc_db.inc | 101 ++--- purchasing/includes/db/suppliers_db.inc | 22 +- purchasing/includes/po_class.inc | 9 +- purchasing/includes/purchasing_db.inc | 14 +- purchasing/includes/supp_trans_class.inc | 4 +- purchasing/includes/ui/invoice_ui.inc | 8 + purchasing/includes/ui/po_ui.inc | 11 + purchasing/inquiry/supplier_allocation_inquiry.php | 33 +- purchasing/manage/suppliers.php | 7 +- purchasing/po_entry_items.php | 5 + purchasing/supplier_invoice.php | 4 + purchasing/supplier_payment.php | 6 +- reporting/includes/reporting.inc | 4 +- reporting/rep101.php | 55 +-- reporting/rep102.php | 22 +- reporting/rep209.php | 4 +- reporting/rep709.php | 8 +- sales/includes/db/branches_db.inc | 10 - sales/includes/db/cust_trans_db.inc | 35 +- sales/includes/db/custalloc_db.inc | 137 +++----- sales/includes/db/customers_db.inc | 13 +- sales/includes/db/sales_credit_db.inc | 2 +- sales/includes/db/sales_delivery_db.inc | 2 +- sales/includes/db/sales_invoice_db.inc | 15 +- sales/inquiry/customer_allocation_inquiry.php | 8 +- sales/inquiry/customer_inquiry.php | 5 +- sql/alter2.4.sql | 77 +---- sql/en_US-demo.sql | 90 ++--- sql/en_US-new.sql | 50 +-- 69 files changed, 961 insertions(+), 1913 deletions(-) diffs (truncated from 5594 to 300 lines): diff -r 5a8b7ae3fb91 -r c3ecb6c1b597 admin/backups.php --- a/admin/backups.php Sun Mar 22 11:20:11 2015 +0100 +++ b/admin/backups.php Tue Mar 24 08:40:37 2015 +0100 @@ -140,7 +140,7 @@ if ($backup_name) { if (db_import($backup_path, $conn)) display_notification(_("Restore backup completed.")); - $SysPrefs->refesh(); // re-read system setup + refresh_sys_prefs(); // re-read system setup } else display_error(_("Select backup file first.")); } diff -r 5a8b7ae3fb91 -r c3ecb6c1b597 admin/company_preferences.php --- a/admin/company_preferences.php Sun Mar 22 11:20:11 2015 +0100 +++ b/admin/company_preferences.php Tue Mar 24 08:40:37 2015 +0100 @@ -117,6 +117,20 @@ $Ajax->activate('_page_body'); } /* end of if submit */ +//--------------------------------------------------------------------------------------------- +if (get_company_pref('bcc_email') === null) { // available from 2.3.14, can be not defined on pre-2.4 installations + set_company_pref('bcc_email', 'setup.company', 'varchar', 100, ''); + refresh_sys_prefs(); +} +if (get_company_pref('alternative_tax_include_on_docs') === null) { // available from 2.3.14, can be not defined on pre-2.4 installations + set_company_pref('alternative_tax_include_on_docs', 'setup.company', 'tinyint', 1, '0'); + refresh_sys_prefs(); +} +if (get_company_pref('suppress_tax_rates') === null) { // available from 2.3.14, can be not defined on pre-2.4 installations + set_company_pref('suppress_tax_rates', 'setup.company', 'tinyint', 1, '0'); + refresh_sys_prefs(); +} + start_form(true); $myrow = get_company_prefs(); diff -r 5a8b7ae3fb91 -r c3ecb6c1b597 admin/db/company_db.inc --- a/admin/db/company_db.inc Sun Mar 22 11:20:11 2015 +0100 +++ b/admin/db/company_db.inc Tue Mar 24 08:40:37 2015 +0100 @@ -35,7 +35,7 @@ global $SysPrefs, $db_version; if (!isset($SysPrefs->prefs)) // just after first login or reset - $SysPrefs->refresh(); + $SysPrefs->refresh_company_prefs(); $all = $SysPrefs->prefs; @@ -63,6 +63,17 @@ return db_query($sql, "cannot set company pref"); } +function refresh_sys_prefs() +{ + global $SysPrefs; + +// flush_dir(user_js_cache()); // clear cache + unset($_SESSION['SysPrefs']); + $_SESSION['SysPrefs'] = new sys_prefs(); + $SysPrefs = &$_SESSION['SysPrefs']; + $SysPrefs->refresh_company_prefs(); +} + function get_base_sales_type() { return get_company_pref('base_sales'); diff -r 5a8b7ae3fb91 -r c3ecb6c1b597 admin/db/fiscalyears_db.inc --- a/admin/db/fiscalyears_db.inc Sun Mar 22 11:20:11 2015 +0100 +++ b/admin/db/fiscalyears_db.inc Tue Mar 24 08:40:37 2015 +0100 @@ -128,8 +128,6 @@ //--------------------------------------------------------------------------------------------- function close_year($year) { - global $Refs; - $co = get_company_prefs(); if (get_gl_account($co['retained_earnings_act']) == false || get_gl_account($co['profit_loss_year_act']) == false) { @@ -159,15 +157,15 @@ if ($balance != 0.0) { - $cart = new items_cart(ST_JOURNAL); - $cart->reference = $Refs->get_next(ST_JOURNAL, null, $to); - $cart->tran_date = $cart->doc_date = $cart->event_date = $to; + $trans_type = ST_JOURNAL; + $trans_id = get_next_trans_no($trans_type); - $cart->add_gl_item($co['retained_earnings_act'], 0, 0, -$balance, _("Closing Year"), '', 0); - $cart->add_gl_item($co['profit_loss_year_act'], 0, 0, $balance, _("Closing Year"), '', 0); - $cart->memo_ = _("Closing Year"); - write_journal_entries($cart); - } + 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(); @@ -370,10 +368,10 @@ { global $Refs; $trans_type = ST_JOURNAL; + $reference = $Refs->get_next($trans_type); + $Refs->save($trans_type, $trans_no, $reference); $date_ = sql2date($to); - $reference = $Refs->get_next($trans_type, null, $date_); - add_journal($trans_type, $trans_no, $total, $date_, get_company_currency(), $reference); - $Refs->save($trans_type, $trans_no, $reference); + add_audit_trail($trans_type, $trans_no, $date_); } $sql = "SELECT bank_act, SUM(amount) AS amount FROM ".TB_PREF."bank_trans WHERE trans_date <= '$to' GROUP BY bank_act"; diff -r 5a8b7ae3fb91 -r c3ecb6c1b597 admin/db/transactions_db.inc --- a/admin/db/transactions_db.inc Sun Mar 22 11:20:11 2015 +0100 +++ b/admin/db/transactions_db.inc Tue Mar 24 08:40:37 2015 +0100 @@ -186,30 +186,30 @@ { switch ($type) { - case ST_JOURNAL : return array(TB_PREF."journal", "type", "trans_no", "reference", "tran_date"); - case ST_BANKPAYMENT : return array(TB_PREF."bank_trans", "type", "trans_no", "ref", "trans_date"); - case ST_BANKDEPOSIT : return array(TB_PREF."bank_trans", "type", "trans_no", "ref", "trans_date"); + case ST_JOURNAL : return array("".TB_PREF."gl_trans", "type", "type_no", null, "tran_date"); + case ST_BANKPAYMENT : return array("".TB_PREF."bank_trans", "type", "trans_no", "ref", "trans_date"); + case ST_BANKDEPOSIT : return array("".TB_PREF."bank_trans", "type", "trans_no", "ref", "trans_date"); case 3 : return null; - case ST_BANKTRANSFER : return array(TB_PREF."bank_trans", "type", "trans_no", "ref", "trans_date"); - case ST_SALESINVOICE : return array(TB_PREF."debtor_trans", "type", "trans_no", "reference", "tran_date"); - case ST_CUSTCREDIT : return array(TB_PREF."debtor_trans", "type", "trans_no", "reference", "tran_date"); - case ST_CUSTPAYMENT : return array(TB_PREF."debtor_trans", "type", "trans_no", "reference", "tran_date"); - 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", "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"); - case ST_SUPPRECEIVE : return array(TB_PREF."grn_batch", null, "id", "reference", "delivery_date"); - case ST_WORKORDER : return array(TB_PREF."workorders", null, "id", "wo_ref", "released_date"); - case ST_MANUISSUE : return array(TB_PREF."wo_issues", null, "issue_no", "reference", "issue_date"); - case ST_MANURECEIVE : return array(TB_PREF."wo_manufacture", null, "id", "reference", "date_"); - case ST_SALESORDER : return array(TB_PREF."sales_orders", "trans_type", "order_no", "reference", "ord_date"); - case 31 : return array(TB_PREF."service_orders", null, "order_no", "cust_ref", "date"); - case ST_SALESQUOTE : return array(TB_PREF."sales_orders", "trans_type", "order_no", "reference", "ord_date"); - case ST_DIMENSION : return array(TB_PREF."dimensions", null, "id", "reference", "date_"); - case ST_COSTUPDATE : return array(TB_PREF."gl_trans", "type", "type_no", null, "tran_date"); + case ST_BANKTRANSFER : return array("".TB_PREF."bank_trans", "type", "trans_no", "ref", "trans_date"); + case ST_SALESINVOICE : return array("".TB_PREF."debtor_trans", "type", "trans_no", "reference", "tran_date"); + case ST_CUSTCREDIT : return array("".TB_PREF."debtor_trans", "type", "trans_no", "reference", "tran_date"); + case ST_CUSTPAYMENT : return array("".TB_PREF."debtor_trans", "type", "trans_no", "reference", "tran_date"); + 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", "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"); + case ST_SUPPRECEIVE : return array("".TB_PREF."grn_batch", null, "id", "reference", "delivery_date"); + case ST_WORKORDER : return array("".TB_PREF."workorders", null, "id", "wo_ref", "released_date"); + case ST_MANUISSUE : return array("".TB_PREF."wo_issues", null, "issue_no", "reference", "issue_date"); + case ST_MANURECEIVE : return array("".TB_PREF."wo_manufacture", null, "id", "reference", "date_"); + case ST_SALESORDER : return array("".TB_PREF."sales_orders", "trans_type", "order_no", "reference", "ord_date"); + case 31 : return array("".TB_PREF."service_orders", null, "order_no", "cust_ref", "date"); + case ST_SALESQUOTE : return array("".TB_PREF."sales_orders", "trans_type", "order_no", "reference", "ord_date"); + case ST_DIMENSION : return array("".TB_PREF."dimensions", null, "id", "reference", "date_"); + case ST_COSTUPDATE : return array("".TB_PREF."gl_trans", "type", "type_no", null, "tran_date"); } display_db_error("invalid type ($type) sent to get_systype_db_info", "", true); diff -r 5a8b7ae3fb91 -r c3ecb6c1b597 admin/db/voiding_db.inc --- a/admin/db/voiding_db.inc Sun Mar 22 11:20:11 2015 +0100 +++ b/admin/db/voiding_db.inc Tue Mar 24 08:40:37 2015 +0100 @@ -20,96 +20,93 @@ $void_entry = get_voided_entry($type, $type_no); if ($void_entry != null) - return _('This transaction was already voided before.'); + return false; switch ($type) { case ST_JOURNAL : // it's a journal entry if (!exists_gl_trans($type, $type_no)) - return _('Selected transaction does not exists.'); + return false; void_journal_trans($type, $type_no); break; case ST_BANKDEPOSIT : // it's a deposit case ST_BANKTRANSFER : // it's a transfer if (!check_void_bank_trans($type, $type_no)) - return _('This transaction cannot be voided because the operation would decrease account balance below allowed limit in some point of account history.'); + return false; case ST_BANKPAYMENT : // it's a payment if (!exists_bank_trans($type, $type_no)) - return _('Selected transaction does not exists.'); + return false; void_bank_trans($type, $type_no); break; case ST_CUSTPAYMENT : // it's a customer payment if (!check_void_bank_trans($type, $type_no)) - return _('This transaction cannot be voided because the operation would decrease account balance below allowed limit in some point of account history.'); + return false; case ST_SALESINVOICE : // it's a customer invoice - if (is_cust_invoice_credited($type_no)) - return _('This invoice cannot be voided because it was already credited.'); case ST_CUSTCREDIT : // it's a customer credit note case ST_CUSTDELIVERY : // it's a customer dispatch if (!exists_customer_trans($type, $type_no)) - return _('Selected transaction does not exists.'); + return false; if ($type == ST_CUSTDELIVERY) // added 04 Oct 2008 by Joe Hunt. If delivery note has a not voided invoice, then NO. { $childs = get_sales_child_lines($type, $type_no, false); // 2011-03-17 This had been changed. Joe if ($childs && db_num_rows($childs)) - return _('This delivery cannot be voided because it was already invoiced.'); + return false; } post_void_customer_trans($type, $type_no); break; case ST_LOCTRANSFER : // it's a stock transfer if (get_stock_transfer_items($type_no) == null) - return _('Selected transaction does not exists.'); + return false; void_stock_transfer($type_no); break; case ST_INVADJUST : // it's a stock adjustment if (get_stock_adjustment_items($type_no) == null) - return _('Selected transaction does not exists.'); + return false; void_stock_adjustment($type_no); break; case ST_PURCHORDER : // it's a PO - return _('This transaction type cannot be voided.'); - break; + return false; case ST_SUPPRECEIVE : // it's a GRN if (exists_grn_on_invoices($type_no)) - return _('This GRN cannot be voided because it was already invoiced.'); + return false; case ST_SUPPINVOICE : // it's a suppler invoice case ST_SUPPCREDIT : // it's a supplier credit note case ST_SUPPAYMENT : // it's a supplier payment if (!exists_supp_trans($type, $type_no)) - return _('Selected transaction does not exists.'); + return false; if (!post_void_supp_trans($type, $type_no)) - return _('Error encountered when voiding transaction.'); + return false; break; case ST_WORKORDER : // it's a work order if (!get_work_order($type_no, true)) - return _('Selected transaction does not exists.'); + return false; void_work_order($type_no); break; case ST_MANUISSUE : // it's a work order issue if (!exists_work_order_issue($type_no)) - return _('Selected transaction does not exists.'); + return false; void_work_order_issue($type_no); break; case ST_MANURECEIVE : // it's a work order production if (!exists_work_order_produce($type_no)) - return _('Selected transaction does not exists.'); + return false; void_work_order_produce($type_no); break; case ST_SALESORDER: // it's a sales order case ST_SALESQUOTE: // it's a sales quotation - return _('This transaction type cannot be voided.'); + return false; case ST_COSTUPDATE : // it's a stock cost update - return _('This transaction type cannot be voided.'); + return false; break; } @@ -117,7 +114,7 @@ add_audit_trail($type, $type_no, $date_, _("Voided.")."\n".$memo_); $Refs->restore_last($type, $type_no); add_voided_entry($type, $type_no, $date_, $memo_); - return false; + return true; } //-------------------------------------------------------------------------------------------------- |
|
From: FrontAccounting <fro...@us...> - 2015-03-23 22:35:16
|
details: http://frontaccounting.hg.sourceforge.net:8000/hgroot/frontaccounting/frontaccounting/hg/p/frontaccounting/mercurial/rev/5d3d6225aff7 changeset: 3540:5d3d6225aff7 user: Janusz Dobrowolski <ja...@fr...> date: Sun Mar 22 07:54:03 2015 +0100 description: Fixed bug in journal related part of sql upgrade script. diffstat: sql/alter2.4.sql | 6 +++--- 1 files changed, 3 insertions(+), 3 deletions(-) diffs (23 lines): diff -r 8cc83d4ecb47 -r 5d3d6225aff7 sql/alter2.4.sql --- a/sql/alter2.4.sql Thu Mar 19 22:07:38 2015 +0100 +++ b/sql/alter2.4.sql Sun Mar 22 07:54:03 2015 +0100 @@ -148,7 +148,7 @@ UPDATE `0_supp_invoice_items` si LEFT JOIN `0_gl_trans` gl ON si.supp_trans_type=gl.`type` AND si.supp_trans_no=gl.type_no AND si.gl_code=gl.account SET si.dimension_id=gl.dimension_id, si.dimension2_id=gl.dimension2_id -WHERE si.grn_item_id=-1 AND (gl.dimension_id OR gl.dimension2_id) +WHERE si.grn_item_id=-1 AND (gl.dimension_id OR gl.dimension2_id); ALTER TABLE `0_quick_entries` ADD COLUMN `usage` varchar(120) NULL AFTER `description`; ALTER TABLE `0_quick_entry_lines` ADD COLUMN `memo` tinytext NOT NULL AFTER `amount`; @@ -185,8 +185,8 @@ ) ENGINE=InnoDB DEFAULT CHARSET=utf8 ; INSERT INTO `0_journal` (`type`, `trans_no`, `tran_date`, `reference`, `event_date`,`doc_date`,`currency`,`amount`) - SELECT `gl`.`type`, `gl`.`type_no`, `gl`.`tran_date`, `ref`.`reference`, `gl`.`event_date`, - `gl`.`doc_date`, `sys_curr`.`value`, SUM(IF(`gl`.`amount`>0,`gl`.`amount`,0)) + SELECT `gl`.`type`, `gl`.`type_no`, `gl`.`tran_date`, `ref`.`reference`, `gl`.`tran_date`, + `gl`.`tran_date`, `sys_curr`.`value`, SUM(IF(`gl`.`amount`>0,`gl`.`amount`,0)) FROM `0_gl_trans` gl LEFT JOIN `0_refs` ref ON gl.type = ref.type AND gl.type_no=ref.id LEFT JOIN `0_sys_prefs` sys_curr ON `sys_curr`.`name`='curr_default' WHERE `gl`.`type` IN(0, 35) |
|
From: FrontAccounting <fro...@us...> - 2015-03-23 22:35:16
|
details: http://frontaccounting.hg.sourceforge.net:8000/hgroot/frontaccounting/frontaccounting/hg/p/frontaccounting/mercurial/rev/8cc83d4ecb47 changeset: 3539:8cc83d4ecb47 user: Janusz Dobrowolski <ja...@fr...> date: Thu Mar 19 22:07:38 2015 +0100 description: Fixed regression in Supplier Invoice GL postings. diffstat: purchasing/includes/db/invoice_db.inc | 4 ++-- 1 files changed, 2 insertions(+), 2 deletions(-) diffs (21 lines): diff -r 0a44b5c79370 -r 8cc83d4ecb47 purchasing/includes/db/invoice_db.inc --- a/purchasing/includes/db/invoice_db.inc Thu Mar 19 20:51:18 2015 +0100 +++ b/purchasing/includes/db/invoice_db.inc Thu Mar 19 22:07:38 2015 +0100 @@ -119,7 +119,7 @@ } //---------------------------------------------------------------------------------------- -function add_supp_invoice(&$supp_trans) // do not receive as ref because we change locally +function add_supp_invoice(&$supp_trans) { global $Refs; @@ -308,7 +308,7 @@ $currency = get_supplier_currency($supp_trans->supplier_id); $total += add_gl_trans_supplier($trans_type, $invoice_id, $date_, $iv_act, - $dim, $dim2, $entered_grn->this_quantity_inv * $old_price, $supp_trans->supplier_id, "", $ex_rate); + $dim, $dim2, $old_value, $supp_trans->supplier_id, "", $ex_rate); $diff = get_diff_in_home_currency($supp_trans->supplier_id, $old_date, $date_, $old_value, $taxfree_line); |
|
From: FrontAccounting <fro...@us...> - 2015-03-23 22:35:16
|
details: http://frontaccounting.hg.sourceforge.net:8000/hgroot/frontaccounting/frontaccounting/hg/p/frontaccounting/mercurial/rev/0a44b5c79370 changeset: 3538:0a44b5c79370 user: Janusz Dobrowolski <ja...@fr...> date: Thu Mar 19 20:51:18 2015 +0100 description: Tax algorithm handling on supplier side is reverted as unpractical. diffstat: purchasing/includes/db/invoice_db.inc | 7 ++----- purchasing/includes/db/po_db.inc | 6 +++--- purchasing/includes/db/supp_trans_db.inc | 7 +++---- purchasing/includes/db/suppliers_db.inc | 19 +++++-------------- purchasing/includes/po_class.inc | 9 +++------ purchasing/includes/purchasing_db.inc | 8 +------- purchasing/includes/supp_trans_class.inc | 4 +--- purchasing/includes/ui/invoice_ui.inc | 8 -------- purchasing/includes/ui/po_ui.inc | 11 ----------- purchasing/manage/suppliers.php | 7 ++----- purchasing/po_entry_items.php | 5 ----- purchasing/supplier_invoice.php | 4 ---- reporting/rep209.php | 4 ++-- sql/alter2.4.sql | 2 -- sql/en_US-demo.sql | 14 ++++++-------- sql/en_US-new.sql | 2 -- 16 files changed, 28 insertions(+), 89 deletions(-) diffs (truncated from 507 to 300 lines): diff -r 69b06a754b84 -r 0a44b5c79370 purchasing/includes/db/invoice_db.inc --- a/purchasing/includes/db/invoice_db.inc Thu Mar 19 19:05:45 2015 +0100 +++ b/purchasing/includes/db/invoice_db.inc Thu Mar 19 20:51:18 2015 +0100 @@ -17,7 +17,7 @@ function read_supplier_details_to_trans(&$supp_trans, $supplier_id) { $sql = "SELECT supp.supp_name, terms.terms, terms.days_before_due, - terms.day_in_following_month, supp.tax_included, supp.tax_algorithm, + 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 @@ -45,7 +45,6 @@ $supp_trans->supplier_id = $supplier_id; $supp_trans->tax_included = $myrow['tax_included']; - $supp_trans->tax_algorithm = $supp_trans->stored_algorithm = $myrow['tax_algorithm']; $supp_trans->supplier_name = $myrow['supp_name']; $supp_trans->terms = array( 'description' => $myrow['terms'], @@ -173,8 +172,7 @@ /*First insert the invoice into the supp_trans table*/ $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, $item_added_tax, $supp_trans->ov_discount, "", 0, $supp_trans->tax_included, - $supp_trans->tax_algorithm); + $invoice_items_total, $item_added_tax, $supp_trans->ov_discount, "", 0, $supp_trans->tax_included); if ($trans_no) move_trans_attachments($trans_type, $trans_no, $invoice_id); @@ -471,7 +469,6 @@ $supp_trans->ov_discount = $trans_row["ov_discount"]; $supp_trans->ov_gst = $trans_row["ov_gst"]; $supp_trans->tax_included = $trans_row["tax_included"]; - $supp_trans->stored_algorithm = $supp_trans->tax_algorithm = $trans_row["tax_algorithm"]; $id = $trans_row["trans_no"]; diff -r 69b06a754b84 -r 0a44b5c79370 purchasing/includes/db/po_db.inc --- a/purchasing/includes/db/po_db.inc Thu Mar 19 19:05:45 2015 +0100 +++ b/purchasing/includes/db/po_db.inc Thu Mar 19 20:51:18 2015 +0100 @@ -13,7 +13,7 @@ function get_supplier_details_to_order(&$order, $supplier_id) { - $sql = "SELECT curr_code, supp_name, tax_group_id, supp.tax_included, supp.tax_algorithm, + $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 @@ -38,7 +38,7 @@ $_POST['curr_code'] = $myrow["curr_code"]; $order->set_supplier($supplier_id, $myrow["supp_name"], $myrow["curr_code"], - $myrow["tax_group_id"], $myrow["tax_included"], $myrow["tax_algorithm"]); + $myrow["tax_group_id"], $myrow["tax_included"]); } //---------------------------------------------------------------------------------------- @@ -188,7 +188,7 @@ $order->order_no = $order_no; $order->set_supplier($myrow["supplier_id"], $myrow["supp_name"], $myrow["curr_code"], - $myrow['tax_group_id'], $myrow["tax_included"], @$myrow["tax_algorithm"]); + $myrow['tax_group_id'], $myrow["tax_included"]); $order->credit = get_current_supp_credit($order->supplier_id); diff -r 69b06a754b84 -r 0a44b5c79370 purchasing/includes/db/supp_trans_db.inc --- a/purchasing/includes/db/supp_trans_db.inc Thu Mar 19 19:05:45 2015 +0100 +++ b/purchasing/includes/db/supp_trans_db.inc Thu Mar 19 20:51:18 2015 +0100 @@ -14,7 +14,7 @@ // 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, $tax_algorithm = null) + $amount, $amount_tax, $discount, $err_msg="", $rate=0, $included=0) { $new = $trans_no==0; $date = date2sql($date_); @@ -33,12 +33,11 @@ $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, tax_included, tax_algorithm) "; + 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($included). - ", ".db_escape($tax_algorithm, true).")"; + .", ".db_escape($amount_tax).", ".db_escape($rate).", ".db_escape($discount).", ".db_escape($included).")"; if ($err_msg == "") $err_msg = "Cannot insert a supplier transaction record"; diff -r 69b06a754b84 -r 0a44b5c79370 purchasing/includes/db/suppliers_db.inc --- a/purchasing/includes/db/suppliers_db.inc Thu Mar 19 19:05:45 2015 +0100 +++ b/purchasing/includes/db/suppliers_db.inc Thu Mar 19 20:51:18 2015 +0100 @@ -13,12 +13,12 @@ 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, $tax_algorithm) + $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, tax_algorithm) + tax_group_id, tax_included) VALUES (".db_escape($supp_name). ", " .db_escape($supp_ref). ", " .db_escape($address) . ", " @@ -37,8 +37,7 @@ .db_escape($payment_discount_account). ", " .db_escape($notes). ", " .db_escape($tax_group_id). ", " - .db_escape($tax_included). ", " - .db_escape($tax_algorithm). ")"; + .db_escape($tax_included). ")"; db_query($sql,"The supplier could not be added"); } @@ -46,7 +45,7 @@ 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, $tax_algorithm) + $notes, $tax_group_id, $tax_included) { $sql = "UPDATE ".TB_PREF."suppliers SET supp_name=".db_escape($supp_name) . ", supp_ref=".db_escape($supp_ref) . ", @@ -66,8 +65,7 @@ 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).", - tax_algorithm=".db_escape($tax_algorithm) + tax_included=".db_escape($tax_included) ." WHERE supplier_id = ".db_escape($supplier_id); db_query($sql,"The supplier could not be updated"); @@ -182,13 +180,6 @@ return !key_in_foreign_table($id, $tables, 'supplier_id'); } -function update_supp_tax_algorithm($supplier_id, $tax_algorithm) -{ - $sql = "UPDATE ".TB_PREF."suppliers SET tax_algorithm=".db_escape($tax_algorithm) - . " WHERE supplier_id=".db_escape($supplier_id); - return db_query($sql, "cannot update supplier's tax calculation algorithm"); -} - function get_supplier_currency($supplier_id) { $sql = "SELECT curr_code FROM ".TB_PREF."suppliers WHERE supplier_id = ".db_escape($supplier_id); diff -r 69b06a754b84 -r 0a44b5c79370 purchasing/includes/po_class.inc --- a/purchasing/includes/po_class.inc Thu Mar 19 19:05:45 2015 +0100 +++ b/purchasing/includes/po_class.inc Thu Mar 19 20:51:18 2015 +0100 @@ -32,8 +32,6 @@ var $tax_group_id; var $tax_group_array = null; // saves db queries var $tax_included; // type of prices - var $tax_algorithm; - var $stored_algorithm; // copy to find the change after invoice in processed var $terms; var $ex_rate; var $cash_account; @@ -54,14 +52,13 @@ $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, $tax_algorithm) + 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->stored_algorithm = $this->tax_algorithm = $tax_algorithm; $this->tax_group_array = get_tax_group_items_as_array($tax_group_id); } @@ -153,7 +150,7 @@ $prices[] = round($ln_itm->price * ($receival ? $ln_itm->receive_qty : $ln_itm->quantity), user_price_dec()); } $taxes = get_tax_for_items($items, $prices, $shipping_cost, - $this->tax_group_id, $this->tax_included, $this->tax_group_array, $this->tax_algorithm); + $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') { @@ -185,7 +182,7 @@ if (!$this->tax_included ) { $taxes = get_tax_for_items($items, $prices, 0, $this->tax_group_id, - $this->tax_included, $this->tax_group_array, $this->tax_algorithm); + $this->tax_included, $this->tax_group_array); foreach($taxes as $tax) $total += round($tax['Value'], $dec); diff -r 69b06a754b84 -r 0a44b5c79370 purchasing/includes/purchasing_db.inc --- a/purchasing/includes/purchasing_db.inc Thu Mar 19 19:05:45 2015 +0100 +++ b/purchasing/includes/purchasing_db.inc Thu Mar 19 20:51:18 2015 +0100 @@ -189,8 +189,6 @@ $inv->reference = $ref; $inv->supp_reference = $cart->supp_ref; $inv->tax_included = $cart->tax_included; - $inv->tax_algorithm = $cart->tax_algorithm; - $inv->stored_algorithm = $cart->stored_algorithm; $supp = get_supplier($cart->supplier_id); $inv->tax_group_id = $supp['tax_group_id']; $inv->ov_amount = $inv->ov_gst = $inv->ov_discount = 0; @@ -203,7 +201,7 @@ } $inv->tax_overrides = $cart->tax_overrides; if (!$inv->tax_included) { - $taxes = $inv->get_taxes($inv->tax_group_id, 0, false, $inv->tax_algorithm); + $taxes = $inv->get_taxes($inv->tax_group_id, 0, false); foreach( $taxes as $taxitem) { $total += isset($taxitem['Override']) ? $taxitem['Override'] : $taxitem['Value']; } @@ -212,10 +210,6 @@ $inv_no = add_supp_invoice($inv); - // presume supplier data need correction - if ($inv->stored_algorithm != $inv->tax_algorithm) - update_supp_tax_algorithm($inv->supplier_id, $inv->tax_algorithm); - if ($cart->cash_account) { $pmt_no = write_supp_payment(0, $inv->supplier_id, $cart->cash_account, $inv->tran_date, $Refs->get_next(ST_SUPPAYMENT), $total, 0, _('Payment for:').$inv->supp_reference .' ('.$type_shortcuts[ST_SUPPINVOICE].$inv_no.')'); diff -r 69b06a754b84 -r 0a44b5c79370 purchasing/includes/supp_trans_class.inc --- a/purchasing/includes/supp_trans_class.inc Thu Mar 19 19:05:45 2015 +0100 +++ b/purchasing/includes/supp_trans_class.inc Thu Mar 19 20:51:18 2015 +0100 @@ -43,8 +43,6 @@ var $ov_gst; var $gl_codes_counter=0; var $credit = 0; - var $tax_algorithm; - var $stored_algorithm; var $currency; var $tax_overrides = array(); // array of taxes manually inserted during sales invoice entry @@ -145,7 +143,7 @@ if ($tax_group_id == null) $tax_group_id = $this->tax_group_id; $taxes = get_tax_for_items($items, $prices, $shipping_cost, $tax_group_id, - $this->tax_included, null, $this->tax_algorithm); + $this->tax_included); if (isset($this->tax_overrides)) foreach($this->tax_overrides as $id => $value) // add values entered manually diff -r 69b06a754b84 -r 0a44b5c79370 purchasing/includes/ui/invoice_ui.inc --- a/purchasing/includes/ui/invoice_ui.inc Thu Mar 19 19:05:45 2015 +0100 +++ b/purchasing/includes/ui/invoice_ui.inc Thu Mar 19 20:51:18 2015 +0100 @@ -19,7 +19,6 @@ $_POST['supp_reference'] = $supp_trans->supp_reference; $_POST['reference'] = $supp_trans->reference; $_POST['supplier_id'] = $supp_trans->supplier_id; - $_POST['tax_algorithm'] = $supp_trans->tax_algorithm; $_POST['dimension'] = $supp_trans->dimension; $_POST['dimension2'] = $supp_trans->dimension2; @@ -38,8 +37,6 @@ $supp_trans->due_date = $_POST['due_date']; $supp_trans->supp_reference = $_POST['supp_reference']; $supp_trans->reference = $_POST['reference']; - if (isset($_POST['tax_algorithm'])) - $supp_trans->tax_algorithm = $_POST['tax_algorithm']; $supp_trans->dimension = @$_POST['dimension']; $supp_trans->dimension2 = @$_POST['dimension2']; @@ -197,11 +194,6 @@ end_table(1); start_table(TABLESTYLE2); - tax_algorithm_list_row(_("Tax algorithm:"), 'tax_algorithm', null, true); - if (list_updated('tax_algorithm')) { - $supp_trans->tax_algorithm = $_POST['tax_algorithm']; - $Ajax->activate('tax_table'); - } textarea_row(_("Memo:"), "Comments", null, 50, 3); end_table(1); div_end(); diff -r 69b06a754b84 -r 0a44b5c79370 purchasing/includes/ui/po_ui.inc --- a/purchasing/includes/ui/po_ui.inc Thu Mar 19 19:05:45 2015 +0100 +++ b/purchasing/includes/ui/po_ui.inc Thu Mar 19 20:51:18 2015 +0100 @@ -26,7 +26,6 @@ $_POST['Comments'] = $cart->Comments; $_POST['StkLocation'] = $cart->Location; $_POST['delivery_address'] = $cart->delivery_address; - $_POST['tax_algorithm'] = $cart->tax_algorithm; $_POST['prep_amount'] = price_format($cart->prep_amount); $_POST['_ex_rate'] = $cart->ex_rate; $_POST['cash_account'] = $cart->cash_account; @@ -54,8 +53,6 @@ $cart->delivery_address = $_POST['delivery_address']; |
|
From: FrontAccounting <fro...@us...> - 2015-03-23 22:35:16
|
details: http://frontaccounting.hg.sourceforge.net:8000/hgroot/frontaccounting/frontaccounting/hg/p/frontaccounting/mercurial/rev/07f74f15b6fc changeset: 3535:07f74f15b6fc user: Janusz Dobrowolski <ja...@fr...> date: Thu Mar 19 11:05:37 2015 +0100 description: Sales invoice voiding is blocked when sales credit was issued against the invoice. diffstat: admin/db/voiding_db.inc | 2 ++ sales/includes/db/sales_invoice_db.inc | 5 +++++ 2 files changed, 7 insertions(+), 0 deletions(-) diffs (27 lines): diff -r 3c327e570694 -r 07f74f15b6fc admin/db/voiding_db.inc --- a/admin/db/voiding_db.inc Thu Mar 19 11:05:04 2015 +0100 +++ b/admin/db/voiding_db.inc Thu Mar 19 11:05:37 2015 +0100 @@ -43,6 +43,8 @@ if (!check_void_bank_trans($type, $type_no)) return _('This transaction cannot be voided because the operation would decrease account balance below allowed limit in some point of account history.'); case ST_SALESINVOICE : // it's a customer invoice + if (is_cust_invoice_credited($type_no)) + return _('This invoice cannot be voided because it was already credited.'); case ST_CUSTCREDIT : // it's a customer credit note case ST_CUSTDELIVERY : // it's a customer dispatch if (!exists_customer_trans($type, $type_no)) diff -r 3c327e570694 -r 07f74f15b6fc sales/includes/db/sales_invoice_db.inc --- a/sales/includes/db/sales_invoice_db.inc Thu Mar 19 11:05:04 2015 +0100 +++ b/sales/includes/db/sales_invoice_db.inc Thu Mar 19 11:05:37 2015 +0100 @@ -277,6 +277,11 @@ commit_transaction(); } +function is_cust_invoice_credited($trans_no) +{ + return db_num_rows(get_sales_child_lines(ST_SALESINVOICE, $trans_no)); +} + function get_cust_prepayment_invoice_factor($trans_no) { $sql = "SELECT IF(dt.prep_amount>0, dt.prep_amount/so.total ,0) |
|
From: FrontAccounting <fro...@us...> - 2015-03-23 22:35:16
|
details: http://frontaccounting.hg.sourceforge.net:8000/hgroot/frontaccounting/frontaccounting/hg/p/frontaccounting/mercurial/rev/5a8b7ae3fb91 changeset: 3541:5a8b7ae3fb91 user: Janusz Dobrowolski <ja...@fr...> date: Sun Mar 22 11:20:11 2015 +0100 description: Added missing company settings to upgrade script, fixed company settings refreshing method. diffstat: admin/backups.php | 2 +- admin/company_preferences.php | 14 ----------- admin/db/company_db.inc | 13 +--------- admin/gl_setup.php | 49 --------------------------------------- admin/includes/fa_patch.class.inc | 4 ++- includes/db/connect_db_mysql.inc | 3 +- includes/db/connect_db_mysqli.inc | 4 +- includes/prefs/sysprefs.inc | 8 +++--- includes/session.inc | 2 +- sql/alter2.4.sql | 14 +++++++++++ 10 files changed, 28 insertions(+), 85 deletions(-) diffs (253 lines): diff -r 5d3d6225aff7 -r 5a8b7ae3fb91 admin/backups.php --- a/admin/backups.php Sun Mar 22 07:54:03 2015 +0100 +++ b/admin/backups.php Sun Mar 22 11:20:11 2015 +0100 @@ -140,7 +140,7 @@ if ($backup_name) { if (db_import($backup_path, $conn)) display_notification(_("Restore backup completed.")); - refresh_sys_prefs(); // re-read system setup + $SysPrefs->refesh(); // re-read system setup } else display_error(_("Select backup file first.")); } diff -r 5d3d6225aff7 -r 5a8b7ae3fb91 admin/company_preferences.php --- a/admin/company_preferences.php Sun Mar 22 07:54:03 2015 +0100 +++ b/admin/company_preferences.php Sun Mar 22 11:20:11 2015 +0100 @@ -117,20 +117,6 @@ $Ajax->activate('_page_body'); } /* end of if submit */ -//--------------------------------------------------------------------------------------------- -if (get_company_pref('bcc_email') === null) { // available from 2.3.14, can be not defined on pre-2.4 installations - set_company_pref('bcc_email', 'setup.company', 'varchar', 100, ''); - refresh_sys_prefs(); -} -if (get_company_pref('alternative_tax_include_on_docs') === null) { // available from 2.3.14, can be not defined on pre-2.4 installations - set_company_pref('alternative_tax_include_on_docs', 'setup.company', 'tinyint', 1, '0'); - refresh_sys_prefs(); -} -if (get_company_pref('suppress_tax_rates') === null) { // available from 2.3.14, can be not defined on pre-2.4 installations - set_company_pref('suppress_tax_rates', 'setup.company', 'tinyint', 1, '0'); - refresh_sys_prefs(); -} - start_form(true); $myrow = get_company_prefs(); diff -r 5d3d6225aff7 -r 5a8b7ae3fb91 admin/db/company_db.inc --- a/admin/db/company_db.inc Sun Mar 22 07:54:03 2015 +0100 +++ b/admin/db/company_db.inc Sun Mar 22 11:20:11 2015 +0100 @@ -35,7 +35,7 @@ global $SysPrefs, $db_version; if (!isset($SysPrefs->prefs)) // just after first login or reset - $SysPrefs->refresh_company_prefs(); + $SysPrefs->refresh(); $all = $SysPrefs->prefs; @@ -63,17 +63,6 @@ return db_query($sql, "cannot set company pref"); } -function refresh_sys_prefs() -{ - global $SysPrefs; - -// flush_dir(user_js_cache()); // clear cache - unset($_SESSION['SysPrefs']); - $_SESSION['SysPrefs'] = new sys_prefs(); - $SysPrefs = &$_SESSION['SysPrefs']; - $SysPrefs->refresh_company_prefs(); -} - function get_base_sales_type() { return get_company_pref('base_sales'); diff -r 5d3d6225aff7 -r 5a8b7ae3fb91 admin/gl_setup.php --- a/admin/gl_setup.php Sun Mar 22 07:54:03 2015 +0100 +++ b/admin/gl_setup.php Sun Mar 22 11:20:11 2015 +0100 @@ -94,55 +94,6 @@ table_section(1); -if (get_company_pref('grn_clearing_act') === null) { // available from 2.3.1, can be not defined on pre-2.4 installations - set_company_pref('grn_clearing_act', 'glsetup.purchase', 'varchar', 15, 0); - refresh_sys_prefs(); -} -if (get_company_pref('default_receival_required') === null) { // new in 2.4 installations - set_company_pref('default_receival_required', 'glsetup.purchase', 'smallint', 6, '10'); - refresh_sys_prefs(); -} - -if (get_company_pref('default_quote_valid_days') === null) { // available from 2.3.23, can be not defined on pre-2.4 installations - set_company_pref('default_quote_valid_days', 'glsetup.sales', 'smallint', 6, 30); - refresh_sys_prefs(); -} - -if (get_company_pref('no_zero_lines_amount') === null) { // new in 2.4 installations - set_company_pref('no_zero_lines_amount', 'glsetup.sales', 'tinyint', 1, '1'); - refresh_sys_prefs(); -} - -if (get_company_pref('show_po_item_codes') === null) { // new in 2.4 installations - set_company_pref('show_po_item_codes', 'glsetup.purchase', 'tinyint', 1, '0'); - refresh_sys_prefs(); -} - -if (get_company_pref('accounts_alpha') === null) { // new in 2.4 installations - set_company_pref('accounts_alpha', 'glsetup.general', 'tinyint', 1, '0'); - refresh_sys_prefs(); -} - -if (get_company_pref('loc_notification') === null) { // new in 2.4 installations - set_company_pref('loc_notification', 'glsetup.inventory', 'tinyint', 1, '0'); - refresh_sys_prefs(); -} - -if (get_company_pref('print_invoice_no') === null) { // new in 2.4 installations - set_company_pref('print_invoice_no', 'glsetup.sales', 'tinyint', 1, '0'); - refresh_sys_prefs(); -} - -if (get_company_pref('allow_negative_prices') === null) { // new in 2.4 installations - set_company_pref('allow_negative_prices', 'glsetup.inventory', 'tinyint', 1, '1'); - refresh_sys_prefs(); -} - -if (get_company_pref('print_item_images_on_quote') === null) { // new in 2.4 installations - set_company_pref('print_item_images_on_quote', 'glsetup.inventory', 'tinyint', 1, '0'); - refresh_sys_prefs(); -} - $myrow = get_company_prefs(); $_POST['retained_earnings_act'] = $myrow["retained_earnings_act"]; diff -r 5d3d6225aff7 -r 5a8b7ae3fb91 admin/includes/fa_patch.class.inc --- a/admin/includes/fa_patch.class.inc Sun Mar 22 07:54:03 2015 +0100 +++ b/admin/includes/fa_patch.class.inc Sun Mar 22 11:20:11 2015 +0100 @@ -207,6 +207,8 @@ */ function get_site_status($connections) { + global $SysPrefs; + $info = array(); foreach($connections as $i => $conn) @@ -221,7 +223,7 @@ } } set_global_connection(); - refresh_sys_prefs(); + $SysPrefs->refresh(); return $info; } diff -r 5d3d6225aff7 -r 5a8b7ae3fb91 includes/db/connect_db_mysql.inc --- a/includes/db/connect_db_mysql.inc Sun Mar 22 07:54:03 2015 +0100 +++ b/includes/db/connect_db_mysql.inc Sun Mar 22 11:20:11 2015 +0100 @@ -14,7 +14,7 @@ function set_global_connection($company=-1) { - global $db, $path_to_root, $db_connections; + global $db, $path_to_root, $db_connections, $SysPrefs; include ($path_to_root . "/config_db.php"); if ($company == -1) @@ -35,6 +35,7 @@ ///// We are, however, investigating the existing code to be compatible in the future. db_query("SET sql_mode = '".SQL_MODE."'"); ///// + $SysPrefs->refresh(); return $db; } diff -r 5d3d6225aff7 -r 5a8b7ae3fb91 includes/db/connect_db_mysqli.inc --- a/includes/db/connect_db_mysqli.inc Sun Mar 22 07:54:03 2015 +0100 +++ b/includes/db/connect_db_mysqli.inc Sun Mar 22 11:20:11 2015 +0100 @@ -16,7 +16,7 @@ function set_global_connection($company=-1) { - global $db, $path_to_root, $db_connections; + global $db, $path_to_root, $db_connections, $SysPrefs; include ($path_to_root . "/config_db.php"); if ($company == -1) @@ -37,7 +37,7 @@ ///// We are, however, investigating the existing code to be compatible in the future. db_query("SET sql_mode = '".SQL_MODE."'"); ///// - refresh_sys_prefs(); + $SysPrefs->refresh(); return $db; } diff -r 5d3d6225aff7 -r 5a8b7ae3fb91 includes/prefs/sysprefs.inc --- a/includes/prefs/sysprefs.inc Sun Mar 22 07:54:03 2015 +0100 +++ b/includes/prefs/sysprefs.inc Sun Mar 22 11:20:11 2015 +0100 @@ -14,7 +14,7 @@ /* System and per company prefferences. Object is created only with site wide preffernces. - After user login refresh_company_prefs method have to be called to initialize company specific settings. + After user login refresh method have to be called to re-initialize company specific settings. */ class sys_prefs { @@ -23,7 +23,7 @@ function sys_prefs() { - global $path_to_root, $db_version; + global $path_to_root; // retrieve set system wide preferences include $path_to_root.'/config.default.php'; @@ -43,9 +43,9 @@ } /* - Initialize company specific preferrencies. + Re-initialize company preferrencies. */ - function refresh_company_prefs() + function refresh() { global $db_version; diff -r 5d3d6225aff7 -r 5a8b7ae3fb91 includes/session.inc --- a/includes/session.inc Sun Mar 22 07:54:03 2015 +0100 +++ b/includes/session.inc Sun Mar 22 11:20:11 2015 +0100 @@ -559,7 +559,7 @@ if (db_fixed()) db_set_encoding($_SESSION['language']->encoding); - $SysPrefs->refresh_company_prefs(); + $SysPrefs->refresh(); } if (!isset($_SESSION["App"])) { $_SESSION["App"] = new front_accounting(); diff -r 5d3d6225aff7 -r 5a8b7ae3fb91 sql/alter2.4.sql --- a/sql/alter2.4.sql Sun Mar 22 07:54:03 2015 +0100 +++ b/sql/alter2.4.sql Sun Mar 22 11:20:11 2015 +0100 @@ -208,3 +208,17 @@ SET reg.reg_type=0 WHERE reg.trans_type IN(10, 11); +INSERT IGNORE INTO `0_sys_prefs` VALUES + ('grn_clearing_act', 'glsetup.purchase', 'varchar', 15, 0), + ('default_receival_required', 'glsetup.purchase', 'smallint', 6, '10'), + ('default_quote_valid_days', 'glsetup.sales', 'smallint', 6, 30), + ('no_zero_lines_amount', 'glsetup.sales', 'tinyint', 1, '1'), + ('show_po_item_codes', 'glsetup.purchase', 'tinyint', 1, '0'), + ('accounts_alpha', 'glsetup.general', 'tinyint', 1, '0'), + ('loc_notification', 'glsetup.inventory', 'tinyint', 1, '0'), + ('print_invoice_no', 'glsetup.sales', 'tinyint', 1, '0'), + ('allow_negative_prices', 'glsetup.inventory', 'tinyint', 1, '1'), + ('print_item_images_on_quote', 'glsetup.inventory', 'tinyint', 1, '0'), + ('bcc_email', 'setup.company', 'varchar', 100, ''), + ('alternative_tax_include_on_docs', 'setup.company', 'tinyint', 1, '0'), + ('suppress_tax_rates', 'setup.company', 'tinyint', 1, '0'); |
|
From: FrontAccounting <fro...@us...> - 2015-03-23 22:35:16
|
details: http://frontaccounting.hg.sourceforge.net:8000/hgroot/frontaccounting/frontaccounting/hg/p/frontaccounting/mercurial/rev/69b06a754b84 changeset: 3537:69b06a754b84 user: Janusz Dobrowolski <ja...@fr...> date: Thu Mar 19 19:05:45 2015 +0100 description: Additional fixes for journal handling. Added reg_type in trans_tax_details. diffstat: gl/includes/db/gl_db_trans.inc | 63 +++++++++++++++++--------------- gl/inquiry/journal_inquiry.php | 13 ++++++- includes/ui/items_cart.inc | 5 +-- purchasing/includes/db/invoice_db.inc | 2 +- reporting/rep709.php | 8 ++-- sales/includes/db/sales_credit_db.inc | 2 +- sales/includes/db/sales_delivery_db.inc | 2 +- sales/includes/db/sales_invoice_db.inc | 4 +- sql/alter2.4.sql | 10 +++++ sql/en_US-demo.sql | 23 ++++++----- sql/en_US-new.sql | 1 + 11 files changed, 78 insertions(+), 55 deletions(-) diffs (truncated from 322 to 300 lines): diff -r 53e72cb7a1ad -r 69b06a754b84 gl/includes/db/gl_db_trans.inc --- a/gl/includes/db/gl_db_trans.inc Thu Mar 19 15:17:54 2015 +0100 +++ b/gl/includes/db/gl_db_trans.inc Thu Mar 19 19:05:45 2015 +0100 @@ -407,7 +407,7 @@ } } add_trans_tax_details($trans_type, $trans_no, $tax['id'], $tax['rate'], $included, - $amount, $net_amount, $ex_rate, $date, $memo); + $amount, $net_amount, $ex_rate, $date, $memo, null); } @@ -417,17 +417,21 @@ // actual tax type rate. // function add_trans_tax_details($trans_type, $trans_no, $tax_id, $rate, $included, - $amount, $net_amount, $ex_rate, $tran_date, $memo) + $amount, $net_amount, $ex_rate, $tran_date, $memo, $reg_type=null) { + // guess tax register if not set + if (!isset($reg_type)) + $reg_type = in_array($trans_type, array(ST_SUPPINVOICE, ST_SUPPCREDIT)) ? TR_OUTPUT + : in_array($trans_type, array(ST_SALESINVOICE, ST_CUSTCREDIT)) ? TR_INPUT : null; $sql = "INSERT INTO ".TB_PREF."trans_tax_details (trans_type, trans_no, tran_date, tax_type_id, rate, ex_rate, - included_in_price, net_amount, amount, memo) + included_in_price, net_amount, amount, memo, reg_type) VALUES (".db_escape($trans_type)."," . db_escape($trans_no).",'" .date2sql($tran_date)."',".db_escape($tax_id)."," .db_escape($rate).",".db_escape($ex_rate).",".($included ? 1:0)."," .db_escape($net_amount)."," - .db_escape($amount).",".db_escape($memo).")"; + .db_escape($amount).",".db_escape($memo).",".db_escape($reg_type, true).")"; db_query($sql, "Cannot save trans tax details"); @@ -471,47 +475,46 @@ db_query($sql, "The transaction tax details could not be cleared"); } -function get_tax_summary($from, $to) +function get_tax_summary($from, $to, $also_zero_purchases=false) { $fromdate = date2sql($from); $todate = date2sql($to); $sql = "SELECT - SUM(IF(trans_type=".ST_CUSTCREDIT." || trans_type=".ST_SUPPINVOICE - ." || trans_type=".ST_JOURNAL.",-1,1)* - IF(trans_type=".ST_BANKDEPOSIT." || trans_type=".ST_SALESINVOICE - ." || (trans_type=".ST_JOURNAL ." AND amount<0)" - ." || trans_type=".ST_CUSTCREDIT.", net_amount*ex_rate,0)) net_output, + SUM(IF(trans_type=".ST_SUPPCREDIT.",-1,1)*IF(taxrec.amount, taxrec.effective_amount/taxrec.amount, 1)* + IF((reg_type=".TR_OUTPUT.")" + ." || ((trans_type IN(".ST_SUPPINVOICE.",".ST_SUPPCREDIT.") OR (trans_type=".ST_JOURNAL." AND reg_type=".TR_INPUT.")) + ), net_amount*ex_rate,0) + ) net_output, - SUM(IF(trans_type=".ST_CUSTCREDIT." || trans_type=".ST_SUPPINVOICE - ." || trans_type=".ST_JOURNAL.",-1,1)* - IF(trans_type=".ST_BANKDEPOSIT." || trans_type=".ST_SALESINVOICE - ." || (trans_type=".ST_JOURNAL ." AND amount<0)" - ." || trans_type=".ST_CUSTCREDIT.", amount*ex_rate,0)) payable, + SUM(IF(trans_type=".ST_SUPPCREDIT.",-1,1)* + IF((reg_type=".TR_OUTPUT.")" + ." || ((trans_type IN(".ST_SUPPINVOICE.",".ST_SUPPCREDIT.") OR (trans_type=".ST_JOURNAL." AND reg_type=".TR_INPUT.")) + ), amount*ex_rate,0)) payable, - SUM(IF(trans_type=".ST_CUSTCREDIT." || trans_type=".ST_SUPPINVOICE." || trans_type=".ST_JOURNAL.",-1,1)* - IF(trans_type=".ST_BANKDEPOSIT." || trans_type=".ST_SALESINVOICE - ." || (trans_type=".ST_JOURNAL ." AND amount<0)" - ." || trans_type=".ST_CUSTCREDIT.", 0, net_amount*ex_rate)) net_input, + SUM(IF(trans_type IN(".ST_SUPPCREDIT."),-1,1)* + IF(reg_type=".TR_INPUT + . ($also_zero_purchases ? '': " AND tax_type_id AND taxrec.rate") + .", net_amount*ex_rate, 0)) net_input, - SUM(IF(trans_type=".ST_CUSTCREDIT." || trans_type=".ST_SUPPINVOICE." || trans_type=".ST_JOURNAL.",-1,1)* - IF(trans_type=".ST_BANKDEPOSIT." || trans_type=".ST_SALESINVOICE - ." || (trans_type=".ST_JOURNAL ." AND amount<0)" - ." || trans_type=".ST_CUSTCREDIT.", 0, amount*ex_rate)) collectible, + SUM(IF(trans_type IN(".ST_SUPPCREDIT."),-1,1)* + IF(reg_type=".TR_INPUT + . ($also_zero_purchases ? '': " AND tax_type_id AND taxrec.rate ") + .", amount*ex_rate, 0)) collectible, taxrec.rate, ttype.id, ttype.name - FROM ".TB_PREF."tax_types ttype, - ".TB_PREF."trans_tax_details taxrec - WHERE taxrec.tax_type_id=ttype.id - AND taxrec.trans_type != ".ST_CUSTDELIVERY." + FROM ".TB_PREF."trans_tax_details taxrec LEFT JOIN ".TB_PREF."tax_types ttype ON taxrec.tax_type_id=ttype.id + LEFT JOIN ".TB_PREF."tax_groups tgroup ON taxrec.tax_group_id=tgroup.id + WHERE taxrec.trans_type IN (".implode(',', + array(ST_SALESINVOICE, ST_CUSTCREDIT, ST_SUPPINVOICE, ST_SUPPCREDIT, ST_JOURNAL)).") AND taxrec.tran_date >= '$fromdate' AND taxrec.tran_date <= '$todate' GROUP BY ttype.id"; -//display_error($sql); + + // display_error($sql); return db_query($sql,"Cannot retrieve tax summary"); } - //-------------------------------------------------------------------------------------------------- function exists_gl_trans($type, $trans_id) @@ -563,7 +566,7 @@ gl.tran_date, gl.type as trans_type, gl.type_no as trans_no, - IFNULL(max(supp.supp_name), max(cust.name)) as name, + IFNULL(MAX(supp.supp_name), MAX(cust.name)) as name, IF(ISNULL(st.supp_reference), '', st.supp_reference) AS supp_reference, refs.reference," .($dimension ? " -SUM(IF(dim.dimension in(gl.dimension_id,gl.dimension2_id), gl.amount, 0)) as amount,":" SUM(IF(gl.amount>0, gl.amount,0)) as amount,") diff -r 53e72cb7a1ad -r 69b06a754b84 gl/inquiry/journal_inquiry.php --- a/gl/inquiry/journal_inquiry.php Thu Mar 19 15:17:54 2015 +0100 +++ b/gl/inquiry/journal_inquiry.php Thu Mar 19 19:05:45 2015 +0100 @@ -92,7 +92,12 @@ if ($myrow['alloc'] != 0 || get_voided_entry(ST_SALESINVOICE, $row["trans_no"]) !== false) $ok = false; } - return $ok ? trans_editor_link($row["trans_type"], $row["trans_type"]) : ''; + return $ok ? trans_editor_link( $row["trans_type"], $row["trans_no"]) : ''; +} + +function invoice_supp_reference($row) +{ + return $row['supp_reference']; } $sql = get_sql_for_journal_inquiry(get_post('filterType', -1), get_post('FromDate'), @@ -104,6 +109,7 @@ _("Type") => array('fun'=>'systype_name'), _("Trans #") => array('fun'=>'view_link'), _("Counterparty") => array('ord' => ''), + _("Supplier's Reference") => 'skip', _("Reference"), _("Amount") => array('type'=>'amount'), _("Memo"), @@ -116,6 +122,11 @@ $cols[_("#")] = 'skip'; } +if($_POST['filterType'] == ST_SUPPINVOICE) //add the payment column if shown supplier invoices only +{ + $cols[_("Supplier's Reference")] = array('fun'=>'invoice_supp_reference', 'align'=>'center'); +} + $table =& new_db_pager('journal_tbl', $sql, $cols); $table->width = "80%"; diff -r 53e72cb7a1ad -r 69b06a754b84 includes/ui/items_cart.inc --- a/includes/ui/items_cart.inc Thu Mar 19 15:17:54 2015 +0100 +++ b/includes/ui/items_cart.inc Thu Mar 19 19:05:45 2015 +0100 @@ -428,10 +428,7 @@ add_trans_tax_details($this->trans_type, $this->order_id, $tax_id, $this->tax_info['rate'][$tax_id], 0, $tax_nominal, $net, $this->rate, $this->tran_date, - $this->source_ref, - $this->tax_info['tax_group'], - $this->tax_info['tax_date'], - $tax, $this->tax_info['tax_category'], 0, $reg); + $this->source_ref, $reg); } } } diff -r 53e72cb7a1ad -r 69b06a754b84 purchasing/includes/db/invoice_db.inc --- a/purchasing/includes/db/invoice_db.inc Thu Mar 19 15:17:54 2015 +0100 +++ b/purchasing/includes/db/invoice_db.inc Thu Mar 19 19:05:45 2015 +0100 @@ -200,7 +200,7 @@ } add_trans_tax_details($trans_type, $invoice_id, $taxitem['tax_type_id'], $taxitem['rate'], $supp_trans->tax_included, $taxitem['Value'], - $taxitem['Net'], $ex_rate, $date_, $supp_trans->supp_reference); + $taxitem['Net'], $ex_rate, $date_, $supp_trans->supp_reference, TR_INPUT); if (isset($taxitem['purchasing_gl_code'])) { diff -r 53e72cb7a1ad -r 69b06a754b84 reporting/rep709.php --- a/reporting/rep709.php Thu Mar 19 15:17:54 2015 +0100 +++ b/reporting/rep709.php Thu Mar 19 19:05:45 2015 +0100 @@ -53,7 +53,7 @@ LEFT JOIN ".TB_PREF."debtors_master as debt ON dtrans.debtor_no=debt.debtor_no LEFT JOIN ".TB_PREF."cust_branch as branch ON dtrans.branch_code=branch.branch_code WHERE (taxrec.amount <> 0 OR taxrec.net_amount <> 0) - AND taxrec.trans_type <> ".ST_CUSTDELIVERY." + AND !ISNULL(taxrec.reg_type) AND taxrec.tran_date >= '$fromdate' AND taxrec.tran_date <= '$todate' ORDER BY taxrec.trans_type, taxrec.tran_date, taxrec.trans_no, taxrec.ex_rate"; @@ -161,18 +161,18 @@ $rep->NewPage(); } } - if ($trans['trans_type']==ST_JOURNAL && $trans['amount']<0) { + if ($trans['trans_type']==ST_JOURNAL && $trans['reg_type']==TR_INPUT) { $taxes[$trans['tax_type_id']]['taxin'] += $trans['amount']; $taxes[$trans['tax_type_id']]['in'] += $trans['net_amount']; } - elseif ($trans['trans_type']==ST_JOURNAL && $trans['amount']>=0) { + elseif ($trans['trans_type']==ST_JOURNAL && $trans['reg_type']==TR_OUTPUT) { $taxes[$trans['tax_type_id']]['taxout'] += $trans['amount']; $taxes[$trans['tax_type_id']]['out'] += $trans['net_amount']; } elseif (in_array($trans['trans_type'], array(ST_BANKDEPOSIT,ST_SALESINVOICE,ST_CUSTCREDIT))) { $taxes[$trans['tax_type_id']]['taxout'] += $trans['amount']; $taxes[$trans['tax_type_id']]['out'] += $trans['net_amount']; - } else { + } elseif ($trans['reg_type'] !== NULL) { $taxes[$trans['tax_type_id']]['taxin'] += $trans['amount']; $taxes[$trans['tax_type_id']]['in'] += $trans['net_amount']; } diff -r 53e72cb7a1ad -r 69b06a754b84 sales/includes/db/sales_credit_db.inc --- a/sales/includes/db/sales_credit_db.inc Thu Mar 19 15:17:54 2015 +0100 +++ b/sales/includes/db/sales_credit_db.inc Thu Mar 19 19:05:45 2015 +0100 @@ -153,7 +153,7 @@ add_trans_tax_details(ST_CUSTCREDIT, $credit_no, $taxitem['tax_type_id'], $taxitem['rate'], $credit_note->tax_included, $taxitem['Value'], $taxitem['Net'], $ex_rate, - $credit_note->document_date, $credit_note->reference); + $credit_note->document_date, $credit_note->reference, TR_OUTPUT); $total += add_gl_trans_customer(ST_CUSTCREDIT, $credit_no, $credit_date, $taxitem['sales_gl_code'], 0, 0, $taxitem['Value'], $credit_note->customer_id, diff -r 53e72cb7a1ad -r 69b06a754b84 sales/includes/db/sales_delivery_db.inc --- a/sales/includes/db/sales_delivery_db.inc Thu Mar 19 15:17:54 2015 +0100 +++ b/sales/includes/db/sales_delivery_db.inc Thu Mar 19 19:05:45 2015 +0100 @@ -157,7 +157,7 @@ $ex_rate = get_exchange_rate_from_home_currency(get_customer_currency($delivery->customer_id), $delivery->document_date); add_trans_tax_details(ST_CUSTDELIVERY, $delivery_no, $taxitem['tax_type_id'], $taxitem['rate'], $delivery->tax_included, $taxitem['Value'], - $taxitem['Net'], $ex_rate, $delivery->document_date, $delivery->reference ); + $taxitem['Net'], $ex_rate, $delivery->document_date, $delivery->reference, null); } } diff -r 53e72cb7a1ad -r 69b06a754b84 sales/includes/db/sales_invoice_db.inc --- a/sales/includes/db/sales_invoice_db.inc Thu Mar 19 15:17:54 2015 +0100 +++ b/sales/includes/db/sales_invoice_db.inc Thu Mar 19 19:05:45 2015 +0100 @@ -169,8 +169,8 @@ if ($taxitem['Net'] != 0) { $ex_rate = get_exchange_rate_from_home_currency(get_customer_currency($invoice->customer_id), $date_); add_trans_tax_details(ST_SALESINVOICE, $invoice_no, $taxitem['tax_type_id'], - $taxitem['rate'], $invoice->tax_included, $taxitem['Value'], - $taxitem['Net'], $ex_rate, $date_, $invoice->reference, $date_, $prepaid_factor*$taxitem['Value']); + $taxitem['rate'], $invoice->tax_included, $prepaid_factor*$taxitem['Value'], + $taxitem['Net'], $ex_rate, $date_, $invoice->reference, TR_OUTPUT); if (isset($taxitem['sales_gl_code'])) $total += add_gl_trans_customer(ST_SALESINVOICE, $invoice_no, $date_, $taxitem['sales_gl_code'], 0, 0, (-$taxitem['Value'])*$prepaid_factor, $invoice->customer_id, diff -r 53e72cb7a1ad -r 69b06a754b84 sql/alter2.4.sql --- a/sql/alter2.4.sql Thu Mar 19 15:17:54 2015 +0100 +++ b/sql/alter2.4.sql Thu Mar 19 19:05:45 2015 +0100 @@ -200,3 +200,13 @@ ALTER TABLE `0_supp_trans` DROP PRIMARY KEY; ALTER TABLE `0_supp_trans` ADD PRIMARY KEY (`type`,`trans_no`, `supplier_id`); +ALTER TABLE `0_trans_tax_details` ADD COLUMN `reg_type` tinyint(1) DEFAULT NULL AFTER `memo`; + +UPDATE `0_trans_tax_details` reg + SET reg.reg_type=1 + WHERE reg.trans_type IN(20, 21); + +UPDATE `0_trans_tax_details` reg + SET reg.reg_type=0 + WHERE reg.trans_type IN(10, 11); + diff -r 53e72cb7a1ad -r 69b06a754b84 sql/en_US-demo.sql --- a/sql/en_US-demo.sql Thu Mar 19 15:17:54 2015 +0100 +++ b/sql/en_US-demo.sql Thu Mar 19 19:05:45 2015 +0100 @@ -2284,6 +2284,7 @@ `net_amount` double NOT NULL default '0', `amount` double NOT NULL default '0', `memo` tinytext, + `reg_type` tinyint(1) default NULL, PRIMARY KEY (`id`), KEY `Type_and_Number` (`trans_type`,`trans_no`), KEY `tran_date` (`tran_date`) @@ -2293,17 +2294,17 @@ -- Dumping data for table `0_trans_tax_details` -- -INSERT INTO `0_trans_tax_details` VALUES(1, 20, 7, '2014-06-21', 1, 5, 1, 0, 3300, 165, '5t'); -INSERT INTO `0_trans_tax_details` VALUES(2, 13, 3, '2014-06-21', 1, 5, 1, 0, 50, 2.5, 'auto'); -INSERT INTO `0_trans_tax_details` VALUES(3, 10, 17, '2014-06-21', 1, 5, 1, 0, 50, 2.5, '1'); -INSERT INTO `0_trans_tax_details` VALUES(4, 13, 4, '2014-06-21', 1, 5, 1.3932, 0, 35.89, 1.7945, 'auto'); -INSERT INTO `0_trans_tax_details` VALUES(5, 10, 18, '2014-06-21', 1, 5, 1.3932, 0, 35.89, 1.7945, '2'); -INSERT INTO `0_trans_tax_details` VALUES(6, 2, 5, '2014-06-21', 1, 5, 1, 0, 95.2, 4.76, ''); -INSERT INTO `0_trans_tax_details` VALUES(7, 1, 8, '2014-06-21', 1, 5, 1, 0, -47.6, -2.38, ''); -INSERT INTO `0_trans_tax_details` VALUES(8, 20, 8, '2014-06-21', 1, 5, 1, 0, -19, -0.95, 'cc'); -INSERT INTO `0_trans_tax_details` VALUES(9, 13, 5, '2014-06-21', 1, 5, 1, 1, 47.619047619048, 2.3809523809524, 'auto'); -INSERT INTO `0_trans_tax_details` VALUES(10, 10, 19, '2014-06-21', 1, 5, 1, 1, 47.619047619048, 2.3809523809524, '3'); -INSERT INTO `0_trans_tax_details` VALUES(11, 11, 3, '2014-06-21', 1, 5, 1.3932, 0, 35.89, 1.7945, '1'); +INSERT INTO `0_trans_tax_details` VALUES(1, 20, 7, '2014-06-21', 1, 5, 1, 0, 3300, 165, '5t', 1); +INSERT INTO `0_trans_tax_details` VALUES(2, 13, 3, '2014-06-21', 1, 5, 1, 0, 50, 2.5, 'auto', NULL); +INSERT INTO `0_trans_tax_details` VALUES(3, 10, 17, '2014-06-21', 1, 5, 1, 0, 50, 2.5, '1', 0); |
|
From: FrontAccounting <fro...@us...> - 2015-03-23 22:35:16
|
details: http://frontaccounting.hg.sourceforge.net:8000/hgroot/frontaccounting/frontaccounting/hg/p/frontaccounting/mercurial/rev/3c327e570694 changeset: 3534:3c327e570694 user: Janusz Dobrowolski <ja...@fr...> date: Thu Mar 19 11:05:04 2015 +0100 description: Improved error messages in transaction voiding. diffstat: admin/db/voiding_db.inc | 39 ++++++++++++++++++++------------------- admin/void_transaction.php | 6 +++--- gl/includes/db/gl_db_banking.inc | 10 +++++++++- 3 files changed, 32 insertions(+), 23 deletions(-) diffs (170 lines): diff -r 6d9df253c30b -r 3c327e570694 admin/db/voiding_db.inc --- a/admin/db/voiding_db.inc Wed Feb 18 13:13:33 2015 +0100 +++ b/admin/db/voiding_db.inc Thu Mar 19 11:05:04 2015 +0100 @@ -20,93 +20,94 @@ $void_entry = get_voided_entry($type, $type_no); if ($void_entry != null) - return false; + return _('This transaction was already voided before.'); switch ($type) { case ST_JOURNAL : // it's a journal entry if (!exists_gl_trans($type, $type_no)) - return false; + return _('Selected transaction does not exists.'); void_journal_trans($type, $type_no); break; case ST_BANKDEPOSIT : // it's a deposit case ST_BANKTRANSFER : // it's a transfer if (!check_void_bank_trans($type, $type_no)) - return false; + return _('This transaction cannot be voided because the operation would decrease account balance below allowed limit in some point of account history.'); case ST_BANKPAYMENT : // it's a payment if (!exists_bank_trans($type, $type_no)) - return false; + return _('Selected transaction does not exists.'); void_bank_trans($type, $type_no); break; case ST_CUSTPAYMENT : // it's a customer payment if (!check_void_bank_trans($type, $type_no)) - return false; + return _('This transaction cannot be voided because the operation would decrease account balance below allowed limit in some point of account history.'); case ST_SALESINVOICE : // it's a customer invoice case ST_CUSTCREDIT : // it's a customer credit note case ST_CUSTDELIVERY : // it's a customer dispatch if (!exists_customer_trans($type, $type_no)) - return false; + return _('Selected transaction does not exists.'); if ($type == ST_CUSTDELIVERY) // added 04 Oct 2008 by Joe Hunt. If delivery note has a not voided invoice, then NO. { $childs = get_sales_child_lines($type, $type_no, false); // 2011-03-17 This had been changed. Joe if ($childs && db_num_rows($childs)) - return false; + return _('This delivery cannot be voided because it was already invoiced.'); } post_void_customer_trans($type, $type_no); break; case ST_LOCTRANSFER : // it's a stock transfer if (get_stock_transfer_items($type_no) == null) - return false; + return _('Selected transaction does not exists.'); void_stock_transfer($type_no); break; case ST_INVADJUST : // it's a stock adjustment if (get_stock_adjustment_items($type_no) == null) - return false; + return _('Selected transaction does not exists.'); void_stock_adjustment($type_no); break; case ST_PURCHORDER : // it's a PO - return false; + return _('This transaction type cannot be voided.'); + break; case ST_SUPPRECEIVE : // it's a GRN if (exists_grn_on_invoices($type_no)) - return false; + return _('This GRN cannot be voided because it was already invoiced.'); case ST_SUPPINVOICE : // it's a suppler invoice case ST_SUPPCREDIT : // it's a supplier credit note case ST_SUPPAYMENT : // it's a supplier payment if (!exists_supp_trans($type, $type_no)) - return false; + return _('Selected transaction does not exists.'); if (!post_void_supp_trans($type, $type_no)) - return false; + return _('Error encountered when voiding transaction.'); break; case ST_WORKORDER : // it's a work order if (!get_work_order($type_no, true)) - return false; + return _('Selected transaction does not exists.'); void_work_order($type_no); break; case ST_MANUISSUE : // it's a work order issue if (!exists_work_order_issue($type_no)) - return false; + return _('Selected transaction does not exists.'); void_work_order_issue($type_no); break; case ST_MANURECEIVE : // it's a work order production if (!exists_work_order_produce($type_no)) - return false; + return _('Selected transaction does not exists.'); void_work_order_produce($type_no); break; case ST_SALESORDER: // it's a sales order case ST_SALESQUOTE: // it's a sales quotation - return false; + return _('This transaction type cannot be voided.'); case ST_COSTUPDATE : // it's a stock cost update - return false; + return _('This transaction type cannot be voided.'); break; } @@ -114,7 +115,7 @@ add_audit_trail($type, $type_no, $date_, _("Voided.")."\n".$memo_); $Refs->restore_last($type, $type_no); add_voided_entry($type, $type_no, $date_, $memo_); - return true; + return false; } //-------------------------------------------------------------------------------------------------- diff -r 6d9df253c30b -r 3c327e570694 admin/void_transaction.php --- a/admin/void_transaction.php Wed Feb 18 13:13:33 2015 +0100 +++ b/admin/void_transaction.php Thu Mar 19 11:05:04 2015 +0100 @@ -283,10 +283,10 @@ return; } - $ret = void_transaction($_POST['filterType'], $_POST['trans_no'], + $msg = void_transaction($_POST['filterType'], $_POST['trans_no'], $_POST['date_'], $_POST['memo_']); - if ($ret) + if (!$msg) { display_notification_centered(_("Selected transaction has been voided.")); unset($_POST['trans_no']); @@ -294,7 +294,7 @@ unset($_POST['date_']); } else { - display_error(_("The entered transaction does not exist or cannot be voided.")); + display_error($msg); set_focus('trans_no'); } diff -r 6d9df253c30b -r 3c327e570694 gl/includes/db/gl_db_banking.inc --- a/gl/includes/db/gl_db_banking.inc Wed Feb 18 13:13:33 2015 +0100 +++ b/gl/includes/db/gl_db_banking.inc Thu Mar 19 11:05:04 2015 +0100 @@ -536,7 +536,15 @@ // old transaction can be voided only after new transaction is entered, // otherwise the operation could fail for cash accounts due to temporary negative balance if (@$old_trans) - void_transaction($trans_type, $old_trans, Today(), _("Document reentered.")); + { + $msg = void_transaction($trans_type, $old_trans, Today(), _("Document reentered.")); + if ($msg) + { + display_error($msg); + return false; + } + } + $args->trans_no = $trans_no; hook_db_postwrite($args, $trans_type); |
|
From: FrontAccounting <fro...@us...> - 2015-03-23 22:35:16
|
details: http://frontaccounting.hg.sourceforge.net:8000/hgroot/frontaccounting/frontaccounting/hg/p/frontaccounting/mercurial/rev/6d9df253c30b changeset: 3533:6d9df253c30b user: Janusz Dobrowolski <ja...@fr...> date: Wed Feb 18 13:13:33 2015 +0100 description: Improved journal trans: added currency support, tax and source document date. Allowed multiply customer/supplier allocations to single journal transaction. diffstat: admin/db/fiscalyears_db.inc | 24 +- gl/accruals.php | 51 +- gl/gl_journal.php | 308 +++++++++++++++++-- gl/includes/db/gl_db_accounts.inc | 12 + gl/includes/db/gl_db_banking.inc | 35 +- gl/includes/db/gl_db_trans.inc | 111 ------- gl/includes/db/gl_journal.inc | 166 ++++++++++ gl/includes/gl_db.inc | 1 + gl/includes/ui/gl_journal_ui.inc | 93 +++-- includes/db/inventory_db.inc | 47 +- includes/types.inc | 3 + includes/ui/allocation_cart.inc | 63 ++- includes/ui/items_cart.inc | 313 ++++++++++++++++--- includes/ui/ui_controls.inc | 59 +++- includes/ui/ui_input.inc | 8 + inventory/includes/db/items_trans_db.inc | 20 +- manufacturing/includes/db/work_order_costing_db.inc | 14 +- purchasing/includes/db/invoice_db.inc | 10 +- purchasing/includes/db/suppalloc_db.inc | 101 +++-- purchasing/includes/db/suppliers_db.inc | 3 +- purchasing/includes/purchasing_db.inc | 6 +- reporting/includes/reporting.inc | 4 +- sales/includes/db/branches_db.inc | 10 + sales/includes/db/cust_trans_db.inc | 15 +- sales/includes/db/custalloc_db.inc | 137 +++++--- sales/includes/db/customers_db.inc | 13 +- sales/includes/db/sales_invoice_db.inc | 2 +- sql/alter2.4.sql | 46 ++ sql/en_US-demo.sql | 31 +- sql/en_US-new.sql | 27 +- 30 files changed, 1268 insertions(+), 465 deletions(-) diffs (truncated from 3020 to 300 lines): diff -r b959d231bf05 -r 6d9df253c30b admin/db/fiscalyears_db.inc --- a/admin/db/fiscalyears_db.inc Wed Feb 18 10:06:05 2015 +0100 +++ b/admin/db/fiscalyears_db.inc Wed Feb 18 13:13:33 2015 +0100 @@ -128,6 +128,8 @@ //--------------------------------------------------------------------------------------------- function close_year($year) { + global $Refs; + $co = get_company_prefs(); if (get_gl_account($co['retained_earnings_act']) == false || get_gl_account($co['profit_loss_year_act']) == false) { @@ -157,15 +159,15 @@ if ($balance != 0.0) { - $trans_type = ST_JOURNAL; - $trans_id = get_next_trans_no($trans_type); + $cart = new items_cart(ST_JOURNAL); + $cart->reference = $Refs->get_next(ST_JOURNAL, null, $to); + $cart->tran_date = $cart->doc_date = $cart->event_date = $to; - 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); - - } + $cart->add_gl_item($co['retained_earnings_act'], 0, 0, -$balance, _("Closing Year"), '', 0); + $cart->add_gl_item($co['profit_loss_year_act'], 0, 0, $balance, _("Closing Year"), '', 0); + $cart->memo_ = _("Closing Year"); + write_journal_entries($cart); + } close_transactions($to); commit_transaction(); @@ -368,10 +370,10 @@ { global $Refs; $trans_type = ST_JOURNAL; - $reference = $Refs->get_next($trans_type); + $date_ = sql2date($to); + $reference = $Refs->get_next($trans_type, null, $date_); + add_journal($trans_type, $trans_no, $total, $date_, get_company_currency(), $reference); $Refs->save($trans_type, $trans_no, $reference); - $date_ = sql2date($to); - add_audit_trail($trans_type, $trans_no, $date_); } $sql = "SELECT bank_act, SUM(amount) AS amount FROM ".TB_PREF."bank_trans WHERE trans_date <= '$to' GROUP BY bank_act"; diff -r b959d231bf05 -r 6d9df253c30b gl/accruals.php --- a/gl/accruals.php Wed Feb 18 10:06:05 2015 +0100 +++ b/gl/accruals.php Wed Feb 18 13:13:33 2015 +0100 @@ -1,4 +1,14 @@ <?php +/********************************************************************** + 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 <http://www.gnu.org/licenses/gpl-3.0.html>. +***********************************************************************/ /********************************************** Author: Joe Hunt Name: Revenue / Cost Accruals v2.2 @@ -8,7 +18,7 @@ $path_to_root=".."; include_once($path_to_root . "/includes/session.inc"); -include_once($path_to_root . "/gl/includes/db/gl_db_trans.inc"); +include_once($path_to_root . "/includes/ui/items_cart.inc"); $js = get_js_open_window(800, 500); if (user_use_date_picker()) @@ -61,11 +71,11 @@ $date_ = begin_month($date_); // avoid skip on shorter months $date = end_month($date_); // avoid skip on shorter months } - $lastdate = ($freq == 1 ? add_days($date_, 7*$per) - : ($freq == 2 ? add_days($date_, 14*$per) - : ($freq == 3 ? add_months($date_, $per) - : add_months($date_, 3*$per)))); - + + $lastdate = ($freq == 1 ? add_days($date_, 7*$per) : + ($freq == 2 ? add_days($date_, 14*$per) : + ($freq == 3 ? end_month(add_months($date_, $per)) : + end_month(add_months($date_, 3*$per))))); if (!is_date_in_fiscalyears($lastdate, false)) { display_error(_("Some of the period dates are outside the fiscal year or are closed for further data entry. Create a new fiscal year first!")); @@ -112,31 +122,33 @@ switch($freq) { case 1: - $date = add_days($date_, $i*7); + $date = $date_ = add_days($date_, 7); break; case 2: - $date = add_days($date_, $i*14); + $date = $date_ = add_days($date_, 14); break; case 3: - $date = add_months($date_, $i*1); + $date_ = add_months($date_, 1); + $date = end_month($date_); break; case 4: - $date = add_months($date_, $i*3); + $date_ = add_months($date_, 3); + $date = end_month($date_); 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_audit_trail(ST_JOURNAL, $id, $date); - add_comments(ST_JOURNAL, $id, $date, $memo); - $Refs->save(ST_JOURNAL, $id, $ref); + $cart = new items_cart(ST_JOURNAL); + $cart->memo_ = $memo; + $cart->reference = $Refs->get_next(ST_JOURNAL, null, $date); + $cart->tran_date = $cart->doc_date = $cart->event_date = $date; + $cart->add_gl_item(get_post('acc_act'), 0, 0, -$am0, $cart->reference); + $cart->add_gl_item(get_post('res_act'), get_post('dimension_id'), + get_post('dimension2_id'), $am0, $cart->reference); + write_journal_entries($cart); + $cart->clear_items(); } else { @@ -224,4 +236,3 @@ end_form(); end_page(); - diff -r b959d231bf05 -r 6d9df253c30b gl/gl_journal.php --- a/gl/gl_journal.php Wed Feb 18 10:06:05 2015 +0100 +++ b/gl/gl_journal.php Wed Feb 18 13:13:33 2015 +0100 @@ -21,7 +21,6 @@ include_once($path_to_root . "/gl/includes/ui/gl_journal_ui.inc"); include_once($path_to_root . "/gl/includes/gl_db.inc"); include_once($path_to_root . "/gl/includes/gl_ui.inc"); -include_once($path_to_root . "/taxes/db/tax_types_db.inc"); $js = ''; if ($SysPrefs->use_popup_windows) @@ -37,14 +36,15 @@ $_SESSION['page_title'] = _($help_context = "Journal Entry"); page($_SESSION['page_title'], false, false,'', $js); - //-------------------------------------------------------------------------------------------------- function line_start_focus() { global $Ajax; unset($_POST['Index']); - $Ajax->activate('items_table'); + $Ajax->activate('tabs'); + unset($_POST['_code_id_edit'], $_POST['code_id'], $_POST['AmountDebit'], + $_POST['AmountCredit'], $_POST['dimension_id'], $_POST['dimension2_id']); set_focus('_code_id_edit'); } //----------------------------------------------------------------------------------------------- @@ -92,7 +92,6 @@ hyperlink_params("$path_to_root/gl/gl_journal.php", _("Entry &New Journal Entry"), "NewJournal=Yes"); display_footer_exit(); } - create_cart($_GET['trans_type'], $_GET['trans_no']); } @@ -105,44 +104,103 @@ unset ($_SESSION['journal_items']); } + check_is_closed($type, $trans_no); $cart = new items_cart($type); $cart->order_id = $trans_no; if ($trans_no) { + $header = get_journal($type, $trans_no); + $cart->event_date = sql2date($header['event_date']); + $cart->doc_date = sql2date($header['doc_date']); + $cart->tran_date = sql2date($header['tran_date']); + $cart->currency = $header['currency']; + $cart->rate = $header['rate']; + $cart->source_ref = $header['source_ref']; + $result = get_gl_trans($type, $trans_no); if ($result) { while ($row = db_fetch($result)) { - if ($row['amount'] == 0) continue; - $date = $row['tran_date']; - $cart->add_gl_item($row['account'], $row['dimension_id'], - $row['dimension2_id'], $row['amount'], $row['memo_'], '', $row['person_id']); + $curr_amount = $cart->rate ? round($row['amount']/$cart->rate, $_SESSION["wa_current_user"]->prefs->price_dec()) : $row['amount']; + if ($curr_amount) + $cart->add_gl_item($row['account'], $row['dimension_id'], $row['dimension2_id'], + $curr_amount, $row['memo_'], '', $row['person_id']); } } $cart->memo_ = get_comments_string($type, $trans_no); - $cart->tran_date = sql2date($date); - $cart->reference = $Refs->get($type, $trans_no); + $cart->reference = $header['reference']; + $_POST['ref_original'] = $cart->reference; // Store for comparison when updating + + // update net_amounts from tax register + + // retrieve tax details + $tax_info = $cart->collect_tax_info(); // tax amounts in reg are always consistent with GL, so we can read them from GL lines + + $taxes = get_trans_tax_details($type, $trans_no); + while ($detail = db_fetch($taxes)) + { + $tax_id = $detail['tax_type_id']; + $tax_info['net_amount'][$tax_id] = $detail['net_amount']; // we can two records for the same tax_id, but in this case net_amount is the same + $tax_info['tax_date'] = sql2date($detail['effective_date']); + $tax_info['tax_group'] = $detail['tax_group_id']; + + } + if (isset($tax_info['net_amount'])) // guess exempt sales/purchase if any tax has been found + { + $net_sum = 0; + foreach($cart->gl_items as $gl) + if (!is_tax_account($gl->code_id) && !is_subledger_account($gl->code_id, $gl->person_id)) + $net_sum += $gl->amount; + + $ex_net = abs($net_sum) - array_sum($tax_info['net_amount']); + if ($ex_net > 0) + $tax_info['net_amount_ex'] = $ex_net; + } + $cart->tax_info = $tax_info; + } else { - $cart->reference = $Refs->get_next(0); - $cart->tran_date = new_doc_date(); + $cart->tran_date = $cart->doc_date = $cart->event_date = new_doc_date(); if (!is_date_in_fiscalyear($cart->tran_date)) $cart->tran_date = end_fiscalyear(); + $cart->reference = $Refs->get_next(ST_JOURNAL, null, $cart->tran_date); $_POST['ref_original'] = -1; } $_POST['memo_'] = $cart->memo_; $_POST['ref'] = $cart->reference; $_POST['date_'] = $cart->tran_date; - + $_POST['event_date'] = $cart->event_date; + $_POST['doc_date'] = $cart->doc_date; + $_POST['currency'] = $cart->currency; + $_POST['_ex_rate'] = exrate_format($cart->rate); + $_POST['source_ref'] = $cart->source_ref; + if (isset($cart->tax_info['net_amount']) || (!$trans_no && get_company_pref('default_gl_vat'))) + $_POST['taxable_trans'] = true; $_SESSION['journal_items'] = &$cart; } +function update_tax_info() +{ + + if (!isset($_SESSION['journal_items']->tax_info) || list_updated('tax_category')) + $_SESSION['journal_items']->tax_info = $_SESSION['journal_items']->collect_tax_info(); + + foreach ($_SESSION['journal_items']->tax_info as $name => $value) + if (is_array($value)) + { + foreach ($value as $id => $amount) + { + $_POST[$name.'_'.$id] = price_format($amount); + } + } else + $_POST[$name] = $value; + $_POST['tax_date'] = $_SESSION['journal_items']->order_id ? $_SESSION['journal_items']->tax_info['tax_date'] : $_POST['date_']; +} + //----------------------------------------------------------------------------------------------- - if (isset($_POST['Process'])) { - $input_error = 0; if ($_SESSION['journal_items']->count_gl_items() < 1) { @@ -150,7 +208,7 @@ set_focus('code_id'); |
|
From: FrontAccounting <fro...@us...> - 2015-03-23 22:35:16
|
details: http://frontaccounting.hg.sourceforge.net:8000/hgroot/frontaccounting/frontaccounting/hg/p/frontaccounting/mercurial/rev/53e72cb7a1ad changeset: 3536:53e72cb7a1ad user: Janusz Dobrowolski <ja...@fr...> date: Thu Mar 19 15:17:54 2015 +0100 description: Fixed handling extended journal entries in various places. diffstat: admin/db/transactions_db.inc | 46 +++--- gl/includes/db/gl_db_banking.inc | 2 +- gl/includes/db/gl_db_trans.inc | 142 ++++++++++++++----- gl/inquiry/journal_inquiry.php | 20 +- gl/view/gl_trans_view.php | 62 ++++++-- includes/db/audit_trail_db.inc | 24 ++- includes/ui/ui_lists.inc | 21 ++ purchasing/allocations/supplier_allocation_main.php | 4 +- purchasing/includes/db/supp_trans_db.inc | 9 +- purchasing/inquiry/supplier_allocation_inquiry.php | 33 ++- purchasing/supplier_payment.php | 6 +- reporting/rep101.php | 55 ++++-- reporting/rep102.php | 22 +- sales/includes/db/cust_trans_db.inc | 20 ++- sales/includes/db/sales_invoice_db.inc | 4 +- sales/inquiry/customer_allocation_inquiry.php | 8 +- sales/inquiry/customer_inquiry.php | 5 +- 17 files changed, 329 insertions(+), 154 deletions(-) diffs (truncated from 922 to 300 lines): diff -r 07f74f15b6fc -r 53e72cb7a1ad admin/db/transactions_db.inc --- a/admin/db/transactions_db.inc Thu Mar 19 11:05:37 2015 +0100 +++ b/admin/db/transactions_db.inc Thu Mar 19 15:17:54 2015 +0100 @@ -186,30 +186,30 @@ { switch ($type) { - case ST_JOURNAL : return array("".TB_PREF."gl_trans", "type", "type_no", null, "tran_date"); - case ST_BANKPAYMENT : return array("".TB_PREF."bank_trans", "type", "trans_no", "ref", "trans_date"); - case ST_BANKDEPOSIT : return array("".TB_PREF."bank_trans", "type", "trans_no", "ref", "trans_date"); + case ST_JOURNAL : return array(TB_PREF."journal", "type", "trans_no", "reference", "tran_date"); + case ST_BANKPAYMENT : return array(TB_PREF."bank_trans", "type", "trans_no", "ref", "trans_date"); + case ST_BANKDEPOSIT : return array(TB_PREF."bank_trans", "type", "trans_no", "ref", "trans_date"); case 3 : return null; - case ST_BANKTRANSFER : return array("".TB_PREF."bank_trans", "type", "trans_no", "ref", "trans_date"); - case ST_SALESINVOICE : return array("".TB_PREF."debtor_trans", "type", "trans_no", "reference", "tran_date"); - case ST_CUSTCREDIT : return array("".TB_PREF."debtor_trans", "type", "trans_no", "reference", "tran_date"); - case ST_CUSTPAYMENT : return array("".TB_PREF."debtor_trans", "type", "trans_no", "reference", "tran_date"); - 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", "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"); - case ST_SUPPRECEIVE : return array("".TB_PREF."grn_batch", null, "id", "reference", "delivery_date"); - case ST_WORKORDER : return array("".TB_PREF."workorders", null, "id", "wo_ref", "released_date"); - case ST_MANUISSUE : return array("".TB_PREF."wo_issues", null, "issue_no", "reference", "issue_date"); - case ST_MANURECEIVE : return array("".TB_PREF."wo_manufacture", null, "id", "reference", "date_"); - case ST_SALESORDER : return array("".TB_PREF."sales_orders", "trans_type", "order_no", "reference", "ord_date"); - case 31 : return array("".TB_PREF."service_orders", null, "order_no", "cust_ref", "date"); - case ST_SALESQUOTE : return array("".TB_PREF."sales_orders", "trans_type", "order_no", "reference", "ord_date"); - case ST_DIMENSION : return array("".TB_PREF."dimensions", null, "id", "reference", "date_"); - case ST_COSTUPDATE : return array("".TB_PREF."gl_trans", "type", "type_no", null, "tran_date"); + case ST_BANKTRANSFER : return array(TB_PREF."bank_trans", "type", "trans_no", "ref", "trans_date"); + case ST_SALESINVOICE : return array(TB_PREF."debtor_trans", "type", "trans_no", "reference", "tran_date"); + case ST_CUSTCREDIT : return array(TB_PREF."debtor_trans", "type", "trans_no", "reference", "tran_date"); + case ST_CUSTPAYMENT : return array(TB_PREF."debtor_trans", "type", "trans_no", "reference", "tran_date"); + 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", "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"); + case ST_SUPPRECEIVE : return array(TB_PREF."grn_batch", null, "id", "reference", "delivery_date"); + case ST_WORKORDER : return array(TB_PREF."workorders", null, "id", "wo_ref", "released_date"); + case ST_MANUISSUE : return array(TB_PREF."wo_issues", null, "issue_no", "reference", "issue_date"); + case ST_MANURECEIVE : return array(TB_PREF."wo_manufacture", null, "id", "reference", "date_"); + case ST_SALESORDER : return array(TB_PREF."sales_orders", "trans_type", "order_no", "reference", "ord_date"); + case 31 : return array(TB_PREF."service_orders", null, "order_no", "cust_ref", "date"); + case ST_SALESQUOTE : return array(TB_PREF."sales_orders", "trans_type", "order_no", "reference", "ord_date"); + case ST_DIMENSION : return array(TB_PREF."dimensions", null, "id", "reference", "date_"); + case ST_COSTUPDATE : return array(TB_PREF."gl_trans", "type", "type_no", null, "tran_date"); } display_db_error("invalid type ($type) sent to get_systype_db_info", "", true); diff -r 07f74f15b6fc -r 53e72cb7a1ad gl/includes/db/gl_db_banking.inc --- a/gl/includes/db/gl_db_banking.inc Thu Mar 19 11:05:37 2015 +0100 +++ b/gl/includes/db/gl_db_banking.inc Thu Mar 19 15:17:54 2015 +0100 @@ -92,7 +92,7 @@ { $to = date2sql($date); - $sql = "SELECT SUM(IF(t.type =".ST_CUSTCREDIT." OR t.type = ".ST_CUSTPAYMENT." OR t.type = ".ST_BANKDEPOSIT.", + $sql = "SELECT SUM(IF(t.type =".ST_CUSTCREDIT." OR t.type = ".ST_CUSTPAYMENT." OR t.type = ".ST_BANKDEPOSIT." OR t.type = ".ST_JOURNAL.", -(t.ov_amount + t.ov_gst + t.ov_freight + t.ov_freight_tax + t.ov_discount), (t.ov_amount + t.ov_gst + t.ov_freight + t.ov_freight_tax + t.ov_discount))) AS amount, dt.debtor_no, dt.name, dt.curr_code, b.receivables_account diff -r 07f74f15b6fc -r 53e72cb7a1ad gl/includes/db/gl_db_trans.inc --- a/gl/includes/db/gl_db_trans.inc Thu Mar 19 11:05:37 2015 +0100 +++ b/gl/includes/db/gl_db_trans.inc Thu Mar 19 15:17:54 2015 +0100 @@ -104,45 +104,69 @@ function get_gl_transactions($from_date, $to_date, $trans_no=0, $account=null, $dimension=0, $dimension2=0, $filter_type=null, - $amount_min=null, $amount_max=null) + $amount_min=null, $amount_max=null, $person_id=null) { global $SysPrefs; - + $from = date2sql($from_date); $to = date2sql($to_date); - $sql = "SELECT ".TB_PREF."gl_trans.*, " - .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 + $sql = "SELECT gl.*, j.event_date, j.doc_date, a.gl_seq, u.user_id, st.supp_reference, gl.person_id subcode, + IFNULL(IFNULL(sup.supp_name, debt.name), bt.person_id) as person_name, + IFNULL(gl.person_id, IFNULL(sup.supplier_id, debt.debtor_no)) as person_id, + IFNULL(st.tran_date, IFNULL(dt.tran_date, IFNULL(bt.trans_date, IFNULL(grn.delivery_date, gl.tran_date)))) as doc_date, + coa.account_name, ref.reference + FROM " + .TB_PREF."gl_trans gl + LEFT JOIN ".TB_PREF."voided v ON gl.type_no=v.id AND v.type=gl.type + + LEFT JOIN ".TB_PREF."supp_trans st ON gl.type_no=st.trans_no AND st.type=gl.type AND (gl.type!=".ST_JOURNAL." OR gl.person_id=st.supplier_id) + LEFT JOIN ".TB_PREF."grn_batch grn ON grn.id=gl.type_no AND gl.type=".ST_SUPPRECEIVE." AND gl.person_id=grn.supplier_id + LEFT JOIN ".TB_PREF."debtor_trans dt ON gl.type_no=dt.trans_no AND dt.type=gl.type AND (gl.type!=".ST_JOURNAL." OR gl.person_id=dt.debtor_no) + + LEFT JOIN ".TB_PREF."suppliers sup ON st.supplier_id=sup.supplier_id OR grn.supplier_id=sup.supplier_id + LEFT JOIN ".TB_PREF."cust_branch branch ON dt.branch_code=branch.branch_code + LEFT JOIN ".TB_PREF."debtors_master debt ON dt.debtor_no=debt.debtor_no + + LEFT JOIN ".TB_PREF."bank_trans bt ON bt.type=gl.type AND bt.trans_no=gl.type_no AND bt.amount!=0 + AND bt.person_type_id=gl.person_type_id AND bt.person_id=gl.person_id + + LEFT JOIN ".TB_PREF."journal j ON j.type=gl.type AND j.trans_no=gl.type_no + LEFT JOIN ".TB_PREF."audit_trail a ON a.type=gl.type AND a.trans_no=gl.type_no AND NOT ISNULL(gl_seq) + LEFT JOIN ".TB_PREF."users u ON a.user=u.id + + LEFT JOIN ".TB_PREF."refs ref ON ref.type=gl.type AND ref.id=gl.type_no," + .TB_PREF."chart_master coa + WHERE coa.account_code=gl.account AND ISNULL(v.date_) - AND tran_date >= '$from' - AND tran_date <= '$to'"; + AND gl.tran_date >= '$from' + AND gl.tran_date <= '$to'"; if (isset($SysPrefs->show_voided_gl_trans) && $SysPrefs->show_voided_gl_trans == 0) - $sql .= " AND ".TB_PREF."gl_trans.amount <> 0"; + $sql .= " AND gl.amount <> 0"; + + if ($person_id) + $sql .= " AND gl.person_id=".db_escape($person_id); + if ($trans_no > 0) - $sql .= " AND ".TB_PREF."gl_trans.type_no LIKE ".db_escape('%'.$trans_no); + $sql .= " AND gl.type_no LIKE ".db_escape('%'.$trans_no);; if ($account != null) - $sql .= " AND ".TB_PREF."gl_trans.account = ".db_escape($account); + $sql .= " AND gl.account = ".db_escape($account); - if ($dimension != 0) - $sql .= " AND ".TB_PREF."gl_trans.dimension_id = ".($dimension<0?0:db_escape($dimension)); + if ($dimension > 0) + $sql .= " AND gl.dimension_id = ".($dimension<0 ? 0 : db_escape($dimension)); - if ($dimension2 != 0) - $sql .= " AND ".TB_PREF."gl_trans.dimension2_id = ".($dimension2<0?0:db_escape($dimension2)); + if ($dimension2 > 0) + $sql .= " AND gl.dimension2_id = ".($dimension2<0 ? 0 : db_escape($dimension2)); if ($filter_type != null AND is_numeric($filter_type)) - $sql .= " AND ".TB_PREF."gl_trans.type= ".db_escape($filter_type); - + $sql .= " AND gl.type= ".db_escape($filter_type); + if ($amount_min != null) - $sql .= " AND ABS(".TB_PREF."gl_trans.amount) >= ABS(".db_escape($amount_min).")"; + $sql .= " AND ABS(gl.amount) >= ABS(".db_escape($amount_min).")"; if ($amount_max != null) - $sql .= " AND ABS(".TB_PREF."gl_trans.amount) <= ABS(".db_escape($amount_max).")"; + $sql .= " AND ABS(gl.amount) <= ABS(".db_escape($amount_max).")"; $sql .= " ORDER BY tran_date, counter"; @@ -154,14 +178,27 @@ function get_gl_trans($type, $trans_id) { - $sql = "SELECT gl.*, cm.account_name, IF(ISNULL(refs.reference), '', refs.reference) AS reference FROM " - .TB_PREF."gl_trans as gl + $sql = "SELECT gl.*, cm.account_name, IF(ISNULL(refs.reference), '', refs.reference) AS reference, user.real_name, + IFNULL(st.tran_date, IFNULL(dt.tran_date, IFNULL(bt.trans_date, IFNULL(grn.delivery_date, gl.tran_date)))) as doc_date, + IF(ISNULL(st.supp_reference), '', st.supp_reference) AS supp_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)" + LEFT JOIN ".TB_PREF."refs as refs ON (gl.type=refs.type AND gl.type_no=refs.id) + LEFT JOIN ".TB_PREF."audit_trail as audit ON (gl.type=audit.type AND gl.type_no=audit.trans_no AND NOT ISNULL(gl_seq)) + LEFT JOIN ".TB_PREF."users as user ON (audit.user=user.id) + # all this below just to retrieve doc_date :> + LEFT JOIN ".TB_PREF."supp_trans st ON gl.type_no=st.trans_no AND st.type=gl.type AND (gl.type!=".ST_JOURNAL." OR gl.person_id=st.supplier_id) + LEFT JOIN ".TB_PREF."grn_batch grn ON grn.id=gl.type_no AND gl.type=".ST_SUPPRECEIVE." AND gl.person_id=grn.supplier_id + LEFT JOIN ".TB_PREF."debtor_trans dt ON gl.type_no=dt.trans_no AND dt.type=gl.type AND (gl.type!=".ST_JOURNAL." OR gl.person_id=dt.debtor_no) + LEFT JOIN ".TB_PREF."bank_trans bt ON bt.type=gl.type AND bt.trans_no=gl.type_no AND bt.amount!=0 + AND bt.person_type_id=gl.person_type_id AND bt.person_id=gl.person_id + LEFT JOIN ".TB_PREF."journal j ON j.type=gl.type AND j.trans_no=gl.type_no" + ." WHERE gl.type= ".db_escape($type) ." AND gl.type_no = ".db_escape($trans_id) ." AND gl.amount <> 0" - ." ORDER BY counter"; + ." ORDER BY tran_date, counter"; + return db_query($sql, "The gl transactions could not be retrieved"); } @@ -518,18 +555,26 @@ commit_transaction(); } -function get_sql_for_journal_inquiry($filter, $from, $to, $ref='', $memo='', $alsoclosed=false) +function get_sql_for_journal_inquiry($filter, $from, $to, $ref='', $memo='', $alsoclosed=false, + $user_id=null, $contractor_id=null, $dimension=null) { $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 + gl.type as trans_type, + gl.type_no as trans_no, + IFNULL(max(supp.supp_name), max(cust.name)) as name, + IF(ISNULL(st.supp_reference), '', st.supp_reference) AS supp_reference, + refs.reference," + .($dimension ? " -SUM(IF(dim.dimension in(gl.dimension_id,gl.dimension2_id), gl.amount, 0)) as amount,":" SUM(IF(gl.amount>0, gl.amount,0)) as amount,") + ."com.memo_, + IF(ISNULL(u.user_id),'',u.user_id) as user_id"; + + if ($contractor_id > 0) { + $sql.= ", st.supplier_id, dt.debtor_no "; + } + + $sql.= " 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 @@ -538,11 +583,18 @@ (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) . "' + LEFT JOIN ".TB_PREF."debtor_trans dt ON dt.type=gl.type AND gl.type_no=dt.trans_no + LEFT JOIN ".TB_PREF."debtors_master cust ON gl.person_type_id=2 AND gl.person_id=cust.debtor_no + LEFT JOIN ".TB_PREF."supp_trans st ON st.type=gl.type AND gl.type_no=st.trans_no + LEFT JOIN ".TB_PREF."suppliers supp ON gl.person_type_id=3 AND gl.person_id=supp.supplier_id" + .($dimension ? + " LEFT JOIN (SELECT type, type_no, MAX(IFNULL(dimension_id, dimension2_id)) dimension FROM ".TB_PREF."gl_trans GROUP BY type, type_no) dim + ON gl.type=dim.type AND gl.type_no=dim.type_no" : '') + ." 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%"); + $sql .= " AND refs.reference LIKE ". db_escape("%$ref%"); } if ($memo) { $sql .= " AND com.memo_ LIKE ". db_escape("%$memo%"); @@ -553,9 +605,21 @@ if (!$alsoclosed) { $sql .= " AND gl_seq=0"; } - else - $sql .= " AND NOT ISNULL(a.gl_seq)"; + else + $sql .= " AND NOT ISNULL(a.gl_seq)"; - $sql .= " GROUP BY gl.tran_date, a.gl_seq, gl.type, gl.type_no"; + if ($user_id != null) + $sql .= " AND user_id = ".db_escape($user_id); + + if ($contractor_id > 0) { + $sql.= " AND (dt.debtor_no =".$contractor_id; + $sql.= " OR st.supplier_id =".$contractor_id.") "; + } + + if ($dimension != null) + $sql .= " AND dim.dimension = ".db_escape($dimension); + + $sql .= " GROUP BY gl.tran_date, a.gl_seq, gl_seq, gl.type, gl.type_no"; + return $sql; } diff -r 07f74f15b6fc -r 53e72cb7a1ad gl/inquiry/journal_inquiry.php --- a/gl/inquiry/journal_inquiry.php Thu Mar 19 11:05:37 2015 +0100 +++ b/gl/inquiry/journal_inquiry.php Thu Mar 19 15:17:54 2015 +0100 @@ -48,12 +48,15 @@ date_cells(_("From:"), 'FromDate', '', null, 0, -1, 0); date_cells(_("To:"), 'ToDate'); -check_cells( _("Show closed:"), 'AlsoClosed', null); - submit_cells('Search', _("Search"), '', '', 'default'); end_row(); start_row(); ref_cells(_("Memo:"), 'Memo', '',null, _('Enter memo fragment or leave empty')); +users_list_cells(_("User:"), 'userid', null, false); +if (get_company_pref('use_dimension') && isset($_POST['dimension'])) // display dimension only, when started in dimension mode + dimensions_list_cells(_('Dimension:'), 'dimension', null, true, null, true); +users_list_cells(_("User:"), 'userid', null, false); +check_cells( _("Show closed:"), 'AlsoClosed', null); end_row(); end_table(); @@ -71,25 +74,25 @@ |
|
From: FrontAccounting <fro...@us...> - 2015-03-23 22:35:15
|
details: http://frontaccounting.hg.sourceforge.net:8000/hgroot/frontaccounting/frontaccounting/hg/p/frontaccounting/mercurial/rev/b959d231bf05 changeset: 3532:b959d231bf05 user: Janusz Dobrowolski <ja...@fr...> date: Wed Feb 18 10:06:05 2015 +0100 description: Added memo, usage fields to Quick Entries. diffstat: gl/includes/db/gl_db_bank_accounts.inc | 20 ++-- gl/manage/gl_quick_entries.php | 32 +++++--- includes/ui/ui_view.inc | 120 +++++++++++++++++++++----------- sql/alter2.4.sql | 3 + sql/en_US-demo.sql | 20 +++-- sql/en_US-new.sql | 20 +++-- 6 files changed, 134 insertions(+), 81 deletions(-) diffs (truncated from 495 to 300 lines): diff -r 1200c1e6115f -r b959d231bf05 gl/includes/db/gl_db_bank_accounts.inc --- a/gl/includes/db/gl_db_bank_accounts.inc Wed Mar 04 18:57:09 2015 +0100 +++ b/gl/includes/db/gl_db_bank_accounts.inc Wed Feb 18 10:06:05 2015 +0100 @@ -115,22 +115,22 @@ //--------------------------------------------------------------------------------------------- -function add_quick_entry($description, $type, $base_amount, $base_desc, $bal_type) +function add_quick_entry($description, $type, $base_amount, $base_desc, $bal_type, $usage) { - $sql = "INSERT INTO ".TB_PREF."quick_entries (description, type, base_amount, base_desc, bal_type) + $sql = "INSERT INTO ".TB_PREF."quick_entries (description, type, base_amount, base_desc, bal_type, `usage`) VALUES (".db_escape($description).", ".db_escape($type).", " - .db_escape($base_amount).", ".db_escape($base_desc).", ".db_escape($bal_type).")"; + .db_escape($base_amount).", ".db_escape($base_desc).", ".db_escape($bal_type).", ".db_escape($usage).")"; db_query($sql, "could not insert quick entry for $description"); } //--------------------------------------------------------------------------------------------- -function update_quick_entry($selected_id, $description, $type, $base_amount, $base_desc, $bal_type) +function update_quick_entry($selected_id, $description, $type, $base_amount, $base_desc, $bal_type, $usage) { $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).", bal_type=".db_escape($bal_type)." + .", base_desc=".db_escape($base_desc).", bal_type=".db_escape($bal_type).", `usage`=".db_escape($usage)." WHERE id = ".db_escape($selected_id); db_query($sql, "could not update quick entry for $selected_id"); @@ -147,25 +147,25 @@ //--------------------------------------------------------------------------------------------- -function add_quick_entry_line($qid, $action, $dest_id, $amount, $dim, $dim2) +function add_quick_entry_line($qid, $action, $dest_id, $amount, $dim, $dim2, $memo) { $sql = "INSERT INTO ".TB_PREF."quick_entry_lines - (qid, action, dest_id, amount, dimension_id, dimension2_id) + (qid, action, dest_id, amount, dimension_id, dimension2_id, memo) VALUES (".db_escape($qid).", ".db_escape($action).",".db_escape($dest_id).", - ".db_escape($amount).", ".db_escape($dim).", ".db_escape($dim2).")"; + ".db_escape($amount).", ".db_escape($dim).", ".db_escape($dim2).", ".db_escape($memo).")"; db_query($sql, "could not insert quick entry line for $qid"); } //--------------------------------------------------------------------------------------------- -function update_quick_entry_line($selected_id, $qid, $action, $dest_id, $amount, $dim, $dim2) +function update_quick_entry_line($selected_id, $qid, $action, $dest_id, $amount, $dim, $dim2, $memo) { $sql = "UPDATE ".TB_PREF."quick_entry_lines SET qid = ".db_escape($qid) .", action=".db_escape($action).", dest_id=".db_escape($dest_id).", amount=".db_escape($amount) - .", dimension_id=".db_escape($dim).", dimension2_id=".db_escape($dim2)." + .", dimension_id=".db_escape($dim).", dimension2_id=".db_escape($dim2).", memo=".db_escape($memo)." WHERE id = ".db_escape($selected_id); db_query($sql, "could not update quick entry line for $selected_id"); diff -r 1200c1e6115f -r b959d231bf05 gl/manage/gl_quick_entries.php --- a/gl/manage/gl_quick_entries.php Wed Mar 04 18:57:09 2015 +0100 +++ b/gl/manage/gl_quick_entries.php Wed Feb 18 10:06:05 2015 +0100 @@ -102,13 +102,13 @@ if ($selected_id != -1) { update_quick_entry($selected_id, $_POST['description'], $_POST['type'], - input_num('base_amount'), $_POST['base_desc'], get_post('bal_type', 0)); + input_num('base_amount'), $_POST['base_desc'], get_post('bal_type', 0), $_POST['usage']); display_notification(_('Selected quick entry has been updated')); } else { add_quick_entry($_POST['description'], $_POST['type'], - input_num('base_amount'), $_POST['base_desc'], get_post('bal_type', 0)); + input_num('base_amount'), $_POST['base_desc'], get_post('bal_type', 0), $_POST['usage']); display_notification(_('New quick entry has been added')); } $Mode = 'RESET'; @@ -117,16 +117,20 @@ if ($Mode2=='ADD_ITEM2' || $Mode2=='UPDATE_ITEM2') { - if ($selected_id2 != -1) + if (!get_post('dest_id')) { + display_error(_("You must select GL account.")); + set_focus('dest_id'); + } + elseif ($selected_id2 != -1) { update_quick_entry_line($selected_id2, $selected_id, $_POST['actn'], $_POST['dest_id'], input_num('amount', 0), - $_POST['dimension_id'], $_POST['dimension2_id']); + $_POST['dimension_id'], $_POST['dimension2_id'], $_POST['memo']); display_notification(_('Selected quick entry line has been updated')); } else { add_quick_entry_line($selected_id, $_POST['actn'], $_POST['dest_id'], input_num('amount', 0), - $_POST['dimension_id'], $_POST['dimension2_id']); + $_POST['dimension_id'], $_POST['dimension2_id'], $_POST['memo']); display_notification(_('New quick entry line has been added')); } $Mode2 = 'RESET2'; @@ -167,7 +171,7 @@ if ($Mode == 'RESET') { $selected_id = -1; - $_POST['description'] = $_POST['type'] = ''; + $_POST['description'] = $_POST['type'] = $_POST['usage'] = ''; $_POST['base_desc']= _('Base Amount'); $_POST['base_amount'] = price_format(0); $_POST['bal_type'] = 0; @@ -183,7 +187,7 @@ $result = get_quick_entries(); start_form(); start_table(TABLESTYLE); -$th = array(_("Description"), _("Type"), "", ""); +$th = array(_("Description"), _("Type"), _("Usage"), "", ""); table_header($th); $k = 0; @@ -193,6 +197,7 @@ $type_text = $quick_entry_types[$myrow["type"]]; label_cell($myrow['description']); label_cell($type_text); + label_cell($myrow['usage']); edit_button_cell("Edit".$myrow["id"], _("Edit")); delete_button_cell("Delete".$myrow["id"], _("Delete")); end_row(); @@ -214,6 +219,7 @@ $_POST['description'] = $myrow["description"]; $_POST['type'] = $myrow["type"]; $_POST['base_desc'] = $myrow["base_desc"]; + $_POST['usage'] = $myrow["usage"]; $_POST['bal_type'] = $myrow["bal_type"]; $_POST['base_amount'] = $myrow["bal_type"] ? $myrow["base_amount"] : price_format($myrow["base_amount"]); @@ -222,6 +228,7 @@ } text_row_ex(_("Description").':', 'description', 50, 60); +text_row_ex(_("Usage").':', 'usage', 80, 120); quick_entry_types_list_row(_("Entry Type").':', 'type', null, true); @@ -258,11 +265,11 @@ start_table(TABLESTYLE2); $dim = get_company_pref('use_dimension'); if ($dim == 2) - $th = array(_("Post"), _("Account/Tax Type"), _("Amount"), _("Dimension"), _("Dimension")." 2", "", ""); + $th = array(_("Post"), _("Account/Tax Type"), _("Amount"), _("Memo"), _("Dimension"), _("Dimension")." 2", "", ""); elseif ($dim == 1) - $th = array(_("Post"), _("Account/Tax Type"), _("Amount"), _("Dimension"), "", ""); + $th = array(_("Post"), _("Account/Tax Type"), _("Amount"), _("Memo"), _("Dimension"), "", ""); else - $th = array(_("Post"), _("Account/Tax Type"), _("Amount"), "", ""); + $th = array(_("Post"), _("Account/Tax Type"), _("Amount"), _("Memo"), "", ""); table_header($th); $k = 0; @@ -287,7 +294,8 @@ label_cell(number_format2($myrow['amount'], user_exrate_dec()), "nowrap align=right "); else amount_cell($myrow['amount']); - } + label_cell($myrow['memo']); + } if ($dim >= 1) label_cell(get_dimension_string($myrow['dimension_id'], true)); if ($dim > 1) @@ -312,6 +320,7 @@ $_POST['dest_id'] = $myrow["dest_id"]; $_POST['actn'] = $myrow["action"]; $_POST['amount'] = $myrow["amount"]; + $_POST['memo'] = $myrow["memo"]; $_POST['dimension_id'] = $myrow["dimension_id"]; $_POST['dimension2_id'] = $myrow["dimension2_id"]; } @@ -338,6 +347,7 @@ else amount_row(_("Amount").":", 'amount', price_format(0)); } + text_row_ex(_("Line memo").':', 'memo', 50, 256, ''); } if ($dim >= 1) dimensions_list_row(_("Dimension").":", 'dimension_id', null, true, " ", false, 1); diff -r 1200c1e6115f -r b959d231bf05 includes/ui/ui_view.inc --- a/includes/ui/ui_view.inc Wed Mar 04 18:57:09 2015 +0100 +++ b/includes/ui/ui_view.inc Wed Feb 18 10:06:05 2015 +0100 @@ -625,7 +625,7 @@ function display_quick_entries(&$cart, $id, $base, $type, $descr='') { $bank_amount = 0; - + if (!isset($id) || $id == null || $id == "") { display_error( _("No Quick Entries are defined.")); @@ -635,31 +635,79 @@ { if ($type == QE_DEPOSIT) $base = -$base; - if ($type != QE_SUPPINV) // only one quick entry on journal/bank transaction + if ($type != QE_SUPPINV && $type != QE_JOURNAL) // only one quick entry on journal/bank transaction $cart->clear_items(); + + // as for now tax_group is passed only in QE_SUPPINV + $qe_lines = quickentry_calculate($base, $id, @$cart->tax_group_id, $cart->tran_date); + + if ($qe_lines === 0) + { + display_error( _("No Quick Entry lines are defined.")); + set_focus('totamount'); + return 0; + } elseif ($qe_lines === -1) + { + display_error(_("Cannot post to GL account used by more than one tax type.")); + return 0; + } + foreach($qe_lines as $qe_line) + { + if ($descr != '') $qe_line['descr'] .= ': '.$descr; + if ($type != QE_SUPPINV) + $cart->add_gl_item($qe_line['code'], $qe_line['dim1'], + $qe_line['dim2'], $qe_line['amount'], $qe_line['descr']); + else + { + $acc_name = get_gl_account_name($qe_line['code']); + $cart->add_gl_codes_to_trans($qe_line['code'], + $acc_name, $qe_line['dim1'], + $qe_line['dim2'], $qe_line['amount'], $qe_line['descr']); + } + } + } + return $bank_amount; +} + +//-------------------------------------------------------------------------------------- + +function quickentry_calculate($base, $id, $taxgroup=null, $date=null) +{ + $gl_entries = array(); $qe = get_quick_entry($id); - if ($qe['bal_type'] == 1) + $type = $qe['type']; + $total = $base; + // quick entry made on account balance is special case. + if ($qe['bal_type'] == 1) // if this is quick entry based on balance - calculate it { - if ($qe['base_amount'] == 1.0) // monthly - $begin = begin_month($cart->tran_date); + // Note, that this is ugly hack overriding standard field usage + // just to make the feature available between major FA releases! + $gl_code = $qe['base_desc']; + $monthly = $qe['base_amount'] == 1.0; + + if (!isset($date)) + $date = Today(); + + if ($monthly) // marked as monthly + $begin = begin_month($date); else { - if (is_account_balancesheet($qe['base_desc'])) // total + if (is_account_balancesheet($gl_code)) // total $begin = ""; else $begin = begin_fiscalyear(); // from fiscalyear begin } - $base = get_gl_trans_from_to($begin, $cart->tran_date, $qe['base_desc']); + $base = get_gl_trans_from_to($begin, $date, $gl_code); } - 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'); return 0; } + + // first calculate total rate in case more than one tax is used $totrate = 0; while ($row = db_fetch($result)) { @@ -669,14 +717,15 @@ case "t": // post taxes calculated on base amount case "t+": // ditto & increase base amount case "t-": // ditto & reduce base amount - if (substr($row['action'],0,1) != 'T') - $totrate += get_tax_type_rate($row['dest_id']); + if (substr($row['action'], 0, 1) != 'T') + $totrate += get_tax_type_default_rate($row['dest_id']); } } $first = true; |
|
From: FrontAccounting <fro...@us...> - 2015-03-23 22:35:15
|
details: http://frontaccounting.hg.sourceforge.net:8000/hgroot/frontaccounting/frontaccounting/hg/p/frontaccounting/mercurial/rev/1200c1e6115f changeset: 3531:1200c1e6115f user: Janusz Dobrowolski <ja...@fr...> date: Wed Mar 04 18:57:09 2015 +0100 description: Fixed obvious mistake in en_US-demo.sql diffstat: sql/en_US-demo.sql | 2 +- 1 files changed, 1 insertions(+), 1 deletions(-) diffs (12 lines): diff -r dc90ce841173 -r 1200c1e6115f sql/en_US-demo.sql --- a/sql/en_US-demo.sql Mon Mar 23 21:04:33 2015 +0100 +++ b/sql/en_US-demo.sql Wed Mar 04 18:57:09 2015 +0100 @@ -833,7 +833,7 @@ CREATE TABLE IF NOT EXISTS `0_gl_trans` ( `counter` int(11) NOT NULL auto_increment, `type` smallint(6) NOT NULL default '0', - `type_no` `type_no` int(11) NOT NULL default '0', + `type_no` int(11) NOT NULL default '0', `tran_date` date NOT NULL default '0000-00-00', `account` varchar(15) NOT NULL default '', `memo_` tinytext NOT NULL, |
|
From: FrontAccounting <fro...@us...> - 2015-03-23 20:05:01
|
details: http://frontaccounting.hg.sourceforge.net:8000/hgroot/frontaccounting/frontaccounting/hg/p/frontaccounting/mercurial/rev/dc90ce841173 changeset: 3530:dc90ce841173 user: Janusz Dobrowolski <ja...@fr...> date: Mon Mar 23 21:04:33 2015 +0100 description: Merged changes from stable branch up to 2.3.23 diffstat: CHANGELOG.txt | 256 +- access/login.php | 10 +- access/logout.php | 2 +- access/password_reset.php | 8 +- admin/create_coy.php | 2 +- admin/crm_categories.php | 2 +- admin/db/attachments_db.inc | 4 +- admin/security_roles.php | 2 +- gl/gl_bank.php | 2 +- gl/gl_journal.php | 2 +- gl/includes/ui/gl_bank_ui.inc | 4 +- gl/includes/ui/gl_journal_ui.inc | 15 +- gl/inquiry/balance_sheet.php | 4 +- gl/inquiry/profit_loss.php | 2 +- gl/view/bank_transfer_view.php | 2 +- gl/view/gl_deposit_view.php | 4 +- gl/view/gl_payment_view.php | 4 +- gl/view/gl_trans_view.php | 4 +- includes/page/footer.inc | 2 +- includes/page/header.inc | 6 +- includes/system_tests.inc | 2 +- includes/ui/allocation_cart.inc | 2 +- includes/ui/contacts_view.inc | 2 +- includes/ui/db_pager_view.inc | 4 +- includes/ui/ui_controls.inc | 11 +- includes/ui/ui_input.inc | 23 +- includes/ui/ui_lists.inc | 5 +- includes/ui/ui_msgs.inc | 5 + includes/ui/ui_view.inc | 4 +- install/index.php | 2 +- inventory/adjustments.php | 2 +- inventory/includes/item_adjustments_ui.inc | 4 +- inventory/includes/stock_transfers_ui.inc | 4 +- inventory/manage/item_categories.php | 2 +- inventory/manage/item_codes.php | 2 +- inventory/manage/item_units.php | 2 +- inventory/manage/movement_types.php | 2 +- inventory/manage/sales_kits.php | 2 +- inventory/prices.php | 2 +- inventory/purchasing_data.php | 2 +- inventory/reorder_level.php | 2 +- inventory/transfers.php | 2 +- inventory/view/view_adjustment.php | 4 +- inventory/view/view_transfer.php | 4 +- lang/new_language_template/LC_MESSAGES/empty.po | 4111 +++++++++++----------- manufacturing/includes/db/work_orders_db.inc | 11 +- manufacturing/includes/manufacturing_ui.inc | 6 +- manufacturing/includes/work_order_issue_ui.inc | 2 +- manufacturing/manage/bom_edit.php | 2 +- manufacturing/manage/work_centres.php | 2 +- manufacturing/search_work_orders.php | 10 +- manufacturing/work_order_issue.php | 2 +- purchasing/includes/db/po_db.inc | 6 + purchasing/includes/db/suppliers_db.inc | 6 +- purchasing/includes/ui/grn_ui.inc | 4 +- purchasing/includes/ui/invoice_ui.inc | 14 +- purchasing/includes/ui/po_ui.inc | 6 +- purchasing/inquiry/supplier_inquiry.php | 2 +- purchasing/po_receive_items.php | 2 +- purchasing/supplier_payment.php | 4 +- purchasing/view/view_grn.php | 2 +- purchasing/view/view_po.php | 4 +- purchasing/view/view_supp_credit.php | 6 +- purchasing/view/view_supp_invoice.php | 6 +- purchasing/view/view_supp_payment.php | 2 +- reporting/includes/header2.inc | 5 +- reporting/includes/reports_classes.inc | 2 +- reporting/rep102.php | 6 +- reporting/rep107.php | 5 +- reporting/rep108.php | 3 + reporting/rep109.php | 3 + reporting/rep111.php | 3 + reporting/rep112.php | 3 + reporting/rep113.php | 3 + reporting/rep202.php | 6 +- reporting/rep209.php | 3 + reporting/rep210.php | 3 + sales/create_recurrent_invoices.php | 2 +- sales/credit_note_entry.php | 2 +- sales/customer_credit_invoice.php | 9 +- sales/customer_delivery.php | 8 +- sales/customer_invoice.php | 9 +- sales/customer_payments.php | 4 +- sales/includes/cart_class.inc | 5 + sales/includes/db/customers_db.inc | 6 +- sales/includes/ui/sales_credit_ui.inc | 4 +- sales/includes/ui/sales_order_ui.inc | 11 +- sales/inquiry/customer_inquiry.php | 4 +- sales/manage/sales_areas.php | 2 +- sales/manage/sales_groups.php | 2 +- sales/manage/sales_people.php | 2 +- sales/manage/sales_types.php | 2 +- sales/sales_order_entry.php | 2 +- sales/view/view_credit.php | 12 +- sales/view/view_dispatch.php | 14 +- sales/view/view_invoice.php | 14 +- sales/view/view_receipt.php | 2 +- sales/view/view_sales_order.php | 6 +- taxes/item_tax_types.php | 2 +- themes/aqua/renderer.php | 48 +- themes/cool/renderer.php | 55 +- themes/default/renderer.php | 30 +- 102 files changed, 2653 insertions(+), 2292 deletions(-) diffs (truncated from 11560 to 300 lines): diff -r 048324b8d432 -r dc90ce841173 CHANGELOG.txt --- a/CHANGELOG.txt Fri Feb 20 15:26:50 2015 +0100 +++ b/CHANGELOG.txt Mon Mar 23 21:04:33 2015 +0100 @@ -1,7 +1,7 @@ /** * @version $Id$ * @package FrontAccounting -* @copyright (C) 2005 - 2011 FrontAccounting, LLC +* @copyright (C) 2005 - 2014 FrontAccounting, LLC * @license http://www.gnu.org/copyleft/gpl-3.0.html GNU/GPL * FrontAccounting is Free Software */ @@ -10,6 +10,260 @@ ------------ This is a changelog for FrontAccounting All releases. +2015-03-23 16:27 +0100 Joe +(3456) Release 2.3.23 + version.php + +2015-03-14 16:05 +0100 Janusz Dobrowolski +(3455) Additional cleanups in standard themes. + themes/aqua/renderer.php + themes/cool/renderer.php + themes/default/renderer.php + +2015-03-12 13:00 +0100 Janusz Dobrowolski +(3454) Fixed many issues in output HTML code according to HTML 4.01 Transitional format. + access/login.php + access/logout.php + access/password_reset.php + admin/create_coy.php + admin/crm_categories.php + admin/db/attachments_db.inc + admin/inst_upgrade.php + admin/security_roles.php + gl/gl_bank.php + gl/gl_journal.php + gl/includes/ui/gl_bank_ui.inc + gl/includes/ui/gl_journal_ui.inc + gl/inquiry/balance_sheet.php + gl/inquiry/profit_loss.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 + includes/page/footer.inc + includes/page/header.inc + includes/system_tests.inc + includes/ui/allocation_cart.inc + includes/ui/contacts_view.inc + includes/ui/db_pager_view.inc + includes/ui/ui_controls.inc + includes/ui/ui_input.inc + includes/ui/ui_lists.inc + includes/ui/ui_msgs.inc + includes/ui/ui_view.inc + includes/ui/view_package.php + install/index.php + inventory/adjustments.php + inventory/includes/item_adjustments_ui.inc + inventory/includes/stock_transfers_ui.inc + inventory/manage/item_categories.php + inventory/manage/item_codes.php + inventory/manage/item_units.php + inventory/manage/movement_types.php + inventory/manage/sales_kits.php + inventory/prices.php + inventory/purchasing_data.php + inventory/reorder_level.php + inventory/transfers.php + inventory/view/view_adjustment.php + inventory/view/view_transfer.php + manufacturing/includes/manufacturing_ui.inc + manufacturing/includes/work_order_issue_ui.inc + manufacturing/manage/bom_edit.php + manufacturing/manage/work_centres.php + manufacturing/work_order_issue.php + purchasing/includes/ui/grn_ui.inc + purchasing/includes/ui/invoice_ui.inc + purchasing/includes/ui/po_ui.inc + purchasing/inquiry/supplier_inquiry.php + purchasing/po_receive_items.php + purchasing/supplier_payment.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 + reporting/includes/reports_classes.inc + sales/create_recurrent_invoices.php + sales/credit_note_entry.php + sales/customer_credit_invoice.php + sales/customer_delivery.php + sales/customer_invoice.php + sales/customer_payments.php + sales/includes/ui/sales_credit_ui.inc + sales/includes/ui/sales_order_ui.inc + sales/inquiry/customer_inquiry.php + sales/manage/sales_areas.php + sales/manage/sales_groups.php + sales/manage/sales_people.php + sales/manage/sales_types.php + sales/sales_order_entry.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 + taxes/item_tax_types.php + themes/aqua/renderer.php + themes/cool/renderer.php + themes/default/renderer.php + +2015-02-20 01:44 +0100 Joe +(3453) Rerun. The aging reports / inquiries had a 1 day error in presentation. Fixed. + purchasing/includes/db/suppliers_db.inc + reporting/rep102.php + reporting/rep202.php + sales/includes/db/customers_db.inc + sales/inquiry/customer_inquiry.php + +2015-02-19 17:48 +0100 Joe +(3452) The aging reports / inquiries had a 1 day error in presentation. Fixed. + purchasing/includes/db/suppliers_db.inc + reporting/rep102.php + reporting/rep202.php + sales/includes/db/customers_db.inc + +2015-02-19 10:17 +0100 Joe +(3451) Allow search by Id in search work orders. + manufacturing/includes/db/work_orders_db.inc + manufacturing/search_work_orders.php + +2015-02-13 22:46 +0100 Joe +(3450) Rerun of rep107. Currency filter not working in documents. + reporting/rep107.php + +2015-02-12 21:50 +0100 Joe +(3449) Currency filter not working in documents. + reporting/rep107.php + reporting/rep108.php + reporting/rep109.php + reporting/rep111.php + reporting/rep112.php + reporting/rep113.php + reporting/rep209.php + reporting/rep210.php + +2015-02-10 08:33 +0100 Joe +(3448) Moved page number, when more than 1 page, on documents down 2 lines. + reporting/includes/header2.inc + +2015-01-24 10:25 +0100 Joe +(3447) Fixed Delivery note bug : Parent constraints not working if sales order line deleted after delivery + sales/includes/cart_class.inc + +2015-01-17 08:50 +0100 Joe +(3446) Missing update of shipping tax when crediting an invoice. + sales/customer_credit_invoice.php + +2014-12-31 12:55 +0100 Janusz Dobrowolski +(3445) Fixed error handling (logged in debug instead of production mode). + includes/errors.inc + +2014-12-31 12:55 +0100 Janusz Dobrowolski +(3444) Purchase order reference was not restored after last PO cancelation. + purchasing/includes/db/po_db.inc + +2014-12-22 19:11 +0100 Janusz Dobrowolski +(3443) Reverting last last two commits mistakenly pushed to stable branch. + sql/en_US-demo.sql + sql/en_US-new.sql + +2014-12-21 17:32 +0100 Janusz Dobrowolski +(3442) Removed redundant index on supp_trans.type. + sql/en_US-new.sql + +2014-12-20 17:16 +0100 Janusz Dobrowolski +(3441) Removed redundant indexes on cust_branch & supp_trans tables + sql/en_US-demo.sql + sql/en_US-new.sql + +2014-12-19 00:22 +0100 Joe +(3440) Extended email entries. + admin/company_preferences.php + inventory/manage/locations.php + +2014-12-17 15:33 +0100 Joe +(3439) Fixed Quote Valid Days in System and GL Setup, Setup tab. + admin/gl_setup.php + includes/prefs/sysprefs.inc + sales/includes/ui/sales_order_ui.inc + +2014-12-08 20:14 +0100 Janusz Dobrowolski +(3438) Fixed problems with latin2 encoding due to changes in htmlspecialchars() behaviour in newer php versions. + includes/db/connect_db.inc + includes/session.inc + +2014-11-22 11:54 +0100 Cambell +(3437) Further fixes to javascript multiple class handling. + js/inserts.js + js/utils.js + +2014-11-21 10:18 +0100 Janusz Dobrowolski +(3436) [0002950] Fixed false quantity on hand errors on sales delivery. + sales/customer_delivery.php + sales/includes/cart_class.inc + +2014-11-21 10:17 +0100 Janusz Dobrowolski +(3435) Fixed warning during database restore. + admin/db/maintenance_db.inc + +2014-11-17 10:21 +0100 Janusz Dobrowolski +(3434) Fixed warning about non-existing HTTP_USER_AGENT session variable on some Plesk configurations. + includes/session.inc + +2014-11-19 00:07 +0100 Joe +(3433) Fixed better CSS combobox select. + themes/aqua/default.css + themes/cool/default.css + themes/default/default.css + +2014-11-17 11:04 +0100 Joe +(3432) Fixed ECB URLs moved permanently. + gl/includes/db/gl_db_rates.inc + +2014-11-13 21:25 +0700 Cambell +(3431) Javascript now works with multiple classes on elements. + js/inserts.js + js/utils.js + +2014-11-07 07:50 +0100 Joe +(3430) Fixed deprecated preg_replace in php >= 5.3.0 with the /e flag in utf8 reports. + reporting/includes/html_entity_decode_php4.php + +2014-10-27 21:34 +0100 Joe +(3429) Improved calculation of standard cost in advanced manufacturing even if qoh = 0. + manufacturing/includes/db/work_orders_db.inc + +2014-10-27 18:26 +0100 Janusz Dobrowolski +(3428) Fixed 'C' english language display on Install/Update Languages page, to allow its selection on first page. + admin/inst_lang.php + +2014-10-15 00:53 +0200 Janusz Dobrowolski +(3427) Restoring compressed sql files sometimes failed due to nasty bug in php gzfile function. + admin/db/maintenance_db.inc + +2014-10-08 20:50 +0200 Janusz Dobrowolski +(3426) Fixed contact record creation when new customer is added (reference/name were superseded). + sales/manage/customers.php + +2014-10-01 23:08 +0200 Joe +(3425) Improved layout Reports Customer / Supplier Balances. + reporting/rep101.php + reporting/rep201.php + +2014-10-01 13:32 +0200 Joe +(3424) Wrong domestic open balance in Report Supplier Balance for currency suppliers. + reporting/rep201.php + +2014-09-29 16:32 +0200 Joe +(3423) Clean up. Standard COAs. + sql/en_US-demo.sql + sql/en_US-new.sql + +2014-09-29 16:06 +0200 Joe +(3422) Changelog change + CHANGELOG.txt + 2014-09-29 16:04 +0200 Joe (3421) Changelog change CHANGELOG.txt diff -r 048324b8d432 -r dc90ce841173 access/login.php --- a/access/login.php Fri Feb 20 15:26:50 2015 +0100 +++ b/access/login.php Mon Mar 23 21:04:33 2015 +0100 @@ -36,7 +36,7 @@ if (check_faillog()) { - $blocked_msg = '<span class=redfg>'._('Too many failed login attempts.<br>Please wait a while or try later.').'</span>'; + $blocked_msg = '<span class="redfg">'._('Too many failed login attempts.<br>Please wait a while or try later.').'</span>'; $js .= "<script>setTimeout(function() { document.getElementsByName('SubmitUser')[0].disabled=0; @@ -58,7 +58,7 @@ echo "<!DOCTYPE HTML PUBLIC \"-//W3C//DTD HTML 4.01 Transitional//EN\" \"http://www.w3.org/TR/html4/loose.dtd\">\n"; echo "<html dir='$rtl' >\n"; echo "<head profile=\"http://www.w3.org/2005/10/profile\"><title>$title</title>\n"; - echo "<meta http-equiv='Content-type' content='text/html; charset=$encoding' />\n"; + echo "<meta http-equiv='Content-type' content='text/html; charset=$encoding' >\n"; echo "<link href='$path_to_root/themes/$def_theme/default.css' rel='stylesheet' type='text/css'> \n"; echo "<link href='$path_to_root/themes/default/images/favicon.ico' rel='icon' type='image/x-icon'> \n"; send_scripts(); @@ -79,14 +79,14 @@ start_row(); echo "<td align='center' colspan=2>"; if (!$login_timeout) { // FA logo - echo "<a target='_blank' href='".$SysPrefs->power_url."'><img src='$path_to_root/themes/$def_theme/images/logo_frontaccounting.png' alt='FrontAccounting' height='50' onload='fixPNG(this)' border='0' /></a>"; + echo "<a target='_blank' href='".$SysPrefs->power_url."'><img src='$path_to_root/themes/$def_theme/images/logo_frontaccounting.png' alt='FrontAccounting' height='50' onload='fixPNG(this)' border='0' ></a>"; |
|
From: FrontAccounting <fro...@us...> - 2015-03-23 15:30:35
|
details: http://frontaccounting.hg.sourceforge.net:8000/hgroot/frontaccounting/frontaccounting/hg/p/frontaccounting/mercurial/rev/af18f2b0998b changeset: 3529:af18f2b0998b user: Joe date: Mon Mar 23 16:29:56 2015 +0100 description: New CHANGELOG.txt diffstat: CHANGELOG.txt | 256 +++++++++++++++++++++++++++++++++++++++++++++++++++++++++- 1 files changed, 255 insertions(+), 1 deletions(-) diffs (273 lines): diff -r 2ad50e3e39e6 -r af18f2b0998b CHANGELOG.txt --- a/CHANGELOG.txt Mon Mar 23 16:27:19 2015 +0100 +++ b/CHANGELOG.txt Mon Mar 23 16:29:56 2015 +0100 @@ -1,7 +1,7 @@ /** * @version $Id$ * @package FrontAccounting -* @copyright (C) 2005 - 2011 FrontAccounting, LLC +* @copyright (C) 2005 - 2014 FrontAccounting, LLC * @license http://www.gnu.org/copyleft/gpl-3.0.html GNU/GPL * FrontAccounting is Free Software */ @@ -10,6 +10,260 @@ ------------ This is a changelog for FrontAccounting All releases. +2015-03-23 16:27 +0100 Joe +(3456) Release 2.3.23 + version.php + +2015-03-14 16:05 +0100 Janusz Dobrowolski +(3455) Additional cleanups in standard themes. + themes/aqua/renderer.php + themes/cool/renderer.php + themes/default/renderer.php + +2015-03-12 13:00 +0100 Janusz Dobrowolski +(3454) Fixed many issues in output HTML code according to HTML 4.01 Transitional format. + access/login.php + access/logout.php + access/password_reset.php + admin/create_coy.php + admin/crm_categories.php + admin/db/attachments_db.inc + admin/inst_upgrade.php + admin/security_roles.php + gl/gl_bank.php + gl/gl_journal.php + gl/includes/ui/gl_bank_ui.inc + gl/includes/ui/gl_journal_ui.inc + gl/inquiry/balance_sheet.php + gl/inquiry/profit_loss.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 + includes/page/footer.inc + includes/page/header.inc + includes/system_tests.inc + includes/ui/allocation_cart.inc + includes/ui/contacts_view.inc + includes/ui/db_pager_view.inc + includes/ui/ui_controls.inc + includes/ui/ui_input.inc + includes/ui/ui_lists.inc + includes/ui/ui_msgs.inc + includes/ui/ui_view.inc + includes/ui/view_package.php + install/index.php + inventory/adjustments.php + inventory/includes/item_adjustments_ui.inc + inventory/includes/stock_transfers_ui.inc + inventory/manage/item_categories.php + inventory/manage/item_codes.php + inventory/manage/item_units.php + inventory/manage/movement_types.php + inventory/manage/sales_kits.php + inventory/prices.php + inventory/purchasing_data.php + inventory/reorder_level.php + inventory/transfers.php + inventory/view/view_adjustment.php + inventory/view/view_transfer.php + manufacturing/includes/manufacturing_ui.inc + manufacturing/includes/work_order_issue_ui.inc + manufacturing/manage/bom_edit.php + manufacturing/manage/work_centres.php + manufacturing/work_order_issue.php + purchasing/includes/ui/grn_ui.inc + purchasing/includes/ui/invoice_ui.inc + purchasing/includes/ui/po_ui.inc + purchasing/inquiry/supplier_inquiry.php + purchasing/po_receive_items.php + purchasing/supplier_payment.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 + reporting/includes/reports_classes.inc + sales/create_recurrent_invoices.php + sales/credit_note_entry.php + sales/customer_credit_invoice.php + sales/customer_delivery.php + sales/customer_invoice.php + sales/customer_payments.php + sales/includes/ui/sales_credit_ui.inc + sales/includes/ui/sales_order_ui.inc + sales/inquiry/customer_inquiry.php + sales/manage/sales_areas.php + sales/manage/sales_groups.php + sales/manage/sales_people.php + sales/manage/sales_types.php + sales/sales_order_entry.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 + taxes/item_tax_types.php + themes/aqua/renderer.php + themes/cool/renderer.php + themes/default/renderer.php + +2015-02-20 01:44 +0100 Joe +(3453) Rerun. The aging reports / inquiries had a 1 day error in presentation. Fixed. + purchasing/includes/db/suppliers_db.inc + reporting/rep102.php + reporting/rep202.php + sales/includes/db/customers_db.inc + sales/inquiry/customer_inquiry.php + +2015-02-19 17:48 +0100 Joe +(3452) The aging reports / inquiries had a 1 day error in presentation. Fixed. + purchasing/includes/db/suppliers_db.inc + reporting/rep102.php + reporting/rep202.php + sales/includes/db/customers_db.inc + +2015-02-19 10:17 +0100 Joe +(3451) Allow search by Id in search work orders. + manufacturing/includes/db/work_orders_db.inc + manufacturing/search_work_orders.php + +2015-02-13 22:46 +0100 Joe +(3450) Rerun of rep107. Currency filter not working in documents. + reporting/rep107.php + +2015-02-12 21:50 +0100 Joe +(3449) Currency filter not working in documents. + reporting/rep107.php + reporting/rep108.php + reporting/rep109.php + reporting/rep111.php + reporting/rep112.php + reporting/rep113.php + reporting/rep209.php + reporting/rep210.php + +2015-02-10 08:33 +0100 Joe +(3448) Moved page number, when more than 1 page, on documents down 2 lines. + reporting/includes/header2.inc + +2015-01-24 10:25 +0100 Joe +(3447) Fixed Delivery note bug : Parent constraints not working if sales order line deleted after delivery + sales/includes/cart_class.inc + +2015-01-17 08:50 +0100 Joe +(3446) Missing update of shipping tax when crediting an invoice. + sales/customer_credit_invoice.php + +2014-12-31 12:55 +0100 Janusz Dobrowolski +(3445) Fixed error handling (logged in debug instead of production mode). + includes/errors.inc + +2014-12-31 12:55 +0100 Janusz Dobrowolski +(3444) Purchase order reference was not restored after last PO cancelation. + purchasing/includes/db/po_db.inc + +2014-12-22 19:11 +0100 Janusz Dobrowolski +(3443) Reverting last last two commits mistakenly pushed to stable branch. + sql/en_US-demo.sql + sql/en_US-new.sql + +2014-12-21 17:32 +0100 Janusz Dobrowolski +(3442) Removed redundant index on supp_trans.type. + sql/en_US-new.sql + +2014-12-20 17:16 +0100 Janusz Dobrowolski +(3441) Removed redundant indexes on cust_branch & supp_trans tables + sql/en_US-demo.sql + sql/en_US-new.sql + +2014-12-19 00:22 +0100 Joe +(3440) Extended email entries. + admin/company_preferences.php + inventory/manage/locations.php + +2014-12-17 15:33 +0100 Joe +(3439) Fixed Quote Valid Days in System and GL Setup, Setup tab. + admin/gl_setup.php + includes/prefs/sysprefs.inc + sales/includes/ui/sales_order_ui.inc + +2014-12-08 20:14 +0100 Janusz Dobrowolski +(3438) Fixed problems with latin2 encoding due to changes in htmlspecialchars() behaviour in newer php versions. + includes/db/connect_db.inc + includes/session.inc + +2014-11-22 11:54 +0100 Cambell +(3437) Further fixes to javascript multiple class handling. + js/inserts.js + js/utils.js + +2014-11-21 10:18 +0100 Janusz Dobrowolski +(3436) [0002950] Fixed false quantity on hand errors on sales delivery. + sales/customer_delivery.php + sales/includes/cart_class.inc + +2014-11-21 10:17 +0100 Janusz Dobrowolski +(3435) Fixed warning during database restore. + admin/db/maintenance_db.inc + +2014-11-17 10:21 +0100 Janusz Dobrowolski +(3434) Fixed warning about non-existing HTTP_USER_AGENT session variable on some Plesk configurations. + includes/session.inc + +2014-11-19 00:07 +0100 Joe +(3433) Fixed better CSS combobox select. + themes/aqua/default.css + themes/cool/default.css + themes/default/default.css + +2014-11-17 11:04 +0100 Joe +(3432) Fixed ECB URLs moved permanently. + gl/includes/db/gl_db_rates.inc + +2014-11-13 21:25 +0700 Cambell +(3431) Javascript now works with multiple classes on elements. + js/inserts.js + js/utils.js + +2014-11-07 07:50 +0100 Joe +(3430) Fixed deprecated preg_replace in php >= 5.3.0 with the /e flag in utf8 reports. + reporting/includes/html_entity_decode_php4.php + +2014-10-27 21:34 +0100 Joe +(3429) Improved calculation of standard cost in advanced manufacturing even if qoh = 0. + manufacturing/includes/db/work_orders_db.inc + +2014-10-27 18:26 +0100 Janusz Dobrowolski +(3428) Fixed 'C' english language display on Install/Update Languages page, to allow its selection on first page. + admin/inst_lang.php + +2014-10-15 00:53 +0200 Janusz Dobrowolski +(3427) Restoring compressed sql files sometimes failed due to nasty bug in php gzfile function. + admin/db/maintenance_db.inc + +2014-10-08 20:50 +0200 Janusz Dobrowolski +(3426) Fixed contact record creation when new customer is added (reference/name were superseded). + sales/manage/customers.php + +2014-10-01 23:08 +0200 Joe +(3425) Improved layout Reports Customer / Supplier Balances. + reporting/rep101.php + reporting/rep201.php + +2014-10-01 13:32 +0200 Joe +(3424) Wrong domestic open balance in Report Supplier Balance for currency suppliers. + reporting/rep201.php + +2014-09-29 16:32 +0200 Joe +(3423) Clean up. Standard COAs. + sql/en_US-demo.sql + sql/en_US-new.sql + +2014-09-29 16:06 +0200 Joe +(3422) Changelog change + CHANGELOG.txt + 2014-09-29 16:04 +0200 Joe (3421) Changelog change CHANGELOG.txt |
|
From: FrontAccounting <fro...@us...> - 2015-03-23 15:30:35
|
details: http://frontaccounting.hg.sourceforge.net:8000/hgroot/frontaccounting/frontaccounting/hg/p/frontaccounting/mercurial/rev/2ad50e3e39e6 changeset: 3528:2ad50e3e39e6 user: Joe date: Mon Mar 23 16:27:19 2015 +0100 description: Release 2.3.23 diffstat: version.php | 2 +- 1 files changed, 1 insertions(+), 1 deletions(-) diffs (12 lines): diff -r a18467c02f5a -r 2ad50e3e39e6 version.php --- a/version.php Mon Mar 23 14:55:38 2015 +0100 +++ b/version.php Mon Mar 23 16:27:19 2015 +0100 @@ -9,7 +9,7 @@ // application version - can be overriden in config.php if (!isset($version)) - $version = "2.3.22"; + $version = "2.3.23"; //====================================================================== // Extension packages repository settings |
|
From: FrontAccounting <fro...@us...> - 2015-03-23 13:56:17
|
details: http://frontaccounting.hg.sourceforge.net:8000/hgroot/frontaccounting/frontaccounting/hg/p/frontaccounting/mercurial/rev/a18467c02f5a changeset: 3527:a18467c02f5a user: Janusz Dobrowolski <ja...@fr...> date: Mon Mar 23 14:55:38 2015 +0100 description: Gettext template update. diffstat: lang/new_language_template/LC_MESSAGES/empty.po | 637 ++++++++++++----------- 1 files changed, 321 insertions(+), 316 deletions(-) diffs (truncated from 1916 to 300 lines): diff -r cbaafc142364 -r a18467c02f5a lang/new_language_template/LC_MESSAGES/empty.po --- a/lang/new_language_template/LC_MESSAGES/empty.po Sat Mar 14 16:05:36 2015 +0100 +++ b/lang/new_language_template/LC_MESSAGES/empty.po Mon Mar 23 14:55:38 2015 +0100 @@ -8,7 +8,7 @@ msgstr "" "Project-Id-Version: PACKAGE VERSION\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2014-09-29 15:35+0200\n" +"POT-Creation-Date: 2015-03-23 14:55+0100\n" "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" "Last-Translator: FULL NAME <EMAIL@ADDRESS>\n" "Language-Team: LANGUAGE <LL...@li...>\n" @@ -21,8 +21,8 @@ msgid "Main Menu" msgstr "" -#: frontaccounting.php:75 access/logout.php:21 themes/default/renderer.php:70 -#: themes/default/renderer.php:83 +#: frontaccounting.php:75 access/logout.php:21 themes/default/renderer.php:68 +#: themes/default/renderer.php:82 msgid "Logout" msgstr "" @@ -81,7 +81,7 @@ msgstr "" #: access/login.php:156 access/password_reset.php:108 -#: admin/display_prefs.php:112 themes/default/renderer.php:129 +#: admin/display_prefs.php:112 themes/default/renderer.php:126 msgid "Theme:" msgstr "" @@ -152,7 +152,7 @@ #: gl/manage/currencies.php:164 gl/manage/exchange_rates.php:94 #: gl/manage/gl_account_classes.php:132 gl/manage/gl_account_types.php:154 #: gl/manage/gl_quick_entries.php:196 gl/manage/gl_quick_entries.php:295 -#: gl/includes/ui/gl_bank_ui.inc:186 gl/includes/ui/gl_journal_ui.inc:122 +#: gl/includes/ui/gl_bank_ui.inc:186 gl/includes/ui/gl_journal_ui.inc:120 #: includes/ui/contacts_view.inc:64 includes/ui/simple_crud_class.inc:52 #: inventory/prices.php:158 inventory/purchasing_data.php:164 #: inventory/includes/item_adjustments_ui.inc:91 @@ -160,7 +160,7 @@ #: inventory/manage/item_categories.php:121 #: inventory/manage/item_codes.php:140 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 +#: inventory/manage/sales_kits.php:55 manufacturing/search_work_orders.php:115 #: manufacturing/manage/bom_edit.php:86 #: manufacturing/manage/work_centres.php:114 #: manufacturing/includes/work_order_issue_ui.inc:63 @@ -176,7 +176,7 @@ #: sales/inquiry/sales_deliveries_view.php:156 #: sales/inquiry/sales_orders_view.php:128 #: sales/includes/ui/sales_credit_ui.inc:197 -#: sales/includes/ui/sales_order_ui.inc:194 taxes/item_tax_types.php:139 +#: sales/includes/ui/sales_order_ui.inc:197 taxes/item_tax_types.php:139 #: taxes/tax_groups.php:142 taxes/tax_types.php:132 msgid "Edit" msgstr "" @@ -198,9 +198,9 @@ #: gl/manage/currencies.php:166 gl/manage/exchange_rates.php:99 #: gl/manage/gl_account_classes.php:133 gl/manage/gl_account_types.php:155 #: gl/manage/gl_quick_entries.php:197 gl/manage/gl_quick_entries.php:296 -#: gl/includes/ui/gl_bank_ui.inc:188 gl/includes/ui/gl_journal_ui.inc:124 +#: gl/includes/ui/gl_bank_ui.inc:188 gl/includes/ui/gl_journal_ui.inc:122 #: includes/ui/contacts_view.inc:67 includes/ui/simple_crud_class.inc:54 -#: includes/ui/ui_input.inc:285 inventory/prices.php:159 +#: includes/ui/ui_input.inc:286 inventory/prices.php:159 #: inventory/purchasing_data.php:165 #: inventory/includes/item_adjustments_ui.inc:93 #: inventory/includes/stock_transfers_ui.inc:85 @@ -217,7 +217,7 @@ #: 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:196 taxes/item_tax_types.php:140 +#: sales/includes/ui/sales_order_ui.inc:199 taxes/item_tax_types.php:140 #: taxes/tax_groups.php:143 taxes/tax_types.php:133 msgid "Delete" msgstr "" @@ -229,7 +229,7 @@ #: gl/inquiry/journal_inquiry.php:127 gl/inquiry/journal_inquiry.php:140 #: includes/ui/allocation_cart.inc:288 #: inventory/inquiry/stock_movements.php:82 -#: manufacturing/search_work_orders.php:159 +#: manufacturing/search_work_orders.php:165 #: manufacturing/includes/manufacturing_ui.inc:157 #: manufacturing/includes/manufacturing_ui.inc:200 #: manufacturing/includes/manufacturing_ui.inc:236 @@ -339,7 +339,7 @@ #: gl/manage/bank_accounts.php:127 gl/manage/currencies.php:162 #: 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:1677 +#: includes/system_tests.inc:126 includes/ui/ui_lists.inc:1680 #: purchasing/manage/suppliers.php:121 reporting/rep101.php:114 #: reporting/rep102.php:114 reporting/rep102.php:116 reporting/rep104.php:105 #: reporting/rep106.php:75 reporting/rep114.php:74 reporting/rep201.php:106 @@ -380,8 +380,8 @@ msgid "Create backup" msgstr "" -#: admin/backups.php:181 sales/includes/ui/sales_order_ui.inc:577 -#: sales/includes/ui/sales_order_ui.inc:625 +#: admin/backups.php:181 sales/includes/ui/sales_order_ui.inc:582 +#: sales/includes/ui/sales_order_ui.inc:630 msgid "Comments:" msgstr "" @@ -431,7 +431,7 @@ msgstr "" #: admin/change_current_user_password.php:16 -#: admin/change_current_user_password.php:99 themes/default/renderer.php:77 +#: admin/change_current_user_password.php:99 themes/default/renderer.php:76 msgid "Change password" msgstr "" @@ -525,7 +525,7 @@ #: admin/company_preferences.php:165 admin/shipping_companies.php:142 #: includes/ui/contacts_view.inc:109 inventory/manage/locations.php:202 -#: sales/manage/customers.php:234 sales/includes/ui/sales_order_ui.inc:616 +#: sales/manage/customers.php:234 sales/includes/ui/sales_order_ui.inc:621 msgid "Address:" msgstr "" @@ -650,14 +650,14 @@ msgstr "" #: admin/company_preferences.php:208 admin/display_prefs.php:143 -#: admin/forms_setup.php:61 admin/gl_setup.php:226 admin/inst_chart.php:74 +#: admin/forms_setup.php:61 admin/gl_setup.php:234 admin/inst_chart.php:74 #: admin/inst_lang.php:103 admin/inst_module.php:137 admin/inst_module.php:155 #: admin/inst_module.php:198 admin/inst_theme.php:96 #: dimensions/dimension_entry.php:293 gl/gl_bank.php:414 gl/gl_budget.php:135 #: gl/manage/gl_quick_entries.php:60 gl/includes/ui/gl_bank_ui.inc:277 -#: gl/includes/ui/gl_journal_ui.inc:221 includes/ui/db_pager_view.inc:174 +#: gl/includes/ui/gl_journal_ui.inc:220 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:207 includes/ui/ui_input.inc:905 +#: includes/ui/ui_input.inc:208 includes/ui/ui_input.inc:906 #: inventory/adjustments.php:234 inventory/cost_update.php:136 #: inventory/reorder_level.php:111 inventory/transfers.php:230 #: inventory/includes/item_adjustments_ui.inc:163 @@ -666,11 +666,11 @@ #: manufacturing/includes/work_order_issue_ui.inc:138 #: purchasing/includes/ui/po_ui.inc:296 purchasing/includes/ui/po_ui.inc:439 #: purchasing/po_receive_items.php:334 sales/credit_note_entry.php:284 -#: sales/customer_credit_invoice.php:380 sales/customer_delivery.php:517 +#: sales/customer_credit_invoice.php:381 sales/customer_delivery.php:517 #: sales/customer_invoice.php:591 sales/inquiry/sales_orders_view.php:323 #: sales/includes/ui/sales_credit_ui.inc:293 -#: sales/includes/ui/sales_order_ui.inc:229 -#: sales/includes/ui/sales_order_ui.inc:543 +#: sales/includes/ui/sales_order_ui.inc:232 +#: sales/includes/ui/sales_order_ui.inc:548 msgid "Update" msgstr "" @@ -790,7 +790,7 @@ #: gl/manage/bank_accounts.php:125 gl/manage/currencies.php:162 #: 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:1678 +#: includes/system_tests.inc:126 includes/ui/ui_lists.inc:1681 #: purchasing/manage/suppliers.php:121 reporting/rep101.php:113 #: reporting/rep102.php:113 reporting/rep102.php:115 reporting/rep104.php:107 #: reporting/rep106.php:77 reporting/rep114.php:76 reporting/rep201.php:105 @@ -1084,8 +1084,8 @@ msgstr "" #: admin/fiscalyears.php:138 dimensions/inquiry/search_dimensions.php:133 -#: dimensions/inquiry/search_dimensions.php:139 includes/ui/ui_lists.inc:678 -#: manufacturing/search_work_orders.php:108 reporting/rep402.php:103 +#: dimensions/inquiry/search_dimensions.php:139 includes/ui/ui_lists.inc:681 +#: manufacturing/search_work_orders.php:114 reporting/rep402.php:103 #: reporting/rep501.php:87 reporting/rep710.php:113 #: reporting/includes/excel_report.inc:234 #: reporting/includes/pdf_report.inc:266 @@ -1163,163 +1163,167 @@ msgid "The general GL setup has been updated." msgstr "" -#: admin/gl_setup.php:137 +#: admin/gl_setup.php:143 msgid "General GL" msgstr "" -#: admin/gl_setup.php:139 +#: admin/gl_setup.php:145 msgid "Past Due Days Interval:" msgstr "" -#: admin/gl_setup.php:139 admin/gl_setup.php:174 admin/gl_setup.php:182 -#: admin/gl_setup.php:219 admin/payment_terms.php:140 +#: admin/gl_setup.php:145 admin/gl_setup.php:180 admin/gl_setup.php:182 +#: admin/gl_setup.php:190 admin/gl_setup.php:227 admin/payment_terms.php:140 msgid "days" msgstr "" -#: admin/gl_setup.php:141 +#: admin/gl_setup.php:147 msgid "Retained Earnings:" msgstr "" -#: admin/gl_setup.php:143 +#: admin/gl_setup.php:149 msgid "Profit/Loss Year:" msgstr "" -#: admin/gl_setup.php:145 +#: admin/gl_setup.php:151 msgid "Exchange Variances Account:" msgstr "" -#: admin/gl_setup.php:147 +#: admin/gl_setup.php:153 msgid "Bank Charges Account:" msgstr "" -#: admin/gl_setup.php:151 +#: admin/gl_setup.php:157 msgid "Customers and Sales" msgstr "" -#: admin/gl_setup.php:153 +#: admin/gl_setup.php:159 msgid "Default Credit Limit:" msgstr "" -#: admin/gl_setup.php:155 +#: admin/gl_setup.php:161 msgid "Accumulate batch shipping:" msgstr "" -#: admin/gl_setup.php:157 +#: admin/gl_setup.php:163 msgid "Legal Text on Invoice:" msgstr "" -#: admin/gl_setup.php:159 +#: admin/gl_setup.php:165 msgid "Shipping Charged Account:" msgstr "" -#: admin/gl_setup.php:163 +#: admin/gl_setup.php:169 msgid "Customers and Sales Defaults" msgstr "" -#: admin/gl_setup.php:165 +#: admin/gl_setup.php:171 msgid "Receivable Account:" msgstr "" -#: admin/gl_setup.php:167 admin/gl_setup.php:205 +#: admin/gl_setup.php:173 admin/gl_setup.php:213 #: inventory/manage/item_categories.php:192 inventory/manage/items.php:354 #: sales/manage/customer_branches.php:250 msgid "Sales Account:" msgstr "" -#: admin/gl_setup.php:170 sales/manage/customer_branches.php:251 +#: admin/gl_setup.php:176 sales/manage/customer_branches.php:251 msgid "Sales Discount Account:" msgstr "" -#: admin/gl_setup.php:172 sales/manage/customer_branches.php:253 +#: admin/gl_setup.php:178 sales/manage/customer_branches.php:253 msgid "Prompt Payment Discount Account:" msgstr "" -#: admin/gl_setup.php:174 +#: admin/gl_setup.php:180 +msgid "Quote Valid Days:" +msgstr "" + +#: admin/gl_setup.php:182 msgid "Delivery Required By:" msgstr "" -#: admin/gl_setup.php:180 +#: admin/gl_setup.php:188 msgid "Dimension Defaults" msgstr "" -#: admin/gl_setup.php:182 +#: admin/gl_setup.php:190 msgid "Dimension Required By After:" msgstr "" -#: admin/gl_setup.php:185 +#: admin/gl_setup.php:193 msgid "Suppliers and Purchasing" msgstr "" -#: admin/gl_setup.php:187 +#: admin/gl_setup.php:195 msgid "Delivery Over-Receive Allowance:" |
|
From: FrontAccounting <fro...@us...> - 2015-03-14 15:07:00
|
details: http://frontaccounting.hg.sourceforge.net:8000/hgroot/frontaccounting/frontaccounting/hg/p/frontaccounting/mercurial/rev/cbaafc142364 changeset: 3526:cbaafc142364 user: Janusz Dobrowolski <ja...@fr...> date: Sat Mar 14 16:05:36 2015 +0100 description: Additional cleanups in standard themes. diffstat: themes/aqua/renderer.php | 34 ++++++++++++++-------------------- themes/cool/renderer.php | 33 ++++++++++++++------------------- themes/default/renderer.php | 18 ++++++++---------- 3 files changed, 36 insertions(+), 49 deletions(-) diffs (truncated from 307 to 300 lines): diff -r be9b40c57b69 -r cbaafc142364 themes/aqua/renderer.php --- a/themes/aqua/renderer.php Thu Mar 12 13:00:10 2015 +0100 +++ b/themes/aqua/renderer.php Sat Mar 14 16:05:36 2015 +0100 @@ -19,7 +19,7 @@ $img = $category == '' ? 'right.gif' : $category.'.png'; else $img = 'right.gif'; - return "<img src='$path_to_root/themes/aqua/images/$img' style='vertical-align:middle;' border='0' ".basename($img)."> "; + return "<img src='$path_to_root/themes/aqua/images/$img' style='vertical-align:middle;' border='0'> "; } function wa_header() @@ -36,7 +36,7 @@ { global $path_to_root, $help_base_url, $db_connections; echo "<table class='callout_main' border='0' cellpadding='0' cellspacing='0'>\n"; - echo "<tr>"; + echo "<tr>\n"; echo "<td colspan='2' rowspan='2'>\n"; echo "<table class='main_page' border='0' cellpadding='0' cellspacing='0'>\n"; @@ -49,7 +49,6 @@ { $applications = $_SESSION['App']->applications; $local_path_to_root = $path_to_root; - $sel_app = $_SESSION['sel_app']; echo "<table cellpadding='0' cellspacing='0' width='100%'><tr><td>"; echo "<div class='tabs'>"; @@ -57,14 +56,13 @@ { if ($_SESSION["wa_current_user"]->check_application_access($app)) { - $acc = access_string($app->name); - echo "<a class='".($sel_app == $app->id ? 'selected' : 'menu_tab') - ."' href='$local_path_to_root/index.php?application=".$app->id - ."'$acc[1]>" .$acc[0] . "</a>"; - } + $acc = access_string($app->name); + echo "<a class='".($sel_app == $app->id ? 'selected' : 'menu_tab') + ."' href='$local_path_to_root/index.php?application=".$app->id + ."'$acc[1]>" .$acc[0] . "</a>"; + } } echo "</div>"; - echo "</td></tr></table>"; // top status bar $img = "<img src='$local_path_to_root/themes/aqua/images/login.gif' width='14' height='14' border='0' alt='"._('Logout')."'> "; @@ -89,17 +87,14 @@ echo "<br>"; elseif ($title && !$is_index) { - echo "<center><table id='title'><tr><td width='100%' class='titletext'>$title</td>" + echo "<center><table id='title'><tr><td width='100%' class='titletext'>$title</td>" ."<td align=right>" .(user_hints() ? "<span id='hints'></span>" : '') ."</td>" ."</tr></table></center>"; } - - } - function menu_footer($no_menu, $is_index) { global $version, $allow_demo_mode, $app_title, $power_url, @@ -107,7 +102,7 @@ include_once($path_to_root . "/includes/date_functions.inc"); echo "</td></tr></table>\n"; // 'main_page' - if ($no_menu == false) // bottom status line + if ($no_menu == false) // bottom status line { if ($is_index) echo "<table class='bottomBar'>\n"; @@ -118,7 +113,7 @@ $phelp = implode('; ', $Pagehelp); echo "<td class='bottomBarCell'>" . Today() . " | " . Now() . "</td>\n"; $Ajax->addUpdate(true, 'hotkeyshelp', $phelp); - echo "<td id='hotkeyshelp'>".$phelp.'</td>'; + echo "<td id='hotkeyshelp'>".$phelp."</td>"; } echo "</tr></table>\n"; } @@ -127,15 +122,15 @@ { echo "<table align='center' id='footer'>\n"; echo "<tr>\n"; - echo "<td align='center' class='footer'><a target='_blank' href='$power_url'><font color='#ffffff'>$app_title $version - " . _("Theme:") . " " . user_theme() . " - ".show_users_online()."</font></a></td>\n"; + echo "<td align='center' class='footer'><a target='_blank' href='$power_url' tabindex='-1'><font color='#ffffff'>$app_title $version - " . _("Theme:") . " " . user_theme() ." - ".show_users_online()."</font></a></td>\n"; echo "</tr>\n"; echo "<tr>\n"; - echo "<td align='center' class='footer'><a target='_blank' href='$power_url'><font color='#ffff00'>$power_by</font></a></td>\n"; + echo "<td align='center' class='footer'><a target='_blank' href='$power_url' tabindex='-1'><font color='#ffff00'>$power_by</font></a></td>\n"; echo "</tr>\n"; if ($allow_demo_mode==true) { echo "<tr>\n"; - //echo "<td><br><div align='center'><a href='http://sourceforge.net'><img src='http://sourceforge.net/sflogo.php?group_id=89967&type=5' alt='SourceForge.net Logo' width='210' height='62' border='0' align='middle' /></a></div></td>\n"; + //echo "<td><br><div align='center'><a href='http://sourceforge.net'><img src='http://sourceforge.net/sflogo.php?group_id=89967&type=5' alt='SourceForge.net Logo' width='210' height='62' border='0' align='center' /></a></div></td>\n"; echo "</tr>\n"; } echo "</table><br><br>\n"; @@ -147,7 +142,6 @@ global $path_to_root; $selected_app = $waapp->get_selected_application(); - if (!$_SESSION["wa_current_user"]->check_application_access($selected_app)) return; @@ -214,6 +208,6 @@ echo "</tr></table></td></tr>"; } echo "</table>"; - } + } } ?> \ No newline at end of file diff -r be9b40c57b69 -r cbaafc142364 themes/cool/renderer.php --- a/themes/cool/renderer.php Thu Mar 12 13:00:10 2015 +0100 +++ b/themes/cool/renderer.php Sat Mar 14 16:05:36 2015 +0100 @@ -36,7 +36,7 @@ { global $path_to_root, $help_base_url, $db_connections; echo "<table class='callout_main' border='0' cellpadding='0' cellspacing='0'>\n"; - echo "<tr>"; + echo "<tr>\n"; echo "<td colspan='2' rowspan='2'>\n"; echo "<table class='main_page' border='0' cellpadding='0' cellspacing='0'>\n"; @@ -49,7 +49,6 @@ { $applications = $_SESSION['App']->applications; $local_path_to_root = $path_to_root; - $sel_app = $_SESSION['sel_app']; echo "<table cellpadding='0' cellspacing='0' width='100%'><tr><td>"; echo "<div class='tabs'>"; @@ -57,23 +56,22 @@ { if ($_SESSION["wa_current_user"]->check_application_access($app)) { - $acc = access_string($app->name); - echo "<a class='".($sel_app == $app->id ? 'selected' : 'menu_tab') - ."' href='$local_path_to_root/index.php?application=".$app->id - ."'$acc[1]>" .$acc[0] . "</a>"; - } + $acc = access_string($app->name); + echo "<a class='".($sel_app == $app->id ? 'selected' : 'menu_tab') + ."' href='$local_path_to_root/index.php?application=".$app->id + ."'$acc[1]>" .$acc[0] . "</a>"; + } } echo "</div>"; - echo "</td></tr></table>"; // top status bar - $img = "<img src='$local_path_to_root/themes/aqua/images/login.gif' width='14' height='14' border='0' alt='"._('Logout')."'> "; - $himg = "<img src='$local_path_to_root/themes/aqua/images/help.gif' width='14' height='14' border='0' alt='"._('Help')."'> "; + $img = "<img src='$local_path_to_root/themes/cool/images/login.gif' width='14' height='14' border='0' alt='"._('Logout')."'> "; + $himg = "<img src='$local_path_to_root/themes/cool/images/help.gif' width='14' height='14' border='0' alt='"._('Help')."'> "; echo "<table class='logoutBar'>"; echo "<tr><td class='headingtext3'>" . $db_connections[$_SESSION["wa_current_user"]->company]["name"] . " | " . $_SERVER['SERVER_NAME'] . " | " . $_SESSION["wa_current_user"]->name . "</td>"; $indicator = "$path_to_root/themes/".user_theme(). "/images/ajax-loader.gif"; - echo "<td class='logoutBarRight'><img id='ajaxmark' src='$indicator' align='middle' style='visibility:hidden;'></td>"; + echo "<td class='logoutBarRight'><img id='ajaxmark' src='$indicator' align='center' style='visibility:hidden;' alt='ajaxmark'></td>"; echo " <td class='logoutBarRight'><a class='shortcut' href='$path_to_root/admin/display_prefs.php?'>" . _("Preferences") . "</a> \n"; echo " <a class='shortcut' href='$path_to_root/admin/change_current_user_password.php?selected_id=" . $_SESSION["wa_current_user"]->username . "'>" . _("Change password") . "</a> \n"; @@ -85,7 +83,6 @@ echo "</td></tr></table>"; } echo "</td></tr></table>"; - if ($no_menu) echo "<br>"; elseif ($title && !$is_index) @@ -96,17 +93,16 @@ ."</td>" ."</tr></table></center>"; } - } function menu_footer($no_menu, $is_index) { - global $version, $allow_demo_mode, $app_title, $power_url, + global $version, $allow_demo_mode, $app_title, $power_url, $power_by, $path_to_root, $Pagehelp, $Ajax; include_once($path_to_root . "/includes/date_functions.inc"); echo "</td></tr></table>\n"; // 'main_page' - if ($no_menu == false) // bottom status line + if ($no_menu == false) // bottom status line { if ($is_index) echo "<table class='bottomBar'>\n"; @@ -126,10 +122,10 @@ { echo "<table align='center' id='footer'>\n"; echo "<tr>\n"; - echo "<td align='center' class='footer'><a target='_blank' href='$power_url'><font color='#ffffff'>$app_title $version - " . _("Theme:") . " " . user_theme() ." - ".show_users_online(). "</font></a></td>\n"; + echo "<td align='center' class='footer'><a target='_blank' href='$power_url' tabindex='-1'><font color='#ffffff'>$app_title $version - " . _("Theme:") . " " . user_theme() ." - ".show_users_online()."</font></a></td>\n"; echo "</tr>\n"; echo "<tr>\n"; - echo "<td align='center' class='footer'><a target='_blank' href='$power_url'><font color='#ffff00'>$power_by</font></a></td>\n"; + echo "<td align='center' class='footer'><a target='_blank' href='$power_url' tabindex='-1'><font color='#ffff00'>$power_by</font></a></td>\n"; echo "</tr>\n"; if ($allow_demo_mode==true) { @@ -212,7 +208,6 @@ echo "</tr></table></td></tr>"; } echo "</table>"; - } + } } - ?> \ No newline at end of file diff -r be9b40c57b69 -r cbaafc142364 themes/default/renderer.php --- a/themes/default/renderer.php Thu Mar 12 13:00:10 2015 +0100 +++ b/themes/default/renderer.php Sat Mar 14 16:05:36 2015 +0100 @@ -9,7 +9,6 @@ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the License here <http://www.gnu.org/licenses/gpl-3.0.html>. ***********************************************************************/ - class renderer { function get_icon($category) @@ -20,7 +19,7 @@ $img = $category == '' ? 'right.gif' : $category.'.png'; else $img = 'right.gif'; - return "<img src='$path_to_root/themes/default/images/$img' style='vertical-align:middle;' border='0' ".basename($img)."> "; + return "<img src='$path_to_root/themes/default/images/$img' style='vertical-align:middle;' border='0'> "; } function wa_header() @@ -65,14 +64,14 @@ } echo "</div>"; echo "</td></tr></table>"; - // top status bar $img = "<img src='$local_path_to_root/themes/default/images/login.gif' width='14' height='14' border='0' alt='"._('Logout')."'> "; $himg = "<img src='$local_path_to_root/themes/default/images/help.gif' width='14' height='14' border='0' alt='"._('Help')."'> "; + echo "<table class='logoutBar'>"; echo "<tr><td class='headingtext3'>" . $db_connections[$_SESSION["wa_current_user"]->company]["name"] . " | " . $_SERVER['SERVER_NAME'] . " | " . $_SESSION["wa_current_user"]->name . "</td>"; $indicator = "$path_to_root/themes/".user_theme(). "/images/ajax-loader.gif"; - echo "<td class='logoutBarRight'><img id='ajaxmark' src='$indicator' align='middle' style='visibility:hidden;' alt='ajaxmark'></td>"; + echo "<td class='logoutBarRight'><img id='ajaxmark' src='$indicator' align='center' style='visibility:hidden;' alt='ajaxmark'></td>"; echo " <td class='logoutBarRight'><a class='shortcut' href='$path_to_root/admin/display_prefs.php?'>" . _("Preferences") . "</a> \n"; echo " <a class='shortcut' href='$path_to_root/admin/change_current_user_password.php?selected_id=" . $_SESSION["wa_current_user"]->username . "'>" . _("Change password") . "</a> \n"; @@ -85,7 +84,6 @@ echo "</td></tr></table>"; } echo "</td></tr></table>"; - if ($no_menu) echo "<br>"; elseif ($title && !$is_index) @@ -100,7 +98,7 @@ function menu_footer($no_menu, $is_index) { - global $version, $allow_demo_mode, $app_title, $power_url, + global $version, $allow_demo_mode, $app_title, $power_url, $power_by, $path_to_root, $Pagehelp, $Ajax; include_once($path_to_root . "/includes/date_functions.inc"); @@ -125,7 +123,7 @@ { echo "<table align='center' id='footer'>\n"; echo "<tr>\n"; - echo "<td align='center' class='footer'><a target='_blank' href='$power_url' tabindex='-1'><font color='#ffffff'>$app_title $version - " . _("Theme:") . " " . user_theme() . " - ".show_users_online()."</font></a></td>\n"; + echo "<td align='center' class='footer'><a target='_blank' href='$power_url' tabindex='-1'><font color='#ffffff'>$app_title $version - " . _("Theme:") . " " . user_theme() ." - ".show_users_online()."</font></a></td>\n"; echo "</tr>\n"; echo "<tr>\n"; echo "<td align='center' class='footer'><a target='_blank' href='$power_url' tabindex='-1'><font color='#ffff00'>$power_by</font></a></td>\n"; @@ -133,7 +131,7 @@ if ($allow_demo_mode==true) { echo "<tr>\n"; - //echo "<td><br><div align='center'><a href='http://sourceforge.net'><img src='http://sourceforge.net/sflogo.php?group_id=89967&type=5' alt='SourceForge.net Logo' width='210' height='62' border='0' align='middle' /></a></div></td>\n"; + //echo "<td><br><div align='center'><a href='http://sourceforge.net'><img src='http://sourceforge.net/sflogo.php?group_id=89967&type=5' alt='SourceForge.net Logo' width='210' height='62' border='0' align='center' /></a></div></td>\n"; echo "</tr>\n"; } echo "</table><br><br>\n"; @@ -211,6 +209,6 @@ echo "</tr></table></td></tr>"; } |
|
From: FrontAccounting <fro...@us...> - 2015-03-12 13:28:38
|
details: http://frontaccounting.hg.sourceforge.net:8000/hgroot/frontaccounting/frontaccounting/hg/p/frontaccounting/mercurial/rev/be9b40c57b69 changeset: 3525:be9b40c57b69 user: Janusz Dobrowolski <ja...@fr...> date: Thu Mar 12 13:00:10 2015 +0100 description: Fixed many issues in output HTML code according to HTML 4.01 Transitional format. diffstat: access/login.php | 10 +++++----- access/logout.php | 2 +- access/password_reset.php | 8 ++++---- admin/create_coy.php | 2 +- admin/crm_categories.php | 2 +- admin/db/attachments_db.inc | 4 ++-- admin/inst_upgrade.php | 2 +- admin/security_roles.php | 2 +- gl/gl_bank.php | 2 +- gl/gl_journal.php | 2 +- gl/includes/ui/gl_bank_ui.inc | 4 ++-- gl/includes/ui/gl_journal_ui.inc | 15 +++++++-------- gl/inquiry/balance_sheet.php | 4 ++-- gl/inquiry/profit_loss.php | 2 +- gl/view/bank_transfer_view.php | 2 +- gl/view/gl_deposit_view.php | 4 ++-- gl/view/gl_payment_view.php | 4 ++-- gl/view/gl_trans_view.php | 4 ++-- includes/page/footer.inc | 2 +- includes/page/header.inc | 6 +++--- includes/system_tests.inc | 2 +- includes/ui/allocation_cart.inc | 2 +- includes/ui/contacts_view.inc | 2 +- includes/ui/db_pager_view.inc | 4 ++-- includes/ui/ui_controls.inc | 11 ++++++----- includes/ui/ui_input.inc | 23 ++++++++++++----------- includes/ui/ui_lists.inc | 5 ++++- includes/ui/ui_msgs.inc | 5 +++++ includes/ui/ui_view.inc | 4 ++-- includes/ui/view_package.php | 2 +- install/index.php | 2 +- inventory/adjustments.php | 2 +- inventory/includes/item_adjustments_ui.inc | 4 ++-- inventory/includes/stock_transfers_ui.inc | 4 ++-- inventory/manage/item_categories.php | 2 +- inventory/manage/item_codes.php | 2 +- inventory/manage/item_units.php | 2 +- inventory/manage/movement_types.php | 2 +- inventory/manage/sales_kits.php | 2 +- inventory/prices.php | 2 +- inventory/purchasing_data.php | 2 +- inventory/reorder_level.php | 2 +- inventory/transfers.php | 2 +- inventory/view/view_adjustment.php | 4 ++-- inventory/view/view_transfer.php | 4 ++-- manufacturing/includes/manufacturing_ui.inc | 6 +++--- manufacturing/includes/work_order_issue_ui.inc | 2 +- manufacturing/manage/bom_edit.php | 2 +- manufacturing/manage/work_centres.php | 2 +- manufacturing/work_order_issue.php | 2 +- purchasing/includes/ui/grn_ui.inc | 4 ++-- purchasing/includes/ui/invoice_ui.inc | 14 +++++++------- purchasing/includes/ui/po_ui.inc | 6 +++--- purchasing/inquiry/supplier_inquiry.php | 2 +- purchasing/po_receive_items.php | 2 +- purchasing/supplier_payment.php | 4 ++-- purchasing/view/view_grn.php | 2 +- purchasing/view/view_po.php | 4 ++-- purchasing/view/view_supp_credit.php | 6 +++--- purchasing/view/view_supp_invoice.php | 6 +++--- purchasing/view/view_supp_payment.php | 2 +- reporting/includes/reports_classes.inc | 2 +- sales/create_recurrent_invoices.php | 2 +- sales/credit_note_entry.php | 2 +- sales/customer_credit_invoice.php | 8 ++++---- sales/customer_delivery.php | 8 ++++---- sales/customer_invoice.php | 8 ++++---- sales/customer_payments.php | 4 ++-- sales/includes/ui/sales_credit_ui.inc | 4 ++-- sales/includes/ui/sales_order_ui.inc | 11 +++++++---- sales/inquiry/customer_inquiry.php | 2 +- sales/manage/sales_areas.php | 2 +- sales/manage/sales_groups.php | 2 +- sales/manage/sales_people.php | 2 +- sales/manage/sales_types.php | 2 +- sales/sales_order_entry.php | 2 +- sales/view/view_credit.php | 12 ++++++------ sales/view/view_dispatch.php | 14 +++++++------- sales/view/view_invoice.php | 14 +++++++------- sales/view/view_receipt.php | 2 +- sales/view/view_sales_order.php | 6 +++--- taxes/item_tax_types.php | 2 +- themes/aqua/renderer.php | 24 ++++++++++++------------ themes/cool/renderer.php | 22 +++++++++++----------- themes/default/renderer.php | 23 +++++++++++------------ 85 files changed, 219 insertions(+), 208 deletions(-) diffs (truncated from 1964 to 300 lines): diff -r 3119cd365769 -r be9b40c57b69 access/login.php --- a/access/login.php Fri Feb 20 01:44:21 2015 +0100 +++ b/access/login.php Thu Mar 12 13:00:10 2015 +0100 @@ -36,7 +36,7 @@ if (check_faillog()) { - $blocked_msg = '<span class=redfg>'._('Too many failed login attempts.<br>Please wait a while or try later.').'</span>'; + $blocked_msg = '<span class="redfg">'._('Too many failed login attempts.<br>Please wait a while or try later.').'</span>'; $js .= "<script>setTimeout(function() { document.getElementsByName('SubmitUser')[0].disabled=0; @@ -57,7 +57,7 @@ echo "<!DOCTYPE HTML PUBLIC \"-//W3C//DTD HTML 4.01 Transitional//EN\" \"http://www.w3.org/TR/html4/loose.dtd\">\n"; echo "<html dir='$rtl' >\n"; echo "<head profile=\"http://www.w3.org/2005/10/profile\"><title>$title</title>\n"; - echo "<meta http-equiv='Content-type' content='text/html; charset=$encoding' />\n"; + echo "<meta http-equiv='Content-type' content='text/html; charset=$encoding' >\n"; echo "<link href='$path_to_root/themes/$def_theme/default.css' rel='stylesheet' type='text/css'> \n"; echo "<link href='$path_to_root/themes/default/images/favicon.ico' rel='icon' type='image/x-icon'> \n"; send_scripts(); @@ -78,14 +78,14 @@ start_row(); echo "<td align='center' colspan=2>"; if (!$login_timeout) { // FA logo - echo "<a target='_blank' href='$power_url'><img src='$path_to_root/themes/$def_theme/images/logo_frontaccounting.png' alt='FrontAccounting' height='50' onload='fixPNG(this)' border='0' /></a>"; + echo "<a target='_blank' href='$power_url'><img src='$path_to_root/themes/$def_theme/images/logo_frontaccounting.png' alt='FrontAccounting' height='50' onload='fixPNG(this)' border='0' ></a>"; } else { echo "<font size=5>"._('Authorization timeout')."</font>"; } echo "</td>\n"; end_row(); - echo "<input type='hidden' id=ui_mode name='ui_mode' value='".$_SESSION["wa_current_user"]->ui_mode."' />\n"; + echo "<input type='hidden' id=ui_mode name='ui_mode' value='".$_SESSION["wa_current_user"]->ui_mode."' >\n"; if (!$login_timeout) table_section_title(_("Version")." $version Build $build_version - "._("Login")); $value = $login_timeout ? $_SESSION['wa_current_user']->loginname : ($allow_demo_mode ? "demouser":""); @@ -119,7 +119,7 @@ }; end_table(1); echo "<center><input type='submit' value=' "._("Login -->")." ' name='SubmitUser'" - .($login_timeout ? '':" onclick='set_fullmode();'").(isset($blocked_msg) ? " disabled" : '')." /></center>\n"; + .($login_timeout ? '':" onclick='set_fullmode();'").(isset($blocked_msg) ? " disabled" : '')." ></center>\n"; foreach($_SESSION['timeout']['post'] as $p => $val) { // add all request variables to be resend together with login data diff -r 3119cd365769 -r be9b40c57b69 access/logout.php --- a/access/logout.php Fri Feb 20 01:44:21 2015 +0100 +++ b/access/logout.php Thu Mar 12 13:00:10 2015 +0100 @@ -22,7 +22,7 @@ echo "<table width='100%' border='0'> <tr> - <td align='center'><img src='$path_to_root/themes/default/images/logo_frontaccounting.png' alt='FrontAccounting' width='250' height='50' onload='fixPNG(this)' /></td> + <td align='center'><img src='$path_to_root/themes/default/images/logo_frontaccounting.png' alt='FrontAccounting' width='250' height='50' onload='fixPNG(this)' ></td> </tr> <tr> <td> </td> diff -r 3119cd365769 -r be9b40c57b69 access/password_reset.php --- a/access/password_reset.php Fri Feb 20 01:44:21 2015 +0100 +++ b/access/password_reset.php Thu Mar 12 13:00:10 2015 +0100 @@ -36,7 +36,7 @@ echo "<!DOCTYPE HTML PUBLIC \"-//W3C//DTD HTML 4.01 Transitional//EN\" \"http://www.w3.org/TR/html4/loose.dtd\">\n"; echo "<html dir='$rtl' >\n"; echo "<head profile=\"http://www.w3.org/2005/10/profile\"><title>$title</title>\n"; - echo "<meta http-equiv='Content-type' content='text/html; charset=$encoding' />\n"; + echo "<meta http-equiv='Content-type' content='text/html; charset=$encoding' >\n"; echo "<link href='$path_to_root/themes/$def_theme/default.css' rel='stylesheet' type='text/css'> \n"; echo "<link href='$path_to_root/themes/default/images/favicon.ico' rel='icon' type='image/x-icon'> \n"; send_scripts(); @@ -53,11 +53,11 @@ start_table(false, "class='login'"); start_row(); echo "<td align='center' colspan=2>"; - echo "<a target='_blank' href='$power_url'><img src='$path_to_root/themes/$def_theme/images/logo_frontaccounting.png' alt='FrontAccounting' height='50' onload='fixPNG(this)' border='0' /></a>"; + echo "<a target='_blank' href='$power_url'><img src='$path_to_root/themes/$def_theme/images/logo_frontaccounting.png' alt='FrontAccounting' height='50' onload='fixPNG(this)' border='0' ></a>"; echo "</td>\n"; end_row(); - echo "<input type='hidden' id=ui_mode name='ui_mode' value='".$_SESSION["wa_current_user"]->ui_mode."' />\n"; + echo "<input type='hidden' id=ui_mode name='ui_mode' value='".$_SESSION["wa_current_user"]->ui_mode."' >\n"; table_section_title(_("Version")." $version Build $build_version - "._("Password reset")); text_row(_("Email"), "email_entry_field", "", 20, 30); @@ -81,7 +81,7 @@ end_row(); end_table(1); echo "<center><input type='submit' value=' "._("Send password -->")." ' name='SubmitReset' - onclick='set_fullmode();' /></center>\n"; + onclick='set_fullmode();'></center>\n"; end_form(1); $Ajax->addScript(true, "document.forms[0].password.focus();"); diff -r 3119cd365769 -r be9b40c57b69 admin/create_coy.php --- a/admin/create_coy.php Fri Feb 20 01:44:21 2015 +0100 +++ b/admin/create_coy.php Thu Mar 12 13:00:10 2015 +0100 @@ -241,7 +241,7 @@ $coyno = $_SESSION["wa_current_user"]->company; echo " - <script language='javascript'> + <script type='text/javascript'> function deleteCompany(id, name) { if (!confirm('" . _("Are you sure you want to delete company no. ") . "'+id+' '+name+'?')) return diff -r 3119cd365769 -r be9b40c57b69 admin/crm_categories.php --- a/admin/crm_categories.php Fri Feb 20 01:44:21 2015 +0100 +++ b/admin/crm_categories.php Thu Mar 12 13:00:10 2015 +0100 @@ -92,7 +92,7 @@ $result = get_crm_categories(check_value('show_inactive')); start_form(); -start_table(TABLESTYLE, "width=70%"); +start_table(TABLESTYLE, "width='70%'"); $th = array(_("Category Type"), _("Category Subtype"), _("Short Name"), _("Description"), "", " "); inactive_control_column($th); diff -r 3119cd365769 -r be9b40c57b69 admin/db/attachments_db.inc --- a/admin/db/attachments_db.inc Fri Feb 20 01:44:21 2015 +0100 +++ b/admin/db/attachments_db.inc Thu Mar 12 13:00:10 2015 +0100 @@ -65,9 +65,9 @@ if (strlen($str_return)) $str_return = $str_return . " \n"; $str_return .= _("Attached File:")." <a href='$path_to_root/admin/attachments.php?vw=".$attachment["id"]." ' target='blanc_'> ". - $attachment["id"] . " " . $attachment["description"]. " - ". $attachment["filename"]."</a><br/>"; + $attachment["id"] . " " . $attachment["description"]. " - ". $attachment["filename"]."</a><br>"; } - return $str_return . "<br/>"; + return $str_return . "<br>"; } //---------------------------------------------------------------------------------------- diff -r 3119cd365769 -r be9b40c57b69 admin/inst_upgrade.php --- a/admin/inst_upgrade.php Fri Feb 20 01:44:21 2015 +0100 +++ b/admin/inst_upgrade.php Thu Mar 12 13:00:10 2015 +0100 @@ -157,7 +157,7 @@ if (!$check) check_cells(null,'install_'.$i, 0); else { - label_cell("<span class=redfg>" + label_cell("<span class='redfg'>" . sprintf(_("Partially installed (%s)"), $check) . "</span>"); $partial++; } diff -r 3119cd365769 -r be9b40c57b69 admin/security_roles.php --- a/admin/security_roles.php Fri Feb 20 01:44:21 2015 +0100 +++ b/admin/security_roles.php Thu Mar 12 13:00:10 2015 +0100 @@ -197,7 +197,7 @@ record_status_list_row(_("Current status:"), 'inactive'); end_table(1); - start_table(TABLESTYLE, "width=40%"); + start_table(TABLESTYLE, "width='40%'"); $k = $j = 0; //row colour counter $ext = $sec = $m = -1; diff -r 3119cd365769 -r be9b40c57b69 gl/gl_bank.php --- a/gl/gl_bank.php Fri Feb 20 01:44:21 2015 +0100 +++ b/gl/gl_bank.php Thu Mar 12 13:00:10 2015 +0100 @@ -401,7 +401,7 @@ display_bank_header($_SESSION['pay_items']); -start_table(TABLESTYLE2, "width=90%", 10); +start_table(TABLESTYLE2, "width='90%'", 10); start_row(); echo "<td>"; display_gl_items($_SESSION['pay_items']->trans_type==ST_BANKPAYMENT ? diff -r 3119cd365769 -r be9b40c57b69 gl/gl_journal.php --- a/gl/gl_journal.php Fri Feb 20 01:44:21 2015 +0100 +++ b/gl/gl_journal.php Thu Mar 12 13:00:10 2015 +0100 @@ -323,7 +323,7 @@ display_order_header($_SESSION['journal_items']); -start_table(TABLESTYLE2, "width=90%", 10); +start_table(TABLESTYLE2, "width='90%'", 10); start_row(); echo "<td>"; display_gl_items(_("Rows"), $_SESSION['journal_items']); diff -r 3119cd365769 -r be9b40c57b69 gl/includes/ui/gl_bank_ui.inc --- a/gl/includes/ui/gl_bank_ui.inc Fri Feb 20 01:44:21 2015 +0100 +++ b/gl/includes/ui/gl_bank_ui.inc Thu Mar 12 13:00:10 2015 +0100 @@ -17,7 +17,7 @@ $customer_error = false; div_start('pmt_header'); - start_outer_table(TABLESTYLE2, "width=90%"); // outer table + start_outer_table(TABLESTYLE2, "width='90%'"); // outer table table_section(1); @@ -146,7 +146,7 @@ display_heading($title); div_start('items_table'); - start_table(TABLESTYLE, "colspan=7 width=95%"); + start_table(TABLESTYLE, "width='95%'"); if ($dim == 2) $th = array(_("Account Code"), _("Account Description"), _("Dimension")." 1", diff -r 3119cd365769 -r be9b40c57b69 gl/includes/ui/gl_journal_ui.inc --- a/gl/includes/ui/gl_journal_ui.inc Fri Feb 20 01:44:21 2015 +0100 +++ b/gl/includes/ui/gl_journal_ui.inc Thu Mar 12 13:00:10 2015 +0100 @@ -20,17 +20,15 @@ $qes = has_quick_entries(QE_JOURNAL); $new = $Order->order_id==0; - start_outer_table(TABLESTYLE2, "width=90%"); + + hidden('ref_original'); + start_outer_table(TABLESTYLE2, "width='90%'"); table_section(1, $qes ? "20%" : ""); - start_row(); - date_cells(_("Date:"), 'date_', '', $new); + date_row(_("Date:"), 'date_', '', $new); table_section(2, $qes ? "20%" : "50%"); - ref_cells(_("Reference:"), 'ref', ''); - hidden('ref_original'); - end_row(); - + ref_row(_("Reference:"), 'ref', ''); if ($new) { table_section(3, "20%"); @@ -78,7 +76,7 @@ $dim = get_company_pref('use_dimension'); div_start('items_table'); - start_table(TABLESTYLE, "colspan=7 width=95%"); + start_table(TABLESTYLE, "width='95%'"); if ($dim == 2) $th = array(_("Account Code"), _("Account Description"), _("Dimension")." 1", _("Dimension")." 2", _("Debit"), _("Credit"), _("Memo"), ""); @@ -207,6 +205,7 @@ if ($dim > 1) dimensions_list_cells(null, 'dimension2_id', null, true, " ", false, 2); } + if ($dim < 1) hidden('dimension_id', 0); if ($dim < 2) diff -r 3119cd365769 -r be9b40c57b69 gl/inquiry/balance_sheet.php --- a/gl/inquiry/balance_sheet.php Fri Feb 20 01:44:21 2015 +0100 +++ b/gl/inquiry/balance_sheet.php Thu Mar 12 13:00:10 2015 +0100 @@ -156,7 +156,7 @@ div_start('balance_tbl'); - start_table(TABLESTYLE, "width=30%"); + start_table(TABLESTYLE, "width='30%'"); if (!$drilldown) //Root Level { @@ -172,7 +172,7 @@ while ($class = db_fetch($classresult)) { $classclose = 0.0; - $convert = get_class_type_convert($class["ctype"]); + $convert = get_class_type_convert($class["ctype"]); $ctype = $class["ctype"]; $classname = $class["class_name"]; diff -r 3119cd365769 -r be9b40c57b69 gl/inquiry/profit_loss.php --- a/gl/inquiry/profit_loss.php Fri Feb 20 01:44:21 2015 +0100 +++ b/gl/inquiry/profit_loss.php Thu Mar 12 13:00:10 2015 +0100 @@ -229,7 +229,7 @@ div_start('pl_tbl'); - start_table(TABLESTYLE, "width=50%"); + start_table(TABLESTYLE, "width='50%'"); $tableheader = "<tr> <td class='tableheader'>" . _("Group/Account Name") . "</td> diff -r 3119cd365769 -r be9b40c57b69 gl/view/bank_transfer_view.php --- a/gl/view/bank_transfer_view.php Fri Feb 20 01:44:21 2015 +0100 +++ b/gl/view/bank_transfer_view.php Thu Mar 12 13:00:10 2015 +0100 @@ -61,7 +61,7 @@ display_heading($systypes_array[ST_BANKTRANSFER] . " #$trans_no"); echo "<br>"; -start_table(TABLESTYLE, "width=80%"); +start_table(TABLESTYLE, "width='80%'"); start_row(); label_cells(_("From Bank Account"), $from_trans['bank_account_name'], "class='tableheader2'"); diff -r 3119cd365769 -r be9b40c57b69 gl/view/gl_deposit_view.php --- a/gl/view/gl_deposit_view.php Fri Feb 20 01:44:21 2015 +0100 +++ b/gl/view/gl_deposit_view.php Thu Mar 12 13:00:10 2015 +0100 @@ -48,7 +48,7 @@ display_heading(_("GL Deposit") . " #$trans_no"); echo "<br>"; -start_table(TABLESTYLE, "width=80%"); +start_table(TABLESTYLE, "width='80%'"); |
|
From: FrontAccounting <fro...@us...> - 2015-02-28 17:05:26
|
details: http://frontaccounting.hg.sourceforge.net:8000/hgroot/frontaccounting/frontaccounting/hg/p/frontaccounting/mercurial/rev/64d27a1a846d changeset: 3522:64d27a1a846d user: Janusz Dobrowolski <ja...@fr...> date: Fri Feb 20 10:34:29 2015 +0100 description: Added dimension edition on purchase invoice entry. diffstat: purchasing/includes/db/invoice_db.inc | 17 ++++++------ purchasing/includes/db/invoice_items_db.inc | 38 ++++++++++++++-------------- purchasing/includes/po_class.inc | 2 + purchasing/includes/purchasing_db.inc | 2 + purchasing/includes/supp_trans_class.inc | 3 ++ purchasing/includes/ui/invoice_ui.inc | 10 +++++++ purchasing/includes/ui/po_ui.inc | 10 ++++++- sql/alter2.4.sql | 9 ++++++ sql/en_US-demo.sql | 12 +++++--- sql/en_US-new.sql | 2 + 10 files changed, 72 insertions(+), 33 deletions(-) diffs (295 lines): diff -r 7b319b4ec268 -r 64d27a1a846d purchasing/includes/db/invoice_db.inc --- a/purchasing/includes/db/invoice_db.inc Thu Feb 19 22:40:57 2015 +0100 +++ b/purchasing/includes/db/invoice_db.inc Fri Feb 20 10:34:29 2015 +0100 @@ -126,7 +126,8 @@ //$company_currency = get_company_currency(); $trans_no = $supp_trans->trans_no; $trans_type = $supp_trans->trans_type; - /*Start an sql transaction */ + $supplier = get_supplier($supp_trans->supplier_id); + begin_transaction(); hook_db_prewrite($supp_trans, $trans_type); $tax_total = 0; @@ -138,8 +139,6 @@ } else $allocs = get_po_prepayments($supp_trans); - $supplier = get_supplier($supp_trans->supplier_id); - add_new_exchange_rate($supplier['curr_code'], $supp_trans->tran_date, $supp_trans->ex_rate); foreach ($taxes as $n => $taxitem) @@ -234,8 +233,8 @@ $total += add_gl_trans_supplier($trans_type, $invoice_id, $date_, $entered_gl_code->gl_code, $entered_gl_code->gl_dim, $entered_gl_code->gl_dim2, $entered_gl_code->amount, $supp_trans->supplier_id, "", 0, $memo_); - add_supp_invoice_gl_item($trans_type, $invoice_id, $entered_gl_code->gl_code, - $entered_gl_code->amount, $memo_); + add_supp_invoice_gl_item($trans_type, $invoice_id, $entered_gl_code->gl_code, $entered_gl_code->amount, $memo_, + $entered_gl_code->gl_dim, $entered_gl_code->gl_dim2); // store tax details if the gl account is a tax account if ($trans_type == ST_SUPPCREDIT) @@ -270,8 +269,10 @@ $stock_gl_code = get_stock_gl_code($entered_grn->item_code); - $dim = $supplier['dimension_id'] ? $supplier['dimension_id'] : $stock_gl_code['dimension_id']; - $dim2 = $supplier['dimension2_id'] ? $supplier['dimension2_id'] : $stock_gl_code['dimension2_id']; + $dim = !empty($supp_trans->dimension) ? $supp_trans->dimension : + ($supplier['dimension_id'] ? $supplier['dimension_id'] : $stock_gl_code['dimension_id']); + $dim2 = !empty($supp_trans->dimension2) ? $supp_trans->dimension2 : + ($supplier['dimension2_id'] ? $supplier['dimension2_id'] : $stock_gl_code['dimension2_id']); if ($trans_type == ST_SUPPCREDIT) { $iv_act = (is_inventory_item($entered_grn->item_code) ? $stock_gl_code["inventory_account"] : @@ -490,7 +491,7 @@ else { $supp_trans->add_gl_codes_to_trans($details_row["gl_code"], get_gl_account_name($details_row["gl_code"]), 0, 0, - $details_row["FullUnitPrice"], $details_row["memo_"]); + $details_row["FullUnitPrice"], $details_row["memo_"], $details_row["dimension_id"], $details_row["dimension2_id"]); } } $supp_trans->tax_overrides = get_tax_overrides($trans_type, $trans_no); diff -r 7b319b4ec268 -r 64d27a1a846d purchasing/includes/db/invoice_items_db.inc --- a/purchasing/includes/db/invoice_items_db.inc Thu Feb 19 22:40:57 2015 +0100 +++ b/purchasing/includes/db/invoice_items_db.inc Fri Feb 20 10:34:29 2015 +0100 @@ -12,48 +12,48 @@ //------------------------------------------------------------------------------------------------------------- function add_supp_invoice_item($supp_trans_type, $supp_trans_no, $stock_id, $description, - $gl_code, $unit_price, $unit_tax, $quantity, $grn_item_id, $po_detail_item_id, $memo_, - $err_msg="") + $gl_code, $unit_price, $unit_tax, $quantity, $grn_item_id, $po_detail_item_id, $memo_, $dim_id=0, $dim2_id=0) { $sql = "INSERT INTO ".TB_PREF."supp_invoice_items (supp_trans_type, supp_trans_no, stock_id, description, gl_code, unit_price, unit_tax, quantity, - grn_item_id, po_detail_item_id, memo_) "; + grn_item_id, po_detail_item_id, memo_, dimension_id, dimension2_id) "; $sql .= "VALUES (".db_escape($supp_trans_type).", ".db_escape($supp_trans_no).", " .db_escape($stock_id). ", ".db_escape($description).", ".db_escape($gl_code).", ".db_escape($unit_price) - .", ".db_escape($unit_tax).", ".db_escape($quantity).", - ".db_escape($grn_item_id).", ".db_escape($po_detail_item_id).", ".db_escape($memo_).")"; + .", ".db_escape($unit_tax).", ".db_escape($quantity).", ".db_escape($grn_item_id) + .", ".db_escape($po_detail_item_id).", ".db_escape($memo_) + .", ".db_escape($dim_id).", ".db_escape($dim2_id).")"; - if ($err_msg == "") - $err_msg = "Cannot insert a supplier transaction detail record"; - - db_query($sql, $err_msg); + db_query($sql, "Cannot insert a supplier transaction detail record"); return db_insert_id(); } //------------------------------------------------------------------------------------------------------------- -function add_supp_invoice_gl_item($supp_trans_type, $supp_trans_no, $gl_code, $amount, $memo_, $err_msg="") +function add_supp_invoice_gl_item($supp_trans_type, $supp_trans_no, $gl_code, $amount, $memo_, $dim_id=0, $dim2_id=0) { return add_supp_invoice_item($supp_trans_type, $supp_trans_no, "", "", $gl_code, $amount, - 0, 0, /*$grn_item_id*/0, /*$po_detail_item_id*/0, $memo_, $err_msg); + 0, 0, /*$grn_item_id*/-1, /*$po_detail_item_id*/0, $memo_, 0, $dim_id, $dim2_id); } -//---------------------------------------------------------------------------------------- - function get_supp_invoice_items($supp_trans_type, $supp_trans_no) { - $sql = "SELECT *, unit_price AS FullUnitPrice FROM " - .TB_PREF."supp_invoice_items inv LEFT JOIN ".TB_PREF."grn_items grn ON grn.id =inv.grn_item_id + $sql = "SELECT inv.*, grn.*, unit_price AS FullUnitPrice, + stock.parallel_qe, + stock.units, + tax_type.exempt, + tax_type.name as tax_type_name + FROM " + .TB_PREF."supp_invoice_items inv LEFT JOIN ".TB_PREF."grn_items grn ON grn.id =inv.grn_item_id + LEFT JOIN ".TB_PREF."stock_master stock ON stock.stock_id=inv.stock_id + LEFT JOIN ".TB_PREF."item_tax_types tax_type ON stock.tax_type_id=tax_type.id WHERE supp_trans_type = ".db_escape($supp_trans_type)." - AND supp_trans_no = ".db_escape($supp_trans_no) - ." ORDER BY inv.id"; + AND supp_trans_no = ".db_escape($supp_trans_no) + ." ORDER BY inv.id"; return db_query($sql, "Cannot retreive supplier transaction detail records"); } -//---------------------------------------------------------------------------------------- - function void_supp_invoice_items($type, $type_no) { $sql = "UPDATE ".TB_PREF."supp_invoice_items SET quantity=0, unit_price=0 diff -r 7b319b4ec268 -r 64d27a1a846d purchasing/includes/po_class.inc --- a/purchasing/includes/po_class.inc Thu Feb 19 22:40:57 2015 +0100 +++ b/purchasing/includes/po_class.inc Fri Feb 20 10:34:29 2015 +0100 @@ -37,6 +37,8 @@ var $terms; var $ex_rate; var $cash_account; + var $dimension, + $dimension2; var $reference; var $tax_overrides = array(); // array of taxes manually inserted during sales invoice entry (direct invoice) diff -r 7b319b4ec268 -r 64d27a1a846d purchasing/includes/purchasing_db.inc --- a/purchasing/includes/purchasing_db.inc Thu Feb 19 22:40:57 2015 +0100 +++ b/purchasing/includes/purchasing_db.inc Fri Feb 20 10:34:29 2015 +0100 @@ -184,6 +184,8 @@ $inv->supplier_id = $cart->supplier_id; $inv->tran_date = $cart->orig_order_date; $inv->due_date = $cart->due_date; + $inv->dimension = $cart->dimension; + $inv->dimension2 = $cart->dimension2; $inv->reference = $ref; $inv->supp_reference = $cart->supp_ref; $inv->tax_included = $cart->tax_included; diff -r 7b319b4ec268 -r 64d27a1a846d purchasing/includes/supp_trans_class.inc --- a/purchasing/includes/supp_trans_class.inc Thu Feb 19 22:40:57 2015 +0100 +++ b/purchasing/includes/supp_trans_class.inc Fri Feb 20 10:34:29 2015 +0100 @@ -48,6 +48,9 @@ var $currency; var $tax_overrides = array(); // array of taxes manually inserted during sales invoice entry + var $dimension, + $dimension2; + function supp_trans($trans_type, $trans_no=0) { $this->trans_type = $trans_type; diff -r 7b319b4ec268 -r 64d27a1a846d purchasing/includes/ui/invoice_ui.inc --- a/purchasing/includes/ui/invoice_ui.inc Thu Feb 19 22:40:57 2015 +0100 +++ b/purchasing/includes/ui/invoice_ui.inc Fri Feb 20 10:34:29 2015 +0100 @@ -20,6 +20,8 @@ $_POST['reference'] = $supp_trans->reference; $_POST['supplier_id'] = $supp_trans->supplier_id; $_POST['tax_algorithm'] = $supp_trans->tax_algorithm; + $_POST['dimension'] = $supp_trans->dimension; + $_POST['dimension2'] = $supp_trans->dimension2; $_POST['_ex_rate'] = $supp_trans->ex_rate; if (isset($supp_trans->tax_overrides)) @@ -38,6 +40,8 @@ $supp_trans->reference = $_POST['reference']; if (isset($_POST['tax_algorithm'])) $supp_trans->tax_algorithm = $_POST['tax_algorithm']; + $supp_trans->dimension = @$_POST['dimension']; + $supp_trans->dimension2 = @$_POST['dimension2']; $supp_trans->ex_rate = input_num('_ex_rate', null); @@ -124,6 +128,12 @@ } text_row(_("Supplier's Ref.:"), 'supp_reference', $_POST['supp_reference'], 20, 60); + if (get_company_pref('use_dimension')) + dimensions_list_row(_('Dimension').':', 'dimension', null, true, _('Default'), false, 1); + + if (get_company_pref('use_dimension') == 2) + dimensions_list_row(_('Dimension 2').':', 'dimension2', null, true, _('Default'), false, 2); + table_section(2, "33%"); date_row(_("Date") . ":", 'tran_date', '', true, 0, 0, 0, "", true); diff -r 7b319b4ec268 -r 64d27a1a846d purchasing/includes/ui/po_ui.inc --- a/purchasing/includes/ui/po_ui.inc Thu Feb 19 22:40:57 2015 +0100 +++ b/purchasing/includes/ui/po_ui.inc Fri Feb 20 10:34:29 2015 +0100 @@ -30,6 +30,8 @@ $_POST['prep_amount'] = price_format($cart->prep_amount); $_POST['_ex_rate'] = $cart->ex_rate; $_POST['cash_account'] = $cart->cash_account; + $_POST['dimension'] = $cart->dimension; + $_POST['dimension2'] = $cart->dimension2; foreach($cart->tax_overrides as $id => $value) $_POST['mantax'][$id] = price_format($value); } @@ -50,6 +52,8 @@ $cart->Comments = $_POST['Comments']; $cart->Location = $_POST['StkLocation']; $cart->delivery_address = $_POST['delivery_address']; + $cart->dimension = @$_POST['dimension']; + $cart->dimension2 = @$_POST['dimension2']; if (isset($_POST['tax_algorithm'])) $cart->tax_algorithm = $_POST['tax_algorithm']; $cart->prep_amount = input_num('prep_amount', 0); @@ -151,7 +155,6 @@ $_POST['OrderDate']); } - if ($editable) { ref_row(_("Reference:"), 'ref'); @@ -168,6 +171,11 @@ date_row(_("Due Date:"), 'due_date', '', false, 0, 0, 0, null, true); text_row(_("Supplier's Reference:"), 'supp_ref', null, 16, 15); + + if (get_company_pref('use_dimension')) + dimensions_list_row(_('Dimension').':', 'dimension', null, true, _('Default'), false, 1); + if (get_company_pref('use_dimension') == 2) + dimensions_list_row(_('Dimension 2').':', 'dimension2', null, true, _('Default'), false, 2); locations_list_row(_("Receive Into:"), 'StkLocation', null, false, true); table_section(3); diff -r 7b319b4ec268 -r 64d27a1a846d sql/alter2.4.sql --- a/sql/alter2.4.sql Thu Feb 19 22:40:57 2015 +0100 +++ b/sql/alter2.4.sql Fri Feb 20 10:34:29 2015 +0100 @@ -142,3 +142,12 @@ ALTER TABLE `0_gl_trans` CHANGE `type_no` `type_no` int(11) NOT NULL default '0'; ALTER TABLE `0_loc_stock` CHANGE `reorder_level` `reorder_level` double NOT NULL default '0'; + +# added dimensions in supplier documents +ALTER TABLE `0_supp_invoice_items` ADD COLUMN `dimension_id` int(11) NOT NULL DEFAULT '0' AFTER `memo_`; +ALTER TABLE `0_supp_invoice_items` ADD COLUMN `dimension2_id` int(11) NOT NULL DEFAULT '0' AFTER `dimension_id`; + +UPDATE `0_supp_invoice_items` si + LEFT JOIN `0_gl_trans` gl ON si.supp_trans_type=gl.`type` AND si.supp_trans_no=gl.type_no AND si.gl_code=gl.account + SET si.dimension_id=gl.dimension_id, si.dimension2_id=gl.dimension2_id +WHERE si.grn_item_id=-1 AND (gl.dimension_id OR gl.dimension2_id) diff -r 7b319b4ec268 -r 64d27a1a846d sql/en_US-demo.sql --- a/sql/en_US-demo.sql Thu Feb 19 22:40:57 2015 +0100 +++ b/sql/en_US-demo.sql Fri Feb 20 10:34:29 2015 +0100 @@ -1952,6 +1952,8 @@ `unit_price` double NOT NULL default '0', `unit_tax` double NOT NULL default '0', `memo_` tinytext, + `dimension_id` int(11) NOT NULL DEFAULT '0', + `dimension2_id` int(11) NOT NULL DEFAULT '0', PRIMARY KEY (`id`), KEY `Transaction` (`supp_trans_type`,`supp_trans_no`,`stock_id`) ) ENGINE=InnoDB DEFAULT CHARSET=utf8 AUTO_INCREMENT=6 ; @@ -1960,11 +1962,11 @@ -- 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, '', 0, 0); +INSERT INTO `0_supp_invoice_items` VALUES(2, 7, 20, '0', 2, 2, '103', '32MB VGA Card', 100, 11, 0.55, '', 0, 0); +INSERT INTO `0_supp_invoice_items` VALUES(3, 7, 20, '0', 3, 3, '104', '52x CD Drive', 100, 12, 0.6, '', 0, 0); +INSERT INTO `0_supp_invoice_items` VALUES(4, 8, 20, '2150', 0, 0, '', '', 0, 0.95, 0, 'Phone', 0, 0); +INSERT INTO `0_supp_invoice_items` VALUES(5, 8, 20, '5780', 0, 0, '', '', 0, 19.05, 0, 'Phone', 0, 0); -- -------------------------------------------------------- diff -r 7b319b4ec268 -r 64d27a1a846d sql/en_US-new.sql --- a/sql/en_US-new.sql Thu Feb 19 22:40:57 2015 +0100 +++ b/sql/en_US-new.sql Fri Feb 20 10:34:29 2015 +0100 @@ -1721,6 +1721,8 @@ `unit_price` double NOT NULL default '0', `unit_tax` double NOT NULL default '0', `memo_` tinytext, + `dimension_id` int(11) NOT NULL DEFAULT '0', + `dimension2_id` int(11) NOT NULL DEFAULT '0', PRIMARY KEY (`id`), KEY `Transaction` (`supp_trans_type`,`supp_trans_no`,`stock_id`) ) ENGINE=InnoDB DEFAULT CHARSET=utf8 AUTO_INCREMENT=1 ; |
|
From: FrontAccounting <fro...@us...> - 2015-02-28 17:05:26
|
details: http://frontaccounting.hg.sourceforge.net:8000/hgroot/frontaccounting/frontaccounting/hg/p/frontaccounting/mercurial/rev/7b319b4ec268 changeset: 3521:7b319b4ec268 user: Janusz Dobrowolski <ja...@fr...> date: Thu Feb 19 22:40:57 2015 +0100 description: Changes in db scheme: gl_trans.type_no optimized to int, changed lock_stock.reorder_level type to double. diffstat: sql/alter2.4.sql | 3 +++ sql/en_US-demo.sql | 4 ++-- sql/en_US-new.sql | 4 ++-- 3 files changed, 7 insertions(+), 4 deletions(-) diffs (52 lines): diff -r af46296a3551 -r 7b319b4ec268 sql/alter2.4.sql --- a/sql/alter2.4.sql Thu Feb 19 22:04:58 2015 +0100 +++ b/sql/alter2.4.sql Thu Feb 19 22:40:57 2015 +0100 @@ -139,3 +139,6 @@ ALTER TABLE `0_useronline` ENGINE=InnoDB; ALTER TABLE `0_users` ENGINE=InnoDB; ALTER TABLE `0_workcentres` ENGINE=InnoDB; + +ALTER TABLE `0_gl_trans` CHANGE `type_no` `type_no` int(11) NOT NULL default '0'; +ALTER TABLE `0_loc_stock` CHANGE `reorder_level` `reorder_level` double NOT NULL default '0'; diff -r af46296a3551 -r 7b319b4ec268 sql/en_US-demo.sql --- a/sql/en_US-demo.sql Thu Feb 19 22:04:58 2015 +0100 +++ b/sql/en_US-demo.sql Thu Feb 19 22:40:57 2015 +0100 @@ -833,7 +833,7 @@ 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', + `type_no` `type_no` int(11) NOT NULL default '0', `tran_date` date NOT NULL default '0000-00-00', `account` varchar(15) NOT NULL default '', `memo_` tinytext NOT NULL, @@ -1144,7 +1144,7 @@ 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', + `reorder_level` double NOT NULL default '0', PRIMARY KEY (`loc_code`,`stock_id`), KEY `stock_id` (`stock_id`) ) ENGINE=InnoDB DEFAULT CHARSET=utf8; diff -r af46296a3551 -r 7b319b4ec268 sql/en_US-new.sql --- a/sql/en_US-new.sql Thu Feb 19 22:04:58 2015 +0100 +++ b/sql/en_US-new.sql Thu Feb 19 22:40:57 2015 +0100 @@ -771,7 +771,7 @@ 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', + `type_no` int(11) NOT NULL default '0', `tran_date` date NOT NULL default '0000-00-00', `account` varchar(15) NOT NULL default '', `memo_` tinytext NOT NULL, @@ -990,7 +990,7 @@ 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', + `reorder_level` double NOT NULL default '0', PRIMARY KEY (`loc_code`,`stock_id`), KEY `stock_id` (`stock_id`) ) ENGINE=InnoDB DEFAULT CHARSET=utf8; |
|
From: FrontAccounting <fro...@us...> - 2015-02-28 17:05:26
|
details: http://frontaccounting.hg.sourceforge.net:8000/hgroot/frontaccounting/frontaccounting/hg/p/frontaccounting/mercurial/rev/048324b8d432 changeset: 3524:048324b8d432 user: Janusz Dobrowolski <ja...@fr...> date: Fri Feb 20 15:26:50 2015 +0100 description: Additional access control related ui helpers added: check_edit_access, access_post, access_num diffstat: includes/access_levels.inc | 36 ++++++++++++++++++++++++++++++++++++ 1 files changed, 36 insertions(+), 0 deletions(-) diffs (43 lines): diff -r c0a7279e71f7 -r 048324b8d432 includes/access_levels.inc --- a/includes/access_levels.inc Fri Feb 20 11:02:50 2015 +0100 +++ b/includes/access_levels.inc Fri Feb 20 15:26:50 2015 +0100 @@ -314,3 +314,39 @@ return array($security_areas, $security_sections); } */ + +function check_edit_access($name) +{ + global $input_security; + + $access = @$input_security[$name]; + + if (!$access) + $access = @$input_security['']; // default access level + + if (!$access) + return true; // if constraint is not defined edit access is allowed + + return user_check_access($access); +} +/* + Returns POST value or null if edit access to $name control is forbidden. +*/ +function access_post($name, $dflt=null) +{ + if (!check_edit_access($name)) + return $dflt; + else + return get_post($name, $dflt); +} + +/* + Returns numeric input value or null if edit access to $name control is forbidden. +*/ +function access_num($name, $dflt=null) +{ + if (!check_edit_access($name)) + return $dflt; + else + return input_num($name, $dflt); +} |
|
From: FrontAccounting <fro...@us...> - 2015-02-28 17:05:26
|
details: http://frontaccounting.hg.sourceforge.net:8000/hgroot/frontaccounting/frontaccounting/hg/p/frontaccounting/mercurial/rev/af46296a3551 changeset: 3520:af46296a3551 user: Janusz Dobrowolski <ja...@fr...> date: Thu Feb 19 22:04:58 2015 +0100 description: Small cleanup to branch name length in input form and printouts. diffstat: reporting/includes/header2.inc | 2 +- sales/includes/ui/sales_order_ui.inc | 2 +- sales/manage/customer_branches.php | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diffs (36 lines): diff -r 6b492baefc01 -r af46296a3551 reporting/includes/header2.inc --- a/reporting/includes/header2.inc Thu Feb 19 20:51:16 2015 +0100 +++ b/reporting/includes/header2.inc Thu Feb 19 22:04:58 2015 +0100 @@ -160,7 +160,7 @@ $this->row = $temp; $this->Text($mcol, $Addr2['name']); $this->NewLine(); - $this->TextWrapLines($mcol, $this->rightMargin - $mcol, $Addr2['address']); + $this->TextWrapLines($mcol, $this->rightMargin - $mcol, $Addr2['address'], 'left', 0, 0, NULL, 1); // Auxiliary document information $col = $this->leftMargin; diff -r 6b492baefc01 -r af46296a3551 sales/includes/ui/sales_order_ui.inc --- a/sales/includes/ui/sales_order_ui.inc Thu Feb 19 20:51:16 2015 +0100 +++ b/sales/includes/ui/sales_order_ui.inc Thu Feb 19 22:04:58 2015 +0100 @@ -621,7 +621,7 @@ date_row($delname, 'delivery_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, + text_row(_("Deliver To:"), 'deliver_to', $order->deliver_to, 50, 60, _('Additional identifier for delivery e.g. name of receiving person')); textarea_row(_("Address:"), 'delivery_address', $order->delivery_address, 35, 5, diff -r 6b492baefc01 -r af46296a3551 sales/manage/customer_branches.php --- a/sales/manage/customer_branches.php Thu Feb 19 20:51:16 2015 +0100 +++ b/sales/manage/customer_branches.php Thu Feb 19 22:04:58 2015 +0100 @@ -222,7 +222,7 @@ hidden('popup', @$_REQUEST['popup']); table_section_title(_("Name and Contact")); - text_row(_("Branch Name:"), 'br_name', null, 35, 40); + text_row(_("Branch Name:"), 'br_name', null, 50, 60); text_row(_("Branch Short Name:"), 'br_ref', null, 30, 30); table_section_title(_("Sales")); |
|
From: FrontAccounting <fro...@us...> - 2015-02-28 17:05:26
|
details: http://frontaccounting.hg.sourceforge.net:8000/hgroot/frontaccounting/frontaccounting/hg/p/frontaccounting/mercurial/rev/c0a7279e71f7 changeset: 3523:c0a7279e71f7 user: Janusz Dobrowolski <ja...@fr...> date: Fri Feb 20 11:02:50 2015 +0100 description: Attachments were not moved to new transaction after edition for some document types. diffstat: admin/db/attachments_db.inc | 7 +++++++ gl/includes/db/gl_db_banking.inc | 4 ++-- purchasing/includes/db/invoice_db.inc | 3 +++ sales/includes/db/sales_delivery_db.inc | 2 ++ sales/includes/db/sales_invoice_db.inc | 3 ++- 5 files changed, 16 insertions(+), 3 deletions(-) diffs (87 lines): diff -r 64d27a1a846d -r c0a7279e71f7 admin/db/attachments_db.inc --- a/admin/db/attachments_db.inc Fri Feb 20 10:34:29 2015 +0100 +++ b/admin/db/attachments_db.inc Fri Feb 20 11:02:50 2015 +0100 @@ -103,4 +103,11 @@ ." ORDER BY trans_no DESC"; } +function move_trans_attachments($type, $trans_from, $trans_to) +{ + $sql = "UPDATE ".TB_PREF."attachments SET trans_no=".db_escape($trans_to) + ." WHERE type_no=".db_escape($type)." AND trans_no=".db_escape($trans_from); + db_query($sql, 'cannot move atachments'); +} + diff -r 64d27a1a846d -r c0a7279e71f7 gl/includes/db/gl_db_banking.inc --- a/gl/includes/db/gl_db_banking.inc Fri Feb 20 10:34:29 2015 +0100 +++ b/gl/includes/db/gl_db_banking.inc Fri Feb 20 11:02:50 2015 +0100 @@ -417,7 +417,7 @@ $trans_no = write_customer_trans($trans_type, 0, $person_id, $person_detail_id, $date_, $ref, $cust_amount); - + move_trans_attachments($trans_type, $old_trans, $trans_no); } elseif ($person_type_id == PT_SUPPLIER) { @@ -433,7 +433,7 @@ $trans_no = write_supp_trans($trans_type, 0, $person_id, $date_, '', $ref, "", $supp_amount, 0, 0); - + move_trans_attachments($trans_type, $old_trans, $trans_no); } else { diff -r 64d27a1a846d -r c0a7279e71f7 purchasing/includes/db/invoice_db.inc --- a/purchasing/includes/db/invoice_db.inc Fri Feb 20 10:34:29 2015 +0100 +++ b/purchasing/includes/db/invoice_db.inc Fri Feb 20 11:02:50 2015 +0100 @@ -10,6 +10,7 @@ See the License here <http://www.gnu.org/licenses/gpl-3.0.html>. ***********************************************************************/ include_once($path_to_root . "/purchasing/includes/db/invoice_items_db.inc"); +include_once($path_to_root . "/admin/db/attachments_db.inc"); //-------------------------------------------------------------------------------------------------- @@ -175,6 +176,8 @@ $invoice_items_total, $item_added_tax, $supp_trans->ov_discount, "", 0, $supp_trans->tax_included, $supp_trans->tax_algorithm); + if ($trans_no) + move_trans_attachments($trans_type, $trans_no, $invoice_id); $supp_trans->trans_no = $invoice_id; diff -r 64d27a1a846d -r c0a7279e71f7 sales/includes/db/sales_delivery_db.inc --- a/sales/includes/db/sales_delivery_db.inc Fri Feb 20 10:34:29 2015 +0100 +++ b/sales/includes/db/sales_delivery_db.inc Fri Feb 20 11:02:50 2015 +0100 @@ -54,12 +54,14 @@ if ($trans_no == 0) { $delivery->trans_no = array($delivery_no=>0); } else { + move_trans_attachments(ST_CUSTDELIVERY, $trans_no, $delivery_no); void_gl_trans(ST_CUSTDELIVERY, $delivery_no, true); void_stock_move(ST_CUSTDELIVERY, $delivery_no); void_trans_tax_details(ST_CUSTDELIVERY, $delivery_no); delete_comments(ST_CUSTDELIVERY, $delivery_no); } + // for prepaid delivery repost income from deffered account if ($delivery->is_prepaid()) { diff -r 64d27a1a846d -r c0a7279e71f7 sales/includes/db/sales_invoice_db.inc --- a/sales/includes/db/sales_invoice_db.inc Fri Feb 20 10:34:29 2015 +0100 +++ b/sales/includes/db/sales_invoice_db.inc Fri Feb 20 11:02:50 2015 +0100 @@ -90,7 +90,8 @@ if ($trans_no == 0) { $invoice->trans_no = array($invoice_no=>0); - } + } else + move_trans_attachments(ST_SALESINVOICE, $trans_no, $invoice_no); $total = 0; // for prepayments use deferred income account if set |