Skip to content

Commit

Permalink
Rename product method for receipts to prevent conflicts
Browse files Browse the repository at this point in the history
  • Loading branch information
excid3 committed Sep 13, 2024
1 parent b6bc868 commit 9c7ba25
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions lib/pay/receipts.rb
Original file line number Diff line number Diff line change
@@ -1,9 +1,5 @@
module Pay
module Receipts
def product
Pay.application_name
end

def receipt_filename
"receipt-#{created_at.strftime("%Y-%m-%d")}.pdf"
end
Expand All @@ -21,6 +17,10 @@ def receipt_details
]
end

def pdf_product_name
Pay.application_name
end

def pdf_line_items
items = [
[
Expand All @@ -45,7 +45,7 @@ def pdf_line_items
end
end
else
items << [product, 1, Pay::Currency.format(amount, currency: currency), Pay::Currency.format(amount, currency: currency)]
items << [pdf_product_name, 1, Pay::Currency.format(amount, currency: currency), Pay::Currency.format(amount, currency: currency)]
end

# If no subtotal, we will display the total
Expand Down

0 comments on commit 9c7ba25

Please sign in to comment.