[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
SF.net SVN: ledger-smb:[4760] trunk/LedgerSMB/DBObject/Company.pm
- Subject: SF.net SVN: ledger-smb:[4760] trunk/LedgerSMB/DBObject/Company.pm
- From: ..hidden..
- Date: Wed, 23 May 2012 09:33:53 +0000
Revision: 4760
http://ledger-smb.svn.sourceforge.net/ledger-smb/?rev=4760&view=rev
Author: einhverfr
Date: 2012-05-23 09:33:52 +0000 (Wed, 23 May 2012)
Log Message:
-----------
Removing old code regarding locations
Modified Paths:
--------------
trunk/LedgerSMB/DBObject/Company.pm
Modified: trunk/LedgerSMB/DBObject/Company.pm
===================================================================
--- trunk/LedgerSMB/DBObject/Company.pm 2012-05-23 09:23:25 UTC (rev 4759)
+++ trunk/LedgerSMB/DBObject/Company.pm 2012-05-23 09:33:52 UTC (rev 4760)
@@ -82,45 +82,7 @@
return $rv;
}
-=over
-=item delete_location
-
-Deletes a record from the location side.
-
-Required request variables:
-
-location_id
-location_class_id
-
-One of:
-
-credit_id (preferred)
-company_id (as fallback)
-
-Returns true if a record was deleted. False otherwise.
-
-=back
-
-=cut
-
-sub delete_location {
- my ($self) = @_;
- my $rv;
- if ($self->{credit_id}){
- ($rv) = $self->exec_method(funcname => 'eca__delete_location');
- } elsif ($self->{company_id}){
- ($rv) = $self->exec_method(funcname => 'company__delete_location');
- } else {
- $self->error($self->{_locale}->text(
- 'No company or credit id in LedgerSMB::DBObject::delete_location'
- ));
- }
- $self->{dbh}->commit;
- return $rv;
-}
-
-
=over
=item delete_bank_account
@@ -205,44 +167,6 @@
=over
-=item save_location
-
-This method saves an address for a company.
-
-Requires the following variables on the object:
-credit_id
-location_id
-location_class (1 = billing, 2 = shipping, 3 = sales)
-line_one
-line_two
-city
-state (can hold province info)
-mail_code (zip or postal code)
-country_code (ID of country)
-
-
-=back
-
-=cut
-
-sub save_location {
- my $self = shift @_;
-
- $self->{country_id} = $self->{country_code};
-
- if($self->{credit_id}){
- $self->exec_method(funcname => 'eca__location_save');
- } else {
- my ($ref) = $self->exec_method(funcname => 'company__location_save');
- my @vals = values %$ref;
- $self->{location_id} = $vals[0];
- }
-
- $self->{dbh}->commit;
-}
-
-=over
-
=item get_metadata()
This retrieves various information vor building the user interface. Among other
@@ -457,23 +381,6 @@
@{$self->{accounts}} = $self->exec_method(funcname => 'company__get_all_accounts');
}
-=item address($id)
-
-Returns the location if it is specified by the $id argument.
-
-=cut
-
-sub address {
-
- my ($self, $id) = @_;
-
- for my $loc (@{ $self->{locations} }) {
- if ($loc->{id} == $id) {
- return $loc;
- }
- }
-}
-
=item get_pricematrix
This routine gets the price matrix for the customer or vendor. The pricematrix
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.