Jump to content

Module/hook which can generate 2 invoice series? (For India)


Recommended Posts

Hello,

 

 

I want something like:

Other Country Invoice format:  #CompanyName-Number.

India Invoice format: #India-Number(Must be separate from Other country's invoice number)

 

Example Invoice No:

#Dewlance-1

#Dewlance-2

 

Indian Invoice Example:

#India-1

#India-2

 

 

Any Idea? This is required in India ;/

 

 

Thanks.

 

 

Link to comment
Share on other sites

It's doable with custom scripts but before you start coding keep in mind that it's a nightmare for tens of reasons. It took me months to achieve similar results. You need to use all the following action hooks:

  • InvoiceCreation
  • InvoiceCreated
  • InvoiceCreationPreEmail
  • InvoiceCreationAdminArea
  • InvoicePaid
  • InvoicePaidPreEmail

Depending on other factors you may have to use also AdminAreaHeaderOutput. In fact Add Transaction from backend uses an ajax POST therefore you'll probably need to code a fallback to get your things done. Here comes the bad part. All the above hook points are redundant in inexplicable ways so your scripts must be smart enough to trigger only once otherwise you mess up your invoice numbering. Good luck. You'll need it.

Don't forget that you also need to abort all invoice-related email notifications so that you can fix invoice number before customers receive PDF and emails with the default numbering of WHMCS. Obviously such emails must be re-sent via API.

Edited by Kian
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