Reputation: 127
How to show vouchers against products (order entry) in order details page.
In OrderData I see appliedVouchers but unable to distinguish voucher applied to which order entry.
final OrderData orderData = orderFacade.getOrderDetailsForCode(orderCode);
final List<VoucherData> voucherList = orderData.getAppliedVouchers();
Upvotes: 0
Views: 827
Reputation: 26
flexible query to check which voucher is used in which order
select {vi.code}, {o.code} from
{ VoucherInvalidation as vi
join Order as o
on {o.pk} = {vi.order}
}
Basically voucher usage is stored in VoucherInvalidation
Upvotes: 1