コード例 #1
0
 public function loadModel($id)
 {
     $model = FcrnCurrency::model()->findByPk($id);
     if ($model === null) {
         throw new CHttpException(404, Yii::t('FcrnModule.crud_static', 'The requested page does not exist.'));
     }
     return $model;
 }
コード例 #2
0
ファイル: admin.php プロジェクト: dbrisinajumi/d2fixr
?>

<?php 
//$this->widget("TbBreadcrumbs", array("links" => $this->breadcrumbs))
?>
<div class="clearfix">
    <div class="btn-toolbar pull-left">
        <div class="btn-group">
        <?php 
$this->widget('bootstrap.widgets.TbButton', array('label' => Yii::t('D2fixrModule.crud', 'Create'), 'icon' => 'icon-plus', 'size' => 'large', 'type' => 'success', 'url' => array('create'), 'visible' => Yii::app()->user->checkAccess('D2finv.FixrFiitXRef.*') || Yii::app()->user->checkAccess('D2finv.FixrFiitXRef.Create')));
?>
</div>
        <div class="btn-group">
            <h1>
                <i class=""></i>
                <?php 
echo Yii::t('D2fixrModule.model', 'Fixr Fiit Xrefs');
?>
            </h1>
        </div>
    </div>
</div>

<?php 
Yii::beginProfile('FixrFiitXRef.view.grid');
?>


<?php 
$this->widget('TbGridView', array('id' => 'fixr-fiit-xref-grid', 'dataProvider' => $model->search(), 'filter' => $model, 'template' => '{summary}{pager}{items}{pager}', 'pager' => array('class' => 'TbPager', 'displayFirstAndLast' => true), 'columns' => array(array('class' => 'CLinkColumn', 'header' => '', 'labelExpression' => '$data->itemLabel', 'urlExpression' => 'Yii::app()->controller->createUrl("view", array("fixr_id" => $data["fixr_id"]))'), array('class' => 'editable.EditableColumn', 'name' => 'fixr_id', 'editable' => array('url' => $this->createUrl('/d2fixr/fixrFiitXRef/editableSaver'))), array('class' => 'editable.EditableColumn', 'name' => 'fixr_fiit_id', 'editable' => array('type' => 'select', 'url' => $this->createUrl('/d2fixr/fixrFiitXRef/editableSaver'), 'source' => CHtml::listData(FiitInvoiceItem::model()->findAll(array('limit' => 1000)), 'fiit_id', 'itemLabel'))), array('class' => 'editable.EditableColumn', 'name' => 'fixr_position_fret_id', 'editable' => array('type' => 'select', 'url' => $this->createUrl('/d2fixr/fixrFiitXRef/editableSaver'), 'source' => CHtml::listData(FretRefType::model()->findAll(array('limit' => 1000)), 'fret_id', 'itemLabel'))), array('class' => 'editable.EditableColumn', 'name' => 'fixr_period_fret_id', 'editable' => array('type' => 'select', 'url' => $this->createUrl('/d2fixr/fixrFiitXRef/editableSaver'), 'source' => CHtml::listData(FrepRefPeriod::model()->findAll(array('limit' => 1000)), 'frep_id', 'itemLabel'))), array('class' => 'editable.EditableColumn', 'name' => 'fixr_fcrn_date', 'editable' => array('type' => 'date', 'url' => $this->createUrl('/d2fixr/fixrFiitXRef/editableSaver'))), array('class' => 'editable.EditableColumn', 'name' => 'fixr_fcrn_id', 'editable' => array('type' => 'select', 'url' => $this->createUrl('/d2fixr/fixrFiitXRef/editableSaver'), 'source' => CHtml::listData(FcrnCurrency::model()->findAll(array('limit' => 1000)), 'fcrn_id', 'itemLabel'))), array('class' => 'editable.EditableColumn', 'name' => 'fixr_amt', 'editable' => array('url' => $this->createUrl('/d2fixr/fixrFiitXRef/editableSaver'))), array('class' => 'editable.EditableColumn', 'name' => 'fixr_base_fcrn_id', 'editable' => array('type' => 'select', 'url' => $this->createUrl('/d2fixr/fixrFiitXRef/editableSaver'), 'source' => CHtml::listData(FcrnCurrency::model()->findAll(array('limit' => 1000)), 'fcrn_id', 'itemLabel'))), array('class' => 'TbButtonColumn', 'buttons' => array('view' => array('visible' => 'Yii::app()->user->checkAccess("D2finv.FixrFiitXRef.View")'), 'update' => array('visible' => 'FALSE'), 'delete' => array('visible' => 'Yii::app()->user->checkAccess("D2finv.FixrFiitXRef.Delete")')), 'viewButtonUrl' => 'Yii::app()->controller->createUrl("view", array("fixr_id" => $data->fixr_id))', 'deleteButtonUrl' => 'Yii::app()->controller->createUrl("delete", array("fixr_id" => $data->fixr_id))', 'viewButtonOptions' => array('data-toggle' => 'tooltip'), 'deleteButtonOptions' => array('data-toggle' => 'tooltip')))));
Yii::endProfile('FixrFiitXRef.view.grid');
コード例 #3
0
ファイル: admin.php プロジェクト: dbrisinajumi/fcrn
        <?php 
