<div class="modal-dialog modal-lg" role="document">
   <div class="container">
      <div class="modal-content">
         <input type="hidden" name="count" id="count">
         <div class="modal-header">
            <h5 class="modal-title" id="exampleModalLabel-2">Payment Details</h5>
            <button type="button" class="close" data-dismiss="modal" aria-label="Close">
            <span aria-hidden="true">&times;</span>
            </button>
         </div>
         <div class="modal-body " >
            <div  id='msg_box_payment'  ></div>
            <div  id='model_msg_box' ></div>
            <input type="hidden" disabled name="row_count" id="row_count">
            <input type="hidden" disabled name="pay_grand_total" id="pay_grand_total">
            <input type="hidden" disabled name="status_value" id="status_value">
             <div class="form-group row ">
               <div class="col-lg-6">
               <label class="col-form-label input_mr" >Payment Type  </label>  
               <div class="form-group m-0" >
                  <select  class="form-control"  id="model_payment_type" name="model_payment_type" >
                     <option value="">Select Payment Type</option>
                     <?php
                        $sql = "Select * from s_paytype where CANCELL='0' AND REFNO !='CREDIT' group by ID asc ";
                        foreach ($conn->query($sql) as $row) {
                          echo "<option value=\"" . $row["REFNO"] . "\">" . $row["NAME"] . "</option>";
                        }
                        ?>
                  </select>
               </div>
               </div>
               <div class="col-lg-6" style="margin:27px -1px -5px">
               <a type='button' class='btn btn-success btn-sm' onclick="new_card()">Add Now</a>  </div>
               <div class=" col-lg-12">
               <div  id="pay_card">
               </div>
               </div>
             <div class=" col-lg-12">
               <br>
               <div class="table-responsive" >
                  <table class="table table-bordered">
                     <thead>
                        <tr style="background-color: #1da1f2;">
                           <th colspan="2">Summary</th>
                        </tr>
                     </thead>
                     <tbody  id="summary">
                        <tr>
                           <td>Sub Total </td>
                           <td style="text-align: right;  font-weight: bold;" id="model_all_itemtot">0.00</td>
                        </tr>
                        <tr>
                           <td>Dicount </td>
                           <td style="text-align: right;  font-weight: bold;" id="model_all_itemdis">0.00</td>
                        </tr>
                        <tr>
                           <td>VAT </td>
                           <td style="text-align: right;  font-weight: bold;" id="model_all_itemtot">0.00</td>
                        </tr>
                        <tr>
                           <td>Grand Total </td>
                           <td style="text-align: right;  font-weight: bold;" id="model_all_grand_total">0.00</td>
                        </tr>
                        <td>Paid </td>
                        <td style="text-align: right;  font-weight: bold;" id="model_all_paid">0.00</td>
                        </tr>
                        <td>Balance</td>
                        <td style="text-align: right;  font-weight: bold;" id="model_all_balance">0.00</td>
                        </tr>
                     </tbody>
                  </table>
                  
                   <div class="col-lg-12">
                           <label  class="col-form-label input_mr" >Note</label>
                           <textarea  class="form-control" style="text-transform: capitalize;"  maxlength="250" rows="1" placeholder="This textarea has a limit of 100 chars." id="pay_remark" name="pay_remark"></textarea>
                    </div>
                        
                     
               </div>
               <br></br>
                  <div class="modal-footer" >
                            
            <div id="save_inv_btns_model">
            <a type="button" class="btn btn-success" onclick="save_inv()">Save</a>
            <button type="button" class="btn btn-light" data-dismiss="modal">Close</button>
            </div>
         </div>
               </div>
            </div>
         <!-- </div> -->
         
      </div>
   </div>
</div>
<style type="text/css">
</style>