@if(Session::has('success'))
    <div class="alert alert-success alert-dismissible" role="alert">
        <button type="button" class="close" data-dismiss="alert" aria-hidden="true">×</button>
        {{ Session::get('success') }}
    </div>
@elseif(Session::has('error'))
    <div class="alert alert-danger alert-dismissible">
        <button type="button" class="close" data-dismiss="alert" aria-hidden="true">×</button>
        <h4><i class="icon fa fa-ban"></i> {{__('誤差')}}:</h4>
        {!! Session::get('error') !!}
    </div>
@elseif(isset($errorMsg))
    <div class="alert alert-danger alert-dismissible">
        <button type="button" class="close" data-dismiss="alert" aria-hidden="true">×</button>
        <h4><i class="icon fa fa-ban"></i> {{__('誤差')}}:</h4>
        {!! $errorMsg !!}
    </div>
@endif
<div class="card-header">
    @if($isInfo)
        <a href="{{route('settlement_transaction_add')}}" class="btn btn-lg btn-success">{{__('登録')}}</a>
        <a href="{{route('settlement_transaction_edit',['id'=>$settlement_transaction_id])}}" class="btn btn-lg btn-danger">{{__('編集')}}</a>
    @else
        <button type="submit" class="btn btn-lg btn-danger register" >{{__('保存')}}</button>
    @endIf
