diff --git a/htdocs/loan/class/loanschedule.class.php b/htdocs/loan/class/loanschedule.class.php index c6893253800..c66f243cb63 100644 --- a/htdocs/loan/class/loanschedule.class.php +++ b/htdocs/loan/class/loanschedule.class.php @@ -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++;