<div class="modal fade" tabindex="-1" role="dialog" id="modal_edit_bill" style="width: 100%;">
	<div class="modal-dialog" role="document" style="width: 100%; height: 100% !important; margin: 0;">
		<div class="modal-content" style="width: 100%; height: 100%;">
			<div class="modal-header">
				<button type="button" class="close" data-dismiss="modal" aria-label="Close"><span aria-hidden="true">&times;</span></button>
				<h4 class="modal-title">@lang('lang_v1.all_sales_edit')</h4>
			</div>
			<div class="modal-body">
				<div class="row">
                    <div class="col-sm-12" style="font-size: 27px;">
                        <input type="hidden" name="transaction_type" id="transaction_type">
                        <i class="fa fa-clock"></i><span id="doc_number_bill"></span>
                    </div>
                    <div class="col-sm-2">
                        <div class="form-group">
                            <label for="">Vendor</label>
                            <select name="vendor_bill" id="vendor_bill" class="form-control select2" style="width: 100%">
                                <option value=""></option>
                            </select>
                        </div>
                    </div>                    
                    {{-- <div class="col-sm-2">
                        <span id="balance"></span>
                    </div> --}}
                    <div class="col-sm-10 pull-right">
                        <div class="form group" style="width: 100%;">
                            <label for="" style="font-size: 16px;" class="" id="balance_status_bill">Balance Due</label>
                            <br>
                            <span id="amount_bill" name="amount_bill" class="" style="font-size: 30px;">$274.50</span>
                            <a href="javascript:void(0)" id="subtotal_bill_old" readonly>Have payment made </a>
                            <input type="hidden" id="subtotal_balance_old">
                        </div>
                    </div>
                    <div class="clearfix"></div>.
                    <div class="col-sm-2">
                        <div class="form-group">
                            <label for="">Mailing Address</label>
                            <textarea name="mailing_address_bill" id="mailing_address_bill" cols="30" rows="3" class="form-control"></textarea>   
                        </div>
                    </div>
                    <div class="col-sm-2">
                        <div class="form-group">
                            <label for="">Terms</label>
                            <select name="term_bill" id="term_bill" class="form-control select2" style="width: 100%">
                                <option value=""></option>
                            </select>
                        </div>
                    </div>
                    <div class="col-sm-2">
                        <div class="form-group">
                            <label for="">Bill Date</label>
                            <input class="form-control dob-date-picker" readonly="" name="bill_date" type="text" id="bill_date">
                        </div>
                    </div>
                    <div class="col-sm-2">
                        <div class="form-group">
                            <label for="">Due Date</label>
                            <input class="form-control dob-date-picker" readonly="" name="due_date_bill" type="text" id="due_date_bill">
                        </div>
                    </div>
                    <div class="col-sm-2">
                        <div class="form-group">
                            <label for="">Bill no.</label>
                            <input type="text" name="bill_no" id="bill_no" class="form-control">
                        </div>
                    </div>                                                            
                    <div class="clearfix"></div>                    
                    <div class="col-sm-12">
                        <table class="table table-striped">
                            <thead>
                                <tr>
                                    <th style="width: 1%;">#</th>
                                    <th style="width: 20%;">Category</th>
                                    <th style="width: 20%;">Description</th>
                                    <th style="width: 5%;">Amount</th>
                                    <th style="width: 5%;">Billable</th>
                                    <th style="width: 5%;">Tax</th>
                                    <th style="width: 15%;">Customer</th>
                                    <th style="width: 5%;">&nbsp;</th>
                                </tr>
                            </thead>
                            <tbody id="category_list_bill"></tbody>
                        </table>
                    </div>                    
                    <div class="col-sm-12">
                        <table class="table table-striped">
                            <thead>
                                <tr>
                                    <th style="width: 1%;">#</th>
                                    <th style="width: 20%;">Product/Service</th>
                                    <th style="width: 20%;">Description</th>
                                    <th style="width: 10%;">Qty</th>
                                    <th style="width: 10%;">Rate</th>
                                    <th style="width: 5%;">Amount</th>
                                    <th style="width: 5%;">Billable</th>
                                    <th style="width: 5%;">Tax</th>
                                    <th style="width: 15%;">Customer</th>
                                    <th style="width: 5%;">&nbsp;</th>
                                </tr>
                            </thead>
                            <tbody id="product_service_bill"></tbody>
                            <tfoot>
                                <tr style="text-align: right">
                                    <td colspan="9">Subtotal</td>
                                    <td colspan="2" id="span_subtotal_bill" style="font-size: 15px;"></td>
                                </tr>                                
                            </tfoot>
                        </table>
                    </div>      
                    <div class="col-sm-4">
                        <div class="form-group">
                            <label for="">Memo</label> 
                            <textarea name="memo_bill" id="memo_bill" cols="30" rows="3" class="form-control"></textarea>   
                        </div>    
                    </div>              
                </div>
			</div>
			<div class="modal-footer" style="padding: 2rem;background: #fff;position: sticky;bottom: 0;">
				<button type="button" class="btn btn-default" data-dismiss="modal">@lang('messages.close')</button>				
				<button type="button" onclick="update_all_sales()" class="btn btn-primary">@lang('messages.update')</button>
			</div>
		</div><!-- /.modal-content -->
	</div><!-- /.modal-dialog -->
</div><!-- /.modal -->