gizzza Posted July 21, 2020 Share Posted July 21, 2020 Hi, Looking for a solution where the invoice ID is based on payment method. Now i have seen this thread, but i would like to structure the invoice number so it follows the sequence based on method used. Example paymentmethod. creditcard: 11000, 11001, 11002, 11003 etc... Banktransfer: 33500, 33501, 33502 etc. Paypal: 66290, 66291, 66292 etc.... The custom invoice # is just for reference for client - internally in DB is not necessary to re-organize. 0 Quote Link to comment Share on other sites More sharing options...
brian! Posted July 22, 2020 Share Posted July 22, 2020 15 hours ago, gizzza said: Looking for a solution where the invoice ID is based on payment method. Now i have seen this thread, but i would like to structure the invoice number so it follows the sequence based on method used. I think you would just need to tweak the hook to get the last custom invoice number for the current payment method - if it exists, add 1 to the value and use that as the new custom invoice number; if it doesn't exist, then create a new custom number combining your gateway assigned number(e.g 11 for cc) and 000. 15 hours ago, gizzza said: The custom invoice # is just for reference for client - internally in DB is not necessary to re-organize. no need to reorganise, but you would find it easier to update the custom invoice number value (which would be blank otherwise and the invoice would just use the ID value) in the database - otherwise, multiple other tweaks would be required to modify the three other templates (html, pdf and email). you'd also have to work out what happens to the next invoice after 11999 - i'm assuming that it either goes to 111000 or 12000 ? 0 Quote Link to comment Share on other sites More sharing options...
gizzza Posted July 25, 2020 Author Share Posted July 25, 2020 I see. Alright if anyone is up for a paid task, let me know 😅 0 Quote Link to comment Share on other sites More sharing options...
Sonu2007 Posted December 23, 2020 Share Posted December 23, 2020 On 7/25/2020 at 5:41 AM, gizzza said: I see. Alright if anyone is up for a paid task, let me know 😅 Do you got this working? 0 Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.