Merge branch 'adminbsb_material_ui'
This commit is contained in:
@@ -726,9 +726,9 @@
|
||||
|
||||
// For Server Print - from jade
|
||||
if ($("#server_mode").val() == "cloud") {
|
||||
code2lab.printFile(result.filepath, result.printer_url);
|
||||
code2lab.printFile(result.filepath.substr(6), result.printer_url);
|
||||
}
|
||||
|
||||
|
||||
// console.log(result);
|
||||
// code2lab.printBill(result.filepath, result.printer_model, result.printer_url);
|
||||
location.reload();
|
||||
@@ -776,7 +776,7 @@
|
||||
createReceiptNoInFirstBillData(receipt_no,type);
|
||||
// For Server Print - from jade
|
||||
if ($("#server_mode").val() == "cloud") {
|
||||
code2lab.printFile(result.filepath, result.printer_url);
|
||||
code2lab.printFile(result.filepath.substr(6), result.printer_url);
|
||||
}
|
||||
location.reload();
|
||||
}
|
||||
@@ -942,7 +942,7 @@
|
||||
success: function (result) {
|
||||
// For Server Print - from jade
|
||||
if ($("#server_mode").val() == "cloud") {
|
||||
code2lab.printFile(result.filepath, result.printer_url);
|
||||
code2lab.printFile(result.filepath.substr(6), result.printer_url);
|
||||
}
|
||||
window.location.href = '/origami/';
|
||||
}
|
||||
|
||||
@@ -725,7 +725,7 @@ var customer_name = "<%= @customer.name %>";
|
||||
customer_display_view(null,"reload");
|
||||
// For Server Print - from jade
|
||||
if ($("#server_mode").val() == "cloud") {
|
||||
code2lab.printFile(result.filepath, result.printer_url);
|
||||
code2lab.printFile(result.filepath.substr(6), result.printer_url);
|
||||
}
|
||||
if (cashier_type=="cashier") {
|
||||
window.location.href = '/origami';
|
||||
@@ -939,7 +939,7 @@ var customer_name = "<%= @customer.name %>";
|
||||
}, function () {
|
||||
// For Server Print - from jade
|
||||
if ($("#server_mode").val() == "cloud") {
|
||||
code2lab.printFile(result.filepath, result.printer_url);
|
||||
code2lab.printFile(result.filepath.substr(6), result.printer_url);
|
||||
}
|
||||
if (cashier_type=="cashier") {
|
||||
window.location.href = '/origami';
|
||||
@@ -1018,7 +1018,7 @@ var customer_name = "<%= @customer.name %>";
|
||||
console.log(result);
|
||||
// For Server Print - from jade
|
||||
if ($("#server_mode").val() == "cloud") {
|
||||
code2lab.printFile(result.filepath, result.printer_url);
|
||||
code2lab.printFile(result.filepath.substr(6), result.printer_url);
|
||||
}
|
||||
if (cashier_type=="cashier") {
|
||||
window.location.href = '/origami';
|
||||
|
||||
@@ -705,7 +705,7 @@ $("#first_bill").on('click', function(){
|
||||
createReceiptNoInFirstBillData(receipt_no,"");
|
||||
// For Server Print - from jade
|
||||
if ($("#server_mode").val() == "cloud") {
|
||||
code2lab.printFile(result.filepath, result.printer_url);
|
||||
code2lab.printFile(result.filepath.substr(6), result.printer_url);
|
||||
}
|
||||
location.reload();
|
||||
}
|
||||
@@ -739,7 +739,7 @@ $(".choose_payment").on('click', function () {
|
||||
|
||||
// For Server Print - from jade
|
||||
if ($("#server_mode").val() == "cloud") {
|
||||
code2lab.printFile(result.filepath, result.printer_url);
|
||||
code2lab.printFile(result.filepath.substr(6), result.printer_url);
|
||||
}
|
||||
|
||||
location.reload();
|
||||
|
||||
@@ -22,7 +22,7 @@
|
||||
<div class="col-lg-2 col-md-2 col-sm-2">
|
||||
<label class="font-14">Select Type</label>
|
||||
<select name="sale_type" id="sel_sale_type" class="form-control">
|
||||
<option value="">Select Typess</option>
|
||||
<option value="">Select Type</option>
|
||||
<option value="revenue" selected>Revenue Only</option>
|
||||
<option value="all">All Type</option>
|
||||
<option value="discount">Discount Only</option>
|
||||
|
||||
@@ -77,16 +77,18 @@
|
||||
<% unless @sale_data.blank? %>
|
||||
<% @sale_data.each do |sale| %>
|
||||
<!-- all total qty sum -->
|
||||
<!--
|
||||
|
||||
<% if sale.status_type != "Discount" && sale.status_type != "foc"
|
||||
total_qty += sale.total_item
|
||||
end %>
|
||||
<% if sale.status_type == "foc" && sale.price > 0
|
||||
total_qty += sale.total_item
|
||||
end %>
|
||||
-->
|
||||
<% if sale.status_type == "Discount"
|
||||
total_qty += sale.total_item*(-1)
|
||||
end %>
|
||||
<!-- end all total qty -->
|
||||
<!--
|
||||
|
||||
<% if sale.status_type == "foc" && sale.grand_total < 0
|
||||
total_item_foc += sale.grand_total*(-1)
|
||||
end %>
|
||||
@@ -94,7 +96,7 @@
|
||||
<% if sale.status_type == "Discount" && sale.grand_total < 0
|
||||
total_item_dis += sale.grand_total*(-1)
|
||||
end %>
|
||||
-->
|
||||
|
||||
<% if !acc_arr.include?(sale.account_id) %>
|
||||
<tr>
|
||||
<td><b><%= sale.account_name %></b></td>
|
||||
@@ -121,7 +123,12 @@
|
||||
<% end %>
|
||||
<td><%= sale.item_code rescue '-' %></td>
|
||||
<td><%= sale.product_name rescue '-' %></td>
|
||||
<td><%= sale.total_item rescue '-' %></td>
|
||||
<% if sale.status_type != "Discount" %>
|
||||
<td><%= sale.total_item rescue '-' %></td>
|
||||
<%else%>
|
||||
<td><%= sale.total_item*(-1) rescue '-' %></td>
|
||||
<% end %>
|
||||
|
||||
<td><%= number_with_precision(sale.unit_price , precision:precision.to_i,delimiter:delimiter) rescue '-'%></td>
|
||||
<td><%= number_with_precision(sale.grand_total , precision:precision.to_i,delimiter:delimiter) rescue '-'%></td>
|
||||
</tr>
|
||||
@@ -132,10 +139,12 @@
|
||||
<% count = count + 1 %>
|
||||
<% sub_total += sale.grand_total %>
|
||||
<% #sub_qty += sale.total_item %>
|
||||
<% if sale.status_type!="Discount" && (!sale.product_name.include? "FOC")
|
||||
<% if sale.status_type !="Discount" && (!sale.product_name.include? "FOC")
|
||||
sub_qty += sale.total_item
|
||||
end %>
|
||||
|
||||
<% if sale.status_type =="Discount"
|
||||
sub_qty += sale.total_item*(-1)
|
||||
end %>
|
||||
<% if count == value %>
|
||||
<tr>
|
||||
<td colspan="3"> </td>
|
||||
|
||||
Reference in New Issue
Block a user