-
Notifications
You must be signed in to change notification settings - Fork 85
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
OP-1332 OP-1199 OP-1200 Pharmacy Inventory feature #2127
base: develop
Are you sure you want to change the base?
Conversation
OP-1199-Main-Store-Inventory
* fixed one bug
Align OP-1199 with develop
OP-1303 Fix layout
Co-authored-by: Alessandro Domanico <[email protected]>
OP-1303 | Make status more evident in edit inventory
* add logic to delete inventory * add import * extract inventory.getStatus() * set status on UpperCamel case when create new Inventory * Update src/main/java/org/isf/medicalinventory/gui/InventoryBrowser.java * add missiong bundle --------- Co-authored-by: ArnaudFonzam <[email protected]> Co-authored-by: Alessandro Domanico <[email protected]>
Align with develop
OP-1302 | Make JTable sortable in edit inventory
Merge develop
Align with develop
* add validate action * Update bundle/language_en.properties * update logique and apply the new * update src/main/java/org/isf/medicalinventory/gui/InventoryEdit.java * update bundle to add new message * Rename one field * Remove useless field and format code * Remove deprecated field * Fix exception after focus out on real qty * Update one label * update logic of validate Inventory * update InventoryEdit * update validate method * update InventoryEdit * update validate inventory' * update Inventory Edit * update InventoryEdit.java * git fix error Index out of bound * update Inventory * apply suggestion * fix error on update Cost of lot * OP-1344: dialog method takes bundle key and not the final text (#2060) * Add bundles * Refactor validation method and change errors severity * create new inventory during validation phase if we have new charge movement created after the creation date of inventory --------- Co-authored-by: ArnaudFonzam <[email protected]> Co-authored-by: David B Malkovsky <[email protected]> Co-authored-by: Alessandro Domanico <[email protected]>
src/main/java/org/isf/medicalinventory/gui/InventoryBrowser.java
Outdated
Show resolved
Hide resolved
Co-authored-by: FOFOU FONZAM Gui Arnaud <[email protected]>
For me if we move those two buttons inside the other three it is not good we will have many intermediaire window when user just need to do and inventory. please Have you see that ward Inventory button don't have shortcut. may be the problem is that the Shortcut used is already use on this window. I think we should update the menu item row related to ward inventory button to set the non used shortcut. WDYT? |
Done, and also inverted item order, see informatici/openhospital-core#1474. Thanks! |
True, but in this way we have a lot of code duplication so when you want to change something you have to do it in two places. On the other hand, you have that the inventory is not a so frequent operation (generally yearly, hopefully quarterly, rarely monthly). |
MessageDialog.error(null, "angal.inventory.referencealreadyused.msg"); | ||
return; | ||
} | ||
inventory = new MedicalInventory(); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
inventory = new MedicalInventory(); | |
inventory = new MedicalInventory(); | |
wardSelected = (Ward)wardComboBox.getSelectedItem(); | |
inventory.setWard(wardSelected.getCode()); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
the setWard
method is already on the line 498, wardSelected
is global and it should be already set at this point because ward selection is compulsory before to even start a new inventory, so in theory we could also remove the null
check...
Have you experienced a bug?
Anyway we have also a global wardId
, which seems just unnecessary if we already have wardSelected
... I guess we can simplify a lot the logic here...
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
yes I have the error after the inventory was created after checking I see that ward column was null even as we set the value before create its. I think the problem is because the value of selected ward is not set to the variable wardSelect and the value is null during creation. look the listener of wardComboBox you didn't set the value of the wardSelected but you used wardId, so you can use wardSelected instead of wardId on wardCombox Listener to avoid a lot of variable doing the same things.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
As for now I've published a quick fix, please try.
See OP-1199 and OP-1200 (also addresses OP-1332).