Merge branch 'printservice_dev' into r-1902001-01

This commit is contained in:
Thein Lin Kyaw
2020-08-26 10:38:00 +06:30
41 changed files with 1441 additions and 1044 deletions

View File

@@ -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/';