PCard and Crossover Attributes
This page briefly explains the design pertaining to the PCard and
MR Crossover attributes. The entire flow includes the Labor, MR, PR, and PO packages.
- The attributes pcardnum, pcardtype, pcardexpdate, and pcardverification have been
added to the following tables:
Labor, MR, MRLine, PR, PRLine, POLine. (NOT PO HEADER!!!)
- Field validation for MR.RequestedBy will copy pcard* from Labor to MR
(where labor.laborcode = mr.requestedby).
Also copy LA21-25 to MRLA1-MRLA5.
- The MRLine pcard* attributes will be null if all four equal the MR header values.
MRLine pcard* will be non-null ONLY when overriding the header.
The four pcard* attributes work together as a group; if one of the line's
pcard* attributes is non-null, then all four of the line's pcard* attributes
are in effect for that line, whether or not some of them are null. You do not combine
one attribute from the line with another attribute from the header.
- If the user changes the MRLine and then changes MR, the MRLine is not affected.
The user would have to go back and explicitly change the MRLine, if needed.
- There is a one-to-one relationship between PR and MR.
When creating PR from MR, copy the pcard* from MR to PR.
Also copy MRLA1-MRLA5 to PRLA1-PRLA5.
- There is a one-to-one relationship between PRLine and MRLine.
When creating PRLine from MRLine, copy pcard* from MRLine to PRLine.
Also copy MRLALN1-MRLALN5 to PRLALN1-PRLALN5.
- Same as #2, #3 and #4, but pertaining to PR and PRLine.
- There is a one-to-one relationship between POLine and PRLine.
A PO can have lines that were created from different PRs.
When creating POLine from PRLine, the code does the following:
- Copy pcard* from PRLine to POLine.
- Copy crossover attributes from PRLine to POLine (PRLALN1-5 to POLALN1-5).
- If ALL of the four pcard* attributes on the new POLine are null,
copy all four from PR header to POLine.
- Looking at each of the other attributes individually (POLALN1-POLALN5),
if null on the new POLine, then copy that value from PR header (PRLA1-5)
to POLine.