/** * <Create By Jason> * <TO show list of tenancies detail in tenant user> */ public function actionTenancies_Detail() { try { $this->pageTitle = 'Tenancies Details - ' . Yii::app()->params['title']; $this->layout = 'application.views.layouts.layout_user'; if (!isset(Yii::app()->user->id)) { $this->redirect(Yii::app()->createAbsoluteUrl('/')); } if (!isset($_GET['transaction_id'])) { $_GET['transaction_id'] = 0; } //HTram add: to load call log by role users $role_id = ''; if (isset(Yii::app()->user->id)) { $role_id = Yii::app()->user->roleid; } $calllog = ProCallLog::getListCallLog($_GET['transaction_id'], $role_id); // $document = ProTransactionsPropertyDocument::getListDocument($_GET['transaction_id']); $transaction = ProTransactions::getByPk($_GET['transaction_id']); $report = ProReportDefect::getListReport($_GET['transaction_id']); $landlordInformation = ProTransactionsVendorPurchaserDetail::getTenancyInformation($_GET['transaction_id'], TYPE_LANDLORD); $mAirconService = new ProAirconService(); $mAirconService->transaction_id = $_GET['transaction_id']; MyFormat::CheckValidRequest($transaction); $this->render('tenancies_detail', array('report' => $report, 'transaction' => $transaction, 'document' => $document, 'calllog' => $calllog, 'landlordInformation' => $landlordInformation, 'mAirconService' => $mAirconService)); } catch (Exception $exc) { throw new CHttpException('404', $exc->getMessage()); } }
/** * Updates a particular model. * If update is successful, the browser will be redirected to the 'view' page. * @param integer $id the ID of the model to be updated */ public function actionUpdate($id) { try { $model = ProAirconService::model()->findByPk($id); if (is_null($model)) { throw new Exception('id not valid'); } $old_upload_service_documents = $model->upload_service_documents; $model->scenario = 'updateTelemarketer'; $model->schedule_date = MyFormat::dateConverYmdToDmy($model->schedule_date, "d/m/Y"); $this->layout = 'ajax'; if (isset($_POST['ProAirconService'])) { $model->attributes = $_POST['ProAirconService']; $model->upload_service_documents = CUploadedFile::getInstance($model, 'upload_service_documents'); if (is_null($model->upload_service_documents)) { $model->upload_service_documents = $old_upload_service_documents; } else { $model->validate(); if (!$model->hasErrors()) { $mOld = ProAirconService::model()->findByPk($model->id); ProAirconService::removeFile($mOld, 'upload_service_documents', ProAirconService::$folderUpload); $model->upload_service_documents = ProAirconService::save_photo($model); } } if ($model->save()) { die('<script type="text/javascript">parent.$.fn.colorbox.close(); parent.$.fn.yiiGridView.update("pro-defect-grid");</script>'); } } $this->render('update', array('model' => $model, 'actions' => $this->listActionsCanAccess)); } catch (Exception $e) { Yii::log("Exception " . print_r($e, true), 'error'); throw new CHttpException("Exception " . print_r($e, true)); } }
protected function beforeSave() { if (strpos($this->schedule_date, '/')) { $this->schedule_date = MyFormat::dateConverDmyToYmd($this->schedule_date); } return parent::beforeSave(); }
/** * @Author: ANH DUNG Aug 05, 2014 * @Todo: CompanyEditContact at grid * @Param: $id list id 1,2,3 ... */ public function actionCompanyUpdateDncExpiryDate($id) { try { $id = $this->FormatListId($id); $dnc_expiry_date = MyFormat::dateConverDmyToYmdForSeach(isset($_GET['dnc_expiry_date']) ? $_GET['dnc_expiry_date'] : ''); if (MyFormat::isValidDate($dnc_expiry_date)) { Listing::UpdateDncExpiryDateByListId($id, $dnc_expiry_date); } } catch (Exception $ex) { echo $exc->getMessage(); die; } }
* Time: 3:36 PM */ class BankRequestController extends Controller { public function actionIndex() { $model = new BankRequest(); if (isset($_POST['BankRequest'])) { $model->attributes = $_POST['BankRequest']; $model->choosetype = isset($_POST['choosetype']) ? $_POST['choosetype'] : 0; $model->property_type_code = isset($_POST['property_type_code']) ? is_array($_POST['property_type_code']) ? implode(',', $_POST['property_type_code']) : "" : ''; if ($model->validate()) { $model->tenancy_expiry_datepicker = MyFormat::indexDateToDbDate($model->tenancy_expiry_datepicker); $model->target_price = (double) $model->target_price; if ($model->save()) { //email to Admin SendEmail::sendMailBankRequestToAdmin($model); $link_thanks = Yii::app()->createAbsoluteUrl('page/index', array('slug' => Pages::getSlugById(PAGE_THANK_BANK_VALUATION_REQUEST))); $this->redirect($link_thanks);
/** * Updates a particular model. * If update is successful, the browser will be redirected to the 'view' page. * @param integer $id the ID of the model to be updated */ public function actionUpdate($id) { try { $model = ProCallLog::model()->findByPk($id); if (is_null($model)) { throw new Exception('id not valid'); } $model->scenario = 'UpdateCallsLog'; $model->date = MyFormat::InvoiceDateDbDateToShowDate($model->date); $this->layout = 'ajax'; if (isset($_POST['ProCallLog'])) { $model->attributes = $_POST['ProCallLog']; if ($model->save()) { die('<script type="text/javascript">parent.$.fn.colorbox.close(); parent.$.fn.yiiGridView.update("pro-transactions-grid");</script>'); } } $this->render('update', array('model' => $model, 'actions' => $this->listActionsCanAccess)); } catch (Exception $e) { Yii::log("Exception " . print_r($e, true), 'error'); throw new CHttpException("Exception " . print_r($e, true)); } }
public function actionRequestBankEvaluation() { try { $this->pageTitle = 'Request Bank Evaluation - ' . Yii::app()->params['title']; $this->layout = 'application.views.layouts.ajax_width_auto'; $model = new BankRequest('blank_valuation_request'); $model->transaction_id = $_GET['transaction_id']; $this->OverideModel($model); if (isset($_POST['BankRequest'])) { $model->attributes = $_POST['BankRequest']; $model->choosetype = isset($_POST['choosetype']) ? $_POST['choosetype'] : 0; $model->property_type_code = isset($_POST['property_type_code']) ? is_array($_POST['property_type_code']) ? implode(',', $_POST['property_type_code']) : "" : ''; $model->validate(); if (!$model->hasErrors()) { $model->tenancy_expiry_datepicker = MyFormat::indexDateToDbDate($model->tenancy_expiry_datepicker); if ($model->save()) { //email to Admin SendEmail::sendMailBankRequestToAdmin($model); die('<script type="text/javascript">parent.$.fancybox.close();</script>'); // die('<script type="text/javascript">parent.$.fancybox.close(); parent.fnUpdateGridView("#list-tenancy-grid");</script>'); } } } $this->render('RequestBankEvaluation', array('model' => $model)); } catch (Exception $exc) { echo $exc->getMessage(); } }
public function actionChange_my_password() { if (Yii::app()->user->id == '') { $this->redirect(array('login')); } $model = MyFormat::loadModelByClass(Yii::app()->user->id, 'Users'); $model->scenario = 'changeMyPassword'; $model->md5pass = $model->password_hash; if (isset($_POST['Users'])) { $model->currentpassword = $_POST['Users']['currentpassword']; $model->newpassword = $_POST['Users']['newpassword']; $model->password_confirm = $_POST['Users']['password_confirm']; if ($model->validate()) { $model->newpassword = $_POST['Users']['newpassword']; $model->password_hash = md5($model->newpassword); $model->temp_password = $model->newpassword; if ($model->save()) { Yii::app()->user->setFlash('successChangeMyPassword', "Your password has been successfully changed."); $this->redirect(array('change_my_password')); } } } $this->render('change_my_password', array('model' => $model)); }
<?php echo MyFormat::formatPrice($revenue); ?> </td> </tr> <?php } ?> <?php } ?> <?php } ?> </tbody> <tfoot class="display_none"> <tr> <td class="item_c item_b">Total</td> <td class="item_r item_b"><?php echo number_format($total_trans, 0); ?> </td> <td class="item_r item_b"><?php echo MyFormat::formatPrice($total_revenue); ?> </td> </tr> </tfoot> </table> </div>
if ($mTransactions->type == Listing::FOR_RENT) { $type_for_text = 'FOR RENT'; } ?> <div class="sprint display_none"> <a class="button_print" href="javascript:void(0);" title="print transaction"> <img src="<?php echo Yii::app()->theme->baseUrl; ?> /img/print.png"> </a> </div> <p><?php echo MyFormat::BindNotifyMessage(); ?> <br></p> <script src="<?php echo Yii::app()->theme->baseUrl; ?> /js/jquery.printElement.min.js"></script> <link rel="stylesheet" href="<?php echo Yii::app()->theme->baseUrl; ?> /css/print-transaction.css" /> <script type="text/javascript"> $(document).ready(function(){ $(".button_print").click(function(){ $('#printElement').printElement({ overrideElementCSS: ['<?php echo Yii::app()->theme->baseUrl;
} ?> </ul> </div> </div> </div><!-- ico-bg --> <?php $model->special_feature_json = json_decode($model->special_feature_json); $model->fixtures_fittings_json = json_decode($model->fixtures_fittings_json); $model->outdoor_indoor_space_json = json_decode($model->outdoor_indoor_space_json); $model->furnishing_included_json = json_decode($model->furnishing_included_json); $special_feature_json = ProMasterSpecialFeatures::getListOption($model->special_feature_json); $fixtures_fittings_json = ProMasterFixturesFittings::getListOption($model->fixtures_fittings_json); $aOutdoorIndoor = MyFormat::getListOption($model->outdoor_indoor_space_json, 'ProMasterOutdoorIndoorSpace'); $aFurnishingIncluded = MyFormat::getListOption($model->furnishing_included_json, 'ProMasterFurnishingIncluded'); ?> <?php if (count($special_feature_json)) { ?> <div class="ico-bg"> <h3><?php echo $model->getAttributeLabel('special_feature_json'); ?> </h3> <div class="info-list"> <ul class="list-unstyled"> <?php foreach ($special_feature_json as $item) { ?>
/** * @Author: ANH DUNG Jul 15, 2014 * @Todo: display full name of user * @Param: $mTransaction model transaction * @Param: $invoice_type type invoice * @Param: $invoice_template template print * @Param: $mTransBillTo model transaction bill to với những invoice có External Co-broke * @Return: full name with salution of user */ public static function SaveOneInvoice($mTransaction, $invoice_type, $invoice_template, $mTransBillTo) { //invoice_number sẽ gen ra dựa và o invoice_type $prefix_code = self::getPrefix($invoice_type); $model = new ProTransactionsInvoice(); $model->transactions_id = $mTransaction->id; $model->invoice_number = MyFormat::getNextId('ProTransactionsInvoice', $prefix_code, 'invoice_number', self::getLengthInvoiceNo()); $model->invoice_type = $invoice_type; $model->invoice_template = $invoice_template; $model->type = $mTransaction->type; if ($mTransBillTo) { $model->trans_bill_to_id = $mTransBillTo->id; // primary key model bill to $model->client_type_id = $mTransBillTo->client_type_id; $model->invoice_bill_to = $mTransBillTo->bill_to_id; } $model->save(); }
$tenantInformationNric = $mUser->nric_passportno_roc; $tenantInformationIdType = $mUser->id_type ? Users::$aIdType[$mUser->id_type] : ''; $tenantInformationPassExp = $cmsFormater->formatLongDate($mUser->pass_expiry_date); $currentDate = date('Y-m-d'); $expiredDate = date('Y-m-d', strtotime($mUser->expiration_date)); // $expiredDate=date('Y-m-d', strtotime($value['expired_date'])); // Oct 22, 2014 khong hieu bien $value['expired_date'] o dau ra nua => dong lai if ($expiredDate > $currentDate) { $LinkToSale = Yii::app()->createAbsoluteUrl('member/landlord/engageus', array('tenancies_detail' => 1, 'transaction_id' => $transaction->id, 'listing_id' => $transaction->listing_id)); } } /* ANH DUNG Add Aug 17, 2015 * tách hà m AdFixNameListing, vì hà m formatpropertyname nó rối quá */ $data = $transaction; $title[] = $data->listing ? $data->listing->property_name_or_address : ""; $pName = MyFormat::AdFixNameListing($transaction, $title); ?> <h1 class="title-3">Tenancy detail information</h1> <div class="tab-wrap"> <ul class="tabs tabs-auto clearfix"> <li class="active"><a href="#tab-1">Property <strong>Details</strong></a></li> <li><a href="#tab-2">Documents</a></li> <li><a href="#tab-3">Report <strong>Defect</strong></a></li> <li><a href="#tab-4">Aircon <strong>Services</strong></a></li> <li><a href="#tab-5">Call <strong>History</strong></a></li> <li><a href="#tab-6">Inventory <strong>Photo</strong></a></li> <!--<li><a href="#tab-7">Show all <strong>Tabs</strong></a></li>--> </ul> <div id="tab-1" class="tab-content-2 clearfix"> <div class="clearfix">
/** * @Author: ANH DUNG Mar 19, 2015 * @Todo: Handle Import file, belong to actionImportApi * @Param: $ClassName name of model * @Param: $field_name field in db * @Param: $aData array data from file */ public static function HandleImport($ClassName, $FieldName, $aData, &$aExists, &$aNew) { foreach ($aData as $row) { $aNew[] = MyFormat::escapeValues($row); } // thêm mới toà n bộ echo "<hr>{$ClassName} Data: " . count($aData) . " - Exists: " . count($aExists) . " - New: " . count($aNew); // echo "<hr>$ClassName Data: ".count($aData)." - Exists: ".count($aExists)." - New: ".count($aNew)." - Detail: ".implode(",",$aNew); }
<div class="group-4 top_5"> <?php echo $form->dropDownList($model, 'status', CmsFormatter::$statusReport, array('class' => 'status_report', 'style' => 'width:200px;')); ?> <?php echo $form->error($model, 'status'); ?> </div> </div> <div class="in-row clearfix"> <?php echo $form->labelEx($model, 'approved_by_progess', array('class' => 'lb')); ?> <div class="group-4 top_5"> <?php echo MyFormat::GetNameUserAdminLogin(Yii::app()->user->id); ?> </div> </div> <div class="in-row clearfix"> <?php echo $form->labelEx($model, 'description', array('class' => 'lb')); ?> <div class="group-4 top_5"> <?php echo $model->description; ?> </div> </div> <div class="row in-row clearfix display_none addspan">
/** * @Author: ANH DUNG Jul 02, 2014 * @Todo: get listoption search * @Param: $type */ public static function getListOption() { $criteria = new CDbCriteria(); $criteria->order = 't.value'; $models = self::model()->findAll($criteria); $aRes = array(); foreach ($models as $item) { $aRes[$item->value] = MyFormat::formatFloorSize($item->value); } return $aRes; }
/** * @Author: ANH DUNG Jul 09, 2014 * @Todo: view invoice for transaction * @Param: $id */ public function actionViewInvoice($id) { $model = MyFormat::loadModelByClass($id, 'ProTransactionsInvoice'); $mTransactions = ProTransactions::LoadModelRelationByPk($model->transactions_id); $this->render('ViewInvoice/print_invoice', array('model' => $model, 'mTransactions' => $mTransactions, 'actions' => $this->listActionsCanAccess)); }
protected function beforeSave() { if (!empty($this->posted) && strpos($this->posted, '/')) { $this->posted = MyFormat::dateConverDmyToYmd($this->posted); } return parent::beforeSave(); }
/** * @Author: ANH DUNG Feb 10, 2015 * @Todo: format ListedDate of listing * Re-listed on OR Listed on * Re-listed on Feb 08, 2015 * @Param: $model model listing */ public static function FormatListedDate($model) { $date = $model->date_listed; $text = "Listed on "; if ($model->re_listed_count) { $date = $model->re_listed_date; $text = "Re-listed on "; } $res = $text . MyFormat::dateConverYmdToDmy($date, MyFormat::$sDateIndexListing); return $res; }
<?php $dataProvider = $model->SearchCompanyBE(); $this->widget('zii.widgets.grid.CGridView', array('id' => 'listing-company-grid', 'dataProvider' => $dataProvider, 'enableSorting' => true, 'afterAjaxUpdate' => 'function(id, data){ fnBindMoveTo();}', 'summaryText' => 'Show:' . MyFormat::GetDropDownPageSize('pageSize', $dataProvider->pagination->pageSize) . ' rows per page', 'columns' => array(array('class' => 'CCheckBoxColumn', 'selectableRows' => 2, 'id' => 'chk'), array('header' => 'S/N', 'type' => 'raw', 'value' => '$this->grid->dataProvider->pagination->currentPage * $this->grid->dataProvider->pagination->pageSize + ($row+1)', 'headerHtmlOptions' => array('width' => '30px', 'style' => 'text-align:center;'), 'htmlOptions' => array('style' => 'text-align:center;')), array('name' => 'listing_type', 'header' => 'Type', 'type' => 'PropertyType', 'headerHtmlOptions' => array('class' => 'first', 'style' => 'width:70px;')), array('name' => 'location_id', 'header' => 'District', 'value' => '"D".($data->location_id>9?$data->location_id:"0$data->location_id")'), array('name' => 'property_name_or_address', 'header' => 'Property Address'), array('name' => 'unit_from', 'value' => '$data->unit_from." - $data->unit_to"', 'htmlOptions' => array('style' => 'width: 50px;')), array('name' => 'floor_area', 'type' => 'Price', 'htmlOptions' => array('style' => 'text-align:right;')), array('name' => 'of_bedroom', 'htmlOptions' => array('style' => 'text-align:center;')), array('name' => 'price', 'type' => 'Price', 'htmlOptions' => array('style' => 'width: 80px;text-align:right;')), array('name' => 'company_owner_name'), array('name' => 'contact_name_no'), array('name' => 'company_email'), array('name' => 'company_availability'), array('name' => 'dnc_expiry_date', 'type' => 'CompanyDncExpiryDate', 'value' => '$data'), array('name' => 'user_id', 'type' => 'FullNameRegisteredUsers', 'value' => '$data->rUser?$data->rUser:null', 'htmlOptions' => array('style' => 'width: 100px;')), array('name' => 'owner_contact_click', 'type' => 'raw', 'value' => '$this->grid->widget("application.components.ListingClickWidget", array("listing"=>$data), true)', 'htmlOptions' => array('style' => 'width: 100px;')), array('name' => 'last_update_time', 'type' => 'date'), array('name' => 'company_listing_status', 'type' => 'ListingCompanyStatus', 'value' => '$data', 'htmlOptions' => array('style' => 'text-align:center;')), array('header' => 'Move To', 'class' => 'CButtonColumn', 'template' => '{move_to_that}', 'buttons' => array('move_to_that' => array('label' => "Move To {$MoveTo}", 'options' => array('class' => 'move_to_that ajaxupdate remove_target_blank'), 'url' => 'Yii::app()->createAbsoluteUrl("admin/ajax/companyListingMoveto", array("id"=>$data->id, "company_listing_type"=>Listing::$COMPANY_TYPE_MOVE_REVERT[$data->company_listing_type] ))'))), array('header' => 'Actions', 'class' => 'CButtonColumn', 'template' => ControllerActionsName::createIndexButtonRoles($actions), 'buttons' => array('update' => array('visible' => 'Listing::CanUpdateCompanyListing($data)'), 'delete' => array('visible' => 'Listing::CanDeleteCompanyListing($data)')))))); ?> <style> .summary { float:right !important;} .change-pageSize { padding:0; height:23px;} </style> <script> $(function(){ fnBindMoveTo(); }); function fnBindMoveTo(){ $('.move_to_that').click(function(){ if(confirm('Are you sure to move this item?')){ return true; } return false; }); $('.remove_target_blank').attr('target',''); $('.change-pageSize').change(function(){ var pageSize = $(this).val(); $('.change-pageSize').val(pageSize); $('.submit_form_pri').find('button:submit').trigger('click'); });
if ($model->tenancy_expiry_datepicker != '' && strtolower($model->tenancy_expiry_date) == 'yes') { $str = $cmsFormater->formatDate($model->tenancy_expiry_datepicker); } return $str; } /* * DTOAN * */
/** * @Author: ANH DUNG Sep 15, 2014 * @Todo: calc report daily * @Param: $model model * @Param: $aRes var return * @Param: $date_from 2014-05-25 * @Param: $date_to model 2014-09-25 * BA-Tung Hoang: cai sales report cua financial anh lay nhung cai amount cua invoice ma da paid roi tru cho cai amount cua voucher DA PAID */ public static function ReportDailyTrans($model, &$aRes, $date_from, $date_to) { $criteria = new CDbCriteria(); $criteria->addBetweenCondition("t.received_on", $date_from, $date_to); $criteria->compare('t.status', STATUS_GEN_RECEIPT); $criteria->addCondition('t.received_on IS NOT NULL'); $criteria->select = "sum(profit_to_property_info) as profit_to_property_info,sum(profit_to_property_info_by_company) as profit_to_property_info_by_company," . " t.received_on, count(DISTINCT t.transactions_id) as count_record"; $criteria->group = "t.received_on"; $criteria->order = "t.received_on"; $models = ProTransactionsSaveCommission::model()->findAll($criteria); foreach ($models as $item) { $aRes['TOTAL_AMOUNT_INVOICE'][$item->received_on] = $item->profit_to_property_info + $item->profit_to_property_info_by_company; $aRes['COUNT_TRANS'][$item->received_on] = $item->count_record; } $aRes['LOOP_VAR'] = MyFormat::getArrayDay($date_from, $date_to); }
} } public function actionTest() { $this->layout = false; $this->render('test'); } public function actionLoadmapdetail($listing_id, $size = 'small_map') { $this->layout = false; Yii::app()->clientScript->registerCoreScript('jquery'); $model = Listing::model()->findByPk($listing_id); $this->render('load_map_detail', array('model' => $model, 'size' => $size)); } /********* Mar 04, 2015 ANH DUNG FOR IMPORT NEW DATA Postal Code *********/ /********* STEP TO UPDATE THIS 6-Digit Postal Code ********
$this->breadcrumbs = array('Tenancies Approved'); Yii::app()->clientScript->registerScript('search', "\n\$('.search-button').click(function(){\n\t\$('.search-form').toggle();\n\treturn false;\n});\n\$('.search-form form').submit(function(){\n\t\$.fn.yiiGridView.update('pro-transactions-grid', {\n url : \$(this).attr('action'),\n\t\tdata: \$(this).serialize()\n\t});\n\treturn false;\n});\n"); Yii::app()->clientScript->registerScript('ajaxupdate', "\n\$('#pro-transactions-grid a.ajaxupdate').live('click', function() {\n \$.fn.yiiGridView.update('pro-transactions-grid', {\n type: 'POST',\n url: \$(this).attr('href'),\n success: function() {\n \$.fn.yiiGridView.update('pro-transactions-grid');\n }\n });\n return false;\n});\n"); //MyFormat::isAllowAccess("callsLog", "index") //if(MyFormat::isAllowAccess('callsLog', 'index')) // echo 'sssssssss'; ?> <h1><?php echo Yii::t('translation', 'Tenancies Approved'); ?> </h1> <?php $this->widget('zii.widgets.grid.CGridView', array('id' => 'users-model-grid', 'dataProvider' => $model->getBEListTenancies(), 'filter' => $model, 'enableSorting' => false, 'afterAjaxUpdate' => 'function(id, data){ fixTargetBlank(); fnUpdateLink(); }', 'columns' => array(array('header' => 'Property name', 'name' => 'sPropertyName', 'type' => 'propertyname', 'value' => 'array("name"=>$data->listing?$data->listing->property_name_or_address:"", "transaction_id"=>$data->id,"orther"=>isset($data->listing) ? $data->listing->property_house_blk_no:"","title_full"=>$data )', 'htmlOptions' => array('class' => 'w-250 ', 'style' => '')), array('name' => 'tenancy_agreement_date', 'type' => 'longDate', 'value' => '$data->tenancy_agreement_date', 'htmlOptions' => array('class' => 'w-150 item_c', 'style' => ''), 'filterHtmlOptions' => array('class' => 'ad_w1 ad_datepicker', 'style' => '')), array('name' => 'commencement_date', 'type' => 'longDate', 'value' => '$data->commencement_date', 'htmlOptions' => array('class' => 'w-150 item_c', 'style' => ''), 'filterHtmlOptions' => array('class' => 'ad_w1 ad_datepicker', 'style' => '')), array('name' => 'expiring_date', 'type' => 'expiredDate', 'value' => '$data->expiring_date', 'htmlOptions' => array('class' => 'w-150 item_c', 'style' => ''), 'filterHtmlOptions' => array('class' => 'ad_w1 ad_datepicker', 'style' => '')), array('header' => 'Tenancy Amount', 'name' => 'tenancy_amount', 'type' => 'price', 'value' => '$data->tenancy_amount', 'htmlOptions' => array('class' => 'w-80 item_r', 'style' => ''), 'filterHtmlOptions' => array('class' => 'ad_w1', 'style' => '')), array('header' => 'Deposit Payable', 'name' => 'deposit_payable', 'type' => 'price', 'value' => '$data->deposit_payable', 'htmlOptions' => array('class' => 'w-80 item_r', 'style' => ''), 'filterHtmlOptions' => array('class' => 'ad_w1', 'style' => '')), array('header' => 'Tenancy Period', 'name' => 'months_rent', 'value' => '$data->months_rent != NULL ? $data->months_rent." months":""', 'htmlOptions' => array('class' => 'w-80 item_c', 'style' => ''), 'filterHtmlOptions' => array('class' => 'ad_w1', 'style' => '')), array('header' => 'Calls Log', 'type' => 'LinkCallsLog', 'value' => '$data', 'htmlOptions' => array('style' => 'text-align:center;'), 'visible' => MyFormat::isAllowAccess("callsLog", "index")), array('header' => 'Report Defect(s)', 'type' => 'LinkReportDefect', 'value' => '$data', 'htmlOptions' => array('style' => 'text-align:center;'), 'visible' => MyFormat::isAllowAccess("reportDefect", "index")), array('header' => 'Inventory Photo', 'type' => 'LinkInventoryPhoto', 'value' => '$data', 'htmlOptions' => array('style' => 'text-align:center;'), 'visible' => MyFormat::isAllowAccess("tenancy", "inventoryPhoto")), array('header' => 'Aircon Services', 'type' => 'LinkAirconServices', 'value' => '$data', 'htmlOptions' => array('style' => 'text-align:center;'), 'visible' => MyFormat::isAllowAccess("airconService", "index")), array('header' => 'Actions', 'class' => 'CButtonColumn', 'template' => ControllerActionsName::createIndexButtonRoles($actions), 'buttons' => array('update' => array('label' => 'Update tenancy', 'url' => 'ProTransactions::GetLinkUpdateTenancyBE($data, array("update_tenancy_approved"=>1))', 'visible' => 'ProTransactions::CanUpdateTenancyApproved($data)')))))); Yii::app()->clientScript->registerCoreScript('jquery.ui'); ?> <script type="text/javascript" src="<?php echo Yii::app()->theme->baseUrl; ?> /admin/colorbox/jquery.colorbox-min.js"></script> <link rel="stylesheet" href="<?php echo Yii::app()->theme->baseUrl; ?> /admin/css/colorbox.css" /> <script> $(function(){ fnUpdateLink();
echo isset(ProAgentTierManager::$ARR_NUMBER[$mAgentTier->type_tier]) ? ProAgentTierManager::$ARR_NUMBER[$mAgentTier->type_tier] : 'th'; ?> </sup> Tier Manager </h4> <div class="content"> <div class="in-row clearfix"> <label class="lb">Name</label> <div class="group"><?php echo $cmsFormater->formatFullNameRegisteredUsers($mAgent); ?> </div> </div> <div class="in-row clearfix"> <label class="lb">Commission</label> <div class="group"><?php echo MyFormat::formatNumberLeft($percent); ?> %</div> </div> <div class="in-row clearfix"> <label class="lb">Mobile</label> <div class="group"><?php echo $cmsFormater->formatFullPhone($mAgent); ?> </div> </div> </div> </div> <?php } ?>
" maxrow="<?php echo $key + 1; ?> " class="btn btn-small AddProperty row_number_<?php echo $key + 1; ?> "> Add Property </a> <?php echo $form->hiddenField($mDetail, 'id[]', array('value' => $mDetail->id, "class" => "w-100 detail_id", 'maxlength' => 14)); ?> </td> <td class="l_padding_10 w-150 item_r"> <?php echo $form->textField($mDetail, 'amount[]', array('value' => MyFormat::formatNumberInput($mDetail->amount), "class" => "amount w-100 number_only item_r", 'maxlength' => 14)); ?> <p>Amount Gst (<?php echo Yii::app()->params['gst']; ?> %) : <span class="amount_gst"><?php echo $cmsFormater->formatPrice($mDetail->amount_gst); ?> </span></p> <?php echo $form->error($mDetail, 'amount', array('class' => 'errorMessage')); ?> </td> <!-- <td class="item_c last "> <span class="remove_icon_only <?php echo $display_none;
protected function beforeSave() { $this->date = MyFormat::InvoiceDateToDbDate($this->date); return parent::beforeSave(); }
<h3><a href="<?php echo Yii::app()->createAbsoluteUrl('site/listingdetail', array('slug' => $data->slug)); ?> "> <?php echo $data->property_name_or_address; ?> </a> </h3> <p><?php echo $data->rPropertyType ? $data->rPropertyType->name : ''; ?> </p> <!--<p>376 Thomson Road</p>--> <p class="type">Listed on <?php echo MyFormat::dateConverYmdToDmy($data->date_listed, MyFormat::$sDateIndexListing); ?> </p> <p class="price"><?php echo $cmsFormater->formatPrice($data->price); ?> </p> <p><?php echo $cmsFormater->formatPrice($data->office_bkank_valuation); ?> </p> <p><?php echo $data->floor_area; ?> sqft</p> <div class="ico-group clearfix">
<span class="description"><?php echo FiInvoiceDetail::fnBuildDescription($mDetail); ?> </span> <?php $display_none = 'display_none'; $total_amount_due += $mDetail->amount; if ($key) { $display_none = ''; } $next = Yii::app()->createAbsoluteUrl('admin/fiInvoice/create', array('row_number' => $key + 1)); ?> </td> <td class="l_padding_10 w-150 item_r"> <?php echo MyFormat::formatPrice($mDetail->amount); ?> </td> </tr> <?php } ?> <?php } ?> </tbody> <tfoot> <tr> <td colspan="2" class="item_r item_b"> Total Amount Due </td>
protected function beforeSave() { $aAttributes = array('tenure', 'address', 'postal_code', 'name', 'email', 'phone', 'description', 'remark', 'occupation'); MyFormat::RemoveScriptOfModelField($this, $aAttributes); return parent::beforeSave(); }