Have you entered all opening balances using a single Journal Voucher in FA before beginning to use it? Since a balance sheet balances out, all credits = all debits, all account entries in the balance sheet can safely populate the FA database. If you are in the middle of a year, then make a dummy debiting the bank account and crediting some suspense account for the contra which will appear to be a creditor for the company unless it is directed to the true source of the monies.
4,201 04/10/2015 05:24:55 am
Re: Add Bank Balance (14 replies, posted in Banking and General Ledger)
4,202 04/10/2015 05:19:28 am
Re: Cash basis tax report - module (6 replies, posted in Reporting)
Yes, the Journal Entry is the way to go.... good catch. Data outside of the FA dataset must needs be addressed in this way.
4,203 04/10/2015 05:17:38 am
Re: Inventory Sales Report (14 replies, posted in FA Modifications)
@MarkAndrew: You're right, the stock throws the balance sheet off. The report must have a flag to include service items as well.
@joe: any closure?
4,204 04/09/2015 02:51:43 pm
Re: Bug in Excel Reports (10 replies, posted in Report Bugs here)
The attached file is what you should get for the Chart of Accounts for the demo data in en_US-demo.sql CoA.
4,205 04/09/2015 02:29:02 pm
Re: Error when trying to edit Journal Entry (4 replies, posted in Banking and General Ledger)
It is possible that you imported your customer without an entry in the debtors_master table or more likely your debtor_trans table's import did not go well.
Your SQL has been reformatted for execution in the en_US-demo CoA as Company 1:
SELECT trans.*
,ov_amount+ov_gst+ov_freight+ov_freight_tax+ov_discount AS Total
,cust.name AS DebtorName
, cust.address
, cust.curr_code
, cust.tax_id
, com.memo_
, bank_act
, bank_accounts.bank_name
, bank_accounts.bank_account_name
, bank_accounts.account_type AS BankTransType
, bank_accounts.bank_curr_code
, bank_trans.amount AS bank_amount
FROM 1_debtor_trans trans
LEFT JOIN 1_comments com ON trans.type=com.type AND trans.trans_no=com.id
LEFT JOIN 1_shippers shippers ON shippers.shipper_id=trans.ship_via
, 1_debtors_master cust
, 1_bank_trans bank_trans
, 1_bank_accounts bank_accounts
WHERE trans.trans_no='360'
AND trans.type='2'
AND trans.debtor_no=cust.debtor_no
AND bank_trans.trans_no ='360'
AND bank_trans.type=2
AND bank_trans.amount != 0
AND bank_accounts.id=bank_trans.bank_act;
The source of this SQL is in the file core/sales/includes/db/cust_trans_db.inc in function get_customer_trans($trans_id, $trans_type). The said error comes up only when $go_debug = 1 is set in config.php.
4,206 04/09/2015 02:04:20 pm
Re: Add Bank Balance (14 replies, posted in Banking and General Ledger)
When you start FA, you must enter all Opening Balances as per your balance sheet using a single Journal Voucher. Your Bank Opening Balance is part of it.
4,207 04/09/2015 02:02:10 pm
Re: Cash basis tax report - module (6 replies, posted in Reporting)
Try entering he credit note from the supplier menu.
4,208 04/09/2015 01:14:53 pm
Re: Bug in Excel Reports (10 replies, posted in Report Bugs here)
What language and fonts are you using and are they enabled in your CentOS?
Is it a browser mangling issue?
Try making the demo company print standard reports first before troubleshooting other issues.
Attached your Screenshot here.
It looks like you are using Arial font. See if your CentOS has that installed.
4,209 04/09/2015 01:11:58 pm
Re: Adding fields to the inventory module, e.g. 'Author/Artist' (5 replies, posted in Items and Inventory)
If you are in Windows, Use a text editor that is UNIX aware and UTF-8 aware like NotePad++ and set the text editor mode to UTF-8 without BOM. You will now be able to type in valid replacements for "?" characters.
4,210 04/09/2015 01:09:14 pm
Re: Editing a Bank Payment (3 replies, posted in Report Bugs here)
This is done so that partial allocation can be done across both the old and the new accounts I presume..... Dealing with GL Entries manually must be done with utmost care and understanding....you are pretty much on your own here.
4,211 04/09/2015 01:06:19 pm
Re: Editing a Journal Entry results in a duplicate entry on Tax Report (20 replies, posted in Report Bugs here)
When the Journal Inquiry is done, first the total number of records is (COUNT) queried to determine the page links (Next/Prev/Total...). If it is a GROUP BY query, and one of the GROUP BY fields is NULL, then the total number of records count returned is 0 (Operation on NULL).
The full fix is given in this Forum Post but the real fix would be when the input data is consistent with all NULLs removed by defining appropriate defaults (blank string, 0, etc) in the table structure itself.
4,212 04/09/2015 01:01:23 pm
Re: FA v2.4 development (48 replies, posted in Setup)
Changes in the FA 2.4 Unstable branch till 2015-04-08:
The error reported in the 22nd post in this thread is still present in this snapshot.
The Security Role fix has yet to be ported in from FA 2.3.
1. Removed $type in argument of function add_stock_transfer()
2. $line_item->qty from form field used instead of $increase from POST in Inventory Adjustments
3. Reorganised many SQLs to have table aliases
4. Field stock_move.person_id now no longer in rep3xx.php Inventory Reports and stock movements inquiry
5. function get_stock_movements() moved from inventory/includes/db/movement_types_db.inc to inventory/includes/inventory_db.inc
6. Removed Inventory &Movement Types Menu item from Inventory menu
7. Moved Inventory &Locations Menu link from left side to right side.
8. Removed files inventory/includes/db/movement_types_db.inc
9. Removed inventory/manage/movement_types.php
10. Removed stock_movement functions
11. item cart is now updated directly from the form field's $line_item->stock_id
Removed stock_move.person_id field
ALTER TABLE `0_stock_moves` DROP COLUMN `person_id`;
Removed 0_movement_types table
DROP TABLE IF EXISTS `0_movement_types`;
4,213 04/08/2015 11:17:37 pm
Re: Error when trying to edit Journal Entry (4 replies, posted in Banking and General Ledger)
The following is the main fix for the journal inquiry issue since we need to remove NULLs in the SQLs:
--- gl/includes/db/gl_db_trans.inc Fri Jan 16 08:56:28 1970
+++ gl/includes/db/gl_db_trans.inc Fri Jan 16 08:56:28 1970
@@ -605,14 +605,14 @@
function get_sql_for_journal_inquiry($filter, $from, $to, $ref='', $memo='', $alsoclosed=false)
{
- $sql = "SELECT IF(ISNULL(a.gl_seq),0,a.gl_seq) as gl_seq,
+ $sql = "SELECT COALESCE(a.gl_seq,0) as gl_seq,
gl.tran_date,
gl.type,
gl.type_no,
- refs.reference,
+ COALESCE(refs.reference,'') AS reference,
SUM(IF(gl.amount>0, gl.amount,0)) as amount,
- com.memo_,
- IF(ISNULL(u.user_id),'',u.user_id) as user_id
+ COALESCE(com.memo_,'') AS memo_,
+ COALESCE(u.user_id,'') as user_id
FROM ".TB_PREF."gl_trans as gl
LEFT JOIN ".TB_PREF."audit_trail as a ON
(gl.type=a.type AND gl.type_no=a.trans_no)
@@ -625,11 +625,11 @@
WHERE gl.tran_date >= '" . date2sql($from) . "'
AND gl.tran_date <= '" . date2sql($to) . "'
AND gl.amount!=0";
- if ($ref) {
- $sql .= " AND reference LIKE ". db_escape("%$ref%");
+ if (!empty($ref)) {
+ $sql .= " AND refs.reference LIKE '%". db_escape($ref) . "%'";
}
- if ($memo) {
- $sql .= " AND com.memo_ LIKE ". db_escape("%$memo%");
+ if (!empty($memo)) {
+ $sql .= " AND com.memo_ LIKE '%". db_escape($memo) . "%'";
}
if ($filter != -1) {
$sql .= " AND gl.type=".db_escape($filter);
Now we also need to tolerate NULLs in fields in GROUP BY statements which otherwise evaluate to a count of 0 records in the db_pager.inc and make sure that no negative LIMIT is part of the SELECT clause since the first value of the page is 0 and on deducting 1 for previous page will return a negative number causing the sql to end in LIMIT -10, 10:
--- includes/db_pager.inc Fri Jan 16 08:56:28 1970
+++ includes/db_pager.inc Fri Jan 16 08:56:28 1970
@@ -325,6 +325,7 @@
$page_len = $this->page_len;
$offset = ($this->curr_page - 1) * $page_len;
+ $offset = ($offset < 0 ? 0 : $offset);
$sql .= " LIMIT $offset, $page_len";
@@ -345,11 +346,19 @@
return false;
$row = db_fetch_row($result);
$this->rec_count = $row[0];
+ // 2015-04-09 apmuthu: try original sql since count = 0 if group by clause has NULLs
+ if (!$row[0] && !empty($this->group)) {
+ $sql = $this->_sql_gen(false);
+ $result = db_query($sql, 'Error reading record set');
+ if ($result == false)
+ return false;
+ $this->rec_count = db_num_rows($result);
+ }
$this->max_page = $this->page_len ?
ceil($this->rec_count/$this->page_len) : 0;
if ($go_debug) { // FIX - need column name parsing, but for now:
- // check if field names are set explicite in col def
+ // check if field names are set explicitly in col def
// for all initially ordered columns
foreach ($this->columns as $col) {
if (isset($col['ord']) && $col['ord'] != ''
4,214 04/08/2015 11:12:31 pm
Topic: FA 2.3 DB Fixes (0 replies, posted in Misc. Charts of Accounts)
FA 2.3 database fixes and notes:
1. 0_comments table has no primary key. Correct it with:
ALTER TABLE `0_comments` ADD PRIMARY KEY (`type`, `id`), DROP INDEX `type_and_id`;
2. Table field 0_gl_trans.person_id is tinyblob Nullable. In some cases it is a blank string and in others it is 0 when not a valid integer.
3. Table field 0_gl_trans.person_type_id is 1, 2, or 3 and NULL.
4,215 04/08/2015 11:09:56 pm
Re: Retaining Tax (4 replies, posted in Accounts Receivable)
Try them in tandem with Recurring Invoices.
4,216 04/08/2015 04:55:54 pm
Re: Include memo_ from gl_trans table in bank statement (7 replies, posted in Reporting)
Modify your function get_gl_trans_memo as follows:
function get_gl_trans_memo($account, $type, $trans_no)
{
$sql = "SELECT COALESCE(memo_, '') AS memo_ FROM ".TB_PREF."gl_trans WHERE account="
.db_escape($account)." AND type=".db_escape($type)
." AND type_no=".db_escape($trans_no);
$result = db_query($sql, "query for gl memo_ failed");
$row = db_fetch_row($result);
return $row[0];
}
This will help if the memo_ field is NULL.
4,217 04/08/2015 02:39:39 pm
Re: Editing a Journal Entry results in a duplicate entry on Tax Report (20 replies, posted in Report Bugs here)
The sql default for listing the Journal Vouchers is:
SELECT COUNT(DISTINCT gl.tran_date, a.gl_seq, gl.type, gl.type_no) FROM 1_gl_trans as gl
LEFT JOIN 1_audit_trail as a ON
(gl.type=a.type AND gl.type_no=a.trans_no)
LEFT JOIN 1_comments as com ON
(gl.type=com.type AND gl.type_no=com.id)
LEFT JOIN 1_refs as refs ON
(gl.type=refs.type AND gl.type_no=refs.id)
LEFT JOIN 1_users as u ON
a.user=u.id
WHERE (gl.tran_date >= '2015-03-08'
AND gl.tran_date <= '2015-04-08'
AND gl.amount!=0 AND gl.type='0');
In such display, when any element in the GROUP part of the SQL is null, the COUNT evaluates to NULL. The function sql_gen() in includes/db_pager.inc has:
return "SELECT COUNT($group) FROM $from $where";
The comments table does not have any primary key and is the current order of fields correct?
CREATE TABLE `1_comments` (
`type` int(11) NOT NULL DEFAULT '0',
`id` int(11) NOT NULL DEFAULT '0',
`date_` date DEFAULT '0000-00-00',
`memo_` tinytext,
KEY `type_and_id` (`type`,`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
4,218 04/08/2015 12:00:33 pm
Re: Editing a Journal Entry results in a duplicate entry on Tax Report (20 replies, posted in Report Bugs here)
@joe: possible updation should be tried first before insertion or there is a primary key issue that is not satisfied in the query....
4,219 04/08/2015 07:18:12 am
Re: extension installation instructions - step by step (13 replies, posted in Setup)
For those attempting to use FA on Ubuntu 14.04, replace all instances of gzopen with gzopen64 to get it working.
The following should be self-explanatory:
php -r 'var_dump(function_exists("gzfile"));'
bool(true)
php -r 'var_dump(function_exists("gzopen"));'
bool(false)
php -r 'var_dump(function_exists("gzopen64"));'
bool(true)
The following posts are useful references:
generateSitemap.php gzopen() fatal error on Ubuntu 14.04 (replace gzopen() by gzopen64())
Zlib functions (gzopen etc.) are undefined while gzopen64 etc. exist
Bug #20246 Broken with php 5.5.9
4,220 04/07/2015 05:29:49 pm
Re: FA v2.4 development (48 replies, posted in Setup)
All changes in the unstable FA 2.4 branch on and after 2015-03-31 till and including 2015-04-06 have been checked out and committed to my Unofficial GitHub Repo.
The error reported in the 22nd post in this thread is still present in this snapshot.
The Security Role fix has yet to be ported in from FA 2.3.
Here is a summary of changes:
Foreign language characters in password now allowed
0_sys_prefs.value changed from tinytext in FA 2.3 to TEXT NOT NULL default ''
demo data fiscal year and transactions moved from 2013-2014 to 2014-2015
Prices adjusted for discount directly from form field
Existing entries adjusted with:
UPDATE `0_stock_moves` SET + price = price*(1-discount_percent);
Removed fields:
stock_moves.visible,
stock_moves.discount_percent
API functions and CoAs adjusted accordingly.
Sales Kits: 3rd parameter in function update_component($kit_code, $selected_item) dropped
function get_mb_flag($stock_id) moved from includes/db/manufacturing_db.inc to includes/db/inventory_db.inc
Adjusted file includes accordingly everywhere
Renamed includes/manufacturing.inc to includes\inventory.inc
4,221 04/07/2015 02:21:30 pm
Re: Report generator (4 replies, posted in Reporting)
1. Navigate to Sales tab => Inquiries and Reports section => Customer and Sales Reports
2. Under Reports For Class: Customer, click Print Deliveries
3. In the right side form for Print as Packing Slip: choose Yes.
4,222 04/07/2015 01:53:35 pm
Re: Report generator (4 replies, posted in Reporting)
Use the standard Packing List Report (An option in Delivery Report).
View Packing List Report Screenshot in Wiki.
4,223 04/07/2015 01:42:28 pm
Re: EMail All Customers report / module in Official Git (4 replies, posted in Modules Add-on's)
1. Upload the folder in the attached zip file into the modules folder in your FA webroot.
2. Login to your default (control) company
3. Navigate to Setup => Install / Activate Extensions
4. Install the EMail Customers Extension by clicking the green install icon to the extreme right in the row.
5. Choose the Working company from the top drop down box to Activate the extension
6. Tick the checkbox to activate the extension for the said company.
7. Logout from the default (control) company
8. Login to the Working Company
9. Navigate to Sales => Inquiries and Reports => Customer and Sales Reports => EMail Customers
The Wiki has the screenshot.
4,224 04/07/2015 01:21:16 pm
Re: Bug deleting lines on journal entry and issue items to work order (3 replies, posted in Report Bugs here)
Please try with FA v2.3.24 as there are some manufacturing files that have changed.
4,225 04/07/2015 01:00:22 pm
Topic: MSIE 8.0 Ajax not working (0 replies, posted in Installation)
When was the last time (version of FA) that Ajax functionality worked in MS IE 8.0 dropdown select box populating customers, suppliers, inventory tems and Security Roles, CoA Accounts, etc?
The ExactCA.com site FA review stated that v2.3.21 worked on MS IE 8.0 - but it didn't.
Reverting changes in insert.js and utils.js if any did not provide succour.