Uploaded image for project: 'mod-invoice'
  1. mod-invoice
  2. MODINVOICE-231

Logic for Invoice line data from Purchase Order Line

    XMLWordPrintable

    Details

    • Template:
      Thunderjet/Firebird Back-end Story Template
    • Sprint:
      Folijet Sprint 109
    • Story Points:
      8
    • Development Team:
      Folijet
    • Release:
      R1 2021 Bug Fix

      Description

      Purpose/Overview: To define the POL matching logic and data retrieval for invoice lines, based on settings in the Invoice field mapping profile

      NOTE: Matching/Linking to invoice line is only allowed for Orders with Status = Open (not Pending or Closed)

      1. Scenario 1
        • Given the EDIFACT field mapping profile
        • When the user fills in a mapping value for the Invoice line's PO line number field and/or the Invoice line's Vendor reference number field
        • Then use either one of those values to find the related purchase order line in the Orders app
      2. Scenario 2
        • Given the EDIFACT field mapping profile
        • When the user fills in a mapping value for the Invoice line's PO line number field and the Invoice line's Vendor reference number field
        • Then try to match on the POL first. Note that the POL must be on a PO with a status of Open, not Pending or Closed. (NOTE: The order status is stored at the PO level, not the POL level)
          • If match is to a single Open POL, then stop. Use that POL's data to fill in any of the invoice line fields that the field mapping indicates should be filled from the POL.
          • If match is to no POLs or multiple POLs, then try to match on any of the invoice line's Vendor reference numbers. Vendor ref type does not need to be considered. Only one Vendor ref number needs to match.
            • If match is to a single Open POL, then stop. Use that POL's data to fill in any of the invoice line fields that the field mapping indicates should be filled from the POL.
            • If match is to no Vendor Ref numbers or Vendor Ref numbers on multiple POLs, then do not link the invoice line to a POL.
              • Load the invoice line data with whatever default and invoice mappings are specified, but no POL mappings
              • Indication that the invoice line was not linked to a POL moved to MODINVOICE-236
      3. Scenario 3
        • Given the EDIFACT field mapping profile
        • When the user fills in a mapping value of {POL_title} for the Invoice line's Description field
        • Then
          • If a single PO line with Status = Open is matched via the PO Line Number or Vendor reference number field,
          • Use the data from the purchase order line Title field as the value for the Invoice line Description field
          • If no PO line is matched or multiple PO lines are matched via the PO Line Number or Vendor reference number field,
          • Then for the Invoice line Description field, use a value from the next field mapping in the cascade (e.g. POL_title; else IMD+L+050), or else leave it blank (if blank, the user will resolve manually when reviewing the imported invoice)
          • Indication that the invoice line was not linked to a POL moved to MODINVOICE-236
        • The same logic applies for other POL field mappings 
          • Field {Mapping expression}
          • POL title {POL_TITLE}
          • Acquisition units (at PO level) {PO_ACQUISITION_UNITS}
          • POL number {POL_NUMBER}
          • POL fund id {POL_FUND_ID}
          • POL expense class {POL_EXPENSE_CLASS}
          • POL value {POL_VALUE}
      4. Scenario 4
        • Given the EDIFACT field mapping profile
        • When the user selects the value of Use fund distribution from the POL for the Fund distribution source dropdown
        • Then
          • If a single PO line with Status = Open is matched via the PO Line Number or Vendor reference number field,
          • Use the Fund distribution data from the purchase order line to populate the Invoice line's fund distribution fields, rather than any values sent in the incoming EDIFACT file, BUT use the price from the invoice line, not from the POL
          • If no PO line is matched or multiple PO lines are matched via the PO Line Number or Vendor reference number field, or if the matched POL does not have Fund distribution data, then leave the Invoice line's Fund distribution fields blank (will be resolved manually by the user when reviewing the imported invoice)
          • Indication that the invoice line was not linked to a POL moved to MODINVOICE-236
      5. Scenario 5
        • Given the EDIFACT field mapping profile
        • When the user includes an invoice line mapping for the POL of
          • {POL_NUMBER}
          • or
          • [an EDIFACT mapping]; else {POL_NUMBER}, e.g. RFF+LI[2]; else {POL_NUMBER}
        • And the POL is found/linked via a match to a Vendor reference number
        • Then fill in the invoice line's POL number information based on that vendor reference number match to the POL

      See attached screenshots of relevant Field mapping profile fields and PO Line fields

      NOTE: Acq Small Group mentioned possibly restricting POL matches to ones from the same vendor as specified in the invoice. Do not restrict for now. Consider restricting if match turns out not to be exact enough.

        TestRail: Results

          Attachments

          1. A-M Add Scenario.PNG
            A-M Add Scenario.PNG
            43 kB
          2. Fund dist field mapping.PNG
            Fund dist field mapping.PNG
            28 kB
          3. PO Line details, part 1.PNG
            PO Line details, part 1.PNG
            151 kB
          4. PO Line details, part 2.PNG
            PO Line details, part 2.PNG
            145 kB
          5. PO Line details, part 3.PNG
            PO Line details, part 3.PNG
            161 kB
          6. POL-Invoice line logic.PNG
            POL-Invoice line logic.PNG
            61 kB
          7. Sample POL with multiple fund dist.PNG
            Sample POL with multiple fund dist.PNG
            43 kB

            Issue Links

              Activity

                People

                Assignee:
                ruslan_lavrov Ruslan Lavrov
                Reporter:
                abreaux Ann-Marie Breaux
                Votes:
                0 Vote for this issue
                Watchers:
                3 Start watching this issue

                  Dates

                  Created:
                  Updated:
                  Resolved:

                    TestRail: Runs

                      TestRail: Cases