SMC credit pd : ps
This commit is contained in:
parent
62d29a756e
commit
6bab8139a9
@ -2517,9 +2517,9 @@ public function filterSalesPDList_post() {
|
||||
$condit = array('pd_status' => 'COMPLETED','fk_lender_id' => $smc_lender_id);
|
||||
$condit['DATE_FORMAT(createdon, "%Y-%m-%d") <= DATE_SUB(CURDATE(), INTERVAL 60 DAY)'] =null;
|
||||
if(!empty($pd_id)) $condit['pd_id'] = $pd_id;
|
||||
$condit[$limit_condition]=null;
|
||||
// $condit[$limit_condition]=null;
|
||||
$value = $this->SMC_Credit_PD_Model->selectCustomRecords($select, $condit, PDTRIGGER);
|
||||
// print_r($this->db->last_query());print_r($value);die();
|
||||
//print_r($this->db->last_query());print_r($value);die();
|
||||
if(!empty($value)){
|
||||
$flag = 0;$ids=array();
|
||||
foreach( $value as $k => $v)
|
||||
@ -2530,7 +2530,9 @@ public function filterSalesPDList_post() {
|
||||
$result = $this->SMC_Credit_PD_Model->updateRecords($updt_arr, PDTRIGGER, $updt_where);
|
||||
if($result) $flag = $flag+1;
|
||||
log_message('ERROR', '#### SMC credit PDID '.$v['pd_id'].'-'.$v['pd_sno'].' in ARCHIVED status ');
|
||||
// $this->archivedSMCCreditPDDeleted($v['pd_id'],$day_limit);
|
||||
array_push($ids, $v['pd_id'].'-'.$v['pd_sno']);
|
||||
|
||||
}
|
||||
log_message('ERROR', '#### '.$flag. '/'.count($value).' (archived pd/total pd) below this date '.$day_limit);
|
||||
$data['dataStatus'] = true;
|
||||
@ -2544,6 +2546,16 @@ public function filterSalesPDList_post() {
|
||||
}
|
||||
$this->response($data,REST_Controller::HTTP_OK);
|
||||
}
|
||||
// public function archivedSMCCreditPDDeleted($pdid){
|
||||
// log_message('ERROR', '#### Old Deleted');
|
||||
// $addr_dtls = $this->PD_Model->selectCustomRecords($addr_fields, $addr_cond_arr, PDADDRESS);
|
||||
// $json_dtls = $this->PD_Model->selectCustomRecords($json_fields, $json_cond_arr, PDFORMDETAILSJSON);
|
||||
// $docs_dtls = $this->PD_Model->selectCustomRecords($docs_fields, $docs_cond_arr, PDDOCUMENTS);
|
||||
// // $destination_path = $this->external_path . "/pd_reports/" . $pdid . "/" . $file;
|
||||
// // unlink($destination_path);
|
||||
|
||||
|
||||
// }
|
||||
}
|
||||
|
||||
|
||||
Loading…
Reference in New Issue
Block a user