roberthyndman 5/3/2021 6:49:41 PM

taIVTransactionLotInsert bug??

Hi all, 

When I am using the transaction lot insert proc for negative variance the DATERECD seems to get ignored and therefore the correct lot is not assigned because the DATERECD and DTSEQNUM is not picked up from the lot master.  Note that there is no DTSEQNUM in this node.

execute taIVTransactionLotInsert

@I_vIVDOCNBR=@ivNumber,
@I_vIVDOCTYP=@docType,
@I_vITEMNMBR=@ItemNumber,
@I_vLOTNUMBR=@lotNumber,
@I_vLNSEQNBR=@lineSeq,
@I_vSERLTQTY=@useQty,
@I_vBIN=@bin,
@I_vLOCNCODE=@locnCode,
@I_vDATERECD=@lotDateReceived,
@O_iErrorState=@O_iErrorState OUTPUT,
@oErrString=@oErrString OUTPUT

Note that no errors are returned, the transaction is created fine, however cannot post as it says the lot number does not exist due to the lack of association already mentioned.

This now has me doing my own association to update the line record and lot master....

--update lot entries to match
-----------------------------------------------------------------------------------------------------
update IV10002 set DATERECD=@lotdatereceived, DTSEQNUM=@lotseq  where 
IVDOCNBR=@sIVNumber and IVDOCTYP=@doctype and LNSEQNBR=@LineSeq 

update IV00300 set ATYALLOC=ATYALLOC+@useQty where
LOTNUMBR=@lotnumber and ITEMNMBR= @ItemNumber and DATERECD=@lotdatereceived and DTSEQNUM=@lotseq and LOCNCODE=@LocnCode

set @lotsoldcheck=(select QTYRECVD-(QTYSOLD+ATYALLOC) from IV00300 where 
LOTNUMBR=@lotnumber and ITEMNMBR=@ItemNumber and DATERECD=@lotdatereceived and DTSEQNUM=@lotseq and LOCNCODE=@LocnCode)
if @lotsoldcheck=0 
begin
update IV00300 set LTNUMSLD=1 where LOTNUMBR=@lotnumber and ITEMNMBR=@ItemNumber and DATERECD=@lotdatereceived and DTSEQNUM=@lotseq and LOCNCODE=@LocnCode
end
-----------------------------------------------------------------------------------------------------

I am using GP 18.00.0438 and wondering if anyone else has this issue or is it a bug or has it been fixed in later updates or is it just me doing this incorrectly?

 

Cheers

 

 

 

Version: All
Section: Dynamics GP, eConnect, SQL Scripts


Table Definition Quick Links
All Tables
SOP Tables
RM Tables
GL Tables
POP Tables
HR Tables
PM Tables
UPR Tables
IV Tables
Olympic Tables
3