コード例 #1
0
ファイル: view_sp.php プロジェクト: kaihatsusha/kpimon
</th>
                <th style="text-align: center"><?php 
    echo Yii::t('fin.grid', 'Unit');
    ?>
</th>
                <th style="text-align: center"><?php 
    echo Yii::t('fin.grid', 'Shared');
    ?>
</th>
            </tr></thead>
            <tbody>
                <?php 
    foreach ($arrShareDetail as $item) {
        ?>
                    <?php 
        $class = MasterValueUtils::getColorRow($rowindex);
        $sumUnit += $item->share_unit;
        $sumShared += $item->share_value;
        $rowindex++;
        ?>
                    <tr class="<?php 
        echo $class;
        ?>
">
                        <td style="vertical-align: middle; text-align: center"><?php 
        echo $rowindex;
        ?>
</td>
                        <td style="vertical-align: middle; text-align: left"><?php 
        echo $item->account_name;
        ?>
コード例 #2
0
ファイル: index.php プロジェクト: kaihatsusha/kpimon
?>
</th>
            <th style="text-align: center"><?php 
echo Yii::t('fin.grid', 'Interest');
?>
</th>
            <th style="text-align: center"><?php 
echo Yii::t('fin.grid', 'Description');
?>
</th>
        </tr>
        <?php 
foreach ($arrAccount as $account) {
    ?>
            <?php 
    $rowClass = $account->status == MasterValueUtils::MV_JAR_ACCOUNT_STATUS_ON ? MasterValueUtils::getColorRow($rowindex) : 'danger';
    $rowindex++;
    ?>
            <tr class="<?php 
    echo $rowClass;
    ?>
">
                <td style="text-align: center"><?php 
    echo $rowindex;
    ?>
</td>
                <td style="text-align: left"><?php 
    echo $account->account_name;
    ?>
</td>
                <td style="text-align: right"><?php 
コード例 #3
0
ファイル: index.php プロジェクト: kaihatsusha/kpimon
}, 'value' => function ($model) use($arrFinAccount) {
    return isset($arrFinAccount[$model->account_target]) ? $arrFinAccount[$model->account_target] : '';
}, 'footer' => $htmlFooterCredit], ['class' => DataColumn::className(), 'label' => Yii::t('fin.grid', 'Credit Amount'), 'headerOptions' => ['style' => 'text-align: center'], 'footerOptions' => ['colspan' => 0], 'contentOptions' => function ($model, $key, $index) {
    return ['style' => 'vertical-align: middle; text-align: right', 'class' => MasterValueUtils::getColorRow($index)];
}, 'value' => function ($model) {
    $amount = $model->account_target == 0 ? '' : NumberUtils::format($model->entry_value);
    return $amount;
}], ['attribute' => 'description', 'label' => Yii::t('fin.grid', 'Description'), 'headerOptions' => ['style' => 'text-align: center'], 'footerOptions' => ['style' => 'text-align: right'], 'contentOptions' => function ($model, $key, $index) {
    return ['style' => 'vertical-align: middle; text-align: left', 'class' => MasterValueUtils::getColorRow($index)];
}, 'enableSorting' => false, 'value' => function ($model) use($arrEntryLog) {
    $arrEntryLogVal = StringUtils::unserializeArr($model->description);
    return StringUtils::showArrValueAsString($arrEntryLogVal, $arrEntryLog);
}], ['label' => Yii::t('fin.grid', 'Action'), 'headerOptions' => ['style' => 'text-align: center; width: 100px;'], 'contentOptions' => function ($model, $key, $index) {
    return ['style' => 'vertical-align: middle; text-align: center', 'class' => MasterValueUtils::getColorRow($index)];
}, 'format' => 'raw', 'value' => function ($model, $key, $index) {
    $btnClass = MasterValueUtils::getColorRow($index);
    $lblView = Yii::t('button', 'View');
    $lblEdit = Yii::t('button', 'Edit');
    $lblCopy = Yii::t('button', 'Copy');
    $urlEdit = false;
    $arrBtns = [];
    $entryId = $model->entry_id;
    $timeDepositTranId = $model->time_deposit_tran_id;
    switch ($model->entry_status) {
        case MasterValueUtils::MV_FIN_ENTRY_TYPE_SIMPLE:
            $urlEdit = BaseUrl::toRoute(['payment/update', 'id' => $entryId]);
            $arrBtns[] = StringUtils::format('<li><a href="{0}">{1}</a></li>', [$urlEdit, $lblEdit]);
            $urlView = BaseUrl::toRoute(['payment/view', 'id' => $entryId]);
            $arrBtns[] = StringUtils::format('<li><a href="{0}">{1}</a></li>', [$urlView, $lblView]);
            $urlCopy = BaseUrl::toRoute(['payment/copy', 'id' => $entryId]);
            $arrBtns[] = StringUtils::format('<li><a href="{0}">{1}</a></li>', [$urlCopy, $lblCopy]);
コード例 #4
0
ファイル: view_sp.php プロジェクト: kaihatsusha/kpimon
    <div class="widget-detail-header bg-maroon"><h3 class="widget-detail-title"><?php 
    echo Yii::t('fin.form', 'Payment History');
    ?>
</h3></div>
    <div class="box-footer"><div class="row"><?php 
    Pjax::begin();
    echo GridView::widget(['layout' => '{summary}<div class="table-responsive">{items}</div>{pager}', 'options' => ['class' => 'grid-view col-xs-12'], 'tableOptions' => ['class' => 'table table-bordered'], 'showFooter' => true, 'headerRowOptions' => ['class' => 'warning'], 'footerRowOptions' => ['class' => 'warning', 'style' => 'font-weight:bold'], 'pager' => ['options' => ['class' => 'pagination pagination-bottom'], 'maxButtonCount' => 6], 'dataProvider' => new ActiveDataProvider(['query' => $dataPaymentQuery, 'pagination' => ['pagesize' => 20]]), 'columns' => [['label' => Yii::t('fin.grid', 'Date'), 'headerOptions' => ['style' => 'text-align: center'], 'footerOptions' => ['style' => 'text-align: right'], 'contentOptions' => function ($model, $key, $index) {
        return ['style' => 'vertical-align: middle; text-align: center', 'class' => MasterValueUtils::getColorRow($index)];
    }, 'format' => 'raw', 'value' => function ($model) {
        return DateTimeUtils::htmlDateFormatFromDB($model->entry_date, DateTimeUtils::FM_VIEW_DATE, true);
    }, 'footer' => $htmlFooterBalance], ['label' => Yii::t('fin.grid', 'Credit'), 'headerOptions' => ['style' => 'text-align: center'], 'footerOptions' => ['style' => 'text-align: right'], 'contentOptions' => function ($model, $key, $index) {
        return ['style' => 'vertical-align: middle; text-align: right', 'class' => MasterValueUtils::getColorRow($index)];
    }, 'value' => function ($model) {
        return $model->credit > 0 ? NumberUtils::format($model->credit) : '';
    }, 'footer' => $htmlFooterCredit], ['label' => Yii::t('fin.grid', 'Debit'), 'headerOptions' => ['style' => 'text-align: center'], 'footerOptions' => ['style' => 'text-align: right'], 'contentOptions' => function ($model, $key, $index) {
        return ['style' => 'vertical-align: middle; text-align: right', 'class' => MasterValueUtils::getColorRow($index)];
    }, 'value' => function ($model) {
        return $model->debit > 0 ? NumberUtils::format($model->debit) : '';
    }, 'footer' => $htmlFooterDebit], ['label' => Yii::t('fin.grid', 'Bill Date'), 'headerOptions' => ['style' => 'text-align: center'], 'contentOptions' => function ($model, $key, $index) {
        return ['style' => 'vertical-align: middle; text-align: center', 'class' => MasterValueUtils::getColorRow($index)];
    }, 'format' => 'raw', 'value' => function ($model) {
        if ($model->order_id > 0 && !is_null($model->bill_date)) {
            return DateTimeUtils::htmlDateFormatFromDB($model->bill_date, DateTimeUtils::FM_VIEW_DATE, true);
        }
        return '';
    }]]]);
    Pjax::end();
    ?>
</div></div>
</div></div></div><?php 
}