Skip to content

Commit

Permalink
Fix label country on bind list
Browse files Browse the repository at this point in the history
  • Loading branch information
aspangaro committed Jun 11, 2019
1 parent f3cba86 commit a96b10d
Show file tree
Hide file tree
Showing 3 changed files with 14 additions and 7 deletions.
9 changes: 6 additions & 3 deletions htdocs/accountancy/customer/list.php
Expand Up @@ -214,7 +214,7 @@
$sql.= " p.rowid as product_id, p.ref as product_ref, p.label as product_label, p.fk_product_type as type, p.accountancy_code_sell as code_sell, p.tva_tx as tva_tx_prod,";
$sql.= " p.accountancy_code_sell_intra as code_sell_intra, p.accountancy_code_sell_export as code_sell_export,";
$sql.= " aa.rowid as aarowid, aa2.rowid as aarowid_intra, aa3.rowid as aarowid_export,";
$sql.= " co.code as country_code, co.label as country,";
$sql.= " co.code as country_code, co.label as country_label,";
$sql.= " s.tva_intra";
$parameters=array();
$reshook=$hookmanager->executeHooks('printFieldListSelect', $parameters); // Note that $action and $object may have been modified by hook
Expand Down Expand Up @@ -514,7 +514,10 @@
print vatrate($objp->tva_tx_line.($objp->vat_src_code?' ('.$objp->vat_src_code.')':''));
print '</td>';

print '<td>' . $objp->country .'</td>';
print '<td class="center">';
$labelcountry=($objp->country_code && ($langs->trans("Country".$objp->country_code)!="Country".$objp->country_code))?$langs->trans("Country".$objp->country_code):$objp->country_label;
print $labelcountry;
print '</td>';

print '<td>' . $objp->tva_intra . '</td>';

Expand All @@ -529,7 +532,7 @@
print '</td>';

// Suggested accounting account
print '<td class="center">';
print '<td>';
print $formaccounting->select_account($objp->aarowid_suggest, 'codeventil'.$objp->rowid, 1, array(), 0, 0, 'codeventil maxwidth300 maxwidthonsmartphone', 'cachewithshowemptyone');
print '</td>';

Expand Down
2 changes: 1 addition & 1 deletion htdocs/accountancy/expensereport/list.php
Expand Up @@ -386,7 +386,7 @@
print '</td>';

// Current account
print '<td class="center">';
print '<td>';
print length_accountg(html_entity_decode($objp->code_buy));
print '</td>';

Expand Down
10 changes: 7 additions & 3 deletions htdocs/accountancy/supplier/list.php
Expand Up @@ -214,7 +214,7 @@
$sql.= " l.rowid, l.fk_product, l.description, l.total_ht, l.fk_code_ventilation, l.product_type as type_l, l.tva_tx as tva_tx_line, l.vat_src_code,";
$sql.= " p.rowid as product_id, p.ref as product_ref, p.label as product_label, p.fk_product_type as type, p.accountancy_code_buy as code_buy, p.tva_tx as tva_tx_prod,";
$sql.= " aa.rowid as aarowid,";
$sql.= " co.code as country_code, co.label as country,";
$sql.= " co.code as country_code, co.label as country_label,";
$sql.= " s.tva_intra";
$parameters=array();
$reshook=$hookmanager->executeHooks('printFieldListSelect', $parameters); // Note that $action and $object may have been modified by hook
Expand Down Expand Up @@ -502,7 +502,11 @@
print vatrate($objp->tva_tx_line.($objp->vat_src_code?' ('.$objp->vat_src_code.')':''));
print '</td>';

print '<td>' . $objp->country .'</td>';
print '<td class="center">';
$labelcountry=($objp->country_code && ($langs->trans("Country".$objp->country_code)!="Country".$objp->country_code))?$langs->trans("Country".$objp->country_code):$objp->country_label;
print $labelcountry;
print '</td>';

print '<td>' . $objp->tva_intra . '</td>';

// Current account
Expand All @@ -516,7 +520,7 @@
print '</td>';

// Suggested accounting account
print '<td class="center">';
print '<td>';
print $formaccounting->select_account($objp->aarowid_suggest, 'codeventil'.$objp->rowid, 1, array(), 0, 0, 'codeventil maxwidth300 maxwidthonsmartphone', 'cachewithshowemptyone');
print '</td>';

Expand Down

0 comments on commit a96b10d

Please sign in to comment.