Merge branch '6.0' of https://github.com/Dolibarr/dolibarr into 6.0
This commit is contained in:
commit
dd8ef47a25
21
ChangeLog
21
ChangeLog
@ -2,6 +2,27 @@
|
|||||||
English Dolibarr ChangeLog
|
English Dolibarr ChangeLog
|
||||||
--------------------------------------------------------------
|
--------------------------------------------------------------
|
||||||
|
|
||||||
|
***** ChangeLog for 6.0.4 compared to 6.0.3 *****
|
||||||
|
FIX: #7737
|
||||||
|
FIX: #7751
|
||||||
|
FIX: #7756 Add better error message
|
||||||
|
FIX: #7786
|
||||||
|
FIX: #7806
|
||||||
|
FIX: #7824
|
||||||
|
FIX: add line bad price and ref
|
||||||
|
FIX: A lot of several fix on local taxes and NPR tax
|
||||||
|
FIX: createfromorder
|
||||||
|
FIX: CSS for IE10
|
||||||
|
FIX: external user cannot be set as internal
|
||||||
|
FIX: Filter type on actioncomm with multiselect doesn't work
|
||||||
|
FIX: list of donation not filtered on multicompany
|
||||||
|
FIX: list of module not complete when module mb_strlen not available
|
||||||
|
FIX: Locatax were not propagated when cloning order or proposal
|
||||||
|
FIX: Searching translation should not be case sensitive
|
||||||
|
FIX: Search into language is ok for file into external modules two.
|
||||||
|
FIX: test for filter fk_status
|
||||||
|
FIX: too much users on holiday list
|
||||||
|
FIX: Wrong alias sql
|
||||||
|
|
||||||
***** ChangeLog for 6.0.3 compared to 6.0.2 *****
|
***** ChangeLog for 6.0.3 compared to 6.0.2 *****
|
||||||
FIX: #7211 Update qty dispatched on qty change
|
FIX: #7211 Update qty dispatched on qty change
|
||||||
|
|||||||
@ -131,7 +131,7 @@ $iterator1 = new RecursiveIteratorIterator($dir_iterator1);
|
|||||||
$files = new RegexIterator($iterator1, '#^(?:[A-Z]:)?(?:/(?!(?:'.($includecustom?'':'custom\/|').'documents\/|conf\/|install\/))[^/]+)+/[^/]+\.(?:php|css|html|js|json|tpl|jpg|png|gif|sql|lang)$#i');
|
$files = new RegexIterator($iterator1, '#^(?:[A-Z]:)?(?:/(?!(?:'.($includecustom?'':'custom\/|').'documents\/|conf\/|install\/))[^/]+)+/[^/]+\.(?:php|css|html|js|json|tpl|jpg|png|gif|sql|lang)$#i');
|
||||||
*/
|
*/
|
||||||
$regextoinclude='\.(php|css|html|js|json|tpl|jpg|png|gif|sql|lang)$';
|
$regextoinclude='\.(php|css|html|js|json|tpl|jpg|png|gif|sql|lang)$';
|
||||||
$regextoexclude='('.($includecustom?'':'custom|').'documents|conf|install)$'; // Exclude dirs
|
$regextoexclude='('.($includecustom?'':'custom|').'documents|conf|install|public\/test|Shared\/PCLZip|nusoap\/lib\/Mail|php\/example|php\/test|geoip\/sample.*\.php|ckeditor\/samples|ckeditor\/adapters)$'; // Exclude dirs
|
||||||
$files = dol_dir_list(DOL_DOCUMENT_ROOT, 'files', 1, $regextoinclude, $regextoexclude, 'fullname');
|
$files = dol_dir_list(DOL_DOCUMENT_ROOT, 'files', 1, $regextoinclude, $regextoexclude, 'fullname');
|
||||||
$dir='';
|
$dir='';
|
||||||
$needtoclose=0;
|
$needtoclose=0;
|
||||||
|
|||||||
@ -556,9 +556,6 @@ if ($nboftargetok) {
|
|||||||
$ret=`rm -f $BUILDROOT/$PROJECT/.cvsignore $BUILDROOT/$PROJECT/*/.cvsignore $BUILDROOT/$PROJECT/*/*/.cvsignore $BUILDROOT/$PROJECT/*/*/*/.cvsignore $BUILDROOT/$PROJECT/*/*/*/*/.cvsignore $BUILDROOT/$PROJECT/*/*/*/*/*/.cvsignore $BUILDROOT/$PROJECT/*/*/*/*/*/*/.cvsignore`;
|
$ret=`rm -f $BUILDROOT/$PROJECT/.cvsignore $BUILDROOT/$PROJECT/*/.cvsignore $BUILDROOT/$PROJECT/*/*/.cvsignore $BUILDROOT/$PROJECT/*/*/*/.cvsignore $BUILDROOT/$PROJECT/*/*/*/*/.cvsignore $BUILDROOT/$PROJECT/*/*/*/*/*/.cvsignore $BUILDROOT/$PROJECT/*/*/*/*/*/*/.cvsignore`;
|
||||||
$ret=`rm -f $BUILDROOT/$PROJECT/.gitignore $BUILDROOT/$PROJECT/*/.gitignore $BUILDROOT/$PROJECT/*/*/.gitignore $BUILDROOT/$PROJECT/*/*/*/.gitignore $BUILDROOT/$PROJECT/*/*/*/*/.gitignore $BUILDROOT/$PROJECT/*/*/*/*/*/.gitignore $BUILDROOT/$PROJECT/*/*/*/*/*/*/.gitignore`;
|
$ret=`rm -f $BUILDROOT/$PROJECT/.gitignore $BUILDROOT/$PROJECT/*/.gitignore $BUILDROOT/$PROJECT/*/*/.gitignore $BUILDROOT/$PROJECT/*/*/*/.gitignore $BUILDROOT/$PROJECT/*/*/*/*/.gitignore $BUILDROOT/$PROJECT/*/*/*/*/*/.gitignore $BUILDROOT/$PROJECT/*/*/*/*/*/*/.gitignore`;
|
||||||
$ret=`rm -f $BUILDROOT/$PROJECT/htdocs/includes/geoip/sample*.*`;
|
$ret=`rm -f $BUILDROOT/$PROJECT/htdocs/includes/geoip/sample*.*`;
|
||||||
$ret=`rm -f $BUILDROOT/$PROJECT/htdocs/includes/jquery/plugins/jqueryFileTree/connectors/jqueryFileTree.pl`; # Avoid errors into rpmlint
|
|
||||||
$ret=`rm -fr $BUILDROOT/$PROJECT/htdocs/includes/jquery/plugins/template`; # Package not valid for most linux distributions (errors reported into compile.js). Package should be embed by modules to avoid problems.
|
|
||||||
$ret=`rm -fr $BUILDROOT/$PROJECT/htdocs/includes/phpmailer`; # Package not valid for most linux distributions (errors reported into file LICENSE). Package should be embed by modules to avoid problems.
|
|
||||||
$ret=`rm -fr $BUILDROOT/$PROJECT/htdocs/includes/ckeditor/ckeditor/adapters`; # Keep this removal in case we embed libraries
|
$ret=`rm -fr $BUILDROOT/$PROJECT/htdocs/includes/ckeditor/ckeditor/adapters`; # Keep this removal in case we embed libraries
|
||||||
$ret=`rm -fr $BUILDROOT/$PROJECT/htdocs/includes/ckeditor/ckeditor/samples`; # Keep this removal in case we embed libraries
|
$ret=`rm -fr $BUILDROOT/$PROJECT/htdocs/includes/ckeditor/ckeditor/samples`; # Keep this removal in case we embed libraries
|
||||||
#$ret=`rm -fr $BUILDROOT/$PROJECT/htdocs/includes/ckeditor/_source`; # _source must be kept into tarball
|
#$ret=`rm -fr $BUILDROOT/$PROJECT/htdocs/includes/ckeditor/_source`; # _source must be kept into tarball
|
||||||
|
|||||||
@ -111,3 +111,16 @@ to get
|
|||||||
if ($className == 'Luracast\Restler\mixed') return;
|
if ($className == 'Luracast\Restler\mixed') return;
|
||||||
...
|
...
|
||||||
|
|
||||||
|
|
||||||
|
PARSEDOWN
|
||||||
|
---------
|
||||||
|
|
||||||
|
* Fix to avoid fatal error when mb_strlen not available:
|
||||||
|
|
||||||
|
// @CHANGE LDR Fix when mb_strlen is not available
|
||||||
|
//$shortage = 4 - mb_strlen($line, 'utf-8') % 4;
|
||||||
|
if (function_exists('mb_strlen')) $len = mb_strlen($line, 'utf-8');
|
||||||
|
else $len = strlen($line);
|
||||||
|
$shortage = 4 - $len % 4;
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@ -212,7 +212,7 @@ if ($xml)
|
|||||||
|
|
||||||
// Defined qualified files (must be same than into generate_filelist_xml.php)
|
// Defined qualified files (must be same than into generate_filelist_xml.php)
|
||||||
$regextoinclude='\.(php|css|html|js|json|tpl|jpg|png|gif|sql|lang)$';
|
$regextoinclude='\.(php|css|html|js|json|tpl|jpg|png|gif|sql|lang)$';
|
||||||
$regextoexclude='('.($includecustom?'':'custom|').'documents|conf|install)$'; // Exclude dirs
|
$regextoexclude='('.($includecustom?'':'custom|').'documents|conf|install|public\/test|Shared\/PCLZip|nusoap\/lib\/Mail|php\/example|php\/test|geoip\/sample.*\.php|ckeditor\/samples|ckeditor\/adapters)$'; // Exclude dirs
|
||||||
$scanfiles = dol_dir_list(DOL_DOCUMENT_ROOT, 'files', 1, $regextoinclude, $regextoexclude);
|
$scanfiles = dol_dir_list(DOL_DOCUMENT_ROOT, 'files', 1, $regextoinclude, $regextoexclude);
|
||||||
|
|
||||||
// Fill file_list with files in signature, new files, modified files
|
// Fill file_list with files in signature, new files, modified files
|
||||||
|
|||||||
@ -867,13 +867,33 @@ if (empty($reshook))
|
|||||||
// Add custom code and origin country into description
|
// Add custom code and origin country into description
|
||||||
if (empty($conf->global->MAIN_PRODUCT_DISABLE_CUSTOMCOUNTRYCODE) && (! empty($prod->customcode) || ! empty($prod->country_code)))
|
if (empty($conf->global->MAIN_PRODUCT_DISABLE_CUSTOMCOUNTRYCODE) && (! empty($prod->customcode) || ! empty($prod->country_code)))
|
||||||
{
|
{
|
||||||
$tmptxt = '(';
|
// Define output language
|
||||||
|
if (! empty($conf->global->MAIN_MULTILANGS) && ! empty($conf->global->PRODUIT_TEXTS_IN_THIRDPARTY_LANGUAGE)) {
|
||||||
|
$outputlangs = $langs;
|
||||||
|
$newlang = '';
|
||||||
|
if (empty($newlang) && GETPOST('lang_id','alpha'))
|
||||||
|
$newlang = GETPOST('lang_id','alpha');
|
||||||
|
if (empty($newlang))
|
||||||
|
$newlang = $object->thirdparty->default_lang;
|
||||||
|
if (! empty($newlang)) {
|
||||||
|
$outputlangs = new Translate("", $conf);
|
||||||
|
$outputlangs->setDefaultLang($newlang);
|
||||||
|
$outputlangs->load('products');
|
||||||
|
}
|
||||||
|
if (! empty($prod->customcode))
|
||||||
|
$tmptxt .= $outputlangs->transnoentitiesnoconv("CustomCode") . ': ' . $prod->customcode;
|
||||||
|
if (! empty($prod->customcode) && ! empty($prod->country_code))
|
||||||
|
$tmptxt .= ' - ';
|
||||||
|
if (! empty($prod->country_code))
|
||||||
|
$tmptxt .= $outputlangs->transnoentitiesnoconv("CountryOrigin") . ': ' . getCountry($prod->country_code, 0, $db, $outputlangs, 0);
|
||||||
|
} else {
|
||||||
if (! empty($prod->customcode))
|
if (! empty($prod->customcode))
|
||||||
$tmptxt .= $langs->transnoentitiesnoconv("CustomCode") . ': ' . $prod->customcode;
|
$tmptxt .= $langs->transnoentitiesnoconv("CustomCode") . ': ' . $prod->customcode;
|
||||||
if (! empty($prod->customcode) && ! empty($prod->country_code))
|
if (! empty($prod->customcode) && ! empty($prod->country_code))
|
||||||
$tmptxt .= ' - ';
|
$tmptxt .= ' - ';
|
||||||
if (! empty($prod->country_code))
|
if (! empty($prod->country_code))
|
||||||
$tmptxt .= $langs->transnoentitiesnoconv("CountryOrigin") . ': ' . getCountry($prod->country_code, 0, $db, $langs, 0);
|
$tmptxt .= $langs->transnoentitiesnoconv("CountryOrigin") . ': ' . getCountry($prod->country_code, 0, $db, $langs, 0);
|
||||||
|
}
|
||||||
$tmptxt .= ')';
|
$tmptxt .= ')';
|
||||||
$desc = dol_concatdesc($desc, $tmptxt);
|
$desc = dol_concatdesc($desc, $tmptxt);
|
||||||
}
|
}
|
||||||
|
|||||||
@ -824,12 +824,33 @@ if (empty($reshook))
|
|||||||
// Add custom code and origin country into description
|
// Add custom code and origin country into description
|
||||||
if (empty($conf->global->MAIN_PRODUCT_DISABLE_CUSTOMCOUNTRYCODE) && (! empty($prod->customcode) || ! empty($prod->country_code))) {
|
if (empty($conf->global->MAIN_PRODUCT_DISABLE_CUSTOMCOUNTRYCODE) && (! empty($prod->customcode) || ! empty($prod->country_code))) {
|
||||||
$tmptxt = '(';
|
$tmptxt = '(';
|
||||||
|
// Define output language
|
||||||
|
if (! empty($conf->global->MAIN_MULTILANGS) && ! empty($conf->global->PRODUIT_TEXTS_IN_THIRDPARTY_LANGUAGE)) {
|
||||||
|
$outputlangs = $langs;
|
||||||
|
$newlang = '';
|
||||||
|
if (empty($newlang) && GETPOST('lang_id','alpha'))
|
||||||
|
$newlang = GETPOST('lang_id','alpha');
|
||||||
|
if (empty($newlang))
|
||||||
|
$newlang = $object->thirdparty->default_lang;
|
||||||
|
if (! empty($newlang)) {
|
||||||
|
$outputlangs = new Translate("", $conf);
|
||||||
|
$outputlangs->setDefaultLang($newlang);
|
||||||
|
$outputlangs->load('products');
|
||||||
|
}
|
||||||
|
if (! empty($prod->customcode))
|
||||||
|
$tmptxt .= $outputlangs->transnoentitiesnoconv("CustomCode") . ': ' . $prod->customcode;
|
||||||
|
if (! empty($prod->customcode) && ! empty($prod->country_code))
|
||||||
|
$tmptxt .= ' - ';
|
||||||
|
if (! empty($prod->country_code))
|
||||||
|
$tmptxt .= $outputlangs->transnoentitiesnoconv("CountryOrigin") . ': ' . getCountry($prod->country_code, 0, $db, $outputlangs, 0);
|
||||||
|
} else {
|
||||||
if (! empty($prod->customcode))
|
if (! empty($prod->customcode))
|
||||||
$tmptxt .= $langs->transnoentitiesnoconv("CustomCode") . ': ' . $prod->customcode;
|
$tmptxt .= $langs->transnoentitiesnoconv("CustomCode") . ': ' . $prod->customcode;
|
||||||
if (! empty($prod->customcode) && ! empty($prod->country_code))
|
if (! empty($prod->customcode) && ! empty($prod->country_code))
|
||||||
$tmptxt .= ' - ';
|
$tmptxt .= ' - ';
|
||||||
if (! empty($prod->country_code))
|
if (! empty($prod->country_code))
|
||||||
$tmptxt .= $langs->transnoentitiesnoconv("CountryOrigin") . ': ' . getCountry($prod->country_code, 0, $db, $langs, 0);
|
$tmptxt .= $langs->transnoentitiesnoconv("CountryOrigin") . ': ' . getCountry($prod->country_code, 0, $db, $langs, 0);
|
||||||
|
}
|
||||||
$tmptxt .= ')';
|
$tmptxt .= ')';
|
||||||
$desc = dol_concatdesc($desc, $tmptxt);
|
$desc = dol_concatdesc($desc, $tmptxt);
|
||||||
}
|
}
|
||||||
|
|||||||
@ -1644,12 +1644,32 @@ if (empty($reshook))
|
|||||||
// Add custom code and origin country into description
|
// Add custom code and origin country into description
|
||||||
if (empty($conf->global->MAIN_PRODUCT_DISABLE_CUSTOMCOUNTRYCODE) && (! empty($prod->customcode) || ! empty($prod->country_code))) {
|
if (empty($conf->global->MAIN_PRODUCT_DISABLE_CUSTOMCOUNTRYCODE) && (! empty($prod->customcode) || ! empty($prod->country_code))) {
|
||||||
$tmptxt = '(';
|
$tmptxt = '(';
|
||||||
|
// Define output language
|
||||||
|
if (! empty($conf->global->MAIN_MULTILANGS) && ! empty($conf->global->PRODUIT_TEXTS_IN_THIRDPARTY_LANGUAGE)) {
|
||||||
|
$outputlangs = $langs;
|
||||||
|
$newlang = '';
|
||||||
|
if (empty($newlang) && GETPOST('lang_id','alpha'))
|
||||||
|
$newlang = GETPOST('lang_id','alpha');
|
||||||
|
if (empty($newlang))
|
||||||
|
$newlang = $object->thirdparty->default_lang;
|
||||||
|
if (! empty($newlang)) {
|
||||||
|
$outputlangs = new Translate("", $conf);
|
||||||
|
$outputlangs->setDefaultLang($newlang);
|
||||||
|
}
|
||||||
|
if (! empty($prod->customcode))
|
||||||
|
$tmptxt .= $outputlangs->transnoentitiesnoconv("CustomCode") . ': ' . $prod->customcode;
|
||||||
|
if (! empty($prod->customcode) && ! empty($prod->country_code))
|
||||||
|
$tmptxt .= ' - ';
|
||||||
|
if (! empty($prod->country_code))
|
||||||
|
$tmptxt .= $outputlangs->transnoentitiesnoconv("CountryOrigin") . ': ' . getCountry($prod->country_code, 0, $db, $outputlangs, 0);
|
||||||
|
} else {
|
||||||
if (! empty($prod->customcode))
|
if (! empty($prod->customcode))
|
||||||
$tmptxt .= $langs->transnoentitiesnoconv("CustomCode") . ': ' . $prod->customcode;
|
$tmptxt .= $langs->transnoentitiesnoconv("CustomCode") . ': ' . $prod->customcode;
|
||||||
if (! empty($prod->customcode) && ! empty($prod->country_code))
|
if (! empty($prod->customcode) && ! empty($prod->country_code))
|
||||||
$tmptxt .= ' - ';
|
$tmptxt .= ' - ';
|
||||||
if (! empty($prod->country_code))
|
if (! empty($prod->country_code))
|
||||||
$tmptxt .= $langs->transnoentitiesnoconv("CountryOrigin") . ': ' . getCountry($prod->country_code, 0, $db, $langs, 0);
|
$tmptxt .= $langs->transnoentitiesnoconv("CountryOrigin") . ': ' . getCountry($prod->country_code, 0, $db, $langs, 0);
|
||||||
|
}
|
||||||
$tmptxt .= ')';
|
$tmptxt .= ')';
|
||||||
$desc = dol_concatdesc($desc, $tmptxt);
|
$desc = dol_concatdesc($desc, $tmptxt);
|
||||||
}
|
}
|
||||||
@ -2515,8 +2535,8 @@ if ($action == 'create')
|
|||||||
print $desc;
|
print $desc;
|
||||||
|
|
||||||
print '<div id="credit_note_options" class="clearboth">';
|
print '<div id="credit_note_options" class="clearboth">';
|
||||||
print ' <input data-role="none" type="checkbox" name="invoiceAvoirWithLines" id="invoiceAvoirWithLines" value="1" onclick="if($(this).is(\':checked\') ) { $(\'#radio_creditnote\').prop(\'checked\', true); $(\'#invoiceAvoirWithPaymentRestAmount\').removeAttr(\'checked\'); }" '.(GETPOST('invoiceAvoirWithLines','int')>0 ? 'checked':'').' /> <label for="invoiceAvoirWithLines">'.$langs->trans('invoiceAvoirWithLines')."</label>";
|
print ' <input data-role="none" type="checkbox" name="invoiceAvoirWithLines" id="invoiceAvoirWithLines" value="1" onclick="$(\'#credit_note_options input[type=checkbox]\').not(this).prop(\'checked\', false);" '.(GETPOST('invoiceAvoirWithLines','int')>0 ? 'checked':'').' /> <label for="invoiceAvoirWithLines">'.$langs->trans('invoiceAvoirWithLines')."</label>";
|
||||||
print '<br> <input data-role="none" type="checkbox" name="invoiceAvoirWithPaymentRestAmount" id="invoiceAvoirWithPaymentRestAmount" value="1" onclick="if($(this).is(\':checked\') ) { $(\'#radio_creditnote\').prop(\'checked\', true); $(\'#invoiceAvoirWithLines\').removeAttr(\'checked\'); }" '.(GETPOST('invoiceAvoirWithPaymentRestAmount','int')>0 ? 'checked':'').' /> <label for="invoiceAvoirWithPaymentRestAmount">'.$langs->trans('invoiceAvoirWithPaymentRestAmount')."</label>";
|
print '<br> <input data-role="none" type="checkbox" name="invoiceAvoirWithPaymentRestAmount" id="invoiceAvoirWithPaymentRestAmount" value="1" onclick="$(\'#credit_note_options input[type=checkbox]\').not(this).prop(\'checked\', false);" '.(GETPOST('invoiceAvoirWithPaymentRestAmount','int')>0 ? 'checked':'').' /> <label for="invoiceAvoirWithPaymentRestAmount">'.$langs->trans('invoiceAvoirWithPaymentRestAmount')."</label>";
|
||||||
print '</div>';
|
print '</div>';
|
||||||
|
|
||||||
print '</div></div>';
|
print '</div></div>';
|
||||||
|
|||||||
@ -2197,6 +2197,7 @@ class Facture extends CommonInvoice
|
|||||||
else $result=$mouvP->livraison($user, $this->lines[$i]->fk_product, $idwarehouse, $this->lines[$i]->qty, $this->lines[$i]->subprice, $langs->trans("InvoiceValidatedInDolibarr",$num));
|
else $result=$mouvP->livraison($user, $this->lines[$i]->fk_product, $idwarehouse, $this->lines[$i]->qty, $this->lines[$i]->subprice, $langs->trans("InvoiceValidatedInDolibarr",$num));
|
||||||
if ($result < 0) {
|
if ($result < 0) {
|
||||||
$error++;
|
$error++;
|
||||||
|
$this->error = $mouvP->error;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@ -4,6 +4,7 @@
|
|||||||
* Copyright (C) 2005 Marc Barilley / Ocebo <marc@ocebo.com>
|
* Copyright (C) 2005 Marc Barilley / Ocebo <marc@ocebo.com>
|
||||||
* Copyright (C) 2005-2011 Regis Houssin <regis.houssin@capnetworks.com>
|
* Copyright (C) 2005-2011 Regis Houssin <regis.houssin@capnetworks.com>
|
||||||
* Copyright (C) 2013 Cédric Salvador <csalvador@gpcsolutions.fr>
|
* Copyright (C) 2013 Cédric Salvador <csalvador@gpcsolutions.fr>
|
||||||
|
* Copyright (C) 2017 Frédéric France <frederic.france@netlogic.fr>
|
||||||
*
|
*
|
||||||
* This program is free software; you can redistribute it and/or modify
|
* This program is free software; you can redistribute it and/or modify
|
||||||
* it under the terms of the GNU General Public License as published by
|
* it under the terms of the GNU General Public License as published by
|
||||||
@ -189,6 +190,6 @@ else
|
|||||||
print $langs->trans("ErrorUnknown");
|
print $langs->trans("ErrorUnknown");
|
||||||
}
|
}
|
||||||
|
|
||||||
$db->close();
|
|
||||||
|
|
||||||
llxFooter();
|
llxFooter();
|
||||||
|
|
||||||
|
$db->close();
|
||||||
|
|||||||
@ -552,14 +552,14 @@ if ($resql)
|
|||||||
if ($search_societe) $param.='&search_societe=' .urlencode($search_societe);
|
if ($search_societe) $param.='&search_societe=' .urlencode($search_societe);
|
||||||
if ($search_sale > 0) $param.='&search_sale=' .urlencode($search_sale);
|
if ($search_sale > 0) $param.='&search_sale=' .urlencode($search_sale);
|
||||||
if ($search_user > 0) $param.='&search_user=' .urlencode($search_user);
|
if ($search_user > 0) $param.='&search_user=' .urlencode($search_user);
|
||||||
if ($search_product_category > 0) $param.='$search_product_category=' .urlencode($search_product_category);
|
if ($search_product_category > 0) $param.='&search_product_category=' .urlencode($search_product_category);
|
||||||
if ($search_montant_ht != '') $param.='&search_montant_ht='.urlencode($search_montant_ht);
|
if ($search_montant_ht != '') $param.='&search_montant_ht='.urlencode($search_montant_ht);
|
||||||
if ($search_montant_vat != '') $param.='&search_montant_vat='.urlencode($search_montant_vat);
|
if ($search_montant_vat != '') $param.='&search_montant_vat='.urlencode($search_montant_vat);
|
||||||
if ($search_montant_localtax1 != '') $param.='&search_montant_localtax1='.urlencode($search_montant_localtax1);
|
if ($search_montant_localtax1 != '') $param.='&search_montant_localtax1='.urlencode($search_montant_localtax1);
|
||||||
if ($search_montant_localtax2 != '') $param.='&search_montant_localtax2='.urlencode($search_montant_localtax2);
|
if ($search_montant_localtax2 != '') $param.='&search_montant_localtax2='.urlencode($search_montant_localtax2);
|
||||||
if ($search_montant_ttc != '') $param.='&search_montant_ttc='.urlencode($search_montant_ttc);
|
if ($search_montant_ttc != '') $param.='&search_montant_ttc='.urlencode($search_montant_ttc);
|
||||||
if ($search_status != '') $param.='&search_status='.urlencode($search_status);
|
if ($search_status != '') $param.='&search_status='.urlencode($search_status);
|
||||||
if ($search_paymentmode > 0) $param.='search_paymentmode='.urlencode($search_paymentmode);
|
if ($search_paymentmode > 0) $param.='&search_paymentmode='.urlencode($search_paymentmode);
|
||||||
if ($show_files) $param.='&show_files=' .$show_files;
|
if ($show_files) $param.='&show_files=' .$show_files;
|
||||||
if ($option) $param.="&option=".$option;
|
if ($option) $param.="&option=".$option;
|
||||||
if ($optioncss != '') $param.='&optioncss='.$optioncss;
|
if ($optioncss != '') $param.='&optioncss='.$optioncss;
|
||||||
|
|||||||
@ -46,14 +46,14 @@ $confirm=GETPOST('confirm', 'alpha');
|
|||||||
// Security check
|
// Security check
|
||||||
$fieldname = (! empty($ref)?'ref':'rowid');
|
$fieldname = (! empty($ref)?'ref':'rowid');
|
||||||
if ($user->societe_id) $socid=$user->societe_id;
|
if ($user->societe_id) $socid=$user->societe_id;
|
||||||
$result = restrictedArea($user, 'cheque', $id, 'bordereau_cheque','','',$fieldname);
|
$result = restrictedArea($user, 'cheque', $id, 'bordereau_cheque','','fk_user_author',$fieldname);
|
||||||
|
|
||||||
$sortfield=GETPOST('sortfield', 'alpha');
|
$sortfield=GETPOST('sortfield', 'alpha');
|
||||||
$sortorder=GETPOST('sortorder', 'alpha');
|
$sortorder=GETPOST('sortorder', 'alpha');
|
||||||
$page=GETPOST('page', 'int');
|
$page=GETPOST('page', 'int');
|
||||||
if (! $sortorder) $sortorder="ASC";
|
if (! $sortorder) $sortorder="ASC";
|
||||||
if (! $sortfield) $sortfield="b.dateo,b.rowid";
|
if (! $sortfield) $sortfield="b.dateo,b.rowid";
|
||||||
if ($page < 0) { $page = 0 ; }
|
if (empty($page) || $page == -1) { $page = 0; }
|
||||||
$limit = GETPOST('limit')?GETPOST('limit','int'):$conf->liste_limit;
|
$limit = GETPOST('limit')?GETPOST('limit','int'):$conf->liste_limit;
|
||||||
$offset = $limit * $page ;
|
$offset = $limit * $page ;
|
||||||
|
|
||||||
@ -492,10 +492,12 @@ if ($action == 'new')
|
|||||||
{
|
{
|
||||||
foreach ($lines[$bid] as $lid => $value)
|
foreach ($lines[$bid] as $lid => $value)
|
||||||
{
|
{
|
||||||
$account_id = $bid;
|
//$account_id = $bid; FIXME not used
|
||||||
if (! isset($accounts[$bid]))
|
|
||||||
|
// FIXME $accounts[$bid] is a label !
|
||||||
|
/*if (! isset($accounts[$bid]))
|
||||||
$accounts[$bid]=0;
|
$accounts[$bid]=0;
|
||||||
$accounts[$bid] += 1;
|
$accounts[$bid] += 1;*/
|
||||||
|
|
||||||
print '<tr class="oddeven">';
|
print '<tr class="oddeven">';
|
||||||
print '<td>'.dol_print_date($value["date"],'day').'</td>';
|
print '<td>'.dol_print_date($value["date"],'day').'</td>';
|
||||||
@ -688,10 +690,12 @@ else
|
|||||||
{
|
{
|
||||||
while ($objp = $db->fetch_object($resql))
|
while ($objp = $db->fetch_object($resql))
|
||||||
{
|
{
|
||||||
$account_id = $objp->bid;
|
//$account_id = $objp->bid; FIXME not used
|
||||||
if (! isset($accounts[$objp->bid]))
|
|
||||||
|
// FIXME $accounts[$objp->bid] is a label
|
||||||
|
/*if (! isset($accounts[$objp->bid]))
|
||||||
$accounts[$objp->bid]=0;
|
$accounts[$objp->bid]=0;
|
||||||
$accounts[$objp->bid] += 1;
|
$accounts[$objp->bid] += 1;*/
|
||||||
|
|
||||||
print '<tr class="oddeven">';
|
print '<tr class="oddeven">';
|
||||||
print '<td align="center">'.$i.'</td>';
|
print '<td align="center">'.$i.'</td>';
|
||||||
|
|||||||
@ -413,6 +413,7 @@ if (($action == 'send' || $action == 'relance') && ! $_POST['addfile'] && ! $_PO
|
|||||||
$object->trackid = $trackid;
|
$object->trackid = $trackid;
|
||||||
$object->fk_element = $object->id;
|
$object->fk_element = $object->id;
|
||||||
$object->elementtype = $object->element;
|
$object->elementtype = $object->element;
|
||||||
|
$object->attachedfiles = $attachedfiles;
|
||||||
|
|
||||||
// Call of triggers
|
// Call of triggers
|
||||||
if (! empty($trigger_name))
|
if (! empty($trigger_name))
|
||||||
|
|||||||
@ -6,7 +6,7 @@
|
|||||||
* Copyright (C) 2013 Cédric Salvador <csalvador@gpcsolutions.fr>
|
* Copyright (C) 2013 Cédric Salvador <csalvador@gpcsolutions.fr>
|
||||||
* Copyright (C) 2014 Marcos García <marcosgdf@gmail.com>
|
* Copyright (C) 2014 Marcos García <marcosgdf@gmail.com>
|
||||||
* Copyright (C) 2015 Bahfir Abbes <bafbes@gmail.com>
|
* Copyright (C) 2015 Bahfir Abbes <bafbes@gmail.com>
|
||||||
* Copyright (C) 2016 Ferran Marcet <fmarcet@2byte.es>
|
* Copyright (C) 2016-2017 Ferran Marcet <fmarcet@2byte.es>
|
||||||
|
|
||||||
* This program is free software; you can redistribute it and/or modify
|
* This program is free software; you can redistribute it and/or modify
|
||||||
* it under the terms of the GNU General Public License as published by
|
* it under the terms of the GNU General Public License as published by
|
||||||
@ -938,9 +938,9 @@ class FormFile
|
|||||||
if ($object->element == 'project_task') $relativepath='Call_not_supported_._Call_function_using_a_defined_relative_path_.';
|
if ($object->element == 'project_task') $relativepath='Call_not_supported_._Call_function_using_a_defined_relative_path_.';
|
||||||
}
|
}
|
||||||
// For backward compatiblity, we detect file is stored into an old path
|
// For backward compatiblity, we detect file is stored into an old path
|
||||||
if (! empty($conf->global->PRODUCT_USE_OLD_PATH_FOR_PHOTO) && $file['level1name'] == 'photos')
|
if (! empty($conf->global->PRODUCT_USE_OLD_PATH_FOR_PHOTO) && $filearray[0]['level1name'] == 'photos')
|
||||||
{
|
{
|
||||||
$relativepath=preg_replace('/^.*\/produit\//','',$file['path']).'/';
|
$relativepath=preg_replace('/^.*\/produit\//','',$filearray[0]['path']).'/';
|
||||||
}
|
}
|
||||||
// Defined relative dir to DOL_DATA_ROOT
|
// Defined relative dir to DOL_DATA_ROOT
|
||||||
$relativedir = '';
|
$relativedir = '';
|
||||||
|
|||||||
@ -1359,10 +1359,10 @@ function show_actions_done($conf, $langs, $db, $filterobj, $objcon='', $noprint=
|
|||||||
else $out.='-'.dol_print_date($histo[$key]['dateend'],'dayhour');
|
else $out.='-'.dol_print_date($histo[$key]['dateend'],'dayhour');
|
||||||
}
|
}
|
||||||
$late=0;
|
$late=0;
|
||||||
if ($histo[$key]['percent'] == 0 && $histo[$key]['datestart'] && $db->jdate($histo[$key]['datestart']) < ($now - $delay_warning)) $late=1;
|
if ($histo[$key]['percent'] == 0 && $histo[$key]['datestart'] && $histo[$key]['datestart'] < ($now - $delay_warning)) $late=1;
|
||||||
if ($histo[$key]['percent'] == 0 && ! $histo[$key]['datestart'] && $histo[$key]['dateend'] && $db->jdate($histo[$key]['datestart']) < ($now - $delay_warning)) $late=1;
|
if ($histo[$key]['percent'] == 0 && ! $histo[$key]['datestart'] && $histo[$key]['dateend'] && $histo[$key]['datestart'] < ($now - $delay_warning)) $late=1;
|
||||||
if ($histo[$key]['percent'] > 0 && $histo[$key]['percent'] < 100 && $histo[$key]['dateend'] && $db->jdate($histo[$key]['dateend']) < ($now - $delay_warning)) $late=1;
|
if ($histo[$key]['percent'] > 0 && $histo[$key]['percent'] < 100 && $histo[$key]['dateend'] && $histo[$key]['dateend'] < ($now - $delay_warning)) $late=1;
|
||||||
if ($histo[$key]['percent'] > 0 && $histo[$key]['percent'] < 100 && ! $histo[$key]['dateend'] && $histo[$key]['datestart'] && $db->jdate($histo[$key]['datestart']) < ($now - $delay_warning)) $late=1;
|
if ($histo[$key]['percent'] > 0 && $histo[$key]['percent'] < 100 && ! $histo[$key]['dateend'] && $histo[$key]['datestart'] && $histo[$key]['datestart'] < ($now - $delay_warning)) $late=1;
|
||||||
if ($late) $out.=img_warning($langs->trans("Late")).' ';
|
if ($late) $out.=img_warning($langs->trans("Late")).' ';
|
||||||
$out.="</td>\n";
|
$out.="</td>\n";
|
||||||
|
|
||||||
|
|||||||
@ -46,7 +46,7 @@ function dol_basename($pathfile)
|
|||||||
* @param int $recursive Determines whether subdirectories are searched
|
* @param int $recursive Determines whether subdirectories are searched
|
||||||
* @param string $filter Regex filter to restrict list. This regex value must be escaped for '/' by doing preg_quote($var,'/'), since this char is used for preg_match function,
|
* @param string $filter Regex filter to restrict list. This regex value must be escaped for '/' by doing preg_quote($var,'/'), since this char is used for preg_match function,
|
||||||
* but must not contains the start and end '/'. Filter is checked into basename only.
|
* but must not contains the start and end '/'. Filter is checked into basename only.
|
||||||
* @param array $excludefilter Array of Regex for exclude filter (example: array('(\.meta|_preview.*\.png)$','^\.')). Exclude is checked into fullpath.
|
* @param array $excludefilter Array of Regex for exclude filter (example: array('(\.meta|_preview.*\.png)$','^\.')). Exclude is checked both into fullpath and into basename (So '^xxx' may exclude 'xxx/dirscanned/...' and dirscanned/xxx').
|
||||||
* @param string $sortcriteria Sort criteria ("","fullname","relativename","name","date","size")
|
* @param string $sortcriteria Sort criteria ("","fullname","relativename","name","date","size")
|
||||||
* @param string $sortorder Sort order (SORT_ASC, SORT_DESC)
|
* @param string $sortorder Sort order (SORT_ASC, SORT_DESC)
|
||||||
* @param int $mode 0=Return array minimum keys loaded (faster), 1=Force all keys like date and size to be loaded (slower), 2=Force load of date only, 3=Force load of size only
|
* @param int $mode 0=Return array minimum keys loaded (faster), 1=Force all keys like date and size to be loaded (slower), 2=Force load of date only, 3=Force load of size only
|
||||||
@ -107,6 +107,7 @@ function dol_dir_list($path, $types="all", $recursive=0, $filter="", $excludefil
|
|||||||
while (false !== ($file = readdir($dir))) // $file is always a basename (into directory $newpath)
|
while (false !== ($file = readdir($dir))) // $file is always a basename (into directory $newpath)
|
||||||
{
|
{
|
||||||
if (! utf8_check($file)) $file=utf8_encode($file); // To be sure data is stored in utf8 in memory
|
if (! utf8_check($file)) $file=utf8_encode($file); // To be sure data is stored in utf8 in memory
|
||||||
|
$fullpathfile=($newpath?$newpath.'/':'').$file;
|
||||||
|
|
||||||
$qualified=1;
|
$qualified=1;
|
||||||
|
|
||||||
@ -120,10 +121,11 @@ function dol_dir_list($path, $types="all", $recursive=0, $filter="", $excludefil
|
|||||||
// Check if file is qualified
|
// Check if file is qualified
|
||||||
foreach($excludefilterarray as $filt)
|
foreach($excludefilterarray as $filt)
|
||||||
{
|
{
|
||||||
if (preg_match('/'.$filt.'/i',$file)) {
|
if (preg_match('/'.$filt.'/i', $file) || preg_match('/'.$filt.'/i', $fullpathfile)) {
|
||||||
$qualified=0; break;
|
$qualified=0; break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
//print $fullpathfile.' '.$file.' '.$qualified.'<br>';
|
||||||
|
|
||||||
if ($qualified)
|
if ($qualified)
|
||||||
{
|
{
|
||||||
|
|||||||
@ -238,6 +238,17 @@ function dol_shutdown()
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Return true if we are in a context of submitting a parameter
|
||||||
|
*
|
||||||
|
* @param string $paramname Name or parameter to test
|
||||||
|
* @return boolean True if we have just submit a POST or GET request with the parameter provided (even if param is empty)
|
||||||
|
*/
|
||||||
|
function GETPOSTISSET($paramname)
|
||||||
|
{
|
||||||
|
return (isset($_POST[$paramname]) || isset($_GET[$paramname]));
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Return value of a param into GET or POST supervariable.
|
* Return value of a param into GET or POST supervariable.
|
||||||
* Use the property $user->default_values[path]['creatform'] and/or $user->default_values[path]['filters'] and/or $user->default_values[path]['sortorder']
|
* Use the property $user->default_values[path]['creatform'] and/or $user->default_values[path]['filters'] and/or $user->default_values[path]['sortorder']
|
||||||
|
|||||||
@ -306,6 +306,9 @@ function restrictedArea($user, $features, $objectid=0, $tableandshare='', $featu
|
|||||||
else if ($feature == 'ftp')
|
else if ($feature == 'ftp')
|
||||||
{
|
{
|
||||||
if (! $user->rights->ftp->write) $deleteok=0;
|
if (! $user->rights->ftp->write) $deleteok=0;
|
||||||
|
}else if ($feature == 'salaries')
|
||||||
|
{
|
||||||
|
if (! $user->rights->salaries->delete) $deleteok=0;
|
||||||
}
|
}
|
||||||
else if (! empty($feature2)) // This should be used for future changes
|
else if (! empty($feature2)) // This should be used for future changes
|
||||||
{
|
{
|
||||||
|
|||||||
@ -65,7 +65,7 @@ class mailing_fraise extends MailingTargets
|
|||||||
*/
|
*/
|
||||||
function getSqlArrayForStats()
|
function getSqlArrayForStats()
|
||||||
{
|
{
|
||||||
global $langs;
|
global $conf, $langs;
|
||||||
|
|
||||||
$langs->load("members");
|
$langs->load("members");
|
||||||
|
|
||||||
@ -73,7 +73,7 @@ class mailing_fraise extends MailingTargets
|
|||||||
$statssql=array();
|
$statssql=array();
|
||||||
|
|
||||||
$statssql[0] ="SELECT '".$this->db->escape($langs->trans("FundationMembers"))."' as label, count(*) as nb";
|
$statssql[0] ="SELECT '".$this->db->escape($langs->trans("FundationMembers"))."' as label, count(*) as nb";
|
||||||
$statssql[0].=" FROM ".MAIN_DB_PREFIX."adherent where statut = 1";
|
$statssql[0].=" FROM ".MAIN_DB_PREFIX."adherent where statut = 1 and entity IN (".getEntity('member').")";
|
||||||
|
|
||||||
return $statssql;
|
return $statssql;
|
||||||
}
|
}
|
||||||
@ -89,9 +89,11 @@ class mailing_fraise extends MailingTargets
|
|||||||
*/
|
*/
|
||||||
function getNbOfRecipients($sql='')
|
function getNbOfRecipients($sql='')
|
||||||
{
|
{
|
||||||
|
global $conf;
|
||||||
|
|
||||||
$sql = "SELECT count(distinct(a.email)) as nb";
|
$sql = "SELECT count(distinct(a.email)) as nb";
|
||||||
$sql .= " FROM ".MAIN_DB_PREFIX."adherent as a";
|
$sql .= " FROM ".MAIN_DB_PREFIX."adherent as a";
|
||||||
$sql .= " WHERE (a.email IS NOT NULL AND a.email != '')";
|
$sql .= " WHERE (a.email IS NOT NULL AND a.email != '') AND a.entity IN (".getEntity('member').")";
|
||||||
|
|
||||||
// La requete doit retourner un champ "nb" pour etre comprise
|
// La requete doit retourner un champ "nb" pour etre comprise
|
||||||
// par parent::getNbOfRecipients
|
// par parent::getNbOfRecipients
|
||||||
@ -201,7 +203,7 @@ class mailing_fraise extends MailingTargets
|
|||||||
$sql.= " a.lastname, a.firstname,";
|
$sql.= " a.lastname, a.firstname,";
|
||||||
$sql.= " a.datefin, a.civility as civility_id, a.login, a.societe"; // Other fields
|
$sql.= " a.datefin, a.civility as civility_id, a.login, a.societe"; // Other fields
|
||||||
$sql.= " FROM ".MAIN_DB_PREFIX."adherent as a, ".MAIN_DB_PREFIX."adherent_type as ta";
|
$sql.= " FROM ".MAIN_DB_PREFIX."adherent as a, ".MAIN_DB_PREFIX."adherent_type as ta";
|
||||||
$sql.= " WHERE a.email <> ''"; // Note that null != '' is false
|
$sql.= " WHERE a.entity IN (".getEntity('member').") AND a.email <> ''"; // Note that null != '' is false
|
||||||
$sql.= " AND a.email NOT IN (SELECT email FROM ".MAIN_DB_PREFIX."mailing_cibles WHERE fk_mailing=".$mailing_id.")";
|
$sql.= " AND a.email NOT IN (SELECT email FROM ".MAIN_DB_PREFIX."mailing_cibles WHERE fk_mailing=".$mailing_id.")";
|
||||||
if (isset($_POST["filter"]) && $_POST["filter"] == '-1') $sql.= " AND a.statut=-1";
|
if (isset($_POST["filter"]) && $_POST["filter"] == '-1') $sql.= " AND a.statut=-1";
|
||||||
if (isset($_POST["filter"]) && $_POST["filter"] == '1a') $sql.= " AND a.statut=1 AND a.datefin >= '".$this->db->idate($now)."'";
|
if (isset($_POST["filter"]) && $_POST["filter"] == '1a') $sql.= " AND a.statut=1 AND a.datefin >= '".$this->db->idate($now)."'";
|
||||||
|
|||||||
@ -54,7 +54,7 @@ $nb=array();
|
|||||||
$somme=array();
|
$somme=array();
|
||||||
|
|
||||||
$sql = "SELECT count(d.rowid) as nb, sum(d.amount) as somme , d.fk_statut";
|
$sql = "SELECT count(d.rowid) as nb, sum(d.amount) as somme , d.fk_statut";
|
||||||
$sql.= " FROM ".MAIN_DB_PREFIX."don as d";
|
$sql.= " FROM ".MAIN_DB_PREFIX."don as d WHERE d.entity IN (".getEntity('donation').")";
|
||||||
$sql.= " GROUP BY d.fk_statut";
|
$sql.= " GROUP BY d.fk_statut";
|
||||||
$sql.= " ORDER BY d.fk_statut";
|
$sql.= " ORDER BY d.fk_statut";
|
||||||
|
|
||||||
|
|||||||
@ -30,9 +30,7 @@ require_once DOL_DOCUMENT_ROOT.'/core/class/html.formcompany.class.php';
|
|||||||
require_once DOL_DOCUMENT_ROOT.'/core/lib/date.lib.php';
|
require_once DOL_DOCUMENT_ROOT.'/core/lib/date.lib.php';
|
||||||
require_once DOL_DOCUMENT_ROOT.'/core/lib/company.lib.php';
|
require_once DOL_DOCUMENT_ROOT.'/core/lib/company.lib.php';
|
||||||
|
|
||||||
$langs->load("sendings");
|
$langs->loadLangs(array("sendings","deliveries",'companies','bills'));
|
||||||
$langs->load("deliveries");
|
|
||||||
$langs->load('companies');
|
|
||||||
|
|
||||||
$socid=GETPOST('socid','int');
|
$socid=GETPOST('socid','int');
|
||||||
// Security check
|
// Security check
|
||||||
|
|||||||
@ -31,7 +31,7 @@
|
|||||||
*/
|
*/
|
||||||
|
|
||||||
if (! defined('DOL_APPLICATION_TITLE')) define('DOL_APPLICATION_TITLE','Dolibarr');
|
if (! defined('DOL_APPLICATION_TITLE')) define('DOL_APPLICATION_TITLE','Dolibarr');
|
||||||
if (! defined('DOL_VERSION')) define('DOL_VERSION','6.0.4'); // a.b.c-alpha, a.b.c-beta, a.b.c-rcX or a.b.c
|
if (! defined('DOL_VERSION')) define('DOL_VERSION','6.0.5'); // a.b.c-alpha, a.b.c-beta, a.b.c-rcX or a.b.c
|
||||||
|
|
||||||
if (! defined('EURO')) define('EURO',chr(128));
|
if (! defined('EURO')) define('EURO',chr(128));
|
||||||
|
|
||||||
|
|||||||
@ -989,7 +989,7 @@ class Holiday extends CommonObject
|
|||||||
while ($i < $nbUser)
|
while ($i < $nbUser)
|
||||||
{
|
{
|
||||||
$now_holiday = $this->getCPforUser($users[$i]['rowid'], $val['rowid']);
|
$now_holiday = $this->getCPforUser($users[$i]['rowid'], $val['rowid']);
|
||||||
$new_solde = $now_holiday + $this->getConfCP('nbHolidayEveryMonth');
|
$new_solde = $now_holiday + $nb_holiday;
|
||||||
|
|
||||||
// We add a log for each user
|
// We add a log for each user
|
||||||
$this->addLogCP($user->id, $users[$i]['rowid'], $langs->trans('HolidaysMonthlyUpdate'), $new_solde, $val['rowid']);
|
$this->addLogCP($user->id, $users[$i]['rowid'], $langs->trans('HolidaysMonthlyUpdate'), $new_solde, $val['rowid']);
|
||||||
@ -1309,15 +1309,15 @@ class Holiday extends CommonObject
|
|||||||
// List for Dolibarr users
|
// List for Dolibarr users
|
||||||
if ($type)
|
if ($type)
|
||||||
{
|
{
|
||||||
$sql = "SELECT u.rowid, u.lastname, u.firstname, u.gender, u.photo, u.employee, u.statut";
|
$sql = "SELECT DISTINCT u.rowid, u.lastname, u.firstname, u.gender, u.photo, u.employee, u.statut";
|
||||||
$sql.= " FROM ".MAIN_DB_PREFIX."user as u";
|
$sql.= " FROM ".MAIN_DB_PREFIX."user as u";
|
||||||
|
|
||||||
if (! empty($conf->multicompany->enabled) && ! empty($conf->global->MULTICOMPANY_TRANSVERSE_MODE))
|
if (! empty($conf->multicompany->enabled) && ! empty($conf->global->MULTICOMPANY_TRANSVERSE_MODE))
|
||||||
{
|
{
|
||||||
$sql.= ", ".MAIN_DB_PREFIX."usergroup_user as ug";
|
$sql.= ", ".MAIN_DB_PREFIX."usergroup_user as ug";
|
||||||
$sql.= " WHERE (ug.fk_user = u.rowid";
|
$sql.= " WHERE ((ug.fk_user = u.rowid";
|
||||||
$sql.= " AND ug.entity = ".$conf->entity.")";
|
$sql.= " AND ug.entity = ".$conf->entity.")";
|
||||||
$sql.= " OR u.admin = 1";
|
$sql.= " OR u.admin = 1)";
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
$sql.= " WHERE u.entity IN (0,".$conf->entity.")";
|
$sql.= " WHERE u.entity IN (0,".$conf->entity.")";
|
||||||
|
|||||||
@ -141,7 +141,11 @@ class Parsedown
|
|||||||
|
|
||||||
foreach ($parts as $part)
|
foreach ($parts as $part)
|
||||||
{
|
{
|
||||||
$shortage = 4 - mb_strlen($line, 'utf-8') % 4;
|
// @CHANGE LDR Fix when mb_strlen is not available
|
||||||
|
//$shortage = 4 - mb_strlen($line, 'utf-8') % 4;
|
||||||
|
if (function_exists('mb_strlen')) $len = mb_strlen($line, 'utf-8');
|
||||||
|
else $len = strlen($line);
|
||||||
|
$shortage = 4 - $len % 4;
|
||||||
|
|
||||||
$line .= str_repeat(' ', $shortage);
|
$line .= str_repeat(' ', $shortage);
|
||||||
$line .= $part;
|
$line .= $part;
|
||||||
|
|||||||
@ -367,7 +367,7 @@ $showweather=empty($conf->global->MAIN_DISABLE_METEO)?1:0;
|
|||||||
$dashboardlines=array();
|
$dashboardlines=array();
|
||||||
|
|
||||||
// Do not include sections without management permission
|
// Do not include sections without management permission
|
||||||
require DOL_DOCUMENT_ROOT.'/core/class/workboardresponse.class.php';
|
require_once DOL_DOCUMENT_ROOT.'/core/class/workboardresponse.class.php';
|
||||||
|
|
||||||
// Number of actions to do (late)
|
// Number of actions to do (late)
|
||||||
if (! empty($conf->agenda->enabled) && $user->rights->agenda->myactions->read)
|
if (! empty($conf->agenda->enabled) && $user->rights->agenda->myactions->read)
|
||||||
@ -548,7 +548,7 @@ if (! empty($valid_dashboardlines))
|
|||||||
$boxwork.='<tr class="nohover"><td class="tdboxstats nohover flexcontainer centpercent">';
|
$boxwork.='<tr class="nohover"><td class="tdboxstats nohover flexcontainer centpercent">';
|
||||||
foreach($valid_dashboardlines as $board)
|
foreach($valid_dashboardlines as $board)
|
||||||
{
|
{
|
||||||
if (empty($boad->nbtodo)) $nbworkboardempty++;
|
if (empty($board->nbtodo)) $nbworkboardempty++;
|
||||||
|
|
||||||
$textlate = $langs->trans("NActionsLate",$board->nbtodolate);
|
$textlate = $langs->trans("NActionsLate",$board->nbtodolate);
|
||||||
$textlate.= ' ('.$langs->trans("Late").' = '.$langs->trans("DateReference").' > '.$langs->trans("DateToday").' '.(ceil($board->warning_delay) >= 0 ? '+' : '').ceil($board->warning_delay).' '.$langs->trans("days").')';
|
$textlate.= ' ('.$langs->trans("Late").' = '.$langs->trans("DateReference").' > '.$langs->trans("DateToday").' '.(ceil($board->warning_delay) >= 0 ? '+' : '').ceil($board->warning_delay).' '.$langs->trans("days").')';
|
||||||
|
|||||||
@ -344,13 +344,13 @@ if ($action == 'create')
|
|||||||
print '</td></tr>';
|
print '</td></tr>';
|
||||||
|
|
||||||
// Accountancy_account_insurance
|
// Accountancy_account_insurance
|
||||||
print '<tr><td>'.$langs->trans("LoanAccountancyInsuranceCode").'</td>';
|
print '<tr><td class="fieldrequired">'.$langs->trans("LoanAccountancyInsuranceCode").'</td>';
|
||||||
print '<td>';
|
print '<td>';
|
||||||
print $formaccounting->select_account($object->accountancy_account_insurance, 'accountancy_account_insurance', 1, '', 0, 1);
|
print $formaccounting->select_account($object->accountancy_account_insurance, 'accountancy_account_insurance', 1, '', 0, 1);
|
||||||
print '</td></tr>';
|
print '</td></tr>';
|
||||||
|
|
||||||
// Accountancy_account_interest
|
// Accountancy_account_interest
|
||||||
print '<tr><td>'.$langs->trans("LoanAccountancyInterestCode").'</td>';
|
print '<tr><td class="fieldrequired">'.$langs->trans("LoanAccountancyInterestCode").'</td>';
|
||||||
print '<td>';
|
print '<td>';
|
||||||
print $formaccounting->select_account($object->accountancy_account_interest, 'accountancy_account_interest', 1, '', 0, 1);
|
print $formaccounting->select_account($object->accountancy_account_interest, 'accountancy_account_interest', 1, '', 0, 1);
|
||||||
print '</td></tr>';
|
print '</td></tr>';
|
||||||
@ -556,7 +556,7 @@ if ($id > 0)
|
|||||||
{
|
{
|
||||||
if (! empty($conf->accounting->enabled))
|
if (! empty($conf->accounting->enabled))
|
||||||
{
|
{
|
||||||
print $formaccounting->select_account($object->account_capital, 'accountancy_account_capital', 1, '', 0, 1);
|
print $formaccounting->select_account($object->account_capital, 'accountancy_account_capital', 1, '', 1, 1);
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
@ -581,7 +581,7 @@ if ($id > 0)
|
|||||||
{
|
{
|
||||||
if (! empty($conf->accounting->enabled))
|
if (! empty($conf->accounting->enabled))
|
||||||
{
|
{
|
||||||
print $formaccounting->select_account($object->account_insurance, 'accountancy_account_insurance', 1, '', 0, 1);
|
print $formaccounting->select_account($object->account_insurance, 'accountancy_account_insurance', 1, '', 1, 1);
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
@ -606,7 +606,7 @@ if ($id > 0)
|
|||||||
{
|
{
|
||||||
if (! empty($conf->accounting->enabled))
|
if (! empty($conf->accounting->enabled))
|
||||||
{
|
{
|
||||||
print $formaccounting->select_account($object->account_interest, 'accountancy_account_interest', 1, '', 0, 1);
|
print $formaccounting->select_account($object->account_interest, 'accountancy_account_interest', 1, '', 1, 1);
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
|
|||||||
@ -153,9 +153,19 @@ class Loan extends CommonObject
|
|||||||
$this->error="ErrorBadParameter";
|
$this->error="ErrorBadParameter";
|
||||||
return -2;
|
return -2;
|
||||||
}
|
}
|
||||||
if (($conf->accounting->enabled) && empty($this->account_capital) && empty($this->account_insurance) && empty($this->account_interest))
|
if (($conf->accounting->enabled) && empty($this->account_capital))
|
||||||
{
|
{
|
||||||
$this->error=$langs->trans("ErrorFieldRequired", $langs->transnoentitiesnoconv("Accounting"));
|
$this->error=$langs->trans("ErrorFieldRequired", $langs->transnoentitiesnoconv("LoanAccountancyCapitalCode"));
|
||||||
|
return -2;
|
||||||
|
}
|
||||||
|
if (($conf->accounting->enabled) && empty($this->account_insurance))
|
||||||
|
{
|
||||||
|
$this->error=$langs->trans("ErrorFieldRequired", $langs->transnoentitiesnoconv("LoanAccountancyInsuranceCode"));
|
||||||
|
return -2;
|
||||||
|
}
|
||||||
|
if (($conf->accounting->enabled) && empty($this->account_interest))
|
||||||
|
{
|
||||||
|
$this->error=$langs->trans("ErrorFieldRequired", $langs->transnoentitiesnoconv("LoanAccountancyInterestCode"));
|
||||||
return -2;
|
return -2;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@ -1538,6 +1538,7 @@ class Product extends CommonObject
|
|||||||
$this->fourn_pu = $obj->price / $obj->quantity; // Unit price of product of supplier
|
$this->fourn_pu = $obj->price / $obj->quantity; // Unit price of product of supplier
|
||||||
$this->fourn_price_base_type = 'HT'; // Price base type
|
$this->fourn_price_base_type = 'HT'; // Price base type
|
||||||
$this->ref_fourn = $obj->ref_fourn; // deprecated
|
$this->ref_fourn = $obj->ref_fourn; // deprecated
|
||||||
|
$this->product_fourn_price_id = $obj->rowid; // supplier price id
|
||||||
$this->ref_supplier = $obj->ref_fourn; // Ref supplier
|
$this->ref_supplier = $obj->ref_fourn; // Ref supplier
|
||||||
$this->remise_percent = $obj->remise_percent; // remise percent if present and not typed
|
$this->remise_percent = $obj->remise_percent; // remise percent if present and not typed
|
||||||
$this->vatrate_supplier = $obj->tva_tx; // Vat ref supplier
|
$this->vatrate_supplier = $obj->tva_tx; // Vat ref supplier
|
||||||
@ -1586,6 +1587,7 @@ class Product extends CommonObject
|
|||||||
$this->fourn_qty = $obj->quantity; // min quantity for price for a virtual supplier
|
$this->fourn_qty = $obj->quantity; // min quantity for price for a virtual supplier
|
||||||
$this->fourn_pu = $obj->price / $obj->quantity; // Unit price of product for a virtual supplier
|
$this->fourn_pu = $obj->price / $obj->quantity; // Unit price of product for a virtual supplier
|
||||||
$this->fourn_price_base_type = 'HT'; // Price base type for a virtual supplier
|
$this->fourn_price_base_type = 'HT'; // Price base type for a virtual supplier
|
||||||
|
$this->product_fourn_price_id = $obj->rowid; // supplier price id
|
||||||
$this->ref_fourn = $obj->ref_supplier; // deprecated
|
$this->ref_fourn = $obj->ref_supplier; // deprecated
|
||||||
$this->ref_supplier = $obj->ref_supplier; // Ref supplier
|
$this->ref_supplier = $obj->ref_supplier; // Ref supplier
|
||||||
$this->remise_percent = $obj->remise_percent; // remise percent if present and not typed
|
$this->remise_percent = $obj->remise_percent; // remise percent if present and not typed
|
||||||
@ -4001,8 +4003,8 @@ class Product extends CommonObject
|
|||||||
|
|
||||||
if (! empty($conf->global->PRODUCT_USE_OLD_PATH_FOR_PHOTO))
|
if (! empty($conf->global->PRODUCT_USE_OLD_PATH_FOR_PHOTO))
|
||||||
{
|
{
|
||||||
$dirold .= get_exdir($this->id,2,0,0,$this,'product') . $this->id ."/photos/";
|
$dir = $sdir . '/'. get_exdir($this->id,2,0,0,$this,'product') . $this->id ."/photos/";
|
||||||
$pdirold .= get_exdir($this->id,2,0,0,$this,'product') . $this->id ."/photos/";
|
$pdir = '/' . get_exdir($this->id,2,0,0,$this,'product') . $this->id ."/photos/";
|
||||||
}
|
}
|
||||||
|
|
||||||
// Defined relative dir to DOL_DATA_ROOT
|
// Defined relative dir to DOL_DATA_ROOT
|
||||||
@ -4022,11 +4024,11 @@ class Product extends CommonObject
|
|||||||
|
|
||||||
$filearray=dol_dir_list($dir,"files",0,'','(\.meta|_preview.*\.png)$',$sortfield,(strtolower($sortorder)=='desc'?SORT_DESC:SORT_ASC),1);
|
$filearray=dol_dir_list($dir,"files",0,'','(\.meta|_preview.*\.png)$',$sortfield,(strtolower($sortorder)=='desc'?SORT_DESC:SORT_ASC),1);
|
||||||
|
|
||||||
if (! empty($conf->global->PRODUCT_USE_OLD_PATH_FOR_PHOTO)) // For backward compatiblity, we scan also old dirs
|
/*if (! empty($conf->global->PRODUCT_USE_OLD_PATH_FOR_PHOTO)) // For backward compatiblity, we scan also old dirs
|
||||||
{
|
{
|
||||||
$filearrayold=dol_dir_list($dirold,"files",0,'','(\.meta|_preview.*\.png)$',$sortfield,(strtolower($sortorder)=='desc'?SORT_DESC:SORT_ASC),1);
|
$filearrayold=dol_dir_list($dirold,"files",0,'','(\.meta|_preview.*\.png)$',$sortfield,(strtolower($sortorder)=='desc'?SORT_DESC:SORT_ASC),1);
|
||||||
$filearray=array_merge($filearray, $filearrayold);
|
$filearray=array_merge($filearray, $filearrayold);
|
||||||
}
|
}*/
|
||||||
|
|
||||||
$filearrayindatabase = dol_dir_list_in_database($relativedir, '', null, 'name', SORT_ASC);
|
$filearrayindatabase = dol_dir_list_in_database($relativedir, '', null, 'name', SORT_ASC);
|
||||||
|
|
||||||
|
|||||||
@ -6,6 +6,7 @@
|
|||||||
* Copyright (C) 2005 Simon TOSSER <simon@kornog-computing.com>
|
* Copyright (C) 2005 Simon TOSSER <simon@kornog-computing.com>
|
||||||
* Copyright (C) 2013 Florian Henry <florian.henry@open-concept.pro>
|
* Copyright (C) 2013 Florian Henry <florian.henry@open-concept.pro>
|
||||||
* Copyright (C) 2013 Cédric Salvador <csalvador@gpcsolutions.fr>
|
* Copyright (C) 2013 Cédric Salvador <csalvador@gpcsolutions.fr>
|
||||||
|
* Copyright (C) 2017 Ferran Marcet <fmarcet@2byte.es>
|
||||||
*
|
*
|
||||||
* This program is free software; you can redistribute it and/or modify
|
* This program is free software; you can redistribute it and/or modify
|
||||||
* it under the terms of the GNU General Public License as published by
|
* it under the terms of the GNU General Public License as published by
|
||||||
|
|||||||
@ -1052,7 +1052,7 @@ while ($i < min($num, $limit))
|
|||||||
if (! empty($arrayfields['typent.code']['checked']))
|
if (! empty($arrayfields['typent.code']['checked']))
|
||||||
{
|
{
|
||||||
print '<td align="center">';
|
print '<td align="center">';
|
||||||
if (count($typenArray)==0) $typenArray = $formcompany->typent_array(1);
|
if (! is_array($typenArray) || count($typenArray)==0) $typenArray = $formcompany->typent_array(1);
|
||||||
print $typenArray[$obj->typent_code];
|
print $typenArray[$obj->typent_code];
|
||||||
print '</td>';
|
print '</td>';
|
||||||
if (! $i) $totalarray['nbfield']++;
|
if (! $i) $totalarray['nbfield']++;
|
||||||
|
|||||||
@ -9,7 +9,7 @@
|
|||||||
* Copyright (C) 2012 Juanjo Menent <jmenent@2byte.es>
|
* Copyright (C) 2012 Juanjo Menent <jmenent@2byte.es>
|
||||||
* Copyright (C) 2013 Florian Henry <florian.henry@open-concept.pro>
|
* Copyright (C) 2013 Florian Henry <florian.henry@open-concept.pro>
|
||||||
* Copyright (C) 2013-2016 Alexandre Spangaro <aspangaro.dolibarr@gmail.com>
|
* Copyright (C) 2013-2016 Alexandre Spangaro <aspangaro.dolibarr@gmail.com>
|
||||||
* Copyright (C) 2015 Jean-François Ferry <jfefe@aternatik.fr>
|
* Copyright (C) 2015-2017 Jean-François Ferry <jfefe@aternatik.fr>
|
||||||
* Copyright (C) 2015 Ari Elbaz (elarifr) <github@accedinfo.com>
|
* Copyright (C) 2015 Ari Elbaz (elarifr) <github@accedinfo.com>
|
||||||
* Copyright (C) 2015 Charlie Benke <charlie@patas-monkey.com>
|
* Copyright (C) 2015 Charlie Benke <charlie@patas-monkey.com>
|
||||||
* Copyright (C) 2016 Raphaël Doursenaud <rdoursenaud@gpcsolutions.fr>
|
* Copyright (C) 2016 Raphaël Doursenaud <rdoursenaud@gpcsolutions.fr>
|
||||||
@ -415,7 +415,7 @@ if (empty($reshook)) {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if (!$error && GETPOST('contactid', 'int')) {
|
if (!$error && GETPOSTISSET('contactid')) {
|
||||||
$contactid = GETPOST('contactid', 'int');
|
$contactid = GETPOST('contactid', 'int');
|
||||||
|
|
||||||
if ($contactid > 0) {
|
if ($contactid > 0) {
|
||||||
|
|||||||
@ -286,6 +286,7 @@ class Users extends DolibarrApi
|
|||||||
* @return array Array of cleaned object properties
|
* @return array Array of cleaned object properties
|
||||||
*/
|
*/
|
||||||
function _cleanObjectDatas($object) {
|
function _cleanObjectDatas($object) {
|
||||||
|
global $conf;
|
||||||
|
|
||||||
$object = parent::_cleanObjectDatas($object);
|
$object = parent::_cleanObjectDatas($object);
|
||||||
|
|
||||||
@ -298,6 +299,37 @@ class Users extends DolibarrApi
|
|||||||
unset($object->total_localtax1);
|
unset($object->total_localtax1);
|
||||||
unset($object->total_localtax2);
|
unset($object->total_localtax2);
|
||||||
unset($object->total_ttc);
|
unset($object->total_ttc);
|
||||||
|
unset($object->libelle_incoterms);
|
||||||
|
unset($object->location_incoterms);
|
||||||
|
|
||||||
|
unset($object->fk_delivery_address);
|
||||||
|
unset($object->fk_incoterms);
|
||||||
|
unset($object->all_permissions_are_loaded);
|
||||||
|
unset($object->shipping_method_id);
|
||||||
|
unset($object->nb_rights);
|
||||||
|
unset($object->search_sid);
|
||||||
|
unset($object->ldap_sid);
|
||||||
|
|
||||||
|
// List of properties never returned by API, whatever are permissions
|
||||||
|
unset($object->pass);
|
||||||
|
unset($object->pass_indatabase);
|
||||||
|
unset($object->pass_indatabase_crypted);
|
||||||
|
unset($object->pass_temp);
|
||||||
|
unset($object->api_key);
|
||||||
|
unset($object->clicktodial_password);
|
||||||
|
unset($object->openid);
|
||||||
|
|
||||||
|
|
||||||
|
$canreadsalary = ((! empty($conf->salaries->enabled) && ! empty(DolibarrApiAccess::$user->rights->salaries->read))
|
||||||
|
|| (! empty($conf->hrm->enabled) && ! empty(DolibarrApiAccess::$user->rights->hrm->employee->read)));
|
||||||
|
|
||||||
|
if (! $canreadsalary)
|
||||||
|
{
|
||||||
|
unset($object->salary);
|
||||||
|
unset($object->salaryextra);
|
||||||
|
unset($object->thm);
|
||||||
|
unset($object->tjm);
|
||||||
|
}
|
||||||
|
|
||||||
return $object;
|
return $object;
|
||||||
}
|
}
|
||||||
|
|||||||
@ -139,6 +139,7 @@ $server->wsdl->addComplexType(
|
|||||||
'date_modification' => array('name'=>'date_modification','type'=>'xsd:dateTime'),
|
'date_modification' => array('name'=>'date_modification','type'=>'xsd:dateTime'),
|
||||||
'date_invoice' => array('name'=>'date_invoice','type'=>'xsd:date'),
|
'date_invoice' => array('name'=>'date_invoice','type'=>'xsd:date'),
|
||||||
'date_term' => array('name'=>'date_modification','type'=>'xsd:date'),
|
'date_term' => array('name'=>'date_modification','type'=>'xsd:date'),
|
||||||
|
'label' => array('name'=>'label','type'=>'xsd:date'),
|
||||||
'type' => array('name'=>'type','type'=>'xsd:int'),
|
'type' => array('name'=>'type','type'=>'xsd:int'),
|
||||||
'total_net' => array('name'=>'type','type'=>'xsd:double'),
|
'total_net' => array('name'=>'type','type'=>'xsd:double'),
|
||||||
'total_vat' => array('name'=>'type','type'=>'xsd:double'),
|
'total_vat' => array('name'=>'type','type'=>'xsd:double'),
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user