Posted 5/12/2009 3:44:54 PM
|
|
|
|
| A customer of ours just encoutered a problem while trying to post an invoice using the 5.3.1 version. After further investing, I found that if an invoice had anything in the Other field, you will receive the following error: 
After researching I found there is missing logic in the PostCustomerInvoice Stored procedure. Its missing the logic that adds the other amount into the JournalDetail table. If you add the logic between the two comments to this stored procedure, the problem will be fixed (should start around line number 765): ----record accounts receivables: debit side***/
INSERT INTO [#accountingJournalDetail] ( [batchCode],[journalCode],[journalReference],[journalDate],[journalType], [lineReferenceCode1],[lineReferenceCode2],[lineReferenceCode3],[lineReferenceCode4], [customerCode],[vendorCode],[purchaseReceiptCode],[billCode], [accountCode], [taxType],[taxCode], [itemCode],[warehouseCode],[salesInvoiceCode],[journalCodeReference],[journalLineNumReference], [detailDescription], [debit],[credit], [currencyCode],[exchangeRate], [debitRate],[creditRate], [userCreated],[dateCreated],[userModified],[dateModified],[userCode], [accountLineType], [isCOGS],[isReverse]) SELECT @batchCode,[invoiceCode],[invoiceCode],[invoiceDate],[type], [customerCode],'','','', [customerCode],'','','', [arAccountCode], 'NA','', '','',[invoiceCode],[invoicecode],'', [invoiceCode]+'/'+[customerCode] + CASE WHEN [isBatch] = 1 THEN '/Batch Invoice' + ISNULL('/'+[poCode],'') + ISNULL('/'+[salesRepOrderCode],'') ELSE '' END, [total],NULL, [currencyCode],[exchangeRate], [totalRate],NULL, @userCode,@today,@userCode,@today,@userCode, 'AR ACCOUNT CODE', 0,0 FROM [#customerInvoice]-- Added the following logic to solve invoice posting bug
UNION ALL SELECT @batchCode,[invoiceCode],[invoiceCode],[invoiceDate],[type], [customerCode],[invoiceCode],'','', [customerCode],'','','', [otherAccountCode], 'Output Goods',[otherTaxCode], '','',[invoiceCode],[invoiceCode],'', [invoiceCode]+'/'+[customerCode]+'/Other', NULL,[other], [currencyCode],[exchangeRate], NULL,[otherRate], @userCode,@today,@userCode,@today,@userCode, 'OTHER SALES ACCOUNT CODE', 0,0 FROM [#customerInvoice] -- End the bug fixUNION ALL SELECT @batchCode,[invoiceCode],[invoiceCode],[invoiceDate],[type], [customerCode],[invoiceCode],'','', [customerCode],'','','', [freightAccountCode], 'Output Goods',[freightTaxCode], '','',[invoiceCode],[invoiceCode],'', [invoiceCode]+'/'+[customerCode]+'/Freight', NULL,[freight], [currencyCode],[exchangeRate], NULL,[freightRate], @userCode,@today,@userCode,@today,@userCode, 'FREIGHT ACCOUNT CODE', 0,0 FROM [#customerInvoice]
BJ Dimes Software Development & Support Engineer DimeSoft Business Solutions, Inc. Interprise Suite Plugins Interprise Suite Blog
|
|
Posted 5/13/2009 9:16:10 AM
|
|
|
|
Hi Bill,
Is this the type of "correction" that only users with the souce code could have changed to make it right?
|
|
Posted 5/13/2009 10:28:54 AM
|
|
|
|
| Steve, You should be able to make the change without any problems. This change is in a Stored Procedure in your IS SQL Database. The Stored Procedure is called PostCustomerInvoice. All you need to do is modify that Stored Procedure, add the missing code, and execute the Modified Script. This will update your database. If you have more than one company, then change the database to your other company and run it for that one as well. Remember that this fix are for people running the 5.3.1 Version Only.
BJ Dimes Software Development & Support Engineer DimeSoft Business Solutions, Inc. Interprise Suite Plugins Interprise Suite Blog
|
|
|
|