dolibarr  13.0.2
Public Member Functions | List of all members
ExpenseReportLine Class Reference

Class of expense report details lines. More...

Public Member Functions

 __construct ($db)
 Constructor. More...
 
 fetch ($rowid)
 Fetch record for expense report detailed line. More...
 
 insert ($notrigger=0, $fromaddline=false)
 Insert a line of expense report. More...
 
 getExpAmount (ExpenseReportRule $rule, $fk_user, $mode= 'day')
 Function to get total amount in expense reports for a same rule. More...
 
 update (User $user)
 Update line. More...
 

Detailed Description

Class of expense report details lines.

Definition at line 2533 of file expensereport.class.php.

Constructor & Destructor Documentation

ExpenseReportLine::__construct (   $db)

Constructor.

Parameters
DoliDB$dbHandlet database

Definition at line 2597 of file expensereport.class.php.

References db.

Member Function Documentation

ExpenseReportLine::fetch (   $rowid)

Fetch record for expense report detailed line.

Parameters
int$rowidId of object to load
Returns
int <0 if KO, >0 if OK

Definition at line 2608 of file expensereport.class.php.

References db, dol_print_error(), rowid, and vatrate().

ExpenseReportLine::getExpAmount ( ExpenseReportRule  $rule,
  $fk_user,
  $mode = 'day' 
)

Function to get total amount in expense reports for a same rule.

Parameters
ExpenseReportRule$ruleobject rule to check
int$fk_useruser author id
string$modeday|EX_DAY / month|EX_MON / year|EX_YEA to get amount
Returns
float Amount

Definition at line 2740 of file expensereport.class.php.

References $resql, db, dol_print_error(), and dol_syslog().

ExpenseReportLine::insert (   $notrigger = 0,
  $fromaddline = false 
)

Insert a line of expense report.

Parameters
int$notrigger1=No trigger
bool$fromaddlinefalse=keep default behavior, true=exclude the update_price() of parent object
Returns
int <0 if KO, >0 if OK

Definition at line 2662 of file expensereport.class.php.

References $resql, db, dol_syslog(), price2num(), and vatrate().

ExpenseReportLine::update ( User  $user)

Update line.

Parameters
User$userUser
Returns
int <0 if KO, >0 if OK

Definition at line 2778 of file expensereport.class.php.

References $resql, db, dol_print_error(), dol_syslog(), price2num(), rowid, and vatrate().


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