alextselegidis / easyappointments

:date: Easy!Appointments - Self Hosted Appointment Scheduler
https://easyappointments.org
GNU General Public License v3.0
3.26k stars 1.25k forks source link

Persist the appointment price and currency for future use #1406

Open cn-tools opened 1 year ago

cn-tools commented 1 year ago

It would be great if the price currently valid at the time of booking could be saved on the appointment. Any price adjustments can be better tracked so that the customer is not charged the wrong price.

alextselegidis commented 10 months ago

Hello!

This is a good idea.

I think in general it would make more sense in the future to store the customer info as well, as they may change in the future.

So we need to have the right information in the database for the time of booking.

Alex Tselegidis, Easy!Appointments Creator
Need a customization? Get a free quote!

cn-tools commented 10 months ago

On which data do you think here?

I think the customer remains the same customer even if he moves somewhere else. That's why I'm not sure whether it's really necessary to save the customer's data on the appointment itself.

For me it makes more sence to save some infos from the booked service on the appointment directly.

alextselegidis commented 10 months ago

For example the customer data at the time of booking would be important info to keep, as those might change later on

Alex Tselegidis, Easy!Appointments Creator
Need a customization? Get a free quote!

stevenkissack commented 5 months ago

@alextselegidis I am working on this in my fork as a pre-cursor to adding https://github.com/alextselegidis/easyappointments/issues/710

I saw the requirement for these new fields in my personal use case:

appointment.total_cost - using "total" as there might be offers/deductions made. I could also call this billed_amount? appointment.currency - currency at the time of booking

I'll allow the backend modal to set a custom total & currency but default to the selected service rates

Do you have any specific input before I try to upstream? 🙏

alextselegidis commented 5 months ago

Hello!

Thanks for posting this

Let's better name the fields:

Make sure there's a migration for each one of them and update the model class accordingly

Also this should go to develop branch

Alex Tselegidis, Easy!Appointments Creator
Need a customization? Get a free quote!

stevenkissack commented 5 months ago

I'll update my local mirror to use appointment.price and open a PR for feedback today 👍