fix create invoice from contract with free service line

This commit is contained in:
Frédéric FRANCE 2024-01-05 15:47:24 +01:00 committed by GitHub
parent 242c403f50
commit 3ed18dc92c
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -1723,7 +1723,8 @@ if (empty($reshook)) {
}
} else {
// Positive line
$product_type = ($lines[$i]->product_type ? $lines[$i]->product_type : 0);
// we keep first type from product if exist, otherwise we keep type from line (free line)
$product_type = $lines[$i]->product_type ?? ($lines[$i]->type ?? 0);
// Date start
$date_start = false;