Skip to content

Commit

Permalink
Merge pull request Dolibarr#2 from Dolibarr/develop
Browse files Browse the repository at this point in the history
Merge back official Dolibarr develop into my abcnet-lu fork
  • Loading branch information
abcnet-lu committed Feb 5, 2016
2 parents d65ee22 + e1da958 commit a4dedfb
Show file tree
Hide file tree
Showing 13 changed files with 404 additions and 16 deletions.
2 changes: 1 addition & 1 deletion htdocs/contact/list.php
Original file line number Diff line number Diff line change
Expand Up @@ -218,7 +218,7 @@
$reshook=$hookmanager->executeHooks('printFieldListSelect',$parameters); // Note that $action and $object may have been modified by hook
$sql.=$hookmanager->resPrint;
$sql.= " FROM ".MAIN_DB_PREFIX."socpeople as p";
if (is_array($extrafields->attribute_label) && count($extrafields->attribute_label)) $sql.= " LEFT JOIN ".MAIN_DB_PREFIX."contact_extrafields as ef on (p.rowid = ef.fk_object)";
if (is_array($extrafields->attribute_label) && count($extrafields->attribute_label)) $sql.= " LEFT JOIN ".MAIN_DB_PREFIX."socpeople_extrafields as ef on (p.rowid = ef.fk_object)";
$sql.= " LEFT JOIN ".MAIN_DB_PREFIX."c_country as co ON co.rowid = p.fk_pays";
$sql.= " LEFT JOIN ".MAIN_DB_PREFIX."societe as s ON s.rowid = p.fk_soc";
if (! empty($search_categ)) $sql.= ' LEFT JOIN '.MAIN_DB_PREFIX."categorie_contact as cs ON p.rowid = cs.fk_socpeople"; // We need this table joined to the select in order to filter by categ
Expand Down
1 change: 1 addition & 0 deletions htdocs/core/class/html.formpropal.class.php
Original file line number Diff line number Diff line change
Expand Up @@ -83,6 +83,7 @@ function selectProposalStatus($selected='',$short=0, $excludedraft=0, $showempty
{
$obj = $this->db->fetch_object($resql);
$listofstatus[$obj->id]=array('id'=>$obj->id,'code'=>$obj->code,'label'=>$obj->label);
$i++;
}
}
}
Expand Down
2 changes: 1 addition & 1 deletion htdocs/core/js/select2_locale.js.php
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@
*/

/**
* \file htdocs/core/js/timepicker.js.php
* \file htdocs/core/js/select2_locale.js.php
* \brief File that include javascript functions for timepicker
*/

Expand Down
52 changes: 52 additions & 0 deletions htdocs/core/modules/product/modules_product.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,52 @@
<?php
/* Copyright (C) 2003-2005 Rodolphe Quiedeville <rodolphe@quiedeville.org>
* Copyright (C) 2004-2010 Laurent Destailleur <eldy@users.sourceforge.net>
* Copyright (C) 2004 Eric Seigne <eric.seigne@ryxeo.com>
* Copyright (C) 2005-2012 Regis Houssin <regis.houssin@capnetworks.com>
* Copyright (C) 2016 Charlie Benke <charlie@patas-monkey.com>
*
* 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
* the Free Software Foundation; either version 3 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
* or see http://www.gnu.org/
*/

require_once DOL_DOCUMENT_ROOT.'/core/class/commondocgenerator.class.php';

