GoHost4U Posted January 13, 2017 Share Posted January 13, 2017 Hi, I hope someone can help with this query. We are in Spain which requires us to account for our invoices when they are created. The system creates a proforma which negates having to account for the IVA in advance of payment receipt but when someone does pay then the invoice is created with the date as being the original pro forma date and not the date when payment is made and subsequently the invoice created. This results in invoices which are dated outside the fiscal year or quarter. We give a 21 day notice on say hosting or domain renewals and the proformas are sent out say in December 2016 but due to be paid and effectively paid anytime after that. In the case where the date of payment is made say in 2017 then the invoice is then created with last years date. Can the invoice date reflect the payment date whether this is via an automated payment or us manually assigning the payment. (I know you can manually adjust the invoice date when manually assigning payment) TIA Link to comment Share on other sites More sharing options...
pRieStaKos Posted January 16, 2017 Share Posted January 16, 2017 You can use a hook to update the invoice data, but you need someone familiar with the WHMCS API documentation. This is not implemented in the WHMCS functionality. You need to customize it with a hook. Link to comment Share on other sites More sharing options...
twhiting9275 Posted January 16, 2017 Share Posted January 16, 2017 this is possible with a hook and capsule Use this hook point : http://developers.whmcs.com/hooks-reference/invoices-and-quotes/#invoicepaid Use Capsule to update the invoice generation date in the DB : http://docs.whmcs.com/Interacting_With_The_Database Link to comment Share on other sites More sharing options...
Esi Posted January 18, 2018 Share Posted January 18, 2018 I think that might be correct whmcs could be implement this hook if your software is sold even in Europe Country, i have read in a old post that Matt has given this "old hook" that works with old version for this purpouse. Could WHMCS give hook for new version of its software? <?php function hook_update_invoice_date_on_payment($vars) { update_query("tblinvoices",array("date"=>"now()"),array("id"=>$vars['invoiceid'])); } add_hook("AddInvoicePayment",1,"hook_update_invoice_date_on_payment"); ?> Link to comment Share on other sites More sharing options...
Recommended Posts