add "recalculate" function to storage stored procedure

Issue No: GRN-271
Created 11/23/2015 11:51:12 AM
Type Feature
Priority Major
Status Closed
Resolution Fixed
Fixed Version 16.1
Description if process type = recalculate   So we need to update the parm to split out the process type   We need a new flag for estimate, update or bill. the idea is I can call with a calculate     Store must accept (new) see 1, 2 and 4   # process type ## calculate - use existing process as done today. ## recalculate - means to remove the last accrual date and storage due amount and then recalculate it from the new schedule or against the exsiting schedule (to fix error or get updates to schedule applied) ## test - this is currently unique to storage schedule maintenance since in this case the current record gives us the schedule to use and no storage record key will be passed. # Update type ## estimate - only returns the values, but does not update storage record ## accrue - will calculate storage like calculate and return values plus add new storage charges to the storage due field in storage record and create history of the transaction. ## Bill – does both calculate and accrue process plus will update storage paid for the difference of existing storage paid and storage due. NOTE: the calling programs will create the invoice or line items to process the amount. # Key storage record of record to calculate on. # Override Delivery Date (not used unless test, mantitory when test) # Override Storage Schedule (manditory when test otherwise optional, if not suppplied, uses one from storage record, must be valid) # Override Storage Units (manditory when test otherwise optional, mainly used for test process type) if null or 0, use storage record. # Date to calculate storage end date. # User ID signed in to the system.   another parm may be needed now when estimate or recalculate, we should be able to pass a new storage schedule (select from existing valid ones)   We will zero out the storage due side, reset the last accural to null and then calculate using the current storage charges using the current schedule (or passed one).   the important part on recalcuately is you DO NOT change storage paid at all. If they have already paid anything then it must be left. If we do this as a bill (new flag type) recalculate then we will create teh invoice for the differnence in paid and new due.