Reliance: PREBUY CONTRACTS NOT WORKING

Issue No: TM-3209
Created 3/3/2021 3:52:11 PM
Type Bug
Priority Critical
Status Closed
Resolution Fixed
Fixed Version 19.1
Description *This issue relates to i21 Help Desk ticket:* [ HDTN-257791 - PREBUY CONTRACTS NOT WORKING|https://helpdesk.irely.com/iRelyi21live/#/HD/Ticket/?ticket=HDTN-257791]   We are having issues with our prebuy contracts. When customers get down to the bottom of their prebuy and would like more gallons than contracted for, the correct ticket is not going over to digital. Also after delivery it is not subtracting the gallons from the contract.   Attached are 3 different invoices from 3 different customers (in one file with specific issues written on each invoice). These are the ones we caught in the last couple days. I believe there are more and will look into that when I have a chance. This issue goes back to at least the 19th of February for sure.   Thanks for you help.   Wendy     +Steps:+   1. Create a contract or use an existing contract with a specific balance.   2. Open the customer consumption site. Check the calculated qty vs contract balance.   3. Contract balance should be less than calculated qty. If not, attached additional devices to increase the capacity and calc qty.   4. In Generate Orders screen, add filters to include the customer site.   5. Select the customer site in grid then click Finalize Order.   6. Check the customer site's order and price. The price is not using the contract price.   +Issue:+   * In Generate Order, the price contract is not used when the contract balance is less than the order's calculated qty. * +Note:+ This is working correctly in Consumption Site > Order.   +Acceptance:+   * Price contract should be used in Generate Orders screen when: ** Contract balance is > than calculated qty ** Contract balance is < than calculated qty but not equal to 0 balance. ** Contract is not expired. * Additional key points to check using Generate Orders screen: ** For multiple contracts, apply the latest contract sequence (LIFO) ** If customer has no valid contract, get order pricing based on hierarchy(special price, regular price) ** Order total should be calculated correctly based on qty*price (_plus site tax if there is setup_) ** Site's price adjustments should not be applied when order uses contract pricing ** Contract pricing should not be applied to site that has a linked contract. ** Order should not be created if there's an existing site order