Fix do not show cloning of virtual product if option is off

This commit is contained in:
Laurent Destailleur 2016-11-14 01:47:34 +01:00
parent b79048e6bd
commit 381b77850c
6 changed files with 17 additions and 40 deletions

View File

@ -3342,7 +3342,7 @@ class Form
}
// Now add questions
$more.='<table class="paddingrightonly" width="100%">'."\n";
$more.='<table class="paddingtopbottomonly" width="100%">'."\n";
$more.='<tr><td colspan="3">'.(! empty($formquestion['text'])?$formquestion['text']:'').'</td></tr>'."\n";
foreach ($formquestion as $key => $input)
{

View File

@ -89,7 +89,7 @@ NoteNotVisibleOnBill=Note (not visible on invoices, proposals...)
ServiceLimitedDuration=If product is a service with limited duration:
MultiPricesAbility=Several segment of prices per product/service (each customer is in one segment)
MultiPricesNumPrices=Number of prices
AssociatedProductsAbility=Activate the package feature
AssociatedProductsAbility=Activate the feature to manage virtual products
AssociatedProducts=Virtual product
AssociatedProductsNumber=Number of products composing this virtual product
ParentProductsNumber=Number of parent packaging product

View File

@ -1748,8 +1748,11 @@ $formquestionclone=array(
array('type' => 'text', 'name' => 'clone_ref','label' => $langs->trans("NewRefForClone"), 'value' => empty($tmpcode) ? $langs->trans("CopyOf").' '.$object->ref : $tmpcode, 'size'=>24),
array('type' => 'checkbox', 'name' => 'clone_content','label' => $langs->trans("CloneContentProduct"), 'value' => 1),
array('type' => 'checkbox', 'name' => 'clone_prices', 'label' => $langs->trans("ClonePricesProduct").' ('.$langs->trans("FeatureNotYetAvailable").')', 'value' => 0, 'disabled' => true),
array('type' => 'checkbox', 'name' => 'clone_composition', 'label' => $langs->trans('CloneCompositionProduct'), 'value' => 1)
);
if (! empty($conf->global->PRODUIT_SOUSPRODUITS))
{
$formquestionclone[]=array('type' => 'checkbox', 'name' => 'clone_composition', 'label' => $langs->trans('CloneCompositionProduct'), 'value' => 1);
}
// Confirm delete product
if (($action == 'delete' && (empty($conf->use_javascript_ajax) || ! empty($conf->dol_use_jmobile))) // Output when action = clone if jmobile or no js

View File

@ -2856,7 +2856,7 @@ class Product extends CommonObject
$sql = 'INSERT INTO '.MAIN_DB_PREFIX.'product_association (fk_product_pere, fk_product_fils, qty)';
$sql.= " SELECT ".$toId.", fk_product_fils, qty FROM ".MAIN_DB_PREFIX."product_association";
$sql.= " WHERE fk_product_pere = '".$fromId."'";
$sql.= " WHERE fk_product_pere = ".$fromId;
dol_syslog(get_class($this).'::clone_association', LOG_DEBUG);
if (! $this->db->query($sql))

View File

@ -2406,6 +2406,7 @@ td.border, div.tagtable div div.border {
width:auto;
}
/* Main boxes */
table.liste, table.noborder, table.formdoc, div.noborder {
@ -2418,27 +2419,15 @@ table.liste, table.noborder, table.formdoc, div.noborder {
border-top-color: rgb(<?php echo $colortopbordertitle1 ?>);
border-top-style: solid;
/* border-right-width: 1px;
border-right-color: #BBB;
border-right-style: solid;
border-left-width: 1px;
border-left-color: #BBB;
border-left-style: solid;
*/
border-bottom-width: 1px;
border-bottom-color: #BBB;
border-bottom-style: solid;
margin: 0px 0px 5px 0px;
/* -moz-box-shadow: 2px 2px 4px #CCC;
-webkit-box-shadow: 2px 2px 4px #CCC;
box-shadow: 2px 2px 4px #CCC;
-moz-border-radius: 0.2em;
-webkit-border-radius: 0.2em;
border-radius: 0.2em;*/
}
table.paddingtopbottomonly tr td {
padding-top: 1px;
padding-bottom: 2px;
}
.liste_titre_add td, .liste_titre_add th, .liste_titre_add .tagtd
{

View File

@ -2301,6 +2301,7 @@ td.border, div.tagtable div div.border {
width:auto;
}
/* Main boxes */
table.liste, table.noborder, table.formdoc, div.noborder {
@ -2313,36 +2314,16 @@ table.liste, table.noborder, table.formdoc, div.noborder {
border-top-color: rgb(<?php echo $colortopbordertitle1 ?>);
border-top-style: solid;
/* border-right-width: 1px;
border-right-color: #BBB;
border-right-style: solid;
border-left-width: 1px;
border-left-color: #BBB;
border-left-style: solid;
*/
border-bottom-width: 1px;
border-bottom-color: #BBB;
border-bottom-style: solid;
margin: 0px 0px 8px 0px;
/*
-moz-box-shadow: 2px 2px 4px #CCC;
-webkit-box-shadow: 2px 2px 4px #CCC;
box-shadow: 2px 2px 4px #CCC;
*/
/* box-shadow: 0 0 3px rgba(0,0,0,0.16); */
-moz-border-radius: 0.1em;
-webkit-border-radius: 0.1em;
border-radius: 0.1em;
}
/*
#tablelines tr.liste_titre:first-child td, form.formnoborder, tr.liste_titre.trnoborder td {
border-top-width: 1px;
border-top-color: rgb(<?php echo $colortopbordertitle1 ?>);
border-top-style: solid;
}*/
table.noborder tr, div.noborder form {
border-top-color: #FEFEFE;
@ -2355,6 +2336,10 @@ table.noborder tr, div.noborder form {
border-left-style: solid;
min-height: 26px;
}
table.paddingtopbottomonly tr td {
padding-top: 1px;
padding-bottom: 2px;
}
.liste_titre_add td, .liste_titre_add th, .liste_titre_add .tagtd
{