mirror of
https://github.com/rickbarrette/redmine_qbo.git
synced 2026-11-18 02:20:37 -05:00
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>
16 lines
788 B
ERB
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 %>
|