예제 #1
0
 /**
  * @Author: ANH DUNG Dec 02, 2014
  * Tenancy: hợp đồng thuê nhà
  * @Todo: cron  send email to LL,Tenant, Agent and Admin 
  * on the date when exact date 3 months before expiring.
  * lấy những transaction ( Tenancy là hợp đồng thue nhà) dc approved và sắp hết hạn trong 3 tháng và send mail
  */
 public static function CronSendMailTenancyExpiring()
 {
     /* 1. get list tenant 3 months later will expiring.
      * ProTransactions::GetListTenancyExpiring()
      * 2. foreach transaction and get list id of LL,Tenant, Agent and Admin 
      *  and send with email template
      * 3. send for LL and Tenant
      * 4. send for agent and admin
      */
     $aModelTenancyExpiring = ProTransactions::GetListTenancyExpiring();
     foreach ($aModelTenancyExpiring as $mTransaction) {
         SendEmail::MailToLandlordTenant($mTransaction);
         SendEmail::MailToAgentAdmin($mTransaction);
     }
 }