$this->widget('bootstrap.widgets.TbButton', array('label' => Yii::t("FcrnModule.crud_static", "Load"), 'icon' => 'icon-plus', 'size' => 'large', 'type' => 'success', 'url' => array('create')));
?>
        </div>
        <div class="btn-group">
            <h1>
                <i class="icon-dollar"></i>
                <i class="icon-eur"></i>
                <?php 
echo Yii::t('FcrnModule.crud', 'Fcrt Currency Rates');
?>
           
            </h1>
        </div>
        <div class="btn-group">
        <?php 
//        $this->widget("bootstrap.widgets.TbButton", array(
//            "label" => Yii::t("D2companyModule.crud_static", "Export"),
//            "url" => array("admin","export" => " xls"),
//            'size'=>'large',
//            'type'=>'success',
//            "visible" => Yii::app()->user->checkAccess("Company.*"),
//            //"htmlOptions"=>array("class"=>"export-button")
//         ));
?>
        </div>        
    </div>
</div>
<?php 
$this->widget('TbGridView', array('id' => 'fcrt-currency-rate-grid', 'dataProvider' => $model->search(), 'template' => '{items}{pager}{summary}', 'filter' => $model, 'pager' => array('class' => 'TbPager', 'displayFirstAndLast' => true), 'columns' => array(array('name' => 'fcrt_fcsr_id', 'value' => 'CHtml::value($data,\'fcrtFcsr.fcsr_name\')', 'filter' => CHtml::listData(FcsrCourrencySource::model()->findAll(), 'fcsr_id', 'fcsr_name')), array('name' => 'fcrt_base_fcrn_id', 'value' => 'CHtml::value($data,\'fcrtBaseFcrn.fcrn_code\')', 'filter' => CHtml::listData(FcrnCurrency::model()->findAll(), 'fcrn_id', 'fcrn_code')), array('name' => 'fcrt_fcrn_id', 'value' => 'CHtml::value($data,\'fcrtFcrn.fcrn_code\')', 'filter' => CHtml::listData(FcrnCurrency::model()->findAll(), 'fcrn_id', 'fcrn_code')), 'fcrt_date', 'fcrt_rate')));
コード例 #4
0
ファイル: admin.php プロジェクト: uldisn/fcrn
<?php

$this->setPageTitle(Yii::t('FcrnModule.crud', 'Fcsr Courrency Sources') . ' - ' . Yii::t('FcrnModule.crud_static', 'Manage'));
Yii::app()->clientScript->registerScript('search', "\n    \$('.search-button').click(function(){\n        \$('.search-form').toggle();\n        return false;\n    });\n    \$('.search-form form').submit(function(){\n        \$.fn.yiiGridView.update(\n            'fcsr-courrency-source-grid',\n            {data: \$(this).serialize()}\n        );\n        return false;\n    });\n    ");
?>
    <h1>

        <?php 
