[PPT] Changes on uspCTReceived to Support Logistics Drop Shipment

Issue No: CT-4613
Created 4/6/2020 10:11:10 AM
Type Integration
Priority Critical
Status Closed
Resolution Fixed
Fixed Version 20.1
Description This issue relates to i21 Help Desk ticket. Click the link below to go to Help Desk ticket.   [HDTN-243169 - Risk Summary Table & Report Refactoring|https://helpdesk.irely.com/iRelyi21live//#/HD/Ticket/?ticket=HDTN-243169]     Overview:   * Drop Ship is a transaction where in a Purchase Contract is associated to a Sales Contract, the items are shipped directly from the Vendor to the Customer without the company having to receive any physical stock. * In the case of Inbound Shipment, the updating of Contract Balance is done upon posting the Inventory Receipt. Since Drop Ship does not create an Inventory Receipt, it needs to update the Purchase Contract Balance immediately upon posting the Drop Ship itself.     Proposed Solution:   Logistics need the following changes on *uspCTReceived* in order to support Drop Ship. We chose to reuse this SP for two reasons 1) so that the updating of contract balance is centralized, 2) there is a similar change already done on sales counterpart of this procedure uspCTShipped   * Set @strScreenName to Load Schedule if @intSourceType is -1 (this is the same thing done on uspCTShipped) !pastedImage_d132719_0.png|height=72,width=394! * Condition to not update the @intInventoryReceiptId if the @intSourceType is from drop ship. We will be passing the tblLGLoadDetail.intLoadDetailId as the @intExternalId for uspCTUpdateSequenceBalance !pastedImage_d132719_1.png|height=38,width=1354! * Add -1 to the @intSourceType that will call uspCTUpdateScheduleQuantity !pastedImage_d132719_2.png|height=258,width=802!   I have attached the complete script ( *uspCTReceived_For_DropShip.sql* ) with these changes. This has been tested locally and has proved to work for all Drop Ship operations: Posting, Unposting, and Cancelling (Reversal PPT) (see attached image). These changes are necessary for LG-2592 to work, please review the script and let us know if you have any concern.