dolibarr  20.0.0-beta
Public Member Functions | Static Public Member Functions | List of all members
AccountancyExport Class Reference

Manage the different format accountancy export. More...

Collaboration diagram for AccountancyExport:
Collaboration graph
[legend]

Public Member Functions

 __construct (DoliDB $db)
 Constructor. More...
 
 getType ($mode=0)
 Array with all export type available (key + label) More...
 
 getTypeConfig ()
 Array with all export type available (key + label) and parameters for config. More...
 
 getMimeType ($formatexportset)
 Return the MIME type of a file. More...
 
 export (&$TData, $formatexportset, $withAttachment=0, $downloadMode=0, $outputMode=0, $noouput=0)
 Function who chose which export to use with the default config, and make the export into a file. More...
 
 exportCegid ($objectLines, $exportFile=null)
 Export format : CEGID. More...
 
 exportCogilog ($objectLines, $exportFile=null)
 Export format : COGILOG Last review for this format : 2022-07-12 Alexandre Spangaro (aspan.nosp@m.garo.nosp@m.@open.nosp@m.-dsi.nosp@m..fr) More...
 
 exportCoala ($objectLines, $exportFile=null)
 Export format : COALA. More...
 
 exportBob50 ($objectLines, $exportFile=null)
 Export format : BOB50. More...
 
 exportCiel ($objectLines, $exportFile=null)
 Export format : CIEL (Format XIMPORT) Format since 2003 compatible CIEL version > 2002 / Sage50 Last review for this format : 2021-09-13 Alexandre Spangaro (aspan.nosp@m.garo.nosp@m.@open.nosp@m.-dsi.nosp@m..fr) More...
 
 exportQuadratus ($objectLines, $exportFile=null, $archiveFileList=array(), $withAttachment=0)
 Export format : Quadratus (Format ASCII) Format since 2015 compatible QuadraCOMPTA Last review for this format : 2023/10/12 Alexandre Spangaro (aspan.nosp@m.garo.nosp@m.@open.nosp@m.-dsi.nosp@m..fr) More...
 
 exportWinfic ($objectLines, $exportFile=null)
 Export format : WinFic - eWinfic - WinSis Compta Last review for this format : 2022-11-01 Alexandre Spangaro (aspan.nosp@m.garo.nosp@m.@open.nosp@m.-dsi.nosp@m..fr) More...
 
 exportEbp ($objectLines, $exportFile=null)
 Export format : EBP. More...
 
 exportAgiris ($objectLines, $exportFile=null)
 Export format : Agiris Isacompta. More...
 
 exportOpenConcerto ($objectLines, $exportFile=null)
 Export format : OpenConcerto. More...
 
 exportConfigurable ($objectLines, $exportFile=null)
 Export format : Configurable CSV. More...
 
 exportFEC ($objectLines, $exportFile=null, $archiveFileList=array(), $withAttachment=0)
 Export format : FEC Last review for this format : 2023/10/12 Alexandre Spangaro (aspan.nosp@m.garo.nosp@m.@open.nosp@m.-dsi.nosp@m..fr) More...
 
 exportFEC2 ($objectLines, $exportFile=null, $archiveFileList=array(), $withAttachment=0)
 Export format : FEC2 Last review for this format : 2023/10/12 Alexandre Spangaro (aspan.nosp@m.garo.nosp@m.@open.nosp@m.-dsi.nosp@m..fr) More...
 
 exportSAGE50SWISS ($objectLines, $exportFile=null)
 Export format : SAGE50SWISS. More...
 
 exportLDCompta ($objectLines, $exportFile=null)
 Export format : LD Compta version 9 http://www.ldsysteme.fr/fileadmin/telechargement/np/ldcompta/Documentation/IntCptW9.pdf. More...
 
 exportLDCompta10 ($objectLines, $exportFile=null)
 Export format : LD Compta version 10 & higher Last review for this format : 08-15-2021 Alexandre Spangaro (aspan.nosp@m.garo.nosp@m.@open.nosp@m.-dsi.nosp@m..fr) More...
 
 exportCharlemagne ($objectLines, $exportFile=null)
 Export format : Charlemagne. More...
 
 exportGestimumV3 ($objectLines, $exportFile=null)
 Export format : Gestimum V3. More...
 
 exportGestimumV5 ($objectLines, $exportFile=null)
 Export format : Gestimum V5. More...
 
 exportiSuiteExpert ($objectLines, $exportFile=null)
 Export format : iSuite Expert. More...
 

