Uploaded image for project: 'mod-orders'
  1. mod-orders
  2. MODORDERS-371

Extra pieces are created for "PO Line" with type for "P/E Mix"

    XMLWordPrintable

    Details

    • Template:
    • Sprint:
      ACQ Sprint 85
    • Story Points:
      1
    • Development Team:
      Thunderjet

      Description

      How to reproduce

      1. Create a new order, add a PoLine (P/E Mix) - physicalQty: 2, electronicQty: 2
      createInventory (Phys): Instance, Holding, Item, createInventory (Elec): None
      2. Open the order
      3. Look at receiving-history

      Actual: 6 pieces are created (attached 6_pieces.PNG)
      Expected: 4 pieces are created(2 elec and 2 phys)

      Note curls for reproducing:

      Create order

      curl --location --request POST 'http://localhost:9130/orders/composite-orders' \
      --header 'X-Okapi-Token: {{xokapitoken}}' \
      --header 'Content-Type: application/json' \
      --header 'X-Okapi-Tenant: diku' \
      --data-raw '{
        "id" : "2865195a-4a37-4b0e-9c48-65f41550f020",
        "approved" : true,
        "approvedById" : "21fe13aa-3a05-592a-bffd-6baff1688093",
        "approvalDate" : "2020-03-23T18:48:47.381+0000",
        "billTo" : "5f8a321e-6b38-4d90-92d4-bf08f91a2242",
        "dateOrdered" : "2020-03-23T18:48:47.381+0000",
        "manualPo" : false,
        "notes" : [ "Check credit card statement to make sure payment shows up" ],
        "orderType" : "One-Time",
        "reEncumber" : false,
        "shipTo" : "f7c36792-05f7-4c8c-969d-103ac6763187",
        "template" : "4dee318b-f5b3-40dc-be93-cc89b8c45b6f",
        "totalEstimatedPrice" : 39.96,
        "totalItems" : 4,
        "vendor" : "e0fb5df2-cdf1-11e8-a8d5-f2801f1b9fd1",
        "workflowStatus" : "Open",
        "compositePoLines" : [ {
          "id" : "f3c61e4d-751f-4d61-983a-c72d09088862",
          "checkinItems" : false,
          "instanceId" : "04f34acf-bfbe-4b4b-a942-7b56c1993e78",
          "acquisitionMethod" : "Purchase At Vendor System",
          "alerts" : [ ],
          "cancellationRestriction" : true,
          "claims" : [ ],
          "collection" : false,
          "contributors" : [ ],
          "cost" : {
            "listUnitPrice" : 9.99,
            "listUnitPriceElectronic" : 9.99,
            "currency" : "USD",
            "discountType" : "percentage",
            "quantityPhysical" : 2,
            "quantityElectronic" : 2,
            "poLineEstimatedPrice" : 39.96
          },
          "details" : {
            "productIds" : [ ],
            "subscriptionInterval" : 0
          },
          "eresource" : {
            "activated" : false,
            "createInventory" : "None",
            "trial" : false,
            "accessProvider" : "e0fb5df2-cdf1-11e8-a8d5-f2801f1b9fd1",
            "materialType" : "615b8413-82d5-4203-aa6e-e37984cb5ac3"
          },
          "fundDistribution" : [ ],
          "isPackage" : false,
          "locations" : [ {
            "locationId" : "fcd64ce1-6995-48f0-840e-89ffa2288371",
            "quantity" : 4,
            "quantityElectronic" : 2,
            "quantityPhysical" : 2
          } ],
          "orderFormat" : "P/E Mix",
          "paymentStatus" : "Awaiting Payment",
          "physical" : {
            "createInventory" : "Instance, Holding, Item",
            "materialType" : "1a54b431-2e4f-452d-9cae-9cee66c9a892",
            "materialSupplier" : "e0fb5df2-cdf1-11e8-a8d5-f2801f1b9fd1",
            "volumes" : [ ]
          },
          "poLineNumber" : "10013-1",
          "purchaseOrderId" : "2865195a-4a37-4b0e-9c48-65f41550f020",
          "receiptStatus" : "Awaiting Receipt",
          "reportingCodes" : [ ],
          "rush" : false,
          "source" : "User",
          "titleOrPackage" : "Hyperion",
          "vendorDetail" : {
            "instructions" : "",
            "vendorAccount" : "1234"
          },
          "metadata" : {
            "createdDate" : "2020-03-23T18:48:39.669+0000",
            "createdByUserId" : "21fe13aa-3a05-592a-bffd-6baff1688093",
            "updatedDate" : "2020-03-23T18:48:47.679+0000",
            "updatedByUserId" : "21fe13aa-3a05-592a-bffd-6baff1688093"
          }
        } ],
        "acqUnitIds" : [ ],
        "tags" : {
          "tagList" : [ "amazon" ]
        },
        "metadata" : {
          "createdDate" : "2020-03-23T18:47:30.494+0000",
          "createdByUserId" : "21fe13aa-3a05-592a-bffd-6baff1688093",
          "updatedDate" : "2020-03-23T18:48:47.695+0000",
          "updatedByUserId" : "21fe13aa-3a05-592a-bffd-6baff1688093"
        }
      }'
      

      Look receiving history

      curl --location --request GET 'http://localhost:9130/orders/receiving-history?query=purchaseOrderId%3D%3D2865195a-4a37-4b0e-9c48-65f41550f020' \
      --header 'X-Okapi-Token: {{xokapitoken}}'
      

        TestRail: Results

          Attachments

            Issue Links

              Activity

                People

                Assignee:
                cmcnally Craig McNally
                Reporter:
                Andrei_Makaranka Andrei Makaranka
                Tester Assignee:
                Craig McNally Craig McNally
                Votes:
                0 Vote for this issue
                Watchers:
                2 Start watching this issue

                  Dates

                  Created:
                  Updated:
                  Resolved:

                    TestRail: Runs

                      TestRail: Cases