Batch is currently being posted, sometimes you will get this error when you are calling the eConnect method taRMCashReceiptInsert.
This issue could occur if you’re trying to create a cash receipt document and you have assigned this cash receipt to a receivable batch is currently being posted. To a void such kind of errors you need to be sure the batch number not been selected to be posted.
To check the posting status you can use call the following query before calling the taRMCashReceiptInsert method. If the @BATCHSTATUS=1 this mean the specified batch is currently being posted so you should use another batch number.
if (exists(select 1 from SY00500 (nolock) where BACHNUMB = @BACHNUMB and MKDTOPST <> 0 and BCHSOURC = @BCHSOURC))
begin
/* The Batch (BACHNUMB) is currently being posted */
SET @BATCHSTATUS = 1
end
No comments:
Post a Comment