commit
d038bf3e4b
109
ChangeLog
109
ChangeLog
@ -21,8 +21,100 @@ Following changes may create regressions for some external modules, but were nec
|
||||
* Removed method fetch_prods() and get_each_prod() not used, keep only get_arbo_each_prod() that is better.
|
||||
* The hook contaxt commcard has been renamed thirdpartycomm
|
||||
* The hook contaxt thirdpartycard has been renamed thirdpartycontact
|
||||
* Remove method Categorie:get_nb_categories() that was not used.
|
||||
|
||||
|
||||
|
||||
***** ChangeLog for 7.0.2 compared to 7.0.1 *****
|
||||
FIX: #8023
|
||||
FIX: #8259 can't update contact birthday with REST API
|
||||
FIX: #8359
|
||||
FIX: #8389
|
||||
FIX: #8478 !empty instead of count to avoid warning
|
||||
FIX: #8488
|
||||
FIX: #8559 Bug to generate cheque receipt
|
||||
FIX: #8571
|
||||
FIX: #8574
|
||||
FIX: #8580
|
||||
FIX: #8650
|
||||
FIX: actioncomm export: type filtering not working
|
||||
FIX: Add a test to avoid to reset binding by error.
|
||||
FIX: addline on invoice supplier manage rank on its own if not provided
|
||||
FIX: Add warning when expense report line not into range
|
||||
FIX: avoid Error: Call to undefined method mysqli::get_charset()
|
||||
FIX: avoid focus problem when select2 is in a modal dialog window
|
||||
FIX: Binding pages must start on fiscal month not calendar month
|
||||
FIX: button "Classify bill" on supplier order was not visible
|
||||
FIX: Button receive products not visible
|
||||
FIX: can bypass the CSRF protection with url with domain inside
|
||||
FIX: Can't edit option PROJECT_ALLOW_TO_LINK_FROM_OTHER_COMPANY
|
||||
FIX: commonobject: don't require notnull field if default set
|
||||
FIX: CommonObject: don't require 'notnull' field if 'default' set
|
||||
FIX: cron script disabled if module disabled
|
||||
FIX: CVE-2018-10092
|
||||
FIX: CVE-2018-10094
|
||||
FIX: CVE-2018-10095
|
||||
FIX: CVE-2018-9019
|
||||
FIX: CWE-89
|
||||
FIX: Data on income/expense report was always 0
|
||||
FIX: default addupdatedelete actions: uniformize add/update value checks
|
||||
FIX: default currency not set on supplier order creation from commercial menu #8459
|
||||
FIX: delete all product variants of a parent product
|
||||
FIX: Detail per account not visible when total < 0
|
||||
FIX: DOL_AUTOSET_COOKIE was not correctly setting value of cookie
|
||||
FIX: don't print empty date in CommonObject::showOutputField
|
||||
FIX: dont print empty date in CommonObject::showOutputField
|
||||
FIX: Draft invoice must be excluded from report
|
||||
FIX: environment shown on cron card
|
||||
FIX: Error in ContractLigne not return to Contract
|
||||
FIX: extrafields price and double were lost during a failed post.
|
||||
FIX: File name not visible in email preview
|
||||
FIX: filter/sorting on extrafield on contact list from contact tab
|
||||
FIX: Initial month on report income/expense per predefined group
|
||||
FIX: issue #8037
|
||||
FIX: Issue #8455
|
||||
FIX: issue #8470
|
||||
FIX: label in getnomurl projectlist
|
||||
FIX: limit access of email template page to internal users
|
||||
FIX: look and feel v7 "back to" for bookkeeping record
|
||||
FIX: Max nb of generation of recurring invoice should not show warning
|
||||
FIX: missing english name for object
|
||||
FIX: Missing include
|
||||
FIX: missing User object with API REST
|
||||
FIX: modulebuilder: could not create html fields
|
||||
FIX: modulebuilder: handle 'price' fieldtype
|
||||
FIX: multiple creation of same event
|
||||
FIX: Name of user not visible on journalizing expense report payments
|
||||
FIX: Not approved holidays must not be visible into timesheet
|
||||
FIX: Only approved expense report must be journalized
|
||||
FIX: payment term doc-specific label was not used
|
||||
FIX: payment term doc-specific label was not used (issue #8414)
|
||||
FIX: project category is type 6 not 5
|
||||
FIX: Projet is not prefilled when created from overwiew page
|
||||
FIX: Related contact printed in societe agenda
|
||||
FIX: Removed error when no error on accounting setup page
|
||||
FIX: remove var_dump
|
||||
FIX: sanitize setup params
|
||||
FIX: selectForFormsList: entity checked even is object not multi-entity managed
|
||||
FIX: service creation, right is tested regarding the product type
|
||||
FIX: some localtaxes errors
|
||||
FIX: Some report have data when several chart of accounts exists
|
||||
FIX: sql error using no category
|
||||
FIX: SQL Injection CWE-89
|
||||
FIX: Support or multicompany for sheduled jobs
|
||||
FIX: Test on mandatory status when closing proposal failed
|
||||
FIX: to allow IRPF not null even if main VAT is null.
|
||||
FIX: update wrong datetime extrafield
|
||||
FIX: Use priority to define order of sheduled jobs
|
||||
FIX: various modulebuilder-related issues
|
||||
FIX: view of balance before field
|
||||
FIX: weird password autocompletion in Goocle Chrome (issue #8479)
|
||||
FIX: weird password autocompletion in Google Chrome (issue #8479)
|
||||
FIX: When clearing filter, we must not save tmp criterias in session
|
||||
FIX: With x extrafields, request for multicompany label was done x times
|
||||
FIX: several XSS
|
||||
FIX: zip not filtered
|
||||
|
||||
***** ChangeLog for 7.0.1 compared to 7.0.0 *****
|
||||
FIX: #8139 User search does not work if MAIN_USE_OLD_SEARCH_FORM, missing list.php
|
||||
FIX: #8200
|
||||
@ -378,7 +470,22 @@ Following changes may create regressions for some external modules, but were nec
|
||||
|
||||
|
||||
|
||||
***** ChangeLog for 6.0.6 compared to 6.0.6 *****
|
||||
***** ChangeLog for 6.0.7 compared to 6.0.6 *****
|
||||
FIX: #8023
|
||||
FIX: #8259 can't update contact birthday with REST API
|
||||
FIX: #8478 !empty instead of count to avoid warning
|
||||
FIX: #8488
|
||||
FIX: actioncomm export: type filtering not working
|
||||
FIX: addline on invoice supplier manage rank on its own if not provided
|
||||
FIX: issue #8037
|
||||
FIX: label in getnomurl projectlist
|
||||
FIX: payment term doc-specific label was not used
|
||||
FIX: payment term doc-specific label was not used (issue #8414)
|
||||
FIX: project category is type 6 not 5 !!
|
||||
FIX: some localtaxes errors
|
||||
FIX: weird password autocompletion in Google Chrome (issue #8479)
|
||||
|
||||
***** ChangeLog for 6.0.6 compared to 6.0.5 *****
|
||||
FIX: #7974 Contract - Invalid reference on the document
|
||||
FIX: #8139
|
||||
FIX: #8139 User search does not work if MAIN_USE_OLD_SEARCH_FORM, missing list.php
|
||||
|
||||
@ -45,7 +45,7 @@ $includeconstants=array();
|
||||
|
||||
if (empty($argv[1]))
|
||||
{
|
||||
print "Usage: ".$script_file." release=auto|x.y.z[-mybuild] [includecustom=1] [includeconstant=CC:MY_CONF_NAME:value]\n";
|
||||
print "Usage: ".$script_file." release=autostable|auto[-mybuild]|x.y.z[-mybuild] [includecustom=1] [includeconstant=CC:MY_CONF_NAME:value]\n";
|
||||
print "Example: ".$script_file." release=6.0.0 includecustom=1 includeconstant=FR:INVOICE_CAN_ALWAYS_BE_REMOVED:0 includeconstant=all:MAILING_NO_USING_PHPMAIL:1\n";
|
||||
exit -1;
|
||||
}
|
||||
@ -68,30 +68,52 @@ while ($i < $argc)
|
||||
$i++;
|
||||
}
|
||||
|
||||
if (empty($release))
|
||||
{
|
||||
print "Error: Missing release paramater\n";
|
||||
print "Usage: ".$script_file." release=autostable|auto[-mybuild]|x.y.z[-mybuild] [includecustom=1] [includeconstant=CC:MY_CONF_NAME:value]\n";
|
||||
exit -1;
|
||||
}
|
||||
|
||||
$savrelease = $release;
|
||||
|
||||
// If release is auto, we take current version
|
||||
$tmpver=explode('-', $release, 2);
|
||||
if ($tmpver[0] == 'auto')
|
||||
if ($tmpver[0] == 'auto' || $tmpver[0] == 'autostable')
|
||||
{
|
||||
$release=DOL_VERSION;
|
||||
if ($tmpver[1]) $release.='-'.$tmpver[1];
|
||||
if ($tmpver[1] && $tmpver[0] == 'auto') $release.='-'.$tmpver[1];
|
||||
}
|
||||
|
||||
if (empty($includecustom))
|
||||
{
|
||||
$tmpver=explode('-', $release, 2);
|
||||
if (DOL_VERSION != $tmpver[0])
|
||||
{
|
||||
print 'Error: When parameter "includecustom" is not set and there is no suffix in release parameter, version declared into filefunc.in.php ('.DOL_VERSION.') must be exact same value than "release" parameter ('.$tmpver[0].')'."\n";
|
||||
print "Usage: ".$script_file." release=x.y.z[-...] [includecustom=1]\n";
|
||||
exit -1;
|
||||
}
|
||||
$tmpverbis=explode('-', $release, 2);
|
||||
if (empty($tmpverbis[1]) || $tmpver[0] == 'autostable')
|
||||
{
|
||||
if (DOL_VERSION != $tmpverbis[0] && $savrelease != 'auto')
|
||||
{
|
||||
print 'Error: When parameter "includecustom" is not set and there is no suffix in release parameter, version declared into filefunc.in.php ('.DOL_VERSION.') must be exact same value than "release" parameter ('.$tmpverbis[0].')'."\n";
|
||||
print "Usage: ".$script_file." release=autostable|auto[-mybuild]|x.y.z[-mybuild] [includecustom=1] [includeconstant=CC:MY_CONF_NAME:value]\n";
|
||||
exit -1;
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
$tmpverter=explode('-', DOL_VERSION, 2);
|
||||
if ($tmpverter[0] != $tmpverbis[0])
|
||||
{
|
||||
print 'Error: When parameter "includecustom" is not set, version declared into filefunc.in.php ('.DOL_VERSION.') must have value without prefix ('.$tmpverter[0].') that is exact same value than "release" parameter ('.$tmpverbis[0].')'."\n";
|
||||
print "Usage: ".$script_file." release=autostable|auto[-mybuild]|x.y.z[-mybuild] [includecustom=1] [includeconstant=CC:MY_CONF_NAME:value]\n";
|
||||
exit -1;
|
||||
}
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
if (! preg_match('/'.preg_quote(DOL_VERSION,'/').'-/',$release))
|
||||
{
|
||||
print 'Error: When parameter "includecustom" is set, version declared into filefunc.inc.php ('.DOL_VERSION.') must be used with a suffix into "release" parmater (ex: '.DOL_VERSION.'-mydistrib).'."\n";
|
||||
print "Usage: ".$script_file." release=x.y.z[-...] [includecustom=1]\n";
|
||||
print 'Error: When parameter "includecustom" is set, version declared into filefunc.inc.php ('.DOL_VERSION.') must be used with a suffix into "release" parameter (ex: '.DOL_VERSION.'-mydistrib).'."\n";
|
||||
print "Usage: ".$script_file." release=autostable|auto[-mybuild]|x.y.z[-mybuild] [includecustom=1] [includeconstant=CC:MY_CONF_NAME:value]\n";
|
||||
exit -1;
|
||||
}
|
||||
}
|
||||
|
||||
@ -466,10 +466,12 @@ if ($nboftargetok) {
|
||||
$ret=`rm -f $BUILDROOT/$PROJECT/build/dolibarr_*.deb`;
|
||||
$ret=`rm -f $BUILDROOT/$PROJECT/build/dolibarr_*.dsc`;
|
||||
$ret=`rm -f $BUILDROOT/$PROJECT/build/dolibarr_*.tar.gz`;
|
||||
$ret=`rm -f $BUILDROOT/$PROJECT/build/dolibarr_*.tar.xz`;
|
||||
$ret=`rm -f $BUILDROOT/$PROJECT/build/dolibarr-*.deb`;
|
||||
$ret=`rm -f $BUILDROOT/$PROJECT/build/dolibarr-*.rpm`;
|
||||
$ret=`rm -f $BUILDROOT/$PROJECT/build/dolibarr-*.tar`;
|
||||
$ret=`rm -f $BUILDROOT/$PROJECT/build/dolibarr-*.tar.gz`;
|
||||
$ret=`rm -f $BUILDROOT/$PROJECT/build/dolibarr-*.tar.xz`;
|
||||
$ret=`rm -f $BUILDROOT/$PROJECT/build/dolibarr-*.tgz`;
|
||||
$ret=`rm -f $BUILDROOT/$PROJECT/build/dolibarr-*.xz`;
|
||||
$ret=`rm -f $BUILDROOT/$PROJECT/build/dolibarr-*.zip`;
|
||||
@ -849,6 +851,8 @@ if ($nboftargetok) {
|
||||
unlink("$NEWDESTI/${FILENAMEDEB}.changes");
|
||||
print "Remove target ${FILENAMEDEB}.debian.tar.gz...\n";
|
||||
unlink("$NEWDESTI/${FILENAMEDEB}.debian.tar.gz");
|
||||
print "Remove target ${FILENAMEDEB}.debian.tar.xz...\n";
|
||||
unlink("$NEWDESTI/${FILENAMEDEB}.debian.tar.xz");
|
||||
print "Remove target ${FILENAMEDEBNATIVE}.orig.tar.gz...\n";
|
||||
unlink("$NEWDESTI/${FILENAMEDEBNATIVE}.orig.tar.gz");
|
||||
|
||||
@ -1024,7 +1028,7 @@ if ($nboftargetok) {
|
||||
$ret=`mv $BUILDROOT/*_all.deb "$NEWDESTI/"`;
|
||||
$ret=`mv $BUILDROOT/*.dsc "$NEWDESTI/"`;
|
||||
$ret=`mv $BUILDROOT/*.orig.tar.gz "$NEWDESTI/"`;
|
||||
$ret=`mv $BUILDROOT/*.debian.tar.gz "$NEWDESTI/"`;
|
||||
$ret=`mv $BUILDROOT/*.debian.tar.xz "$NEWDESTI/"`;
|
||||
$ret=`mv $BUILDROOT/*.changes "$NEWDESTI/"`;
|
||||
next;
|
||||
}
|
||||
@ -1168,7 +1172,7 @@ if ($nboftargetok) {
|
||||
"$DESTI/package_debian-ubuntu/${FILENAMEDEB}_all.deb"=>'Dolibarr installer for Debian-Ubuntu (DoliDeb)',
|
||||
"$DESTI/package_debian-ubuntu/${FILENAMEDEB}_amd64.changes"=>'none', # none means it won't be published on SF
|
||||
"$DESTI/package_debian-ubuntu/${FILENAMEDEB}.dsc"=>'none', # none means it won't be published on SF
|
||||
"$DESTI/package_debian-ubuntu/${FILENAMEDEB}.debian.tar.gz"=>'none', # none means it won't be published on SF
|
||||
"$DESTI/package_debian-ubuntu/${FILENAMEDEB}.debian.tar.xz"=>'none', # none means it won't be published on SF
|
||||
"$DESTI/package_debian-ubuntu/${FILENAMEDEBSHORT}.orig.tar.gz"=>'none', # none means it won't be published on SF
|
||||
"$DESTI/package_windows/$FILENAMEEXEDOLIWAMP.exe"=>'Dolibarr installer for Windows (DoliWamp)',
|
||||
"$DESTI/standard/$FILENAMETGZ.tgz"=>'Dolibarr ERP-CRM',
|
||||
@ -1181,8 +1185,7 @@ if ($nboftargetok) {
|
||||
"$DESTI/package_debian-ubuntu/${FILENAMEDEB}_all.deb"=>'package_debian-ubuntu',
|
||||
"$DESTI/package_debian-ubuntu/${FILENAMEDEB}_amd64.changes"=>'package_debian-ubuntu',
|
||||
"$DESTI/package_debian-ubuntu/${FILENAMEDEB}.dsc"=>'package_debian-ubuntu',
|
||||
"$DESTI/package_debian-ubuntu/${FILENAMEDEB}.debian.tar.gz"=>'package_debian-ubuntu',
|
||||
"$DESTI/package_debian-ubuntu/${FILENAMEDEBSHORT}.orig.tar.gz"=>'package_debian-ubuntu',
|
||||
"$DESTI/package_debian-ubuntu/${FILENAMEDEB}.debian.tar.xz"=>'package_debian-ubuntu',
|
||||
"$DESTI/package_debian-ubuntu/${FILENAMEDEBSHORT}.orig.tar.gz"=>'package_debian-ubuntu',
|
||||
"$DESTI/package_windows/$FILENAMEEXEDOLIWAMP.exe"=>'package_windows',
|
||||
"$DESTI/standard/$FILENAMETGZ.tgz"=>'standard',
|
||||
|
||||
@ -170,9 +170,9 @@ $pcgver = $conf->global->CHARTOFACCOUNTS;
|
||||
$sql = "SELECT aa.rowid, aa.fk_pcg_version, aa.pcg_type, aa.pcg_subtype, aa.account_number, aa.account_parent , aa.label, aa.active, ";
|
||||
$sql .= " a2.rowid as rowid2, a2.label as label2, a2.account_number as account_number2";
|
||||
$sql .= " FROM " . MAIN_DB_PREFIX . "accounting_account as aa";
|
||||
$sql .= " LEFT JOIN ".MAIN_DB_PREFIX."accounting_system as asy ON aa.fk_pcg_version = asy.pcg_version";
|
||||
if ($db->type == 'pgsql') $sql .= " LEFT JOIN ".MAIN_DB_PREFIX."accounting_account as a2 ON a2.rowid = aa.account_parent";
|
||||
else $sql .= " LEFT JOIN ".MAIN_DB_PREFIX."accounting_account as a2 ON a2.rowid = aa.account_parent";
|
||||
$sql .= " LEFT JOIN ".MAIN_DB_PREFIX."accounting_system as asy ON aa.fk_pcg_version = asy.pcg_version AND aa.entity = " . $conf->entity;
|
||||
if ($db->type == 'pgsql') $sql .= " LEFT JOIN ".MAIN_DB_PREFIX."accounting_account as a2 ON a2.rowid = aa.account_parent AND a2.entity = " . $conf->entity;
|
||||
else $sql .= " LEFT JOIN ".MAIN_DB_PREFIX."accounting_account as a2 ON a2.rowid = aa.account_parent AND a2.entity = " . $conf->entity;
|
||||
$sql .= " WHERE asy.rowid = " . $pcgver;
|
||||
//print $sql;
|
||||
if (strlen(trim($search_account))) $sql .= natural_search("aa.account_number", $search_account);
|
||||
|
||||
@ -84,7 +84,7 @@ $tablib[35]= "DictionaryAccountancyJournal";
|
||||
|
||||
// Requests to extract data
|
||||
$tabsql=array();
|
||||
$tabsql[35]= "SELECT a.rowid as rowid, a.code as code, a.label, a.nature, a.active FROM ".MAIN_DB_PREFIX."accounting_journal as a";
|
||||
$tabsql[35]= "SELECT a.rowid as rowid, a.code as code, a.label, a.nature, a.active FROM ".MAIN_DB_PREFIX."accounting_journal as a WHERE a.entity=".$conf->entity;
|
||||
|
||||
// Criteria to sort dictionaries
|
||||
$tabsqlsort=array();
|
||||
@ -100,7 +100,7 @@ $tabfieldvalue[35]= "code,label,nature";
|
||||
|
||||
// Nom des champs dans la table pour insertion d'un enregistrement
|
||||
$tabfieldinsert=array();
|
||||
$tabfieldinsert[35]= "code,label,nature";
|
||||
$tabfieldinsert[35]= "code,label,nature,entity";
|
||||
|
||||
// Nom du rowid si le champ n'est pas de type autoincrement
|
||||
// Example: "" if id field is "rowid" and has autoincrement on
|
||||
|
||||
@ -29,9 +29,7 @@ require_once DOL_DOCUMENT_ROOT.'/core/class/html.formactions.class.php';
|
||||
if (!$user->admin)
|
||||
accessforbidden();
|
||||
|
||||
$langs->load("admin");
|
||||
$langs->load("other");
|
||||
$langs->load("agenda");
|
||||
$langs->loadLangs(array("admin","other","agenda"));
|
||||
|
||||
$action = GETPOST('action','alpha');
|
||||
$value = GETPOST('value','alpha');
|
||||
@ -173,8 +171,6 @@ llxHeader();
|
||||
|
||||
$linkback='<a href="'.DOL_URL_ROOT.'/admin/modules.php?restore_lastsearch_values=1">'.$langs->trans("BackToModuleList").'</a>';
|
||||
print load_fiche_titre($langs->trans("AgendaSetup"),$linkback,'title_setup');
|
||||
print "<br>\n";
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
@ -6,7 +6,7 @@
|
||||
* Copyright (C) 2004 Eric Seigne <eric.seigne@ryxeo.com>
|
||||
* Copyright (C) 2005-2012 Regis Houssin <regis.houssin@capnetworks.com>
|
||||
* Copyright (C) 2011-2012 Juanjo Menent <jmenent@2byte.es>
|
||||
* Copyright (C) 2011-2015 Philippe Grand <philippe.grand@atoo-net.com>
|
||||
* Copyright (C) 2011-2018 Philippe Grand <philippe.grand@atoo-net.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
|
||||
@ -34,10 +34,8 @@ require_once DOL_DOCUMENT_ROOT.'/core/lib/pdf.lib.php';
|
||||
require_once DOL_DOCUMENT_ROOT.'/core/lib/expedition.lib.php';
|
||||
require_once DOL_DOCUMENT_ROOT.'/expedition/class/expedition.class.php';
|
||||
|
||||
$langs->load("admin");
|
||||
$langs->load("sendings");
|
||||
$langs->load("deliveries");
|
||||
$langs->load('other');
|
||||
// Load traductions files requiredby by page
|
||||
$langs->loadLangs(array("admin", "sendings", "deliveries", "other"));
|
||||
|
||||
if (! $user->admin)
|
||||
accessforbidden();
|
||||
|
||||
@ -6,8 +6,8 @@
|
||||
* Copyright (C) 2004 Eric Seigne <eric.seigne@ryxeo.com>
|
||||
* Copyright (C) 2005-2014 Regis Houssin <regis.houssin@capnetworks.com>
|
||||
* Copyright (C) 2011-2013 Juanjo Menent <jmenent@2byte.es>
|
||||
* Copyright (C) 2011-2015 Philippe Grand <philippe.grand@atoo-net.com>
|
||||
* Copyright (C) 2015 Claudio Aschieri <c.aschieri@19.coop>
|
||||
* Copyright (C) 2011-2018 Philippe Grand <philippe.grand@atoo-net.com>
|
||||
* Copyright (C) 2015 Claudio Aschieri <c.aschieri@19.coop>
|
||||
*
|
||||
* 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
|
||||
@ -34,10 +34,8 @@ require_once DOL_DOCUMENT_ROOT.'/core/lib/pdf.lib.php';
|
||||
require_once DOL_DOCUMENT_ROOT.'/core/lib/expedition.lib.php';
|
||||
require_once DOL_DOCUMENT_ROOT.'/livraison/class/livraison.class.php';
|
||||
|
||||
$langs->load("admin");
|
||||
$langs->load("sendings");
|
||||
$langs->load("deliveries");
|
||||
$langs->load('other');
|
||||
// Load traductions files requiredby by page
|
||||
$langs->loadLangs(array("admin", "sendings", "deliveries", "other"));
|
||||
|
||||
if (!$user->admin) accessforbidden();
|
||||
|
||||
@ -216,7 +214,6 @@ foreach ($dirmodels as $reldir)
|
||||
$handle = opendir($dir);
|
||||
if (is_resource($handle))
|
||||
{
|
||||
$var=true;
|
||||
while (($file = readdir($handle))!==false)
|
||||
{
|
||||
if (substr($file, 0, 14) == 'mod_livraison_' && substr($file, dol_strlen($file)-3, 3) == 'php')
|
||||
@ -337,7 +334,6 @@ print "</tr>\n";
|
||||
|
||||
clearstatcache();
|
||||
|
||||
$var=true;
|
||||
foreach ($dirmodels as $reldir)
|
||||
{
|
||||
$dir = dol_buildpath($reldir."core/modules/livraison/doc/");
|
||||
@ -452,7 +448,6 @@ print '<td>'.$langs->trans("Parameter").'</td>';
|
||||
print '<td align="center" width="60">'.$langs->trans("Value").'</td>';
|
||||
print '<td width="80"> </td>';
|
||||
print "</tr>\n";
|
||||
$var=true;
|
||||
|
||||
$substitutionarray=pdf_getSubstitutionArray($langs, null, null, 2);
|
||||
$substitutionarray['__(AnyTranslationKey)__']=$langs->trans("Translation");
|
||||
@ -460,7 +455,6 @@ $htmltext = '<i>'.$langs->trans("AvailableVariables").':<br>';
|
||||
foreach($substitutionarray as $key => $val) $htmltext.=$key.'<br>';
|
||||
$htmltext.='</i>';
|
||||
|
||||
$var=! $var;
|
||||
print '<form action="'.$_SERVER["PHP_SELF"].'" method="post">';
|
||||
print '<input type="hidden" name="token" value="'.$_SESSION['newtoken'].'">';
|
||||
print '<input type="hidden" name="action" value="set_DELIVERY_FREE_TEXT">';
|
||||
|
||||
@ -27,8 +27,8 @@ require '../main.inc.php';
|
||||
require_once DOL_DOCUMENT_ROOT.'/core/lib/admin.lib.php';
|
||||
require_once DOL_DOCUMENT_ROOT.'/core/lib/security2.lib.php';
|
||||
|
||||
$langs->load("admin");
|
||||
$langs->load("mails");
|
||||
// Load traductions files requiredby by page
|
||||
$langs->loadLangs(array("admin", "mails"));
|
||||
|
||||
if (!$user->admin) accessforbidden();
|
||||
|
||||
@ -105,29 +105,24 @@ print '<form method="post" action="'.$_SERVER["PHP_SELF"].'">';
|
||||
print '<input type="hidden" name="token" value="'.$_SESSION['newtoken'].'">';
|
||||
print '<input type="hidden" name="action" value="setvalue">';
|
||||
|
||||
$var=true;
|
||||
|
||||
print '<table class="noborder" width="100%">';
|
||||
print '<tr class="liste_titre">';
|
||||
print '<td>'.$langs->trans("Parameter").'</td>';
|
||||
print '<td>'.$langs->trans("Value").'</td>';
|
||||
print "</tr>\n";
|
||||
|
||||
|
||||
print '<tr class="oddeven"><td>';
|
||||
print $langs->trans("MailingEMailFrom").'</td><td>';
|
||||
print '<input size="32" type="text" name="MAILING_EMAIL_FROM" value="'.$conf->global->MAILING_EMAIL_FROM.'">';
|
||||
if (!empty($conf->global->MAILING_EMAIL_FROM) && ! isValidEmail($conf->global->MAILING_EMAIL_FROM)) print ' '.img_warning($langs->trans("BadEMail"));
|
||||
print '</td></tr>';
|
||||
|
||||
|
||||
print '<tr class="oddeven"><td>';
|
||||
print $langs->trans("MailingEMailError").'</td><td>';
|
||||
print '<input size="32" type="text" name="MAILING_EMAIL_ERRORSTO" value="'.$conf->global->MAILING_EMAIL_ERRORSTO.'">';
|
||||
if (!empty($conf->global->MAILING_EMAIL_ERRORSTO) && ! isValidEmail($conf->global->MAILING_EMAIL_ERRORSTO)) print ' '.img_warning($langs->trans("BadEMail"));
|
||||
print '</td></tr>';
|
||||
|
||||
|
||||
print '<tr class="oddeven"><td>';
|
||||
print $langs->trans("MailingDelay").'</td><td>';
|
||||
print '<input size="32" type="text" name="MAILING_DELAY" value="'.$conf->global->MAILING_DELAY.'">';
|
||||
|
||||
@ -32,9 +32,8 @@ require_once DOL_DOCUMENT_ROOT.'/core/lib/admin.lib.php';
|
||||
require_once DOL_DOCUMENT_ROOT.'/core/lib/mailmanspip.lib.php';
|
||||
require_once DOL_DOCUMENT_ROOT.'/categories/class/categorie.class.php';
|
||||
|
||||
$langs->load("admin");
|
||||
$langs->load("members");
|
||||
$langs->load("mailmanspip");
|
||||
// Load traductions files requiredby by page
|
||||
$langs->loadLangs(array("admin", "members", "mailmanspip"));
|
||||
|
||||
if (! $user->admin) accessforbidden();
|
||||
|
||||
@ -49,7 +48,7 @@ $testunsubscribeemail = GETPOST("testunsubscribeemail");
|
||||
* Actions
|
||||
*/
|
||||
|
||||
// Action mise a jour ou ajout d'une constante
|
||||
// Action updated or added a constant
|
||||
if ($action == 'update' || $action == 'add')
|
||||
{
|
||||
foreach($_POST['constname'] as $key => $val)
|
||||
@ -156,9 +155,6 @@ print load_fiche_titre($langs->trans("MailmanSpipSetup"),$linkback,'title_setup'
|
||||
|
||||
$head = mailmanspip_admin_prepare_head();
|
||||
|
||||
|
||||
$var=true;
|
||||
|
||||
if (! empty($conf->global->ADHERENT_USE_MAILMAN))
|
||||
{
|
||||
print '<form action="'.$_SERVER["PHP_SELF"].'" method="POST">';
|
||||
|
||||
@ -27,12 +27,8 @@ require '../main.inc.php';
|
||||
require_once DOL_DOCUMENT_ROOT.'/core/lib/admin.lib.php';
|
||||
require_once DOL_DOCUMENT_ROOT.'/core/lib/files.lib.php';
|
||||
|
||||
$langs->load("companies");
|
||||
$langs->load("products");
|
||||
$langs->load("admin");
|
||||
$langs->load("mails");
|
||||
$langs->load("other");
|
||||
$langs->load("errors");
|
||||
// Load traductions files requiredby by page
|
||||
$langs->loadLangs(array("companies", "products", "admin", "mails", "other", "errors"));
|
||||
|
||||
$action=GETPOST('action','alpha');
|
||||
|
||||
@ -260,13 +256,11 @@ if ($action == 'edit')
|
||||
|
||||
|
||||
clearstatcache();
|
||||
$var=true;
|
||||
|
||||
print '<table class="noborder" width="100%">';
|
||||
print '<tr class="liste_titre"><td class="titlefieldmiddle">'.$langs->trans("Parameter").'</td><td>'.$langs->trans("Value").'</td></tr>';
|
||||
|
||||
// Disable
|
||||
|
||||
print '<tr class="oddeven"><td>'.$langs->trans("MAIN_DISABLE_ALL_MAILS").'</td><td>';
|
||||
print $form->selectyesno('MAIN_DISABLE_ALL_MAILS',$conf->global->MAIN_DISABLE_ALL_MAILS,1);
|
||||
print '</td></tr>';
|
||||
@ -283,11 +277,9 @@ if ($action == 'edit')
|
||||
print '</td></tr>';
|
||||
|
||||
// Separator
|
||||
|
||||
print '<tr class="oddeven"><td colspan="2"> </td></tr>';
|
||||
|
||||
// Method
|
||||
|
||||
print '<tr class="oddeven"><td>'.$langs->trans("MAIN_MAIL_SENDMODE").'</td><td>';
|
||||
|
||||
// SuperAdministrator access only
|
||||
@ -338,7 +330,6 @@ if ($action == 'edit')
|
||||
print '</td></tr>';
|
||||
|
||||
// Port
|
||||
|
||||
print '<tr class="oddeven"><td>';
|
||||
if (! $conf->use_javascript_ajax && $linuxlike && $conf->global->MAIN_MAIL_SENDMODE == 'mail')
|
||||
{
|
||||
@ -411,7 +402,6 @@ if ($action == 'edit')
|
||||
}
|
||||
|
||||
// TLS
|
||||
|
||||
print '<tr class="oddeven"><td>'.$langs->trans("MAIN_MAIL_EMAIL_TLS").'</td><td>';
|
||||
if (! empty($conf->use_javascript_ajax) || (isset($conf->global->MAIN_MAIL_SENDMODE) && in_array($conf->global->MAIN_MAIL_SENDMODE, array('smtps', 'swiftmailer'))))
|
||||
{
|
||||
@ -469,7 +459,6 @@ if ($action == 'edit')
|
||||
print '<tr class="oddeven"><td colspan="2"> </td></tr>';
|
||||
|
||||
// From
|
||||
|
||||
print '<tr class="oddeven"><td>'.$langs->trans("MAIN_MAIL_EMAIL_FROM",ini_get('sendmail_from')?ini_get('sendmail_from'):$langs->transnoentities("Undefined")).'</td>';
|
||||
print '<td><input class="flat" name="MAIN_MAIL_EMAIL_FROM" size="32" value="' . (! empty($conf->global->MAIN_MAIL_EMAIL_FROM)?$conf->global->MAIN_MAIL_EMAIL_FROM:'');
|
||||
print '"></td></tr>';
|
||||
@ -497,22 +486,19 @@ if ($action == 'edit')
|
||||
}
|
||||
else dol_print_error($db);*/
|
||||
|
||||
print '<tr '.$bc[$var?1:0].'><td>'.$langs->trans('MAIN_MAIL_DEFAULT_FROMTYPE').'</td><td>';
|
||||
print '<tr class="oddeven"><td>'.$langs->trans('MAIN_MAIL_DEFAULT_FROMTYPE').'</td><td>';
|
||||
print $form->selectarray('MAIN_MAIL_DEFAULT_FROMTYPE', $liste, $conf->global->MAIN_MAIL_DEFAULT_FROMTYPE, 0);
|
||||
print '</td></tr>';
|
||||
|
||||
// Separator
|
||||
|
||||
print '<tr class="oddeven"><td colspan="2"> </td></tr>';
|
||||
|
||||
// From
|
||||
|
||||
print '<tr class="oddeven"><td>'.$langs->trans("MAIN_MAIL_ERRORS_TO").'</td>';
|
||||
print '<td><input class="flat" name="MAIN_MAIL_ERRORS_TO" size="32" value="' . (! empty($conf->global->MAIN_MAIL_ERRORS_TO)?$conf->global->MAIN_MAIL_ERRORS_TO:'');
|
||||
print '"></td></tr>';
|
||||
|
||||
// Autocopy to
|
||||
|
||||
print '<tr class="oddeven"><td>'.$langs->trans("MAIN_MAIL_AUTOCOPY_TO").'</td>';
|
||||
print '<td><input class="flat" name="MAIN_MAIL_AUTOCOPY_TO" size="32" value="' . (! empty($conf->global->MAIN_MAIL_AUTOCOPY_TO)?$conf->global->MAIN_MAIL_AUTOCOPY_TO:'');
|
||||
print '"></td></tr>';
|
||||
@ -535,15 +521,11 @@ else
|
||||
|
||||
print $langs->trans("EMailsDesc")."<br>\n";
|
||||
print "<br>\n";
|
||||
|
||||
|
||||
$var=true;
|
||||
|
||||
|
||||
print '<table class="noborder" width="100%">';
|
||||
print '<tr class="liste_titre"><td class="titlefieldmiddle">'.$langs->trans("Parameter").'</td><td>'.$langs->trans("Value").'</td></tr>';
|
||||
|
||||
// Disable
|
||||
|
||||
print '<tr class="oddeven"><td>'.$langs->trans("MAIN_DISABLE_ALL_MAILS").'</td><td>'.yn($conf->global->MAIN_DISABLE_ALL_MAILS).'</td></tr>';
|
||||
|
||||
// Force e-mail recipient
|
||||
@ -555,11 +537,9 @@ else
|
||||
print '<tr class="oddeven"><td>'.$langs->trans("MAIN_MAIL_ENABLED_USER_DEST_SELECT").'</td><td>'.yn($conf->global->MAIN_MAIL_ENABLED_USER_DEST_SELECT).'</td></tr>';
|
||||
|
||||
// Separator
|
||||
|
||||
print '<tr class="oddeven"><td colspan="2"> </td></tr>';
|
||||
|
||||
// Method
|
||||
|
||||
print '<tr class="oddeven"><td>'.$langs->trans("MAIN_MAIL_SENDMODE").'</td><td>';
|
||||
$text=$listofmethods[$conf->global->MAIN_MAIL_SENDMODE];
|
||||
if (empty($text)) $text=$langs->trans("Undefined").img_warning();
|
||||
@ -567,7 +547,6 @@ else
|
||||
print '</td></tr>';
|
||||
|
||||
// Host server
|
||||
|
||||
if ($linuxlike && (isset($conf->global->MAIN_MAIL_SENDMODE) && $conf->global->MAIN_MAIL_SENDMODE == 'mail'))
|
||||
{
|
||||
print '<tr class="oddeven"><td>'.$langs->trans("MAIN_MAIL_SMTP_SERVER_NotAvailableOnLinuxLike").'</td><td><span class="opacitymedium">'.$langs->trans("SeeLocalSendMailSetup").'</span></td></tr>';
|
||||
@ -578,7 +557,6 @@ else
|
||||
}
|
||||
|
||||
// Port
|
||||
|
||||
if ($linuxlike && (isset($conf->global->MAIN_MAIL_SENDMODE) && $conf->global->MAIN_MAIL_SENDMODE == 'mail'))
|
||||
{
|
||||
print '<tr class="oddeven"><td>'.$langs->trans("MAIN_MAIL_SMTP_PORT_NotAvailableOnLinuxLike").'</td><td><span class="opacitymedium">'.$langs->trans("SeeLocalSendMailSetup").'</span></td></tr>';
|
||||
@ -589,21 +567,18 @@ else
|
||||
}
|
||||
|
||||
// SMTPS ID
|
||||
|
||||
if (isset($conf->global->MAIN_MAIL_SENDMODE) && in_array($conf->global->MAIN_MAIL_SENDMODE, array('smtps', 'swiftmailer')))
|
||||
{
|
||||
print '<tr class="oddeven"><td>'.$langs->trans("MAIN_MAIL_SMTPS_ID").'</td><td>'.$conf->global->MAIN_MAIL_SMTPS_ID.'</td></tr>';
|
||||
}
|
||||
|
||||
// SMTPS PW
|
||||
|
||||
if (isset($conf->global->MAIN_MAIL_SENDMODE) && in_array($conf->global->MAIN_MAIL_SENDMODE, array('smtps', 'swiftmailer')))
|
||||
{
|
||||
print '<tr class="oddeven"><td>'.$langs->trans("MAIN_MAIL_SMTPS_PW").'</td><td>'.preg_replace('/./','*',$conf->global->MAIN_MAIL_SMTPS_PW).'</td></tr>';
|
||||
}
|
||||
|
||||
// TLS
|
||||
|
||||
print '<tr class="oddeven"><td>'.$langs->trans("MAIN_MAIL_EMAIL_TLS").'</td><td>';
|
||||
if (isset($conf->global->MAIN_MAIL_SENDMODE) && in_array($conf->global->MAIN_MAIL_SENDMODE, array('smtps', 'swiftmailer')))
|
||||
{
|
||||
@ -617,7 +592,6 @@ else
|
||||
print '</td></tr>';
|
||||
|
||||
// STARTTLS
|
||||
|
||||
print '<tr class="oddeven"><td>'.$langs->trans("MAIN_MAIL_EMAIL_STARTTLS").'</td><td>';
|
||||
if (isset($conf->global->MAIN_MAIL_SENDMODE) && in_array($conf->global->MAIN_MAIL_SENDMODE, array('smtps', 'swiftmailer')))
|
||||
{
|
||||
@ -634,7 +608,6 @@ else
|
||||
if ($conf->global->MAIN_MAIL_SENDMODE == 'swiftmailer')
|
||||
{
|
||||
// DKIM
|
||||
|
||||
print '<tr class="oddeven"><td>'.$langs->trans("MAIN_MAIL_EMAIL_DKIM_ENABLED").'</td><td>';
|
||||
if (isset($conf->global->MAIN_MAIL_SENDMODE) && in_array($conf->global->MAIN_MAIL_SENDMODE, array('swiftmailer')))
|
||||
{
|
||||
@ -664,11 +637,9 @@ else
|
||||
}
|
||||
|
||||
// Separator
|
||||
|
||||
print '<tr class="oddeven"><td colspan="2"> </td></tr>';
|
||||
|
||||
// From
|
||||
|
||||
print '<tr class="oddeven"><td>'.$langs->trans("MAIN_MAIL_EMAIL_FROM",ini_get('sendmail_from')?ini_get('sendmail_from'):$langs->transnoentities("Undefined")).'</td>';
|
||||
print '<td>'.$conf->global->MAIN_MAIL_EMAIL_FROM;
|
||||
if (! empty($conf->global->MAIN_MAIL_EMAIL_FROM) && ! isValidEmail($conf->global->MAIN_MAIL_EMAIL_FROM)) print img_warning($langs->trans("ErrorBadEMail"));
|
||||
@ -723,18 +694,15 @@ else
|
||||
print '</td></tr>';
|
||||
|
||||
// Separator
|
||||
|
||||
print '<tr class="oddeven"><td colspan="2"> </td></tr>';
|
||||
|
||||
// Errors To
|
||||
|
||||
print '<tr class="oddeven"><td>'.$langs->trans("MAIN_MAIL_ERRORS_TO").'</td>';
|
||||
print '<td>'.$conf->global->MAIN_MAIL_ERRORS_TO;
|
||||
if (! empty($conf->global->MAIN_MAIL_ERRORS_TO) && ! isValidEmail($conf->global->MAIN_MAIL_ERRORS_TO)) print img_warning($langs->trans("ErrorBadEMail"));
|
||||
print '</td></tr>';
|
||||
|
||||
// Autocopy to
|
||||
|
||||
print '<tr class="oddeven"><td>'.$langs->trans("MAIN_MAIL_AUTOCOPY_TO").'</td>';
|
||||
print '<td>';
|
||||
if (! empty($conf->global->MAIN_MAIL_AUTOCOPY_TO))
|
||||
|
||||
@ -228,7 +228,6 @@ if ($action == 'edit')
|
||||
|
||||
|
||||
clearstatcache();
|
||||
$var=true;
|
||||
|
||||
print '<table class="noborder" width="100%">';
|
||||
print '<tr class="liste_titre"><td class="titlefieldmiddle">'.$langs->trans("Parameter").'</td><td>'.$langs->trans("Value").'</td></tr>';
|
||||
@ -341,7 +340,6 @@ if ($action == 'edit')
|
||||
// PW
|
||||
if (! empty($conf->use_javascript_ajax) || (isset($conf->global->MAIN_MAIL_SENDMODE_EMAILING) && in_array($conf->global->MAIN_MAIL_SENDMODE_EMAILING, array('smtps', 'swiftmailer'))))
|
||||
{
|
||||
|
||||
$mainsmtppw=(! empty($conf->global->MAIN_MAIL_SMTPS_PW_EMAILING)?$conf->global->MAIN_MAIL_SMTPS_PW_EMAILING:'');
|
||||
print '<tr class="drag drop oddeven hideifdefault"><td>'.$langs->trans("MAIN_MAIL_SMTPS_PW").'</td><td>';
|
||||
// SuperAdministrator access only
|
||||
@ -405,14 +403,10 @@ else
|
||||
print $langs->trans("EMailsDesc")."<br>\n";
|
||||
print "<br>\n";
|
||||
|
||||
|
||||
$var=true;
|
||||
|
||||
print '<table class="noborder" width="100%">';
|
||||
print '<tr class="liste_titre"><td class="titlefieldmiddle">'.$langs->trans("Parameter").'</td><td>'.$langs->trans("Value").'</td></tr>';
|
||||
|
||||
// Method
|
||||
|
||||
print '<tr class="oddeven"><td>'.$langs->trans("MAIN_MAIL_SENDMODE").'</td><td>';
|
||||
$text=$listofmethods[$conf->global->MAIN_MAIL_SENDMODE_EMAILING];
|
||||
if (empty($text)) $text=$langs->trans("Undefined").img_warning();
|
||||
@ -422,7 +416,6 @@ else
|
||||
if (! empty($conf->global->MAIN_MAIL_SENDMODE_EMAILING) && $conf->global->MAIN_MAIL_SENDMODE_EMAILING != 'default')
|
||||
{
|
||||
// Host server
|
||||
|
||||
if ($linuxlike && (isset($conf->global->MAIN_MAIL_SENDMODE_EMAILING) && $conf->global->MAIN_MAIL_SENDMODE_EMAILING == 'mail'))
|
||||
{
|
||||
print '<tr class="oddeven hideifdefault"><td>'.$langs->trans("MAIN_MAIL_SMTP_SERVER_NotAvailableOnLinuxLike").'</td><td>'.$langs->trans("SeeLocalSendMailSetup").'</td></tr>';
|
||||
@ -433,7 +426,6 @@ else
|
||||
}
|
||||
|
||||
// Port
|
||||
|
||||
if ($linuxlike && (isset($conf->global->MAIN_MAIL_SENDMODE_EMAILING) && $conf->global->MAIN_MAIL_SENDMODE_EMAILING == 'mail'))
|
||||
{
|
||||
print '<tr class="oddeven hideifdefault"><td>'.$langs->trans("MAIN_MAIL_SMTP_PORT_NotAvailableOnLinuxLike").'</td><td>'.$langs->trans("SeeLocalSendMailSetup").'</td></tr>';
|
||||
@ -444,21 +436,18 @@ else
|
||||
}
|
||||
|
||||
// SMTPS ID
|
||||
|
||||
if (isset($conf->global->MAIN_MAIL_SENDMODE_EMAILING) && in_array($conf->global->MAIN_MAIL_SENDMODE_EMAILING, array('smtps', 'swiftmailer')))
|
||||
{
|
||||
print '<tr class="oddeven hideifdefault"><td>'.$langs->trans("MAIN_MAIL_SMTPS_ID").'</td><td>'.$conf->global->MAIN_MAIL_SMTPS_ID_EMAILING.'</td></tr>';
|
||||
}
|
||||
|
||||
// SMTPS PW
|
||||
|
||||
if (isset($conf->global->MAIN_MAIL_SENDMODE_EMAILING) && in_array($conf->global->MAIN_MAIL_SENDMODE_EMAILING, array('smtps', 'swiftmailer')))
|
||||
{
|
||||
print '<tr class="oddeven hideifdefault"><td>'.$langs->trans("MAIN_MAIL_SMTPS_PW").'</td><td>'.preg_replace('/./','*',$conf->global->MAIN_MAIL_SMTPS_PW_EMAILING).'</td></tr>';
|
||||
}
|
||||
|
||||
// TLS
|
||||
|
||||
print '<tr class="oddeven hideifdefault"><td>'.$langs->trans("MAIN_MAIL_EMAIL_TLS").'</td><td>';
|
||||
if (isset($conf->global->MAIN_MAIL_SENDMODE_EMAILING) && in_array($conf->global->MAIN_MAIL_SENDMODE_EMAILING, array('smtps', 'swiftmailer')))
|
||||
{
|
||||
@ -472,7 +461,6 @@ else
|
||||
print '</td></tr>';
|
||||
|
||||
// STARTTLS
|
||||
|
||||
print '<tr class="oddeven hideifdefault"><td>'.$langs->trans("MAIN_MAIL_EMAIL_STARTTLS").'</td><td>';
|
||||
if (isset($conf->global->MAIN_MAIL_SENDMODE_EMAILING) && in_array($conf->global->MAIN_MAIL_SENDMODE_EMAILING, array('smtps', 'swiftmailer')))
|
||||
{
|
||||
|
||||
@ -4,7 +4,7 @@
|
||||
* Copyright (C) 2004 Benoit Mortier <benoit.mortier@opensides.be>
|
||||
* Copyright (C) 2005-2012 Regis Houssin <regis.houssin@capnetworks.com>
|
||||
* Copyright (C) 2010-2016 Juanjo Menent <jmenent@2byte.es>
|
||||
* Copyright (C) 2011-2017 Philippe Grand <philippe.grand@atoo-net.com>
|
||||
* Copyright (C) 2011-2018 Philippe Grand <philippe.grand@atoo-net.com>
|
||||
* Copyright (C) 2011 Remy Younes <ryounes@gmail.com>
|
||||
* Copyright (C) 2012-2015 Marcos García <marcosgdf@gmail.com>
|
||||
* Copyright (C) 2012 Christophe Battarel <christophe.battarel@ltairis.fr>
|
||||
@ -447,7 +447,6 @@ $fieldlist=explode(',',$tabfield[$id]);
|
||||
|
||||
// Form to add a new line
|
||||
$alabelisused=0;
|
||||
$var=false;
|
||||
|
||||
print '<form action="'.$_SERVER['PHP_SELF'].'?id='.$id.'" method="POST">';
|
||||
print '<input type="hidden" name="token" value="'.$_SESSION['newtoken'].'">';
|
||||
@ -591,9 +590,7 @@ $colspan=count($fieldlist)+1;
|
||||
|
||||
print '</table>';
|
||||
print '</div>';
|
||||
|
||||
print '</form>';
|
||||
|
||||
print '<br>';
|
||||
|
||||
|
||||
@ -611,7 +608,6 @@ if ($resql)
|
||||
{
|
||||
$num = $db->num_rows($resql);
|
||||
$i = 0;
|
||||
$var=true;
|
||||
|
||||
$param = '&id='.$id;
|
||||
$paramwithsearch = $param;
|
||||
|
||||
@ -163,8 +163,6 @@ if ($action == 'edit')
|
||||
clearstatcache();
|
||||
|
||||
// Gestionnaires de menu
|
||||
$var=true;
|
||||
|
||||
print '<table class="noborder" width="100%">';
|
||||
print '<tr class="liste_titre"><td width="35%">'.$langs->trans("Menu").'</td>';
|
||||
print '<td>';
|
||||
@ -176,7 +174,6 @@ if ($action == 'edit')
|
||||
print '</tr>';
|
||||
|
||||
// Menu top
|
||||
|
||||
print '<tr class="oddeven"><td>'.$langs->trans("DefaultMenuManager").'</td>';
|
||||
print '<td>';
|
||||
$formadmin->select_menu(empty($conf->global->MAIN_MENU_STANDARD_FORCED)?$conf->global->MAIN_MENU_STANDARD:$conf->global->MAIN_MENU_STANDARD_FORCED, 'MAIN_MENU_STANDARD', $dirstandard, empty($conf->global->MAIN_MENU_STANDARD_FORCED)?'':' disabled');
|
||||
@ -187,7 +184,6 @@ if ($action == 'edit')
|
||||
print '</tr>';
|
||||
|
||||
// Menu smartphone
|
||||
|
||||
print '<tr class="oddeven"><td>'.$langs->trans("DefaultMenuSmartphoneManager").'</td>';
|
||||
print '<td>';
|
||||
$formadmin->select_menu(empty($conf->global->MAIN_MENU_SMARTPHONE_FORCED)?$conf->global->MAIN_MENU_SMARTPHONE:$conf->global->MAIN_MENU_SMARTPHONE_FORCED, 'MAIN_MENU_SMARTPHONE', array_merge($dirstandard,$dirsmartphone), empty($conf->global->MAIN_MENU_SMARTPHONE_FORCED)?'':' disabled');
|
||||
@ -202,8 +198,6 @@ if ($action == 'edit')
|
||||
else
|
||||
{
|
||||
// Gestionnaires de menu
|
||||
$var=true;
|
||||
|
||||
print '<table class="noborder" width="100%">';
|
||||
print '<tr class="liste_titre"><td width="35%">'.$langs->trans("Menu").'</td>';
|
||||
print '<td>';
|
||||
@ -267,7 +261,6 @@ if ($action == 'edit')
|
||||
print '</form>';
|
||||
|
||||
|
||||
|
||||
if ($action != 'edit')
|
||||
{
|
||||
print '<div class="tabsAction">';
|
||||
|
||||
@ -26,10 +26,8 @@ require_once DOL_DOCUMENT_ROOT.'/core/lib/admin.lib.php';
|
||||
require_once DOL_DOCUMENT_ROOT.'/core/lib/invoice.lib.php';
|
||||
require_once DOL_DOCUMENT_ROOT.'/compta/paiement/class/paiement.class.php';
|
||||
|
||||
$langs->load("admin");
|
||||
$langs->load("errors");
|
||||
$langs->load('other');
|
||||
$langs->load('bills');
|
||||
// Load traductions files requiredby by page
|
||||
$langs->loadLangs(array("admin", "other", "errors", "bills"));
|
||||
|
||||
if (! $user->admin) accessforbidden();
|
||||
|
||||
@ -131,8 +129,6 @@ foreach ($dirmodels as $reldir)
|
||||
$handle = opendir($dir);
|
||||
if (is_resource($handle))
|
||||
{
|
||||
$var=true;
|
||||
|
||||
while (($file = readdir($handle))!==false)
|
||||
{
|
||||
if (! is_dir($dir.$file) || (substr($file, 0, 1) <> '.' && substr($file, 0, 3) <> 'CVS'))
|
||||
@ -249,7 +245,6 @@ print '<td width="80"> </td>';
|
||||
print "</tr>\n";
|
||||
|
||||
// Allow payments on different thirdparties bills but same parent company
|
||||
$var=! $var;
|
||||
print '<tr class="oddeven"><td>';
|
||||
print $langs->trans("PaymentOnDifferentThirdBills");
|
||||
print '</td><td width="60" align="center">';
|
||||
|
||||
@ -274,7 +274,6 @@ print "</tr>\n";
|
||||
|
||||
clearstatcache();
|
||||
|
||||
$var=true;
|
||||
foreach ($dirmodels as $reldir)
|
||||
{
|
||||
foreach (array('','/doc') as $valdir)
|
||||
|
||||
@ -33,10 +33,9 @@ require_once DOL_DOCUMENT_ROOT.'/core/lib/admin.lib.php';
|
||||
require_once DOL_DOCUMENT_ROOT.'/core/lib/pdf.lib.php';
|
||||
require_once DOL_DOCUMENT_ROOT.'/comm/propal/class/propal.class.php';
|
||||
require_once DOL_DOCUMENT_ROOT.'/core/lib/propal.lib.php';
|
||||
$langs->load("admin");
|
||||
$langs->load("errors");
|
||||
$langs->load('other');
|
||||
$langs->load('propal');
|
||||
|
||||
// Load traductions files requiredby by page
|
||||
$langs->loadLangs(array("admin", "other", "errors", "propal"));
|
||||
|
||||
if (! $user->admin) accessforbidden();
|
||||
|
||||
@ -266,8 +265,6 @@ foreach ($dirmodels as $reldir)
|
||||
$handle = opendir($dir);
|
||||
if (is_resource($handle))
|
||||
{
|
||||
$var=true;
|
||||
|
||||
while (($file = readdir($handle))!==false)
|
||||
{
|
||||
if (substr($file, 0, 12) == 'mod_propale_' && substr($file, dol_strlen($file)-3, 3) == 'php')
|
||||
@ -386,7 +383,6 @@ print "</tr>\n";
|
||||
|
||||
clearstatcache();
|
||||
|
||||
$var=true;
|
||||
foreach ($dirmodels as $reldir)
|
||||
{
|
||||
foreach (array('','/doc') as $valdir)
|
||||
@ -531,7 +527,6 @@ print '</tr>';
|
||||
print '</form>';
|
||||
|
||||
/*
|
||||
$var=! $var;
|
||||
print '<form action="'.$_SERVER["PHP_SELF"].'" method="post">';
|
||||
print '<input type="hidden" name="token" value="'.$_SESSION['newtoken'].'">';
|
||||
print '<input type="hidden" name="action" value="setusecustomercontactasrecipient">';
|
||||
@ -631,7 +626,7 @@ print "<tr class=\"liste_titre\">\n";
|
||||
print " <td>".$langs->trans("Name")."</td>\n";
|
||||
print " <td>".$langs->trans("Value")."</td>\n";
|
||||
print "</tr>\n";
|
||||
print "<tr ".$bc[false].">\n <td width=\"140\">".$langs->trans("PathDirectory")."</td>\n <td>".$conf->propal->multidir_output[$conf->entity]."</td>\n</tr>\n";
|
||||
print "<tr class=\"oddeven\">\n <td width=\"140\">".$langs->trans("PathDirectory")."</td>\n <td>".$conf->propal->multidir_output[$conf->entity]."</td>\n</tr>\n";
|
||||
print "</table>\n<br>";
|
||||
|
||||
|
||||
|
||||
@ -26,10 +26,8 @@ require '../main.inc.php';
|
||||
require_once DOL_DOCUMENT_ROOT.'/core/lib/admin.lib.php';
|
||||
require_once DOL_DOCUMENT_ROOT.'/core/class/html.formfile.class.php';
|
||||
|
||||
$langs->load("users");
|
||||
$langs->load("admin");
|
||||
$langs->load("other");
|
||||
|
||||
// Load traductions files requiredby by page
|
||||
$langs->loadLangs(array("other", "users", "admin"));
|
||||
|
||||
if (!$user->admin) accessforbidden();
|
||||
|
||||
@ -124,7 +122,6 @@ if ($conf->use_javascript_ajax)
|
||||
|
||||
|
||||
// Timeout
|
||||
$var=true;
|
||||
|
||||
print '<table width="100%" class="noborder">';
|
||||
|
||||
@ -163,7 +160,7 @@ print '</td>';
|
||||
print '</tr>';
|
||||
|
||||
|
||||
print '<tr '.$bcdd[$var].'>';
|
||||
print '<tr class="oddeven">';
|
||||
print '<td>'.$langs->trans("MAIN_PROXY_HOST").'</td><td align="right">';
|
||||
print '</td>';
|
||||
print '<td class="nowrap">';
|
||||
@ -172,7 +169,7 @@ print '</td>';
|
||||
print '</tr>';
|
||||
|
||||
|
||||
print '<tr '.$bcdd[$var].'>';
|
||||
print '<tr class="oddeven">';
|
||||
print '<td>'.$langs->trans("MAIN_PROXY_PORT").'</td><td align="right">';
|
||||
print '</td>';
|
||||
print '<td class="nowrap">';
|
||||
@ -181,7 +178,7 @@ print '</td>';
|
||||
print '</tr>';
|
||||
|
||||
|
||||
print '<tr '.$bcdd[$var].'>';
|
||||
print '<tr class="oddeven">';
|
||||
print '<td>'.$langs->trans("MAIN_PROXY_USER").'</td><td align="right">';
|
||||
print '</td>';
|
||||
print '<td class="nowrap">';
|
||||
@ -190,7 +187,7 @@ print '</td>';
|
||||
print '</tr>';
|
||||
|
||||
|
||||
print '<tr '.$bcdd[$var].'>';
|
||||
print '<tr class="oddeven">';
|
||||
print '<td>'.$langs->trans("MAIN_PROXY_PASS").'</td><td align="right">';
|
||||
print '</td>';
|
||||
print '<td class="nowrap">';
|
||||
|
||||
@ -761,11 +761,9 @@ class Categorie extends CommonObject
|
||||
dol_syslog(get_class($this).'::del_type', LOG_DEBUG);
|
||||
if ($this->db->query($sql))
|
||||
{
|
||||
// Save object we want to unlink category off into category instance to provide information to trigger
|
||||
$this->unlinkoff=$obj;
|
||||
|
||||
// Call trigger
|
||||
$result=$this->call_trigger('CATEGORY_UNLINK',$user);
|
||||
$this->context=array('unlinkoff'=>$obj); // Save object we want to link category to into category instance to provide information to trigger
|
||||
$result=$this->call_trigger('CATEGORY_UNLINK',$user);
|
||||
if ($result < 0) { $error++; }
|
||||
// End call triggers
|
||||
|
||||
@ -1207,30 +1205,6 @@ class Categorie extends CommonObject
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns total number of categories
|
||||
*
|
||||
* @return int Number of categories
|
||||
* @deprecated function not used ?
|
||||
*/
|
||||
function get_nb_categories()
|
||||
{
|
||||
$sql = "SELECT count(rowid)";
|
||||
$sql.= " FROM ".MAIN_DB_PREFIX."categorie";
|
||||
$sql.= " WHERE entity IN (".getEntity('category').")";
|
||||
$res = $this->db->query($sql);
|
||||
if ($res)
|
||||
{
|
||||
$res = $this->db->fetch_array($res);
|
||||
return $res[0];
|
||||
}
|
||||
else
|
||||
{
|
||||
dol_print_error($this->db);
|
||||
return -1;
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Check if no category with same label already exists for this cat's parent or root and for this cat's type
|
||||
*
|
||||
|
||||
@ -76,6 +76,7 @@ $search_type_thirdparty=GETPOST("search_type_thirdparty",'int');
|
||||
$search_day=GETPOST("search_day","int");
|
||||
$search_month=GETPOST("search_month","int");
|
||||
$search_year=GETPOST("search_year","int");
|
||||
$search_categ_cus=trim(GETPOST("search_categ_cus",'int'));
|
||||
|
||||
$viewstatut=GETPOST('viewstatut','alpha');
|
||||
$optioncss = GETPOST('optioncss','alpha');
|
||||
@ -205,6 +206,8 @@ if (GETPOST('button_removefilter_x','alpha') || GETPOST('button_removefilter.x',
|
||||
$object_statut='';
|
||||
$toselect='';
|
||||
$search_array_options=array();
|
||||
$search_categ_cus=0;
|
||||
|
||||
}
|
||||
if ($object_statut != '') $viewstatut=$object_statut;
|
||||
|
||||
@ -248,6 +251,8 @@ $sql.= ' p.datec as date_creation, p.tms as date_update,';
|
||||
$sql.= " pr.rowid as project_id, pr.ref as project_ref,";
|
||||
if (! $user->rights->societe->client->voir && ! $socid) $sql .= " sc.fk_soc, sc.fk_user,";
|
||||
$sql.= ' u.login';
|
||||
if ($search_categ_cus) $sql .= ", cc.fk_categorie, cc.fk_soc";
|
||||
|
||||
// Add fields from extrafields
|
||||
foreach ($extrafields->attribute_label as $key => $val) $sql.=($extrafields->attribute_type[$key] != 'separate' ? ",ef.".$key.' as options_'.$key : '');
|
||||
// Add fields from hooks
|
||||
@ -258,6 +263,8 @@ $sql.= ' FROM '.MAIN_DB_PREFIX.'societe as s';
|
||||
$sql.= " LEFT JOIN ".MAIN_DB_PREFIX."c_country as country on (country.rowid = s.fk_pays)";
|
||||
$sql.= " LEFT JOIN ".MAIN_DB_PREFIX."c_typent as typent on (typent.id = s.fk_typent)";
|
||||
$sql.= " LEFT JOIN ".MAIN_DB_PREFIX."c_departements as state on (state.rowid = s.fk_departement)";
|
||||
if (! empty($search_categ_cus)) $sql.= ' LEFT JOIN '.MAIN_DB_PREFIX."categorie_societe as cc ON s.rowid = cc.fk_soc"; // We'll need this table joined to the select in order to filter by categ
|
||||
|
||||
$sql.= ', '.MAIN_DB_PREFIX.'propal as p';
|
||||
if (is_array($extrafields->attribute_label) && count($extrafields->attribute_label)) $sql.= " LEFT JOIN ".MAIN_DB_PREFIX."propal_extrafields as ef on (p.rowid = ef.fk_object)";
|
||||
if ($sall || $search_product_category > 0) $sql.= ' LEFT JOIN '.MAIN_DB_PREFIX.'propaldet as pd ON p.rowid=pd.fk_propal';
|
||||
@ -294,6 +301,9 @@ if ($search_montant_ttc != '') $sql.= natural_search("p.total", $search_montant_
|
||||
if ($sall) {
|
||||
$sql .= natural_search(array_keys($fieldstosearchall), $sall);
|
||||
}
|
||||
if ($search_categ_cus > 0) $sql.= " AND cc.fk_categorie = ".$db->escape($search_categ_cus);
|
||||
if ($search_categ_cus == -2) $sql.= " AND cc.fk_categorie IS NULL";
|
||||
|
||||
if ($search_product_category > 0) $sql.=" AND cp.fk_categorie = ".$db->escape($search_product_category);
|
||||
if ($socid > 0) $sql.= ' AND s.rowid = '.$socid;
|
||||
if ($viewstatut != '' && $viewstatut != '-1')
|
||||
@ -386,6 +396,8 @@ if ($resql)
|
||||
if ($search_zip) $param.='&search_zip='.urlencode($search_zip);
|
||||
if ($socid > 0) $param.='&socid='.urlencode($socid);
|
||||
if ($optioncss != '') $param.='&optioncss='.urlencode($optioncss);
|
||||
if ($search_categ_cus > 0) $param.='&search_categ_cus='.urlencode($search_categ_cus);
|
||||
|
||||
|
||||
// Add $param from extra fields
|
||||
include DOL_DOCUMENT_ROOT.'/core/tpl/extrafields_list_search_param.tpl.php';
|
||||
@ -464,6 +476,14 @@ if ($resql)
|
||||
$moreforfilter.=$form->selectarray('search_product_category', $cate_arbo, $search_product_category, 1, 0, 0, '', 0, 0, 0, 0, 'maxwidth300', 1);
|
||||
$moreforfilter.='</div>';
|
||||
}
|
||||
if (! empty($conf->categorie->enabled))
|
||||
{
|
||||
require_once DOL_DOCUMENT_ROOT . '/categories/class/categorie.class.php';
|
||||
$moreforfilter.='<div class="divsearchfield">';
|
||||
$moreforfilter.=$langs->trans('CustomersProspectsCategoriesShort').': ';
|
||||
$moreforfilter.=$formother->select_categories('customer',$search_categ_cus,'search_categ_cus',1);
|
||||
$moreforfilter.='</div>';
|
||||
}
|
||||
$parameters=array();
|
||||
$reshook=$hookmanager->executeHooks('printFieldPreListTitle',$parameters); // Note that $action and $object may have been modified by hook
|
||||
if (empty($reshook)) $moreforfilter .= $hookmanager->resPrint;
|
||||
|
||||
@ -28,9 +28,9 @@
|
||||
*/
|
||||
|
||||
/**
|
||||
* \file htdocs/commande/card.php
|
||||
* \file htdocs/commande/card.php
|
||||
* \ingroup commande
|
||||
* \brief Page to show customer order
|
||||
* \brief Page to show customer order
|
||||
*/
|
||||
|
||||
require '../main.inc.php';
|
||||
@ -68,6 +68,7 @@ $action = GETPOST('action', 'alpha');
|
||||
$cancel = GETPOST('cancel', 'alpha');
|
||||
$confirm = GETPOST('confirm', 'alpha');
|
||||
$lineid = GETPOST('lineid', 'int');
|
||||
$projectid = GETPOST('projectid', 'int');
|
||||
$origin = GETPOST('origin', 'alpha');
|
||||
$originid = (GETPOST('originid', 'int') ? GETPOST('originid', 'int') : GETPOST('origin_id', 'int')); // For backward compatibility
|
||||
|
||||
@ -220,7 +221,7 @@ if (empty($reshook))
|
||||
// Link to a project
|
||||
else if ($action == 'classin' && $user->rights->commande->creer)
|
||||
{
|
||||
$object->setProject(GETPOST('projectid'));
|
||||
$object->setProject(GETPOST('projectid','int'));
|
||||
}
|
||||
|
||||
// Add order
|
||||
@ -251,8 +252,8 @@ if (empty($reshook))
|
||||
$object->note_private = GETPOST('note_private','none');
|
||||
$object->note_public = GETPOST('note_public','none');
|
||||
$object->source = GETPOST('source_id');
|
||||
$object->fk_project = GETPOST('projectid');
|
||||
$object->ref_client = GETPOST('ref_client');
|
||||
$object->fk_project = GETPOST('projectid','int');
|
||||
$object->ref_client = GETPOST('ref_client','alpha');
|
||||
$object->modelpdf = GETPOST('model');
|
||||
$object->cond_reglement_id = GETPOST('cond_reglement_id');
|
||||
$object->mode_reglement_id = GETPOST('mode_reglement_id');
|
||||
@ -1375,7 +1376,6 @@ if ($action == 'create' && $user->rights->commande->creer)
|
||||
if ($socid > 0)
|
||||
$res = $soc->fetch($socid);
|
||||
|
||||
$projectid = 0;
|
||||
$remise_absolue = 0;
|
||||
|
||||
$currency_code = $conf->currency;
|
||||
@ -1472,7 +1472,6 @@ if ($action == 'create' && $user->rights->commande->creer)
|
||||
$remise_percent = $soc->remise_percent;
|
||||
$remise_absolue = 0;
|
||||
$dateorder = empty($conf->global->MAIN_AUTOFILL_DATE_ORDER)?-1:'';
|
||||
$projectid = 0;
|
||||
|
||||
if (!empty($conf->multicurrency->enabled) && !empty($soc->multicurrency_code)) $currency_code = $soc->multicurrency_code;
|
||||
|
||||
@ -1480,7 +1479,6 @@ if ($action == 'create' && $user->rights->commande->creer)
|
||||
$note_public = $object->getDefaultCreateValueFor('note_public');
|
||||
}
|
||||
|
||||
|
||||
print '<form name="crea_commande" action="' . $_SERVER["PHP_SELF"] . '" method="POST">';
|
||||
print '<input type="hidden" name="token" value="' . $_SESSION ['newtoken'] . '">';
|
||||
print '<input type="hidden" name="action" value="add">';
|
||||
@ -2615,9 +2613,8 @@ if ($action == 'create' && $user->rights->commande->creer)
|
||||
$somethingshown = $form->showLinkedObjectBlock($object, $linktoelem);
|
||||
|
||||
// Show online payment link
|
||||
//$useonlinepayment = (! empty($conf->paypal->enabled) || ! empty($conf->stripe->enabled) || ! empty($conf->paybox->enabled));
|
||||
$useonlinepayment = $conf->global->ORDER_SHOW_ONLINE_PAYMENT_ON_ORDER;
|
||||
|
||||
$useonlinepayment = (! empty($conf->paypal->enabled) || ! empty($conf->stripe->enabled) || ! empty($conf->paybox->enabled));
|
||||
if (! empty($conf->global->ORDER_HIDE_ONLINE_PAYMENT_ON_ORDER)) $useonlinepayment = 0;
|
||||
if ($object->statut != Commande::STATUS_DRAFT && $useonlinepayment)
|
||||
{
|
||||
print '<br><!-- Link to pay -->';
|
||||
|
||||
@ -73,6 +73,7 @@ $socid=GETPOST('socid','int');
|
||||
$search_user=GETPOST('search_user','int');
|
||||
$search_sale=GETPOST('search_sale','int');
|
||||
$search_total_ht=GETPOST('search_total_ht','alpha');
|
||||
$search_categ_cus=trim(GETPOST("search_categ_cus",'int'));
|
||||
$optioncss = GETPOST('optioncss','alpha');
|
||||
$billed = GETPOST('billed','int');
|
||||
$viewstatut=GETPOST('viewstatut');
|
||||
@ -193,6 +194,7 @@ if (empty($reshook))
|
||||
$billed='';
|
||||
$toselect='';
|
||||
$search_array_options=array();
|
||||
$search_categ_cus=0;
|
||||
}
|
||||
if (GETPOST('button_removefilter_x','alpha') || GETPOST('button_removefilter.x','alpha') || GETPOST('button_removefilter','alpha')
|
||||
|| GETPOST('button_search_x','alpha') || GETPOST('button_search.x','alpha') || GETPOST('button_search','alpha'))
|
||||
@ -208,6 +210,7 @@ if (empty($reshook))
|
||||
$uploaddir = $conf->commande->dir_output;
|
||||
$trigger_name='ORDER_SENTBYMAIL';
|
||||
include DOL_DOCUMENT_ROOT.'/core/actions_massactions.inc.php';
|
||||
|
||||
}
|
||||
|
||||
|
||||
@ -237,6 +240,8 @@ $sql.= ' c.rowid, c.ref, c.total_ht, c.tva as total_tva, c.total_ttc, c.ref_clie
|
||||
$sql.= ' c.date_valid, c.date_commande, c.note_private, c.date_livraison as date_delivery, c.fk_statut, c.facture as billed,';
|
||||
$sql.= ' c.date_creation as date_creation, c.tms as date_update,';
|
||||
$sql.= " p.rowid as project_id, p.ref as project_ref";
|
||||
if ($search_categ_cus) $sql .= ", cc.fk_categorie, cc.fk_soc";
|
||||
|
||||
// Add fields from extrafields
|
||||
foreach ($extrafields->attribute_label as $key => $val) $sql.=($extrafields->attribute_type[$key] != 'separate' ? ",ef.".$key.' as options_'.$key : '');
|
||||
// Add fields from hooks
|
||||
@ -247,6 +252,7 @@ $sql.= ' FROM '.MAIN_DB_PREFIX.'societe as s';
|
||||
$sql.= " LEFT JOIN ".MAIN_DB_PREFIX."c_country as country on (country.rowid = s.fk_pays)";
|
||||
$sql.= " LEFT JOIN ".MAIN_DB_PREFIX."c_typent as typent on (typent.id = s.fk_typent)";
|
||||
$sql.= " LEFT JOIN ".MAIN_DB_PREFIX."c_departements as state on (state.rowid = s.fk_departement)";
|
||||
if (! empty($search_categ_cus)) $sql.= ' LEFT JOIN '.MAIN_DB_PREFIX."categorie_societe as cc ON s.rowid = cc.fk_soc"; // We'll need this table joined to the select in order to filter by categ
|
||||
$sql.= ', '.MAIN_DB_PREFIX.'commande as c';
|
||||
if (is_array($extrafields->attribute_label) && count($extrafields->attribute_label)) $sql.= " LEFT JOIN ".MAIN_DB_PREFIX."commande_extrafields as ef on (c.rowid = ef.fk_object)";
|
||||
if ($sall || $search_product_category > 0) $sql.= ' LEFT JOIN '.MAIN_DB_PREFIX.'commandedet as pd ON c.rowid=pd.fk_commande';
|
||||
@ -327,6 +333,8 @@ if ($search_sale > 0) $sql.= " AND s.rowid = sc.fk_soc AND sc.fk_user = " .$sear
|
||||
if ($search_user > 0) $sql.= " AND ec.fk_c_type_contact = tc.rowid AND tc.element='commande' AND tc.source='internal' AND ec.element_id = c.rowid AND ec.fk_socpeople = ".$search_user;
|
||||
if ($search_total_ht != '') $sql.= natural_search('c.total_ht', $search_total_ht, 1);
|
||||
if ($search_project_ref != '') $sql.= natural_search("p.ref",$search_project_ref);
|
||||
if ($search_categ_cus > 0) $sql.= " AND cc.fk_categorie = ".$db->escape($search_categ_cus);
|
||||
if ($search_categ_cus == -2) $sql.= " AND cc.fk_categorie IS NULL";
|
||||
// Add where from extra fields
|
||||
include DOL_DOCUMENT_ROOT.'/core/tpl/extrafields_list_search_sql.tpl.php';
|
||||
// Add where from hooks
|
||||
@ -412,6 +420,8 @@ if ($resql)
|
||||
if ($show_files) $param.='&show_files=' .urlencode($show_files);
|
||||
if ($optioncss != '') $param.='&optioncss='.urlencode($optioncss);
|
||||
if ($billed != '') $param.='&billed='.urlencode($billed);
|
||||
if ($search_categ_cus > 0) $param.='&search_categ_cus='.urlencode($search_categ_cus);
|
||||
|
||||
// Add $param from extra fields
|
||||
include DOL_DOCUMENT_ROOT.'/core/tpl/extrafields_list_search_param.tpl.php';
|
||||
|
||||
@ -419,6 +429,8 @@ if ($resql)
|
||||
$arrayofmassactions = array(
|
||||
'presend'=>$langs->trans("SendByMail"),
|
||||
'builddoc'=>$langs->trans("PDFMerge"),
|
||||
'cancelorders'=>$langs->trans("Cancel"),
|
||||
|
||||
);
|
||||
if($user->rights->facture->creer) $arrayofmassactions['createbills']=$langs->trans("CreateInvoiceForThisCustomer");
|
||||
if ($user->rights->commande->supprimer) $arrayofmassactions['predelete']=$langs->trans("Delete");
|
||||
@ -538,6 +550,14 @@ if ($resql)
|
||||
$moreforfilter.=$form->selectarray('search_product_category', $cate_arbo, $search_product_category, 1, 0, 0, '', 0, 0, 0, 0, 'maxwidth300', 1);
|
||||
$moreforfilter.='</div>';
|
||||
}
|
||||
if (! empty($conf->categorie->enabled))
|
||||
{
|
||||
require_once DOL_DOCUMENT_ROOT . '/categories/class/categorie.class.php';
|
||||
$moreforfilter.='<div class="divsearchfield">';
|
||||
$moreforfilter.=$langs->trans('CustomersProspectsCategoriesShort').': ';
|
||||
$moreforfilter.=$formother->select_categories('customer',$search_categ_cus,'search_categ_cus',1);
|
||||
$moreforfilter.='</div>';
|
||||
}
|
||||
$parameters=array();
|
||||
$reshook=$hookmanager->executeHooks('printFieldPreListTitle',$parameters); // Note that $action and $object may have been modified by hook
|
||||
if (empty($reshook)) $moreforfilter .= $hookmanager->resPrint;
|
||||
|
||||
@ -349,7 +349,7 @@ if ($action == 'create')
|
||||
print '<div class="center">';
|
||||
print '<input type="submit" class="button" value="'.$langs->trans("Save").'">';
|
||||
print ' ';
|
||||
print '<input type="submit" class="button" name="cancel" value="'.$langs->trans("Cancel").'">';
|
||||
print '<input type="button" class="button" value="'.$langs->trans("Cancel").'" onclick="javascript:history.go(-1)">';
|
||||
print '</div>';
|
||||
|
||||
print '</form>';
|
||||
|
||||
@ -96,6 +96,7 @@ $search_year = GETPOST('search_year','int');
|
||||
$search_day_lim = GETPOST('search_day_lim','int');
|
||||
$search_month_lim = GETPOST('search_month_lim','int');
|
||||
$search_year_lim = GETPOST('search_year_lim','int');
|
||||
$search_categ_cus=trim(GETPOST("search_categ_cus",'int'));
|
||||
|
||||
$option = GETPOST('search_option');
|
||||
if ($option == 'late') {
|
||||
@ -228,6 +229,8 @@ if (GETPOST('button_removefilter_x','alpha') || GETPOST('button_removefilter','a
|
||||
$search_month_lim='';
|
||||
$toselect='';
|
||||
$search_array_options=array();
|
||||
$search_categ_cus=0;
|
||||
|
||||
}
|
||||
|
||||
if (empty($reshook))
|
||||
@ -369,6 +372,8 @@ $sql.= " p.rowid as project_id, p.ref as project_ref, p.title as project_label";
|
||||
// We need dynamount_payed to be able to sort on status (value is surely wrong because we can count several lines several times due to other left join or link with contacts. But what we need is just 0 or > 0)
|
||||
// TODO Better solution to be able to sort on already payed or remain to pay is to store amount_payed in a denormalized field.
|
||||
if (! $sall) $sql.= ', SUM(pf.amount) as dynamount_payed';
|
||||
if ($search_categ_cus) $sql .= ", cc.fk_categorie, cc.fk_soc";
|
||||
|
||||
// Add fields from extrafields
|
||||
foreach ($extrafields->attribute_label as $key => $val) $sql.=($extrafields->attribute_type[$key] != 'separate' ? ",ef.".$key.' as options_'.$key : '');
|
||||
// Add fields from hooks
|
||||
@ -379,6 +384,8 @@ $sql.= ' FROM '.MAIN_DB_PREFIX.'societe as s';
|
||||
$sql.= " LEFT JOIN ".MAIN_DB_PREFIX."c_country as country on (country.rowid = s.fk_pays)";
|
||||
$sql.= " LEFT JOIN ".MAIN_DB_PREFIX."c_typent as typent on (typent.id = s.fk_typent)";
|
||||
$sql.= " LEFT JOIN ".MAIN_DB_PREFIX."c_departements as state on (state.rowid = s.fk_departement)";
|
||||
if (! empty($search_categ_cus)) $sql.= ' LEFT JOIN '.MAIN_DB_PREFIX."categorie_societe as cc ON s.rowid = cc.fk_soc"; // We'll need this table joined to the select in order to filter by categ
|
||||
|
||||
$sql.= ', '.MAIN_DB_PREFIX.'facture as f';
|
||||
if (is_array($extrafields->attribute_label) && count($extrafields->attribute_label)) $sql.= " LEFT JOIN ".MAIN_DB_PREFIX."facture_extrafields as ef on (f.rowid = ef.fk_object)";
|
||||
if (! $sall) $sql.= ' LEFT JOIN '.MAIN_DB_PREFIX.'paiement_facture as pf ON pf.fk_facture = f.rowid';
|
||||
@ -435,6 +442,8 @@ if ($search_montant_vat != '') $sql.= natural_search('f.tva', $search_montant_va
|
||||
if ($search_montant_localtax1 != '') $sql.= natural_search('f.localtax1', $search_montant_localtax1, 1);
|
||||
if ($search_montant_localtax2 != '') $sql.= natural_search('f.localtax2', $search_montant_localtax2, 1);
|
||||
if ($search_montant_ttc != '') $sql.= natural_search('f.total_ttc', $search_montant_ttc, 1);
|
||||
if ($search_categ_cus > 0) $sql.= " AND cc.fk_categorie = ".$db->escape($search_categ_cus);
|
||||
if ($search_categ_cus == -2) $sql.= " AND cc.fk_categorie IS NULL";
|
||||
if ($search_status != '' && $search_status >= 0)
|
||||
{
|
||||
if ($search_status == '0') $sql.=" AND f.fk_statut = 0"; // draft
|
||||
@ -566,6 +575,8 @@ if ($resql)
|
||||
if ($show_files) $param.='&show_files='.urlencode($show_files);
|
||||
if ($option) $param.="&search_option=".urlencode($option);
|
||||
if ($optioncss != '') $param.='&optioncss='.urlencode($optioncss);
|
||||
if ($search_categ_cus > 0) $param.='&search_categ_cus='.urlencode($search_categ_cus);
|
||||
|
||||
// Add $param from extra fields
|
||||
include DOL_DOCUMENT_ROOT.'/core/tpl/extrafields_list_search_param.tpl.php';
|
||||
|
||||
@ -574,24 +585,19 @@ if ($resql)
|
||||
'presend'=>$langs->trans("SendByMail"),
|
||||
'builddoc'=>$langs->trans("PDFMerge"),
|
||||
);
|
||||
if ($conf->prelevement->enabled)
|
||||
{
|
||||
$langs->load("withdrawals");
|
||||
$arrayofmassactions['withdrawrequest']=$langs->trans("MakeWithdrawRequest");
|
||||
if ($conf->prelevement->enabled) {
|
||||
$langs->load("withdrawals");
|
||||
$arrayofmassactions['withdrawrequest'] = $langs->trans("MakeWithdrawRequest");
|
||||
}
|
||||
if ($user->rights->facture->supprimer)
|
||||
{
|
||||
//if (! empty($conf->global->STOCK_CALCULATE_ON_BILL) || empty($conf->global->INVOICE_CAN_ALWAYS_BE_REMOVED))
|
||||
if (empty($conf->global->INVOICE_CAN_ALWAYS_BE_REMOVED))
|
||||
{
|
||||
// mass deletion never possible on invoices on such situation
|
||||
if ($user->rights->facture->supprimer) {
|
||||
if (!empty($conf->global->INVOICE_CAN_REMOVE_DRAFT_ONLY)) {
|
||||
$arrayofmassactions['predeletedraft'] = $langs->trans("Deletedraft");
|
||||
}
|
||||
else
|
||||
{
|
||||
$arrayofmassactions['predelete']=$langs->trans("Delete");
|
||||
}
|
||||
}
|
||||
if (in_array($massaction, array('presend','predelete'))) $arrayofmassactions=array();
|
||||
elseif (!empty($conf->global->INVOICE_CAN_ALWAYS_BE_REMOVED)) { // mass deletion never possible on invoices on such situation
|
||||
$arrayofmassactions['predelete'] = $langs->trans("Delete");
|
||||
}
|
||||
}
|
||||
if (in_array($massaction, array('presend', 'predelete'))) $arrayofmassactions = array();
|
||||
$massactionbutton=$form->selectMassAction('', $arrayofmassactions);
|
||||
|
||||
$newcardbutton='';
|
||||
@ -657,6 +663,14 @@ if ($resql)
|
||||
$moreforfilter.=$form->selectarray('search_product_category', $cate_arbo, $search_product_category, 1, 0, 0, '', 0, 0, 0, 0, 'maxwidth300', 1);
|
||||
$moreforfilter.='</div>';
|
||||
}
|
||||
if (! empty($conf->categorie->enabled))
|
||||
{
|
||||
require_once DOL_DOCUMENT_ROOT . '/categories/class/categorie.class.php';
|
||||
$moreforfilter.='<div class="divsearchfield">';
|
||||
$moreforfilter.=$langs->trans('CustomersProspectsCategoriesShort').': ';
|
||||
$moreforfilter.=$formother->select_categories('customer',$search_categ_cus,'search_categ_cus',1);
|
||||
$moreforfilter.='</div>';
|
||||
}
|
||||
$parameters=array();
|
||||
$reshook=$hookmanager->executeHooks('printFieldPreListTitle',$parameters); // Note that $action and $object may have been modified by hook
|
||||
if (empty($reshook)) $moreforfilter .= $hookmanager->resPrint;
|
||||
|
||||
@ -736,6 +736,56 @@ if ($massaction == 'confirm_createbills')
|
||||
}
|
||||
}
|
||||
|
||||
if (!$error && $massaction == 'cancelorders')
|
||||
{
|
||||
|
||||
$db->begin();
|
||||
|
||||
$nbok = 0;
|
||||
|
||||
|
||||
$orders = GETPOST('toselect', 'array');
|
||||
foreach ($orders as $id_order)
|
||||
{
|
||||
|
||||
$cmd = new Commande($db);
|
||||
if ($cmd->fetch($id_order) <= 0)
|
||||
continue;
|
||||
|
||||
if ($cmd->statut != Commande::STATUS_VALIDATED)
|
||||
{
|
||||
$langs->load('errors');
|
||||
setEventMessages($langs->trans("ErrorObjectMustHaveStatusValidToBeCanceled", $cmd->ref), null, 'errors');
|
||||
$error++;
|
||||
break;
|
||||
}
|
||||
else
|
||||
$result = $cmd->cancel();
|
||||
|
||||
if ($result < 0)
|
||||
{
|
||||
setEventMessages($cmd->error, $cmd->errors, 'errors');
|
||||
$error++;
|
||||
break;
|
||||
}
|
||||
else
|
||||
$nbok++;
|
||||
}
|
||||
if (!$error)
|
||||
{
|
||||
if ($nbok > 1)
|
||||
setEventMessages($langs->trans("RecordsModified", $nbok), null, 'mesgs');
|
||||
else
|
||||
setEventMessages($langs->trans("RecordsModified", $nbok), null, 'mesgs');
|
||||
$db->commit();
|
||||
}
|
||||
else
|
||||
{
|
||||
$db->rollback();
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
if (! $error && $massaction == "builddoc" && $permtoread && ! GETPOST('button_search'))
|
||||
{
|
||||
if (empty($diroutputmassaction))
|
||||
@ -1029,24 +1079,23 @@ if (! $error && ($massaction == 'delete' || ($action == 'delete' && $confirm ==
|
||||
$result=$objecttmp->fetch($toselectid);
|
||||
if ($result > 0)
|
||||
{
|
||||
// Refuse deletion for some status ?
|
||||
/*
|
||||
if ($objectclass == 'Facture' && $objecttmp->status == Facture::STATUS_DRAFT)
|
||||
{
|
||||
$langs->load("errors");
|
||||
$nbignored++;
|
||||
$resaction.='<div class="error">'.$langs->trans('ErrorOnlyDraftStatusCanBeDeletedInMassAction',$objecttmp->ref).'</div><br>';
|
||||
continue;
|
||||
}*/
|
||||
// Refuse deletion for some objects/status
|
||||
if ($objectclass == 'Facture' && empty($conf->global->INVOICE_CAN_ALWAYS_BE_REMOVED) && $objecttmp->status != Facture::STATUS_DRAFT)
|
||||
{
|
||||
$langs->load("errors");
|
||||
$nbignored++;
|
||||
$resaction.='<div class="error">'.$langs->trans('ErrorOnlyDraftStatusCanBeDeletedInMassAction',$objecttmp->ref).'</div><br>';
|
||||
continue;
|
||||
}
|
||||
|
||||
if (in_array($objecttmp->element, array('societe','member'))) $result = $objecttmp->delete($objecttmp->id, $user, 1);
|
||||
if (in_array($objecttmp->element, array('societe', 'member'))) $result = $objecttmp->delete($objecttmp->id, $user, 1);
|
||||
else $result = $objecttmp->delete($user);
|
||||
|
||||
if ($result <= 0)
|
||||
{
|
||||
setEventMessages($objecttmp->error, $objecttmp->errors, 'errors');
|
||||
$error++;
|
||||
break;
|
||||
setEventMessages($objecttmp->error, $objecttmp->errors, 'errors');
|
||||
$error++;
|
||||
break;
|
||||
}
|
||||
else $nbok++;
|
||||
}
|
||||
|
||||
@ -274,6 +274,7 @@ class FormAccounting extends Form
|
||||
$sql .= " INNER JOIN " . MAIN_DB_PREFIX . "accounting_system as asy ON aa.fk_pcg_version = asy.pcg_version";
|
||||
$sql .= " AND asy.rowid = " . $conf->global->CHARTOFACCOUNTS;
|
||||
$sql .= " AND aa.active = 1";
|
||||
$sql .= " AND aa.entity=".$conf->entity;
|
||||
$sql .= " ORDER BY aa.account_number";
|
||||
|
||||
dol_syslog(get_class($this) . "::select_account", LOG_DEBUG);
|
||||
|
||||
@ -4672,7 +4672,8 @@ function get_localtax($vatrate, $local, $thirdparty_buyer="", $thirdparty_seller
|
||||
|
||||
if ($local == 2)
|
||||
{
|
||||
if (! $mysoc->localtax2_assuj || (string) $vatratecleaned == "0") return 0;
|
||||
//if (! $mysoc->localtax2_assuj || (string) $vatratecleaned == "0") return 0;
|
||||
if (! $mysoc->localtax2_assuj) return 0; // If main vat is 0, IRPF may be different than 0.
|
||||
if ($thirdparty_seller->id == $mysoc->id)
|
||||
{
|
||||
if (! $thirdparty_buyer->localtax2_assuj) return 0;
|
||||
|
||||
@ -1281,18 +1281,18 @@ function print_left_eldy_menu($db,$menu_array_before,$menu_array_after,&$tabMenu
|
||||
if (! empty($conf->stock->enabled))
|
||||
{
|
||||
$langs->load("stocks");
|
||||
if (empty($conf->global->MAIN_USE_ADVANCED_PERMS))
|
||||
{
|
||||
$newmenu->add("/product/inventory/list.php?leftmenu=stock", $langs->trans("Inventory"), 0, $user->rights->stock->lire, '', $mainmenu, 'stock');
|
||||
$newmenu->add("/product/inventory/card.php?action=create", $langs->trans("NewInventory"), 1, $user->rights->stock->creer);
|
||||
$newmenu->add("/product/inventory/list.php", $langs->trans("List"), 1, $user->rights->stock->lire);
|
||||
}
|
||||
else
|
||||
{
|
||||
$newmenu->add("/product/inventory/list.php?leftmenu=stock", $langs->trans("Inventory"), 0, $user->rights->stock->advance_inventory->read, '', $mainmenu, 'stock');
|
||||
$newmenu->add("/product/inventory/card.php?action=create", $langs->trans("NewInventory"), 1, $user->rights->stock->advance_inventory->write);
|
||||
$newmenu->add("/product/inventory/list.php", $langs->trans("List"), 1, $user->rights->stock->advance_inventory->read);
|
||||
}
|
||||
if (empty($conf->global->MAIN_USE_ADVANCED_PERMS))
|
||||
{
|
||||
$newmenu->add("/product/inventory/list.php?leftmenu=stock", $langs->trans("Inventory"), 0, $user->rights->stock->lire, '', $mainmenu, 'stock');
|
||||
$newmenu->add("/product/inventory/card.php?action=create", $langs->trans("NewInventory"), 1, $user->rights->stock->creer);
|
||||
$newmenu->add("/product/inventory/list.php", $langs->trans("List"), 1, $user->rights->stock->lire);
|
||||
}
|
||||
else
|
||||
{
|
||||
$newmenu->add("/product/inventory/list.php?leftmenu=stock", $langs->trans("Inventory"), 0, $user->rights->stock->inventory_advance->read, '', $mainmenu, 'stock');
|
||||
$newmenu->add("/product/inventory/card.php?action=create", $langs->trans("NewInventory"), 1, $user->rights->stock->inventory_advance->write);
|
||||
$newmenu->add("/product/inventory/list.php", $langs->trans("List"), 1, $user->rights->stock->inventory_advance->read);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@ -150,25 +150,25 @@ class modStock extends DolibarrModules
|
||||
$this->rights[5][0] = 1011;
|
||||
$this->rights[5][1] = 'inventoryReadPermission'; // Permission label
|
||||
$this->rights[5][3] = 0; // Permission by default for new user (0/1)
|
||||
$this->rights[5][4] = 'advance_inventory'; // In php code, permission will be checked by test if ($user->rights->permkey->level1->level2)
|
||||
$this->rights[5][4] = 'inventory_advance'; // In php code, permission will be checked by test if ($user->rights->permkey->level1->level2)
|
||||
$this->rights[5][5] = 'read'; // In php code, permission will be checked by test if ($user->rights->permkey->level1->level2)
|
||||
|
||||
$this->rights[6][0] = 1012;
|
||||
$this->rights[6][1] = 'inventoryCreatePermission'; // Permission label
|
||||
$this->rights[6][3] = 0; // Permission by default for new user (0/1)
|
||||
$this->rights[6][4] = 'advance_inventory'; // In php code, permission will be checked by test if ($user->rights->permkey->level1->level2)
|
||||
$this->rights[6][4] = 'inventory_advance'; // In php code, permission will be checked by test if ($user->rights->permkey->level1->level2)
|
||||
$this->rights[6][5] = 'write'; // In php code, permission will be checked by test if ($user->rights->permkey->level1->level2)
|
||||
|
||||
$this->rights[8][0] = 1014;
|
||||
$this->rights[8][1] = 'inventoryValidatePermission'; // Permission label
|
||||
$this->rights[8][3] = 0; // Permission by default for new user (0/1)
|
||||
$this->rights[8][4] = 'advance_inventory'; // In php code, permission will be checked by test if ($user->rights->permkey->level1->level2)
|
||||
$this->rights[8][4] = 'inventory_advance'; // In php code, permission will be checked by test if ($user->rights->permkey->level1->level2)
|
||||
$this->rights[8][5] = 'validate'; // In php code, permission will be checked by test if ($user->rights->permkey->level1->level2)
|
||||
|
||||
$this->rights[9][0] = 1015;
|
||||
$this->rights[9][1] = 'inventoryChangePMPPermission'; // Permission label
|
||||
$this->rights[9][3] = 0; // Permission by default for new user (0/1)
|
||||
$this->rights[9][4] = 'advance_inventory'; // In php code, permission will be checked by test if ($user->rights->permkey->level1->level2)
|
||||
$this->rights[9][4] = 'inventory_advance'; // In php code, permission will be checked by test if ($user->rights->permkey->level1->level2)
|
||||
$this->rights[9][5] = 'changePMP'; // In php code, permission will be checked by test if ($user->rights->permkey->level1->level2)
|
||||
|
||||
}
|
||||
|
||||
@ -27,6 +27,11 @@
|
||||
// $trackid='ord'.$object->id;
|
||||
|
||||
|
||||
if ($massaction == 'predeletedraft')
|
||||
{
|
||||
print $form->formconfirm($_SERVER["PHP_SELF"], $langs->trans("ConfirmMassDraftDeletion"), $langs->trans("ConfirmMassDeletionQuestion", count($toselect)), "delete", null, '', 0, 200, 500, 1);
|
||||
}
|
||||
|
||||
if ($massaction == 'predelete')
|
||||
{
|
||||
print $form->formconfirm($_SERVER["PHP_SELF"], $langs->trans("ConfirmMassDeletion"), $langs->trans("ConfirmMassDeletionQuestion", count($toselect)), "delete", null, '', 0, 200, 500, 1);
|
||||
|
||||
@ -75,10 +75,10 @@ class InterfaceMailmanSpipsynchro extends DolibarrTriggers
|
||||
dol_syslog("Trigger '".$this->name."' for action '$action' launched by ".__FILE__.". id=".$object->id);
|
||||
|
||||
// We remove subscription if we change category (lessw category may means less mailing-list to subscribe)
|
||||
if (is_object($object->unlinkoff) && method_exists($object->unlinkoff, 'del_to_abo') && $object->unlinkoff->del_to_abo() < 0)
|
||||
if (is_object($object->context['unlinkoff']) && method_exists($object->context['unlinkoff'], 'del_to_abo') && $object->context['unlinkoff']->del_to_abo() < 0)
|
||||
{
|
||||
$this->error=$object->unlinkoff->error;
|
||||
$this->errors=$object->unlinkoff->errors;
|
||||
$this->error=$object->context['unlinkoff']->error;
|
||||
$this->errors=$object->context['unlinkoff']->errors;
|
||||
$return=-1;
|
||||
}
|
||||
else
|
||||
|
||||
@ -577,21 +577,21 @@ ALTER TABLE llx_c_email_senderprofile ADD UNIQUE INDEX uk_c_email_senderprofile(
|
||||
-- Add new chart of account entries
|
||||
INSERT INTO llx_accounting_system (fk_country, pcg_version, label, active) VALUES ( 67,'PC-MIPYME', 'The PYME accountancy Chile plan', 1);
|
||||
INSERT INTO llx_accounting_system (fk_country, pcg_version, label, active) VALUES ( 7,'ENG-BASE', 'England plan', 1);
|
||||
INSERT INTO llx_accounting_system (fk_country, pcg_version, label, active) VALUES ( 49,'SYSCOHADA', 'Plan comptable Ouest-Africain', 1);
|
||||
INSERT INTO llx_accounting_system (fk_country, pcg_version, label, active) VALUES ( 60,'SYSCOHADA', 'Plan comptable Ouest-Africain', 1);
|
||||
INSERT INTO llx_accounting_system (fk_country, pcg_version, label, active) VALUES ( 24,'SYSCOHADA', 'Plan comptable Ouest-Africain', 1);
|
||||
INSERT INTO llx_accounting_system (fk_country, pcg_version, label, active) VALUES ( 65,'SYSCOHADA', 'Plan comptable Ouest-Africain', 1);
|
||||
INSERT INTO llx_accounting_system (fk_country, pcg_version, label, active) VALUES ( 71,'SYSCOHADA', 'Plan comptable Ouest-Africain', 1);
|
||||
INSERT INTO llx_accounting_system (fk_country, pcg_version, label, active) VALUES ( 72,'SYSCOHADA', 'Plan comptable Ouest-Africain', 1);
|
||||
INSERT INTO llx_accounting_system (fk_country, pcg_version, label, active) VALUES ( 21,'SYSCOHADA', 'Plan comptable Ouest-Africain', 1);
|
||||
INSERT INTO llx_accounting_system (fk_country, pcg_version, label, active) VALUES ( 16,'SYSCOHADA', 'Plan comptable Ouest-Africain', 1);
|
||||
INSERT INTO llx_accounting_system (fk_country, pcg_version, label, active) VALUES ( 87,'SYSCOHADA', 'Plan comptable Ouest-Africain', 1);
|
||||
INSERT INTO llx_accounting_system (fk_country, pcg_version, label, active) VALUES (147,'SYSCOHADA', 'Plan comptable Ouest-Africain', 1);
|
||||
INSERT INTO llx_accounting_system (fk_country, pcg_version, label, active) VALUES (168,'SYSCOHADA', 'Plan comptable Ouest-Africain', 1);
|
||||
INSERT INTO llx_accounting_system (fk_country, pcg_version, label, active) VALUES ( 73,'SYSCOHADA', 'Plan comptable Ouest-Africain', 1);
|
||||
INSERT INTO llx_accounting_system (fk_country, pcg_version, label, active) VALUES ( 22,'SYSCOHADA', 'Plan comptable Ouest-Africain', 1);
|
||||
INSERT INTO llx_accounting_system (fk_country, pcg_version, label, active) VALUES ( 66,'SYSCOHADA', 'Plan comptable Ouest-Africain', 1);
|
||||
INSERT INTO llx_accounting_system (fk_country, pcg_version, label, active) VALUES ( 15,'SYSCOHADA', 'Plan comptable Ouest-Africain', 1);
|
||||
INSERT INTO llx_accounting_system (fk_country, pcg_version, label, active) VALUES ( 49,'SYSCOHADA-BJ', 'Plan comptable Ouest-Africain', 1);
|
||||
INSERT INTO llx_accounting_system (fk_country, pcg_version, label, active) VALUES ( 60,'SYSCOHADA-BF', 'Plan comptable Ouest-Africain', 1);
|
||||
INSERT INTO llx_accounting_system (fk_country, pcg_version, label, active) VALUES ( 24,'SYSCOHADA-CM', 'Plan comptable Ouest-Africain', 1);
|
||||
INSERT INTO llx_accounting_system (fk_country, pcg_version, label, active) VALUES ( 65,'SYSCOHADA-CF', 'Plan comptable Ouest-Africain', 1);
|
||||
INSERT INTO llx_accounting_system (fk_country, pcg_version, label, active) VALUES ( 71,'SYSCOHADA-KM', 'Plan comptable Ouest-Africain', 1);
|
||||
INSERT INTO llx_accounting_system (fk_country, pcg_version, label, active) VALUES ( 72,'SYSCOHADA-CG', 'Plan comptable Ouest-Africain', 1);
|
||||
INSERT INTO llx_accounting_system (fk_country, pcg_version, label, active) VALUES ( 21,'SYSCOHADA-CI', 'Plan comptable Ouest-Africain', 1);
|
||||
INSERT INTO llx_accounting_system (fk_country, pcg_version, label, active) VALUES ( 16,'SYSCOHADA-GA', 'Plan comptable Ouest-Africain', 1);
|
||||
INSERT INTO llx_accounting_system (fk_country, pcg_version, label, active) VALUES ( 87,'SYSCOHADA-GQ', 'Plan comptable Ouest-Africain', 1);
|
||||
INSERT INTO llx_accounting_system (fk_country, pcg_version, label, active) VALUES (147,'SYSCOHADA-ML', 'Plan comptable Ouest-Africain', 1);
|
||||
INSERT INTO llx_accounting_system (fk_country, pcg_version, label, active) VALUES (168,'SYSCOHADA-NE', 'Plan comptable Ouest-Africain', 1);
|
||||
INSERT INTO llx_accounting_system (fk_country, pcg_version, label, active) VALUES ( 73,'SYSCOHADA-CD', 'Plan comptable Ouest-Africain', 1);
|
||||
INSERT INTO llx_accounting_system (fk_country, pcg_version, label, active) VALUES ( 22,'SYSCOHADA-SN', 'Plan comptable Ouest-Africain', 1);
|
||||
INSERT INTO llx_accounting_system (fk_country, pcg_version, label, active) VALUES ( 66,'SYSCOHADA-TD', 'Plan comptable Ouest-Africain', 1);
|
||||
INSERT INTO llx_accounting_system (fk_country, pcg_version, label, active) VALUES ( 15,'SYSCOHADA-TG', 'Plan comptable Ouest-Africain', 1);
|
||||
|
||||
|
||||
-- Update old chart of account entries
|
||||
|
||||
@ -59,6 +59,24 @@ INSERT INTO llx_accounting_system (fk_country, pcg_version, label, active) VALUE
|
||||
INSERT INTO llx_accounting_system (fk_country, pcg_version, label, active) VALUES ( 10, 'PCT', 'The Tunisia plan', 1);
|
||||
INSERT INTO llx_accounting_system (fk_country, pcg_version, label, active) VALUES ( 12, 'PCG', 'The Moroccan chart of accounts', 1);
|
||||
|
||||
INSERT INTO llx_accounting_system (fk_country, pcg_version, label, active) VALUES ( 67,'PC-MIPYME', 'The PYME accountancy Chile plan', 1);
|
||||
INSERT INTO llx_accounting_system (fk_country, pcg_version, label, active) VALUES ( 7,'ENG-BASE', 'England plan', 1);
|
||||
INSERT INTO llx_accounting_system (fk_country, pcg_version, label, active) VALUES ( 49,'SYSCOHADA-BJ', 'Plan comptable Ouest-Africain', 1);
|
||||
INSERT INTO llx_accounting_system (fk_country, pcg_version, label, active) VALUES ( 60,'SYSCOHADA-BF', 'Plan comptable Ouest-Africain', 1);
|
||||
INSERT INTO llx_accounting_system (fk_country, pcg_version, label, active) VALUES ( 24,'SYSCOHADA-CM', 'Plan comptable Ouest-Africain', 1);
|
||||
INSERT INTO llx_accounting_system (fk_country, pcg_version, label, active) VALUES ( 65,'SYSCOHADA-CF', 'Plan comptable Ouest-Africain', 1);
|
||||
INSERT INTO llx_accounting_system (fk_country, pcg_version, label, active) VALUES ( 71,'SYSCOHADA-KM', 'Plan comptable Ouest-Africain', 1);
|
||||
INSERT INTO llx_accounting_system (fk_country, pcg_version, label, active) VALUES ( 72,'SYSCOHADA-CG', 'Plan comptable Ouest-Africain', 1);
|
||||
INSERT INTO llx_accounting_system (fk_country, pcg_version, label, active) VALUES ( 21,'SYSCOHADA-CI', 'Plan comptable Ouest-Africain', 1);
|
||||
INSERT INTO llx_accounting_system (fk_country, pcg_version, label, active) VALUES ( 16,'SYSCOHADA-GA', 'Plan comptable Ouest-Africain', 1);
|
||||
INSERT INTO llx_accounting_system (fk_country, pcg_version, label, active) VALUES ( 87,'SYSCOHADA-GQ', 'Plan comptable Ouest-Africain', 1);
|
||||
INSERT INTO llx_accounting_system (fk_country, pcg_version, label, active) VALUES (147,'SYSCOHADA-ML', 'Plan comptable Ouest-Africain', 1);
|
||||
INSERT INTO llx_accounting_system (fk_country, pcg_version, label, active) VALUES (168,'SYSCOHADA-NE', 'Plan comptable Ouest-Africain', 1);
|
||||
INSERT INTO llx_accounting_system (fk_country, pcg_version, label, active) VALUES ( 73,'SYSCOHADA-CD', 'Plan comptable Ouest-Africain', 1);
|
||||
INSERT INTO llx_accounting_system (fk_country, pcg_version, label, active) VALUES ( 22,'SYSCOHADA-SN', 'Plan comptable Ouest-Africain', 1);
|
||||
INSERT INTO llx_accounting_system (fk_country, pcg_version, label, active) VALUES ( 66,'SYSCOHADA-TD', 'Plan comptable Ouest-Africain', 1);
|
||||
INSERT INTO llx_accounting_system (fk_country, pcg_version, label, active) VALUES ( 15,'SYSCOHADA-TG', 'Plan comptable Ouest-Africain', 1);
|
||||
|
||||
-- For 8.0
|
||||
|
||||
-- delete old permission no more used
|
||||
|
||||
@ -34,6 +34,7 @@ create table llx_entrepot
|
||||
fk_pays integer DEFAULT 0,
|
||||
statut tinyint DEFAULT 1, -- 1 open, 0 close
|
||||
fk_user_author integer,
|
||||
import_key varchar(14),
|
||||
model_pdf varchar(255),
|
||||
import_key varchar(14),
|
||||
fk_parent integer DEFAULT 0
|
||||
)ENGINE=innodb;
|
||||
|
||||
@ -34,5 +34,6 @@ create table llx_stock_mouvement
|
||||
label varchar(255), -- Comment on movement
|
||||
inventorycode varchar(128), -- Code used to group different movement line into one operation (may be an inventory, a mass picking)
|
||||
fk_origin integer,
|
||||
origintype varchar(32)
|
||||
origintype varchar(32),
|
||||
model_pdf varchar(255)
|
||||
)ENGINE=innodb;
|
||||
|
||||
@ -941,4 +941,6 @@ Local=Local
|
||||
Remote=Remote
|
||||
LocalAndRemote=Local and Remote
|
||||
KeyboardShortcut=Keyboard shortcut
|
||||
AssignedTo=Assigned to
|
||||
AssignedTo=Assigned to
|
||||
Deletedraft=Delete draft
|
||||
ConfirmMassDraftDeletion=Draft Bulk delete confirmation
|
||||
|
||||
@ -208,6 +208,7 @@ ErrorFileNotFoundWithSharedLink=Fichier non trouvé. Peut que la clé de partage
|
||||
ErrorProductBarCodeAlreadyExists=Le code-barre du produit %s existe déjà sur une autre référence de produit
|
||||
ErrorNoteAlsoThatSubProductCantBeFollowedByLot=Notez également que l'utilisation d'un produit virtuel pour augmenter ou réduire automatiquement les sous-produits n'est pas possible lorsqu'au moins un sous-produit (ou sous-produit de sous-produits) a besoin d'un numéro de série/lot.
|
||||
ErrorDescRequiredForFreeProductLines=La description est obligatoire pour les lignes avec un produit non prédéfini
|
||||
ErrorObjectMustHaveStatusValidToBeCanceled=L'objet %s doit être au statut 'Validé' pour être annulé
|
||||
|
||||
# Warnings
|
||||
WarningPasswordSetWithNoAccount=Un mot de passe a été fixé pour cet adhérent. Cependant, aucun compte d'utilisateur n'a été créé. Donc, ce mot de passe est stocké, mais ne peut être utilisé pour accéder à Dolibarr. Il peut être utilisé par un module/interface externe, mais si vous n'avez pas besoin de définir ni login ni mot de passe pour un adhérent, vous pouvez désactiver l'option «Gérer un login pour chaque adhérent" depuis la configuration du module Adhérents. Si vous avez besoin de gérer un login, mais pas de mot de passe, vous pouvez laisser ce champ vide pour éviter cet avertissement. Remarque: L'email peut également être utilisé comme login si l'adhérent est lié à un utilisateur.
|
||||
|
||||
@ -941,3 +941,5 @@ Remote=Distant
|
||||
LocalAndRemote=Local et distant
|
||||
KeyboardShortcut=Raccourci clavier
|
||||
AssignedTo=Assigné à
|
||||
Deletedraft=Supprimer brouillon
|
||||
ConfirmMassDraftDeletion=Confirmation de suppression brouillons en masse
|
||||
|
||||
@ -1103,7 +1103,7 @@ class Product extends CommonObject
|
||||
//If it is a parent product, then we remove the association with child products
|
||||
$prodcomb = new ProductCombination($this->db);
|
||||
|
||||
if ($prodcomb->deleteByFkProductParent($id) < 0) {
|
||||
if ($prodcomb->deleteByFkProductParent($user, $id) < 0) {
|
||||
$error++;
|
||||
$this->errors[] = 'Error deleting combinations';
|
||||
}
|
||||
@ -3514,6 +3514,7 @@ class Product extends CommonObject
|
||||
}
|
||||
if (! empty($conf->accounting->enabled) && $this->status_buy)
|
||||
{
|
||||
include_once DOL_DOCUMENT_ROOT.'/core/lib/accounting.lib.php';
|
||||
$label.= '<br><b>' . $langs->trans('ProductAccountancyBuyCode') . ':</b> '. length_accountg($this->accountancy_code_buy);
|
||||
}
|
||||
if (! empty($this->entity))
|
||||
|
||||
@ -42,7 +42,7 @@ if (empty($conf->global->MAIN_USE_ADVANCED_PERMS))
|
||||
}
|
||||
else
|
||||
{
|
||||
$result = restrictedArea($user, 'stock', $id, '', 'advance_inventory');
|
||||
$result = restrictedArea($user, 'stock', $id, '', 'inventory_advance');
|
||||
}
|
||||
|
||||
// Initialize technical objects
|
||||
@ -82,8 +82,8 @@ if (empty($conf->global->MAIN_USE_ADVANCED_PERMS))
|
||||
}
|
||||
else
|
||||
{
|
||||
$permissiontoadd = $user->rights->stock->advance_inventory->create;
|
||||
$permissiontodelete = $user->rights->stock->advance_inventory->write;
|
||||
$permissiontoadd = $user->rights->stock->inventory_advance->create;
|
||||
$permissiontodelete = $user->rights->stock->inventory_advance->write;
|
||||
}
|
||||
|
||||
|
||||
|
||||
@ -78,7 +78,7 @@ if (empty($conf->global->MAIN_USE_ADVANCED_PERMS))
|
||||
}
|
||||
else
|
||||
{
|
||||
$result = restrictedArea($user, 'stock', $objectid, '', 'advance_inventory');
|
||||
$result = restrictedArea($user, 'stock', $objectid, '', 'inventory_advance');
|
||||
}
|
||||
|
||||
// Initialize array of search criterias
|
||||
|
||||
@ -49,7 +49,8 @@ $projectid=isset($_GET["id"])?$_GET["id"]:$_POST["projectid"];
|
||||
|
||||
// Security check
|
||||
$socid=0;
|
||||
if ($user->societe_id > 0) $socid=$user->societe_id;
|
||||
// For external user, no check is done on company because readability is managed by public status of project and assignement.
|
||||
//if ($user->societe_id > 0) $socid=$user->societe_id;
|
||||
$result = restrictedArea($user, 'projet', $projectid);
|
||||
|
||||
$now=dol_now();
|
||||
|
||||
@ -49,7 +49,8 @@ $projectid=isset($_GET["id"])?$_GET["id"]:$_POST["projectid"];
|
||||
|
||||
// Security check
|
||||
$socid=0;
|
||||
if ($user->societe_id > 0) $socid=$user->societe_id;
|
||||
// For external user, no check is done on company because readability is managed by public status of project and assignement.
|
||||
// if ($user->societe_id > 0) $socid=$user->societe_id;
|
||||
$result = restrictedArea($user, 'projet', $projectid);
|
||||
|
||||
$now=dol_now();
|
||||
|
||||
@ -1723,23 +1723,26 @@ class Project extends CommonObject
|
||||
{
|
||||
global $conf, $langs;
|
||||
|
||||
$mine=0; $socid=$user->societe_id;
|
||||
|
||||
$projectsListId = $this->getProjectsAuthorizedForUser($user,$mine?$mine:($user->rights->projet->all->lire?2:0),1,$socid);
|
||||
// For external user, no check is done on company because readability is managed by public status of project and assignement.
|
||||
//$socid=$user->societe_id;
|
||||
|
||||
if (! $user->rights->projet->all->lire) $projectsListId = $this->getProjectsAuthorizedForUser($user,0,1,$socid);
|
||||
|
||||
$sql = "SELECT p.rowid, p.fk_statut as status, p.fk_opp_status, p.datee as datee";
|
||||
$sql.= " FROM (".MAIN_DB_PREFIX."projet as p";
|
||||
$sql.= ")";
|
||||
$sql.= " LEFT JOIN ".MAIN_DB_PREFIX."societe as s on p.fk_soc = s.rowid";
|
||||
if (! $user->rights->societe->client->voir && ! $socid) $sql .= " LEFT JOIN ".MAIN_DB_PREFIX."societe_commerciaux as sc ON sc.fk_soc = s.rowid";
|
||||
// For external user, no check is done on company permission because readability is managed by public status of project and assignement.
|
||||
//if (! $user->rights->societe->client->voir && ! $socid) $sql .= " LEFT JOIN ".MAIN_DB_PREFIX."societe_commerciaux as sc ON sc.fk_soc = s.rowid";
|
||||
$sql.= " WHERE p.fk_statut = 1";
|
||||
$sql.= " AND p.entity IN (".getEntity('project', 0).')';
|
||||
if ($mine || ! $user->rights->projet->all->lire) $sql.= " AND p.rowid IN (".$projectsListId.")";
|
||||
if (! $user->rights->projet->all->lire) $sql.= " AND p.rowid IN (".$projectsListId.")";
|
||||
// No need to check company, as filtering of projects must be done by getProjectsAuthorizedForUser
|
||||
//if ($socid || ! $user->rights->societe->client->voir) $sql.= " AND (p.fk_soc IS NULL OR p.fk_soc = 0 OR p.fk_soc = ".$socid.")";
|
||||
if ($socid) $sql.= " AND (p.fk_soc IS NULL OR p.fk_soc = 0 OR p.fk_soc = ".$socid.")";
|
||||
if (! $user->rights->societe->client->voir && ! $socid) $sql.= " AND ((s.rowid = sc.fk_soc AND sc.fk_user = " .$user->id.") OR (s.rowid IS NULL))";
|
||||
|
||||
// For external user, no check is done on company permission because readability is managed by public status of project and assignement.
|
||||
//if (! $user->rights->societe->client->voir && ! $socid) $sql.= " AND ((s.rowid = sc.fk_soc AND sc.fk_user = " .$user->id.") OR (s.rowid IS NULL))";
|
||||
|
||||
//print $sql;
|
||||
$resql=$this->db->query($sql);
|
||||
if ($resql)
|
||||
{
|
||||
|
||||
@ -1826,28 +1826,31 @@ class Task extends CommonObject
|
||||
{
|
||||
global $conf, $langs;
|
||||
|
||||
$mine=0; $socid=$user->societe_id;
|
||||
|
||||
// For external user, no check is done on company because readability is managed by public status of project and assignement.
|
||||
//$socid=$user->societe_id;
|
||||
|
||||
$projectstatic = new Project($this->db);
|
||||
$projectsListId = $projectstatic->getProjectsAuthorizedForUser($user,$mine,1,$socid);
|
||||
|
||||
$projectsListId = $projectstatic->getProjectsAuthorizedForUser($user,0,1,$socid);
|
||||
|
||||
// List of tasks (does not care about permissions. Filtering will be done later)
|
||||
$sql = "SELECT p.rowid as projectid, p.fk_statut as projectstatus,";
|
||||
$sql.= " t.rowid as taskid, t.progress as progress, t.fk_statut as status,";
|
||||
$sql.= " t.dateo as date_start, t.datee as datee";
|
||||
$sql.= " FROM ".MAIN_DB_PREFIX."projet as p";
|
||||
$sql.= " LEFT JOIN ".MAIN_DB_PREFIX."societe as s on p.fk_soc = s.rowid";
|
||||
if (! $user->rights->societe->client->voir && ! $socid) $sql .= " LEFT JOIN ".MAIN_DB_PREFIX."societe_commerciaux as sc ON sc.fk_soc = s.rowid";
|
||||
//if (! $user->rights->societe->client->voir && ! $socid) $sql .= " LEFT JOIN ".MAIN_DB_PREFIX."societe_commerciaux as sc ON sc.fk_soc = s.rowid";
|
||||
$sql.= ", ".MAIN_DB_PREFIX."projet_task as t";
|
||||
$sql.= " WHERE p.entity IN (".getEntity('project', 0).')';
|
||||
$sql.= " AND p.fk_statut = 1";
|
||||
$sql.= " AND t.fk_projet = p.rowid";
|
||||
$sql.= " AND t.progress < 100"; // tasks to do
|
||||
if ($mine || ! $user->rights->projet->all->lire) $sql.= " AND p.rowid IN (".$projectsListId.")";
|
||||
if (! $user->rights->projet->all->lire) $sql.= " AND p.rowid IN (".$projectsListId.")";
|
||||
// No need to check company, as filtering of projects must be done by getProjectsAuthorizedForUser
|
||||
//if ($socid || ! $user->rights->societe->client->voir) $sql.= " AND (p.fk_soc IS NULL OR p.fk_soc = 0 OR p.fk_soc = ".$socid.")";
|
||||
if ($socid) $sql.= " AND (p.fk_soc IS NULL OR p.fk_soc = 0 OR p.fk_soc = ".$socid.")";
|
||||
if (! $user->rights->societe->client->voir && ! $socid) $sql.= " AND ((s.rowid = sc.fk_soc AND sc.fk_user = " .$user->id.") OR (s.rowid IS NULL))";
|
||||
// No need to check company, as filtering of projects must be done by getProjectsAuthorizedForUser
|
||||
// if (! $user->rights->societe->client->voir && ! $socid) $sql.= " AND ((s.rowid = sc.fk_soc AND sc.fk_user = " .$user->id.") OR (s.rowid IS NULL))";
|
||||
|
||||
//print $sql;
|
||||
$resql=$this->db->query($sql);
|
||||
if ($resql)
|
||||
|
||||
@ -209,7 +209,7 @@ else
|
||||
$linktocreatetask = '<a class="butActionNewRefused" href="#" title="'.$langs->trans("NotEnoughPermissions").'">'.$langs->trans('AddTask').'<span class="fa fa-plus-circle valignmiddle"></span></a>';
|
||||
}
|
||||
|
||||
$linktolist='<a href="'.DOL_URL_ROOT.'/projet/tasks.php?id='.$object->id.'">'.$langs->trans("GoToListOfTasks").' <span class="fa fa-list-ul valignmiddle"></span></a>';
|
||||
$linktolist='<a href="'.DOL_URL_ROOT.'/projet/tasks.php?id='.$object->id.'">'.$langs->trans("GoToListOfTasks").'<span class="paddingleft fa fa-list-ul valignmiddle"></span></a>';
|
||||
|
||||
//print_barre_liste($title, 0, $_SERVER["PHP_SELF"], '', $sortfield, $sortorder, $linktotasks, $num, $totalnboflines, 'title_generic.png', 0, '', '', 0, 1);
|
||||
print load_fiche_titre($title, $linktolist.' '.$linktocreatetask, 'title_generic.png');
|
||||
|
||||
@ -488,7 +488,7 @@ else if ($id > 0 || ! empty($ref))
|
||||
print '<input type="hidden" name="contextpage" value="'.$contextpage.'">';
|
||||
|
||||
$title=$langs->trans("ListOfTasks");
|
||||
$linktotasks='<a href="'.DOL_URL_ROOT.'/projet/ganttview.php?id='.$object->id.'&withproject=1">'.$langs->trans("GoToGanttView").' <span class="fa fa-calendar-minus-o valignmiddle"></span></a>';
|
||||
$linktotasks='<a href="'.DOL_URL_ROOT.'/projet/ganttview.php?id='.$object->id.'&withproject=1">'.$langs->trans("GoToGanttView").'<span class="paddingleft fa fa-calendar-minus-o valignmiddle"></span></a>';
|
||||
|
||||
//print_barre_liste($title, 0, $_SERVER["PHP_SELF"], '', $sortfield, $sortorder, $linktotasks, $num, $totalnboflines, 'title_generic.png', 0, '', '', 0, 1);
|
||||
print load_fiche_titre($title, $linktotasks.' '.$linktocreatetask, 'title_generic.png');
|
||||
|
||||
@ -727,7 +727,7 @@ while ($i < min($num,$limit))
|
||||
$showlineingray=0;$showproject=1;
|
||||
print '<td class="center">';
|
||||
if ($showlineingray) print '<i>';
|
||||
else print '<a href="'.DOL_URL_ROOT.'/projet/tasks/time.php?id='.$lines[$i]->id.($showproject?'':'&withproject=1').'">';
|
||||
else print '<a href="'.DOL_URL_ROOT.'/projet/tasks/time.php?id='.$object->id.($showproject?'':'&withproject=1').'">';
|
||||
if ($obj->duration_effective) print convertSecondToTime($obj->duration_effective,$timespentoutputformat);
|
||||
else print '--:--';
|
||||
if ($showlineingray) print '</i>';
|
||||
|
||||
@ -1399,7 +1399,7 @@ else
|
||||
$langs->load('categories');
|
||||
|
||||
// Customer
|
||||
if ($object->prospect || $object->client) {
|
||||
if ($object->prospect || $object->client || (! $object->fournisseur && ! empty($conf->global->THIRDPARTY_CAN_HAVE_CATEGORY_EVEN_IF_NOT_CUSTOMER_PROSPECT_SUPPLIER))) {
|
||||
print '<tr><td class="toptd">' . fieldLabel('CustomersCategoriesShort', 'custcats') . '</td><td colspan="3">';
|
||||
$cate_arbo = $form->select_all_categories(Categorie::TYPE_CUSTOMER, null, 'parent', null, null, 1);
|
||||
print $form->multiselectarray('custcats', $cate_arbo, GETPOST('custcats', 'array'), null, null, null,
|
||||
@ -1976,7 +1976,7 @@ else
|
||||
if (! empty($conf->categorie->enabled) && ! empty($user->rights->categorie->lire))
|
||||
{
|
||||
// Customer
|
||||
if ($object->prospect || $object->client) {
|
||||
if ($object->prospect || $object->client || (! $object->fournisseur && ! empty($conf->global->THIRDPARTY_CAN_HAVE_CATEGORY_EVEN_IF_NOT_CUSTOMER_PROSPECT_SUPPLIER))) {
|
||||
print '<tr><td>' . fieldLabel('CustomersCategoriesShort', 'custcats') . '</td>';
|
||||
print '<td colspan="3">';
|
||||
$cate_arbo = $form->select_all_categories(Categorie::TYPE_CUSTOMER, null, null, null, null, 1);
|
||||
@ -2370,7 +2370,7 @@ else
|
||||
if (! empty($conf->categorie->enabled) && ! empty($user->rights->categorie->lire))
|
||||
{
|
||||
// Customer
|
||||
if ($object->prospect || $object->client) {
|
||||
if ($object->prospect || $object->client || (! $object->fournisseur && ! empty($conf->global->THIRDPARTY_CAN_HAVE_CATEGORY_EVEN_IF_NOT_CUSTOMER_PROSPECT_SUPPLIER))) {
|
||||
print '<tr><td>' . $langs->trans("CustomersCategoriesShort") . '</td>';
|
||||
print '<td>';
|
||||
print $form->showCategories($object->id, 'customer', 1);
|
||||
|
||||
@ -67,6 +67,7 @@ $action = GETPOST('action', 'alpha');
|
||||
$origin = GETPOST('origin', 'alpha');
|
||||
$originid = GETPOST('originid', 'int');
|
||||
$confirm = GETPOST('confirm', 'alpha');
|
||||
$projectid = GETPOST('projectid', 'int');
|
||||
$lineid = GETPOST('lineid', 'int');
|
||||
$contactid = GETPOST('contactid','int');
|
||||
|
||||
@ -265,7 +266,7 @@ if (empty($reshook))
|
||||
$object->remise_percent = GETPOST('remise_percent');
|
||||
$object->remise_absolue = GETPOST('remise_absolue');
|
||||
$object->socid = GETPOST('socid');
|
||||
$object->fk_project = GETPOST('projectid');
|
||||
$object->fk_project = GETPOST('projectid','int');
|
||||
$object->modelpdf = GETPOST('model');
|
||||
$object->author = $user->id; // deprecated
|
||||
$object->note = GETPOST('note','none');
|
||||
@ -283,7 +284,7 @@ if (empty($reshook))
|
||||
$object->cond_reglement_id = GETPOST('cond_reglement_id');
|
||||
$object->mode_reglement_id = GETPOST('mode_reglement_id');
|
||||
$object->fk_account = GETPOST('fk_account', 'int');
|
||||
$object->fk_project = GETPOST('projectid');
|
||||
$object->fk_project = GETPOST('projectid','int');
|
||||
$object->modelpdf = GETPOST('model');
|
||||
$object->author = $user->id; // deprecated
|
||||
$object->note = GETPOST('note','none');
|
||||
@ -906,7 +907,7 @@ if (empty($reshook))
|
||||
|
||||
// Set project
|
||||
else if ($action == 'classin' && $user->rights->supplier_proposal->creer) {
|
||||
$object->setProject($_POST['projectid']);
|
||||
$object->setProject(GETPOST('projectid'),'int');
|
||||
}
|
||||
|
||||
// Delai de livraison
|
||||
@ -1136,9 +1137,7 @@ if ($action == 'create')
|
||||
|
||||
$formproject = new FormProjets($db);
|
||||
|
||||
$projectid = 0;
|
||||
if ($origin == 'project')
|
||||
$projectid = ($originid ? $originid : 0);
|
||||
if ($origin == 'project') $projectid = ($originid ? $originid : 0);
|
||||
|
||||
print '<tr>';
|
||||
print '<td>' . $langs->trans("Project") . '</td><td colspan="2">';
|
||||
|
||||
@ -48,6 +48,13 @@ $result=$interface->run_triggers('USER_LOGOUT',$user,$user,$langs,$conf);
|
||||
if ($result < 0) { $error++; }
|
||||
// Fin appel triggers
|
||||
|
||||
// Hooks on logout
|
||||
$action='';
|
||||
$hookmanager->initHooks(array('logout'));
|
||||
$parameters=array();
|
||||
$reshook=$hookmanager->executeHooks('afterLogout',$parameters,$user,$action); // Note that $action and $object may have been modified by some hooks
|
||||
if ($reshook < 0) { $error++; }
|
||||
|
||||
// Define url to go after disconnect
|
||||
$urlfrom=empty($_SESSION["urlfrom"])?'':$_SESSION["urlfrom"];
|
||||
|
||||
|
||||
@ -275,10 +275,11 @@ class ProductCombination
|
||||
/**
|
||||
* Deletes all product combinations of a parent product
|
||||
*
|
||||
* @param int $fk_product_parent Rowid of parent product
|
||||
* @param User $user Object user
|
||||
* @param int $fk_product_parent Rowid of parent product
|
||||
* @return int <0 KO >0 OK
|
||||
*/
|
||||
public function deleteByFkProductParent($fk_product_parent)
|
||||
public function deleteByFkProductParent($user, $fk_product_parent)
|
||||
{
|
||||
$this->db->begin();
|
||||
|
||||
@ -289,11 +290,11 @@ class ProductCombination
|
||||
$res = $prodstatic->fetch($prodcomb->fk_product_child);
|
||||
|
||||
if ($res > 0) {
|
||||
$res = $prodcomb->delete();
|
||||
$res = $prodcomb->delete($user);
|
||||
}
|
||||
|
||||
if ($res > 0 && !$prodstatic->isObjectUsed($prodstatic->id)) {
|
||||
$res = $prodstatic->delete();
|
||||
$res = $prodstatic->delete($user);
|
||||
}
|
||||
|
||||
if ($res < 0) {
|
||||
|
||||
@ -95,7 +95,7 @@ if ($_POST) {
|
||||
$delete_prev_comb_res = 1;
|
||||
|
||||
if (!$donotremove) {
|
||||
$delete_prev_comb_res = $combination->deleteByFkProductParent($id);
|
||||
$delete_prev_comb_res = $combination->deleteByFkProductParent($user, $id);
|
||||
}
|
||||
|
||||
//Current combinations will be deleted
|
||||
|
||||
Loading…
Reference in New Issue
Block a user