|
@@ -36,6 +36,7 @@
|
|
|
require '../main.inc.php';
|
|
|
require_once DOL_DOCUMENT_ROOT.'/product/class/product.class.php';
|
|
|
require_once DOL_DOCUMENT_ROOT.'/fourn/class/fournisseur.product.class.php';
|
|
|
+require_once DOL_DOCUMENT_ROOT.'/core/lib/accounting.lib.php';
|
|
|
require_once DOL_DOCUMENT_ROOT.'/core/lib/company.lib.php';
|
|
|
require_once DOL_DOCUMENT_ROOT.'/core/lib/product.lib.php';
|
|
|
require_once DOL_DOCUMENT_ROOT.'/core/class/html.formcompany.class.php';
|
|
@@ -537,22 +538,22 @@ if ($search_finished >= 0 && $search_finished !== '') {
|
|
|
$sql .= " AND p.finished = ".((int) $search_finished);
|
|
|
}
|
|
|
if ($search_accountancy_code_sell) {
|
|
|
- $sql .= natural_search($alias_product_perentity . '.accountancy_code_sell', $search_accountancy_code_sell);
|
|
|
+ $sql .= natural_search($alias_product_perentity . '.accountancy_code_sell', clean_account($search_accountancy_code_sell));
|
|
|
}
|
|
|
if ($search_accountancy_code_sell_intra) {
|
|
|
- $sql .= natural_search($alias_product_perentity . '.accountancy_code_sell_intra', $search_accountancy_code_sell_intra);
|
|
|
+ $sql .= natural_search($alias_product_perentity . '.accountancy_code_sell_intra', clean_account($search_accountancy_code_sell_intra));
|
|
|
}
|
|
|
if ($search_accountancy_code_sell_export) {
|
|
|
- $sql .= natural_search($alias_product_perentity . '.accountancy_code_sell_export', $search_accountancy_code_sell_export);
|
|
|
+ $sql .= natural_search($alias_product_perentity . '.accountancy_code_sell_export', clean_account($search_accountancy_code_sell_export));
|
|
|
}
|
|
|
if ($search_accountancy_code_buy) {
|
|
|
- $sql .= natural_search($alias_product_perentity . '.accountancy_code_buy', $search_accountancy_code_buy);
|
|
|
+ $sql .= natural_search($alias_product_perentity . '.accountancy_code_buy', clean_account($search_accountancy_code_buy));
|
|
|
}
|
|
|
if ($search_accountancy_code_buy_intra) {
|
|
|
- $sql .= natural_search($alias_product_perentity . '.accountancy_code_buy_intra', $search_accountancy_code_buy_intra);
|
|
|
+ $sql .= natural_search($alias_product_perentity . '.accountancy_code_buy_intra', clean_account($search_accountancy_code_buy_intra));
|
|
|
}
|
|
|
if ($search_accountancy_code_buy_export) {
|
|
|
- $sql .= natural_search($alias_product_perentity . '.accountancy_code_buy_export', $search_accountancy_code_buy_export);
|
|
|
+ $sql .= natural_search($alias_product_perentity . '.accountancy_code_buy_export', clean_account($search_accountancy_code_buy_export));
|
|
|
}
|
|
|
|
|
|
// Add where from extra fields
|
|
@@ -1809,38 +1810,38 @@ if ($resql) {
|
|
|
}
|
|
|
// Accountancy code sell
|
|
|
if (!empty($arrayfields[$alias_product_perentity . '.accountancy_code_sell']['checked'])) {
|
|
|
- print '<td>'.$obj->accountancy_code_sell.'</td>';
|
|
|
+ print '<td>'.length_accountg($obj->accountancy_code_sell).'</td>';
|
|
|
if (!$i) {
|
|
|
$totalarray['nbfield']++;
|
|
|
}
|
|
|
}
|
|
|
if (!empty($arrayfields[$alias_product_perentity . '.accountancy_code_sell_intra']['checked'])) {
|
|
|
- print '<td>'.$obj->accountancy_code_sell_intra.'</td>';
|
|
|
+ print '<td>'.length_accountg($obj->accountancy_code_sell_intra).'</td>';
|
|
|
if (!$i) {
|
|
|
$totalarray['nbfield']++;
|
|
|
}
|
|
|
}
|
|
|
if (!empty($arrayfields[$alias_product_perentity . '.accountancy_code_sell_export']['checked'])) {
|
|
|
- print '<td>'.$obj->accountancy_code_sell_export.'</td>';
|
|
|
+ print '<td>'.length_accountg($obj->accountancy_code_sell_export).'</td>';
|
|
|
if (!$i) {
|
|
|
$totalarray['nbfield']++;
|
|
|
}
|
|
|
}
|
|
|
// Accountancy code buy
|
|
|
if (!empty($arrayfields[$alias_product_perentity . '.accountancy_code_buy']['checked'])) {
|
|
|
- print '<td>'.$obj->accountancy_code_buy.'</td>';
|
|
|
+ print '<td>'.length_accountg($obj->accountancy_code_buy).'</td>';
|
|
|
if (!$i) {
|
|
|
$totalarray['nbfield']++;
|
|
|
}
|
|
|
}
|
|
|
if (!empty($arrayfields[$alias_product_perentity . '.accountancy_code_buy_intra']['checked'])) {
|
|
|
- print '<td>'.$obj->accountancy_code_buy_intra.'</td>';
|
|
|
+ print '<td>'.length_accountg($obj->accountancy_code_buy_intra).'</td>';
|
|
|
if (!$i) {
|
|
|
$totalarray['nbfield']++;
|
|
|
}
|
|
|
}
|
|
|
if (!empty($arrayfields[$alias_product_perentity . '.accountancy_code_buy_export']['checked'])) {
|
|
|
- print '<td>'.$obj->accountancy_code_buy_export.'</td>';
|
|
|
+ print '<td>'.length_accountg($obj->accountancy_code_buy_export).'</td>';
|
|
|
if (!$i) {
|
|
|
$totalarray['nbfield']++;
|
|
|
}
|