mirror of
https://github.com/Dolibarr/dolibarr.git
synced 2026-01-06 09:02:59 +01:00
FIX #16185
This commit is contained in:
@@ -148,7 +148,7 @@ llxHeader('', $langs->trans('ListPayment'));
|
||||
|
||||
if (GETPOST("orphelins", "alpha")) {
|
||||
// Payments not linked to an invoice. Should not happend. For debug only.
|
||||
$sql = "SELECT p.ref, p.datep, p.amount, p.statut, p.num_paiement";
|
||||
$sql = "SELECT p.rowid, p.ref, p.datep, p.amount, p.statut, p.num_paiement";
|
||||
$sql .= ", c.code as paiement_code";
|
||||
|
||||
// Add fields from hooks
|
||||
@@ -166,7 +166,7 @@ if (GETPOST("orphelins", "alpha")) {
|
||||
$sql .= $hookmanager->resPrint;
|
||||
} else {
|
||||
// DISTINCT is to avoid duplicate when there is a link to sales representatives
|
||||
$sql = "SELECT DISTINCT p.ref, p.datep, p.fk_bank, p.amount, p.statut, p.num_paiement";
|
||||
$sql = "SELECT DISTINCT p.rowid, p.ref, p.datep, p.fk_bank, p.amount, p.statut, p.num_paiement";
|
||||
$sql .= ", c.code as paiement_code";
|
||||
$sql .= ", ba.rowid as bid, ba.ref as bref, ba.label as blabel, ba.number, ba.account_number as account_number, ba.fk_accountancy_journal as accountancy_journal";
|
||||
$sql .= ", s.rowid as socid, s.nom as name, s.email";
|
||||
@@ -390,7 +390,7 @@ while ($i < min($num, $limit)) {
|
||||
$objp = $db->fetch_object($resql);
|
||||
|
||||
$object->id = $objp->rowid;
|
||||
$object->ref = $objp->ref;
|
||||
$object->ref = ($objp->ref ? $objp->ref : $objp->rowid);
|
||||
|
||||
$companystatic->id = $objp->socid;
|
||||
$companystatic->name = $objp->name;
|
||||
|
||||
Reference in New Issue
Block a user