<div class="modal-header">
    <button type="button" class="close" data-dismiss="modal">&times;</button>
    <h4 class="modal-title">Voucher No <strong>(<?php echo $voucher_no; ?>)</strong></h4>
</div>

<?php
$form = $this->form;
$form->prepare();
$form->setAttribute('action', $this->url('billingmanagement', ['action' => 'create-voucher']));
echo $this->form()->openTag($form);
?>
<div class="modal-body pull-left">

    <div class="col-sm-12 fa-border no-padding">
        <div class="invoice-model-bg">
            
             <div class="col-sm-4 no-padding">
                <div class="col-sm-12 padding-top10px form-group">
                    <?php echo $this->FormElement($form->get('user_name')); ?>
                </div>
            </div>            
            
            <div class="col-sm-4 no-padding">
                <div class="col-sm-12 padding-top10px form-group">
                    <?php echo $this->FormElement($form->get('voucher_type')); ?>
                </div>
            </div>

            <div class="col-sm-4 no-padding">
                <div class="col-sm-12 padding-top10px form-group">
                    <?php echo $this->FormElement($form->get('voucher_no')); ?>
                </div>
            </div>


            <div class="col-sm-4 no-padding">
                <div class="col-sm-12 padding-top10px form-group">
                    <?php echo $this->FormElement($form->get('voucher_date')); ?>
                </div>
            </div>
            
            

            <div class="col-sm-12 padding-left0 padding-r0 padding10px bg-aqua-active margin-top15px">

                <div class="col-sm-3">Party Name</div>
                <div class="col-sm-2">Bill No.</div>
                <div class="col-sm-2">Balance</div>
                <div class="col-sm-3">D/C</div>
                <div class="col-sm-2">Amount</div>

            </div>



            <?php
            //echo '<pre>';print_r($billListing);die();
            if ($billListing > 0) {
                $i = 1;
                foreach ($billListing as $listing) {
                    ?>
            <div class="col-sm-3 no-padding">
                <div class="col-sm-12 padding-top10px">
                    <?php echo $listing['username']; ?>
                    <?php echo $this->FormElement($form->get('booking_id[]')->setValue($listing['id'])); ?>
                    <?php echo $this->FormElement($form->get('booking_invoice_id')->setValue($listing['booking_invoice_id'])); ?>
                </div>
            </div>

            <div class="col-sm-2 no-padding">
                <div class="col-sm-12 padding-top10px">
                    <?php echo $listing['reference_number']; ?>
                </div>
            </div>

            <div class="col-sm-2 no-padding">
                <div class="col-sm-12 padding-top10px">
                    <i class="fa fa-inr"></i><?php echo $listing['booking_amt_balance']; ?>
                </div>
            </div>

            <div class="col-sm-3 no-padding">
                <div class="col-sm-12 padding-top10px form-group">
                    <?php echo $this->FormElement($form->get('payment_type[]')); ?>
                </div>
            </div>


            <div class="col-sm-2 no-padding">
                <div class="col-sm-12 padding-top10px form-group">
            <?php echo $this->FormElement($form->get('amount[]')); ?>
                </div>
            </div>
            <hr/>
                    <?php
                    $i++;
                }
            } ?>


        </div>

        <br/>


    </div>
</div>




<div class="modal-footer">

    <div class="col-sm-12 no-padding">

        <!--<a class="btn btn-unapublish pull-right margin-L-1" href="<?php echo $this->url('billingmanagement', ['action' => 'voucher-view']); ?>" id="invoice-ok" data-toggle="modal" data-target="#Voucher-view">
            <i class="fa fa-check"></i>Save</a>-->

        <?php echo $this->FormElement($form->get('save')); ?>

        <!--<a class="btn btn-unapublish pull-right margin-L-1" id="invoice-ok">
            <i class="fa fa-check"></i>Save</a>-->

        <a class="btn btn-unapublish pull-right" data-dismiss="modal" href="#" id="invoice-cancel">

            <i class="fa fa-close"></i>Exit
        </a>

        <a class="publish_all btn btn-danger margin-L-1 pull-left"  href="#" id="voucher-save">
            Ret
        </a>
        <a class="publish_all btn btn-danger margin-L-1 pull-left"  href="#" id="voucher-save">
            Beg
        </a>
        <a class="publish_all btn btn-danger margin-L-1 pull-left"  href="#" id="voucher-save">
            End
        </a>
        <a class="publish_all btn btn-danger margin-L-1 pull-left"  href="#" id="voucher-save">
            Pre
        </a>
        <a class="publish_all btn btn-danger margin-L-1 pull-left"  href="#" id="voucher-save">
            Nxt
        </a>
        <a class="publish_all btn btn-danger margin-L-1 pull-left"  href="#" id="voucher-save">
            Kip
        </a>
        <a class="publish_all btn btn-danger margin-L-1 pull-left"  href="#" id="voucher-save">
            Mod
        </a>
        <a class="publish_all btn btn-danger margin-L-1 pull-left"  href="#" id="voucher-save">
            Add
        </a>
        <a class="publish_all btn btn-danger margin-L-1 pull-left"  href="#" id="voucher-save">
            Inq
        </a>
        <a class="publish_all btn btn-danger margin-L-1 pull-left"  href="#" id="voucher-save">
            Del
        </a>
        <a class="publish_all btn btn-danger margin-L-1 pull-left"  href="#" id="voucher-save">
            Cpy
        </a>
        <a class="publish_all btn btn-danger margin-L-1 pull-left"  href="#" id="voucher-save">
            Set
        </a>
        <a class="publish_all btn btn-danger margin-L-1 pull-left"  href="#" id="voucher-save">
            Uxl
        </a>
        <a class="publish_all btn btn-danger margin-L-1 pull-left"  href="#" id="voucher-save">
            Hlp
        </a>
        <a class="publish_all btn btn-danger margin-L-1 pull-left"  href="#" id="voucher-save">
            Qut
        </a>


    </div>

</div>
<?php echo $this->form()->closeTag(); ?>