echo Yii::t('FcrnModule.crud', 'Fcsr Courrency Sources');
?>
        <small><?php 
echo Yii::t('FcrnModule.crud_static', 'Manage');
?>
</small>

    </h1>

<?php 
$this->renderPartial("_toolbar", array("model" => $model));
?>



<?php 
$this->widget('TbGridView', array('id' => 'fcsr-courrency-source-grid', 'dataProvider' => $model->search(), 'template' => '{pager}{summary}{items}{pager}', 'pager' => array('class' => 'TbPager', 'displayFirstAndLast' => true), 'columns' => array(array('class' => 'editable.EditableColumn', 'name' => 'fcsr_name', 'editable' => array('url' => $this->createUrl('/fcrn/fcsrCourrencySource/editableSaver'))), array('name' => 'fcsr_base_fcrn_id', 'value' => 'CHtml::value($data, \'fcsrBaseFcrn.itemLabel\')', 'filter' => CHtml::listData(FcrnCurrency::model()->findAll(array('limit' => 1000)), 'fcrn_id', 'itemLabel')), array('class' => 'TbButtonColumn', 'buttons' => array('view' => array('visible' => 'FALSE'), 'update' => array('visible' => 'Yii::app()->user->checkAccess("admin")'), 'delete' => array('visible' => 'FALSE')), 'viewButtonUrl' => 'Yii::app()->controller->createUrl("view", array("fcsr_id" => $data->fcsr_id))', 'updateButtonUrl' => 'Yii::app()->controller->createUrl("update", array("fcsr_id" => $data->fcsr_id))', 'deleteButtonUrl' => 'Yii::app()->controller->createUrl("delete", array("fcsr_id" => $data->fcsr_id))'))));
コード例 #5
0
            ');
}
if (!$ajax || $ajax == 'fixr-fiit-xref-grid') {
    Yii::beginProfile('fixr_fret_id.view.grid');
    ?>

<h3 class="rel_grid">    
    <?php 
    echo Yii::t('D2finvModule.model', 'Fixr Fiit Xref');
    ?>
    <?php 
    $this->widget('bootstrap.widgets.TbButton', array('buttonType' => 'ajaxButton', 'type' => 'primary', 'size' => 'mini', 'icon' => 'icon-plus', 'url' => array('//d2finv/fixrFiitXRef/ajaxCreate', 'field' => 'fixr_fret_id', 'value' => $modelMain->primaryKey, 'ajax' => 'fixr-fiit-xref-grid'), 'ajaxOptions' => array('success' => 'function(html) {$.fn.yiiGridView.update(\'fixr-fiit-xref-grid\');}'), 'htmlOptions' => array('title' => Yii::t('D2finvModule.crud', 'Add new record'), 'data-toggle' => 'tooltip')));
    ?>
</h3> 
 
<?php 
    if (empty($modelMain->fixrFiitXRefs)) {
        $model = new FixrFiitXRef();
        $model->fixr_fret_id = $modelMain->primaryKey;
        $model->save();
        unset($model);
    }
    $model = new FixrFiitXRef();
    $model->fixr_fret_id = $modelMain->primaryKey;
    // render grid view
    $this->widget('TbGridView', array('id' => 'fixr-fiit-xref-grid', 'dataProvider' => $model->search(), 'template' => '{summary}{items}', 'summaryText' => '&nbsp;', 'htmlOptions' => array('class' => 'rel-grid-view'), 'columns' => array(array('class' => 'editable.EditableColumn', 'name' => 'fixr_fiit_id', 'editable' => array('type' => 'select', 'url' => $this->createUrl('//d2finv/fixrFiitXRef/editableSaver'), 'source' => CHtml::listData(FiitInvoiceItem::model()->findAll(array('limit' => 1000)), 'fiit_id', 'itemLabel'))), array('class' => 'editable.EditableColumn', 'name' => 'fixr_ref_id', 'editable' => array('url' => $this->createUrl('//d2finv/fixrFiitXRef/editableSaver'))), array('class' => 'editable.EditableColumn', 'name' => 'fuxr_fcrn_date', 'editable' => array('type' => 'date', 'url' => $this->createUrl('//d2finv/fixrFiitXRef/editableSaver'))), array('class' => 'editable.EditableColumn', 'name' => 'fuxr_fcrn_id', 'editable' => array('type' => 'select', 'url' => $this->createUrl('//d2finv/fixrFiitXRef/editableSaver'), 'source' => CHtml::listData(FcrnCurrency::model()->findAll(array('limit' => 1000)), 'fcrn_id', 'itemLabel'))), array('class' => 'editable.EditableColumn', 'name' => 'fuxr_amt', 'editable' => array('url' => $this->createUrl('//d2finv/fixrFiitXRef/editableSaver'))), array('class' => 'editable.EditableColumn', 'name' => 'fuxr_base_fcrn_id', 'editable' => array('type' => 'select', 'url' => $this->createUrl('//d2finv/fixrFiitXRef/editableSaver'), 'source' => CHtml::listData(FcrnCurrency::model()->findAll(array('limit' => 1000)), 'fcrn_id', 'itemLabel'))), array('class' => 'editable.EditableColumn', 'name' => 'fixr_base_amt', 'editable' => array('url' => $this->createUrl('//d2finv/fixrFiitXRef/editableSaver'))), array('class' => 'editable.EditableColumn', 'name' => 'fixr_start_date', 'editable' => array('type' => 'date', 'url' => $this->createUrl('//d2finv/fixrFiitXRef/editableSaver'))), array('class' => 'TbButtonColumn', 'buttons' => array('view' => array('visible' => 'FALSE'), 'update' => array('visible' => 'FALSE'), 'delete' => array('visible' => 'Yii::app()->user->checkAccess("D2finv.FretRefType.DeletefixrFiitXRefs")')), 'deleteButtonUrl' => 'Yii::app()->controller->createUrl("/d2finv/fixrFiitXRef/delete", array("fixr_id" => $data->fixr_id))', 'deleteButtonOptions' => array('data-toggle' => 'tooltip')))));
    ?>

<?php 
    Yii::endProfile('FixrFiitXRef.view.grid');
}
コード例 #6
0
ファイル: _search.php プロジェクト: dbrisinajumi/fcrn
                    <div class="row">
            <?php 
