summaryrefslogtreecommitdiff
path: root/sql/modules/Location.sql
diff options
context:
space:
mode:
authoreinhverfr <einhverfr@4979c152-3d1c-0410-bac9-87ea11338e46>2007-11-22 03:31:05 +0000
committereinhverfr <einhverfr@4979c152-3d1c-0410-bac9-87ea11338e46>2007-11-22 03:31:05 +0000
commit0190093b09369a6fcf50887620a65b242199478e (patch)
tree4f8b43257fc1703e609345be230d0493ae653860 /sql/modules/Location.sql
parent47b7f03901913406bf666fa6dd20b1856d1de7fd (diff)
More customer fixes
git-svn-id: https://ledger-smb.svn.sourceforge.net/svnroot/ledger-smb/trunk@1888 4979c152-3d1c-0410-bac9-87ea11338e46
Diffstat (limited to 'sql/modules/Location.sql')
-rw-r--r--sql/modules/Location.sql7
1 files changed, 4 insertions, 3 deletions
diff --git a/sql/modules/Location.sql b/sql/modules/Location.sql
index 3986c24f..c0d57b51 100644
--- a/sql/modules/Location.sql
+++ b/sql/modules/Location.sql
@@ -49,11 +49,12 @@ BEGIN
return location_row.id;
END IF;
INSERT INTO location
- (line_one, line_two, line_three, city, state, mail_code, country_id)
+ (line_one, line_two, line_three, city, state, mail_code, country_id,
+ created)
VALUES
(in_address1, in_address2, in_address3, in_city, in_state,
- in_zipcode, in_country);
- SELECT lastval('location_id_seq') INTO location_id;
+ in_zipcode, in_country, now());
+ SELECT currval('location_id_seq') INTO location_id;
return location_id;
END;
$$ LANGUAGE PLPGSQL;