New: More import options. Thirds Bank Accounts

This commit is contained in:
simnandez 2012-10-19 13:00:53 +02:00
parent 70cf195fb4
commit aa53b7a2ba
11 changed files with 49 additions and 5 deletions

View File

@ -4,6 +4,7 @@
* Copyright (C) 2004 Sebastien Di Cintio <sdicintio@ressource-toi.org> * Copyright (C) 2004 Sebastien Di Cintio <sdicintio@ressource-toi.org>
* Copyright (C) 2004 Benoit Mortier <benoit.mortier@opensides.be> * Copyright (C) 2004 Benoit Mortier <benoit.mortier@opensides.be>
* Copyright (C) 2005-2012 Regis Houssin <regis@dolibarr.fr> * Copyright (C) 2005-2012 Regis Houssin <regis@dolibarr.fr>
* Copyright (C) 2012 Juanjo Menent <jmenent@2byte.es>
* *
* This program is free software; you can redistribute it and/or modify * This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by * it under the terms of the GNU General Public License as published by
@ -362,6 +363,26 @@ class modSociete extends DolibarrModules
//$this->import_convertvalue_array[$r]=array('s.fk_soc'=>array('rule'=>'lastrowid',table='t'); //$this->import_convertvalue_array[$r]=array('s.fk_soc'=>array('rule'=>'lastrowid',table='t');
$this->import_regex_array[$r]=array('s.birthday'=>'^[0-9][0-9][0-9][0-9]-[0-9][0-9]-[0-9][0-9]$','s.datec'=>'^[0-9][0-9][0-9][0-9]-[0-9][0-9]-[0-9][0-9]$'); $this->import_regex_array[$r]=array('s.birthday'=>'^[0-9][0-9][0-9][0-9]-[0-9][0-9]-[0-9][0-9]$','s.datec'=>'^[0-9][0-9][0-9][0-9]-[0-9][0-9]-[0-9][0-9]$');
$this->import_examplevalues_array[$r]=array('s.fk_soc'=>'MyBigCompany','s.civilite'=>"MR",'s.name'=>"Smith",'s.firstname'=>'John','s.address'=>'61 jump street','s.cp'=>'75000','s.ville'=>'Bigtown','s.fk_pays'=>'US, FR, DE...','s.datec'=>'1972-10-10','s.poste'=>"Director",'s.phone'=>"5551122",'s.phone_perso'=>"5551133",'s.phone_mobile'=>"5551144",'s.fax'=>"5551155",'s.email'=>"johnsmith@email.com",'s.note'=>"My comments"); $this->import_examplevalues_array[$r]=array('s.fk_soc'=>'MyBigCompany','s.civilite'=>"MR",'s.name'=>"Smith",'s.firstname'=>'John','s.address'=>'61 jump street','s.cp'=>'75000','s.ville'=>'Bigtown','s.fk_pays'=>'US, FR, DE...','s.datec'=>'1972-10-10','s.poste'=>"Director",'s.phone'=>"5551122",'s.phone_perso'=>"5551133",'s.phone_mobile'=>"5551144",'s.fax'=>"5551155",'s.email'=>"johnsmith@email.com",'s.note'=>"My comments");
// Import Bank Accounts
$r++;
$this->import_code[$r]=$this->rights_class.'_'.$r;
$this->import_label[$r]="ImportDataset_company_3"; // Translation key
$this->import_icon[$r]='account';
$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('sr'=>MAIN_DB_PREFIX.'societe_rib');
$this->import_fields_array[$r]=array('sr.fk_soc'=>"ThirdPartyName*",'sr.bank'=>"Bank",
'sr.code_banque'=>"BankCode*",'sr.code_guichet'=>"DeskCode*",'sr.number'=>"BankAccountNumber*",
'sr.cle_rib'=>"BankAccountNumberKey*",'sr.bic'=>"BIC",'sr.iban_prefix'=>"IBAN"
);
$this->import_convertvalue_array[$r]=array(
'sr.fk_soc'=>array('rule'=>'fetchidfromref','classfile'=>'/societe/class/societe.class.php','class'=>'Societe','method'=>'fetch','element'=>'ThirdParty')
);
$this->import_examplevalues_array[$r]=array('sr.fk_soc'=>"MyBigCompany",'sr.bank'=>"ING",
'sr.code_banque'=>"0000", 'sr.code_guichet'=>"1111",'sr.number'=>"3333333333",
'sr.cle_rib'=>"22",'sr.bic'=>"USHINGMMXXX",'sr.iban_prefix'=>"US00 0000 1111 22 3333 3333"
);
} }

