Need assistance on the following logic
Complete Delivery - N
Each line item within the order is treated independently. So if one line item in the order has a block then the remaining lines can be shipped if they don't have blocks.
Complete Delivery - Y
The order is treated as a whole. If a line item has a block then it needs to be removed for the order to ship.
The BlockCode column provides information on whether the line item is blocked or not.
The logic I'm looking for is;
If the order is Complete Delivery - N and the order line has a block then under the OrderIsBlocked column I need the comment "OrderLineIsBlocked"
Example: Order No# 0113987750 has 3 lines of which 1 is blocked. "OrderLineIsBlocked" should appear against the line while for the other two lines the field under OrderIsBlocked is blank.
If the order is Complete Delivery - Y and one of the order lines are blocked then under the OrderIsBlocked column I need the comment "OrderIsBlocked"
Example: Order No# 0110433907 has 2 lines with blocks. Since its a Delivery Complete - Y order all lines regardless will capture the comment "OrderIsBlocked"
Complete Delivery - N
Each line item within the order is treated independently. So if one line item in the order has a block then the remaining lines can be shipped if they don't have blocks.
Complete Delivery - Y
The order is treated as a whole. If a line item has a block then it needs to be removed for the order to ship.
The BlockCode column provides information on whether the line item is blocked or not.
The logic I'm looking for is;
If the order is Complete Delivery - N and the order line has a block then under the OrderIsBlocked column I need the comment "OrderLineIsBlocked"
Example: Order No# 0113987750 has 3 lines of which 1 is blocked. "OrderLineIsBlocked" should appear against the line while for the other two lines the field under OrderIsBlocked is blank.
If the order is Complete Delivery - Y and one of the order lines are blocked then under the OrderIsBlocked column I need the comment "OrderIsBlocked"
Example: Order No# 0110433907 has 2 lines with blocks. Since its a Delivery Complete - Y order all lines regardless will capture the comment "OrderIsBlocked"
Book1 | |||||||||
---|---|---|---|---|---|---|---|---|---|
B | C | D | E | F | G | H | |||
1 | SalesOrderNo | ProductNo | OrderQty | CompleteDelivery | UserStatus | BlockCode | OrderIsBlocked | ||
2 | 0112935380 | 1NR73A-K1H | 1 | N | C2AP INC-VBAP-CEPOK INCO MDID NoMP REL | INCO | |||
3 | 0113430548 | A1A30A-KGJ | 1 | N | BLCA C2AP EOL2 NoMP REL SCAL | EOL2 SCAL | |||
4 | 0113493710 | 1NR73A-K1H | 1 | N | C2AP INC-VBAP-CEPOK INCO MDID NoMP REL | INCO | |||
5 | 0113512547 | A1A30A-KGJ | 1 | N | C2AP EOL2 NoMP REL SCAL | EOL2 SCAL | |||
6 | 0113543813 | 5RA32F-KGJ | 1 | N | C2AP MDID NoMP REL RRDC | RRDC | |||
7 | 0113561139 | A1A30A-KGJ | 1 | N | EOL2 MDID NoMP REL SCAL | EOL2 SCAL | |||
8 | 0113705782 | A1A77A-KGJ | 10 | N | C2AP EOL2 MDID NoMP REL SCAL | EOL2 SCAL | |||
9 | 0113725103 | N7L37A | 1 | N | C2AP INC-VBAP-CEPOK INCO MDID NoMP REL | INCO | |||
10 | 0113900946 | 2Z600F-KGJ | 1 | N | C2AP NoMP REL SCAL | SCAL | |||
11 | 0113933893 | 3JA05AN-150 | 1 | N | C2AP EOL2 NoMP REL | EOL2 | |||
12 | 0113969730 | A1A56A-KGJ | 1 | N | C2AP EOL2 MDID NoMP REL SCAL | EOL2 SCAL | |||
13 | 0113987750 | 5RA32F-KGJ | 1 | N | COM-GLA NoMP REL | ||||
14 | 0114002150 | 2Z613F-KGJ | 2 | N | C2AP NoMP REL SCAL | SCAL | |||
15 | 0114002150 | 5RA32F-KGJ | 1 | N | COM-GLA NoMP REL | ||||
16 | 0114003452 | 2Z600F-KGJ | 5 | N | C2AP NoMP REL SCAL | SCAL | |||
17 | 0114005180 | 2Z600F-KGJ | 1 | N | C2AP NoMP REL SCAL | SCAL | |||
18 | 0114016353 | A1A77A-KGJ | 1 | N | C2AP EOL2 MDID NoMP REL SCAL | EOL2 SCAL | |||
19 | 0110113433 | 3GZ25A-KGJ | 1 | Y | BLKD C2AP COM-GLA NoMP REL SCAL | SCAL | |||
20 | 0110113433 | K5L35A | 1 | Y | BLKD C2AP CFSL COM-ATP COM-FDL COM-GLA NoMP REL RRDC | RRDC | |||
21 | 0110113433 | 3GZ25A-KGJ | 1 | Y | BLKD C2AP COM-GLA NoMP REL SCAL | SCAL | |||
22 | 0110113433 | K5L35A | 1 | Y | BLKD C2AP CFSL COM-ATP COM-FDL COM-GLA NoMP REL RRDC | RRDC | |||
23 | 0110113433 | Y3D03A | 1 | Y | BLKD C2AP CFSL COM-ATP COM-FDL COM-GLA NoMP REL | ||||
24 | 0110113433 | Z7C07A | 1 | Y | BLKD C2AP CFSL COM-ATP COM-FDL COM-GLA NoMP REL | ||||
25 | 0110113433 | 3PZ35A-KGJ | 1 | Y | C2AP CFSL COM-FDL COM-GLA COM-PDD NoMP PREL REL XBOP | XBOP | |||
26 | 0110113433 | D7P27A | 1 | Y | C2AP CFSL COM-FDL COM-GLA COM-PDD NoMP REL | ||||
27 | 0110113433 | 3PZ35A-KGJ | 1 | Y | C2AP CFSL COM-FDL COM-GLA COM-PDD NoMP PREL REL XBOP | XBOP | |||
28 | 0110113433 | D7P27A | 1 | Y | C2AP CFSL COM-FDL COM-GLA COM-PDD NoMP REL | ||||
29 | 0110433907 | 3GZ25A-KGJ | 1 | Y | BLCA BLKD C2AP COM-GLA NoMP REL SCAL XBOP | SCAL XBOP | |||
30 | 0110433907 | K5L35A | 1 | Y | BLCA BLKD C2AP CFSL COM-ATP COM-FDL COM-GLA NoMP REL | ||||
31 | 0110433907 | Y3D03A | 1 | Y | BLCA BLKD C2AP CFSL COM-ATP COM-FDL COM-GLA NoMP REL | ||||
32 | 0110433907 | Z7C07A | 1 | Y | BLCA BLKD C2AP CFSL COM-ATP COM-FDL COM-GLA NoMP REL | ||||
33 | 0110433907 | 3GZ25A-KGJ | 1 | Y | BLCA BLKD C2AP COM-GLA NoMP REL SCAL XBOP | SCAL XBOP | |||
Sheet1 |