echo $form->label($model, 'fcrt_id');
?>
                            <?php 
echo $form->textField($model, 'fcrt_id', array('size' => 10, 'maxlength' => 10));
?>
                    </div>

                    <div class="row">
            <?php 
echo $form->label($model, 'fcrt_base_fcrn_id');
?>
                            <?php 
echo $form->dropDownList($model, 'fcrt_base_fcrn_id', CHtml::listData(FcrnCurrency::model()->findAll(), 'fcrn_id', 'fcrn_code'), array('prompt' => 'all'));
?>
                    </div>

                    <div class="row">
            <?php 
echo $form->label($model, 'fcrt_date');
?>
                            <?php 
$this->widget('zii.widgets.jui.CJuiDatePicker', array('model' => $model, 'attribute' => 'fcrt_date', 'language' => strstr(Yii::app()->language . '_', '_', true), 'htmlOptions' => array('size' => 10), 'options' => array('showButtonPanel' => true, 'changeYear' => true, 'changeYear' => true, 'dateFormat' => 'yy-mm-dd')));
?>
                    </div>

                    <div class="row">
            <?php 
echo $form->label($model, 'fcrt_rate');
コード例 #7
0
ファイル: adminFinv.php プロジェクト: dbrisinajumi/d2fixr
<?php

