-
Notifications
You must be signed in to change notification settings - Fork 120
Open
Description
Description
The navigateToDepartmentViceStockReport() method in ReportsStock.java currently only clears the departmentViceStockDtos list but does not reset the session-scoped footer totals. Because the bean is @SessionScoped, these totals can remain stale when navigating to the report before clicking "Process".
Affected Fields
The following totals should be reset to 0.0 when navigating to the report:
totalDepartmentViceStockQuantitytotalDepartmentViceStockPurchaseValuetotalDepartmentViceStockRetailValuetotalDepartmentViceStockCostValue
Suggested Fix
Add reset statements in the navigation method:
public String navigateToDepartmentViceStockReport() {
departmentViceStockDtos = new ArrayList<>();
totalDepartmentViceStockQuantity = 0.0;
totalDepartmentViceStockPurchaseValue = 0.0;
totalDepartmentViceStockRetailValue = 0.0;
totalDepartmentViceStockCostValue = 0.0;
return "/pharmacy/pharmacy_report_department_vice_stock?faces-redirect=true";
}Context
- Related PR: Implementation Complete ✅ #18320
- Review comment: Implementation Complete ✅ #18320 (comment)
- Requested by: @buddhika75
Metadata
Metadata
Assignees
Labels
No labels