diff --git a/htdocs/accountancy/admin/productaccount.php b/htdocs/accountancy/admin/productaccount.php
index e07d0c24771..f6552d3d1e1 100644
--- a/htdocs/accountancy/admin/productaccount.php
+++ b/htdocs/accountancy/admin/productaccount.php
@@ -272,8 +272,8 @@ if ($result)
$i = 0;
$param='';
- if (! empty($contextpage) && $contextpage != $_SERVER["PHP_SELF"]) $param.='&contextpage='.$contextpage;
- if ($limit > 0 && $limit != $conf->liste_limit) $param.='&limit='.$limit;
+ if (! empty($contextpage) && $contextpage != $_SERVER["PHP_SELF"]) $param.='&contextpage='.urlencode($contextpage);
+ if ($limit > 0 && $limit != $conf->liste_limit) $param.='&limit='.urlencode($limit);
if ($search_ref > 0) $param.="&search_desc=".urlencode($search_ref);
if ($search_label > 0) $param.="&search_desc=".urlencode($search_label);
if ($search_desc > 0) $param.="&search_desc=".urlencode($search_desc);
@@ -300,10 +300,10 @@ if ($result)
print '
';
print '| ' . $langs->trans('Options') . ' | ' . $langs->trans('Description') . ' | ';
print "
\n";
- print '| ' . $langs->trans('OptionModeProductSell') . ' | ';
+ print '
| ' . $langs->trans('OptionModeProductSell') . ' | ';
print ''.$langs->trans('OptionModeProductSellDesc');
print " |
\n";
- print '| ' . $langs->trans('OptionModeProductBuy') . ' | ';
+ print '
| ' . $langs->trans('OptionModeProductBuy') . ' | ';
print ''.$langs->trans('OptionModeProductBuyDesc')." |
\n";
print "\n";
@@ -328,9 +328,9 @@ if ($result)
print ' | ';
if (! empty($conf->global->ACCOUNTANCY_SHOW_PROD_DESC)) print ' | ';
// On sell
- print ' | ';
+ if ($accounting_product_mode == 'ACCOUNTANCY_SELL') print ' | ';
// On buy
- print ' | ';
+ if ($accounting_product_mode == 'ACCOUNTANCY_BUY') print ' | ';
// Current account
print '';
print '';
@@ -348,11 +348,9 @@ if ($result)
print_liste_field_titre("Ref", $_SERVER["PHP_SELF"], "p.ref", "", $param, '', $sortfield, $sortorder);
print_liste_field_titre("Label", $_SERVER["PHP_SELF"], "p.label", "", $param, '', $sortfield, $sortorder);
if (! empty($conf->global->ACCOUNTANCY_SHOW_PROD_DESC)) print_liste_field_titre("Description", $_SERVER["PHP_SELF"], "p.description", "", $param, '', $sortfield, $sortorder);
- print_liste_field_titre("OnSell", $_SERVER["PHP_SELF"], "p.tosell", "", $param, 'align="center"', $sortfield, $sortorder);
- print_liste_field_titre("OnBuy", $_SERVER["PHP_SELF"], "p.tobuy", "", $param, 'align="center"', $sortfield, $sortorder);
- if ($accounting_product_mode == 'ACCOUNTANCY_BUY') {
- $fieldtosortaccount="p.accountancy_code_buy";
- }
+ if ($accounting_product_mode == 'ACCOUNTANCY_SELL') print_liste_field_titre("OnSell", $_SERVER["PHP_SELF"], "p.tosell", "", $param, 'align="center"', $sortfield, $sortorder);
+ if ($accounting_product_mode == 'ACCOUNTANCY_BUY') print_liste_field_titre("OnBuy", $_SERVER["PHP_SELF"], "p.tobuy", "", $param, 'align="center"', $sortfield, $sortorder);
+ if ($accounting_product_mode == 'ACCOUNTANCY_BUY') $fieldtosortaccount="p.accountancy_code_buy";
else $fieldtosortaccount="p.accountancy_code_sell";
print_liste_field_titre("CurrentDedicatedAccountingAccount", $_SERVER["PHP_SELF"], $fieldtosortaccount, "", $param, '', $sortfield, $sortorder);
print_liste_field_titre("AssignDedicatedAccountingAccount");
@@ -410,9 +408,11 @@ if ($result)
print ' | ' . nl2br(dol_trunc($obj->description, $trunclengh)) . ' | ';
}
- print ''.$product_static->getLibStatut(3, 0).' | ';
+ if ($accounting_product_mode == 'ACCOUNTANCY_SELL')
+ print ''.$product_static->getLibStatut(3, 0).' | ';
- print ''.$product_static->getLibStatut(3, 1).' | ';
+ if ($accounting_product_mode == 'ACCOUNTANCY_BUY')
+ print ''.$product_static->getLibStatut(3, 1).' | ';
// Current accounting account
print '';
diff --git a/htdocs/compta/tva/index.php b/htdocs/compta/tva/index.php
index f6d4bdc4524..1c9632fac61 100644
--- a/htdocs/compta/tva/index.php
+++ b/htdocs/compta/tva/index.php
@@ -179,7 +179,7 @@ print ' | ';
print '| '.$langs->trans("Year")." ".$y.' | ';
print ''.$langs->trans("VATToPay").' | ';
print ''.$langs->trans("VATToCollect").' | ';
-print ''.$langs->trans("TotalToPay").' | ';
+print ''.$langs->trans("Balance").' | ';
print ' | '."\n";
print '
'."\n";
diff --git a/htdocs/compta/tva/quadri_detail.php b/htdocs/compta/tva/quadri_detail.php
index f6286c32420..713cab1dc13 100644
--- a/htdocs/compta/tva/quadri_detail.php
+++ b/htdocs/compta/tva/quadri_detail.php
@@ -523,7 +523,7 @@ if (! is_array($x_coll) || ! is_array($x_paye))
// Print table headers for this quadri - expenses now
print '';
print '| '.$elementsup.' | ';
- print ''.$langs->trans("Date").' | ';
+ print ''.$langs->trans("DateInvoice").' | ';
if ($conf->global->TAX_MODE_BUY_PRODUCT == 'payment' || $conf->global->TAX_MODE_BUY_SERVICE == 'payment') print ''.$langs->trans("DatePayment").' | ';
else print ' | ';
print ''.$namesup.' | ';