Update loanschedule.class.php (#36272)

Solve Error when schedule loans : "ERROR: 55000: currval of sequence "llx_payment_loan_rowid_seq" is not yet defined in this session LOCATION: currval_oid, sequence.c:884"

Co-authored-by: Laurent Destailleur <eldy@destailleur.fr>
This commit is contained in:
sweetcorreze
2025-11-17 21:19:58 +01:00
committed by GitHub
parent a88f5d9d41
commit f66cb5ddd5

View File

@@ -221,7 +221,7 @@ class LoanSchedule extends CommonObject
dol_syslog(get_class($this)."::create", LOG_DEBUG);
$resql = $this->db->query($sql);
if ($resql) {
$this->id = $this->db->last_insert_id(MAIN_DB_PREFIX."payment_loan");
$this->id = $this->db->last_insert_id(MAIN_DB_PREFIX."loan_schedule");
} else {
$this->error = $this->db->lasterror();
$error++;