Fix links in cheque receipt pages
This commit is contained in:
parent
da8b67da83
commit
71370bd558
@ -307,11 +307,12 @@ if ($result)
|
||||
$i++;
|
||||
|
||||
// Bank account
|
||||
print '<tr><td class="titlefield">'.$langs->trans("Account").'</td>';
|
||||
print '<tr><td class="titlefieldcreate">'.$langs->trans("Account").'</td>';
|
||||
print '<td>';
|
||||
if (!$objp->rappro && !$bankline->getVentilExportCompta())
|
||||
{
|
||||
$form->select_comptes($acct->id, 'accountid', 0, '', 0);
|
||||
print img_picto('', 'bank_account', 'class="paddingright"');
|
||||
print $form->select_comptes($acct->id, 'accountid', 0, '', 0, '', 0, '', 1);
|
||||
} else {
|
||||
print $acct->getNomUrl(1, 'transactions', 'reflabel');
|
||||
}
|
||||
@ -562,7 +563,7 @@ if ($result)
|
||||
// Bank line
|
||||
print '<tr><td class="toptd">'.$form->editfieldkey('RubriquesTransactions', 'custcats', '', $object, 0).'</td><td>';
|
||||
$cate_arbo = $form->select_all_categories(Categorie::TYPE_BANK_LINE, null, 'parent', null, null, 1);
|
||||
print $form->multiselectarray('custcats', $cate_arbo, $arrayselected, null, null, null, null, "90%");
|
||||
print img_picto('', 'category', 'class="paddingright"').$form->multiselectarray('custcats', $cate_arbo, $arrayselected, null, null, null, null, "90%");
|
||||
print "</td></tr>";
|
||||
}
|
||||
|
||||
|
||||
@ -383,8 +383,9 @@ if ($action == 'new')
|
||||
print '</form>';
|
||||
print '<br>';
|
||||
|
||||
$sql = "SELECT ba.rowid as bid, b.datec as datec, b.dateo as date, b.rowid as transactionid, ";
|
||||
$sql .= " b.amount, ba.label, b.emetteur, b.num_chq, b.banque,";
|
||||
$sql = "SELECT ba.rowid as bid, ba.label,";
|
||||
$sql .= " b.rowid as transactionid, b.label as transactionlabel, b.datec as datec, b.dateo as date, ";
|
||||
$sql .= " b.amount, b.emetteur, b.num_chq, b.banque,";
|
||||
$sql .= " p.rowid as paymentid, p.ref as paymentref";
|
||||
$sql .= " FROM ".MAIN_DB_PREFIX."bank as b";
|
||||
$sql .= " LEFT JOIN ".MAIN_DB_PREFIX."paiement as p ON p.fk_bank = b.rowid";
|
||||
@ -410,6 +411,8 @@ if ($action == 'new')
|
||||
$lines[$obj->bid][$i]["numero"] = $obj->num_chq;
|
||||
$lines[$obj->bid][$i]["banque"] = $obj->banque;
|
||||
$lines[$obj->bid][$i]["id"] = $obj->transactionid;
|
||||
$lines[$obj->bid][$i]["ref"] = $obj->transactionid;
|
||||
$lines[$obj->bid][$i]["label"] = $obj->transactionlabel;
|
||||
$lines[$obj->bid][$i]["paymentid"] = $obj->paymentid;
|
||||
$lines[$obj->bid][$i]["paymentref"] = $obj->paymentref;
|
||||
$i++;
|
||||
@ -493,9 +496,9 @@ if ($action == 'new')
|
||||
print '</td>';
|
||||
// Link to bank transaction
|
||||
print '<td class="center">';
|
||||
$accountlinestatic->rowid = $value["id"];
|
||||
if ($accountlinestatic->rowid)
|
||||
{
|
||||
$accountlinestatic->id = $value["id"];
|
||||
$accountlinestatic->ref = $value["ref"];
|
||||
if ($accountlinestatic->id > 0) {
|
||||
print $accountlinestatic->getNomUrl(1);
|
||||
} else {
|
||||
print ' ';
|
||||
@ -615,7 +618,7 @@ if ($action == 'new')
|
||||
|
||||
|
||||
// List of bank checks
|
||||
$sql = "SELECT b.rowid, b.amount, b.num_chq, b.emetteur,";
|
||||
$sql = "SELECT b.rowid, b.rowid as ref, b.label, b.amount, b.num_chq, b.emetteur,";
|
||||
$sql .= " b.dateo as date, b.datec as datec, b.banque,";
|
||||
$sql .= " p.rowid as pid, p.ref as pref, ba.rowid as bid, p.statut";
|
||||
$sql .= " FROM ".MAIN_DB_PREFIX."bank_account as ba";
|
||||
@ -672,8 +675,9 @@ if ($action == 'new')
|
||||
print '</td>';
|
||||
// Link to bank transaction
|
||||
print '<td class="center">';
|
||||
$accountlinestatic->rowid = $objp->rowid;
|
||||
if ($accountlinestatic->rowid) {
|
||||
$accountlinestatic->id = $objp->rowid;
|
||||
$accountlinestatic->ref = $objp->ref;
|
||||
if ($accountlinestatic->id > 0) {
|
||||
print $accountlinestatic->getNomUrl(1);
|
||||
} else {
|
||||
print ' ';
|
||||
|
||||
Loading…
Reference in New Issue
Block a user