cancel
Showing results for 
Search instead for 
Did you mean: 

How to generate automatically supplier invoice schedule items ?

Pecoros
Explorer
0 Kudos

We try to generate automatically on some conditions some invoice schedule items.

All concerned objects seems to be released for development. Nevertheless, only PaymentSchedule works on the create method.

Can you please give us the sequence to create object ?

We've made many tries on different sequences of objects (from root to leaf or the opposite), but we always have an error on the PaymentSchedule.Item creation.

Herre is a exemple / Extract of code on modify event on the root supplier invoice with some comments on where it dumps:

...

var Payment_NodeData : elementsof this.PaymentSchedule;

var Item_NodeData : elementsof this.PaymentSchedule.Item;

var line_NodeData : elementsof this.PaymentSchedule.Item.GetFirst().ItemScheduleLine;

//SupplierInvoice_NodeData.AccountsPayableDueItemTypeCode.content = "AP020";

line_NodeData.Amount.content = 120000;

line_NodeData.Percent = 100 ;

var date = Library::Date.ParseFromString("20300215");

line_NodeData.ProposedPaymentDate = date;

line_NodeData.TypeCode = "1";

//this creation works :

this.PaymentSchedule.Create(Payment_NodeData);

//this one does not work :

this.PaymentScheduleItem.Create();

//this one does not work :

this.PaymentScheduleItem.ItemScheduleLine.Create(line_NodeData);

Accepted Solutions (0)

Answers (1)

Answers (1)

joelchavez
Discoverer
0 Kudos

Greetings, did you manage to solve this point?