From 1b054f1b363ba0a627065a4e4467acf06165ef04 Mon Sep 17 00:00:00 2001 From: Maxime Kohlhaas Date: Sat, 27 Oct 2018 09:19:02 +0200 Subject: [PATCH] Fix invoice creation from contract was invoicing closed services #9087 --- htdocs/compta/facture/card.php | 2 ++ 1 file changed, 2 insertions(+) diff --git a/htdocs/compta/facture/card.php b/htdocs/compta/facture/card.php index 993194e0f91..daff7c95f56 100644 --- a/htdocs/compta/facture/card.php +++ b/htdocs/compta/facture/card.php @@ -1196,6 +1196,8 @@ if (empty($reshook)) { // Don't add lines with qty 0 when coming from a shipment including all order lines if($srcobject->element == 'shipping' && $conf->global->SHIPMENT_GETS_ALL_ORDER_PRODUCTS && $lines[$i]->qty == 0) continue; + // Don't add closed lines when coming from a contract + if($srcobject->element == 'contrat' && $lines[$i]->statut == 5) continue; $label=(! empty($lines[$i]->label)?$lines[$i]->label:''); $desc=(! empty($lines[$i]->desc)?$lines[$i]->desc:$lines[$i]->libelle);