From d694a1b1e03e7d0f8aeeadb4412ce28b8f32a8bc Mon Sep 17 00:00:00 2001 From: Laurent Destailleur Date: Fri, 17 Jun 2011 10:30:28 +0000 Subject: [PATCH] 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 --- htdocs/compta/bank/class/account.class.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/htdocs/compta/bank/class/account.class.php b/htdocs/compta/bank/class/account.class.php index 48c058ebf13..5e5c59afedb 100644 --- a/htdocs/compta/bank/class/account.class.php +++ b/htdocs/compta/bank/class/account.class.php @@ -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);