View File

@ -765,6 +765,7 @@ ALTER TABLE llx_commande_fournisseurdet ADD COLUMN import_key varchar(14) AFTER
ALTER TABLE llx_entrepot ADD COLUMN import_key varchar(14) AFTER fk_user_author; ALTER TABLE llx_entrepot ADD COLUMN import_key varchar(14) AFTER fk_user_author;
ALTER TABLE llx_product_fournisseur_price ADD COLUMN import_key varchar(14) AFTER fk_user; ALTER TABLE llx_product_fournisseur_price ADD COLUMN import_key varchar(14) AFTER fk_user;
ALTER TABLE llx_product_stock ADD COLUMN import_key varchar(14) AFTER pmp; ALTER TABLE llx_product_stock ADD COLUMN import_key varchar(14) AFTER pmp;
ALTER TABLE llx_societe_rib ADD COLUMN import_key varchar(14) AFTER adresse_proprio;
-- [ task #146 ] Remove table llx_categorie_association -- [ task #146 ] Remove table llx_categorie_association
ALTER TABLE llx_categorie_association DROP FOREIGN KEY fk_categorie_asso_fk_categorie_mere; ALTER TABLE llx_categorie_association DROP FOREIGN KEY fk_categorie_asso_fk_categorie_mere;

View File

@ -1,6 +1,7 @@
-- ============================================================================= -- =============================================================================
-- Copyright (C) 2000-2004 Rodolphe Quiedeville <rodolphe@quiedeville.org> -- Copyright (C) 2000-2004 Rodolphe Quiedeville <rodolphe@quiedeville.org>
-- Copyright (C) 2005-2009 Regis Houssin <regis@dolibarr.fr> -- Copyright (C) 2005-2009 Regis Houssin <regis@dolibarr.fr>
-- Copyright (C) 2012 Juanjo Menent <jmenent@2byte.es>
-- --
-- This program is free software; you can redistribute it and/or modify -- This program is free software; you can redistribute it and/or modify
-- it under the terms of the GNU General Public License as published by -- it under the terms of the GNU General Public License as published by
@ -33,7 +34,8 @@ create table llx_societe_rib
iban_prefix varchar(34), -- 34 according to ISO 13616 iban_prefix varchar(34), -- 34 according to ISO 13616
domiciliation varchar(255), domiciliation varchar(255),
proprio varchar(60), proprio varchar(60),
adresse_proprio varchar(255) adresse_proprio varchar(255),
import_key varchar(14) -- import key
)ENGINE=innodb; )ENGINE=innodb;

View File

@ -342,6 +342,7 @@ ExportDataset_company_1=Tercers (empreses/institucions) i atributs
ExportDataset_company_2=Contactes de tercers i atributs ExportDataset_company_2=Contactes de tercers i atributs
ImportDataset_company_1=Tercers (empreses/institucions) i atributs ImportDataset_company_1=Tercers (empreses/institucions) i atributs
ImportDataset_company_2=Contactes (tercers o lliures) i atributs ImportDataset_company_2=Contactes (tercers o lliures) i atributs
ImportDataset_company_3=Comptes bancaris
PriceLevel=Nivell de preus PriceLevel=Nivell de preus
DeliveriesAddress=Adreça(es) d'enviament DeliveriesAddress=Adreça(es) d'enviament
DeliveryAddress=Adreça d'enviament DeliveryAddress=Adreça d'enviament

View File

