Merge branch 'NEW_field_in_service_object' of github.com:atm-jpb/dolibarr into NEW_field_in_service_object

This commit is contained in:
jpb 2021-07-21 08:57:09 +02:00
commit 2189af1f2a

View File

@ -184,15 +184,14 @@ if (($line->info_bits & 2) == 2) {
if (!$line->date_start || !$line->date_end) {
// show warning under line
// we need to fetch product associated to line for some test
if ($object->element != 'order_supplier'){
$res = $line->fetch_product();
if ($res > 0 ) {
if ($line->product->isService() && $line->product->isMandatoryPeriod()) {
print '<div><span class="clearboth nowraponall warning">'.$langs->trans("mandatoryPeriodNeedTobeSet").'</span></div>';
if ($object->element != 'order_supplier') {
$res = $line->fetch_product();
if ($res > 0 ) {
if ($line->product->isService() && $line->product->isMandatoryPeriod()) {
print '<div><span class="clearboth nowraponall warning">'.$langs->trans("mandatoryPeriodNeedTobeSet").'</span></div>';
}
}
}
}
}