diff --git a/htdocs/accountancy/customer/list.php b/htdocs/accountancy/customer/list.php
index abf5a8d4c2e..c07f4854b84 100644
--- a/htdocs/accountancy/customer/list.php
+++ b/htdocs/accountancy/customer/list.php
@@ -413,6 +413,9 @@ if ($result) {
if ($search_ref) {
$param .= '&search_ref='.urlencode($search_ref);
}
+ if ($search_label) {
+ $param .= '&search_label='.urlencode($search_label);
+ }
if ($search_desc) {
$param .= '&search_desc='.urlencode($search_desc);
}
@@ -491,7 +494,7 @@ if ($result) {
$searchpicto = $form->showFilterButtons();
print $searchpicto;
print '';
- print '';
+ print "\n";
print '
';
print_liste_field_titre("LineId", $_SERVER["PHP_SELF"], "l.rowid", "", $param, '', $sortfield, $sortorder);
@@ -539,7 +542,7 @@ if ($result) {
$thirdpartystatic->email = $objp->email;
$thirdpartystatic->country_code = $objp->country_code;
$thirdpartystatic->tva_intra = $objp->tva_intra;
- $thirdpartystatic->code_compta = $objp->company_code_sell;
+ $thirdpartystatic->code_compta_company = $objp->company_code_sell;
$product_static->ref = $objp->product_ref;
$product_static->id = $objp->product_id;
@@ -558,7 +561,7 @@ if ($result) {
$facture_static->ref = $objp->ref;
$facture_static->id = $objp->facid;
$facture_static->type = $objp->ftype;
- $facture_static->date = $objp->datef;
+ $facture_static->date = $db->jdate($objp->datef);
$facture_static_det->id = $objp->rowid;
$facture_static_det->total_ht = $objp->total_ht;
@@ -634,7 +637,7 @@ if ($result) {
// Ref Invoice
print '| '.$facture_static->getNomUrl(1).' | ';
- print ''.dol_print_date($db->jdate($facture_static->date), 'day').' | ';
+ print ''.dol_print_date($facture_static->date, 'day').' | ';
// Ref Product
print '';
@@ -728,7 +731,7 @@ if ($result) {
// Column with checkbox
print ' | ';
- if (!empty($suggestedid) && $suggestedaccountingaccountfor<>'') {
+ if (!empty($suggestedid) && $suggestedaccountingaccountfor <> '') {
$ischecked=1;
} elseif ($suggestedaccountingaccountfor == 'eecwithoutvatnumber') {
$ischecked = 0;
diff --git a/htdocs/accountancy/supplier/list.php b/htdocs/accountancy/supplier/list.php
index 20230c7cfad..b7e914c381a 100644
--- a/htdocs/accountancy/supplier/list.php
+++ b/htdocs/accountancy/supplier/list.php
@@ -291,7 +291,7 @@ if (strlen(trim($search_ref))) {
$sql .= natural_search("p.ref", $search_ref);
}
if (strlen(trim($search_label))) {
- $sql .= natural_search("f.libelle", $search_label);
+ $sql .= natural_search(array("p.label", "f.libelle"), $search_label);
}
if (strlen(trim($search_desc))) {
$sql .= natural_search("l.description", $search_desc);
@@ -546,7 +546,7 @@ if ($result) {
$thirdpartystatic->email = $objp->email;
$thirdpartystatic->country_code = $objp->country_code;
$thirdpartystatic->tva_intra = $objp->tva_intra;
- $thirdpartystatic->code_compta_fournisseur = $objp->company_code_buy;
+ $thirdpartystatic->code_compta_company = $objp->company_code_buy;
$product_static->ref = $objp->product_ref;
$product_static->id = $objp->product_id;
@@ -566,10 +566,11 @@ if ($result) {
$facturefourn_static->id = $objp->facid;
$facturefourn_static->type = $objp->ftype;
$facturefourn_static->label = $objp->invoice_label;
+ $facturefourn_static->date = $db->jdate($objp->datef);
$facturefourn_static_det->id = $objp->rowid;
$facturefourn_static_det->total_ht = $objp->total_ht;
- $facturefourn_static_det->tva_tx_line = $objp->tva_tx_line;
+ $facturefourn_static_det->tva_tx = $objp->tva_tx_line;
$facturefourn_static_det->vat_src_code = $objp->vat_src_code;
$facturefourn_static_det->product_type = $objp->type_l;
$facturefourn_static_det->desc = $objp->description;
@@ -608,6 +609,9 @@ if ($result) {
if (empty($code_buy_l) && empty($code_buy_p)) {
$code_buy_p_notset = 'color:red';
}
+ /*if ($suggestedaccountingaccountfor == 'eecwithoutvatnumber' && empty($code_sell_p_notset)) {
+ $code_sell_p_notset = 'color:orange';
+ }*/
// $code_buy_l is now default code of product/service
// $code_buy_p is now code of product/service
@@ -626,15 +630,15 @@ if ($result) {
print ' | ';
*/
- print ''.dol_print_date($db->jdate($facturefourn_static_det->datef), 'day').' | ';
+ print ''.dol_print_date($facturefourn_static->date, 'day').' | ';
// Ref Product
print '';
if ($product_static->id > 0) {
print $product_static->getNomUrl(1);
}
- if ($product_static->product_label) {
- print ' '.$product_static->product_label.'';
+ if ($product_static->label) {
+ print ' '.$product_static->label.'';
}
print ' | ';
@@ -650,11 +654,12 @@ if ($result) {
print '';
// Vat rate
+ $code_vat_differ='';
if ($objp->vat_tx_l != $objp->vat_tx_p && ! empty($objp->vat_tx_l)) { // Note: having a vat rate of 0 is often the normal case when sells is intra b2b or to export
$code_vat_differ = 'font-weight:bold; text-decoration:blink; color:red';
}
print '';
- print vatrate($facturefourn_static_det->tva_tx_line.($facturefourn_static_det->vat_src_code ? ' ('.$facturefourn_static_det->vat_src_code.')' : ''));
+ print vatrate($facturefourn_static_det->tva_tx.($facturefourn_static_det->vat_src_code ? ' ('.$facturefourn_static_det->vat_src_code.')' : ''));
print ' | ';
// Thirdparty
@@ -671,7 +676,7 @@ if ($result) {
// Found accounts
print '';
- $s = '1. '.(($facturefourn_static_det->type_l == 1) ? $langs->trans("DefaultForService") : $langs->trans("DefaultForProduct")).': ';
+ $s = '1. '.(($facturefourn_static_det->product_type == 1) ? $langs->trans("DefaultForService") : $langs->trans("DefaultForProduct")).': ';
$shelp = '';
if ($suggestedaccountingaccountbydefaultfor == 'eec') {
$shelp .= $langs->trans("SaleEEC");
|