easyappointments icon indicating copy to clipboard operation
easyappointments copied to clipboard

Persist the appointment price and currency for future use

Open cn-tools opened this issue 1 year ago • 6 comments

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.

cn-tools avatar Sep 02 '23 09:09 cn-tools

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!

alextselegidis avatar Oct 23 '23 09:10 alextselegidis

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.

cn-tools avatar Oct 23 '23 10:10 cn-tools

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!

alextselegidis avatar Oct 30 '23 10:10 alextselegidis

@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? 🙏

stevenkissack avatar Mar 23 '24 11:03 stevenkissack

Hello!

Thanks for posting this

Let's better name the fields:

  • price
  • currency

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!

alextselegidis avatar Mar 25 '24 08:03 alextselegidis

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

stevenkissack avatar Mar 26 '24 02:03 stevenkissack