dolibarr  9.0.0
Public Member Functions | 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...
 

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 (   $db)

Constructor.

Parameters
DoliDB$dbDatabase handler

Definition at line 72 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 <0 if KO, Id of created object if OK

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

◆ createFromClone()

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 399 of file paymentterm.class.php.

◆ 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 <0 if KO, >0 if OK

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

◆ fetch()

PaymentTerm::fetch (   $id)

Load object in memory from database.

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

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

◆ getDefaultId()

PaymentTerm::getDefaultId ( )

Return id of default payment term.

Returns
int <0 if KO, >0 if OK

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

◆ 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
void

Definition at line 455 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 <0 if KO, >0 if OK

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


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