public function formatSumReportCommissionPayabletoSalesperson($model) { // init ProTransactionsSaveCommission::ReportGetAllClientComm(); line 173 if (isset($_SESSION['DATA_COMM_REPORT']['AmountAtGross'][$model->id])) { $cmsFormater = new CmsFormatter(); return $cmsFormater->formatPrice($_SESSION['DATA_COMM_REPORT']['AmountAtGross'][$model->id]); } return ''; } // ANH DUNG Sep 20, 2014 public function formatSumReport1stTierName($model)
$arrayType = array('H' => array('id' => 18, 'title' => 'HDB Apartment'), 'K' => array('id' => 0, 'title' => 'Block'), 'A' => array('id' => 1, 'title' => 'Apartment/Condo'), 'C' => array('id' => 3, 'title' => 'Condominium'), 'S' => array('id' => 0, 'title' => 'Standard'), 'G' => array('id' => 0, 'title' => 'Godown'), 'P' => array('id' => 0, 'title' => 'PO Box, My Mail Box or My SingPost'), 'B' => array('id' => 0, 'title' => 'Locked Bag'), 'W' => array('id' => 0, 'title' => 'Window Delivery'), 'U' => array('id' => 5, 'title' => 'Walk-up')); $criteria = new CDbCriteria(); foreach ($data as $v) { $criteria->compare('t.postal_code', trim($v), true, 'OR'); } $dataTmp = ApiPostcode::model()->findAll($criteria); if ($dataTmp) { $tmp = array(); $building = array(); $buildingTmp = array(); //search postal code foreach ($dataTmp as $v) { $code = substr($v->postal_code, 0, 6); $type = substr($v->postal_code, 6, 1); $keyBuilding = substr($v->postal_code, strlen($v->postal_code) - 6, strlen($v->postal_code)); $building[$code] = $keyBuilding;