summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authoreinhverfr <einhverfr@4979c152-3d1c-0410-bac9-87ea11338e46>2008-02-16 21:44:17 +0000
committereinhverfr <einhverfr@4979c152-3d1c-0410-bac9-87ea11338e46>2008-02-16 21:44:17 +0000
commit363aabc827c18a389b1fc54f4c4d42bbf5130d61 (patch)
treed1c2199617c04559f0e385f66505338afac595d3
parent60efea9ce065418e38761923bc88a018861a3ebd (diff)
Correcting all known casting issues relating to Pg 8.3
git-svn-id: https://ledger-smb.svn.sourceforge.net/svnroot/ledger-smb/trunk@2070 4979c152-3d1c-0410-bac9-87ea11338e46
-rw-r--r--LedgerSMB/IC.pm6
-rw-r--r--LedgerSMB/IR.pm20
-rw-r--r--LedgerSMB/RC.pm4
3 files changed, 15 insertions, 15 deletions
diff --git a/LedgerSMB/IC.pm b/LedgerSMB/IC.pm
index f20cabf0..9371229d 100644
--- a/LedgerSMB/IC.pm
+++ b/LedgerSMB/IC.pm
@@ -1904,11 +1904,11 @@ sub create_links {
c3.accno AS expense_accno,
c3.description AS expense_description
FROM chart c1, chart c2, chart c3
- WHERE c1.id IN (SELECT value FROM defaults
+ WHERE c1.id IN (SELECT value::int FROM defaults
WHERE setting_key = 'inventory_accno_id')
- AND c2.id IN (SELECT value FROM defaults
+ AND c2.id IN (SELECT value::int FROM defaults
WHERE setting_key = 'income_accno_id')
- AND c3.id IN (SELECT value FROM defaults
+ AND c3.id IN (SELECT value::int FROM defaults
WHERE setting_key
= 'expense_accno_id')|;
$sth = $dbh->prepare($query);
diff --git a/LedgerSMB/IR.pm b/LedgerSMB/IR.pm
index 249e52d7..e3e6aa2a 100644
--- a/LedgerSMB/IR.pm
+++ b/LedgerSMB/IR.pm
@@ -1031,31 +1031,31 @@ sub retrieve_invoice {
# get default accounts and last invoice number
$query = qq|
SELECT (select c.accno FROM chart c
- WHERE c.id = (SELECT value FROM defaults
+ WHERE c.id = (SELECT value::int FROM defaults
WHERE setting_key =
'inventory_accno_id'))
AS inventory_accno,
(SELECT c.accno FROM chart c
- WHERE c.id = (SELECT value FROM defaults
+ WHERE c.id = (SELECT value::int FROM defaults
WHERE setting_key =
'income_accno_id'))
AS income_accno,
(SELECT c.accno FROM chart c
- WHERE c.id = (SELECT value FROM defaults
+ WHERE c.id = (SELECT value::int FROM defaults
WHERE setting_key =
'expense_accno_id'))
AS expense_accno,
(SELECT c.accno FROM chart c
- WHERE c.id = (SELECT value FROM defaults
+ WHERE c.id = (SELECT value::int FROM defaults
WHERE setting_key =
'fxgain_accno_id'))
AS fxgain_accno,
(SELECT c.accno FROM chart c
- WHERE c.id = (SELECT value FROM defaults
+ WHERE c.id = (SELECT value::int FROM defaults
WHERE setting_key =
'fxloss_accno_id'))
AS fxloss_accno,
@@ -1065,31 +1065,31 @@ sub retrieve_invoice {
else {
$query = qq|
SELECT (select c.accno FROM chart c
- WHERE c.id = (SELECT value FROM defaults
+ WHERE c.id = (SELECT value::int FROM defaults
WHERE setting_key =
'inventory_accno_id'))
AS inventory_accno,
(SELECT c.accno FROM chart c
- WHERE c.id = (SELECT value FROM defaults
+ WHERE c.id = (SELECT value::int FROM defaults
WHERE setting_key =
'income_accno_id'))
AS income_accno,
(SELECT c.accno FROM chart c
- WHERE c.id = (SELECT value FROM defaults
+ WHERE c.id = (SELECT value::int FROM defaults
WHERE setting_key =
'expense_accno_id'))
AS expense_accno,
(SELECT c.accno FROM chart c
- WHERE c.id = (SELECT value FROM defaults
+ WHERE c.id = (SELECT value::int FROM defaults
WHERE setting_key =
'fxgain_accno_id'))
AS fxgain_accno,
(SELECT c.accno FROM chart c
- WHERE c.id = (SELECT value FROM defaults
+ WHERE c.id = (SELECT value::int FROM defaults
WHERE setting_key =
'fxloss_accno_id'))
AS fxloss_accno,
diff --git a/LedgerSMB/RC.pm b/LedgerSMB/RC.pm
index 206565dd..9410dd7c 100644
--- a/LedgerSMB/RC.pm
+++ b/LedgerSMB/RC.pm
@@ -237,10 +237,10 @@ sub payment_transactions {
if ( $form->{fx_transaction} ) {
$fx_transaction = qq|
AND NOT (ac.chart_id IN
- (SELECT value FROM defaults
+ (SELECT value::int FROM defaults
WHERE setting_key = 'fxgain_accno_id'
UNION
- SELECT value FROM defaults
+ SELECT value::int FROM defaults
WHERE setting_key = 'fxloss_accno_id'))|;
}
else {