Testcase to check the sorting in PMM_PurchaseCandidate.
Make sure you have flatrate contracts for procurement, for all bpartner and all products (e.g. G000X: all products, G000Y: P0002 & P0004, G000Z: P0001, P0003, P0004), with different prices
Make sure you have PMM_PurchaseCandidate for all procurement contracts, for all bpartners (preferably for different dates, and already from the past)
=> the price is the one from procurement contract, for the resp. month (not used for sorting):
Promised Date | BPartner | Product | Price |
---|---|---|---|
10.01.17 | G000X | P0001 | 1.00 |
09.01.17 | G000Z | P0001 | 1.50 |
05.01.17 | G000X | P0002 | 1.25 |
05.01.17 | G000Y | P0002 | 1.22 |
10.01.17 | G000X | P0003 | 1.20 |
12.12.16 | G000X | P0003 | 1.15 |
12.12.16 | G000X | P0003 | 1.15 |
01.01.17 | G000Z | P0003 | 1.11 |
15.12.16 | G000Z | P0003 | 1.05 |
08.01.17 | G000X | P0004 | 2.02 |
01.12.16 | G000Y | P0004 | 2.00 |
11.11.16 | G000Y | P0004 | 1.98 |
10.01.17 | G000Z | P0004 | 2.10 |
=> sorted by bparter:
Promised Date | BPartner | Product | Price |
---|---|---|---|
10.01.17 | G000X | P0001 | 1.00 |
09.01.17 | G000Z | P0001 | 1.50 |
=> the price is the one from procurement contract, for the resp. month (not used for sorting):
Promised Date | BPartner | Product | Price |
---|---|---|---|
10.01.17 | G000X | P0001 | 1.00 |
05.01.17 | G000X | P0002 | 1.25 |
10.01.17 | G000X | P0003 | 1.20 |
12.12.16 | G000X | P0003 | 1.15 |
12.12.16 | G000X | P0003 | 1.15 |
08.01.17 | G000X | P0004 | 2.02 |