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

Hotfix/100 improve performance qoh calculation #166

Closed
wants to merge 144 commits into from
Closed
Show file tree
Hide file tree
Changes from 1 commit
Commits
Show all changes
144 commits
Select commit Hold shift + click to select a range
20f6d50
#100 introduced SQL script and quartz job that will be used to popula…
jmiranda Nov 14, 2016
b4f10f5
#100 improved usability of global search (now that we can retrieve qu…
jmiranda Nov 16, 2016
54d7b8f
Allow admins to configure whether quartz jobs are enabled or disabled…
jmiranda Nov 16, 2016
be427d0
#100 modified inventory item summary SQL script to handle some edge c…
jmiranda Nov 16, 2016
c7c838d
#100 major performance improvements for the dashboard
jmiranda Nov 16, 2016
ac56b12
#100 Added domain class so we can use GORM/HQL to query and manage th…
jmiranda Nov 16, 2016
49c1ed3
minor change to improve the tag summary widget on the dashboard
jmiranda Nov 16, 2016
0725f4a
#100 added data migration changelog for inventory item summary table
jmiranda Nov 16, 2016
b505284
#100 fixed issue when inventory item summary data is not available yet
jmiranda Nov 16, 2016
9a061e6
#100 fixed requisition status list to show only valid statuses
jmiranda Nov 16, 2016
e3e330c
#100 dashboard / megamenu caches should be flushed when user logs out
jmiranda Nov 16, 2016
7549468
added missing messages for some requisition statuses
jmiranda Nov 16, 2016
c3bd7f9
enabled build summary table quartz job by default
jmiranda Nov 16, 2016
24df688
#100 more improvements to the dashboard widgets as well as some of th…
jmiranda Nov 17, 2016
c34f893
#100 minor improvement to the look-and-feel for the purchase order fi…
jmiranda Nov 17, 2016
63f7b41
fixed minor issue with categories that are too long for the sidebar
jmiranda Nov 17, 2016
3f123ad
fixed issue with filtering by created date and other minor cleanups
jmiranda Nov 17, 2016
b402d72
#100 requisition workflow and consumption report are now using QoH su…
jmiranda Nov 17, 2016
13e3590
#100 deprecated method that was being used to calculate QoH of all pr…
jmiranda Nov 17, 2016
75fd70e
#100 more dashboard cleanup
jmiranda Nov 17, 2016
57268d6
#100 removed subtotals from product and expiration summary widgets to…
jmiranda Nov 17, 2016
5b7fd48
#100 Changed cron expression for the build summary tables job but it'…
jmiranda Nov 18, 2016
b3fab2c
#100 dramatically improved performance of the Edit Transaction page
jmiranda Nov 18, 2016
b12600d
#100 fixed bug with cron expression used by build summary tables job …
jmiranda Nov 18, 2016
ab3f3b7
#100 fixed multiple bugs with the summary table build script and quer…
jmiranda Nov 18, 2016
a40e03a
renamed "debug mode" to "translation mode"
jmiranda Nov 18, 2016
54ddbd0
minor improvements to dashboard widgets
jmiranda Nov 18, 2016
36a0e4d
allow users to see stock card for products that are marked as not sup…
jmiranda Nov 18, 2016
78ab79d
fixed minor UI bugs with the product and inventory item summary
jmiranda Nov 18, 2016
5fa1e40
Added a liquibase changeset for the unique index on the inventory ite…
jmiranda Nov 21, 2016
18aa098
enabled read-only cache for inventory item summary
jmiranda Nov 21, 2016
ffc68e4
changed delay for global search autocomplete to allow previous reques…
jmiranda Nov 21, 2016
f476dec
changed how QoH is compiled on consumption report (also improved UI a…
jmiranda Nov 21, 2016
ff20ee0
#100 changed how QoH values are queried within several components (e.…
jmiranda Nov 21, 2016
64f4834
removed unnecessary import
jmiranda Nov 21, 2016
e004fb7
added links to requisiton list page
jmiranda Nov 21, 2016
94557d6
fixed bug which caused all jobs to run at the same time (trigger name…
jmiranda Nov 21, 2016
7ab023e
minor changes to message properties
jmiranda Nov 21, 2016
a755bd0
UI tweaks for the transaction report
jmiranda Nov 21, 2016
9075c64
fixed bug with accessing QoH value associated with a requisition item
jmiranda Nov 21, 2016
fecc9f8
bumped app version to 0.7.14
jmiranda Nov 21, 2016
554ab23
removed unnecessary drop table statement
jmiranda Nov 21, 2016
abd159f
removed RECEIVED from valid requisition states
jmiranda Nov 22, 2016
cea9736
fixed syntax error in MySQL query
jmiranda Nov 22, 2016
6338373
#100 cached all dashboard data responses by default and changed defau…
jmiranda Nov 22, 2016
dde371b
changed uuid to an auto increment primary key and tweaked the summary…
jmiranda Nov 22, 2016
57ca506
removed unnecessary columns from summary tables to improve performanc…
jmiranda Nov 23, 2016
9509a12
fixed bug that occurs when saving inventory item snapshot records, tw…
jmiranda Nov 23, 2016
a6b4aac
added documentation to explain how to configure -javaagent command li…
jmiranda Nov 25, 2016
3a3270e
removed second-level cache to see if it helps with performance
jmiranda Nov 25, 2016
296dc5e
fixed bug related to caching fast movers; separated rebuild summary /…
jmiranda Nov 25, 2016
ac48895
added ability to forcibly execute the rebuild snapshot table job
jmiranda Nov 25, 2016
21b90dc
#100 dramatically improved the rebuilding of snapshot tables by batch…
jmiranda Nov 25, 2016
a4106db
added force param to all actions that trigger the rebuild snapshot ta…
jmiranda Nov 25, 2016
170473c
removed hard-coded references to /openboxes
jmiranda Nov 25, 2016
d4e5ea8
#100 introduced SQL script and quartz job that will be used to popula…
jmiranda Nov 14, 2016
b69c2b8
#100 improved usability of global search (now that we can retrieve qu…
jmiranda Nov 16, 2016
18122b0
Allow admins to configure whether quartz jobs are enabled or disabled…
jmiranda Nov 16, 2016
bfebd30
#100 modified inventory item summary SQL script to handle some edge c…
jmiranda Nov 16, 2016
909b597
#100 major performance improvements for the dashboard
jmiranda Nov 16, 2016
02acfd9
#100 Added domain class so we can use GORM/HQL to query and manage th…
jmiranda Nov 16, 2016
960e175
minor change to improve the tag summary widget on the dashboard
jmiranda Nov 16, 2016
a9dfe4c
#100 added data migration changelog for inventory item summary table
jmiranda Nov 16, 2016
c8160e3
#100 fixed issue when inventory item summary data is not available yet
jmiranda Nov 16, 2016
789264f
#100 fixed requisition status list to show only valid statuses
jmiranda Nov 16, 2016
02c5f54
#100 dashboard / megamenu caches should be flushed when user logs out
jmiranda Nov 16, 2016
838eb9e
added missing messages for some requisition statuses
jmiranda Nov 16, 2016
be2f572
enabled build summary table quartz job by default
jmiranda Nov 16, 2016
5ddffe2
#100 more improvements to the dashboard widgets as well as some of th…
jmiranda Nov 17, 2016
cc25f21
#100 minor improvement to the look-and-feel for the purchase order fi…
jmiranda Nov 17, 2016
96552a0
fixed minor issue with categories that are too long for the sidebar
jmiranda Nov 17, 2016
2b9c1b0
fixed issue with filtering by created date and other minor cleanups
jmiranda Nov 17, 2016
e6491ae
#100 requisition workflow and consumption report are now using QoH su…
jmiranda Nov 17, 2016
16279d5
#100 deprecated method that was being used to calculate QoH of all pr…
jmiranda Nov 17, 2016
8222420
#100 more dashboard cleanup
jmiranda Nov 17, 2016
fc28e06
#100 removed subtotals from product and expiration summary widgets to…
jmiranda Nov 17, 2016
b14feae
#100 Changed cron expression for the build summary tables job but it'…
jmiranda Nov 18, 2016
2160a64
#100 dramatically improved performance of the Edit Transaction page
jmiranda Nov 18, 2016
a3824df
#100 fixed bug with cron expression used by build summary tables job …
jmiranda Nov 18, 2016
4022402
#100 fixed multiple bugs with the summary table build script and quer…
jmiranda Nov 18, 2016
2ca9594
renamed "debug mode" to "translation mode"
jmiranda Nov 18, 2016
4419942
minor improvements to dashboard widgets
jmiranda Nov 18, 2016
3280ca2
allow users to see stock card for products that are marked as not sup…
jmiranda Nov 18, 2016
ada0590
fixed minor UI bugs with the product and inventory item summary
jmiranda Nov 18, 2016
0ec4d87
Added a liquibase changeset for the unique index on the inventory ite…
jmiranda Nov 21, 2016
5e3bd3d
enabled read-only cache for inventory item summary
jmiranda Nov 21, 2016
e2edbb9
changed delay for global search autocomplete to allow previous reques…
jmiranda Nov 21, 2016
22950ee
changed how QoH is compiled on consumption report (also improved UI a…
jmiranda Nov 21, 2016
6a4a000
#100 changed how QoH values are queried within several components (e.…
jmiranda Nov 21, 2016
2959727
removed unnecessary import
jmiranda Nov 21, 2016
a70cf31
added links to requisiton list page
jmiranda Nov 21, 2016
8a66a66
fixed bug which caused all jobs to run at the same time (trigger name…
jmiranda Nov 21, 2016
23b689f
minor changes to message properties
jmiranda Nov 21, 2016
5415c0b
UI tweaks for the transaction report
jmiranda Nov 21, 2016
7699139
fixed bug with accessing QoH value associated with a requisition item
jmiranda Nov 21, 2016
c27c203
bumped app version to 0.7.14
jmiranda Nov 21, 2016
20ea397
removed unnecessary drop table statement
jmiranda Nov 21, 2016
2986d94
removed RECEIVED from valid requisition states
jmiranda Nov 22, 2016
5c25782
fixed syntax error in MySQL query
jmiranda Nov 22, 2016
c043909
#100 cached all dashboard data responses by default and changed defau…
jmiranda Nov 22, 2016
99d564d
changed uuid to an auto increment primary key and tweaked the summary…
jmiranda Nov 22, 2016
1fd5ec9
removed unnecessary columns from summary tables to improve performanc…
jmiranda Nov 23, 2016
81f8318
fixed bug that occurs when saving inventory item snapshot records, tw…
jmiranda Nov 23, 2016
df57e09
added documentation to explain how to configure -javaagent command li…
jmiranda Nov 25, 2016
3bd7afe
removed second-level cache to see if it helps with performance
jmiranda Nov 25, 2016
8c46f5b
fixed bug related to caching fast movers; separated rebuild summary /…
jmiranda Nov 25, 2016
98d4192
added ability to forcibly execute the rebuild snapshot table job
jmiranda Nov 25, 2016
af64b3f
#100 dramatically improved the rebuilding of snapshot tables by batch…
jmiranda Nov 25, 2016
57d5329
added force param to all actions that trigger the rebuild snapshot ta…
jmiranda Nov 25, 2016
9a877da
removed hard-coded references to /openboxes
jmiranda Nov 25, 2016
0e6c32e
Merge branch 'hotfix/100-improve-performance-qoh-calculation' of http…
jmiranda Nov 25, 2016
547db83
improve UI consistency by stretching all text fields to max width; dr…
jmiranda Feb 11, 2017
a0ce500
fixed some issues with requisition enums and expected location types
jmiranda Feb 11, 2017
b84b789
added comment to transfer stock dialog
jmiranda Feb 11, 2017
49266be
removed some unnecessary inventory statuses (related to obsolete stock)
jmiranda Feb 11, 2017
0e65348
UI improvements for the dashboard page
jmiranda Feb 11, 2017
f954eee
minor bug fixes and improvements for the dashboard page
jmiranda Feb 11, 2017
fdb1f18
fixed several bugs with Purchase Order feature (e.g. ability to impor…
jmiranda Feb 11, 2017
9db8efd
UI improvements for the new inventory reports accessible from dashboard
jmiranda Feb 11, 2017
1c9e35c
minor UI improvements
jmiranda Feb 11, 2017
6397a17
fixed bug when receiving against PO where datetime was set to midnigh…
jmiranda Feb 11, 2017
6183306
removed calendar image trigger due to display issues
jmiranda Feb 11, 2017
30ffaaf
updated message properties
jmiranda Feb 11, 2017
f042a7f
minor config changes
jmiranda Feb 11, 2017
28ee2f5
added unique constraint on inventory level (product and inventory mus…
jmiranda Feb 11, 2017
ac7778f
disabled saving state on dashboard since the feature is in-progress
jmiranda Feb 11, 2017
08dbfa9
added last updated timestamp to new inventory summary dashboard widgets
jmiranda Feb 11, 2017
0874e58
fixed order summary on dashboard
jmiranda Feb 11, 2017
4cd7f0f
minor cosmetic change for order summary on dashboard
jmiranda Feb 11, 2017
fea66d4
removed temporary Generate PO feature - needs a separate feature branch
jmiranda Feb 17, 2017
b2fdb25
added item count to order summary widget
jmiranda Feb 17, 2017
127d0de
minor changes to messages.properties
jmiranda Feb 17, 2017
e20e326
Merge branch 'master' into hotfix/100-improve-performance-qoh-calcula…
jmiranda Jul 18, 2017
a24cf98
Merge branch 'master' into hotfix/100-improve-performance-qoh-calcula…
jmiranda Aug 17, 2017
abdd752
Merge branch 'master' into hotfix/100-improve-performance-qoh-calcula…
jmiranda Aug 24, 2017
513368d
Fixed some issues from the merge
jmiranda Aug 24, 2017
ab38137
Significantly improved performance of the meganmenu
jmiranda Aug 30, 2017
429a1ad
fixed some minor issues with the dashboard related to the latest merge
jmiranda Aug 30, 2017
8dfd8ba
Minor code cleanup
jmiranda Aug 30, 2017
852f362
Added gpars library and dependencies
jmiranda Aug 30, 2017
03cd681
WIP: Implemented quantity on hand calculation using gpars (reduced ti…
jmiranda Aug 30, 2017
ddef80c
Minor UI improvements for the report details page associated with the…
jmiranda Aug 30, 2017
35da606
Merge branch 'master' into hotfix/100-improve-performance-qoh-calcula…
jmiranda Dec 8, 2017
ee00cbc
Merge branch 'master' into hotfix/100-improve-performance-qoh-calcula…
jmiranda Mar 6, 2018
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
#100 more improvements to the dashboard widgets as well as some of th…
…e listing pages that are linked from the dashboard
  • Loading branch information
jmiranda committed Nov 17, 2016
commit 24df688ca08a0d6064b060c39545dd769823c76a
Original file line number Diff line number Diff line change
Expand Up @@ -43,8 +43,12 @@ class RequisitionController {
requisition.destination = Location.get(session?.warehouse?.id)
//def startTime = System.currentTimeMillis()

def dateCreatedFrom = params.dateCreatedFrom ? Date.parse("MM/dd/yyyy", params.dateCreatedFrom) : null
def dateCreatedTo = params.dateCreatedTo ? Date.parse("MM/dd/yyyy", params.dateCreatedTo) : null


// Requisitions to display in the table
def requisitions = requisitionService.getRequisitions(requisition, params)
def requisitions = requisitionService.getRequisitions(requisition, dateCreatedFrom, dateCreatedTo, params)
def requisitionStatistics = requisitionService.getRequisitionStatistics(requisition.destination, null, user)

render(view:"list", model:[requisitions: requisitions, requisitionStatistics:requisitionStatistics])
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -65,12 +65,13 @@ class ShipmentController {
def statusEndDate = params.statusEndDate ? Date.parse("MM/dd/yyyy", params.statusEndDate) : null
def lastUpdatedFrom = params.lastUpdatedFrom ? Date.parse("MM/dd/yyyy", params.lastUpdatedFrom) : null
def lastUpdatedTo = params.lastUpdatedTo ? Date.parse("MM/dd/yyyy", params.lastUpdatedTo) : null

def dateCreatedFrom = params.dateCreatedFrom ? Date.parse("MM/dd/yyyy", params.dateCreatedFrom) : null
def dateCreatedTo = params.dateCreatedTo ? Date.parse("MM/dd/yyyy", params.dateCreatedTo) : null

println "lastUpdatedFrom = " + lastUpdatedFrom + " lastUpdatedTo = " + lastUpdatedTo

def shipments = shipmentService.getShipments(params.terms, shipmentType, origin, destination,
statusCode, statusStartDate, statusEndDate, lastUpdatedFrom, lastUpdatedTo)
statusCode, statusStartDate, statusEndDate, lastUpdatedFrom, lastUpdatedTo, dateCreatedFrom, dateCreatedTo)

// sort by event status, event date, and expecting shipping date
shipments = shipments.sort( { a, b ->
Expand All @@ -88,6 +89,8 @@ class ShipmentController {
status:statusCode?.name,
lastUpdatedFrom:lastUpdatedFrom,
lastUpdatedTo:lastUpdatedTo,
dateCreatedFrom:dateCreatedFrom,
dateCreatedTo:dateCreatedTo,
incoming: incoming
]
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -113,44 +113,40 @@ class DashboardController {

def currentUser = User.get(session?.user?.id)

def start = new Date() - 30, end = new Date()

def location = Location.get(session?.warehouse?.id);
def recentOutgoingShipments = shipmentService.getRecentOutgoingShipments(location?.id, 7, 7)
def recentIncomingShipments = shipmentService.getRecentIncomingShipments(location?.id, 7, 7)
//def allOutgoingShipments = shipmentService.getShipmentsByOrigin(location)
//def allIncomingShipments = shipmentService.getShipmentsByDestination(location)

//def expiredStock = inventoryService.getExpiredStock(null, location)
//def expiringStockWithin30Days = inventoryService.getExpiringStock(null, location, 30)
//def expiringStockWithin90Days = inventoryService.getExpiringStock(null, location, 90)
//def expiringStockWithin180Days = inventoryService.getExpiringStock(null, location, 180)
//def expiringStockWithin365Days = inventoryService.getExpiringStock(null, location, 365)
//def lowStock = inventoryService.getLowStock(location)
//def reorderStock = inventoryService.getReorderStock(location)
def recentOutgoingShipments = shipmentService.getRecentOutgoingShipments(location?.id, start, end)
def recentIncomingShipments = shipmentService.getRecentIncomingShipments(location?.id, start, end)
def outgoingShipmentsByStatus = shipmentService.getShipmentsByStatus(recentOutgoingShipments)
def incomingShipmentsByStatus = shipmentService.getShipmentsByStatus(recentIncomingShipments)

// Days to include for activity list
int daysToInclude = params.daysToInclude?Integer.parseInt(params.daysToInclude):3

def user = params.onlyShowMine?currentUser:null
def requisitionStatistics =
requisitionService.getRequisitionStatistics(location, null, params.onlyShowMine?currentUser:null)
requisitionService.getRequisitionStatistics(location, null, user, start, end)

def outgoingShipmentsByStatus = shipmentService.getShipmentsByStatus(recentOutgoingShipments)
def incomingShipmentsByStatus = shipmentService.getShipmentsByStatus(recentIncomingShipments)
def tags = productService?.getAllTags()?.sort { it.tag }
def rootCategory = productService.getRootCategory()

log.info "dashboard.index Response time: " + (System.currentTimeMillis() - startTime) + " ms"
//def outgoingOrders = orderService.getOutgoingOrders(location)
//def incomingOrders = orderService.getIncomingOrders(location)
[
rootCategory : productService.getRootCategory(),
start: start,
end: end,
rootCategory : rootCategory,
requisitionStatistics: requisitionStatistics,
requisitions: [],
//requisitions: requisitionService.getAllRequisitions(session.warehouse),

//outgoingOrdersByStatus: orderService.getOrdersByStatus(outgoingOrders),
//incomingOrdersByStatus: orderService.getOrdersByStatus(incomingOrders),
outgoingShipmentsByStatus : outgoingShipmentsByStatus,
incomingShipmentsByStatus : incomingShipmentsByStatus,
daysToInclude: daysToInclude,
tags:productService?.getAllTags()?.sort { it.tag }
tags:tags
]
}

Expand Down
55 changes: 29 additions & 26 deletions grails-app/i18n/messages.properties
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ address.postalCode.label = Postal code
address.country.label = Country
address.description.label = Description

# Admin messages
# Admin messages
admin.applicationVersion.label = Application version
admin.debug.label = Debug Mode
admin.emailEnabled.label = Email enabled
Expand Down Expand Up @@ -73,7 +73,7 @@ auth.userNotFound.message = Unable to authenticate user with
batch.label = Batch


# Breadcrumbs
# Breadcrumbs
breadcrumbs.admin.label = General
breadcrumbs.attribute.label = Products
breadcrumbs.auth.label = Authorization
Expand Down Expand Up @@ -111,7 +111,7 @@ breadcrumbs.transactionEntry.label = Transaction
breadcrumbs.user.label = Persons
breadcrumbs.warehouse.label = Locations

# Category
# Category
category.categories.label = Categories
category.children.label = Children
category.chooseACategory.label = Choose a category...
Expand Down Expand Up @@ -163,7 +163,7 @@ createRequestWorkflow.pickRequestItems.label = Pick inventory items
createRequestWorkflow.showPicklist.label = Print picklist
createRequestWorkflow.confirmPicklist.label = Confirm picklist

# Create Product
# Create Product
createProduct.label = Create New Product

# Create Product from Template
Expand All @@ -174,10 +174,10 @@ createProductFromTemplate.enterDetails.label = Enter product details
createProductFromTemplate.confirmDetails.label = Confirm product details
createProductFromTemplate.showProduct.label = Show product details

# Create Shipment
# Create Shipment
createShipment.label = Create Shipment

# Create Shipment Workflow
# Create Shipment Workflow
createShipmentWorkflow.label = Shipping

# Dashboard messages
Expand All @@ -197,21 +197,21 @@ dashboard.activity.shipped.label = Shipment <a href={0}>{1}</a> was shipped to
dashboard.activity.received.label = Shipment <a href={0}>{1}</a> was received by {3}
dashboard.chooseLocation.label = Choose a location
dashboard.greeting.label = Welcome, <b>{0}</b>!</span> You are logged into the <b>{1}</b> warehouse.
dashboard.incoming.label = Showing receipts between {1} - {2}
dashboard.incoming.pending.label = Receipts pending to {0}
dashboard.incoming.shipped.label = Receipts enroute to {0}
dashboard.incoming.received.label = Receipts received by {0}
dashboard.inbound.label = Inbound receipts created between {1} - {2}
dashboard.inbound.pending.label = Pending to {0}
dashboard.inbound.shipped.label = Enroute to {0}
dashboard.inbound.received.label = Received by {0}
dashboard.label = Dashboard
dashboard.loggedInAs.message = You are logged in as {0}
dashboard.managedRemotely.message = {0} managed remotely
dashboard.noActivityFound.message = No recent activities were found
dashboard.noLocation.message = No locations available
dashboard.notLoggedIn.label = Please <a class="home" href="${createLink(uri: '/auth/login')}">login</a> to gain access</p>
dashboard.noWarehouse.message = No locations available
dashboard.outgoing.label = Showing shipments between {1} - {2}
dashboard.outgoing.pending.label = Shipments pending from {0}
dashboard.outgoing.shipped.label = Shipments sent from {0}
dashboard.outgoing.received.label = Shipments received from {0}
dashboard.outbound.label = Outbound shipments created between {1} - {2}
dashboard.outbound.pending.label = Pending from {0}
dashboard.outbound.shipped.label = Sent from {0}
dashboard.outbound.received.label = Received from {0}
dashboard.requiredActivities.message = No locations have been assigned the supported activities required for access. \
Please add one of the following activities to locations that you want users to be able to access.\
<br/><br/>\
Expand Down Expand Up @@ -371,7 +371,7 @@ default.lastUpdated.year.label = {0} Year(s)

default.layout.label = Layout
default.lbs.label = lbs
default.list.label = {0}
default.list.label = List {0}
default.locale.label = Locale
default.login.label = Login
default.logout.label = Log out
Expand Down Expand Up @@ -520,7 +520,7 @@ document.uploaded.label = Uploaded

documents.label = Documents

# Email
# Email
email.errorReportSubject.message = Error Report
email.errorReportSuccess.message = Your error has been reported to {0}
email.errorReportDisabled.message = The bug reporting system has been disabled. Please contact your system administrator for more information.
Expand Down Expand Up @@ -788,7 +788,7 @@ import.currentQuantity.label = Current quantity
import.preferredForReorder.label = Preferred for reorder


# Import Data Command
# Import Data Command
importDataCommand.type.invalid = Please select a data import type

# Inventory Actions
Expand Down Expand Up @@ -834,7 +834,7 @@ inventory.markAsSupported.label = Mark as supported
inventory.markAsNonInventoried.label = Mark as non-inventoried
inventory.markAsNotSupported.label = Mark as not supported

# Inventory
# Inventory
inventory.addItem.label = Add Item
inventory.addNewInventoryItem.message = Add a new inventory item to proceed.
inventory.addToShipments.label = Add to shipments
Expand Down Expand Up @@ -880,6 +880,7 @@ inventory.filters.label = Filters
inventory.hideUnsupportedProducts.label = Hide unsupported products
inventory.import.label = Import products
inventory.importNow.label = Import now
inventory.inventoryItemSummary.label = Inventory Item Summary
inventory.label = Inventory
inventory.level.label = Inventory level
inventory.looseItems.label = Loose items
Expand All @@ -902,6 +903,7 @@ inventory.notValidXLSFile.message = Please upload a valid XLS
inventory.oldQty.label = Previous Quantity
inventory.onHandQuantity.label = On-Hand
inventory.previousQuantity.label = Previous Quantity
inventory.productSummary.label = Product Summary
inventory.productsWithoutDefaultInventoryItem.label = Products with no default inventory item
inventory.quantity.label = Quantity On Hand
inventory.qtyOnHand.label = Qty On-Hand
Expand Down Expand Up @@ -1049,7 +1051,7 @@ locationGroup.name.label = Name
locationGroup.locations.label = Locations
locationGroups.label = Location groups

# Login
# Login
login.password.label = password
login.username.label = username

Expand Down Expand Up @@ -1365,22 +1367,23 @@ productGroup.addProducts.label = Link to generic product
productGroup.list.label = List generic products


# Receive Order workflow
# Receive Order workflow
productReceived.nullable.orderItems = Product does not exist


# Purchase Order Workflow
# Purchase Order Workflow
purchaseOrderWorkflow.label = Purchase order

# Receipt messages
receipt.actualDeliveryDate.invalid.mustOccurOnOrAfterActualShippingDate = Must occur on or after Actual Shipping Date
receipt.actualDeliveryDate.invalid.mustOccurOnOrBeforeToday = Must occur on or before today
receipt.inventoryItem.invalid = Must reference a valid inventory item

# Receive Order Workflow messages
# Receive Order Workflow messages
receiveOrderWorkflow.label = Receive Order

receiving.label = Receiving
receiving.summary.label = Receiving Summary

# Report messages
report.adjustedInQuantity.label = Adj
Expand Down Expand Up @@ -1716,7 +1719,7 @@ shipper.trackingFormat.label = Tracking Format
shipper.trackingUrl.label = Tracking Url
shippers.label = Shippers

# Shipping
# Shipping
shipping.actualDeliveryDate.label = Actual delivery date
shipping.actualShippingDate.label = Actual shipping date
shipping.add.label = Add a shipment
Expand Down Expand Up @@ -1878,7 +1881,7 @@ shipping.startOver.label = Start over
shipping.statedValue.label = Declared value
shipping.statedValueExplanation.message = The monetary value (USD) to be stated on the Certificate of Donation. Leave blank if none.
shipping.status.label = Status
shipping.summary.label = Shipping summary for {0}
shipping.summary.label = Shipping Summary
shipping.templates.label = Templates
shipping.thereAreNoPendingShipmentsAvailable.message = No pending shipments available.
shipping.to.label = To
Expand Down Expand Up @@ -1910,7 +1913,7 @@ stockCard.qtyReceiving.label = (+) Recv
stockCard.qtyOnHand.label = On Hand
stockCard.qtyAvailable.label = = Available

# Tag messages
# Tag messages
tag.label = Tag
tag.noTags.label = No tags available
tags.label = Tags
Expand Down Expand Up @@ -1973,7 +1976,7 @@ transactions.label = Transactions
transactionEntry.label = Transaction entry
transactionEntry.quantity.invalid = Please enter a valid quantity for item with lot number {0}

# Transaction log labels
# Transaction log labels
transactionLog.from.label = Show transactions
transactionLog.to.label = to
transactionLog.showAll.label = Show all transactions
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -40,10 +40,14 @@ class RequisitionService {
*/

def getRequisitionStatistics(destination, origin) {
return getRequisitionStatistics(destination, origin, null)
return getRequisitionStatistics(destination, origin, null, null, null)
}

def getRequisitionStatistics(destination, origin, user) {
return getRequisitionStatistics(destination, origin, user, null, null)
}

def getRequisitionStatistics(destination, origin, user, start, end) {
def statistics = [:]

def criteria = Requisition.createCriteria()
Expand All @@ -63,6 +67,10 @@ class RequisitionService {
if (destination) eq("destination", destination)
if (origin) eq("origin", origin)
}

if (start || end) {
between("dateCreated", start, end)
}
//if (user) {
// or {
// eq("createdBy", user)
Expand Down Expand Up @@ -167,6 +175,11 @@ class RequisitionService {
* @return
*/
def getRequisitions(Requisition requisition, Map params) {
return getRequisitions(requisition, null, null, params)
}


def getRequisitions(Requisition requisition, Date dateCreatedFrom, Date dateCreatedTo, Map params) {
println "Get requisitions: " + params

//def getRequisitions(Location destination, Location origin, User createdBy, RequisitionType requisitionType, RequisitionStatus status, CommodityClass commodityClass, String query, Map params) {
Expand Down Expand Up @@ -194,7 +207,9 @@ class RequisitionService {
if (params.commodityClassIsNull) {
isNull("commodityClass")
}

if (dateCreatedFrom && dateCreatedTo) {
between("dateCreated", dateCreatedFrom, dateCreatedTo)
}
if (requisition.destination) {
eq("destination", requisition.destination)
}
Expand Down
Loading