Compare commits

...

3 Commits

Author SHA1 Message Date
jordi fita mas 689eab3a08 Use “Save” for all submit buttons of new/edit forms
Oriol says it is easier to understand for users.
2023-05-26 13:38:04 +02:00
jordi fita mas bec1305e8a Add an empty product to blank invoice form
There is no point in creating a new invoice without products, thus we
were forcing users to always use the “Add product” button for no reason
other than it was easier for me….

I wanted to add the product inside ServeInvoice, when the slug is “new”,
but then it tried to compute the invoice total without price or quantity
and it failed.  Thus, i add that product after it has done the
computation query.
2023-05-26 13:33:49 +02:00
jordi fita mas cbe868b6d6 Remove “shadow” variables inside invoices.ServeInvoice 2023-05-26 13:30:45 +02:00
10 changed files with 241 additions and 230 deletions

View File

@ -234,14 +234,12 @@ func ServeInvoice(w http.ResponseWriter, r *http.Request, params httprouter.Para
w.WriteHeader(http.StatusOK)
mustRenderNewInvoiceForm(w, r, form)
case "product-form":
company := mustGetCompany(r)
query := r.URL.Query()
index, _ := strconv.Atoi(query.Get("index"))
conn := getConn(r)
form := newInvoiceProductForm(index, company, getLocale(r), mustGetTaxOptions(r.Context(), conn, company))
slug := query.Get("slug")
if len(slug) > 0 {
if !form.MustFillFromDatabase(r.Context(), conn, slug) {
productSlug := query.Get("slug")
if len(productSlug) > 0 {
if !form.MustFillFromDatabase(r.Context(), conn, productSlug) {
http.NotFound(w, r)
return
}
@ -415,6 +413,9 @@ func newNewInvoicePage(form *invoiceForm, r *http.Request) *newInvoicePage {
if err != nil {
panic(err)
}
if len(form.Products) == 0 {
form.Products = append(form.Products, newInvoiceProductForm(0, company, getLocale(r), mustGetTaxOptions(r.Context(), conn, company)))
}
return page
}

223
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-05-23 14:16+0200\n"
"POT-Creation-Date: 2023-05-26 13:35+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"
@ -54,127 +54,135 @@ msgid "All"
msgstr "Tots"
#: web/template/invoices/products.gohtml:49
#: web/template/products/index.gohtml:38
#: web/template/products/index.gohtml:40
msgctxt "title"
msgid "Name"
msgstr "Nom"
#: web/template/invoices/products.gohtml:50
#: web/template/invoices/view.gohtml:62 web/template/products/index.gohtml:40
#: web/template/invoices/view.gohtml:62 web/template/products/index.gohtml:42
msgctxt "title"
msgid "Price"
msgstr "Preu"
#: web/template/invoices/products.gohtml:64
#: web/template/products/index.gohtml:79
#: web/template/products/index.gohtml:82
msgid "No products added yet."
msgstr "No hi ha cap producte."
#: web/template/invoices/products.gohtml:72 web/template/invoices/new.gohtml:62
#: web/template/invoices/edit.gohtml:62
#: web/template/invoices/products.gohtml:72 web/template/invoices/new.gohtml:63
#: web/template/invoices/edit.gohtml:64
msgctxt "action"
msgid "Add products"
msgstr "Afegeix productes"
#: web/template/invoices/new.gohtml:39 web/template/invoices/view.gohtml:67
#: web/template/invoices/edit.gohtml:39
#: web/template/invoices/new.gohtml:40 web/template/invoices/view.gohtml:67
#: web/template/invoices/edit.gohtml:41
msgctxt "title"
msgid "Subtotal"
msgstr "Subtotal"
#: web/template/invoices/new.gohtml:49 web/template/invoices/view.gohtml:71
#: web/template/invoices/view.gohtml:111 web/template/invoices/edit.gohtml:49
#: web/template/invoices/new.gohtml:50 web/template/invoices/view.gohtml:71
#: web/template/invoices/view.gohtml:111 web/template/invoices/edit.gohtml:51
msgctxt "title"
msgid "Total"
msgstr "Total"
#: web/template/invoices/new.gohtml:66 web/template/invoices/edit.gohtml:66
#: web/template/invoices/new.gohtml:67 web/template/invoices/edit.gohtml:68
msgctxt "action"
msgid "Update"
msgstr "Actualitza"
#: web/template/invoices/new.gohtml:68 web/template/invoices/index.gohtml:20
#: web/template/invoices/new.gohtml:69 web/template/invoices/edit.gohtml:70
#: web/template/contacts/new.gohtml:39 web/template/contacts/edit.gohtml:43
#: web/template/expenses/new.gohtml:33 web/template/expenses/edit.gohtml:38
#: web/template/products/new.gohtml:30 web/template/products/edit.gohtml:36
msgctxt "action"
msgid "New invoice"
msgstr "Nova factura"
msgid "Save"
msgstr "Desa"
#: web/template/invoices/index.gohtml:18
#: web/template/invoices/index.gohtml:19
msgctxt "action"
msgid "Download invoices"
msgstr "Descarrega factures"
#: web/template/invoices/index.gohtml:40 web/template/dashboard.gohtml:22
#: web/template/contacts/index.gohtml:32 web/template/expenses/index.gohtml:34
#: web/template/products/index.gohtml:32
#: web/template/invoices/index.gohtml:21
msgctxt "action"
msgid "New invoice"
msgstr "Nova factura"
#: web/template/invoices/index.gohtml:43 web/template/dashboard.gohtml:23
#: web/template/contacts/index.gohtml:34 web/template/expenses/index.gohtml:36
#: web/template/products/index.gohtml:34
msgctxt "action"
msgid "Filter"
msgstr "Filtra"
#: web/template/invoices/index.gohtml:46
#: web/template/invoices/index.gohtml:49
msgctxt "invoice"
msgid "All"
msgstr "Totes"
#: web/template/invoices/index.gohtml:47 web/template/invoices/view.gohtml:34
#: web/template/invoices/index.gohtml:50 web/template/invoices/view.gohtml:34
msgctxt "title"
msgid "Date"
msgstr "Data"
#: web/template/invoices/index.gohtml:48
#: web/template/invoices/index.gohtml:51
msgctxt "title"
msgid "Invoice Num."
msgstr "Núm. factura"
#: web/template/invoices/index.gohtml:49 web/template/contacts/index.gohtml:38
#: web/template/invoices/index.gohtml:52 web/template/contacts/index.gohtml:40
msgctxt "title"
msgid "Customer"
msgstr "Client"
#: web/template/invoices/index.gohtml:50
#: web/template/invoices/index.gohtml:53
msgctxt "title"
msgid "Status"
msgstr "Estat"
#: web/template/invoices/index.gohtml:51 web/template/contacts/index.gohtml:41
#: web/template/expenses/index.gohtml:44 web/template/products/index.gohtml:39
#: web/template/invoices/index.gohtml:54 web/template/contacts/index.gohtml:43
#: web/template/expenses/index.gohtml:46 web/template/products/index.gohtml:41
msgctxt "title"
msgid "Tags"
msgstr "Etiquetes"
#: web/template/invoices/index.gohtml:52 web/template/expenses/index.gohtml:45
#: web/template/invoices/index.gohtml:55 web/template/expenses/index.gohtml:47
msgctxt "title"
msgid "Amount"
msgstr "Import"
#: web/template/invoices/index.gohtml:53 web/template/expenses/index.gohtml:46
#: web/template/invoices/index.gohtml:56 web/template/expenses/index.gohtml:48
msgctxt "title"
msgid "Download"
msgstr "Descàrrega"
#: web/template/invoices/index.gohtml:54 web/template/contacts/index.gohtml:42
#: web/template/expenses/index.gohtml:47 web/template/products/index.gohtml:41
#: web/template/invoices/index.gohtml:57 web/template/contacts/index.gohtml:44
#: web/template/expenses/index.gohtml:49 web/template/products/index.gohtml:43
msgctxt "title"
msgid "Actions"
msgstr "Accions"
#: web/template/invoices/index.gohtml:61
#: web/template/invoices/index.gohtml:64
msgctxt "action"
msgid "Select invoice %v"
msgstr "Selecciona factura %v"
#: web/template/invoices/index.gohtml:116 web/template/invoices/view.gohtml:19
#: web/template/contacts/index.gohtml:71 web/template/expenses/index.gohtml:86
#: web/template/products/index.gohtml:69
#: web/template/invoices/index.gohtml:119 web/template/invoices/view.gohtml:19
#: web/template/contacts/index.gohtml:74 web/template/expenses/index.gohtml:88
#: web/template/products/index.gohtml:72
msgctxt "action"
msgid "Edit"
msgstr "Edita"
#: web/template/invoices/index.gohtml:124 web/template/invoices/view.gohtml:16
#: web/template/invoices/index.gohtml:127 web/template/invoices/view.gohtml:16
msgctxt "action"
msgid "Duplicate"
msgstr "Duplica"
#: web/template/invoices/index.gohtml:134
#: web/template/invoices/index.gohtml:137
msgid "No invoices added yet."
msgstr "No hi ha cap factura."
@ -213,47 +221,47 @@ msgctxt "title"
msgid "Edit Invoice “%s”"
msgstr "Edició de la factura «%s»"
#: web/template/invoices/edit.gohtml:68
msgctxt "action"
msgid "Save"
msgstr "Desa"
#: web/template/form.gohtml:36
msgctxt "input"
msgid "(Max. %s)"
msgstr "(Màx. %s)"
#: web/template/form.gohtml:167
msgctxt "action"
msgid "Filters"
msgstr "Filtra"
#: web/template/dashboard.gohtml:3
msgctxt "title"
msgid "Dashboard"
msgstr "Tauler"
#: web/template/dashboard.gohtml:27
#: web/template/dashboard.gohtml:29
msgctxt "term"
msgid "Sales"
msgstr "Vendes"
#: web/template/dashboard.gohtml:31
#: web/template/dashboard.gohtml:33
msgctxt "term"
msgid "Income"
msgstr "Ingressos"
#: web/template/dashboard.gohtml:35
#: web/template/dashboard.gohtml:37
msgctxt "term"
msgid "Expenses"
msgstr "Despeses"
#: web/template/dashboard.gohtml:39
#: web/template/dashboard.gohtml:41
msgctxt "term"
msgid "VAT"
msgstr "IVA"
#: web/template/dashboard.gohtml:43
#: web/template/dashboard.gohtml:45
msgctxt "term"
msgid "IRPF"
msgstr "IRPF"
#: web/template/dashboard.gohtml:47
#: web/template/dashboard.gohtml:49
msgctxt "term"
msgid "Net Income"
msgstr "Ingressos nets"
@ -310,22 +318,22 @@ msgctxt "title"
msgid "Contacts"
msgstr "Contactes"
#: web/template/contacts/new.gohtml:36 web/template/contacts/index.gohtml:14
#: web/template/contacts/index.gohtml:15
msgctxt "action"
msgid "New contact"
msgstr "Nou contacte"
#: web/template/contacts/index.gohtml:39
#: web/template/contacts/index.gohtml:41
msgctxt "title"
msgid "Email"
msgstr "Correu-e"
#: web/template/contacts/index.gohtml:40
#: web/template/contacts/index.gohtml:42
msgctxt "title"
msgid "Phone"
msgstr "Telèfon"
#: web/template/contacts/index.gohtml:81
#: web/template/contacts/index.gohtml:84
msgid "No contacts added yet."
msgstr "No hi ha cap contacte."
@ -334,11 +342,6 @@ msgctxt "title"
msgid "Edit Contact “%s”"
msgstr "Edició del contacte «%s»"
#: web/template/contacts/edit.gohtml:41
msgctxt "action"
msgid "Update contact"
msgstr "Actualitza contacte"
#: web/template/login.gohtml:2 web/template/login.gohtml:15
msgctxt "title"
msgid "Login"
@ -387,32 +390,32 @@ msgctxt "title"
msgid "Expenses"
msgstr "Despeses"
#: web/template/expenses/new.gohtml:33 web/template/expenses/index.gohtml:15
#: web/template/expenses/index.gohtml:16
msgctxt "action"
msgid "New expense"
msgstr "Nova despesa"
#: web/template/expenses/index.gohtml:40
#: web/template/expenses/index.gohtml:42
msgctxt "expense"
msgid "All"
msgstr "Totes"
#: web/template/expenses/index.gohtml:41
#: web/template/expenses/index.gohtml:43
msgctxt "title"
msgid "Contact"
msgstr "Contacte"
#: web/template/expenses/index.gohtml:42
#: web/template/expenses/index.gohtml:44
msgctxt "title"
msgid "Invoice Date"
msgstr "Data de factura"
#: web/template/expenses/index.gohtml:43
#: web/template/expenses/index.gohtml:45
msgctxt "title"
msgid "Invoice Number"
msgstr "Número de factura"
#: web/template/expenses/index.gohtml:96
#: web/template/expenses/index.gohtml:98
msgid "No expenses added yet."
msgstr "No hi ha cap despesa."
@ -421,11 +424,6 @@ msgctxt "title"
msgid "Edit Expense “%s”"
msgstr "Edició de la despesa «%s»"
#: web/template/expenses/edit.gohtml:36
msgctxt "action"
msgid "Update expense"
msgstr "Actualitza despesa"
#: web/template/tax-details.gohtml:2 web/template/tax-details.gohtml:10
#: web/template/tax-details.gohtml:18
msgctxt "title"
@ -506,25 +504,20 @@ msgctxt "title"
msgid "Products"
msgstr "Productes"
#: web/template/products/new.gohtml:30 web/template/products/index.gohtml:14
msgctxt "action"
msgid "New product"
msgstr "Nou producte"
#: web/template/products/search.gohtml:12
msgid "No products found."
msgstr "No sha trobat cap producte."
#: web/template/products/index.gohtml:15
msgctxt "action"
msgid "New product"
msgstr "Nou producte"
#: web/template/products/edit.gohtml:3 web/template/products/edit.gohtml:20
msgctxt "title"
msgid "Edit Product “%s”"
msgstr "Edició del producte «%s»"
#: web/template/products/edit.gohtml:34
msgctxt "action"
msgid "Update product"
msgstr "Actualitza producte"
#: pkg/login.go:36 pkg/profile.go:40 pkg/contacts.go:268
msgctxt "input"
msgid "Email"
@ -551,15 +544,15 @@ 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/invoices.go:776
#: pkg/products.go:164 pkg/products.go:263 pkg/invoices.go:777
#: pkg/contacts.go:135
msgctxt "input"
msgid "Name"
msgstr "Nom"
#: pkg/products.go:169 pkg/products.go:290 pkg/expenses.go:202
#: pkg/expenses.go:361 pkg/invoices.go:187 pkg/invoices.go:597
#: pkg/invoices.go:1047 pkg/contacts.go:140 pkg/contacts.go:325
#: pkg/expenses.go:361 pkg/invoices.go:187 pkg/invoices.go:598
#: pkg/invoices.go:1048 pkg/contacts.go:140 pkg/contacts.go:325
msgctxt "input"
msgid "Tags"
msgstr "Etiquetes"
@ -592,40 +585,40 @@ 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/invoices.go:790
#: pkg/products.go:269 pkg/invoices.go:791
msgctxt "input"
msgid "Description"
msgstr "Descripció"
#: pkg/products.go:274 pkg/invoices.go:794
#: pkg/products.go:274 pkg/invoices.go:795
msgctxt "input"
msgid "Price"
msgstr "Preu"
#: pkg/products.go:284 pkg/expenses.go:181 pkg/invoices.go:823
#: pkg/products.go:284 pkg/expenses.go:181 pkg/invoices.go:824
msgctxt "input"
msgid "Taxes"
msgstr "Imposts"
#: pkg/products.go:309 pkg/profile.go:92 pkg/invoices.go:870
#: pkg/products.go:309 pkg/profile.go:92 pkg/invoices.go:871
msgid "Name can not be empty."
msgstr "No podeu deixar el nom en blanc."
#: pkg/products.go:310 pkg/invoices.go:871
#: pkg/products.go:310 pkg/invoices.go:872
msgid "Price can not be empty."
msgstr "No podeu deixar el preu en blanc."
#: pkg/products.go:311 pkg/invoices.go:872
#: pkg/products.go:311 pkg/invoices.go:873
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/expenses.go:227 pkg/expenses.go:232
#: pkg/invoices.go:880
#: pkg/invoices.go:881
msgid "Selected tax is not valid."
msgstr "Heu seleccionat un impost que no és vàlid."
#: pkg/products.go:314 pkg/expenses.go:228 pkg/expenses.go:233
#: pkg/invoices.go:881
#: pkg/invoices.go:882
msgid "You can only select a tax of each class."
msgstr "Només podeu seleccionar un impost de cada classe."
@ -782,7 +775,7 @@ msgctxt "input"
msgid "Invoice number"
msgstr "Número de factura"
#: pkg/expenses.go:175 pkg/invoices.go:586
#: pkg/expenses.go:175 pkg/invoices.go:587
msgctxt "input"
msgid "Invoice Date"
msgstr "Data de factura"
@ -801,7 +794,7 @@ msgstr "Fitxer"
msgid "Selected contact is not valid."
msgstr "Heu seleccionat un contacte que no és vàlid."
#: pkg/expenses.go:226 pkg/invoices.go:641
#: pkg/expenses.go:226 pkg/invoices.go:642
msgid "Invoice date must be a valid date."
msgstr "La data de facturació ha de ser vàlida."
@ -813,7 +806,7 @@ msgstr "No podeu deixar limport en blanc."
msgid "Amount must be a number greater than zero."
msgstr "Limport ha de ser un número major a zero."
#: pkg/expenses.go:340 pkg/invoices.go:160 pkg/invoices.go:580
#: pkg/expenses.go:340 pkg/invoices.go:160 pkg/invoices.go:581
msgctxt "input"
msgid "Customer"
msgstr "Client"
@ -837,7 +830,7 @@ msgctxt "input"
msgid "To Date"
msgstr "Fins la data"
#: pkg/invoices.go:166 pkg/invoices.go:574
#: pkg/invoices.go:166 pkg/invoices.go:575
msgctxt "input"
msgid "Invoice Status"
msgstr "Estat de la factura"
@ -846,80 +839,80 @@ msgstr "Estat de la factura"
msgid "All status"
msgstr "Tots els estats"
#: pkg/invoices.go:423
#: pkg/invoices.go:424
msgid "Select a customer to bill."
msgstr "Escolliu un client a facturar."
#: pkg/invoices.go:524
#: pkg/invoices.go:525
msgid "invoices.zip"
msgstr "factures.zip"
#: pkg/invoices.go:530 pkg/invoices.go:1031
#: pkg/invoices.go:531 pkg/invoices.go:1032
msgid "Invalid action"
msgstr "Acció invàlida."
#: pkg/invoices.go:592
#: pkg/invoices.go:593
msgctxt "input"
msgid "Notes"
msgstr "Notes"
#: pkg/invoices.go:602
#: pkg/invoices.go:603
msgctxt "input"
msgid "Payment Method"
msgstr "Mètode de pagament"
#: pkg/invoices.go:638
#: pkg/invoices.go:639
msgid "Selected invoice status is not valid."
msgstr "Heu seleccionat un estat de factura que no és vàlid."
#: pkg/invoices.go:639
#: pkg/invoices.go:640
msgid "Selected customer is not valid."
msgstr "Heu seleccionat un client que no és vàlid."
#: pkg/invoices.go:640
#: pkg/invoices.go:641
msgid "Invoice date can not be empty."
msgstr "No podeu deixar la data de la factura en blanc."
#: pkg/invoices.go:643
#: pkg/invoices.go:644
msgid "Selected payment method is not valid."
msgstr "Heu seleccionat un mètode de pagament que no és vàlid."
#: pkg/invoices.go:766 pkg/invoices.go:771
#: pkg/invoices.go:767 pkg/invoices.go:772
msgctxt "input"
msgid "Id"
msgstr "Identificador"
#: pkg/invoices.go:804
#: pkg/invoices.go:805
msgctxt "input"
msgid "Quantity"
msgstr "Quantitat"
#: pkg/invoices.go:813
#: pkg/invoices.go:814
msgctxt "input"
msgid "Discount (%)"
msgstr "Descompte (%)"
#: pkg/invoices.go:865
#: pkg/invoices.go:866
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/invoices.go:868
#: pkg/invoices.go:869
msgid "Product ID must be a positive number or zero."
msgstr "LID del producte ha de ser un número positiu o zero."
#: pkg/invoices.go:874
#: pkg/invoices.go:875
msgid "Quantity can not be empty."
msgstr "No podeu deixar la quantitat en blanc."
#: pkg/invoices.go:875
#: pkg/invoices.go:876
msgid "Quantity must be a number greater than zero."
msgstr "La quantitat ha de ser un número major a zero."
#: pkg/invoices.go:877
#: pkg/invoices.go:878
msgid "Discount can not be empty."
msgstr "No podeu deixar el descompte en blanc."
#: pkg/invoices.go:878
#: pkg/invoices.go:879
msgid "Discount must be a percentage between 0 and 100."
msgstr "El descompte ha de ser un percentatge entre 0 i 100."
@ -1025,6 +1018,18 @@ msgstr "No podeu deixar el codi postal en blanc."
msgid "This value is not a valid postal code."
msgstr "Aquest valor no és un codi postal vàlid."
#~ msgctxt "action"
#~ msgid "Update contact"
#~ msgstr "Actualitza contacte"
#~ msgctxt "action"
#~ msgid "Update expense"
#~ msgstr "Actualitza despesa"
#~ msgctxt "action"
#~ msgid "Update product"
#~ msgstr "Actualitza producte"
#~ msgctxt "action"
#~ msgid "Edit invoice"
#~ msgstr "Edita factura"

223
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-05-23 14:16+0200\n"
"POT-Creation-Date: 2023-05-26 13:35+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"
@ -54,127 +54,135 @@ msgid "All"
msgstr "Todos"
#: web/template/invoices/products.gohtml:49
#: web/template/products/index.gohtml:38
#: web/template/products/index.gohtml:40
msgctxt "title"
msgid "Name"
msgstr "Nombre"
#: web/template/invoices/products.gohtml:50
#: web/template/invoices/view.gohtml:62 web/template/products/index.gohtml:40
#: web/template/invoices/view.gohtml:62 web/template/products/index.gohtml:42
msgctxt "title"
msgid "Price"
msgstr "Precio"
#: web/template/invoices/products.gohtml:64
#: web/template/products/index.gohtml:79
#: web/template/products/index.gohtml:82
msgid "No products added yet."
msgstr "No hay productos."
#: web/template/invoices/products.gohtml:72 web/template/invoices/new.gohtml:62
#: web/template/invoices/edit.gohtml:62
#: web/template/invoices/products.gohtml:72 web/template/invoices/new.gohtml:63
#: web/template/invoices/edit.gohtml:64
msgctxt "action"
msgid "Add products"
msgstr "Añadir productos"
#: web/template/invoices/new.gohtml:39 web/template/invoices/view.gohtml:67
#: web/template/invoices/edit.gohtml:39
#: web/template/invoices/new.gohtml:40 web/template/invoices/view.gohtml:67
#: web/template/invoices/edit.gohtml:41
msgctxt "title"
msgid "Subtotal"
msgstr "Subtotal"
#: web/template/invoices/new.gohtml:49 web/template/invoices/view.gohtml:71
#: web/template/invoices/view.gohtml:111 web/template/invoices/edit.gohtml:49
#: web/template/invoices/new.gohtml:50 web/template/invoices/view.gohtml:71
#: web/template/invoices/view.gohtml:111 web/template/invoices/edit.gohtml:51
msgctxt "title"
msgid "Total"
msgstr "Total"
#: web/template/invoices/new.gohtml:66 web/template/invoices/edit.gohtml:66
#: web/template/invoices/new.gohtml:67 web/template/invoices/edit.gohtml:68
msgctxt "action"
msgid "Update"
msgstr "Actualizar"
#: web/template/invoices/new.gohtml:68 web/template/invoices/index.gohtml:20
#: web/template/invoices/new.gohtml:69 web/template/invoices/edit.gohtml:70
#: web/template/contacts/new.gohtml:39 web/template/contacts/edit.gohtml:43
#: web/template/expenses/new.gohtml:33 web/template/expenses/edit.gohtml:38
#: web/template/products/new.gohtml:30 web/template/products/edit.gohtml:36
msgctxt "action"
msgid "New invoice"
msgstr "Nueva factura"
msgid "Save"
msgstr "Guardad"
#: web/template/invoices/index.gohtml:18
#: web/template/invoices/index.gohtml:19
msgctxt "action"
msgid "Download invoices"
msgstr "Descargar facturas"
#: web/template/invoices/index.gohtml:40 web/template/dashboard.gohtml:22
#: web/template/contacts/index.gohtml:32 web/template/expenses/index.gohtml:34
#: web/template/products/index.gohtml:32
#: web/template/invoices/index.gohtml:21
msgctxt "action"
msgid "New invoice"
msgstr "Nueva factura"
#: web/template/invoices/index.gohtml:43 web/template/dashboard.gohtml:23
#: web/template/contacts/index.gohtml:34 web/template/expenses/index.gohtml:36
#: web/template/products/index.gohtml:34
msgctxt "action"
msgid "Filter"
msgstr "Filtrar"
#: web/template/invoices/index.gohtml:46
#: web/template/invoices/index.gohtml:49
msgctxt "invoice"
msgid "All"
msgstr "Todas"
#: web/template/invoices/index.gohtml:47 web/template/invoices/view.gohtml:34
#: web/template/invoices/index.gohtml:50 web/template/invoices/view.gohtml:34
msgctxt "title"
msgid "Date"
msgstr "Fecha"
#: web/template/invoices/index.gohtml:48
#: web/template/invoices/index.gohtml:51
msgctxt "title"
msgid "Invoice Num."
msgstr "Nº factura"
#: web/template/invoices/index.gohtml:49 web/template/contacts/index.gohtml:38
#: web/template/invoices/index.gohtml:52 web/template/contacts/index.gohtml:40
msgctxt "title"
msgid "Customer"
msgstr "Cliente"
#: web/template/invoices/index.gohtml:50
#: web/template/invoices/index.gohtml:53
msgctxt "title"
msgid "Status"
msgstr "Estado"
#: web/template/invoices/index.gohtml:51 web/template/contacts/index.gohtml:41
#: web/template/expenses/index.gohtml:44 web/template/products/index.gohtml:39
#: web/template/invoices/index.gohtml:54 web/template/contacts/index.gohtml:43
#: web/template/expenses/index.gohtml:46 web/template/products/index.gohtml:41
msgctxt "title"
msgid "Tags"
msgstr "Etiquetes"
#: web/template/invoices/index.gohtml:52 web/template/expenses/index.gohtml:45
#: web/template/invoices/index.gohtml:55 web/template/expenses/index.gohtml:47
msgctxt "title"
msgid "Amount"
msgstr "Importe"
#: web/template/invoices/index.gohtml:53 web/template/expenses/index.gohtml:46
#: web/template/invoices/index.gohtml:56 web/template/expenses/index.gohtml:48
msgctxt "title"
msgid "Download"
msgstr "Descargar"
#: web/template/invoices/index.gohtml:54 web/template/contacts/index.gohtml:42
#: web/template/expenses/index.gohtml:47 web/template/products/index.gohtml:41
#: web/template/invoices/index.gohtml:57 web/template/contacts/index.gohtml:44
#: web/template/expenses/index.gohtml:49 web/template/products/index.gohtml:43
msgctxt "title"
msgid "Actions"
msgstr "Acciones"
#: web/template/invoices/index.gohtml:61
#: web/template/invoices/index.gohtml:64
msgctxt "action"
msgid "Select invoice %v"
msgstr "Seleccionar factura %v"
#: web/template/invoices/index.gohtml:116 web/template/invoices/view.gohtml:19
#: web/template/contacts/index.gohtml:71 web/template/expenses/index.gohtml:86
#: web/template/products/index.gohtml:69
#: web/template/invoices/index.gohtml:119 web/template/invoices/view.gohtml:19
#: web/template/contacts/index.gohtml:74 web/template/expenses/index.gohtml:88
#: web/template/products/index.gohtml:72
msgctxt "action"
msgid "Edit"
msgstr "Editar"
#: web/template/invoices/index.gohtml:124 web/template/invoices/view.gohtml:16
#: web/template/invoices/index.gohtml:127 web/template/invoices/view.gohtml:16
msgctxt "action"
msgid "Duplicate"
msgstr "Duplicar"
#: web/template/invoices/index.gohtml:134
#: web/template/invoices/index.gohtml:137
msgid "No invoices added yet."
msgstr "No hay facturas."
@ -213,47 +221,47 @@ msgctxt "title"
msgid "Edit Invoice “%s”"
msgstr "Edición de la factura «%s»"
#: web/template/invoices/edit.gohtml:68
msgctxt "action"
msgid "Save"
msgstr "Guardad"
#: web/template/form.gohtml:36
msgctxt "input"
msgid "(Max. %s)"
msgstr "(Máx. %s)"
#: web/template/form.gohtml:167
msgctxt "action"
msgid "Filters"
msgstr "Filtrar"
#: web/template/dashboard.gohtml:3
msgctxt "title"
msgid "Dashboard"
msgstr "Panel"
#: web/template/dashboard.gohtml:27
#: web/template/dashboard.gohtml:29
msgctxt "term"
msgid "Sales"
msgstr "Ventas"
#: web/template/dashboard.gohtml:31
#: web/template/dashboard.gohtml:33
msgctxt "term"
msgid "Income"
msgstr "Ingresos"
#: web/template/dashboard.gohtml:35
#: web/template/dashboard.gohtml:37
msgctxt "term"
msgid "Expenses"
msgstr "Gastos"
#: web/template/dashboard.gohtml:39
#: web/template/dashboard.gohtml:41
msgctxt "term"
msgid "VAT"
msgstr "IVA"
#: web/template/dashboard.gohtml:43
#: web/template/dashboard.gohtml:45
msgctxt "term"
msgid "IRPF"
msgstr "IRPF"
#: web/template/dashboard.gohtml:47
#: web/template/dashboard.gohtml:49
msgctxt "term"
msgid "Net Income"
msgstr "Ingresos netos"
@ -310,22 +318,22 @@ msgctxt "title"
msgid "Contacts"
msgstr "Contactos"
#: web/template/contacts/new.gohtml:36 web/template/contacts/index.gohtml:14
#: web/template/contacts/index.gohtml:15
msgctxt "action"
msgid "New contact"
msgstr "Nuevo contacto"
#: web/template/contacts/index.gohtml:39
#: web/template/contacts/index.gohtml:41
msgctxt "title"
msgid "Email"
msgstr "Correo-e"
#: web/template/contacts/index.gohtml:40
#: web/template/contacts/index.gohtml:42
msgctxt "title"
msgid "Phone"
msgstr "Teléfono"
#: web/template/contacts/index.gohtml:81
#: web/template/contacts/index.gohtml:84
msgid "No contacts added yet."
msgstr "No hay contactos."
@ -334,11 +342,6 @@ msgctxt "title"
msgid "Edit Contact “%s”"
msgstr "Edición del contacto «%s»"
#: web/template/contacts/edit.gohtml:41
msgctxt "action"
msgid "Update contact"
msgstr "Actualizar contacto"
#: web/template/login.gohtml:2 web/template/login.gohtml:15
msgctxt "title"
msgid "Login"
@ -387,32 +390,32 @@ msgctxt "title"
msgid "Expenses"
msgstr "Gastos"
#: web/template/expenses/new.gohtml:33 web/template/expenses/index.gohtml:15
#: web/template/expenses/index.gohtml:16
msgctxt "action"
msgid "New expense"
msgstr "Nuevo gasto"
#: web/template/expenses/index.gohtml:40
#: web/template/expenses/index.gohtml:42
msgctxt "expense"
msgid "All"
msgstr "Todos"
#: web/template/expenses/index.gohtml:41
#: web/template/expenses/index.gohtml:43
msgctxt "title"
msgid "Contact"
msgstr "Contacto"
#: web/template/expenses/index.gohtml:42
#: web/template/expenses/index.gohtml:44
msgctxt "title"
msgid "Invoice Date"
msgstr "Fecha de factura"
#: web/template/expenses/index.gohtml:43
#: web/template/expenses/index.gohtml:45
msgctxt "title"
msgid "Invoice Number"
msgstr "Número de factura"
#: web/template/expenses/index.gohtml:96
#: web/template/expenses/index.gohtml:98
msgid "No expenses added yet."
msgstr "No hay gastos."
@ -421,11 +424,6 @@ msgctxt "title"
msgid "Edit Expense “%s”"
msgstr "Edición del gasto «%s»"
#: web/template/expenses/edit.gohtml:36
msgctxt "action"
msgid "Update expense"
msgstr "Actualizar gasto"
#: web/template/tax-details.gohtml:2 web/template/tax-details.gohtml:10
#: web/template/tax-details.gohtml:18
msgctxt "title"
@ -506,25 +504,20 @@ msgctxt "title"
msgid "Products"
msgstr "Productos"
#: web/template/products/new.gohtml:30 web/template/products/index.gohtml:14
msgctxt "action"
msgid "New product"
msgstr "Nuevo producto"
#: web/template/products/search.gohtml:12
msgid "No products found."
msgstr "No se ha encontrado ningún producto."
#: web/template/products/index.gohtml:15
msgctxt "action"
msgid "New product"
msgstr "Nuevo producto"
#: web/template/products/edit.gohtml:3 web/template/products/edit.gohtml:20
msgctxt "title"
msgid "Edit Product “%s”"
msgstr "Edición del producto «%s»"
#: web/template/products/edit.gohtml:34
msgctxt "action"
msgid "Update product"
msgstr "Actualizar producto"
#: pkg/login.go:36 pkg/profile.go:40 pkg/contacts.go:268
msgctxt "input"
msgid "Email"
@ -551,15 +544,15 @@ 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/invoices.go:776
#: pkg/products.go:164 pkg/products.go:263 pkg/invoices.go:777
#: pkg/contacts.go:135
msgctxt "input"
msgid "Name"
msgstr "Nombre"
#: pkg/products.go:169 pkg/products.go:290 pkg/expenses.go:202
#: pkg/expenses.go:361 pkg/invoices.go:187 pkg/invoices.go:597
#: pkg/invoices.go:1047 pkg/contacts.go:140 pkg/contacts.go:325
#: pkg/expenses.go:361 pkg/invoices.go:187 pkg/invoices.go:598
#: pkg/invoices.go:1048 pkg/contacts.go:140 pkg/contacts.go:325
msgctxt "input"
msgid "Tags"
msgstr "Etiquetes"
@ -592,40 +585,40 @@ msgstr "Cualquiera"
msgid "Invoices must have at least one of the specified labels."
msgstr "Las facturas debent tener como mínimo una de las etiquetas."
#: pkg/products.go:269 pkg/invoices.go:790
#: pkg/products.go:269 pkg/invoices.go:791
msgctxt "input"
msgid "Description"
msgstr "Descripción"
#: pkg/products.go:274 pkg/invoices.go:794
#: pkg/products.go:274 pkg/invoices.go:795
msgctxt "input"
msgid "Price"
msgstr "Precio"
#: pkg/products.go:284 pkg/expenses.go:181 pkg/invoices.go:823
#: pkg/products.go:284 pkg/expenses.go:181 pkg/invoices.go:824
msgctxt "input"
msgid "Taxes"
msgstr "Impuestos"
#: pkg/products.go:309 pkg/profile.go:92 pkg/invoices.go:870
#: pkg/products.go:309 pkg/profile.go:92 pkg/invoices.go:871
msgid "Name can not be empty."
msgstr "No podéis dejar el nombre en blanco."
#: pkg/products.go:310 pkg/invoices.go:871
#: pkg/products.go:310 pkg/invoices.go:872
msgid "Price can not be empty."
msgstr "No podéis dejar el precio en blanco."
#: pkg/products.go:311 pkg/invoices.go:872
#: pkg/products.go:311 pkg/invoices.go:873
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/expenses.go:227 pkg/expenses.go:232
#: pkg/invoices.go:880
#: pkg/invoices.go:881
msgid "Selected tax is not valid."
msgstr "Habéis escogido un impuesto que no es válido."
#: pkg/products.go:314 pkg/expenses.go:228 pkg/expenses.go:233
#: pkg/invoices.go:881
#: pkg/invoices.go:882
msgid "You can only select a tax of each class."
msgstr "Solo podéis escoger un impuesto de cada clase."
@ -782,7 +775,7 @@ msgctxt "input"
msgid "Invoice number"
msgstr "Número de factura"
#: pkg/expenses.go:175 pkg/invoices.go:586
#: pkg/expenses.go:175 pkg/invoices.go:587
msgctxt "input"
msgid "Invoice Date"
msgstr "Fecha de factura"
@ -801,7 +794,7 @@ msgstr "Archivo"
msgid "Selected contact is not valid."
msgstr "Habéis escogido un contacto que no es válido."
#: pkg/expenses.go:226 pkg/invoices.go:641
#: pkg/expenses.go:226 pkg/invoices.go:642
msgid "Invoice date must be a valid date."
msgstr "La fecha de factura debe ser válida."
@ -813,7 +806,7 @@ msgstr "No podéis dejar el importe en blanco."
msgid "Amount must be a number greater than zero."
msgstr "El importe tiene que ser un número mayor a cero."
#: pkg/expenses.go:340 pkg/invoices.go:160 pkg/invoices.go:580
#: pkg/expenses.go:340 pkg/invoices.go:160 pkg/invoices.go:581
msgctxt "input"
msgid "Customer"
msgstr "Cliente"
@ -837,7 +830,7 @@ msgctxt "input"
msgid "To Date"
msgstr "Hasta la fecha"
#: pkg/invoices.go:166 pkg/invoices.go:574
#: pkg/invoices.go:166 pkg/invoices.go:575
msgctxt "input"
msgid "Invoice Status"
msgstr "Estado de la factura"
@ -846,80 +839,80 @@ msgstr "Estado de la factura"
msgid "All status"
msgstr "Todos los estados"
#: pkg/invoices.go:423
#: pkg/invoices.go:424
msgid "Select a customer to bill."
msgstr "Escoged un cliente a facturar."
#: pkg/invoices.go:524
#: pkg/invoices.go:525
msgid "invoices.zip"
msgstr "facturas.zip"
#: pkg/invoices.go:530 pkg/invoices.go:1031
#: pkg/invoices.go:531 pkg/invoices.go:1032
msgid "Invalid action"
msgstr "Acción inválida."
#: pkg/invoices.go:592
#: pkg/invoices.go:593
msgctxt "input"
msgid "Notes"
msgstr "Notas"
#: pkg/invoices.go:602
#: pkg/invoices.go:603
msgctxt "input"
msgid "Payment Method"
msgstr "Método de pago"
#: pkg/invoices.go:638
#: pkg/invoices.go:639
msgid "Selected invoice status is not valid."
msgstr "Habéis escogido un estado de factura que no es válido."
#: pkg/invoices.go:639
#: pkg/invoices.go:640
msgid "Selected customer is not valid."
msgstr "Habéis escogido un cliente que no es válido."
#: pkg/invoices.go:640
#: pkg/invoices.go:641
msgid "Invoice date can not be empty."
msgstr "No podéis dejar la fecha de la factura en blanco."
#: pkg/invoices.go:643
#: pkg/invoices.go:644
msgid "Selected payment method is not valid."
msgstr "Habéis escogido un método de pago que no es válido."
#: pkg/invoices.go:766 pkg/invoices.go:771
#: pkg/invoices.go:767 pkg/invoices.go:772
msgctxt "input"
msgid "Id"
msgstr "Identificador"
#: pkg/invoices.go:804
#: pkg/invoices.go:805
msgctxt "input"
msgid "Quantity"
msgstr "Cantidad"
#: pkg/invoices.go:813
#: pkg/invoices.go:814
msgctxt "input"
msgid "Discount (%)"
msgstr "Descuento (%)"
#: pkg/invoices.go:865
#: pkg/invoices.go:866
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/invoices.go:868
#: pkg/invoices.go:869
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/invoices.go:874
#: pkg/invoices.go:875
msgid "Quantity can not be empty."
msgstr "No podéis dejar la cantidad en blanco."
#: pkg/invoices.go:875
#: pkg/invoices.go:876
msgid "Quantity must be a number greater than zero."
msgstr "La cantidad tiene que ser un número mayor a cero."
#: pkg/invoices.go:877
#: pkg/invoices.go:878
msgid "Discount can not be empty."
msgstr "No podéis dejar el descuento en blanco."
#: pkg/invoices.go:878
#: pkg/invoices.go:879
msgid "Discount must be a percentage between 0 and 100."
msgstr "El descuento tiene que ser un porcentaje entre 0 y 100."
@ -1025,6 +1018,18 @@ msgstr "No podéis dejar el código postal en blanco."
msgid "This value is not a valid postal code."
msgstr "Este valor no es un código postal válido válido."
#~ msgctxt "action"
#~ msgid "Update contact"
#~ msgstr "Actualizar contacto"
#~ msgctxt "action"
#~ msgid "Update expense"
#~ msgstr "Actualizar gasto"
#~ msgctxt "action"
#~ msgid "Update product"
#~ msgstr "Actualizar producto"
#~ msgctxt "action"
#~ msgid "Edit invoice"
#~ msgstr "Editar factura"

View File

@ -40,7 +40,7 @@
{{ end }}
<fieldset>
<button class="primary" type="submit">{{( pgettext "Update contact" "action" )}}</button>
<button class="primary" type="submit">{{( pgettext "Save" "action" )}}</button>
</fieldset>
</form>
</section>

View File

@ -36,7 +36,7 @@
</div>
<fieldset>
<button class="primary" type="submit">{{( pgettext "New contact" "action" )}}</button>
<button class="primary" type="submit">{{( pgettext "Save" "action" )}}</button>
</fieldset>
</form>

View File

@ -35,7 +35,7 @@
{{- end }}
<fieldset>
<button class="primary" type="submit">{{( pgettext "Update expense" "action" )}}</button>
<button class="primary" type="submit">{{( pgettext "Save" "action" )}}</button>
</fieldset>
</form>
</section>

View File

@ -30,7 +30,7 @@
{{ template "file-field" .File }}
</div>
<fieldset>
<button class="primary" type="submit">{{( pgettext "New expense" "action" )}}</button>
<button class="primary" type="submit">{{( pgettext "Save" "action" )}}</button>
</fieldset>
</form>
</section>

View File

@ -66,7 +66,7 @@
name="action" value="update"
type="submit">{{( pgettext "Update" "action" )}}</button>
<button class="primary" name="action" value="add"
type="submit">{{( pgettext "New invoice" "action" )}}</button>
type="submit">{{( pgettext "Save" "action" )}}</button>
</fieldset>
</form>
</section>

View File

@ -33,7 +33,7 @@
{{ end }}
<fieldset>
<button class="primary" type="submit">{{( pgettext "Update product" "action" )}}</button>
<button class="primary" type="submit">{{( pgettext "Save" "action" )}}</button>
</fieldset>
</form>
</section>

View File

@ -27,7 +27,7 @@
{{ template "input-field" .Description }}
</div>
<fieldset>
<button class="primary" type="submit">{{( pgettext "New product" "action" )}}</button>
<button class="primary" type="submit">{{( pgettext "Save" "action" )}}</button>
</fieldset>
</form>