camper/pkg/database
jordi fita mas fdf9502c8b “Finish” the new booking form
Had to bring the same fields that i have for a payment to booking,
except that some of those should be nullable, because it is unreasonable
to ask front desk to gather all customer data when they have a booking
via phone, for instance.

Therefore, i can not take advantage of the validation for customer data
that i use in the public-facing form, but, fortunately, most of the
validations where in separated functions, thus only had to rewrite that
one for this case.

I already have to create a booking from a payment, when receiving a
payment from the public instance, thus i made that function and reused
it here.  Then i “overwrite” the newly created pre-booking with the
customer data from the form, and set is as confirmed, as we do not see
any point of allowing pre-bookings from employees.
2024-04-24 20:19:13 +02:00
..
OptionUnits.go Add payment relation and use it to compute the booking’s cart 2024-02-12 05:21:00 +01:00
RecordArray.go Copy RecordArray from pgtype to database 2023-09-12 21:58:30 +02:00
db.go Refactor ISO date, and datestamp format in constant 2024-01-31 19:58:46 +01:00
funcs.go “Finish” the new booking form 2024-04-24 20:19:13 +02:00
tx.go Add the campsite type cost per season 2023-10-01 21:14:39 +02:00
types.go Handle payment notifications from Redsys 2024-02-13 02:38:38 +01:00
zeronull.go Change draft_payment return type to row of payment 2024-02-13 19:51:39 +01:00