Invoice Will Not Post if Any Amount in Other Field
Interprise Suite Community
 Home          Members     Calendar     Who's On

Welcome Guest ( Login | Register )
        



Invoice Will Not Post if Any Amount in Other... Expand / Collapse
Message
Posted 5/12/2009 3:44:54 PM Post #83
 

Forum MemberForum MemberForum MemberForum MemberForum MemberForum MemberForum MemberForum Member
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 fix

UNION 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 Post #85
 

Forum NewbieForum NewbieForum NewbieForum NewbieForum NewbieForum NewbieForum NewbieForum Newbie
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 Post #86
 

Forum MemberForum MemberForum MemberForum MemberForum MemberForum MemberForum MemberForum Member
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

« Prev Topic | Next Topic »


Reading This Topic Expand / Collapse
Active Users: 0 (0 guests, 0 members, 0 anonymous members)
No members currently viewing this topic.
Forum Moderators: Bill Dimes, John Grande, BJ Dimes, Terry Palmer

Permissions Expand / Collapse

All times are GMT -8:00, Time now is 6:53pm

Powered By InstantForum.NET v4.1.4 © 2012
Execution: 0.063. 10 queries. Compression Disabled.
Email Newsletter icon, E-mail Newsletter icon, Email List icon, E-mail List icon Sign up for our Email Newsletter

Links to our Sponsors

DimeSoft Business Solutions Logo Interprise Suite Plugins Logo Logo Ad

Recent DimeSoft Blog Posts

Recent InfoSourcing Blog Posts

Recent Premier Blog Posts