Static Public Member Functions

static getFormatCode ($type)
 Return string to summarize the format (Used to generated export filename) More...
 
static trunc ($str, $size)
 trunc More...
 
static toAnsi ($str, $size=-1)
 toAnsi More...
 

Detailed Description

Manage the different format accountancy export.

Definition at line 49 of file accountancyexport.class.php.

Constructor & Destructor Documentation

◆ __construct()

AccountancyExport::__construct ( DoliDB  $db)

Constructor.

Parameters
DoliDB$dbDatabase handler

Definition at line 105 of file accountancyexport.class.php.

Member Function Documentation

◆ export()

AccountancyExport::export ( $TData,
  $formatexportset,
  $withAttachment = 0,
  $downloadMode = 0,
  $outputMode = 0,
  $noouput = 0 
)

Function who chose which export to use with the default config, and make the export into a file.

Parameters
array$TDataArray with data
int$formatexportsetId of export format
int$withAttachment[=0] Not add files or 1 to have attached in an archive (ex : Quadratus) - Force output mode to write in a file (output mode = 1)
int$downloadMode[=0] Direct download. Deprecated. Always use value 1. or 1 to download after writing files - Forced by default when use withAttachment = 1 or -1 not to download files
int$outputMode[=0] Print on screen. Deprecated. Always use value 1. or 1 to write in file and uses the temp directory - Forced by default when use withAttachment = 1 or 2 to write in file a default export directory (accounting/export/)
int$noouput0=old mode. Deprecated. Always use value 1. or 1=Do not output the file on stdout with this method. This must always be done by the main page, never by a method.
Returns
int Return integer <0 if KO, >0 OK. The property ->generatedfile is also filled.

Definition at line 355 of file accountancyexport.class.php.

◆ exportAgiris()

AccountancyExport::exportAgiris (   $objectLines,
  $exportFile = null 
)

Export format : Agiris Isacompta.

Parameters
array$objectLinesdata
resource$exportFile[=null] File resource to export or print if null
Returns
void

Definition at line 1212 of file accountancyexport.class.php.

◆ exportBob50()

AccountancyExport::exportBob50 (   $objectLines,
  $exportFile = null 
)

Export format : BOB50.

Parameters
array$objectLinesdata
resource$exportFile[=null] File resource to export or print if null
Returns
void

Definition at line 758 of file accountancyexport.class.php.

◆ exportCegid()

AccountancyExport::exportCegid (   $objectLines,
  $exportFile = null 
)

Export format : CEGID.

Parameters
array$objectLinesdata
resource$exportFile[=null] File resource to export or print if null
Returns
void

Definition at line 621 of file accountancyexport.class.php.

◆ exportCharlemagne()

AccountancyExport::exportCharlemagne (   $objectLines,
  $exportFile = null 
)

Export format : Charlemagne.

Parameters
array$objectLinesdata
resource$exportFile[=null] File resource to export or print if null
Returns
void

Definition at line 2336 of file accountancyexport.class.php.

◆ exportCiel()

AccountancyExport::exportCiel (   $objectLines,
  $exportFile = null 
)

Export format : CIEL (Format XIMPORT) Format since 2003 compatible CIEL version > 2002 / Sage50 Last review for this format : 2021-09-13 Alexandre Spangaro (aspan.nosp@m.garo.nosp@m.@open.nosp@m.-dsi.nosp@m..fr)

Help : https://sage50c.online-help.sage.fr/aide-technique/ In sage software | Use menu : "Exchange" > "Importing entries..."

If you want to force filename to "XIMPORT.TXT" for automatically import file present in a directory : use constant ACCOUNTING_EXPORT_XIMPORT_FORCE_FILENAME

Parameters
array$objectLinesdata
resource$exportFile[=null] File resource to export or print if null
Returns
void

Definition at line 813 of file accountancyexport.class.php.

◆ exportCoala()

AccountancyExport::exportCoala (   $objectLines,
  $exportFile = null 
)

Export format : COALA.

Parameters
array$objectLinesdata
resource$exportFile[=null] File resource to export or print if null
Returns
void

Definition at line 721 of file accountancyexport.class.php.

◆ exportCogilog()

AccountancyExport::exportCogilog (   $objectLines,
  $exportFile = null 
)

Export format : COGILOG Last review for this format : 2022-07-12 Alexandre Spangaro (aspan.nosp@m.garo.nosp@m.@open.nosp@m.-dsi.nosp@m..fr)

