Add the number of maximum nights that tourist tax applies
This is required by law. I do not know why i have this value and the tax amount in the database, but the payment percent and the number of days are hardcoded. I guess i am such an inconsistent mess.
This commit is contained in:
parent
9ba9bac2a8
commit
97831668e5
|
@ -0,0 +1,14 @@
|
||||||
|
-- Deploy camper:company__tourist_tax_max_days to pg
|
||||||
|
-- requires: company
|
||||||
|
|
||||||
|
begin;
|
||||||
|
|
||||||
|
alter table camper.company
|
||||||
|
add column tourist_tax_max_days camper.positive_integer not null default 7
|
||||||
|
;
|
||||||
|
|
||||||
|
alter table camper.company
|
||||||
|
alter column tourist_tax_max_days drop default
|
||||||
|
;
|
||||||
|
|
||||||
|
commit;
|
|
@ -10,13 +10,12 @@
|
||||||
-- requires: campsite_type_option
|
-- requires: campsite_type_option
|
||||||
-- requires: payment
|
-- requires: payment
|
||||||
-- requires: payment_option
|
-- requires: payment_option
|
||||||
|
-- requires: company__tourist_tax_max_days
|
||||||
|
|
||||||
begin;
|
begin;
|
||||||
|
|
||||||
set search_path to camper, public;
|
set search_path to camper, public;
|
||||||
|
|
||||||
create type option_units as (option_id integer, units integer);
|
|
||||||
|
|
||||||
create or replace function draft_payment(payment_slug uuid, arrival_date date, departure_date date, campsite_type_slug uuid, num_adults integer, num_teenagers integer, num_children integer, num_dogs integer, zone_preferences text, options option_units[]) returns payment as
|
create or replace function draft_payment(payment_slug uuid, arrival_date date, departure_date date, campsite_type_slug uuid, num_adults integer, num_teenagers integer, num_children integer, num_dogs integer, zone_preferences text, options option_units[]) returns payment as
|
||||||
$$
|
$$
|
||||||
declare
|
declare
|
||||||
|
@ -60,12 +59,12 @@ begin
|
||||||
, sum(cost_per_child * num_children)::integer
|
, sum(cost_per_child * num_children)::integer
|
||||||
, num_dogs
|
, num_dogs
|
||||||
, sum(case when num_dogs > 0 then coalesce(pet.cost_per_night, 0) else 0 end)::integer
|
, sum(case when num_dogs > 0 then coalesce(pet.cost_per_night, 0) else 0 end)::integer
|
||||||
, sum(tourist_tax * num_adults)::integer
|
, sum(case when day_num <= tourist_tax_max_days then tourist_tax * num_adults else 0 end)::integer
|
||||||
, 0
|
, 0
|
||||||
, currency_code
|
, currency_code
|
||||||
, case when arrival_date - current_date >= 7 then 0.3 else 1.0 end
|
, case when arrival_date - current_date >= 7 then 0.3 else 1.0 end
|
||||||
, coalesce(zone_preferences, '')
|
, coalesce(zone_preferences, '')
|
||||||
from generate_series(arrival_date, departure_date - 1, interval '1 day') as date(day)
|
from generate_series(arrival_date, departure_date - 1, interval '1 day') with ordinality as date(day, day_num)
|
||||||
left join season_calendar on season_range @> date.day::date
|
left join season_calendar on season_range @> date.day::date
|
||||||
left join season using (season_id)
|
left join season using (season_id)
|
||||||
left join campsite_type using (company_id)
|
left join campsite_type using (company_id)
|
||||||
|
|
|
@ -0,0 +1,170 @@
|
||||||
|
-- Deploy camper:draft_payment to pg
|
||||||
|
-- requires: roles
|
||||||
|
-- requires: schema_camper
|
||||||
|
-- requires: season_calendar
|
||||||
|
-- requires: season
|
||||||
|
-- requires: campsite_type
|
||||||
|
-- requires: campsite_type_pet_cost
|
||||||
|
-- requires: campsite_type_cost
|
||||||
|
-- requires: campsite_type_option_cost
|
||||||
|
-- requires: campsite_type_option
|
||||||
|
-- requires: payment
|
||||||
|
-- requires: payment_option
|
||||||
|
|
||||||
|
begin;
|
||||||
|
|
||||||
|
set search_path to camper, public;
|
||||||
|
|
||||||
|
create type option_units as (option_id integer, units integer);
|
||||||
|
|
||||||
|
create or replace function draft_payment(payment_slug uuid, arrival_date date, departure_date date, campsite_type_slug uuid, num_adults integer, num_teenagers integer, num_children integer, num_dogs integer, zone_preferences text, options option_units[]) returns payment as
|
||||||
|
$$
|
||||||
|
declare
|
||||||
|
p payment;
|
||||||
|
begin
|
||||||
|
if exists(select 1 from payment where slug = payment_slug and payment_status <> 'draft') then
|
||||||
|
payment_slug = null;
|
||||||
|
end if;
|
||||||
|
insert into payment (
|
||||||
|
slug
|
||||||
|
, company_id
|
||||||
|
, 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
|
||||||
|
)
|
||||||
|
select coalesce(payment_slug, gen_random_uuid())
|
||||||
|
, company_id
|
||||||
|
, campsite_type_id
|
||||||
|
, arrival_date
|
||||||
|
, departure_date
|
||||||
|
, sum(cost.cost_per_night * ceiling((num_adults::numeric + num_teenagers::numeric + num_children::numeric) / max_campers::numeric)::integer)::integer
|
||||||
|
, num_adults
|
||||||
|
, sum(cost_per_adult * num_adults)::integer
|
||||||
|
, num_teenagers
|
||||||
|
, sum(cost_per_teenager * num_teenagers)::integer
|
||||||
|
, num_children
|
||||||
|
, sum(cost_per_child * num_children)::integer
|
||||||
|
, num_dogs
|
||||||
|
, sum(case when num_dogs > 0 then coalesce(pet.cost_per_night, 0) else 0 end)::integer
|
||||||
|
, sum(tourist_tax * num_adults)::integer
|
||||||
|
, 0
|
||||||
|
, currency_code
|
||||||
|
, case when arrival_date - current_date >= 7 then 0.3 else 1.0 end
|
||||||
|
, coalesce(zone_preferences, '')
|
||||||
|
from generate_series(arrival_date, departure_date - 1, interval '1 day') as date(day)
|
||||||
|
left join season_calendar on season_range @> date.day::date
|
||||||
|
left join season using (season_id)
|
||||||
|
left join campsite_type using (company_id)
|
||||||
|
left join campsite_type_pet_cost as pet using (campsite_type_id)
|
||||||
|
left join campsite_type_cost as cost using (campsite_type_id, season_id)
|
||||||
|
left join company using (company_id)
|
||||||
|
where campsite_type.slug = campsite_type_slug
|
||||||
|
group by company_id
|
||||||
|
, campsite_type_id
|
||||||
|
, currency_code
|
||||||
|
on conflict (slug) do update
|
||||||
|
set company_id = excluded.company_id
|
||||||
|
, campsite_type_id = excluded.campsite_type_id
|
||||||
|
, arrival_date = excluded.arrival_date
|
||||||
|
, departure_date = excluded.departure_date
|
||||||
|
, subtotal_nights = excluded.subtotal_nights
|
||||||
|
, number_adults = excluded.number_adults
|
||||||
|
, subtotal_adults = excluded.subtotal_adults
|
||||||
|
, number_teenagers = excluded.number_teenagers
|
||||||
|
, subtotal_teenagers = excluded.subtotal_teenagers
|
||||||
|
, number_children = excluded.number_children
|
||||||
|
, subtotal_children = excluded.subtotal_children
|
||||||
|
, number_dogs = excluded.number_dogs
|
||||||
|
, subtotal_dogs = excluded.subtotal_dogs
|
||||||
|
, subtotal_tourist_tax = excluded.subtotal_tourist_tax
|
||||||
|
, total = excluded.total
|
||||||
|
, currency_code = excluded.currency_code
|
||||||
|
, down_payment_percent = excluded.down_payment_percent
|
||||||
|
, zone_preferences = excluded.zone_preferences
|
||||||
|
, updated_at = current_timestamp
|
||||||
|
returning *
|
||||||
|
into p
|
||||||
|
;
|
||||||
|
|
||||||
|
if array_length(coalesce(options, array[]::option_units[]), 1) > 0 then
|
||||||
|
delete
|
||||||
|
from payment_option
|
||||||
|
where payment_id = p.payment_id
|
||||||
|
and campsite_type_option_id not in (
|
||||||
|
select campsite_type_option_id
|
||||||
|
from unnest(options) as option(campsite_type_option_id, units)
|
||||||
|
);
|
||||||
|
|
||||||
|
insert into payment_option (
|
||||||
|
payment_id
|
||||||
|
, campsite_type_option_id
|
||||||
|
, units
|
||||||
|
, subtotal
|
||||||
|
)
|
||||||
|
select p.payment_id
|
||||||
|
, campsite_type_option_id
|
||||||
|
, units
|
||||||
|
, case when per_night then sum(cost * units)::integer else max(cost * units)::integer end
|
||||||
|
from generate_series(arrival_date, departure_date - 1, interval '1 day') as date(day)
|
||||||
|
join season_calendar on season_range @> date.day::date
|
||||||
|
join campsite_type_option_cost using (season_id)
|
||||||
|
join campsite_type_option using (campsite_type_option_id)
|
||||||
|
join unnest(options) as option(campsite_type_option_id, units) using (campsite_type_option_id)
|
||||||
|
group by campsite_type_option_id
|
||||||
|
, units
|
||||||
|
, per_night
|
||||||
|
on conflict (payment_id, campsite_type_option_id) do update
|
||||||
|
set units = excluded.units
|
||||||
|
, subtotal = excluded.subtotal
|
||||||
|
;
|
||||||
|
|
||||||
|
with option as (
|
||||||
|
select sum(subtotal)::integer as subtotal
|
||||||
|
from payment_option
|
||||||
|
where payment_id = p.payment_id
|
||||||
|
)
|
||||||
|
update payment
|
||||||
|
set total = subtotal_nights + subtotal_adults + subtotal_teenagers + subtotal_children + subtotal_dogs + subtotal_tourist_tax + coalesce(option.subtotal, 0)
|
||||||
|
from option
|
||||||
|
where payment_id = p.payment_id
|
||||||
|
returning total into p.total
|
||||||
|
;
|
||||||
|
else
|
||||||
|
delete
|
||||||
|
from payment_option
|
||||||
|
where payment_id = p.payment_id;
|
||||||
|
|
||||||
|
update payment
|
||||||
|
set total = subtotal_nights + subtotal_adults + subtotal_teenagers + subtotal_children + subtotal_dogs + subtotal_tourist_tax
|
||||||
|
where payment_id = p.payment_id
|
||||||
|
returning total into p.total
|
||||||
|
;
|
||||||
|
end if;
|
||||||
|
|
||||||
|
|
||||||
|
return p;
|
||||||
|
end;
|
||||||
|
$$
|
||||||
|
language plpgsql
|
||||||
|
;
|
||||||
|
|
||||||
|
revoke execute on function draft_payment(uuid, date, date, uuid, integer, integer, integer, integer, text, option_units[]) from public;
|
||||||
|
grant execute on function draft_payment(uuid, date, date, uuid, integer, integer, integer, integer, text, option_units[]) to guest;
|
||||||
|
grant execute on function draft_payment(uuid, date, date, uuid, integer, integer, integer, integer, text, option_units[]) to employee;
|
||||||
|
grant execute on function draft_payment(uuid, date, date, uuid, integer, integer, integer, integer, text, option_units[]) to admin;
|
||||||
|
|
||||||
|
commit;
|
|
@ -85,6 +85,7 @@ type publicPage struct {
|
||||||
Prices []*typePrice
|
Prices []*typePrice
|
||||||
DogsPrice string
|
DogsPrice string
|
||||||
TouristTax string
|
TouristTax string
|
||||||
|
TouristTaxDays int
|
||||||
Features []*typeFeature
|
Features []*typeFeature
|
||||||
Calendar *season.Calendar
|
Calendar *season.Calendar
|
||||||
Spiel gotemplate.HTML
|
Spiel gotemplate.HTML
|
||||||
|
@ -162,7 +163,7 @@ func newPublicPage(ctx context.Context, company *auth.Company, conn *database.Co
|
||||||
); err != nil {
|
); err != nil {
|
||||||
return nil, err
|
return nil, err
|
||||||
}
|
}
|
||||||
if err = conn.QueryRow(ctx, "select to_price(tourist_tax, $1) from company where company_id = $2", company.DecimalDigits, company.ID).Scan(&page.TouristTax); err != nil {
|
if err = conn.QueryRow(ctx, "select to_price(tourist_tax, $1), tourist_tax_max_days from company where company_id = $2", company.DecimalDigits, company.ID).Scan(&page.TouristTax, &page.TouristTaxDays); err != nil {
|
||||||
return nil, err
|
return nil, err
|
||||||
}
|
}
|
||||||
page.BookingDates, err = booking.NewDateFields(ctx, conn, slug)
|
page.BookingDates, err = booking.NewDateFields(ctx, conn, slug)
|
||||||
|
|
|
@ -63,6 +63,7 @@ type taxDetailsForm struct {
|
||||||
Country *form.Select
|
Country *form.Select
|
||||||
RTCNumber *form.Input
|
RTCNumber *form.Input
|
||||||
TouristTax *form.Input
|
TouristTax *form.Input
|
||||||
|
TouristTaxMaxDays *form.Input
|
||||||
Currency *form.Select
|
Currency *form.Select
|
||||||
DefaultLanguage *form.Select
|
DefaultLanguage *form.Select
|
||||||
InvoiceNumberFormat *form.Input
|
InvoiceNumberFormat *form.Input
|
||||||
|
@ -111,6 +112,9 @@ func newTaxDetailsForm(ctx context.Context, conn *database.Conn, l *locale.Local
|
||||||
TouristTax: &form.Input{
|
TouristTax: &form.Input{
|
||||||
Name: "tourist_tax",
|
Name: "tourist_tax",
|
||||||
},
|
},
|
||||||
|
TouristTaxMaxDays: &form.Input{
|
||||||
|
Name: "tourist_tax_max_days",
|
||||||
|
},
|
||||||
Currency: &form.Select{
|
Currency: &form.Select{
|
||||||
Name: "currency",
|
Name: "currency",
|
||||||
Options: form.MustGetOptions(ctx, conn, "select currency_code, currency_symbol from currency order by currency_code"),
|
Options: form.MustGetOptions(ctx, conn, "select currency_code, currency_symbol from currency order by currency_code"),
|
||||||
|
@ -142,6 +146,7 @@ func (f *taxDetailsForm) FillFromDatabase(ctx context.Context, company *auth.Com
|
||||||
, postal_code
|
, postal_code
|
||||||
, rtc_number
|
, rtc_number
|
||||||
, to_price(tourist_tax)
|
, to_price(tourist_tax)
|
||||||
|
, tourist_tax_max_days::text
|
||||||
, array[country_code::text]
|
, array[country_code::text]
|
||||||
, array[currency_code::text]
|
, array[currency_code::text]
|
||||||
, array[default_lang_tag]
|
, array[default_lang_tag]
|
||||||
|
@ -161,6 +166,7 @@ func (f *taxDetailsForm) FillFromDatabase(ctx context.Context, company *auth.Com
|
||||||
&f.PostalCode.Val,
|
&f.PostalCode.Val,
|
||||||
&f.RTCNumber.Val,
|
&f.RTCNumber.Val,
|
||||||
&f.TouristTax.Val,
|
&f.TouristTax.Val,
|
||||||
|
&f.TouristTaxMaxDays.Val,
|
||||||
&f.Country.Selected,
|
&f.Country.Selected,
|
||||||
&f.Currency.Selected,
|
&f.Currency.Selected,
|
||||||
&f.DefaultLanguage.Selected,
|
&f.DefaultLanguage.Selected,
|
||||||
|
@ -186,6 +192,7 @@ func (f *taxDetailsForm) Parse(r *http.Request) error {
|
||||||
f.Country.FillValue(r)
|
f.Country.FillValue(r)
|
||||||
f.RTCNumber.FillValue(r)
|
f.RTCNumber.FillValue(r)
|
||||||
f.TouristTax.FillValue(r)
|
f.TouristTax.FillValue(r)
|
||||||
|
f.TouristTaxMaxDays.FillValue(r)
|
||||||
f.Currency.FillValue(r)
|
f.Currency.FillValue(r)
|
||||||
f.DefaultLanguage.FillValue(r)
|
f.DefaultLanguage.FillValue(r)
|
||||||
f.InvoiceNumberFormat.FillValue(r)
|
f.InvoiceNumberFormat.FillValue(r)
|
||||||
|
@ -234,6 +241,11 @@ func (f *taxDetailsForm) Valid(ctx context.Context, conn *database.Conn, l *loca
|
||||||
v.CheckMinDecimal(f.TouristTax, 0.0, l.GettextNoop("Tourist tax must be zero or greater."))
|
v.CheckMinDecimal(f.TouristTax, 0.0, l.GettextNoop("Tourist tax must be zero or greater."))
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
if v.CheckRequired(f.TouristTaxMaxDays, l.GettextNoop("Tourist tax days can not be empty.")) {
|
||||||
|
if v.CheckValidInteger(f.TouristTaxMaxDays, l.GettextNoop("Tourist tax days must be an integer number.")) {
|
||||||
|
v.CheckMinInteger(f.TouristTaxMaxDays, 1, l.GettextNoop("Tourist tax days must be one or greater."))
|
||||||
|
}
|
||||||
|
}
|
||||||
v.CheckSelectedOptions(f.Currency, l.GettextNoop("Selected currency is not valid."))
|
v.CheckSelectedOptions(f.Currency, l.GettextNoop("Selected currency is not valid."))
|
||||||
v.CheckSelectedOptions(f.DefaultLanguage, l.GettextNoop("Selected language is not valid."))
|
v.CheckSelectedOptions(f.DefaultLanguage, l.GettextNoop("Selected language is not valid."))
|
||||||
v.CheckRequired(f.InvoiceNumberFormat, l.GettextNoop("Invoice number format can not be empty."))
|
v.CheckRequired(f.InvoiceNumberFormat, l.GettextNoop("Invoice number format can not be empty."))
|
||||||
|
@ -282,8 +294,9 @@ func editTaxDetails(w http.ResponseWriter, r *http.Request, user *auth.User, com
|
||||||
, invoice_number_format = $14
|
, invoice_number_format = $14
|
||||||
, legal_disclaimer = $15
|
, legal_disclaimer = $15
|
||||||
, rtc_number = $16
|
, rtc_number = $16
|
||||||
, tourist_tax = parse_price($17, $18)
|
, tourist_tax = parse_price($17, $19)
|
||||||
where company_id = $19
|
, tourist_tax_max_days = $18
|
||||||
|
where company_id = $20
|
||||||
`,
|
`,
|
||||||
f.BusinessName,
|
f.BusinessName,
|
||||||
f.VATIN,
|
f.VATIN,
|
||||||
|
@ -302,6 +315,7 @@ func editTaxDetails(w http.ResponseWriter, r *http.Request, user *auth.User, com
|
||||||
f.LegalDisclaimer,
|
f.LegalDisclaimer,
|
||||||
f.RTCNumber,
|
f.RTCNumber,
|
||||||
f.TouristTax,
|
f.TouristTax,
|
||||||
|
f.TouristTaxMaxDays,
|
||||||
company.DecimalDigits,
|
company.DecimalDigits,
|
||||||
company.ID)
|
company.ID)
|
||||||
httplib.Redirect(w, r, "/admin/company", http.StatusSeeOther)
|
httplib.Redirect(w, r, "/admin/company", http.StatusSeeOther)
|
||||||
|
|
79
po/ca.po
79
po/ca.po
|
@ -8,7 +8,7 @@ msgid ""
|
||||||
msgstr ""
|
msgstr ""
|
||||||
"Project-Id-Version: camper\n"
|
"Project-Id-Version: camper\n"
|
||||||
"Report-Msgid-Bugs-To: jordi@tandem.blog\n"
|
"Report-Msgid-Bugs-To: jordi@tandem.blog\n"
|
||||||
"POT-Creation-Date: 2024-02-26 19:11+0100\n"
|
"POT-Creation-Date: 2024-02-27 19:39+0100\n"
|
||||||
"PO-Revision-Date: 2024-02-06 10:04+0100\n"
|
"PO-Revision-Date: 2024-02-06 10:04+0100\n"
|
||||||
"Last-Translator: jordi fita mas <jordi@tandem.blog>\n"
|
"Last-Translator: jordi fita mas <jordi@tandem.blog>\n"
|
||||||
"Language-Team: Catalan <ca@dodds.net>\n"
|
"Language-Team: Catalan <ca@dodds.net>\n"
|
||||||
|
@ -295,8 +295,8 @@ msgid "10 % VAT included."
|
||||||
msgstr "IVA del 10 % inclòs."
|
msgstr "IVA del 10 % inclòs."
|
||||||
|
|
||||||
#: web/templates/public/campsite/type.gohtml:102
|
#: web/templates/public/campsite/type.gohtml:102
|
||||||
msgid "Tourist tax: %s/night per person aged 17 or older."
|
msgid "Tourist tax: %s/night per person aged 17 or older. Maximum %d nights."
|
||||||
msgstr "Impost turístic: %s/nit per persona major de 16 anys."
|
msgstr "Impost turístic: %s/nit per persona major de 16 anys. Màxim %d nits."
|
||||||
|
|
||||||
#: web/templates/public/campsite/type.gohtml:104
|
#: web/templates/public/campsite/type.gohtml:104
|
||||||
msgid "Dogs: %s/night, tied, accompanied, and minimal barking."
|
msgid "Dogs: %s/night, tied, accompanied, and minimal barking."
|
||||||
|
@ -861,7 +861,7 @@ msgstr "Integració"
|
||||||
|
|
||||||
#: web/templates/admin/payment/settings.gohtml:66
|
#: web/templates/admin/payment/settings.gohtml:66
|
||||||
#: web/templates/admin/location.gohtml:53 web/templates/admin/profile.gohtml:78
|
#: web/templates/admin/location.gohtml:53 web/templates/admin/profile.gohtml:78
|
||||||
#: web/templates/admin/taxDetails.gohtml:170
|
#: web/templates/admin/taxDetails.gohtml:179
|
||||||
msgctxt "action"
|
msgctxt "action"
|
||||||
msgid "Save changes"
|
msgid "Save changes"
|
||||||
msgstr "Desa els canvis"
|
msgstr "Desa els canvis"
|
||||||
|
@ -1856,16 +1856,21 @@ msgid "Tourist Tax"
|
||||||
msgstr "Impost turístic"
|
msgstr "Impost turístic"
|
||||||
|
|
||||||
#: web/templates/admin/taxDetails.gohtml:150
|
#: web/templates/admin/taxDetails.gohtml:150
|
||||||
|
msgctxt "input"
|
||||||
|
msgid "Tourist Tax Days"
|
||||||
|
msgstr "Dies de l’impost turístic"
|
||||||
|
|
||||||
|
#: web/templates/admin/taxDetails.gohtml:159
|
||||||
msgctxt "title"
|
msgctxt "title"
|
||||||
msgid "Invoicing"
|
msgid "Invoicing"
|
||||||
msgstr "Facturació"
|
msgstr "Facturació"
|
||||||
|
|
||||||
#: web/templates/admin/taxDetails.gohtml:153
|
#: web/templates/admin/taxDetails.gohtml:162
|
||||||
msgctxt "input"
|
msgctxt "input"
|
||||||
msgid "Invoice Number Format"
|
msgid "Invoice Number Format"
|
||||||
msgstr "Format del número de factura"
|
msgstr "Format del número de factura"
|
||||||
|
|
||||||
#: web/templates/admin/taxDetails.gohtml:161
|
#: web/templates/admin/taxDetails.gohtml:170
|
||||||
msgctxt "input"
|
msgctxt "input"
|
||||||
msgid "Legal Disclaimer"
|
msgid "Legal Disclaimer"
|
||||||
msgstr "Nota legal"
|
msgstr "Nota legal"
|
||||||
|
@ -2271,12 +2276,12 @@ msgstr "No podeu deixar la imatge de la diapositiva en blanc."
|
||||||
msgid "Slide image must be an image media type."
|
msgid "Slide image must be an image media type."
|
||||||
msgstr "La imatge de la diapositiva ha de ser un mèdia de tipus imatge."
|
msgstr "La imatge de la diapositiva ha de ser un mèdia de tipus imatge."
|
||||||
|
|
||||||
#: pkg/app/login.go:56 pkg/app/user.go:246 pkg/company/admin.go:217
|
#: pkg/app/login.go:56 pkg/app/user.go:246 pkg/company/admin.go:224
|
||||||
#: pkg/booking/public.go:536
|
#: pkg/booking/public.go:536
|
||||||
msgid "Email can not be empty."
|
msgid "Email can not be empty."
|
||||||
msgstr "No podeu deixar el correu-e en blanc."
|
msgstr "No podeu deixar el correu-e en blanc."
|
||||||
|
|
||||||
#: pkg/app/login.go:57 pkg/app/user.go:247 pkg/company/admin.go:218
|
#: pkg/app/login.go:57 pkg/app/user.go:247 pkg/company/admin.go:225
|
||||||
#: pkg/booking/public.go:537
|
#: pkg/booking/public.go:537
|
||||||
msgid "This email is not valid. It should be like name@domain.com."
|
msgid "This email is not valid. It should be like name@domain.com."
|
||||||
msgstr "Aquest correu-e no és vàlid. Hauria de ser similar a nom@domini.com."
|
msgstr "Aquest correu-e no és vàlid. Hauria de ser similar a nom@domini.com."
|
||||||
|
@ -2298,7 +2303,7 @@ msgstr "Automàtic"
|
||||||
msgid "Confirmation does not match password."
|
msgid "Confirmation does not match password."
|
||||||
msgstr "La confirmació no es correspon amb la contrasenya."
|
msgstr "La confirmació no es correspon amb la contrasenya."
|
||||||
|
|
||||||
#: pkg/app/user.go:251 pkg/company/admin.go:238
|
#: pkg/app/user.go:251 pkg/company/admin.go:250
|
||||||
msgid "Selected language is not valid."
|
msgid "Selected language is not valid."
|
||||||
msgstr "L’idioma escollit no és vàlid."
|
msgstr "L’idioma escollit no és vàlid."
|
||||||
|
|
||||||
|
@ -2473,17 +2478,17 @@ msgstr "El preu per nen ha de ser un número decimal."
|
||||||
msgid "Price per child must be zero or greater."
|
msgid "Price per child must be zero or greater."
|
||||||
msgstr "El preu per nen ha de ser com a mínim zero."
|
msgstr "El preu per nen ha de ser com a mínim zero."
|
||||||
|
|
||||||
#: pkg/campsite/types/public.go:247
|
#: pkg/campsite/types/public.go:248
|
||||||
msgctxt "header"
|
msgctxt "header"
|
||||||
msgid "Adults"
|
msgid "Adults"
|
||||||
msgstr "Adults"
|
msgstr "Adults"
|
||||||
|
|
||||||
#: pkg/campsite/types/public.go:254
|
#: pkg/campsite/types/public.go:255
|
||||||
msgctxt "header"
|
msgctxt "header"
|
||||||
msgid "Teenagers (aged 11 to 16)"
|
msgid "Teenagers (aged 11 to 16)"
|
||||||
msgstr "Adolescents (entre 11 i 16 anys)"
|
msgstr "Adolescents (entre 11 i 16 anys)"
|
||||||
|
|
||||||
#: pkg/campsite/types/public.go:261
|
#: pkg/campsite/types/public.go:262
|
||||||
msgctxt "header"
|
msgctxt "header"
|
||||||
msgid "Children (aged 2 to 10)"
|
msgid "Children (aged 2 to 10)"
|
||||||
msgstr "Mainada (entre 2 i 10 anys)"
|
msgstr "Mainada (entre 2 i 10 anys)"
|
||||||
|
@ -2641,79 +2646,91 @@ msgstr "No podeu deixar el text de l’enllaç en blanc."
|
||||||
msgid "The ad URL can not be empty"
|
msgid "The ad URL can not be empty"
|
||||||
msgstr "No podeu deixar l’adreça de l’enllaç en blanc."
|
msgstr "No podeu deixar l’adreça de l’enllaç en blanc."
|
||||||
|
|
||||||
#: pkg/surroundings/admin.go:467 pkg/company/admin.go:221
|
#: pkg/surroundings/admin.go:467 pkg/company/admin.go:228
|
||||||
msgid "This web address is not valid. It should be like https://domain.com/."
|
msgid "This web address is not valid. It should be like https://domain.com/."
|
||||||
msgstr "Aquesta adreça web no és vàlida. Hauria de ser similar a https://domini.com/."
|
msgstr "Aquesta adreça web no és vàlida. Hauria de ser similar a https://domini.com/."
|
||||||
|
|
||||||
#: pkg/company/admin.go:200 pkg/booking/public.go:521
|
#: pkg/company/admin.go:207 pkg/booking/public.go:521
|
||||||
msgid "Selected country is not valid."
|
msgid "Selected country is not valid."
|
||||||
msgstr "El país escollit no és vàlid."
|
msgstr "El país escollit no és vàlid."
|
||||||
|
|
||||||
#: pkg/company/admin.go:204
|
#: pkg/company/admin.go:211
|
||||||
msgid "Business name can not be empty."
|
msgid "Business name can not be empty."
|
||||||
msgstr "No podeu deixar el nom d’empresa en blanc."
|
msgstr "No podeu deixar el nom d’empresa en blanc."
|
||||||
|
|
||||||
#: pkg/company/admin.go:205
|
#: pkg/company/admin.go:212
|
||||||
msgid "Business name must have at least two letters."
|
msgid "Business name must have at least two letters."
|
||||||
msgstr "El nom d’empresa ha de tenir com a mínim dues lletres."
|
msgstr "El nom d’empresa ha de tenir com a mínim dues lletres."
|
||||||
|
|
||||||
#: pkg/company/admin.go:207
|
#: pkg/company/admin.go:214
|
||||||
msgid "VAT number can not be empty."
|
msgid "VAT number can not be empty."
|
||||||
msgstr "No podeu deixar el NIF en blanc."
|
msgstr "No podeu deixar el NIF en blanc."
|
||||||
|
|
||||||
#: pkg/company/admin.go:208
|
#: pkg/company/admin.go:215
|
||||||
msgid "This VAT number is not valid."
|
msgid "This VAT number is not valid."
|
||||||
msgstr "Aquest NIF no és vàlid."
|
msgstr "Aquest NIF no és vàlid."
|
||||||
|
|
||||||
#: pkg/company/admin.go:212 pkg/booking/public.go:539
|
#: pkg/company/admin.go:219 pkg/booking/public.go:539
|
||||||
msgid "Phone can not be empty."
|
msgid "Phone can not be empty."
|
||||||
msgstr "No podeu deixar el telèfon en blanc."
|
msgstr "No podeu deixar el telèfon en blanc."
|
||||||
|
|
||||||
#: pkg/company/admin.go:213 pkg/booking/public.go:540
|
#: pkg/company/admin.go:220 pkg/booking/public.go:540
|
||||||
msgid "This phone number is not valid."
|
msgid "This phone number is not valid."
|
||||||
msgstr "Aquest número de telèfon no és vàlid."
|
msgstr "Aquest número de telèfon no és vàlid."
|
||||||
|
|
||||||
#: pkg/company/admin.go:223 pkg/booking/public.go:529
|
#: pkg/company/admin.go:230 pkg/booking/public.go:529
|
||||||
msgid "Address can not be empty."
|
msgid "Address can not be empty."
|
||||||
msgstr "No podeu deixar l’adreça en blanc."
|
msgstr "No podeu deixar l’adreça en blanc."
|
||||||
|
|
||||||
#: pkg/company/admin.go:224
|
#: pkg/company/admin.go:231
|
||||||
msgid "City can not be empty."
|
msgid "City can not be empty."
|
||||||
msgstr "No podeu deixar la població en blanc."
|
msgstr "No podeu deixar la població en blanc."
|
||||||
|
|
||||||
#: pkg/company/admin.go:225
|
#: pkg/company/admin.go:232
|
||||||
msgid "Province can not be empty."
|
msgid "Province can not be empty."
|
||||||
msgstr "No podeu deixar la província en blanc."
|
msgstr "No podeu deixar la província en blanc."
|
||||||
|
|
||||||
#: pkg/company/admin.go:226 pkg/booking/public.go:531
|
#: pkg/company/admin.go:233 pkg/booking/public.go:531
|
||||||
msgid "Postcode can not be empty."
|
msgid "Postcode can not be empty."
|
||||||
msgstr "No podeu deixar el codi postal en blanc."
|
msgstr "No podeu deixar el codi postal en blanc."
|
||||||
|
|
||||||
#: pkg/company/admin.go:227 pkg/booking/public.go:532
|
#: pkg/company/admin.go:234 pkg/booking/public.go:532
|
||||||
msgid "This postcode is not valid."
|
msgid "This postcode is not valid."
|
||||||
msgstr "Aquest codi postal no és vàlid."
|
msgstr "Aquest codi postal no és vàlid."
|
||||||
|
|
||||||
#: pkg/company/admin.go:231
|
#: pkg/company/admin.go:238
|
||||||
msgid "RTC number can not be empty."
|
msgid "RTC number can not be empty."
|
||||||
msgstr "No podeu deixar el número d’RTC en blanc."
|
msgstr "No podeu deixar el número d’RTC en blanc."
|
||||||
|
|
||||||
#: pkg/company/admin.go:232
|
#: pkg/company/admin.go:239
|
||||||
msgid "Tourist tax can not be empty."
|
msgid "Tourist tax can not be empty."
|
||||||
msgstr "No podeu deixar l’impost turístic en blanc."
|
msgstr "No podeu deixar l’impost turístic en blanc."
|
||||||
|
|
||||||
#: pkg/company/admin.go:233
|
#: pkg/company/admin.go:240
|
||||||
msgid "Tourist tax must be a decimal number."
|
msgid "Tourist tax must be a decimal number."
|
||||||
msgstr "L’impost turístic ha de ser un número decimal."
|
msgstr "L’impost turístic ha de ser un número decimal."
|
||||||
|
|
||||||
#: pkg/company/admin.go:234
|
#: pkg/company/admin.go:241
|
||||||
msgid "Tourist tax must be zero or greater."
|
msgid "Tourist tax must be zero or greater."
|
||||||
msgstr "L’impost turístic ha de ser com a mínim zero."
|
msgstr "L’impost turístic ha de ser com a mínim zero."
|
||||||
|
|
||||||
#: pkg/company/admin.go:237
|
#: pkg/company/admin.go:244
|
||||||
|
msgid "Tourist tax days can not be empty."
|
||||||
|
msgstr "No podeu deixar els dies de l’impost turístic en blanc."
|
||||||
|
|
||||||
|
#: pkg/company/admin.go:245
|
||||||
|
msgid "Tourist tax days must be an integer number."
|
||||||
|
msgstr "Els dies de l’impost turístic ha de ser un número enter."
|
||||||
|
|
||||||
|
#: pkg/company/admin.go:246
|
||||||
|
msgid "Tourist tax days must be one or greater."
|
||||||
|
msgstr "Els dies de l’impost turístic ha de ser com a mínim u."
|
||||||
|
|
||||||
|
#: pkg/company/admin.go:249
|
||||||
msgid "Selected currency is not valid."
|
msgid "Selected currency is not valid."
|
||||||
msgstr "La moneda escollida no és vàlida."
|
msgstr "La moneda escollida no és vàlida."
|
||||||
|
|
||||||
#: pkg/company/admin.go:239
|
#: pkg/company/admin.go:251
|
||||||
msgid "Invoice number format can not be empty."
|
msgid "Invoice number format can not be empty."
|
||||||
msgstr "No podeu deixar el format del número de factura en blanc."
|
msgstr "No podeu deixar el format del número de factura en blanc."
|
||||||
|
|
||||||
|
|
79
po/es.po
79
po/es.po
|
@ -8,7 +8,7 @@ msgid ""
|
||||||
msgstr ""
|
msgstr ""
|
||||||
"Project-Id-Version: camper\n"
|
"Project-Id-Version: camper\n"
|
||||||
"Report-Msgid-Bugs-To: jordi@tandem.blog\n"
|
"Report-Msgid-Bugs-To: jordi@tandem.blog\n"
|
||||||
"POT-Creation-Date: 2024-02-26 19:11+0100\n"
|
"POT-Creation-Date: 2024-02-27 19:39+0100\n"
|
||||||
"PO-Revision-Date: 2024-02-06 10:04+0100\n"
|
"PO-Revision-Date: 2024-02-06 10:04+0100\n"
|
||||||
"Last-Translator: jordi fita mas <jordi@tandem.blog>\n"
|
"Last-Translator: jordi fita mas <jordi@tandem.blog>\n"
|
||||||
"Language-Team: Spanish <es@tp.org.es>\n"
|
"Language-Team: Spanish <es@tp.org.es>\n"
|
||||||
|
@ -295,8 +295,8 @@ msgid "10 % VAT included."
|
||||||
msgstr "IVA del 10 % incluido."
|
msgstr "IVA del 10 % incluido."
|
||||||
|
|
||||||
#: web/templates/public/campsite/type.gohtml:102
|
#: web/templates/public/campsite/type.gohtml:102
|
||||||
msgid "Tourist tax: %s/night per person aged 17 or older."
|
msgid "Tourist tax: %s/night per person aged 17 or older. Maximum %d nights."
|
||||||
msgstr "Impuesto turístico: %s/noche por persona mayor de 16 años."
|
msgstr "Impuesto turístico: %s/noche por persona mayor de 16 años. Máximo %d noches."
|
||||||
|
|
||||||
#: web/templates/public/campsite/type.gohtml:104
|
#: web/templates/public/campsite/type.gohtml:104
|
||||||
msgid "Dogs: %s/night, tied, accompanied, and minimal barking."
|
msgid "Dogs: %s/night, tied, accompanied, and minimal barking."
|
||||||
|
@ -861,7 +861,7 @@ msgstr "Integración"
|
||||||
|
|
||||||
#: web/templates/admin/payment/settings.gohtml:66
|
#: web/templates/admin/payment/settings.gohtml:66
|
||||||
#: web/templates/admin/location.gohtml:53 web/templates/admin/profile.gohtml:78
|
#: web/templates/admin/location.gohtml:53 web/templates/admin/profile.gohtml:78
|
||||||
#: web/templates/admin/taxDetails.gohtml:170
|
#: web/templates/admin/taxDetails.gohtml:179
|
||||||
msgctxt "action"
|
msgctxt "action"
|
||||||
msgid "Save changes"
|
msgid "Save changes"
|
||||||
msgstr "Guardar los cambios"
|
msgstr "Guardar los cambios"
|
||||||
|
@ -1856,16 +1856,21 @@ msgid "Tourist Tax"
|
||||||
msgstr "Impuesto turístico"
|
msgstr "Impuesto turístico"
|
||||||
|
|
||||||
#: web/templates/admin/taxDetails.gohtml:150
|
#: web/templates/admin/taxDetails.gohtml:150
|
||||||
|
msgctxt "input"
|
||||||
|
msgid "Tourist Tax Days"
|
||||||
|
msgstr "Días del impuesto turístico"
|
||||||
|
|
||||||
|
#: web/templates/admin/taxDetails.gohtml:159
|
||||||
msgctxt "title"
|
msgctxt "title"
|
||||||
msgid "Invoicing"
|
msgid "Invoicing"
|
||||||
msgstr "Facturación"
|
msgstr "Facturación"
|
||||||
|
|
||||||
#: web/templates/admin/taxDetails.gohtml:153
|
#: web/templates/admin/taxDetails.gohtml:162
|
||||||
msgctxt "input"
|
msgctxt "input"
|
||||||
msgid "Invoice Number Format"
|
msgid "Invoice Number Format"
|
||||||
msgstr "Formato de número de factura"
|
msgstr "Formato de número de factura"
|
||||||
|
|
||||||
#: web/templates/admin/taxDetails.gohtml:161
|
#: web/templates/admin/taxDetails.gohtml:170
|
||||||
msgctxt "input"
|
msgctxt "input"
|
||||||
msgid "Legal Disclaimer"
|
msgid "Legal Disclaimer"
|
||||||
msgstr "Nota legal"
|
msgstr "Nota legal"
|
||||||
|
@ -2271,12 +2276,12 @@ msgstr "No podéis dejar la imagen de la diapositiva en blanco."
|
||||||
msgid "Slide image must be an image media type."
|
msgid "Slide image must be an image media type."
|
||||||
msgstr "La imagen de la diapositiva tiene que ser un medio de tipo imagen."
|
msgstr "La imagen de la diapositiva tiene que ser un medio de tipo imagen."
|
||||||
|
|
||||||
#: pkg/app/login.go:56 pkg/app/user.go:246 pkg/company/admin.go:217
|
#: pkg/app/login.go:56 pkg/app/user.go:246 pkg/company/admin.go:224
|
||||||
#: pkg/booking/public.go:536
|
#: pkg/booking/public.go:536
|
||||||
msgid "Email can not be empty."
|
msgid "Email can not be empty."
|
||||||
msgstr "No podéis dejar el correo-e en blanco."
|
msgstr "No podéis dejar el correo-e en blanco."
|
||||||
|
|
||||||
#: pkg/app/login.go:57 pkg/app/user.go:247 pkg/company/admin.go:218
|
#: pkg/app/login.go:57 pkg/app/user.go:247 pkg/company/admin.go:225
|
||||||
#: pkg/booking/public.go:537
|
#: pkg/booking/public.go:537
|
||||||
msgid "This email is not valid. It should be like name@domain.com."
|
msgid "This email is not valid. It should be like name@domain.com."
|
||||||
msgstr "Este correo-e no es válido. Tiene que ser parecido a nombre@dominio.com."
|
msgstr "Este correo-e no es válido. Tiene que ser parecido a nombre@dominio.com."
|
||||||
|
@ -2298,7 +2303,7 @@ msgstr "Automático"
|
||||||
msgid "Confirmation does not match password."
|
msgid "Confirmation does not match password."
|
||||||
msgstr "La confirmación no se corresponde con la contraseña."
|
msgstr "La confirmación no se corresponde con la contraseña."
|
||||||
|
|
||||||
#: pkg/app/user.go:251 pkg/company/admin.go:238
|
#: pkg/app/user.go:251 pkg/company/admin.go:250
|
||||||
msgid "Selected language is not valid."
|
msgid "Selected language is not valid."
|
||||||
msgstr "El idioma escogido no es válido."
|
msgstr "El idioma escogido no es válido."
|
||||||
|
|
||||||
|
@ -2473,17 +2478,17 @@ msgstr "El precio por niño tiene que ser un número decimal."
|
||||||
msgid "Price per child must be zero or greater."
|
msgid "Price per child must be zero or greater."
|
||||||
msgstr "El precio por niño tiene que ser como mínimo cero."
|
msgstr "El precio por niño tiene que ser como mínimo cero."
|
||||||
|
|
||||||
#: pkg/campsite/types/public.go:247
|
#: pkg/campsite/types/public.go:248
|
||||||
msgctxt "header"
|
msgctxt "header"
|
||||||
msgid "Adults"
|
msgid "Adults"
|
||||||
msgstr "Adultos"
|
msgstr "Adultos"
|
||||||
|
|
||||||
#: pkg/campsite/types/public.go:254
|
#: pkg/campsite/types/public.go:255
|
||||||
msgctxt "header"
|
msgctxt "header"
|
||||||
msgid "Teenagers (aged 11 to 16)"
|
msgid "Teenagers (aged 11 to 16)"
|
||||||
msgstr "Adolescentes (de 11 a 16 años)"
|
msgstr "Adolescentes (de 11 a 16 años)"
|
||||||
|
|
||||||
#: pkg/campsite/types/public.go:261
|
#: pkg/campsite/types/public.go:262
|
||||||
msgctxt "header"
|
msgctxt "header"
|
||||||
msgid "Children (aged 2 to 10)"
|
msgid "Children (aged 2 to 10)"
|
||||||
msgstr "Niños (de 2 a 10 años)"
|
msgstr "Niños (de 2 a 10 años)"
|
||||||
|
@ -2641,79 +2646,91 @@ msgstr "No podéis dejar el texto del enlace en blanco."
|
||||||
msgid "The ad URL can not be empty"
|
msgid "The ad URL can not be empty"
|
||||||
msgstr "No podéis dejar la dirección del enlace en blanco."
|
msgstr "No podéis dejar la dirección del enlace en blanco."
|
||||||
|
|
||||||
#: pkg/surroundings/admin.go:467 pkg/company/admin.go:221
|
#: pkg/surroundings/admin.go:467 pkg/company/admin.go:228
|
||||||
msgid "This web address is not valid. It should be like https://domain.com/."
|
msgid "This web address is not valid. It should be like https://domain.com/."
|
||||||
msgstr "Esta dirección web no es válida. Tiene que ser parecido a https://dominio.com/."
|
msgstr "Esta dirección web no es válida. Tiene que ser parecido a https://dominio.com/."
|
||||||
|
|
||||||
#: pkg/company/admin.go:200 pkg/booking/public.go:521
|
#: pkg/company/admin.go:207 pkg/booking/public.go:521
|
||||||
msgid "Selected country is not valid."
|
msgid "Selected country is not valid."
|
||||||
msgstr "El país escogido no es válido."
|
msgstr "El país escogido no es válido."
|
||||||
|
|
||||||
#: pkg/company/admin.go:204
|
#: pkg/company/admin.go:211
|
||||||
msgid "Business name can not be empty."
|
msgid "Business name can not be empty."
|
||||||
msgstr "No podéis dejar el nombre de empresa en blanco."
|
msgstr "No podéis dejar el nombre de empresa en blanco."
|
||||||
|
|
||||||
#: pkg/company/admin.go:205
|
#: pkg/company/admin.go:212
|
||||||
msgid "Business name must have at least two letters."
|
msgid "Business name must have at least two letters."
|
||||||
msgstr "El nombre de la empresa tiene que tener como mínimo dos letras."
|
msgstr "El nombre de la empresa tiene que tener como mínimo dos letras."
|
||||||
|
|
||||||
#: pkg/company/admin.go:207
|
#: pkg/company/admin.go:214
|
||||||
msgid "VAT number can not be empty."
|
msgid "VAT number can not be empty."
|
||||||
msgstr "No podéis dejar el NIF en blanco."
|
msgstr "No podéis dejar el NIF en blanco."
|
||||||
|
|
||||||
#: pkg/company/admin.go:208
|
#: pkg/company/admin.go:215
|
||||||
msgid "This VAT number is not valid."
|
msgid "This VAT number is not valid."
|
||||||
msgstr "Este NIF no es válido."
|
msgstr "Este NIF no es válido."
|
||||||
|
|
||||||
#: pkg/company/admin.go:212 pkg/booking/public.go:539
|
#: pkg/company/admin.go:219 pkg/booking/public.go:539
|
||||||
msgid "Phone can not be empty."
|
msgid "Phone can not be empty."
|
||||||
msgstr "No podéis dejar el teléfono en blanco."
|
msgstr "No podéis dejar el teléfono en blanco."
|
||||||
|
|
||||||
#: pkg/company/admin.go:213 pkg/booking/public.go:540
|
#: pkg/company/admin.go:220 pkg/booking/public.go:540
|
||||||
msgid "This phone number is not valid."
|
msgid "This phone number is not valid."
|
||||||
msgstr "Este teléfono no es válido."
|
msgstr "Este teléfono no es válido."
|
||||||
|
|
||||||
#: pkg/company/admin.go:223 pkg/booking/public.go:529
|
#: pkg/company/admin.go:230 pkg/booking/public.go:529
|
||||||
msgid "Address can not be empty."
|
msgid "Address can not be empty."
|
||||||
msgstr "No podéis dejar la dirección en blanco."
|
msgstr "No podéis dejar la dirección en blanco."
|
||||||
|
|
||||||
#: pkg/company/admin.go:224
|
#: pkg/company/admin.go:231
|
||||||
msgid "City can not be empty."
|
msgid "City can not be empty."
|
||||||
msgstr "No podéis dejar la población en blanco."
|
msgstr "No podéis dejar la población en blanco."
|
||||||
|
|
||||||
#: pkg/company/admin.go:225
|
#: pkg/company/admin.go:232
|
||||||
msgid "Province can not be empty."
|
msgid "Province can not be empty."
|
||||||
msgstr "No podéis dejar la provincia en blanco."
|
msgstr "No podéis dejar la provincia en blanco."
|
||||||
|
|
||||||
#: pkg/company/admin.go:226 pkg/booking/public.go:531
|
#: pkg/company/admin.go:233 pkg/booking/public.go:531
|
||||||
msgid "Postcode can not be empty."
|
msgid "Postcode can not be empty."
|
||||||
msgstr "No podéis dejar el código postal en blanco."
|
msgstr "No podéis dejar el código postal en blanco."
|
||||||
|
|
||||||
#: pkg/company/admin.go:227 pkg/booking/public.go:532
|
#: pkg/company/admin.go:234 pkg/booking/public.go:532
|
||||||
msgid "This postcode is not valid."
|
msgid "This postcode is not valid."
|
||||||
msgstr "Este código postal no es válido."
|
msgstr "Este código postal no es válido."
|
||||||
|
|
||||||
#: pkg/company/admin.go:231
|
#: pkg/company/admin.go:238
|
||||||
msgid "RTC number can not be empty."
|
msgid "RTC number can not be empty."
|
||||||
msgstr "No podéis dejar el número RTC en blanco."
|
msgstr "No podéis dejar el número RTC en blanco."
|
||||||
|
|
||||||
#: pkg/company/admin.go:232
|
#: pkg/company/admin.go:239
|
||||||
msgid "Tourist tax can not be empty."
|
msgid "Tourist tax can not be empty."
|
||||||
msgstr "No podéis dejar el impuesto turístico en blanco."
|
msgstr "No podéis dejar el impuesto turístico en blanco."
|
||||||
|
|
||||||
#: pkg/company/admin.go:233
|
#: pkg/company/admin.go:240
|
||||||
msgid "Tourist tax must be a decimal number."
|
msgid "Tourist tax must be a decimal number."
|
||||||
msgstr "El impuesto turístico tiene que ser un número decimal."
|
msgstr "El impuesto turístico tiene que ser un número decimal."
|
||||||
|
|
||||||
#: pkg/company/admin.go:234
|
#: pkg/company/admin.go:241
|
||||||
msgid "Tourist tax must be zero or greater."
|
msgid "Tourist tax must be zero or greater."
|
||||||
msgstr "El impuesto turístico tiene que ser como mínimo cero."
|
msgstr "El impuesto turístico tiene que ser como mínimo cero."
|
||||||
|
|
||||||
#: pkg/company/admin.go:237
|
#: pkg/company/admin.go:244
|
||||||
|
msgid "Tourist tax days can not be empty."
|
||||||
|
msgstr "No podéis dejar el números de días del impuesto turístico en blanco."
|
||||||
|
|
||||||
|
#: pkg/company/admin.go:245
|
||||||
|
msgid "Tourist tax days must be an integer number."
|
||||||
|
msgstr "El números de días de impuesto turístico tiene que ser un número entero."
|
||||||
|
|
||||||
|
#: pkg/company/admin.go:246
|
||||||
|
msgid "Tourist tax days must be one or greater."
|
||||||
|
msgstr "El número de días del impuesto turístico tiene que ser como mínimo uno."
|
||||||
|
|
||||||
|
#: pkg/company/admin.go:249
|
||||||
msgid "Selected currency is not valid."
|
msgid "Selected currency is not valid."
|
||||||
msgstr "La moneda escogida no es válida."
|
msgstr "La moneda escogida no es válida."
|
||||||
|
|
||||||
#: pkg/company/admin.go:239
|
#: pkg/company/admin.go:251
|
||||||
msgid "Invoice number format can not be empty."
|
msgid "Invoice number format can not be empty."
|
||||||
msgstr "No podéis dejar el formato de número de factura en blanco."
|
msgstr "No podéis dejar el formato de número de factura en blanco."
|
||||||
|
|
||||||
|
|
79
po/fr.po
79
po/fr.po
|
@ -8,7 +8,7 @@ msgid ""
|
||||||
msgstr ""
|
msgstr ""
|
||||||
"Project-Id-Version: camper\n"
|
"Project-Id-Version: camper\n"
|
||||||
"Report-Msgid-Bugs-To: jordi@tandem.blog\n"
|
"Report-Msgid-Bugs-To: jordi@tandem.blog\n"
|
||||||
"POT-Creation-Date: 2024-02-26 19:11+0100\n"
|
"POT-Creation-Date: 2024-02-27 19:39+0100\n"
|
||||||
"PO-Revision-Date: 2024-02-06 10:05+0100\n"
|
"PO-Revision-Date: 2024-02-06 10:05+0100\n"
|
||||||
"Last-Translator: Oriol Carbonell <info@oriolcarbonell.cat>\n"
|
"Last-Translator: Oriol Carbonell <info@oriolcarbonell.cat>\n"
|
||||||
"Language-Team: French <traduc@traduc.org>\n"
|
"Language-Team: French <traduc@traduc.org>\n"
|
||||||
|
@ -295,8 +295,8 @@ msgid "10 % VAT included."
|
||||||
msgstr "10 % TVA incluse."
|
msgstr "10 % TVA incluse."
|
||||||
|
|
||||||
#: web/templates/public/campsite/type.gohtml:102
|
#: web/templates/public/campsite/type.gohtml:102
|
||||||
msgid "Tourist tax: %s/night per person aged 17 or older."
|
msgid "Tourist tax: %s/night per person aged 17 or older. Maximum %d nights."
|
||||||
msgstr "Taxe touristique: %s/nuit par personne de plus de 16 ans."
|
msgstr "Taxe touristique: %s/nuit par personne de plus de 16 ans. Maximum %d nuits."
|
||||||
|
|
||||||
#: web/templates/public/campsite/type.gohtml:104
|
#: web/templates/public/campsite/type.gohtml:104
|
||||||
msgid "Dogs: %s/night, tied, accompanied, and minimal barking."
|
msgid "Dogs: %s/night, tied, accompanied, and minimal barking."
|
||||||
|
@ -861,7 +861,7 @@ msgstr "Intégration"
|
||||||
|
|
||||||
#: web/templates/admin/payment/settings.gohtml:66
|
#: web/templates/admin/payment/settings.gohtml:66
|
||||||
#: web/templates/admin/location.gohtml:53 web/templates/admin/profile.gohtml:78
|
#: web/templates/admin/location.gohtml:53 web/templates/admin/profile.gohtml:78
|
||||||
#: web/templates/admin/taxDetails.gohtml:170
|
#: web/templates/admin/taxDetails.gohtml:179
|
||||||
msgctxt "action"
|
msgctxt "action"
|
||||||
msgid "Save changes"
|
msgid "Save changes"
|
||||||
msgstr "Enregistrer les changements"
|
msgstr "Enregistrer les changements"
|
||||||
|
@ -1856,16 +1856,21 @@ msgid "Tourist Tax"
|
||||||
msgstr "Taxe touristique"
|
msgstr "Taxe touristique"
|
||||||
|
|
||||||
#: web/templates/admin/taxDetails.gohtml:150
|
#: web/templates/admin/taxDetails.gohtml:150
|
||||||
|
msgctxt "input"
|
||||||
|
msgid "Tourist Tax Days"
|
||||||
|
msgstr "Journées de la taxe touristique"
|
||||||
|
|
||||||
|
#: web/templates/admin/taxDetails.gohtml:159
|
||||||
msgctxt "title"
|
msgctxt "title"
|
||||||
msgid "Invoicing"
|
msgid "Invoicing"
|
||||||
msgstr "Facturation"
|
msgstr "Facturation"
|
||||||
|
|
||||||
#: web/templates/admin/taxDetails.gohtml:153
|
#: web/templates/admin/taxDetails.gohtml:162
|
||||||
msgctxt "input"
|
msgctxt "input"
|
||||||
msgid "Invoice Number Format"
|
msgid "Invoice Number Format"
|
||||||
msgstr "Format de numéro de facture"
|
msgstr "Format de numéro de facture"
|
||||||
|
|
||||||
#: web/templates/admin/taxDetails.gohtml:161
|
#: web/templates/admin/taxDetails.gohtml:170
|
||||||
msgctxt "input"
|
msgctxt "input"
|
||||||
msgid "Legal Disclaimer"
|
msgid "Legal Disclaimer"
|
||||||
msgstr "Avertissement juridique"
|
msgstr "Avertissement juridique"
|
||||||
|
@ -2271,12 +2276,12 @@ msgstr "L’image de la diapositive ne peut pas être vide."
|
||||||
msgid "Slide image must be an image media type."
|
msgid "Slide image must be an image media type."
|
||||||
msgstr "L’image de la diapositive doit être de type média d’image."
|
msgstr "L’image de la diapositive doit être de type média d’image."
|
||||||
|
|
||||||
#: pkg/app/login.go:56 pkg/app/user.go:246 pkg/company/admin.go:217
|
#: pkg/app/login.go:56 pkg/app/user.go:246 pkg/company/admin.go:224
|
||||||
#: pkg/booking/public.go:536
|
#: pkg/booking/public.go:536
|
||||||
msgid "Email can not be empty."
|
msgid "Email can not be empty."
|
||||||
msgstr "L’e-mail ne peut pas être vide."
|
msgstr "L’e-mail ne peut pas être vide."
|
||||||
|
|
||||||
#: pkg/app/login.go:57 pkg/app/user.go:247 pkg/company/admin.go:218
|
#: pkg/app/login.go:57 pkg/app/user.go:247 pkg/company/admin.go:225
|
||||||
#: pkg/booking/public.go:537
|
#: pkg/booking/public.go:537
|
||||||
msgid "This email is not valid. It should be like name@domain.com."
|
msgid "This email is not valid. It should be like name@domain.com."
|
||||||
msgstr "Cette adresse e-mail n’est pas valide. Il devrait en être name@domain.com."
|
msgstr "Cette adresse e-mail n’est pas valide. Il devrait en être name@domain.com."
|
||||||
|
@ -2298,7 +2303,7 @@ msgstr "Automatique"
|
||||||
msgid "Confirmation does not match password."
|
msgid "Confirmation does not match password."
|
||||||
msgstr "La confirmation ne correspond pas au mot de passe."
|
msgstr "La confirmation ne correspond pas au mot de passe."
|
||||||
|
|
||||||
#: pkg/app/user.go:251 pkg/company/admin.go:238
|
#: pkg/app/user.go:251 pkg/company/admin.go:250
|
||||||
msgid "Selected language is not valid."
|
msgid "Selected language is not valid."
|
||||||
msgstr "La langue sélectionnée n’est pas valide."
|
msgstr "La langue sélectionnée n’est pas valide."
|
||||||
|
|
||||||
|
@ -2473,17 +2478,17 @@ msgstr "Le prix par enfant doit être un nombre décimal."
|
||||||
msgid "Price per child must be zero or greater."
|
msgid "Price per child must be zero or greater."
|
||||||
msgstr "Le prix par enfant doit être égal ou supérieur."
|
msgstr "Le prix par enfant doit être égal ou supérieur."
|
||||||
|
|
||||||
#: pkg/campsite/types/public.go:247
|
#: pkg/campsite/types/public.go:248
|
||||||
msgctxt "header"
|
msgctxt "header"
|
||||||
msgid "Adults"
|
msgid "Adults"
|
||||||
msgstr "Adultes"
|
msgstr "Adultes"
|
||||||
|
|
||||||
#: pkg/campsite/types/public.go:254
|
#: pkg/campsite/types/public.go:255
|
||||||
msgctxt "header"
|
msgctxt "header"
|
||||||
msgid "Teenagers (aged 11 to 16)"
|
msgid "Teenagers (aged 11 to 16)"
|
||||||
msgstr "Adolescents (de 11 à 16 anys)"
|
msgstr "Adolescents (de 11 à 16 anys)"
|
||||||
|
|
||||||
#: pkg/campsite/types/public.go:261
|
#: pkg/campsite/types/public.go:262
|
||||||
msgctxt "header"
|
msgctxt "header"
|
||||||
msgid "Children (aged 2 to 10)"
|
msgid "Children (aged 2 to 10)"
|
||||||
msgstr "Enfants (de 2 à 10 anys)"
|
msgstr "Enfants (de 2 à 10 anys)"
|
||||||
|
@ -2641,79 +2646,91 @@ msgstr "Le texte du lien ne peut pas être vide."
|
||||||
msgid "The ad URL can not be empty"
|
msgid "The ad URL can not be empty"
|
||||||
msgstr "L’addresse du lien ne peut pas être vide."
|
msgstr "L’addresse du lien ne peut pas être vide."
|
||||||
|
|
||||||
#: pkg/surroundings/admin.go:467 pkg/company/admin.go:221
|
#: pkg/surroundings/admin.go:467 pkg/company/admin.go:228
|
||||||
msgid "This web address is not valid. It should be like https://domain.com/."
|
msgid "This web address is not valid. It should be like https://domain.com/."
|
||||||
msgstr "Cette adresse web n’est pas valide. Il devrait en être https://domain.com/."
|
msgstr "Cette adresse web n’est pas valide. Il devrait en être https://domain.com/."
|
||||||
|
|
||||||
#: pkg/company/admin.go:200 pkg/booking/public.go:521
|
#: pkg/company/admin.go:207 pkg/booking/public.go:521
|
||||||
msgid "Selected country is not valid."
|
msgid "Selected country is not valid."
|
||||||
msgstr "Le pays sélectionné n’est pas valide."
|
msgstr "Le pays sélectionné n’est pas valide."
|
||||||
|
|
||||||
#: pkg/company/admin.go:204
|
#: pkg/company/admin.go:211
|
||||||
msgid "Business name can not be empty."
|
msgid "Business name can not be empty."
|
||||||
msgstr "Le nom de l’entreprise ne peut pas être vide."
|
msgstr "Le nom de l’entreprise ne peut pas être vide."
|
||||||
|
|
||||||
#: pkg/company/admin.go:205
|
#: pkg/company/admin.go:212
|
||||||
msgid "Business name must have at least two letters."
|
msgid "Business name must have at least two letters."
|
||||||
msgstr "Le nom de l’entreprise doit comporter au moins deux lettres."
|
msgstr "Le nom de l’entreprise doit comporter au moins deux lettres."
|
||||||
|
|
||||||
#: pkg/company/admin.go:207
|
#: pkg/company/admin.go:214
|
||||||
msgid "VAT number can not be empty."
|
msgid "VAT number can not be empty."
|
||||||
msgstr "Le numéro de TVA ne peut pas être vide."
|
msgstr "Le numéro de TVA ne peut pas être vide."
|
||||||
|
|
||||||
#: pkg/company/admin.go:208
|
#: pkg/company/admin.go:215
|
||||||
msgid "This VAT number is not valid."
|
msgid "This VAT number is not valid."
|
||||||
msgstr "Ce numéro de TVA n’est pas valide."
|
msgstr "Ce numéro de TVA n’est pas valide."
|
||||||
|
|
||||||
#: pkg/company/admin.go:212 pkg/booking/public.go:539
|
#: pkg/company/admin.go:219 pkg/booking/public.go:539
|
||||||
msgid "Phone can not be empty."
|
msgid "Phone can not be empty."
|
||||||
msgstr "Le téléphone ne peut pas être vide."
|
msgstr "Le téléphone ne peut pas être vide."
|
||||||
|
|
||||||
#: pkg/company/admin.go:213 pkg/booking/public.go:540
|
#: pkg/company/admin.go:220 pkg/booking/public.go:540
|
||||||
msgid "This phone number is not valid."
|
msgid "This phone number is not valid."
|
||||||
msgstr "Ce numéro de téléphone n’est pas valide."
|
msgstr "Ce numéro de téléphone n’est pas valide."
|
||||||
|
|
||||||
#: pkg/company/admin.go:223 pkg/booking/public.go:529
|
#: pkg/company/admin.go:230 pkg/booking/public.go:529
|
||||||
msgid "Address can not be empty."
|
msgid "Address can not be empty."
|
||||||
msgstr "L’adresse ne peut pas être vide."
|
msgstr "L’adresse ne peut pas être vide."
|
||||||
|
|
||||||
#: pkg/company/admin.go:224
|
#: pkg/company/admin.go:231
|
||||||
msgid "City can not be empty."
|
msgid "City can not be empty."
|
||||||
msgstr "La ville ne peut pas être vide."
|
msgstr "La ville ne peut pas être vide."
|
||||||
|
|
||||||
#: pkg/company/admin.go:225
|
#: pkg/company/admin.go:232
|
||||||
msgid "Province can not be empty."
|
msgid "Province can not be empty."
|
||||||
msgstr "La province ne peut pas être vide."
|
msgstr "La province ne peut pas être vide."
|
||||||
|
|
||||||
#: pkg/company/admin.go:226 pkg/booking/public.go:531
|
#: pkg/company/admin.go:233 pkg/booking/public.go:531
|
||||||
msgid "Postcode can not be empty."
|
msgid "Postcode can not be empty."
|
||||||
msgstr "Le code postal ne peut pas être vide."
|
msgstr "Le code postal ne peut pas être vide."
|
||||||
|
|
||||||
#: pkg/company/admin.go:227 pkg/booking/public.go:532
|
#: pkg/company/admin.go:234 pkg/booking/public.go:532
|
||||||
msgid "This postcode is not valid."
|
msgid "This postcode is not valid."
|
||||||
msgstr "Ce code postal n’est pas valide."
|
msgstr "Ce code postal n’est pas valide."
|
||||||
|
|
||||||
#: pkg/company/admin.go:231
|
#: pkg/company/admin.go:238
|
||||||
msgid "RTC number can not be empty."
|
msgid "RTC number can not be empty."
|
||||||
msgstr "Le numéro RTC ne peut pas être vide."
|
msgstr "Le numéro RTC ne peut pas être vide."
|
||||||
|
|
||||||
#: pkg/company/admin.go:232
|
#: pkg/company/admin.go:239
|
||||||
msgid "Tourist tax can not be empty."
|
msgid "Tourist tax can not be empty."
|
||||||
msgstr "La taxe touristique ne peut pas être vide."
|
msgstr "La taxe touristique ne peut pas être vide."
|
||||||
|
|
||||||
#: pkg/company/admin.go:233
|
#: pkg/company/admin.go:240
|
||||||
msgid "Tourist tax must be a decimal number."
|
msgid "Tourist tax must be a decimal number."
|
||||||
msgstr "La taxe touristique doit être un nombre décimal."
|
msgstr "La taxe touristique doit être un nombre décimal."
|
||||||
|
|
||||||
#: pkg/company/admin.go:234
|
#: pkg/company/admin.go:241
|
||||||
msgid "Tourist tax must be zero or greater."
|
msgid "Tourist tax must be zero or greater."
|
||||||
msgstr "La taxe touristique doit être égal ou supérieur à zéro."
|
msgstr "La taxe touristique doit être égal ou supérieur à zéro."
|
||||||
|
|
||||||
#: pkg/company/admin.go:237
|
#: pkg/company/admin.go:244
|
||||||
|
msgid "Tourist tax days can not be empty."
|
||||||
|
msgstr "Les journées de la taxe touristique ne peut pas être vide."
|
||||||
|
|
||||||
|
#: pkg/company/admin.go:245
|
||||||
|
msgid "Tourist tax days must be an integer number."
|
||||||
|
msgstr "Les journées de la taxe touristique doit être un nombre entier."
|
||||||
|
|
||||||
|
#: pkg/company/admin.go:246
|
||||||
|
msgid "Tourist tax days must be one or greater."
|
||||||
|
msgstr "Les journées de la taxe touristique doit être supérieur à zéro."
|
||||||
|
|
||||||
|
#: pkg/company/admin.go:249
|
||||||
msgid "Selected currency is not valid."
|
msgid "Selected currency is not valid."
|
||||||
msgstr "La devise sélectionnée n’est pas valide."
|
msgstr "La devise sélectionnée n’est pas valide."
|
||||||
|
|
||||||
#: pkg/company/admin.go:239
|
#: pkg/company/admin.go:251
|
||||||
msgid "Invoice number format can not be empty."
|
msgid "Invoice number format can not be empty."
|
||||||
msgstr "Le format du numéro de facture ne peut pas être vide."
|
msgstr "Le format du numéro de facture ne peut pas être vide."
|
||||||
|
|
||||||
|
|
|
@ -0,0 +1,9 @@
|
||||||
|
-- Revert camper:company__tourist_tax_max_days from pg
|
||||||
|
|
||||||
|
begin;
|
||||||
|
|
||||||
|
alter table camper.company
|
||||||
|
drop column if exists tourist_tax_max_days
|
||||||
|
;
|
||||||
|
|
||||||
|
commit;
|
|
@ -1,9 +1,168 @@
|
||||||
-- Revert camper:draft_payment from pg
|
-- Deploy camper:draft_payment to pg
|
||||||
|
-- requires: roles
|
||||||
|
-- requires: schema_camper
|
||||||
|
-- requires: season_calendar
|
||||||
|
-- requires: season
|
||||||
|
-- requires: campsite_type
|
||||||
|
-- requires: campsite_type_pet_cost
|
||||||
|
-- requires: campsite_type_cost
|
||||||
|
-- requires: campsite_type_option_cost
|
||||||
|
-- requires: campsite_type_option
|
||||||
|
-- requires: payment
|
||||||
|
-- requires: payment_option
|
||||||
|
|
||||||
begin;
|
begin;
|
||||||
|
|
||||||
drop function if exists camper.draft_payment(uuid, date, date, uuid, integer, integer, integer, integer, text, camper.option_units[]);
|
set search_path to camper, public;
|
||||||
|
|
||||||
drop type if exists camper.option_units;
|
create or replace function draft_payment(payment_slug uuid, arrival_date date, departure_date date, campsite_type_slug uuid, num_adults integer, num_teenagers integer, num_children integer, num_dogs integer, zone_preferences text, options option_units[]) returns payment as
|
||||||
|
$$
|
||||||
|
declare
|
||||||
|
p payment;
|
||||||
|
begin
|
||||||
|
if exists(select 1 from payment where slug = payment_slug and payment_status <> 'draft') then
|
||||||
|
payment_slug = null;
|
||||||
|
end if;
|
||||||
|
insert into payment (
|
||||||
|
slug
|
||||||
|
, company_id
|
||||||
|
, 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
|
||||||
|
)
|
||||||
|
select coalesce(payment_slug, gen_random_uuid())
|
||||||
|
, company_id
|
||||||
|
, campsite_type_id
|
||||||
|
, arrival_date
|
||||||
|
, departure_date
|
||||||
|
, sum(cost.cost_per_night * ceiling((num_adults::numeric + num_teenagers::numeric + num_children::numeric) / max_campers::numeric)::integer)::integer
|
||||||
|
, num_adults
|
||||||
|
, sum(cost_per_adult * num_adults)::integer
|
||||||
|
, num_teenagers
|
||||||
|
, sum(cost_per_teenager * num_teenagers)::integer
|
||||||
|
, num_children
|
||||||
|
, sum(cost_per_child * num_children)::integer
|
||||||
|
, num_dogs
|
||||||
|
, sum(case when num_dogs > 0 then coalesce(pet.cost_per_night, 0) else 0 end)::integer
|
||||||
|
, sum(tourist_tax * num_adults)::integer
|
||||||
|
, 0
|
||||||
|
, currency_code
|
||||||
|
, case when arrival_date - current_date >= 7 then 0.3 else 1.0 end
|
||||||
|
, coalesce(zone_preferences, '')
|
||||||
|
from generate_series(arrival_date, departure_date - 1, interval '1 day') as date(day)
|
||||||
|
left join season_calendar on season_range @> date.day::date
|
||||||
|
left join season using (season_id)
|
||||||
|
left join campsite_type using (company_id)
|
||||||
|
left join campsite_type_pet_cost as pet using (campsite_type_id)
|
||||||
|
left join campsite_type_cost as cost using (campsite_type_id, season_id)
|
||||||
|
left join company using (company_id)
|
||||||
|
where campsite_type.slug = campsite_type_slug
|
||||||
|
group by company_id
|
||||||
|
, campsite_type_id
|
||||||
|
, currency_code
|
||||||
|
on conflict (slug) do update
|
||||||
|
set company_id = excluded.company_id
|
||||||
|
, campsite_type_id = excluded.campsite_type_id
|
||||||
|
, arrival_date = excluded.arrival_date
|
||||||
|
, departure_date = excluded.departure_date
|
||||||
|
, subtotal_nights = excluded.subtotal_nights
|
||||||
|
, number_adults = excluded.number_adults
|
||||||
|
, subtotal_adults = excluded.subtotal_adults
|
||||||
|
, number_teenagers = excluded.number_teenagers
|
||||||
|
, subtotal_teenagers = excluded.subtotal_teenagers
|
||||||
|
, number_children = excluded.number_children
|
||||||
|
, subtotal_children = excluded.subtotal_children
|
||||||
|
, number_dogs = excluded.number_dogs
|
||||||
|
, subtotal_dogs = excluded.subtotal_dogs
|
||||||
|
, subtotal_tourist_tax = excluded.subtotal_tourist_tax
|
||||||
|
, total = excluded.total
|
||||||
|
, currency_code = excluded.currency_code
|
||||||
|
, down_payment_percent = excluded.down_payment_percent
|
||||||
|
, zone_preferences = excluded.zone_preferences
|
||||||
|
, updated_at = current_timestamp
|
||||||
|
returning *
|
||||||
|
into p
|
||||||
|
;
|
||||||
|
|
||||||
|
if array_length(coalesce(options, array[]::option_units[]), 1) > 0 then
|
||||||
|
delete
|
||||||
|
from payment_option
|
||||||
|
where payment_id = p.payment_id
|
||||||
|
and campsite_type_option_id not in (
|
||||||
|
select campsite_type_option_id
|
||||||
|
from unnest(options) as option(campsite_type_option_id, units)
|
||||||
|
);
|
||||||
|
|
||||||
|
insert into payment_option (
|
||||||
|
payment_id
|
||||||
|
, campsite_type_option_id
|
||||||
|
, units
|
||||||
|
, subtotal
|
||||||
|
)
|
||||||
|
select p.payment_id
|
||||||
|
, campsite_type_option_id
|
||||||
|
, units
|
||||||
|
, case when per_night then sum(cost * units)::integer else max(cost * units)::integer end
|
||||||
|
from generate_series(arrival_date, departure_date - 1, interval '1 day') as date(day)
|
||||||
|
join season_calendar on season_range @> date.day::date
|
||||||
|
join campsite_type_option_cost using (season_id)
|
||||||
|
join campsite_type_option using (campsite_type_option_id)
|
||||||
|
join unnest(options) as option(campsite_type_option_id, units) using (campsite_type_option_id)
|
||||||
|
group by campsite_type_option_id
|
||||||
|
, units
|
||||||
|
, per_night
|
||||||
|
on conflict (payment_id, campsite_type_option_id) do update
|
||||||
|
set units = excluded.units
|
||||||
|
, subtotal = excluded.subtotal
|
||||||
|
;
|
||||||
|
|
||||||
|
with option as (
|
||||||
|
select sum(subtotal)::integer as subtotal
|
||||||
|
from payment_option
|
||||||
|
where payment_id = p.payment_id
|
||||||
|
)
|
||||||
|
update payment
|
||||||
|
set total = subtotal_nights + subtotal_adults + subtotal_teenagers + subtotal_children + subtotal_dogs + subtotal_tourist_tax + coalesce(option.subtotal, 0)
|
||||||
|
from option
|
||||||
|
where payment_id = p.payment_id
|
||||||
|
returning total into p.total
|
||||||
|
;
|
||||||
|
else
|
||||||
|
delete
|
||||||
|
from payment_option
|
||||||
|
where payment_id = p.payment_id;
|
||||||
|
|
||||||
|
update payment
|
||||||
|
set total = subtotal_nights + subtotal_adults + subtotal_teenagers + subtotal_children + subtotal_dogs + subtotal_tourist_tax
|
||||||
|
where payment_id = p.payment_id
|
||||||
|
returning total into p.total
|
||||||
|
;
|
||||||
|
end if;
|
||||||
|
|
||||||
|
|
||||||
|
return p;
|
||||||
|
end;
|
||||||
|
$$
|
||||||
|
language plpgsql
|
||||||
|
;
|
||||||
|
|
||||||
|
revoke execute on function draft_payment(uuid, date, date, uuid, integer, integer, integer, integer, text, option_units[]) from public;
|
||||||
|
grant execute on function draft_payment(uuid, date, date, uuid, integer, integer, integer, integer, text, option_units[]) to guest;
|
||||||
|
grant execute on function draft_payment(uuid, date, date, uuid, integer, integer, integer, integer, text, option_units[]) to employee;
|
||||||
|
grant execute on function draft_payment(uuid, date, date, uuid, integer, integer, integer, integer, text, option_units[]) to admin;
|
||||||
|
|
||||||
commit;
|
commit;
|
||||||
|
|
|
@ -0,0 +1,9 @@
|
||||||
|
-- Revert camper:draft_payment from pg
|
||||||
|
|
||||||
|
begin;
|
||||||
|
|
||||||
|
drop function if exists camper.draft_payment(uuid, date, date, uuid, integer, integer, integer, integer, text, camper.option_units[]);
|
||||||
|
|
||||||
|
drop type if exists camper.option_units;
|
||||||
|
|
||||||
|
commit;
|
|
@ -259,3 +259,5 @@ process_payment_response [roles schema_camper redsys_response payment payment_re
|
||||||
down_payment [roles schema_camper payment] 2024-02-13T21:53:44Z jordi fita mas <jordi@tandem.blog> # Add function to compute payment down payment from its percentage
|
down_payment [roles schema_camper payment] 2024-02-13T21:53:44Z jordi fita mas <jordi@tandem.blog> # Add function to compute payment down payment from its percentage
|
||||||
payment_reference [roles schema_camper payment] 2024-02-14T01:45:37Z jordi fita mas <jordi@tandem.blog> # Add function to generate a payment reference
|
payment_reference [roles schema_camper payment] 2024-02-14T01:45:37Z jordi fita mas <jordi@tandem.blog> # Add function to generate a payment reference
|
||||||
@v4 2024-02-27T17:30:17Z jordi fita mas <jordi@tandem.blog> # Tag v4
|
@v4 2024-02-27T17:30:17Z jordi fita mas <jordi@tandem.blog> # Tag v4
|
||||||
|
company__tourist_tax_max_days [company] 2024-02-27T18:03:51Z jordi fita mas <jordi@tandem.blog> # Add tourist_tax_max_days to company
|
||||||
|
draft_payment [draft_payment@v4 company__tourist_tax_max_days] 2024-02-27T17:49:05Z jordi fita mas <jordi@tandem.blog> # Limit the number of nights that have tourist tax in draft_payment
|
||||||
|
|
|
@ -26,9 +26,9 @@ truncate company cascade;
|
||||||
reset client_min_messages;
|
reset client_min_messages;
|
||||||
|
|
||||||
|
|
||||||
insert into company (company_id, business_name, vatin, trade_name, phone, email, web, address, city, province, postal_code, rtc_number, tourist_tax, country_code, currency_code, default_lang_tag)
|
insert into company (company_id, business_name, vatin, trade_name, phone, email, web, address, city, province, postal_code, rtc_number, tourist_tax, tourist_tax_max_days, country_code, currency_code, default_lang_tag)
|
||||||
values (1, 'Company 2', 'XX123', '', '555-555-555', 'a@a', '', '', '', '', '', '', 60, 'ES', 'EUR', 'ca')
|
values (1, 'Company 2', 'XX123', '', '555-555-555', 'a@a', '', '', '', '', '', '', 60, 7, 'ES', 'EUR', 'ca')
|
||||||
, (2, 'Company 4', 'XX234', '', '666-666-666', 'b@b', '', '', '', '', '', '', 60, 'FR', 'USD', 'ca')
|
, (2, 'Company 4', 'XX234', '', '666-666-666', 'b@b', '', '', '', '', '', '', 60, 7, 'FR', 'USD', 'ca')
|
||||||
;
|
;
|
||||||
|
|
||||||
select lives_ok(
|
select lives_ok(
|
||||||
|
|
|
@ -29,9 +29,9 @@ truncate company cascade;
|
||||||
reset client_min_messages;
|
reset client_min_messages;
|
||||||
|
|
||||||
|
|
||||||
insert into company (company_id, business_name, vatin, trade_name, phone, email, web, address, city, province, postal_code, rtc_number, tourist_tax, country_code, currency_code, default_lang_tag)
|
insert into company (company_id, business_name, vatin, trade_name, phone, email, web, address, city, province, postal_code, rtc_number, tourist_tax, tourist_tax_max_days, country_code, currency_code, default_lang_tag)
|
||||||
values (1, 'Company 2', 'XX123', '', '555-555-555', 'a@a', '', '', '', '', '', '', 60, 'ES', 'EUR', 'ca')
|
values (1, 'Company 2', 'XX123', '', '555-555-555', 'a@a', '', '', '', '', '', '', 60, 7, 'ES', 'EUR', 'ca')
|
||||||
, (2, 'Company 2', 'XX123', '', '555-555-555', 'a@a', '', '', '', '', '', '', 60, 'ES', 'EUR', 'ca')
|
, (2, 'Company 2', 'XX123', '', '555-555-555', 'a@a', '', '', '', '', '', '', 60, 7, 'ES', 'EUR', 'ca')
|
||||||
;
|
;
|
||||||
|
|
||||||
insert into media_content (media_type, bytes)
|
insert into media_content (media_type, bytes)
|
||||||
|
|
|
@ -27,9 +27,9 @@ truncate company cascade;
|
||||||
reset client_min_messages;
|
reset client_min_messages;
|
||||||
|
|
||||||
|
|
||||||
insert into company (company_id, business_name, vatin, trade_name, phone, email, web, address, city, province, postal_code, rtc_number, tourist_tax, country_code, currency_code, default_lang_tag)
|
insert into company (company_id, business_name, vatin, trade_name, phone, email, web, address, city, province, postal_code, rtc_number, tourist_tax, tourist_tax_max_days, country_code, currency_code, default_lang_tag)
|
||||||
values (1, 'Company 2', 'XX123', '', '555-555-555', 'a@a', '', '', '', '', '', '', 60, 'ES', 'EUR', 'ca')
|
values (1, 'Company 2', 'XX123', '', '555-555-555', 'a@a', '', '', '', '', '', '', 60, 7, 'ES', 'EUR', 'ca')
|
||||||
, (2, 'Company 2', 'XX123', '', '555-555-555', 'a@a', '', '', '', '', '', '', 60, 'ES', 'EUR', 'ca')
|
, (2, 'Company 2', 'XX123', '', '555-555-555', 'a@a', '', '', '', '', '', '', 60, 7, 'ES', 'EUR', 'ca')
|
||||||
;
|
;
|
||||||
|
|
||||||
insert into media_content (media_type, bytes)
|
insert into media_content (media_type, bytes)
|
||||||
|
|
|
@ -29,9 +29,9 @@ truncate company cascade;
|
||||||
reset client_min_messages;
|
reset client_min_messages;
|
||||||
|
|
||||||
|
|
||||||
insert into company (company_id, business_name, vatin, trade_name, phone, email, web, address, city, province, postal_code, rtc_number, tourist_tax, country_code, currency_code, default_lang_tag)
|
insert into company (company_id, business_name, vatin, trade_name, phone, email, web, address, city, province, postal_code, rtc_number, tourist_tax, tourist_tax_max_days, country_code, currency_code, default_lang_tag)
|
||||||
values (1, 'Company 2', 'XX123', '', '555-555-555', 'a@a', '', '', '', '', '', '', 60, 'ES', 'EUR', 'ca')
|
values (1, 'Company 2', 'XX123', '', '555-555-555', 'a@a', '', '', '', '', '', '', 60, 7, 'ES', 'EUR', 'ca')
|
||||||
, (2, 'Company 4', 'XX234', '', '666-666-666', 'b@b', '', '', '', '', '', '', 60, 'FR', 'USD', 'ca')
|
, (2, 'Company 4', 'XX234', '', '666-666-666', 'b@b', '', '', '', '', '', '', 60, 7, 'FR', 'USD', 'ca')
|
||||||
;
|
;
|
||||||
|
|
||||||
insert into media_content (media_type, bytes)
|
insert into media_content (media_type, bytes)
|
||||||
|
|
|
@ -30,9 +30,9 @@ truncate company cascade;
|
||||||
reset client_min_messages;
|
reset client_min_messages;
|
||||||
|
|
||||||
|
|
||||||
insert into company (company_id, business_name, vatin, trade_name, phone, email, web, address, city, province, postal_code, rtc_number, tourist_tax, country_code, currency_code, default_lang_tag)
|
insert into company (company_id, business_name, vatin, trade_name, phone, email, web, address, city, province, postal_code, rtc_number, tourist_tax, tourist_tax_max_days, country_code, currency_code, default_lang_tag)
|
||||||
values (1, 'Company 2', 'XX123', '', '555-555-555', 'a@a', '', '', '', '', '', '', 60, 'ES', 'EUR', 'ca')
|
values (1, 'Company 2', 'XX123', '', '555-555-555', 'a@a', '', '', '', '', '', '', 60, 7, 'ES', 'EUR', 'ca')
|
||||||
, (2, 'Company 2', 'XX123', '', '555-555-555', 'a@a', '', '', '', '', '', '', 60, 'ES', 'EUR', 'ca')
|
, (2, 'Company 2', 'XX123', '', '555-555-555', 'a@a', '', '', '', '', '', '', 60, 7, 'ES', 'EUR', 'ca')
|
||||||
;
|
;
|
||||||
|
|
||||||
insert into media_content (media_type, bytes)
|
insert into media_content (media_type, bytes)
|
||||||
|
|
|
@ -30,9 +30,9 @@ truncate company cascade;
|
||||||
reset client_min_messages;
|
reset client_min_messages;
|
||||||
|
|
||||||
|
|
||||||
insert into company (company_id, business_name, vatin, trade_name, phone, email, web, address, city, province, postal_code, rtc_number, tourist_tax, country_code, currency_code, default_lang_tag)
|
insert into company (company_id, business_name, vatin, trade_name, phone, email, web, address, city, province, postal_code, rtc_number, tourist_tax, tourist_tax_max_days, country_code, currency_code, default_lang_tag)
|
||||||
values (1, 'Company 2', 'XX123', '', '555-555-555', 'a@a', '', '', '', '', '', '', 60, 'ES', 'EUR', 'ca')
|
values (1, 'Company 2', 'XX123', '', '555-555-555', 'a@a', '', '', '', '', '', '', 60, 7, 'ES', 'EUR', 'ca')
|
||||||
, (2, 'Company 2', 'XX123', '', '555-555-555', 'a@a', '', '', '', '', '', '', 60, 'ES', 'EUR', 'ca')
|
, (2, 'Company 2', 'XX123', '', '555-555-555', 'a@a', '', '', '', '', '', '', 60, 7, 'ES', 'EUR', 'ca')
|
||||||
;
|
;
|
||||||
|
|
||||||
insert into media_content (media_type, bytes)
|
insert into media_content (media_type, bytes)
|
||||||
|
|
|
@ -29,9 +29,9 @@ truncate company cascade;
|
||||||
reset client_min_messages;
|
reset client_min_messages;
|
||||||
|
|
||||||
|
|
||||||
insert into company (company_id, business_name, vatin, trade_name, phone, email, web, address, city, province, postal_code, rtc_number, tourist_tax, country_code, currency_code, default_lang_tag)
|
insert into company (company_id, business_name, vatin, trade_name, phone, email, web, address, city, province, postal_code, rtc_number, tourist_tax, tourist_tax_max_days, country_code, currency_code, default_lang_tag)
|
||||||
values (1, 'Company 2', 'XX123', '', '555-555-555', 'a@a', '', '', '', '', '', '', 60, 'ES', 'EUR', 'ca')
|
values (1, 'Company 2', 'XX123', '', '555-555-555', 'a@a', '', '', '', '', '', '', 60, 7, 'ES', 'EUR', 'ca')
|
||||||
, (2, 'Company 4', 'XX234', '', '666-666-666', 'b@b', '', '', '', '', '', '', 60, 'FR', 'USD', 'ca')
|
, (2, 'Company 4', 'XX234', '', '666-666-666', 'b@b', '', '', '', '', '', '', 60, 7, 'FR', 'USD', 'ca')
|
||||||
;
|
;
|
||||||
|
|
||||||
insert into media_content (media_type, bytes)
|
insert into media_content (media_type, bytes)
|
||||||
|
|
|
@ -30,8 +30,8 @@ truncate company cascade;
|
||||||
reset client_min_messages;
|
reset client_min_messages;
|
||||||
|
|
||||||
|
|
||||||
insert into company (company_id, business_name, vatin, trade_name, phone, email, web, address, city, province, postal_code, rtc_number, tourist_tax, country_code, currency_code, default_lang_tag)
|
insert into company (company_id, business_name, vatin, trade_name, phone, email, web, address, city, province, postal_code, rtc_number, tourist_tax, tourist_tax_max_days, country_code, currency_code, default_lang_tag)
|
||||||
values (1, 'Company 2', 'XX123', '', '555-555-555', 'a@a', '', '', '', '', '', '', 60, 'ES', 'EUR', 'ca')
|
values (1, 'Company 2', 'XX123', '', '555-555-555', 'a@a', '', '', '', '', '', '', 60, 7, 'ES', 'EUR', 'ca')
|
||||||
;
|
;
|
||||||
|
|
||||||
insert into media_content (media_type, bytes)
|
insert into media_content (media_type, bytes)
|
||||||
|
|
|
@ -30,8 +30,8 @@ truncate company cascade;
|
||||||
reset client_min_messages;
|
reset client_min_messages;
|
||||||
|
|
||||||
|
|
||||||
insert into company (company_id, business_name, vatin, trade_name, phone, email, web, address, city, province, postal_code, rtc_number, tourist_tax, country_code, currency_code, default_lang_tag)
|
insert into company (company_id, business_name, vatin, trade_name, phone, email, web, address, city, province, postal_code, rtc_number, tourist_tax, tourist_tax_max_days, country_code, currency_code, default_lang_tag)
|
||||||
values (1, 'Company 2', 'XX123', '', '555-555-555', 'a@a', '', '', '', '', '', '', 60, 'ES', 'EUR', 'ca')
|
values (1, 'Company 2', 'XX123', '', '555-555-555', 'a@a', '', '', '', '', '', '', 60, 7, 'ES', 'EUR', 'ca')
|
||||||
;
|
;
|
||||||
|
|
||||||
insert into media_content (media_type, bytes)
|
insert into media_content (media_type, bytes)
|
||||||
|
|
|
@ -29,9 +29,8 @@ truncate media_content cascade;
|
||||||
truncate company cascade;
|
truncate company cascade;
|
||||||
reset client_min_messages;
|
reset client_min_messages;
|
||||||
|
|
||||||
|
insert into company (company_id, business_name, vatin, trade_name, phone, email, web, address, city, province, postal_code, rtc_number, tourist_tax, tourist_tax_max_days, country_code, currency_code, default_lang_tag)
|
||||||
insert into company (company_id, business_name, vatin, trade_name, phone, email, web, address, city, province, postal_code, rtc_number, tourist_tax, country_code, currency_code, default_lang_tag)
|
values (1, 'Company 2', 'XX123', '', '555-555-555', 'a@a', '', '', '', '', '', '', 60, 7, 'ES', 'EUR', 'ca')
|
||||||
values (1, 'Company 2', 'XX123', '', '555-555-555', 'a@a', '', '', '', '', '', '', 60, 'ES', 'EUR', 'ca')
|
|
||||||
;
|
;
|
||||||
|
|
||||||
insert into media_content (media_type, bytes)
|
insert into media_content (media_type, bytes)
|
||||||
|
|
|
@ -27,8 +27,8 @@ truncate media_content cascade;
|
||||||
truncate company cascade;
|
truncate company cascade;
|
||||||
reset client_min_messages;
|
reset client_min_messages;
|
||||||
|
|
||||||
insert into company (company_id, business_name, vatin, trade_name, phone, email, web, address, city, province, postal_code, rtc_number, tourist_tax, country_code, currency_code, default_lang_tag)
|
insert into company (company_id, business_name, vatin, trade_name, phone, email, web, address, city, province, postal_code, rtc_number, tourist_tax, tourist_tax_max_days, country_code, currency_code, default_lang_tag)
|
||||||
values (1, 'Company 2', 'XX123', '', '555-555-555', 'a@a', '', '', '', '', '', '', 60, 'ES', 'EUR', 'ca')
|
values (1, 'Company 2', 'XX123', '', '555-555-555', 'a@a', '', '', '', '', '', '', 60, 7, 'ES', 'EUR', 'ca')
|
||||||
;
|
;
|
||||||
|
|
||||||
insert into media_content (media_type, bytes)
|
insert into media_content (media_type, bytes)
|
||||||
|
|
|
@ -27,8 +27,8 @@ truncate media_content cascade;
|
||||||
truncate company cascade;
|
truncate company cascade;
|
||||||
reset client_min_messages;
|
reset client_min_messages;
|
||||||
|
|
||||||
insert into company (company_id, business_name, vatin, trade_name, phone, email, web, address, city, province, postal_code, rtc_number, tourist_tax, country_code, currency_code, default_lang_tag)
|
insert into company (company_id, business_name, vatin, trade_name, phone, email, web, address, city, province, postal_code, rtc_number, tourist_tax, tourist_tax_max_days, country_code, currency_code, default_lang_tag)
|
||||||
values (1, 'Company 2', 'XX123', '', '555-555-555', 'a@a', '', '', '', '', '', '', 60, 'ES', 'EUR', 'ca')
|
values (1, 'Company 2', 'XX123', '', '555-555-555', 'a@a', '', '', '', '', '', '', 60, 7, 'ES', 'EUR', 'ca')
|
||||||
;
|
;
|
||||||
|
|
||||||
insert into media_content (media_type, bytes)
|
insert into media_content (media_type, bytes)
|
||||||
|
|
|
@ -26,9 +26,9 @@ truncate media_content cascade;
|
||||||
truncate company cascade;
|
truncate company cascade;
|
||||||
reset client_min_messages;
|
reset client_min_messages;
|
||||||
|
|
||||||
insert into company (company_id, business_name, vatin, trade_name, phone, email, web, address, city, province, postal_code, rtc_number, tourist_tax, country_code, currency_code, default_lang_tag)
|
insert into company (company_id, business_name, vatin, trade_name, phone, email, web, address, city, province, postal_code, rtc_number, tourist_tax, tourist_tax_max_days, country_code, currency_code, default_lang_tag)
|
||||||
values (1, 'Company 2', 'XX123', '', '555-555-555', 'a@a', '', '', '', '', '', '', 60, 'ES', 'EUR', 'ca')
|
values (1, 'Company 2', 'XX123', '', '555-555-555', 'a@a', '', '', '', '', '', '', 60, 7, 'ES', 'EUR', 'ca')
|
||||||
, (2, 'Company 4', 'XX234', '', '666-666-666', 'b@b', '', '', '', '', '', '', 60, 'FR', 'USD', 'ca')
|
, (2, 'Company 4', 'XX234', '', '666-666-666', 'b@b', '', '', '', '', '', '', 60, 7, 'FR', 'USD', 'ca')
|
||||||
;
|
;
|
||||||
|
|
||||||
select lives_ok(
|
select lives_ok(
|
||||||
|
|
|
@ -25,9 +25,9 @@ truncate season cascade;
|
||||||
truncate company cascade;
|
truncate company cascade;
|
||||||
reset client_min_messages;
|
reset client_min_messages;
|
||||||
|
|
||||||
insert into company (company_id, business_name, vatin, trade_name, phone, email, web, address, city, province, postal_code, rtc_number, tourist_tax, country_code, currency_code, default_lang_tag)
|
insert into company (company_id, business_name, vatin, trade_name, phone, email, web, address, city, province, postal_code, rtc_number, tourist_tax, tourist_tax_max_days, country_code, currency_code, default_lang_tag)
|
||||||
values (1, 'Company 2', 'XX123', '', '555-555-555', 'a@a', '', '', '', '', '', '', 60, 'ES', 'EUR', 'ca')
|
values (1, 'Company 2', 'XX123', '', '555-555-555', 'a@a', '', '', '', '', '', '', 60, 7, 'ES', 'EUR', 'ca')
|
||||||
, (2, 'Company 4', 'XX234', '', '666-666-666', 'b@b', '', '', '', '', '', '', 60, 'FR', 'USD', 'ca')
|
, (2, 'Company 4', 'XX234', '', '666-666-666', 'b@b', '', '', '', '', '', '', 60, 7, 'FR', 'USD', 'ca')
|
||||||
;
|
;
|
||||||
|
|
||||||
select lives_ok(
|
select lives_ok(
|
||||||
|
|
|
@ -25,9 +25,9 @@ truncate service cascade;
|
||||||
truncate company cascade;
|
truncate company cascade;
|
||||||
reset client_min_messages;
|
reset client_min_messages;
|
||||||
|
|
||||||
insert into company (company_id, business_name, vatin, trade_name, phone, email, web, address, city, province, postal_code, rtc_number, tourist_tax, country_code, currency_code, default_lang_tag)
|
insert into company (company_id, business_name, vatin, trade_name, phone, email, web, address, city, province, postal_code, rtc_number, tourist_tax, tourist_tax_max_days, country_code, currency_code, default_lang_tag)
|
||||||
values (1, 'Company 2', 'XX123', '', '555-555-555', 'a@a', '', '', '', '', '', '', 60, 'ES', 'EUR', 'ca')
|
values (1, 'Company 2', 'XX123', '', '555-555-555', 'a@a', '', '', '', '', '', '', 60, 7, 'ES', 'EUR', 'ca')
|
||||||
, (2, 'Company 4', 'XX234', '', '666-666-666', 'b@b', '', '', '', '', '', '', 60, 'FR', 'USD', 'ca')
|
, (2, 'Company 4', 'XX234', '', '666-666-666', 'b@b', '', '', '', '', '', '', 60, 7, 'FR', 'USD', 'ca')
|
||||||
;
|
;
|
||||||
|
|
||||||
select lives_ok(
|
select lives_ok(
|
||||||
|
|
|
@ -28,8 +28,8 @@ truncate media_content cascade;
|
||||||
truncate company cascade;
|
truncate company cascade;
|
||||||
reset client_min_messages;
|
reset client_min_messages;
|
||||||
|
|
||||||
insert into company (company_id, business_name, vatin, trade_name, phone, email, web, address, city, province, postal_code, rtc_number, tourist_tax, country_code, currency_code, default_lang_tag)
|
insert into company (company_id, business_name, vatin, trade_name, phone, email, web, address, city, province, postal_code, rtc_number, tourist_tax, tourist_tax_max_days, country_code, currency_code, default_lang_tag)
|
||||||
values (1, 'Company 2', 'XX123', '', '555-555-555', 'a@a', '', '', '', '', '', '', 60, 'ES', 'EUR', 'ca')
|
values (1, 'Company 2', 'XX123', '', '555-555-555', 'a@a', '', '', '', '', '', '', 60, 7, 'ES', 'EUR', 'ca')
|
||||||
;
|
;
|
||||||
|
|
||||||
insert into media_content (media_type, bytes)
|
insert into media_content (media_type, bytes)
|
||||||
|
|
|
@ -27,9 +27,9 @@ truncate company cascade;
|
||||||
reset client_min_messages;
|
reset client_min_messages;
|
||||||
|
|
||||||
|
|
||||||
insert into company (company_id, business_name, vatin, trade_name, phone, email, web, address, city, province, postal_code, rtc_number, tourist_tax, country_code, currency_code, default_lang_tag)
|
insert into company (company_id, business_name, vatin, trade_name, phone, email, web, address, city, province, postal_code, rtc_number, tourist_tax, tourist_tax_max_days, country_code, currency_code, default_lang_tag)
|
||||||
values (1, 'Company 2', 'XX123', '', '555-555-555', 'a@a', '', '', '', '', '', '', 60, 'ES', 'EUR', 'ca')
|
values (1, 'Company 2', 'XX123', '', '555-555-555', 'a@a', '', '', '', '', '', '', 60, 7, 'ES', 'EUR', 'ca')
|
||||||
, (2, 'Company 4', 'XX234', '', '666-666-666', 'b@b', '', '', '', '', '', '', 60, 'FR', 'USD', 'ca')
|
, (2, 'Company 4', 'XX234', '', '666-666-666', 'b@b', '', '', '', '', '', '', 60, 7, 'FR', 'USD', 'ca')
|
||||||
;
|
;
|
||||||
|
|
||||||
insert into media_content (media_type, bytes)
|
insert into media_content (media_type, bytes)
|
||||||
|
|
|
@ -71,9 +71,9 @@ values (1, 'demo@tandem.blog', 'Demo', 'test', '44facbb30d8a419dfd4bfbc44a4b5539
|
||||||
, (5, 'admin@tandem.blog', 'Demo', 'test', '12af4c88b528c2ad4222e3740496ecbc58e76e26f087657524', current_timestamp + interval '1 month')
|
, (5, 'admin@tandem.blog', 'Demo', 'test', '12af4c88b528c2ad4222e3740496ecbc58e76e26f087657524', current_timestamp + interval '1 month')
|
||||||
;
|
;
|
||||||
|
|
||||||
insert into company (company_id, business_name, vatin, trade_name, phone, email, web, address, city, province, postal_code, rtc_number, tourist_tax, country_code, currency_code, default_lang_tag)
|
insert into company (company_id, business_name, vatin, trade_name, phone, email, web, address, city, province, postal_code, rtc_number, tourist_tax, tourist_tax_max_days, country_code, currency_code, default_lang_tag)
|
||||||
values (2, 'Company 2', 'XX123', '', '555-555-555', 'a@a', '', '', '', '', '', '', 60, 'ES', 'EUR', 'ca')
|
values (2, 'Company 2', 'XX123', '', '555-555-555', 'a@a', '', '', '', '', '', '', 60, 7, 'ES', 'EUR', 'ca')
|
||||||
, (4, 'Company 4', 'XX234', '', '666-666-666', 'b@b', '', '', '', '', '', '', 60, 'FR', 'USD', 'ca')
|
, (4, 'Company 4', 'XX234', '', '666-666-666', 'b@b', '', '', '', '', '', '', 60, 7, 'FR', 'USD', 'ca')
|
||||||
;
|
;
|
||||||
|
|
||||||
insert into company_user (company_id, user_id, role)
|
insert into company_user (company_id, user_id, role)
|
||||||
|
|
|
@ -60,9 +60,9 @@ values (1, 'demo@tandem.blog', 'Demo', 'test', '44facbb30d8a419dfd4bfbc44a4b5539
|
||||||
, (5, 'admin@tandem.blog', 'Demo', 'test', '12af4c88b528c2ad4222e3740496ecbc58e76e26f087657524', current_timestamp + interval '1 month')
|
, (5, 'admin@tandem.blog', 'Demo', 'test', '12af4c88b528c2ad4222e3740496ecbc58e76e26f087657524', current_timestamp + interval '1 month')
|
||||||
;
|
;
|
||||||
|
|
||||||
insert into company (company_id, business_name, vatin, trade_name, phone, email, web, address, city, province, postal_code, rtc_number, tourist_tax, country_code, currency_code, default_lang_tag)
|
insert into company (company_id, business_name, vatin, trade_name, phone, email, web, address, city, province, postal_code, rtc_number, tourist_tax, tourist_tax_max_days, country_code, currency_code, default_lang_tag)
|
||||||
values (2, 'Company 2', 'XX123', '', '555-555-555', 'a@a', '', '', '', '', '', '', 60, 'ES', 'EUR', 'ca')
|
values (2, 'Company 2', 'XX123', '', '555-555-555', 'a@a', '', '', '', '', '', '', 60, 7, 'ES', 'EUR', 'ca')
|
||||||
, (4, 'Company 4', 'XX234', '', '666-666-666', 'b@b', '', '', '', '', '', '', 60, 'FR', 'USD', 'ca')
|
, (4, 'Company 4', 'XX234', '', '666-666-666', 'b@b', '', '', '', '', '', '', 60, 7, 'FR', 'USD', 'ca')
|
||||||
;
|
;
|
||||||
|
|
||||||
insert into company_user (company_id, user_id, role)
|
insert into company_user (company_id, user_id, role)
|
||||||
|
|
|
@ -62,9 +62,9 @@ values (1, 'demo@tandem.blog', 'Demo', 'test', '44facbb30d8a419dfd4bfbc44a4b5539
|
||||||
, (5, 'admin@tandem.blog', 'Demo', 'test', '12af4c88b528c2ad4222e3740496ecbc58e76e26f087657524', current_timestamp + interval '1 month')
|
, (5, 'admin@tandem.blog', 'Demo', 'test', '12af4c88b528c2ad4222e3740496ecbc58e76e26f087657524', current_timestamp + interval '1 month')
|
||||||
;
|
;
|
||||||
|
|
||||||
insert into company (company_id, business_name, vatin, trade_name, phone, email, web, address, city, province, postal_code, rtc_number, tourist_tax, country_code, currency_code, default_lang_tag)
|
insert into company (company_id, business_name, vatin, trade_name, phone, email, web, address, city, province, postal_code, rtc_number, tourist_tax, tourist_tax_max_days, country_code, currency_code, default_lang_tag)
|
||||||
values (2, 'Company 2', 'XX123', '', '555-555-555', 'a@a', '', '', '', '', '', '', 60, 'ES', 'EUR', 'ca')
|
values (2, 'Company 2', 'XX123', '', '555-555-555', 'a@a', '', '', '', '', '', '', 60, 7, 'ES', 'EUR', 'ca')
|
||||||
, (4, 'Company 4', 'XX234', '', '666-666-666', 'b@b', '', '', '', '', '', '', 60, 'FR', 'USD', 'ca')
|
, (4, 'Company 4', 'XX234', '', '666-666-666', 'b@b', '', '', '', '', '', '', 60, 7, 'FR', 'USD', 'ca')
|
||||||
;
|
;
|
||||||
|
|
||||||
insert into company_user (company_id, user_id, role)
|
insert into company_user (company_id, user_id, role)
|
||||||
|
|
|
@ -100,9 +100,9 @@ values (1, 'employee2@tandem.blog', 'Demo', 'test', '44facbb30d8a419dfd4bfbc44a4
|
||||||
, (5, 'employee4@tandem.blog', 'Demo', 'test', '12af4c88b528c2ad4222e3740496ecbc58e76e26f087657524', current_timestamp + interval '1 month')
|
, (5, 'employee4@tandem.blog', 'Demo', 'test', '12af4c88b528c2ad4222e3740496ecbc58e76e26f087657524', current_timestamp + interval '1 month')
|
||||||
;
|
;
|
||||||
|
|
||||||
insert into company (company_id, business_name, vatin, trade_name, phone, email, web, address, city, province, postal_code, rtc_number, tourist_tax, country_code, currency_code, default_lang_tag)
|
insert into company (company_id, business_name, vatin, trade_name, phone, email, web, address, city, province, postal_code, rtc_number, tourist_tax, tourist_tax_max_days, country_code, currency_code, default_lang_tag)
|
||||||
values (2, 'Company 2', 'XX123', '', '555-555-555', 'a@a', '', '', '', '', '', '', 60, 'ES', 'EUR', 'ca')
|
values (2, 'Company 2', 'XX123', '', '555-555-555', 'a@a', '', '', '', '', '', '', 60, 7, 'ES', 'EUR', 'ca')
|
||||||
, (4, 'Company 4', 'XX234', '', '666-666-666', 'b@b', '', '', '', '', '', '', 60, 'FR', 'USD', 'ca')
|
, (4, 'Company 4', 'XX234', '', '666-666-666', 'b@b', '', '', '', '', '', '', 60, 7, 'FR', 'USD', 'ca')
|
||||||
;
|
;
|
||||||
|
|
||||||
insert into company_user (company_id, user_id, role)
|
insert into company_user (company_id, user_id, role)
|
||||||
|
|
|
@ -31,8 +31,8 @@ values (1, 'demo@tandem.blog', 'Demo', 'test', '44facbb30d8a419dfd4bfbc44a4b5539
|
||||||
, (9, 'admin@tandem.blog', 'Demo', 'test', '12af4c88b528c2ad4222e3740496ecbc58e76e26f087657524', current_timestamp + interval '1 month')
|
, (9, 'admin@tandem.blog', 'Demo', 'test', '12af4c88b528c2ad4222e3740496ecbc58e76e26f087657524', current_timestamp + interval '1 month')
|
||||||
;
|
;
|
||||||
|
|
||||||
insert into company (company_id, business_name, vatin, trade_name, phone, email, web, address, city, province, postal_code, rtc_number, tourist_tax, country_code, currency_code, default_lang_tag)
|
insert into company (company_id, business_name, vatin, trade_name, phone, email, web, address, city, province, postal_code, rtc_number, tourist_tax, tourist_tax_max_days, country_code, currency_code, default_lang_tag)
|
||||||
values (2, 'Company 2', 'XX123', '', '555-555-555', 'a@a', '', '', '', '', '', '', 60, 'ES', 'EUR', 'ca')
|
values (2, 'Company 2', 'XX123', '', '555-555-555', 'a@a', '', '', '', '', '', '', 60, 7, 'ES', 'EUR', 'ca')
|
||||||
;
|
;
|
||||||
|
|
||||||
insert into company_user (company_id, user_id, role)
|
insert into company_user (company_id, user_id, role)
|
||||||
|
|
|
@ -78,9 +78,9 @@ values (1, 'demo@tandem.blog', 'Demo', 'test', '44facbb30d8a419dfd4bfbc44a4b5539
|
||||||
, (5, 'admin@tandem.blog', 'Demo', 'test', '12af4c88b528c2ad4222e3740496ecbc58e76e26f087657524', current_timestamp + interval '1 month')
|
, (5, 'admin@tandem.blog', 'Demo', 'test', '12af4c88b528c2ad4222e3740496ecbc58e76e26f087657524', current_timestamp + interval '1 month')
|
||||||
;
|
;
|
||||||
|
|
||||||
insert into company (company_id, business_name, vatin, trade_name, phone, email, web, address, city, province, postal_code, rtc_number, tourist_tax, country_code, currency_code, default_lang_tag)
|
insert into company (company_id, business_name, vatin, trade_name, phone, email, web, address, city, province, postal_code, rtc_number, tourist_tax, tourist_tax_max_days, country_code, currency_code, default_lang_tag)
|
||||||
values (2, 'Company 2', 'XX123', '', '555-555-555', 'a@a', '', '', '', '', '', '', 60, 'ES', 'EUR', 'ca')
|
values (2, 'Company 2', 'XX123', '', '555-555-555', 'a@a', '', '', '', '', '', '', 60, 7, 'ES', 'EUR', 'ca')
|
||||||
, (4, 'Company 4', 'XX234', '', '666-666-666', 'b@b', '', '', '', '', '', '', 60, 'FR', 'USD', 'ca')
|
, (4, 'Company 4', 'XX234', '', '666-666-666', 'b@b', '', '', '', '', '', '', 60, 7, 'FR', 'USD', 'ca')
|
||||||
;
|
;
|
||||||
|
|
||||||
insert into company_user (company_id, user_id, role)
|
insert into company_user (company_id, user_id, role)
|
||||||
|
|
|
@ -61,9 +61,9 @@ values (1, 'demo@tandem.blog', 'Demo', 'test', '44facbb30d8a419dfd4bfbc44a4b5539
|
||||||
, (5, 'admin@tandem.blog', 'Demo', 'test', '12af4c88b528c2ad4222e3740496ecbc58e76e26f087657524', current_timestamp + interval '1 month')
|
, (5, 'admin@tandem.blog', 'Demo', 'test', '12af4c88b528c2ad4222e3740496ecbc58e76e26f087657524', current_timestamp + interval '1 month')
|
||||||
;
|
;
|
||||||
|
|
||||||
insert into company (company_id, business_name, vatin, trade_name, phone, email, web, address, city, province, postal_code, rtc_number, tourist_tax, country_code, currency_code, default_lang_tag)
|
insert into company (company_id, business_name, vatin, trade_name, phone, email, web, address, city, province, postal_code, rtc_number, tourist_tax, tourist_tax_max_days, country_code, currency_code, default_lang_tag)
|
||||||
values (2, 'Company 2', 'XX123', '', '555-555-555', 'a@a', '', '', '', '', '', '', 60, 'ES', 'EUR', 'ca')
|
values (2, 'Company 2', 'XX123', '', '555-555-555', 'a@a', '', '', '', '', '', '', 60, 7, 'ES', 'EUR', 'ca')
|
||||||
, (4, 'Company 4', 'XX234', '', '666-666-666', 'b@b', '', '', '', '', '', '', 60, 'FR', 'USD', 'ca')
|
, (4, 'Company 4', 'XX234', '', '666-666-666', 'b@b', '', '', '', '', '', '', 60, 7, 'FR', 'USD', 'ca')
|
||||||
;
|
;
|
||||||
|
|
||||||
insert into company_user (company_id, user_id, role)
|
insert into company_user (company_id, user_id, role)
|
||||||
|
|
|
@ -65,9 +65,9 @@ values (1, 'demo@tandem.blog', 'Demo', 'test', '44facbb30d8a419dfd4bfbc44a4b5539
|
||||||
, (5, 'admin@tandem.blog', 'Demo', 'test', '12af4c88b528c2ad4222e3740496ecbc58e76e26f087657524', current_timestamp + interval '1 month')
|
, (5, 'admin@tandem.blog', 'Demo', 'test', '12af4c88b528c2ad4222e3740496ecbc58e76e26f087657524', current_timestamp + interval '1 month')
|
||||||
;
|
;
|
||||||
|
|
||||||
insert into company (company_id, business_name, vatin, trade_name, phone, email, web, address, city, province, postal_code, rtc_number, tourist_tax, country_code, currency_code, default_lang_tag)
|
insert into company (company_id, business_name, vatin, trade_name, phone, email, web, address, city, province, postal_code, rtc_number, tourist_tax, tourist_tax_max_days, country_code, currency_code, default_lang_tag)
|
||||||
values (2, 'Company 2', 'XX123', '', '555-555-555', 'a@a', '', '', '', '', '', '', 60, 'ES', 'EUR', 'ca')
|
values (2, 'Company 2', 'XX123', '', '555-555-555', 'a@a', '', '', '', '', '', '', 60, 7, 'ES', 'EUR', 'ca')
|
||||||
, (4, 'Company 4', 'XX234', '', '666-666-666', 'b@b', '', '', '', '', '', '', 60, 'FR', 'USD', 'ca')
|
, (4, 'Company 4', 'XX234', '', '666-666-666', 'b@b', '', '', '', '', '', '', 60, 7, 'FR', 'USD', 'ca')
|
||||||
;
|
;
|
||||||
|
|
||||||
insert into company_user (company_id, user_id, role)
|
insert into company_user (company_id, user_id, role)
|
||||||
|
|
|
@ -140,9 +140,9 @@ values (1, 'demo@tandem.blog', 'Demo', 'test', '44facbb30d8a419dfd4bfbc44a4b5539
|
||||||
, (5, 'admin@tandem.blog', 'Demo', 'test', '12af4c88b528c2ad4222e3740496ecbc58e76e26f087657524', current_timestamp + interval '1 month')
|
, (5, 'admin@tandem.blog', 'Demo', 'test', '12af4c88b528c2ad4222e3740496ecbc58e76e26f087657524', current_timestamp + interval '1 month')
|
||||||
;
|
;
|
||||||
|
|
||||||
insert into company (company_id, business_name, vatin, trade_name, phone, email, web, address, city, province, postal_code, rtc_number, tourist_tax, country_code, currency_code, default_lang_tag)
|
insert into company (company_id, business_name, vatin, trade_name, phone, email, web, address, city, province, postal_code, rtc_number, tourist_tax, tourist_tax_max_days, country_code, currency_code, default_lang_tag)
|
||||||
values (2, 'Company 2', 'XX123', '', '555-555-555', 'a@a', '', '', '', '', '', '', 60, 'ES', 'EUR', 'ca')
|
values (2, 'Company 2', 'XX123', '', '555-555-555', 'a@a', '', '', '', '', '', '', 60, 7, 'ES', 'EUR', 'ca')
|
||||||
, (4, 'Company 4', 'XX234', '', '666-666-666', 'b@b', '', '', '', '', '', '', 60, 'FR', 'USD', 'ca')
|
, (4, 'Company 4', 'XX234', '', '666-666-666', 'b@b', '', '', '', '', '', '', 60, 7, 'FR', 'USD', 'ca')
|
||||||
;
|
;
|
||||||
|
|
||||||
insert into company_user (company_id, user_id, role)
|
insert into company_user (company_id, user_id, role)
|
||||||
|
|
|
@ -60,9 +60,9 @@ values (1, 'demo@tandem.blog', 'Demo', 'test', '44facbb30d8a419dfd4bfbc44a4b5539
|
||||||
, (5, 'admin@tandem.blog', 'Demo', 'test', '12af4c88b528c2ad4222e3740496ecbc58e76e26f087657524', current_timestamp + interval '1 month')
|
, (5, 'admin@tandem.blog', 'Demo', 'test', '12af4c88b528c2ad4222e3740496ecbc58e76e26f087657524', current_timestamp + interval '1 month')
|
||||||
;
|
;
|
||||||
|
|
||||||
insert into company (company_id, business_name, vatin, trade_name, phone, email, web, address, city, province, postal_code, rtc_number, tourist_tax, country_code, currency_code, default_lang_tag)
|
insert into company (company_id, business_name, vatin, trade_name, phone, email, web, address, city, province, postal_code, rtc_number, tourist_tax, tourist_tax_max_days, country_code, currency_code, default_lang_tag)
|
||||||
values (2, 'Company 2', 'XX123', '', '555-555-555', 'a@a', '', '', '', '', '', '', 60, 'ES', 'EUR', 'ca')
|
values (2, 'Company 2', 'XX123', '', '555-555-555', 'a@a', '', '', '', '', '', '', 60, 7, 'ES', 'EUR', 'ca')
|
||||||
, (4, 'Company 4', 'XX234', '', '666-666-666', 'b@b', '', '', '', '', '', '', 60, 'FR', 'USD', 'ca')
|
, (4, 'Company 4', 'XX234', '', '666-666-666', 'b@b', '', '', '', '', '', '', 60, 7, 'FR', 'USD', 'ca')
|
||||||
;
|
;
|
||||||
|
|
||||||
insert into company_user (company_id, user_id, role)
|
insert into company_user (company_id, user_id, role)
|
||||||
|
|
|
@ -69,9 +69,9 @@ values (1, 'demo@tandem.blog', 'Demo', 'test', '44facbb30d8a419dfd4bfbc44a4b5539
|
||||||
, (5, 'admin@tandem.blog', 'Demo', 'test', '12af4c88b528c2ad4222e3740496ecbc58e76e26f087657524', current_timestamp + interval '1 month')
|
, (5, 'admin@tandem.blog', 'Demo', 'test', '12af4c88b528c2ad4222e3740496ecbc58e76e26f087657524', current_timestamp + interval '1 month')
|
||||||
;
|
;
|
||||||
|
|
||||||
insert into company (company_id, business_name, vatin, trade_name, phone, email, web, address, city, province, postal_code, rtc_number, tourist_tax, country_code, currency_code, default_lang_tag)
|
insert into company (company_id, business_name, vatin, trade_name, phone, email, web, address, city, province, postal_code, rtc_number, tourist_tax, tourist_tax_max_days, country_code, currency_code, default_lang_tag)
|
||||||
values (2, 'Company 2', 'XX123', '', '555-555-555', 'a@a', '', '', '', '', '', '', 60, 'ES', 'EUR', 'ca')
|
values (2, 'Company 2', 'XX123', '', '555-555-555', 'a@a', '', '', '', '', '', '', 60, 7, 'ES', 'EUR', 'ca')
|
||||||
, (4, 'Company 4', 'XX234', '', '666-666-666', 'b@b', '', '', '', '', '', '', 60, 'FR', 'USD', 'ca')
|
, (4, 'Company 4', 'XX234', '', '666-666-666', 'b@b', '', '', '', '', '', '', 60, 7, 'FR', 'USD', 'ca')
|
||||||
;
|
;
|
||||||
|
|
||||||
insert into company_user (company_id, user_id, role)
|
insert into company_user (company_id, user_id, role)
|
||||||
|
|
|
@ -64,9 +64,9 @@ values (1, 'demo@tandem.blog', 'Demo', 'test', '44facbb30d8a419dfd4bfbc44a4b5539
|
||||||
, (5, 'admin@tandem.blog', 'Demo', 'test', '12af4c88b528c2ad4222e3740496ecbc58e76e26f087657524', current_timestamp + interval '1 month')
|
, (5, 'admin@tandem.blog', 'Demo', 'test', '12af4c88b528c2ad4222e3740496ecbc58e76e26f087657524', current_timestamp + interval '1 month')
|
||||||
;
|
;
|
||||||
|
|
||||||
insert into company (company_id, business_name, vatin, trade_name, phone, email, web, address, city, province, postal_code, rtc_number, tourist_tax, country_code, currency_code, default_lang_tag)
|
insert into company (company_id, business_name, vatin, trade_name, phone, email, web, address, city, province, postal_code, rtc_number, tourist_tax, tourist_tax_max_days, country_code, currency_code, default_lang_tag)
|
||||||
values (2, 'Company 2', 'XX123', '', '555-555-555', 'a@a', '', '', '', '', '', '', 60, 'ES', 'EUR', 'ca')
|
values (2, 'Company 2', 'XX123', '', '555-555-555', 'a@a', '', '', '', '', '', '', 60, 7, 'ES', 'EUR', 'ca')
|
||||||
, (4, 'Company 4', 'XX234', '', '666-666-666', 'b@b', '', '', '', '', '', '', 60, 'FR', 'USD', 'ca')
|
, (4, 'Company 4', 'XX234', '', '666-666-666', 'b@b', '', '', '', '', '', '', 60, 7, 'FR', 'USD', 'ca')
|
||||||
;
|
;
|
||||||
|
|
||||||
insert into company_user (company_id, user_id, role)
|
insert into company_user (company_id, user_id, role)
|
||||||
|
|
|
@ -67,9 +67,9 @@ values (1, 'demo@tandem.blog', 'Demo', 'test', '44facbb30d8a419dfd4bfbc44a4b5539
|
||||||
, (5, 'admin@tandem.blog', 'Demo', 'test', '12af4c88b528c2ad4222e3740496ecbc58e76e26f087657524', current_timestamp + interval '1 month')
|
, (5, 'admin@tandem.blog', 'Demo', 'test', '12af4c88b528c2ad4222e3740496ecbc58e76e26f087657524', current_timestamp + interval '1 month')
|
||||||
;
|
;
|
||||||
|
|
||||||
insert into company (company_id, business_name, vatin, trade_name, phone, email, web, address, city, province, postal_code, rtc_number, tourist_tax, country_code, currency_code, default_lang_tag)
|
insert into company (company_id, business_name, vatin, trade_name, phone, email, web, address, city, province, postal_code, rtc_number, tourist_tax, tourist_tax_max_days, country_code, currency_code, default_lang_tag)
|
||||||
values (2, 'Company 2', 'XX123', '', '555-555-555', 'a@a', '', '', '', '', '', '', 60, 'ES', 'EUR', 'ca')
|
values (2, 'Company 2', 'XX123', '', '555-555-555', 'a@a', '', '', '', '', '', '', 60, 7, 'ES', 'EUR', 'ca')
|
||||||
, (4, 'Company 4', 'XX234', '', '666-666-666', 'b@b', '', '', '', '', '', '', 60, 'FR', 'USD', 'ca')
|
, (4, 'Company 4', 'XX234', '', '666-666-666', 'b@b', '', '', '', '', '', '', 60, 7, 'FR', 'USD', 'ca')
|
||||||
;
|
;
|
||||||
|
|
||||||
insert into company_user (company_id, user_id, role)
|
insert into company_user (company_id, user_id, role)
|
||||||
|
|
|
@ -55,9 +55,9 @@ values (1, 'demo@tandem.blog', 'Demo', 'test', '44facbb30d8a419dfd4bfbc44a4b5539
|
||||||
, (5, 'admin@tandem.blog', 'Demo', 'test', '12af4c88b528c2ad4222e3740496ecbc58e76e26f087657524', current_timestamp + interval '1 month')
|
, (5, 'admin@tandem.blog', 'Demo', 'test', '12af4c88b528c2ad4222e3740496ecbc58e76e26f087657524', current_timestamp + interval '1 month')
|
||||||
;
|
;
|
||||||
|
|
||||||
insert into company (company_id, business_name, vatin, trade_name, phone, email, web, address, city, province, postal_code, rtc_number, tourist_tax, country_code, currency_code, default_lang_tag)
|
insert into company (company_id, business_name, vatin, trade_name, phone, email, web, address, city, province, postal_code, rtc_number, tourist_tax, tourist_tax_max_days, country_code, currency_code, default_lang_tag)
|
||||||
values (2, 'Company 2', 'XX123', '', '555-555-555', 'a@a', '', '', '', '', '', '', 60, 'ES', 'EUR', 'ca')
|
values (2, 'Company 2', 'XX123', '', '555-555-555', 'a@a', '', '', '', '', '', '', 60, 7, 'ES', 'EUR', 'ca')
|
||||||
, (4, 'Company 4', 'XX234', '', '666-666-666', 'b@b', '', '', '', '', '', '', 60, 'FR', 'USD', 'ca')
|
, (4, 'Company 4', 'XX234', '', '666-666-666', 'b@b', '', '', '', '', '', '', 60, 7, 'FR', 'USD', 'ca')
|
||||||
;
|
;
|
||||||
|
|
||||||
insert into company_user (company_id, user_id, role)
|
insert into company_user (company_id, user_id, role)
|
||||||
|
|
|
@ -46,9 +46,9 @@ values (1, 'demo@tandem.blog', 'Demo', 'test', '44facbb30d8a419dfd4bfbc44a4b5539
|
||||||
, (5, 'admin@tandem.blog', 'Demo', 'test', '12af4c88b528c2ad4222e3740496ecbc58e76e26f087657524', current_timestamp + interval '1 month')
|
, (5, 'admin@tandem.blog', 'Demo', 'test', '12af4c88b528c2ad4222e3740496ecbc58e76e26f087657524', current_timestamp + interval '1 month')
|
||||||
;
|
;
|
||||||
|
|
||||||
insert into company (company_id, business_name, vatin, trade_name, phone, email, web, address, city, province, postal_code, rtc_number, tourist_tax, country_code, currency_code, default_lang_tag)
|
insert into company (company_id, business_name, vatin, trade_name, phone, email, web, address, city, province, postal_code, rtc_number, tourist_tax, tourist_tax_max_days, country_code, currency_code, default_lang_tag)
|
||||||
values (2, 'Company 2', 'XX123', '', '555-555-555', 'a@a', '', '', '', '', '', '', 60, 'ES', 'EUR', 'ca')
|
values (2, 'Company 2', 'XX123', '', '555-555-555', 'a@a', '', '', '', '', '', '', 60, 7, 'ES', 'EUR', 'ca')
|
||||||
, (4, 'Company 4', 'XX234', '', '666-666-666', 'b@b', '', '', '', '', '', '', 60, 'FR', 'USD', 'ca')
|
, (4, 'Company 4', 'XX234', '', '666-666-666', 'b@b', '', '', '', '', '', '', 60, 7, 'FR', 'USD', 'ca')
|
||||||
;
|
;
|
||||||
|
|
||||||
insert into company_user (company_id, user_id, role)
|
insert into company_user (company_id, user_id, role)
|
||||||
|
|
|
@ -31,8 +31,8 @@ values (1, 'demo@tandem.blog', 'Demo', 'test', '44facbb30d8a419dfd4bfbc44a4b5539
|
||||||
, (9, 'admin@tandem.blog', 'Demo', 'test', '12af4c88b528c2ad4222e3740496ecbc58e76e26f087657524', current_timestamp + interval '1 month')
|
, (9, 'admin@tandem.blog', 'Demo', 'test', '12af4c88b528c2ad4222e3740496ecbc58e76e26f087657524', current_timestamp + interval '1 month')
|
||||||
;
|
;
|
||||||
|
|
||||||
insert into company (company_id, business_name, vatin, trade_name, phone, email, web, address, city, province, postal_code, rtc_number, tourist_tax, country_code, currency_code, default_lang_tag)
|
insert into company (company_id, business_name, vatin, trade_name, phone, email, web, address, city, province, postal_code, rtc_number, tourist_tax, tourist_tax_max_days, country_code, currency_code, default_lang_tag)
|
||||||
values (2, 'Company 2', 'XX123', '', '555-555-555', 'a@a', '', '', '', '', '', '', 60, 'ES', 'EUR', 'ca')
|
values (2, 'Company 2', 'XX123', '', '555-555-555', 'a@a', '', '', '', '', '', '', 60, 7, 'ES', 'EUR', 'ca')
|
||||||
;
|
;
|
||||||
|
|
||||||
insert into company_user (company_id, user_id, role)
|
insert into company_user (company_id, user_id, role)
|
||||||
|
|
|
@ -31,9 +31,9 @@ values (1, 'demo@tandem.blog', 'Demo', 'test', '44facbb30d8a419dfd4bfbc44a4b5539
|
||||||
, (9, 'admin@tandem.blog', 'Demo', 'test', '12af4c88b528c2ad4222e3740496ecbc58e76e26f087657524', current_timestamp + interval '1 month')
|
, (9, 'admin@tandem.blog', 'Demo', 'test', '12af4c88b528c2ad4222e3740496ecbc58e76e26f087657524', current_timestamp + interval '1 month')
|
||||||
;
|
;
|
||||||
|
|
||||||
insert into company (company_id, business_name, vatin, trade_name, phone, email, web, address, city, province, postal_code, rtc_number, tourist_tax, country_code, currency_code, default_lang_tag)
|
insert into company (company_id, business_name, vatin, trade_name, phone, email, web, address, city, province, postal_code, rtc_number, tourist_tax, tourist_tax_max_days, country_code, currency_code, default_lang_tag)
|
||||||
values (2, 'Company 2', 'XX123', '', '555-555-555', 'a@a', '', '', '', '', '', '', 60, 'ES', 'EUR', 'ca')
|
values (2, 'Company 2', 'XX123', '', '555-555-555', 'a@a', '', '', '', '', '', '', 60, 7, 'ES', 'EUR', 'ca')
|
||||||
, (4, 'Company 4', 'XX234', '', '666-666-666', 'b@b', '', '', '', '', '', '', 60, 'FR', 'USD', 'es')
|
, (4, 'Company 4', 'XX234', '', '666-666-666', 'b@b', '', '', '', '', '', '', 60, 7, 'FR', 'USD', 'es')
|
||||||
;
|
;
|
||||||
|
|
||||||
insert into company_user (company_id, user_id, role)
|
insert into company_user (company_id, user_id, role)
|
||||||
|
|
|
@ -5,7 +5,7 @@ reset client_min_messages;
|
||||||
|
|
||||||
begin;
|
begin;
|
||||||
|
|
||||||
select plan(104);
|
select plan(108);
|
||||||
|
|
||||||
set search_path to camper, public;
|
set search_path to camper, public;
|
||||||
|
|
||||||
|
@ -96,6 +96,11 @@ select col_type_is('company', 'tourist_tax', 'integer');
|
||||||
select col_not_null('company', 'tourist_tax');
|
select col_not_null('company', 'tourist_tax');
|
||||||
select col_hasnt_default('company', 'tourist_tax');
|
select col_hasnt_default('company', 'tourist_tax');
|
||||||
|
|
||||||
|
select has_column('company', 'tourist_tax_max_days');
|
||||||
|
select col_type_is('company', 'tourist_tax_max_days', 'positive_integer');
|
||||||
|
select col_not_null('company', 'tourist_tax_max_days');
|
||||||
|
select col_hasnt_default('company', 'tourist_tax_max_days');
|
||||||
|
|
||||||
select has_column('company', 'currency_code');
|
select has_column('company', 'currency_code');
|
||||||
select col_is_fk('company', 'currency_code');
|
select col_is_fk('company', 'currency_code');
|
||||||
select fk_ok('company', 'currency_code', 'currency', 'currency_code');
|
select fk_ok('company', 'currency_code', 'currency', 'currency_code');
|
||||||
|
@ -141,9 +146,9 @@ values (1, 'demo@tandem.blog', 'Demo', 'test', '44facbb30d8a419dfd4bfbc44a4b5539
|
||||||
, (5, 'admin@tandem.blog', 'Demo', 'test', '12af4c88b528c2ad4222e3740496ecbc58e76e26f087657524', current_timestamp + interval '1 month')
|
, (5, 'admin@tandem.blog', 'Demo', 'test', '12af4c88b528c2ad4222e3740496ecbc58e76e26f087657524', current_timestamp + interval '1 month')
|
||||||
;
|
;
|
||||||
|
|
||||||
insert into company (company_id, business_name, vatin, trade_name, phone, email, web, address, city, province, postal_code, rtc_number, tourist_tax, country_code, currency_code, default_lang_tag)
|
insert into company (company_id, business_name, vatin, trade_name, phone, email, web, address, city, province, postal_code, rtc_number, tourist_tax, tourist_tax_max_days, country_code, currency_code, default_lang_tag)
|
||||||
values (2, 'Company 2', 'XX123', '', '555-555-555', 'a@a', '', '', '', '', '', '', 60, 'ES', 'EUR', 'ca')
|
values (2, 'Company 2', 'XX123', '', '555-555-555', 'a@a', '', '', '', '', '', '', 60, 7, 'ES', 'EUR', 'ca')
|
||||||
, (4, 'Company 4', 'XX234', '', '666-666-666', 'b@b', '', '', '', '', '', '', 60, 'FR', 'USD', 'es')
|
, (4, 'Company 4', 'XX234', '', '666-666-666', 'b@b', '', '', '', '', '', '', 60, 7, 'FR', 'USD', 'es')
|
||||||
;
|
;
|
||||||
|
|
||||||
insert into company_user (company_id, user_id, role)
|
insert into company_user (company_id, user_id, role)
|
||||||
|
@ -202,8 +207,8 @@ select results_eq(
|
||||||
reset role;
|
reset role;
|
||||||
|
|
||||||
select throws_ok( $$
|
select throws_ok( $$
|
||||||
insert into company (company_id, business_name, vatin, trade_name, phone, email, web, address, city, province, postal_code, rtc_number, tourist_tax, country_code, currency_code, default_lang_tag)
|
insert into company (company_id, business_name, vatin, trade_name, phone, email, web, address, city, province, postal_code, rtc_number, tourist_tax, tourist_tax_max_days, country_code, currency_code, default_lang_tag)
|
||||||
values (7, ' ', 'XX123', '', '555-555-555', 'a@a', '', '', '', '', '', '', 60, 'ES', 'EUR', 'ca')
|
values (7, ' ', 'XX123', '', '555-555-555', 'a@a', '', '', '', '', '', '', 60, 7, 'ES', 'EUR', 'ca')
|
||||||
$$,
|
$$,
|
||||||
'23514', 'new row for relation "company" violates check constraint "business_name_not_empty"',
|
'23514', 'new row for relation "company" violates check constraint "business_name_not_empty"',
|
||||||
'Should not allow companies with blank business name'
|
'Should not allow companies with blank business name'
|
||||||
|
|
|
@ -45,9 +45,9 @@ values (1, 'demo@tandem.blog', 'Demo', 'test', '44facbb30d8a419dfd4bfbc44a4b5539
|
||||||
, (7, 'another@tandem.blog', 'Another Employee', 'test', default, default, default)
|
, (7, 'another@tandem.blog', 'Another Employee', 'test', default, default, default)
|
||||||
;
|
;
|
||||||
|
|
||||||
insert into company (company_id, business_name, vatin, trade_name, phone, email, web, address, city, province, postal_code, rtc_number, tourist_tax, country_code, currency_code, default_lang_tag)
|
insert into company (company_id, business_name, vatin, trade_name, phone, email, web, address, city, province, postal_code, rtc_number, tourist_tax, tourist_tax_max_days, country_code, currency_code, default_lang_tag)
|
||||||
values (2, 'Company 2', 'XX123', '', '555-555-555', 'a@a', '', '', '', '', '', '', 60, 'ES', 'EUR', 'ca')
|
values (2, 'Company 2', 'XX123', '', '555-555-555', 'a@a', '', '', '', '', '', '', 60, 7, 'ES', 'EUR', 'ca')
|
||||||
, (4, 'Company 4', 'XX234', '', '666-666-666', 'b@b', '', '', '', '', '', '', 60, 'FR', 'USD', 'es')
|
, (4, 'Company 4', 'XX234', '', '666-666-666', 'b@b', '', '', '', '', '', '', 60, 7, 'FR', 'USD', 'es')
|
||||||
;
|
;
|
||||||
|
|
||||||
insert into company_user (company_id, user_id, role)
|
insert into company_user (company_id, user_id, role)
|
||||||
|
|
|
@ -64,9 +64,9 @@ values (1, 'demo@tandem.blog', 'Demo', 'test', '44facbb30d8a419dfd4bfbc44a4b5539
|
||||||
, (7, 'another@tandem.blog', 'Another Employee', 'test', default, default, default)
|
, (7, 'another@tandem.blog', 'Another Employee', 'test', default, default, default)
|
||||||
;
|
;
|
||||||
|
|
||||||
insert into company (company_id, business_name, vatin, trade_name, phone, email, web, address, city, province, postal_code, rtc_number, tourist_tax, country_code, currency_code, default_lang_tag)
|
insert into company (company_id, business_name, vatin, trade_name, phone, email, web, address, city, province, postal_code, rtc_number, tourist_tax, tourist_tax_max_days, country_code, currency_code, default_lang_tag)
|
||||||
values (2, 'Company 2', 'XX123', '', '555-555-555', 'a@a', '', '', '', '', '', '', 60, 'ES', 'EUR', 'ca')
|
values (2, 'Company 2', 'XX123', '', '555-555-555', 'a@a', '', '', '', '', '', '', 60, 7, 'ES', 'EUR', 'ca')
|
||||||
, (4, 'Company 4', 'XX234', '', '666-666-666', 'b@b', '', '', '', '', '', '', 60, 'FR', 'USD', 'es')
|
, (4, 'Company 4', 'XX234', '', '666-666-666', 'b@b', '', '', '', '', '', '', 60, 7, 'FR', 'USD', 'es')
|
||||||
;
|
;
|
||||||
|
|
||||||
insert into company_user (company_id, user_id, role)
|
insert into company_user (company_id, user_id, role)
|
||||||
|
|
|
@ -51,9 +51,9 @@ values (1, 'demo@tandem.blog', 'Demo', 'test', '44facbb30d8a419dfd4bfbc44a4b5539
|
||||||
, (5, 'admin@tandem.blog', 'Demo', 'test', '12af4c88b528c2ad4222e3740496ecbc58e76e26f087657524', current_timestamp + interval '1 month')
|
, (5, 'admin@tandem.blog', 'Demo', 'test', '12af4c88b528c2ad4222e3740496ecbc58e76e26f087657524', current_timestamp + interval '1 month')
|
||||||
;
|
;
|
||||||
|
|
||||||
insert into company (company_id, business_name, vatin, trade_name, phone, email, web, address, city, province, postal_code, rtc_number, tourist_tax, country_code, currency_code, default_lang_tag)
|
insert into company (company_id, business_name, vatin, trade_name, phone, email, web, address, city, province, postal_code, rtc_number, tourist_tax, tourist_tax_max_days, country_code, currency_code, default_lang_tag)
|
||||||
values (2, 'Company 2', 'XX123', '', '555-555-555', 'a@a', '', '', '', '', '', '', 60, 'ES', 'EUR', 'ca')
|
values (2, 'Company 2', 'XX123', '', '555-555-555', 'a@a', '', '', '', '', '', '', 60, 7, 'ES', 'EUR', 'ca')
|
||||||
, (4, 'Company 4', 'XX234', '', '666-666-666', 'b@b', '', '', '', '', '', '', 60, 'FR', 'USD', 'ca')
|
, (4, 'Company 4', 'XX234', '', '666-666-666', 'b@b', '', '', '', '', '', '', 60, 7, 'FR', 'USD', 'ca')
|
||||||
;
|
;
|
||||||
|
|
||||||
insert into company_user (company_id, user_id, role)
|
insert into company_user (company_id, user_id, role)
|
||||||
|
|
|
@ -31,9 +31,9 @@ values (1, 'demo@tandem.blog', 'Demo', 'test', '44facbb30d8a419dfd4bfbc44a4b5539
|
||||||
, (5, 'admin@tandem.blog', 'Demo', 'test', '12af4c88b528c2ad4222e3740496ecbc58e76e26f087657524', current_timestamp + interval '1 month')
|
, (5, 'admin@tandem.blog', 'Demo', 'test', '12af4c88b528c2ad4222e3740496ecbc58e76e26f087657524', current_timestamp + interval '1 month')
|
||||||
;
|
;
|
||||||
|
|
||||||
insert into company (company_id, business_name, vatin, trade_name, phone, email, web, address, city, province, postal_code, rtc_number, tourist_tax, country_code, currency_code, default_lang_tag)
|
insert into company (company_id, business_name, vatin, trade_name, phone, email, web, address, city, province, postal_code, rtc_number, tourist_tax, tourist_tax_max_days, country_code, currency_code, default_lang_tag)
|
||||||
values (2, 'Company 2', 'XX123', '', '555-555-555', 'a@a', '', '', '', '', '', '', 60, 'ES', 'EUR', 'ca')
|
values (2, 'Company 2', 'XX123', '', '555-555-555', 'a@a', '', '', '', '', '', '', 60, 7, 'ES', 'EUR', 'ca')
|
||||||
, (4, 'Company 4', 'XX234', '', '666-666-666', 'b@b', '', '', '', '', '', '', 60, 'FR', 'USD', 'es')
|
, (4, 'Company 4', 'XX234', '', '666-666-666', 'b@b', '', '', '', '', '', '', 60, 7, 'FR', 'USD', 'es')
|
||||||
;
|
;
|
||||||
|
|
||||||
insert into company_user (company_id, user_id, role)
|
insert into company_user (company_id, user_id, role)
|
||||||
|
|
|
@ -31,9 +31,9 @@ values (1, 'demo@tandem.blog', 'Demo', 'test', '44facbb30d8a419dfd4bfbc44a4b5539
|
||||||
, (5, 'admin@tandem.blog', 'Demo', 'test', '12af4c88b528c2ad4222e3740496ecbc58e76e26f087657524', current_timestamp + interval '1 month')
|
, (5, 'admin@tandem.blog', 'Demo', 'test', '12af4c88b528c2ad4222e3740496ecbc58e76e26f087657524', current_timestamp + interval '1 month')
|
||||||
;
|
;
|
||||||
|
|
||||||
insert into company (company_id, business_name, vatin, trade_name, phone, email, web, address, city, province, postal_code, rtc_number, tourist_tax, country_code, currency_code, default_lang_tag)
|
insert into company (company_id, business_name, vatin, trade_name, phone, email, web, address, city, province, postal_code, rtc_number, tourist_tax, tourist_tax_max_days, country_code, currency_code, default_lang_tag)
|
||||||
values (2, 'Company 2', 'XX123', '', '555-555-555', 'a@a', '', '', '', '', '', '', 60, 'ES', 'EUR', 'ca')
|
values (2, 'Company 2', 'XX123', '', '555-555-555', 'a@a', '', '', '', '', '', '', 60, 7, 'ES', 'EUR', 'ca')
|
||||||
, (4, 'Company 4', 'XX234', '', '666-666-666', 'b@b', '', '', '', '', '', '', 60, 'FR', 'USD', 'es')
|
, (4, 'Company 4', 'XX234', '', '666-666-666', 'b@b', '', '', '', '', '', '', 60, 7, 'FR', 'USD', 'es')
|
||||||
;
|
;
|
||||||
|
|
||||||
insert into company_user (company_id, user_id, role)
|
insert into company_user (company_id, user_id, role)
|
||||||
|
|
|
@ -31,9 +31,9 @@ values (1, 'demo@tandem.blog', 'Demo', 'test', '44facbb30d8a419dfd4bfbc44a4b5539
|
||||||
, (5, 'admin@tandem.blog', 'Demo', 'test', '12af4c88b528c2ad4222e3740496ecbc58e76e26f087657524', current_timestamp + interval '1 month')
|
, (5, 'admin@tandem.blog', 'Demo', 'test', '12af4c88b528c2ad4222e3740496ecbc58e76e26f087657524', current_timestamp + interval '1 month')
|
||||||
;
|
;
|
||||||
|
|
||||||
insert into company (company_id, business_name, vatin, trade_name, phone, email, web, address, city, province, postal_code, rtc_number, tourist_tax, country_code, currency_code, default_lang_tag)
|
insert into company (company_id, business_name, vatin, trade_name, phone, email, web, address, city, province, postal_code, rtc_number, tourist_tax, tourist_tax_max_days, country_code, currency_code, default_lang_tag)
|
||||||
values (2, 'Company 2', 'XX123', '', '555-555-555', 'a@a', '', '', '', '', '', '', 60, 'ES', 'EUR', 'ca')
|
values (2, 'Company 2', 'XX123', '', '555-555-555', 'a@a', '', '', '', '', '', '', 60, 7, 'ES', 'EUR', 'ca')
|
||||||
, (4, 'Company 4', 'XX234', '', '666-666-666', 'b@b', '', '', '', '', '', '', 60, 'FR', 'USD', 'es')
|
, (4, 'Company 4', 'XX234', '', '666-666-666', 'b@b', '', '', '', '', '', '', 60, 7, 'FR', 'USD', 'es')
|
||||||
;
|
;
|
||||||
|
|
||||||
insert into company_user (company_id, user_id, role)
|
insert into company_user (company_id, user_id, role)
|
||||||
|
|
|
@ -30,8 +30,8 @@ truncate company cascade;
|
||||||
reset client_min_messages;
|
reset client_min_messages;
|
||||||
|
|
||||||
|
|
||||||
insert into company (company_id, business_name, vatin, trade_name, phone, email, web, address, city, province, postal_code, rtc_number, tourist_tax, country_code, currency_code, default_lang_tag)
|
insert into company (company_id, business_name, vatin, trade_name, phone, email, web, address, city, province, postal_code, rtc_number, tourist_tax, tourist_tax_max_days, country_code, currency_code, default_lang_tag)
|
||||||
values (2, 'Company 2', 'XX123', '', '555-555-555', 'a@a', '', '', '', '', '', '', 350, 'ES', 'EUR', 'ca')
|
values (2, 'Company 2', 'XX123', '', '555-555-555', 'a@a', '', '', '', '', '', '', 350, 7, 'ES', 'EUR', 'ca')
|
||||||
;
|
;
|
||||||
|
|
||||||
insert into media_content (media_type, bytes)
|
insert into media_content (media_type, bytes)
|
||||||
|
|
|
@ -5,7 +5,7 @@ reset client_min_messages;
|
||||||
|
|
||||||
begin;
|
begin;
|
||||||
|
|
||||||
select plan(15);
|
select plan(16);
|
||||||
|
|
||||||
set search_path to camper, public;
|
set search_path to camper, public;
|
||||||
|
|
||||||
|
@ -35,8 +35,8 @@ truncate season cascade;
|
||||||
truncate company cascade;
|
truncate company cascade;
|
||||||
reset client_min_messages;
|
reset client_min_messages;
|
||||||
|
|
||||||
insert into company (company_id, business_name, vatin, trade_name, phone, email, web, address, city, province, postal_code, rtc_number, tourist_tax, country_code, currency_code, default_lang_tag)
|
insert into company (company_id, business_name, vatin, trade_name, phone, email, web, address, city, province, postal_code, rtc_number, tourist_tax, tourist_tax_max_days, country_code, currency_code, default_lang_tag)
|
||||||
values (2, 'Company 2', 'XX123', '', '555-555-555', 'a@a', '', '', '', '', '', '', 350, 'ES', 'EUR', 'ca')
|
values (2, 'Company 2', 'XX123', '', '555-555-555', 'a@a', '', '', '', '', '', '', 350, 7, 'ES', 'EUR', 'ca')
|
||||||
;
|
;
|
||||||
|
|
||||||
insert into season (season_id, company_id, name)
|
insert into season (season_id, company_id, name)
|
||||||
|
@ -115,6 +115,10 @@ select lives_ok(
|
||||||
$$ select draft_payment(null, current_date + 6, current_date + 11, 'b065f4e3-2cc8-491d-a413-d015d7d00183', 1, 2, 3, 0, null, null) $$,
|
$$ select draft_payment(null, current_date + 6, current_date + 11, 'b065f4e3-2cc8-491d-a413-d015d7d00183', 1, 2, 3, 0, null, null) $$,
|
||||||
'A payment for a reservation in less than a week has a 100 % of downpayment'
|
'A payment for a reservation in less than a week has a 100 % of downpayment'
|
||||||
);
|
);
|
||||||
|
select lives_ok(
|
||||||
|
$$ select draft_payment(null, current_date + 10, current_date + 58, 'b065f4e3-2cc8-491d-a413-d015d7d00183', 2, 3, 4, 0, null, null) $$,
|
||||||
|
'All reservations incur a tourist tax for the first tourist_tax_max_days days'
|
||||||
|
);
|
||||||
|
|
||||||
select lives_ok(
|
select lives_ok(
|
||||||
$$ select draft_payment('7cccfe16-695e-486d-a6a5-1162fb85cafb', current_date + 58, current_date + 65, 'c1b6f4fc-32c1-4cd5-b796-0c5059152a52', 2, 4, 6, 3, 'pref I before E', array[(16, 2), (20, 3)]::option_units[]) $$,
|
$$ select draft_payment('7cccfe16-695e-486d-a6a5-1162fb85cafb', current_date + 58, current_date + 65, 'c1b6f4fc-32c1-4cd5-b796-0c5059152a52', 2, 4, 6, 3, 'pref I before E', array[(16, 2), (20, 3)]::option_units[]) $$,
|
||||||
|
@ -131,6 +135,7 @@ select bag_eq(
|
||||||
$$ select company_id, 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 payment $$,
|
$$ select company_id, 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 payment $$,
|
||||||
$$ values (2, 12, current_date + 58, current_date + 65, 3200, 2, 10420, 4, 20840, 6, 25080, 3, 2450, 4900, 79160, 'EUR', 0.3, 'pref I before E', 'draft', '2024-01-01 01:01:01', current_timestamp)
|
$$ values (2, 12, current_date + 58, current_date + 65, 3200, 2, 10420, 4, 20840, 6, 25080, 3, 2450, 4900, 79160, 'EUR', 0.3, 'pref I before E', 'draft', '2024-01-01 01:01:01', current_timestamp)
|
||||||
, (2, 14, current_date + 59, current_date + 64, 71000, 1, 0, 2, 0, 3, 0, 0, 0, 1750, 72750, 'EUR', 0.3, '', 'draft', current_timestamp, current_timestamp)
|
, (2, 14, current_date + 59, current_date + 64, 71000, 1, 0, 2, 0, 3, 0, 0, 0, 1750, 72750, 'EUR', 0.3, '', 'draft', current_timestamp, current_timestamp)
|
||||||
|
, (2, 14, current_date + 10, current_date + 58, 1632000, 2, 0, 3, 0, 4, 0, 0, 0, 4900, 1636900, 'EUR', 0.3, '', 'draft', current_timestamp, current_timestamp)
|
||||||
, (2, 14, current_date + 6, current_date + 11, 85000, 1, 0, 2, 0, 3, 0, 0, 0, 1750, 86750, 'EUR', 1.0, '', 'draft', current_timestamp, current_timestamp)
|
, (2, 14, current_date + 6, current_date + 11, 85000, 1, 0, 2, 0, 3, 0, 0, 0, 1750, 86750, 'EUR', 1.0, '', 'draft', current_timestamp, current_timestamp)
|
||||||
, (2, 12, current_date + 61, current_date + 62, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 'USD', 1.0, '', 'pending', '2024-01-01 02:02:02', '2024-01-01 02:02:02')
|
, (2, 12, current_date + 61, current_date + 62, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 'USD', 1.0, '', 'pending', '2024-01-01 02:02:02', '2024-01-01 02:02:02')
|
||||||
, (2, 14, current_date + 31, current_date + 36, 85000, 2, 0, 1, 0, 1, 0, 1, 0, 3500, 96000, 'EUR', 0.3, 'under a tree', 'draft', current_timestamp, current_timestamp)
|
, (2, 14, current_date + 31, current_date + 36, 85000, 2, 0, 1, 0, 1, 0, 1, 0, 3500, 96000, 'EUR', 0.3, 'under a tree', 'draft', current_timestamp, current_timestamp)
|
||||||
|
|
|
@ -25,8 +25,8 @@ truncate company cascade;
|
||||||
reset client_min_messages;
|
reset client_min_messages;
|
||||||
|
|
||||||
|
|
||||||
insert into company (company_id, business_name, vatin, trade_name, phone, email, web, address, city, province, postal_code, rtc_number, tourist_tax, country_code, currency_code, default_lang_tag)
|
insert into company (company_id, business_name, vatin, trade_name, phone, email, web, address, city, province, postal_code, rtc_number, tourist_tax, tourist_tax_max_days, country_code, currency_code, default_lang_tag)
|
||||||
values (1, 'Company 2', 'XX123', '', '555-555-555', 'a@a', '', '', '', '', '', '', 60, 'ES', 'EUR', 'ca')
|
values (1, 'Company 2', 'XX123', '', '555-555-555', 'a@a', '', '', '', '', '', '', 60, 7, 'ES', 'EUR', 'ca')
|
||||||
;
|
;
|
||||||
|
|
||||||
insert into amenity (amenity_id, company_id, label, name, info1, info2, active)
|
insert into amenity (amenity_id, company_id, label, name, info1, info2, active)
|
||||||
|
|
|
@ -27,8 +27,8 @@ truncate company cascade;
|
||||||
reset client_min_messages;
|
reset client_min_messages;
|
||||||
|
|
||||||
|
|
||||||
insert into company (company_id, business_name, vatin, trade_name, phone, email, web, address, city, province, postal_code, rtc_number, tourist_tax, country_code, currency_code, default_lang_tag)
|
insert into company (company_id, business_name, vatin, trade_name, phone, email, web, address, city, province, postal_code, rtc_number, tourist_tax, tourist_tax_max_days, country_code, currency_code, default_lang_tag)
|
||||||
values (1, 'Company 2', 'XX123', '', '555-555-555', 'a@a', '', '', '', '', '', '', 60, 'ES', 'EUR', 'ca')
|
values (1, 'Company 2', 'XX123', '', '555-555-555', 'a@a', '', '', '', '', '', '', 60, 7, 'ES', 'EUR', 'ca')
|
||||||
;
|
;
|
||||||
|
|
||||||
insert into amenity (amenity_id, company_id, label, name)
|
insert into amenity (amenity_id, company_id, label, name)
|
||||||
|
|
|
@ -28,8 +28,8 @@ truncate company cascade;
|
||||||
reset client_min_messages;
|
reset client_min_messages;
|
||||||
|
|
||||||
|
|
||||||
insert into company (company_id, business_name, vatin, trade_name, phone, email, web, address, city, province, postal_code, rtc_number, tourist_tax, country_code, currency_code, default_lang_tag)
|
insert into company (company_id, business_name, vatin, trade_name, phone, email, web, address, city, province, postal_code, rtc_number, tourist_tax, tourist_tax_max_days, country_code, currency_code, default_lang_tag)
|
||||||
values (1, 'Company 2', 'XX123', '', '555-555-555', 'a@a', '', '', '', '', '', '', 60, 'ES', 'EUR', 'ca')
|
values (1, 'Company 2', 'XX123', '', '555-555-555', 'a@a', '', '', '', '', '', '', 60, 7, 'ES', 'EUR', 'ca')
|
||||||
;
|
;
|
||||||
|
|
||||||
insert into media_content (media_type, bytes)
|
insert into media_content (media_type, bytes)
|
||||||
|
|
|
@ -30,8 +30,8 @@ truncate company cascade;
|
||||||
reset client_min_messages;
|
reset client_min_messages;
|
||||||
|
|
||||||
|
|
||||||
insert into company (company_id, business_name, vatin, trade_name, phone, email, web, address, city, province, postal_code, rtc_number, tourist_tax, country_code, currency_code, default_lang_tag)
|
insert into company (company_id, business_name, vatin, trade_name, phone, email, web, address, city, province, postal_code, rtc_number, tourist_tax, tourist_tax_max_days, country_code, currency_code, default_lang_tag)
|
||||||
values (1, 'Company 2', 'XX123', '', '555-555-555', 'a@a', '', '', '', '', '', '', 60, 'ES', 'EUR', 'ca')
|
values (1, 'Company 2', 'XX123', '', '555-555-555', 'a@a', '', '', '', '', '', '', 60, 7, 'ES', 'EUR', 'ca')
|
||||||
;
|
;
|
||||||
|
|
||||||
insert into media_content (media_type, bytes)
|
insert into media_content (media_type, bytes)
|
||||||
|
|
|
@ -27,8 +27,8 @@ truncate company cascade;
|
||||||
reset client_min_messages;
|
reset client_min_messages;
|
||||||
|
|
||||||
|
|
||||||
insert into company (company_id, business_name, vatin, trade_name, phone, email, web, address, city, province, postal_code, rtc_number, tourist_tax, country_code, currency_code, default_lang_tag)
|
insert into company (company_id, business_name, vatin, trade_name, phone, email, web, address, city, province, postal_code, rtc_number, tourist_tax, tourist_tax_max_days, country_code, currency_code, default_lang_tag)
|
||||||
values (1, 'Company 2', 'XX123', '', '555-555-555', 'a@a', '', '', '', '', '', '', 60, 'ES', 'EUR', 'ca')
|
values (1, 'Company 2', 'XX123', '', '555-555-555', 'a@a', '', '', '', '', '', '', 60, 7, 'ES', 'EUR', 'ca')
|
||||||
;
|
;
|
||||||
|
|
||||||
insert into media_content (media_type, bytes)
|
insert into media_content (media_type, bytes)
|
||||||
|
|
|
@ -30,8 +30,8 @@ truncate company cascade;
|
||||||
reset client_min_messages;
|
reset client_min_messages;
|
||||||
|
|
||||||
|
|
||||||
insert into company (company_id, business_name, vatin, trade_name, phone, email, web, address, city, province, postal_code, rtc_number, tourist_tax, country_code, currency_code, default_lang_tag)
|
insert into company (company_id, business_name, vatin, trade_name, phone, email, web, address, city, province, postal_code, rtc_number, tourist_tax, tourist_tax_max_days, country_code, currency_code, default_lang_tag)
|
||||||
values (1, 'Company 2', 'XX123', '', '555-555-555', 'a@a', '', '', '', '', '', '', 60, 'ES', 'EUR', 'ca')
|
values (1, 'Company 2', 'XX123', '', '555-555-555', 'a@a', '', '', '', '', '', '', 60, 7, 'ES', 'EUR', 'ca')
|
||||||
;
|
;
|
||||||
|
|
||||||
insert into media_content (media_type, bytes)
|
insert into media_content (media_type, bytes)
|
||||||
|
|
|
@ -30,8 +30,8 @@ truncate company cascade;
|
||||||
reset client_min_messages;
|
reset client_min_messages;
|
||||||
|
|
||||||
|
|
||||||
insert into company (company_id, business_name, vatin, trade_name, phone, email, web, address, city, province, postal_code, rtc_number, tourist_tax, country_code, currency_code, default_lang_tag)
|
insert into company (company_id, business_name, vatin, trade_name, phone, email, web, address, city, province, postal_code, rtc_number, tourist_tax, tourist_tax_max_days, country_code, currency_code, default_lang_tag)
|
||||||
values (1, 'Company 2', 'XX123', '', '555-555-555', 'a@a', '', '', '', '', '', '', 60, 'ES', 'EUR', 'ca')
|
values (1, 'Company 2', 'XX123', '', '555-555-555', 'a@a', '', '', '', '', '', '', 60, 7, 'ES', 'EUR', 'ca')
|
||||||
;
|
;
|
||||||
|
|
||||||
insert into media_content (media_type, bytes)
|
insert into media_content (media_type, bytes)
|
||||||
|
|
|
@ -26,8 +26,8 @@ truncate media_content cascade;
|
||||||
truncate company cascade;
|
truncate company cascade;
|
||||||
reset client_min_messages;
|
reset client_min_messages;
|
||||||
|
|
||||||
insert into company (company_id, business_name, vatin, trade_name, phone, email, web, address, city, province, postal_code, rtc_number, tourist_tax, country_code, currency_code, default_lang_tag)
|
insert into company (company_id, business_name, vatin, trade_name, phone, email, web, address, city, province, postal_code, rtc_number, tourist_tax, tourist_tax_max_days, country_code, currency_code, default_lang_tag)
|
||||||
values (1, 'Company 2', 'XX123', '', '555-555-555', 'a@a', '', '', '', '', '', '', 60, 'ES', 'EUR', 'ca')
|
values (1, 'Company 2', 'XX123', '', '555-555-555', 'a@a', '', '', '', '', '', '', 60, 7, 'ES', 'EUR', 'ca')
|
||||||
;
|
;
|
||||||
|
|
||||||
insert into media_content (media_type, bytes)
|
insert into media_content (media_type, bytes)
|
||||||
|
|
|
@ -25,8 +25,8 @@ truncate company cascade;
|
||||||
reset client_min_messages;
|
reset client_min_messages;
|
||||||
|
|
||||||
|
|
||||||
insert into company (company_id, business_name, vatin, trade_name, phone, email, web, address, city, province, postal_code, rtc_number, tourist_tax, country_code, currency_code, default_lang_tag)
|
insert into company (company_id, business_name, vatin, trade_name, phone, email, web, address, city, province, postal_code, rtc_number, tourist_tax, tourist_tax_max_days, country_code, currency_code, default_lang_tag)
|
||||||
values (1, 'Company 2', 'XX123', '', '555-555-555', 'a@a', '', '', '', '', '', '', 60, 'ES', 'EUR', 'ca')
|
values (1, 'Company 2', 'XX123', '', '555-555-555', 'a@a', '', '', '', '', '', '', 60, 7, 'ES', 'EUR', 'ca')
|
||||||
;
|
;
|
||||||
|
|
||||||
insert into season (company_id, slug, name, color, active)
|
insert into season (company_id, slug, name, color, active)
|
||||||
|
|
|
@ -25,8 +25,8 @@ truncate company cascade;
|
||||||
reset client_min_messages;
|
reset client_min_messages;
|
||||||
|
|
||||||
|
|
||||||
insert into company (company_id, business_name, vatin, trade_name, phone, email, web, address, city, province, postal_code, rtc_number, tourist_tax, country_code, currency_code, default_lang_tag)
|
insert into company (company_id, business_name, vatin, trade_name, phone, email, web, address, city, province, postal_code, rtc_number, tourist_tax, tourist_tax_max_days, country_code, currency_code, default_lang_tag)
|
||||||
values (1, 'Company 2', 'XX123', '', '555-555-555', 'a@a', '', '', '', '', '', '', 60, 'ES', 'EUR', 'ca')
|
values (1, 'Company 2', 'XX123', '', '555-555-555', 'a@a', '', '', '', '', '', '', 60, 7, 'ES', 'EUR', 'ca')
|
||||||
;
|
;
|
||||||
|
|
||||||
insert into service (service_id, company_id, icon_name, name, description)
|
insert into service (service_id, company_id, icon_name, name, description)
|
||||||
|
|
|
@ -28,8 +28,8 @@ truncate company cascade;
|
||||||
reset client_min_messages;
|
reset client_min_messages;
|
||||||
|
|
||||||
|
|
||||||
insert into company (company_id, business_name, vatin, trade_name, phone, email, web, address, city, province, postal_code, rtc_number, tourist_tax, country_code, currency_code, default_lang_tag)
|
insert into company (company_id, business_name, vatin, trade_name, phone, email, web, address, city, province, postal_code, rtc_number, tourist_tax, tourist_tax_max_days, country_code, currency_code, default_lang_tag)
|
||||||
values (1, 'Company 2', 'XX123', '', '555-555-555', 'a@a', '', '', '', '', '', '', 60, 'ES', 'EUR', 'ca')
|
values (1, 'Company 2', 'XX123', '', '555-555-555', 'a@a', '', '', '', '', '', '', 60, 7, 'ES', 'EUR', 'ca')
|
||||||
;
|
;
|
||||||
|
|
||||||
insert into media_content (media_type, bytes)
|
insert into media_content (media_type, bytes)
|
||||||
|
|
|
@ -32,8 +32,8 @@ values (1, 'demo@tandem.blog', 'Demo', 'test')
|
||||||
, (9, 'admin@tandem.blog', 'Demo', 'test')
|
, (9, 'admin@tandem.blog', 'Demo', 'test')
|
||||||
;
|
;
|
||||||
|
|
||||||
insert into company (company_id, business_name, vatin, trade_name, phone, email, web, address, city, province, postal_code, rtc_number, tourist_tax, country_code, currency_code, default_lang_tag)
|
insert into company (company_id, business_name, vatin, trade_name, phone, email, web, address, city, province, postal_code, rtc_number, tourist_tax, tourist_tax_max_days, country_code, currency_code, default_lang_tag)
|
||||||
values (2, 'Company 2', 'XX123', '', '555-555-555', 'a@a', '', '', '', '', '', '', 60, 'ES', 'EUR', 'ca')
|
values (2, 'Company 2', 'XX123', '', '555-555-555', 'a@a', '', '', '', '', '', '', 60, 7, 'ES', 'EUR', 'ca')
|
||||||
;
|
;
|
||||||
|
|
||||||
select lives_ok(
|
select lives_ok(
|
||||||
|
|
|
@ -43,10 +43,10 @@ values (1, 'demo@tandem.blog', 'Demo', 'test', '44facbb30d8a419dfd4bfbc44a4b5539
|
||||||
, (5, 'admin@tandem.blog', 'Demo', 'test', '12af4c88b528c2ad4222e3740496ecbc58e76e26f087657524', current_timestamp + interval '1 month')
|
, (5, 'admin@tandem.blog', 'Demo', 'test', '12af4c88b528c2ad4222e3740496ecbc58e76e26f087657524', current_timestamp + interval '1 month')
|
||||||
;
|
;
|
||||||
|
|
||||||
insert into company (company_id, business_name, vatin, trade_name, phone, email, web, address, city, province, postal_code, rtc_number, tourist_tax, country_code, currency_code, default_lang_tag)
|
insert into company (company_id, business_name, vatin, trade_name, phone, email, web, address, city, province, postal_code, rtc_number, tourist_tax, tourist_tax_max_days, country_code, currency_code, default_lang_tag)
|
||||||
values (2, 'Company 2', 'XX123', '', '555-555-555', 'a@a', '', '', '', '', '', '', 60, 'ES', 'EUR', 'ca')
|
values (2, 'Company 2', 'XX123', '', '555-555-555', 'a@a', '', '', '', '', '', '', 60, 7, 'ES', 'EUR', 'ca')
|
||||||
, (4, 'Company 4', 'XX234', '', '666-666-666', 'b@b', '', '', '', '', '', '', 60, 'FR', 'USD', 'ca')
|
, (4, 'Company 4', 'XX234', '', '666-666-666', 'b@b', '', '', '', '', '', '', 60, 7, 'FR', 'USD', 'ca')
|
||||||
, (6, 'Company 5', 'XX345', '', '777-777-777', 'c@c', '', '', '', '', '', '', 60, 'FR', 'USD', 'ca')
|
, (6, 'Company 5', 'XX345', '', '777-777-777', 'c@c', '', '', '', '', '', '', 60, 7, 'FR', 'USD', 'ca')
|
||||||
;
|
;
|
||||||
|
|
||||||
insert into company_user (company_id, user_id, role)
|
insert into company_user (company_id, user_id, role)
|
||||||
|
|
|
@ -51,9 +51,9 @@ values (1, 'demo@tandem.blog', 'Demo', 'test', '44facbb30d8a419dfd4bfbc44a4b5539
|
||||||
, (5, 'admin@tandem.blog', 'Demo', 'test', '12af4c88b528c2ad4222e3740496ecbc58e76e26f087657524', current_timestamp + interval '1 month')
|
, (5, 'admin@tandem.blog', 'Demo', 'test', '12af4c88b528c2ad4222e3740496ecbc58e76e26f087657524', current_timestamp + interval '1 month')
|
||||||
;
|
;
|
||||||
|
|
||||||
insert into company (company_id, business_name, vatin, trade_name, phone, email, web, address, city, province, postal_code, rtc_number, tourist_tax, country_code, currency_code, default_lang_tag)
|
insert into company (company_id, business_name, vatin, trade_name, phone, email, web, address, city, province, postal_code, rtc_number, tourist_tax, tourist_tax_max_days, country_code, currency_code, default_lang_tag)
|
||||||
values (2, 'Company 2', 'XX123', '', '555-555-555', 'a@a', '', '', '', '', '', '', 60, 'ES', 'EUR', 'ca')
|
values (2, 'Company 2', 'XX123', '', '555-555-555', 'a@a', '', '', '', '', '', '', 60, 7, 'ES', 'EUR', 'ca')
|
||||||
, (4, 'Company 4', 'XX234', '', '666-666-666', 'b@b', '', '', '', '', '', '', 60, 'FR', 'USD', 'ca')
|
, (4, 'Company 4', 'XX234', '', '666-666-666', 'b@b', '', '', '', '', '', '', 60, 7, 'FR', 'USD', 'ca')
|
||||||
;
|
;
|
||||||
|
|
||||||
insert into company_user (company_id, user_id, role)
|
insert into company_user (company_id, user_id, role)
|
||||||
|
|
|
@ -53,9 +53,9 @@ values (1, 'demo@tandem.blog', 'Demo', 'test', '44facbb30d8a419dfd4bfbc44a4b5539
|
||||||
, (5, 'admin@tandem.blog', 'Demo', 'test', '12af4c88b528c2ad4222e3740496ecbc58e76e26f087657524', current_timestamp + interval '1 month')
|
, (5, 'admin@tandem.blog', 'Demo', 'test', '12af4c88b528c2ad4222e3740496ecbc58e76e26f087657524', current_timestamp + interval '1 month')
|
||||||
;
|
;
|
||||||
|
|
||||||
insert into company (company_id, business_name, vatin, trade_name, phone, email, web, address, city, province, postal_code, rtc_number, tourist_tax, country_code, currency_code, default_lang_tag)
|
insert into company (company_id, business_name, vatin, trade_name, phone, email, web, address, city, province, postal_code, rtc_number, tourist_tax, tourist_tax_max_days, country_code, currency_code, default_lang_tag)
|
||||||
values (2, 'Company 2', 'XX123', '', '555-555-555', 'a@a', '', '', '', '', '', '', 60, 'ES', 'EUR', 'ca')
|
values (2, 'Company 2', 'XX123', '', '555-555-555', 'a@a', '', '', '', '', '', '', 60, 7, 'ES', 'EUR', 'ca')
|
||||||
, (4, 'Company 4', 'XX234', '', '666-666-666', 'b@b', '', '', '', '', '', '', 60, 'FR', 'USD', 'ca')
|
, (4, 'Company 4', 'XX234', '', '666-666-666', 'b@b', '', '', '', '', '', '', 60, 7, 'FR', 'USD', 'ca')
|
||||||
;
|
;
|
||||||
|
|
||||||
insert into company_user (company_id, user_id, role)
|
insert into company_user (company_id, user_id, role)
|
||||||
|
|
|
@ -53,10 +53,10 @@ values (1, 'demo@tandem.blog', 'Demo', 'test', '44facbb30d8a419dfd4bfbc44a4b5539
|
||||||
, (5, 'admin@tandem.blog', 'Demo', 'test', '12af4c88b528c2ad4222e3740496ecbc58e76e26f087657524', current_timestamp + interval '1 month')
|
, (5, 'admin@tandem.blog', 'Demo', 'test', '12af4c88b528c2ad4222e3740496ecbc58e76e26f087657524', current_timestamp + interval '1 month')
|
||||||
;
|
;
|
||||||
|
|
||||||
insert into company (company_id, business_name, vatin, trade_name, phone, email, web, address, city, province, postal_code, rtc_number, tourist_tax, country_code, currency_code, default_lang_tag)
|
insert into company (company_id, business_name, vatin, trade_name, phone, email, web, address, city, province, postal_code, rtc_number, tourist_tax, tourist_tax_max_days, country_code, currency_code, default_lang_tag)
|
||||||
values (2, 'Company 2', 'XX123', '', '555-555-555', 'a@a', '', '', '', '', '', '', 60, 'ES', 'EUR', 'ca')
|
values (2, 'Company 2', 'XX123', '', '555-555-555', 'a@a', '', '', '', '', '', '', 60, 7, 'ES', 'EUR', 'ca')
|
||||||
, (4, 'Company 4', 'XX234', '', '666-666-666', 'b@b', '', '', '', '', '', '', 60, 'FR', 'USD', 'ca')
|
, (4, 'Company 4', 'XX234', '', '666-666-666', 'b@b', '', '', '', '', '', '', 60, 7, 'FR', 'USD', 'ca')
|
||||||
, (8, 'Company 8', 'XX345', '', '777-777-777', 'c@c', '', '', '', '', '', '', 60, 'DE', 'USD', 'en')
|
, (8, 'Company 8', 'XX345', '', '777-777-777', 'c@c', '', '', '', '', '', '', 60, 7, 'DE', 'USD', 'en')
|
||||||
;
|
;
|
||||||
|
|
||||||
insert into company_user (company_id, user_id, role)
|
insert into company_user (company_id, user_id, role)
|
||||||
|
|
|
@ -56,9 +56,9 @@ values (1, 'demo@tandem.blog', 'Demo', 'test', '44facbb30d8a419dfd4bfbc44a4b5539
|
||||||
, (5, 'admin@tandem.blog', 'Demo', 'test', '12af4c88b528c2ad4222e3740496ecbc58e76e26f087657524', current_timestamp + interval '1 month')
|
, (5, 'admin@tandem.blog', 'Demo', 'test', '12af4c88b528c2ad4222e3740496ecbc58e76e26f087657524', current_timestamp + interval '1 month')
|
||||||
;
|
;
|
||||||
|
|
||||||
insert into company (company_id, business_name, vatin, trade_name, phone, email, web, address, city, province, postal_code, rtc_number, tourist_tax, country_code, currency_code, default_lang_tag)
|
insert into company (company_id, business_name, vatin, trade_name, phone, email, web, address, city, province, postal_code, rtc_number, tourist_tax, tourist_tax_max_days, country_code, currency_code, default_lang_tag)
|
||||||
values (2, 'Company 2', 'XX123', '', '555-555-555', 'a@a', '', '', '', '', '', '', 60, 'ES', 'EUR', 'ca')
|
values (2, 'Company 2', 'XX123', '', '555-555-555', 'a@a', '', '', '', '', '', '', 60, 7, 'ES', 'EUR', 'ca')
|
||||||
, (4, 'Company 4', 'XX234', '', '666-666-666', 'b@b', '', '', '', '', '', '', 60, 'FR', 'USD', 'ca')
|
, (4, 'Company 4', 'XX234', '', '666-666-666', 'b@b', '', '', '', '', '', '', 60, 7, 'FR', 'USD', 'ca')
|
||||||
;
|
;
|
||||||
|
|
||||||
insert into company_user (company_id, user_id, role)
|
insert into company_user (company_id, user_id, role)
|
||||||
|
|
|
@ -25,8 +25,8 @@ truncate media_content cascade;
|
||||||
truncate company cascade;
|
truncate company cascade;
|
||||||
reset client_min_messages;
|
reset client_min_messages;
|
||||||
|
|
||||||
insert into company (company_id, business_name, vatin, trade_name, phone, email, web, address, city, province, postal_code, rtc_number, tourist_tax, country_code, currency_code, default_lang_tag)
|
insert into company (company_id, business_name, vatin, trade_name, phone, email, web, address, city, province, postal_code, rtc_number, tourist_tax, tourist_tax_max_days, country_code, currency_code, default_lang_tag)
|
||||||
values (1, 'Company 2', 'XX123', '', '555-555-555', 'a@a', '', '', '', '', '', '', 60, 'ES', 'EUR', 'ca')
|
values (1, 'Company 2', 'XX123', '', '555-555-555', 'a@a', '', '', '', '', '', '', 60, 7, 'ES', 'EUR', 'ca')
|
||||||
;
|
;
|
||||||
|
|
||||||
insert into media_content (media_type, bytes)
|
insert into media_content (media_type, bytes)
|
||||||
|
|
|
@ -29,9 +29,9 @@ truncate company cascade;
|
||||||
reset client_min_messages;
|
reset client_min_messages;
|
||||||
|
|
||||||
|
|
||||||
insert into company (company_id, business_name, vatin, trade_name, phone, email, web, address, city, province, postal_code, rtc_number, tourist_tax, country_code, currency_code, default_lang_tag)
|
insert into company (company_id, business_name, vatin, trade_name, phone, email, web, address, city, province, postal_code, rtc_number, tourist_tax, tourist_tax_max_days, country_code, currency_code, default_lang_tag)
|
||||||
values (1, 'Company 2', 'XX123', '', '555-555-555', 'a@a', '', '', '', '', '', '', 60, 'ES', 'EUR', 'ca')
|
values (1, 'Company 2', 'XX123', '', '555-555-555', 'a@a', '', '', '', '', '', '', 60, 7, 'ES', 'EUR', 'ca')
|
||||||
, (2, 'Company 2', 'XX123', '', '555-555-555', 'a@a', '', '', '', '', '', '', 60, 'ES', 'EUR', 'ca')
|
, (2, 'Company 2', 'XX123', '', '555-555-555', 'a@a', '', '', '', '', '', '', 60, 7, 'ES', 'EUR', 'ca')
|
||||||
;
|
;
|
||||||
|
|
||||||
insert into media_content (media_type, bytes)
|
insert into media_content (media_type, bytes)
|
||||||
|
|
|
@ -27,8 +27,8 @@ truncate company cascade;
|
||||||
reset client_min_messages;
|
reset client_min_messages;
|
||||||
|
|
||||||
|
|
||||||
insert into company (company_id, business_name, vatin, trade_name, phone, email, web, address, city, province, postal_code, rtc_number, tourist_tax, country_code, currency_code, default_lang_tag)
|
insert into company (company_id, business_name, vatin, trade_name, phone, email, web, address, city, province, postal_code, rtc_number, tourist_tax, tourist_tax_max_days, country_code, currency_code, default_lang_tag)
|
||||||
values (2, 'Company 2', 'XX123', '', '555-555-555', 'a@a', '', '', '', '', '', '', 60, 'ES', 'EUR', 'ca')
|
values (2, 'Company 2', 'XX123', '', '555-555-555', 'a@a', '', '', '', '', '', '', 60, 7, 'ES', 'EUR', 'ca')
|
||||||
;
|
;
|
||||||
|
|
||||||
insert into amenity (amenity_id, company_id, label, name)
|
insert into amenity (amenity_id, company_id, label, name)
|
||||||
|
|
|
@ -30,9 +30,9 @@ truncate company cascade;
|
||||||
reset client_min_messages;
|
reset client_min_messages;
|
||||||
|
|
||||||
|
|
||||||
insert into company (company_id, business_name, vatin, trade_name, phone, email, web, address, city, province, postal_code, rtc_number, tourist_tax, country_code, currency_code, default_lang_tag)
|
insert into company (company_id, business_name, vatin, trade_name, phone, email, web, address, city, province, postal_code, rtc_number, tourist_tax, tourist_tax_max_days, country_code, currency_code, default_lang_tag)
|
||||||
values (1, 'Company 2', 'XX123', '', '555-555-555', 'a@a', '', '', '', '', '', '', 60, 'ES', 'EUR', 'ca')
|
values (1, 'Company 2', 'XX123', '', '555-555-555', 'a@a', '', '', '', '', '', '', 60, 7, 'ES', 'EUR', 'ca')
|
||||||
, (2, 'Company 2', 'XX123', '', '555-555-555', 'a@a', '', '', '', '', '', '', 60, 'ES', 'EUR', 'ca')
|
, (2, 'Company 2', 'XX123', '', '555-555-555', 'a@a', '', '', '', '', '', '', 60, 7, 'ES', 'EUR', 'ca')
|
||||||
;
|
;
|
||||||
|
|
||||||
insert into media_content (media_type, bytes)
|
insert into media_content (media_type, bytes)
|
||||||
|
|
|
@ -30,8 +30,8 @@ truncate company cascade;
|
||||||
reset client_min_messages;
|
reset client_min_messages;
|
||||||
|
|
||||||
|
|
||||||
insert into company (company_id, business_name, vatin, trade_name, phone, email, web, address, city, province, postal_code, rtc_number, tourist_tax, country_code, currency_code, default_lang_tag)
|
insert into company (company_id, business_name, vatin, trade_name, phone, email, web, address, city, province, postal_code, rtc_number, tourist_tax, tourist_tax_max_days, country_code, currency_code, default_lang_tag)
|
||||||
values (2, 'Company 2', 'XX123', '', '555-555-555', 'a@a', '', '', '', '', '', '', 60, 'ES', 'EUR', 'ca')
|
values (2, 'Company 2', 'XX123', '', '555-555-555', 'a@a', '', '', '', '', '', '', 60, 7, 'ES', 'EUR', 'ca')
|
||||||
;
|
;
|
||||||
|
|
||||||
insert into media_content (media_type, bytes)
|
insert into media_content (media_type, bytes)
|
||||||
|
|
|
@ -30,8 +30,8 @@ truncate company cascade;
|
||||||
reset client_min_messages;
|
reset client_min_messages;
|
||||||
|
|
||||||
|
|
||||||
insert into company (company_id, business_name, vatin, trade_name, phone, email, web, address, city, province, postal_code, rtc_number, tourist_tax, country_code, currency_code, default_lang_tag)
|
insert into company (company_id, business_name, vatin, trade_name, phone, email, web, address, city, province, postal_code, rtc_number, tourist_tax, tourist_tax_max_days, country_code, currency_code, default_lang_tag)
|
||||||
values (1, 'Company 2', 'XX123', '', '555-555-555', 'a@a', '', '', '', '', '', '', 60, 'ES', 'EUR', 'ca')
|
values (1, 'Company 2', 'XX123', '', '555-555-555', 'a@a', '', '', '', '', '', '', 60, 7, 'ES', 'EUR', 'ca')
|
||||||
;
|
;
|
||||||
|
|
||||||
insert into media_content (media_type, bytes)
|
insert into media_content (media_type, bytes)
|
||||||
|
|
|
@ -36,8 +36,8 @@ values (1, 'demo@tandem.blog', 'Demo', 'test', '44facbb30d8a419dfd4bfbc44a4b5539
|
||||||
, (5, 'admin@tandem.blog', 'Demo', 'test', '12af4c88b528c2ad4222e3740496ecbc58e76e26f087657524', current_timestamp + interval '1 month')
|
, (5, 'admin@tandem.blog', 'Demo', 'test', '12af4c88b528c2ad4222e3740496ecbc58e76e26f087657524', current_timestamp + interval '1 month')
|
||||||
;
|
;
|
||||||
|
|
||||||
insert into company (company_id, business_name, vatin, trade_name, phone, email, web, address, city, province, postal_code, rtc_number, tourist_tax, country_code, currency_code, default_lang_tag)
|
insert into company (company_id, business_name, vatin, trade_name, phone, email, web, address, city, province, postal_code, rtc_number, tourist_tax, tourist_tax_max_days, country_code, currency_code, default_lang_tag)
|
||||||
values (2, 'Company 2', 'XX123', '', '555-555-555', 'a@a', '', '', '', '', '', '', 60, 'ES', 'EUR', 'ca')
|
values (2, 'Company 2', 'XX123', '', '555-555-555', 'a@a', '', '', '', '', '', '', 60, 7, 'ES', 'EUR', 'ca')
|
||||||
;
|
;
|
||||||
|
|
||||||
insert into company_user (company_id, user_id, role)
|
insert into company_user (company_id, user_id, role)
|
||||||
|
|
|
@ -30,8 +30,8 @@ truncate company cascade;
|
||||||
reset client_min_messages;
|
reset client_min_messages;
|
||||||
|
|
||||||
|
|
||||||
insert into company (company_id, business_name, vatin, trade_name, phone, email, web, address, city, province, postal_code, rtc_number, tourist_tax, country_code, currency_code, default_lang_tag)
|
insert into company (company_id, business_name, vatin, trade_name, phone, email, web, address, city, province, postal_code, rtc_number, tourist_tax, tourist_tax_max_days, country_code, currency_code, default_lang_tag)
|
||||||
values (1, 'Company 2', 'XX123', '', '555-555-555', 'a@a', '', '', '', '', '', '', 60, 'ES', 'EUR', 'ca')
|
values (1, 'Company 2', 'XX123', '', '555-555-555', 'a@a', '', '', '', '', '', '', 60, 7, 'ES', 'EUR', 'ca')
|
||||||
;
|
;
|
||||||
|
|
||||||
insert into media_content (media_type, bytes)
|
insert into media_content (media_type, bytes)
|
||||||
|
|
|
@ -28,8 +28,8 @@ truncate company cascade;
|
||||||
reset client_min_messages;
|
reset client_min_messages;
|
||||||
|
|
||||||
|
|
||||||
insert into company (company_id, business_name, vatin, trade_name, phone, email, web, address, city, province, postal_code, rtc_number, tourist_tax, country_code, currency_code, default_lang_tag)
|
insert into company (company_id, business_name, vatin, trade_name, phone, email, web, address, city, province, postal_code, rtc_number, tourist_tax, tourist_tax_max_days, country_code, currency_code, default_lang_tag)
|
||||||
values (1, 'Company 2', 'XX123', '', '555-555-555', 'a@a', '', '', '', '', '', '', 60, 'ES', 'EUR', 'ca')
|
values (1, 'Company 2', 'XX123', '', '555-555-555', 'a@a', '', '', '', '', '', '', 60, 7, 'ES', 'EUR', 'ca')
|
||||||
;
|
;
|
||||||
|
|
||||||
insert into media_content (media_type, bytes)
|
insert into media_content (media_type, bytes)
|
||||||
|
|
|
@ -28,8 +28,8 @@ truncate media_content cascade;
|
||||||
truncate company cascade;
|
truncate company cascade;
|
||||||
reset client_min_messages;
|
reset client_min_messages;
|
||||||
|
|
||||||
insert into company (company_id, business_name, vatin, trade_name, phone, email, web, address, city, province, postal_code, rtc_number, tourist_tax, country_code, currency_code, default_lang_tag)
|
insert into company (company_id, business_name, vatin, trade_name, phone, email, web, address, city, province, postal_code, rtc_number, tourist_tax, tourist_tax_max_days, country_code, currency_code, default_lang_tag)
|
||||||
values (1, 'Company 2', 'XX123', '', '555-555-555', 'a@a', '', '', '', '', '', '', 60, 'ES', 'EUR', 'ca')
|
values (1, 'Company 2', 'XX123', '', '555-555-555', 'a@a', '', '', '', '', '', '', 60, 7, 'ES', 'EUR', 'ca')
|
||||||
;
|
;
|
||||||
|
|
||||||
insert into media_content (media_type, bytes)
|
insert into media_content (media_type, bytes)
|
||||||
|
|
|
@ -28,8 +28,8 @@ truncate media_content cascade;
|
||||||
truncate company cascade;
|
truncate company cascade;
|
||||||
reset client_min_messages;
|
reset client_min_messages;
|
||||||
|
|
||||||
insert into company (company_id, business_name, vatin, trade_name, phone, email, web, address, city, province, postal_code, rtc_number, tourist_tax, country_code, currency_code, default_lang_tag)
|
insert into company (company_id, business_name, vatin, trade_name, phone, email, web, address, city, province, postal_code, rtc_number, tourist_tax, tourist_tax_max_days, country_code, currency_code, default_lang_tag)
|
||||||
values (1, 'Company 2', 'XX123', '', '555-555-555', 'a@a', '', '', '', '', '', '', 60, 'ES', 'EUR', 'ca')
|
values (1, 'Company 2', 'XX123', '', '555-555-555', 'a@a', '', '', '', '', '', '', 60, 7, 'ES', 'EUR', 'ca')
|
||||||
;
|
;
|
||||||
|
|
||||||
insert into media_content (media_type, bytes)
|
insert into media_content (media_type, bytes)
|
||||||
|
|
|
@ -26,8 +26,8 @@ truncate company cascade;
|
||||||
reset client_min_messages;
|
reset client_min_messages;
|
||||||
|
|
||||||
|
|
||||||
insert into company (company_id, business_name, vatin, trade_name, phone, email, web, address, city, province, postal_code, rtc_number, tourist_tax, country_code, currency_code, default_lang_tag)
|
insert into company (company_id, business_name, vatin, trade_name, phone, email, web, address, city, province, postal_code, rtc_number, tourist_tax, tourist_tax_max_days, country_code, currency_code, default_lang_tag)
|
||||||
values (1, 'Company 2', 'XX123', '', '555-555-555', 'a@a', '', '', '', '', '', '', 60, 'ES', 'EUR', 'ca')
|
values (1, 'Company 2', 'XX123', '', '555-555-555', 'a@a', '', '', '', '', '', '', 60, 7, 'ES', 'EUR', 'ca')
|
||||||
;
|
;
|
||||||
|
|
||||||
insert into season (company_id, slug, name, color, active)
|
insert into season (company_id, slug, name, color, active)
|
||||||
|
|
|
@ -24,8 +24,8 @@ truncate service cascade;
|
||||||
truncate company cascade;
|
truncate company cascade;
|
||||||
reset client_min_messages;
|
reset client_min_messages;
|
||||||
|
|
||||||
insert into company (company_id, business_name, vatin, trade_name, phone, email, web, address, city, province, postal_code, rtc_number, tourist_tax, country_code, currency_code, default_lang_tag)
|
insert into company (company_id, business_name, vatin, trade_name, phone, email, web, address, city, province, postal_code, rtc_number, tourist_tax, tourist_tax_max_days, country_code, currency_code, default_lang_tag)
|
||||||
values (1, 'Company 2', 'XX123', '', '555-555-555', 'a@a', '', '', '', '', '', '', 60, 'ES', 'EUR', 'ca')
|
values (1, 'Company 2', 'XX123', '', '555-555-555', 'a@a', '', '', '', '', '', '', 60, 7, 'ES', 'EUR', 'ca')
|
||||||
;
|
;
|
||||||
|
|
||||||
insert into service (service_id, company_id, icon_name, name, description)
|
insert into service (service_id, company_id, icon_name, name, description)
|
||||||
|
|
|
@ -28,8 +28,8 @@ truncate media_content cascade;
|
||||||
truncate company cascade;
|
truncate company cascade;
|
||||||
reset client_min_messages;
|
reset client_min_messages;
|
||||||
|
|
||||||
insert into company (company_id, business_name, vatin, trade_name, phone, email, web, address, city, province, postal_code, rtc_number, tourist_tax, country_code, currency_code, default_lang_tag)
|
insert into company (company_id, business_name, vatin, trade_name, phone, email, web, address, city, province, postal_code, rtc_number, tourist_tax, tourist_tax_max_days, country_code, currency_code, default_lang_tag)
|
||||||
values (1, 'Company 2', 'XX123', '', '555-555-555', 'a@a', '', '', '', '', '', '', 60, 'ES', 'EUR', 'ca')
|
values (1, 'Company 2', 'XX123', '', '555-555-555', 'a@a', '', '', '', '', '', '', 60, 7, 'ES', 'EUR', 'ca')
|
||||||
;
|
;
|
||||||
|
|
||||||
insert into media_content (media_type, bytes)
|
insert into media_content (media_type, bytes)
|
||||||
|
|
|
@ -28,8 +28,8 @@ truncate company cascade;
|
||||||
reset client_min_messages;
|
reset client_min_messages;
|
||||||
|
|
||||||
|
|
||||||
insert into company (company_id, business_name, vatin, trade_name, phone, email, web, address, city, province, postal_code, rtc_number, tourist_tax, country_code, currency_code, default_lang_tag)
|
insert into company (company_id, business_name, vatin, trade_name, phone, email, web, address, city, province, postal_code, rtc_number, tourist_tax, tourist_tax_max_days, country_code, currency_code, default_lang_tag)
|
||||||
values (1, 'Company 2', 'XX123', '', '555-555-555', 'a@a', '', '', '', '', '', '', 60, 'ES', 'EUR', 'ca')
|
values (1, 'Company 2', 'XX123', '', '555-555-555', 'a@a', '', '', '', '', '', '', 60, 7, 'ES', 'EUR', 'ca')
|
||||||
;
|
;
|
||||||
|
|
||||||
insert into media_content (media_type, bytes)
|
insert into media_content (media_type, bytes)
|
||||||
|
|
|
@ -156,8 +156,8 @@ truncate company cascade;
|
||||||
reset client_min_messages;
|
reset client_min_messages;
|
||||||
|
|
||||||
|
|
||||||
insert into company (company_id, business_name, vatin, trade_name, phone, email, web, address, city, province, postal_code, rtc_number, tourist_tax, country_code, currency_code, default_lang_tag)
|
insert into company (company_id, business_name, vatin, trade_name, phone, email, web, address, city, province, postal_code, rtc_number, tourist_tax, tourist_tax_max_days, country_code, currency_code, default_lang_tag)
|
||||||
values (1, 'Company 2', 'XX123', '', '555-555-555', 'a@a', '', '', '', '', '', '', 60, 'ES', 'EUR', 'ca')
|
values (1, 'Company 2', 'XX123', '', '555-555-555', 'a@a', '', '', '', '', '', '', 60, 7, 'ES', 'EUR', 'ca')
|
||||||
;
|
;
|
||||||
|
|
||||||
insert into media_content (media_type, bytes)
|
insert into media_content (media_type, bytes)
|
||||||
|
|
|
@ -28,8 +28,8 @@ truncate media_content cascade;
|
||||||
truncate company cascade;
|
truncate company cascade;
|
||||||
reset client_min_messages;
|
reset client_min_messages;
|
||||||
|
|
||||||
insert into company (company_id, business_name, vatin, trade_name, phone, email, web, address, city, province, postal_code, rtc_number, tourist_tax, country_code, currency_code, default_lang_tag)
|
insert into company (company_id, business_name, vatin, trade_name, phone, email, web, address, city, province, postal_code, rtc_number, tourist_tax, tourist_tax_max_days, country_code, currency_code, default_lang_tag)
|
||||||
values (2, 'Company 2', 'XX123', '', '555-555-555', 'a@a', '', '', '', '', '', '', 350, 'ES', 'EUR', 'ca')
|
values (2, 'Company 2', 'XX123', '', '555-555-555', 'a@a', '', '', '', '', '', '', 350, 7, 'ES', 'EUR', 'ca')
|
||||||
;
|
;
|
||||||
|
|
||||||
insert into media_content (media_type, bytes)
|
insert into media_content (media_type, bytes)
|
||||||
|
|
|
@ -28,8 +28,8 @@ truncate media_content cascade;
|
||||||
truncate company cascade;
|
truncate company cascade;
|
||||||
reset client_min_messages;
|
reset client_min_messages;
|
||||||
|
|
||||||
insert into company (company_id, business_name, vatin, trade_name, phone, email, web, address, city, province, postal_code, rtc_number, tourist_tax, country_code, currency_code, default_lang_tag)
|
insert into company (company_id, business_name, vatin, trade_name, phone, email, web, address, city, province, postal_code, rtc_number, tourist_tax, tourist_tax_max_days, country_code, currency_code, default_lang_tag)
|
||||||
values (2, 'Company 2', 'XX123', '', '555-555-555', 'a@a', '', '', '', '', '', '', 350, 'ES', 'EUR', 'ca')
|
values (2, 'Company 2', 'XX123', '', '555-555-555', 'a@a', '', '', '', '', '', '', 350, 7, 'ES', 'EUR', 'ca')
|
||||||
;
|
;
|
||||||
|
|
||||||
insert into media_content (media_type, bytes)
|
insert into media_content (media_type, bytes)
|
||||||
|
|
|
@ -29,8 +29,8 @@ truncate media_content cascade;
|
||||||
truncate company cascade;
|
truncate company cascade;
|
||||||
reset client_min_messages;
|
reset client_min_messages;
|
||||||
|
|
||||||
insert into company (company_id, business_name, vatin, trade_name, phone, email, web, address, city, province, postal_code, rtc_number, tourist_tax, country_code, currency_code, default_lang_tag)
|
insert into company (company_id, business_name, vatin, trade_name, phone, email, web, address, city, province, postal_code, rtc_number, tourist_tax, tourist_tax_max_days, country_code, currency_code, default_lang_tag)
|
||||||
values (2, 'Company 2', 'XX123', '', '555-555-555', 'a@a', '', '', '', '', '', '', 350, 'ES', 'EUR', 'ca')
|
values (2, 'Company 2', 'XX123', '', '555-555-555', 'a@a', '', '', '', '', '', '', 350, 7, 'ES', 'EUR', 'ca')
|
||||||
;
|
;
|
||||||
|
|
||||||
insert into media_content (media_type, bytes)
|
insert into media_content (media_type, bytes)
|
||||||
|
|
|
@ -88,11 +88,11 @@ values (1, 'demo@tandem.blog', 'Demo', 'test', '44facbb30d8a419dfd4bfbc44a4b5539
|
||||||
, (5, 'admin@tandem.blog', 'Demo', 'test', '12af4c88b528c2ad4222e3740496ecbc58e76e26f087657524', current_timestamp + interval '1 month')
|
, (5, 'admin@tandem.blog', 'Demo', 'test', '12af4c88b528c2ad4222e3740496ecbc58e76e26f087657524', current_timestamp + interval '1 month')
|
||||||
;
|
;
|
||||||
|
|
||||||
insert into company (company_id, business_name, vatin, trade_name, phone, email, web, address, city, province, postal_code, rtc_number, tourist_tax, country_code, currency_code, default_lang_tag)
|
insert into company (company_id, business_name, vatin, trade_name, phone, email, web, address, city, province, postal_code, rtc_number, tourist_tax, tourist_tax_max_days, country_code, currency_code, default_lang_tag)
|
||||||
values ( 2, 'Company 2', 'XX123', '', '555-555-555', 'a@a', '', '', '', '', '', '', 60, 'ES', 'EUR', 'ca')
|
values ( 2, 'Company 2', 'XX123', '', '555-555-555', 'a@a', '', '', '', '', '', '', 60, 7, 'ES', 'EUR', 'ca')
|
||||||
, ( 4, 'Company 4', 'XX234', '', '666-666-666', 'b@b', '', '', '', '', '', '', 60, 'FR', 'USD', 'ca')
|
, ( 4, 'Company 4', 'XX234', '', '666-666-666', 'b@b', '', '', '', '', '', '', 60, 7, 'FR', 'USD', 'ca')
|
||||||
, ( 6, 'Company 6', 'XX345', '', '777-777-777', 'c@c', '', '', '', '', '', '', 60, 'GB', 'EUR', 'en')
|
, ( 6, 'Company 6', 'XX345', '', '777-777-777', 'c@c', '', '', '', '', '', '', 60, 7, 'GB', 'EUR', 'en')
|
||||||
, ( 8, 'Company 8', 'XX456', '', '888-888-888', 'd@d', '', '', '', '', '', '', 60, 'DE', 'USD', 'es')
|
, ( 8, 'Company 8', 'XX456', '', '888-888-888', 'd@d', '', '', '', '', '', '', 60, 7, 'DE', 'USD', 'es')
|
||||||
;
|
;
|
||||||
|
|
||||||
insert into company_user (company_id, user_id, role)
|
insert into company_user (company_id, user_id, role)
|
||||||
|
|
|
@ -25,9 +25,9 @@ truncate redsys cascade;
|
||||||
truncate company cascade;
|
truncate company cascade;
|
||||||
reset client_min_messages;
|
reset client_min_messages;
|
||||||
|
|
||||||
insert into company (company_id, business_name, vatin, trade_name, phone, email, web, address, city, province, postal_code, rtc_number, tourist_tax, country_code, currency_code, default_lang_tag)
|
insert into company (company_id, business_name, vatin, trade_name, phone, email, web, address, city, province, postal_code, rtc_number, tourist_tax, tourist_tax_max_days, country_code, currency_code, default_lang_tag)
|
||||||
values (2, 'Company 2', 'XX123', '', '555-555-555', 'a@a', '', '', '', '', '', '', 60, 'ES', 'EUR', 'ca')
|
values (2, 'Company 2', 'XX123', '', '555-555-555', 'a@a', '', '', '', '', '', '', 60, 7, 'ES', 'EUR', 'ca')
|
||||||
, (4, 'Company 4', 'XX234', '', '666-666-666', 'b@b', '', '', '', '', '', '', 60, 'FR', 'USD', 'ca')
|
, (4, 'Company 4', 'XX234', '', '666-666-666', 'b@b', '', '', '', '', '', '', 60, 7, 'FR', 'USD', 'ca')
|
||||||
;
|
;
|
||||||
|
|
||||||
insert into redsys (company_id, merchant_code, terminal_number, environment, integration, encrypt_key)
|
insert into redsys (company_id, merchant_code, terminal_number, environment, integration, encrypt_key)
|
||||||
|
|
|
@ -23,9 +23,9 @@ set client_min_messages to warning;
|
||||||
truncate redsys cascade;
|
truncate redsys cascade;
|
||||||
truncate company cascade;
|
truncate company cascade;
|
||||||
|
|
||||||
insert into company (company_id, business_name, vatin, trade_name, phone, email, web, address, city, province, postal_code, rtc_number, tourist_tax, country_code, currency_code, default_lang_tag)
|
insert into company (company_id, business_name, vatin, trade_name, phone, email, web, address, city, province, postal_code, rtc_number, tourist_tax, tourist_tax_max_days, country_code, currency_code, default_lang_tag)
|
||||||
values (2, 'Company 2', 'XX123', '', '555-555-555', 'a@a', '', '', '', '', '', '', 60, 'ES', 'EUR', 'ca')
|
values (2, 'Company 2', 'XX123', '', '555-555-555', 'a@a', '', '', '', '', '', '', 60, 7, 'ES', 'EUR', 'ca')
|
||||||
, (4, 'Company 4', 'XX234', '', '666-666-666', 'b@b', '', '', '', '', '', '', 60, 'FR', 'USD', 'ca')
|
, (4, 'Company 4', 'XX234', '', '666-666-666', 'b@b', '', '', '', '', '', '', 60, 7, 'FR', 'USD', 'ca')
|
||||||
;
|
;
|
||||||
|
|
||||||
insert into redsys (company_id, merchant_code, terminal_number, environment, integration, encrypt_key)
|
insert into redsys (company_id, merchant_code, terminal_number, environment, integration, encrypt_key)
|
||||||
|
|
|
@ -24,9 +24,9 @@ truncate redsys cascade;
|
||||||
truncate company cascade;
|
truncate company cascade;
|
||||||
reset client_min_messages;
|
reset client_min_messages;
|
||||||
|
|
||||||
insert into company (company_id, business_name, vatin, trade_name, phone, email, web, address, city, province, postal_code, rtc_number, tourist_tax, country_code, currency_code, default_lang_tag)
|
insert into company (company_id, business_name, vatin, trade_name, phone, email, web, address, city, province, postal_code, rtc_number, tourist_tax, tourist_tax_max_days, country_code, currency_code, default_lang_tag)
|
||||||
values (2, 'Company 2', 'XX123', '', '555-555-555', 'a@a', '', '', '', '', '', '', 60, 'ES', 'EUR', 'ca')
|
values (2, 'Company 2', 'XX123', '', '555-555-555', 'a@a', '', '', '', '', '', '', 60, 7, 'ES', 'EUR', 'ca')
|
||||||
, (4, 'Company 4', 'XX234', '', '666-666-666', 'b@b', '', '', '', '', '', '', 60, 'FR', 'USD', 'ca')
|
, (4, 'Company 4', 'XX234', '', '666-666-666', 'b@b', '', '', '', '', '', '', 60, 7, 'FR', 'USD', 'ca')
|
||||||
;
|
;
|
||||||
|
|
||||||
insert into redsys (company_id, merchant_code, terminal_number, environment, integration, encrypt_key)
|
insert into redsys (company_id, merchant_code, terminal_number, environment, integration, encrypt_key)
|
||||||
|
|
|
@ -32,9 +32,9 @@ truncate media_content cascade;
|
||||||
truncate company cascade;
|
truncate company cascade;
|
||||||
reset client_min_messages;
|
reset client_min_messages;
|
||||||
|
|
||||||
insert into company (company_id, business_name, vatin, trade_name, phone, email, web, address, city, province, postal_code, rtc_number, tourist_tax, country_code, currency_code, default_lang_tag)
|
insert into company (company_id, business_name, vatin, trade_name, phone, email, web, address, city, province, postal_code, rtc_number, tourist_tax, tourist_tax_max_days, country_code, currency_code, default_lang_tag)
|
||||||
values (1, 'Company 1', 'XX123', '', '555-555-555', 'a@a', '', '', '', '', '', '', 60, 'ES', 'EUR', 'ca')
|
values (1, 'Company 1', 'XX123', '', '555-555-555', 'a@a', '', '', '', '', '', '', 60, 7, 'ES', 'EUR', 'ca')
|
||||||
, (2, 'Company 2', 'XX123', '', '555-555-555', 'a@a', '', '', '', '', '', '', 60, 'ES', 'EUR', 'ca')
|
, (2, 'Company 2', 'XX123', '', '555-555-555', 'a@a', '', '', '', '', '', '', 60, 7, 'ES', 'EUR', 'ca')
|
||||||
;
|
;
|
||||||
|
|
||||||
insert into media_content (media_type, bytes)
|
insert into media_content (media_type, bytes)
|
||||||
|
|
|
@ -29,9 +29,9 @@ truncate media_content cascade;
|
||||||
truncate company cascade;
|
truncate company cascade;
|
||||||
reset client_min_messages;
|
reset client_min_messages;
|
||||||
|
|
||||||
insert into company (company_id, business_name, vatin, trade_name, phone, email, web, address, city, province, postal_code, rtc_number, tourist_tax, country_code, currency_code, default_lang_tag)
|
insert into company (company_id, business_name, vatin, trade_name, phone, email, web, address, city, province, postal_code, rtc_number, tourist_tax, tourist_tax_max_days, country_code, currency_code, default_lang_tag)
|
||||||
values (1, 'Company 2', 'XX123', '', '555-555-555', 'a@a', '', '', '', '', '', '', 60, 'ES', 'EUR', 'ca')
|
values (1, 'Company 2', 'XX123', '', '555-555-555', 'a@a', '', '', '', '', '', '', 60, 7, 'ES', 'EUR', 'ca')
|
||||||
, (2, 'Company 2', 'XX123', '', '555-555-555', 'a@a', '', '', '', '', '', '', 60, 'ES', 'EUR', 'ca')
|
, (2, 'Company 2', 'XX123', '', '555-555-555', 'a@a', '', '', '', '', '', '', 60, 7, 'ES', 'EUR', 'ca')
|
||||||
;
|
;
|
||||||
|
|
||||||
insert into media_content (media_type, bytes)
|
insert into media_content (media_type, bytes)
|
||||||
|
|
|
@ -27,8 +27,8 @@ truncate amenity cascade;
|
||||||
truncate company cascade;
|
truncate company cascade;
|
||||||
reset client_min_messages;
|
reset client_min_messages;
|
||||||
|
|
||||||
insert into company (company_id, business_name, vatin, trade_name, phone, email, web, address, city, province, postal_code, rtc_number, tourist_tax, country_code, currency_code, default_lang_tag)
|
insert into company (company_id, business_name, vatin, trade_name, phone, email, web, address, city, province, postal_code, rtc_number, tourist_tax, tourist_tax_max_days, country_code, currency_code, default_lang_tag)
|
||||||
values (1, 'Company 2', 'XX123', '', '555-555-555', 'a@a', '', '', '', '', '', '', 60, 'ES', 'EUR', 'ca')
|
values (1, 'Company 2', 'XX123', '', '555-555-555', 'a@a', '', '', '', '', '', '', 60, 7, 'ES', 'EUR', 'ca')
|
||||||
;
|
;
|
||||||
|
|
||||||
insert into amenity (amenity_id, company_id, label, name)
|
insert into amenity (amenity_id, company_id, label, name)
|
||||||
|
|
|
@ -30,9 +30,9 @@ truncate media_content cascade;
|
||||||
truncate company cascade;
|
truncate company cascade;
|
||||||
reset client_min_messages;
|
reset client_min_messages;
|
||||||
|
|
||||||
insert into company (company_id, business_name, vatin, trade_name, phone, email, web, address, city, province, postal_code, rtc_number, tourist_tax, country_code, currency_code, default_lang_tag)
|
insert into company (company_id, business_name, vatin, trade_name, phone, email, web, address, city, province, postal_code, rtc_number, tourist_tax, tourist_tax_max_days, country_code, currency_code, default_lang_tag)
|
||||||
values (1, 'Company 2', 'XX123', '', '555-555-555', 'a@a', '', '', '', '', '', '', 60, 'ES', 'EUR', 'ca')
|
values (1, 'Company 2', 'XX123', '', '555-555-555', 'a@a', '', '', '', '', '', '', 60, 7, 'ES', 'EUR', 'ca')
|
||||||
, (2, 'Company 2', 'XX123', '', '555-555-555', 'a@a', '', '', '', '', '', '', 60, 'ES', 'EUR', 'ca')
|
, (2, 'Company 2', 'XX123', '', '555-555-555', 'a@a', '', '', '', '', '', '', 60, 7, 'ES', 'EUR', 'ca')
|
||||||
;
|
;
|
||||||
|
|
||||||
insert into media_content (media_type, bytes)
|
insert into media_content (media_type, bytes)
|
||||||
|
|
|
@ -30,8 +30,8 @@ truncate media_content cascade;
|
||||||
truncate company cascade;
|
truncate company cascade;
|
||||||
reset client_min_messages;
|
reset client_min_messages;
|
||||||
|
|
||||||
insert into company (company_id, business_name, vatin, trade_name, phone, email, web, address, city, province, postal_code, rtc_number, tourist_tax, country_code, currency_code, default_lang_tag)
|
insert into company (company_id, business_name, vatin, trade_name, phone, email, web, address, city, province, postal_code, rtc_number, tourist_tax, tourist_tax_max_days, country_code, currency_code, default_lang_tag)
|
||||||
values (1, 'Company 2', 'XX123', '', '555-555-555', 'a@a', '', '', '', '', '', '', 60, 'ES', 'EUR', 'ca')
|
values (1, 'Company 2', 'XX123', '', '555-555-555', 'a@a', '', '', '', '', '', '', 60, 7, 'ES', 'EUR', 'ca')
|
||||||
;
|
;
|
||||||
|
|
||||||
insert into media_content (media_type, bytes)
|
insert into media_content (media_type, bytes)
|
||||||
|
|
Some files were not shown because too many files have changed in this diff Show More
Loading…
Reference in New Issue