Fix : only invoice active lines of a contract
This commit is contained in:
parent
912e29a746
commit
916d3ce931
@ -1378,8 +1378,9 @@ if (empty($reshook))
|
|||||||
{
|
{
|
||||||
// Don't add lines with qty 0 when coming from a shipment including all order lines
|
// 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;
|
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
|
// Don't add inactive or closed lines when coming from a contract
|
||||||
if($srcobject->element == 'contrat' && $lines[$i]->statut == 5) continue;
|
if (! isset( $conf->global->CONTRACT_EXCLUDE_SERVICES_STATUS_FOR_INVOICE)) $conf->global->CONTRACT_EXCLUDE_SERVICES_STATUS_FOR_INVOICE = '0,5';
|
||||||
|
if($srcobject->element == 'contrat' && in_array($lines[$i]->statut, explode(',', $conf->global->CONTRACT_EXCLUDE_SERVICES_STATUS_FOR_INVOICE))) continue;
|
||||||
|
|
||||||
$label=(! empty($lines[$i]->label)?$lines[$i]->label:'');
|
$label=(! empty($lines[$i]->label)?$lines[$i]->label:'');
|
||||||
$desc=(! empty($lines[$i]->desc)?$lines[$i]->desc:$lines[$i]->libelle);
|
$desc=(! empty($lines[$i]->desc)?$lines[$i]->desc:$lines[$i]->libelle);
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user