<?php

use home\assets\MainAsset;
use yii\widgets\ActiveForm;
use yii\helpers\Html;
use yii\helpers\Url;
use home\modules\statement\models\StatementLinkContract;
use home\modules\receivable\models\Account;
use home\modules\receivable\models\Bank;
use home\models\PaymentMethod;
use common\widgets\DatePicker;

/* @var $this \yii\web\View */
/* @var $form yii\bootstrap\ActiveForm */
/* @var $model \home\modules\reimbursement\models\Application */

$attrLabels = $model->attributeLabels();

$form = ActiveForm::begin([
            'id' => 'main-form',
            'options' => ['class' => 'informationform f14'],
            'action' => $action,
            'fieldConfig' => [
                'options' => ['tag' => 'td'],
                'template' => "{input}{hint}{error}",
                'errorOptions' => ["class" => "error"]
            ]
        ]);
?>

<table cellpadding="0" cellspacing="10" width="100%">
    <tbody>
        <tr>
            <td align="right"><?= $model->getAttributeLabel('money') ?>：</td>
            <?= $form->field($model, 'money')->textInput(['class' => 'form-control']) ?>
            <td><span class="redstar"></span>*</td>
        </tr>
        <tr>
            <td align="right">未关联金额(元)：</td>
            <td><?=  StatementLinkContract::getSurplusAmount($model->statement_id);?></td>
            <td><span class="redstar"></span></td>
        </tr>
    </tbody>
</table>
<?= ($model->isNewRecord) ? '' : Html::hiddenInput('id', $model->link_contract_id); ?>
<?php ActiveForm::end(); ?>
