dolibarr 19.0.3
Accountancy Class Reference
Inheritance diagram for Accountancy:
Collaboration diagram for Accountancy:

Public Member Functions

 __construct ()
 Constructor.
 
 exportData ($period, $date_min='', $date_max='', $format='', $lettering=0, $alreadyexport=0, $notnotifiedasexport=0)
 Accountancy export data.
 
- Public Member Functions inherited from DolibarrApi
 __construct ($db, $cachedir='', $refreshCache=false)
 Constructor.
 

Additional Inherited Members

- Protected Member Functions inherited from DolibarrApi
 _checkValForAPI ($field, $value, $object)
 Check and convert a string depending on its type/name.
 
 _filterObjectProperties ($object, $properties)
 Filter properties that will be returned on object.
 
 _cleanObjectDatas ($object)
 Clean sensible object datas.
 
 _checkFilters ($sqlfilters, &$error='')
 Return if a $sqlfilters parameter is valid Function no more used.
 
- Static Protected Member Functions inherited from DolibarrApi
static _checkAccessToResource ($resource, $resource_id=0, $dbtablename='', $feature2='', $dbt_keyfield='fk_soc', $dbt_select='rowid')
 Check access by user to a given resource.
 
static _forge_criteria_callback ($matches)
 Function to forge a SQL criteria from a Generic filter string.
 

Detailed Description

Definition at line 29 of file api_accountancy.class.php.

Member Function Documentation

◆ exportData()

Accountancy::exportData ( $period,
$date_min = '',
$date_max = '',
$format = '',
$lettering = 0,
$alreadyexport = 0,
$notnotifiedasexport = 0 )

Accountancy export data.

Parameters
string$periodPeriod : 'lastmonth', 'currentmonth', 'last3months', 'last6months', 'currentyear', 'lastyear', 'fiscalyear', 'lastfiscalyear', 'actualandlastfiscalyear' or 'custom' (see above)
string$date_min[=''] Start date of period if 'custom' is set in period parameter Date format is 'YYYY-MM-DD'
string$date_max[=''] End date of period if 'custom' is set in period parameter Date format is 'YYYY-MM-DD'
string$format[=''] by default uses '1' for 'Configurable (CSV)' for format number or '1000' for FEC or '1010' for FEC2 (see AccountancyExport class)
int$lettering[=0] by default don't export or 1 to export lettering data (columns 'letterring_code' and 'date_lettering' returns empty or not)
int$alreadyexport[=0] by default export data only if it's not yet exported or 1 already exported (always export data even if 'date_export" is set)
int$notnotifiedasexport[=0] by default notified as exported or 1 not notified as exported (when the export is done, notified or not the column 'date_export')
Returns
string

@url GET exportdata

Exceptions
RestException401 Insufficient rights
RestException404 Accountancy export period not found
RestException404 Accountancy export start or end date not defined
RestException404 Accountancy export format not found
RestException500 Error on accountancy export

Definition at line 90 of file api_accountancy.class.php.

References dol_get_last_day(), dol_get_prev_month(), dol_getdate(), dol_mktime(), dol_now(), dol_time_plus_duree(), and getCurrentPeriodOfFiscalYear().


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