|
dolibarr
13.0.2
|
Class to manage categories of an accounting account. More...
Public Member Functions | |
| __construct ($db) | |
| Constructor. More... | |
| create ($user, $notrigger=0) | |
| Create object into database. More... | |
| fetch ($id, $code= '', $label= '') | |
| Load object in memory from database. More... | |
| update ($user=null, $notrigger=0) | |
| Update object into database. More... | |
| delete ($user, $notrigger=0) | |
| Delete object in database. More... | |
| display ($id) | |
| Function to select all accounting accounts from an accounting category. More... | |
| getCptBK ($id) | |
| Function to select accounting category of an accounting account present in chart of accounts. More... | |
| getAccountsWithNoCategory ($id) | |
| Function to select accounting category of an accounting account present in chart of accounts. More... | |
| updateAccAcc ($id_cat, $cpts=array()) | |
| Function to add an accounting account in an accounting category. More... | |
| deleteCptCat ($cpt_id) | |
| Function to delete an accounting account from an accounting category. More... | |
| getCatsCpts () | |
| Function to know all category from accounting account. More... | |
| getSumDebitCredit ($cpt, $date_start, $date_end, $sens, $thirdparty_code= 'nofilter', $month=0, $year=0) | |
| Function to show result of an accounting account from the ledger with a direction and a period. More... | |
| getCats ($categorytype=-1) | |
| Return list of personalized groups that are active. More... | |
| getCptsCat ($cat_id, $predefinedgroupwhere= '') | |
| Get all accounting account of a group. More... | |
Class to manage categories of an accounting account.
Definition at line 32 of file accountancycategory.class.php.
| AccountancyCategory::__construct | ( | $db | ) |
Constructor.
| DoliDb | $db | Database handler |
Definition at line 137 of file accountancycategory.class.php.
References db.
| AccountancyCategory::create | ( | $user, | |
$notrigger = 0 |
|||
| ) |
Create object into database.
Definition at line 150 of file accountancycategory.class.php.
References $resql, code, db, dol_syslog(), and rowid.
| AccountancyCategory::delete | ( | $user, | |
$notrigger = 0 |
|||
| ) |
Delete object in database.
Definition at line 347 of file accountancycategory.class.php.
References $resql, db, and dol_syslog().
| AccountancyCategory::deleteCptCat | ( | $cpt_id | ) |
Function to delete an accounting account from an accounting category.
| int | $cpt_id | Id of accounting account |
Definition at line 584 of file accountancycategory.class.php.
References $resql, db, and dol_syslog().
| array Lines AccountancyCategory::display | ( | $id | ) |
Function to select all accounting accounts from an accounting category.
| int | $id | Id |
Definition at line 384 of file accountancycategory.class.php.
References $resql, db, and dol_syslog().
| AccountancyCategory::fetch | ( | $id, | |
$code = '', |
|||
$label = '' |
|||
| ) |
Load object in memory from database.
| int | $id | Id object |
| string | $code | Code |
| string | $label | Label |
Definition at line 227 of file accountancycategory.class.php.
References $resql, code, db, and dol_syslog().
| AccountancyCategory::getAccountsWithNoCategory | ( | $id | ) |
Function to select accounting category of an accounting account present in chart of accounts.
| int | $id | Id of category to know which account to exclude |
Definition at line 469 of file accountancycategory.class.php.
References $resql, db, and dol_syslog().
| AccountancyCategory::getCats | ( | $categorytype = -1 | ) |
Return list of personalized groups that are active.
| int | $categorytype | -1=All, 0=Only non computed groups, 1=Only computed groups |
Definition at line 750 of file accountancycategory.class.php.
References $resql, db, dol_print_error(), and dol_syslog().
| AccountancyCategory::getCatsCpts | ( | ) |
Function to know all category from accounting account.
Definition at line 621 of file accountancycategory.class.php.
References $resql, db, dol_print_error(), and dol_syslog().
| AccountancyCategory::getCptBK | ( | $id | ) |
Function to select accounting category of an accounting account present in chart of accounts.
| int | $id | Id category |
Definition at line 420 of file accountancycategory.class.php.
References $resql, db, and dol_syslog().
| AccountancyCategory::getCptsCat | ( | $cat_id, | |
$predefinedgroupwhere = '' |
|||
| ) |
Get all accounting account of a group.
You must choose between first parameter (personalized group) or the second (free criteria filter)
| int | $cat_id | Id if personalized accounting group/category |
| string | $predefinedgroupwhere | Sql criteria filter to select accounting accounts |
Definition at line 808 of file accountancycategory.class.php.
References $resql, db, dol_print_error(), and dol_syslog().
| AccountancyCategory::getSumDebitCredit | ( | $cpt, | |
| $date_start, | |||
| $date_end, | |||
| $sens, | |||
$thirdparty_code = 'nofilter', |
|||
$month = 0, |
|||
$year = 0 |
|||
| ) |
Function to show result of an accounting account from the ledger with a direction and a period.
| int | array | $cpt | Accounting account or array of accounting account |
| string | $date_start | Date start |
| string | $date_end | Date end |
| int | $sens | Sens of the account: 0: credit - debit (use this by default), 1: debit - credit |
| string | $thirdparty_code | Thirdparty code |
| int | $month | Specifig month - Can be empty |
| int | $year | Specifig year - Can be empty |
Definition at line 682 of file accountancycategory.class.php.
References $resql, db, dol_get_first_day(), dol_get_last_day(), and dol_syslog().
| AccountancyCategory::update | ( | $user = null, |
|
$notrigger = 0 |
|||
| ) |
Update object into database.
Definition at line 284 of file accountancycategory.class.php.
References $resql, code, db, and dol_syslog().
| AccountancyCategory::updateAccAcc | ( | $id_cat, | |
$cpts = array() |
|||
| ) |
Function to add an accounting account in an accounting category.
| int | $id_cat | Id category |
| array | $cpts | list of accounts array |
Definition at line 513 of file accountancycategory.class.php.
References $resql, db, dol_syslog(), and length_accountg().