示例#1
0
<?php

$this->breadcrumbs = array('Subscriptions' => array('index'), 'Manage');
//$this->menu=array(
//	array('label'=>'List Subscription', 'url'=>array('index')),
//	array('label'=>'Create Subscription', 'url'=>array('create')),
//);
LBApplicationUI::newButton(Yii::t('lang', 'New Subcription'), array('url' => $this->createUrl('/paypal/subscription/create')));
echo "<br><br>";
?>

<?php 
$this->widget('bootstrap.widgets.TbGridView', array('id' => 'subscription-grid', 'dataProvider' => $model->search(), 'columns' => array('subscription_id', 'subscription_name', 'subscription_cycle', 'subscription_value', array('class' => 'CButtonColumn'))));
示例#2
0
<?php

// Buttons
echo '<div class="btn-toolbar">';
LBApplicationUI::newButton('New Tax', array('url' => $this->createUrl('createTax')));
echo '</div>';
$this->widget('bootstrap.widgets.TbGridView', array('id' => 'lb_tax_grid', 'dataProvider' => $taxModel, 'columns' => array(array('name' => 'lb_tax_name', 'header' => 'Tax Name', 'value' => '$data->lb_tax_name'), array('name' => 'lb_tax_value', 'header' => 'Value', 'value' => '$data->lb_tax_value'), array('name' => 'lb_tax_is_default', 'header' => 'Tax Default', 'value' => '$data->lb_tax_is_default'), array('class' => 'CButtonColumn', 'template' => '{update}{delete}', 'buttons' => array('delete' => array('url' => 'Yii::app()->createUrl("/configuration/deleteTax",array("id"=>$data->lb_record_primary_key))', 'visible' => 'LbTax::model()->IsTaxExistInvoiceORQuotation($data->lb_record_primary_key)==false'), 'update' => array('url' => 'Yii::app()->createUrl("/configuration/updateTax",array("id"=>$data->lb_record_primary_key))', 'visible' => 'LbTax::model()->IsTaxExistInvoiceORQuotation($data->lb_record_primary_key)==false'))))));
示例#3
0
 * @var $this DefaultController;
 * @var $model LBContracts;
 */
$m = $this->module->id;
$canList = BasicPermission::model()->checkModules($m, 'list');
$canAdd = BasicPermission::model()->checkModules($m, 'add');
$canView = BasicPermission::model()->checkModules($m, 'view');
if (!$canView) {
    echo "Have no permission to see this record";
    return;
}
echo '<div id="lb-container-header">';
echo '<div class="lb-header-right" style="margin-left:-11px;"><h3>' . Yii::t('lang', 'Contract Dashboard') . '</h3></div>';
echo '<div class="lb-header-left">';
if ($canAdd) {
    LBApplicationUI::newButton(Yii::t('lang', 'New Contract'), array('url' => $this->createUrl('create')));
}
echo '</div>';
echo '</div>';
echo '<div style="clear: both;overflow:hidden"><Br>';
?>
<div class="panel">
    <span style="font-size:16px;"><b><?php 
echo Yii::t('lang', 'Outstanding Payments');
?>
</b></span>
    <?php 
