diff options
author | einhverfr <einhverfr@4979c152-3d1c-0410-bac9-87ea11338e46> | 2007-11-25 19:59:02 +0000 |
---|---|---|
committer | einhverfr <einhverfr@4979c152-3d1c-0410-bac9-87ea11338e46> | 2007-11-25 19:59:02 +0000 |
commit | d63d2487d738b5273f0bb00d9caf8dce591ac91e (patch) | |
tree | 45b495c53edee39fb68bf1d96342d0909001e129 /LedgerSMB/DBObject/Customer.pm | |
parent | e351ede55ad2450b952680c4fad04c2523f49faa (diff) |
More postfactoring
git-svn-id: https://ledger-smb.svn.sourceforge.net/svnroot/ledger-smb/trunk@1901 4979c152-3d1c-0410-bac9-87ea11338e46
Diffstat (limited to 'LedgerSMB/DBObject/Customer.pm')
-rw-r--r-- | LedgerSMB/DBObject/Customer.pm | 30 |
1 files changed, 4 insertions, 26 deletions
diff --git a/LedgerSMB/DBObject/Customer.pm b/LedgerSMB/DBObject/Customer.pm index a9bcffc7..6c52a2d9 100644 --- a/LedgerSMB/DBObject/Customer.pm +++ b/LedgerSMB/DBObject/Customer.pm @@ -3,38 +3,16 @@ package LedgerSMB::DBObject::Customer; use base qw(LedgerSMB::DBObject::Company); use strict; -my $CUSTOMER_ENTITY_CLASS = 2; +my $ENTITY_CLASS = 2; -sub save { +sub set_entity_class { my $self = shift @_; - - $self->{entity_class} = $CUSTOMER_ENTITY_CLASS; - $self->save_credit(); # inherited from Company -} - - -sub save_location { - my $self = shift @_; - $self->{entity_class} = $CUSTOMER_ENTITY_CLASS; - $self->{country_id} = $self->{country}; - $self->exec_method(funcname => 'company__location_save'); - - $self->{dbh}->commit; + $self->{entity_class} = $ENTITY_CLASS; } + -sub get { - my $self = shift @_; - $self->{entity_class} = $CUSTOMER_ENTITY_CLASS; - my ($ref) = $self->exec_method(funcname => 'entity__retrieve_credit'); - $self->merge($ref); - - $self->{name} = $self->{legal_name}; - $self->get_company(); -} - - sub search { |