Custom Reports

68 | Voucher Usage including Accounts (Custom Report)

This article demonstrates an example of a Custom Report for Voucher Usage including Accounts. While this will show all voucher usage, it will not show the purchase of vouchers/gift certificates. Disclaimer: This report may need modifications or alterations based on each system setup and configuration.

This article demonstrates an example of a Custom Report for Voucher Usage including Accounts. 

While this will show all voucher usage, it will not show the purchase of vouchers/gift certificates.

 

Disclaimer:

This report may need modifications or alterations based on each system setup and configuration.

Report Query:

 

 

select
case when a.AccountID = t.AccountID
       then a.AccNumber
else 'N/A'
end,
case when a.AccountID = t.AccountID
       then a.firstname + ' ' + a.lastname
else 'Non Member
Account'
end,
s.name,
w.name,
vs.name,
v.VoucherID,
t.datetimetrans,
t.TransactionID,
case v.VoucherType
       when 1 then convert(varchar,v.AmountIssued / 100) + ' ' + 'Ticket(s)'
       when 2 then convert(varchar,v.AmountIssued / 100) + ' ' + 'Ticket(s)'
       when 3 then convert(varchar,v.AmountIssued / 100) + ' ' + 'Ticket(s)'
       when 6 then convert(varchar,v.AmountIssued / 100) + '%'  + ' ' + '+' + ' ' + 'Max
Discount:' + ' ' + convert(varchar,cast(v.MaximumDiscount as money) / 100)
       else convert(varchar,cast(v.amountissued as money)/100)
end,
case v.VoucherType
       when 1 then convert(varchar,cast(tp.adjustment as money) / 100)
       when 2 then convert(varchar,tp.adjustment / 100) + ' ' + 'Ticket(s)'
       when 3 then convert(varchar,tp.adjustment / 100) + ' ' + 'Ticket(s)'
       when 6 then convert