Opened 10 years ago
Closed 9 years ago
#790 closed enhancement (fixed)
Add Sponsor Invoices Post Type to WordCamp Payments Plugin
Reported by: | iandunn | Owned by: | iandunn |
---|---|---|---|
Milestone: | Priority: | normal | |
Component: | WordCamp Site & Plugins | Keywords: | good-first-bug |
Cc: |
Description
Right now information on sponsor invoices is tracked in various spreadsheets, but it'd be better to track them in a central location and be able to run reports on them.
It will essentially be the same functionality as the WordCamp Payments and WordCamp Payments Dashboard plugins provide for vendor payments, just with a different set of fields.
https://wordpress.slack.com/archives/community/p1418060022000025
Attachments (1)
Change History (10)
#2
@
10 years ago
Some of these will probably change a bit, but this is the gist of it:
- Contact Name
- Contact E-mail Address - html5 type="email"
- Company Name
- Type of Sponsorship - dropdown "Money", "In-Kind Donation", "Other"
- Notes - textarea
- Sponsorship Level
- Published Blog Post - checkbox
- Published Logo - checkbox
- Coupon Code
- Check Requested - checkbox
- Check Sent - checkbox
- Received Amount
These are all just <input type="text">
unless otherwise specified. It'll also need custom post statuses: "Pre-Contact", "Negotiation", "Invoiced", "Received Payment", "Cancelled".
The existing Payments class has some methods for generating form fields; it'd be good to abstract those into Traits.
#3
follow-up:
↓ 5
@
10 years ago
Replying to iandunn:
These are all just
<input type="text">
unless otherwise specified. It'll also need custom post statuses: "Pre-Contact", "Negotiation", "Invoiced", "Received Payment", "Cancelled".
Can you please clarify a bit on how will these Post Statuses will be decided ? or will they be manually be selected from a drop down as done for post/page post types?
The existing Payments class has some methods for generating form fields; it'd be good to abstract those into Traits.
Also , the WordCamp Payments plugin gives the editing permission of paid requests to only the admins with manage_network
capabilities while others can only view it. Do we require such a thing over some of these post statuses ?
#4
follow-up:
↓ 6
@
10 years ago
- Keywords dev-feedback added
Hi,
I have made a basic custom post type for the sponsor invoice plugin (diff attached). More of a copy & paste material. Some things on which I wasn't clear about and hence not here in the diff :
- Deciding how post statuses will be set
- Columns, managing & rendering (on what fields to be included)
- Status Metabox? Should we make our own like we did in payment requests
- Informing Central about new invoices?
- Should we make some fields readonly based on user's network management status?
Anything else left out? Feel free to comment.
#5
in reply to:
↑ 3
@
10 years ago
Replying to bansod_deven:
Can you please clarify a bit on how will these Post Statuses will be decided ? or will they be manually be selected from a drop down as done for post/page post types?
I don't think there are really any triggers to automate setting the status in the same way that payment requests can be marked as paid once the payment date is entered, so for invoices the user would just select the status from a dropdown.
Also , the WordCamp Payments plugin gives the editing permission of paid requests to only the admins with
manage_network
capabilities while others can only view it. Do we require such a thing over some of these post statuses ?
No, I don't think that's important for sponsor invoices in the same way that is it for payment requests.
#6
in reply to:
↑ 4
@
10 years ago
Replying to utkarshd_42:
Deciding how post statuses will be set
I think comment:5 answers that, but let me know if you have any questions.
Columns, managing & rendering (on what fields to be included)
In the Network Dashboard, let's have these columns:
Company Name
Sponsorship Level
Status
Status Metabox? Should we make our own like we did in payment requests
Yeah
Informing Central about new invoices?
No, but when a new invoice is created, it would email the details to the sponsor, to ask them to send payment.
When the post is marked as paid, then it would e-mail the user who created the post, to notify them that it was paid.
Should we make some fields readonly based on user's network management status?
I think comment:5 answers that, but let me know if you have any questions.
#7
@
10 years ago
- Keywords dev-feedback removed
- Owner set to iandunn
- Status changed from new to accepted
790_basic_invoice.diff
looks like a good start. I think the next steps are:
- Abstract the form input functions like
render_text_input()
into PHP Traits, so that they can be shared by both of the classes and the code is kept DRY. This is a significant change in-and-of-itself, so it'd be good to make a separate patch just for this. - Add aggregated reports for all invoices across all sites in the network, similar to what Payments has. These are done in wordcamp-payments-network. Since this is a separate plugin, it'd be good to make changes to it a separate patch than the one for work on
wordcamp-payments
.
@iandunn Can you please specify what different sets of fields would be required?