summaryrefslogtreecommitdiff
path: root/LedgerSMB/OE.pm
diff options
context:
space:
mode:
authoreinhverfr <einhverfr@4979c152-3d1c-0410-bac9-87ea11338e46>2006-10-31 03:30:39 +0000
committereinhverfr <einhverfr@4979c152-3d1c-0410-bac9-87ea11338e46>2006-10-31 03:30:39 +0000
commitc0e83f8de881755f3b5e9b624c1c17ae2d4649ab (patch)
treeed788a6c04e35faf8a6b26e8afe16096efa61608 /LedgerSMB/OE.pm
parente2bbcb8d35f48c73d989c3d01bc5a028df8aac32 (diff)
Defaults table revision. Most COA's and System->defaults are known to be broken.
git-svn-id: https://ledger-smb.svn.sourceforge.net/svnroot/ledger-smb/trunk@413 4979c152-3d1c-0410-bac9-87ea11338e46
Diffstat (limited to 'LedgerSMB/OE.pm')
-rwxr-xr-xLedgerSMB/OE.pm14
1 files changed, 10 insertions, 4 deletions
diff --git a/LedgerSMB/OE.pm b/LedgerSMB/OE.pm
index 1a51a6cf..0992b00e 100755
--- a/LedgerSMB/OE.pm
+++ b/LedgerSMB/OE.pm
@@ -776,7 +776,9 @@ sub retrieve {
my $var;
my $ref;
- $query = qq|SELECT curr, current_date FROM defaults|;
+ $query = qq|
+ SELECT value, current_date FROM defaults
+ WHERE setting_key = 'curr'|;
($form->{currencies}, $form->{transdate}) =
$dbh->selectrow_array($query);
@@ -952,7 +954,9 @@ sub exchangerate_defaults {
my $buysell = ($form->{vc} eq "customer") ? "buy" : "sell";
# get default currencies
- my $query = qq|SELECT substr(curr,1,3), curr FROM defaults|;
+ my $query = qq|
+ SELECT substr(value,1,3), value FROM defaults
+ WHERE setting_key = 'curr'|;
($form->{defaultcurrency}, $form->{currencies})
= $dbh->selectrow_array($query);
@@ -1568,7 +1572,9 @@ sub order_details {
$form->format_string(qw(text_amount text_decimal));
- $query = qq|SELECT weightunit FROM defaults|;
+ $query = qq|
+ SELECT value FROM defaults
+ WHERE setting_key = 'weightunit'|;
($form->{weightunit}) = $dbh->selectrow_array($query);
$dbh->commit;
@@ -2193,7 +2199,7 @@ sub get_soparts {
}
- $query = qq|SELECT current_date FROM defaults|;
+ $query = qq|SELECT current_date|;
($form->{transdate}) = $dbh->selectrow_array($query);
# foreign exchange rates