Yii::app()->clientScript->registerScript('re-install-date-picker', "\nfunction reinstallDatePicker(id, data) {\n    filter_FinvInvoice_finv_date_range_init();\n   }\n");
$fcrn_model = FcrnCurrency::model()->findByPk(Yii::app()->sysCompany->getAttribute('base_fcrn_id'));
$title = Yii::t('D2fixrModule.model', 'Invoices expense postions') . ' - ' . $fcrn_model->fcrn_code;
$this->setPageTitle($title);
?>

<div class="clearfix">
    <div class="btn-toolbar pull-left">
        <div class="btn-group">
            <h1>
                <i class=""></i>
                <?php 
echo $title;
?>
            </h1>
        </div>
    </div>
</div>

<?php 
Yii::beginProfile('FinvInvoice.view.grid');
$this->widget('TbGridView', array('id' => 'finv-invoice-grid', 'dataProvider' => $model->search(), 'rowCssClassExpression' => '($data->finv_basic_amt != FixrFiitXRef::totalByFinvId($data->finv_id)) ? "alert alert-danger" : ""', 'filter' => $model, 'template' => '{summary}{pager}{items}{pager}', 'pager' => array('class' => 'TbPager', 'displayFirstAndLast' => true), 'afterAjaxUpdate' => 'reinstallDatePicker', 'columns' => array(array('name' => 'finv_number'), array('name' => 'finv_ccmp_id', 'value' => 'CHtml::value($data, \'finvCcmp.itemLabel\')', 'filter' => CHtml::listData(CcmpCompany::model()->findAll(array('limit' => 1000, 'order' => 'ccmp_name')), 'ccmp_id', 'itemLabel')), array('name' => 'finv_date', 'filter' => $this->widget('vendor.dbrisinajumi.DbrLib.widgets.TbFilterDateRangePicker', array('model' => $model, 'attribute' => 'finv_date_range', 'options' => array('ranges' => array('today', 'yesterday', 'this_week', 'last_week', 'this_month', 'last_month', 'this_year'))), TRUE)), array('name' => 'finv_stst_id', 'value' => 'CHtml::value($data, \'finvStst.itemLabel\')', 'filter' => CHtml::listData(StstState::model()->findAll(array('limit' => 1000)), 'stst_id', 'itemLabel')), array('htmlOptions' => array('class' => 'numeric-column'), 'name' => 'finv_basic_amt', 'footer' => $model->getTotals('finv_amt'), 'footerHtmlOptions' => array('class' => 'total-row numeric-column')), array('header' => Yii::t('D2fixrModule.model', 'Expenses Amount'), 'htmlOptions' => array('class' => 'numeric-column'), 'value' => 'FixrFiitXRef::totalBaseAmtByFinvId($data->finv_id)'), array('class' => 'TbButtonColumn', 'buttons' => array('view' => array('visible' => 'TRUE'), 'update' => array('visible' => 'FALSE'), 'delete' => array('visible' => 'FALSE')), 'viewButtonUrl' => 'Yii::app()->controller->createUrl("FixrFiitXRef/viewFinv", array("finv_id" => $data->finv_id))', 'viewButtonOptions' => array('data-toggle' => 'tooltip')))));
Yii::endProfile('FinvInvoice.view.grid');
コード例 #8
0
 public function loadModel($id)
 {
     $m = FcrnCurrency::model();
     // apply scope, if available
     $scopes = $m->scopes();
     if (isset($scopes[$this->scope])) {
         $m->{$this->scope}();
     }
     $model = $m->findByPk($id);
     if ($model === null) {
         throw new CHttpException(404, Yii::t('FcrnModule.crud_static', 'The requested page does not exist.'));
     }
     return $model;
 }
コード例 #9
0
ファイル: view.php プロジェクト: dbrisinajumi/d2finv
<div class="row">
    <div class="span4">
        <!--<h2>
            <?php 
//echo Yii::t('D2finvModule.crud_static','Data')
?>
            <small>
                #<?php 
//echo $model->finv_id
?>
            </small>
        </h2>-->

        <?php 
