Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

SimpleShipments being created with non-existent batches #117

Open
pccosta-pdm opened this issue Aug 25, 2022 · 2 comments
Open

SimpleShipments being created with non-existent batches #117

pccosta-pdm opened this issue Aug 25, 2022 · 2 comments
Assignees
Labels
bug Something isn't working

Comments

@pccosta-pdm
Copy link
Contributor

A GTIN/batch validation must be created before "createSimple" method call when create a SimpleShipment.

pccosta-pdm added a commit that referenced this issue Aug 25, 2022
@pccosta-pdm pccosta-pdm self-assigned this Aug 25, 2022
@pccosta-pdm pccosta-pdm added the bug Something isn't working label Aug 25, 2022
@joaoluis-pdm
Copy link
Contributor

joaoluis-pdm commented Sep 2, 2022

@pccosta-pdm it is not working.
Please check the following request+error:

(end) data= {"orderId":"WHS000001-2022-09-02T19:34:11.619Z","requesterId":"WHS000001","shipmentLines":[{"gtin":"00366582505358","batch":"R034995","quantity":100},{"gtin":"00191778005295","batch":"U002114","quantity":100}]} 

/fgt-workspace/fgt-api/managers/SimpleShipmentManager.js:248
                accum[sl.gtin].push(new Batch({
                               ^

TypeError: Cannot read properties of undefined (reading 'push')
    at /fgt-workspace/fgt-api/managers/SimpleShipmentManager.js:248:32
    at /fgt-workspace/fgt-dsu-wizard/services/BatchService.js:85:25
    at returnFunc (/fgt-workspace/fgt-dsu-wizard/services/StatusService.js:76:32)
    at /fgt-workspace/fgt-dsu-wizard/services/StatusService.js:81:36
    at newFn (/fgt-workspace/privatesky/psknode/bundles/openDSU.js:42815:20)
    at _readFile (/fgt-workspace/privatesky/psknode/bundles/openDSU.js:774:49)
    at /fgt-workspace/privatesky/psknode/bundles/openDSU.js:1360:17
    at waitIfDSUIsRefreshing (/fgt-workspace/privatesky/psknode/bundles/openDSU.js:446:20)
    at Archive.readFile (/fgt-workspace/privatesky/psknode/bundles/openDSU.js:1349:9)
    at /fgt-workspace/privatesky/psknode/bundles/openDSU.js:1368:36
    at newFn (/fgt-workspace/privatesky/psknode/bundles/openDSU.js:42815:20)
    at /fgt-workspace/privatesky/psknode/bundles/openDSU.js:2122:32
    at Object.Manifest.manifestHandler.getArchiveForPath (/fgt-workspace/privatesky/psknode/bundles/openDSU.js:7658:9)
    at /fgt-workspace/privatesky/psknode/bundles/openDSU.js:2115:25
    at getManifest (/fgt-workspace/privatesky/psknode/bundles/openDSU.js:1280:20)
    at /fgt-workspace/privatesky/psknode/bundles/openDSU.js:2105:13
    at waitIfDSUIsRefreshing (/fgt-workspace/privatesky/psknode/bundles/openDSU.js:446:20)
    at Archive.getArchiveForPath (/fgt-workspace/privatesky/psknode/bundles/openDSU.js:2102:9)
    at /fgt-workspace/privatesky/psknode/bundles/openDSU.js:1362:22
    at waitIfDSUIsRefreshing (/fgt-workspace/privatesky/psknode/bundles/openDSU.js:446:20)
    at Archive.readFile (/fgt-workspace/privatesky/psknode/bundles/openDSU.js:1349:9)
    at /fgt-workspace/fgt-dsu-wizard/services/StatusService.js:79:25
    at newFn (/fgt-workspace/privatesky/psknode/bundles/openDSU.js:42815:20)
    at /fgt-workspace/privatesky/psknode/bundles/openDSU.js:786:13
    at /fgt-workspace/privatesky/psknode/bundles/openDSU.js:7331:17
    at /fgt-workspace/privatesky/psknode/bundles/openDSU.js:6740:28
    at /fgt-workspace/privatesky/psknode/bundles/openDSU.js:2829:17
    at EncryptionTransformation.undo (/fgt-workspace/privatesky/psknode/bundles/openDSU.js:7812:9)
    at Brick.getRawData (/fgt-workspace/privatesky/psknode/bundles/openDSU.js:2823:30)
    at extractData (/fgt-workspace/privatesky/psknode/bundles/openDSU.js:378:27)
    at Service.brickDataExtractorCallback (/fgt-workspace/privatesky/psknode/bundles/openDSU.js:386:17)
    at /fgt-workspace/privatesky/psknode/bundles/openDSU.js:6731:22
    at checkBrickDataIntegrity (/fgt-workspace/privatesky/psknode/bundles/openDSU.js:6723:17)
    at /fgt-workspace/privatesky/psknode/bundles/openDSU.js:6726:13
    at runnerCallback (/fgt-workspace/privatesky/psknode/bundles/openDSU.js:16512:17)
    at executeForSingleEntry (/fgt-workspace/privatesky/psknode/bundles/openDSU.js:30158:13)
    at runMicrotasks (<anonymous>)
    at processTicksAndRejections (node:internal/process/task_queues:96:5)

There is supposed enough stock for this order (feel free to check the the MAH receiving the order https://mah-msd-fgt-dev.pharmaledger.pdmfc.com/dashboard/ ).

@joaoluis-pdm joaoluis-pdm reopened this Sep 2, 2022
pccosta-pdm added a commit that referenced this issue Sep 5, 2022
pccosta-pdm added a commit that referenced this issue Sep 5, 2022
pccosta-pdm added a commit that referenced this issue Sep 5, 2022
@pccosta-pdm
Copy link
Contributor Author

@joaoluis-pdm fixes made, could you confirm if is ok?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants