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

Fix issue with entry of multiple assets via Lots entry modal #6710

Conversation

jmcameron
Copy link
Collaborator

When you enter lots (by integration) and you want to add multiple instances of an asset, this PR makes this work more easily from the Lots modal popup.

Closes #6709

TESTING

  • use bhima_test
  • Go to: Stock > Stock Entry
    • Select [Integration]
    • Add a new line for an asset. Use inventory code: MOT.HCRF250RX for a motorcycle
    • Click on the Lots link to bring up the Lots entry modal.
    • You should now be able to change the global quantities
    • Since Assets must be unique with quantity===1, the quantity field is not even shown
    • Try added multiple lines (with different LOT ids)
    • Click [Submit] on the modal
    • Try clicking the Lots link again to verify that the info on the non-yet-saved lots is still there
    • Close the modal
    • Try adding a non-asset (eg, inventory code DINJ_TRIB1A2_0) and use the "Lots* link and verify that the Lots modal works as normal for non-assets
    • Close the Lots entry modal
    • Click on the [Submit] button to enter the stock.
    • Check the receipt document to verify correct enty
  • Go to Asset Management > Assets Registry and verify that the new assets appear there.

@jmcameron jmcameron requested a review from mbayopanda June 27, 2022 13:35
Copy link
Collaborator

@mbayopanda mbayopanda left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I do not think it is related to this PR, but I have noticed that the quantity is doubled in the receiver depot when we do the entry with this link in the "Expedition Registry":

image

In the case below I have just received 3 Vehicule but it shows 6 instead.

We can see the quantity doubled in the "Lot Registry"

image

To reproduce that:

  • yarn build:db
  • Do a stock entry operation in a the Depot Principal of 3 Assets (MOT.HCRF250RX)
  • Do a stock exit operation to the Secondary Depot of 3 Assets
  • Do the stock entry operation in the Secondary Depot by using the link in the "Expedition Registry"
  • Consult the "Articles en stock" and "Lot en stock" registry to check quantities

@mbayopanda
Copy link
Collaborator

Here is another observation for a "Stock Entry" by using the "Transfert" button in the "Stock Entry" module, when we select the shipment the grid is filled with the doubled quantity:

image

@mbayopanda
Copy link
Collaborator

bors r+

@bors
Copy link
Contributor

bors bot commented Jul 1, 2022

Build succeeded:

@bors bors bot merged commit b929b1d into Third-Culture-Software:master Jul 1, 2022
@jmcameron jmcameron deleted the fix-global-quantity-for-new-assets branch July 1, 2022 12:39
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Stock entry of assets limited with quantity 1
2 participants