Files
rickyandClaude Opus 5.5 9fa199aa98 Refunds for canceled orders and returned parts (SOP-OPS-014)
A Refund page on the customer: the canceled order's estimate fills in
the parts the 30% restocking fee is worked out on. Refunding makes the
fee invoice, pays it from the customer's credit, records the rest as a
Check (company check) or Expense (card refund on the terminal) with the
category Accounts Receivable, applies the credit to it so the balance
comes back to $0.00, and optionally marks the estimate Rejected,
cancels its work orders with the reason as a note and emails the
customer. Each refund has a page with a PDF of it.

New permission: Issue refunds. New settings under Billing » Refunds.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-16 20:43:36 -05:00

16 lines
788 B
ERB

<% money = ->(amount) { RedmineQboBilling::RefundWriter.money(amount) } -%>
<%= t(:text_refund_email_greeting, name: @customer&.name.to_s) %>
<%= t(:text_refund_email_intro, shop: @shop_name, order: @refund.estimate_number.present? ? "E#{@refund.estimate_number}" : t(:label_refund_your_order)) %>
<% if @refund.fee_amount.to_d.positive? -%>
<%= t(:label_refund_parts) %>: <%= money.(@refund.parts_amount) %>
<%= t(:label_refund_fee_rate, rate: RedmineQboBilling::RefundWriter.plain(@refund.fee_rate)) %>: <%= money.(@refund.fee_amount) %>
<% end -%>
<%= t(:label_refund_amount) %>: <%= money.(@refund.refund_amount) %>
<%= @refund.check? ? t(:text_refund_email_check, number: @refund.check_number) : t(:text_refund_email_card) %>
<%= t(:text_refund_email_terms) %>
<%= @shop_name %>