dolibarr 20.0.0
tax.lib.php File Reference

Library for tax module. More...

Go to the source code of this file.

Functions

 tax_prepare_head (ChargeSociales $object)
 Prepare array with list of tabs.
 
 tax_by_thirdparty ($type, $db, $y, $date_start, $date_end, $modetax, $direction, $m=0, $q=0)
 Look for collectable VAT clients in the chosen year (and month)
 
 tax_by_rate ($type, $db, $y, $q, $date_start, $date_end, $modetax, $direction, $m=0)
 Gets Tax to collect for the given year (and given quarter or month) The function gets the Tax in split results, as the Tax declaration asks to report the amounts for different Tax rates as different lines.
 

Detailed Description

Library for tax module.

Definition in file tax.lib.php.

Function Documentation

◆ tax_by_rate()

tax_by_rate ( $type,
$db,
$y,
$q,
$date_start,
$date_end,
$modetax,
$direction,
$m = 0 )

Gets Tax to collect for the given year (and given quarter or month) The function gets the Tax in split results, as the Tax declaration asks to report the amounts for different Tax rates as different lines.

Parameters
string$typeTax type, either 'vat', 'localtax1' or 'localtax2'
DoliDB$dbDatabase handler object
int$yYear
int$qQuarter
string$date_startStart date
string$date_endEnd date
int$modetaxNot used
int$direction'sell' (customer invoice) or 'buy' (supplier invoices)
int$mMonth
Returns
array|int Array with details of VATs (per rate), -1 if no accountancy module, -2 if not yet developed, -3 if error

Definition at line 701 of file tax.lib.php.

References dol_get_first_day(), dol_get_last_day(), dol_print_error(), dol_syslog(), and getDolGlobalString().

◆ tax_by_thirdparty()

tax_by_thirdparty ( $type,
$db,
$y,
$date_start,
$date_end,
$modetax,
$direction,
$m = 0,
$q = 0 )

Look for collectable VAT clients in the chosen year (and month)

Parameters
string$typeTax type, either 'vat', 'localtax1' or 'localtax2'
DoliDB$dbDatabase handle
int$yYear
string$date_startStart date
string$date_endEnd date
int$modetaxNot used
string$direction'sell' or 'buy'
int$mMonth
int$qQuarter
Returns
array|int Array with details of VATs (per third parties), -1 if no accountancy module, -2 if not yet developed, -3 if error

Definition at line 112 of file tax.lib.php.

References dol_get_first_day(), dol_get_last_day(), dol_print_error(), dol_syslog(), and getDolGlobalString().

◆ tax_prepare_head()

tax_prepare_head ( ChargeSociales $object)

Prepare array with list of tabs.

Parameters
ChargeSociales$objectObject related to tabs
Returns
array Array of tabs to show

Definition at line 38 of file tax.lib.php.

References $object, complete_head_from_modules(), Link\count(), dol_dir_list(), dol_sanitizeFileName(), and getDolGlobalString().