Merge pull request #23996 from atm-quentin/FIX_mandatory_invoice_line_service
FIX : mandatory date for service didnt work for invoice
This commit is contained in:
commit
efd4001f67
@ -182,10 +182,11 @@ if (($line->info_bits & 2) == 2) {
|
|||||||
if ($line->date_start || $line->date_end) {
|
if ($line->date_start || $line->date_end) {
|
||||||
print '<div class="clearboth nowraponall opacitymedium daterangeofline">'.get_date_range($line->date_start, $line->date_end, $format).'</div>';
|
print '<div class="clearboth nowraponall opacitymedium daterangeofline">'.get_date_range($line->date_start, $line->date_end, $format).'</div>';
|
||||||
}
|
}
|
||||||
|
|
||||||
if (!$line->date_start || !$line->date_end) {
|
if (!$line->date_start || !$line->date_end) {
|
||||||
// show warning under line
|
// show warning under line
|
||||||
// we need to fetch product associated to line for some test
|
// we need to fetch product associated to line for some test
|
||||||
if ($object->element == 'propal' || $object->element == 'order' || $object->element == 'propal_supplier' || $object->element == 'supplier_proposal' || $object->element == 'commande') {
|
if ($object->element == 'propal' || $object->element == 'order' || $object->element == 'facture' || $object->element == 'propal_supplier' || $object->element == 'supplier_proposal' || $object->element == 'commande') {
|
||||||
$res = $line->fetch_product();
|
$res = $line->fetch_product();
|
||||||
if ($res > 0 ) {
|
if ($res > 0 ) {
|
||||||
if ($line->product->isService() && $line->product->isMandatoryPeriod()) {
|
if ($line->product->isService() && $line->product->isMandatoryPeriod()) {
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user