worldcubeassociation.org icon indicating copy to clipboard operation
worldcubeassociation.org copied to clipboard

Create additional fields for 'Dues billed to' in Competition submission form

Open danieljames-dj opened this issue 3 years ago • 12 comments

A new field can be added to the competition submission form named 'Dues billed to' which will have a dropdown of Delegates of the competition (except trainee delegate), the regional organization of the country and 'other'. If they select 'other', then they can manually enter name and email ID. For other options, internally it can store name and email of selected delegate/organization in the competition table (column names can be something like duesBilledToName and duesBilledToEmail).

Additionally, these two data (duesBilledToName and duesBilledToEmail) should also be added to WFC export.

This data can be used by WFC to send the invoice. In long term, this data can be used for automating many things for WFC.

danieljames-dj avatar Dec 28 '22 13:12 danieljames-dj

Is there a reason we would have an "Other" category? Not sure whether this spec comes from WFC, but I would be worried about billing dues to non-delegates/RO's

This raises the notion of making RO's entities in our database, though, which (a) makes a lot of sense, and (b) may require design/implementation of a system outside the scope of this issue?

dunkOnIT avatar Jan 13 '23 08:01 dunkOnIT

Hi Duncon, WFC has discussed this internally, and confirmed that we can invoice the dues to anybody because the delegates are ultimately responsible for making sure the person they select must pay the dues. In case the third party delays, the red mark will be on delegate and not on the selected person. This option will allow the delegates to invoice to the organizers as well.

danieljames-dj avatar Jan 14 '23 04:01 danieljames-dj

Cool, thanks for the clarity!

dunkOnIT avatar Jan 16 '23 05:01 dunkOnIT

The Competitions table is growing with so many columns. Is it recommended to add these two columns in Competitions table itself, or is it suggested to have an extension of the table - say competition_finance and have the details there? cc: @thewca/software-team

danieljames-dj avatar Jun 30 '23 01:06 danieljames-dj

In principle, splitting data is nice. But for the time being, I recommend adding a column to the competitions table and thinking about splitting later calmly.

gregorbg avatar Jul 29 '23 02:07 gregorbg

Thanks @gregorbg for your input. I feel it's more easy to integrate on React part, and hence can be started once this PR is merged. If somebody is interested to take this up, feel free to comment.

danieljames-dj avatar Jul 29 '23 07:07 danieljames-dj

The plan for this can be something like:

We will have a new field in competition form named 'Dues to be invoiced to' and it will first "whom do you want to invoice" and the options will be "A Delegate", "Regional Organization", "Other User".

Once they selects one of the option, it will give the option to search for that particular list. For example, if they select "A Delegate", they will have Delegate search list, and if they select "Regional Organization", they will have Regional Organization list, etc.

One potential drawback that someone can raise here is what if they want to add some company like 'XYZ' with some email 'mail@xyz', then the solution is that an account has to be created with that name and email. This can be fixed in future by adding one more option "custom name & email".

Software side: The name and email will be fetched from the selected user/RO, and it will be stored in the new database columns duesBilledToName and duesBilledToEmail.

danieljames-dj avatar Jul 28 '24 02:07 danieljames-dj

Is there a reason why we wouldn't just start off with the custom name and email option, and add in the ability to select a delegate/organizer/regional org at a later stage? (especially thinking of when we have more formalized support for Ro's in our system)

dunkOnIT avatar Jul 29 '24 10:07 dunkOnIT

Starting off with custom name and email option will have the potential of many mistakes (typos) and will make it more hectic for WFC to correct them while sending dues.

danieljames-dj avatar Jul 29 '24 10:07 danieljames-dj

I'm imagining that much of the time we'll want dues to be going to an Ro, though - do we currently have a regional organizations list that people could select from? (Maybe I'm just not in touch with what's actually in our database :P)

dunkOnIT avatar Jul 29 '24 10:07 dunkOnIT

Yes we do have regional organizations list in a table. I understand that we might change the data from that table to user_groups in future, but that change won't have any impact as we just have to change the model param in the WcaSearch which we use for searching.

danieljames-dj avatar Jul 30 '24 03:07 danieljames-dj

Ah ok I understand! In that case let's go for it, this sounds great :D

dunkOnIT avatar Jul 30 '24 03:07 dunkOnIT