Skip to content
Snippets Groups Projects
Commit 24b50b8e authored by Laurent Destailleur's avatar Laurent Destailleur
Browse files

Fix: Example an label of category import

parent 4a2a8e43
Branches
Tags
No related merge requests found
<?php <?php
/* Copyright (C) 2005 Matthieu Valleton <mv@seeschloss.org> /* Copyright (C) 2005 Matthieu Valleton <mv@seeschloss.org>
* Copyright (C) 2005-2010 Laurent Destailleur <eldy@users.sourceforge.net> * Copyright (C) 2005-2012 Laurent Destailleur <eldy@users.sourceforge.net>
* Copyright (C) 2012 Juanjo Menent <jmenent@2byte.es> * 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
...@@ -178,14 +178,19 @@ class modCategorie extends DolibarrModules ...@@ -178,14 +178,19 @@ class modCategorie extends DolibarrModules
$this->import_fields_array[$r]=array('ca.label'=>"Label*",'ca.type'=>"Type*",'ca.description'=>"Description"); $this->import_fields_array[$r]=array('ca.label'=>"Label*",'ca.type'=>"Type*",'ca.description'=>"Description");
$this->import_regex_array[$r]=array('ca.type'=>'^[0|1|2|3]'); $this->import_regex_array[$r]=array('ca.type'=>'^[0|1|2|3]');
$this->import_examplevalues_array[$r]=array('ca.label'=>"Supplier Category",'ca.type'=>"1",'ca.description'=>"Imported category"); $typeexample="";
if ($conf->product->enabled) { $typeexample.=($typeexample?"/":"")."0=Product"; }
if ($conf->fournisseur->enabled) { $typeexample.=($typeexample?"/":"")."1=Supplier"; }
if ($conf->societe->enabled) { $typeexample.=($typeexample?"/":"")."2=Customer-Prospect"; }
if ($conf->adherent->enabled) { $typeexample.=($typeexample?"/":"")."3=Member"; }
$this->import_examplevalues_array[$r]=array('ca.label'=>"Supplier Category",'ca.type'=>$typeexample,'ca.description'=>"Imported category");
if (! empty($conf->product->enabled)) if (! empty($conf->product->enabled))
{ {
//Products //Products
$r++; $r++;
$this->import_code[$r]=$this->rights_class.'_'.$r; $this->import_code[$r]=$this->rights_class.'_'.$r;
$this->import_label[$r]="CatProdList"; // Translation key $this->import_label[$r]="CatProdLinks"; // Translation key
$this->import_icon[$r]=$this->picto; $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_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('cp'=>MAIN_DB_PREFIX.'categorie_product'); $this->import_tables_array[$r]=array('cp'=>MAIN_DB_PREFIX.'categorie_product');
...@@ -204,7 +209,7 @@ class modCategorie extends DolibarrModules ...@@ -204,7 +209,7 @@ class modCategorie extends DolibarrModules
//Customers //Customers
$r++; $r++;
$this->import_code[$r]=$this->rights_class.'_'.$r; $this->import_code[$r]=$this->rights_class.'_'.$r;
$this->import_label[$r]="CatCusList"; // Translation key $this->import_label[$r]="CatCusLinks"; // Translation key
$this->import_icon[$r]=$this->picto; $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_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('cs'=>MAIN_DB_PREFIX.'categorie_societe'); $this->import_tables_array[$r]=array('cs'=>MAIN_DB_PREFIX.'categorie_societe');
...@@ -223,7 +228,7 @@ class modCategorie extends DolibarrModules ...@@ -223,7 +228,7 @@ class modCategorie extends DolibarrModules
// Suppliers // Suppliers
$r++; $r++;
$this->import_code[$r]=$this->rights_class.'_'.$r; $this->import_code[$r]=$this->rights_class.'_'.$r;
$this->import_label[$r]="CatSupList"; // Translation key $this->import_label[$r]="CatSupLinks"; // Translation key
$this->import_icon[$r]=$this->picto; $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_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('cs'=>MAIN_DB_PREFIX.'categorie_fournisseur'); $this->import_tables_array[$r]=array('cs'=>MAIN_DB_PREFIX.'categorie_fournisseur');
......
...@@ -24,7 +24,7 @@ create table llx_categorie ...@@ -24,7 +24,7 @@ create table llx_categorie
entity integer DEFAULT 1 NOT NULL, -- multi company id entity integer DEFAULT 1 NOT NULL, -- multi company id
fk_parent integer DEFAULT 0 NOT NULL, fk_parent integer DEFAULT 0 NOT NULL,
label varchar(255) NOT NULL, -- category name label varchar(255) NOT NULL, -- category name
type tinyint DEFAULT 1 NOT NULL, -- category type (product, supplier, customer) type tinyint DEFAULT 1 NOT NULL, -- category type (product, supplier, customer, member)
description text, -- description of the category description text, -- description of the category
fk_soc integer DEFAULT NULL, -- attribution of the category has a company (for product only) fk_soc integer DEFAULT NULL, -- attribution of the category has a company (for product only)
visible tinyint DEFAULT 1 NOT NULL, -- determine if the products are visible or not visible tinyint DEFAULT 1 NOT NULL, -- determine if the products are visible or not
......
...@@ -92,3 +92,7 @@ CatSupList=List of supplier categories ...@@ -92,3 +92,7 @@ CatSupList=List of supplier categories
CatCusList=List of customer/prospect categories CatCusList=List of customer/prospect categories
CatProdList=List of products categories CatProdList=List of products categories
CatMemberList=List of members categories CatMemberList=List of members categories
CatSupLinks=Links between suppliers and categories
CatCusLinks=Links between customers/prospects and categories
CatProdLinks=Links between products/services and categories
CatMemberLinks=Links between members and categories
\ No newline at end of file
...@@ -92,3 +92,7 @@ CatSupList=Liste des catégories fournisseurs ...@@ -92,3 +92,7 @@ CatSupList=Liste des catégories fournisseurs
CatCusList=Liste des catégories clients/prospects CatCusList=Liste des catégories clients/prospects
CatProdList=Liste des catégories produits CatProdList=Liste des catégories produits
CatMemberList=Liste des catégories adhérents CatMemberList=Liste des catégories adhérents
CatSupLinks=Liens entre les fournisseurs et les catégories
CatCusLinks=Liens entre les clients/prospects et les catégories
CatProdLinks=Liens entre les produits/services et les catégories
CatMemberLinks=Links entre les adhérents et les catégories
\ No newline at end of file
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment