From a7badcbfb8db7f379590d66031137efb9f65717c Mon Sep 17 00:00:00 2001 From: einhverfr Date: Thu, 22 Nov 2007 03:59:09 +0000 Subject: More customer fixes git-svn-id: https://ledger-smb.svn.sourceforge.net/svnroot/ledger-smb/trunk@1889 4979c152-3d1c-0410-bac9-87ea11338e46 --- LedgerSMB/DBObject/Customer.pm | 7 +++++-- UI/Customer/customer.html | 4 ++-- sql/modules/Customer.sql | 4 ++-- 3 files changed, 9 insertions(+), 6 deletions(-) diff --git a/LedgerSMB/DBObject/Customer.pm b/LedgerSMB/DBObject/Customer.pm index 08296d06..7bae0a9c 100644 --- a/LedgerSMB/DBObject/Customer.pm +++ b/LedgerSMB/DBObject/Customer.pm @@ -35,6 +35,8 @@ sub save_location { $self->{entity_class} = $CUSTOMER_ENTITY_CLASS; $self->{country_id} = $self->{country}; $self->exec_method(funcname => 'customer_location_save'); + + $self->{dbh}->commit; } sub save_contact { @@ -45,7 +47,8 @@ sub save_bank_acct { sub get { my $self = shift @_; - $self->merge(shift @{$self->exec_method(funcname => 'customer__retrieve')}); + ($ref) = $self->exec_method(funcname => 'customer__retrieve'); + $self->merge($ref); $self->{name} = $self->{legal_name}; @@ -56,7 +59,7 @@ sub get { funcname => 'company__list_contacts'); @{$self->{contacts}} = $self->exec_method( - funcname => 'company__list_bank_accounts'); + funcname => 'company__list_bank_account'); @{$self->{notes}} = $self->exec_method( funcname => 'company__list_notes'); diff --git a/UI/Customer/customer.html b/UI/Customer/customer.html index ef0b79e1..5fb8a1be 100644 --- a/UI/Customer/customer.html +++ b/UI/Customer/customer.html @@ -180,7 +180,7 @@ - + @@ -198,7 +198,7 @@
- diff --git a/sql/modules/Customer.sql b/sql/modules/Customer.sql index c368906b..500556f5 100644 --- a/sql/modules/Customer.sql +++ b/sql/modules/Customer.sql @@ -22,7 +22,7 @@ CREATE TYPE customer_search_return AS ( taxincluded bool, creditlimit numeric, terms int2, - customernumber int, + customernumber text, business_id int, language_code text, pricegroup_id int, @@ -222,7 +222,7 @@ BEGIN FOR out_row IN SELECT * from entity_bank_account where entity_id = in_entity_id LOOP - RETURN NEXT; + RETURN NEXT out_row; END LOOP; END; $$ LANGUAGE PLPGSQL; -- cgit v1.2.3