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 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) (limited to 'LedgerSMB') 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'); -- cgit v1.2.3