Example #1
0
            $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>
                <td class="item_r TotalAmountDue item_b"><?php 
echo $cmsFormater->formatPrice($total_amount_due);
?>
</td>
            </tr>
        </tfoot>
    </table>
</div>
Example #2
0
$this->breadcrumbs = array('Invoice Management' => array('index'), $model->invoice_no);
$menus = array(array('label' => 'Invoice Management', 'url' => array('index')), array('label' => 'Create Invoice', 'url' => array('create')), array('label' => 'Update Invoice', 'url' => array('update', 'id' => $model->id)), array('label' => 'Delete Invoice', 'url' => array('delete'), 'linkOptions' => array('submit' => array('delete', 'id' => $model->id), 'confirm' => 'Are you sure you want to delete this item?')));
$this->menu = ControllerActionsName::createMenusRoles($menus, $actions);
$model->aModelDetail = $model->rDetail;
$cmsFormater = new CmsFormatter();
$InvoiceNumber = $model->invoice_no;
$InvoiceDate = $cmsFormater->formatDate($model->created_date);
// invoice normal
//$BillTo = FiInvoice::$STA_BILL_TO[$model->bill_to];
$CommissionAmount = $model->total_amount_due_gst;
$BillTo = $model->user_name;
$BillingAddress = $model->user_billing_address;
$PostalCode = $model->user_postal_code;
$CommissionAmountInText = NumberToText::convertNumber($CommissionAmount);
$CommissionAmountFormat = $cmsFormater->formatPrice($CommissionAmount);
//
//$CreatedDate = $cmsFormater->formatDate($model->created_date);
//$ReceiptDatePaid = $cmsFormater->formatDate($model->receipt_date_paid);
//$ReceiptInvoice = ProTransactionsInvoice::getReceiptInvoiceNo($model);
?>

<div class="sprint l_padding_140">
    <a class="button_print" href="javascript:void(0);" title="Print">
        <img src="<?php 
echo Yii::app()->theme->baseUrl;
?>
/img/print.png">
    </a>
</div>
<script  src="<?php 
Example #3
0
?>
                </div>
            </div>
            <div class="in-row clearfix" >
                <label class="lb">Commoncement Date:</label>
                <div class="group">
                    <?php 
echo $cms->formatLongDate($transaction->commencement_date);
?>
                </div>
            </div>
            <div class="in-row clearfix" >
                <label class="lb">Deposit Paid:</label>
                <div class="group">
                    <?php 
echo $cms->formatPrice($transaction->deposit_payable);
?>
                </div>
            </div>
            <div class="in-row clearfix" >
                <label class="lb">Tenancy Amount:</label>
                <div class="group">
                    <?php 
echo $cms->formatPrice($transaction->tenancy_amount);
?>
                </div>
            </div>
            <div class="in-row clearfix" >
                <label class="lb">Expiring Date:</label>
                <div class="group">
                    <?php 
Example #4
0
echo Yii::t('translation', 'Invoices Management');
?>
</h1>

<?php 
echo CHtml::link(Yii::t('translation', 'Advanced Search'), '#', array('class' => 'search-button'));
?>
<div class="search-form" style="display:none">
<?php 
$this->renderPartial('_search', array('model' => $model));
?>
</div><!-- search-form -->

<?php 
$cmsFormater = new CmsFormatter();
$total_amount = $cmsFormater->formatPrice(FiInvoice::getTotalAmountGst());
$this->widget('zii.widgets.grid.CGridView', array('id' => 'fi-invoice-grid', 'dataProvider' => $model->searchMixed(), 'enableSorting' => true, 'afterAjaxUpdate' => 'function(id, data){ fixTargetBlank();  fnUpdateLink(); }', 'template' => "<div class='item_b'>Total Amount: {$total_amount}</div>{summary}{items}{pager}", 'columns' => array(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('header' => 'Invoice No', 'name' => 'invoice_no'), array('header' => 'Invoice Date', 'name' => 'created_date', 'type' => 'date', 'htmlOptions' => array('style' => 'text-align:center;')), array('header' => 'Transaction No', 'name' => 'transactions_no'), array('header' => 'Property Address', 'name' => 'property_address', 'type' => 'raw'), array('header' => 'Total Amount Due Gst', 'name' => 'total_amount_due_gst'), array('header' => 'Status', 'name' => 'status'), array('header' => 'Receipt', 'name' => 'receipt', 'type' => 'raw', 'htmlOptions' => array('style' => 'text-align:center;')), array('header' => 'Actions', 'class' => 'CButtonColumn', 'template' => '{view}{update}{delete}', 'buttons' => array('view' => array('url' => '$data["viewUrl"]'), 'update' => array('visible' => 'isset($data["updateUrl"])', 'url' => '$data["updateUrl"]'), 'delete' => array('visible' => 'isset($data["deleteUrl"])', 'url' => '$data["deleteUrl"]'))))));
?>

