Jump to content

Need HELP to create InvoiceCreationPreEmail Hook for setting DUE DATES based on NET15


Anto.EgoX

Recommended Posts

Hi,

 

I am trying to create a InvoiceCreationPreEmail Hook only for ANNUAL / BIENNIAL / TRIENNIAL Billing Cycle Invoices to set a Due Date as per NET15 Payment model.

 

https://en.wikipedia.org/wiki/Net_D

 

As soon as an Invoice is created for Customers, this InvoiceCreationPreEmail should function as:

 

1) Check Invoice Items Billing Cycle

2) If Billing is MONTHLY / QUARTERLY / SEMI-ANNUALLY, then it should go with WHMCS Automatic System Configuration (for Invoicing and Payment) as defined.

3) If Billing is done ANNUALLY / BIENNIALLY / TRIENNIALLY, then it should set the DUE DATE as within 15 Days of the Invoice Date (NET15 Payment Model)

4) Send Bills to Customers with New DUE DATE.

 

Example:

 

Actual Renewal Date: 01/05/2017

Invoice Date (45 Days before Renewal Date): 17/03/2017 (NOTE: This can be defined in WHMCS Automatic Configuration)

Due Date (within 15 Days of the Invoice Date): 01/04/2017 (NOTE: Expecting InvoiceCreationPreEmail Hook to set this DUE DATE - NET15)

 

If a Product's Renewal Date is scheduled on 01/05/2017, then the WHMCS System is supposed to create its Invoice on 17/03/2017 (as defined in our WHMCS System - 45 Days before Renewal Date), and as soon as this Invoice is created, this HOOK is then expected to set its Due Date as 01/04/2017 (within 15 Days of the Invoice Date).

 

Can someone help me with this please?

 

Thanks in advance.

 

Anto

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use & Guidelines and understand your posts will initially be pre-moderated