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
0
Comments
http://www.BiloBeauty.com
http://www.autismspeaks.org
SalesHeader."Due Date" := CalcDate(PaymentTerms."Due Date Calculation" ,SalesHeader."Document Date" );
Independent Consultant/Developer
blog: https://dynamicsuser.net/nav/b/ara3n