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