dolibarr 20.0.2
PaymentTerm Class Reference

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

Public Member Functions

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

Detailed Description

Class to manage payment terms records in dictionary.

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

Constructor & Destructor Documentation

◆ __construct()

PaymentTerm::__construct ( DoliDB $db)

Constructor.

Parameters
DoliDB$dbDatabase handler

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

Member Function Documentation

◆ create()

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

Create in database.

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

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

References dol_syslog(), and getEntity().

◆ createFromClone()

PaymentTerm::createFromClone ( User $user,
$fromid )

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

Parameters
User$userUser making the clone
int$fromidId of object to clone
Returns
int New id of clone

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

References $object.

◆ delete()

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

Delete object in database.

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

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

References dol_syslog().

◆ fetch()

PaymentTerm::fetch ( $id,
$code = '' )

Load object in memory from database.

Parameters
int$idId object
string$codeCode object
Returns
int Return integer <0 if KO, >0 if OK

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

References dol_syslog(), and getEntity().

◆ getDefaultId()

PaymentTerm::getDefaultId ( )

Return id of default payment term.

Returns
int Return integer <0 if KO, >0 if OK

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

References dol_syslog().

◆ initAsSpecimen()

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
int

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

◆ update()

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

Update database.

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

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

References dol_syslog().


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