clean loan code
This commit is contained in:
parent
7ea4f7ea0b
commit
2e6f0d3d19
@ -513,7 +513,7 @@ class LoanSchedule extends CommonObject
|
|||||||
|
|
||||||
if($resql){
|
if($resql){
|
||||||
while($obj = $this->db->fetch_object($resql)){
|
while($obj = $this->db->fetch_object($resql)){
|
||||||
$lastrecorded = $this->lastpaiment($obj->rowid);
|
$lastrecorded = $this->lastPayment($obj->rowid);
|
||||||
$toinsert = $this->paimenttorecord($obj->rowid, $lastrecorded);
|
$toinsert = $this->paimenttorecord($obj->rowid, $lastrecorded);
|
||||||
if(count($toinsert)>0){
|
if(count($toinsert)>0){
|
||||||
foreach ($toinsert as $echid){
|
foreach ($toinsert as $echid){
|
||||||
@ -535,12 +535,12 @@ class LoanSchedule extends CommonObject
|
|||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* transPayment
|
* lastpayment
|
||||||
*
|
*
|
||||||
* @param int $loanid Loan id
|
* @param int $loanid Loan id
|
||||||
* @return int < 0 if KO, Date > 0 if OK
|
* @return int < 0 if KO, Date > 0 if OK
|
||||||
*/
|
*/
|
||||||
public function lastpaiment($loanid)
|
private function lastPayment($loanid)
|
||||||
{
|
{
|
||||||
$sql = "SELECT p.datep";
|
$sql = "SELECT p.datep";
|
||||||
$sql.= " FROM ".MAIN_DB_PREFIX."payment_loan as p ";
|
$sql.= " FROM ".MAIN_DB_PREFIX."payment_loan as p ";
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user