user3501569
user3501569

Reputation: 127

Hybris How to distinguish if a voucher applies on order entry or on the order itself

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

Answers (1)

Cijo Jose
Cijo Jose

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

Related Questions