|
@@ -38,6 +38,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';
|
|
@@ -565,22 +566,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
|
|
|
include DOL_DOCUMENT_ROOT.'/core/tpl/extrafields_list_search_sql.tpl.php';
|
|
@@ -1928,38 +1929,38 @@ while ($i < min($num, $limit)) {
|
|
|
}
|
|
|
// Accountancy code sell
|
|
|
if (!empty($arrayfields[$alias_product_perentity . '.accountancy_code_sell']['checked'])) {
|
|
|
- print '<td>'.$product_static->accountancy_code_sell.'</td>';
|
|
|
+ print '<td>'.length_accountg($product_static->accountancy_code_sell).'</td>';
|
|
|
if (!$i) {
|
|
|
$totalarray['nbfield']++;
|
|
|
}
|
|
|
}
|
|
|
if (!empty($arrayfields[$alias_product_perentity . '.accountancy_code_sell_intra']['checked'])) {
|
|
|
- print '<td>'.$product_static->accountancy_code_sell_intra.'</td>';
|
|
|
+ print '<td>'.length_accountg($product_static->accountancy_code_sell_intra).'</td>';
|
|
|
if (!$i) {
|
|
|
$totalarray['nbfield']++;
|
|
|
}
|
|
|
}
|
|
|
if (!empty($arrayfields[$alias_product_perentity . '.accountancy_code_sell_export']['checked'])) {
|
|
|
- print '<td>'.$product_static->accountancy_code_sell_export.'</td>';
|
|
|
+ print '<td>'.length_accountg($product_static->accountancy_code_sell_export).'</td>';
|
|
|
if (!$i) {
|
|
|
$totalarray['nbfield']++;
|
|
|
}
|
|
|
}
|
|
|
// Accountancy code buy
|
|
|
if (!empty($arrayfields[$alias_product_perentity . '.accountancy_code_buy']['checked'])) {
|
|
|
- print '<td>'.$product_static->accountancy_code_buy.'</td>';
|
|
|
+ print '<td>'.length_accountg($product_static->accountancy_code_buy).'</td>';
|
|
|
if (!$i) {
|
|
|
$totalarray['nbfield']++;
|
|
|
}
|
|
|
}
|
|
|
if (!empty($arrayfields[$alias_product_perentity . '.accountancy_code_buy_intra']['checked'])) {
|
|
|
- print '<td>'.$product_static->accountancy_code_buy_intra.'</td>';
|
|
|
+ print '<td>'.length_accountg($product_static->accountancy_code_buy_intra).'</td>';
|
|
|
if (!$i) {
|
|
|
$totalarray['nbfield']++;
|
|
|
}
|
|
|
}
|
|
|
if (!empty($arrayfields[$alias_product_perentity . '.accountancy_code_buy_export']['checked'])) {
|
|
|
- print '<td>'.$product_static->accountancy_code_buy_export.'</td>';
|
|
|
+ print '<td>'.length_accountg($product_static->accountancy_code_buy_export).'</td>';
|
|
|
if (!$i) {
|
|
|
$totalarray['nbfield']++;
|
|
|
}
|