diff options
-rwxr-xr-x | LedgerSMB/Form.pm | 5 | ||||
-rwxr-xr-x | LedgerSMB/IC.pm | 6 | ||||
-rwxr-xr-x | LedgerSMB/IR.pm | 20 | ||||
-rwxr-xr-x | LedgerSMB/RC.pm | 4 |
4 files changed, 17 insertions, 18 deletions
diff --git a/LedgerSMB/Form.pm b/LedgerSMB/Form.pm index 33eab435..ec4ad7ff 100755 --- a/LedgerSMB/Form.pm +++ b/LedgerSMB/Form.pm @@ -83,7 +83,7 @@ sub new { #menubar will be deprecated, replaced with below $self->{lynx} = 1 if $self->{path} =~ /lynx/i; - $self->{version} = "1.2.12"; + $self->{version} = "1.2.10"; $self->{dbversion} = "1.2.0"; bless $self, $type; @@ -2187,7 +2187,7 @@ sub all_years { '11' => 'November', '12' => 'December' ); - + @{$self->{all_years}} = @{$dbh->selectcol_arrayref($query)}; $dbh->commit; } @@ -3223,7 +3223,6 @@ sub audittrail { my $key; my $i; my @flds = qw(tablename reference formname action transdate); - # put into hash and remove dups while (@a) { $key = "$a[2]$a[3]"; diff --git a/LedgerSMB/IC.pm b/LedgerSMB/IC.pm index 04571bb0..09bc0177 100755 --- a/LedgerSMB/IC.pm +++ b/LedgerSMB/IC.pm @@ -1899,11 +1899,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 35a0a07e..4d9958a9 100755 --- a/LedgerSMB/IR.pm +++ b/LedgerSMB/IR.pm @@ -1017,31 +1017,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, @@ -1051,31 +1051,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 592f2234..7f888f0b 100755 --- 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 { |