Liz::ProjectSet::Client - Client objects within the ProjectSet
use xxLINK; $xxlink = new xxLINK; $projectset = $xxlink->ProjectSet; $client = $projectset->Client;
Provide object oriented access to the Client tables of the ProjectSet.
Create a new Client object from a ProjectSet object.
1 ProjectSet object 2 ID or name to create Client object with (default: none = new client)
1 instantiated object
It is not intended to call this method directly, but rather indirectly through the Liz::ProjectSet module.
$xxlink = new xxLINK; $projectset = $xxlink->ProjectSet; $client = $projectset->Client $client = $projectset->Client( $clientID );
Update the Client object. This stores the message in the client forum and updates the appropriate forum list when appropriate.
1 the ID of the Client object
$clientID = $client->update;
The following methods allow you to inspect and/or change certain fields of the Liz::ProjectSet::Client object.
Return the AccountManager object of the Client (which is in fact an Employee object). Please note that you should still set the AccountManagerID value in the Client object after updating this object.
1 Employee object
$accountmanager = $client->AccountManager; $client->AccountManagerID( $accountmanager->update );
Set or return the AccountManagerID of the Client. Use method AccountManager to create the associated Employee object.
1 new accountmanagerID of the Client (default: no change)
1 current/old accountmanagerID of the Client
$client->AccountManagerID( $accountmanagerID ); $accountmanagerID = $client->AccountManagerID;
Return the BankAccount of the client.
1 BankAccount
1 current BankAccount
Return the Contact object of one of the Contacts of the Client.
1 ID of the Contact
1 Contact object
$contact = $client->Contact( $contactID );
Return the Created information of the Liz::ProjectSet::Client object.
1 current timestamp of the Created
$created = $client->Created;
Set or return the description of the Client.
1 new description of the Client (default: no change)
1 current/old description of the Client
$client->Description( $description ); $description = $client->Description;
Return or set the EmployeeIDs (list of contactID's from the EmployeeSet) of the Liz::ProjectSet::Client object. Because the associations are linked to the ID of the client, this method should only be called after the first successful update.
1..N new employeeID's
(default: no change)
1..N current/old employeeID's
$client->EmployeeIDs( @employeeID ); @employeeID = $client->EmployeeIDs;
Set or return the date on which the first site of the Client went live.
1 new timestamp for first live date (default: no change)
1 current/old timestamp for first live date
$client->FirstLiveOn( $firstliveon ); $firstliveon = $client->FirstLiveOn;
Set or return the foreign key of the Client. This is usually the ID of the client in an external system.
1 new foreign key of the Client (default: no change)
1 current/old foreign key of the Client
$client->ForeignKey( $foreignkey ); $foreignkey = $client->ForeignKey;
Set or return the history of the Client.
1 new history of the Client (default: no change)
1 current/old history of the Client
$client->History( $history ); $history = $client->History;
Return the InvoiceContact object of the Client (which is in fact a Contact object). Please note that you should still set the InvoiceContactID value in the Client object after updating this object.
1 Contact object
$invoicecontact = $client->InvoiceContact; $client->InvoiceContactID( $invoicecontact->update );
Return or set the InvoiceContactID of the Liz::ProjectSet::Client object. Use method InvoiceContact to create the associated Contact object.
1 new InvoiceContactID (default: no change)
1 current/old InvoiceContactID
$client->InvoiceContactID( $invoicecontactID ); $invoicecontactID = $client->InvoiceContactID;
Return the MainContact object of the Client (which is in fact a Contact object). Please note that you should still set the MainContactID value in the Client object after updating this object.
1 Contact object
$maincontact = $client->MainContact; $client->MainContactID( $maincontact->update );
Return or set the MainContactID of the Liz::ProjectSet::Client object. Use method MainContact to create the associated Contact object.
1 new MainContactID (default: no change)
1 current/old MainContactID
$client->MainContactID( $maincontactID ); $maincontactID = $client->MainContactID;
Set or return the name of the Client.
1 new name of the Client (default: no change)
1 current/old name of the Client
$client->Name( $name ); $name = $client->Name;
Return the Organization object of the Client (which is in fact a Organization object). Please note that you should still set the OrganizationID value in the Client object after updating this object.
1 Organization object
$organization = $client->Organization; $client->OrganizationID( $organization->update );
Return or set the OrganizationID of the Liz::ProjectSet::Client object. Use method Organization to create the associated Organization object.
1 new organizationID (default: no change)
1 current/old organizationID
$client->OrganizationID( $organizationID ); $organizationID = $client->OrganizationID;
Return or set the OtherContactIDs (list of contactID's) of the Liz::ProjectSet::Client object. Because the associations are linked to the ID of the client, this method should only be called after the first successful update.
1..N new othercontactID's
(default: no change)
1..N current/old othercontactID's
$client->OtherContactIDs( @othercontactID ); @othercontactID = $client->OtherContactIDs;
Return the ProjectSet object of the Liz::ProjectSet::Client object.
1 ProjectSet object
$projectset = $client->ProjectSet;
Return or set the SortName information of the Liz::ProjectSet::Client object.
1 new value of the SortName (default: no change)
1 current/old value of the SortName
$client->SortName( $sortname ); $sortname = $client->SortName;
Return or set the Status information of the Liz::ProjectSet::Client object.
1 new value of the Status (default: no change)
1 current/old value of the Status
$client->Status( 1 ); $status = $client->Status;
Return the Updated information of the Liz::ProjectSet::Client object.
1 current timestamp of the Updated
$updated = $client->Updated;
Return or set the URL of the Liz::ProjectSet::Client object.
1 new URL of the client (default: no change)
1 current/old URL of the client
$client->URL( $url ); $url = $client->URL;
Return the URLID of the Liz::ProjectSet::Client object. It can be used to create a Liz::URLSet::URL object. This is usually only used internally. It is better to use the more transparant method URL instead.
1 current urlID
$urlID = $client->URLID;
The following methods return an SQL-statement(-like) handle that allows listing of (a selection of) the objects of a certain type.
Return an SQL-statement(-like) handle that contains a selection of the Contacts available for the Client. The usual field names for contacts can be specified with the first parameter.
1 fields to return for each Contact, separated by comma's 2 extra SQL condition to apply (default: none) 3 order in which to return the finds (default: sortname) 4 which records should be returned (default: all )
1 SQL-like statement handle (on which method "fetchrow" can be applied)
$result = $client->Contacts; $result = $client->Contacts( 'ID,firstname,name','status=0' );
Return the CreditMaximum of the client.
1 CreditMaximum
1 current CreditMaximum
Return the COCDate of the client.
1 COCDate
1 current COCDate
Return the COCName of the client.
1 COCName
1 current COCName
Return the COCNumber of the client.
1 COCNumber
1 current COCNumber
Return an SQL-statement(-like) handle that contains a selection of the Projects available for the Client. The following field names can be specified with the first parameter:
ID The ID of the Project. Can be used as parameter on the L<Project> method.
name The name of the Project, e.g. 'Implementatie MailingList Functionaliteit'.
deadline Timestamp for the deadline of the project
status The status of the Project: this can be any number between 0 and 255 inclusive.
leaderID The ID of the Leader information of the Project.
updated Timestamp when the Project record was last updated in the database.
created Timestamp when the Project record was created in the database.
sortname The string on which the Project can be sorted. It usually consists of the name field, followed by the firstname and prefix field, all in lowercase and with all non-alphanumeric characters removed.
clientID The ID of the Client information of the Project. If non-zero, can be used to create an L<Client> object with.
organizationID The ID of the Organization information of the Project. If non-zero, can be used to create an L<Organization> object with.
maincontactID The ID of the Contact information of the Project. If non-zero, can be used to create an L<Contact> object with.
invoicecontactID The ID of the Contact with regards to invoices of the Project. If non-zero, can be used to create an L<Contact> object with.
urlID The ID of the URL associated with the Project. If non-zero, can be used to create an L<URL> object with.
1 fields to return for each Project, seperated by comma's (default: 'ID,name,deadline,status,leaderID,updated,created,sortname,clientID,organizationID,maincontactID,invoicecontactID,urlID' ); 2 extra SQL condition to apply (default: none) 3 order in which to return the finds (default: sortname) 4 which records should be returned (default: all )
1 SQL-like statement handle (on which method "fetchrow" can be applied)
$result = $projectset->Projects; $result = $projectset->Projects( 'ID,name,leaderID','status=0' );
Return the VATNumber of the client.
1 VATNumber
1 current VATNumber
Elizabeth Mattijsen ( lizperl@INC.nl )
Contributions by:
- Sjoerd Lawende ( sjoerd@xxlink.nl )
(C) 1998-1999 International Network Consultants
update now sets the alteredbyID-field with the current userID.
Added stuff for the new alteredbyID-field.
Fixed problems with Quote/Zero-ing of new fields.
Added accessor BankAccount, CreditMaximum, VATNumber, COCNumber, COCName, COCDate for the new fields.
Added a generic Contact method to be used together with the Contacts method, or the InvoiceContactID and MainContactID methods.
Added methods AccountManager, InvoiceContact, MainContact and Organization to quickly create the right Contact and Organization objects from the ProjectSet.
Method ProjectSet added to obtain the ProjectSet object.
Method new now places the ProjectSet object in its own fields.
Now no longer adds Exporter to ISA: it wasn't necessary.
Removed Projects2Pulldown from this module (SL)
Added Projects2Pulldown method.
First version of this true Perl module.