Hello.
I cannot get payment schedules to work when paying [ad hoc] vendor invoices. We are using AX only for Accounts Payable and General Ledger functions. We have AX 2009 (5.0.10000.52). Our system has been modified very little as it's brand new, and I cannot get this to work even with the MS test company.
Here is my testing process:
In AP, I go into Invoice Journal. I create a new journal for a vendor, enter an invoice with the amount in the credit field. I pick an offset account.
For document date, I pick today. For terms, I enter my equal pay terms, code AP-PN. My intent for this code is 2 equal payments, one 30 days out and the second 60 days out. The due date gets automatically set to 30 days out, which from what I've read should be the first installment and is correct. I then post my invoice journal.
Terms AP-PN is setup as follows: Payment method: Net. Months: 1. Days: 0. Payment schedule: AP-02-EQUAL. Payment day and type are not defined. Certified company check is unchecked and credit check is Normal.
Payment schedule AP-02-EQUAL is setup as follows: Allocation: Fixed Quantity. Payment per: Months. Change: 1. Number of payments: 2. Minimum: 0.00. Sales tax allocation: Proportionally. No payment lines or notes.
Next I go into the Payments Journal. Create a new journal with our journal name of type "Vendor disbursement" and create a new proposal. Selecting my vendor, I pick a date range for the date 30 days out. AX finds a payment for the FULL invoice amount, and not half like it should.
***
Does anyone have any ideas on what I should be looking for?
After many hours of digging, I have concluded that the payment schedule is determined at the initial posting, and I should see more than one row in table VendTransOpen for my invoice. I see code for selecting a payment schedule in CustVendVoucher.post() and acting on it if found. I believe this selects the VendPaymSched table in my case (a vendor payment), but this table is empty. Should this table be populating?
I appreciate any help or pointers you can give no matter how small.
Thanks in advance,
Nathan
PS here is the section was referencing in CustVendVoucher.post(). The select always comes back with no data:
if (custVendInvoiceJour)
{
select firstonly custVendPaymSched
where custVendPaymSched.ExtTableId == custVendInvoiceJour.TableId &&
custVendPaymSched.ExtRecId == custVendInvoiceJour.RecId &&
custVendPaymSched.Name == custVendInvoiceJour.PaymentSched;
}
//if there is a schedule and there are any amounts to split
if (custVendPaymSched && (custVendTrans.AmountCur || custVendTrans.AmountMST))
{
paymSchedCalc = PaymSchedCalc::construct(custVendPaymSched, custVendPaymSchedLine);
if (custVendInvoiceJour)
{
paymSchedCalc.initFromCustVendInvoiceJour(custVendInvoiceJour);
}
paymSchedCalc.createCustVendTransaction(custVendTrans, exchRate);
}
else
{
... /* insert the one transaction */ ...
}