------------
This is a changelog for FrontAccounting All releases.
+<<<<<<< local
2012-09-09 08:07 +0200 Janusz Dobrowolski
(3033) Security cleanup on 'where' parameter in a couple of list helpers
includes/ui/ui_lists.inc
+=======
+2012-11-15 16:45 +0100 Joe Hunt
+(3104) Updated update.html
+ update.html
+>>>>>>> other
+<<<<<<< local
2012-06-25 12:56 +0200 Janusz Dobrowolski
(3032) Switching database to UTF8 encoding on upgrade to FA 2.4.
admin/db/maintenance_db.inc
admin/inst_upgrade.php
doc/api_changes.txt
+=======
+2012-11-15 16:38 +0100 Joe Hunt
+(3103) Rollback of Session Abondoned Error and new variable, $no_check_edit_conflicts in config.php.
+ config.default.php
+ includes/session.inc
+ sales/includes/sales_ui.inc
+
+2012-11-15 15:23 +0100 Joe Hunt
+(3102) New Changelog.txt
+ CHANGELOG.txt
+
+2012-11-15 15:18 +0100 Joe Hunt
+(3101) Release 2.3.13
+ version.php
+
+2012-11-15 15:18 +0100 Joe Hunt
+(3100) Fixed session abandoned error in Windows Servers
+ includes/session.inc
+
+2012-11-12 13:09 +0100 Janusz Dobrowolski
+(3099) Prevent 'Page expired' messages when 'Back' link is used after login.
+ includes/session.inc
+
+2012-11-12 09:52 +0100 Janusz Dobrowolski
+(3098) Cleanup in curent_user.inc/session.inc
+>>>>>>> other
includes/current_user.inc
+<<<<<<< local
includes/db/connect_db.inc
includes/lang/language.php
+=======
+>>>>>>> other
includes/session.inc
+<<<<<<< local
sql/alter2.4.php
+=======
+
+2012-11-12 09:39 +0100 Janusz Dobrowolski
+(3097) Fixed small bug in mail class, added text/hmtl mime type.
+ includes/ui/view_package.php
+ reporting/includes/class.mail.inc
+
+2012-11-10 00:29 +0100 Joe Hunt
+(3096) Dimensions not utilized in Direct Invoice/Delivery
+ sales/includes/cart_class.inc
+
+2012-11-09 09:58 +0100 Joe Hunt
+(3095) Sales quotation and Sales order should not require sufficient stock.
+ sales/includes/ui/sales_order_ui.inc
+
+2012-11-05 23:33 +0100 Janusz Dobrowolski
+(3094) Fixed confirmation on ajax reloaded buttons (small fix for Gecko like browsers).
+ js/utils.js
+
+2012-11-05 17:49 +0100 Janusz Dobrowolski
+(3093) 0001879,0001880: Fixes in htaccess constraints, restricting System Diagnostic view to admin (ApMuthu)
+ .htaccess
+ applications/setup.php
+
+2012-11-05 08:30 +0100 Janusz Dobrowolski
+(3092) Fixed error messages on Sales Groups, updated gettext template.
+ lang/new_language_template/LC_MESSAGES/empty.po
+ sales/manage/sales_groups.php
+
+2012-11-03 22:46 +0100 Janusz Dobrowolski
+(3091) Improved error checking during extension packages installation.
+ includes/packages.inc
+ includes/remote_url.inc
+
+2012-11-03 22:34 +0100 Janusz Dobrowolski
+(3090) Fixed error message in recurrent invoices.
+ sales/manage/recurrent_invoices.php
+
+2012-11-01 01:02 +0100 Joe Hunt
+(3089) Replaced the transaction list in attachments with a pager and made the sorting descent.
+ admin/attachments.php
+ admin/db/attachments_db.inc
+
+2012-10-31 08:56 +0100 Joe Hunt
+(3088) Filter for non-zero values in Bank Statement Report
+ reporting/rep601.php
+ reporting/reports_main.php
+
+2012-10-28 07:30 +0100 Joe Hunt
+(3087) Removed commented deprecated Session_register().
+ includes/page/header.inc
+ inventory/adjustments.php
+ inventory/transfers.php
+ manufacturing/work_order_issue.php
+ purchasing/allocations/supplier_allocate.php
+ sales/allocations/customer_allocate.php
+
+2012-10-17 09:17 +0200 Joe Hunt
+(3086) Db error in invoice.ui.inc for certain MySql setup/releases.
+ purchasing/includes/ui/invoice_ui.inc
+
+2012-10-17 09:00 +0200 Joe Hunt
+(3085) Db error in po_entry_items.php was already fixed. Look at the line below.
+ purchasing/po_entry_items.php
+
+2012-10-16 17:00 +0200 Joe Hunt
+(3083) Cannot insert a supplier transaction record in Direct Supplier Invoice (certain MySql versions and setup).
+ purchasing/po_entry_items.php
+
+2012-10-11 15:18 +0200 Joe Hunt
+(3082) Date format helper complete.
+ js/inserts.js
+
+2012-10-11 15:09 +0200 Joe Hunt
+(3081) Purchase order/Direct GRN/Direct Invoice showed inactive items in item list.
+ purchasing/includes/ui/po_ui.inc
+
+2012-10-11 08:35 +0200 Joe Hunt
+(3080) Small fix and rerun of inserts.js.
+ js/inserts.js
+
+2012-10-11 08:18 +0200 Joe Hunt
+(3078) Fixed date_fix to act like before. day and day-month entrance only.
+ js/inserts.js
+
+2012-10-05 11:17 +0200 Joe Hunt
+(3076) Bug in function is_date when implementing new date formats.
+ includes/date_functions.inc
+
+2012-10-04 10:18 +0200 Joe Hunt
+(3075) Moved declaration of short monthnames from config.default.php. Too early for translations.
+ config.default.php
+ includes/sysnames.inc
+
+2012-10-04 00:58 +0200 Joe Hunt
+(3074) Minor improvement to add_days/months/years for the new dateformats.
+ includes/date_functions.inc
+
+2012-10-02 22:50 +0200 Joe Hunt
+(3073) 0001806: Date problems fixed and new date formats MmmDDYYYY, DDMmmYYYY and YYYYMmmDD implemented.
+ admin/display_prefs.php
+ config.default.php
+ includes/date_functions.inc
+ includes/prefs/userprefs.inc
+ includes/ui/ui_input.inc
+ includes/ui/ui_view.inc
+ js/inserts.js
+
+2012-10-02 13:22 +0200 Janusz Dobrowolski
+(3071) Fixed void_stock_move() to avoid sparse lines in Inventory Items Movements register after DN edition.
+ includes/db/inventory_db.inc
+
+2012-10-02 09:42 +0200 Joe Hunt
+(3070) Having memo or comment displayed on bank_inquiry.php.
+ gl/inquiry/bank_inquiry.php
+
+2012-10-01 01:12 +0200 Joe Hunt
+(3069) Improved headers in printing Purchase Orders.
+ reporting/includes/doctext.inc
+ reporting/includes/pdf_report.inc
+ reporting/rep209.php
+
+2012-09-25 18:06 +0200 Joe Hunt
+(3068) Moved access functions from renderer to current_user. They were cluttered into all themes.
+ includes/current_user.inc
+ themes/aqua/renderer.php
+ themes/cool/renderer.php
+ themes/default/renderer.php
+
+2012-09-23 17:56 +0200 Janusz Dobrowolski
+(3067) Invalid input description in account groups for account class parameter.
+ gl/manage/gl_account_types.php
+
+2012-09-17 13:25 +0200 Janusz Dobrowolski
+(3066) Cleanup in check_faillog().
+ includes/session.inc
+
+2012-09-23 09:23 +0200 Joe Hunt
+(3065) 0001792: BLOOMBERG added to Exchange Rate Providers and config fix, improvement
+ gl/includes/db/gl_db_rates.inc
+
+2012-09-22 10:31 +0200 Joe Hunt
+(3064) 0001792: BLOOMBERG added to Exchange Rate Providers and config fix.
+ config.default.php
+ gl/includes/db/gl_db_rates.inc
+ gl/manage/exchange_rates.php
+ lang/new_language_template/LC_MESSAGES/empty.po
+
+2012-09-15 10:34 +0200 Janusz Dobrowolski
+(3061) Added tag version_2_3_12 for changeset 05b037ff3c0b
+ .hgtags
+
+2012-09-15 10:09 +0200 Joe Hunt
+(3060) Changelog.txt
+ CHANGELOG.txt
+
+2012-09-15 10:07 +0200 Joe Hunt
+(3059) Changelog.txt
+ CHANGELOG.txt
+
+2012-09-15 10:04 +0200 Joe Hunt
+(3058) Release 2.3.12
+ update.html
+>>>>>>> other
version.php
2012-06-22 16:05 +0200 Janusz Dobrowolski
$path_to_root="..";
$page_security = 'SA_ATTACHDOCUMENT';
+include_once($path_to_root . "/includes/db_pager.inc");
include_once($path_to_root . "/includes/session.inc");
include_once($path_to_root . "/includes/date_functions.inc");
}
+function trans_view($trans)
+{
+ return get_trans_view_str($trans["type_no"], $trans["trans_no"]);
+}
+
+function edit_link($row)
+{
+ return button('Edit'.$row["id"], _("Edit"), _("Edit"), ICON_EDIT);
+}
+
+function view_link($row)
+{
+ return button('view'.$row["id"], _("View"), _("View"), ICON_VIEW);
+}
+
+function download_link($row)
+{
+ return button('download'.$row["id"], _("Download"), _("Download"), ICON_DOWN);
+}
+
+function delete_link($row)
+{
+ return button('Delete'.$row["id"], _("Delete"), _("Delete"), ICON_DELETE);
+}
+
function display_rows($type)
{
- $rows = get_attached_documents($type);
- $th = array(_("#"), _("Description"), _("Filename"), _("Size"), _("Filetype"), _("Date Uploaded"), "", "", "", "");
-
- start_table(TABLESTYLE);
- table_header($th);
- $k = 0;
- while ($row = db_fetch($rows))
- {
- alt_table_row_color($k);
-
- label_cell(get_trans_view_str($type, $row['trans_no']));
- label_cell($row['description']);
- label_cell($row['filename']);
- label_cell($row['filesize']);
- label_cell($row['filetype']);
- label_cell(sql2date($row['tran_date']));
- edit_button_cell("Edit".$row['id'], _("Edit"));
- button_cell("view".$row['id'], _("View"), false, ICON_VIEW);
- button_cell("download".$row['id'], _("Download"), false, ICON_DOWN);
- delete_button_cell("Delete".$row['id'], _("Delete"));
- end_row();
- }
- end_table(1);
+ $sql = get_sql_for_attached_documents($type);
+ $cols = array(
+ _("#") => array('fun'=>'trans_view', 'ord'=>''),
+ _("Description") => array('name'=>'description'),
+ _("Filename") => array('name'=>'filename'),
+ _("Size") => array('name'=>'filesize'),
+ _("Filetype") => array('name'=>'filetype'),
+ _("Date Uploaded") => array('name'=>'tran_date', 'type'=>'date'),
+ array('insert'=>true, 'fun'=>'edit_link'),
+ array('insert'=>true, 'fun'=>'view_link'),
+ array('insert'=>true, 'fun'=>'download_link'),
+ array('insert'=>true, 'fun'=>'delete_link')
+ );
+ $table =& new_db_pager('trans_tbl', $sql, $cols);
+
+ $table->width = "60%";
+
+ display_db_pager($table);
}
//----------------------------------------------------------------------------------------
display_rows($_POST['filterType']);
+br(2);
start_table(TABLESTYLE2);
return $myrow['id'];
}
+function get_sql_for_attached_documents($type)
+{
+ return "SELECT trans_no, description, filename, filesize, filetype, tran_date, id, type_no FROM ".TB_PREF."attachments WHERE type_no=".db_escape($type)
+ ." ORDER BY trans_no DESC";
+}
+
?>
\ No newline at end of file
$this->add_lapp_function(2, _("&Attach Documents"),
"admin/attachments.php?filterType=20", 'SA_ATTACHDOCUMENT', MENU_MAINTENANCE);
$this->add_lapp_function(2, _("System &Diagnostics"),
- "admin/system_diagnostics.php?", 'SA_OPEN', MENU_SYSTEM);
+ "admin/system_diagnostics.php?", 'SA_SOFTWAREUPGRADE', MENU_SYSTEM);
$this->add_rapp_function(2, _("&Backup and Restore"),
"admin/backups.php?", 'SA_BACKUP', MENU_SYSTEM);
$power_by = "FrontAccounting";
$power_url = "http://frontaccounting.com";
+ /* No check on edit conflicts. Maybe needed to be set to 1 in certains Windows Servers */
+ $no_check_edit_conflicts = 0;
+
/* Do not print zero lines amount of 0.00 in Sales Documents if service item. 1 = do not */
$no_zero_lines_amount = 1;
function login($company, $loginname, $password)
{
- global $security_areas, $security_groups, $security_headings, $path_to_root, $dflt_lang;
+ global $security_areas, $security_groups, $security_headings, $path_to_root, $dflt_lang, $login_delay;
$this->set_company($company);
$this->logged = false;
if (!isset($Auth_Result)) // if not used: standard method
$Auth_Result = get_user_auth($loginname, md5($password));
- write_login_filelog($loginname, $Auth_Result);
+ if ($login_delay > 0)
+ write_login_filelog($loginname, $Auth_Result);
if ($Auth_Result)
{
define('PKG_CACHE_PATH', $path_to_root.'/modules/_cache');
define('PUBKEY_PATH', $path_to_root);
-define('REPO_URL', 'http://'.$repo_auth['login'].':'.$repo_auth['pass'].'@'.$repo_auth['host'].'/'.$repo_auth['branch']);
//
// FrontAccounting package class
//
global $path_to_root, $repo_auth;
+ $repo = (isset($repo_auth['scheme']) ? $repo_auth['scheme'] : 'http://')
+ .(isset($repo_auth['login']) ? $repo_auth['login'].':' : '')
+ .(isset($repo_auth['pass']) ? $repo_auth['pass'].'@' : '')
+ .(isset($repo_auth['host']) ? $repo_auth['host'].'/' : '')
+ .(isset($repo_auth['path']) ? $repo_auth['path'].'/' : '')
+ .$repo_auth['branch'];
+
// first download local copy of repo release file
// and check remote signature with local copy of public key
//
$loclist = PKG_CACHE_PATH.'/Release.gz';
-
+ $target_dir = $download==true ? "$path_to_root/tmp/" : $download;
+
if (isset($type) && !is_array($type)) {
$type = array($type);
}
$refresh = true;
do{
if (!file_exists($loclist)) {
- url_copy(REPO_URL.'/Release.gz', $loclist);
+ if (!url_copy($repo.'/Release.gz', $loclist))
+ {
+ display_error(_("Cannot download repo index file." ));
+ return null;
+ }
$refresh = false;
}
- $sig = url_get_contents(REPO_URL.'/Release.sig');
+ $sig = url_get_contents($repo.'/Release.sig');
$data = file_get_contents($loclist);
$cert = file_get_contents(PUBKEY_PATH.'/FA.pem');
if (openssl_verify($data, $sig, $cert) <= 0) {
if ($Release[$fname]['Version'] != $repo_auth['branch']) {
display_warning(_('Repository version does not match application version.')); // ?
}
- $remoteindex = REPO_URL.'/'.$fname;
+ $remoteindex = $repo.'/'.$fname;
$locindex = PKG_CACHE_PATH.'/'.$fname;
$refresh = true;
do{
if (!file_exists($locindex)) {
- url_copy($remoteindex, $locindex);
+ if (!url_copy($remoteindex, $locindex)) {
+ display_error(sprintf(_("Cannot download '%s' file." ), $fname));
+ return null;
+ }
$refresh = false;
}
if ($parms['SHA1sum'] != sha1_file($locindex)) { // check subdir index consistency
// scan subdir list and select packages of given type
$pkglist = get_control_file($locindex, 'Package');
foreach($pkglist as $name => $pkg) {
- $pkgfullname = REPO_URL.'/'.$parms['Path']."/".$pkg['Filename'].'.pkg';
+ $pkgfullname = $repo.'/'.$parms['Path']."/".$pkg['Filename'].'.pkg';
if (!isset($type) || in_array($pkg['Type'], $type)) {
if (empty($filter))
$p = $pkg;
} elseif ($pkgname == $pkg['Package']) {
//download package to temp directory
if ($download) {
- $locname = "$path_to_root/tmp/".$pkg['Filename'].'.pkg';
- url_copy($pkgfullname, $locname);
+ $locname = $target_dir.$pkg['Filename'].'.pkg';
+ if (!url_copy($pkgfullname, $locname)) {
+ display_error(sprintf(_("Cannot download '%s' file." ), $pkgfullname));
+ return null;
+ }
// checking sha1 hash is expensive proces, so chekc the package
// consistency just before downloading
if ($pkg['SHA1sum'] != sha1_file($locname)) {
{
$no_menu = false;
}
- //if (!isset($_SESSION["sel_app"]))
- // session_register("sel_app");
if (isset($_SESSION["App"]) && is_object($_SESSION["App"]) && isset($_SESSION["App"]->selected_application) &&
$_SESSION["App"]->selected_application != "")
$sel_app = $_SESSION["App"]->selected_application;
// get the host name and url path
$parsedUrl = parse_url($url);
+ if (@$parsedUrl['scheme'] == 'file')
+ return file_get_contents($parsedUrl['path']);
+
$host = $parsedUrl['host'];
if (isset($parsedUrl['path'])) {
function url_copy($from, $to, $timeout=10)
{
$f = fopen($to, 'wb');
- fwrite($f, url_get_contents($from, $timeout));
+ if (!$f || !fwrite($f, url_get_contents($from, $timeout)))
+ return false;
fclose($f);
+ return true;
}
// Create new session without destroying the old one
session_regenerate_id();
-
// Grab current session ID and close both sessions to allow other scripts to use them
$newSession = session_id();
session_write_close();
kill_login();
die();
}
-//----------------------------------------------------------------------------------------
-// set to reasonable values if not set in config file (pre-2.3.12 installations)
-
-if (!isset($login_delay))
-{
- $login_delay = 10;
- $login_max_attempts = 3;
-}
function check_faillog()
{
$path_to_root = ".";
}
+//----------------------------------------------------------------------------------------
+// set to reasonable values if not set in config file (pre-2.3.12 installations)
+
+if ((!isset($login_delay)) || ($login_delay < 0))
+ $login_delay = 10;
+
+if ((!isset($login_max_attempts)) || ($login_max_attempts < 0))
+ $login_max_attempts = 3;
+
+
// Prevent register_globals vulnerability
if (isset($_GET['path_to_root']) || isset($_POST['path_to_root']))
die("Restricted access");
include_once($path_to_root . "/admin/db/security_db.inc");
include_once($path_to_root . "/includes/lang/language.php");
include_once($path_to_root . "/config_db.php");
-@include_once($path_to_root . "/faillog.php");
include_once($path_to_root . "/includes/ajax.inc");
include_once($path_to_root . "/includes/ui/ui_msgs.inc");
include_once($path_to_root . "/includes/prefs/sysprefs.inc");
// ini_set('session.save_path', dirname(__FILE__).'/../tmp/');
ini_set('session.gc_maxlifetime', 36000); // 10hrs
+ini_set('session.cache_limiter', 'private'); // prevent 'page expired' errors
hook_session_start(@$_POST["company_login_name"]);
include_once($path_to_root . "/config.php");
get_text_init();
+if ($login_delay > 0)
+ @include_once($path_to_root . "/faillog.php");
+
// Page Initialisation
if (!isset($_SESSION['wa_current_user']) || !$_SESSION['wa_current_user']->logged_in()
|| !isset($_SESSION['language']) || !method_exists($_SESSION['language'], 'set_language'))
<?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");
unset ($_SESSION['adj_items']);
}
- //session_register("adj_items");
-
$_SESSION['adj_items'] = new items_cart(ST_INVADJUST);
$_POST['AdjDate'] = new_doc_date();
if (!is_date_in_fiscalyear($_POST['AdjDate']))
unset ($_SESSION['transfer_items']);
}
- //session_register("transfer_items");
-
$_SESSION['transfer_items'] = new items_cart(ST_LOCTRANSFER);
$_POST['AdjDate'] = new_doc_date();
if (!is_date_in_fiscalyear($_POST['AdjDate']))
var dat = last.split(user.datesep);
var cur = date.split(user.datesep);
var day, month, year;
- var day1, month1, year1;
// TODO: user.date as default?
// TODO: user.datesys
if (user.datefmt == 0 || user.datefmt == 3) // set defaults
{
day = dat[1]; month = dat[0]; year = dat[2];
- day1 = cur[1]; month1 = cur[0]; year1 = cur[2];
} else if (user.datefmt == 1 || user.datefmt == 4){
day = dat[0]; month = dat[1]; year = dat[2];
- day1 = cur[0]; month1 = cur[1]; year1 = cur[2];
} else {
day = dat[2]; month = dat[1]; year = dat[0];
- day1 = cur[2]; month1 = cur[1]; year1 = cur[0];
+ }
+ if (cur[1] != undefined && cur[1] != "") // day or month entered, could be string 3
+ {
+ if (user.datefmt == 0 || user.datefmt == 3 || ((user.datefmt == 2 || user.datefmt == 5) && (cur[2] == undefined || cur[2] == "")))
+ day = cur[1];
+ else
+ month = cur[1];
+ }
+ if (cur[0] != undefined && cur[0] != "") // day or month entered. could be string 3
+ {
+ if (cur[1] == undefined || cur[1] == "")
+ day = cur[0];
+ else if (user.datefmt == 0 || user.datefmt == 3 || ((user.datefmt == 2 || user.datefmt == 5) && (cur[2] == undefined || cur[2] == "")))
+ month = cur[0];
+ else if (user.datefmt == 2 || user.datefmt == 5)
+ year = cur[0];
+ else
+ day = cur[0];
+ }
+ if (cur[2] != undefined && cur[2] != "") // year,
+ {
+ if (user.datefmt == 2 || user.datefmt == 5)
+ day = cur[2];
+ else
+ year = cur[2];
+ }
+ if (user.datefmt<3) {
+ if (day<10) day = '0'+parseInt(day, 10);
+ if (month<10) month = '0'+parseInt(month, 10);
}
- if (day1 != undefined && day1 != "") // day entered
- day = day1;
- if (month1 != undefined && month1 != "") // month entered
- month = month1;
- if (year1 != undefined && year1 != "") // year entered
- year = year1;
- if (user.datefmt<3 && day<10) day = '0'+parseInt(day, 10);
- if (user.datefmt<3 && month<10) month = '0'+parseInt(month, 10);
if (year<100) year = year<60 ? (2000+parseInt(year,10)) : (1900+parseInt(year,10));
// console.info(day,month,year)
} else if(cmd=='fc') { // set focus
_focus = data;
} else if(cmd=='js') { // evaluate js code
- setTimeout(function(){eval(data)}, 200); // timeout required by IE7/8
+ __isGecko ? eval(data) : setTimeout(function(){eval(data)}, 200); // timeout required by IE7/8
} else if(cmd=='rd') { // client-side redirection
window.location = data;
} else if(cmd=='pu') { // pop-up
return t;
}
-var __isFireFox = navigator.userAgent.match(/gecko/i);
+var __isGecko = navigator.userAgent.match(/gecko/i); // i.e. Gecko or KHTML, like Gecko ;)
//returns the absolute position of some element within document
function element_pos(e) {
var res = new Object();
res.y -= offsetParent.scrollTop;
}
//next lines are necessary to support FireFox problem with offsetParent
- if (__isFireFox) {
+ if (__isGecko) {
while (offsetParent != parentNode && parentNode !== null) {
res.x -= parentNode.scrollLeft;
res.y -= parentNode.scrollTop;
unset($_SESSION['alloc']->allocs);
unset($_SESSION['alloc']);
}
- //session_register("alloc");
}
//--------------------------------------------------------------------------------
if (isset($_POST['tax_algorithm']))
$supp_trans->tax_algorithm = $_POST['tax_algorithm'];
- $supp_trans->ov_amount = 0; /* for starters */
+ $supp_trans->ov_amount = $supp_trans->ov_discount = 0; /* for starters */
if (count($supp_trans->grn_items) > 0)
{
foreach ( $supp_trans->grn_items as $grn)
{
$this->body = "--$this->boundary\n";
$this->body .= "Content-Type: text/plain; charset=\"{$this->charset}\"\n";
- $this->body .= "Content-Transfer-Encoding: 8bit\n";
+ $this->body .= "Content-Transfer-Encoding: 8bit\n\n";
$this->body .= $text."\n";
}
{
$this->body = "--$this->boundary\n";
$this->body .= "Content-Type: text/html; charset=\"{$this->charset}\"\n";
- $this->body .= "Content-Transfer-Encoding: quoted-printable\n";
+ $this->body .= "Content-Transfer-Encoding: quoted-printable\n\n";
$this->body .= "<html><body>\n".$html."\n</body></html>\n";
}
if ($filename == $file . '.tgz') return 'application/x-tar-gz';
$file = basename($filename, '.gz');
if ($filename == $file . '.gz') return 'application/x-gzip';
+ $file = basename($filename, '.html');
+ if ($filename == $file . '.html') return 'text/html';
return 'application/unknown';
}
$acc = $_POST['PARAM_0'];
$from = $_POST['PARAM_1'];
$to = $_POST['PARAM_2'];
- $comments = $_POST['PARAM_3'];
- $destination = $_POST['PARAM_4'];
+ $zero = $_POST['PARAM_3'];
+ $comments = $_POST['PARAM_4'];
+ $destination = $_POST['PARAM_5'];
if ($destination)
include_once($path_to_root . "/reporting/includes/excel_report.inc");
else
while ($myrow=db_fetch($trans))
{
+ if ($zero == 0 && $myrow['amount'] == 0.0)
+ continue;
$total += $myrow['amount'];
$rep->TextCol(0, 1, $systypes_array[$myrow["type"]]);
array( _('Bank Accounts') => 'BANK_ACCOUNTS',
_('Start Date') => 'DATEBEGINM',
_('End Date') => 'DATEENDM',
+ _('Zero values') => 'YES_NO',
_('Comments') => 'TEXTBOX',
_('Destination') => 'DESTINATION'));
unset($_SESSION['alloc']->allocs);
unset($_SESSION['alloc']);
}
- //session_register('alloc');
}
//--------------------------------------------------------------------------------
$ref = $this->reference;
$date = $this->document_date;
$due_date = $this->due_date;
+ $dimension_id = $this->dimension_id;
+ $dimension2_id = $this->dimension2_id;
$this->trans_type = get_parent_type($this->trans_type);
$this->reference = 'auto';
$this->document_date = $date;
$this->reference = $ref;
$this->due_date = $due_date;
+ $this->dimension_id = $dimension_id;
+ $this->dimension2_id = $dimension2_id;
}
$this->reference = @html_entity_decode($this->reference, ENT_QUOTES);
$this->Comments = @html_entity_decode($this->Comments, ENT_QUOTES);
*/
function check_edit_conflicts($cartname='Items')
{
- global $Ajax;
+ global $Ajax, $no_check_edit_conflicts;
- if (get_post('cart_id') && $_POST['cart_id'] != $_SESSION[$cartname]->cart_id) {
+ if ((!isset($no_check_edit_conflicts) || $no_check_edit_conflicts==0) && get_post('cart_id') && $_POST['cart_id'] != $_SESSION[$cartname]->cart_id) {
display_error(_('This edit session has been abandoned by opening sales document in another browser tab. You cannot edit more than one sales document at once.'));
$Ajax->activate('_page_body');
display_footer_exit();
$qoh_msg = '';
if (!$editable_items || $id != $line_no)
{
- if (!$SysPrefs->allow_negative_stock() && is_inventory_item($stock_item->stock_id)) {
+ if (!$SysPrefs->allow_negative_stock() && is_inventory_item($stock_item->stock_id) &&
+ $order->trans_type != ST_SALESORDER && $order->trans_type!=ST_SALESQUOTE) {
$qoh = get_qoh_on_date($stock_item->stock_id,
$_POST['Location'], $_POST['delivery_date']);
if (($stock_item->qty_dispatched -$stock_item->qty_done) > $qoh)
if (strlen($_POST['description']) == 0)
{
$input_error = 1;
- display_error(_("The area description cannot be empty."));
+ display_error(_("The invoice description cannot be empty."));
set_focus('description');
}
if (!is_date($_POST['begin'])) {
if (strlen($_POST['description']) == 0)
{
$input_error = 1;
- display_error(_("The area description cannot be empty."));
+ display_error(_("The sales group description cannot be empty."));
set_focus('description');
}
{
delete_sales_group($selected_id);
display_notification(_('Selected sales group has been deleted'));
- } //end if Delete area
+ } //end if Delete group
$Mode = 'RESET';
}
if ($selected_id != -1)
{
if ($Mode == 'Edit') {
- //editing an existing area
+ //editing an existing group
$myrow = get_sales_group($selected_id);
$_POST['description'] = $myrow["description"];
<meta name="CHANGED" content="20100902;19041400"></head>\r
<body dir="ltr" lang="en-US">\r
<h4><strong><font color="#cc6600"><font style="font-size: 20pt;" size="5"><i>Front</i></font></font></strong><strong><font style="font-size: 20pt;" size="5">Accounting\r
-Update</font></strong></h4><h2>Important Notes for release 2.3.12.</h2><h4>New global flags in config.php (config-default.php):</h4>/* <br> Display a dropdown select box for choosing Company to login if false.<br> Show a blank editbox only if true where the Company NickName<br> will have to be manually entered. This is when privacy is needed.<br>*/<br> <span style="font-weight: bold;">$text_company_selection</span> = false;<br><br>/* Should FA hide menu items (Applications, Modules, and Actions) from the user if they don't have access to them? <br> 0 for no 1 for yes<br>*/<br><br> <span style="font-weight: bold;">$hide_inaccessible_menu_items</span> = 0;<br><br>/*<br> Brute force prevention.<br> $login_delay seconds delay is required between login attempts after $login_max_attemps failed logins.<br> Set $login_delay to 0 to disable the feature (not recommended)<br>*/<br> <span style="font-weight: bold;">$login_delay</span> = 30;<br> <span style="font-weight: bold;">$login_max_attempts</span> = 10;<h2><strong></strong>Important Notes for release 2.3.5.</h2>\r
+Update</font></strong></h4><h2>Important Notes for release 2.3.13.</h2><h4>New global flags in config.php (config-default.php):</h4>/* No check on edit conflicts. Maybe needed to be set to 1 in certains Windows Servers */<br> <span style="font-weight: bold;">$no_check_edit_conflicts = 0;</span><br><h2>Important Notes for release 2.3.12.</h2><h4>New global flags in config.php (config-default.php):</h4>/* <br> Display a dropdown select box for choosing Company to login if false.<br> Show a blank editbox only if true where the Company NickName<br> will have to be manually entered. This is when privacy is needed.<br>*/<br> <span style="font-weight: bold;">$text_company_selection</span> = false;<br><br>/* Should FA hide menu items (Applications, Modules, and Actions) from the user if they don't have access to them? <br> 0 for no 1 for yes<br>*/<br><br> <span style="font-weight: bold;">$hide_inaccessible_menu_items</span> = 0;<br><br>/*<br> Brute force prevention.<br> $login_delay seconds delay is required between login attempts after $login_max_attemps failed logins.<br> Set $login_delay to 0 to disable the feature (not recommended)<br>*/<br> <span style="font-weight: bold;">$login_delay</span> = 30;<br> <span style="font-weight: bold;">$login_max_attempts</span> = 10;<h2><strong></strong>Important Notes for release 2.3.5.</h2>\r
Change in the behaviour of <span style="font-weight: bold; font-style: italic;">Recurrent Invoices</span>.<br><ul><li>Now\r
the Last Sent day is stamped with the former Last Sent (or Begin date\r
the first time) + months + days. Before the Last Sent day was stamped\r