</div>
<div class="card-body">
    <div class="row">
    @if($isInfo || $isEdit)
        <!-- 決済トランザクションID -->
        <div class="form-group col-3">
            <label>{{__('validation.attributes.settlement_transaction_id')}}</label>
        </div>
        <div class="form-group col-9">
            <div class="input-group">
                <input type="text" value="{{$settlement_transaction_id}}" placeholder="{{__('validation.attributes.settlement_transaction_id')}}" name="settlement_transaction_id"
                       class="form-control form-control-lg" readonly/>
            </div>
        </div>
        <!-- /.form group - 決済トランザクションID -->
               @endif
        <!-- 定期契約ID -->
        <div class="form-group col-3">
            <label @if(!$isInfo) class="required" @endif>{{__('validation.attributes.contract_id')}}</label>
        </div>
        <div class="form-group col-9">
            <div class="input-group">
                <input type="text" value="{{$contract_id}}" placeholder="{{__('validation.attributes.contract_id')}}" name="contract_id"
                       class="form-control form-control-lg" @if($isInfo) readonly @endif/>
            </div>
        </div>
        <!-- /.form group - 定期契約ID -->
                                    
        <!-- ステータス -->
        <div class="form-group col-3">
            <label>{{__('validation.attributes.status')}}</label>
        </div>
        <div class="form-group col-9">
            <div class="input-group">
                <input type="text" value="{{$status}}" placeholder="{{__('validation.attributes.status')}}" name="status"
                       class="form-control form-control-lg" @if($isInfo) readonly @endif/>
            </div>
        </div>
        <!-- /.form group - ステータス -->
                                    
        <!-- 支払いコード -->
        <div class="form-group col-3">
            <label>{{__('validation.attributes.pay_code')}}</label>
        </div>
        <div class="form-group col-9">
            <div class="input-group">
                <input type="text" value="{{$pay_code}}" placeholder="{{__('validation.attributes.pay_code')}}" name="pay_code"
                       class="form-control form-control-lg" @if($isInfo) readonly @endif/>
            </div>
        </div>
        <!-- /.form group - 支払いコード -->
                                    
        <!-- 受付番号 -->
        <div class="form-group col-3">
            <label>{{__('validation.attributes.contract_payment_number')}}</label>
        </div>
        <div class="form-group col-9">
            <div class="input-group">
                <input type="text" value="{{$contract_payment_number}}" placeholder="{{__('validation.attributes.contract_payment_number')}}" name="contract_payment_number"
                       class="form-control form-control-lg" @if($isInfo) readonly @endif/>
            </div>
        </div>
        <!-- /.form group - 受付番号 -->
                                    
        <!-- 企業コード -->
        <div class="form-group col-3">
            <label>{{__('validation.attributes.corp_code')}}</label>
        </div>
        <div class="form-group col-9">
            <div class="input-group">
                <input type="text" value="{{$corp_code}}" placeholder="{{__('validation.attributes.corp_code')}}" name="corp_code"
                       class="form-control form-control-lg" @if($isInfo) readonly @endif/>
            </div>
        </div>
        <!-- /.form group - 企業コード -->
                                    
        <!-- MMS予約照会日時 -->
        <div class="form-group col-3">
            <label>{{__('validation.attributes.mms_date')}}</label>
        </div>
        <div class="form-group col-9">
            <div class="input-group">
                <input type="text" value="{{$mms_date}}" placeholder="{{__('validation.attributes.mms_date')}}" name="mms_date"
                       class="form-control form-control-lg" @if($isInfo) readonly @endif/>
            </div>
        </div>
        <!-- /.form group - MMS予約照会日時 -->
                                    
        <!-- CVS本部コード -->
        <div class="form-group col-3">
            <label>{{__('validation.attributes.cvs_code')}}</label>
        </div>
        <div class="form-group col-9">
            <div class="input-group">
                <input type="text" value="{{$cvs_code}}" placeholder="{{__('validation.attributes.cvs_code')}}" name="cvs_code"
                       class="form-control form-control-lg" @if($isInfo) readonly @endif/>
            </div>
        </div>
        <!-- /.form group - CVS本部コード -->
                                    
        <!-- 店舗コード -->
        <div class="form-group col-3">
            <label>{{__('validation.attributes.shop_code')}}</label>
        </div>
        <div class="form-group col-9">
            <div class="input-group">
                <input type="text" value="{{$shop_code}}" placeholder="{{__('validation.attributes.shop_code')}}" name="shop_code"
                       class="form-control form-control-lg" @if($isInfo) readonly @endif/>
            </div>
        </div>
        <!-- /.form group - 店舗コード -->
                                    
        <!-- 入金日時 -->
        <div class="form-group col-3">
            <label>{{__('validation.attributes.pay_date')}}</label>
        </div>
        <div class="form-group col-9">
            <div class="input-group">
                <input type="date" value="@if($isInfo || $isEdit){{!empty($pay_date)?date('Y-m-d',strtotime($pay_date)):""}}@endif"  placeholder="{{__('validation.attributes.pay_date')}}" name="pay_date"
                       class="form-control form-control-lg" @if($isInfo) readonly @endif/>
            </div>
        </div>
        <!-- /.form group - 入金日時 -->
                                    
        <!-- 決済金額 -->
        <div class="form-group col-3">
            <label>{{__('validation.attributes.settlement_amount')}}</label>
        </div>
        <div class="form-group col-9">
            <div class="input-group">
                <input type="text" value="{{$settlement_amount}}" placeholder="{{__('validation.attributes.settlement_amount')}}" name="settlement_amount"
                       class="form-control form-control-lg" @if($isInfo) readonly @endif/>
            </div>
        </div>
        <!-- /.form group - 決済金額 -->
                                    
        <!-- 印紙貼付フラグ -->
        <div class="form-group col-3">
            <label>{{__('validation.attributes.stamp_flag')}}</label>
        </div>
        <div class="form-group col-9">
            <div class="input-group">
                <input type="text" value="{{$stamp_flag}}" placeholder="{{__('validation.attributes.stamp_flag')}}" name="stamp_flag"
                       class="form-control form-control-lg" @if($isInfo) readonly @endif/>
            </div>
        </div>
        <!-- /.form group - 印紙貼付フラグ -->
                                    
        <!-- MD5ハッシュ値 -->
        <div class="form-group col-3">
            <label>{{__('validation.attributes.md5_string')}}</label>
        </div>
        <div class="form-group col-9">
            <div class="input-group">
                <input type="text" value="{{$md5_string}}" placeholder="{{__('validation.attributes.md5_string')}}" name="md5_string"
                       class="form-control form-control-lg" @if($isInfo) readonly @endif/>
            </div>
        </div>
        <!-- /.form group - MD5ハッシュ値 -->
    </div>
    @if($isInfo)
        <a href="{{route('settlement_transaction_add')}}" class="btn btn-lg btn-success">{{__('登録')}}</a>
        <a href="{{route('settlement_transaction_edit',['id'=>$settlement_transaction_id])}}" class="btn btn-lg btn-danger">{{__('編集')}}</a>
    @else
        <button type="submit" class="btn btn-lg btn-danger register" >{{__('保存')}}</button>
    @endIf
</div>

