Merge branch '13.0' of git@github.com:Dolibarr/dolibarr.git into develop

Conflicts:
	htdocs/comm/propal/list.php
	htdocs/commande/list.php
	htdocs/compta/facture/list.php
	htdocs/core/class/rssparser.class.php
	htdocs/core/tpl/admin_extrafields_view.tpl.php
	htdocs/core/tpl/extrafields_list_search_sql.tpl.php
	htdocs/expedition/list.php
This commit is contained in:
Laurent Destailleur 2021-05-17 07:57:32 +02:00
commit 4768729c09
12 changed files with 81 additions and 98 deletions

View File

@ -347,7 +347,7 @@ if (empty($reshook)) {
$duration = GETPOST('duree_validite', 'int'); $duration = GETPOST('duree_validite', 'int');
if (empty($datep)) { if (empty($datep)) {
setEventMessages($langs->trans("ErrorFieldRequired", $langs->transnoentitiesnoconv("Date")), null, 'errors'); setEventMessages($langs->trans("ErrorFieldRequired", $langs->transnoentitiesnoconv("DatePropal")), null, 'errors');
$action = 'create'; $action = 'create';
$error++; $error++;
} }
@ -1622,7 +1622,7 @@ if ($action == 'create') {
} }
// Date // Date
print '<tr><td class="fieldrequired">'.$langs->trans('Date').'</td><td>'; print '<tr><td class="fieldrequired">'.$langs->trans('DatePropal').'</td><td>';
print $form->selectDate('', '', '', '', '', "addprop", 1, 1); print $form->selectDate('', '', '', '', '', "addprop", 1, 1);
print '</td></tr>'; print '</td></tr>';
@ -2063,7 +2063,7 @@ if ($action == 'create') {
print '<tr>'; print '<tr>';
print '<td>'; print '<td>';
print '<table class="nobordernopadding" width="100%"><tr><td>'; print '<table class="nobordernopadding" width="100%"><tr><td>';
print $langs->trans('Date'); print $langs->trans('DatePropal');
print '</td>'; print '</td>';
if ($action != 'editdate' && $object->statut == Propal::STATUS_DRAFT && $usercancreate) { if ($action != 'editdate' && $object->statut == Propal::STATUS_DRAFT && $usercancreate) {
print '<td class="right"><a class="editfielda" href="'.$_SERVER["PHP_SELF"].'?action=editdate&amp;id='.$object->id.'">'.img_edit($langs->trans('SetDate'), 1).'</a></td>'; print '<td class="right"><a class="editfielda" href="'.$_SERVER["PHP_SELF"].'?action=editdate&amp;id='.$object->id.'">'.img_edit($langs->trans('SetDate'), 1).'</a></td>';

View File

@ -10,7 +10,7 @@
* Copyright (C) 2012 Christophe Battarel <christophe.battarel@altairis.fr> * Copyright (C) 2012 Christophe Battarel <christophe.battarel@altairis.fr>
* Copyright (C) 2013 Cédric Salvador <csalvador@gpcsolutions.fr> * Copyright (C) 2013 Cédric Salvador <csalvador@gpcsolutions.fr>
* Copyright (C) 2015 Jean-François Ferry <jfefe@aternatik.fr> * Copyright (C) 2015 Jean-François Ferry <jfefe@aternatik.fr>
* Copyright (C) 2016-2018 Ferran Marcet <fmarcet@2byte.es> * Copyright (C) 2016-2021 Ferran Marcet <fmarcet@2byte.es>
* Copyright (C) 2017-2018 Charlene Benke <charlie@patas-monkey.com> * Copyright (C) 2017-2018 Charlene Benke <charlie@patas-monkey.com>
* Copyright (C) 2018 Nicolas ZABOURI <info@inovea-conseil.com> * Copyright (C) 2018 Nicolas ZABOURI <info@inovea-conseil.com>
* Copyright (C) 2019 Alexandre Spangaro <aspangaro@open-dsi.fr> * Copyright (C) 2019 Alexandre Spangaro <aspangaro@open-dsi.fr>
@ -182,7 +182,7 @@ $arrayfields = array(
'state.nom'=>array('label'=>"StateShort", 'checked'=>0), 'state.nom'=>array('label'=>"StateShort", 'checked'=>0),
'country.code_iso'=>array('label'=>"Country", 'checked'=>0), 'country.code_iso'=>array('label'=>"Country", 'checked'=>0),
'typent.code'=>array('label'=>"ThirdPartyType", 'checked'=>$checkedtypetiers), 'typent.code'=>array('label'=>"ThirdPartyType", 'checked'=>$checkedtypetiers),
'p.date'=>array('label'=>"Date", 'checked'=>1), 'p.date'=>array('label'=>"DatePropal", 'checked'=>1),
'p.fin_validite'=>array('label'=>"DateEnd", 'checked'=>1), 'p.fin_validite'=>array('label'=>"DateEnd", 'checked'=>1),
'p.date_livraison'=>array('label'=>"DeliveryDate", 'checked'=>0), 'p.date_livraison'=>array('label'=>"DeliveryDate", 'checked'=>0),
'ava.rowid'=>array('label'=>"AvailabilityPeriod", 'checked'=>0), 'ava.rowid'=>array('label'=>"AvailabilityPeriod", 'checked'=>0),
@ -711,24 +711,12 @@ if ($resql) {
if ($sall) { if ($sall) {
$param .= '&sall='.urlencode($sall); $param .= '&sall='.urlencode($sall);
} }
if ($search_date_start) { if ($search_date_start) $param .= '&search_date_startday='.urlencode(dol_print_date($search_date_start, '%d')).'&search_date_startmonth='.urlencode(dol_print_date($search_date_start, '%m')).'&search_date_startyear='.urlencode(dol_print_date($search_date_start, '%Y'));
$param .= '&search_date_start='.urlencode($search_date_start); if ($search_date_end) $param .= '&search_date_endday='.urlencode(dol_print_date($search_date_end, '%d')).'&search_date_endmonth='.urlencode(dol_print_date($search_date_end, '%m')).'&search_date_endyear='.urlencode(dol_print_date($search_date_end, '%Y'));
} if ($search_dateend_start) $param .= '&search_dateend_startday='.urlencode(dol_print_date($search_dateend_start, '%d')).'&search_dateend_startmonth='.urlencode(dol_print_date($search_dateend_start, '%m')).'&search_dateend_startyear='.urlencode(dol_print_date($search_dateend_start, '%Y'));
if ($search_date_end) { if ($search_dateend_end) $param .= '&search_dateend_endday='.urlencode(dol_print_date($search_dateend_end, '%d')).'&search_dateend_endmonth='.urlencode(dol_print_date($search_dateend_end, '%m')).'&search_dateend_endyear='.urlencode(dol_print_date($search_dateend_end, '%Y'));
$param .= '&search_date_end='.urlencode($search_date_end); if ($search_datedelivery_start) $param .= '&search_datedelivery_startday='.urlencode(dol_print_date($search_datedelivery_start, '%d')).'&search_datedelivery_startmonth='.urlencode(dol_print_date($search_datedelivery_start, '%m')).'&search_datedelivery_startyear='.urlencode(dol_print_date($search_datedelivery_start, '%Y'));
} if ($search_datedelivery_end) $param .= '&search_datedelivery_endday='.urlencode(dol_print_date($search_datedelivery_end, '%d')).'&search_datedelivery_endmonth='.urlencode(dol_print_date($search_datedelivery_end, '%m')).'&search_datedelivery_endyear='.urlencode(dol_print_date($search_datedelivery_end, '%Y'));
if ($search_dateend_start) {
$param .= '&search_dateend_start='.urlencode($search_dateend_start);
}
if ($search_dateend_end) {
$param .= '&search_dateend_end='.urlencode($search_dateend_end);
}
if ($search_datedelivery_start) {
$param .= '&search_datedelivery_start='.urlencode($search_datedelivery_start);
}
if ($search_datedelivery_end) {
$param .= '&search_datedelivery_end='.urlencode($search_datedelivery_end);
}
if ($search_ref) { if ($search_ref) {
$param .= '&search_ref='.urlencode($search_ref); $param .= '&search_ref='.urlencode($search_ref);
} }
@ -787,37 +775,37 @@ if ($resql) {
$param .= '&search_categ_cus='.urlencode($search_categ_cus); $param .= '&search_categ_cus='.urlencode($search_categ_cus);
} }
if ($search_product_category != '') { if ($search_product_category != '') {
$param .= '&search_product_category='.$search_product_category; $param .= '&search_product_category='.urlencode($search_product_category);
} }
if ($search_fk_cond_reglement > 0) { if ($search_fk_cond_reglement > 0) {
$param .= '&search_fk_cond_reglement='.$search_fk_cond_reglement; $param .= '&search_fk_cond_reglement='.urlencode($search_fk_cond_reglement);
} }
if ($search_fk_shipping_method > 0) { if ($search_fk_shipping_method > 0) {
$param .= '&search_fk_shipping_method='.$search_fk_shipping_method; $param .= '&search_fk_shipping_method='.urlencode($search_fk_shipping_method);
} }
if ($search_fk_input_reason > 0) { if ($search_fk_input_reason > 0) {
$param .= '&search_fk_input_reason='.$search_fk_input_reason; $param .= '&search_fk_input_reason='.urlencode($search_fk_input_reason);
} }
if ($search_fk_mode_reglement > 0) { if ($search_fk_mode_reglement > 0) {
$param .= '&search_fk_mode_reglement='.$search_fk_mode_reglement; $param .= '&search_fk_mode_reglement='.urlencode($search_fk_mode_reglement);
} }
if ($search_type_thirdparty > 0) { if ($search_type_thirdparty > 0) {
$param .= '&search_type_thirdparty='.$search_type_thirdparty; $param .= '&search_type_thirdparty='.urlencode($search_type_thirdparty);
} }
if ($search_town) { if ($search_town) {
$param .= '&search_town='.$search_town; $param .= '&search_town='.urlencode($search_town);
} }
if ($search_zip) { if ($search_zip) {
$param .= '&search_zip='.$search_zip; $param .= '&search_zip='.urlencode($search_zip);
} }
if ($search_state) { if ($search_state) {
$param .= '&search_state='.$search_state; $param .= '&search_state='.urlencode($search_state);
} }
if ($search_town) { if ($search_town) {
$param .= '&search_town='.$search_town; $param .= '&search_town='.urlencode($search_town);
} }
if ($search_country) { if ($search_country) {
$param .= '&search_country='.$search_country; $param .= '&search_country='.urlencode($search_country);
} }
// Add $param from extra fields // Add $param from extra fields
@ -825,23 +813,22 @@ if ($resql) {
// List of mass actions available // List of mass actions available
$arrayofmassactions = array( $arrayofmassactions = array(
'generate_doc'=>img_picto('', 'pdf').'&ensp;'.$langs->trans("ReGeneratePDF"), 'generate_doc'=>img_picto('', 'pdf', 'class="pictofixedwidth"').$langs->trans("ReGeneratePDF"),
'builddoc'=>img_picto('', 'pdf').'&ensp;'.$langs->trans("PDFMerge"), 'builddoc'=>img_picto('', 'pdf', 'class="pictofixedwidth"').$langs->trans("PDFMerge"),
); );
if ($permissiontosendbymail) { if ($permissiontosendbymail) {
$arrayofmassactions['presend']=img_picto('', 'email').'&ensp;'.$langs->trans("SendByMail"); $arrayofmassactions['presend']=img_picto('', 'email', 'class="pictofixedwidth"').$langs->trans("SendByMail");
} }
if ($permissiontovalidate) { if ($permissiontovalidate) {
$arrayofmassactions['prevalidate']=img_picto('', 'check').'&ensp;'.$langs->trans("Validate"); $arrayofmassactions['prevalidate']=img_picto('', 'check', 'class="pictofixedwidth"').$langs->trans("Validate");
} }
if ($permissiontoclose) { if ($permissiontoclose) {
$arrayofmassactions['presign']=img_picto('', 'propal').'&ensp;'.$langs->trans("Sign"); $arrayofmassactions['presign']=img_picto('', 'propal', 'class="pictofixedwidth"').$langs->trans("Sign");
$arrayofmassactions['nopresign']=img_picto('', 'propal').'&ensp;'.$langs->trans("NoSign"); $arrayofmassactions['nopresign']=img_picto('', 'propal', 'class="pictofixedwidth"').$langs->trans("NoSign");
$arrayofmassactions['setbilled'] =img_picto('', 'bill').'&ensp;'.$langs->trans("ClassifyBilled"); $arrayofmassactions['setbilled'] =img_picto('', 'bill', 'class="pictofixedwidth"').$langs->trans("ClassifyBilled");
} }
if ($permissiontodelete) { if ($permissiontodelete) {
$arrayofmassactions['predelete'] = img_picto('', 'delete').'&ensp;'.$langs->trans("Delete"); $arrayofmassactions['predelete'] = img_picto('', 'delete', 'class="pictofixedwidth"').$langs->trans("Delete");
} }
if (in_array($massaction, array('presend', 'predelete', 'closed'))) { if (in_array($massaction, array('presend', 'predelete', 'closed'))) {

View File

@ -9,7 +9,7 @@
* Copyright (C) 2015-2018 Frédéric France <frederic.france@netlogic.fr> * Copyright (C) 2015-2018 Frédéric France <frederic.france@netlogic.fr>
* Copyright (C) 2015 Marcos García <marcosgdf@gmail.com> * Copyright (C) 2015 Marcos García <marcosgdf@gmail.com>
* Copyright (C) 2015 Jean-François Ferry <jfefe@aternatik.fr> * Copyright (C) 2015 Jean-François Ferry <jfefe@aternatik.fr>
* Copyright (C) 2016 Ferran Marcet <fmarcet@2byte.es> * Copyright (C) 2016-2021 Ferran Marcet <fmarcet@2byte.es>
* Copyright (C) 2018 Charlene Benke <charlie@patas-monkey.com> * Copyright (C) 2018 Charlene Benke <charlie@patas-monkey.com>
* Copyright (C) 2021 Anthony Berton <anthony.berton@bb2a.fr> * Copyright (C) 2021 Anthony Berton <anthony.berton@bb2a.fr>
* *
@ -706,10 +706,10 @@ if ($resql) {
$param .= '&search_status='.urlencode($search_status); $param .= '&search_status='.urlencode($search_status);
} }
if ($search_datecloture_start) { if ($search_datecloture_start) {
$param .= '&search_datecloture_start='.urlencode($search_datecloture_start); $param .= '&search_datecloture_startday='.dol_print_date($search_datecloture_start, '%d').'&search_datecloture_startmonth='.dol_print_date($search_datecloture_start, '%m').'&search_datecloture_startyear='.dol_print_date($search_datecloture_start, '%Y');
} }
if ($search_datecloture_end) { if ($search_datecloture_end) {
$param .= '&search_datecloture_end='.urlencode($search_datecloture_end); $param .= '&search_datecloture_endday='.dol_print_date($search_datecloture_end, '%d').'&search_datecloture_endmonth='.dol_print_date($search_datecloture_end, '%m').'&search_datecloture_endyear='.dol_print_date($search_datecloture_end, '%Y');
} }
if ($search_dateorder_start) { if ($search_dateorder_start) {
$param .= '&search_dateorder_start_day='.dol_print_date($search_dateorder_start, '%d').'&search_dateorder_start_month='.dol_print_date($search_dateorder_start, '%m').'&search_dateorder_start_year='.dol_print_date($search_dateorder_start, '%Y'); $param .= '&search_dateorder_start_day='.dol_print_date($search_dateorder_start, '%d').'&search_dateorder_start_month='.dol_print_date($search_dateorder_start, '%m').'&search_dateorder_start_year='.dol_print_date($search_dateorder_start, '%Y');
@ -805,16 +805,16 @@ if ($resql) {
$param .= '&search_billed='.urlencode($search_billed); $param .= '&search_billed='.urlencode($search_billed);
} }
if ($search_fk_cond_reglement > 0) { if ($search_fk_cond_reglement > 0) {
$param .= '&search_fk_cond_reglement='.$search_fk_cond_reglement; $param .= '&search_fk_cond_reglement='.urlencode($search_fk_cond_reglement);
} }
if ($search_fk_shipping_method > 0) { if ($search_fk_shipping_method > 0) {
$param .= '&search_fk_shipping_method='.$search_fk_shipping_method; $param .= '&search_fk_shipping_method='.urlencode($search_fk_shipping_method);
} }
if ($search_fk_mode_reglement > 0) { if ($search_fk_mode_reglement > 0) {
$param .= '&search_fk_mode_reglement='.$search_fk_mode_reglement; $param .= '&search_fk_mode_reglement='.urlencode($search_fk_mode_reglement);
} }
if ($search_fk_input_reason > 0) { if ($search_fk_input_reason > 0) {
$param .= '&search_fk_input_reason='.$search_fk_input_reason; $param .= '&search_fk_input_reason='.urlencode($search_fk_input_reason);
} }
// Add $param from extra fields // Add $param from extra fields

View File

@ -10,7 +10,7 @@
* 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) 2015 Jean-François Ferry <jfefe@aternatik.fr> * Copyright (C) 2015 Jean-François Ferry <jfefe@aternatik.fr>
* Copyright (C) 2015-2016 Ferran Marcet <fmarcet@2byte.es> * Copyright (C) 2015-2021 Ferran Marcet <fmarcet@2byte.es>
* Copyright (C) 2017 Josep Lluís Amador <joseplluis@lliuretic.cat> * Copyright (C) 2017 Josep Lluís Amador <joseplluis@lliuretic.cat>
* Copyright (C) 2018 Charlene Benke <charlie@patas-monkey.com> * Copyright (C) 2018 Charlene Benke <charlie@patas-monkey.com>
* Copyright (C) 2019-2021 Alexandre Spangaro <aspangaro@open-dsi.fr> * Copyright (C) 2019-2021 Alexandre Spangaro <aspangaro@open-dsi.fr>

View File

@ -1,19 +1,19 @@
<?php <?php
/* Copyright (C) 2011-2012 Laurent Destailleur <eldy@users.sourceforge.net> /* Copyright (C) 2011-2012 Laurent Destailleur <eldy@users.sourceforge.net>
* *
* 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
* the Free Software Foundation; either version 3 of the License, or * the Free Software Foundation; either version 3 of the License, or
* (at your option) any later version. * (at your option) any later version.
* *
* This program is distributed in the hope that it will be useful, * This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of * but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details. * GNU General Public License for more details.
* *
* You should have received a copy of the GNU General Public License * You should have received a copy of the GNU General Public License
* along with this program. If not, see <https://www.gnu.org/licenses/>. * along with this program. If not, see <https://www.gnu.org/licenses/>.
*/ */
/** /**
* \file htdocs/core/class/rssparser.class.php * \file htdocs/core/class/rssparser.class.php
@ -538,22 +538,18 @@ class RssParser
if ($el == 'channel') { if ($el == 'channel') {
$this->inchannel = true; $this->inchannel = true;
} elseif ($el == 'item' or $el == 'entry') { } elseif ($el == 'item' || $el == 'entry') {
$this->initem = true; $this->initem = true;
if (isset($attrs['rdf:about'])) { if (isset($attrs['rdf:about'])) {
$this->current_item['about'] = $attrs['rdf:about']; $this->current_item['about'] = $attrs['rdf:about'];
} }
} elseif ($this->_format == 'rss' and } elseif ($this->_format == 'rss' && $this->current_namespace == '' && $el == 'textinput') {
$this->current_namespace == '' and
$el == 'textinput') {
// if we're in the default namespace of an RSS feed, // if we're in the default namespace of an RSS feed,
// record textinput or image fields // record textinput or image fields
$this->intextinput = true; $this->intextinput = true;
} elseif ($this->_format == 'rss' and } elseif ($this->_format == 'rss' && $this->current_namespace == '' && $el == 'image') {
$this->current_namespace == '' and
$el == 'image') {
$this->inimage = true; $this->inimage = true;
} elseif ($this->_format == 'atom' and in_array($el, $this->_CONTENT_CONSTRUCTS)) { } elseif ($this->_format == 'atom' && in_array($el, $this->_CONTENT_CONSTRUCTS)) {
// handle atom content constructs // handle atom content constructs
// avoid clashing w/ RSS mod_content // avoid clashing w/ RSS mod_content
if ($el == 'content') { if ($el == 'content') {
@ -561,7 +557,7 @@ class RssParser
} }
$this->incontent = $el; $this->incontent = $el;
} elseif ($this->_format == 'atom' and $this->incontent) { } elseif ($this->_format == 'atom' && $this->incontent) {
// if inside an Atom content construct (e.g. content or summary) field treat tags as text // if inside an Atom content construct (e.g. content or summary) field treat tags as text
// if tags are inlined, then flatten // if tags are inlined, then flatten
$attrs_str = join(' ', array_map('map_attrs', array_keys($attrs), array_values($attrs))); $attrs_str = join(' ', array_map('map_attrs', array_keys($attrs), array_values($attrs)));
@ -569,7 +565,7 @@ class RssParser
$this->append_content("<$element $attrs_str>"); $this->append_content("<$element $attrs_str>");
array_unshift($this->stack, $el); array_unshift($this->stack, $el);
} elseif ($this->_format == 'atom' and $el == 'link') { } elseif ($this->_format == 'atom' && $el == 'link') {
// Atom support many links per containging element. // Atom support many links per containging element.
// Magpie treats link elements of type rel='alternate' // Magpie treats link elements of type rel='alternate'
// as being equivalent to RSS's simple link element. // as being equivalent to RSS's simple link element.

View File

@ -1516,7 +1516,7 @@ class pdf_azur extends ModelePDFPropales
$posy += 4; $posy += 4;
$pdf->SetXY($posx, $posy); $pdf->SetXY($posx, $posy);
$pdf->SetTextColor(0, 0, 60); $pdf->SetTextColor(0, 0, 60);
$pdf->MultiCell(100, 3, $outputlangs->transnoentities("Date")." : ".dol_print_date($object->date, "day", false, $outputlangs, true), '', 'R'); $pdf->MultiCell(100, 3, $outputlangs->transnoentities("DatePropal")." : ".dol_print_date($object->date, "day", false, $outputlangs, true), '', 'R');
$posy += 4; $posy += 4;
$pdf->SetXY($posx, $posy); $pdf->SetXY($posx, $posy);

View File

@ -115,12 +115,14 @@ if (isset($extrafields->attributes[$elementtype]['type']) && is_array($extrafiel
} }
print '</td>'; print '</td>';
} }
print '<td class="right nowraponall"><a class="editfielda" href="'.$_SERVER["PHP_SELF"].'?action=edit&token='.newToken().'&attrname='.$key.'#formeditextrafield">'.img_edit().'</a>'; print '<td class="right nowraponall">';
print '&nbsp; <a class="paddingleft" href="'.$_SERVER["PHP_SELF"].'?action=delete&token='.newToken().'&attrname='.$key.'">'.img_delete().'</a></td>'."\n"; print '<a class="editfielda" href="'.$_SERVER["PHP_SELF"].'?action=edit&token='.newToken().'&attrname='.$key.'#formeditextrafield">'.img_edit().'</a>';
print '&nbsp; <a class="paddingleft" href="'.$_SERVER["PHP_SELF"].'?action=delete&token='.newToken().'&attrname='.$key.'">'.img_delete().'</a>';
print '</td>'."\n";
print "</tr>"; print "</tr>";
} }
} else { } else {
$colspan = 13; $colspan = 14;
if (!empty($conf->multicompany->enabled)) { if (!empty($conf->multicompany->enabled)) {
$colspan++; $colspan++;
} }

View File

@ -26,6 +26,10 @@ if (!empty($extrafieldsobjectkey) && !empty($search_array_options) && is_array($
if ($crit != '' && in_array($typ, array('date', 'datetime', 'timestamp'))) { if ($crit != '' && in_array($typ, array('date', 'datetime', 'timestamp'))) {
if (is_numeric($crit)) { if (is_numeric($crit)) {
if ($typ == 'date'){
include_once DOL_DOCUMENT_ROOT.'/core/lib/date.lib.php';
$crit = dol_get_first_hour($crit);
}
$sql .= " AND ".$extrafieldsobjectprefix.$tmpkey." = '".$db->idate($crit)."'"; $sql .= " AND ".$extrafieldsobjectprefix.$tmpkey." = '".$db->idate($crit)."'";
} elseif (is_array($crit)) { } elseif (is_array($crit)) {
if ($crit['start'] !== '' && $crit['end'] !== '') { if ($crit['start'] !== '' && $crit['end'] !== '') {

View File

@ -262,8 +262,8 @@ class InterfaceLdapsynchro extends DolibarrTriggers
$info = $object->_load_ldap_info(); $info = $object->_load_ldap_info();
$dn = $object->_load_ldap_dn($info); $dn = $object->_load_ldap_dn($info);
// Get a gid number for objectclass PosixGroup // Get a gid number for objectclass PosixGroup if none was provided
if (in_array('posixGroup', $info['objectclass'])) { if (empty($info[$conf->global->LDAP_GROUP_FIELD_GROUPID]) && in_array('posixGroup', $info['objectclass'])) {
$info['gidNumber'] = $ldap->getNextGroupGid('LDAP_KEY_GROUPS'); $info['gidNumber'] = $ldap->getNextGroupGid('LDAP_KEY_GROUPS');
} }

View File

@ -2,7 +2,7 @@
/* Copyright (C) 2001-2005 Rodolphe Quiedeville <rodolphe@quiedeville.org> /* Copyright (C) 2001-2005 Rodolphe Quiedeville <rodolphe@quiedeville.org>
* Copyright (C) 2004-2015 Laurent Destailleur <eldy@users.sourceforge.net> * Copyright (C) 2004-2015 Laurent Destailleur <eldy@users.sourceforge.net>
* Copyright (C) 2005-2010 Regis Houssin <regis.houssin@inodbox.com> * Copyright (C) 2005-2010 Regis Houssin <regis.houssin@inodbox.com>
* Copyright (C) 2016-2018 Ferran Marcet <fmarcet@2byte.es> * Copyright (C) 2016-2021 Ferran Marcet <fmarcet@2byte.es>
* Copyright (C) 2019 Nicolas ZABOURI <info@inovea-conseil.com> * Copyright (C) 2019 Nicolas ZABOURI <info@inovea-conseil.com>
* Copyright (C) 2020 Thibault FOUCART <support@ptibogxiv.net> * Copyright (C) 2020 Thibault FOUCART <support@ptibogxiv.net>
* *
@ -434,20 +434,18 @@ if ($search_zip) {
if ($search_type_thirdparty != '' && $search_type_thirdparty > 0) { if ($search_type_thirdparty != '' && $search_type_thirdparty > 0) {
$param .= '&search_type_thirdparty='.urlencode($search_type_thirdparty); $param .= '&search_type_thirdparty='.urlencode($search_type_thirdparty);
} }
if ($search_datedelivery_start) {
if ($search_datedelivery_start) { $param .= '&search_datedelivery_startday='.urlencode(dol_print_date($search_datedelivery_start, '%d')).'&search_datedelivery_startmonth='.urlencode(dol_print_date($search_datedelivery_start, '%m')).'&search_datedelivery_startyear='.urlencode(dol_print_date($search_datedelivery_start, '%Y'));
$param .= '&search_datedelivery_start='.urlencode($search_datedelivery_start);
} }
if ($search_datedelivery_end) { if ($search_datedelivery_end) {
$param .= '&search_datedelivery_end='.urlencode($search_datedelivery_end); $param .= '&search_datedelivery_endday='.urlencode(dol_print_date($search_datedelivery_end, '%d')).'&search_datedelivery_endmonth='.urlencode(dol_print_date($search_datedelivery_end, '%m')).'&search_datedelivery_endyear='.urlencode(dol_print_date($search_datedelivery_end, '%Y'));
} }
if ($search_datereceipt_start) { if ($search_datereceipt_start) {
$param .= '&search_datereceipt_start='.urlencode($search_datereceipt_start); $param .= '&search_datereceipt_startday='.urlencode(dol_print_date($search_datereceipt_start, '%d')).'&search_datereceipt_startmonth='.urlencode(dol_print_date($search_datereceipt_start, '%m')).'&search_datereceipt_startyear='.urlencode(dol_print_date($search_datereceipt_start, '%Y'));
} }
if ($search_datereceipt_end) { if ($search_datereceipt_end) {
$param .= '&search_datereceipt_end='.urlencode($search_datereceipt_end); $param .= '&search_datereceipt_endday='.urlencode(dol_print_date($search_datereceipt_end, '%d')).'&search_datereceipt_endmonth='.urlencode(dol_print_date($search_datereceipt_end, '%m')).'&search_datereceipt_endyear='.urlencode(dol_print_date($search_datereceipt_end, '%Y'));
} }
if ($search_product_category != '') { if ($search_product_category != '') {
$param .= '&search_product_category='.urlencode($search_product_category); $param .= '&search_product_category='.urlencode($search_product_category);
} }
@ -863,10 +861,6 @@ while ($i < min($num, $limit)) {
if (!empty($arrayfields['e.date_delivery']['checked'])) { if (!empty($arrayfields['e.date_delivery']['checked'])) {
print '<td class="center">'; print '<td class="center">';
print dol_print_date($db->jdate($obj->delivery_date), "dayhour"); print dol_print_date($db->jdate($obj->delivery_date), "dayhour");
/*$now = time();
if ( ($now - $db->jdate($obj->date_expedition)) > $conf->warnings->lim && $obj->statutid == 1 )
{
}*/
print "</td>\n"; print "</td>\n";
} }
// Tracking number // Tracking number

View File

@ -855,10 +855,10 @@ class UserGroup extends CommonObject
$valueofldapfield[] = $muser->_load_ldap_dn($info2); $valueofldapfield[] = $muser->_load_ldap_dn($info2);
} }
$info[$conf->global->LDAP_GROUP_FIELD_GROUPMEMBERS] = (!empty($valueofldapfield) ? $valueofldapfield : ''); $info[$conf->global->LDAP_GROUP_FIELD_GROUPMEMBERS] = (!empty($valueofldapfield) ? $valueofldapfield : '');
} }
if (!empty($info[$conf->global->LDAP_GROUP_FIELD_GROUPID])) { if (!empty($conf->global->LDAP_GROUP_FIELD_GROUPID)) {
$info[$conf->global->LDAP_GROUP_FIELD_GROUPID] = $this->id; $info[$conf->global->LDAP_GROUP_FIELD_GROUPID] = $this->id;
} }
return $info; return $info;
} }

View File

@ -67,8 +67,8 @@ if ($action == 'dolibarr2ldap') {
if ($result > 0) { if ($result > 0) {
$info = $object->_load_ldap_info(); $info = $object->_load_ldap_info();
// Get a gid number for objectclass PosixGroup // Get a gid number for objectclass PosixGroup if none was provided
if (in_array('posixGroup', $info['objectclass'])) { if (empty($info[$conf->global->LDAP_GROUP_FIELD_GROUPID]) && in_array('posixGroup', $info['objectclass'])) {
$info['gidNumber'] = $ldap->getNextGroupGid('LDAP_KEY_GROUPS'); $info['gidNumber'] = $ldap->getNextGroupGid('LDAP_KEY_GROUPS');
} }