Parameters
array$objectLinesdata
resource$exportFile[=null] File resource to export or print if null
Returns
void

Definition at line 657 of file accountancyexport.class.php.

◆ exportConfigurable()

AccountancyExport::exportConfigurable (   $objectLines,
  $exportFile = null 
)

Export format : Configurable CSV.

Parameters
array$objectLinesdata
resource$exportFile[=null] File resource to export or print if null
Returns
void

Definition at line 1297 of file accountancyexport.class.php.

◆ exportEbp()

AccountancyExport::exportEbp (   $objectLines,
  $exportFile = null 
)

Export format : EBP.

Parameters
array$objectLinesdata
resource$exportFile[=null] File resource to export or print if null
Returns
void

Definition at line 1169 of file accountancyexport.class.php.

◆ exportFEC()

AccountancyExport::exportFEC (   $objectLines,
  $exportFile = null,
  $archiveFileList = array(),
  $withAttachment = 0 
)

Export format : FEC Last review for this format : 2023/10/12 Alexandre Spangaro (aspan.nosp@m.garo.nosp@m.@open.nosp@m.-dsi.nosp@m..fr)

Help to import in your software: https://wiki.dolibarr.org/index.php?title=Module_Comptabilit%C3%A9_en_Partie_Double#Exports_avec_fichiers_sources

Parameters
array$objectLinesdata
resource$exportFile[=null] File resource to export or print if null
array$archiveFileList[=array()] Archive file list : array of ['path', 'name']
int$withAttachment[=0] Not add files or 1 to have attached in an archive
Returns
array Archive file list : array of ['path', 'name']

Definition at line 1340 of file accountancyexport.class.php.

◆ exportFEC2()

AccountancyExport::exportFEC2 (   $objectLines,
  $exportFile = null,
  $archiveFileList = array(),
  $withAttachment = 0 
)

Export format : FEC2 Last review for this format : 2023/10/12 Alexandre Spangaro (aspan.nosp@m.garo.nosp@m.@open.nosp@m.-dsi.nosp@m..fr)

Help to import in your software: https://wiki.dolibarr.org/index.php?title=Module_Comptabilit%C3%A9_en_Partie_Double#Exports_avec_fichiers_sources

Parameters
array$objectLinesdata
resource$exportFile[=null] File resource to export or print if null
array$archiveFileList[=array()] Archive file list : array of ['path', 'name']
int$withAttachment[=0] Not add files or 1 to have attached in an archive
Returns
array Archive file list : array of ['path', 'name']

Definition at line 1553 of file accountancyexport.class.php.

◆ exportGestimumV3()

AccountancyExport::exportGestimumV3 (   $objectLines,
  $exportFile = null 
)

Export format : Gestimum V3.

Parameters
array$objectLinesdata
resource$exportFile[=null] File resource to export or print if null
Returns
void

Definition at line 2414 of file accountancyexport.class.php.

◆ exportGestimumV5()

AccountancyExport::exportGestimumV5 (   $objectLines,
  $exportFile = null 
)

Export format : Gestimum V5.

Parameters
array$objectLinesdata
resource$exportFile[=null] File resource to export or print if null
Returns
void

Definition at line 2522 of file accountancyexport.class.php.

◆ exportiSuiteExpert()

AccountancyExport::exportiSuiteExpert (   $objectLines,
  $exportFile = null 
)

Export format : iSuite Expert.

