From 84dc3479cfed7f6b812390f75f770a12df1f4d59 Mon Sep 17 00:00:00 2001 From: einhverfr Date: Wed, 6 Aug 2008 23:35:23 +0000 Subject: Correcting location saving issues git-svn-id: https://ledger-smb.svn.sourceforge.net/svnroot/ledger-smb/trunk@2238 4979c152-3d1c-0410-bac9-87ea11338e46 --- sql/modules/Location.sql | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/sql/modules/Location.sql b/sql/modules/Location.sql index b90e11c7..4e0cb6b1 100644 --- a/sql/modules/Location.sql +++ b/sql/modules/Location.sql @@ -38,11 +38,11 @@ BEGIN SELECT * INTO location_row FROM location WHERE line_one = in_address1 AND - line_two = in_address2 AND - line_three = in_address3 AND + coalesce(line_two, '') = coalesce(in_address2, '') AND + coalesce(line_three, '') = coalesce(in_address3, '') AND city = in_city AND - state = in_state AND - mail_code = in_zipcode AND + coalesce(state, '') = coalesce(in_state, '') AND + coalesce(mail_code, '') = coalesce(in_zipcode, '') AND country_id = in_country LIMIT 1; IF FOUND THEN -- cgit v1.2.3