remove frt bill
This commit is contained in:
@@ -163,7 +163,7 @@ function checkReceiptNoInFirstBillData(receipt_no,payment) {
|
||||
}
|
||||
}
|
||||
if (payment) {
|
||||
return json_data[0]["payment"];
|
||||
return status; //json_data[0]["payment"];
|
||||
}else{
|
||||
return status;
|
||||
}
|
||||
|
||||
@@ -22,7 +22,6 @@ class Origami::PaymentsController < BaseOrigamiController
|
||||
cashier_terminal = CashierTerminal.find(cashier_zone.cashier_terminal_id)
|
||||
|
||||
# Print for First Bill to Customer
|
||||
<<<<<<< HEAD
|
||||
# unique_code = "ReceiptBillPdf"
|
||||
# #shop detail
|
||||
# shop_details = Shop::ShopDetail
|
||||
@@ -46,48 +45,6 @@ class Origami::PaymentsController < BaseOrigamiController
|
||||
# printer = Printer::ReceiptPrinter.new(print_settings)
|
||||
|
||||
# printer.print_receipt_bill(print_settings,cashier_terminal,sale_items,sale_data,customer.name, item_price_by_accounts, discount_price_by_accounts, member_info, shop_details, "Frt")
|
||||
=======
|
||||
unique_code = "ReceiptBillPdf"
|
||||
#shop detail
|
||||
shop_details = Shop::ShopDetail
|
||||
# customer= Customer.where('customer_id=' +.customer_id)
|
||||
customer = Customer.find(sale_data.customer_id)
|
||||
|
||||
# rounding adjustment
|
||||
if shop_details.is_rounding_adj
|
||||
a = sale_data.grand_total % 25 # Modulus
|
||||
b = sale_data.grand_total / 25 # Division
|
||||
#not calculate rounding if modulus is 0 and division is even
|
||||
#calculate rounding if modulus is zero or not zero and division are not even
|
||||
if (a != 0.0 && b%2 != 0.0) || (a==0.0 && b%2 !=0)
|
||||
new_total = Sale.get_rounding_adjustment(sale_data.grand_total)
|
||||
rounding_adj = new_total-sale_data.grand_total
|
||||
sale_data.update_attributes(grand_total: new_total,old_grand_total: sale_data.grand_total,rounding_adjustment:rounding_adj)
|
||||
end
|
||||
end
|
||||
#end rounding adjustment
|
||||
|
||||
# get member information
|
||||
rebate = MembershipSetting.find_by_rebate(1)
|
||||
if customer.membership_id != nil && rebate
|
||||
member_info = Customer.get_member_account(customer)
|
||||
# current_balance = SaleAudit.paymal_search(sale_id)
|
||||
current_balance = 0
|
||||
end
|
||||
# get printer info
|
||||
print_settings=PrintSetting.find_by_unique_code(unique_code)
|
||||
|
||||
# find order id by sale id
|
||||
# sale_order = SaleOrder.find_by_sale_id(@sale_data.sale_id)
|
||||
|
||||
# Calculate price_by_accounts
|
||||
item_price_by_accounts = SaleItem.calculate_price_by_accounts(sale_items)
|
||||
discount_price_by_accounts = SaleItem.get_discount_price_by_accounts(sale_items)
|
||||
|
||||
printer = Printer::ReceiptPrinter.new(print_settings)
|
||||
|
||||
printer.print_receipt_bill(print_settings,cashier_terminal,sale_items,sale_data,customer.name, item_price_by_accounts, discount_price_by_accounts, member_info, shop_details, "Frt",current_balance)
|
||||
>>>>>>> master
|
||||
end
|
||||
|
||||
def create
|
||||
@@ -319,13 +276,8 @@ class Origami::PaymentsController < BaseOrigamiController
|
||||
# item_price_by_accounts = SaleItem.calculate_price_by_accounts(saleObj.sale_items)
|
||||
# discount_price_by_accounts = SaleItem.get_discount_price_by_accounts(saleObj.sale_items)
|
||||
|
||||
<<<<<<< HEAD
|
||||
# printer = Printer::ReceiptPrinter.new(print_settings)
|
||||
# printer.print_receipt_bill(print_settings,cashier_terminal,saleObj.sale_items,saleObj,customer.name, item_price_by_accounts, discount_price_by_accounts, member_info,rebate_amount,shop_details, "FOC")
|
||||
=======
|
||||
printer = Printer::ReceiptPrinter.new(print_settings)
|
||||
printer.print_receipt_bill(print_settings,cashier_terminal,saleObj.sale_items,saleObj,customer.name, item_price_by_accounts, discount_price_by_accounts, member_info,rebate_amount,shop_details, "FOC",nil)
|
||||
>>>>>>> master
|
||||
end
|
||||
end
|
||||
|
||||
|
||||
@@ -447,11 +447,11 @@
|
||||
receipt_no = ($("#receipt_no").html()).trim();
|
||||
}
|
||||
// console.log(checkReceiptNoInFirstBillData(receipt_no));
|
||||
if(checkReceiptNoInFirstBillData(receipt_no,"")){
|
||||
$("#pay").show();
|
||||
}else{
|
||||
$("#pay").hide();
|
||||
}
|
||||
// if(checkReceiptNoInFirstBillData(receipt_no,"")){
|
||||
// $("#pay").show();
|
||||
// }else{
|
||||
// $("#pay").hide();
|
||||
// }
|
||||
/* end check first bill or not*/
|
||||
|
||||
$('.invoicedetails').on('click', function () {
|
||||
|
||||
Reference in New Issue
Block a user