$this->Widget('bootstrap.widgets.TbGridView', array('id' => 'lb_contract_outstanding_gridview', 'dataProvider' => $model->getContractOutstanding(5, $canList), 'type' => 'striped bordered condensed', 'columns' => array(array('name' => 'lb_contract_no', 'type' => 'raw', 'value' => '
                            ($data->lb_contract_no) ?
                                    LBApplication::workspaceLink($data->lb_contract_no, $data->getViewURL($data->customer->lb_customer_name) )
                                    :LBApplication::workspaceLink("No customer", $data->getViewURL("No customer") )
示例#4
0
<?php

$model = UserList::model()->search();
$this->widget('bootstrap.widgets.TbGridView', array('id' => 'lb_list', 'dataProvider' => $model, 'htmlOptions' => array('class' => 'items table table-bordered', 'width' => '98%'), 'columns' => array(array('name' => 'List', 'type' => 'raw', 'value' => 'CHtml::link($data->system_list_code,Yii::app()->createUrl("configuration/list_item",array("list"=>$data->system_list_code)))'), array('class' => 'CButtonColumn', 'template' => '{update}{delete}', 'buttons' => array('delete' => array('url' => 'Yii::app()->createUrl("/configuration/deleteList",array("list"=>$data->system_list_code))'), 'update' => array('url' => 'Yii::app()->createUrl("/configuration/updateList",array("list"=>$data->system_list_code))'))))));
echo '<div class="btn-toolbar" id ="new_item">';
LBApplicationUI::newButton('New List', array());
echo '</div>';
?>
    
    
    

<div hidden ="true" id="form-new-item" class="accordion-body collapse in">
    <input type="text" value="" id="new"><lable id ="err"></lable>
                    <?php 
//echo '<br>';
?>
                    <?php 
echo '<div id ="newItem">';
echo CHtml::Button('Insert', array('onclick' => 'load_item();return false;', 'class' => 'btn', 'style' => 'margin-top:-3px;'));
echo '</div>';
?>
                
</div><!-- form -->
<style>
    .table
    {
        width: 98%;
    }
    </style>
<script>
<?php

/* 
 * To change this license header, choose License Headers in Project Properties.
 * To change this template file, choose Tools | Templates
 * and open the template in the editor.
 */
$m = $this->module->id;
$canAdd = BasicPermission::model()->checkModules($m, 'add');
$canList = BasicPermission::model()->checkModules($m, 'list');
echo '<div class="btn-toolbar">';
if ($canAdd) {
    LBApplicationUI::newButton(Yii::t('lang', 'New Payment Voucher'), array('url' => $this->createUrl('createPaymentVoucher')));
}
echo '</div><br/>';
echo '<div align="right">';
//from
echo Yii::t('lang', 'From') . ':</td>';
echo '&nbsp;&nbsp;';
echo '<input type="text" id="pv_date" name="LbExpenses[lb_expenses_date]" value="' . date('d-m-Y') . '"><span style="display: none" id="LbExpenses_lb_expenses_date_em_" class="help-inline error"></span>';
echo '&nbsp;&nbsp;&nbsp;';
//to
echo Yii::t('lang', 'To') . ':</td>';
echo '&nbsp;&nbsp;';
echo '<input type="text" id="pv_date_to" name="LbExpenses[lb_expenses_date]" value="' . date('d-m-Y') . '"><span style="display: none" id="LbExpenses_lb_expenses_date_em_" class="help-inline error"></span>';
echo '&nbsp;&nbsp;&nbsp;';
echo '<button class="btn" name="yt0" type="submit" onclick = "searchPV()" style="margin-top:-10px">Search</button>';
echo '</div><br/>';
echo '<div id ="list_payment_voucher">';
$this->widget('bootstrap.widgets.TbGridView', array('id' => 'payment_invoice_grid', 'type' => 'bordered', 'dataProvider' => LbPaymentVoucher::model()->search(), 'columns' => array(array('class' => 'CButtonColumn', 'template' => '{delete}', 'deleteButtonUrl' => 'CHtml::normalizeUrl(array("/lbExpenses/default/deletePaymentVoucher", "id"=>$data->lb_record_primary_key))', 'htmlOptions' => array('width' => '30'), 'headerHtmlOptions' => array('class' => 'lb-grid-header')), array('header' => Yii::t('lang', 'Date'), 'name' => 'lb_customer_id', 'type' => 'raw', 'id' => '$data->lb_record_primary_key', 'value' => '$data->lb_pv_date', 'htmlOptions' => array('width' => '120'), 'headerHtmlOptions' => array('class' => 'lb-grid-header')), array('header' => Yii::t('lang', 'Payment Voucher No'), 'type' => 'raw', 'value' => '($data->lb_payment_voucher_no) ? LBApplication::workspaceLink($data->lb_payment_voucher_no, YII::app()->baseUrl."/index.php/lbExpenses/default/CreatePaymentVoucher/id/".$data->lb_record_primary_key ) : LBApplication::workspaceLink("No customer", $data->getViewURL("No customer") )', 'htmlOptions' => array('width' => '180'), 'headerHtmlOptions' => array('class' => 'lb-grid-header')), array('header' => Yii::t('lang', 'Title'), 'type' => 'raw', 'value' => '$data->lb_pv_title', 'htmlOptions' => array('width' => '150'), 'headerHtmlOptions' => array('class' => 'lb-grid-header')), array('header' => Yii::t('lang', 'Description'), 'type' => 'raw', 'value' => '$data->lb_pv_description', 'htmlOptions' => array('width' => '250'), 'headerHtmlOptions' => array('class' => 'lb-grid-header')), array('header' => Yii::t('lang', 'Create By'), 'type' => 'raw', 'value' => 'AccountProfile::model()->getFullName($data->lb_pv_create_by)', 'htmlOptions' => array('style' => 'width: 80px;text-align:left;'), 'headerHtmlOptions' => array('class' => 'lb-grid-header')))));
echo '</div>';
示例#6
0
    
    <?php 
//($model->customerAddress->lb_customer_address_line_1!=NULL) ? $model->customerAddress->lb_customer_address_line_1.'. ' : ''
$this->widget('bootstrap.widgets.TbGridView', array('id' => 'usergrid', 'itemsCssClass' => 'table-bordered items', 'dataProvider' => $list, 'columns' => array(array('class' => 'editable.EditableColumn', 'name' => 'system_list_item_id', 'headerHtmlOptions' => array('style' => 'width: 110px'), 'editable' => array('apply' => '$data->system_list_item_id', 'placement' => 'right')), array('class' => 'editable.EditableColumn', 'name' => 'system_list_item_name', 'headerHtmlOptions' => array('style' => 'width: 110px'), 'editable' => array('apply' => '$data->system_list_item_name', 'url' => Yii::app()->createAbsoluteUrl('configuration/ajaxUpdateItem'), 'placement' => 'right')), array('class' => 'CButtonColumn', 'template' => "{delete}", 'buttons' => array('delete' => array('url' => 'Yii::app()->createUrl("configuration/deleteItem", array("id"=>$data->system_list_item_id,"list"=>$data->system_list_code))'))))));
?>
    
     
<fieldset>
    
    <?php 
//    LBApplicationUI::backButton(Yii::app()->createUrl('configuration/index'), false);
?>
    
        <?php 
echo '<div class="btn-toolbar" id ="new_item">';
LBApplicationUI::newButton('New Item', array());
echo '</div>';
//            LBApplicationUI::newButton('New Item', array());
?>
    
    
    

<div hidden ="true" id="form-new-item" class="accordion-body collapse in">
    <input type="text" value="" id="new"><lable id ="err"></lable>
                    <?php 
//echo '<br>';
?>
                    <?php 
echo '<div id ="newItem">';
echo CHtml::Button('Insert', array('onclick' => 'load_item();return false;', 'class' => 'btn', 'style' => 'margin-top:-3px;'));
<?php

/* @var $expenses_customer array of LbExpensesCustomer models */
$canAddCustomer = BasicPermission::model()->checkModules('lbCustomer', 'add');
$canAddDelete = BasicPermission::model()->checkModules('lbCustomer', 'delete');
if ($canAddCustomer) {
    echo '<div class="btn-toolbar">';
    LBApplicationUI::newButton(Yii::t('lang', 'New Customer'), array('url' => $this->createUrl('addCustomer')));
    echo '</div>';
}
$i = 0;
foreach ($expenses_customer as $customer) {
    $client = LbCustomer::model()->findByPk($customer->lb_customer_id);
    if (count($client) > 0) {
        $i++;
        echo "\n                <div style='overflow:hidden; border-top: 1px solid #EEEEEE;margin-top: 5px;'>\n                    <div style='float:left'>\n                        <h4><span style='padding: 0 8px;background:#EEEEEE;border-radius:50%;'>{$i}</span> {$client->lb_customer_name}</h4>\n                    </div>";
        if ($canAddDelete) {
            echo "<div style='float:right;margin-top:5px;'>\n                            <a href='#' onclick='ajaxDeleteCustomerExpenses(" . $client->lb_record_primary_key . "); return false;'>\n                                <i class='icon-trash'></i>\n                                Delete\n                            </a>\n                        </div>";
        }
        echo "</div>\n                <div id='error_delete_expense_customer_" . $client->lb_record_primary_key . "' class='alert alert-block alert-error' style='display:none;'></div>\n            ";
    }
}
// end for
?>
<script>

    function ajaxDeleteCustomerExpenses(id)
    {
        
        $.ajax({
            type:'POST',
<?php

/* @var $expenses_invoice array of LbExpensesInvoice models */
$canAddInvoice = BasicPermission::model()->checkModules('lbInvoice', 'add');
$canAddDelete = BasicPermission::model()->checkModules('lbCustomer', 'delete');
if ($canAddInvoice) {
    echo '<div class="btn-toolbar">';
    LBApplicationUI::newButton(Yii::t('lang', 'New Invoice'), array('url' => $this->createUrl('addInvoice')));
    echo '</div>';
}
$i = 0;
foreach ($expenses_invoice as $ex_invoice) {
    $invoice = LbInvoice::model()->findByPk($ex_invoice->lb_invoice_id);
    $i++;
    echo "\n                <div style='overflow:hidden; border-top: 1px solid #EEEEEE;margin-top: 5px;'>\n                    <div style='float:left'>\n                        <h4><span style='padding: 0 8px;background:#EEEEEE;border-radius:50%;'>{$i}</span> " . LBApplication::workspaceLink($invoice->lb_invoice_no, $invoice->customer ? $invoice->getViewURL($invoice->customer->lb_customer_name) : $invoice->getViewURL("No customer")) . "</h4>\n                    </div>";
    if ($canAddDelete) {
        echo "<div style='float:right;margin-top:5px;'>\n                            <a href='#' onclick='ajaxDeleteInvoiceExpenses(" . $invoice->lb_record_primary_key . "); return false;'>\n                                <i class='icon-trash'></i>\n                                Delete\n                            </a>\n                        </div>";
    }
    echo "</div>\n                <div id='error_delete_expense_invoice_" . $invoice->lb_record_primary_key . "' class='alert alert-block alert-error' style='display:none;'></div>\n            ";
}
// end for
?>
<script>

    function ajaxDeleteInvoiceExpenses(id)
    {
        
        $.ajax({
            type:'POST',
            url: "<?php 
echo $this->createUrl('deleteInvoiceExpenses');