<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();        
    });
            <?php 
echo $form->error($mTransactions->mBillTo, 'commission_amount');
?>
        </div>        
    </div>

    <?php 
$cmsFormater = new CmsFormatter();
?>
    <div class="in-row clearfix">
        <?php 
echo $form->labelEx($mTransactions->mBillTo, 'commission_amount_gst', array('class' => 'lb'));
?>
        <div class="group-4">
            <input class="text commission_amount_gst_show" value="<?php 
echo $cmsFormater->formatPrice($mTransactions->mBillTo->commission_amount_gst);
?>
" readonly="1" type="text" >
            <?php 
// echo $form->textField($mTransactions->mBillTo,'commission_amount_gst',array('class'=>'text commission_amount_gst', 'readonly'=>1));
?>
            <?php 
echo $form->hiddenField($mTransactions->mBillTo, 'commission_amount_gst', array('class' => 'text commission_amount_gst', 'readonly' => 1));
?>
            <?php 
echo $form->error($mTransactions->mBillTo, 'commission_amount_gst');
?>
        </div>        
    </div>

    <div class="in-row clearfix">
Example #6
0
                    <?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">
                <p class="btn-4"><span class="ico-bed"><?php 
echo $data->rBedroom ? $data->rBedroom->value : '';
?>
</span></p>
Example #7
0
     if (isset($_SESSION['DATA_COMM_REPORT']['GrossCommissionAmount'][$model->id])) {
         $cmsFormater = new CmsFormatter();
         return $cmsFormater->formatPrice($_SESSION['DATA_COMM_REPORT']['GrossCommissionAmount'][$model->id]);
     }
     return '';
 }
 // ANH DUNG Sep 19, 2014
 public function formatSumReportSalespersonName($model)
 {
     $cmsFormater = new CmsFormatter();
     return $cmsFormater->formatFullNameRegisteredUsers($model->rUser);
 }
Example #8
0
?>
"></div>
        </div>
        <div class="description">
            <h3>
				<a href="<?php 
echo Yii::app()->createAbsoluteUrl('site/listingdetail', array('slug' => $data->slug));
?>
">
                    <?php 
echo Listing::FormatNameListingIndexGrid($data, array('not_type' => 1));
?>
                </a>
            </h3>
            <p><?php 
echo $data->rPropertyType ? $data->rPropertyType->name : '';
?>
</p>
            <?php 
echo Listing::FormatShowBuildingOrStreet($data);
?>
            <p>Marketed by 
				<a href="<?php 
echo $this->createUrl('/agent/view', array('slug' => $data->rUser->slug));
?>
"><?php 
echo $data->rUser->name_for_slug;
?>
</a> - 
				<strong>Call 
				<?php 
