Document is stuck in fulfillment or saying it is posted when it is not

 

Run script below

 

select PSTGSTUS, BCHSOURC, VOIDSTTS, TRXSORCE, SOPNUMBE, DEX_ROW_ID FROM SOP10100 WHERE SOPNUMBE = 'XXX'

 xxx is the document number

The correct values should be:

PSTGSTUS (For an unposted document, it should read "0.")
BCHSOURC (For an unposted document, it should read "Sales Entry.")
VOIDSTTS (For an unposted document, it should read "0.")
TRXSORCE (For an unposted document, it should be blank.)

 

If any of these are different, you need to update the values, XXX is document number

 

Update SOP10100 set BCHSOURC = 'Sales Entry' where SOPNUMBE = 'XXX'

 

This is an example of updating Sales Entry.  If the BCHSOURC has an asterisk or two beside Sales Entry you need to update it to Sales Entry.  More info at link:

https://support.microsoft.com/en-us/help/2433102/error-message-when-you-try-to-enter-an-unposted-sales-document-in-the