|
@@ -172,7 +172,9 @@ print '<script type="text/javascript">
|
|
|
$sql = "SELECT f.rowid as facid, f.ref as ref, f.ref_supplier, f.libelle as invoice_label, f.datef, f.fk_soc,";
|
|
|
$sql.= " l.rowid, l.fk_product, l.product_type as line_type, l.description, l.total_ht , l.qty, l.tva_tx, l.vat_src_code,";
|
|
|
$sql.= " aa.label, aa.account_number, ";
|
|
|
-$sql.= " p.rowid as product_id, p.fk_product_type as product_type, p.ref as product_ref, p.label as product_label, p.fk_product_type as type, co.label as country, s.tva_intra";
|
|
|
+$sql.= " p.rowid as product_id, p.fk_product_type as product_type, p.ref as product_ref, p.label as product_label, p.fk_product_type as type,";
|
|
|
+$sql.= " co.code as country_code, co.label as country,";
|
|
|
+$sql.= " s.tva_intra";
|
|
|
$parameters=array();
|
|
|
$reshook=$hookmanager->executeHooks('printFieldListSelect',$parameters); // Note that $action and $object may have been modified by hook
|
|
|
$sql.=$hookmanager->resPrint;
|
|
@@ -221,7 +223,7 @@ else if ($search_year > 0)
|
|
|
$sql.= " AND f.datef BETWEEN '".$db->idate(dol_get_first_day($search_year,1,false))."' AND '".$db->idate(dol_get_last_day($search_year,12,false))."'";
|
|
|
}
|
|
|
if (strlen(trim($search_country))) {
|
|
|
- $sql .= natural_search("co.label", $search_country);
|
|
|
+ $sql .= natural_search("co.code", $search_country);
|
|
|
}
|
|
|
if (strlen(trim($search_tvaintra))) {
|
|
|
$sql .= natural_search("s.tva_intra", $search_tvaintra);
|
|
@@ -309,7 +311,10 @@ if ($result) {
|
|
|
print '<td class="liste_titre"><input type="text" class="flat maxwidth50" name="search_desc" value="' . dol_escape_htmltag($search_desc) . '"></td>';
|
|
|
print '<td class="liste_titre" align="right"><input type="text" class="right flat maxwidth50" name="search_amount" value="' . dol_escape_htmltag($search_amount) . '"></td>';
|
|
|
print '<td class="liste_titre" align="right"><input type="text" class="right flat maxwidth50" name="search_vat" placeholder="%" size="1" value="' . dol_escape_htmltag($search_vat) . '"></td>';
|
|
|
- print '<td class="liste_titre"><input type="text" class="flat maxwidth50" name="search_country" value="' . dol_escape_htmltag($search_country) . '"></td>';
|
|
|
+ print '<td class="liste_titre">';
|
|
|
+ print $form->select_country($search_country, 'search_country', '', 0, 'maxwidth200', 'code2');
|
|
|
+ // print '<input type="text" class="flat maxwidth50" name="search_country" value="' . dol_escape_htmltag($search_country) . '">';
|
|
|
+ print '</td>';
|
|
|
print '<td class="liste_titre"><input type="text" class="flat maxwidth50" name="search_tvaintra" value="' . dol_escape_htmltag($search_tvaintra) . '"></td>';
|
|
|
print '<td class="liste_titre" align="center"><input type="text" class="flat maxwidth50" name="search_account" value="' . dol_escape_htmltag($search_account) . '"></td>';
|
|
|
print '<td class="liste_titre" align="center">';
|
|
@@ -380,9 +385,11 @@ if ($result) {
|
|
|
print '</td>';
|
|
|
|
|
|
print '<td align="right">' . price($objp->total_ht) . '</td>';
|
|
|
+
|
|
|
print '<td align="right">' . vatrate($objp->tva_tx.($objp->vat_src_code?' ('.$objp->vat_src_code.')':'')) . '</td>';
|
|
|
|
|
|
- print '<td>' . $objp->country .'</td>';
|
|
|
+ print '<td>' . $langs->trans("Country".$objp->country_code) .' ('.$objp->country_code.')</td>';
|
|
|
+
|
|
|
print '<td>' . $objp->tva_intra . '</td>';
|
|
|
|
|
|
print '<td align="center">';
|