$this->widget('TbAceDetailView', array('data' => $model, 'attributes' => array(array('name' => 'finv_number', 'type' => 'raw', 'value' => $this->widget('EditableField', array('model' => $model, 'attribute' => 'finv_number', 'url' => $this->createUrl('/d2finv/finvInvoice/editableSaver')), true)), array('name' => 'finv_type', 'type' => 'raw', 'value' => $this->widget('EditableField', array('model' => $model, 'type' => 'select', 'url' => $this->createUrl('/d2finv/finvInvoice/editableSaver'), 'source' => $model->getEnumFieldLabels('finv_type'), 'attribute' => 'finv_type'), true)), array('name' => 'finv_ccmp_id', 'type' => 'raw', 'value' => $this->widget('EditableField', array('model' => $model, 'type' => 'select', 'url' => $this->createUrl('/d2finv/finvInvoice/editableSaver'), 'source' => CHtml::listData(CcmpCompany::model()->findAll(array('limit' => 1000)), 'ccmp_id', 'itemLabel'), 'attribute' => 'finv_ccmp_id'), true), 'value_id' => $model->finv_ccmp_id, 'external_link' => array('/d2company/ccmpCompany/view', 'ccmp_id' => $model->finv_ccmp_id), 'external_title' => Yii::t("D2finvModule.model", 'Show company data')), array('name' => 'finv_date', 'type' => 'raw', 'value' => $this->widget('EditableField', array('model' => $model, 'type' => 'date', 'url' => $this->createUrl('/d2finv/finvInvoice/editableSaver'), 'attribute' => 'finv_date'), true)), array('name' => 'finv_budget_date', 'type' => 'raw', 'value' => $this->widget('EditableField', array('model' => $model, 'type' => 'date', 'url' => $this->createUrl('/d2finv/finvInvoice/editableSaver'), 'attribute' => 'finv_budget_date'), true)), array('name' => 'finv_due_date', 'type' => 'raw', 'value' => $this->widget('EditableField', array('model' => $model, 'type' => 'date', 'url' => $this->createUrl('/d2finv/finvInvoice/editableSaver'), 'attribute' => 'finv_due_date'), true)), array('name' => 'finv_notes', 'type' => 'raw', 'value' => $this->widget('EditableField', array('model' => $model, 'attribute' => 'finv_notes', 'url' => $this->createUrl('/d2finv/finvInvoice/editableSaver')), true)), array('name' => 'finv_fcrn_id', 'type' => 'raw', 'value' => $this->widget('EditableField', array('model' => $model, 'type' => 'select', 'url' => $this->createUrl('/d2finv/finvInvoice/editableSaver'), 'source' => CHtml::listData(FcrnCurrency::model()->findAll(array('limit' => 1000)), 'fcrn_id', 'itemLabel'), 'attribute' => 'finv_fcrn_id'), true)), array('name' => 'finv_stst_id', 'type' => 'raw', 'value' => $this->widget('EditableField', array('model' => $model, 'type' => 'select', 'url' => $this->createUrl('/d2finv/finvInvoice/editableSaver'), 'source' => CHtml::listData(StstState::model()->findAll(array('limit' => 1000)), 'stst_id', 'itemLabel'), 'attribute' => 'finv_stst_id'), true)), array('name' => 'finv_paid', 'type' => 'raw', 'value' => $this->widget('EditableField', array('model' => $model, 'type' => 'select', 'url' => $this->createUrl('/d2finv/finvInvoice/editableSaver'), 'source' => $model->getEnumFieldLabels('finv_paid'), 'attribute' => 'finv_paid'), true)))));
?>
    </div>


    <div class="span8">
        <?php 
$this->renderPartial('_view-relations_grids', array('modelMain' => $model, 'ajax' => false));
?>
    </div>
    <div class="span8">
        <?php 
$this->widget('d2FilesWidget', array('module' => $this->module->id, 'model' => $model));
?>
    </div>
</div>