dolibarr  17.0.4
Public Member Functions | List of all members
PaymentTerm Class Reference

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

Public Member Functions

 __construct (DoliDB $db)
 Constructor. More...
 
 create ($user, $notrigger=0)
 Create in database. More...
 
 fetch ($id, $code='')
 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 (User $user, $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 28 of file paymentterm.class.php.

Constructor & Destructor Documentation

◆ __construct()

PaymentTerm::__construct ( DoliDB  $db)

Constructor.

Parameters
DoliDB$dbDatabase handler

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

References db.

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

◆ 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 393 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 353 of file paymentterm.class.php.

◆ fetch()

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

Load object in memory from database.

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

Definition at line 178 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 235 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 439 of file paymentterm.class.php.

References code.

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


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