print settings ActionCable
This commit is contained in:
@@ -280,7 +280,7 @@
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<%= print_settings %>
|
||||
<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"><%= @sale.customer.membership_id rescue 0%></span>
|
||||
@@ -405,10 +405,12 @@
|
||||
url: ajax_url,
|
||||
data: "remark="+ remark + "&sale_id=" + sale_id+ "&access_code=" + access_code,
|
||||
success: function (result) {
|
||||
// For Server Print - from jade
|
||||
if ($("#server_mode").val() == "cloud") {
|
||||
if(typeof code2lab != 'undefined'){
|
||||
code2lab.printFile(result.filepath.substr(6), result.printer_url);
|
||||
if (!$('#print_settings').data('action-cable')) {
|
||||
// For Server Print - from jade
|
||||
if ($("#server_mode").val() == "cloud") {
|
||||
if(typeof code2lab != 'undefined'){
|
||||
code2lab.printFile(result.filepath.substr(6), result.printer_url);
|
||||
}
|
||||
}
|
||||
}
|
||||
window.location.href = '/transactions/sales/';
|
||||
|
||||
Reference in New Issue
Block a user