It is "FROM" instead of "FORM" in the SQL.
5,202 03/12/2014 03:17:56 pm
Re: Cannot install new extensions—"could not open" (6 replies, posted in Modules Add-on's)
Take them from my GitHub Unofficial Repo - extension files.
5,203 03/12/2014 03:14:55 pm
Topic: gl_db sql convert where to join (2 replies, posted in Banking and General Ledger)
--- gl/includes/db/gl_db_bank_trans.inc Mon Mar 10 16:17:11 2014
+++ gl/includes/db/gl_db_bank_trans.inc Sat Jan 04 02:23:22 2014
@@ -66,17 +66,17 @@
function get_bank_trans($type, $trans_no=null, $person_type_id=null, $person_id=null)
{
$sql = "SELECT bt.*, act.*,
- IFNULL(abs(dt.ov_amount), IFNULL(ABS(st.ov_amount), bt.amount)) settled_amount,
- IFNULL(abs(dt.ov_amount/bt.amount), IFNULL(ABS(st.ov_amount/bt.amount), 1)) settle_rate,
- IFNULL(debtor.curr_code, IFNULL(supplier.curr_code, act.bank_curr_code)) settle_curr
+ IFNULL(ABS(dt.ov_amount), IFNULL(ABS(st.ov_amount), bt.amount)) AS settled_amount,
+ IFNULL(ABS(dt.ov_amount/bt.amount), IFNULL(ABS(st.ov_amount/bt.amount), 1)) AS settle_rate,
+ IFNULL(debtor.curr_code, IFNULL(supplier.curr_code, act.bank_curr_code)) AS settle_curr
FROM ".TB_PREF."bank_trans bt
- LEFT JOIN ".TB_PREF."debtor_trans dt ON dt.type=bt.type AND dt.trans_no=bt.trans_no
- LEFT JOIN ".TB_PREF."debtors_master debtor ON debtor.debtor_no = dt.debtor_no
- LEFT JOIN ".TB_PREF."supp_trans st ON st.type=bt.type AND st.trans_no=bt.trans_no
- LEFT JOIN ".TB_PREF."suppliers supplier ON supplier.supplier_id = st.supplier_id,
- ".TB_PREF."bank_accounts act
- WHERE act.id=bt.bank_act ";
+ LEFT JOIN ".TB_PREF."debtor_trans dt ON dt.type=bt.type AND dt.trans_no=bt.trans_no
+ LEFT JOIN ".TB_PREF."debtors_master debtor ON debtor.debtor_no = dt.debtor_no
+ LEFT JOIN ".TB_PREF."supp_trans st ON st.type=bt.type AND st.trans_no=bt.trans_no
+ LEFT JOIN ".TB_PREF."suppliers supplier ON supplier.supplier_id = st.supplier_id
+ LEFT JOIN ".TB_PREF."bank_accounts act ON act.id = bt.bank_act
+ WHERE 1 ";
if ($type != null)
$sql .= " AND bt.type=".db_escape($type);
if ($trans_no != null)
@@ -85,7 +85,7 @@
$sql .= " AND bt.person_type_id = ".db_escape($person_type_id);
if ($person_id != null)
$sql .= " AND bt.person_id = ".db_escape($person_id);
- $sql .= " ORDER BY trans_date, bt.id";
+ $sql .= " ORDER BY bt.trans_date, bt.id";
return db_query($sql, "query for bank transaction");
}Converting the WHERE static clause to a LEFT JOIN would be elegant. Joe, can you add this please.
5,204 03/06/2014 02:41:59 pm
Re: Cannot install new extensions—"could not open" (6 replies, posted in Modules Add-on's)
Manually install the files from the module into the modules folder and update the installed_extensions.php files in both the webroot and the company # folders.
5,205 03/06/2014 02:38:02 pm
Re: PNG Logo format not accepted (3 replies, posted in Report Bugs here)
What I was referring to was the hard coded .jpg in the said php files. PNG is handled fine otherwise.
5,206 02/27/2014 03:03:58 am
Re: Cannot install new extensions—"could not open" (6 replies, posted in Modules Add-on's)
folder permissions issue - for the tmp folder, and installed_extensions.php files in the webroot and company folders
5,207 02/27/2014 02:59:53 am
Re: Asset Module Entries don't show up on Balance Sheet (6 replies, posted in Modules Add-on's)
Check if the module needs Triggers and procedures rights for the db user.
5,208 02/27/2014 02:57:33 am
Re: DEMO with batch,expiry,mrp-FA MODIFIED (6 replies, posted in FA Modifications)
Just for FA on GitHub and then develop your module.
5,209 02/27/2014 02:53:18 am
Re: ERROR 500 - INTERNAL SERVER ERROR After installing Textcart (2 replies, posted in Modules Add-on's)
Use the v2.3.19+ latest snapshot from the official it Repo instead of the outdated v2.3.15
5,210 02/27/2014 02:49:31 am
Re: Entering a Zero Opening Balance (1 replies, posted in Accounts Receivable)
Only enter balances that are in your balance sheet (or from trial balance if in mid year). Zero balace accounts should not be entered in the opening balance voucher.
5,211 02/27/2014 02:48:11 am
Re: Take it easy, based server a problem? (1 replies, posted in Setup)
http://www.wikihow.com/Set-Up-a-Local-Domain-with-Bind-in-Windows
5,212 02/27/2014 02:38:26 am
Re: COA GAAP US 4d (1 replies, posted in Installation)
Create your CoA from scratch to suit your needs.
5,213 02/27/2014 02:15:30 am
Re: osCommerce Order and Customer Import Module (8 replies, posted in Modules Add-on's)
Please logout, clear browser cache and also purge the js files in the company folder so that they get re-created and then try again.
5,214 02/27/2014 02:13:50 am
Re: Best practice to modify reporting (2 replies, posted in Reporting)
Make a copy of the original reporting/repXXX.php and place it in your company # reporting folder and modify it there.
5,215 02/27/2014 02:12:36 am
Re: Form letter header (1 replies, posted in Setup)
Search for the word "Dear" in reporting/includes/pdf_report.inc and it's translations in the various compiled language files.
5,216 02/27/2014 02:02:33 am
Re: MySQL OR MySQLi Transaction (9 replies, posted in Wish List)
Please be clear on what checks you want before a commit is envisaged:
Each insert must be successful - define what you mean by successful:
- whether the record was inserted or
- whether it already exists and did not need the insert or
- that the insert values were not acceptable for other reasons like field type and size checks.
Similarly about the definition of the UPDATE sql being successful:
- was the update successful in general
- was the update unnecessary as the record was already in the updated state
- was the update not acceptable at all for reasons like field type and size check failure.
5,217 02/13/2014 02:49:08 pm
Re: Feature suggestion (5 replies, posted in Wish List)
Fork the FA project (or my not frequently updated GitHub Repo for the extensions) and then provide your modules. FA is basically developed on Mercurial and the Git repo is only a mirror and my unofficial GitHub repo is meant only for extension development as it may not be otherwise uptodate and will get updated only when I get time.
5,218 02/13/2014 02:34:57 pm
Re: MySQL OR MySQLi Transaction (9 replies, posted in Wish List)
Check out these links to prove that the UPDATE query check is not functioning as needed:
http://stackoverflow.com/questions/14908087/should-mysqli-update-queries-return-a-result
http://stackoverflow.com/questions/12990164/how-to-check-if-an-update-mysqli-query-is-correctly-executed
http://stackoverflow.com/questions/12744953/mysqli-returns-true-for-insert-query-row-not-inserted
UPDATE will return 0 rows affected if the changed state already exists and the mysql_query function will still return true. Hence remove the UPDATE check in the if statement.
5,219 02/12/2014 05:57:01 am
Re: Tracking Item Inventory at Purchase Price Level (4 replies, posted in Items and Inventory)
Has the first question by @padma been answered anywhere?
5,220 02/12/2014 05:55:56 am
Re: I want to create Chart Of Accounts for Morocco (6 replies, posted in Misc. Charts of Accounts)
The CoA link is no longer available.
5,221 02/12/2014 05:54:23 am
Re: Item and Inventory (8 replies, posted in Items and Inventory)
Make 3 separate FA installs in the same machine and create editable 1:1 views from a common db into each FA instance's db for those tables that need to be the same across all all FAs.
5,222 02/12/2014 05:50:59 am
Re: How Cart is managed in Sales Order Entry form (3 replies, posted in Items and Inventory)
Keep all your columns in your excel sheet but hide them and export the rest to import into FA. Make sure to include the hidden columns details in the description.
abc - 2x3x1
5,223 02/12/2014 05:49:06 am
Re: Change text on documents / Bulk uploads (1 replies, posted in Setup)
change translation file or hardcode the text at each version change.....
5,224 02/12/2014 05:44:35 am
Re: Change text on documents / Bulk uploads (1 replies, posted in Reporting)
Textcart Extension?
5,225 02/12/2014 05:40:58 am
Re: osCommerce Order and Customer Import Module (8 replies, posted in Modules Add-on's)
Roles permissions must be enabled for the user
