Apply Credits Feature Summary
Overview
The Apply Credits feature allows admins to apply an account credit to a single event purchase.
Behavior
+ Ensure customer name comes before customer email
+ Display drop down list and filter results as you type
+ Show customer first and last name on H1, and email on H2
+ Populate remaining inputs with customer info
+ Display account credit balance if available
+ Allow selection of credits (deposit, refund, or create reason)
+ Validate event name, ticket type, and deposit amount for deposits
+ Show amount refunded and date of refund for refunds
+ Allow admin to enter a flat value
+ Validate that the value does not exceed available account credit balance
+ Activate Apply Credits button
+ Populate line items with selected amount and maximum applicable amount
+ Re-containerize the button
+ Populate credits applied line item under order summary
Transaction Handling
+ Apply account credits to transaction
+ Update customer's account credit balance
+ Log transaction (even if it fails)
+ Reset account credits to customer profile