class AccountancyReport (View source)

Class to manage reports for accounting categories

Properties

DoliDB $db
string $error
string[] $errors
string $element
string $table_element
int deprecated $rowid
int $id
?string $code
?string $label
?int $fk_country
?int $active

Methods

__construct(DoliDB $db)

Constructor

int
create(User $user, int $notrigger = 0)

Create object into database

int
fetch(int $id, string $code = '', string $label = '')

Load object in memory from database

int
update(User $user = null, int $notrigger = 0)

Update object into database

int
delete(User $user, int $notrigger = 0)

Delete object in database

Details

__construct(DoliDB $db)

Constructor

Parameters

DoliDB $db

Database handler

int create(User $user, int $notrigger = 0)

Create object into database

Parameters

User $user

User that create

int $notrigger

0=launch triggers after, 1=disable triggers

Return Value

int

Return integer <0 if KO, Id of created object if OK

int fetch(int $id, string $code = '', string $label = '')

Load object in memory from database

Parameters

int $id

Id object

string $code Code
string $label Label

Return Value

int

Return integer <0 if KO, >0 if OK

int update(User $user = null, int $notrigger = 0)

Update object into database

Parameters

User $user

User that modify

int $notrigger

0=launch triggers after, 1=disable triggers

Return Value

int

Return integer <0 if KO, >0 if OK

int delete(User $user, int $notrigger = 0)

Delete object in database

Parameters

User $user

User that delete

int $notrigger

0=launch triggers after, 1=disable triggers

Return Value

int

Return integer <0 if KO, >0 if OK