<div class="modal fade" tabindex="-1" role="dialog" id="modal_edit_purchase_order" 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_purchase_order"></span>
                    </div>
                    <div class="col-sm-2">
                        <div class="form-group">
                            <label for="">Vendor</label>
                            <select name="vendor_purchase_order" id="vendor_purchase_order" class="form-control select2" style="width: 100%">
                                <option value=""></option>
                            </select>
                        </div>
                    </div>
                    <div class="col-sm-2">
                        <div class="form-group">
                            <label for="">Email</label>
                            <input type="text" name="email_purchase_order" id="email_purchase_order" class="form-control">                            
                        </div>
                    </div>
                    {{-- <div class="col-sm-2">
                        <span id="balance"></span>
                    </div> --}}
                    <div class="col-sm-6">
                        <div class="form group" style="width: 100%;">
                            <label for="" style="font-size: 16px;" class="" id="balance_status">Amount</label>
                            <br>
                            <span id="amount_purchase_order" name="amount" class="" style="font-size: 30px;">$274.50</span>
                        </div>
                    </div>
                    <div class="clearfix"></div>
                    <div class="col-sm-2">
                        <div class="form-group">
                            <label for="">Mailing Address</label>
                            <textarea name="mailing_address" id="mailing_address" cols="30" rows="3" class="form-control"></textarea>   
                        </div>
                    </div>
                    <div class="col-sm-2">
                        <div class="form-group">
                            <label for="">Purchase order date</label>
                            <input class="form-control dob-date-picker" readonly="" name="purchase_order_date" type="text" id="purchase_order_date">
                        </div>
                    </div>
                    <section id="custom_field"></section>                                       
                    <div class="col-sm-2">
                        <div class="form-group">
                            <label for="">Shipping Address</label>
                            <textarea name="shipping_address" id="shipping_address" cols="30" rows="3" class="form-control"></textarea>   
                                                        
                        </div>
                    </div>
                    <div class="col-sm-2">
                        <div class="form-group">
                            <label for="">Ship via</label>
                            <input type="text" name="ship_via" id="ship_via" 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_purchase_order"></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_purchase_order"></tbody>
                            <tfoot>
                                <tr style="text-align: right">
                                    <td colspan="9">Subtotal</td>
                                    <td colspan="2" id="span_subtotal_purchase_order" style="font-size: 15px;"></td>
                                </tr>                                
                            </tfoot>
                        </table>
                    </div>      
                    <div class="col-sm-4">
                        <div class="form-group">
                            <label for="">Your message to vendor</label> 
                            <textarea name="memo" id="memo_purchase_order" cols="30" rows="3" class="form-control"></textarea>   
                        </div>    
                    </div>                                 
                    <div class="col-sm-4">
                        <div class="form-group">
                            <label for="">Memo</label> 
                            <textarea name="privateNote" id="privateNote_purchase_order" 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 -->