by OpenSolus [https://opensolus.fr]

Parameters
array$objectLinesdata
resource$exportFile[=null] File resource to export or print if null
Returns
void

Definition at line 2573 of file accountancyexport.class.php.

◆ exportLDCompta()

AccountancyExport::exportLDCompta (   $objectLines,
  $exportFile = null 
)

Export format : LD Compta version 9 http://www.ldsysteme.fr/fileadmin/telechargement/np/ldcompta/Documentation/IntCptW9.pdf.

Parameters
array$objectLinesdata
resource$exportFile[=null] File resource to export or print if null
Returns
void

Definition at line 1916 of file accountancyexport.class.php.

◆ exportLDCompta10()

AccountancyExport::exportLDCompta10 (   $objectLines,
  $exportFile = null 
)

Export format : LD Compta version 10 & higher Last review for this format : 08-15-2021 Alexandre Spangaro (aspan.nosp@m.garo.nosp@m.@open.nosp@m.-dsi.nosp@m..fr)

Help : http://www.ldsysteme.fr/fileadmin/telechargement/np/ldcompta/Documentation/IntCptW10.pdf

Parameters
array$objectLinesdata
resource$exportFile[=null] File resource to export or print if null
Returns
void

Definition at line 2056 of file accountancyexport.class.php.

◆ exportOpenConcerto()

AccountancyExport::exportOpenConcerto (   $objectLines,
  $exportFile = null 
)

Export format : OpenConcerto.

Parameters
array$objectLinesdata
resource$exportFile[=null] File resource to export or print if null
Returns
void

Definition at line 1259 of file accountancyexport.class.php.

◆ exportQuadratus()

AccountancyExport::exportQuadratus (   $objectLines,
  $exportFile = null,
  $archiveFileList = array(),
  $withAttachment = 0 
)

Export format : Quadratus (Format ASCII) Format since 2015 compatible QuadraCOMPTA Last review for this format : 2023/10/12 Alexandre Spangaro (aspan.nosp@m.garo.nosp@m.@open.nosp@m.-dsi.nosp@m..fr)

Information on format: https://docplayer.fr/20769649-Fichier-d-entree-ascii-dans-quadracompta.html Help to import in Quadra: https://wiki.dolibarr.org/index.php?title=Module_Comptabilit%C3%A9_en_Partie_Double#Import_vers_CEGID_Quadra In QuadraCompta | Use menu : "Outils" > "Suivi des dossiers" > "Import ASCII(Compta)"

Parameters
array$objectLinesdata
resource$exportFile[=null] File resource to export or print if null
array$archiveFileList[=array()] Archive file list : array of ['path', 'name']
int$withAttachment[=0] Not add files or 1 to have attached in an archive
Returns
array Archive file list : array of ['path', 'name']

Definition at line 868 of file accountancyexport.class.php.

◆ exportSAGE50SWISS()

AccountancyExport::exportSAGE50SWISS (   $objectLines,
  $exportFile = null 
)

Export format : SAGE50SWISS.

https://onlinehelp.sageschweiz.ch/default.aspx?tabid=19984 http://media.topal.ch/Public/Schnittstellen/TAF/Specification/Sage50-TAF-format.pdf

Parameters
array$objectLinesdata
resource$exportFile[=null] File resource to export or print if null
Returns
void

Definition at line 1762 of file accountancyexport.class.php.

◆ exportWinfic()

AccountancyExport::exportWinfic (   $objectLines,
  $exportFile = null 
)

Export format : WinFic - eWinfic - WinSis Compta Last review for this format : 2022-11-01 Alexandre Spangaro (aspan.nosp@m.garo.nosp@m.@open.nosp@m.-dsi.nosp@m..fr)

Help : https://wiki.gestan.fr/lib/exe/fetch.php?media=wiki:v15:compta:accountancy-format_winfic-ewinfic-winsiscompta.pdf

Parameters
array$objectLinesdata
resource$exportFile[=null] File resource to export or print if null
Returns
void

Definition at line 1087 of file accountancyexport.class.php.

◆ getFormatCode()

static AccountancyExport::getFormatCode (   $type)
static

Return string to summarize the format (Used to generated export filename)

Parameters
int$typeFormat id
Returns
string Format code

Definition at line 183 of file accountancyexport.class.php.

◆ getMimeType()

AccountancyExport::getMimeType (   $formatexportset)

Return the MIME type of a file.

Parameters
int$formatexportsetId of export format
Returns
string MIME type.

Definition at line 324 of file accountancyexport.class.php.

◆ getType()

AccountancyExport::getType (   $mode = 0)

Array with all export type available (key + label)

Parameters
int$modeMode of list: 0=flat list, 1=rich list
Returns
array of type

Definition at line 122 of file accountancyexport.class.php.

◆ getTypeConfig()

AccountancyExport::getTypeConfig ( )

Array with all export type available (key + label) and parameters for config.

Returns
array of type

Definition at line 221 of file accountancyexport.class.php.

◆ toAnsi()

static AccountancyExport::toAnsi (   $str,
  $size = -1 
)
static

toAnsi

Parameters
string$strOriginal string to encode and optionally truncate
integer$sizeTruncate string after $size characters
Returns
string String encoded in Windows-1251 charset

Definition at line 2645 of file accountancyexport.class.php.

References dol_string_nohtmltag(), and dol_substr().

◆ trunc()

static AccountancyExport::trunc (   $str,
  $size 
)
static

trunc

Parameters
string$strString
integer$sizeData to trunc
Returns
string

Definition at line 2633 of file accountancyexport.class.php.

References dol_trunc().


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