/**
* \class ModeleProduct
* \brief Parent class for product models of doc generators
*/
abstract class ModeleProduct extends CommonDocGenerator
{
var $error='';

/**
* Return list of active generation modules
*
* @param DoliDB $db Database handler
* @param integer $maxfilenamelength Max length of value to show
* @return array List of templates
*/
static function liste_modeles($db,$maxfilenamelength=0)
{
global $conf;

$type='product';
$liste=array();

include_once DOL_DOCUMENT_ROOT.'/core/lib/functions2.lib.php';
$liste=getListOfModels($db,$type,$maxfilenamelength);

return $liste;
}
}
36 changes: 26 additions & 10 deletions htdocs/core/tpl/contacts.tpl.php
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<?php
/* Copyright (C) 2012 Regis Houssin <regis.houssin@capnetworks.com>
* Copyright (C) 2013-2015 Laurent Destailleur <eldy@users.sourceforge.net>
* Copyright (C) 2015 Charlie BENKE <charlie@patas-monkey.com>
/* Copyright (C) 2012 Regis Houssin <regis.houssin@capnetworks.com>
* Copyright (C) 2013-2015 Laurent Destailleur <eldy@users.sourceforge.net>
* Copyright (C) 2015-2016 Charlie BENKE <charlie@patas-monkey.com>
*
* 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
Expand All @@ -27,15 +27,22 @@
$module = $object->element;

// Special cases
if ($module == 'propal') { $permission=$user->rights->propale->creer; }
elseif ($module == 'fichinter') { $permission=$user->rights->ficheinter->creer; }
if ($module == 'propal') { $permission=$user->rights->propale->creer; }
elseif ($module == 'fichinter') { $permission=$user->rights->ficheinter->creer; }
elseif ($module == 'invoice_supplier') { $permission=$user->rights->fournisseur->facture->creer; }
elseif ($module == 'order_supplier') { $permission=$user->rights->fournisseur->commande->creer; }
elseif ($module == 'project') { $permission=$user->rights->projet->creer; }
elseif ($module == 'action') { $permission=$user->rights->agenda->myactions->create; }
elseif ($module == 'shipping') { $permission=$user->rights->expedition->creer; }
elseif ($module == 'project_task') { $permission=$user->rights->projet->creer; }
elseif (! isset($permission)) { $permission=$user->rights->$module->creer; } // If already defined by caller page
elseif ($module == 'project') { $permission=$user->rights->projet->creer; }
elseif ($module == 'action') { $permission=$user->rights->agenda->myactions->create; }
elseif ($module == 'shipping') { $permission=$user->rights->expedition->creer; }
elseif ($module == 'project_task') { $permission=$user->rights->projet->creer; }
elseif (! isset($permission) && isset($user->rights->$module->creer))
{
$permission=$user->rights->$module->creer;
}
elseif (! isset($permission) && isset($user->rights->$module->write))
{
$permission=$user->rights->$module->write;
}

$formcompany= new FormCompany($db);
$companystatic=new Societe($db);
Expand Down Expand Up @@ -228,4 +235,13 @@
<?php } } ?>

</div>
<!-- TEMPLATE CONTACTS HOOK BEGIN HERE -->
<?php
if (is_object($hookmanager))
{
$hookmanager->initHooks(array('contacttpl'));
$parameters=array();
$reshook=$hookmanager->executeHooks('formContactTpl',$parameters,$object,$action);
}
?>
<!-- END PHP TEMPLATE CONTACTS -->
7 changes: 6 additions & 1 deletion htdocs/install/mysql/data/llx_10_c_regions.sql
Original file line number Diff line number Diff line change
Expand Up @@ -284,4 +284,9 @@ INSERT INTO llx_c_regions (fk_pays, code_region, cheflieu, tncc, nom, active) v
INSERT INTO llx_c_regions (fk_pays, code_region, cheflieu, tncc, nom, active) values ( 52, 5206, '', 0, 'Tarija', 1);
INSERT INTO llx_c_regions (fk_pays, code_region, cheflieu, tncc, nom, active) values ( 52, 5207, '', 0, 'Santa Cruz', 1);
INSERT INTO llx_c_regions (fk_pays, code_region, cheflieu, tncc, nom, active) values ( 52, 5208, '', 0, 'El Beni', 1);
INSERT INTO llx_c_regions (fk_pays, code_region, cheflieu, tncc, nom, active) values ( 52, 5209, '', 0, 'Pando', 1);
INSERT INTO llx_c_regions (fk_pays, code_region, cheflieu, tncc, nom, active) values ( 52, 5209, '', 0, 'Pando', 1);

-- Regions (districts) Luxembourg (id country=140)
INSERT INTO llx_c_regions (fk_pays, code_region, cheflieu, tncc, nom, active) values ( 140, 14001, '', 0, 'Diekirch', 1);
INSERT INTO llx_c_regions (fk_pays, code_region, cheflieu, tncc, nom, active) values ( 140, 14002, '', 0, 'Grevenmacher', 1);
INSERT INTO llx_c_regions (fk_pays, code_region, cheflieu, tncc, nom, active) values ( 140, 14003, '', 0, 'Luxembourg', 1);
16 changes: 15 additions & 1 deletion htdocs/install/mysql/data/llx_20_c_departements.sql
Original file line number Diff line number Diff line change
Expand Up @@ -1223,4 +1223,18 @@ INSERT INTO llx_c_departements ( code_departement, fk_region, cheflieu, tncc, nc
INSERT INTO llx_c_departements ( code_departement, fk_region, cheflieu, tncc, ncc, nom, active) VALUES ('109', 5209, '', 0, '', 'Madre de Dios', 1);
INSERT INTO llx_c_departements ( code_departement, fk_region, cheflieu, tncc, ncc, nom, active) VALUES ('110', 5209, '', 0, '', 'Manuripi', 1);
INSERT INTO llx_c_departements ( code_departement, fk_region, cheflieu, tncc, ncc, nom, active) VALUES ('111', 5209, '', 0, '', 'Nicolás Suárez', 1);
INSERT INTO llx_c_departements ( code_departement, fk_region, cheflieu, tncc, ncc, nom, active) VALUES ('112', 5209, '', 0, '', 'General Federico Román', 1);
INSERT INTO llx_c_departements ( code_departement, fk_region, cheflieu, tncc, ncc, nom, active) VALUES ('112', 5209, '', 0, '', 'General Federico Román', 1);

-- Cantons Luxembourg (id country=140)
INSERT INTO llx_c_departements ( code_departement, fk_region, cheflieu, tncc, ncc, nom, active) VALUES ('LU0001', 14001, '', 0, '', 'Clervaux', 1);
INSERT INTO llx_c_departements ( code_departement, fk_region, cheflieu, tncc, ncc, nom, active) VALUES ('LU0002', 14001, '', 0, '', 'Diekirch', 1);
INSERT INTO llx_c_departements ( code_departement, fk_region, cheflieu, tncc, ncc, nom, active) VALUES ('LU0003', 14001, '', 0, '', 'Redange', 1);
INSERT INTO llx_c_departements ( code_departement, fk_region, cheflieu, tncc, ncc, nom, active) VALUES ('LU0004', 14001, '', 0, '', 'Vianden', 1);
INSERT INTO llx_c_departements ( code_departement, fk_region, cheflieu, tncc, ncc, nom, active) VALUES ('LU0005', 14001, '', 0, '', 'Wiltz', 1);
INSERT INTO llx_c_departements ( code_departement, fk_region, cheflieu, tncc, ncc, nom, active) VALUES ('LU0006', 14002, '', 0, '', 'Echternach', 1);
INSERT INTO llx_c_departements ( code_departement, fk_region, cheflieu, tncc, ncc, nom, active) VALUES ('LU0007', 14002, '', 0, '', 'Grevenmacher', 1);
INSERT INTO llx_c_departements ( code_departement, fk_region, cheflieu, tncc, ncc, nom, active) VALUES ('LU0008', 14002, '', 0, '', 'Remich', 1);
INSERT INTO llx_c_departements ( code_departement, fk_region, cheflieu, tncc, ncc, nom, active) VALUES ('LU0009', 14003, '', 0, '', 'Capellen', 1);
INSERT INTO llx_c_departements ( code_departement, fk_region, cheflieu, tncc, ncc, nom, active) VALUES ('LU0010', 14003, '', 0, '', 'Esch-sur-Alzette', 1);
INSERT INTO llx_c_departements ( code_departement, fk_region, cheflieu, tncc, ncc, nom, active) VALUES ('LU0011', 14003, '', 0, '', 'Luxembourg', 1);
INSERT INTO llx_c_departements ( code_departement, fk_region, cheflieu, tncc, ncc, nom, active) VALUES ('LU0012', 14003, '', 0, '', 'Mersch', 1);
10 changes: 10 additions & 0 deletions htdocs/install/mysql/data/llx_c_forme_juridique.sql
Original file line number Diff line number Diff line change
Expand Up @@ -278,3 +278,13 @@ INSERT INTO llx_c_forme_juridique (fk_pays, code, libelle, active) VALUES (154,
INSERT INTO llx_c_forme_juridique (fk_pays, code, libelle, active) VALUES (154, '15404', 'Sociedad anónima', 1);
INSERT INTO llx_c_forme_juridique (fk_pays, code, libelle, active) VALUES (154, '15405', 'Sociedad en comandita por acciones', 1);
INSERT INTO llx_c_forme_juridique (fk_pays, code, libelle, active) VALUES (154, '15406', 'Sociedad cooperativa', 1);

-- Luxembourg
INSERT INTO llx_c_forme_juridique (fk_pays, code, libelle, active) VALUES (140, '14001', 'Entreprise individuelle', 1);
INSERT INTO llx_c_forme_juridique (fk_pays, code, libelle, active) VALUES (140, '14002', 'Société en nom collectif (SENC)', 1);
INSERT INTO llx_c_forme_juridique (fk_pays, code, libelle, active) VALUES (140, '14003', 'Société en commandite simple (SECS)', 1);
INSERT INTO llx_c_forme_juridique (fk_pays, code, libelle, active) VALUES (140, '14004', 'Société en commandite par actions (SECA)', 1);
INSERT INTO llx_c_forme_juridique (fk_pays, code, libelle, active) VALUES (140, '14005', 'Société à responsabilité limitée (SARL)', 1);
INSERT INTO llx_c_forme_juridique (fk_pays, code, libelle, active) VALUES (140, '14006', 'Société anonyme (SA)', 1);
INSERT INTO llx_c_forme_juridique (fk_pays, code, libelle, active) VALUES (140, '14007', 'Société coopérative (SC)', 1);
INSERT INTO llx_c_forme_juridique (fk_pays, code, libelle, active) VALUES (140, '14008', 'Société européenne (SE)', 1);
6 changes: 6 additions & 0 deletions htdocs/langs/de_DE/companies.lang
Original file line number Diff line number Diff line change
Expand Up @@ -202,6 +202,12 @@ ProfId3IN=Prof Id 3
ProfId4IN=Prof Id 4
ProfId5IN=Prof Id 5
ProfId6IN=-
ProfId1LU=Id. prof. 1 (RCS)
ProfId2LU=Id. prof. 2 (Niederlassungsgenehmigung)
ProfId3LU=-
ProfId4LU=-
ProfId5LU=-
ProfId6LU=-
ProfId1MA=Id prof. 1 (R.C.)
ProfId2MA=Id prof. 2 (Patente)
ProfId3MA=Id prof. 3 (I.F.)
Expand Down
6 changes: 6 additions & 0 deletions htdocs/langs/en_US/companies.lang
Original file line number Diff line number Diff line change
Expand Up @@ -202,6 +202,12 @@ ProfId3IN=Prof Id 3 (SRVC TAX)
ProfId4IN=Prof Id 4
ProfId5IN=Prof Id 5
ProfId6IN=-
ProfId1LU=Id. prof. 1 (RCS)
ProfId2LU=Id. prof. 2 (Business permit)
ProfId3LU=-
ProfId4LU=-
ProfId5LU=-
ProfId6LU=-
ProfId1MA=Id prof. 1 (R.C.)
ProfId2MA=Id prof. 2 (Patente)
ProfId3MA=Id prof. 3 (I.F.)
Expand Down
6 changes: 6 additions & 0 deletions htdocs/langs/fr_FR/companies.lang
Original file line number Diff line number Diff line change
Expand Up @@ -202,6 +202,12 @@ ProfId3IN=Id. prof. 3 (SRVC TAX)
ProfId4IN=Id. prof. 4
ProfId5IN=Id. prof. 5
ProfId6IN=-
ProfId1LU=Id. prof. 1 (RCS)
ProfId2LU=Id. prof. 2 (Autorisation d'établissement)
ProfId3LU=-
ProfId4LU=-
ProfId5LU=-
ProfId6LU=-
ProfId1MA=Id. prof. 1 (R.C.)
ProfId2MA=Id. prof. 2 (Patente)
ProfId3MA=Id. prof. 3 (I.F.)
Expand Down
Loading

0 comments on commit a4dedfb

Please sign in to comment.