Jump to content

Sequencial numbering whit cancelled/refunded invoices with proforma invoice


drtduarte

Recommended Posts

Dear Friends,

 

I was very surprised when I saw that a paid invoice, when marked cancelled or refunded stays with the Invoice number, but the pdf and printable version shows the text Proforma Invoice, resulting on missing Invoices in the sequence.

 

If you want to have sequencial invoices you should make the following modifications:

 

File invoicepdf.tpl

# Header Bar

$invoiceprefix = $_LANG["proformainvoicenumber"];

 

if ($status=="Paid") {

$invoiceprefix = $_LANG["invoicenumber"];

}

 

 

Replace by

 

# Header Bar

$invoiceprefix = $_LANG["invoicenumber"];

 

if ($status=="Unpaid") {

$invoiceprefix = $_LANG["proformainvoicenumber"];

}

 

 

File viewinvoice.tpl

2 x {if $status eq "Paid"}{$LANG.invoicenumber}{else}{$LANG.proformainvoicenumber}{/if} {$invoicenum}

 

Replace by

 

2 x {if $status eq "Unpaid"}{$LANG.proformainvoicenumber}{else}{$LANG.invoicenumber}{/if} {$invoicenum}

 

If you are using my suggestion from http://forum.whmcs.com/showthread.php?65711-EU-VAT-Invoicing-Addon-Invoice-ID-(Paypal)-Mark-Unpaid-on-Already-Payed-Invoices&p=286326#post286326, use {$LANG.invoicenumber_euvataddon} instead of {$LANG.invoicenumber}.

 

Take care,

David D.

Link to comment
Share on other sites

Its not just a proforma if unpaid - it can still be cancelled etc - so all you're doing is moving the issue not fixing it.

 

You need to change == Paid to also to check Refunded, and to update your procedures to never cancel a paid invoice.

 

Longer-term WHMCS should change the code to check for payments/credits applied to the invoice, else it's still proforma

Link to comment
Share on other sites

Hello othellotech,

 

Thanks for sharing your point of view. I'm not sure If I understood.

 

You see, If I need to cancel or refund Invoice number 1025, according to my country it must stay Invoice 1025 if I already have issued invoice 1026... It will be a cancelled invoice or a refunded invoice, I can't transform Invoice 1025 into a Proforma invoice, and stay with a hole on invoices, between 1024 and 1026...

 

Regards,

David D.

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