diff options
author | einhverfr <einhverfr@4979c152-3d1c-0410-bac9-87ea11338e46> | 2007-11-22 03:59:09 +0000 |
---|---|---|
committer | einhverfr <einhverfr@4979c152-3d1c-0410-bac9-87ea11338e46> | 2007-11-22 03:59:09 +0000 |
commit | a7badcbfb8db7f379590d66031137efb9f65717c (patch) | |
tree | 28f71ed65ad68ef8865ec721bbaffaa71ad86660 | |
parent | 0190093b09369a6fcf50887620a65b242199478e (diff) |
More customer fixes
git-svn-id: https://ledger-smb.svn.sourceforge.net/svnroot/ledger-smb/trunk@1889 4979c152-3d1c-0410-bac9-87ea11338e46
-rw-r--r-- | LedgerSMB/DBObject/Customer.pm | 7 | ||||
-rw-r--r-- | UI/Customer/customer.html | 4 | ||||
-rw-r--r-- | 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 @@ </tr> <?lsmb FOREACH loc = locations ?> <tr> - <td class="type"><?lsmb loc.type ?></td> + <td class="type"><?lsmb loc.class ?></td> <td class="line_one"><?lsmb loc.line_one ?></td> <td class="city"><?lsmb loc.city ?></td> <td class="state"><?lsmb loc.state ?></td> @@ -198,7 +198,7 @@ </table> <div> <label for="loc_type"><?lsmb text('Type:') ?></label> - <select name='loc_type'> + <select id='loc_type' name="location_class"> <?lsmb FOREACH lc = location_class ?> <option value="<?lsmb lc.id ?>"><?lsmb lc.class ?></option> <?lsmb END ?> 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; |