Skip to content

Commit

Permalink
Fixed last_name to remove customer ID.
Browse files Browse the repository at this point in the history
  • Loading branch information
jcwatson11 committed Feb 3, 2025
1 parent a5be8b1 commit de24d63
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion app/services/l_s_extract.rb
Original file line number Diff line number Diff line change
Expand Up @@ -117,13 +117,14 @@ def generate_report(job, sales)
end

def get_report_line(job, sale, products, customers)
last_name = sale["Customer"]["lastName"].gsub(/\s\*\d+\*$/, "")
{
EventCode: job.event_code,
SaleID: sale["saleID"],
OrderDate: sale["timeStamp"].to_date.strftime("%Y-%m-%d"),
Customer: "#{sale["Customer"]["firstName"]} #{sale["Customer"]["lastName"]}",
FirstName: sale["Customer"]["firstName"],
LastName: sale["Customer"]["lastName"],
LastName: last_name,
OrderTotal: sale["calcTotal"],
ItemSubtotal: sale["calcSubtotal"],
SalesTax: (sale["calcTax1"].to_f + sale["calcTax2"].to_f).round(2),
Expand Down

0 comments on commit de24d63

Please sign in to comment.