Example #9
0
 public static function ListingCompany()
 {
     Yii::import('application.extensions.vendors.PHPExcel', true);
     $objPHPExcel = new PHPExcel();
     // Set properties
     $objPHPExcel->getProperties()->setCreator("ANHDUNG")->setLastModifiedBy("ANHDUNG")->setTitle('Company Listing')->setSubject("Office 2007 XLSX Document")->setDescription("Company Listing")->setKeywords("office 2007 openxml php")->setCategory("Company Listing");
     $row = 1;
     $i = 1;
     $dataAll = $_SESSION['data-excel']->data;
     $company_listing_type = $_SESSION['data_excel_company_listing_type'];
     $HeadTitle = 'Immediate Listing';
     if ($company_listing_type == Listing::COMPANY_FOLLOW_UP) {
         $HeadTitle = 'Follow Up Listing';
     }
     $cmsFormatter = new CmsFormatter();
     // 1.sheet 1
     $objPHPExcel->setActiveSheetIndex(0);
     $objPHPExcel->getActiveSheet()->getDefaultStyle()->getFont()->setName('Times New Roman');
     $objPHPExcel->getActiveSheet()->getDefaultStyle()->getFont()->setSize(12);
     $objPHPExcel->getActiveSheet()->setTitle('Company ' . $HeadTitle);
     //            $objPHPExcel->getActiveSheet()->setCellValue("A$row", 'Client List');
     //            $objPHPExcel->getActiveSheet()->getStyle("A$row")->getFont()
     //                                ->setBold(true);
     //            $objPHPExcel->getActiveSheet()->mergeCells("A$row:H$row");
     //            $row++;
     $index = 1;
     $beginBorder = $row;
     $objPHPExcel->getActiveSheet()->setCellValue(MyFormat::columnName($index++) . "{$row}", 'SN');
     $objPHPExcel->getActiveSheet()->setCellValue(MyFormat::columnName($index++) . "{$row}", 'Property Name Or Address');
     $objPHPExcel->getActiveSheet()->setCellValue(MyFormat::columnName($index++) . "{$row}", 'Postal Code');
     $objPHPExcel->getActiveSheet()->setCellValue(MyFormat::columnName($index++) . "{$row}", 'District – location	');
     $objPHPExcel->getActiveSheet()->setCellValue(MyFormat::columnName($index++) . "{$row}", 'Property Type');
     $objPHPExcel->getActiveSheet()->setCellValue(MyFormat::columnName($index++) . "{$row}", 'Unit #');
     $objPHPExcel->getActiveSheet()->setCellValue(MyFormat::columnName($index++) . "{$row}", 'House/Blk No');
     $objPHPExcel->getActiveSheet()->setCellValue(MyFormat::columnName($index++) . "{$row}", 'Building Name');
     $objPHPExcel->getActiveSheet()->setCellValue(MyFormat::columnName($index++) . "{$row}", 'Listing Type');
     $objPHPExcel->getActiveSheet()->setCellValue(MyFormat::columnName($index++) . "{$row}", 'Owner Name');
     $objPHPExcel->getActiveSheet()->setCellValue(MyFormat::columnName($index++) . "{$row}", 'Contact No');
     $objPHPExcel->getActiveSheet()->setCellValue(MyFormat::columnName($index++) . "{$row}", 'Email');
     $objPHPExcel->getActiveSheet()->setCellValue(MyFormat::columnName($index++) . "{$row}", 'Dnc Expiry Date');
     $objPHPExcel->getActiveSheet()->setCellValue(MyFormat::columnName($index++) . "{$row}", 'Floor Area');
     $objPHPExcel->getActiveSheet()->setCellValue(MyFormat::columnName($index++) . "{$row}", '# Of Bedrooms');
     $objPHPExcel->getActiveSheet()->setCellValue(MyFormat::columnName($index++) . "{$row}", 'Storey');
     $objPHPExcel->getActiveSheet()->setCellValue(MyFormat::columnName($index++) . "{$row}", 'Utility Room');
     $objPHPExcel->getActiveSheet()->setCellValue(MyFormat::columnName($index++) . "{$row}", 'Price (S$)');
     $objPHPExcel->getActiveSheet()->setCellValue(MyFormat::columnName($index++) . "{$row}", 'Built Up');
     $objPHPExcel->getActiveSheet()->setCellValue(MyFormat::columnName($index++) . "{$row}", 'Tenure');
     $objPHPExcel->getActiveSheet()->setCellValue(MyFormat::columnName($index++) . "{$row}", 'Availability');
     $objPHPExcel->getActiveSheet()->setCellValue(MyFormat::columnName($index++) . "{$row}", 'Created By');
     $objPHPExcel->getActiveSheet()->setCellValue(MyFormat::columnName($index++) . "{$row}", 'Last Modified Date');
     $objPHPExcel->getActiveSheet()->setCellValue(MyFormat::columnName($index++) . "{$row}", 'Remark');
     $index--;
     $objPHPExcel->getActiveSheet()->getStyle("A{$row}:" . MyFormat::columnName($index) . $row)->getAlignment()->setHorizontal(PHPExcel_Style_Alignment::HORIZONTAL_CENTER);
     $objPHPExcel->getActiveSheet()->getStyle("A{$row}:" . MyFormat::columnName($index) . $row)->getFont()->setBold(true);
     $row++;
     foreach ($dataAll as $data) {
         $index = 1;
         $objPHPExcel->getActiveSheet()->setCellValue(MyFormat::columnName($index++) . "{$row}", $i);
         $objPHPExcel->getActiveSheet()->setCellValue(MyFormat::columnName($index++) . "{$row}", $data->property_name_or_address);
         $objPHPExcel->getActiveSheet()->setCellValue(MyFormat::columnName($index++) . "{$row}", $data->postal_code);
         $objPHPExcel->getActiveSheet()->setCellValue(MyFormat::columnName($index++) . "{$row}", $cmsFormatter->formatListingDistrict($data));
         $objPHPExcel->getActiveSheet()->setCellValue(MyFormat::columnName($index++) . "{$row}", Listing::getViewDetailPropertyType($data));
         $objPHPExcel->getActiveSheet()->setCellValue(MyFormat::columnName($index++) . "{$row}", $data->unit_from . " - {$data->unit_to}");
         $objPHPExcel->getActiveSheet()->setCellValue(MyFormat::columnName($index++) . "{$row}", $data->house_blk_no);
         $objPHPExcel->getActiveSheet()->setCellValue(MyFormat::columnName($index++) . "{$row}", $data->building_name);
         $objPHPExcel->getActiveSheet()->setCellValue(MyFormat::columnName($index++) . "{$row}", $cmsFormatter->formatPropertyType($data->listing_type));
         $objPHPExcel->getActiveSheet()->setCellValue(MyFormat::columnName($index++) . "{$row}", $data->company_owner_name);
         $objPHPExcel->getActiveSheet()->setCellValue(MyFormat::columnName($index++) . "{$row}", $data->contact_name_no);
         $objPHPExcel->getActiveSheet()->setCellValue(MyFormat::columnName($index++) . "{$row}", $data->company_email);
         $objPHPExcel->getActiveSheet()->setCellValue(MyFormat::columnName($index++) . "{$row}", $cmsFormatter->formatDate($data->dnc_expiry_date));
         $objPHPExcel->getActiveSheet()->setCellValue(MyFormat::columnName($index++) . "{$row}", $cmsFormatter->formatPrice($data->floor_area));
         $objPHPExcel->getActiveSheet()->setCellValue(MyFormat::columnName($index++) . "{$row}", $cmsFormatter->formatPrice($data->of_bedroom));
         $objPHPExcel->getActiveSheet()->setCellValue(MyFormat::columnName($index++) . "{$row}", $data->company_storey);
         $objPHPExcel->getActiveSheet()->setCellValue(MyFormat::columnName($index++) . "{$row}", $data->company_utility_room);
         $objPHPExcel->getActiveSheet()->setCellValue(MyFormat::columnName($index++) . "{$row}", $cmsFormatter->formatPrice($data->price));
         $objPHPExcel->getActiveSheet()->setCellValue(MyFormat::columnName($index++) . "{$row}", $data->company_built_up);
         $objPHPExcel->getActiveSheet()->setCellValue(MyFormat::columnName($index++) . "{$row}", $data->tenure);
         $objPHPExcel->getActiveSheet()->setCellValue(MyFormat::columnName($index++) . "{$row}", $data->company_availability);
         $objPHPExcel->getActiveSheet()->setCellValue(MyFormat::columnName($index++) . "{$row}", $cmsFormatter->formatNameForAll($data->rUser));
         $objPHPExcel->getActiveSheet()->setCellValue(MyFormat::columnName($index++) . "{$row}", $cmsFormatter->formatDate($data->last_update_time));
         $objPHPExcel->getActiveSheet()->setCellValue(MyFormat::columnName($index++) . "{$row}", $data->remark);
         $row++;
         $i++;
     }
     // end body
     $objPHPExcel->getActiveSheet()->getStyle("B{$beginBorder}:" . MyFormat::columnName($index) . $row)->getAlignment()->setWrapText(true);
     $objPHPExcel->getActiveSheet()->getColumnDimension('B')->setWidth(25);
     $objPHPExcel->getActiveSheet()->getColumnDimension('C')->setWidth(10);
     $objPHPExcel->getActiveSheet()->getColumnDimension('D')->setWidth(30);
     $objPHPExcel->getActiveSheet()->getColumnDimension('E')->setWidth(20);
     $objPHPExcel->getActiveSheet()->getColumnDimension('F')->setWidth(10);
     $objPHPExcel->getActiveSheet()->getColumnDimension('G')->setWidth(15);
     $objPHPExcel->getActiveSheet()->getColumnDimension('H')->setWidth(20);
     $objPHPExcel->getActiveSheet()->getColumnDimension('I')->setWidth(10);
     $objPHPExcel->getActiveSheet()->getColumnDimension('J')->setWidth(20);
     $objPHPExcel->getActiveSheet()->getColumnDimension('K')->setWidth(20);
     $objPHPExcel->getActiveSheet()->getColumnDimension('L')->setWidth(20);
     $objPHPExcel->getActiveSheet()->getColumnDimension('M')->setWidth(20);
     $objPHPExcel->getActiveSheet()->getColumnDimension('N')->setWidth(20);
     $objPHPExcel->getActiveSheet()->getColumnDimension('O')->setWidth(15);
     $objPHPExcel->getActiveSheet()->getColumnDimension('P')->setWidth(20);
     $objPHPExcel->getActiveSheet()->getColumnDimension('Q')->setWidth(20);
     $objPHPExcel->getActiveSheet()->getColumnDimension('R')->setWidth(20);
     $objPHPExcel->getActiveSheet()->getColumnDimension('S')->setWidth(20);
     $objPHPExcel->getActiveSheet()->getColumnDimension('T')->setWidth(20);
     $objPHPExcel->getActiveSheet()->getColumnDimension('U')->setWidth(20);
     $objPHPExcel->getActiveSheet()->getColumnDimension('V')->setWidth(20);
     $objPHPExcel->getActiveSheet()->getColumnDimension('W')->setWidth(20);
     $objPHPExcel->getActiveSheet()->getColumnDimension('X')->setWidth(20);
     $row--;
     $index--;
     $objPHPExcel->getActiveSheet()->getStyle("A{$beginBorder}:A" . $row)->getAlignment()->setHorizontal(PHPExcel_Style_Alignment::HORIZONTAL_CENTER);
     $objPHPExcel->getActiveSheet()->getStyle("H{$beginBorder}:H" . $row)->getAlignment()->setHorizontal(PHPExcel_Style_Alignment::HORIZONTAL_CENTER);
     $objPHPExcel->getActiveSheet()->getStyle("J{$beginBorder}:J" . $row)->getAlignment()->setHorizontal(PHPExcel_Style_Alignment::HORIZONTAL_CENTER);
     $objPHPExcel->getActiveSheet()->getStyle("A{$beginBorder}" . ':' . MyFormat::columnName($index) . $row)->getAlignment()->setVertical(PHPExcel_Style_Alignment::VERTICAL_CENTER);
     $objPHPExcel->getActiveSheet()->getStyle("A{$beginBorder}:" . MyFormat::columnName($index) . $row)->getBorders()->getAllBorders()->setBorderStyle(PHPExcel_Style_Border::BORDER_THIN);
     //save file
     $objWriter = PHPExcel_IOFactory::createWriter($objPHPExcel, 'Excel2007');
     for ($level = ob_get_level(); $level > 0; --$level) {
         @ob_end_clean();
     }
     header('Cache-Control: must-revalidate, post-check=0, pre-check=0');
     header('Pragma: public');
     header('Content-type: ' . 'application/vnd.openxmlformats-officedocument.spreadsheetml.sheet');
     header('Content-Disposition: attachment; filename="' . 'Company ' . $HeadTitle . '.' . 'xlsx' . '"');
     header('Cache-Control: max-age=0');
     $objWriter->save('php://output');
     Yii::app()->end();
 }
