NEW : Accountancy Add import on general ledger
This commit is contained in:
parent
0c40dfa3f9
commit
e2665bd30e
@ -1,6 +1,6 @@
|
|||||||
<?php
|
<?php
|
||||||
/* Copyright (C) 2013-2014 Olivier Geffroy <jeff@jeffinfo.com>
|
/* Copyright (C) 2013-2014 Olivier Geffroy <jeff@jeffinfo.com>
|
||||||
* Copyright (C) 2013-2017 Alexandre Spangaro <aspangaro@zendsi.com>
|
* Copyright (C) 2013-2018 Alexandre Spangaro <aspangaro@zendsi.com>
|
||||||
* Copyright (C) 2014 Ari Elbaz (elarifr) <github@accedinfo.com>
|
* Copyright (C) 2014 Ari Elbaz (elarifr) <github@accedinfo.com>
|
||||||
* Copyright (C) 2014 Florian Henry <florian.henry@open-concept.pro>
|
* Copyright (C) 2014 Florian Henry <florian.henry@open-concept.pro>
|
||||||
* Copyright (C) 2016-2017 Laurent Destailleur <eldy@users.sourceforge.net>
|
* Copyright (C) 2016-2017 Laurent Destailleur <eldy@users.sourceforge.net>
|
||||||
@ -255,6 +255,24 @@ class modAccounting extends DolibarrModules
|
|||||||
//--------
|
//--------
|
||||||
$r=0;
|
$r=0;
|
||||||
|
|
||||||
|
// General ledger
|
||||||
|
$r++;
|
||||||
|
$this->import_code[$r]=$this->rights_class.'_'.$r;
|
||||||
|
$this->import_label[$r]='ImportAccountingEntries';
|
||||||
|
$this->import_icon[$r]=$this->picto;
|
||||||
|
$this->import_entities_array[$r]=array(); // We define here only fields that use another icon that the one defined into import_icon
|
||||||
|
$this->import_tables_array[$r]=array('b'=>MAIN_DB_PREFIX.'accounting_bookkeeping'); // List of tables to insert into (insert done in same order)
|
||||||
|
$this->import_fields_array[$r]=array('b.doc_date'=>"Docdate",'b.code_journal'=>'Codejournal','b.numero_compte'=>'AccountAccountingShort','b.label_operation'=>'LabelOperation','b.debit'=>"Debit",'b.credit'=>"Credit",'b.date_creation'=>"DateCreation");
|
||||||
|
$this->import_fieldshidden_array[$r]=array('b.fk_user'=>'user->id'); // aliastable.field => ('user->id' or 'lastrowid-'.tableparent)
|
||||||
|
$this->import_convertvalue_array[$r]=array(
|
||||||
|
't.fk_projet'=>array('rule'=>'fetchidfromref','classfile'=>'/projet/class/project.class.php','class'=>'Project','method'=>'fetch','element'=>'Project'),
|
||||||
|
't.ref'=>array('rule'=>'getrefifauto')
|
||||||
|
);
|
||||||
|
//$this->import_convertvalue_array[$r]=array('s.fk_soc'=>array('rule'=>'lastrowid',table='t');
|
||||||
|
$this->import_regex_array[$r]=array('b.doc_date'=>'^[0-9][0-9][0-9][0-9]-[0-9][0-9]-[0-9][0-9]$');
|
||||||
|
//$this->import_examplevalues_array[$r]=array('t.fk_projet'=>'MyProjectRef','t.ref'=>"auto or TK2010-1234",'t.label'=>"My task",'t.progress'=>"0 (not started) to 100 (finished)",'t.datec'=>'1972-10-10','t.note_private'=>"My private note",'t.note_public'=>"My public note");
|
||||||
|
|
||||||
|
// Chart of accounts
|
||||||
$r++;
|
$r++;
|
||||||
$this->import_code[$r]=$this->rights_class.'_'.$r;
|
$this->import_code[$r]=$this->rights_class.'_'.$r;
|
||||||
$this->import_label[$r]="Chartofaccounts"; // Translation key
|
$this->import_label[$r]="Chartofaccounts"; // Translation key
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user