Invision Community 4: SEO, prepare for v5 and dormant account notifications By Matt Monday at 02:04 PM
HeadStand Posted May 31, 2018 Posted May 31, 2018 Is there a way to easily differentiate between an invoice generated by a customer and an invoice generated by an Admin in the ACP? I can't seem to find an easy way to figure this out, short of looping through the customer history table. If there isn't a way, can there be one (perhaps for 4.4)? I have more than one customer who is asking for ACP-generated invoices to be treated differently than regular invoices. In most cases, an invoice generated by an Admin is usually to handle a special case where the customer (for whatever reason) is either not purchasing from the standard commerce packages or cannot pay via those means. When this happens, you may not want the invoice to expire like others; payment may take longer to receive, there may be hoops and jumps (like government contracts) that can take a very long time to go through. I understand if you don't want to change the expiration logic, but at the very least, a flag to indicate that the invoice was manually generated would be helpful. Thanks.
Mark Posted May 31, 2018 Posted May 31, 2018 You could hook \IPS\nexus\Invoice::__construct() and set your own flag?
HeadStand Posted June 1, 2018 Author Posted June 1, 2018 3 hours ago, Mark said: You could hook \IPS\nexus\Invoice::__construct() and set your own flag? I actually tried that, but it's not 100% reliable when you factor in invoices generated by scheduled tasks. Tasks that are triggered by site activity, or manually run, will have an incorrect logged in member.
Mark Posted June 1, 2018 Posted June 1, 2018 I mean look at the backtrace or the URL or something to see what called it.
Recommended Posts
Archived
This topic is now archived and is closed to further replies.