diff options
author | einhverfr <einhverfr@4979c152-3d1c-0410-bac9-87ea11338e46> | 2007-11-25 19:47:40 +0000 |
---|---|---|
committer | einhverfr <einhverfr@4979c152-3d1c-0410-bac9-87ea11338e46> | 2007-11-25 19:47:40 +0000 |
commit | e351ede55ad2450b952680c4fad04c2523f49faa (patch) | |
tree | f964e180c3f50479ad15b02822e1311144a83d78 /LedgerSMB/DBObject | |
parent | afc48e01665120367736ffdbe33ca52252a42704 (diff) |
Adding Vendor class
git-svn-id: https://ledger-smb.svn.sourceforge.net/svnroot/ledger-smb/trunk@1900 4979c152-3d1c-0410-bac9-87ea11338e46
Diffstat (limited to 'LedgerSMB/DBObject')
-rw-r--r-- | LedgerSMB/DBObject/Vendor.pm | 42 |
1 files changed, 42 insertions, 0 deletions
diff --git a/LedgerSMB/DBObject/Vendor.pm b/LedgerSMB/DBObject/Vendor.pm new file mode 100644 index 00000000..e2fa26d8 --- /dev/null +++ b/LedgerSMB/DBObject/Vendor.pm @@ -0,0 +1,42 @@ +package LedgerSMB::DBObject::Vendor; + +use base qw(LedgerSMB::DBObject::Company); +use strict; + +my $ENTITY_CLASS = 1; + +sub save { + my $self = shift @_; + + $self->{entity_class} = $ENTITY_CLASS; + $self->save_credit(); # inherited from Company +} + + +sub save_location { + my $self = shift @_; + $self->{entity_class} = $ENTITY_CLASS; + $self->{country_id} = $self->{country}; + $self->exec_method(funcname => 'company__location_save'); + + $self->{dbh}->commit; +} + + + +sub get { + my $self = shift @_; + $self->{entity_class} = $ENTITY_CLASS; + my ($ref) = $self->exec_method(funcname => 'entity__retrieve_credit'); + $self->merge($ref); + + $self->{name} = $self->{legal_name}; + $self->get_company(); +} + + +sub search { + + +} +1; |