fix display cond
This commit is contained in:
parent
6fad0ea5bd
commit
681ae88e97
@ -4003,12 +4003,10 @@ else if ($id > 0 || ! empty($ref))
|
|||||||
}
|
}
|
||||||
|
|
||||||
$displayWarranty = false;
|
$displayWarranty = false;
|
||||||
if( !empty($object->situation_final)
|
if( ( $object->type == Facture::TYPE_SITUATION && (!empty($object->retained_warranty) || !empty($conf->global->INVOICE_USE_SITUATION_RETAINED_WARRANTY)) ) )
|
||||||
&& ( $object->type == Facture::TYPE_SITUATION && (!empty($object->retained_warranty) || !empty($conf->global->INVOICE_USE_SITUATION_RETAINED_WARRANTY)) )
|
|
||||||
)
|
|
||||||
{
|
{
|
||||||
// Check if this situation invoice is 100% for real
|
// Check if this situation invoice is 100% for real
|
||||||
if(!empty($object->lines)){
|
if(!empty($object->situation_final) && !empty($object->lines)){
|
||||||
$displayWarranty = true;
|
$displayWarranty = true;
|
||||||
foreach( $object->lines as $i => $line ){
|
foreach( $object->lines as $i => $line ){
|
||||||
if($line->product_type < 2 && $line->situation_percent < 100){
|
if($line->product_type < 2 && $line->situation_percent < 100){
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user