From 55c51a9db64c9fe402d615e204824f8e4cd6a310 Mon Sep 17 00:00:00 2001 From: Janusz Dobrowolski Date: Sun, 13 Jun 2010 16:33:37 +0000 Subject: [PATCH] Merged changes from main CVS (up to 2.2.10) --- CHANGELOG.txt | 54 ++++++++++++++++++++++++++ admin/payment_terms.php | 14 +++---- config.default.php | 9 +++-- gl/includes/ui/gl_bank_ui.inc | 2 +- gl/includes/ui/gl_journal_ui.inc | 2 +- includes/current_user.inc | 4 +- includes/ui/allocation_cart.inc | 2 +- includes/ui/ui_input.inc | 46 +++++++++++++--------- js/behaviour.js | 12 +++--- js/inserts.js | 25 +++++++----- reporting/includes/excel_report.inc | 2 + reporting/includes/reports_classes.inc | 9 +++-- reporting/rep704.php | 11 +++++- sales/customer_credit_invoice.php | 6 +-- sales/includes/db/cust_trans_db.inc | 14 +++++++ sales/view/view_sales_order.php | 12 ++++-- sql/en_US-demo.sql | 2 - sql/en_US-new.sql | 4 +- update.html | 2 +- 19 files changed, 167 insertions(+), 65 deletions(-) diff --git a/CHANGELOG.txt b/CHANGELOG.txt index 40c22395..8fa15113 100644 --- a/CHANGELOG.txt +++ b/CHANGELOG.txt @@ -19,6 +19,60 @@ Legend: ! -> Note $ -> Affected files +13-Jun-2010 Merged changes from main trunk (2.2.10) as follows +------------------------------- Release 2.2.10 ---------------------------------- +11-Jun-2010 Joe Hunt +! Release 2.2.10 +$ config.default.php + update.html + +10-Jun-2010 Joe Hunt +! Changed Wiki help url and site url in config.default.php +$ config.default.php + +07-Jun-2010 Joe Hunt +# HTML decode text when printing to Excel. +$ /reporting/includes/excel_report.inc + +06-Jun-2010 Janusz Dobrowolski +# False overallocation fixed. +$ /includes/ui/allocation_cart.inc ++ Allowed optional long timeout on default/cancel/selector buttons +$ /includes/ui/ui_input.inc + /js/behaviour.js + /js/inserts.js +# Long ajax timeout on all reports +$ /reporting/includes/reports_classes.inc +# [0000232] Fixed list of related invoices/credits in SO view. +$ /sales/view/view_sales_order.php +# Small bug on final screen redirection +$ /sales/customer_credit_invoice.php + +03-Jun-2010 Joe Hunt +# Rounding bug when decimals greater than or equal to 6. +$ /includes/current_user.inc + +31-May-2010 Joe Hunt +# No limit on 30 days in Payment terms if end of month. +$ /admin/payment_terms.php + +30-May-2010 Joe Hunt +! Global variabel, $def_print_destination, config.php can be set to 0 or 1 +$ config.default.php + /reporting/includes/reports_classes.inc +! copy line memo to next line in journal entries and bank payments/deposits +$ /gl/includes/ui/gl_bank_ui.inc + /gl/includes/ui/gl_journal_ui.inc +! Report GL Transactions now prints line memos +$ /reporting/rep704.php + +29-May-2010 Janusz Dobrowolski +# Smaller fixes initial COAs +$ /sql/en_US-demo.sql + /sql/en_US-new.sql + +---------- End of changes from main trunk 2.2.7-2.2.9 + 05-Jun-2010 Joe Hunt ! Allowing SA_MULTIFISCALYEAR access to enter transactions on open fiscal years $ /admin/db/fiscalyears_db.inc diff --git a/admin/payment_terms.php b/admin/payment_terms.php index 4e07c6e4..e58a9fde 100644 --- a/admin/payment_terms.php +++ b/admin/payment_terms.php @@ -36,13 +36,13 @@ if ($Mode=='ADD_ITEM' || $Mode=='UPDATE_ITEM') $inpug_error = 1; display_error( _("The Terms description must be entered.")); set_focus('terms'); - } - elseif ($_POST['DayNumber'] > 30 && !check_value('DaysOrFoll')) - { - $inpug_error = 1; - display_error( _("When the check box to indicate a day in the following month is the due date, the due date cannot be a day after the 30th. A number between 1 and 30 is expected.")); - set_focus('DayNumber'); - } + } // there should be no limits by 30 here if they want longer payment terms. Joe Hunt 2010-05-31 + //elseif ($_POST['DayNumber'] > 30 && !check_value('DaysOrFoll')) + //{ + // $inpug_error = 1; + // display_error( _("When the check box to indicate a day in the following month is the due date, the due date cannot be a day after the 30th. A number between 1 and 30 is expected.")); + // set_focus('DayNumber'); + //} elseif ($_POST['DayNumber'] > 500 && check_value('DaysOrFoll')) { $inpug_error = 1; diff --git a/config.default.php b/config.default.php index 44b0d8e2..747d6f26 100644 --- a/config.default.php +++ b/config.default.php @@ -56,7 +56,7 @@ if (!isset($path_to_root) || isset($_GET['path_to_root']) || isset($_POST['path_ // Main Title $app_title = "FrontAccounting"; // application version - $version = "2.3 CVS (m9)"; + $version = "2.3 CVS (m10)"; // src-data compatibility check. Do not change. $core_version = "2.3"; @@ -65,7 +65,7 @@ if (!isset($path_to_root) || isset($_GET['path_to_root']) || isset($_POST['path_ // Powered by $power_by = "FrontAccounting"; - $power_url = "http://frontaccounting.net"; + $power_url = "http://frontaccounting.com"; /* use popup windows for views */ $use_popup_windows = 1; @@ -82,13 +82,16 @@ if (!isset($path_to_root) || isset($_GET['path_to_root']) || isset($_POST['path_ /* show users online discretely in the footer */ $show_users_online = 0; + /* default print destination. 0 = PDF/Printer, 1 = Excel */ + $def_print_destination = 0; + // Wiki context help configuration // If your help wiki use translated page titles uncomment next line // $old_style_help = 1; // this setting is depreciated and subject to removal in next FA versions // locally installed wiki module // $help_base_url = $path_to_root.'/modules/wiki/index.php?n='._('Help').'.'; // context help feed from frontaccounting.net - // $help_base_url = 'http://frontaccounting.net/fawiki/index.php?n=Help.'; + // $help_base_url = 'http://frontaccounting.com/fawiki/index.php?n=Help.'; // not used $help_base_url = null; diff --git a/gl/includes/ui/gl_bank_ui.inc b/gl/includes/ui/gl_bank_ui.inc index 1c36613c..0e624f37 100644 --- a/gl/includes/ui/gl_bank_ui.inc +++ b/gl/includes/ui/gl_bank_ui.inc @@ -209,7 +209,7 @@ function gl_edit_item_controls(&$order, $dim, $Index=null) $_POST['amount'] = price_format(0); $_POST['dimension_id'] = 0; $_POST['dimension2_id'] = 0; - $_POST['LineMemo'] = ""; + //$_POST['LineMemo'] = ""; // let memo go to next line Joe Hunt 2010-05-30 if(isset($_POST['_code_id_update'])) { $Ajax->activate('code_id'); } diff --git a/gl/includes/ui/gl_journal_ui.inc b/gl/includes/ui/gl_journal_ui.inc index f48e5178..8c4aec6a 100644 --- a/gl/includes/ui/gl_journal_ui.inc +++ b/gl/includes/ui/gl_journal_ui.inc @@ -193,7 +193,7 @@ function gl_edit_item_controls(&$order, $dim, $Index=null) $_POST['AmountCredit'] = ''; //price_format(0); $_POST['dimension_id'] = 0; $_POST['dimension2_id'] = 0; - $_POST['LineMemo'] = ""; + //$_POST['LineMemo'] = ""; // let memo go to next line Joe Hunt 2010-05-30 $_POST['_code_id_edit'] = ""; $_POST['code_id'] = ""; if(isset($_POST['_code_id_update'])) { diff --git a/includes/current_user.inc b/includes/current_user.inc index 8a167e3f..c1c68e43 100644 --- a/includes/current_user.inc +++ b/includes/current_user.inc @@ -183,7 +183,7 @@ class current_user function round2($number, $decimals=0) { - $delta = ($number < 0 ? -.000001 : .000001); + $delta = ($number < 0 ? -.0000000001 : .0000000001); return round($number+$delta, $decimals); } @@ -193,7 +193,7 @@ function number_format2($number, $decimals=0) $tsep = $thoseps[$_SESSION["wa_current_user"]->prefs->tho_sep()]; $dsep = $decseps[$_SESSION["wa_current_user"]->prefs->dec_sep()]; //return number_format($number, $decimals, $dsep, $tsep); - $delta = ($number < 0 ? -.000001 : .000001); + $delta = ($number < 0 ? -.0000000001 : .0000000001); return number_format($number+$delta, $decimals, $dsep, $tsep); } // diff --git a/includes/ui/allocation_cart.inc b/includes/ui/allocation_cart.inc index 8d1e4001..04466002 100644 --- a/includes/ui/allocation_cart.inc +++ b/includes/ui/allocation_cart.inc @@ -330,7 +330,7 @@ function check_allocations() /*Now check to see that the AllocAmt is no greater than the amount left to be allocated against the transaction under review */ - if (input_num('amount' . $counter) > get_post('un_allocated' . $counter)) + if (input_num('amount' . $counter) > input_num('un_allocated' . $counter)) { display_error(_("At least one transaction is overallocated.")); set_focus('amount'.$counter); diff --git a/includes/ui/ui_input.inc b/includes/ui/ui_input.inc index 36f99e9c..00bae312 100644 --- a/includes/ui/ui_input.inc +++ b/includes/ui/ui_input.inc @@ -107,35 +107,43 @@ function hidden($name, $value=null, $echo=true) null - button visible only in fallback mode; optional icon Ajax submit: true - standard button; optional icon - 'process' - displays progress bar during call; optional icon + 'default' - default form submit on Ctrl-Enter press; dflt ICON_OK icon 'selector' - ditto with closing current popup editor window 'cancel' - cancel form entry on Escape press; dflt ICON_CANCEL + 'process' - displays progress bar during call; optional icon + + $atype can contain also multiply type selectors separated by space, + however make sense only combination of 'process' and one of defualt/selector/cancel */ function submit($name, $value, $echo=true, $title=false, $atype=false, $icon=false) { global $path_to_root; $aspect=''; - if (!is_bool($atype)) // necessary: switch uses '==' - switch($atype) { - case 'process': - $aspect = " aspect='process'"; break; - case 'selector': - $aspect = " aspect='selector' rel = '$value'"; - $value = _("Select"); - if ($icon===false) $icon=ICON_SUBMIT; break; - case 'default': - $aspect = " aspect='default'"; - if ($icon===false) $icon=ICON_SUBMIT; break; - case 'cancel': - $aspect = " aspect='cancel'"; - if ($icon===false) $icon=ICON_ESCAPE; break; - case null: - $aspect = fallback_mode() ? - " aspect='fallback'" : " style='display:none;'"; break; - } + if ($atype === null) { + $aspect = fallback_mode() ? " aspect='fallback'" : " style='display:none;'"; + + } elseif (!is_bool($atype)) { // necessary: switch uses '==' + + $aspect = "aspect='$atype' "; + $types = explode(' ', $atype); + foreach ($types as $type) { + switch($type) { + case 'selector': + $aspect = " aspect='selector' rel = '$value'"; + $value = _("Select"); + if ($icon===false) $icon=ICON_SUBMIT; break; + + case 'default': + if ($icon===false) $icon=ICON_SUBMIT; break; + + case 'cancel': + if ($icon===false) $icon=ICON_ESCAPE; break; + } + } + } $submit_str = "