dolibarr  7.0.0-beta
Public Member Functions | Public Attributes | List of all members
PaymentTerm Class Reference

Class to manage payment terms records in dictionary. More...

Public Member Functions

 __construct ($db)
 Constructor. More...
 
 create ($user, $notrigger=0)
 Create in database. More...
 
 fetch ($id)
 Load object in memory from database. More...
 
 getDefaultId ()
 Return id of default payment term. More...
 
 update ($user=null, $notrigger=0)
 Update database. More...
 
 delete ($user, $notrigger=0)
 Delete object in database. More...
 
 createFromClone ($fromid)
 Load an object from its id and create a new one in database. More...
 
 initAsSpecimen ()
 Initialise an instance with random values. More...
 

Public Attributes

 $db
 To store db handler.
 
 $error
 To return error code (or message)
 
 $errors =array()
 To return several error codes (or messages)
 

Detailed Description

Class to manage payment terms records in dictionary.

Definition at line 29 of file paymentterm.class.php.

Constructor & Destructor Documentation

PaymentTerm::__construct (   $db)

Constructor.

Parameters
DoliDB$dbDatabase handler

Definition at line 57 of file paymentterm.class.php.

References $db.

Member Function Documentation

PaymentTerm::create (   $user,
  $notrigger = 0 
)

Create in database.

Parameters
User$userUser that create
int$notrigger0=launch triggers after, 1=disable triggers
Returns
int <0 if KO, Id of created object if OK

Definition at line 71 of file paymentterm.class.php.

References $error, $resql, dol_syslog(), and getEntity().

PaymentTerm::createFromClone (   $fromid)

Load an object from its id and create a new one in database.

Parameters
int$fromidId of object to clone
Returns
int New id of clone

Definition at line 403 of file paymentterm.class.php.

References $error.

PaymentTerm::delete (   $user,
  $notrigger = 0 
)

Delete object in database.

Parameters
User$userUser that delete
int$notrigger0=launch triggers after, 1=disable triggers
Returns
int <0 if KO, >0 if OK

Definition at line 346 of file paymentterm.class.php.

References $error, $resql, dol_syslog(), and getEntity().

PaymentTerm::fetch (   $id)

Load object in memory from database.

Parameters
int$idId object
Returns
int <0 if KO, >0 if OK

Definition at line 165 of file paymentterm.class.php.

References $resql, dol_syslog(), and getEntity().

PaymentTerm::getDefaultId ( )

Return id of default payment term.

Returns
int <0 if KO, >0 if OK

Definition at line 224 of file paymentterm.class.php.

References $resql, dol_syslog(), and getEntity().

PaymentTerm::initAsSpecimen ( )

Initialise an instance with random values.

Used to build previews or test instances. id must be 0 if object instance is a specimen.

Returns
void

Definition at line 463 of file paymentterm.class.php.

PaymentTerm::update (   $user = null,
  $notrigger = 0 
)

Update database.

Parameters
User$userUser that modify
int$notrigger0=launch triggers after, 1=disable triggers
Returns
int <0 if KO, >0 if OK

Definition at line 263 of file paymentterm.class.php.

References $error, $resql, dol_syslog(), and getEntity().


The documentation for this class was generated from the following file: