Fiscal Year period is missing the ending time.

Issue No: GL-9398
Created 8/10/2022 7:37:06 AM
Type Bug
Priority Critical
Status Closed
Resolution Fixed
Fixed Version 21.2
Description *This issue relates to i21 Help Desk ticket:* [ HDTN-277364 - UAP automation run on Pri Mar Petroleum Inc & Update 01 to 21.2.0901.604 or above|https://helpdesk.irely.com/iRelyi21live/#/HD/Ticket/?ticket=HDTN-277364]   *This issue relates to i21 Help Desk ticket:* [ HDTN-277177 - Error on Inventory Rebuild|https://helpdesk.irely.com/iRelyi21live/#/HD/Ticket/?ticket=HDTN-277177]   *This issue relates to i21 Help Desk ticket:* [ HDTN-276101 - INVRCT-6327 throwing error on rebuild|https://helpdesk.irely.com/iRelyi21live/#/HD/Ticket/?ticket=HDTN-276101]     +Steps:+   1. General Ledger > Fiscal Year   2. Create New Fiscal Year - 2023   3. Click Save button   4. Close Fiscal Period - August 2022   * Purchasing = Closed   5. Check the dtmEndate in sql     +Issue+:   When rebuilding inventory from July 2nd, Warning received:   !https://helpdesk.irely.com/iRelyi21live/Export/CRM/518d66a1-d58d-4db3-b6a6-7b129c242289.png|width=448!   The Freight Surcharge and Freight components for one product 3e-No Lead Ethanol is the total of the warning   amount $462.08 ($323.13 + $138.95)     *Investigation Result from IC-10602:*   Inspect tblGLFiscalYearPeriod records to check why *fnGLGetFiscalPeriod* is returning a blank result. It looks like it happens because the *dtmEndDate* is missing the time. It should end as 23:59:59.000. This is why only end of month transactions like 07/31/2022 are missing the GL entries.   !pastedImage_d192501_1.jpg!     The fn, fnGLGetFiscalPeriod, is used in uspGLBookGLEntries. If the fn does _not_return a result, it will not insert the records from @GLEntries into tblGLDetail.     !pastedImage_d192501_2.png|height=319,width=744!     The bad part is that it happened after the validation. Records @GLEntries are balanced against the valuation in the validation. The CROSS APPLY in the fn caused it not to insert into tblGLDetail.   !pastedImage_d192501_3.png|height=523,width=697!     +Acceptance+: dtmEndate It should end as 23:59:59.000.