mirror of
https://github.com/Dolibarr/dolibarr.git
synced 2025-12-05 17:18:13 +01:00
Fix: Retore usage of id because ther is no ref for such objects. All records must have 2 id:
on technical id (rowid) on user id (ref). num_chq can't be used because it is not a unique value, nor a mandatory value
This commit is contained in:
@@ -1061,7 +1061,7 @@ class AccountLine extends CommonObject
|
||||
$sql.= ", ".MAIN_DB_PREFIX."bank_account as ba";
|
||||
$sql.= " WHERE b.fk_account = ba.rowid";
|
||||
$sql.= " AND ba.entity = ".$conf->entity;
|
||||
if ($ref) $sql.= " AND b.num_chq='".$ref."'";
|
||||
if ($ref) $sql.= " AND b.rowid='".$ref."'"; // For the moment rowid = ref because there is no ref field. We must keep rowid because all records should have 2 id: technical id=rowid, ref=user id. num_chq can't be used as it is not a unique value and not a mandatory value.
|
||||
else $sql.= " AND b.rowid=".$rowid;
|
||||
|
||||
dol_syslog("AccountLine::fetch sql=".$sql);
|
||||
|
||||
Reference in New Issue
Block a user