36 require_once DOL_DOCUMENT_ROOT.
'/core/lib/functions.lib.php';
37 require_once DOL_DOCUMENT_ROOT.
'/core/lib/functions2.lib.php';
38 require_once DOL_DOCUMENT_ROOT.
'/core/class/hookmanager.class.php';
47 public static $EXPORT_TYPE_CONFIGURABLE = 1;
48 public static $EXPORT_TYPE_AGIRIS = 10;
49 public static $EXPORT_TYPE_EBP = 15;
50 public static $EXPORT_TYPE_CEGID = 20;
51 public static $EXPORT_TYPE_COGILOG = 25;
52 public static $EXPORT_TYPE_COALA = 30;
53 public static $EXPORT_TYPE_BOB50 = 35;
54 public static $EXPORT_TYPE_CIEL = 40;
55 public static $EXPORT_TYPE_SAGE50_SWISS = 45;
56 public static $EXPORT_TYPE_CHARLEMAGNE = 50;
57 public static $EXPORT_TYPE_QUADRATUS = 60;
58 public static $EXPORT_TYPE_WINFIC = 70;
59 public static $EXPORT_TYPE_OPENCONCERTO = 100;
60 public static $EXPORT_TYPE_LDCOMPTA = 110;
61 public static $EXPORT_TYPE_LDCOMPTA10 = 120;
62 public static $EXPORT_TYPE_GESTIMUMV3 = 130;
63 public static $EXPORT_TYPE_GESTIMUMV5 = 135;
64 public static $EXPORT_TYPE_ISUITEEXPERT = 200;
66 public static $EXPORT_TYPE_FEC = 1000;
67 public static $EXPORT_TYPE_FEC2 = 1010;
77 public $errors = array();
83 public $separator =
'';
89 public $end_line =
'';
98 global $conf, $hookmanager;
101 $this->separator = $conf->global->ACCOUNTING_EXPORT_SEPARATORCSV;
102 $this->end_line = empty($conf->global->ACCOUNTING_EXPORT_ENDLINE) ?
"\n" : ($conf->global->ACCOUNTING_EXPORT_ENDLINE == 1 ?
"\n" :
"\r\n");
104 $hookmanager->initHooks(array(
'accountancyexport'));
114 global $langs, $hookmanager;
116 $listofexporttypes = array(
117 self::$EXPORT_TYPE_CONFIGURABLE => $langs->trans(
'Modelcsv_configurable'),
118 self::$EXPORT_TYPE_CEGID => $langs->trans(
'Modelcsv_CEGID'),
119 self::$EXPORT_TYPE_COALA => $langs->trans(
'Modelcsv_COALA'),
120 self::$EXPORT_TYPE_BOB50 => $langs->trans(
'Modelcsv_bob50'),
121 self::$EXPORT_TYPE_CIEL => $langs->trans(
'Modelcsv_ciel'),
122 self::$EXPORT_TYPE_QUADRATUS => $langs->trans(
'Modelcsv_quadratus'),
123 self::$EXPORT_TYPE_WINFIC => $langs->trans(
'Modelcsv_winfic'),
124 self::$EXPORT_TYPE_EBP => $langs->trans(
'Modelcsv_ebp'),
125 self::$EXPORT_TYPE_COGILOG => $langs->trans(
'Modelcsv_cogilog'),
126 self::$EXPORT_TYPE_AGIRIS => $langs->trans(
'Modelcsv_agiris'),
127 self::$EXPORT_TYPE_OPENCONCERTO => $langs->trans(
'Modelcsv_openconcerto'),
128 self::$EXPORT_TYPE_SAGE50_SWISS => $langs->trans(
'Modelcsv_Sage50_Swiss'),
129 self::$EXPORT_TYPE_CHARLEMAGNE => $langs->trans(
'Modelcsv_charlemagne'),
130 self::$EXPORT_TYPE_LDCOMPTA => $langs->trans(
'Modelcsv_LDCompta'),
131 self::$EXPORT_TYPE_LDCOMPTA10 => $langs->trans(
'Modelcsv_LDCompta10'),
132 self::$EXPORT_TYPE_GESTIMUMV3 => $langs->trans(
'Modelcsv_Gestinumv3'),
133 self::$EXPORT_TYPE_GESTIMUMV5 => $langs->trans(
'Modelcsv_Gestinumv5'),
134 self::$EXPORT_TYPE_FEC => $langs->trans(
'Modelcsv_FEC'),
135 self::$EXPORT_TYPE_FEC2 => $langs->trans(
'Modelcsv_FEC2'),
136 self::$EXPORT_TYPE_ISUITEEXPERT =>
'Export iSuite Expert',
140 $parameters = array();
141 $reshook = $hookmanager->executeHooks(
'getType', $parameters, $listofexporttypes);
143 ksort($listofexporttypes, SORT_NUMERIC);
145 return $listofexporttypes;
157 self::$EXPORT_TYPE_CONFIGURABLE =>
'csv',
158 self::$EXPORT_TYPE_CEGID =>
'cegid',
159 self::$EXPORT_TYPE_COALA =>
'coala',
160 self::$EXPORT_TYPE_BOB50 =>
'bob50',
161 self::$EXPORT_TYPE_CIEL =>
'ciel',
162 self::$EXPORT_TYPE_QUADRATUS =>
'quadratus',
163 self::$EXPORT_TYPE_WINFIC =>
'winfic',
164 self::$EXPORT_TYPE_EBP =>
'ebp',
165 self::$EXPORT_TYPE_COGILOG =>
'cogilog',
166 self::$EXPORT_TYPE_AGIRIS =>
'agiris',
167 self::$EXPORT_TYPE_OPENCONCERTO =>
'openconcerto',
168 self::$EXPORT_TYPE_SAGE50_SWISS =>
'sage50ch',
169 self::$EXPORT_TYPE_CHARLEMAGNE =>
'charlemagne',
170 self::$EXPORT_TYPE_LDCOMPTA =>
'ldcompta',
171 self::$EXPORT_TYPE_LDCOMPTA10 =>
'ldcompta10',
172 self::$EXPORT_TYPE_GESTIMUMV3 =>
'gestimumv3',
173 self::$EXPORT_TYPE_GESTIMUMV5 =>
'gestimumv5',
174 self::$EXPORT_TYPE_FEC =>
'fec',
175 self::$EXPORT_TYPE_FEC2 =>
'fec2',
176 self::$EXPORT_TYPE_ISUITEEXPERT =>
'isuiteexpert',
180 $code = $formatcode[$type];
181 $parameters = array(
'type' => $type);
182 $reshook = $hookmanager->executeHooks(
'getFormatCode', $parameters, $code);
194 global $conf, $langs;
196 $exporttypes = array(
198 self::$EXPORT_TYPE_CONFIGURABLE => array(
199 'label' => $langs->trans(
'Modelcsv_configurable'),
200 'ACCOUNTING_EXPORT_FORMAT' => empty($conf->global->ACCOUNTING_EXPORT_FORMAT) ?
'txt' : $conf->global->ACCOUNTING_EXPORT_FORMAT,
201 'ACCOUNTING_EXPORT_SEPARATORCSV' => empty($conf->global->ACCOUNTING_EXPORT_SEPARATORCSV) ?
',' : $conf->global->ACCOUNTING_EXPORT_SEPARATORCSV,
202 'ACCOUNTING_EXPORT_ENDLINE' => empty($conf->global->ACCOUNTING_EXPORT_ENDLINE) ? 1 : $conf->global->ACCOUNTING_EXPORT_ENDLINE,
203 'ACCOUNTING_EXPORT_DATE' => empty($conf->global->ACCOUNTING_EXPORT_DATE) ?
'%d%m%Y' : $conf->global->ACCOUNTING_EXPORT_DATE,
205 self::$EXPORT_TYPE_CEGID => array(
206 'label' => $langs->trans(
'Modelcsv_CEGID'),
208 self::$EXPORT_TYPE_COALA => array(
209 'label' => $langs->trans(
'Modelcsv_COALA'),
211 self::$EXPORT_TYPE_BOB50 => array(
212 'label' => $langs->trans(
'Modelcsv_bob50'),
214 self::$EXPORT_TYPE_CIEL => array(
215 'label' => $langs->trans(
'Modelcsv_ciel'),
216 'ACCOUNTING_EXPORT_FORMAT' =>
'txt',
218 self::$EXPORT_TYPE_QUADRATUS => array(
219 'label' => $langs->trans(
'Modelcsv_quadratus'),
220 'ACCOUNTING_EXPORT_FORMAT' =>
'txt',
222 self::$EXPORT_TYPE_WINFIC => array(
223 'label' => $langs->trans(
'Modelcsv_winfic'),
224 'ACCOUNTING_EXPORT_FORMAT' =>
'txt',
226 self::$EXPORT_TYPE_EBP => array(
227 'label' => $langs->trans(
'Modelcsv_ebp'),
229 self::$EXPORT_TYPE_COGILOG => array(
230 'label' => $langs->trans(
'Modelcsv_cogilog'),
232 self::$EXPORT_TYPE_AGIRIS => array(
233 'label' => $langs->trans(
'Modelcsv_agiris'),
235 self::$EXPORT_TYPE_OPENCONCERTO => array(
236 'label' => $langs->trans(
'Modelcsv_openconcerto'),
238 self::$EXPORT_TYPE_SAGE50_SWISS => array(
239 'label' => $langs->trans(
'Modelcsv_Sage50_Swiss'),
241 self::$EXPORT_TYPE_CHARLEMAGNE => array(
242 'label' => $langs->trans(
'Modelcsv_charlemagne'),
243 'ACCOUNTING_EXPORT_FORMAT' =>
'txt',
245 self::$EXPORT_TYPE_LDCOMPTA => array(
246 'label' => $langs->trans(
'Modelcsv_LDCompta'),
248 self::$EXPORT_TYPE_LDCOMPTA10 => array(
249 'label' => $langs->trans(
'Modelcsv_LDCompta10'),
251 self::$EXPORT_TYPE_GESTIMUMV3 => array(
252 'label' => $langs->trans(
'Modelcsv_Gestinumv3'),
253 'ACCOUNTING_EXPORT_FORMAT' =>
'txt',
255 self::$EXPORT_TYPE_GESTIMUMV5 => array(
256 'label' => $langs->trans(
'Modelcsv_Gestinumv5'),
257 'ACCOUNTING_EXPORT_FORMAT' =>
'txt',
259 self::$EXPORT_TYPE_FEC => array(
260 'label' => $langs->trans(
'Modelcsv_FEC'),
261 'ACCOUNTING_EXPORT_FORMAT' =>
'txt',
263 self::$EXPORT_TYPE_FEC2 => array(
264 'label' => $langs->trans(
'Modelcsv_FEC2'),
265 'ACCOUNTING_EXPORT_FORMAT' =>
'txt',
267 self::$EXPORT_TYPE_ISUITEEXPERT => array(
268 'label' =>
'iSuite Expert',
269 'ACCOUNTING_EXPORT_FORMAT' =>
'csv',
273 '1' => $langs->trans(
"Unix"),
274 '2' => $langs->trans(
"Windows")
277 'csv' => $langs->trans(
"csv"),
278 'txt' => $langs->trans(
"txt")
283 $parameters = array();
284 $reshook = $hookmanager->executeHooks(
'getTypeConfig', $parameters, $exporttypes);
296 public function export(&$TData, $formatexportset)
298 global $conf, $langs;
299 global $search_date_end;
302 $filename =
'general_ledger-'.$this->getFormatCode($formatexportset);
303 $type_export =
'general_ledger';
306 include DOL_DOCUMENT_ROOT.
'/accountancy/tpl/export_journal.tpl.php';
309 switch ($formatexportset) {
310 case self::$EXPORT_TYPE_CONFIGURABLE:
313 case self::$EXPORT_TYPE_CEGID:
316 case self::$EXPORT_TYPE_COALA:
319 case self::$EXPORT_TYPE_BOB50:
322 case self::$EXPORT_TYPE_CIEL:
325 case self::$EXPORT_TYPE_QUADRATUS:
328 case self::$EXPORT_TYPE_WINFIC:
331 case self::$EXPORT_TYPE_EBP:
334 case self::$EXPORT_TYPE_COGILOG:
337 case self::$EXPORT_TYPE_AGIRIS:
340 case self::$EXPORT_TYPE_OPENCONCERTO:
343 case self::$EXPORT_TYPE_SAGE50_SWISS:
346 case self::$EXPORT_TYPE_CHARLEMAGNE:
349 case self::$EXPORT_TYPE_LDCOMPTA:
352 case self::$EXPORT_TYPE_LDCOMPTA10:
355 case self::$EXPORT_TYPE_GESTIMUMV3:
358 case self::$EXPORT_TYPE_GESTIMUMV5:
361 case self::$EXPORT_TYPE_FEC:
364 case self::$EXPORT_TYPE_FEC2:
367 case self::$EXPORT_TYPE_ISUITEEXPERT :
372 $parameters = array(
'format' => $formatexportset);
374 $reshook = $hookmanager->executeHooks(
'export', $parameters, $TData);
376 $this->errors[] = $langs->trans(
'accountancy_error_modelnotfound');
391 foreach ($objectLines as $line) {
396 print $date.$separator;
397 print $line->code_journal.$separator;
400 print $line->sens.$separator;
401 print
price2fec(abs($line->debit - $line->credit)).$separator;
416 foreach ($objectLines as $line) {
421 print $line->code_journal.$separator;
422 print $date.$separator;
423 print $line->piece_num.$separator;
426 print $line->label_operation.$separator;
427 print $date.$separator;
428 if ($line->sens ==
'D') {
429 print
price($line->debit).$separator;
431 } elseif ($line->sens ==
'C') {
433 print
price($line->credit).$separator;
435 print $line->doc_ref.$separator;
436 print $line->label_operation.$separator;
453 foreach ($objectLines as $line) {
456 print $date.$separator;
457 print $line->code_journal.$separator;
459 print $line->piece_num.$separator;
460 print $line->doc_ref.$separator;
461 print
price($line->debit).$separator;
462 print
price($line->credit).$separator;
463 print
'E'.$separator;
482 foreach ($objectLines as $line) {
483 print $line->piece_num.$separator;
485 print $date.$separator;
487 if (empty($line->subledger_account)) {
488 print
'G'.$separator;
491 if (substr($line->numero_compte, 0, 3) ==
'411') {
492 print
'C'.$separator;
494 if (substr($line->numero_compte, 0, 3) ==
'401') {
495 print
'F'.$separator;
500 print
price($line->debit).$separator;
501 print
price($line->credit).$separator;
502 print
dol_trunc($line->label_operation, 32).$separator;
527 foreach ($TData as $data) {
529 if (!empty($data->subledger_account)) {
534 $date_echeance =
dol_print_date($data->date_lim_reglement,
'%Y%m%d');
537 $Tab[
'num_ecriture'] = str_pad($data->piece_num, 5);
538 $Tab[
'code_journal'] = str_pad(self::trunc($data->code_journal, 2), 2);
539 $Tab[
'date_ecriture'] = str_pad($date_document, 8,
' ', STR_PAD_LEFT);
540 $Tab[
'date_echeance'] = str_pad($date_echeance, 8,
' ', STR_PAD_LEFT);
541 $Tab[
'num_piece'] = str_pad(self::trunc($data->doc_ref, 12), 12);
542 $Tab[
'num_compte'] = str_pad(self::trunc($code_compta, 11), 11);
543 $Tab[
'libelle_ecriture'] = str_pad(self::trunc(
dol_string_unaccent($data->doc_ref).dol_string_unaccent($data->label_operation), 25), 25);
544 $Tab[
'montant'] = str_pad(
price2fec(abs($data->debit - $data->credit)), 13,
' ', STR_PAD_LEFT);
545 $Tab[
'type_montant'] = str_pad($data->sens, 1);
546 $Tab[
'vide'] = str_repeat(
' ', 18);
547 $Tab[
'intitule_compte'] = str_pad(self::trunc(
dol_string_unaccent($data->label_operation), 34), 34);
548 $Tab[
'end'] =
'O2003';
550 $Tab[
'end_line'] = $end_line;
577 foreach ($TData as $data) {
578 $code_compta = $data->numero_compte;
579 if (!empty($data->subledger_account)) {
580 $code_compta = $data->subledger_account;
585 if (!empty($data->subledger_account)) {
586 $Tab[
'type_ligne'] =
'C';
587 $Tab[
'num_compte'] = str_pad(self::trunc($data->subledger_account, 8), 8);
588 $Tab[
'lib_compte'] = str_pad(self::trunc($data->subledger_label, 30), 30);
590 if ($data->doc_type ==
'customer_invoice') {
591 $Tab[
'lib_alpha'] = strtoupper(str_pad(
'C'.self::trunc($data->subledger_label, 6), 6));
592 $Tab[
'filler'] = str_repeat(
' ', 52);
593 $Tab[
'coll_compte'] = str_pad(self::trunc($conf->global->ACCOUNTING_ACCOUNT_CUSTOMER, 8), 8);
594 } elseif ($data->doc_type ==
'supplier_invoice') {
595 $Tab[
'lib_alpha'] = strtoupper(str_pad(
'F'.self::trunc($data->subledger_label, 6), 6));
596 $Tab[
'filler'] = str_repeat(
' ', 52);
597 $Tab[
'coll_compte'] = str_pad(self::trunc($conf->global->ACCOUNTING_ACCOUNT_SUPPLIER, 8), 8);
599 $Tab[
'filler'] = str_repeat(
' ', 59);
600 $Tab[
'coll_compte'] = str_pad(
' ', 8);
603 $Tab[
'filler2'] = str_repeat(
' ', 110);
606 if ($data->doc_type ==
'customer_invoice') {
607 $Tab[
'type_compte'] =
'C';
608 } elseif ($data->doc_type ==
'supplier_invoice') {
609 $Tab[
'coll_compte'] =
'F';
611 $Tab[
'coll_compte'] =
'G';
614 $Tab[
'filler3'] = str_repeat(
' ', 235);
616 $Tab[
'end_line'] = $end_line;
622 $Tab[
'type_ligne'] =
'M';
623 $Tab[
'num_compte'] = str_pad(self::trunc($code_compta, 8), 8);
624 $Tab[
'code_journal'] = str_pad(self::trunc($data->code_journal, 2), 2);
625 $Tab[
'folio'] =
'000';
630 $Tab[
'date_ecriture'] =
dol_print_date($data->doc_date,
'%d%m%y');
631 $Tab[
'filler'] =
' ';
647 $Tab[
'sens'] = $data->sens;
648 $Tab[
'signe_montant'] =
'+';
651 $Tab[
'montant'] = str_pad(abs(($data->debit - $data->credit) * 100), 12,
'0', STR_PAD_LEFT);
652 $Tab[
'contrepartie'] = str_repeat(
' ', 8);
655 if (!empty($data->date_lim_reglement)) {
657 $Tab[
'date_echeance'] =
dol_print_date($data->date_lim_reglement,
'%d%m%y');
659 $Tab[
'date_echeance'] =
'000000';
664 $Tab[
'lettrage'] = str_repeat(
' ', 2);
665 $Tab[
'codestat'] = str_repeat(
' ', 3);
666 $Tab[
'num_piece'] = str_pad(self::trunc($data->piece_num, 5), 5);
670 $Tab[
'affaire'] = str_repeat(
' ', 10);
671 $Tab[
'quantity1'] = str_repeat(
' ', 10);
672 $Tab[
'num_piece2'] = str_pad(self::trunc($data->piece_num, 8), 8);
673 $Tab[
'devis'] = str_pad($conf->currency, 3);
674 $Tab[
'code_journal2'] = str_pad(self::trunc($data->code_journal, 3), 3);
675 $Tab[
'filler3'] = str_repeat(
' ', 3);
683 $Tab[
'libelle_ecriture2'] = str_pad(self::trunc(
dol_string_unaccent($data->label_operation), 30), 30);
684 $Tab[
'codetva'] = str_repeat(
' ', 2);
688 $Tab[
'num_piece3'] = substr(self::trunc($data->doc_ref, 20), -10);
689 $Tab[
'filler4'] = str_repeat(
' ', 73);
691 $Tab[
'end_line'] = $end_line;
713 foreach ($TData as $data) {
714 $code_compta = $data->numero_compte;
715 if (!empty($data->subledger_account)) {
716 $code_compta = $data->subledger_account;
721 $Tab[
'code_journal'] = str_pad(self::trunc($data->code_journal, 2), 2);
726 $Tab[
'date_operation'] =
dol_print_date($data->doc_date,
'%d%m%Y');
728 $Tab[
'folio'] =
' 1';
730 $Tab[
'num_ecriture'] = str_pad(self::trunc($data->piece_num, 6), 6,
' ', STR_PAD_LEFT);
732 $Tab[
'jour_ecriture'] =
dol_print_date($data->doc_date,
'%d%m%y');
734 $Tab[
'num_compte'] = str_pad(self::trunc($code_compta, 6), 6,
'0');
736 if ($data->sens ==
'D') {
737 $Tab[
'montant_debit'] = str_pad(number_format($data->debit, 2,
',',
''), 13,
' ', STR_PAD_LEFT);
739 $Tab[
'montant_crebit'] = str_pad(number_format(0, 2,
',',
''), 13,
' ', STR_PAD_LEFT);
741 $Tab[
'montant_debit'] = str_pad(number_format(0, 2,
',',
''), 13,
' ', STR_PAD_LEFT);
743 $Tab[
'montant_crebit'] = str_pad(number_format($data->credit, 2,
',',
''), 13,
' ', STR_PAD_LEFT);
748 $Tab[
'lettrage'] = str_repeat(
' ', 2);
750 $Tab[
'code_piece'] = str_repeat(
' ', 5);
752 $Tab[
'code_stat'] = str_repeat(
' ', 4);
754 if (!empty($data->date_lim_reglement)) {
756 $Tab[
'date_echeance'] =
dol_print_date($data->date_lim_reglement,
'%d%m%Y');
758 $Tab[
'date_echeance'] =
dol_print_date($data->doc_date,
'%d%m%Y');
761 $Tab[
'monnaie'] =
'1';
763 $Tab[
'filler'] =
' ';
765 $Tab[
'ind_compteur'] =
' ';
767 $Tab[
'quantite'] =
'0,000000000';
769 $Tab[
'code_pointage'] = str_repeat(
' ', 2);
771 $Tab[
'end_line'] = $end_line;
773 print implode(
'|', $Tab);
790 foreach ($objectLines as $line) {
793 print $line->id.$separator;
794 print $date.$separator;
795 print $line->code_journal.$separator;
796 if (empty($line->subledger_account)) {
797 print $line->numero_compte.$separator;
799 print $line->subledger_account.$separator;
802 print
'"'.dol_trunc($line->label_operation, 40,
'right',
'UTF-8', 1).
'"'.$separator;
803 print
'"'.dol_trunc($line->piece_num, 15,
'right',
'UTF-8', 1).
'"'.$separator;
804 print
price2num(abs($line->debit - $line->credit)).$separator;
805 print $line->sens.$separator;
806 print $date.$separator;
825 foreach ($objectLines as $line) {
828 print $line->piece_num.$separator;
829 print self::toAnsi($line->label_operation).$separator;
830 print $date.$separator;
831 print self::toAnsi($line->label_operation).$separator;
833 if (empty($line->subledger_account)) {
835 print self::toAnsi($line->label_compte).$separator;
838 print self::toAnsi($line->subledger_label).$separator;
841 print self::toAnsi($line->doc_ref).$separator;
842 print
price($line->debit).$separator;
843 print
price($line->credit).$separator;
844 print
price(abs($line->debit - $line->credit)).$separator;
845 print $line->sens.$separator;
846 print $line->lettering_code.$separator;
847 print $line->code_journal;
864 foreach ($objectLines as $line) {
867 print $date.$separator;
868 print $line->code_journal.$separator;
869 if (empty($line->subledger_account)) {
874 print $line->doc_ref.$separator;
875 print $line->label_operation.$separator;
876 print
price($line->debit).$separator;
877 print
price($line->credit).$separator;
893 $separator = $this->separator;
895 foreach ($objectLines as $line) {
898 $date =
dol_print_date($line->doc_date, $conf->global->ACCOUNTING_EXPORT_DATE);
899 $tab[] = $line->piece_num;
901 $tab[] = $line->doc_ref;
902 $tab[] = preg_match(
'/'.$separator.
'/', $line->label_operation) ?
"'".$line->label_operation.
"'" : $line->label_operation;
907 $tab[] =
price2num($line->debit - $line->credit);
908 $tab[] = $line->code_journal;
910 print implode($separator, $tab).$this->end_line;
927 print
"JournalCode".$separator;
928 print
"JournalLib".$separator;
929 print
"EcritureNum".$separator;
930 print
"EcritureDate".$separator;
931 print
"CompteNum".$separator;
932 print
"CompteLib".$separator;
933 print
"CompAuxNum".$separator;
934 print
"CompAuxLib".$separator;
935 print
"PieceRef".$separator;
936 print
"PieceDate".$separator;
937 print
"EcritureLib".$separator;
938 print
"Debit".$separator;
939 print
"Credit".$separator;
940 print
"EcritureLet".$separator;
941 print
"DateLet".$separator;
942 print
"ValidDate".$separator;
943 print
"Montantdevise".$separator;
944 print
"Idevise".$separator;
945 print
"DateLimitReglmt".$separator;
949 foreach ($objectLines as $line) {
950 if ($line->debit == 0 && $line->credit == 0) {
955 $date_lettering =
dol_print_date($line->date_lettering,
'%Y%m%d');
956 $date_validation =
dol_print_date($line->date_validation,
'%Y%m%d');
957 $date_limit_payment =
dol_print_date($line->date_lim_reglement,
'%Y%m%d');
960 if ($line->doc_type ==
'customer_invoice') {
962 require_once DOL_DOCUMENT_ROOT.
'/compta/facture/class/facture.class.php';
964 $invoice->fetch($line->fk_doc);
966 $refInvoice = $invoice->ref;
967 } elseif ($line->doc_type ==
'supplier_invoice') {
969 require_once DOL_DOCUMENT_ROOT.
'/fourn/class/fournisseur.facture.class.php';
971 $invoice->fetch($line->fk_doc);
973 $refInvoice = $invoice->ref_supplier;
977 print $line->code_journal . $separator;
983 print $line->piece_num . $separator;
986 print $date_document . $separator;
989 print $line->numero_compte . $separator;
995 print $line->subledger_account . $separator;
1001 print $line->doc_ref . $separator;
1008 $line->label_operation = str_replace(array(
"\t",
"\n",
"\r"),
" ", $line->label_operation);
1012 print
price2fec($line->debit) . $separator;
1015 print
price2fec($line->credit) . $separator;
1018 print $line->lettering_code . $separator;
1021 print $date_lettering . $separator;
1024 print $date_validation . $separator;
1027 print $line->multicurrency_amount . $separator;
1030 print $line->multicurrency_code . $separator;
1033 print $date_limit_payment . $separator;
1037 $refInvoice = str_replace(array(
"\t",
"\n",
"\r"),
" ", $refInvoice);
1038 print
dol_trunc(self::toAnsi($refInvoice), 17,
'right',
'UTF-8', 1);
1058 print
"JournalCode".$separator;
1059 print
"JournalLib".$separator;
1060 print
"EcritureNum".$separator;
1061 print
"EcritureDate".$separator;
1062 print
"CompteNum".$separator;
1063 print
"CompteLib".$separator;
1064 print
"CompAuxNum".$separator;
1065 print
"CompAuxLib".$separator;
1066 print
"PieceRef".$separator;
1067 print
"PieceDate".$separator;
1068 print
"EcritureLib".$separator;
1069 print
"Debit".$separator;
1070 print
"Credit".$separator;
1071 print
"EcritureLet".$separator;
1072 print
"DateLet".$separator;
1073 print
"ValidDate".$separator;
1074 print
"Montantdevise".$separator;
1075 print
"Idevise".$separator;
1076 print
"DateLimitReglmt".$separator;
1080 foreach ($objectLines as $line) {
1081 if ($line->debit == 0 && $line->credit == 0) {
1086 $date_lettering =
dol_print_date($line->date_lettering,
'%Y%m%d');
1087 $date_validation =
dol_print_date($line->date_validation,
'%Y%m%d');
1088 $date_limit_payment =
dol_print_date($line->date_lim_reglement,
'%Y%m%d');
1091 if ($line->doc_type ==
'customer_invoice') {
1093 require_once DOL_DOCUMENT_ROOT.
'/compta/facture/class/facture.class.php';
1095 $invoice->fetch($line->fk_doc);
1097 $refInvoice = $invoice->ref;
1098 } elseif ($line->doc_type ==
'supplier_invoice') {
1100 require_once DOL_DOCUMENT_ROOT.
'/fourn/class/fournisseur.facture.class.php';
1102 $invoice->fetch($line->fk_doc);
1104 $refInvoice = $invoice->ref_supplier;
1108 print $line->code_journal . $separator;
1114 print $line->piece_num . $separator;
1117 print $date_creation . $separator;
1132 print $line->doc_ref . $separator;
1135 print $date_document . $separator;
1139 $line->label_operation = str_replace(array(
"\t",
"\n",
"\r"),
" ", $line->label_operation);
1143 print
price2fec($line->debit) . $separator;
1146 print
price2fec($line->credit) . $separator;
1149 print $line->lettering_code . $separator;
1152 print $date_lettering . $separator;
1155 print $date_validation . $separator;
1158 print $line->multicurrency_amount . $separator;
1161 print $line->multicurrency_code . $separator;
1164 print $date_limit_payment . $separator;
1168 $refInvoice = str_replace(array(
"\t",
"\n",
"\r"),
" ", $refInvoice);
1169 print
dol_trunc(self::toAnsi($refInvoice), 17,
'right',
'UTF-8', 1);
1190 $this->separator =
',';
1191 $this->end_line =
"\r\n";
1194 print
"Blg,Datum,Kto,S/H,Grp,GKto,SId,SIdx,KIdx,BTyp,MTyp,Code,Netto,Steuer,FW-Betrag,Tx1,Tx2,PkKey,OpId,Flag";
1195 print $this->end_line;
1197 $thisPieceAccountNr =
"";
1198 $aSize = count($objectLines);
1199 foreach ($objectLines as $aIndex => $line) {
1200 $sammelBuchung =
false;
1201 if ($aIndex - 2 >= 0 && $objectLines[$aIndex - 2]->piece_num == $line->piece_num) {
1202 $sammelBuchung =
true;
1203 } elseif ($aIndex + 2 < $aSize && $objectLines[$aIndex + 2]->piece_num == $line->piece_num) {
1204 $sammelBuchung =
true;
1205 } elseif ($aIndex + 1 < $aSize
1206 && $objectLines[$aIndex + 1]->piece_num == $line->piece_num
1207 && $aIndex - 1 < $aSize
1208 && $objectLines[$aIndex - 1]->piece_num == $line->piece_num
1210 $sammelBuchung =
true;
1214 print $line->piece_num.$this->separator;
1218 print $date.$this->separator;
1223 if ($line->sens ==
'D') {
1224 print
'S'.$this->separator;
1226 print
'H'.$this->separator;
1229 print self::trunc($line->code_journal, 1).$this->separator;
1231 if (empty($line->code_tiers)) {
1232 if ($line->piece_num == $thisPieceNum) {
1235 print
"div".$this->separator;
1241 print $this->separator;
1243 print
"0".$this->separator;
1245 print
"0".$this->separator;
1247 print
"0".$this->separator;
1250 if ($sammelBuchung) {
1251 print
"2".$this->separator;
1253 print
"1".$this->separator;
1256 print
'""'.$this->separator;
1258 print abs($line->debit - $line->credit).$this->separator;
1260 print
"0.00".$this->separator;
1262 print
"0.00".$this->separator;
1264 $line1 = self::toAnsi($line->label_compte, 29);
1265 if ($line1 ==
"LIQ" || $line1 ==
"LIQ Beleg ok" || strlen($line1) <= 3) {
1268 $line2 = self::toAnsi($line->doc_ref, 29);
1269 if (strlen($line1) == 0) {
1273 if (strlen($line1) > 0 && strlen($line2) > 0 && (strlen($line1) + strlen($line2)) < 27) {
1274 $line1 = $line1.
' / '.$line2;
1278 print
'"'.self::toAnsi($line1).
'"'.$this->separator;
1280 print
'"'.self::toAnsi($line2).
'"'.$this->separator;
1282 print
"0".$this->separator;
1284 print $this->separator;
1289 print $this->end_line;
1291 if ($line->piece_num !== $thisPieceNum) {
1292 $thisPieceNum = $line->piece_num;
1293 $thisPieceAccountNr = $line->numero_compte;
1312 foreach ($objectLines as $line) {
1315 $date_lim_reglement =
dol_print_date($line->date_lim_reglement,
'%Y%m%d');
1318 $type_enregistrement =
'E';
1319 print $type_enregistrement.$separator;
1321 print substr($line->code_journal, 0, 2).$separator;
1323 print $line->id.$separator;
1325 print $line->piece_num.$separator;
1327 print $date_document.$separator;
1329 print $line->label_operation.$separator;
1331 print $date_lim_reglement.$separator;
1333 if ($line->doc_type ==
'supplier_invoice') {
1334 if (($line->debit - $line->credit) > 0) {
1335 $nature_piece =
'AF';
1337 $nature_piece =
'FF';
1339 } elseif ($line->doc_type ==
'customer_invoice') {
1340 if (($line->debit - $line->credit) < 0) {
1341 $nature_piece =
'AC';
1343 $nature_piece =
'FC';
1348 print $nature_piece.$separator;
1359 $racine_subledger_account =
'';
1362 print $racine_subledger_account.$separator;
1364 print
price(abs($line->debit - $line->credit), 0,
'', 1, 2, 2).$separator;
1366 print $line->sens.$separator;
1370 print $date_creation.$separator;
1372 print $line->lettering_code.$separator;
1374 print $line->date_lettering.$separator;
1376 if (!empty($line->subledger_account)) {
1382 if ($line->doc_type ==
'supplier_invoice' && !empty($line->subledger_account)) {
1383 print
'F'.$separator;
1384 } elseif ($line->doc_type ==
'customer_invoice' && !empty($line->subledger_account)) {
1385 print
'C'.$separator;
1398 print $line->doc_ref.$separator;
1404 print
'0'.$separator;
1408 print
'0'.$separator;
1442 require_once DOL_DOCUMENT_ROOT.
'/core/lib/company.lib.php';
1446 $last_codeinvoice =
'';
1448 foreach ($objectLines as $line) {
1450 if ($last_codeinvoice != $line->doc_ref) {
1452 $sql =
"SELECT code_client, fk_forme_juridique, nom, address, zip, town, fk_pays, phone, siret FROM ".MAIN_DB_PREFIX.
"societe";
1453 $sql .=
" WHERE code_client = '".$this->db->escape($line->thirdparty_code).
"'";
1457 $soc = $this->
db->fetch_object(
$resql);
1459 $address = array(
'',
'',
'');
1460 if (strpos($soc->address,
"\n") !==
false) {
1461 $address = explode(
"\n", $soc->address);
1462 if (is_array($address) && count($address) > 0) {
1463 foreach ($address as $key => $data) {
1464 $address[$key] = str_replace(array(
"\t",
"\n",
"\r"),
"", $data);
1465 $address[$key] =
dol_trunc($address[$key], 40,
'right',
'UTF-8', 1);
1469 $address[0] = substr(str_replace(array(
"\t",
"\r"),
" ", $soc->address), 0, 40);
1470 $address[1] = substr(str_replace(array(
"\t",
"\r"),
" ", $soc->address), 41, 40);
1471 $address[2] = substr(str_replace(array(
"\t",
"\r"),
" ", $soc->address), 82, 40);
1474 $type_enregistrement =
'C';
1476 print $type_enregistrement.$separator;
1478 print $soc->code_client.$separator;
1486 print $soc->nom.$separator;
1488 print $address[0].$separator;
1490 print $address[1].$separator;
1492 print $address[2].$separator;
1494 print $soc->zip.$separator;
1496 print substr($soc->town, 0, 40).$separator;
1500 print substr(
getCountry($soc->fk_pays), 0, 40).$separator;
1502 print $soc->phone.$separator;
1514 print str_replace(
" ",
"", $soc->siret).$separator;
1578 $date_lim_reglement =
dol_print_date($line->date_lim_reglement,
'%Y%m%d');
1581 $type_enregistrement =
'E';
1582 print $type_enregistrement.$separator;
1584 print substr($line->code_journal, 0, 2).$separator;
1586 print $line->id.$separator;
1588 print $line->piece_num.$separator;
1590 print $date_document.$separator;
1592 print
dol_trunc($line->label_operation, 25,
'right',
'UTF-8', 1).$separator;
1594 print $date_lim_reglement.$separator;
1596 if ($line->doc_type ==
'supplier_invoice') {
1597 if (($line->amount) < 0) {
1598 $nature_piece =
'AF';
1600 $nature_piece =
'FF';
1602 } elseif ($line->doc_type ==
'customer_invoice') {
1603 if (($line->amount) < 0) {
1604 $nature_piece =
'AC';
1606 $nature_piece =
'FC';
1611 print $nature_piece.$separator;
1622 $racine_subledger_account =
'';
1625 print $racine_subledger_account.$separator;
1627 print
price(abs($line->debit - $line->credit), 0,
'', 1, 2).$separator;
1629 print $line->sens.$separator;
1633 print $date_document.$separator;
1635 print $line->lettering_code.$separator;
1637 print $line->date_lettering.$separator;
1639 if (!empty($line->subledger_account)) {
1645 if ($line->doc_type ==
'supplier_invoice' && !empty($line->subledger_account)) {
1646 print
'F'.$separator;
1647 } elseif ($line->doc_type ==
'customer_invoice' && !empty($line->subledger_account)) {
1648 print
'C'.$separator;
1659 print $line->doc_ref.$separator;
1661 print
'0'.$separator;
1671 print
'0'.$separator;
1675 print
'0'.$separator;
1695 $last_codeinvoice = $line->doc_ref;
1708 $langs->load(
'compta');
1716 print $langs->transnoentitiesnoconv(
'Date').$separator;
1717 print self::trunc($langs->transnoentitiesnoconv(
'Journal'), 6).$separator;
1718 print self::trunc($langs->transnoentitiesnoconv(
'Account'), 15).$separator;
1719 print self::trunc($langs->transnoentitiesnoconv(
'LabelAccount'), 60).$separator;
1720 print self::trunc($langs->transnoentitiesnoconv(
'Piece'), 20).$separator;
1721 print self::trunc($langs->transnoentitiesnoconv(
'LabelOperation'), 60).$separator;
1722 print $langs->transnoentitiesnoconv(
'Amount').$separator;
1723 print
'S'.$separator;
1724 print self::trunc($langs->transnoentitiesnoconv(
'Analytic').
' 1', 15).$separator;
1725 print self::trunc($langs->transnoentitiesnoconv(
'AnalyticLabel').
' 1', 60).$separator;
1726 print self::trunc($langs->transnoentitiesnoconv(
'Analytic').
' 2', 15).$separator;
1727 print self::trunc($langs->transnoentitiesnoconv(
'AnalyticLabel').
' 2', 60).$separator;
1728 print self::trunc($langs->transnoentitiesnoconv(
'Analytic').
' 3', 15).$separator;
1729 print self::trunc($langs->transnoentitiesnoconv(
'AnalyticLabel').
' 3', 60).$separator;
1732 foreach ($objectLines as $line) {
1734 print $date.$separator;
1736 print self::trunc($line->code_journal, 6).$separator;
1738 if (!empty($line->subledger_account)) {
1739 $account = $line->subledger_account;
1741 $account = $line->numero_compte;
1743 print self::trunc($account, 15).$separator;
1745 print self::trunc($line->label_compte, 60).$separator;
1746 print self::trunc($line->doc_ref, 20).$separator;
1748 $line->label_operation = str_replace(array(
"\t",
"\n",
"\r"),
" ", $line->label_operation);
1749 print self::trunc($line->label_operation, 60).$separator;
1750 print
price(abs($line->debit - $line->credit)).$separator;
1751 print $line->sens.$separator;
1773 $this->separator =
',';
1775 $invoices_infos = array();
1776 $supplier_invoices_infos = array();
1777 foreach ($objectLines as $line) {
1778 if ($line->debit == 0 && $line->credit == 0) {
1783 $invoice_ref = $line->doc_ref;
1786 if (($line->doc_type ==
'customer_invoice' || $line->doc_type ==
'supplier_invoice') && $line->fk_doc > 0) {
1787 if (($line->doc_type ==
'customer_invoice' && !isset($invoices_infos[$line->fk_doc])) ||
1788 ($line->doc_type ==
'supplier_invoice' && !isset($supplier_invoices_infos[$line->fk_doc]))) {
1789 if ($line->doc_type ==
'customer_invoice') {
1791 $sql =
'SELECT f.ref, s.nom FROM ' . MAIN_DB_PREFIX .
'facture as f';
1792 $sql .=
' LEFT JOIN ' . MAIN_DB_PREFIX .
'societe AS s ON f.fk_soc = s.rowid';
1793 $sql .=
' WHERE f.rowid = '.((int) $line->fk_doc);
1796 if ($obj = $this->
db->fetch_object(
$resql)) {
1798 $invoices_infos[$line->fk_doc] = array(
'ref' => $obj->ref,
'company_name' => $obj->nom);
1799 $invoice_ref = $obj->ref;
1800 $company_name = $obj->nom;
1805 $sql =
'SELECT ff.ref, s.nom FROM ' . MAIN_DB_PREFIX .
'facture_fourn as ff';
1806 $sql .=
' LEFT JOIN ' . MAIN_DB_PREFIX .
'societe AS s ON ff.fk_soc = s.rowid';
1807 $sql .=
' WHERE ff.rowid = '.((int) $line->fk_doc);
1810 if ($obj = $this->
db->fetch_object(
$resql)) {
1812 $supplier_invoices_infos[$line->fk_doc] = array(
'ref' => $obj->ref,
'company_name' => $obj->nom);
1813 $invoice_ref = $obj->ref;
1814 $company_name = $obj->nom;
1818 } elseif ($line->doc_type ==
'customer_invoice') {
1820 $invoice_ref = $invoices_infos[$line->fk_doc][
'ref'];
1821 $company_name = $invoices_infos[$line->fk_doc][
'company_name'];
1824 $invoice_ref = $supplier_invoices_infos[$line->fk_doc][
'ref'];
1825 $company_name = $supplier_invoices_infos[$line->fk_doc][
'company_name'];
1829 print $line->id . $this->separator;
1830 print $date . $this->separator;
1831 print substr($line->code_journal, 0, 4) . $this->separator;
1833 if ((substr($line->numero_compte, 0, 3) ==
'411') || (substr($line->numero_compte, 0, 3) ==
'401')) {
1836 print substr(
length_accountg($line->numero_compte), 0, 15) . $this->separator;
1839 print $this->separator;
1842 print
dol_trunc(str_replace(
'"',
'', $invoice_ref . (!empty($company_name) ?
' - ' :
'') . $company_name), 40,
'right',
'UTF-8', 1) . $this->separator;
1844 print
dol_trunc(str_replace(
'"',
'', $line->piece_num), 10,
'right',
'UTF-8', 1) . $this->separator;
1846 print
'EUR' . $this->separator;
1848 print
price2num(abs($line->debit - $line->credit)) . $this->separator;
1850 print $line->sens . $this->separator;
1852 print $this->separator;
1855 print $this->end_line;
1870 $this->separator =
',';
1872 foreach ($objectLines as $line) {
1873 if ($line->debit == 0 && $line->credit == 0) {
1878 print $line->id . $this->separator;
1879 print $date . $this->separator;
1880 print substr($line->code_journal, 0, 4) . $this->separator;
1881 if ((substr($line->numero_compte, 0, 3) ==
'411') || (substr($line->numero_compte, 0, 3) ==
'401')) {
1884 print substr(
length_accountg($line->numero_compte), 0, 15) . $this->separator;
1886 print $this->separator;
1888 print
'"' .
dol_trunc(str_replace(
'"',
'', $line->doc_ref), 40,
'right',
'UTF-8', 1) .
'"' . $this->separator;
1889 print
'"' .
dol_trunc(str_replace(
'"',
'', $line->piece_num), 10,
'right',
'UTF-8', 1) .
'"' . $this->separator;
1890 print
price2num(abs($line->debit - $line->credit)) . $this->separator;
1891 print $line->sens . $this->separator;
1892 print $date . $this->separator;
1893 print $this->separator;
1894 print $this->separator;
1896 print $this->end_line;
1912 $this->separator =
';';
1913 $this->end_line =
"\r\n";
1916 foreach ($objectLines as $line) {
1921 $tab[] = $line->piece_num;
1923 $tab[] = substr($date, 6, 4);
1924 $tab[] = substr($date, 3, 2);
1925 $tab[] = substr($date, 0, 2);
1926 $tab[] = $line->doc_ref;
1928 $tab[] = mb_convert_encoding(str_replace(
' - Compte auxiliaire',
'', $line->label_operation),
"Windows-1252",
'UTF-8');
1934 $numero_cpt_client =
'411';
1935 for ($i = 1; $i <= ($taille_numero - 3); $i++) {
1936 $numero_cpt_client .=
'0';
1945 $nom_client = explode(
" - ", $line->label_operation);
1946 $tab[] = mb_convert_encoding($nom_client[0],
"Windows-1252",
'UTF-8');
1947 $tab[] =
price($line->debit);
1948 $tab[] =
price($line->credit);
1949 $tab[] =
price($line->montant);
1950 $tab[] = $line->code_journal;
1952 $separator = $this->separator;
1953 print implode($separator, $tab) . $this->end_line;
1964 public static function trunc($str, $size)
1966 return dol_trunc($str, $size,
'right',
'UTF-8', 1);
1976 public static function toAnsi($str, $size = -1)
1979 if ($retVal >= 0 && $size >= 0) {
1980 $retVal = mb_substr($retVal, 0, $size,
'Windows-1251');
dol_string_nohtmltag($stringtoclean, $removelinefeed=1, $pagecodeto= 'UTF-8', $strip_tags=0, $removedoublespaces=1)
Clean a string from all HTML tags and entities.
static getFormatCode($type)
Return string to summarize the format (Used to generated export filename)
exportiSuiteExpert($objectLines)
Export format : iSuite Expert.
$conf db
API class for accounts.
exportCharlemagne($objectLines)
Export format : Charlemagne.
exportGestimumV3($objectLines)
Export format : Gestimum V3.
Class to manage Dolibarr database access.
static trunc($str, $size)
trunc
export(&$TData, $formatexportset)
Function who chose which export to use with the default config, and make the export into a file...
getTypeConfig()
Array with all export type available (key + label) and parameters for config.
exportLDCompta($objectLines)
Export format : LD Compta version 9 http://www.ldsysteme.fr/fileadmin/telechargement/np/ldcompta/Docu...
price2fec($amount)
Function to format a value into a defined format for French administration (no thousand separator & d...
exportCoala($objectLines)
Export format : COALA.
Class to manage suppliers invoices.
exportBob50($objectLines)
Export format : BOB50.
exportFEC2($objectLines)
Export format : FEC2.
price($amount, $form=0, $outlangs= '', $trunc=1, $rounding=-1, $forcerounding=-1, $currency_code= '')
Function to format a value into an amount for visual output Function used into PDF and HTML pages...
exportOpenConcerto($objectLines)
Export format : OpenConcerto.
exportCogilog($objectLines)
Export format : COGILOG.
getType()
Array with all export type available (key + label)
__construct(DoliDB $db)
Constructor.
price2num($amount, $rounding= '', $option=0)
Function that return a number with universal decimal format (decimal separator is '...
exportQuadratus(&$TData)
Export format : Quadratus (Format ASCII) Format since 2015 compatible QuadraCOMPTA Last review for th...
exportGestimumV5($objectLines)
Export format : Gestimum V5.
length_accounta($accounta)
Return Auxiliary accounting account of thirdparties with defined length.
exportAgiris($objectLines)
Export format : Agiris Isacompta.
dol_string_unaccent($str)
Clean a string from all accent characters to be used as ref, login or by dol_sanitizeFileName.
exportCegid($objectLines)
Export format : CEGID.
exportWinfic(&$TData)
Export format : WinFic - eWinfic - WinSis Compta.
if(isModEnabled('facture')&&!empty($user->rights->facture->lire)) if((isModEnabled('fournisseur')&&empty($conf->global->MAIN_USE_NEW_SUPPLIERMOD)&&$user->rights->fournisseur->facture->lire)||(isModEnabled('supplier_invoice')&&$user->rights->supplier_invoice->lire)) if(isModEnabled('don')&&!empty($user->rights->don->lire)) if(isModEnabled('tax')&&!empty($user->rights->tax->charges->lire)) if(isModEnabled('facture')&&isModEnabled('commande')&&$user->rights->commande->lire &&empty($conf->global->WORKFLOW_DISABLE_CREATE_INVOICE_FROM_ORDER)) $resql
Social contributions to pay.
exportConfigurable($objectLines)
Export format : Configurable CSV.
exportFEC($objectLines)
Export format : FEC.
dol_print_date($time, $format= '', $tzoutput= 'auto', $outputlangs= '', $encodetooutput=false)
Output date in a string format according to outputlangs (or langs if not defined).
Manage the different format accountancy export.
static toAnsi($str, $size=-1)
toAnsi
exportLDCompta10($objectLines)
Export format : LD Compta version 10 & higher Last review for this format : 08-15-2021 Alexandre Span...
dol_trunc($string, $size=40, $trunc= 'right', $stringencoding= 'UTF-8', $nodot=0, $display=0)
Truncate a string to a particular length adding '…' if string larger than length. ...
exportCiel(&$TData)
Export format : CIEL (Format XIMPORT) Format since 2003 compatible CIEL version > 2002 / Sage50 Last ...
Class to manage invoices.
exportEbp($objectLines)
Export format : EBP.
length_accountg($account)
Return General accounting account with defined length (used for product and miscellaneous) ...
exportSAGE50SWISS($objectLines)
Export format : SAGE50SWISS.
getCountry($searchkey, $withcode= '', $dbtouse=0, $outputlangs= '', $entconv=1, $searchlabel= '')
Return country label, code or id from an id, code or label.