clintonhealthaccess / chailmis-android

Android Tablet Application for Logistics Management in the DHIS2 Platform
Other
7 stars 6 forks source link

When the order module is selected, the "suggested quantity for order" is equal to "Max Stock" - "Stock on Hand" and if -ve, defaults to zero #266

Open chai-lmis opened 8 years ago

garymabin commented 8 years ago

@chai-lmis, I check the code base and find it seems that it already works as you described in the title.

chai-lmis commented 8 years ago

On the app, "Suggested Quantity" always displays as "0". This should be as follows: Suggested Quantity = Max Stock - SOH IF this is -ve then Suggested Quantity = 0

I tested this by dispensing the commodity so SOH = 1, then i selected the order module and placed and order for the same commodity and the "suggested quantity" was 0

ihassin commented 8 years ago

@bin and I will discuss this during tonight's meeting

garymabin commented 8 years ago

@chai-lmis, I think why the "Suggested Quantity" is always "0" is that the "Max Stock" we got from the server side is always zero, please check the "MAX_STOCK_QUANTITY" value of a commodity in the server side.

chai-lmis commented 8 years ago

This may be tied to 249: the client needs to send the nos of stock out days to the server which is used to calculate the AMC on the server, and AMC is used to calculate MAX/MIN stock levels