Add reset button to filters

I want this button, as well as the submit button, to be on a row below
the filters’ input, especially for quotes and invoices, that have the
most filters and looks weird with the button wedged in.  Thus, i added
a <fieldset> around all the filters.

Closes #69
This commit is contained in:
jordi fita mas 2023-07-16 20:56:11 +02:00
parent 51c789ca13
commit 5e8bed8452
14 changed files with 411 additions and 314 deletions

View File

@ -172,6 +172,11 @@ func (form *contactFilterForm) Parse(r *http.Request) error {
return nil
}
func (form *contactFilterForm) HasValue() bool {
return form.Name.HasValue() ||
form.Tags.HasValue()
}
func mustCollectContactEntries(ctx context.Context, conn *Conn, company *Company, filters *contactFilterForm) []*ContactEntry {
args := []interface{}{company.Id}
where := []string{"contact.company_id = $1"}

View File

@ -470,6 +470,15 @@ func (form *expenseFilterForm) Parse(r *http.Request) error {
return nil
}
func (form *expenseFilterForm) HasValue() bool {
return form.Contact.HasValue() ||
form.InvoiceNumber.HasValue() ||
form.FromDate.HasValue() ||
form.ToDate.HasValue() ||
form.ExpenseStatus.HasValue() ||
form.Tags.HasValue()
}
func (form *expenseFilterForm) BuildQuery(args []interface{}) (string, []interface{}) {
var where []string
appendWhere := func(expression string, value interface{}) {

View File

@ -59,6 +59,10 @@ func (field *InputField) Value() (driver.Value, error) {
return field.Val, nil
}
func (field *InputField) HasValue() bool {
return field.Val != ""
}
func (field *InputField) FillValue(r *http.Request) {
field.Val = strings.TrimSpace(r.FormValue(field.Name))
}
@ -184,6 +188,10 @@ func (field *SelectField) Clear() {
field.Selected = []string{}
}
func (field *SelectField) HasValue() bool {
return len(field.Selected) > 0 && field.Selected[0] != ""
}
func MustGetOptions(ctx context.Context, conn *Conn, sql string, args ...interface{}) []*SelectOption {
rows, err := conn.Query(ctx, sql, args...)
if err != nil {
@ -366,6 +374,10 @@ func (field *TagsField) Value() (driver.Value, error) {
return field.Tags, nil
}
func (field *TagsField) HasValue() bool {
return len(field.Tags) > 0 && field.Tags[0] != ""
}
func (field *TagsField) Scan(value interface{}) error {
if value == nil {
return nil

View File

@ -205,6 +205,15 @@ func (form *invoiceFilterForm) Parse(r *http.Request) error {
return nil
}
func (form *invoiceFilterForm) HasValue() bool {
return form.Customer.HasValue() ||
form.InvoiceStatus.HasValue() ||
form.InvoiceNumber.HasValue() ||
form.FromDate.HasValue() ||
form.ToDate.HasValue() ||
form.Tags.HasValue()
}
func (form *invoiceFilterForm) BuildQuery(args []interface{}) (string, []interface{}) {
var where []string
appendWhere := func(expression string, value interface{}) {

View File

@ -196,6 +196,11 @@ func (form *productFilterForm) Parse(r *http.Request) error {
return nil
}
func (form *productFilterForm) HasValue() bool {
return form.Name.HasValue() ||
form.Tags.HasValue()
}
func mustCollectProductEntries(ctx context.Context, conn *Conn, company *Company, filters *productFilterForm) []*ProductEntry {
args := []interface{}{company.Id}
where := []string{"product.company_id = $1"}

View File

@ -205,6 +205,15 @@ func (form *quoteFilterForm) Parse(r *http.Request) error {
return nil
}
func (form *quoteFilterForm) HasValue() bool {
return form.Customer.HasValue() ||
form.QuoteStatus.HasValue() ||
form.QuoteNumber.HasValue() ||
form.FromDate.HasValue() ||
form.ToDate.HasValue() ||
form.Tags.HasValue()
}
func (form *quoteFilterForm) BuildQuery(args []interface{}) (string, []interface{}) {
var where []string
appendWhere := func(expression string, value interface{}) {

283
po/ca.po
View File

@ -8,7 +8,7 @@ msgid ""
msgstr ""
"Project-Id-Version: numerus\n"
"Report-Msgid-Bugs-To: jordi@tandem.blog\n"
"POT-Creation-Date: 2023-07-13 20:43+0200\n"
"POT-Creation-Date: 2023-07-16 20:50+0200\n"
"PO-Revision-Date: 2023-01-18 17:08+0100\n"
"Last-Translator: jordi fita mas <jordi@tandem.blog>\n"
"Language-Team: Catalan <ca@dodds.net>\n"
@ -59,20 +59,20 @@ msgid "All"
msgstr "Tots"
#: web/template/invoices/products.gohtml:49
#: web/template/quotes/products.gohtml:49 web/template/products/index.gohtml:40
#: web/template/quotes/products.gohtml:49 web/template/products/index.gohtml:45
msgctxt "title"
msgid "Name"
msgstr "Nom"
#: web/template/invoices/products.gohtml:50
#: web/template/invoices/view.gohtml:66 web/template/quotes/products.gohtml:50
#: web/template/quotes/view.gohtml:73 web/template/products/index.gohtml:42
#: web/template/quotes/view.gohtml:73 web/template/products/index.gohtml:47
msgctxt "title"
msgid "Price"
msgstr "Preu"
#: web/template/invoices/products.gohtml:64
#: web/template/quotes/products.gohtml:64 web/template/products/index.gohtml:83
#: web/template/quotes/products.gohtml:64 web/template/products/index.gohtml:88
msgid "No products added yet."
msgstr "No hi ha cap producte."
@ -105,14 +105,14 @@ msgstr "Subtotal"
#: web/template/invoices/view.gohtml:115 web/template/invoices/edit.gohtml:75
#: web/template/quotes/new.gohtml:74 web/template/quotes/view.gohtml:82
#: web/template/quotes/view.gohtml:122 web/template/quotes/edit.gohtml:75
#: web/template/expenses/new.gohtml:45 web/template/expenses/edit.gohtml:49
#: web/template/expenses/new.gohtml:47 web/template/expenses/edit.gohtml:49
msgctxt "title"
msgid "Total"
msgstr "Total"
#: web/template/invoices/new.gohtml:92 web/template/invoices/edit.gohtml:93
#: web/template/quotes/new.gohtml:92 web/template/quotes/edit.gohtml:93
#: web/template/expenses/new.gohtml:55 web/template/expenses/edit.gohtml:59
#: web/template/expenses/new.gohtml:57 web/template/expenses/edit.gohtml:59
msgctxt "action"
msgid "Update"
msgstr "Actualitza"
@ -120,7 +120,7 @@ msgstr "Actualitza"
#: web/template/invoices/new.gohtml:95 web/template/invoices/edit.gohtml:96
#: web/template/quotes/new.gohtml:95 web/template/quotes/edit.gohtml:96
#: web/template/contacts/new.gohtml:49 web/template/contacts/edit.gohtml:53
#: web/template/expenses/new.gohtml:58 web/template/expenses/edit.gohtml:62
#: web/template/expenses/new.gohtml:60 web/template/expenses/edit.gohtml:62
#: web/template/products/new.gohtml:30 web/template/products/edit.gohtml:36
msgctxt "action"
msgid "Save"
@ -136,100 +136,107 @@ msgctxt "action"
msgid "New invoice"
msgstr "Nova factura"
#: web/template/invoices/index.gohtml:43 web/template/dashboard.gohtml:23
#: web/template/quotes/index.gohtml:43 web/template/contacts/index.gohtml:36
#: web/template/expenses/index.gohtml:37 web/template/products/index.gohtml:34
#: web/template/invoices/index.gohtml:45 web/template/dashboard.gohtml:23
#: web/template/quotes/index.gohtml:45 web/template/contacts/index.gohtml:38
#: web/template/expenses/index.gohtml:39 web/template/products/index.gohtml:36
msgctxt "action"
msgid "Filter"
msgstr "Filtra"
#: web/template/invoices/index.gohtml:49
#: web/template/invoices/index.gohtml:48 web/template/quotes/index.gohtml:48
#: web/template/contacts/index.gohtml:41 web/template/expenses/index.gohtml:42
#: web/template/products/index.gohtml:39
msgctxt "action"
msgid "Reset"
msgstr "Restableix"
#: web/template/invoices/index.gohtml:54
msgctxt "invoice"
msgid "All"
msgstr "Totes"
#: web/template/invoices/index.gohtml:50 web/template/invoices/view.gohtml:38
#: web/template/quotes/index.gohtml:50 web/template/quotes/view.gohtml:37
#: web/template/invoices/index.gohtml:55 web/template/invoices/view.gohtml:38
#: web/template/quotes/index.gohtml:55 web/template/quotes/view.gohtml:37
msgctxt "title"
msgid "Date"
msgstr "Data"
#: web/template/invoices/index.gohtml:51
#: web/template/invoices/index.gohtml:56
msgctxt "title"
msgid "Invoice Num."
msgstr "Núm. factura"
#: web/template/invoices/index.gohtml:52 web/template/quotes/index.gohtml:52
#: web/template/invoices/index.gohtml:57 web/template/quotes/index.gohtml:57
msgctxt "title"
msgid "Customer"
msgstr "Client"
#: web/template/invoices/index.gohtml:53 web/template/quotes/index.gohtml:53
#: web/template/expenses/index.gohtml:46
#: web/template/invoices/index.gohtml:58 web/template/quotes/index.gohtml:58
#: web/template/expenses/index.gohtml:51
msgctxt "title"
msgid "Status"
msgstr "Estat"
#: web/template/invoices/index.gohtml:54 web/template/quotes/index.gohtml:54
#: web/template/contacts/index.gohtml:45 web/template/expenses/index.gohtml:47
#: web/template/products/index.gohtml:41
#: web/template/invoices/index.gohtml:59 web/template/quotes/index.gohtml:59
#: web/template/contacts/index.gohtml:50 web/template/expenses/index.gohtml:52
#: web/template/products/index.gohtml:46
msgctxt "title"
msgid "Tags"
msgstr "Etiquetes"
#: web/template/invoices/index.gohtml:55 web/template/quotes/index.gohtml:55
#: web/template/expenses/index.gohtml:48
#: web/template/invoices/index.gohtml:60 web/template/quotes/index.gohtml:60
#: web/template/expenses/index.gohtml:53
msgctxt "title"
msgid "Amount"
msgstr "Import"
#: web/template/invoices/index.gohtml:56 web/template/quotes/index.gohtml:56
#: web/template/expenses/index.gohtml:49
#: web/template/invoices/index.gohtml:61 web/template/quotes/index.gohtml:61
#: web/template/expenses/index.gohtml:54
msgctxt "title"
msgid "Download"
msgstr "Descàrrega"
#: web/template/invoices/index.gohtml:57 web/template/quotes/index.gohtml:57
#: web/template/contacts/index.gohtml:46 web/template/expenses/index.gohtml:50
#: web/template/products/index.gohtml:43
#: web/template/invoices/index.gohtml:62 web/template/quotes/index.gohtml:62
#: web/template/contacts/index.gohtml:51 web/template/expenses/index.gohtml:55
#: web/template/products/index.gohtml:48
msgctxt "title"
msgid "Actions"
msgstr "Accions"
#: web/template/invoices/index.gohtml:64
#: web/template/invoices/index.gohtml:69
msgctxt "action"
msgid "Select invoice %v"
msgstr "Selecciona factura %v"
#: web/template/invoices/index.gohtml:105
#: web/template/invoices/index.gohtml:110
msgctxt "action"
msgid "Download invoice %s"
msgstr "Descarrega factura %s"
#: web/template/invoices/index.gohtml:113
#: web/template/invoices/index.gohtml:118
msgid "Actions for invoice %s"
msgstr "Accions per la factura %s"
#: web/template/invoices/index.gohtml:121 web/template/invoices/view.gohtml:19
#: web/template/quotes/index.gohtml:120 web/template/quotes/view.gohtml:22
#: web/template/contacts/index.gohtml:77 web/template/expenses/index.gohtml:111
#: web/template/products/index.gohtml:73
#: web/template/invoices/index.gohtml:126 web/template/invoices/view.gohtml:19
#: web/template/quotes/index.gohtml:125 web/template/quotes/view.gohtml:22
#: web/template/contacts/index.gohtml:82 web/template/expenses/index.gohtml:117
#: web/template/products/index.gohtml:78
msgctxt "action"
msgid "Edit"
msgstr "Edita"
#: web/template/invoices/index.gohtml:129 web/template/invoices/view.gohtml:16
#: web/template/quotes/index.gohtml:128 web/template/quotes/view.gohtml:19
#: web/template/invoices/index.gohtml:134 web/template/invoices/view.gohtml:16
#: web/template/quotes/index.gohtml:133 web/template/quotes/view.gohtml:19
msgctxt "action"
msgid "Duplicate"
msgstr "Duplica"
#: web/template/invoices/index.gohtml:139
#: web/template/invoices/index.gohtml:144
msgid "No invoices added yet."
msgstr "No hi ha cap factura."
#: web/template/invoices/index.gohtml:146 web/template/quotes/index.gohtml:153
#: web/template/expenses/index.gohtml:128
#: web/template/invoices/index.gohtml:151 web/template/quotes/index.gohtml:158
#: web/template/expenses/index.gohtml:134
msgid "Total"
msgstr "Total"
@ -366,31 +373,31 @@ msgctxt "action"
msgid "New quotation"
msgstr "Nou pressupost"
#: web/template/quotes/index.gohtml:49
#: web/template/quotes/index.gohtml:54
msgctxt "quote"
msgid "All"
msgstr "Tots"
#: web/template/quotes/index.gohtml:51
#: web/template/quotes/index.gohtml:56
msgctxt "title"
msgid "Quotation Num."
msgstr "Núm. pressupost"
#: web/template/quotes/index.gohtml:64
#: web/template/quotes/index.gohtml:69
msgctxt "action"
msgid "Select quotation %v"
msgstr "Selecciona pressupost %v"
#: web/template/quotes/index.gohtml:112
#: web/template/quotes/index.gohtml:117
msgid "Actions for quote %s"
msgstr "Accions pel pressupost %s"
#: web/template/quotes/index.gohtml:136 web/template/quotes/view.gohtml:16
#: web/template/quotes/index.gohtml:141 web/template/quotes/view.gohtml:16
msgctxt "action"
msgid "Create invoice"
msgstr "Crea factura"
#: web/template/quotes/index.gohtml:146
#: web/template/quotes/index.gohtml:151
msgid "No quotations added yet."
msgstr "No hi ha cap pressupost."
@ -481,26 +488,26 @@ msgctxt "action"
msgid "New contact"
msgstr "Nou contacte"
#: web/template/contacts/index.gohtml:42 web/template/expenses/index.gohtml:43
#: web/template/contacts/index.gohtml:47 web/template/expenses/index.gohtml:48
msgctxt "title"
msgid "Contact"
msgstr "Contacte"
#: web/template/contacts/index.gohtml:43
#: web/template/contacts/index.gohtml:48
msgctxt "title"
msgid "Email"
msgstr "Correu-e"
#: web/template/contacts/index.gohtml:44
#: web/template/contacts/index.gohtml:49
msgctxt "title"
msgid "Phone"
msgstr "Telèfon"
#: web/template/contacts/index.gohtml:69
#: web/template/contacts/index.gohtml:74
msgid "Actions for contact %s"
msgstr "Accions pel contacte %s"
#: web/template/contacts/index.gohtml:87
#: web/template/contacts/index.gohtml:92
msgid "No contacts added yet."
msgstr "No hi ha cap contacte."
@ -567,21 +574,21 @@ msgctxt "action"
msgid "New expense"
msgstr "Nova despesa"
#: web/template/expenses/index.gohtml:44
#: web/template/expenses/index.gohtml:49
msgctxt "title"
msgid "Invoice Date"
msgstr "Data de factura"
#: web/template/expenses/index.gohtml:45
#: web/template/expenses/index.gohtml:50
msgctxt "title"
msgid "Invoice Number"
msgstr "Número de factura"
#: web/template/expenses/index.gohtml:103
#: web/template/expenses/index.gohtml:109
msgid "Actions for expense %s"
msgstr "Accions per la despesa %s"
#: web/template/expenses/index.gohtml:121
#: web/template/expenses/index.gohtml:127
msgid "No expenses added yet."
msgstr "No hi ha cap despesa."
@ -679,7 +686,7 @@ msgctxt "action"
msgid "New product"
msgstr "Nou producte"
#: web/template/products/index.gohtml:65
#: web/template/products/index.gohtml:70
msgid "Actions for product %s"
msgstr "Accions pel producte %s"
@ -688,7 +695,7 @@ msgctxt "title"
msgid "Edit Product “%s”"
msgstr "Edició del producte «%s»"
#: pkg/login.go:37 pkg/company.go:127 pkg/profile.go:40 pkg/contacts.go:262
#: pkg/login.go:37 pkg/company.go:127 pkg/profile.go:40 pkg/contacts.go:267
msgctxt "input"
msgid "Email"
msgstr "Correu-e"
@ -702,7 +709,7 @@ msgstr "Contrasenya"
msgid "Email can not be empty."
msgstr "No podeu deixar el correu-e en blanc."
#: pkg/login.go:71 pkg/company.go:284 pkg/profile.go:90 pkg/contacts.go:406
#: pkg/login.go:71 pkg/company.go:284 pkg/profile.go:90 pkg/contacts.go:411
msgid "This value is not a valid email. It should be like name@domain.com."
msgstr "Aquest valor no és un correu-e vàlid. Hauria de ser similar a nom@domini.cat."
@ -714,16 +721,16 @@ msgstr "No podeu deixar la contrasenya en blanc."
msgid "Invalid user or password."
msgstr "Nom dusuari o contrasenya incorrectes."
#: pkg/products.go:164 pkg/products.go:263 pkg/quote.go:878 pkg/invoices.go:993
#: pkg/contacts.go:140 pkg/contacts.go:248
#: pkg/products.go:164 pkg/products.go:268 pkg/quote.go:887
#: pkg/invoices.go:1002 pkg/contacts.go:140 pkg/contacts.go:253
msgctxt "input"
msgid "Name"
msgstr "Nom"
#: pkg/products.go:169 pkg/products.go:290 pkg/quote.go:174 pkg/quote.go:685
#: pkg/products.go:169 pkg/products.go:295 pkg/quote.go:174 pkg/quote.go:694
#: pkg/expenses.go:274 pkg/expenses.go:433 pkg/invoices.go:174
#: pkg/invoices.go:723 pkg/invoices.go:1295 pkg/contacts.go:145
#: pkg/contacts.go:348
#: pkg/invoices.go:732 pkg/invoices.go:1304 pkg/contacts.go:145
#: pkg/contacts.go:353
msgctxt "input"
msgid "Tags"
msgstr "Etiquetes"
@ -756,42 +763,42 @@ msgstr "Qualsevol"
msgid "Invoices must have at least one of the specified labels."
msgstr "Les factures han de tenir com a mínim una de les etiquetes."
#: pkg/products.go:269 pkg/quote.go:892 pkg/invoices.go:1007
#: pkg/products.go:274 pkg/quote.go:901 pkg/invoices.go:1016
msgctxt "input"
msgid "Description"
msgstr "Descripció"
#: pkg/products.go:274 pkg/quote.go:896 pkg/invoices.go:1011
#: pkg/products.go:279 pkg/quote.go:905 pkg/invoices.go:1020
msgctxt "input"
msgid "Price"
msgstr "Preu"
#: pkg/products.go:284 pkg/quote.go:925 pkg/expenses.go:242
#: pkg/invoices.go:1040
#: pkg/products.go:289 pkg/quote.go:934 pkg/expenses.go:242
#: pkg/invoices.go:1049
msgctxt "input"
msgid "Taxes"
msgstr "Imposts"
#: pkg/products.go:309 pkg/quote.go:974 pkg/profile.go:92 pkg/invoices.go:1089
#: pkg/contacts.go:398
#: pkg/products.go:314 pkg/quote.go:983 pkg/profile.go:92 pkg/invoices.go:1098
#: pkg/contacts.go:403
msgid "Name can not be empty."
msgstr "No podeu deixar el nom en blanc."
#: pkg/products.go:310 pkg/quote.go:975 pkg/invoices.go:1090
#: pkg/products.go:315 pkg/quote.go:984 pkg/invoices.go:1099
msgid "Price can not be empty."
msgstr "No podeu deixar el preu en blanc."
#: pkg/products.go:311 pkg/quote.go:976 pkg/invoices.go:1091
#: pkg/products.go:316 pkg/quote.go:985 pkg/invoices.go:1100
msgid "Price must be a number greater than zero."
msgstr "El preu ha de ser un número major a zero."
#: pkg/products.go:313 pkg/quote.go:984 pkg/expenses.go:310
#: pkg/invoices.go:1099
#: pkg/products.go:318 pkg/quote.go:993 pkg/expenses.go:310
#: pkg/invoices.go:1108
msgid "Selected tax is not valid."
msgstr "Heu seleccionat un impost que no és vàlid."
#: pkg/products.go:314 pkg/quote.go:985 pkg/expenses.go:311
#: pkg/invoices.go:1100
#: pkg/products.go:319 pkg/quote.go:994 pkg/expenses.go:311
#: pkg/invoices.go:1109
msgid "You can only select a tax of each class."
msgstr "Només podeu seleccionar un impost de cada classe."
@ -800,47 +807,47 @@ msgctxt "input"
msgid "Trade name"
msgstr "Nom comercial"
#: pkg/company.go:118 pkg/contacts.go:254
#: pkg/company.go:118 pkg/contacts.go:259
msgctxt "input"
msgid "Phone"
msgstr "Telèfon"
#: pkg/company.go:136 pkg/contacts.go:270
#: pkg/company.go:136 pkg/contacts.go:275
msgctxt "input"
msgid "Web"
msgstr "Web"
#: pkg/company.go:144 pkg/contacts.go:282
#: pkg/company.go:144 pkg/contacts.go:287
msgctxt "input"
msgid "Business name"
msgstr "Nom i cognoms"
#: pkg/company.go:154 pkg/contacts.go:292
#: pkg/company.go:154 pkg/contacts.go:297
msgctxt "input"
msgid "VAT number"
msgstr "DNI / NIF"
#: pkg/company.go:160 pkg/contacts.go:298
#: pkg/company.go:160 pkg/contacts.go:303
msgctxt "input"
msgid "Address"
msgstr "Adreça"
#: pkg/company.go:169 pkg/contacts.go:307
#: pkg/company.go:169 pkg/contacts.go:312
msgctxt "input"
msgid "City"
msgstr "Població"
#: pkg/company.go:175 pkg/contacts.go:313
#: pkg/company.go:175 pkg/contacts.go:318
msgctxt "input"
msgid "Province"
msgstr "Província"
#: pkg/company.go:181 pkg/contacts.go:319
#: pkg/company.go:181 pkg/contacts.go:324
msgctxt "input"
msgid "Postal code"
msgstr "Codi postal"
#: pkg/company.go:190 pkg/contacts.go:328
#: pkg/company.go:190 pkg/contacts.go:333
msgctxt "input"
msgid "Country"
msgstr "País"
@ -875,23 +882,23 @@ msgctxt "input"
msgid "Legal disclaimer"
msgstr "Nota legal"
#: pkg/company.go:271 pkg/contacts.go:380
#: pkg/company.go:271 pkg/contacts.go:385
msgid "Selected country is not valid."
msgstr "Heu seleccionat un país que no és vàlid."
#: pkg/company.go:275 pkg/contacts.go:383
#: pkg/company.go:275 pkg/contacts.go:388
msgid "Business name can not be empty."
msgstr "No podeu deixar el nom i els cognoms en blanc."
#: pkg/company.go:276 pkg/contacts.go:384
#: pkg/company.go:276 pkg/contacts.go:389
msgid "Business name must have at least two letters."
msgstr "Nom i cognoms han de tenir com a mínim dues lletres."
#: pkg/company.go:277 pkg/contacts.go:386
#: pkg/company.go:277 pkg/contacts.go:391
msgid "VAT number can not be empty."
msgstr "No podeu deixar el DNI o NIF en blanc."
#: pkg/company.go:278 pkg/contacts.go:387
#: pkg/company.go:278 pkg/contacts.go:392
msgid "This value is not a valid VAT number."
msgstr "Aquest valor no és un DNI o NIF vàlid."
@ -899,31 +906,31 @@ msgstr "Aquest valor no és un DNI o NIF vàlid."
msgid "Phone can not be empty."
msgstr "No podeu deixar el telèfon en blanc."
#: pkg/company.go:281 pkg/contacts.go:403
#: pkg/company.go:281 pkg/contacts.go:408
msgid "This value is not a valid phone number."
msgstr "Aquest valor no és un telèfon vàlid."
#: pkg/company.go:287 pkg/contacts.go:409
#: pkg/company.go:287 pkg/contacts.go:414
msgid "This value is not a valid web address. It should be like https://domain.com/."
msgstr "Aquest valor no és una adreça web vàlida. Hauria de ser similar a https://domini.cat/."
#: pkg/company.go:289 pkg/contacts.go:389
#: pkg/company.go:289 pkg/contacts.go:394
msgid "Address can not be empty."
msgstr "No podeu deixar ladreça en blanc."
#: pkg/company.go:290 pkg/contacts.go:390
#: pkg/company.go:290 pkg/contacts.go:395
msgid "City can not be empty."
msgstr "No podeu deixar la població en blanc."
#: pkg/company.go:291 pkg/contacts.go:391
#: pkg/company.go:291 pkg/contacts.go:396
msgid "Province can not be empty."
msgstr "No podeu deixar la província en blanc."
#: pkg/company.go:292 pkg/contacts.go:393
#: pkg/company.go:292 pkg/contacts.go:398
msgid "Postal code can not be empty."
msgstr "No podeu deixar el codi postal en blanc."
#: pkg/company.go:293 pkg/contacts.go:394
#: pkg/company.go:293 pkg/contacts.go:399
msgid "This value is not a valid postal code."
msgstr "Aquest valor no és un codi postal vàlid."
@ -1000,7 +1007,7 @@ msgstr "No podeu deixar el nom del mètode de pagament en blanc."
msgid "Payment instructions can not be empty."
msgstr "No podeu deixar les instruccions de pagament en blanc."
#: pkg/quote.go:147 pkg/quote.go:663 pkg/invoices.go:147 pkg/invoices.go:706
#: pkg/quote.go:147 pkg/quote.go:672 pkg/invoices.go:147 pkg/invoices.go:715
msgctxt "input"
msgid "Customer"
msgstr "Client"
@ -1009,7 +1016,7 @@ msgstr "Client"
msgid "All customers"
msgstr "Tots els clients"
#: pkg/quote.go:153 pkg/quote.go:657
#: pkg/quote.go:153 pkg/quote.go:666
msgctxt "input"
msgid "Quotation Status"
msgstr "Estat del pressupost"
@ -1041,99 +1048,99 @@ msgstr "Els pressuposts han de tenir totes les etiquetes."
msgid "Quotations must have at least one of the specified labels."
msgstr "Els pressuposts han de tenir com a mínim una de les etiquetes."
#: pkg/quote.go:605
#: pkg/quote.go:614
msgid "quotations.zip"
msgstr "pressuposts.zip"
#: pkg/quote.go:611 pkg/quote.go:1140 pkg/quote.go:1148 pkg/expenses.go:611
#: pkg/invoices.go:654 pkg/invoices.go:1270 pkg/invoices.go:1278
#: pkg/quote.go:620 pkg/quote.go:1149 pkg/quote.go:1157 pkg/expenses.go:620
#: pkg/invoices.go:663 pkg/invoices.go:1279 pkg/invoices.go:1287
msgid "Invalid action"
msgstr "Acció invàlida."
#: pkg/quote.go:664
#: pkg/quote.go:673
msgid "Select a customer to quote."
msgstr "Escolliu un client a pressupostar."
#: pkg/quote.go:669
#: pkg/quote.go:678
msgctxt "input"
msgid "Quotation Date"
msgstr "Data del pressupost"
#: pkg/quote.go:675
#: pkg/quote.go:684
msgctxt "input"
msgid "Terms and conditions"
msgstr "Condicions dacceptació"
#: pkg/quote.go:680 pkg/invoices.go:718
#: pkg/quote.go:689 pkg/invoices.go:727
msgctxt "input"
msgid "Notes"
msgstr "Notes"
#: pkg/quote.go:689 pkg/invoices.go:728
#: pkg/quote.go:698 pkg/invoices.go:737
msgctxt "input"
msgid "Payment Method"
msgstr "Mètode de pagament"
#: pkg/quote.go:690
#: pkg/quote.go:699
msgid "Select a payment method."
msgstr "Escolliu un mètode de pagament."
#: pkg/quote.go:726
#: pkg/quote.go:735
msgid "Selected quotation status is not valid."
msgstr "Heu seleccionat un estat de pressupost que no és vàlid."
#: pkg/quote.go:728 pkg/invoices.go:783
#: pkg/quote.go:737 pkg/invoices.go:792
msgid "Selected customer is not valid."
msgstr "Heu seleccionat un client que no és vàlid."
#: pkg/quote.go:730
#: pkg/quote.go:739
msgid "Quotation date can not be empty."
msgstr "No podeu deixar la data del pressupost en blanc."
#: pkg/quote.go:731
#: pkg/quote.go:740
msgid "Quotation date must be a valid date."
msgstr "La data del pressupost ha de ser vàlida."
#: pkg/quote.go:734 pkg/invoices.go:787
#: pkg/quote.go:743 pkg/invoices.go:796
msgid "Selected payment method is not valid."
msgstr "Heu seleccionat un mètode de pagament que no és vàlid."
#: pkg/quote.go:868 pkg/quote.go:873 pkg/invoices.go:983 pkg/invoices.go:988
#: pkg/quote.go:877 pkg/quote.go:882 pkg/invoices.go:992 pkg/invoices.go:997
msgctxt "input"
msgid "Id"
msgstr "Identificador"
#: pkg/quote.go:906 pkg/invoices.go:1021
#: pkg/quote.go:915 pkg/invoices.go:1030
msgctxt "input"
msgid "Quantity"
msgstr "Quantitat"
#: pkg/quote.go:915 pkg/invoices.go:1030
#: pkg/quote.go:924 pkg/invoices.go:1039
msgctxt "input"
msgid "Discount (%)"
msgstr "Descompte (%)"
#: pkg/quote.go:969
#: pkg/quote.go:978
msgid "Quotation product ID must be a number greater than zero."
msgstr "LID del producte de pressupost ha de ser un número major a zero."
#: pkg/quote.go:972 pkg/invoices.go:1087
#: pkg/quote.go:981 pkg/invoices.go:1096
msgid "Product ID must be a positive number or zero."
msgstr "LID del producte ha de ser un número positiu o zero."
#: pkg/quote.go:978 pkg/invoices.go:1093
#: pkg/quote.go:987 pkg/invoices.go:1102
msgid "Quantity can not be empty."
msgstr "No podeu deixar la quantitat en blanc."
#: pkg/quote.go:979 pkg/invoices.go:1094
#: pkg/quote.go:988 pkg/invoices.go:1103
msgid "Quantity must be a number greater than zero."
msgstr "La quantitat ha de ser un número major a zero."
#: pkg/quote.go:981 pkg/invoices.go:1096
#: pkg/quote.go:990 pkg/invoices.go:1105
msgid "Discount can not be empty."
msgstr "No podeu deixar el descompte en blanc."
#: pkg/quote.go:982 pkg/invoices.go:1097
#: pkg/quote.go:991 pkg/invoices.go:1106
msgid "Discount must be a percentage between 0 and 100."
msgstr "El descompte ha de ser un percentatge entre 0 i 100."
@ -1214,7 +1221,7 @@ msgctxt "input"
msgid "Invoice number"
msgstr "Número de factura"
#: pkg/expenses.go:236 pkg/invoices.go:712
#: pkg/expenses.go:236 pkg/invoices.go:721
msgctxt "input"
msgid "Invoice Date"
msgstr "Data de factura"
@ -1224,7 +1231,7 @@ msgctxt "input"
msgid "Amount"
msgstr "Import"
#: pkg/expenses.go:262 pkg/invoices.go:734
#: pkg/expenses.go:262 pkg/invoices.go:743
msgctxt "input"
msgid "File"
msgstr "Fitxer"
@ -1238,7 +1245,7 @@ msgstr "Estat de la despesa"
msgid "Selected contact is not valid."
msgstr "Heu seleccionat un contacte que no és vàlid."
#: pkg/expenses.go:309 pkg/invoices.go:785
#: pkg/expenses.go:309 pkg/invoices.go:794
msgid "Invoice date must be a valid date."
msgstr "La data de facturació ha de ser vàlida."
@ -1263,69 +1270,69 @@ msgctxt "input"
msgid "Invoice Number"
msgstr "Número de factura"
#: pkg/invoices.go:153 pkg/invoices.go:700
#: pkg/invoices.go:153 pkg/invoices.go:709
msgctxt "input"
msgid "Invoice Status"
msgstr "Estat de la factura"
#: pkg/invoices.go:544
#: pkg/invoices.go:553
msgid "Select a customer to bill."
msgstr "Escolliu un client a facturar."
#: pkg/invoices.go:648
#: pkg/invoices.go:657
msgid "invoices.zip"
msgstr "factures.zip"
#: pkg/invoices.go:782
#: pkg/invoices.go:791
msgid "Selected invoice status is not valid."
msgstr "Heu seleccionat un estat de factura que no és vàlid."
#: pkg/invoices.go:784
#: pkg/invoices.go:793
msgid "Invoice date can not be empty."
msgstr "No podeu deixar la data de la factura en blanc."
#: pkg/invoices.go:920
#: pkg/invoices.go:929
#, c-format
msgid "Re: quotation #%s of %s"
msgstr "Ref: pressupost núm. %s del %s"
#: pkg/invoices.go:921
#: pkg/invoices.go:930
msgctxt "to_char"
msgid "MM/DD/YYYY"
msgstr "DD/MM/YYYY"
#: pkg/invoices.go:1084
#: pkg/invoices.go:1093
msgid "Invoice product ID must be a number greater than zero."
msgstr "LID del producte de factura ha de ser un número major a zero."
#: pkg/contacts.go:278
#: pkg/contacts.go:283
msgctxt "input"
msgid "Need to input tax details"
msgstr "Necessito poder facturar aquest contacte"
#: pkg/contacts.go:338
#: pkg/contacts.go:343
msgctxt "input"
msgid "IBAN"
msgstr "IBAN"
#: pkg/contacts.go:343
#: pkg/contacts.go:348
msgctxt "bic"
msgid "BIC"
msgstr "BIC"
#: pkg/contacts.go:399
#: pkg/contacts.go:404
msgid "Name must have at least two letters."
msgstr "El nom ha de tenir com a mínim dues lletres."
#: pkg/contacts.go:412
#: pkg/contacts.go:417
msgid "This values is not a valid IBAN."
msgstr "Aquest valor no és un IBAN vàlid."
#: pkg/contacts.go:415
#: pkg/contacts.go:420
msgid "This values is not a valid BIC."
msgstr "Aquest valor no és un BIC vàlid."
#: pkg/contacts.go:529
#: pkg/contacts.go:534
msgctxt "input"
msgid "Holded Excel file"
msgstr "Fitxer Excel del Holded"

283
po/es.po
View File

@ -7,7 +7,7 @@ msgid ""
msgstr ""
"Project-Id-Version: numerus\n"
"Report-Msgid-Bugs-To: jordi@tandem.blog\n"
"POT-Creation-Date: 2023-07-13 20:43+0200\n"
"POT-Creation-Date: 2023-07-16 20:50+0200\n"
"PO-Revision-Date: 2023-01-18 17:45+0100\n"
"Last-Translator: jordi fita mas <jordi@tandem.blog>\n"
"Language-Team: Spanish <es@tp.org.es>\n"
@ -59,20 +59,20 @@ msgid "All"
msgstr "Todos"
#: web/template/invoices/products.gohtml:49
#: web/template/quotes/products.gohtml:49 web/template/products/index.gohtml:40
#: web/template/quotes/products.gohtml:49 web/template/products/index.gohtml:45
msgctxt "title"
msgid "Name"
msgstr "Nombre"
#: web/template/invoices/products.gohtml:50
#: web/template/invoices/view.gohtml:66 web/template/quotes/products.gohtml:50
#: web/template/quotes/view.gohtml:73 web/template/products/index.gohtml:42
#: web/template/quotes/view.gohtml:73 web/template/products/index.gohtml:47
msgctxt "title"
msgid "Price"
msgstr "Precio"
#: web/template/invoices/products.gohtml:64
#: web/template/quotes/products.gohtml:64 web/template/products/index.gohtml:83
#: web/template/quotes/products.gohtml:64 web/template/products/index.gohtml:88
msgid "No products added yet."
msgstr "No hay productos."
@ -105,14 +105,14 @@ msgstr "Subtotal"
#: web/template/invoices/view.gohtml:115 web/template/invoices/edit.gohtml:75
#: web/template/quotes/new.gohtml:74 web/template/quotes/view.gohtml:82
#: web/template/quotes/view.gohtml:122 web/template/quotes/edit.gohtml:75
#: web/template/expenses/new.gohtml:45 web/template/expenses/edit.gohtml:49
#: web/template/expenses/new.gohtml:47 web/template/expenses/edit.gohtml:49
msgctxt "title"
msgid "Total"
msgstr "Total"
#: web/template/invoices/new.gohtml:92 web/template/invoices/edit.gohtml:93
#: web/template/quotes/new.gohtml:92 web/template/quotes/edit.gohtml:93
#: web/template/expenses/new.gohtml:55 web/template/expenses/edit.gohtml:59
#: web/template/expenses/new.gohtml:57 web/template/expenses/edit.gohtml:59
msgctxt "action"
msgid "Update"
msgstr "Actualizar"
@ -120,7 +120,7 @@ msgstr "Actualizar"
#: web/template/invoices/new.gohtml:95 web/template/invoices/edit.gohtml:96
#: web/template/quotes/new.gohtml:95 web/template/quotes/edit.gohtml:96
#: web/template/contacts/new.gohtml:49 web/template/contacts/edit.gohtml:53
#: web/template/expenses/new.gohtml:58 web/template/expenses/edit.gohtml:62
#: web/template/expenses/new.gohtml:60 web/template/expenses/edit.gohtml:62
#: web/template/products/new.gohtml:30 web/template/products/edit.gohtml:36
msgctxt "action"
msgid "Save"
@ -136,100 +136,107 @@ msgctxt "action"
msgid "New invoice"
msgstr "Nueva factura"
#: web/template/invoices/index.gohtml:43 web/template/dashboard.gohtml:23
#: web/template/quotes/index.gohtml:43 web/template/contacts/index.gohtml:36
#: web/template/expenses/index.gohtml:37 web/template/products/index.gohtml:34
#: web/template/invoices/index.gohtml:45 web/template/dashboard.gohtml:23
#: web/template/quotes/index.gohtml:45 web/template/contacts/index.gohtml:38
#: web/template/expenses/index.gohtml:39 web/template/products/index.gohtml:36
msgctxt "action"
msgid "Filter"
msgstr "Filtrar"
#: web/template/invoices/index.gohtml:49
#: web/template/invoices/index.gohtml:48 web/template/quotes/index.gohtml:48
#: web/template/contacts/index.gohtml:41 web/template/expenses/index.gohtml:42
#: web/template/products/index.gohtml:39
msgctxt "action"
msgid "Reset"
msgstr "Restablecer"
#: web/template/invoices/index.gohtml:54
msgctxt "invoice"
msgid "All"
msgstr "Todas"
#: web/template/invoices/index.gohtml:50 web/template/invoices/view.gohtml:38
#: web/template/quotes/index.gohtml:50 web/template/quotes/view.gohtml:37
#: web/template/invoices/index.gohtml:55 web/template/invoices/view.gohtml:38
#: web/template/quotes/index.gohtml:55 web/template/quotes/view.gohtml:37
msgctxt "title"
msgid "Date"
msgstr "Fecha"
#: web/template/invoices/index.gohtml:51
#: web/template/invoices/index.gohtml:56
msgctxt "title"
msgid "Invoice Num."
msgstr "N.º factura"
#: web/template/invoices/index.gohtml:52 web/template/quotes/index.gohtml:52
#: web/template/invoices/index.gohtml:57 web/template/quotes/index.gohtml:57
msgctxt "title"
msgid "Customer"
msgstr "Cliente"
#: web/template/invoices/index.gohtml:53 web/template/quotes/index.gohtml:53
#: web/template/expenses/index.gohtml:46
#: web/template/invoices/index.gohtml:58 web/template/quotes/index.gohtml:58
#: web/template/expenses/index.gohtml:51
msgctxt "title"
msgid "Status"
msgstr "Estado"
#: web/template/invoices/index.gohtml:54 web/template/quotes/index.gohtml:54
#: web/template/contacts/index.gohtml:45 web/template/expenses/index.gohtml:47
#: web/template/products/index.gohtml:41
#: web/template/invoices/index.gohtml:59 web/template/quotes/index.gohtml:59
#: web/template/contacts/index.gohtml:50 web/template/expenses/index.gohtml:52
#: web/template/products/index.gohtml:46
msgctxt "title"
msgid "Tags"
msgstr "Etiquetes"
#: web/template/invoices/index.gohtml:55 web/template/quotes/index.gohtml:55
#: web/template/expenses/index.gohtml:48
#: web/template/invoices/index.gohtml:60 web/template/quotes/index.gohtml:60
#: web/template/expenses/index.gohtml:53
msgctxt "title"
msgid "Amount"
msgstr "Importe"
#: web/template/invoices/index.gohtml:56 web/template/quotes/index.gohtml:56
#: web/template/expenses/index.gohtml:49
#: web/template/invoices/index.gohtml:61 web/template/quotes/index.gohtml:61
#: web/template/expenses/index.gohtml:54
msgctxt "title"
msgid "Download"
msgstr "Descargar"
#: web/template/invoices/index.gohtml:57 web/template/quotes/index.gohtml:57
#: web/template/contacts/index.gohtml:46 web/template/expenses/index.gohtml:50
#: web/template/products/index.gohtml:43
#: web/template/invoices/index.gohtml:62 web/template/quotes/index.gohtml:62
#: web/template/contacts/index.gohtml:51 web/template/expenses/index.gohtml:55
#: web/template/products/index.gohtml:48
msgctxt "title"
msgid "Actions"
msgstr "Acciones"
#: web/template/invoices/index.gohtml:64
#: web/template/invoices/index.gohtml:69
msgctxt "action"
msgid "Select invoice %v"
msgstr "Seleccionar factura %v"
#: web/template/invoices/index.gohtml:105
#: web/template/invoices/index.gohtml:110
msgctxt "action"
msgid "Download invoice %s"
msgstr "Descargar factura %s"
#: web/template/invoices/index.gohtml:113
#: web/template/invoices/index.gohtml:118
msgid "Actions for invoice %s"
msgstr "Acciones para la factura %s"
#: web/template/invoices/index.gohtml:121 web/template/invoices/view.gohtml:19
#: web/template/quotes/index.gohtml:120 web/template/quotes/view.gohtml:22
#: web/template/contacts/index.gohtml:77 web/template/expenses/index.gohtml:111
#: web/template/products/index.gohtml:73
#: web/template/invoices/index.gohtml:126 web/template/invoices/view.gohtml:19
#: web/template/quotes/index.gohtml:125 web/template/quotes/view.gohtml:22
#: web/template/contacts/index.gohtml:82 web/template/expenses/index.gohtml:117
#: web/template/products/index.gohtml:78
msgctxt "action"
msgid "Edit"
msgstr "Editar"
#: web/template/invoices/index.gohtml:129 web/template/invoices/view.gohtml:16
#: web/template/quotes/index.gohtml:128 web/template/quotes/view.gohtml:19
#: web/template/invoices/index.gohtml:134 web/template/invoices/view.gohtml:16
#: web/template/quotes/index.gohtml:133 web/template/quotes/view.gohtml:19
msgctxt "action"
msgid "Duplicate"
msgstr "Duplicar"
#: web/template/invoices/index.gohtml:139
#: web/template/invoices/index.gohtml:144
msgid "No invoices added yet."
msgstr "No hay facturas."
#: web/template/invoices/index.gohtml:146 web/template/quotes/index.gohtml:153
#: web/template/expenses/index.gohtml:128
#: web/template/invoices/index.gohtml:151 web/template/quotes/index.gohtml:158
#: web/template/expenses/index.gohtml:134
msgid "Total"
msgstr "Total"
@ -366,31 +373,31 @@ msgctxt "action"
msgid "New quotation"
msgstr "Nuevo presupuesto"
#: web/template/quotes/index.gohtml:49
#: web/template/quotes/index.gohtml:54
msgctxt "quote"
msgid "All"
msgstr "Todos"
#: web/template/quotes/index.gohtml:51
#: web/template/quotes/index.gohtml:56
msgctxt "title"
msgid "Quotation Num."
msgstr "N.º de presupuesto"
#: web/template/quotes/index.gohtml:64
#: web/template/quotes/index.gohtml:69
msgctxt "action"
msgid "Select quotation %v"
msgstr "Seleccionar presupuesto %v"
#: web/template/quotes/index.gohtml:112
#: web/template/quotes/index.gohtml:117
msgid "Actions for quote %s"
msgstr "Acciones para el presupuesto %s"
#: web/template/quotes/index.gohtml:136 web/template/quotes/view.gohtml:16
#: web/template/quotes/index.gohtml:141 web/template/quotes/view.gohtml:16
msgctxt "action"
msgid "Create invoice"
msgstr "Crear factura"
#: web/template/quotes/index.gohtml:146
#: web/template/quotes/index.gohtml:151
msgid "No quotations added yet."
msgstr "No hay presupuestos."
@ -481,26 +488,26 @@ msgctxt "action"
msgid "New contact"
msgstr "Nuevo contacto"
#: web/template/contacts/index.gohtml:42 web/template/expenses/index.gohtml:43
#: web/template/contacts/index.gohtml:47 web/template/expenses/index.gohtml:48
msgctxt "title"
msgid "Contact"
msgstr "Contacto"
#: web/template/contacts/index.gohtml:43
#: web/template/contacts/index.gohtml:48
msgctxt "title"
msgid "Email"
msgstr "Correo-e"
#: web/template/contacts/index.gohtml:44
#: web/template/contacts/index.gohtml:49
msgctxt "title"
msgid "Phone"
msgstr "Teléfono"
#: web/template/contacts/index.gohtml:69
#: web/template/contacts/index.gohtml:74
msgid "Actions for contact %s"
msgstr "Acciones para el contacto %s"
#: web/template/contacts/index.gohtml:87
#: web/template/contacts/index.gohtml:92
msgid "No contacts added yet."
msgstr "No hay contactos."
@ -567,21 +574,21 @@ msgctxt "action"
msgid "New expense"
msgstr "Nuevo gasto"
#: web/template/expenses/index.gohtml:44
#: web/template/expenses/index.gohtml:49
msgctxt "title"
msgid "Invoice Date"
msgstr "Fecha de factura"
#: web/template/expenses/index.gohtml:45
#: web/template/expenses/index.gohtml:50
msgctxt "title"
msgid "Invoice Number"
msgstr "Número de factura"
#: web/template/expenses/index.gohtml:103
#: web/template/expenses/index.gohtml:109
msgid "Actions for expense %s"
msgstr "Acciones para el gasto %s"
#: web/template/expenses/index.gohtml:121
#: web/template/expenses/index.gohtml:127
msgid "No expenses added yet."
msgstr "No hay gastos."
@ -679,7 +686,7 @@ msgctxt "action"
msgid "New product"
msgstr "Nuevo producto"
#: web/template/products/index.gohtml:65
#: web/template/products/index.gohtml:70
msgid "Actions for product %s"
msgstr "Acciones para el producto %s"
@ -688,7 +695,7 @@ msgctxt "title"
msgid "Edit Product “%s”"
msgstr "Edición del producto «%s»"
#: pkg/login.go:37 pkg/company.go:127 pkg/profile.go:40 pkg/contacts.go:262
#: pkg/login.go:37 pkg/company.go:127 pkg/profile.go:40 pkg/contacts.go:267
msgctxt "input"
msgid "Email"
msgstr "Correo-e"
@ -702,7 +709,7 @@ msgstr "Contraseña"
msgid "Email can not be empty."
msgstr "No podéis dejar el correo-e en blanco."
#: pkg/login.go:71 pkg/company.go:284 pkg/profile.go:90 pkg/contacts.go:406
#: pkg/login.go:71 pkg/company.go:284 pkg/profile.go:90 pkg/contacts.go:411
msgid "This value is not a valid email. It should be like name@domain.com."
msgstr "Este valor no es un correo-e válido. Tiene que ser parecido a nombre@dominio.es."
@ -714,16 +721,16 @@ msgstr "No podéis dejar la contraseña en blanco."
msgid "Invalid user or password."
msgstr "Nombre de usuario o contraseña inválido."
#: pkg/products.go:164 pkg/products.go:263 pkg/quote.go:878 pkg/invoices.go:993
#: pkg/contacts.go:140 pkg/contacts.go:248
#: pkg/products.go:164 pkg/products.go:268 pkg/quote.go:887
#: pkg/invoices.go:1002 pkg/contacts.go:140 pkg/contacts.go:253
msgctxt "input"
msgid "Name"
msgstr "Nombre"
#: pkg/products.go:169 pkg/products.go:290 pkg/quote.go:174 pkg/quote.go:685
#: pkg/products.go:169 pkg/products.go:295 pkg/quote.go:174 pkg/quote.go:694
#: pkg/expenses.go:274 pkg/expenses.go:433 pkg/invoices.go:174
#: pkg/invoices.go:723 pkg/invoices.go:1295 pkg/contacts.go:145
#: pkg/contacts.go:348
#: pkg/invoices.go:732 pkg/invoices.go:1304 pkg/contacts.go:145
#: pkg/contacts.go:353
msgctxt "input"
msgid "Tags"
msgstr "Etiquetes"
@ -756,42 +763,42 @@ msgstr "Cualquiera"
msgid "Invoices must have at least one of the specified labels."
msgstr "Las facturas deben tener como mínimo una de las etiquetas."
#: pkg/products.go:269 pkg/quote.go:892 pkg/invoices.go:1007
#: pkg/products.go:274 pkg/quote.go:901 pkg/invoices.go:1016
msgctxt "input"
msgid "Description"
msgstr "Descripción"
#: pkg/products.go:274 pkg/quote.go:896 pkg/invoices.go:1011
#: pkg/products.go:279 pkg/quote.go:905 pkg/invoices.go:1020
msgctxt "input"
msgid "Price"
msgstr "Precio"
#: pkg/products.go:284 pkg/quote.go:925 pkg/expenses.go:242
#: pkg/invoices.go:1040
#: pkg/products.go:289 pkg/quote.go:934 pkg/expenses.go:242
#: pkg/invoices.go:1049
msgctxt "input"
msgid "Taxes"
msgstr "Impuestos"
#: pkg/products.go:309 pkg/quote.go:974 pkg/profile.go:92 pkg/invoices.go:1089
#: pkg/contacts.go:398
#: pkg/products.go:314 pkg/quote.go:983 pkg/profile.go:92 pkg/invoices.go:1098
#: pkg/contacts.go:403
msgid "Name can not be empty."
msgstr "No podéis dejar el nombre en blanco."
#: pkg/products.go:310 pkg/quote.go:975 pkg/invoices.go:1090
#: pkg/products.go:315 pkg/quote.go:984 pkg/invoices.go:1099
msgid "Price can not be empty."
msgstr "No podéis dejar el precio en blanco."
#: pkg/products.go:311 pkg/quote.go:976 pkg/invoices.go:1091
#: pkg/products.go:316 pkg/quote.go:985 pkg/invoices.go:1100
msgid "Price must be a number greater than zero."
msgstr "El precio tiene que ser un número mayor a cero."
#: pkg/products.go:313 pkg/quote.go:984 pkg/expenses.go:310
#: pkg/invoices.go:1099
#: pkg/products.go:318 pkg/quote.go:993 pkg/expenses.go:310
#: pkg/invoices.go:1108
msgid "Selected tax is not valid."
msgstr "Habéis escogido un impuesto que no es válido."
#: pkg/products.go:314 pkg/quote.go:985 pkg/expenses.go:311
#: pkg/invoices.go:1100
#: pkg/products.go:319 pkg/quote.go:994 pkg/expenses.go:311
#: pkg/invoices.go:1109
msgid "You can only select a tax of each class."
msgstr "Solo podéis escoger un impuesto de cada clase."
@ -800,47 +807,47 @@ msgctxt "input"
msgid "Trade name"
msgstr "Nombre comercial"
#: pkg/company.go:118 pkg/contacts.go:254
#: pkg/company.go:118 pkg/contacts.go:259
msgctxt "input"
msgid "Phone"
msgstr "Teléfono"
#: pkg/company.go:136 pkg/contacts.go:270
#: pkg/company.go:136 pkg/contacts.go:275
msgctxt "input"
msgid "Web"
msgstr "Web"
#: pkg/company.go:144 pkg/contacts.go:282
#: pkg/company.go:144 pkg/contacts.go:287
msgctxt "input"
msgid "Business name"
msgstr "Nombre y apellidos"
#: pkg/company.go:154 pkg/contacts.go:292
#: pkg/company.go:154 pkg/contacts.go:297
msgctxt "input"
msgid "VAT number"
msgstr "DNI / NIF"
#: pkg/company.go:160 pkg/contacts.go:298
#: pkg/company.go:160 pkg/contacts.go:303
msgctxt "input"
msgid "Address"
msgstr "Dirección"
#: pkg/company.go:169 pkg/contacts.go:307
#: pkg/company.go:169 pkg/contacts.go:312
msgctxt "input"
msgid "City"
msgstr "Población"
#: pkg/company.go:175 pkg/contacts.go:313
#: pkg/company.go:175 pkg/contacts.go:318
msgctxt "input"
msgid "Province"
msgstr "Provincia"
#: pkg/company.go:181 pkg/contacts.go:319
#: pkg/company.go:181 pkg/contacts.go:324
msgctxt "input"
msgid "Postal code"
msgstr "Código postal"
#: pkg/company.go:190 pkg/contacts.go:328
#: pkg/company.go:190 pkg/contacts.go:333
msgctxt "input"
msgid "Country"
msgstr "País"
@ -875,23 +882,23 @@ msgctxt "input"
msgid "Legal disclaimer"
msgstr "Nota legal"
#: pkg/company.go:271 pkg/contacts.go:380
#: pkg/company.go:271 pkg/contacts.go:385
msgid "Selected country is not valid."
msgstr "Habéis escogido un país que no es válido."
#: pkg/company.go:275 pkg/contacts.go:383
#: pkg/company.go:275 pkg/contacts.go:388
msgid "Business name can not be empty."
msgstr "No podéis dejar el nombre y los apellidos en blanco."
#: pkg/company.go:276 pkg/contacts.go:384
#: pkg/company.go:276 pkg/contacts.go:389
msgid "Business name must have at least two letters."
msgstr "El nombre y los apellidos deben contener como mínimo dos letras."
#: pkg/company.go:277 pkg/contacts.go:386
#: pkg/company.go:277 pkg/contacts.go:391
msgid "VAT number can not be empty."
msgstr "No podéis dejar el DNI o NIF en blanco."
#: pkg/company.go:278 pkg/contacts.go:387
#: pkg/company.go:278 pkg/contacts.go:392
msgid "This value is not a valid VAT number."
msgstr "Este valor no es un DNI o NIF válido."
@ -899,31 +906,31 @@ msgstr "Este valor no es un DNI o NIF válido."
msgid "Phone can not be empty."
msgstr "No podéis dejar el teléfono en blanco."
#: pkg/company.go:281 pkg/contacts.go:403
#: pkg/company.go:281 pkg/contacts.go:408
msgid "This value is not a valid phone number."
msgstr "Este valor no es un teléfono válido."
#: pkg/company.go:287 pkg/contacts.go:409
#: pkg/company.go:287 pkg/contacts.go:414
msgid "This value is not a valid web address. It should be like https://domain.com/."
msgstr "Este valor no es una dirección web válida. Tiene que ser parecida a https://dominio.es/."
#: pkg/company.go:289 pkg/contacts.go:389
#: pkg/company.go:289 pkg/contacts.go:394
msgid "Address can not be empty."
msgstr "No podéis dejar la dirección en blanco."
#: pkg/company.go:290 pkg/contacts.go:390
#: pkg/company.go:290 pkg/contacts.go:395
msgid "City can not be empty."
msgstr "No podéis dejar la población en blanco."
#: pkg/company.go:291 pkg/contacts.go:391
#: pkg/company.go:291 pkg/contacts.go:396
msgid "Province can not be empty."
msgstr "No podéis dejar la provincia en blanco."
#: pkg/company.go:292 pkg/contacts.go:393
#: pkg/company.go:292 pkg/contacts.go:398
msgid "Postal code can not be empty."
msgstr "No podéis dejar el código postal en blanco."
#: pkg/company.go:293 pkg/contacts.go:394
#: pkg/company.go:293 pkg/contacts.go:399
msgid "This value is not a valid postal code."
msgstr "Este valor no es un código postal válido válido."
@ -1000,7 +1007,7 @@ msgstr "No podéis dejar el nombre del método de pago en blanco."
msgid "Payment instructions can not be empty."
msgstr "No podéis dejar las instrucciones de pago en blanco."
#: pkg/quote.go:147 pkg/quote.go:663 pkg/invoices.go:147 pkg/invoices.go:706
#: pkg/quote.go:147 pkg/quote.go:672 pkg/invoices.go:147 pkg/invoices.go:715
msgctxt "input"
msgid "Customer"
msgstr "Cliente"
@ -1009,7 +1016,7 @@ msgstr "Cliente"
msgid "All customers"
msgstr "Todos los clientes"
#: pkg/quote.go:153 pkg/quote.go:657
#: pkg/quote.go:153 pkg/quote.go:666
msgctxt "input"
msgid "Quotation Status"
msgstr "Estado del presupuesto"
@ -1041,99 +1048,99 @@ msgstr "Los presupuestos deben tener todas las etiquetas."
msgid "Quotations must have at least one of the specified labels."
msgstr "Los presupuestos deben tener como mínimo una de las etiquetas."
#: pkg/quote.go:605
#: pkg/quote.go:614
msgid "quotations.zip"
msgstr "presupuestos.zip"
#: pkg/quote.go:611 pkg/quote.go:1140 pkg/quote.go:1148 pkg/expenses.go:611
#: pkg/invoices.go:654 pkg/invoices.go:1270 pkg/invoices.go:1278
#: pkg/quote.go:620 pkg/quote.go:1149 pkg/quote.go:1157 pkg/expenses.go:620
#: pkg/invoices.go:663 pkg/invoices.go:1279 pkg/invoices.go:1287
msgid "Invalid action"
msgstr "Acción inválida."
#: pkg/quote.go:664
#: pkg/quote.go:673
msgid "Select a customer to quote."
msgstr "Escoged un cliente a presupuestar."
#: pkg/quote.go:669
#: pkg/quote.go:678
msgctxt "input"
msgid "Quotation Date"
msgstr "Fecha del presupuesto"
#: pkg/quote.go:675
#: pkg/quote.go:684
msgctxt "input"
msgid "Terms and conditions"
msgstr "Condiciones de aceptación"
#: pkg/quote.go:680 pkg/invoices.go:718
#: pkg/quote.go:689 pkg/invoices.go:727
msgctxt "input"
msgid "Notes"
msgstr "Notas"
#: pkg/quote.go:689 pkg/invoices.go:728
#: pkg/quote.go:698 pkg/invoices.go:737
msgctxt "input"
msgid "Payment Method"
msgstr "Método de pago"
#: pkg/quote.go:690
#: pkg/quote.go:699
msgid "Select a payment method."
msgstr "Escoged un método e pago."
#: pkg/quote.go:726
#: pkg/quote.go:735
msgid "Selected quotation status is not valid."
msgstr "Habéis escogido un estado de presupuesto que no es válido."
#: pkg/quote.go:728 pkg/invoices.go:783
#: pkg/quote.go:737 pkg/invoices.go:792
msgid "Selected customer is not valid."
msgstr "Habéis escogido un cliente que no es válido."
#: pkg/quote.go:730
#: pkg/quote.go:739
msgid "Quotation date can not be empty."
msgstr "No podéis dejar la fecha del presupuesto en blanco."
#: pkg/quote.go:731
#: pkg/quote.go:740
msgid "Quotation date must be a valid date."
msgstr "La fecha de presupuesto debe ser válida."
#: pkg/quote.go:734 pkg/invoices.go:787
#: pkg/quote.go:743 pkg/invoices.go:796
msgid "Selected payment method is not valid."
msgstr "Habéis escogido un método de pago que no es válido."
#: pkg/quote.go:868 pkg/quote.go:873 pkg/invoices.go:983 pkg/invoices.go:988
#: pkg/quote.go:877 pkg/quote.go:882 pkg/invoices.go:992 pkg/invoices.go:997
msgctxt "input"
msgid "Id"
msgstr "Identificador"
#: pkg/quote.go:906 pkg/invoices.go:1021
#: pkg/quote.go:915 pkg/invoices.go:1030
msgctxt "input"
msgid "Quantity"
msgstr "Cantidad"
#: pkg/quote.go:915 pkg/invoices.go:1030
#: pkg/quote.go:924 pkg/invoices.go:1039
msgctxt "input"
msgid "Discount (%)"
msgstr "Descuento (%)"
#: pkg/quote.go:969
#: pkg/quote.go:978
msgid "Quotation product ID must be a number greater than zero."
msgstr "El ID de producto de presupuesto tiene que ser un número mayor a cero."
#: pkg/quote.go:972 pkg/invoices.go:1087
#: pkg/quote.go:981 pkg/invoices.go:1096
msgid "Product ID must be a positive number or zero."
msgstr "El ID de producto tiene que ser un número positivo o cero."
#: pkg/quote.go:978 pkg/invoices.go:1093
#: pkg/quote.go:987 pkg/invoices.go:1102
msgid "Quantity can not be empty."
msgstr "No podéis dejar la cantidad en blanco."
#: pkg/quote.go:979 pkg/invoices.go:1094
#: pkg/quote.go:988 pkg/invoices.go:1103
msgid "Quantity must be a number greater than zero."
msgstr "La cantidad tiene que ser un número mayor a cero."
#: pkg/quote.go:981 pkg/invoices.go:1096
#: pkg/quote.go:990 pkg/invoices.go:1105
msgid "Discount can not be empty."
msgstr "No podéis dejar el descuento en blanco."
#: pkg/quote.go:982 pkg/invoices.go:1097
#: pkg/quote.go:991 pkg/invoices.go:1106
msgid "Discount must be a percentage between 0 and 100."
msgstr "El descuento tiene que ser un porcentaje entre 0 y 100."
@ -1214,7 +1221,7 @@ msgctxt "input"
msgid "Invoice number"
msgstr "Número de factura"
#: pkg/expenses.go:236 pkg/invoices.go:712
#: pkg/expenses.go:236 pkg/invoices.go:721
msgctxt "input"
msgid "Invoice Date"
msgstr "Fecha de factura"
@ -1224,7 +1231,7 @@ msgctxt "input"
msgid "Amount"
msgstr "Importe"
#: pkg/expenses.go:262 pkg/invoices.go:734
#: pkg/expenses.go:262 pkg/invoices.go:743
msgctxt "input"
msgid "File"
msgstr "Archivo"
@ -1238,7 +1245,7 @@ msgstr "Estado del gasto"
msgid "Selected contact is not valid."
msgstr "Habéis escogido un contacto que no es válido."
#: pkg/expenses.go:309 pkg/invoices.go:785
#: pkg/expenses.go:309 pkg/invoices.go:794
msgid "Invoice date must be a valid date."
msgstr "La fecha de factura debe ser válida."
@ -1263,69 +1270,69 @@ msgctxt "input"
msgid "Invoice Number"
msgstr "Número de factura"
#: pkg/invoices.go:153 pkg/invoices.go:700
#: pkg/invoices.go:153 pkg/invoices.go:709
msgctxt "input"
msgid "Invoice Status"
msgstr "Estado de la factura"
#: pkg/invoices.go:544
#: pkg/invoices.go:553
msgid "Select a customer to bill."
msgstr "Escoged un cliente a facturar."
#: pkg/invoices.go:648
#: pkg/invoices.go:657
msgid "invoices.zip"
msgstr "facturas.zip"
#: pkg/invoices.go:782
#: pkg/invoices.go:791
msgid "Selected invoice status is not valid."
msgstr "Habéis escogido un estado de factura que no es válido."
#: pkg/invoices.go:784
#: pkg/invoices.go:793
msgid "Invoice date can not be empty."
msgstr "No podéis dejar la fecha de la factura en blanco."
#: pkg/invoices.go:920
#: pkg/invoices.go:929
#, c-format
msgid "Re: quotation #%s of %s"
msgstr "Ref: presupuesto n.º %s del %s"
#: pkg/invoices.go:921
#: pkg/invoices.go:930
msgctxt "to_char"
msgid "MM/DD/YYYY"
msgstr "DD/MM/YYYY"
#: pkg/invoices.go:1084
#: pkg/invoices.go:1093
msgid "Invoice product ID must be a number greater than zero."
msgstr "El ID de producto de factura tiene que ser un número mayor a cero."
#: pkg/contacts.go:278
#: pkg/contacts.go:283
msgctxt "input"
msgid "Need to input tax details"
msgstr "Necesito facturar este contacto"
#: pkg/contacts.go:338
#: pkg/contacts.go:343
msgctxt "input"
msgid "IBAN"
msgstr "IBAN"
#: pkg/contacts.go:343
#: pkg/contacts.go:348
msgctxt "bic"
msgid "BIC"
msgstr "BIC"
#: pkg/contacts.go:399
#: pkg/contacts.go:404
msgid "Name must have at least two letters."
msgstr "El nombre debe contener como mínimo dos letras."
#: pkg/contacts.go:412
#: pkg/contacts.go:417
msgid "This values is not a valid IBAN."
msgstr "Este valor no es un IBAN válido."
#: pkg/contacts.go:415
#: pkg/contacts.go:420
msgid "This values is not a valid BIC."
msgstr "Este valor no es un BIC válido."
#: pkg/contacts.go:529
#: pkg/contacts.go:534
msgctxt "input"
msgid "Holded Excel file"
msgstr "Archivo Excel de Holded"

View File

@ -958,8 +958,16 @@ div[x-data="snackbar"] div[role="alert"].enter.end, div[x-data="snackbar"] div[r
}
.filters-visible .filters {
display: initial;
}
.filters > fieldset {
display: flex;
gap: 1rem;
float: none;
margin: 0 0 1rem;
padding: 0;
border: none;
}
.filters-visible #filters-toggle {

View File

@ -27,14 +27,19 @@
data-hx-trigger="change,search,submit"
aria-labelledby="filters-toggle"
>
{{ with .Filters }}
{{ template "input-field" .Name }}
{{ template "tags-field" .Tags | addTagsAttr (print `data-conditions="` .TagsCondition.Name `-field"`) }}
{{ template "toggle-field" .TagsCondition }}
{{ end }}
<fieldset>
{{ with .Filters }}
{{ template "input-field" .Name }}
{{ template "tags-field" .Tags | addTagsAttr (print `data-conditions="` .TagsCondition.Name `-field"`) }}
{{ template "toggle-field" .TagsCondition }}
{{ end }}
</fieldset>
<noscript>
<button type="submit">{{( pgettext "Filter" "action" )}}</button>
</noscript>
{{ if .Filters.HasValue }}
<a href="{{ companyURI "/contacts" }}" class="button">{{( pgettext "Reset" "action" )}}</a>
{{ end }}
</form>
<table>
<thead>

View File

@ -24,18 +24,23 @@
data-hx-target="main" data-hx-boost="true" data-hx-trigger="change,search,submit"
aria-labelledby="filters-toggle"
>
{{ with .Filters }}
{{ template "select-field" .Contact }}
{{ template "select-field" .ExpenseStatus }}
{{ template "input-field" .FromDate }}
{{ template "input-field" .ToDate }}
{{ template "input-field" .InvoiceNumber }}
{{ template "tags-field" .Tags | addTagsAttr (print `data-conditions="` .TagsCondition.Name `-field"`) }}
{{ template "toggle-field" .TagsCondition }}
{{ end }}
<fieldset>
{{ with .Filters }}
{{ template "select-field" .Contact }}
{{ template "select-field" .ExpenseStatus }}
{{ template "input-field" .FromDate }}
{{ template "input-field" .ToDate }}
{{ template "input-field" .InvoiceNumber }}
{{ template "tags-field" .Tags | addTagsAttr (print `data-conditions="` .TagsCondition.Name `-field"`) }}
{{ template "toggle-field" .TagsCondition }}
{{ end }}
</fieldset>
<noscript>
<button type="submit">{{( pgettext "Filter" "action" )}}</button>
</noscript>
{{ if .Filters.HasValue }}
<a href="{{ companyURI "/expenses" }}" class="button">{{( pgettext "Reset" "action" )}}</a>
{{ end }}
</form>
<table>
<thead>
@ -60,7 +65,8 @@
<td>
<details class="expense-status menu">
<summary class="expense-status-{{ .Status }}">{{ .StatusLabel }}</summary>
<form action="{{companyURI "/expenses/"}}{{ .Slug }}" enctype="multipart/form-data" method="POST" data-hx-boost="true">
<form action="{{companyURI "/expenses/"}}{{ .Slug }}" enctype="multipart/form-data"
method="POST" data-hx-boost="true">
{{ csrfToken }}
{{ putMethod }}
<input type="hidden" name="quick" value="status">

View File

@ -30,18 +30,23 @@
data-hx-target="main" data-hx-boost="true" data-hx-trigger="change,search,submit"
aria-labelledby="filters-toggle"
>
{{ with .Filters }}
{{ template "select-field" .Customer }}
{{ template "select-field" .InvoiceStatus }}
{{ template "input-field" .FromDate }}
{{ template "input-field" .ToDate }}
{{ template "input-field" .InvoiceNumber }}
{{ template "tags-field" .Tags | addTagsAttr (print `data-conditions="` .TagsCondition.Name `-field"`) }}
{{ template "toggle-field" .TagsCondition }}
{{ end }}
<fieldset>
{{ with .Filters }}
{{ template "select-field" .Customer }}
{{ template "select-field" .InvoiceStatus }}
{{ template "input-field" .FromDate }}
{{ template "input-field" .ToDate }}
{{ template "input-field" .InvoiceNumber }}
{{ template "tags-field" .Tags | addTagsAttr (print `data-conditions="` .TagsCondition.Name `-field"`) }}
{{ template "toggle-field" .TagsCondition }}
{{ end }}
</fieldset>
<noscript>
<button type="submit">{{( pgettext "Filter" "action" )}}</button>
</noscript>
{{ if .Filters.HasValue }}
<a href="{{ companyURI "/invoices" }}" class="button">{{( pgettext "Reset" "action" )}}</a>
{{ end }}
</form>
<table id="invoice-list">
<thead>

View File

@ -25,14 +25,19 @@
data-hx-trigger="change,search,submit"
aria-labelledby="filters-toggle"
>
{{ with .Filters }}
{{ template "input-field" .Name }}
{{ template "tags-field" .Tags | addTagsAttr (print `data-conditions="` .TagsCondition.Name `-field"`) }}
{{ template "toggle-field" .TagsCondition }}
{{ end }}
<fieldset>
{{ with .Filters }}
{{ template "input-field" .Name }}
{{ template "tags-field" .Tags | addTagsAttr (print `data-conditions="` .TagsCondition.Name `-field"`) }}
{{ template "toggle-field" .TagsCondition }}
{{ end }}
</fieldset>
<noscript>
<button type="submit">{{( pgettext "Filter" "action" )}}</button>
</noscript>
{{ if .Filters.HasValue }}
<a href="{{ companyURI "/products" }}" class="button">{{( pgettext "Reset" "action" )}}</a>
{{ end }}
</form>
<table>
<thead>

View File

@ -30,18 +30,23 @@
data-hx-target="main" data-hx-boost="true" data-hx-trigger="change,search,submit"
aria-labelledby="filters-toggle"
>
{{ with .Filters }}
{{ template "select-field" .Customer }}
{{ template "select-field" .QuoteStatus }}
{{ template "input-field" .FromDate }}
{{ template "input-field" .ToDate }}
{{ template "input-field" .QuoteNumber }}
{{ template "tags-field" .Tags | addTagsAttr (print `data-conditions="` .TagsCondition.Name `-field"`) }}
{{ template "toggle-field" .TagsCondition }}
{{ end }}
<fieldset>
{{ with .Filters }}
{{ template "select-field" .Customer }}
{{ template "select-field" .QuoteStatus }}
{{ template "input-field" .FromDate }}
{{ template "input-field" .ToDate }}
{{ template "input-field" .QuoteNumber }}
{{ template "tags-field" .Tags | addTagsAttr (print `data-conditions="` .TagsCondition.Name `-field"`) }}
{{ template "toggle-field" .TagsCondition }}
{{ end }}
</fieldset>
<noscript>
<button type="submit">{{( pgettext "Filter" "action" )}}</button>
</noscript>
{{ if .Filters.HasValue }}
<a href="{{ companyURI "/quotes" }}" class="button">{{( pgettext "Reset" "action" )}}</a>
{{ end }}
</form>
<table id="quote-list">
<thead>