<div class="modal fade" tabindex="-1" role="dialog" id="modal_edit_sales_receipt" style="width: 100%;">
	<div class="modal-dialog" role="document" style="width: 100%; height: 106% !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.invoice_edit')</h4>
			</div>
			<div class="modal-body">
				<div class="row">
                    <div class="col-sm-12" style="font-size: 27px;">
                        <i class="fa fa-clock"></i> Sales Receipt # <span id="doc_number_sales_receipt"></span>
                    </div>
                    <div class="col-sm-2">
                        <div class="form-group">
                            <label for="">Customer <i class="fa fa-question-circle"></i></label>
                            <select name="customer_sales_receipt" id="customer_sales_receipt" class="form-control select2" style="width: 100%">
                                <option value="">Barneet Design</option>
                            </select>
                        </div>
                    </div>
                    <div class="col-sm-2">
                        <div class="form-group">
                            <label for="">Customer email <i class="fa fa-question-circle"></i></label>
                            <input type="text" name="customer_email_sales_receipt" id="customer_email_sales_receipt" class="form-control" value="email@gmail.com">
                        </div>
                    </div>
                    <div class="col-sm-8 pull-right" style="text-align: right;">
                        <div class="form group ">
                            <label for="" style="font-size: 16px;" class="" id="balance_status_sales_receipt">Amount </label>
                            <br>
                            <span id="balance_due_html_sales_receipt" name="balance_due_sales_receipt_receipt" style="font-size: 30px;">$ 0</span>
                        </div>
                    </div>
                    <div class="clearfix"></div>
                    <div class="col-sm-2">
                        <div class="form-group">
                            <label for="">Billing Address</label>
                            <textarea name="billing_address_sales_receipt" id="billing_address_sales_receipt" cols="10" rows="2" class="form-control"></textarea>
                        </div>
                    </div>
                    <div class="col-sm-2">
                        <div class="form-group">
                            <label for="">Sales Receipt Date</label>
                            <input class="form-control dob-date-picker" readonly="" name="sales_receipt_date" type="text" id="sales_receipt_date">
                        </div>
                    </div>
                    <section id="custom_fields"></section>
                    <div class="clearfix"></div>
                    <div class="col-sm-2">
                        <div class="form-group">
                            <label for="">Payment Method</label>
                            <select name="payment_method_sales_receipt" id="payment_method_sales_receipt" class="form-control select2" style="width: 100%">
                                <option value=""></option>
                            </select>
                        </div>
                    </div>
                    <div class="col-sm-2">
                        <div class="form-group">
                            <label for="">Reference no.</label>
                            <input type="text" name="reference_no_sales_receipt" id="reference_no_sales_receipt" class="form-control">
                        </div>
                    </div>     
                    <div class="col-sm-2">
                        <div class="form-group">
                            <label for="">Deposit To</label>
                            <select name="deposit_sales_receipt_account" id="deposit_sales_receipt_account" class="form-control select2" style="width: 100%">
                                <option value=""></option>
                            </select>
                        </div>
                    </div>
                    <div class="col-sm-12">
                        <table class="table table-striped">
                            <thead>
                                <tr>
                                    <th style="width: 5%;">#</th>
                                    <th style="width: 30%;">Product/Service <i class="fa fa-question-circle"></i></th>
                                    <th style="width: 30%;">Description</th>
                                    <th style="width: 10%;">Qty</th>
                                    <th style="width: 10%;">Rate</th>
                                    <th style="width: 5%;">Amount</th>
                                    <th style="width: 5%;">&nbsp;</th>
                                </tr>
                            </thead>
                            <tbody id="product_service_sales_receipt"></tbody>
                            <tfoot>
                                <tr style="text-align: right">
                                    <td colspan="6">Subtotal</td>
                                    <td id="span_subtotal_sales_receipt" style="font-size: 15px;"></td>
                                </tr>
                                <tr>
                                    <td colspan="5">Message displayed on sales receipt</td>
                                    <td style="text-align: right;">
                                        {{-- Taxable Subtotal <span id="tax_subtotal"></span> --}}
                                    </td>
                                </tr>
                                <tr>
                                    <td colspan="4"><textarea name="customer_memo_sales_receipt" id="customer_memo_sales_receipt" cols="50" rows="3"></textarea></td>
                                    <td colspan="2">
                                        <select name="tax_rate_sales_receipt" id="tax_rate_sales_receipt" class="form-control" placeholder="Select a sales tax rate" style="width: 80% !important;" onchange="get_rate_data(this, 'SalesReceipt')"></select> <span id="tax_rate_html_sales_receipt" style="font-size: 20px; font-weight: 600;"></span>
                                    </td>
                                    <td><input type="text" name="tax_amount_sales_receipt" id="tax_amount_sales_receipt" class="form-control"></td>
                                </tr>
                                <tr>
                                    <td colspan="4">Message displayed on statement <br><textarea name="private_note_sales_receipt" id="private_note_sales_receipt" cols="50" rows="3"></textarea></td>
                                    <td><select name="discount_type_sales_receipt" id="discount_type_sales_receipt" placeholder="Discount Percent" class="form-control" onchange="get_discount('SalesReceipt');">
                                        <option value="value">Discount Value</option>    
                                        <option value="percent">Discount Percent</option>    
                                    </select></td>
                                    <td><input type="text" name="percent_amount_sales_receipt" id="percent_amount_sales_receipt" class="form-control" value="0" onchange="get_discount('SalesReceipt');"></td>
                                    <td style="text-align: right;font-size: 15px;"><span id="total_discount_sales_receipt">0</span></td>
                                </tr>
                                <tr style="text-align: right; font-size: 15px;">                                    
                                    <td colspan="6">Total</td>
                                    <td><span id="total_amt_sales_receipt" style="font-size: 15px;"></span>
                                        <input type="hidden" name="total_amt_old_sales_receipt" id="total_amt_old_sales_receipt">
                                    </td>
                                </tr>
                                <tr style="text-align: right; font-size: 15px;" id="amount_received_sales_receipt_tr">                                    
                                    <td colspan="6">Amount Received</td>
                                    <td><span id="amount_received_sales_receipt" style="font-size: 15px;">0</span></td>
                                </tr>
                                <tr style="text-align: right; font-size: 15px;">                                    
                                    <td colspan="6">Balance due</td>
                                    <td><span id="balance_due_sales_receipt"></span>
                                        <input type="hidden" name="balance_due_old_sales_receipt" id="balance_due_old_sales_receipt">
                                    </td>
                                </tr>
                            </tfoot>
                        </table>
                    </div>         
                    <div class="clearfix"></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 -->