Good-Bids / goodbids

0 stars 0 forks source link

[Invoices] Add tools for Super Admins to clean up soft launch Invoices #1040

Open clatwell opened 7 months ago

clatwell commented 7 months ago

Here's a quick recap of the current state of Invoices on production:

Here's what we need to do:

Super Admins can delete Invoices from WordPress

We need to give Super Admins a way to delete Invoice post types from WordPress. We could add the UI for this either to the Invoices dashboard in the Network Admin, or the Invoices post type view on the NP sites.

The specific use-case we're trying to solve for is Anne Marie deleting WordPress Invoices that don't have an associated Stripe invoice, which won't happen moving forward. I don't feel strongly that we need to extend this feature to also delete the associated Stripe Invoice if one exists -- that seems like a separate feature -- but I don't think we want to give Super Admins the ability to only delete the WordPress invoice (without deleting the Stripe invoice) in perpetuity.

So, my suggestion is to only expose this option in the UI if the stripe_invoice_id for the invoice is null. That way, Anne Marie can use this feature to clean-up soft launch invoices, and if the need arises for Super Admins to be able to fully delete a WP + Stripe invoice, we can solve for that separately.

Super Admins can disable Auction invoices for a Nonprofit

Now that we've fixed the get_site_option bug with Invoices, any Auction for any Nonprofit that closes will generate a WP + Stripe Invoice. There are two Auctions still live on production -- one for a NP that GB plans to charge, one for a NP that GB does not plan to charge. We'd like to give Anne Marie the option to "disable" Auction invoices for the NP that GB does not plan to charge, so that the system won't generate a WP + Stripe invoice for that Auction when it closes.

Here's what I'm thinking:

linear[bot] commented 7 months ago
GOO-440 [Invoices] Add tools for Super Admins to clean up soft launch Invoices

Here's a quick recap of the current state of Invoices on production: * As of 4/29 at 5PM, all Invoices that were supposed to be generated when Auctions closed were correctly created in WordPress, but not generated in Stripe. * GB plans to charge about 50% of the soft launch NPs for their participation -- we've covered this with the new "Generate" feature you built yesterday, which is fabulous. * GB plans to *not* charge the other 50% of the soft launch NPs, and therefore will need a way to: * Delete the WordPress Invoices (which aren't associated with a Stripe Invoice) so that those NP accounts don't become delinquent when the due date passes * Disable Auction Invoices for those NPs so when their Live auctions close, no Invoice is generated Here's what we need to do: ### Super Admins can delete Invoices from WordPress We need to give Super Admins a way to delete Invoice post types from WordPress. We could add the UI for this either to the Invoices dashboard in the Network Admin, or the Invoices post type view on the NP sites. The specific use-case we're trying to solve for is Anne Marie deleting WordPress Invoices that don't have an associated Stripe invoice, which won't happen moving forward. I don't feel strongly that we need to extend this feature to *also* delete the associated Stripe Invoice if one exists -- that seems like a separate feature -- but I don't think we want to give Super Admins the ability to *only* delete the WordPress invoice (without deleting the Stripe invoice) in perpetuity. So, my suggestion is to only expose this option in the UI if the stripe_invoice_id for the invoice is `null`. That way, Anne Marie can use this feature to clean-up soft launch invoices, and if the need arises for Super Admins to be able to fully delete a WP + Stripe invoice, we can solve for that separately. ### Super Admins can disable Auction invoices for a Nonprofit Now that we've fixed the `get_site_option` bug with Invoices, any Auction for any Nonprofit that closes will generate a WP + Stripe Invoice. There are two Auctions still live on production -- one for a NP that GB plans to charge, one for a NP that GB does not plan to charge. We'd like to give Anne Marie the option to "disable" Auction invoices for the NP that GB does not plan to charge, so that the system won't generate a WP + Stripe invoice for that Auction when it closes. Here's what I'm thinking: * Add a checkbox to the NP Verified Details tab, visible only to Super Admins, for "Disable Auction Invoices" * Checkbox / boolean defaults to unchecked / false * Helper text below checkbox: Check this box to prevent Auction Invoices from generating for this Nonprofit * If the box is checked, when an Auction closes, the system does not generate an Auction Invoice for the NP. * The system should still generate Tax Invoices for all NPs regardless of the value of the "Disable Auction Invoices" option