From 2e6f0d3d19b0f2f1d51acb8d02a29fd31a055620 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Fr=C3=A9d=C3=A9ric=20FRANCE?= Date: Mon, 15 Oct 2018 20:40:59 +0200 Subject: [PATCH] clean loan code --- htdocs/loan/class/loanschedule.class.php | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/htdocs/loan/class/loanschedule.class.php b/htdocs/loan/class/loanschedule.class.php index cf95b72715c..208f325a384 100644 --- a/htdocs/loan/class/loanschedule.class.php +++ b/htdocs/loan/class/loanschedule.class.php @@ -513,7 +513,7 @@ class LoanSchedule extends CommonObject if($resql){ while($obj = $this->db->fetch_object($resql)){ - $lastrecorded = $this->lastpaiment($obj->rowid); + $lastrecorded = $this->lastPayment($obj->rowid); $toinsert = $this->paimenttorecord($obj->rowid, $lastrecorded); if(count($toinsert)>0){ foreach ($toinsert as $echid){ @@ -535,12 +535,12 @@ class LoanSchedule extends CommonObject /** - * transPayment + * lastpayment * * @param int $loanid Loan id * @return int < 0 if KO, Date > 0 if OK */ - public function lastpaiment($loanid) + private function lastPayment($loanid) { $sql = "SELECT p.datep"; $sql.= " FROM ".MAIN_DB_PREFIX."payment_loan as p ";