update cloud for print and first bill

This commit is contained in:
Aung Myo
2018-01-12 16:41:28 +06:30
parent 0b517807f9
commit f214be8847
6 changed files with 183 additions and 164 deletions

View File

@@ -395,9 +395,10 @@
<button type="button" id="commissions" class="btn btn-block bg-blue waves-effect">Commissions</button>
<button type="button" id="in_duties" class="btn btn-block bg-blue waves-effect">In Duties</button>
<button type="button" id="first_bill" class="btn btn-block bg-blue waves-effect">First Bill</button>
<!-- first bill not used in cloud -->
<% if ENV["SERVER_MODE"] != "cloud" %>
<button type="button" id="first_bill" class="btn btn-block bg-blue waves-effect">First Bill</button>
<% end %>
<button type="button" id="pay" class="btn btn-block bg-blue waves-effect">Pay</button>
<button type="button" id="void" class="btn btn-block bg-blue waves-effect" active="<%= can? :overall_void, :void %>"> Void</button>
<% end %>
@@ -407,6 +408,7 @@
<% else %>
<button type="button" id="check_in" class="btn btn-block bg-blue waves-effect"><%= t("views.btn.check_in") %></button>
<% end %>
<input type="hidden" id="server_mode" value="<%= ENV["SERVER_MODE"] %>">
<span class="hidden" id="member_discount"><%= @membership.discount%></span>
<span class="hidden" id="membership_id"><%= @obj_sale.customer.membership_id rescue 0%></span>
<div class="modal fade" id="paymentModal" tabindex="-1" role="dialog">
@@ -446,12 +448,15 @@
if(($("#receipt_no").html()!=undefined) && ($("#receipt_no").html()!="")){
receipt_no = ($("#receipt_no").html()).trim();
}
// console.log(checkReceiptNoInFirstBillData(receipt_no));
// if(checkReceiptNoInFirstBillData(receipt_no,"")){
// $("#pay").show();
// }else{
// $("#pay").hide();
// }
if ($("#server_mode").val() != "cloud") { // first bill not used in cloud
if(checkReceiptNoInFirstBillData(receipt_no,"")){
$("#pay").show();
}else{
$("#pay").hide();
}
}
/* end check first bill or not*/
$('.invoicedetails').on('click', function () {