Sybille Posted September 14, 2016 Share Posted September 14, 2016 Hi, The case: The customer orders his product in our WHMCS shop. The date of order defines the period of service. Because our products have delivery time, the period which is shown on the first invoice is incorrect. Therefor we like to prevent WHMCS to send the first invoice to the customer. WHMCS shouldn’t send the first invoice, because we change the service period after the customer’s order and it will be incorrect on the first but corrected on the second invoice. Is there a solution for this issue? Thanks in advanced! 0 Quote Link to comment Share on other sites More sharing options...
sentq Posted September 14, 2016 Share Posted September 14, 2016 Sybille, it is possible to prevent the first invoice email to client using this ActionHook maybe, and only allow the submission if admin is sending the invoice email manually 0 Quote Link to comment Share on other sites More sharing options...
brian! Posted September 14, 2016 Share Posted September 14, 2016 Hi Sybille, The case:The customer orders his product in our WHMCS shop. The date of order defines the period of service. Because our products have delivery time, the period which is shown on the first invoice is incorrect. Therefor we like to prevent WHMCS to send the first invoice to the customer. WHMCS shouldn’t send the first invoice, because we change the service period after the customer’s order and it will be incorrect on the first but corrected on the second invoice. Is there a solution for this issue? when the customer makes the order, can it be determined from the order details what the correct dates should be ? i'm wondering if instead of 1. disabling the first invoice email; 2. have you manually adjust the invoice and 3. send the second invoice email.... whether it's going to be easier to adjust the item line description (either via hook or in the template), remove the automatically added dates and/or change them. of course, that all depends if the correct dates can be calculated by WHMCS at the time of ordering. 0 Quote Link to comment Share on other sites More sharing options...
Sybille Posted September 15, 2016 Author Share Posted September 15, 2016 Sybille, it is possible to prevent the first invoice email to client using this ActionHook maybe, and only allow the submission if admin is sending the invoice email manually Thanks for the link. Is this valid only for the first invoice or would all automatically created invoices been stopped, including the second, third and so on? The second and further invoice should be automatically sent by WHMC. 0 Quote Link to comment Share on other sites More sharing options...
Sybille Posted September 15, 2016 Author Share Posted September 15, 2016 Hi Sybille, when the customer makes the order, can it be determined from the order details what the correct dates should be ? i'm wondering if instead of 1. disabling the first invoice email; 2. have you manually adjust the invoice and 3. send the second invoice email.... whether it's going to be easier to adjust the item line description (either via hook or in the template), remove the automatically added dates and/or change them. of course, that all depends if the correct dates can be calculated by WHMCS at the time of ordering. For some products the customer have the opportunity to determine the start date of his ordered Service by writing the start date in a in a standard custom filed. For some products we have fix delivery times. If there is a better solution for handling the determination date just let me know. We don't wish to send all invoices manually just the first one. What do you mean by "3. send the second invoice email"? 0 Quote Link to comment Share on other sites More sharing options...
sentq Posted September 15, 2016 Share Posted September 15, 2016 you need to query database to check if this is the first invoice and it was automatically sent by WHMCS -> then abort sending, otherwise do nothing. and actually this is the ActionHook you need to use to abort this email: http://docs.whmcs.com/Hooks:EmailPreSend 0 Quote Link to comment Share on other sites More sharing options...
brian! Posted September 15, 2016 Share Posted September 15, 2016 For some products the customer have the opportunity to determine the start date of his ordered Service by writing the start date in a in a standard custom filed. For some products we have fix delivery times. If there is a better solution for handling the determination date just let me know. well you'll know how to handle the determination date better than me as you know more about the products you're selling! I asked because I remembered your previous question about product custom fields and thought they might all be using that... I suppose you could alter the invoice line based on the product... e.g use custom field result for product 1 and invoice date + x days for product 2 etc... if you could get that right, it should prevent the need to interrupt the sending of the invoice... What do you mean by "3. send the second invoice email"? in your scenario, you're wanting to prevent the invoice from initially being send; modifying it to change the dates and then send it - when you send the corrected invoice manually, I was calling that the second invoice email. btw - if you are going to stop the emails, sentq's suggested method is the way to go. 0 Quote Link to comment Share on other sites More sharing options...
Sybille Posted September 15, 2016 Author Share Posted September 15, 2016 (edited) Hi senq Hi brian! I just discussed your ideas with my college. Best solution would be to exclude the job which generates the invoice during the process order. In this case we could change the date of service period after the order and generate the invoice with the correct service period manually or by the schedule which runs at night. Would a Change like that be possible? Edited September 16, 2016 by Sybille 0 Quote Link to comment Share on other sites More sharing options...
Sybille Posted September 20, 2016 Author Share Posted September 20, 2016 (edited) Does someone know how to manipulate the Invoice generating process as described above? It would help us a lot! Edited September 20, 2016 by Sybille 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.