We are running Dynamics SL 7.0 SP1 and feature pack. When printing checks from AP every once in a while it skips a check number. Today while printing a batch of 61 checks it just skipped a number in the middle of the print resulting in half of the vendors checks with the wrong check numbers in the dynamics check register.
This is caused by a vendor that has the Separate Check option selected in Vendor Maintenance and the vendor has only a debit adjustment that is unpaid. The system selects the AD for payment but can't cut a negative check. So this item gets stuck and causes the system to skip check numbers and create a problem for the other checks in the batch.
This is due to bug 19556 which is corrected in SL 2011 SP1. The workaround is to execute the script below on the application database. This will prevent the issue in the future until you upgrade. You should run select statements on the APcheck and APcheckdet tables to make sure a record isn't sitting in one of the tables for this vendor with the single AD outstanding. If there are no check batches currently in process, there should be no records in either of those tables.
Below is the script to run in SQL Server Management Studio to prevent further occurences.
set ANSI_NULLS ON
set QUOTED_IDENTIFIER ON
/****** Object: Stored Procedure dbo.FindLastAPCheck Script Date: 4/7/98 12:19:55 PM ******/
ALTER Procedure [dbo].[FindLastAPCheck] @parm1 varchar ( 10), @parm2 varchar ( 24) As
-- temp fix for MBS bug 10339
update apcheck set checklines = (select count(*) from apcheckdet where apcheck.checkrefnbr=apcheckdet.checkrefnbr) from apcheck
delete from apcheck where checkrefnbr not in (select distinct checkrefnbr from apcheckdet)
Select ISNULL(MAX(refnbr) ,'0')
FROM APDoc a (NOLOCK)
Where a.DocClass = 'C'
AND a.Acct = @parm1
AND a.Sub = @parm2
(a.DocType in ('CK', 'MC', 'SC', 'ZC')
((a.DocType = 'VC')
AND NOT EXISTS (SELECT 1 FROM APDoc b (NOLOCK) WHERE a.refnbr = b.refnbr AND a.VendId = b.VendId and a.Acct = b.Acct and a.Sub = b.Sub and b.DocType = 'HC')))
Please let me know if you need additional assistance.
Technical Support Engineer
**This posting is provided "AS IS" with no warranties and confers no rights.
We are experiencing this problem in Dynamics SL 2011 FP1. In a batch of 30 checks, a block of 10 check numbers were skipped over.
SELECT * from apcheck where checkrefnbr not in (select distinct checkrefnbr from apcheckdet)
returns no records.
The big select statement with our Acct and Sub substituted for parm1 and parm2 references a subsequent batch.
Are you saying that those 10 check numbers were used by another check batch? If so, then that is why the check printing process skipped them since they were already used. Or did I misunderstand your reply?