예제 #1
0
 /**
  * @Author: ANH DUNG Dec 02, 2014
  * @Todo: update status transaction only tenancy
  * @Param: $model model ProTransactions
  * @Param: $status number
  */
 public static function UpdateTenancyStatus($mTransactions, $status)
 {
     $mTransactions->status = $status;
     $mTransactions->update(array('status'));
     // nexxt update to transaction commisson
     if ($status == STATUS_TENANCY_APPROVE) {
         // Dec 01, 2014 Once tenancy is submitted, admin need to approve.
         //  Once admin approved, LL and Tenant account will automatically send an email with Login ID and Password (generated) to Tenant and LL.
         ProTransactionsVendorPurchaserDetail::updateRoleUserAfterCreateUpdateTransaction($mTransactions->id);
         ProTransactionsVendorPurchaserDetail::sendMailToNewUser($mTransactions->id, $mTransactions);
     }
 }