From aa594204130ed519e513b05ffcbb510678011eae Mon Sep 17 00:00:00 2001 From: Laurent Destailleur Date: Wed, 14 Sep 2016 19:48:57 +0200 Subject: [PATCH] FIX #5712 #5751 --- htdocs/contrat/card.php | 2 +- htdocs/core/tpl/objectline_create.tpl.php | 3 ++- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/htdocs/contrat/card.php b/htdocs/contrat/card.php index d034ff21fc1..31a7a5eec6a 100644 --- a/htdocs/contrat/card.php +++ b/htdocs/contrat/card.php @@ -214,7 +214,7 @@ if (empty($reshook)) if ($socid<1) { - setEventMessages($langs->trans("ErrorFieldRequired", $langs->transnoentitiesnoconv("Customer")), null, 'errors'); + setEventMessages($langs->trans("ErrorFieldRequired", $langs->transnoentitiesnoconv("ThirdParty")), null, 'errors'); $action='create'; $error++; } diff --git a/htdocs/core/tpl/objectline_create.tpl.php b/htdocs/core/tpl/objectline_create.tpl.php index b0fb5d3e26d..0ab255c6f99 100644 --- a/htdocs/core/tpl/objectline_create.tpl.php +++ b/htdocs/core/tpl/objectline_create.tpl.php @@ -38,7 +38,8 @@ if (! empty($conf->margin->enabled) && ! empty($object->element) && in_array($ob } global $dateSelector, $forceall, $senderissupplier, $inputalsopricewithtax; -if (empty($dateSelector)) $dateSelector=0; +if (! isset($dateSelector)) $dateSelector=1; // For backward compatibility +elseif (empty($dateSelector)) $dateSelector=0; if (empty($forceall)) $forceall=0; if (empty($senderissupplier)) $senderissupplier=0; if (empty($inputalsopricewithtax)) $inputalsopricewithtax=0;