@ -120,3 +120,7 @@ CsvOptions=Opcions de l'arxiu CSV
Separator=Separador Separator=Separador
Enclosure=Delimitador de camps Enclosure=Delimitador de camps
SuppliersProducts=Productes de proveïdors SuppliersProducts=Productes de proveïdors
BankCode=Codi banc
DeskCode=Codi oficina
BankAccountNumber=Número compte
BankAccountNumberKey=Dígit Control

View File

@ -359,6 +359,7 @@ ExportDataset_company_1=Third parties (Companies/foundations) and properties
ExportDataset_company_2=Contacts and properties ExportDataset_company_2=Contacts and properties
ImportDataset_company_1=Third parties (Companies/foundations) and properties ImportDataset_company_1=Third parties (Companies/foundations) and properties
ImportDataset_company_2=Contacts (of thirdparties or not) and attributes ImportDataset_company_2=Contacts (of thirdparties or not) and attributes
ImportDataset_company_3=Bank details
PriceLevel=Price level PriceLevel=Price level
DeliveriesAddress=Delivery addresses DeliveriesAddress=Delivery addresses
DeliveryAddress=Delivery address DeliveryAddress=Delivery address

View File

@ -120,3 +120,7 @@ CsvOptions=Csv Options
Separator=Separator Separator=Separator
Enclosure=Enclosure Enclosure=Enclosure
SuppliersProducts=Suppliers Products SuppliersProducts=Suppliers Products
BankCode=Bank code
DeskCode=Desk code
BankAccountNumber=Account number
BankAccountNumberKey=Key

View File

@ -343,6 +343,7 @@ ExportDataset_company_1=Terceros (empresas/instituciones) y atributos
ExportDataset_company_2=Contactos de terceros y atributos ExportDataset_company_2=Contactos de terceros y atributos
ImportDataset_company_1=Terceros (empresas/instituciones) y atributos ImportDataset_company_1=Terceros (empresas/instituciones) y atributos
ImportDataset_company_2=Contactos (terceros o libres) y atributos ImportDataset_company_2=Contactos (terceros o libres) y atributos
ImportDataset_company_3=Cuentas bancarias
PriceLevel=Nivel de precios PriceLevel=Nivel de precios
DeliveriesAddress=Dirección(es) de envío DeliveriesAddress=Dirección(es) de envío
DeliveryAddress=Dirección de envío DeliveryAddress=Dirección de envío

View File

@ -120,3 +120,7 @@ CsvOptions=Opciones del archivo CSV
Separator=Separador Separator=Separador
Enclosure=Delimitador de campos Enclosure=Delimitador de campos
SuppliersProducts=Productos de proveedores SuppliersProducts=Productos de proveedores
BankCode=Código banco
DeskCode=Código oficina
BankAccountNumber=Número cuenta
BankAccountNumberKey=Dígito Control

View File

@ -360,6 +360,7 @@ ExportDataset_company_1=Tiers (sociétés/institutions) et attributs
ExportDataset_company_2=Contacts (de tiers) et attributs ExportDataset_company_2=Contacts (de tiers) et attributs
ImportDataset_company_1=Tiers (sociétés/institutions) et attributs ImportDataset_company_1=Tiers (sociétés/institutions) et attributs
ImportDataset_company_2=Contacts (de tiers ou libre) et attributs ImportDataset_company_2=Contacts (de tiers ou libre) et attributs
ImportDataset_company_3=Coordonnées bancaires
PriceLevel=Niveau de prix PriceLevel=Niveau de prix
DeliveriesAddress=Adresse(s) de livraison DeliveriesAddress=Adresse(s) de livraison
DeliveryAddress=Adresse de livraison DeliveryAddress=Adresse de livraison

View File

@ -120,3 +120,7 @@ CsvOptions=Options du fichier Csv
Separator=Séparateur de champs Separator=Séparateur de champs
Enclosure=Encadrement des chaines de textes Enclosure=Encadrement des chaines de textes
SuppliersProducts=Produits Fournisseurs SuppliersProducts=Produits Fournisseurs
BankCode=Code banque
DeskCode=Code guichet
BankAccountNumber=Numéro compte
BankAccountNumberKey=Clé RIB