From 48c1529e6c574f3895291a1e995bf82251fbbf0a Mon Sep 17 00:00:00 2001 From: jordi fita mas Date: Fri, 3 May 2024 19:13:49 +0200 Subject: [PATCH] Add pagination to invoices MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit I’ve removed the total amount because it is very difficult to get it with pagination, and customer never saw it (it was from Numerus), thus they won’t miss it—i hope. --- pkg/invoice/admin.go | 122 ++------------ pkg/invoice/filter.go | 124 ++++++++++++++ po/ca.po | 182 +++++++++++---------- po/es.po | 182 +++++++++++---------- po/fr.po | 182 +++++++++++---------- web/templates/admin/invoice/index.gohtml | 85 ++-------- web/templates/admin/invoice/results.gohtml | 40 +++++ 7 files changed, 470 insertions(+), 447 deletions(-) create mode 100644 pkg/invoice/filter.go create mode 100644 web/templates/admin/invoice/results.gohtml diff --git a/pkg/invoice/admin.go b/pkg/invoice/admin.go index 4cd765a..7362215 100644 --- a/pkg/invoice/admin.go +++ b/pkg/invoice/admin.go @@ -148,14 +148,13 @@ type IndexEntry struct { } func serveInvoiceIndex(w http.ResponseWriter, r *http.Request, user *auth.User, company *auth.Company, conn *database.Conn) { - filters := newInvoiceFilterForm(r.Context(), conn, company, user.Locale) + filters := newFilterForm(r.Context(), conn, company, user.Locale) if err := filters.Parse(r); err != nil { http.Error(w, err.Error(), http.StatusBadRequest) return } page := &invoiceIndex{ - Invoices: mustCollectInvoiceEntries(r.Context(), conn, user.Locale, filters), - TotalAmount: mustComputeInvoicesTotalAmount(r.Context(), conn, filters), + Invoices: filters.buildCursor(mustCollectInvoiceEntries(r.Context(), conn, user.Locale, filters)), Filters: filters, InvoiceStatuses: mustCollectInvoiceStatuses(r.Context(), conn, user.Locale), } @@ -164,16 +163,19 @@ func serveInvoiceIndex(w http.ResponseWriter, r *http.Request, user *auth.User, type invoiceIndex struct { Invoices []*IndexEntry - TotalAmount string - Filters *invoiceFilterForm + Filters *filterForm InvoiceStatuses map[string]string } func (page *invoiceIndex) MustRender(w http.ResponseWriter, r *http.Request, user *auth.User, company *auth.Company) { - template.MustRenderAdmin(w, r, user, company, "invoice/index.gohtml", page) + if httplib.IsHTMxRequest(r) && page.Filters.Paginated() { + template.MustRenderAdminNoLayout(w, r, user, company, "invoice/results.gohtml", page) + } else { + template.MustRenderAdminFiles(w, r, user, company, page, "invoice/index.gohtml", "invoice/results.gohtml") + } } -func mustCollectInvoiceEntries(ctx context.Context, conn *database.Conn, locale *locale.Locale, filters *invoiceFilterForm) []*IndexEntry { +func mustCollectInvoiceEntries(ctx context.Context, conn *database.Conn, locale *locale.Locale, filters *filterForm) []*IndexEntry { where, args := filters.BuildQuery([]interface{}{locale.Language.String()}) rows, err := conn.Query(ctx, fmt.Sprintf(` select invoice_id @@ -192,7 +194,8 @@ func mustCollectInvoiceEntries(ctx context.Context, conn *database.Conn, locale where (%s) order by invoice_date desc , invoice_number desc - `, where), args...) + limit %d + `, where, filters.PerPage()+1), args...) if err != nil { panic(err) } @@ -213,25 +216,6 @@ func mustCollectInvoiceEntries(ctx context.Context, conn *database.Conn, locale return entries } -func mustComputeInvoicesTotalAmount(ctx context.Context, conn *database.Conn, filters *invoiceFilterForm) string { - where, args := filters.BuildQuery(nil) - text, err := conn.GetText(ctx, fmt.Sprintf(` - select to_price(sum(total)::integer, decimal_digits) - from invoice - join invoice_amount using (invoice_id) - join currency using (currency_code) - where (%s) - group by decimal_digits - `, where), args...) - if err != nil { - if database.ErrorIsNotFound(err) { - return "0.0" - } - panic(err) - } - return text -} - func mustCollectInvoiceStatuses(ctx context.Context, conn *database.Conn, locale *locale.Locale) map[string]string { rows, err := conn.Query(ctx, ` select invoice_status.invoice_status @@ -261,88 +245,6 @@ func mustCollectInvoiceStatuses(ctx context.Context, conn *database.Conn, locale return statuses } -type invoiceFilterForm struct { - locale *locale.Locale - company *auth.Company - Customer *form.Select - InvoiceStatus *form.Select - InvoiceNumber *form.Input - FromDate *form.Input - ToDate *form.Input -} - -func newInvoiceFilterForm(ctx context.Context, conn *database.Conn, company *auth.Company, locale *locale.Locale) *invoiceFilterForm { - return &invoiceFilterForm{ - locale: locale, - company: company, - Customer: &form.Select{ - Name: "customer", - Options: mustGetContactOptions(ctx, conn, company), - }, - InvoiceStatus: &form.Select{ - Name: "invoice_status", - Options: mustGetInvoiceStatusOptions(ctx, conn, locale), - }, - InvoiceNumber: &form.Input{ - Name: "number", - }, - FromDate: &form.Input{ - Name: "from_date", - }, - ToDate: &form.Input{ - Name: "to_date", - }, - } -} - -func (f *invoiceFilterForm) Parse(r *http.Request) error { - if err := r.ParseForm(); err != nil { - return err - } - f.Customer.FillValue(r) - f.InvoiceStatus.FillValue(r) - f.InvoiceNumber.FillValue(r) - f.FromDate.FillValue(r) - f.ToDate.FillValue(r) - return nil -} - -func (f *invoiceFilterForm) BuildQuery(args []interface{}) (string, []interface{}) { - var where []string - appendWhere := func(expression string, value interface{}) { - args = append(args, value) - where = append(where, fmt.Sprintf(expression, len(args))) - } - maybeAppendWhere := func(expression string, value string, conv func(string) interface{}) { - if value != "" { - if conv == nil { - appendWhere(expression, value) - } else { - appendWhere(expression, conv(value)) - } - } - } - - appendWhere("invoice.company_id = $%d", f.company.ID) - maybeAppendWhere("contact_id = $%d", f.Customer.String(), func(v string) interface{} { - customerId, _ := strconv.Atoi(f.Customer.Selected[0]) - return customerId - }) - maybeAppendWhere("invoice.invoice_status = $%d", f.InvoiceStatus.String(), nil) - maybeAppendWhere("invoice_number = $%d", f.InvoiceNumber.Val, nil) - maybeAppendWhere("invoice_date >= $%d", f.FromDate.Val, nil) - maybeAppendWhere("invoice_date <= $%d", f.ToDate.Val, nil) - return strings.Join(where, ") AND ("), args -} - -func (f *invoiceFilterForm) HasValue() bool { - return (len(f.Customer.Selected) > 0 && f.Customer.Selected[0] != "") || - (len(f.InvoiceStatus.Selected) > 0 && f.InvoiceStatus.Selected[0] != "") || - f.InvoiceNumber.Val != "" || - f.FromDate.Val != "" || - f.ToDate.Val != "" -} - func serveInvoice(w http.ResponseWriter, r *http.Request, user *auth.User, company *auth.Company, conn *database.Conn, slug string) { pdf := false if strings.HasSuffix(slug, ".pdf") { @@ -682,7 +584,7 @@ func handleBatchAction(w http.ResponseWriter, r *http.Request, user *auth.User, panic(err) } case "export": - filters := newInvoiceFilterForm(r.Context(), conn, company, user.Locale) + filters := newFilterForm(r.Context(), conn, company, user.Locale) if err := filters.Parse(r); err != nil { http.Error(w, err.Error(), http.StatusBadRequest) return diff --git a/pkg/invoice/filter.go b/pkg/invoice/filter.go new file mode 100644 index 0000000..fa6c179 --- /dev/null +++ b/pkg/invoice/filter.go @@ -0,0 +1,124 @@ +package invoice + +import ( + "context" + "fmt" + "net/http" + "strconv" + "strings" + + "dev.tandem.ws/tandem/camper/pkg/auth" + "dev.tandem.ws/tandem/camper/pkg/database" + "dev.tandem.ws/tandem/camper/pkg/form" + "dev.tandem.ws/tandem/camper/pkg/locale" +) + +type filterForm struct { + company *auth.Company + Customer *form.Select + InvoiceStatus *form.Select + InvoiceNumber *form.Input + FromDate *form.Input + ToDate *form.Input + Cursor *form.Cursor +} + +func newFilterForm(ctx context.Context, conn *database.Conn, company *auth.Company, locale *locale.Locale) *filterForm { + return &filterForm{ + company: company, + Customer: &form.Select{ + Name: "customer", + Options: mustGetContactOptions(ctx, conn, company), + }, + InvoiceStatus: &form.Select{ + Name: "invoice_status", + Options: mustGetInvoiceStatusOptions(ctx, conn, locale), + }, + InvoiceNumber: &form.Input{ + Name: "number", + }, + FromDate: &form.Input{ + Name: "from_date", + }, + ToDate: &form.Input{ + Name: "to_date", + }, + Cursor: &form.Cursor{ + Name: "cursor", + PerPage: 25, + }, + } +} + +func (f *filterForm) Parse(r *http.Request) error { + if err := r.ParseForm(); err != nil { + return err + } + f.Customer.FillValue(r) + f.InvoiceStatus.FillValue(r) + f.InvoiceNumber.FillValue(r) + f.FromDate.FillValue(r) + f.ToDate.FillValue(r) + f.Cursor.FillValue(r) + return nil +} + +func (f *filterForm) BuildQuery(args []interface{}) (string, []interface{}) { + var where []string + appendWhere := func(expression string, value interface{}) { + args = append(args, value) + where = append(where, fmt.Sprintf(expression, len(args))) + } + maybeAppendWhere := func(expression string, value string, conv func(string) interface{}) { + if value != "" { + if conv == nil { + appendWhere(expression, value) + } else { + appendWhere(expression, conv(value)) + } + } + } + + appendWhere("invoice.company_id = $%d", f.company.ID) + maybeAppendWhere("contact_id = $%d", f.Customer.String(), func(v string) interface{} { + customerId, _ := strconv.Atoi(f.Customer.Selected[0]) + return customerId + }) + maybeAppendWhere("invoice.invoice_status = $%d", f.InvoiceStatus.String(), nil) + maybeAppendWhere("invoice_number = $%d", f.InvoiceNumber.Val, nil) + maybeAppendWhere("invoice_date >= $%d", f.FromDate.Val, nil) + maybeAppendWhere("invoice_date <= $%d", f.ToDate.Val, nil) + + if f.Paginated() { + params := f.Cursor.Params() + if len(params) == 2 { + where = append(where, fmt.Sprintf("(invoice_date, invoice_number) < ($%d, $%d)", len(args)+1, len(args)+2)) + args = append(args, params[0]) + args = append(args, params[1]) + } + } + + return strings.Join(where, ") AND ("), args +} + +func (f *filterForm) buildCursor(customers []*IndexEntry) []*IndexEntry { + return form.BuildCursor(f.Cursor, customers, func(entry *IndexEntry) []string { + return []string{entry.Date.Format(database.ISODateFormat), entry.Number} + }) +} + +func (f *filterForm) HasValue() bool { + return (len(f.Customer.Selected) > 0 && f.Customer.Selected[0] != "") || + (len(f.InvoiceStatus.Selected) > 0 && f.InvoiceStatus.Selected[0] != "") || + f.InvoiceNumber.Val != "" || + f.FromDate.Val != "" || + f.ToDate.Val != "" +} + +func (f *filterForm) PerPage() int { + return f.Cursor.PerPage +} + +func (f *filterForm) Paginated() bool { + return f.Cursor.Pagination +} diff --git a/po/ca.po b/po/ca.po index 9c53976..2ecceff 100644 --- a/po/ca.po +++ b/po/ca.po @@ -8,7 +8,7 @@ msgid "" msgstr "" "Project-Id-Version: camper\n" "Report-Msgid-Bugs-To: jordi@tandem.blog\n" -"POT-Creation-Date: 2024-05-03 17:19+0200\n" +"POT-Creation-Date: 2024-05-03 19:12+0200\n" "PO-Revision-Date: 2024-02-06 10:04+0100\n" "Last-Translator: jordi fita mas \n" "Language-Team: Catalan \n" @@ -179,7 +179,7 @@ msgstr "Nits" #: web/templates/mail/payment/details.gotxt:22 #: web/templates/public/booking/fields.gohtml:60 #: web/templates/admin/payment/details.gohtml:98 -#: web/templates/admin/booking/fields.gohtml:93 pkg/invoice/admin.go:1062 +#: web/templates/admin/booking/fields.gohtml:93 pkg/invoice/admin.go:964 msgctxt "input" msgid "Adults aged 17 or older" msgstr "Adults de 17 anys o més" @@ -187,7 +187,7 @@ msgstr "Adults de 17 anys o més" #: web/templates/mail/payment/details.gotxt:23 #: web/templates/public/booking/fields.gohtml:71 #: web/templates/admin/payment/details.gohtml:102 -#: web/templates/admin/booking/fields.gohtml:109 pkg/invoice/admin.go:1063 +#: web/templates/admin/booking/fields.gohtml:109 pkg/invoice/admin.go:965 msgctxt "input" msgid "Teenagers from 11 to 16 years old" msgstr "Adolescents d’entre 11 i 16 anys" @@ -195,7 +195,7 @@ msgstr "Adolescents d’entre 11 i 16 anys" #: web/templates/mail/payment/details.gotxt:24 #: web/templates/public/booking/fields.gohtml:82 #: web/templates/admin/payment/details.gohtml:106 -#: web/templates/admin/booking/fields.gohtml:125 pkg/invoice/admin.go:1064 +#: web/templates/admin/booking/fields.gohtml:125 pkg/invoice/admin.go:966 msgctxt "input" msgid "Children from 2 to 10 years old" msgstr "Nens d’entre 2 i 10 anys" @@ -203,14 +203,14 @@ msgstr "Nens d’entre 2 i 10 anys" #: web/templates/mail/payment/details.gotxt:25 #: web/templates/public/booking/fields.gohtml:100 #: web/templates/admin/payment/details.gohtml:110 -#: web/templates/admin/booking/fields.gohtml:140 pkg/invoice/admin.go:1065 +#: web/templates/admin/booking/fields.gohtml:140 pkg/invoice/admin.go:967 msgctxt "input" msgid "Dogs" msgstr "Gossos" #: web/templates/mail/payment/details.gotxt:26 #: web/templates/admin/payment/details.gohtml:114 -#: web/templates/admin/booking/fields.gohtml:167 pkg/invoice/admin.go:1066 +#: web/templates/admin/booking/fields.gohtml:167 pkg/invoice/admin.go:968 #: pkg/booking/cart.go:242 msgctxt "cart" msgid "Tourist tax" @@ -293,6 +293,7 @@ msgstr "País" #: web/templates/mail/payment/details.gotxt:46 #: web/templates/public/booking/fields.gohtml:201 #: web/templates/admin/payment/details.gohtml:163 +#: web/templates/admin/customer/index.gohtml:33 #: web/templates/admin/login.gohtml:27 web/templates/admin/profile.gohtml:38 #: web/templates/admin/taxDetails.gohtml:53 msgctxt "input" @@ -418,7 +419,7 @@ msgid "Order Number" msgstr "Número de comanda" #: web/templates/public/payment/details.gohtml:8 -#: web/templates/admin/invoice/index.gohtml:103 +#: web/templates/admin/invoice/index.gohtml:104 #: web/templates/admin/invoice/view.gohtml:26 msgctxt "title" msgid "Date" @@ -596,6 +597,12 @@ msgctxt "action" msgid "Filters" msgstr "Filtres" +#: web/templates/public/form.gohtml:93 web/templates/admin/form.gohtml:93 +#: web/templates/admin/prebooking/results.gohtml:20 +msgctxt "action" +msgid "Load more" +msgstr "Carrega’n més" + #: web/templates/public/campsite/type.gohtml:49 #: web/templates/public/booking/fields.gohtml:278 msgctxt "action" @@ -1183,6 +1190,7 @@ msgstr "Àlies" #: web/templates/admin/campsite/type/form.gohtml:51 #: web/templates/admin/campsite/type/option/form.gohtml:41 #: web/templates/admin/season/form.gohtml:50 +#: web/templates/admin/customer/index.gohtml:24 #: web/templates/admin/invoice/product-form.gohtml:16 #: web/templates/admin/services/form.gohtml:53 #: web/templates/admin/profile.gohtml:29 @@ -1255,7 +1263,7 @@ msgstr "Afegeix text legal" #: web/templates/admin/campsite/type/option/index.gohtml:30 #: web/templates/admin/campsite/type/index.gohtml:29 #: web/templates/admin/season/index.gohtml:29 -#: web/templates/admin/customer/index.gohtml:19 +#: web/templates/admin/customer/index.gohtml:51 #: web/templates/admin/user/index.gohtml:20 #: web/templates/admin/surroundings/index.gohtml:83 #: web/templates/admin/amenity/feature/index.gohtml:30 @@ -1860,7 +1868,7 @@ msgid "New Customer" msgstr "Nou client" #: web/templates/admin/customer/form.gohtml:15 -#: web/templates/admin/invoice/index.gohtml:105 +#: web/templates/admin/invoice/index.gohtml:106 msgctxt "title" msgid "Customer" msgstr "Client" @@ -1917,19 +1925,27 @@ msgctxt "action" msgid "Add Customer" msgstr "Afegeix client" -#: web/templates/admin/customer/index.gohtml:20 +#: web/templates/admin/customer/index.gohtml:43 +#: web/templates/admin/invoice/index.gohtml:94 +#: web/templates/admin/prebooking/index.gohtml:51 +#: web/templates/admin/booking/index.gohtml:65 +msgctxt "action" +msgid "Reset" +msgstr "Restableix" + +#: web/templates/admin/customer/index.gohtml:52 #: web/templates/admin/user/login-attempts.gohtml:20 #: web/templates/admin/user/index.gohtml:21 msgctxt "header" msgid "Email" msgstr "Correu-e" -#: web/templates/admin/customer/index.gohtml:21 +#: web/templates/admin/customer/index.gohtml:53 msgctxt "header" msgid "Phone" msgstr "Telèfon" -#: web/templates/admin/customer/index.gohtml:33 +#: web/templates/admin/customer/index.gohtml:61 msgid "No customer found." msgstr "No s’ha trobat cap client." @@ -2076,60 +2092,39 @@ msgctxt "action" msgid "Filter" msgstr "Filtra" -#: web/templates/admin/invoice/index.gohtml:94 -#: web/templates/admin/prebooking/index.gohtml:51 -#: web/templates/admin/booking/index.gohtml:65 -msgctxt "action" -msgid "Reset" -msgstr "Restableix" - #: web/templates/admin/invoice/index.gohtml:97 msgctxt "action" msgid "Add invoice" msgstr "Afegeix factura" -#: web/templates/admin/invoice/index.gohtml:102 +#: web/templates/admin/invoice/index.gohtml:103 msgctxt "invoice" msgid "All" msgstr "Totes" -#: web/templates/admin/invoice/index.gohtml:104 +#: web/templates/admin/invoice/index.gohtml:105 msgctxt "title" msgid "Invoice Num." msgstr "Núm. de factura" -#: web/templates/admin/invoice/index.gohtml:106 +#: web/templates/admin/invoice/index.gohtml:107 msgctxt "title" msgid "Status" msgstr "Estat" -#: web/templates/admin/invoice/index.gohtml:107 +#: web/templates/admin/invoice/index.gohtml:108 msgctxt "title" msgid "Download" msgstr "Descàrrega" -#: web/templates/admin/invoice/index.gohtml:108 +#: web/templates/admin/invoice/index.gohtml:109 msgctxt "title" msgid "Amount" msgstr "Import" -#: web/templates/admin/invoice/index.gohtml:115 -msgctxt "action" -msgid "Select invoice %v" -msgstr "Selecciona la factura %v" - -#: web/templates/admin/invoice/index.gohtml:144 -msgctxt "action" -msgid "Download invoice %s" -msgstr "Descarrega la factura %s" - -#: web/templates/admin/invoice/index.gohtml:154 -msgid "No invoices added yet." -msgstr "No s’ha afegit cap factura encara." - -#: web/templates/admin/invoice/index.gohtml:161 -msgid "Total" -msgstr "Total" +#: web/templates/admin/invoice/index.gohtml:117 +msgid "No invoices found." +msgstr "No s’ha trobat cap factura." #: web/templates/admin/invoice/view.gohtml:2 msgctxt "title" @@ -2171,6 +2166,16 @@ msgctxt "title" msgid "Tax Base" msgstr "Base imposable" +#: web/templates/admin/invoice/results.gohtml:3 +msgctxt "action" +msgid "Select invoice %v" +msgstr "Selecciona la factura %v" + +#: web/templates/admin/invoice/results.gohtml:32 +msgctxt "action" +msgid "Download invoice %s" +msgstr "Descarrega la factura %s" + #: web/templates/admin/prebooking/index.gohtml:6 #: web/templates/admin/layout.gohtml:92 #: web/templates/admin/booking/form.gohtml:20 @@ -2216,12 +2221,6 @@ msgstr "Nom del titular" msgid "No prebooking found." msgstr "No s’ha trobat cap pre-reserva." -#: web/templates/admin/prebooking/results.gohtml:20 -#: web/templates/admin/booking/results.gohtml:23 -msgctxt "action" -msgid "Load more" -msgstr "Carrega’n més" - #: web/templates/admin/login.gohtml:6 web/templates/admin/login.gohtml:18 msgctxt "title" msgid "Login" @@ -2701,7 +2700,7 @@ msgctxt "header" msgid "Decription" msgstr "Descripció" -#: web/templates/admin/booking/fields.gohtml:81 pkg/invoice/admin.go:1061 +#: web/templates/admin/booking/fields.gohtml:81 pkg/invoice/admin.go:963 #: pkg/booking/cart.go:232 msgctxt "cart" msgid "Night" @@ -2900,7 +2899,7 @@ msgstr "Rebut amb èxit el pagament de la reserva" #: pkg/legal/admin.go:258 pkg/app/user.go:249 pkg/campsite/types/option.go:365 #: pkg/campsite/types/feature.go:272 pkg/campsite/types/admin.go:577 #: pkg/campsite/feature.go:269 pkg/season/admin.go:411 -#: pkg/invoice/admin.go:1158 pkg/services/admin.go:316 +#: pkg/invoice/admin.go:1060 pkg/services/admin.go:316 #: pkg/surroundings/admin.go:340 pkg/amenity/feature.go:269 #: pkg/amenity/admin.go:283 msgid "Name can not be empty." @@ -2941,8 +2940,8 @@ msgstr "La imatge de la diapositiva ha de ser un mèdia de tipus imatge." msgid "Email can not be empty." msgstr "No podeu deixar el correu-e en blanc." -#: pkg/app/login.go:57 pkg/app/user.go:247 pkg/customer/admin.go:345 -#: pkg/company/admin.go:225 pkg/booking/admin.go:597 pkg/booking/public.go:593 +#: pkg/app/login.go:57 pkg/app/user.go:247 pkg/customer/admin.go:361 +#: pkg/company/admin.go:225 pkg/booking/admin.go:479 pkg/booking/public.go:593 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." @@ -2999,15 +2998,15 @@ msgstr "El valor del màxim ha de ser un número enter." msgid "Maximum must be equal or greater than minimum." msgstr "El valor del màxim ha de ser igual o superir al del mínim." -#: pkg/campsite/types/option.go:382 pkg/invoice/admin.go:1159 +#: pkg/campsite/types/option.go:382 pkg/invoice/admin.go:1061 msgid "Price can not be empty." msgstr "No podeu deixar el preu en blanc." -#: pkg/campsite/types/option.go:383 pkg/invoice/admin.go:1160 +#: pkg/campsite/types/option.go:383 pkg/invoice/admin.go:1062 msgid "Price must be a decimal number." msgstr "El preu ha de ser un número decimal." -#: pkg/campsite/types/option.go:384 pkg/invoice/admin.go:1161 +#: pkg/campsite/types/option.go:384 pkg/invoice/admin.go:1063 msgid "Price must be zero or greater." msgstr "El preu ha de ser com a mínim zero." @@ -3153,7 +3152,7 @@ msgctxt "header" msgid "Children (aged 2 to 10)" msgstr "Mainada (entre 2 i 10 anys)" -#: pkg/campsite/admin.go:280 pkg/booking/admin.go:573 pkg/booking/public.go:177 +#: pkg/campsite/admin.go:280 pkg/booking/admin.go:455 pkg/booking/public.go:177 #: pkg/booking/public.go:232 msgid "Selected campsite type is not valid." msgstr "El tipus d’allotjament escollit no és vàlid." @@ -3191,129 +3190,129 @@ msgstr "No podeu deixar la data de fi en blanc." msgid "End date must be a valid date." msgstr "La data de fi ha de ser una data vàlida." -#: pkg/customer/admin.go:326 pkg/company/admin.go:207 +#: pkg/customer/admin.go:342 pkg/company/admin.go:207 #: pkg/booking/checkin.go:300 pkg/booking/public.go:577 msgid "Selected country is not valid." msgstr "El país escollit no és vàlid." -#: pkg/customer/admin.go:330 pkg/booking/checkin.go:284 +#: pkg/customer/admin.go:346 pkg/booking/checkin.go:284 msgid "Selected ID document type is not valid." msgstr "El tipus de document d’identitat escollit no és vàlid." -#: pkg/customer/admin.go:331 pkg/booking/checkin.go:285 +#: pkg/customer/admin.go:347 pkg/booking/checkin.go:285 msgid "ID document number can not be empty." msgstr "No podeu deixar el número document d’identitat en blanc." -#: pkg/customer/admin.go:333 pkg/booking/checkin.go:291 -#: pkg/booking/checkin.go:292 pkg/booking/admin.go:585 +#: pkg/customer/admin.go:349 pkg/booking/checkin.go:291 +#: pkg/booking/checkin.go:292 pkg/booking/admin.go:467 #: pkg/booking/public.go:581 msgid "Full name can not be empty." msgstr "No podeu deixar el nom i els cognoms en blanc." -#: pkg/customer/admin.go:334 pkg/booking/admin.go:586 pkg/booking/public.go:582 +#: pkg/customer/admin.go:350 pkg/booking/admin.go:468 pkg/booking/public.go:582 msgid "Full name must have at least one letter." msgstr "El nom i els cognoms han de tenir com a mínim una lletra." -#: pkg/customer/admin.go:337 pkg/company/admin.go:230 pkg/booking/public.go:585 +#: pkg/customer/admin.go:353 pkg/company/admin.go:230 pkg/booking/public.go:585 msgid "Address can not be empty." msgstr "No podeu deixar l’adreça en blanc." -#: pkg/customer/admin.go:338 pkg/booking/public.go:586 +#: pkg/customer/admin.go:354 pkg/booking/public.go:586 msgid "Town or village can not be empty." msgstr "No podeu deixar la població en blanc." -#: pkg/customer/admin.go:339 pkg/company/admin.go:233 pkg/booking/public.go:587 +#: pkg/customer/admin.go:355 pkg/company/admin.go:233 pkg/booking/public.go:587 msgid "Postcode can not be empty." msgstr "No podeu deixar el codi postal en blanc." -#: pkg/customer/admin.go:340 pkg/company/admin.go:234 pkg/booking/admin.go:592 +#: pkg/customer/admin.go:356 pkg/company/admin.go:234 pkg/booking/admin.go:474 #: pkg/booking/public.go:588 msgid "This postcode is not valid." msgstr "Aquest codi postal no és vàlid." -#: pkg/customer/admin.go:348 pkg/company/admin.go:220 -#: pkg/booking/checkin.go:304 pkg/booking/admin.go:602 +#: pkg/customer/admin.go:364 pkg/company/admin.go:220 +#: pkg/booking/checkin.go:304 pkg/booking/admin.go:484 #: pkg/booking/public.go:596 msgid "This phone number is not valid." msgstr "Aquest número de telèfon no és vàlid." -#: pkg/invoice/admin.go:679 +#: pkg/invoice/admin.go:581 msgctxt "filename" msgid "invoices.zip" msgstr "factures.zip" -#: pkg/invoice/admin.go:694 +#: pkg/invoice/admin.go:596 msgctxt "filename" msgid "invoices.ods" msgstr "factures.ods" -#: pkg/invoice/admin.go:696 pkg/invoice/admin.go:1358 pkg/invoice/admin.go:1365 +#: pkg/invoice/admin.go:598 pkg/invoice/admin.go:1260 pkg/invoice/admin.go:1267 msgid "Invalid action" msgstr "Acció invàlida" -#: pkg/invoice/admin.go:861 +#: pkg/invoice/admin.go:763 msgid "Selected invoice status is not valid." msgstr "L’estat de factura escollit no és vàlid." -#: pkg/invoice/admin.go:862 +#: pkg/invoice/admin.go:764 msgid "Invoice date can not be empty." msgstr "No podeu deixar la data de factura en blanc." -#: pkg/invoice/admin.go:863 +#: pkg/invoice/admin.go:765 msgid "Invoice date must be a valid date." msgstr "La data de factura ha de ser una data vàlida." -#: pkg/invoice/admin.go:1021 +#: pkg/invoice/admin.go:923 #, c-format msgid "Re: booking #%s of %s–%s" msgstr "Ref: reserva núm. %s del %s-%s" -#: pkg/invoice/admin.go:1022 +#: pkg/invoice/admin.go:924 msgctxt "to_char" msgid "MM/DD/YYYY" msgstr "DD/MM/YYYY" -#: pkg/invoice/admin.go:1149 +#: pkg/invoice/admin.go:1051 msgid "Invoice product ID must be an integer." msgstr "L’ID de producte de factura ha de ser enter." -#: pkg/invoice/admin.go:1150 +#: pkg/invoice/admin.go:1052 msgid "Invoice product ID one or greater." msgstr "L’ID de producte de factura ha de ser com a mínim u." -#: pkg/invoice/admin.go:1154 +#: pkg/invoice/admin.go:1056 msgid "Product ID must be an integer." msgstr "L’ID de producte ha de ser un número enter." -#: pkg/invoice/admin.go:1155 +#: pkg/invoice/admin.go:1057 msgid "Product ID must zero or greater." msgstr "L’ID de producte ha de ser com a mínim zero." -#: pkg/invoice/admin.go:1164 +#: pkg/invoice/admin.go:1066 msgid "Quantity can not be empty." msgstr "No podeu deixar la quantitat en blanc." -#: pkg/invoice/admin.go:1165 +#: pkg/invoice/admin.go:1067 msgid "Quantity must be an integer." msgstr "La quantitat ha de ser un número enter." -#: pkg/invoice/admin.go:1166 +#: pkg/invoice/admin.go:1068 msgid "Quantity must one or greater." msgstr "La quantitat ha de ser com a mínim u." -#: pkg/invoice/admin.go:1169 +#: pkg/invoice/admin.go:1071 msgid "Discount can not be empty." msgstr "No podeu deixar el descompte en blanc." -#: pkg/invoice/admin.go:1170 +#: pkg/invoice/admin.go:1072 msgid "Discount must be an integer." msgstr "El descompte ha de ser un número enter." -#: pkg/invoice/admin.go:1171 pkg/invoice/admin.go:1172 +#: pkg/invoice/admin.go:1073 pkg/invoice/admin.go:1074 msgid "Discount must be a percentage between 0 and 100." msgstr "El descompte ha de ser un percentatge entre 0 i 100" -#: pkg/invoice/admin.go:1176 +#: pkg/invoice/admin.go:1078 msgid "Selected tax is not valid." msgstr "L’impost escollit no és vàlid." @@ -3501,19 +3500,19 @@ msgctxt "filename" msgid "bookings.ods" msgstr "reserves.ods" -#: pkg/booking/admin.go:591 +#: pkg/booking/admin.go:473 msgid "Country can not be empty to validate the postcode." msgstr "No podeu deixar el país en blanc per validar el codi postal." -#: pkg/booking/admin.go:601 +#: pkg/booking/admin.go:483 msgid "Country can not be empty to validate the phone." msgstr "No podeu deixar el país en blanc per validar el telèfon." -#: pkg/booking/admin.go:608 +#: pkg/booking/admin.go:490 msgid "You must select at least one accommodation." msgstr "Heu d’escollir com a mínim un allotjament." -#: pkg/booking/admin.go:614 +#: pkg/booking/admin.go:496 msgid "The selected accommodations have no available openings in the requested dates." msgstr "Els allotjaments escollits no estan disponibles a les dates demanades." @@ -3630,6 +3629,9 @@ msgstr "El valor de %s ha de ser com a màxim %d." msgid "It is mandatory to agree to the reservation conditions." msgstr "És obligatori acceptar les condicions de reserves." +#~ msgid "Total" +#~ msgstr "Total" + #~ msgid "Select a customer" #~ msgstr "Esculliu un client" diff --git a/po/es.po b/po/es.po index a238b9f..99abc2c 100644 --- a/po/es.po +++ b/po/es.po @@ -8,7 +8,7 @@ msgid "" msgstr "" "Project-Id-Version: camper\n" "Report-Msgid-Bugs-To: jordi@tandem.blog\n" -"POT-Creation-Date: 2024-05-03 17:19+0200\n" +"POT-Creation-Date: 2024-05-03 19:12+0200\n" "PO-Revision-Date: 2024-02-06 10:04+0100\n" "Last-Translator: jordi fita mas \n" "Language-Team: Spanish \n" @@ -179,7 +179,7 @@ msgstr "Noches" #: web/templates/mail/payment/details.gotxt:22 #: web/templates/public/booking/fields.gohtml:60 #: web/templates/admin/payment/details.gohtml:98 -#: web/templates/admin/booking/fields.gohtml:93 pkg/invoice/admin.go:1062 +#: web/templates/admin/booking/fields.gohtml:93 pkg/invoice/admin.go:964 msgctxt "input" msgid "Adults aged 17 or older" msgstr "Adultos de 17 años o más" @@ -187,7 +187,7 @@ msgstr "Adultos de 17 años o más" #: web/templates/mail/payment/details.gotxt:23 #: web/templates/public/booking/fields.gohtml:71 #: web/templates/admin/payment/details.gohtml:102 -#: web/templates/admin/booking/fields.gohtml:109 pkg/invoice/admin.go:1063 +#: web/templates/admin/booking/fields.gohtml:109 pkg/invoice/admin.go:965 msgctxt "input" msgid "Teenagers from 11 to 16 years old" msgstr "Adolescentes de 11 a 16 años" @@ -195,7 +195,7 @@ msgstr "Adolescentes de 11 a 16 años" #: web/templates/mail/payment/details.gotxt:24 #: web/templates/public/booking/fields.gohtml:82 #: web/templates/admin/payment/details.gohtml:106 -#: web/templates/admin/booking/fields.gohtml:125 pkg/invoice/admin.go:1064 +#: web/templates/admin/booking/fields.gohtml:125 pkg/invoice/admin.go:966 msgctxt "input" msgid "Children from 2 to 10 years old" msgstr "Niños de 2 a 10 años" @@ -203,14 +203,14 @@ msgstr "Niños de 2 a 10 años" #: web/templates/mail/payment/details.gotxt:25 #: web/templates/public/booking/fields.gohtml:100 #: web/templates/admin/payment/details.gohtml:110 -#: web/templates/admin/booking/fields.gohtml:140 pkg/invoice/admin.go:1065 +#: web/templates/admin/booking/fields.gohtml:140 pkg/invoice/admin.go:967 msgctxt "input" msgid "Dogs" msgstr "Perros" #: web/templates/mail/payment/details.gotxt:26 #: web/templates/admin/payment/details.gohtml:114 -#: web/templates/admin/booking/fields.gohtml:167 pkg/invoice/admin.go:1066 +#: web/templates/admin/booking/fields.gohtml:167 pkg/invoice/admin.go:968 #: pkg/booking/cart.go:242 msgctxt "cart" msgid "Tourist tax" @@ -293,6 +293,7 @@ msgstr "País" #: web/templates/mail/payment/details.gotxt:46 #: web/templates/public/booking/fields.gohtml:201 #: web/templates/admin/payment/details.gohtml:163 +#: web/templates/admin/customer/index.gohtml:33 #: web/templates/admin/login.gohtml:27 web/templates/admin/profile.gohtml:38 #: web/templates/admin/taxDetails.gohtml:53 msgctxt "input" @@ -418,7 +419,7 @@ msgid "Order Number" msgstr "Número de pedido" #: web/templates/public/payment/details.gohtml:8 -#: web/templates/admin/invoice/index.gohtml:103 +#: web/templates/admin/invoice/index.gohtml:104 #: web/templates/admin/invoice/view.gohtml:26 msgctxt "title" msgid "Date" @@ -596,6 +597,12 @@ msgctxt "action" msgid "Filters" msgstr "Filtros" +#: web/templates/public/form.gohtml:93 web/templates/admin/form.gohtml:93 +#: web/templates/admin/prebooking/results.gohtml:20 +msgctxt "action" +msgid "Load more" +msgstr "Cargar más" + #: web/templates/public/campsite/type.gohtml:49 #: web/templates/public/booking/fields.gohtml:278 msgctxt "action" @@ -1183,6 +1190,7 @@ msgstr "Álias" #: web/templates/admin/campsite/type/form.gohtml:51 #: web/templates/admin/campsite/type/option/form.gohtml:41 #: web/templates/admin/season/form.gohtml:50 +#: web/templates/admin/customer/index.gohtml:24 #: web/templates/admin/invoice/product-form.gohtml:16 #: web/templates/admin/services/form.gohtml:53 #: web/templates/admin/profile.gohtml:29 @@ -1255,7 +1263,7 @@ msgstr "Añadir texto legal" #: web/templates/admin/campsite/type/option/index.gohtml:30 #: web/templates/admin/campsite/type/index.gohtml:29 #: web/templates/admin/season/index.gohtml:29 -#: web/templates/admin/customer/index.gohtml:19 +#: web/templates/admin/customer/index.gohtml:51 #: web/templates/admin/user/index.gohtml:20 #: web/templates/admin/surroundings/index.gohtml:83 #: web/templates/admin/amenity/feature/index.gohtml:30 @@ -1860,7 +1868,7 @@ msgid "New Customer" msgstr "Nuevo cliente" #: web/templates/admin/customer/form.gohtml:15 -#: web/templates/admin/invoice/index.gohtml:105 +#: web/templates/admin/invoice/index.gohtml:106 msgctxt "title" msgid "Customer" msgstr "Cliente" @@ -1917,19 +1925,27 @@ msgctxt "action" msgid "Add Customer" msgstr "Añadir cliente" -#: web/templates/admin/customer/index.gohtml:20 +#: web/templates/admin/customer/index.gohtml:43 +#: web/templates/admin/invoice/index.gohtml:94 +#: web/templates/admin/prebooking/index.gohtml:51 +#: web/templates/admin/booking/index.gohtml:65 +msgctxt "action" +msgid "Reset" +msgstr "Restablecer" + +#: web/templates/admin/customer/index.gohtml:52 #: web/templates/admin/user/login-attempts.gohtml:20 #: web/templates/admin/user/index.gohtml:21 msgctxt "header" msgid "Email" msgstr "Correo-e" -#: web/templates/admin/customer/index.gohtml:21 +#: web/templates/admin/customer/index.gohtml:53 msgctxt "header" msgid "Phone" msgstr "Teléfono" -#: web/templates/admin/customer/index.gohtml:33 +#: web/templates/admin/customer/index.gohtml:61 msgid "No customer found." msgstr "No se ha encontrado ningún cliente." @@ -2076,60 +2092,39 @@ msgctxt "action" msgid "Filter" msgstr "Filtrar" -#: web/templates/admin/invoice/index.gohtml:94 -#: web/templates/admin/prebooking/index.gohtml:51 -#: web/templates/admin/booking/index.gohtml:65 -msgctxt "action" -msgid "Reset" -msgstr "Restablecer" - #: web/templates/admin/invoice/index.gohtml:97 msgctxt "action" msgid "Add invoice" msgstr "Añadir factura" -#: web/templates/admin/invoice/index.gohtml:102 +#: web/templates/admin/invoice/index.gohtml:103 msgctxt "invoice" msgid "All" msgstr "Todas" -#: web/templates/admin/invoice/index.gohtml:104 +#: web/templates/admin/invoice/index.gohtml:105 msgctxt "title" msgid "Invoice Num." msgstr "Núm. de factura" -#: web/templates/admin/invoice/index.gohtml:106 +#: web/templates/admin/invoice/index.gohtml:107 msgctxt "title" msgid "Status" msgstr "Estado" -#: web/templates/admin/invoice/index.gohtml:107 +#: web/templates/admin/invoice/index.gohtml:108 msgctxt "title" msgid "Download" msgstr "Descarga" -#: web/templates/admin/invoice/index.gohtml:108 +#: web/templates/admin/invoice/index.gohtml:109 msgctxt "title" msgid "Amount" msgstr "Importe" -#: web/templates/admin/invoice/index.gohtml:115 -msgctxt "action" -msgid "Select invoice %v" -msgstr "Seleccionar factura %v" - -#: web/templates/admin/invoice/index.gohtml:144 -msgctxt "action" -msgid "Download invoice %s" -msgstr "Descargar factura %s" - -#: web/templates/admin/invoice/index.gohtml:154 -msgid "No invoices added yet." -msgstr "No se ha añadido ninguna factura todavía." - -#: web/templates/admin/invoice/index.gohtml:161 -msgid "Total" -msgstr "Total" +#: web/templates/admin/invoice/index.gohtml:117 +msgid "No invoices found." +msgstr "No se ha encontrado ninguna factura." #: web/templates/admin/invoice/view.gohtml:2 msgctxt "title" @@ -2171,6 +2166,16 @@ msgctxt "title" msgid "Tax Base" msgstr "Base imponible" +#: web/templates/admin/invoice/results.gohtml:3 +msgctxt "action" +msgid "Select invoice %v" +msgstr "Seleccionar factura %v" + +#: web/templates/admin/invoice/results.gohtml:32 +msgctxt "action" +msgid "Download invoice %s" +msgstr "Descargar factura %s" + #: web/templates/admin/prebooking/index.gohtml:6 #: web/templates/admin/layout.gohtml:92 #: web/templates/admin/booking/form.gohtml:20 @@ -2216,12 +2221,6 @@ msgstr "Nombre del titular" msgid "No prebooking found." msgstr "No se ha encontrado ninguna prereserva." -#: web/templates/admin/prebooking/results.gohtml:20 -#: web/templates/admin/booking/results.gohtml:23 -msgctxt "action" -msgid "Load more" -msgstr "Cargar más" - #: web/templates/admin/login.gohtml:6 web/templates/admin/login.gohtml:18 msgctxt "title" msgid "Login" @@ -2701,7 +2700,7 @@ msgctxt "header" msgid "Decription" msgstr "Descripción" -#: web/templates/admin/booking/fields.gohtml:81 pkg/invoice/admin.go:1061 +#: web/templates/admin/booking/fields.gohtml:81 pkg/invoice/admin.go:963 #: pkg/booking/cart.go:232 msgctxt "cart" msgid "Night" @@ -2900,7 +2899,7 @@ msgstr "Se ha recibido correctamente el pago de la reserva" #: pkg/legal/admin.go:258 pkg/app/user.go:249 pkg/campsite/types/option.go:365 #: pkg/campsite/types/feature.go:272 pkg/campsite/types/admin.go:577 #: pkg/campsite/feature.go:269 pkg/season/admin.go:411 -#: pkg/invoice/admin.go:1158 pkg/services/admin.go:316 +#: pkg/invoice/admin.go:1060 pkg/services/admin.go:316 #: pkg/surroundings/admin.go:340 pkg/amenity/feature.go:269 #: pkg/amenity/admin.go:283 msgid "Name can not be empty." @@ -2941,8 +2940,8 @@ msgstr "La imagen de la diapositiva tiene que ser un medio de tipo imagen." msgid "Email can not be empty." msgstr "No podéis dejar el correo-e en blanco." -#: pkg/app/login.go:57 pkg/app/user.go:247 pkg/customer/admin.go:345 -#: pkg/company/admin.go:225 pkg/booking/admin.go:597 pkg/booking/public.go:593 +#: pkg/app/login.go:57 pkg/app/user.go:247 pkg/customer/admin.go:361 +#: pkg/company/admin.go:225 pkg/booking/admin.go:479 pkg/booking/public.go:593 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." @@ -2999,15 +2998,15 @@ msgstr "El valor del máximo tiene que ser un número entero." msgid "Maximum must be equal or greater than minimum." msgstr "El valor del máximo tiene que ser igual o mayor al del mínimo." -#: pkg/campsite/types/option.go:382 pkg/invoice/admin.go:1159 +#: pkg/campsite/types/option.go:382 pkg/invoice/admin.go:1061 msgid "Price can not be empty." msgstr "No podéis dejar el precio en blanco." -#: pkg/campsite/types/option.go:383 pkg/invoice/admin.go:1160 +#: pkg/campsite/types/option.go:383 pkg/invoice/admin.go:1062 msgid "Price must be a decimal number." msgstr "El precio tiene que ser un número decimal." -#: pkg/campsite/types/option.go:384 pkg/invoice/admin.go:1161 +#: pkg/campsite/types/option.go:384 pkg/invoice/admin.go:1063 msgid "Price must be zero or greater." msgstr "El precio tiene que ser como mínimo cero." @@ -3153,7 +3152,7 @@ msgctxt "header" msgid "Children (aged 2 to 10)" msgstr "Niños (de 2 a 10 años)" -#: pkg/campsite/admin.go:280 pkg/booking/admin.go:573 pkg/booking/public.go:177 +#: pkg/campsite/admin.go:280 pkg/booking/admin.go:455 pkg/booking/public.go:177 #: pkg/booking/public.go:232 msgid "Selected campsite type is not valid." msgstr "El tipo de alojamiento escogido no es válido." @@ -3191,129 +3190,129 @@ msgstr "No podéis dejar la fecha final en blanco." msgid "End date must be a valid date." msgstr "La fecha final tiene que ser una fecha válida." -#: pkg/customer/admin.go:326 pkg/company/admin.go:207 +#: pkg/customer/admin.go:342 pkg/company/admin.go:207 #: pkg/booking/checkin.go:300 pkg/booking/public.go:577 msgid "Selected country is not valid." msgstr "El país escogido no es válido." -#: pkg/customer/admin.go:330 pkg/booking/checkin.go:284 +#: pkg/customer/admin.go:346 pkg/booking/checkin.go:284 msgid "Selected ID document type is not valid." msgstr "El tipo de documento de identidad escogido no es válido." -#: pkg/customer/admin.go:331 pkg/booking/checkin.go:285 +#: pkg/customer/admin.go:347 pkg/booking/checkin.go:285 msgid "ID document number can not be empty." msgstr "No podéis dejar el número del documento de identidad en blanco." -#: pkg/customer/admin.go:333 pkg/booking/checkin.go:291 -#: pkg/booking/checkin.go:292 pkg/booking/admin.go:585 +#: pkg/customer/admin.go:349 pkg/booking/checkin.go:291 +#: pkg/booking/checkin.go:292 pkg/booking/admin.go:467 #: pkg/booking/public.go:581 msgid "Full name can not be empty." msgstr "No podéis dejar el nombre y los apellidos en blanco." -#: pkg/customer/admin.go:334 pkg/booking/admin.go:586 pkg/booking/public.go:582 +#: pkg/customer/admin.go:350 pkg/booking/admin.go:468 pkg/booking/public.go:582 msgid "Full name must have at least one letter." msgstr "El nombre y los apellidos tienen que tener como mínimo una letra." -#: pkg/customer/admin.go:337 pkg/company/admin.go:230 pkg/booking/public.go:585 +#: pkg/customer/admin.go:353 pkg/company/admin.go:230 pkg/booking/public.go:585 msgid "Address can not be empty." msgstr "No podéis dejar la dirección en blanco." -#: pkg/customer/admin.go:338 pkg/booking/public.go:586 +#: pkg/customer/admin.go:354 pkg/booking/public.go:586 msgid "Town or village can not be empty." msgstr "No podéis dejar la población en blanco." -#: pkg/customer/admin.go:339 pkg/company/admin.go:233 pkg/booking/public.go:587 +#: pkg/customer/admin.go:355 pkg/company/admin.go:233 pkg/booking/public.go:587 msgid "Postcode can not be empty." msgstr "No podéis dejar el código postal en blanco." -#: pkg/customer/admin.go:340 pkg/company/admin.go:234 pkg/booking/admin.go:592 +#: pkg/customer/admin.go:356 pkg/company/admin.go:234 pkg/booking/admin.go:474 #: pkg/booking/public.go:588 msgid "This postcode is not valid." msgstr "Este código postal no es válido." -#: pkg/customer/admin.go:348 pkg/company/admin.go:220 -#: pkg/booking/checkin.go:304 pkg/booking/admin.go:602 +#: pkg/customer/admin.go:364 pkg/company/admin.go:220 +#: pkg/booking/checkin.go:304 pkg/booking/admin.go:484 #: pkg/booking/public.go:596 msgid "This phone number is not valid." msgstr "Este teléfono no es válido." -#: pkg/invoice/admin.go:679 +#: pkg/invoice/admin.go:581 msgctxt "filename" msgid "invoices.zip" msgstr "facturas.zip" -#: pkg/invoice/admin.go:694 +#: pkg/invoice/admin.go:596 msgctxt "filename" msgid "invoices.ods" msgstr "facturas.ods" -#: pkg/invoice/admin.go:696 pkg/invoice/admin.go:1358 pkg/invoice/admin.go:1365 +#: pkg/invoice/admin.go:598 pkg/invoice/admin.go:1260 pkg/invoice/admin.go:1267 msgid "Invalid action" msgstr "Acción inválida" -#: pkg/invoice/admin.go:861 +#: pkg/invoice/admin.go:763 msgid "Selected invoice status is not valid." msgstr "El estado de factura escogida no es válido." -#: pkg/invoice/admin.go:862 +#: pkg/invoice/admin.go:764 msgid "Invoice date can not be empty." msgstr "No podéis dejar la fecha de factura en blanco." -#: pkg/invoice/admin.go:863 +#: pkg/invoice/admin.go:765 msgid "Invoice date must be a valid date." msgstr "La fecha de factura tiene que ser una fecha válida." -#: pkg/invoice/admin.go:1021 +#: pkg/invoice/admin.go:923 #, c-format msgid "Re: booking #%s of %s–%s" msgstr "Ref.: reserva núm. %s del %s–%s" -#: pkg/invoice/admin.go:1022 +#: pkg/invoice/admin.go:924 msgctxt "to_char" msgid "MM/DD/YYYY" msgstr "DD/MM/YYYY" -#: pkg/invoice/admin.go:1149 +#: pkg/invoice/admin.go:1051 msgid "Invoice product ID must be an integer." msgstr "El ID de producto de factura tiene que ser entero." -#: pkg/invoice/admin.go:1150 +#: pkg/invoice/admin.go:1052 msgid "Invoice product ID one or greater." msgstr "El ID de producto de factura tiene que ser como mínimo uno." -#: pkg/invoice/admin.go:1154 +#: pkg/invoice/admin.go:1056 msgid "Product ID must be an integer." msgstr "El ID de producto tiene que ser un número entero." -#: pkg/invoice/admin.go:1155 +#: pkg/invoice/admin.go:1057 msgid "Product ID must zero or greater." msgstr "El ID de producto tiene que ser como mínimo cero." -#: pkg/invoice/admin.go:1164 +#: pkg/invoice/admin.go:1066 msgid "Quantity can not be empty." msgstr "No podéis dejar la cantidad en blanco." -#: pkg/invoice/admin.go:1165 +#: pkg/invoice/admin.go:1067 msgid "Quantity must be an integer." msgstr "La cantidad tiene que ser un número entero." -#: pkg/invoice/admin.go:1166 +#: pkg/invoice/admin.go:1068 msgid "Quantity must one or greater." msgstr "La cantidad tiene que ser como mínimo uno." -#: pkg/invoice/admin.go:1169 +#: pkg/invoice/admin.go:1071 msgid "Discount can not be empty." msgstr "No podéis dejar el descuento en blanco." -#: pkg/invoice/admin.go:1170 +#: pkg/invoice/admin.go:1072 msgid "Discount must be an integer." msgstr "El descuento tiene que ser un número entero." -#: pkg/invoice/admin.go:1171 pkg/invoice/admin.go:1172 +#: pkg/invoice/admin.go:1073 pkg/invoice/admin.go:1074 msgid "Discount must be a percentage between 0 and 100." msgstr "El descuento tiene que ser un porcentaje entre 1 y 100." -#: pkg/invoice/admin.go:1176 +#: pkg/invoice/admin.go:1078 msgid "Selected tax is not valid." msgstr "El impuesto escogido no es válido." @@ -3501,19 +3500,19 @@ msgctxt "filename" msgid "bookings.ods" msgstr "reservas.ods" -#: pkg/booking/admin.go:591 +#: pkg/booking/admin.go:473 msgid "Country can not be empty to validate the postcode." msgstr "No podéis dejar el país en blanco para validar el código postal." -#: pkg/booking/admin.go:601 +#: pkg/booking/admin.go:483 msgid "Country can not be empty to validate the phone." msgstr "No podéis dejar el país en blanco para validar el teléfono." -#: pkg/booking/admin.go:608 +#: pkg/booking/admin.go:490 msgid "You must select at least one accommodation." msgstr "Tenéis que seleccionar como mínimo un alojamiento." -#: pkg/booking/admin.go:614 +#: pkg/booking/admin.go:496 msgid "The selected accommodations have no available openings in the requested dates." msgstr "Los alojamientos seleccionados no tienen disponibilidad en las fechas pedidas." @@ -3630,6 +3629,9 @@ msgstr "%s tiene que ser como máximo %d" msgid "It is mandatory to agree to the reservation conditions." msgstr "Es obligatorio aceptar las condiciones de reserva." +#~ msgid "Total" +#~ msgstr "Total" + #~ msgid "Select a customer" #~ msgstr "Escoja un cliente" diff --git a/po/fr.po b/po/fr.po index 77a0f26..a85f9c9 100644 --- a/po/fr.po +++ b/po/fr.po @@ -8,7 +8,7 @@ msgid "" msgstr "" "Project-Id-Version: camper\n" "Report-Msgid-Bugs-To: jordi@tandem.blog\n" -"POT-Creation-Date: 2024-05-03 17:19+0200\n" +"POT-Creation-Date: 2024-05-03 19:12+0200\n" "PO-Revision-Date: 2024-02-06 10:05+0100\n" "Last-Translator: Oriol Carbonell \n" "Language-Team: French \n" @@ -179,7 +179,7 @@ msgstr "Nuits" #: web/templates/mail/payment/details.gotxt:22 #: web/templates/public/booking/fields.gohtml:60 #: web/templates/admin/payment/details.gohtml:98 -#: web/templates/admin/booking/fields.gohtml:93 pkg/invoice/admin.go:1062 +#: web/templates/admin/booking/fields.gohtml:93 pkg/invoice/admin.go:964 msgctxt "input" msgid "Adults aged 17 or older" msgstr "Adultes âgés 17 ans ou plus" @@ -187,7 +187,7 @@ msgstr "Adultes âgés 17 ans ou plus" #: web/templates/mail/payment/details.gotxt:23 #: web/templates/public/booking/fields.gohtml:71 #: web/templates/admin/payment/details.gohtml:102 -#: web/templates/admin/booking/fields.gohtml:109 pkg/invoice/admin.go:1063 +#: web/templates/admin/booking/fields.gohtml:109 pkg/invoice/admin.go:965 msgctxt "input" msgid "Teenagers from 11 to 16 years old" msgstr "Adolescents de 11 à 16 ans" @@ -195,7 +195,7 @@ msgstr "Adolescents de 11 à 16 ans" #: web/templates/mail/payment/details.gotxt:24 #: web/templates/public/booking/fields.gohtml:82 #: web/templates/admin/payment/details.gohtml:106 -#: web/templates/admin/booking/fields.gohtml:125 pkg/invoice/admin.go:1064 +#: web/templates/admin/booking/fields.gohtml:125 pkg/invoice/admin.go:966 msgctxt "input" msgid "Children from 2 to 10 years old" msgstr "Enfants de 2 à 10 ans" @@ -203,14 +203,14 @@ msgstr "Enfants de 2 à 10 ans" #: web/templates/mail/payment/details.gotxt:25 #: web/templates/public/booking/fields.gohtml:100 #: web/templates/admin/payment/details.gohtml:110 -#: web/templates/admin/booking/fields.gohtml:140 pkg/invoice/admin.go:1065 +#: web/templates/admin/booking/fields.gohtml:140 pkg/invoice/admin.go:967 msgctxt "input" msgid "Dogs" msgstr "Chiens" #: web/templates/mail/payment/details.gotxt:26 #: web/templates/admin/payment/details.gohtml:114 -#: web/templates/admin/booking/fields.gohtml:167 pkg/invoice/admin.go:1066 +#: web/templates/admin/booking/fields.gohtml:167 pkg/invoice/admin.go:968 #: pkg/booking/cart.go:242 msgctxt "cart" msgid "Tourist tax" @@ -293,6 +293,7 @@ msgstr "Pays" #: web/templates/mail/payment/details.gotxt:46 #: web/templates/public/booking/fields.gohtml:201 #: web/templates/admin/payment/details.gohtml:163 +#: web/templates/admin/customer/index.gohtml:33 #: web/templates/admin/login.gohtml:27 web/templates/admin/profile.gohtml:38 #: web/templates/admin/taxDetails.gohtml:53 msgctxt "input" @@ -418,7 +419,7 @@ msgid "Order Number" msgstr "Numéro de commande" #: web/templates/public/payment/details.gohtml:8 -#: web/templates/admin/invoice/index.gohtml:103 +#: web/templates/admin/invoice/index.gohtml:104 #: web/templates/admin/invoice/view.gohtml:26 msgctxt "title" msgid "Date" @@ -596,6 +597,12 @@ msgctxt "action" msgid "Filters" msgstr "Filtres" +#: web/templates/public/form.gohtml:93 web/templates/admin/form.gohtml:93 +#: web/templates/admin/prebooking/results.gohtml:20 +msgctxt "action" +msgid "Load more" +msgstr "Charger plus" + #: web/templates/public/campsite/type.gohtml:49 #: web/templates/public/booking/fields.gohtml:278 msgctxt "action" @@ -1183,6 +1190,7 @@ msgstr "Slug" #: web/templates/admin/campsite/type/form.gohtml:51 #: web/templates/admin/campsite/type/option/form.gohtml:41 #: web/templates/admin/season/form.gohtml:50 +#: web/templates/admin/customer/index.gohtml:24 #: web/templates/admin/invoice/product-form.gohtml:16 #: web/templates/admin/services/form.gohtml:53 #: web/templates/admin/profile.gohtml:29 @@ -1255,7 +1263,7 @@ msgstr "Ajouter un texte juridique" #: web/templates/admin/campsite/type/option/index.gohtml:30 #: web/templates/admin/campsite/type/index.gohtml:29 #: web/templates/admin/season/index.gohtml:29 -#: web/templates/admin/customer/index.gohtml:19 +#: web/templates/admin/customer/index.gohtml:51 #: web/templates/admin/user/index.gohtml:20 #: web/templates/admin/surroundings/index.gohtml:83 #: web/templates/admin/amenity/feature/index.gohtml:30 @@ -1860,7 +1868,7 @@ msgid "New Customer" msgstr "Nouveau client" #: web/templates/admin/customer/form.gohtml:15 -#: web/templates/admin/invoice/index.gohtml:105 +#: web/templates/admin/invoice/index.gohtml:106 msgctxt "title" msgid "Customer" msgstr "Client" @@ -1917,19 +1925,27 @@ msgctxt "action" msgid "Add Customer" msgstr "Ajouter un client" -#: web/templates/admin/customer/index.gohtml:20 +#: web/templates/admin/customer/index.gohtml:43 +#: web/templates/admin/invoice/index.gohtml:94 +#: web/templates/admin/prebooking/index.gohtml:51 +#: web/templates/admin/booking/index.gohtml:65 +msgctxt "action" +msgid "Reset" +msgstr "Réinitialiser" + +#: web/templates/admin/customer/index.gohtml:52 #: web/templates/admin/user/login-attempts.gohtml:20 #: web/templates/admin/user/index.gohtml:21 msgctxt "header" msgid "Email" msgstr "E-mail" -#: web/templates/admin/customer/index.gohtml:21 +#: web/templates/admin/customer/index.gohtml:53 msgctxt "header" msgid "Phone" msgstr "Téléphone" -#: web/templates/admin/customer/index.gohtml:33 +#: web/templates/admin/customer/index.gohtml:61 msgid "No customer found." msgstr "Aucun client trouvée." @@ -2076,60 +2092,39 @@ msgctxt "action" msgid "Filter" msgstr "Filtrer" -#: web/templates/admin/invoice/index.gohtml:94 -#: web/templates/admin/prebooking/index.gohtml:51 -#: web/templates/admin/booking/index.gohtml:65 -msgctxt "action" -msgid "Reset" -msgstr "Réinitialiser" - #: web/templates/admin/invoice/index.gohtml:97 msgctxt "action" msgid "Add invoice" msgstr "Nouvelle facture" -#: web/templates/admin/invoice/index.gohtml:102 +#: web/templates/admin/invoice/index.gohtml:103 msgctxt "invoice" msgid "All" msgstr "Toutes" -#: web/templates/admin/invoice/index.gohtml:104 +#: web/templates/admin/invoice/index.gohtml:105 msgctxt "title" msgid "Invoice Num." msgstr "Num. de facture" -#: web/templates/admin/invoice/index.gohtml:106 +#: web/templates/admin/invoice/index.gohtml:107 msgctxt "title" msgid "Status" msgstr "Statut" -#: web/templates/admin/invoice/index.gohtml:107 +#: web/templates/admin/invoice/index.gohtml:108 msgctxt "title" msgid "Download" msgstr "Téléchargement" -#: web/templates/admin/invoice/index.gohtml:108 +#: web/templates/admin/invoice/index.gohtml:109 msgctxt "title" msgid "Amount" msgstr "Import" -#: web/templates/admin/invoice/index.gohtml:115 -msgctxt "action" -msgid "Select invoice %v" -msgstr "Sélectionner la facture %v" - -#: web/templates/admin/invoice/index.gohtml:144 -msgctxt "action" -msgid "Download invoice %s" -msgstr "Télécharger la facture %s" - -#: web/templates/admin/invoice/index.gohtml:154 -msgid "No invoices added yet." -msgstr "Aucune facture n’a encore été ajouté." - -#: web/templates/admin/invoice/index.gohtml:161 -msgid "Total" -msgstr "Totale" +#: web/templates/admin/invoice/index.gohtml:117 +msgid "No invoices found." +msgstr "Aucune facture trouvée." #: web/templates/admin/invoice/view.gohtml:2 msgctxt "title" @@ -2171,6 +2166,16 @@ msgctxt "title" msgid "Tax Base" msgstr "Import imposable" +#: web/templates/admin/invoice/results.gohtml:3 +msgctxt "action" +msgid "Select invoice %v" +msgstr "Sélectionner la facture %v" + +#: web/templates/admin/invoice/results.gohtml:32 +msgctxt "action" +msgid "Download invoice %s" +msgstr "Télécharger la facture %s" + #: web/templates/admin/prebooking/index.gohtml:6 #: web/templates/admin/layout.gohtml:92 #: web/templates/admin/booking/form.gohtml:20 @@ -2216,12 +2221,6 @@ msgstr "Nom du titulaire" msgid "No prebooking found." msgstr "Aucune pré-réservation trouvée." -#: web/templates/admin/prebooking/results.gohtml:20 -#: web/templates/admin/booking/results.gohtml:23 -msgctxt "action" -msgid "Load more" -msgstr "Charger plus" - #: web/templates/admin/login.gohtml:6 web/templates/admin/login.gohtml:18 msgctxt "title" msgid "Login" @@ -2701,7 +2700,7 @@ msgctxt "header" msgid "Decription" msgstr "Description" -#: web/templates/admin/booking/fields.gohtml:81 pkg/invoice/admin.go:1061 +#: web/templates/admin/booking/fields.gohtml:81 pkg/invoice/admin.go:963 #: pkg/booking/cart.go:232 msgctxt "cart" msgid "Night" @@ -2900,7 +2899,7 @@ msgstr "Paiement de réservation reçu avec succès" #: pkg/legal/admin.go:258 pkg/app/user.go:249 pkg/campsite/types/option.go:365 #: pkg/campsite/types/feature.go:272 pkg/campsite/types/admin.go:577 #: pkg/campsite/feature.go:269 pkg/season/admin.go:411 -#: pkg/invoice/admin.go:1158 pkg/services/admin.go:316 +#: pkg/invoice/admin.go:1060 pkg/services/admin.go:316 #: pkg/surroundings/admin.go:340 pkg/amenity/feature.go:269 #: pkg/amenity/admin.go:283 msgid "Name can not be empty." @@ -2941,8 +2940,8 @@ msgstr "L’image de la diapositive doit être de type média d’image." msgid "Email can not be empty." msgstr "L’e-mail ne peut pas être vide." -#: pkg/app/login.go:57 pkg/app/user.go:247 pkg/customer/admin.go:345 -#: pkg/company/admin.go:225 pkg/booking/admin.go:597 pkg/booking/public.go:593 +#: pkg/app/login.go:57 pkg/app/user.go:247 pkg/customer/admin.go:361 +#: pkg/company/admin.go:225 pkg/booking/admin.go:479 pkg/booking/public.go:593 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." @@ -2999,15 +2998,15 @@ msgstr "Le maximum doit être un nombre entier." msgid "Maximum must be equal or greater than minimum." msgstr "Le maximum doit être égal ou supérieur au minimum." -#: pkg/campsite/types/option.go:382 pkg/invoice/admin.go:1159 +#: pkg/campsite/types/option.go:382 pkg/invoice/admin.go:1061 msgid "Price can not be empty." msgstr "Le prix ne peut pas être vide." -#: pkg/campsite/types/option.go:383 pkg/invoice/admin.go:1160 +#: pkg/campsite/types/option.go:383 pkg/invoice/admin.go:1062 msgid "Price must be a decimal number." msgstr "Le prix doit être un nombre décimal." -#: pkg/campsite/types/option.go:384 pkg/invoice/admin.go:1161 +#: pkg/campsite/types/option.go:384 pkg/invoice/admin.go:1063 msgid "Price must be zero or greater." msgstr "Le prix doit être égal ou supérieur à zéro." @@ -3153,7 +3152,7 @@ msgctxt "header" msgid "Children (aged 2 to 10)" msgstr "Enfants (de 2 à 10 anys)" -#: pkg/campsite/admin.go:280 pkg/booking/admin.go:573 pkg/booking/public.go:177 +#: pkg/campsite/admin.go:280 pkg/booking/admin.go:455 pkg/booking/public.go:177 #: pkg/booking/public.go:232 msgid "Selected campsite type is not valid." msgstr "Le type d’emplacement sélectionné n’est pas valide." @@ -3191,129 +3190,129 @@ msgstr "La date de fin ne peut pas être vide." msgid "End date must be a valid date." msgstr "La date de fin doit être une date valide." -#: pkg/customer/admin.go:326 pkg/company/admin.go:207 +#: pkg/customer/admin.go:342 pkg/company/admin.go:207 #: pkg/booking/checkin.go:300 pkg/booking/public.go:577 msgid "Selected country is not valid." msgstr "Le pays sélectionné n’est pas valide." -#: pkg/customer/admin.go:330 pkg/booking/checkin.go:284 +#: pkg/customer/admin.go:346 pkg/booking/checkin.go:284 msgid "Selected ID document type is not valid." msgstr "Le type de document d’identité sélectionné n’est pas valide." -#: pkg/customer/admin.go:331 pkg/booking/checkin.go:285 +#: pkg/customer/admin.go:347 pkg/booking/checkin.go:285 msgid "ID document number can not be empty." msgstr "Le numéro de documento d’identité ne peut pas être vide." -#: pkg/customer/admin.go:333 pkg/booking/checkin.go:291 -#: pkg/booking/checkin.go:292 pkg/booking/admin.go:585 +#: pkg/customer/admin.go:349 pkg/booking/checkin.go:291 +#: pkg/booking/checkin.go:292 pkg/booking/admin.go:467 #: pkg/booking/public.go:581 msgid "Full name can not be empty." msgstr "Le nom complet ne peut pas être vide." -#: pkg/customer/admin.go:334 pkg/booking/admin.go:586 pkg/booking/public.go:582 +#: pkg/customer/admin.go:350 pkg/booking/admin.go:468 pkg/booking/public.go:582 msgid "Full name must have at least one letter." msgstr "Le nom complet doit comporter au moins une lettre." -#: pkg/customer/admin.go:337 pkg/company/admin.go:230 pkg/booking/public.go:585 +#: pkg/customer/admin.go:353 pkg/company/admin.go:230 pkg/booking/public.go:585 msgid "Address can not be empty." msgstr "L’adresse ne peut pas être vide." -#: pkg/customer/admin.go:338 pkg/booking/public.go:586 +#: pkg/customer/admin.go:354 pkg/booking/public.go:586 msgid "Town or village can not be empty." msgstr "La ville ne peut pas être vide." -#: pkg/customer/admin.go:339 pkg/company/admin.go:233 pkg/booking/public.go:587 +#: pkg/customer/admin.go:355 pkg/company/admin.go:233 pkg/booking/public.go:587 msgid "Postcode can not be empty." msgstr "Le code postal ne peut pas être vide." -#: pkg/customer/admin.go:340 pkg/company/admin.go:234 pkg/booking/admin.go:592 +#: pkg/customer/admin.go:356 pkg/company/admin.go:234 pkg/booking/admin.go:474 #: pkg/booking/public.go:588 msgid "This postcode is not valid." msgstr "Ce code postal n’est pas valide." -#: pkg/customer/admin.go:348 pkg/company/admin.go:220 -#: pkg/booking/checkin.go:304 pkg/booking/admin.go:602 +#: pkg/customer/admin.go:364 pkg/company/admin.go:220 +#: pkg/booking/checkin.go:304 pkg/booking/admin.go:484 #: pkg/booking/public.go:596 msgid "This phone number is not valid." msgstr "Ce numéro de téléphone n’est pas valide." -#: pkg/invoice/admin.go:679 +#: pkg/invoice/admin.go:581 msgctxt "filename" msgid "invoices.zip" msgstr "factures.zip" -#: pkg/invoice/admin.go:694 +#: pkg/invoice/admin.go:596 msgctxt "filename" msgid "invoices.ods" msgstr "factures.ods" -#: pkg/invoice/admin.go:696 pkg/invoice/admin.go:1358 pkg/invoice/admin.go:1365 +#: pkg/invoice/admin.go:598 pkg/invoice/admin.go:1260 pkg/invoice/admin.go:1267 msgid "Invalid action" msgstr "Actin invalide" -#: pkg/invoice/admin.go:861 +#: pkg/invoice/admin.go:763 msgid "Selected invoice status is not valid." msgstr "L’statut sélectionné n’est pas valide." -#: pkg/invoice/admin.go:862 +#: pkg/invoice/admin.go:764 msgid "Invoice date can not be empty." msgstr "La date de facture ne peut pas être vide." -#: pkg/invoice/admin.go:863 +#: pkg/invoice/admin.go:765 msgid "Invoice date must be a valid date." msgstr "La date de facture doit être une date valide." -#: pkg/invoice/admin.go:1021 +#: pkg/invoice/admin.go:923 #, c-format msgid "Re: booking #%s of %s–%s" msgstr "Réf. : réservation num. %s du %s–%s" -#: pkg/invoice/admin.go:1022 +#: pkg/invoice/admin.go:924 msgctxt "to_char" msgid "MM/DD/YYYY" msgstr "DD/MM/YYYY" -#: pkg/invoice/admin.go:1149 +#: pkg/invoice/admin.go:1051 msgid "Invoice product ID must be an integer." msgstr "Le ID de produit de facture doit être un entier." -#: pkg/invoice/admin.go:1150 +#: pkg/invoice/admin.go:1052 msgid "Invoice product ID one or greater." msgstr "Le ID de produit de facture doit être égal ou supérieur à un." -#: pkg/invoice/admin.go:1154 +#: pkg/invoice/admin.go:1056 msgid "Product ID must be an integer." msgstr "Le ID de produit doit être un entier." -#: pkg/invoice/admin.go:1155 +#: pkg/invoice/admin.go:1057 msgid "Product ID must zero or greater." msgstr "Le ID de produit doit être égal ou supérieur à zéro." -#: pkg/invoice/admin.go:1164 +#: pkg/invoice/admin.go:1066 msgid "Quantity can not be empty." msgstr "La quantité ne peut pas être vide." -#: pkg/invoice/admin.go:1165 +#: pkg/invoice/admin.go:1067 msgid "Quantity must be an integer." msgstr "La quantité doit être un entier." -#: pkg/invoice/admin.go:1166 +#: pkg/invoice/admin.go:1068 msgid "Quantity must one or greater." msgstr "La quantité doit être égnal ou supérieur à zéro." -#: pkg/invoice/admin.go:1169 +#: pkg/invoice/admin.go:1071 msgid "Discount can not be empty." msgstr "Le rabais ne peut pas être vide." -#: pkg/invoice/admin.go:1170 +#: pkg/invoice/admin.go:1072 msgid "Discount must be an integer." msgstr "Le rabais doit être un entier." -#: pkg/invoice/admin.go:1171 pkg/invoice/admin.go:1172 +#: pkg/invoice/admin.go:1073 pkg/invoice/admin.go:1074 msgid "Discount must be a percentage between 0 and 100." msgstr "Le rabais doit être un pourcentage compris entre 0 et 100." -#: pkg/invoice/admin.go:1176 +#: pkg/invoice/admin.go:1078 msgid "Selected tax is not valid." msgstr "La taxe sélectionnée n’est pas valide." @@ -3501,19 +3500,19 @@ msgctxt "filename" msgid "bookings.ods" msgstr "reservations.ods" -#: pkg/booking/admin.go:591 +#: pkg/booking/admin.go:473 msgid "Country can not be empty to validate the postcode." msgstr "Le pays ne peut pas être vide pour valider le code postal." -#: pkg/booking/admin.go:601 +#: pkg/booking/admin.go:483 msgid "Country can not be empty to validate the phone." msgstr "Le pays ne peut pas être vide pour valider le téléphone." -#: pkg/booking/admin.go:608 +#: pkg/booking/admin.go:490 msgid "You must select at least one accommodation." msgstr "Vous devez sélectionner au moins un hébergement." -#: pkg/booking/admin.go:614 +#: pkg/booking/admin.go:496 msgid "The selected accommodations have no available openings in the requested dates." msgstr "Les hébergements sélectionnés n’ont pas de disponibilités aux dates demandées." @@ -3630,6 +3629,9 @@ msgstr "%s doit être tout au plus %d." msgid "It is mandatory to agree to the reservation conditions." msgstr "Il est obligatoire d’accepter les conditions de réservation." +#~ msgid "Total" +#~ msgstr "Totale" + #~ msgid "Select a customer" #~ msgstr "Choisissez un client" diff --git a/web/templates/admin/invoice/index.gohtml b/web/templates/admin/invoice/index.gohtml index 6f62515..d11258e 100644 --- a/web/templates/admin/invoice/index.gohtml +++ b/web/templates/admin/invoice/index.gohtml @@ -96,73 +96,24 @@ {{( pgettext "Add invoice" "action" )}}

{{ template "title" . }}

- - - - - - - - - - - - - - {{ with .Invoices }} - {{- range $invoice := . }} - - {{ $title := .Number | printf (pgettext "Select invoice %v" "action") }} - - - - - - {{- $title = .Number | printf (pgettext "Download invoice %s" "action") -}} - - - - {{- end }} - {{ else }} + {{ if .Invoices }} +
{{( pgettext "All" "invoice" )}}{{( pgettext "Date" "title" )}}{{( pgettext "Invoice Num." "title" )}}{{( pgettext "Customer" "title" )}}{{( pgettext "Status" "title" )}}{{( pgettext "Download" "title" )}}{{( pgettext "Amount" "title" )}}
{{ .Date|formatDate }}{{ .Number }}{{ .CustomerName }} - - {{ .Total|formatPrice }}
+ - + + + + + + + - {{ end }} - - {{ if .Invoices }} - - - - - - - - {{ end }} -
{{( gettext "No invoices added yet." )}}{{( pgettext "All" "invoice" )}}{{( pgettext "Date" "title" )}}{{( pgettext "Invoice Num." "title" )}}{{( pgettext "Customer" "title" )}}{{( pgettext "Status" "title" )}}{{( pgettext "Download" "title" )}}{{( pgettext "Amount" "title" )}}
{{( gettext "Total" )}}{{ .TotalAmount|formatPrice }}
+ + + {{ template "results.gohtml" . }} + + + {{- else -}} +

{{( gettext "No invoices found." )}}

+ {{ end }} {{- end }} diff --git a/web/templates/admin/invoice/results.gohtml b/web/templates/admin/invoice/results.gohtml new file mode 100644 index 0000000..5de65f5 --- /dev/null +++ b/web/templates/admin/invoice/results.gohtml @@ -0,0 +1,40 @@ +{{- range $invoice := .Invoices }} + + {{ $title := .Number | printf (pgettext "Select invoice %v" "action") }} + + {{ .Date|formatDate }} + {{ .Number }} + {{ .CustomerName }} + + + + {{- $title = .Number | printf (pgettext "Download invoice %s" "action") -}} + + {{ .Total|formatPrice }} + +{{- end }} +{{ template "pagination" .Filters.Cursor | colspan 7 }}