Had to do a couple of changes to the database: add the currency_code to the payment relation, to format the price according to the payment’s currency instead of the company’s; and the reference SQL function, to replace the equivalent golang function, so that i can use it to index payments. The rest is mostly the same as any other page, except that the individual payment’s page is not a form, but a regular info dump. I also moved the payment settings as a sub-route of payments, as i believe this makes more sense than an additional user menu item.
32 lines
575 B
PL/PgSQL
32 lines
575 B
PL/PgSQL
-- Verify camper:payment on pg
|
|
|
|
begin;
|
|
|
|
select payment_id
|
|
, company_id
|
|
, slug
|
|
, campsite_type_id
|
|
, arrival_date
|
|
, departure_date
|
|
, subtotal_nights
|
|
, number_adults
|
|
, subtotal_adults
|
|
, number_teenagers
|
|
, subtotal_teenagers
|
|
, number_children
|
|
, subtotal_children
|
|
, number_dogs
|
|
, subtotal_dogs
|
|
, subtotal_tourist_tax
|
|
, total
|
|
, currency_code
|
|
, down_payment_percent
|
|
, zone_preferences
|
|
, payment_status
|
|
, created_at
|
|
, updated_at
|
|
from camper.payment
|
|
where false;
|
|
|
|
rollback;
|