Due Date Calculation

Hi everybody, Im new to Axapta, and I would like to ask anyone who knows where I can find the code to calculate due date based on the payment terms. Any hint will be greatly appreciated. Thanks. m_quial

Due = PaymTerm::find(PaymentTerm).due(documentDate); in my codes, I have PaymentTerm from LedgerJournalTrans and DocumentDate from LedgerJournalTrans also… Due date is calculated based on document date (not transaction date) and payment term (e.g. N30), and my payment term is setup via AP or AR module to specify which payment term code has what kind of settings (e.g. N30 for Net 30 days). System is smart in calculating the due date correctly if specify the setting correctly.