Ok,
 
 Well let me go into further detail and see if that helps clear things up. But first thank you so much for the reply!
 
Ok, so we get a file in, an 820 NACHA CTX file, that contains data. I have X++ code that will process this file, and get it ready for use. At this point, I want to take the given Invoice number supplied by the file, and then Settle that Invoice, or apply the payment that they have included for the Invoice. I know this is done through Payment Journals.
 
So there it is. Now you talk about STD import?? I am not sure what you mean by that. And the code you sent me, I am sorry but it's just not clear to me how I could use this code for creating a Payment Journal, setting the Amount for the Payment Journal, in the Lines section, and then selecting a Sales Order for Settlement against the amount.
 
Again thanks for any and all help!
 
-Thanks,
Brandon


From: Axapta-Knowledge-Village@yahoogroups.com [mailto:[EMAIL PROTECTED] On Behalf Of Jason Crook
Sent: Thursday, September 08, 2005 8:08 AM
To: Axapta-Knowledge-Village@yahoogroups.com
Subject: RE: [Axapta-Knowledge-Village] Settling Invoices through code

Sorry never read the full question,That's Just For Settling ,For creating the Journal ,you could probably get away with just using the STD Import Functionality

From: Axapta-Knowledge-Village@yahoogroups.com [mailto:[EMAIL PROTECTED] On Behalf Of Jason Crook
Sent: 08 September 2005 01:52 PM
To: Axapta-Knowledge-Village@yahoogroups.com
Subject: RE: [Axapta-Knowledge-Village] Settling Invoices through code

Hi
 
Read Through this You could probably put something similar before the super on the Post Button of the Journal,that way Linking the Journal lines to the Open Transactions And then when you post it will do the rest for you. I.e.)This code will do pretty much the same thing as as when you create the payment Proposal.
This not the code you should use although it should give you a good idea.This code is used when I am coming from the sales order side and creating a payment Automatically .
 
ttsbegin;
               While
               SELECT _CustTransOpen
               WHERE  _CustTransOpen.AccountNum == _salestable.CustAccount
               JOIN   _CustTrans
               WHERE  _CustTransOpen.RefRecId   == _CustTrans.RecId
                  &&  _CustTrans.Invoice        == _Salestable.SalesId
                    {    While Select * From LedgerJournalTrans
                         Where LedgerJournalTrans.JournalNum == ledgerjournaltable.JournalNum
                          { _SpecTrans.initValue();
                            _SpecTrans.SpecTableId = Tablenum(LedgerjournalTrans);
                            _SpecTrans.LineNum     = 1;
                            _SpecTrans.Balance01   = -LedgerJournalTrans.amount();
                            _SpecTrans.Code        = _salestable.CurrencyCode;
                            _SpecTrans.RefId       = _CustTransOpen.RecId;
                            _SpecTrans.SpecRecId   = LedgerJournalTrans.RecId;
                            _SpecTrans.insert();
                          }
                    }
 ttscommit;
 
Hope it Helps ,let me know if you require more.

Regards

Jason Crook
Financial Systems Consultant
Exordia(A Division Of PricewaterhouseCoopers)
Tel     : (011)797-4782
Fax    : (011)209-4782
Cel     : 082 887 0914
e-mail : [EMAIL PROTECTED]

 


From: Axapta-Knowledge-Village@yahoogroups.com [mailto:[EMAIL PROTECTED] On Behalf Of Brandon George
Sent: 08 September 2005 01:37 PM
To: Axapta-Knowledge-Village@yahoogroups.com
Subject: RE: [Axapta-Knowledge-Village] Settling Invoices through code

So has anyone ever through code created a payment Journal, and settled an Invoice? Is there any examples of this anywhere?
 
thanks in Advance,
Brandon


From: Brandon George [mailto:[EMAIL PROTECTED]
Sent: Wednesday, September 07, 2005 3:22 PM
To: 'Axapta-Knowledge-Village@yahoogroups.com'
Subject: [Axapta-Knowledge-Village] Settling Invoices through code

I have a question. Does anyone have any code examples of Settling an Invoice through code?
 
Does anyone know what all tables need to be updated? and If there is a class that I can use to settle an Invoice? I am sure it has something to do with creating a Payment Journal. You see we are automating this process for one of our big customer whom we participate in EDI with.
 
They send us a EFT for money, and also a File that contains what Invoices, etc. was paid with the given EFT transfer. Does anyone have any experience, through code, settling an Invoice and creating a Payment Journal Programmatically?
 
thanks,
Brandon


Sharing the knowledge on Axapta.



YAHOO! GROUPS LINKS




Reply via email to