Source the date formula to the PDF template field value

J& Have already created a PO PDF Template. Please add the below updates in the template

  • The ‘terms & conditions’ and Delivery terms are added as a custom field in the purchase order form(defaulting a static value in the field). In the template, these values are sourced so that the user can update the values for each PO record.
  • Create a new field in the purchase order to enter the days. In the delivery terms field value, a date should be populated based on this number of days. Currently, the Delivery Terms is a Rich Text type field.

The date should be today’s date + the number of days in that custom field

  • The ship To field in the template needs to be an editable field. Currently, the ‘Ship To’ value is hardcoded in the template. There should be a field in the purchase order with the default value as the current value. Check the possibility to have a standard Ship To field or a custom field

Solution:

Checked the feasibility of sourced the date value We have adjusted the purchase order form to incorporate fields for “Delivery Terms” by using Netsuite default value formula. 

' 1. Delivery:


2. Notwithstanding any other conditions in the quotation or this PO Service shall be commenced on or before ' || TO_CHAR({trandate}, 'DD.MM.YYYY') || '


3. This PO is valid till ' || 
TO_CHAR({trandate} + 
    CASE 
        WHEN NVL({custbody_jj_number_of_days}, 30) IS NOT NULL THEN NVL({custbody_jj_number_of_days}, 30)
        ELSE 30
    END, 'DD.MM.YYYY') || ' and Acsia Technologies Pvt Ltd reserves the right to cancel this PO without further notice in case the supplier fails to adhere to the terms stipulated in the PO.' || 
CASE 
    WHEN TO_NUMBER(TO_CHAR(SYSDATE, 'YYYY')) <= TO_NUMBER(TO_CHAR({trandate}, 'YYYY')) THEN
        ''
    WHEN TO_NUMBER(TO_CHAR(SYSDATE, 'YYYY')) > TO_NUMBER(TO_CHAR({trandate}, 'YYYY')) THEN
        'Delivery:'
END

Leave a comment

Your email address will not be published. Required fields are marked *