mirror of
https://github.com/Dolibarr/dolibarr.git
synced 2025-12-06 09:38:23 +01:00
Fix warning
This commit is contained in:
@@ -26,25 +26,29 @@
|
|||||||
*
|
*
|
||||||
* 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/>.
|
||||||
*
|
|
||||||
* Need to have the following variables defined:
|
|
||||||
* $object (invoice, order, ...)
|
|
||||||
* $conf
|
|
||||||
* $langs
|
|
||||||
* $dateSelector
|
|
||||||
* $forceall (0 by default, 1 for supplier invoices/orders)
|
|
||||||
* $senderissupplier (0 by default, 1 or 2 for supplier invoices/orders)
|
|
||||||
* $inputalsopricewithtax (0 by default, 1 to also show column with unit price including tax)
|
|
||||||
*/
|
*/
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
* @var Conf $conf
|
||||||
* @var CommonObject $this
|
* @var CommonObject $this
|
||||||
* @var CommonObject $object
|
* @var CommonObject $object
|
||||||
* @var CommonObjectLine $line
|
* @var CommonObjectLine $line
|
||||||
|
* @var ExtraFields $extrafields
|
||||||
* @var Form $form
|
* @var Form $form
|
||||||
* @var HookManager $hookmanager
|
* @var HookManager $hookmanager
|
||||||
* @var Translate $langs
|
* @var Translate $langs
|
||||||
* @var User $user
|
* @var User $user
|
||||||
|
* @var Societe $buyer
|
||||||
|
* @var Societe $seller
|
||||||
|
*
|
||||||
|
* @var string $action
|
||||||
|
* @var string $usehm
|
||||||
|
* @var int $dateSelector
|
||||||
|
* @var int $forceall (0 by default, 1 for supplier invoices/orders)
|
||||||
|
* @var int $senderissupplier (0 by default, 1 or 2 for supplier invoices/orders)
|
||||||
|
* @var int $inputalsopricewithtax (0 by default, 1 to also show column with unit price including tax)
|
||||||
*/
|
*/
|
||||||
|
|
||||||
// Protection to avoid direct call of template
|
// Protection to avoid direct call of template
|
||||||
if (empty($object) || !is_object($object)) {
|
if (empty($object) || !is_object($object)) {
|
||||||
print "Error: this template page cannot be called directly as an URL";
|
print "Error: this template page cannot be called directly as an URL";
|
||||||
@@ -627,18 +631,18 @@ if ((isModEnabled("service") || ($object->element == 'contrat')) && $dateSelecto
|
|||||||
}
|
}
|
||||||
|
|
||||||
if (!$date_start) {
|
if (!$date_start) {
|
||||||
if (isset($conf->global->MAIN_DEFAULT_DATE_START_HOUR)) {
|
if (getDolGlobalString('MAIN_DEFAULT_DATE_START_HOUR') != '') {
|
||||||
print 'jQuery("#date_starthour").val("' . getDolGlobalString('MAIN_DEFAULT_DATE_START_HOUR').'");';
|
print 'jQuery("#date_starthour").val("' . getDolGlobalString('MAIN_DEFAULT_DATE_START_HOUR').'");';
|
||||||
}
|
}
|
||||||
if (isset($conf->global->MAIN_DEFAULT_DATE_START_MIN)) {
|
if (getDolGlobalString('MAIN_DEFAULT_DATE_START_MIN') != '') {
|
||||||
print 'jQuery("#date_startmin").val("' . getDolGlobalString('MAIN_DEFAULT_DATE_START_MIN').'");';
|
print 'jQuery("#date_startmin").val("' . getDolGlobalString('MAIN_DEFAULT_DATE_START_MIN').'");';
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
if (!$date_end) {
|
if (!$date_end) {
|
||||||
if (isset($conf->global->MAIN_DEFAULT_DATE_END_HOUR)) {
|
if (getDolGlobalString('MAIN_DEFAULT_DATE_END_HOUR')) {
|
||||||
print 'jQuery("#date_endhour").val("' . getDolGlobalString('MAIN_DEFAULT_DATE_END_HOUR').'");';
|
print 'jQuery("#date_endhour").val("' . getDolGlobalString('MAIN_DEFAULT_DATE_END_HOUR').'");';
|
||||||
}
|
}
|
||||||
if (isset($conf->global->MAIN_DEFAULT_DATE_END_MIN)) {
|
if (getDolGlobalString('MAIN_DEFAULT_DATE_END_MIN')) {
|
||||||
print 'jQuery("#date_endmin").val("' . getDolGlobalString('MAIN_DEFAULT_DATE_END_MIN').'");';
|
print 'jQuery("#date_endmin").val("' . getDolGlobalString('MAIN_DEFAULT_DATE_END_MIN').'");';
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -36,15 +36,20 @@
|
|||||||
*/
|
*/
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @var CommonObject $this
|
* @var Conf $conf
|
||||||
* @var CommonObject $object
|
|
||||||
* @var CommonObjectLine $line
|
|
||||||
* @var Form $form
|
* @var Form $form
|
||||||
* @var HookManager $hookmanager
|
* @var HookManager $hookmanager
|
||||||
* @var Translate $langs
|
* @var Translate $langs
|
||||||
* @var User $user
|
* @var User $user
|
||||||
|
* @var ExtraFields $extrafields
|
||||||
|
* @var CommonObject $this
|
||||||
|
* @var CommonObject $object
|
||||||
|
* @var CommonObjectLine $line
|
||||||
* @var Societe $seller
|
* @var Societe $seller
|
||||||
* @var Societe $buyer
|
* @var Societe $buyer
|
||||||
|
*
|
||||||
|
* @var string $action
|
||||||
|
* @var int $dateSelector
|
||||||
*/
|
*/
|
||||||
|
|
||||||
// Protection to avoid direct call of template
|
// Protection to avoid direct call of template
|
||||||
@@ -408,7 +413,7 @@ $coldisplay++;
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
$hourmin = (isset($conf->global->MAIN_USE_HOURMIN_IN_DATE_RANGE) ? $conf->global->MAIN_USE_HOURMIN_IN_DATE_RANGE : '');
|
$hourmin = getDolGlobalString('MAIN_USE_HOURMIN_IN_DATE_RANGE');
|
||||||
print $form->selectDate($line->date_start, 'date_start', $hourmin, $hourmin, $line->date_start ? 0 : 1, "updateline", 1, 0);
|
print $form->selectDate($line->date_start, 'date_start', $hourmin, $hourmin, $line->date_start ? 0 : 1, "updateline", 1, 0);
|
||||||
print ' '.$langs->trans('to').' ';
|
print ' '.$langs->trans('to').' ';
|
||||||
print $form->selectDate($line->date_end, 'date_end', $hourmin, $hourmin, $line->date_end ? 0 : 1, "updateline", 1, 0);
|
print $form->selectDate($line->date_end, 'date_end', $hourmin, $hourmin, $line->date_end ? 0 : 1, "updateline", 1, 0);
|
||||||
@@ -435,12 +440,10 @@ $coldisplay++;
|
|||||||
<?php
|
<?php
|
||||||
}
|
}
|
||||||
if (!$line->date_start) {
|
if (!$line->date_start) {
|
||||||
if (isset($conf->global->MAIN_DEFAULT_DATE_START_HOUR)) {
|
if (getDolGlobalString('MAIN_DEFAULT_DATE_START_HOUR') != '') {
|
||||||
print 'jQuery("#date_starthour").val("' . getDolGlobalString('MAIN_DEFAULT_DATE_START_HOUR').'");';
|
print 'jQuery("#date_starthour").val("' . getDolGlobalString('MAIN_DEFAULT_DATE_START_HOUR').'");';
|
||||||
}
|
}
|
||||||
|
if (getDolGlobalString('MAIN_DEFAULT_DATE_START_MIN') != '') {
|
||||||
|
|
||||||
if (isset($conf->global->MAIN_DEFAULT_DATE_START_MIN)) {
|
|
||||||
print 'jQuery("#date_startmin").val("' . getDolGlobalString('MAIN_DEFAULT_DATE_START_MIN').'");';
|
print 'jQuery("#date_startmin").val("' . getDolGlobalString('MAIN_DEFAULT_DATE_START_MIN').'");';
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -455,10 +458,10 @@ $coldisplay++;
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
if (!$line->date_end) {
|
if (!$line->date_end) {
|
||||||
if (isset($conf->global->MAIN_DEFAULT_DATE_END_HOUR)) {
|
if (getDolGlobalString('MAIN_DEFAULT_DATE_END_HOUR') != '') {
|
||||||
print 'jQuery("#date_endhour").val("' . getDolGlobalString('MAIN_DEFAULT_DATE_END_HOUR').'");';
|
print 'jQuery("#date_endhour").val("' . getDolGlobalString('MAIN_DEFAULT_DATE_END_HOUR').'");';
|
||||||
}
|
}
|
||||||
if (isset($conf->global->MAIN_DEFAULT_DATE_END_MIN)) {
|
if (getDolGlobalString('MAIN_DEFAULT_DATE_END_MIN') != '') {
|
||||||
print 'jQuery("#date_endmin").val("' . getDolGlobalString('MAIN_DEFAULT_DATE_END_MIN').'");';
|
print 'jQuery("#date_endmin").val("' . getDolGlobalString('MAIN_DEFAULT_DATE_END_MIN').'");';
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user