diff --git a/htdocs/contrat/card.php b/htdocs/contrat/card.php index 8456b3e54b9..e4a8c644615 100644 --- a/htdocs/contrat/card.php +++ b/htdocs/contrat/card.php @@ -1,6 +1,6 @@ - * Copyright (C) 2004-2012 Laurent Destailleur + * Copyright (C) 2004-2014 Laurent Destailleur * Copyright (C) 2005-2014 Regis Houssin * Copyright (C) 2006 Andre Cianfarani * Copyright (C) 2010-2014 Juanjo Menent @@ -273,7 +273,7 @@ if ($action == 'add' && $user->rights->contrat->creer) { $product_type=($lines[$i]->product_type?$lines[$i]->product_type:0); - if ($product_type == 1) { //only services // TODO Exclude also deee + if ($product_type == 1 || (! empty($conf->global->CONTRACT_SUPPORT_PRODUCTS) && in_array($product_type, array(0,1)))) { // TODO Exclude also deee // service prédéfini if ($lines[$i]->fk_product > 0) { @@ -1020,13 +1020,18 @@ if ($action == 'create') print "\n"; + print '
'; + if (is_object($objectsrc)) { print ''; print ''; - } - print '
'; + if (empty($conf->global->CONTRACT_SUPPORT_PRODUCTS)) + { + print '
'.$langs->trans("Note").': '.$langs->trans("OnlyLinesWithTypeServiceAreUsed"); + } + } print "\n"; diff --git a/htdocs/langs/en_US/contracts.lang b/htdocs/langs/en_US/contracts.lang index 06c05e520fa..57ba3bb15d8 100644 --- a/htdocs/langs/en_US/contracts.lang +++ b/htdocs/langs/en_US/contracts.lang @@ -91,6 +91,7 @@ ListOfServicesToExpire=List of Services to expire NoteListOfYourExpiredServices=This list contains only services of contracts for third parties you are linked to as a sale representative. StandardContractsTemplate=Standard contracts template ContactNameAndSignature=For %s, name and signature: +OnlyLinesWithTypeServiceAreUsed=Only lines with type "Service" will be cloned. ##### Types de contacts ##### TypeContact_contrat_internal_SALESREPSIGN=Sales representative signing contract