ABTech / tracker

Carnegie Mellon Activities Board Technical Committee Tracker
abtech.org
22 stars 29 forks source link

Implement corporate pricing into invoice items #546

Open wjiang42 opened 8 months ago

wjiang42 commented 8 months ago

Adds corporate price to invoice items. Invoice line price will automatically choose corporate pricing iff the invoice has the oracle option. Also changes invoice item prices to floats to align with invoice line prices being floats.

Note that I was unable to test this locally due to JavaScript issues.

wjiang42 commented 8 months ago

The way I envision using invoice items is simply as a shortcut when your lazy, where you're already famliiar with the pricing sheet and line items, and you just want to be able to enter a line item quicker. I think the pricing sheet is still what I would use if I'm doing a rental or am unsure of which line item to use, so adding groups to tracker would make the whole thing more cumbersome for not much gain.

I do agree that the oracle string is a poor proxy, and a checkbox would be better, but I'd have to look through how to do that.

DaAwesomeP commented 8 months ago

The way I envision using invoice items is simply as a shortcut when your lazy, where you're already famliiar with the pricing sheet and line items, and you just want to be able to enter a line item quicker.

Yeah, that's exactly what the invoice items feature is for and I think this still helps. You would have a dropdown at the top where you select "corporate" (maybe instead of a "corporate" checkbox) and then all the later dropdowns show the corporate line items just as you would have with the current state of the pull.

I think the pricing sheet is still what I would use if I'm doing a rental or am unsure of which line item to use, so adding groups to tracker would make the whole thing more cumbersome for not much gain.

I guess my point is to keep Tracker flexible instead of hardcoding in one type of scheme where that may change or where there may be additional schemes sometime in the future. This sort of thing absolutely comes back to bite later--you want to avoid using using specific naming or columns where things should be groups.

For example: the SLICE finance person's email was hardcoded in and we had to change code every time they changed advisors (once a semester for like 3 years). Eventually I added a model for a list of invoice recipients which also allowed for multiple SLICE people to receive them--which was not possible with the single-person hardcoding.

Another example: Notice that there is not a column for each event role position on each event date; they are stored as text in a separate joined table. New roles aren't added very frequently, but when they are it we don't have to think twice about adding to every view, form, param list, validation, permission, etc. No migrations need to be run.

The pricing sheet method came to exist because Tracker wasn't covering all of the different pricing structures anymore and nobody wanted to deal with changing Tracker at the time (not vice versa). This is also how the equipment system on Tracker has become unused.

wjiang42 commented 8 months ago

I guess my main concern is that a tracker feature that's as adaptable and versatile as a shared google sheets would take so much effort that it's not really worth it. I think hardcoding default and corporate works pricing works because (from my understanding) those are the two most basic pricing formats, and everything with a normal price has a corporate price that scales in the same way (by hour). Other pricing modes are rare or complicated enough that I think people will just go to the pricing sheet.