Merge branch '9.0' of git@github.com:Dolibarr/dolibarr.git into develop
Conflicts: dev/resources/dbmodel/dolibarr_schema.mwb
This commit is contained in:
commit
f55db6dd84
@ -3,9 +3,9 @@
|
|||||||

|

|
||||||
[](https://houndci.com)
|
[](https://houndci.com)
|
||||||
|
|
||||||
|6|7|8|develop|
|
|6|7|8|9|develop|
|
||||||
|----------|----------|----------|----------|
|
|----------|----------|----------|----------|----------|
|
||||||
|||||
|
||||||
|
||||||
|
|
||||||
Dolibarr ERP & CRM is a modern software package to manage your organization's activity (contacts, suppliers, invoices, orders, stocks, agenda…).
|
Dolibarr ERP & CRM is a modern software package to manage your organization's activity (contacts, suppliers, invoices, orders, stocks, agenda…).
|
||||||
|
|
||||||
|
|||||||
Binary file not shown.
@ -641,7 +641,6 @@ if ($num > 0)
|
|||||||
$object->id = $line->id;
|
$object->id = $line->id;
|
||||||
$object->piece_num = $line->piece_num;
|
$object->piece_num = $line->piece_num;
|
||||||
print $object->getNomUrl(1,'',0,'',1);
|
print $object->getNomUrl(1,'',0,'',1);
|
||||||
//print '<a href="./card.php?piece_num=' . $line->piece_num . '&save_lastsearch_values=1">' . $line->piece_num . '</a>';
|
|
||||||
print '</td>';
|
print '</td>';
|
||||||
if (! $i) $totalarray['nbfield']++;
|
if (! $i) $totalarray['nbfield']++;
|
||||||
}
|
}
|
||||||
|
|||||||
@ -75,7 +75,7 @@ $offset = $listlimit * $page ;
|
|||||||
$pageprev = $page - 1;
|
$pageprev = $page - 1;
|
||||||
$pagenext = $page + 1;
|
$pagenext = $page + 1;
|
||||||
|
|
||||||
if (empty($sortfield)) $sortfield='label, lang, position';
|
if (empty($sortfield)) $sortfield='type_template, lang, position, label';
|
||||||
if (empty($sortorder)) $sortorder='ASC';
|
if (empty($sortorder)) $sortorder='ASC';
|
||||||
|
|
||||||
// Initialize technical object to manage hooks of page. Note that conf->hooks_modules contains array of hook context
|
// Initialize technical object to manage hooks of page. Note that conf->hooks_modules contains array of hook context
|
||||||
@ -85,10 +85,6 @@ $hookmanager->initHooks(array('emailtemplates'));
|
|||||||
$tabname=array();
|
$tabname=array();
|
||||||
$tabname[25]= MAIN_DB_PREFIX."c_email_templates";
|
$tabname[25]= MAIN_DB_PREFIX."c_email_templates";
|
||||||
|
|
||||||
// Criteria to sort dictionaries
|
|
||||||
$tabsqlsort=array();
|
|
||||||
$tabsqlsort[25]="label ASC, lang ASC, position ASC";
|
|
||||||
|
|
||||||
// Nom des champs en resultat de select pour affichage du dictionnaire
|
// Nom des champs en resultat de select pour affichage du dictionnaire
|
||||||
$tabfield=array();
|
$tabfield=array();
|
||||||
$tabfield[25]= "label,lang,type_template,fk_user,private,position,topic,joinfiles,content";
|
$tabfield[25]= "label,lang,type_template,fk_user,private,position,topic,joinfiles,content";
|
||||||
|
|||||||
@ -45,7 +45,7 @@ require_once DOL_DOCUMENT_ROOT.'/comm/propal/class/propal.class.php';
|
|||||||
require_once DOL_DOCUMENT_ROOT.'/projet/class/project.class.php';
|
require_once DOL_DOCUMENT_ROOT.'/projet/class/project.class.php';
|
||||||
|
|
||||||
// Load translation files required by the page
|
// Load translation files required by the page
|
||||||
$langs->loadLangs(array('companies','propal','compta','bills','orders','products','deliveries'));
|
$langs->loadLangs(array('companies', 'propal', 'compta', 'bills', 'orders', 'products', 'deliveries', 'categories'));
|
||||||
|
|
||||||
$socid=GETPOST('socid','int');
|
$socid=GETPOST('socid','int');
|
||||||
|
|
||||||
|
|||||||
@ -51,7 +51,7 @@ require_once DOL_DOCUMENT_ROOT.'/projet/class/project.class.php';
|
|||||||
if (! empty($conf->commande->enabled)) require_once DOL_DOCUMENT_ROOT.'/commande/class/commande.class.php';
|
if (! empty($conf->commande->enabled)) require_once DOL_DOCUMENT_ROOT.'/commande/class/commande.class.php';
|
||||||
|
|
||||||
// Load translation files required by the page
|
// Load translation files required by the page
|
||||||
$langs->loadLangs(array('bills', 'companies', 'products'));
|
$langs->loadLangs(array('bills', 'companies', 'products', 'categories'));
|
||||||
|
|
||||||
$sall=trim((GETPOST('search_all', 'alphanohtml')!='')?GETPOST('search_all', 'alphanohtml'):GETPOST('sall', 'alphanohtml'));
|
$sall=trim((GETPOST('search_all', 'alphanohtml')!='')?GETPOST('search_all', 'alphanohtml'):GETPOST('sall', 'alphanohtml'));
|
||||||
$projectid=(GETPOST('projectid')?GETPOST('projectid','int'):0);
|
$projectid=(GETPOST('projectid')?GETPOST('projectid','int'):0);
|
||||||
|
|||||||
@ -36,7 +36,7 @@ require_once DOL_DOCUMENT_ROOT.'/core/lib/company.lib.php';
|
|||||||
require_once DOL_DOCUMENT_ROOT.'/core/class/html.formother.class.php';
|
require_once DOL_DOCUMENT_ROOT.'/core/class/html.formother.class.php';
|
||||||
|
|
||||||
// Load translation files required by the page
|
// Load translation files required by the page
|
||||||
$langs->loadLangs(array("companies", "suppliers"));
|
$langs->loadLangs(array("companies", "suppliers", "categories"));
|
||||||
|
|
||||||
$action=GETPOST('action','alpha');
|
$action=GETPOST('action','alpha');
|
||||||
$massaction=GETPOST('massaction','alpha');
|
$massaction=GETPOST('massaction','alpha');
|
||||||
|
|||||||
@ -321,13 +321,18 @@ function GETPOST($paramname, $check='none', $method=0, $filter=null, $options=nu
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
if (! empty($_SESSION['lastsearch_contextpage_'.$relativepathstring])) // If there is saved contextpage
|
// If there is saved contextpage, page or limit
|
||||||
|
if ($paramname == 'contextpage' && ! empty($_SESSION['lastsearch_contextpage_'.$relativepathstring]))
|
||||||
{
|
{
|
||||||
if ($paramname == 'contextpage')
|
$out = $_SESSION['lastsearch_contextpage_'.$relativepathstring];
|
||||||
{
|
}
|
||||||
$out = $_SESSION['lastsearch_contextpage_'.$relativepathstring];
|
elseif ($paramname == 'page' && ! empty($_SESSION['lastsearch_page_'.$relativepathstring]))
|
||||||
//var_dump($paramname.' '.$out);
|
{
|
||||||
}
|
$out = $_SESSION['lastsearch_page_'.$relativepathstring];
|
||||||
|
}
|
||||||
|
elseif ($paramname == 'limit' && ! empty($_SESSION['lastsearch_limit_'.$relativepathstring]))
|
||||||
|
{
|
||||||
|
$out = $_SESSION['lastsearch_limit_'.$relativepathstring];
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
// Else, retreive default values if we are not doing a sort
|
// Else, retreive default values if we are not doing a sort
|
||||||
|
|||||||
@ -480,14 +480,11 @@ class modSociete extends DolibarrModules
|
|||||||
$this->import_tables_array[$r]=array('sr'=>MAIN_DB_PREFIX.'societe_rib');
|
$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",
|
$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.code_banque'=>"BankCode",'sr.code_guichet'=>"DeskCode",'sr.number'=>"BankAccountNumber*",
|
||||||
'sr.cle_rib'=>"BankAccountNumberKey",'sr.bic'=>"BIC",'sr.iban_prefix'=>"IBAN", 'sr.domiciliation'=>"BankAccountDomiciliation",'sr.proprio' => "BankAccountOwner", 'sr.owner_address' => "BankAccountOwnerAddress", 'sr.default_rib' => 'Default',
|
'sr.cle_rib'=>"BankAccountNumberKey",'sr.bic'=>"BIC",'sr.iban_prefix'=>"IBAN", 'sr.domiciliation'=>"BankAccountDomiciliation",'sr.proprio' => "BankAccountOwner", 'sr.owner_address' => "BankAccountOwnerAddress", 'sr.default_rib' => 'Default'
|
||||||
'sr.fk_departement'=>"StateId",'sr.fk_pays'=>"CountryCode"
|
|
||||||
);
|
);
|
||||||
|
|
||||||
$this->import_convertvalue_array[$r]=array(
|
$this->import_convertvalue_array[$r]=array(
|
||||||
'sr.fk_soc'=>array('rule'=>'fetchidfromref','classfile'=>'/societe/class/societe.class.php','class'=>'Societe','method'=>'fetch','element'=>'ThirdParty'),
|
'sr.fk_soc'=>array('rule'=>'fetchidfromref','classfile'=>'/societe/class/societe.class.php','class'=>'Societe','method'=>'fetch','element'=>'ThirdParty')
|
||||||
'sr.fk_departement'=>array('rule'=>'fetchidfromcodeid','classfile'=>'/core/class/cstate.class.php','class'=>'Cstate','method'=>'fetch','dict'=>'DictionaryState'),
|
|
||||||
'sr.fk_pays'=>array('rule'=>'fetchidfromcodeid','classfile'=>'/core/class/ccountry.class.php','class'=>'Ccountry','method'=>'fetch','dict'=>'DictionaryCountry'),
|
|
||||||
);
|
);
|
||||||
$this->import_examplevalues_array[$r]=array('sr.fk_soc'=>"MyBigCompany",'sr.bank'=>"ING",
|
$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.code_banque'=>"0000", 'sr.code_guichet'=>"1111",'sr.number'=>"3333333333",
|
||||||
|
|||||||
@ -3127,10 +3127,10 @@ class SupplierInvoiceLine extends CommonObjectLine
|
|||||||
$sql.= " ".$this->product_type.",";
|
$sql.= " ".$this->product_type.",";
|
||||||
$sql.= " ".price2num($this->remise_percent).",";
|
$sql.= " ".price2num($this->remise_percent).",";
|
||||||
$sql.= " ".price2num($this->subprice).",";
|
$sql.= " ".price2num($this->subprice).",";
|
||||||
$sql.= " ".price2num($this->total_ttc/$this->qty).",";
|
$sql.= " ".(! empty($this->qty)?price2num($this->total_ttc / $this->qty):price2num($this->total_ttc)).",";
|
||||||
$sql.= " ".(! empty($this->date_start)?"'".$this->db->idate($this->date_start)."'":"null").",";
|
$sql.= " ".(! empty($this->date_start)?"'".$this->db->idate($this->date_start)."'":"null").",";
|
||||||
$sql.= " ".(! empty($this->date_end)?"'".$this->db->idate($this->date_end)."'":"null").",";
|
$sql.= " ".(! empty($this->date_end)?"'".$this->db->idate($this->date_end)."'":"null").",";
|
||||||
$sql.= ' '.(!empty($this->fk_code_ventilation)?$this->fk_code_ventilation:0).',';
|
$sql.= ' '.(! empty($this->fk_code_ventilation)?$this->fk_code_ventilation:0).',';
|
||||||
$sql.= ' '.$this->rang.',';
|
$sql.= ' '.$this->rang.',';
|
||||||
$sql.= ' '.$this->special_code.',';
|
$sql.= ' '.$this->special_code.',';
|
||||||
$sql.= " '".$this->db->escape($this->info_bits)."',";
|
$sql.= " '".$this->db->escape($this->info_bits)."',";
|
||||||
|
|||||||
@ -732,18 +732,27 @@ if (! defined('NOLOGIN'))
|
|||||||
$relativepathstring = preg_replace('/^custom\//', '', $relativepathstring);
|
$relativepathstring = preg_replace('/^custom\//', '', $relativepathstring);
|
||||||
//var_dump($relativepathstring);
|
//var_dump($relativepathstring);
|
||||||
|
|
||||||
// We click on a link that leave a page we have to save search criteria. We save them from tmp to no tmp
|
// We click on a link that leave a page we have to save search criteria, contextpage, limit and page. We save them from tmp to no tmp
|
||||||
if (! empty($_SESSION['lastsearch_values_tmp_'.$relativepathstring]))
|
if (! empty($_SESSION['lastsearch_values_tmp_'.$relativepathstring]))
|
||||||
{
|
{
|
||||||
$_SESSION['lastsearch_values_'.$relativepathstring]=$_SESSION['lastsearch_values_tmp_'.$relativepathstring];
|
$_SESSION['lastsearch_values_'.$relativepathstring]=$_SESSION['lastsearch_values_tmp_'.$relativepathstring];
|
||||||
unset($_SESSION['lastsearch_values_tmp_'.$relativepathstring]);
|
unset($_SESSION['lastsearch_values_tmp_'.$relativepathstring]);
|
||||||
}
|
}
|
||||||
// We also save contextpage
|
|
||||||
if (! empty($_SESSION['lastsearch_contextpage_tmp_'.$relativepathstring]))
|
if (! empty($_SESSION['lastsearch_contextpage_tmp_'.$relativepathstring]))
|
||||||
{
|
{
|
||||||
$_SESSION['lastsearch_contextpage_'.$relativepathstring]=$_SESSION['lastsearch_contextpage_tmp_'.$relativepathstring];
|
$_SESSION['lastsearch_contextpage_'.$relativepathstring]=$_SESSION['lastsearch_contextpage_tmp_'.$relativepathstring];
|
||||||
unset($_SESSION['lastsearch_contextpage_tmp_'.$relativepathstring]);
|
unset($_SESSION['lastsearch_contextpage_tmp_'.$relativepathstring]);
|
||||||
}
|
}
|
||||||
|
if (! empty($_SESSION['lastsearch_page_tmp_'.$relativepathstring]) && $_SESSION['lastsearch_page_tmp_'.$relativepathstring] > 1)
|
||||||
|
{
|
||||||
|
$_SESSION['lastsearch_page_'.$relativepathstring]=$_SESSION['lastsearch_page_tmp_'.$relativepathstring];
|
||||||
|
unset($_SESSION['lastsearch_page_tmp_'.$relativepathstring]);
|
||||||
|
}
|
||||||
|
if (! empty($_SESSION['lastsearch_limit_tmp_'.$relativepathstring]) && $_SESSION['lastsearch_limit_tmp_'.$relativepathstring] != $conf->liste_limit)
|
||||||
|
{
|
||||||
|
$_SESSION['lastsearch_limit_'.$relativepathstring]=$_SESSION['lastsearch_limit_tmp_'.$relativepathstring];
|
||||||
|
unset($_SESSION['lastsearch_limit_tmp_'.$relativepathstring]);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
$action = '';
|
$action = '';
|
||||||
@ -1967,7 +1976,8 @@ if (! function_exists("llxFooter"))
|
|||||||
function llxFooter($comment='',$zone='private', $disabledoutputofmessages=0)
|
function llxFooter($comment='',$zone='private', $disabledoutputofmessages=0)
|
||||||
{
|
{
|
||||||
global $conf, $langs, $user, $object;
|
global $conf, $langs, $user, $object;
|
||||||
global $delayedhtmlcontent, $contextpage;
|
global $delayedhtmlcontent;
|
||||||
|
global $contextpage, $page, $limit;
|
||||||
|
|
||||||
$ext='layout='.$conf->browser->layout.'&version='.urlencode(DOL_VERSION);
|
$ext='layout='.$conf->browser->layout.'&version='.urlencode(DOL_VERSION);
|
||||||
|
|
||||||
@ -2002,8 +2012,16 @@ if (! function_exists("llxFooter"))
|
|||||||
if (preg_match('/list\.php$/', $relativepathstring))
|
if (preg_match('/list\.php$/', $relativepathstring))
|
||||||
{
|
{
|
||||||
unset($_SESSION['lastsearch_contextpage_tmp_'.$relativepathstring]);
|
unset($_SESSION['lastsearch_contextpage_tmp_'.$relativepathstring]);
|
||||||
if (! empty($contextpage)) $_SESSION['lastsearch_contextpage_tmp_'.$relativepathstring]=$contextpage;
|
unset($_SESSION['lastsearch_page_tmp_'.$relativepathstring]);
|
||||||
|
unset($_SESSION['lastsearch_limit_tmp_'.$relativepathstring]);
|
||||||
|
|
||||||
|
if (! empty($contextpage)) $_SESSION['lastsearch_contextpage_tmp_'.$relativepathstring]=$contextpage;
|
||||||
|
if (! empty($page) && $page > 1) $_SESSION['lastsearch_page_tmp_'.$relativepathstring]=$page;
|
||||||
|
if (! empty($limit) && $limit != $conf->limit) $_SESSION['lastsearch_limit_tmp_'.$relativepathstring]=$limit;
|
||||||
|
|
||||||
unset($_SESSION['lastsearch_contextpage_'.$relativepathstring]);
|
unset($_SESSION['lastsearch_contextpage_'.$relativepathstring]);
|
||||||
|
unset($_SESSION['lastsearch_page_'.$relativepathstring]);
|
||||||
|
unset($_SESSION['lastsearch_limit_'.$relativepathstring]);
|
||||||
}
|
}
|
||||||
|
|
||||||
// Core error message
|
// Core error message
|
||||||
|
|||||||
@ -907,9 +907,9 @@ div.fiche {
|
|||||||
min-width: 150px;
|
min-width: 150px;
|
||||||
}
|
}
|
||||||
.thumbstat150 {
|
.thumbstat150 {
|
||||||
min-width: 170px;
|
min-width: 168px;
|
||||||
max-wdith: 171px;
|
max-width: 169px;
|
||||||
/* width: 170px; If I use with, there is trouble on size of flex boxes solved with min+max that is a little bit higer than min */
|
/* width: 168px; If I use with, there is trouble on size of flex boxes solved with min+max that is a little bit higer than min */
|
||||||
}
|
}
|
||||||
.thumbstat, .thumbstat150 {
|
.thumbstat, .thumbstat150 {
|
||||||
<?php if ($conf->browser->name == 'ie') { ?>
|
<?php if ($conf->browser->name == 'ie') { ?>
|
||||||
|
|||||||
@ -6,7 +6,7 @@
|
|||||||
* Copyright (C) 2005-2018 Regis Houssin <regis.houssin@inodbox.com>
|
* Copyright (C) 2005-2018 Regis Houssin <regis.houssin@inodbox.com>
|
||||||
* Copyright (C) 2005 Lionel Cousteix <etm_ltd@tiscali.co.uk>
|
* Copyright (C) 2005 Lionel Cousteix <etm_ltd@tiscali.co.uk>
|
||||||
* Copyright (C) 2011 Herve Prot <herve.prot@symeos.com>
|
* Copyright (C) 2011 Herve Prot <herve.prot@symeos.com>
|
||||||
* Copyright (C) 2012 Juanjo Menent <jmenent@2byte.es>
|
* Copyright (C) 2012-2018 Juanjo Menent <jmenent@2byte.es>
|
||||||
* Copyright (C) 2013 Florian Henry <florian.henry@open-concept.pro>
|
* Copyright (C) 2013 Florian Henry <florian.henry@open-concept.pro>
|
||||||
* Copyright (C) 2013-2016 Alexandre Spangaro <aspangaro.dolibarr@gmail.com>
|
* Copyright (C) 2013-2016 Alexandre Spangaro <aspangaro.dolibarr@gmail.com>
|
||||||
* Copyright (C) 2015-2017 Jean-François Ferry <jfefe@aternatik.fr>
|
* Copyright (C) 2015-2017 Jean-François Ferry <jfefe@aternatik.fr>
|
||||||
@ -154,7 +154,7 @@ if (empty($reshook)) {
|
|||||||
$langs->load("errors");
|
$langs->load("errors");
|
||||||
setEventMessages($langs->trans("ErrorUserCannotBeDelete"), null, 'errors');
|
setEventMessages($langs->trans("ErrorUserCannotBeDelete"), null, 'errors');
|
||||||
} else {
|
} else {
|
||||||
header("Location: index.php?restore_lastsearch_values=1");
|
header("Location: ".DOL_URL_ROOT."/user/list.php?restore_lastsearch_values=1");
|
||||||
exit;
|
exit;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@ -4,6 +4,7 @@
|
|||||||
* Copyright (C) 2005-2017 Regis Houssin <regis.houssin@inodbox.com>
|
* Copyright (C) 2005-2017 Regis Houssin <regis.houssin@inodbox.com>
|
||||||
* Copyright (C) 2011 Herve Prot <herve.prot@symeos.com>
|
* Copyright (C) 2011 Herve Prot <herve.prot@symeos.com>
|
||||||
* Copyright (C) 2012 Florian Henry <florian.henry@open-concept.pro>
|
* Copyright (C) 2012 Florian Henry <florian.henry@open-concept.pro>
|
||||||
|
* Copyright (C) 2018 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
|
||||||
@ -110,7 +111,7 @@ if (empty($reshook)) {
|
|||||||
{
|
{
|
||||||
$object->fetch($id);
|
$object->fetch($id);
|
||||||
$object->delete();
|
$object->delete();
|
||||||
header("Location: index.php?restore_lastsearch_values=1");
|
header("Location: ".DOL_URL_ROOT."/user/group/list.php?restore_lastsearch_values=1");
|
||||||
exit;
|
exit;
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user