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

[Ivory Coast] Stock take reasons #817

Closed
5 tasks done
josh-griffin opened this issue Mar 6, 2019 · 4 comments
Closed
5 tasks done

[Ivory Coast] Stock take reasons #817

josh-griffin opened this issue Mar 6, 2019 · 4 comments
Assignees
Labels
Build test: success Type: Feature From a new button to whole new systems

Comments

@josh-griffin
Copy link
Contributor

josh-griffin commented Mar 6, 2019

Epic: sussol/org-issues#18

UPDATE: Summary comment here

Description:

*Reason: Term we have been using to apply a description of the reason why a value differs in the system. For example, a stock take line reported quantity differs from the snapshot quantity. If the snapshot quantity is 10 and a user enters 5, they have to enter a 'reason' - stolen, wastage etc.

Functionality to assign a reason to a stock take line.

Requirements

  • A stock take line must have a reason (From the reason table being synced in [issue](issue here) when the snapshot quantity != counted quantity.

Comments:

TLDR Desktop implementation - sussol/msupply#2461 sussol/msupply#2544

  • There is a table `Reason(ID, title, type, isActive)
    • only soft deleted, so isActive acts as a deletion.
    • type is stocktakeLineAdjustmentReason for stock take line reasons
    • title is the user defined name for the reason eg Stolen
  • When a user enters a different value in the listbox for the counted quantity, a dialog appears (same as when you double click) requiring a user to enter a reason from a dropdown before it can be closed.
  • If the user alters the value in the dialog which opens on double click, they cant move on until a reason is entered from a dropdown.
  • The drop down holding the reasons has no values until snapshot != counted quantity

Suggestions for mobile

  • Entering a counted quantity differing from the snapshot quantity (after losing focus) will open a modal to enter a reason.
  • Clicking on the reason cell will re-open the modal

Seems very intrusive, but not sure of a better implementation due to relatively small real estate.

TESTING

Note: This feature applies only when there are reasons stock take reasons defined (synced from primary)

  • When entering a value for a stock take line whose value differs from the snapshot quantity, a reason must be applied.
  • Entering a value for a stock take line distributes the reason throughout the reasons where it is applicable
  • When entering a value for a stock take batch whose value differs from the snapshot quantity, a reason must be applied.
  • Returning the quantity of a batch to the snapshot quantity removes the reason for that batch
  • Returning the quantity of a line to the snapshot quantity removes the reason for all batches

With no reasons defined, you would never know they existed

@josh-griffin
Copy link
Contributor Author

josh-griffin commented Mar 18, 2019

Should be relatively simple. I think the "batch" details within the listbox is/will be to cluttered and also will probably lead to some messy code trying to enforce. Pretty simple to just use the stock take name popup

image

If you can imagine "Enter a reason" once snapshot quantity != actual quantity. There's also definitely room to shrink the last 3 columns also, to have a reasons column? May require some changing to this popup to make the field a dropdown (which then can also be used for #815 if that's the design to use)

@Chris-Petty
Copy link
Contributor

A higher effort suggestion:

Implement a stocktakeItemPage.js where you can edit batch level info. Navigation to it from stocktakeEditPage via a button in the expansion or an edit icon/button column on the right. In the new page there would be good space to have a table of batches and columns for reasons/comments.

If we go there an OK & NEXT equivalent button to go to the next item in the stocktake would be good.

That said, possibly makes the enforcing reasons harder in this way as if you're working in the current stocktakeEditPage.

@josh-griffin
Copy link
Contributor Author

@wlthomson @Chris-Petty @andreievg

Summarizing:

After editing a stock take line (if (snapshot quantity != actual quantity & storeUsesReasons)), show a modal similar to that of choosing a supplier with:

  • no search bar
  • A default period selected/highlighted/top of list (what constitutes a default period is not finalized, arbitrary at the moment)
  • Closes on selecting a period

This also will introduce removal of the stock take line expansion:

  • turn this into a modal
  • have a reason for each batch in this table, when clicking on that column, same modal/drop down as above would appear

Whoever is assigned should probably break this into a few chunks

@josh-griffin josh-griffin added this to In PR in mobile Mar 19, 2019
@josh-griffin josh-griffin moved this from In PR to To do in mobile Mar 19, 2019
This was referenced Mar 25, 2019
@josh-griffin josh-griffin self-assigned this Apr 1, 2019
Chris-Petty added a commit that referenced this issue Apr 18, 2019
@josh-griffin josh-griffin moved this from To do to Ivory Coast Done in mobile Apr 23, 2019
@Chris-Petty Chris-Petty added Ivory Coast (phase 1) Type: Feature From a new button to whole new systems labels May 29, 2019
@Chris-Petty Chris-Petty moved this from Ivory Coast Done to Vaccine Module Done in mobile May 29, 2019
@DhanyaHerath
Copy link
Contributor

DhanyaHerath commented Jun 28, 2019

TESTING

  • When entering a value for a stock take line whose value differs from the snapshot quantity, a reason must be applied.
  • Entering a value for a stock take line distributes the reason throughout the reasons where it is applicable
  • When entering a value for a stock take batch whose value differs from the snapshot quantity, a reason must be applied.
  • Returning the quantity of a batch to the snapshot quantity removes the reason for that batch
  • Returning the quantity of a line to the snapshot quantity removes the reason for all batches

@mark-prins mark-prins moved this from To be tested to Done in mobile Jun 28, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Build test: success Type: Feature From a new button to whole new systems
Projects
None yet
Development

No branches or pull requests

4 participants