@if(($useChequeRegister ?? false) && in_array($voucherType, ['bank_payment', 'contra']))
<script>
window.axisVoucherChequeRegister = {
    voucherType: @json($voucherType),
    voucherId: @json(isset($voucher) ? $voucher->id : null),
    bankAccountIds: @json($bankAccountIds ?? []),
    chequeBookId: @json(old('cheque_book_id', isset($voucher) ? ($voucher->extra_data['cheque_book_id'] ?? null) : null)),
    chequeNo: @json(old('cheque_no', isset($voucher) ? ($voucher->extra_data['cheque_no'] ?? '') : '')),
    booksUrlTemplate: @json(route('vouchers.cheque-books.for-account', ['account' => '__ACCOUNT__'])),
    leavesUrlTemplate: @json(route('vouchers.cheque-books.leaves', ['chequeBook' => '__BOOK__'])),
};
</script>
<script src="{{ asset('js/voucher-cheque-register.js') }}?v={{ filemtime(public_path('js/voucher-cheque-register.js')) }}"></script>
@endif