Example #10
0
$BillingAddress = $mBillTo->billing_address;
$ContactNo = $mBillTo->contact_no;
$PostalCode = $mBillTo->postal_code;
// for invoice normal
if (in_array($model->invoice_template, ProTransactionsInvoice::$aTemplateInvoiceExCobroke)) {
    $mExternal = $model->rExternalCobroke;
    if ($mExternal) {
        $CommissionAmount = $mExternal->commission_amount_gst;
        $CompanyName = $mExternal->company_name;
        $BillingAddress = $mExternal->billing_address;
        $ContactNo = $mExternal->contact_no;
        $PostalCode = $mExternal->postal_code;
    }
}
$CommissionAmountInText = NumberToText::convertNumber($CommissionAmount);
$CommissionAmountFormat = $cmsFormater->formatPrice($CommissionAmount);
$template = $model->invoice_template;
// for invoice normal
$CreatedDate = $cmsFormater->formatDate($model->created_date);
$ReceiptDatePaid = $cmsFormater->formatDate($model->receipt_date_paid);
$ReceiptInvoice = ProTransactionsInvoice::getReceiptInvoiceNo($model);
if ($model->invoice_type == ProTransactionsInvoice::TYPE_RECEIPT) {
    // for receipt
    $CommissionAmount = $cmsFormater->formatPriceSign(ProTransactionsInvoice::getCommissionAmountTrans($model));
    // for receipt
}
// for voucher
if ($model->invoice_type == ProTransactionsInvoice::TYPE_VOUCHER) {
    $mTransComm = ProTransactionsSaveCommission::getByTransUid($mTransactions->id, $model->voucher_pay_to);
    $mSaleperson = $mTransComm->rUser;
    $voucher_saleperson_name = '';