hsidhu Posted November 26, 2015 Report Posted November 26, 2015 Hello Everyone, I am new to Blesta. I am trying to add additional costs to client invoice. Invoices are created by cron job and I want to add cron job to my plugin which will add additional costs to due or next invoice. If anyone know about any plugin or can help me out will be great Thanks in advance Quote
Michael Posted November 27, 2015 Report Posted November 27, 2015 why not manually add them, by editing the invoice? Quote
hsidhu Posted November 27, 2015 Author Report Posted November 27, 2015 Thanks for getting back. Requirement is make it automatic add it to invoice. Like It creates a invoice on monthly bases and it will also check if there is additional service been taken by client and add that it into invoice with plugin cron. We could do it manually but want to cut that step for staff. Quote
Michael Posted November 27, 2015 Report Posted November 27, 2015 Thanks for getting back. Requirement is make it automatic add it to invoice. Like It creates a invoice on monthly bases and it will also check if there is additional service been taken by client and add that it into invoice with plugin cron. We could do it manually but want to cut that step for staff. You'd need a plugin then with the following: https://docs.blesta.com/display/dev/Event+Handlers : Invoices.edit Quote
hsidhu Posted November 27, 2015 Author Report Posted November 27, 2015 Doesn't any event attach to that will only run when Invoice.edit will be called in url or it will run by cron or other means too? I have other idea in mind let me know if i am wrong. I should do a look up in invoice table for client and get there latest invoice and edit that but ( what if any thing like package got changed or do you think anything will effect that ). Quote
Michael Posted November 27, 2015 Report Posted November 27, 2015 Doesn't any event attach to that will only run when Invoice.edit will be called in url or it will run by cron or other means too? I have other idea in mind let me know if i am wrong. I should do a look up in invoice table for client and get there latest invoice and edit that but ( what if any thing like package got changed or do you think anything will effect that ). You make a plugin to use the event to add a line item, in the plugin you also make a cron task which will run when you want it too, that will then do the changes you want. I don't know any more than that as I'm not a developer sorry. Quote
hsidhu Posted November 27, 2015 Author Report Posted November 27, 2015 I will try thanks alot for your help. Quote
hsidhu Posted November 29, 2015 Author Report Posted November 29, 2015 That works while one more thing came up - how do i make sure that line is add to right invoice - service and package. For example : One service is renew everyday and other every month both have domain cost which has to be add on every renew. I have rough idea how i can do it. e.g by finding the service id from invoice_lines but not sure its right way to go. Quote
Tyson Posted November 30, 2015 Report Posted November 30, 2015 I think we need to know more about what you're trying to accomplish in order to offer suggestions on a design that will work for it. Could you elaborate? Quote
hsidhu Posted December 1, 2015 Author Report Posted December 1, 2015 Thanks for reply. I sent you an email. Quote
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.