Atlassian uses cookies to improve your browsing experience, perform analytics and research, and conduct advertising. Accept all cookies to indicate that you agree to our use of cookies on your device.
Atlassian uses cookies to improve your browsing experience, perform analytics and research, and conduct advertising. Accept all cookies to indicate that you agree to our use of cookies on your device. Atlassian cookies and tracking notice, (opens new window)
Consider reading hard-code values from configuration / settings table.
instead of using hard-coded status as in AND sh.status NOT IN ('SKIPPED', 'INITIATED'), store this status in variable like STOCK_CONSUMPTION_EXCLUDE_STATUS_LIST
instead of using hard-codes status name as in WHEN SUM (li.max_periods_of_stock) < 3 THEN 'Understocked' WHEN SUM (li.max_periods_of_stock) > 6 THEN 'Overstocked' WHEN SUM (li.max_periods_of_stock) = 0 THEN 'Unknown' ELSE 'Adequately stocked' END AS stock_status
consider reading status from constant define in configuration table.
consider storing max / min stock level(MOS) in requisitions table when populating facility and program code.
how li.max_periods_of_stock is calculated. Is it max limit for the facility or calculated MOS?
consider calculating and storing stock status in the database. Calculating on the fly may impact the page load as the database size increase.
Consider reading hard-code values from configuration / settings table.
instead of using hard-coded status as in AND sh.status NOT IN ('SKIPPED', 'INITIATED'), store this status in variable like STOCK_CONSUMPTION_EXCLUDE_STATUS_LIST
instead of using hard-codes status name as in WHEN SUM (li.max_periods_of_stock) < 3 THEN
'Understocked'
WHEN SUM (li.max_periods_of_stock) > 6 THEN
'Overstocked'
WHEN SUM (li.max_periods_of_stock) = 0 THEN
'Unknown'
ELSE
'Adequately stocked'
END AS stock_status
consider reading status from constant define in configuration table.
consider storing max / min stock level(MOS) in requisitions table when populating facility and program code.
how li.max_periods_of_stock is calculated. Is it max limit for the facility or calculated MOS?
consider calculating and storing stock status in the database. Calculating on the fly may impact the page load as the database size increase.