4Site
Support Request System
View Patch #50.012.014
Description
Patch ID:
Date Implemented:
Patch Title:
Patch Type:
Request IDs:
Bug
Enhancement
Other
02227 -
Receipt Post still gets error duplicate sreqlines
02200 -
Can't post a receipt - duplicate index on sreqline error
Symptoms:
This was caused by patch 5.12.5 which fixed only part of the original duplicate sreqline problem. If the user doesn't receive all the PO lines the receipt post still gets the error 'duplicate sreqlines' if it tries to create expensed GST tax lines.
Solution:
Originally I used iSreqLineCnt which was the count of the number of lines created but as it turns out it wasn't a good choice for receipt line number. The rcline.line = poline.line = sreqline.line. So you don't necessarily have consecutive line numbers on the receipt line and sreqline but they are equal. The tax lines come at the end. What happened was line 2 was received so it created sreqline 2. But iSreqLineCnt = 1. So when it added the tax lines it added as iSreqLineCnt + 1 (or line 2) which was a duplicate. Now, I added a new variable, iLastRctLineNumber, to store the receipt line number as each line was written to sreqline. When the tax lines are created it starts the tax lines from iLastRctLineNumber + 1. It increases by 1 for each tax line required.
Browse Patches
Find a Patch
Return to Request System Menu