Hello All,
I am attempting to build a plugin that will modify the payment schedule of an AR Invoice. I am having an issue when i am attempting to insert the records into the system using the XAPI.
Here is a sample of my code;
this fails with the following error;
I am attempting to build a plugin that will modify the payment schedule of an AR Invoice. I am having an issue when i am attempting to insert the records into the system using the XAPI.
Here is a sample of my code;
Code:
PaymentSchedule.Init();
PaymentSchedule.RecordGenerate(false);
PaymentSchedule.Fields.Item("CNTBTCH").Value = pmt.BatchNumber;
PaymentSchedule.Fields.Item("CNTITEM").Value = pmt.EntryNumber;
// I also tried assigning this to 1 > than max existing id
PaymentSchedule.Fields.Item("CNTPAYM").Value = -1;
PaymentSchedule.Fields.Item("DATEDUE").Value = pmt.DueDate;
PaymentSchedule.Fields.Item("AMTDUE").Value = pmt.AmountDue;
PaymentSchedule.Fields.Item("DATEDISC").Value = 0; // For testing only
PaymentSchedule.Fields.Item("AMTDISC").Value = 0;// For testing only
PaymentSchedule.Fields.Item("AMTDUEHC").Value = 0;// For testing only
PaymentSchedule.Fields.Item("AMTDISCHC").Value = 0;// For testing only
PaymentSchedule.Verify();
PaymentSchedule.Process();
PaymentSchedule.Insert();
this fails with the following error;
Code:
Internal error. ARIBS: Explicit compositions are required. (1580 ARIBS1.C).