|
@@ -4895,17 +4895,23 @@ class Product extends CommonObject
|
|
|
$label .= "<br><b>".$langs->trans("PMPValue").'</b>: '.price($this->pmp, 0, '', 1, -1, -1, $conf->currency);
|
|
|
}
|
|
|
|
|
|
- if (!empty($conf->accounting->enabled) && $this->status) {
|
|
|
- include_once DOL_DOCUMENT_ROOT.'/core/lib/accounting.lib.php';
|
|
|
- $label .= '<br><b>'.$langs->trans('ProductAccountancySellCode').':</b> '.length_accountg($this->accountancy_code_sell);
|
|
|
- $label .= '<br><b>'.$langs->trans('ProductAccountancySellIntraCode').':</b> '.length_accountg($this->accountancy_code_sell_intra);
|
|
|
- $label .= '<br><b>'.$langs->trans('ProductAccountancySellExportCode').':</b> '.length_accountg($this->accountancy_code_sell_export);
|
|
|
- }
|
|
|
- if (!empty($conf->accounting->enabled) && $this->status_buy) {
|
|
|
- include_once DOL_DOCUMENT_ROOT.'/core/lib/accounting.lib.php';
|
|
|
- $label .= '<br><b>'.$langs->trans('ProductAccountancyBuyCode').':</b> '.length_accountg($this->accountancy_code_buy);
|
|
|
- $label .= '<br><b>'.$langs->trans('ProductAccountancyBuyIntraCode').':</b> '.length_accountg($this->accountancy_code_buy_intra);
|
|
|
- $label .= '<br><b>'.$langs->trans('ProductAccountancyBuyExportCode').':</b> '.length_accountg($this->accountancy_code_buy_export);
|
|
|
+ if (!empty($conf->accounting->enabled)) {
|
|
|
+ if ($this->status) {
|
|
|
+ include_once DOL_DOCUMENT_ROOT.'/core/lib/accounting.lib.php';
|
|
|
+ $label .= '<br>';
|
|
|
+ $label .= '<br><b>'.$langs->trans('ProductAccountancySellCode').':</b> '.length_accountg($this->accountancy_code_sell);
|
|
|
+ $label .= '<br><b>'.$langs->trans('ProductAccountancySellIntraCode').':</b> '.length_accountg($this->accountancy_code_sell_intra);
|
|
|
+ $label .= '<br><b>'.$langs->trans('ProductAccountancySellExportCode').':</b> '.length_accountg($this->accountancy_code_sell_export);
|
|
|
+ }
|
|
|
+ if ($this->status_buy) {
|
|
|
+ include_once DOL_DOCUMENT_ROOT.'/core/lib/accounting.lib.php';
|
|
|
+ if (empty($this->status)) {
|
|
|
+ $label .= '<br>';
|
|
|
+ }
|
|
|
+ $label .= '<br><b>'.$langs->trans('ProductAccountancyBuyCode').':</b> '.length_accountg($this->accountancy_code_buy);
|
|
|
+ $label .= '<br><b>'.$langs->trans('ProductAccountancyBuyIntraCode').':</b> '.length_accountg($this->accountancy_code_buy_intra);
|
|
|
+ $label .= '<br><b>'.$langs->trans('ProductAccountancyBuyExportCode').':</b> '.length_accountg($this->accountancy_code_buy_export);
|
|
|
+ }
|
|
|
}
|
|
|
|
|
|
$linkclose = '';
|