Fix: tax doesn't include after discount.
This commit is contained in:
@@ -38,7 +38,7 @@ class PrintReceiptJob < ApplicationJob
|
||||
other_amount = SaleItem.calculate_other_charges(sale_items)
|
||||
|
||||
printer = Printer::ReceiptPrinter.new(print_settings)
|
||||
byebug
|
||||
|
||||
if saleObj.sale_status == 'completed'
|
||||
printer.print_receipt_bill(print_settings, false, nil, cashier_terminal, sale_items, saleObj, customer.paypar_account_no, item_price_by_accounts, discount_price_by_accounts, member_info, rebate_amount, current_shop, 'paid', current_balance, card_data, other_amount, latest_order_no, card_balance_amount, nil, transaction_ref)
|
||||
elsif saleObj.generic_void?
|
||||
|
||||
@@ -488,7 +488,12 @@
|
||||
var sub_total = totalAmount;
|
||||
var ajax_url = "/foodcourt/" + sale_id + "/discount";
|
||||
|
||||
if (cashier_type == "food_court_qr") {
|
||||
var c_type = "food_court";
|
||||
var params = { 'cashier_type' : c_type, 'sale_id': sale_id, 'sub_total': sub_total, 'discount_items': discount_items, 'overall_discount': overall_discount };
|
||||
}else{
|
||||
var params = { 'cashier_type' : cashier_type, 'sale_id': sale_id, 'sub_total': sub_total, 'discount_items': discount_items, 'overall_discount': overall_discount };
|
||||
}
|
||||
|
||||
$.ajax({
|
||||
type: "POST",
|
||||
|
||||
@@ -174,6 +174,7 @@
|
||||
<% end %>
|
||||
<% end %>
|
||||
</td>
|
||||
|
||||
<td class="item-attr"><strong><span id="total_tax"><%= number_with_precision(@sale_data.total_tax, precision: precision.to_i ) rescue number_with_precision(0, precision: precision.to_i )%></span></strong></td>
|
||||
</tr>
|
||||
<tr>
|
||||
|
||||
@@ -58,7 +58,6 @@
|
||||
<% grand_rounding_adjustment = 0.0 %>
|
||||
<% @sale_data.each do |result| %>
|
||||
<% result[:items].each do |item| %>
|
||||
<% byebug %>
|
||||
<tr>
|
||||
<td><%= item.receipt_no rescue '-' %> </td>
|
||||
<td><%= item.receipt_date.strftime("%e %b %I:%M%p") rescue '-' %></td>
|
||||
|
||||
Reference in New Issue
Block a user