CLONE - Implement CT-5059

Issue No: IC-8952
Created 10/1/2020 9:06:00 PM
Type Integration
Priority Blocker
Status Closed
Resolution Fixed
Fixed Version 19.1
Description [HDTN-251309|https://helpdesk.irely.com/iRelyi21live//#/HD/Ticket/?ticket=HDTN-251309]   There can be several scenarios of how Vouchers are created but let's talk about just 2.   # Basis contract that is fully priced (multiple price) after ticket gets distributed ## Contract pricing triggers creation of voucher and proper pricing is achieved. ## Calls IC sp that process IR to Voucher. Voucher is exactly what IR is with no consideration to contract pricing hierarchy. ## Contract then updates the Voucher detail to use the proper pricing hierarchy. # Basis contract that is fully priced (multiple price) before the ticket gets distributed ## Scale just creates the IR based on average price ## Calls IC sp that process IR to Voucher. Voucher is exactly what IR is with no consideration to contract pricing hierarchy. ### This is the bug. ### The solution is to replicate what Contract is doing. (redundant code that will do the same thing). #### Cannot just call that SP in contract because it's not a reusable unit.   *Solution*   # The contract piece of code that currently is not a reusable unit will be moved to a separate wrapper SP. # {color:#e74c3c}We will create a wrapper SP that checks the Voucher being created and will implement the pricing hierarchy that it will get from Contract (from Contract's SP){color} # So whether we are processing IR to Voucher, or pricing a contract or distributing a ticket, it will call that one functional primitive that applies the contract price upon creation of Voucher.     in 20.1 Grain settlement will implement that wrapper SP too.     *Requirements*   # Instead of IC calling uspAPCreateVoucher, the new wrapper SP should be called # Must return the table out that the wrapper SP will return to contracts will get the affected records     _{color:#c0392b}Does not require a blocker build.{color}_