Dunning Invoice Number Proposal

Compusoft AS have set up Dunning and are sending dunning letters which have been customised. They would now like to change the Invoice Number that is sent on the custom dunning letters.

Requirement 

The requirement is to populate the Invoice Number on the Dunning letter. If the Subsidiary is running on the legacy system , then invoice number in the Dunning letter should be External Id. And if the Subsidiary is running on NS auto-generated numbering, then the invoice number in the Dunning letter should be an auto-generated NS invoice number which is the Tran ID/Document Number. Effectively for the older invoice, the invoice number for the dunning letter is external id and for the newer invoice, the invoice number is auto-generated  NS invoice number.

Our Solution

A checkbox needs to be created on the Subsidiary record. The field denotes the subsidiary is running its numbering from the Legacy system or from NetSuite. This field will be called “NS Invoice Numbering”.

A free form text field will be created on the Invoice record to store the invoice number in the Dunning letters. The field name of this field should be  “Display Invoice Number”. 

The User Event script should be created/developed for populating the value in the Display Invoice Number. The script runs only on the invoice creation. The script will store the value in the mentioned field based on the following conditions:

  • The field NS Invoice Numbering on the subsidiary record = F, then this subsidiary is running on the legacy system – the Display Invoice Number should be populated from the External ID.
  • If the field NS Invoice Numbering on the subsidiary record = T, then this Subsidiary is running on NS auto-generated numbering and the Display Invoice Number field should be populated with the auto-generated NS invoice number which is the Tran ID/Document Number.

Once the invoice is saved, then stored value in the  Display Invoice Number field will not be changed/overwritten. 

If the field NS Invoice Numbering on the subsidiary record is changed to True, then only new invoices should have the NS auto-generated number. The script should not backdate and update old invoices to change the display invoice number to the NS auto-generated number. It should only run on original invoice creation.

The Dunning letter should be updated based on the Display Invoice Number field. The Dunning Letter will reference the new “Display Invoice Number” field – marked by the red box below – instead of the NetSuite Invoice number field.

Effectively, the Display Invoice Number field will be the new source for the Invoice Number in the Dunning Letter.

Assumptions

  • The script will work only for the future invoices, it won’t update the already existing invoices. 
  • The Dunning letter is already implemented and only the update is required.
  • We are assuming that the external id will be available for all the legacy invoices, if no external id is present we will set it as null in the Display Invoice Number and then to the Dunning letter.
  • The script should work only on the creation of the invoice.
  • The Display Invoice Number can be disabled so the user has no option to change/update the  Display Invoice Number
  • We will be implementing the changes in the SB2 only.

Total Efforts: 9hrs

Leave a comment

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