FIX Bank transfer - Link on code supplier invoice was bad
This commit is contained in:
parent
71af854bf4
commit
149b86e459
@ -1,8 +1,9 @@
|
||||
<?php
|
||||
/* Copyright (C) 2005 Rodolphe Quiedeville <rodolphe@quiedeville.org>
|
||||
* Copyright (C) 2005-2016 Laurent Destailleur <eldy@users.sourceforge.net>
|
||||
* Copyright (C) 2005-2009 Regis Houssin <regis.houssin@inodbox.com>
|
||||
* Copyright (C) 2010-2018 Juanjo Menent <jmenent@2byte.es>
|
||||
/* Copyright (C) 2005 Rodolphe Quiedeville <rodolphe@quiedeville.org>
|
||||
* Copyright (C) 2005-2016 Laurent Destailleur <eldy@users.sourceforge.net>
|
||||
* Copyright (C) 2005-2009 Regis Houssin <regis.houssin@inodbox.com>
|
||||
* Copyright (C) 2010-2018 Juanjo Menent <jmenent@2byte.es>
|
||||
* Copyright (C) 2022 Alexandre Spangaro <aspangaro@open-dsi.fr>
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
@ -108,7 +109,7 @@ llxHeader('', $langs->trans("WithdrawalsLines"));
|
||||
|
||||
$sql = "SELECT p.rowid, p.ref, p.statut as status, p.datec";
|
||||
$sql .= " , f.rowid as facid, f.ref as invoiceref, f.total_ttc";
|
||||
$sql .= " , s.rowid as socid, s.nom as name, s.code_client, s.email";
|
||||
$sql .= " , s.rowid as socid, s.nom as name, s.code_client, s.code_fournisseur, s.email";
|
||||
$sql .= " , pl.amount, pl.statut as statut_ligne, pl.rowid as rowid_ligne";
|
||||
$sql .= " FROM ".MAIN_DB_PREFIX."prelevement_bons as p";
|
||||
$sql .= " , ".MAIN_DB_PREFIX."prelevement_lignes as pl";
|
||||
@ -139,7 +140,7 @@ if ($search_bon) {
|
||||
}
|
||||
if ($type == 'bank-transfer') {
|
||||
if ($search_code) {
|
||||
$sql .= natural_search("s.code_fourn", $search_code);
|
||||
$sql .= natural_search("s.code_fournisseur", $search_code);
|
||||
}
|
||||
} else {
|
||||
if ($search_code) {
|
||||
@ -204,7 +205,7 @@ if ($result) {
|
||||
print '<td class="liste_titre"><input type="text" class="flat" name="search_bon" value="'.dol_escape_htmltag($search_bon).'" size="6"></td>';
|
||||
print '<td class="liste_titre"> </td>';
|
||||
print '<td class="liste_titre"><input type="text" class="flat" name="search_company" value="'.dol_escape_htmltag($search_company).'" size="6"></td>';
|
||||
print '<td class="liste_titre" align="center"><input type="text" class="flat" name="search_code" value="'.dol_escape_htmltag($search_code).'" size="6"></td>';
|
||||
print '<td class="liste_titre center"><input type="text" class="flat" name="search_code" value="'.dol_escape_htmltag($search_code).'" size="6"></td>';
|
||||
print '<td class="liste_titre"> </td>';
|
||||
print '<td class="liste_titre"> </td>';
|
||||
print '<td class="liste_titre maxwidthsearch">';
|
||||
@ -214,8 +215,12 @@ if ($result) {
|
||||
print '</tr>';
|
||||
|
||||
$columntitle = "WithdrawalsReceipts";
|
||||
$columntitlethirdparty = "CustomerCode";
|
||||
$columncodethirdparty = "s.code_client";
|
||||
if ($type == 'bank-transfer') {
|
||||
$columntitle = "BankTransferReceipts";
|
||||
$columntitlethirdparty = "SupplierCode";
|
||||
$columncodethirdparty = "s.code_fournisseur";
|
||||
}
|
||||
|
||||
print '<tr class="liste_titre">';
|
||||
@ -223,7 +228,7 @@ if ($result) {
|
||||
print_liste_field_titre("Line", $_SERVER["PHP_SELF"], '', '', $param, '', $sortfield, $sortorder);
|
||||
print_liste_field_titre("Bill", $_SERVER["PHP_SELF"], "f.ref", '', $param, '', $sortfield, $sortorder);
|
||||
print_liste_field_titre("Company", $_SERVER["PHP_SELF"], "s.nom", '', $param, '', $sortfield, $sortorder);
|
||||
print_liste_field_titre("CustomerCode", $_SERVER["PHP_SELF"], "s.code_client", '', $param, '', $sortfield, $sortorder, 'center ');
|
||||
print_liste_field_titre($columntitlethirdparty, $_SERVER["PHP_SELF"], $columncodethirdparty, '', $param, '', $sortfield, $sortorder, 'center ');
|
||||
print_liste_field_titre("Date", $_SERVER["PHP_SELF"], "p.datec", "", $param, '', $sortfield, $sortorder, 'center ');
|
||||
print_liste_field_titre("Amount", $_SERVER["PHP_SELF"], "pl.amount", "", $param, '', $sortfield, $sortorder, 'right ');
|
||||
print_liste_field_titre('');
|
||||
@ -274,7 +279,15 @@ if ($result) {
|
||||
print $company->getNomUrl(1);
|
||||
print "</td>\n";
|
||||
|
||||
print '<td class="center"><a href="'.DOL_URL_ROOT.'/comm/card.php?socid='.$company->id.'">'.$obj->code_client."</a></td>\n";
|
||||
|
||||
print '<td class="center">';
|
||||
$link_to_tab = '/comm/card.php?socid=';
|
||||
$link_code = $obj->code_client;
|
||||
if ($type == 'bank-transfer') {
|
||||
$link_to_tab = 'fourn/card.php?socid=';
|
||||
$link_code = $obj->code_fournisseur;
|
||||
}
|
||||
print '<a href="'.DOL_URL_ROOT.$link_to_tab.$company->id.'">'.$link_code."</a></td>\n";
|
||||
|
||||
print '<td class="center">'.dol_print_date($db->jdate($obj->datec), 'day')."</td>\n";
|
||||
|
||||
|
||||
Loading…
Reference in New Issue
Block a user