RESOLVED - THANKS! Dataport - Invoice Due Date Calculations

afzal_baigafzal_baig Member Posts: 10
Hello there,

I need help to calculate "due date" in the sales invoice header (I have dataport brining invoices). I thought, Navision can take 30D and add invoice date for getting "due date". Here is the code, but error returns due to text + date calculations is not valid:

PaymentTermsCode := SalesHeader."Payment Terms Code";
PaymentTerms.SETRANGE(Code,PaymentTermsCode);
IF PaymentTerms.FIND('-') THEN
SalesHeader."Due Date" := CalcDate(PaymentTerms."Due Date Calculation" + SalesHeader."Document Date" );

I appreciate if someone can help me how can I add Invoice Date and number of days (30D or 15D) from Payment Terms table e.g. 12/28/2006 + 30D = 1/27/2007

Thank you.
Best regards,
Afzal

Comments

Sign In or Register to comment.