<?php

use yii\helpers\Url;
use home\assets\MainAsset;
use yii\helpers\ArrayHelper;
use home\modules\statement\models\StatementAccount;

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

$assetUrl = $this->getAssetManager()->getBundle(MainAsset::className())->baseUrl;
$this->registerJsFile($assetUrl . '/js/receivable.js', ['depends' => MainAsset::className()]);

$this->title = '添加进账';

//默认值
if (!$model->isNewRecord) {
      $model->payment_time = date('Y-m-d', $model->payment_time);
}
?>

<div class="modal-window">
    <?= \home\widgets\Alert::widget(); ?>
    <?= $this->render(!empty($form_name) ? $form_name : '_form', ['model' => $model, 'action' => $action]); ?>
</div>
<script>
    var getAccount = "<?= Url::to(['/receivable/receivable/get-account']) ?>";
</script>