Add option HT TTC créate product

This commit is contained in:
Anthony Berton 2020-05-03 19:47:10 +02:00
parent d27ccb0233
commit 485ef522d2
2 changed files with 12 additions and 1 deletions

View File

@ -129,6 +129,9 @@ if ($action == 'other')
}
}
$value = GETPOST('price_base_type', 'alpha');
$res = dolibarr_set_const($db, "PRODUCT_PRICE_BASE_TYPE", $value, 'chaine', 0, '', $conf->entity);
$value = GETPOST('PRODUIT_SOUSPRODUITS', 'alpha');
$res = dolibarr_set_const($db, "PRODUIT_SOUSPRODUITS", $value, 'chaine', 0, '', $conf->entity);
@ -598,6 +601,14 @@ if (!empty($conf->global->PRODUIT_MULTIPRICES) || !empty($conf->global->PRODUIT_
print '</tr>';
}
//Default product price base type
print '<tr class="oddeven">';
print '<td>'.$langs->trans("DefaultPriceType").'</td>';
print '<td width="60" class="right">';
print $form->selectPriceBaseType($conf->global->PRODUCT_PRICE_BASE_TYPE, "price_base_type");
print '</td>';
print '</tr>';
// sousproduits activation/desactivation
print '<tr class="oddeven">';

View File

@ -1222,7 +1222,7 @@ else
// Price
print '<tr><td class="titlefieldcreate">'.$langs->trans("SellingPrice").'</td>';
print '<td><input name="price" class="maxwidth50" value="'.$object->price.'">';
print $form->selectPriceBaseType($object->price_base_type, "price_base_type");
print $form->selectPriceBaseType($conf->global->PRODUCT_PRICE_BASE_TYPE, "price_base_type");
print '</td></tr>';
// Min price