diff --git a/htdocs/product/card.php b/htdocs/product/card.php index 1b04a77083c..3528d5ef299 100644 --- a/htdocs/product/card.php +++ b/htdocs/product/card.php @@ -1188,11 +1188,13 @@ if (is_object($objcanvas) && $objcanvas->displayCanvasExists($action)) { print ""; - // Public URL - print ''.$langs->trans("PublicUrl").''; - print img_picto('', 'globe', 'class="pictofixedwidth"'); - print ''; - print ''; + if (empty($conf->global->PRODUCT_DISABLE_PUBLIC_URL)) { + // Public URL + print ''.$langs->trans("PublicUrl").''; + print img_picto('', 'globe', 'class="pictofixedwidth"'); + print ''; + print ''; + } if ($type != 1 && !empty($conf->stock->enabled)) { // Default warehouse @@ -1205,20 +1207,24 @@ if (is_object($objcanvas) && $objcanvas->displayCanvasExists($action)) { print ''; print ''; - // Stock min level - print ''.$form->textwithpicto($langs->trans("StockLimit"), $langs->trans("StockLimitDesc"), 1).''; - print ''; - print ''; + if (empty($conf->global->PRODUCT_DISABLE_STOCK_LEVELS)) { + // Stock min level + print ''.$form->textwithpicto($langs->trans("StockLimit"), $langs->trans("StockLimitDesc"), 1).''; + print ''; + print ''; - print ''; + print ''; - // Stock desired level - print ''.$form->textwithpicto($langs->trans("DesiredStock"), $langs->trans("DesiredStockDesc"), 1).''; - print ''; - print ''; + // Stock desired level + print ''.$form->textwithpicto($langs->trans("DesiredStock"), $langs->trans("DesiredStockDesc"), 1).''; + print ''; + print ''; + } } else { - print ''; - print ''; + if (empty($conf->global->PRODUCT_DISABLE_STOCK_LEVELS)) { + print ''; + print ''; + } } // Duration @@ -1230,17 +1236,21 @@ if (is_object($objcanvas) && $objcanvas->displayCanvasExists($action)) { } if ($type != 1) { // Nature, Weight and volume only applies to products and not to services - // Nature - print ''.$form->textwithpicto($langs->trans("NatureOfProductShort"), $langs->trans("NatureOfProductDesc")).''; - $statutarray = array('1' => $langs->trans("Finished"), '0' => $langs->trans("RowMaterial")); - print $form->selectarray('finished', $statutarray, GETPOST('finished', 'alpha'), 1); - print ''; + if (empty($conf->global->PRODUCT_DISABLE_NATURE)) { + // Nature + print ''.$form->textwithpicto($langs->trans("NatureOfProductShort"), $langs->trans("NatureOfProductDesc")).''; + $statutarray = array('1' => $langs->trans("Finished"), '0' => $langs->trans("RowMaterial")); + print $form->selectarray('finished', $statutarray, GETPOST('finished', 'alpha'), 1); + print ''; + } - // Brut Weight - print ''.$langs->trans("Weight").''; - print ''; - print $formproduct->selectMeasuringUnits("weight_units", "weight", GETPOSTISSET('weight_units') ?GETPOST('weight_units', 'alpha') : (empty($conf->global->MAIN_WEIGHT_DEFAULT_UNIT) ? 0 : $conf->global->MAIN_WEIGHT_DEFAULT_UNIT), 0, 2); - print ''; + if (empty($conf->global->PRODUCT_DISABLE_WEIGHT)) { + // Brut Weight + print ''.$langs->trans("Weight").''; + print ''; + print $formproduct->selectMeasuringUnits("weight_units", "weight", GETPOSTISSET('weight_units') ?GETPOST('weight_units', 'alpha') : (empty($conf->global->MAIN_WEIGHT_DEFAULT_UNIT) ? 0 : $conf->global->MAIN_WEIGHT_DEFAULT_UNIT), 0, 2); + print ''; + } // Brut Length if (empty($conf->global->PRODUCT_DISABLE_SIZE)) { @@ -1349,170 +1359,174 @@ if (is_object($objcanvas) && $objcanvas->displayCanvasExists($action)) { print '
'; - if (!empty($conf->global->PRODUIT_MULTIPRICES)) { - // We do no show price array on create when multiprices enabled. - // We must set them on prices tab. - print ''; - // VAT - print ''; - print '
'.$langs->trans("VATRate").''; - $defaultva = get_default_tva($mysoc, $mysoc); - print $form->load_tva("tva_tx", $defaultva, $mysoc, $mysoc, 0, 0, '', false, 1); - print '
'; + if (empty($conf->global->PRODUCT_DISABLE_PRICES)) { + if (!empty($conf->global->PRODUIT_MULTIPRICES)) { + // We do no show price array on create when multiprices enabled. + // We must set them on prices tab. + print ''; + // VAT + print ''; + print '
'.$langs->trans("VATRate").''; + $defaultva = get_default_tva($mysoc, $mysoc); + print $form->load_tva("tva_tx", $defaultva, $mysoc, $mysoc, 0, 0, '', false, 1); + print '
'; - print '
'; - } else { - print ''; + print '
'; + } else { + print '
'; - // Price - print ''; - print ''; + // Price + print ''; + print ''; - // Min price - print ''; - print ''; + // Min price + print ''; + print ''; - // VAT - print ''; + // VAT + print ''; - print '
'.$langs->trans("SellingPrice").''; - print $form->selectPriceBaseType($conf->global->PRODUCT_PRICE_BASE_TYPE, "price_base_type"); - print '
'.$langs->trans("SellingPrice").''; + print $form->selectPriceBaseType($conf->global->PRODUCT_PRICE_BASE_TYPE, "price_base_type"); + print '
'.$langs->trans("MinPrice").''; - print '
'.$langs->trans("MinPrice").''; + print '
'.$langs->trans("VATRate").''; - $defaultva = get_default_tva($mysoc, $mysoc); - print $form->load_tva("tva_tx", $defaultva, $mysoc, $mysoc, 0, 0, '', false, 1); - print '
'.$langs->trans("VATRate").''; + $defaultva = get_default_tva($mysoc, $mysoc); + print $form->load_tva("tva_tx", $defaultva, $mysoc, $mysoc, 0, 0, '', false, 1); + print '
'; + print ''; - print '
'; + print '
'; + } } // Accountancy codes print ''."\n"; print ''; - if (!empty($conf->accounting->enabled)) { - // Accountancy_code_sell - print ''; - print ''; - - // Accountancy_code_sell_intra - if ($mysoc->isInEEC()) { - print ''; + if (empty($conf->global->PRODUCT_DISABLE_ACCOUNTING)) { + if (!empty($conf->accounting->enabled)) { + // Accountancy_code_sell + print ''; print ''; - } - // Accountancy_code_sell_export - print ''; - print ''; + // Accountancy_code_sell_intra + if ($mysoc->isInEEC()) { + print ''; + print ''; + } - // Accountancy_code_buy - print ''; - print ''; - - // Accountancy_code_buy_intra - if ($mysoc->isInEEC()) { - print ''; + // Accountancy_code_sell_export + print ''; print ''; + + // Accountancy_code_buy + print ''; + print ''; + + // Accountancy_code_buy_intra + if ($mysoc->isInEEC()) { + print ''; + print ''; + } + + // Accountancy_code_buy_export + print ''; + print ''; + } else {// For external software + if (!empty($accountancy_code_sell)) { + $object->accountancy_code_sell = $accountancy_code_sell; + } + if (!empty($accountancy_code_sell_intra)) { + $object->accountancy_code_sell_intra = $accountancy_code_sell_intra; + } + if (!empty($accountancy_code_sell_export)) { + $object->accountancy_code_sell_export = $accountancy_code_sell_export; + } + if (!empty($accountancy_code_buy)) { + $object->accountancy_code_buy = $accountancy_code_buy; + } + if (!empty($accountancy_code_buy_intra)) { + $object->accountancy_code_buy_intra = $accountancy_code_buy_intra; + } + if (!empty($accountancy_code_buy_export)) { + $object->accountancy_code_buy_export = $accountancy_code_buy_export; + } + + // Accountancy_code_sell + print ''; + print ''; + + // Accountancy_code_sell_intra + if ($mysoc->isInEEC()) { + print ''; + print ''; + } + + // Accountancy_code_sell_export + print ''; + print ''; + + // Accountancy_code_buy + print ''; + print ''; + + // Accountancy_code_buy_intra + if ($mysoc->isInEEC()) { + print ''; + print ''; + } + + // Accountancy_code_buy_export + print ''; + print ''; } - - // Accountancy_code_buy_export - print ''; - print ''; - } else {// For external software - if (!empty($accountancy_code_sell)) { - $object->accountancy_code_sell = $accountancy_code_sell; - } - if (!empty($accountancy_code_sell_intra)) { - $object->accountancy_code_sell_intra = $accountancy_code_sell_intra; - } - if (!empty($accountancy_code_sell_export)) { - $object->accountancy_code_sell_export = $accountancy_code_sell_export; - } - if (!empty($accountancy_code_buy)) { - $object->accountancy_code_buy = $accountancy_code_buy; - } - if (!empty($accountancy_code_buy_intra)) { - $object->accountancy_code_buy_intra = $accountancy_code_buy_intra; - } - if (!empty($accountancy_code_buy_export)) { - $object->accountancy_code_buy_export = $accountancy_code_buy_export; - } - - // Accountancy_code_sell - print ''; - print ''; - - // Accountancy_code_sell_intra - if ($mysoc->isInEEC()) { - print ''; - print ''; - } - - // Accountancy_code_sell_export - print ''; - print ''; - - // Accountancy_code_buy - print ''; - print ''; - - // Accountancy_code_buy_intra - if ($mysoc->isInEEC()) { - print ''; - print ''; - } - - // Accountancy_code_buy_export - print ''; - print ''; } print '
'.$langs->trans("ProductAccountancySellCode").''; - if ($type == 0) { - $accountancy_code_sell = (GETPOSTISSET('accountancy_code_sell') ? GETPOST('accountancy_code_sell', 'alpha') : $conf->global->ACCOUNTING_PRODUCT_SOLD_ACCOUNT); - } else { - $accountancy_code_sell = (GETPOSTISSET('accountancy_code_sell') ? GETPOST('accountancy_code_sell', 'alpha') : $conf->global->ACCOUNTING_SERVICE_SOLD_ACCOUNT); - } - print $formaccounting->select_account($accountancy_code_sell, 'accountancy_code_sell', 1, null, 1, 1, 'minwidth150 maxwidth300', 1); - print '
'.$langs->trans("ProductAccountancySellIntraCode").'
'.$langs->trans("ProductAccountancySellCode").''; if ($type == 0) { - $accountancy_code_sell_intra = (GETPOSTISSET('accountancy_code_sell_intra') ? GETPOST('accountancy_code_sell_intra', 'alpha') : $conf->global->ACCOUNTING_PRODUCT_SOLD_INTRA_ACCOUNT); + $accountancy_code_sell = (GETPOSTISSET('accountancy_code_sell') ? GETPOST('accountancy_code_sell', 'alpha') : $conf->global->ACCOUNTING_PRODUCT_SOLD_ACCOUNT); } else { - $accountancy_code_sell_intra = (GETPOSTISSET('accountancy_code_sell_intra') ? GETPOST('accountancy_code_sell_intra', 'alpha') : $conf->global->ACCOUNTING_SERVICE_SOLD_INTRA_ACCOUNT); + $accountancy_code_sell = (GETPOSTISSET('accountancy_code_sell') ? GETPOST('accountancy_code_sell', 'alpha') : $conf->global->ACCOUNTING_SERVICE_SOLD_ACCOUNT); } - print $formaccounting->select_account($accountancy_code_sell_intra, 'accountancy_code_sell_intra', 1, null, 1, 1, 'minwidth150 maxwidth300', 1); + print $formaccounting->select_account($accountancy_code_sell, 'accountancy_code_sell', 1, null, 1, 1, 'minwidth150 maxwidth300', 1); print '
'.$langs->trans("ProductAccountancySellExportCode").''; - if ($type == 0) { - $accountancy_code_sell_export = (GETPOST('accountancy_code_sell_export') ? GETPOST('accountancy_code_sell_export', 'alpha') : $conf->global->ACCOUNTING_PRODUCT_SOLD_EXPORT_ACCOUNT); - } else { - $accountancy_code_sell_export = (GETPOST('accountancy_code_sell_export') ? GETPOST('accountancy_code_sell_export', 'alpha') : $conf->global->ACCOUNTING_SERVICE_SOLD_EXPORT_ACCOUNT); - } - print $formaccounting->select_account($accountancy_code_sell_export, 'accountancy_code_sell_export', 1, null, 1, 1, 'minwidth150 maxwidth300', 1); - print '
'.$langs->trans("ProductAccountancySellIntraCode").''; + if ($type == 0) { + $accountancy_code_sell_intra = (GETPOSTISSET('accountancy_code_sell_intra') ? GETPOST('accountancy_code_sell_intra', 'alpha') : $conf->global->ACCOUNTING_PRODUCT_SOLD_INTRA_ACCOUNT); + } else { + $accountancy_code_sell_intra = (GETPOSTISSET('accountancy_code_sell_intra') ? GETPOST('accountancy_code_sell_intra', 'alpha') : $conf->global->ACCOUNTING_SERVICE_SOLD_INTRA_ACCOUNT); + } + print $formaccounting->select_account($accountancy_code_sell_intra, 'accountancy_code_sell_intra', 1, null, 1, 1, 'minwidth150 maxwidth300', 1); + print '
'.$langs->trans("ProductAccountancyBuyCode").''; - if ($type == 0) { - $accountancy_code_buy = (GETPOST('accountancy_code_buy', 'alpha') ? (GETPOST('accountancy_code_buy', 'alpha')) : $conf->global->ACCOUNTING_PRODUCT_BUY_ACCOUNT); - } else { - $accountancy_code_buy = (GETPOST('accountancy_code_buy', 'alpha') ? (GETPOST('accountancy_code_buy', 'alpha')) : $conf->global->ACCOUNTING_SERVICE_BUY_ACCOUNT); - } - print $formaccounting->select_account($accountancy_code_buy, 'accountancy_code_buy', 1, null, 1, 1, 'minwidth150 maxwidth300', 1); - print '
'.$langs->trans("ProductAccountancyBuyIntraCode").'
'.$langs->trans("ProductAccountancySellExportCode").''; if ($type == 0) { - $accountancy_code_buy_intra = (GETPOSTISSET('accountancy_code_buy_intra') ? GETPOST('accountancy_code_buy_intra', 'alpha') : $conf->global->ACCOUNTING_PRODUCT_BUY_INTRA_ACCOUNT); + $accountancy_code_sell_export = (GETPOST('accountancy_code_sell_export') ? GETPOST('accountancy_code_sell_export', 'alpha') : $conf->global->ACCOUNTING_PRODUCT_SOLD_EXPORT_ACCOUNT); } else { - $accountancy_code_buy_intra = (GETPOSTISSET('accountancy_code_buy_intra') ? GETPOST('accountancy_code_buy_intra', 'alpha') : $conf->global->ACCOUNTING_SERVICE_BUY_INTRA_ACCOUNT); + $accountancy_code_sell_export = (GETPOST('accountancy_code_sell_export') ? GETPOST('accountancy_code_sell_export', 'alpha') : $conf->global->ACCOUNTING_SERVICE_SOLD_EXPORT_ACCOUNT); } - print $formaccounting->select_account($accountancy_code_buy_intra, 'accountancy_code_buy_intra', 1, null, 1, 1, 'minwidth150 maxwidth300', 1); + print $formaccounting->select_account($accountancy_code_sell_export, 'accountancy_code_sell_export', 1, null, 1, 1, 'minwidth150 maxwidth300', 1); + print '
'.$langs->trans("ProductAccountancyBuyCode").''; + if ($type == 0) { + $accountancy_code_buy = (GETPOST('accountancy_code_buy', 'alpha') ? (GETPOST('accountancy_code_buy', 'alpha')) : $conf->global->ACCOUNTING_PRODUCT_BUY_ACCOUNT); + } else { + $accountancy_code_buy = (GETPOST('accountancy_code_buy', 'alpha') ? (GETPOST('accountancy_code_buy', 'alpha')) : $conf->global->ACCOUNTING_SERVICE_BUY_ACCOUNT); + } + print $formaccounting->select_account($accountancy_code_buy, 'accountancy_code_buy', 1, null, 1, 1, 'minwidth150 maxwidth300', 1); + print '
'.$langs->trans("ProductAccountancyBuyIntraCode").''; + if ($type == 0) { + $accountancy_code_buy_intra = (GETPOSTISSET('accountancy_code_buy_intra') ? GETPOST('accountancy_code_buy_intra', 'alpha') : $conf->global->ACCOUNTING_PRODUCT_BUY_INTRA_ACCOUNT); + } else { + $accountancy_code_buy_intra = (GETPOSTISSET('accountancy_code_buy_intra') ? GETPOST('accountancy_code_buy_intra', 'alpha') : $conf->global->ACCOUNTING_SERVICE_BUY_INTRA_ACCOUNT); + } + print $formaccounting->select_account($accountancy_code_buy_intra, 'accountancy_code_buy_intra', 1, null, 1, 1, 'minwidth150 maxwidth300', 1); + print '
'.$langs->trans("ProductAccountancyBuyExportCode").''; + if ($type == 0) { + $accountancy_code_buy_export = (GETPOST('accountancy_code_buy_export') ? GETPOST('accountancy_code_buy_export', 'alpha') : $conf->global->ACCOUNTING_PRODUCT_BUY_EXPORT_ACCOUNT); + } else { + $accountancy_code_buy_export = (GETPOST('accountancy_code_buy_export') ? GETPOST('accountancy_code_buy_export', 'alpha') : $conf->global->ACCOUNTING_SERVICE_BUY_EXPORT_ACCOUNT); + } + print $formaccounting->select_account($accountancy_code_buy_export, 'accountancy_code_buy_export', 1, null, 1, 1, 'minwidth150 maxwidth300', 1); + print '
'.$langs->trans("ProductAccountancySellCode").''; + print '
'.$langs->trans("ProductAccountancySellIntraCode").''; + print '
'.$langs->trans("ProductAccountancySellExportCode").''; + print '
'.$langs->trans("ProductAccountancyBuyCode").''; + print '
'.$langs->trans("ProductAccountancyBuyIntraCode").''; + print '
'.$langs->trans("ProductAccountancyBuyExportCode").''; print '
'.$langs->trans("ProductAccountancyBuyExportCode").''; - if ($type == 0) { - $accountancy_code_buy_export = (GETPOST('accountancy_code_buy_export') ? GETPOST('accountancy_code_buy_export', 'alpha') : $conf->global->ACCOUNTING_PRODUCT_BUY_EXPORT_ACCOUNT); - } else { - $accountancy_code_buy_export = (GETPOST('accountancy_code_buy_export') ? GETPOST('accountancy_code_buy_export', 'alpha') : $conf->global->ACCOUNTING_SERVICE_BUY_EXPORT_ACCOUNT); - } - print $formaccounting->select_account($accountancy_code_buy_export, 'accountancy_code_buy_export', 1, null, 1, 1, 'minwidth150 maxwidth300', 1); - print '
'.$langs->trans("ProductAccountancySellCode").''; - print '
'.$langs->trans("ProductAccountancySellIntraCode").''; - print '
'.$langs->trans("ProductAccountancySellExportCode").''; - print '
'.$langs->trans("ProductAccountancyBuyCode").''; - print '
'.$langs->trans("ProductAccountancyBuyIntraCode").''; - print '
'.$langs->trans("ProductAccountancyBuyExportCode").''; - print '
'; @@ -1708,9 +1722,11 @@ if (is_object($objcanvas) && $objcanvas->displayCanvasExists($action)) { print "\n"; // Public Url - print ''.$langs->trans("PublicUrl").''; - print ''; - print ''; + if (empty($conf->global->PRODUCT_DISABLE_PUBLIC_URL)) { + print ''.$langs->trans("PublicUrl").''; + print ''; + print ''; + } // Stock if ($object->isProduct() && !empty($conf->stock->enabled)) { @@ -1743,16 +1759,20 @@ if (is_object($objcanvas) && $objcanvas->displayCanvasExists($action)) { print $formproduct->selectMeasuringUnits("duration_unit", "time", $object->duration_unit, 0, 1); print ''; } else { - // Nature - print ''.$form->textwithpicto($langs->trans("NatureOfProductShort"), $langs->trans("NatureOfProductDesc")).''; - print $formproduct->selectProductNature('finished', $object->finished); - print ''; + if (empty($conf->global->PRODUCT_DISABLE_NATURE)) { + // Nature + print ''.$form->textwithpicto($langs->trans("NatureOfProductShort"), $langs->trans("NatureOfProductDesc")).''; + print $formproduct->selectProductNature('finished', $object->finished); + print ''; + } - // Brut Weight - print ''.$langs->trans("Weight").''; - print ' '; - print $formproduct->selectMeasuringUnits("weight_units", "weight", $object->weight_units, 0, 2); - print ''; + if (empty($conf->global->PRODUCT_DISABLE_WEIGHT)) { + // Brut Weight + print ''.$langs->trans("Weight").''; + print ' '; + print $formproduct->selectMeasuringUnits("weight_units", "weight", $object->weight_units, 0, 2); + print ''; + } if (empty($conf->global->PRODUCT_DISABLE_SIZE)) { // Brut Length @@ -1867,81 +1887,83 @@ if (is_object($objcanvas) && $objcanvas->displayCanvasExists($action)) { print ''; - if (!empty($conf->accounting->enabled)) { - // Accountancy_code_sell - print ''; - print ''; - - // Accountancy_code_sell_intra - if ($mysoc->isInEEC()) { - print ''; + if (empty($conf->global->PRODUCT_DISABLE_ACCOUNTING)) { + if (!empty($conf->accounting->enabled)) { + // Accountancy_code_sell + print ''; print ''; - } - // Accountancy_code_sell_export - print ''; - print ''; + // Accountancy_code_sell_intra + if ($mysoc->isInEEC()) { + print ''; + print ''; + } - // Accountancy_code_buy - print ''; - print ''; - - // Accountancy_code_buy_intra - if ($mysoc->isInEEC()) { - print ''; + // Accountancy_code_sell_export + print ''; print ''; + + // Accountancy_code_buy + print ''; + print ''; + + // Accountancy_code_buy_intra + if ($mysoc->isInEEC()) { + print ''; + print ''; + } + + // Accountancy_code_buy_export + print ''; + print ''; + } else { + // For external software + // Accountancy_code_sell + print ''; + print ''; + + // Accountancy_code_sell_intra + if ($mysoc->isInEEC()) { + print ''; + print ''; + } + + // Accountancy_code_sell_export + print ''; + print ''; + + // Accountancy_code_buy + print ''; + print ''; + + // Accountancy_code_buy_intra + if ($mysoc->isInEEC()) { + print ''; + print ''; + } + + // Accountancy_code_buy_export + print ''; + print ''; } - - // Accountancy_code_buy_export - print ''; - print ''; - } else { - // For external software - // Accountancy_code_sell - print ''; - print ''; - - // Accountancy_code_sell_intra - if ($mysoc->isInEEC()) { - print ''; - print ''; - } - - // Accountancy_code_sell_export - print ''; - print ''; - - // Accountancy_code_buy - print ''; - print ''; - - // Accountancy_code_buy_intra - if ($mysoc->isInEEC()) { - print ''; - print ''; - } - - // Accountancy_code_buy_export - print ''; - print ''; } print '
'.$langs->trans("ProductAccountancySellCode").''; - print $formaccounting->select_account($object->accountancy_code_sell, 'accountancy_code_sell', 1, '', 1, 1, 'minwidth150 maxwidth300'); - print '
'.$langs->trans("ProductAccountancySellIntraCode").'
'.$langs->trans("ProductAccountancySellCode").''; - print $formaccounting->select_account($object->accountancy_code_sell_intra, 'accountancy_code_sell_intra', 1, '', 1, 1, 'minwidth150 maxwidth300'); + print $formaccounting->select_account($object->accountancy_code_sell, 'accountancy_code_sell', 1, '', 1, 1, 'minwidth150 maxwidth300'); print '
'.$langs->trans("ProductAccountancySellExportCode").''; - print $formaccounting->select_account($object->accountancy_code_sell_export, 'accountancy_code_sell_export', 1, '', 1, 1, 'minwidth150 maxwidth300'); - print '
'.$langs->trans("ProductAccountancySellIntraCode").''; + print $formaccounting->select_account($object->accountancy_code_sell_intra, 'accountancy_code_sell_intra', 1, '', 1, 1, 'minwidth150 maxwidth300'); + print '
'.$langs->trans("ProductAccountancyBuyCode").''; - print $formaccounting->select_account($object->accountancy_code_buy, 'accountancy_code_buy', 1, '', 1, 1, 'minwidth150 maxwidth300'); - print '
'.$langs->trans("ProductAccountancyBuyIntraCode").'
'.$langs->trans("ProductAccountancySellExportCode").''; - print $formaccounting->select_account($object->accountancy_code_buy_intra, 'accountancy_code_buy_intra', 1, '', 1, 1, 'minwidth150 maxwidth300'); + print $formaccounting->select_account($object->accountancy_code_sell_export, 'accountancy_code_sell_export', 1, '', 1, 1, 'minwidth150 maxwidth300'); + print '
'.$langs->trans("ProductAccountancyBuyCode").''; + print $formaccounting->select_account($object->accountancy_code_buy, 'accountancy_code_buy', 1, '', 1, 1, 'minwidth150 maxwidth300'); + print '
'.$langs->trans("ProductAccountancyBuyIntraCode").''; + print $formaccounting->select_account($object->accountancy_code_buy_intra, 'accountancy_code_buy_intra', 1, '', 1, 1, 'minwidth150 maxwidth300'); + print '
'.$langs->trans("ProductAccountancyBuyExportCode").''; + print $formaccounting->select_account($object->accountancy_code_buy_export, 'accountancy_code_buy_export', 1, '', 1, 1, 'minwidth150 maxwidth300'); + print '
'.$langs->trans("ProductAccountancySellCode").''; + print '
'.$langs->trans("ProductAccountancySellIntraCode").''; + print '
'.$langs->trans("ProductAccountancySellExportCode").''; + print '
'.$langs->trans("ProductAccountancyBuyCode").''; + print '
'.$langs->trans("ProductAccountancyBuyIntraCode").''; + print '
'.$langs->trans("ProductAccountancyBuyExportCode").''; print '
'.$langs->trans("ProductAccountancyBuyExportCode").''; - print $formaccounting->select_account($object->accountancy_code_buy_export, 'accountancy_code_buy_export', 1, '', 1, 1, 'minwidth150 maxwidth300'); - print '
'.$langs->trans("ProductAccountancySellCode").''; - print '
'.$langs->trans("ProductAccountancySellIntraCode").''; - print '
'.$langs->trans("ProductAccountancySellExportCode").''; - print '
'.$langs->trans("ProductAccountancyBuyCode").''; - print '
'.$langs->trans("ProductAccountancyBuyIntraCode").''; - print '
'.$langs->trans("ProductAccountancyBuyExportCode").''; - print '
'; @@ -2170,9 +2192,11 @@ if (is_object($objcanvas) && $objcanvas->displayCanvasExists($action)) { print ''.$langs->trans("Description").''.(dol_textishtml($object->description) ? $object->description : dol_nl2br($object->description, 1, true)).''; // Public URL - print ''.$langs->trans("PublicUrl").''; - print dol_print_url($object->url); - print ''; + if (empty($conf->global->PRODUCT_DISABLE_PUBLIC_URL)) { + print ''.$langs->trans("PublicUrl").''; + print dol_print_url($object->url); + print ''; + } // Default warehouse if ($object->isProduct() && !empty($conf->stock->enabled)) { @@ -2218,19 +2242,23 @@ if (is_object($objcanvas) && $objcanvas->displayCanvasExists($action)) { print ''; } else { - // Nature - print ''.$form->textwithpicto($langs->trans("NatureOfProductShort"), $langs->trans("NatureOfProductDesc")).''; - print $object->getLibFinished(); - print ''; + if (empty($conf->global->PRODUCT_DISABLE_NATURE)) { + // Nature + print ''.$form->textwithpicto($langs->trans("NatureOfProductShort"), $langs->trans("NatureOfProductDesc")).''; + print $object->getLibFinished(); + print ''; + } // Brut Weight - print ''.$langs->trans("Weight").''; - if ($object->weight != '') { - print $object->weight." ".measuringUnitString(0, "weight", $object->weight_units); - } else { - print ' '; + if (empty($conf->global->PRODUCT_DISABLE_WEIGHT)) { + print ''.$langs->trans("Weight").''; + if ($object->weight != '') { + print $object->weight." ".measuringUnitString(0, "weight", $object->weight_units); + } else { + print ' '; + } + print "\n"; } - print "\n"; if (empty($conf->global->PRODUCT_DISABLE_SIZE)) { // Brut Length