Add the document (expense) column to payment index page

This commit is contained in:
jordi fita mas 2024-08-15 03:59:30 +02:00
parent 9ab08deaa1
commit dca8b3a719
4 changed files with 99 additions and 77 deletions

View File

@ -38,6 +38,8 @@ type PaymentEntry struct {
Slug string Slug string
PaymentDate time.Time PaymentDate time.Time
Description string Description string
ExpenseSlug string
InvoiceNumber string
Total string Total string
OriginalFileName string OriginalFileName string
Tags []string Tags []string
@ -56,11 +58,15 @@ func mustCollectPaymentEntries(ctx context.Context, conn *Conn, company *Company
, payment.payment_status , payment.payment_status
, psi18n.name , psi18n.name
, coalesce(attachment.original_filename, '') , coalesce(attachment.original_filename, '')
, coalesce(expense.slug::text, '')
, coalesce(expense.invoice_number, '')
from payment from payment
join payment_status_i18n psi18n on payment.payment_status = psi18n.payment_status and psi18n.lang_tag = $1 join payment_status_i18n psi18n on payment.payment_status = psi18n.payment_status and psi18n.lang_tag = $1
join currency using (currency_code) join currency using (currency_code)
left join payment_attachment as attachment using (payment_id) left join payment_attachment as attachment using (payment_id)
where company_id = $2 left join expense_payment using (payment_id)
left join expense using (expense_id)
where payment.company_id = $2
order by payment_date desc, total desc order by payment_date desc, total desc
`, locale.Language, company.Id) `, locale.Language, company.Id)
defer rows.Close() defer rows.Close()
@ -68,7 +74,7 @@ func mustCollectPaymentEntries(ctx context.Context, conn *Conn, company *Company
var entries []*PaymentEntry var entries []*PaymentEntry
for rows.Next() { for rows.Next() {
entry := &PaymentEntry{} entry := &PaymentEntry{}
if err := rows.Scan(&entry.ID, &entry.Slug, &entry.PaymentDate, &entry.Description, &entry.Total, &entry.Tags, &entry.Status, &entry.StatusLabel, &entry.OriginalFileName); err != nil { if err := rows.Scan(&entry.ID, &entry.Slug, &entry.PaymentDate, &entry.Description, &entry.Total, &entry.Tags, &entry.Status, &entry.StatusLabel, &entry.OriginalFileName, &entry.ExpenseSlug, &entry.InvoiceNumber); err != nil {
panic(err) panic(err)
} }
entries = append(entries, entry) entries = append(entries, entry)

View File

@ -8,7 +8,7 @@ msgid ""
msgstr "" msgstr ""
"Project-Id-Version: numerus\n" "Project-Id-Version: numerus\n"
"Report-Msgid-Bugs-To: jordi@tandem.blog\n" "Report-Msgid-Bugs-To: jordi@tandem.blog\n"
"POT-Creation-Date: 2024-08-14 04:02+0200\n" "POT-Creation-Date: 2024-08-15 03:58+0200\n"
"PO-Revision-Date: 2023-01-18 17:08+0100\n" "PO-Revision-Date: 2023-01-18 17:08+0100\n"
"Last-Translator: jordi fita mas <jordi@tandem.blog>\n" "Last-Translator: jordi fita mas <jordi@tandem.blog>\n"
"Language-Team: Catalan <ca@dodds.net>\n" "Language-Team: Catalan <ca@dodds.net>\n"
@ -116,7 +116,7 @@ msgstr "Subtotal"
#: web/template/quotes/new.gohtml:74 web/template/quotes/view.gohtml:82 #: 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/quotes/view.gohtml:122 web/template/quotes/edit.gohtml:75
#: web/template/expenses/new.gohtml:46 web/template/expenses/index.gohtml:74 #: web/template/expenses/new.gohtml:46 web/template/expenses/index.gohtml:74
#: web/template/expenses/edit.gohtml:48 web/template/payments/index.gohtml:29 #: web/template/expenses/edit.gohtml:48 web/template/payments/index.gohtml:30
msgctxt "title" msgctxt "title"
msgid "Total" msgid "Total"
msgstr "Total" msgstr "Total"
@ -193,14 +193,14 @@ msgid "Customer"
msgstr "Client" msgstr "Client"
#: web/template/invoices/index.gohtml:70 web/template/quotes/index.gohtml:70 #: web/template/invoices/index.gohtml:70 web/template/quotes/index.gohtml:70
#: web/template/expenses/index.gohtml:68 web/template/payments/index.gohtml:27 #: web/template/expenses/index.gohtml:68 web/template/payments/index.gohtml:28
msgctxt "title" msgctxt "title"
msgid "Status" msgid "Status"
msgstr "Estat" msgstr "Estat"
#: web/template/invoices/index.gohtml:71 web/template/quotes/index.gohtml:71 #: web/template/invoices/index.gohtml:71 web/template/quotes/index.gohtml:71
#: web/template/contacts/index.gohtml:50 web/template/expenses/index.gohtml:69 #: web/template/contacts/index.gohtml:50 web/template/expenses/index.gohtml:69
#: web/template/products/index.gohtml:46 web/template/payments/index.gohtml:28 #: web/template/products/index.gohtml:46 web/template/payments/index.gohtml:29
msgctxt "title" msgctxt "title"
msgid "Tags" msgid "Tags"
msgstr "Etiquetes" msgstr "Etiquetes"
@ -212,7 +212,7 @@ msgid "Amount"
msgstr "Import" msgstr "Import"
#: web/template/invoices/index.gohtml:73 web/template/quotes/index.gohtml:73 #: web/template/invoices/index.gohtml:73 web/template/quotes/index.gohtml:73
#: web/template/expenses/index.gohtml:75 web/template/payments/index.gohtml:30 #: web/template/expenses/index.gohtml:75 web/template/payments/index.gohtml:31
msgctxt "title" msgctxt "title"
msgid "Download" msgid "Download"
msgstr "Descàrrega" msgstr "Descàrrega"
@ -220,7 +220,7 @@ msgstr "Descàrrega"
#: web/template/invoices/index.gohtml:74 web/template/quotes/index.gohtml:74 #: web/template/invoices/index.gohtml:74 web/template/quotes/index.gohtml:74
#: web/template/contacts/index.gohtml:51 web/template/expenses/index.gohtml:76 #: web/template/contacts/index.gohtml:51 web/template/expenses/index.gohtml:76
#: web/template/company/switch.gohtml:23 web/template/products/index.gohtml:48 #: web/template/company/switch.gohtml:23 web/template/products/index.gohtml:48
#: web/template/payments/index.gohtml:31 #: web/template/payments/index.gohtml:32
msgctxt "title" msgctxt "title"
msgid "Actions" msgid "Actions"
msgstr "Accions" msgstr "Accions"
@ -242,7 +242,7 @@ msgstr "Accions per la factura %s"
#: web/template/invoices/index.gohtml:139 web/template/invoices/view.gohtml:19 #: web/template/invoices/index.gohtml:139 web/template/invoices/view.gohtml:19
#: web/template/quotes/index.gohtml:137 web/template/quotes/view.gohtml:22 #: web/template/quotes/index.gohtml:137 web/template/quotes/view.gohtml:22
#: web/template/contacts/index.gohtml:82 web/template/expenses/index.gohtml:121 #: web/template/contacts/index.gohtml:82 web/template/expenses/index.gohtml:121
#: web/template/products/index.gohtml:78 web/template/payments/index.gohtml:71 #: web/template/products/index.gohtml:78 web/template/payments/index.gohtml:77
msgctxt "action" msgctxt "action"
msgid "Edit" msgid "Edit"
msgstr "Edita" msgstr "Edita"
@ -794,20 +794,25 @@ msgctxt "title"
msgid "Description" msgid "Description"
msgstr "Descripció" msgstr "Descripció"
#: web/template/payments/index.gohtml:36 #: web/template/payments/index.gohtml:27
msgctxt "title"
msgid "Document"
msgstr "Document"
#: web/template/payments/index.gohtml:37
msgid "Are you sure you wish to delete this payment?" msgid "Are you sure you wish to delete this payment?"
msgstr "Esteu segur de voler esborrar aquest pagament?" msgstr "Esteu segur de voler esborrar aquest pagament?"
#: web/template/payments/index.gohtml:63 #: web/template/payments/index.gohtml:69
msgid "Actions for payment %s" msgid "Actions for payment %s"
msgstr "Accions pel pagament %s" msgstr "Accions pel pagament %s"
#: web/template/payments/index.gohtml:82 #: web/template/payments/index.gohtml:88
msgctxt "action" msgctxt "action"
msgid "Remove" msgid "Remove"
msgstr "Esborra" msgstr "Esborra"
#: web/template/payments/index.gohtml:92 #: web/template/payments/index.gohtml:98
msgid "No payments added yet." msgid "No payments added yet."
msgstr "No hi ha cap pagament." msgstr "No hi ha cap pagament."
@ -882,14 +887,14 @@ msgstr "No podeu deixar la contrasenya en blanc."
msgid "Invalid user or password." msgid "Invalid user or password."
msgstr "Nom dusuari o contrasenya incorrectes." msgstr "Nom dusuari o contrasenya incorrectes."
#: pkg/products.go:172 pkg/products.go:276 pkg/quote.go:901 pkg/accounts.go:138 #: pkg/products.go:172 pkg/products.go:276 pkg/quote.go:901 pkg/accounts.go:140
#: pkg/invoices.go:1147 pkg/contacts.go:149 pkg/contacts.go:262 #: pkg/invoices.go:1147 pkg/contacts.go:149 pkg/contacts.go:262
msgctxt "input" msgctxt "input"
msgid "Name" msgid "Name"
msgstr "Nom" msgstr "Nom"
#: pkg/products.go:177 pkg/products.go:303 pkg/quote.go:174 pkg/quote.go:708 #: pkg/products.go:177 pkg/products.go:303 pkg/quote.go:174 pkg/quote.go:708
#: pkg/payments.go:154 pkg/expenses.go:335 pkg/expenses.go:485 #: pkg/payments.go:162 pkg/expenses.go:335 pkg/expenses.go:485
#: pkg/invoices.go:177 pkg/invoices.go:877 pkg/invoices.go:1462 #: pkg/invoices.go:177 pkg/invoices.go:877 pkg/invoices.go:1462
#: pkg/contacts.go:154 pkg/contacts.go:362 #: pkg/contacts.go:154 pkg/contacts.go:362
msgctxt "input" msgctxt "input"
@ -924,7 +929,7 @@ msgstr "Qualsevol"
msgid "Invoices must have at least one of the specified labels." 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." msgstr "Les factures han de tenir com a mínim una de les etiquetes."
#: pkg/products.go:282 pkg/quote.go:915 pkg/payments.go:121 #: pkg/products.go:282 pkg/quote.go:915 pkg/payments.go:129
#: pkg/invoices.go:1161 #: pkg/invoices.go:1161
msgctxt "input" msgctxt "input"
msgid "Description" msgid "Description"
@ -1339,103 +1344,103 @@ msgstr "La confirmació no és igual a la contrasenya."
msgid "Selected language is not valid." msgid "Selected language is not valid."
msgstr "Heu seleccionat un idioma que no és vàlid." msgstr "Heu seleccionat un idioma que no és vàlid."
#: pkg/payments.go:127 pkg/expenses.go:304 pkg/invoices.go:866 #: pkg/payments.go:135 pkg/expenses.go:304 pkg/invoices.go:866
msgctxt "input" msgctxt "input"
msgid "Invoice Date" msgid "Invoice Date"
msgstr "Data de factura" msgstr "Data de factura"
#: pkg/payments.go:133 #: pkg/payments.go:141
msgctxt "input" msgctxt "input"
msgid "Account" msgid "Account"
msgstr "Compte" msgstr "Compte"
#: pkg/payments.go:139 pkg/expenses.go:319 #: pkg/payments.go:147 pkg/expenses.go:319
msgctxt "input" msgctxt "input"
msgid "Amount" msgid "Amount"
msgstr "Import" msgstr "Import"
#: pkg/payments.go:149 pkg/expenses.go:330 pkg/invoices.go:888 #: pkg/payments.go:157 pkg/expenses.go:330 pkg/invoices.go:888
msgctxt "input" msgctxt "input"
msgid "File" msgid "File"
msgstr "Fitxer" msgstr "Fitxer"
#: pkg/payments.go:161 #: pkg/payments.go:169
msgid "Select an account." msgid "Select an account."
msgstr "Escolliu un compte." msgstr "Escolliu un compte."
#: pkg/payments.go:210 #: pkg/payments.go:218
msgid "Description can not be empty." msgid "Description can not be empty."
msgstr "No podeu deixar la descripció en blanc." msgstr "No podeu deixar la descripció en blanc."
#: pkg/payments.go:211 #: pkg/payments.go:219
msgid "Selected payment account is not valid." msgid "Selected payment account is not valid."
msgstr "Heu seleccionat un compte de pagament que no és vàlid." msgstr "Heu seleccionat un compte de pagament que no és vàlid."
#: pkg/payments.go:212 #: pkg/payments.go:220
msgid "Payment date must be a valid date." msgid "Payment date must be a valid date."
msgstr "La data de pagament ha de ser vàlida." msgstr "La data de pagament ha de ser vàlida."
#: pkg/payments.go:213 pkg/expenses.go:372 #: pkg/payments.go:221 pkg/expenses.go:372
msgid "Amount can not be empty." msgid "Amount can not be empty."
msgstr "No podeu deixar limport en blanc." msgstr "No podeu deixar limport en blanc."
#: pkg/payments.go:214 pkg/expenses.go:373 #: pkg/payments.go:222 pkg/expenses.go:373
msgid "Amount must be a number greater than zero." msgid "Amount must be a number greater than zero."
msgstr "Limport ha de ser un número major a zero." msgstr "Limport ha de ser un número major a zero."
#: pkg/accounts.go:129 #: pkg/accounts.go:131
msgctxt "input" msgctxt "input"
msgid "Type" msgid "Type"
msgstr "Tipus" msgstr "Tipus"
#: pkg/accounts.go:144 pkg/contacts.go:352 #: pkg/accounts.go:146 pkg/contacts.go:352
msgctxt "input" msgctxt "input"
msgid "IBAN" msgid "IBAN"
msgstr "IBAN" msgstr "IBAN"
#: pkg/accounts.go:150 #: pkg/accounts.go:152
msgctxt "input" msgctxt "input"
msgid "Cards last four digits" msgid "Cards last four digits"
msgstr "Els quatre darrers dígits de la targeta" msgstr "Els quatre darrers dígits de la targeta"
#: pkg/accounts.go:161 #: pkg/accounts.go:163
msgctxt "input" msgctxt "input"
msgid "Expiration date" msgid "Expiration date"
msgstr "Data de caducitat" msgstr "Data de caducitat"
#: pkg/accounts.go:227 #: pkg/accounts.go:229
msgid "Selected payment account type is not valid." msgid "Selected payment account type is not valid."
msgstr "Heu seleccionat un tipus de compte de pagament que no és vàlid." msgstr "Heu seleccionat un tipus de compte de pagament que no és vàlid."
#: pkg/accounts.go:230 #: pkg/accounts.go:232
msgid "IBAN can not be empty." msgid "IBAN can not be empty."
msgstr "No podeu deixar lIBAN en blanc." msgstr "No podeu deixar lIBAN en blanc."
#: pkg/accounts.go:231 #: pkg/accounts.go:233
msgid "This value is not a valid IBAN." msgid "This value is not a valid IBAN."
msgstr "Aquest valor no és un IBAN vàlid." msgstr "Aquest valor no és un IBAN vàlid."
#: pkg/accounts.go:234 #: pkg/accounts.go:236
msgid "Last four digits can not be empty." msgid "Last four digits can not be empty."
msgstr "No podeu deixar el quatre darrers dígits en blanc." msgstr "No podeu deixar el quatre darrers dígits en blanc."
#: pkg/accounts.go:235 #: pkg/accounts.go:237
msgid "You must enter the cards last four digits" msgid "You must enter the cards last four digits"
msgstr "Heu dentrar els quatre darrers dígits de la targeta" msgstr "Heu dentrar els quatre darrers dígits de la targeta"
#: pkg/accounts.go:236 #: pkg/accounts.go:238
msgid "Last four digits must be a number." msgid "Last four digits must be a number."
msgstr "El quatre darrera dígits han de ser un número." msgstr "El quatre darrera dígits han de ser un número."
#: pkg/accounts.go:239 #: pkg/accounts.go:241
msgid "Expiration date can not be empty." msgid "Expiration date can not be empty."
msgstr "No podeu deixar la data de pagament en blanc." msgstr "No podeu deixar la data de pagament en blanc."
#: pkg/accounts.go:241 #: pkg/accounts.go:243
msgid "Expiration date should be a valid date in format MM/YY (e.g., 08/24)." msgid "Expiration date should be a valid date in format MM/YY (e.g., 08/24)."
msgstr "La data de caducitat has de ser vàlida i en format MM/AA (p. ex., 08/24)." msgstr "La data de caducitat has de ser vàlida i en format MM/AA (p. ex., 08/24)."
#: pkg/accounts.go:245 #: pkg/accounts.go:247
msgid "Payment account name can not be empty." msgid "Payment account name can not be empty."
msgstr "No podeu deixar el nom del compte de pagament en blanc." msgstr "No podeu deixar el nom del compte de pagament en blanc."

View File

@ -7,7 +7,7 @@ msgid ""
msgstr "" msgstr ""
"Project-Id-Version: numerus\n" "Project-Id-Version: numerus\n"
"Report-Msgid-Bugs-To: jordi@tandem.blog\n" "Report-Msgid-Bugs-To: jordi@tandem.blog\n"
"POT-Creation-Date: 2024-08-14 04:02+0200\n" "POT-Creation-Date: 2024-08-15 03:58+0200\n"
"PO-Revision-Date: 2023-01-18 17:45+0100\n" "PO-Revision-Date: 2023-01-18 17:45+0100\n"
"Last-Translator: jordi fita mas <jordi@tandem.blog>\n" "Last-Translator: jordi fita mas <jordi@tandem.blog>\n"
"Language-Team: Spanish <es@tp.org.es>\n" "Language-Team: Spanish <es@tp.org.es>\n"
@ -116,7 +116,7 @@ msgstr "Subtotal"
#: web/template/quotes/new.gohtml:74 web/template/quotes/view.gohtml:82 #: 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/quotes/view.gohtml:122 web/template/quotes/edit.gohtml:75
#: web/template/expenses/new.gohtml:46 web/template/expenses/index.gohtml:74 #: web/template/expenses/new.gohtml:46 web/template/expenses/index.gohtml:74
#: web/template/expenses/edit.gohtml:48 web/template/payments/index.gohtml:29 #: web/template/expenses/edit.gohtml:48 web/template/payments/index.gohtml:30
msgctxt "title" msgctxt "title"
msgid "Total" msgid "Total"
msgstr "Total" msgstr "Total"
@ -193,14 +193,14 @@ msgid "Customer"
msgstr "Cliente" msgstr "Cliente"
#: web/template/invoices/index.gohtml:70 web/template/quotes/index.gohtml:70 #: web/template/invoices/index.gohtml:70 web/template/quotes/index.gohtml:70
#: web/template/expenses/index.gohtml:68 web/template/payments/index.gohtml:27 #: web/template/expenses/index.gohtml:68 web/template/payments/index.gohtml:28
msgctxt "title" msgctxt "title"
msgid "Status" msgid "Status"
msgstr "Estado" msgstr "Estado"
#: web/template/invoices/index.gohtml:71 web/template/quotes/index.gohtml:71 #: web/template/invoices/index.gohtml:71 web/template/quotes/index.gohtml:71
#: web/template/contacts/index.gohtml:50 web/template/expenses/index.gohtml:69 #: web/template/contacts/index.gohtml:50 web/template/expenses/index.gohtml:69
#: web/template/products/index.gohtml:46 web/template/payments/index.gohtml:28 #: web/template/products/index.gohtml:46 web/template/payments/index.gohtml:29
msgctxt "title" msgctxt "title"
msgid "Tags" msgid "Tags"
msgstr "Etiquetes" msgstr "Etiquetes"
@ -212,7 +212,7 @@ msgid "Amount"
msgstr "Importe" msgstr "Importe"
#: web/template/invoices/index.gohtml:73 web/template/quotes/index.gohtml:73 #: web/template/invoices/index.gohtml:73 web/template/quotes/index.gohtml:73
#: web/template/expenses/index.gohtml:75 web/template/payments/index.gohtml:30 #: web/template/expenses/index.gohtml:75 web/template/payments/index.gohtml:31
msgctxt "title" msgctxt "title"
msgid "Download" msgid "Download"
msgstr "Descargar" msgstr "Descargar"
@ -220,7 +220,7 @@ msgstr "Descargar"
#: web/template/invoices/index.gohtml:74 web/template/quotes/index.gohtml:74 #: web/template/invoices/index.gohtml:74 web/template/quotes/index.gohtml:74
#: web/template/contacts/index.gohtml:51 web/template/expenses/index.gohtml:76 #: web/template/contacts/index.gohtml:51 web/template/expenses/index.gohtml:76
#: web/template/company/switch.gohtml:23 web/template/products/index.gohtml:48 #: web/template/company/switch.gohtml:23 web/template/products/index.gohtml:48
#: web/template/payments/index.gohtml:31 #: web/template/payments/index.gohtml:32
msgctxt "title" msgctxt "title"
msgid "Actions" msgid "Actions"
msgstr "Acciones" msgstr "Acciones"
@ -242,7 +242,7 @@ msgstr "Acciones para la factura %s"
#: web/template/invoices/index.gohtml:139 web/template/invoices/view.gohtml:19 #: web/template/invoices/index.gohtml:139 web/template/invoices/view.gohtml:19
#: web/template/quotes/index.gohtml:137 web/template/quotes/view.gohtml:22 #: web/template/quotes/index.gohtml:137 web/template/quotes/view.gohtml:22
#: web/template/contacts/index.gohtml:82 web/template/expenses/index.gohtml:121 #: web/template/contacts/index.gohtml:82 web/template/expenses/index.gohtml:121
#: web/template/products/index.gohtml:78 web/template/payments/index.gohtml:71 #: web/template/products/index.gohtml:78 web/template/payments/index.gohtml:77
msgctxt "action" msgctxt "action"
msgid "Edit" msgid "Edit"
msgstr "Editar" msgstr "Editar"
@ -794,20 +794,25 @@ msgctxt "title"
msgid "Description" msgid "Description"
msgstr "Descripción" msgstr "Descripción"
#: web/template/payments/index.gohtml:36 #: web/template/payments/index.gohtml:27
msgctxt "title"
msgid "Document"
msgstr "Documento"
#: web/template/payments/index.gohtml:37
msgid "Are you sure you wish to delete this payment?" msgid "Are you sure you wish to delete this payment?"
msgstr "¿Estáis seguro de querer borrar este pago?" msgstr "¿Estáis seguro de querer borrar este pago?"
#: web/template/payments/index.gohtml:63 #: web/template/payments/index.gohtml:69
msgid "Actions for payment %s" msgid "Actions for payment %s"
msgstr "Acciones para el pago %s" msgstr "Acciones para el pago %s"
#: web/template/payments/index.gohtml:82 #: web/template/payments/index.gohtml:88
msgctxt "action" msgctxt "action"
msgid "Remove" msgid "Remove"
msgstr "Borrar" msgstr "Borrar"
#: web/template/payments/index.gohtml:92 #: web/template/payments/index.gohtml:98
msgid "No payments added yet." msgid "No payments added yet."
msgstr "No hay pagos." msgstr "No hay pagos."
@ -882,14 +887,14 @@ msgstr "No podéis dejar la contraseña en blanco."
msgid "Invalid user or password." msgid "Invalid user or password."
msgstr "Nombre de usuario o contraseña inválido." msgstr "Nombre de usuario o contraseña inválido."
#: pkg/products.go:172 pkg/products.go:276 pkg/quote.go:901 pkg/accounts.go:138 #: pkg/products.go:172 pkg/products.go:276 pkg/quote.go:901 pkg/accounts.go:140
#: pkg/invoices.go:1147 pkg/contacts.go:149 pkg/contacts.go:262 #: pkg/invoices.go:1147 pkg/contacts.go:149 pkg/contacts.go:262
msgctxt "input" msgctxt "input"
msgid "Name" msgid "Name"
msgstr "Nombre" msgstr "Nombre"
#: pkg/products.go:177 pkg/products.go:303 pkg/quote.go:174 pkg/quote.go:708 #: pkg/products.go:177 pkg/products.go:303 pkg/quote.go:174 pkg/quote.go:708
#: pkg/payments.go:154 pkg/expenses.go:335 pkg/expenses.go:485 #: pkg/payments.go:162 pkg/expenses.go:335 pkg/expenses.go:485
#: pkg/invoices.go:177 pkg/invoices.go:877 pkg/invoices.go:1462 #: pkg/invoices.go:177 pkg/invoices.go:877 pkg/invoices.go:1462
#: pkg/contacts.go:154 pkg/contacts.go:362 #: pkg/contacts.go:154 pkg/contacts.go:362
msgctxt "input" msgctxt "input"
@ -924,7 +929,7 @@ msgstr "Cualquiera"
msgid "Invoices must have at least one of the specified labels." msgid "Invoices must have at least one of the specified labels."
msgstr "Las facturas deben tener como mínimo una de las etiquetas." msgstr "Las facturas deben tener como mínimo una de las etiquetas."
#: pkg/products.go:282 pkg/quote.go:915 pkg/payments.go:121 #: pkg/products.go:282 pkg/quote.go:915 pkg/payments.go:129
#: pkg/invoices.go:1161 #: pkg/invoices.go:1161
msgctxt "input" msgctxt "input"
msgid "Description" msgid "Description"
@ -1339,103 +1344,103 @@ msgstr "La confirmación no corresponde con la contraseña."
msgid "Selected language is not valid." msgid "Selected language is not valid."
msgstr "Habéis escogido un idioma que no es válido." msgstr "Habéis escogido un idioma que no es válido."
#: pkg/payments.go:127 pkg/expenses.go:304 pkg/invoices.go:866 #: pkg/payments.go:135 pkg/expenses.go:304 pkg/invoices.go:866
msgctxt "input" msgctxt "input"
msgid "Invoice Date" msgid "Invoice Date"
msgstr "Fecha de factura" msgstr "Fecha de factura"
#: pkg/payments.go:133 #: pkg/payments.go:141
msgctxt "input" msgctxt "input"
msgid "Account" msgid "Account"
msgstr "Cuenta" msgstr "Cuenta"
#: pkg/payments.go:139 pkg/expenses.go:319 #: pkg/payments.go:147 pkg/expenses.go:319
msgctxt "input" msgctxt "input"
msgid "Amount" msgid "Amount"
msgstr "Importe" msgstr "Importe"
#: pkg/payments.go:149 pkg/expenses.go:330 pkg/invoices.go:888 #: pkg/payments.go:157 pkg/expenses.go:330 pkg/invoices.go:888
msgctxt "input" msgctxt "input"
msgid "File" msgid "File"
msgstr "Archivo" msgstr "Archivo"
#: pkg/payments.go:161 #: pkg/payments.go:169
msgid "Select an account." msgid "Select an account."
msgstr "Escoged una cuenta." msgstr "Escoged una cuenta."
#: pkg/payments.go:210 #: pkg/payments.go:218
msgid "Description can not be empty." msgid "Description can not be empty."
msgstr "No podéis dejar la descripción en blanco." msgstr "No podéis dejar la descripción en blanco."
#: pkg/payments.go:211 #: pkg/payments.go:219
msgid "Selected payment account is not valid." msgid "Selected payment account is not valid."
msgstr "Habéis escogido una cuenta de pago que no es válida." msgstr "Habéis escogido una cuenta de pago que no es válida."
#: pkg/payments.go:212 #: pkg/payments.go:220
msgid "Payment date must be a valid date." msgid "Payment date must be a valid date."
msgstr "La fecha de pago debe ser válida." msgstr "La fecha de pago debe ser válida."
#: pkg/payments.go:213 pkg/expenses.go:372 #: pkg/payments.go:221 pkg/expenses.go:372
msgid "Amount can not be empty." msgid "Amount can not be empty."
msgstr "No podéis dejar el importe en blanco." msgstr "No podéis dejar el importe en blanco."
#: pkg/payments.go:214 pkg/expenses.go:373 #: pkg/payments.go:222 pkg/expenses.go:373
msgid "Amount must be a number greater than zero." msgid "Amount must be a number greater than zero."
msgstr "El importe tiene que ser un número mayor a cero." msgstr "El importe tiene que ser un número mayor a cero."
#: pkg/accounts.go:129 #: pkg/accounts.go:131
msgctxt "input" msgctxt "input"
msgid "Type" msgid "Type"
msgstr "Tipo" msgstr "Tipo"
#: pkg/accounts.go:144 pkg/contacts.go:352 #: pkg/accounts.go:146 pkg/contacts.go:352
msgctxt "input" msgctxt "input"
msgid "IBAN" msgid "IBAN"
msgstr "IBAN" msgstr "IBAN"
#: pkg/accounts.go:150 #: pkg/accounts.go:152
msgctxt "input" msgctxt "input"
msgid "Cards last four digits" msgid "Cards last four digits"
msgstr "Últimos cuatro dígitos de la tarjeta" msgstr "Últimos cuatro dígitos de la tarjeta"
#: pkg/accounts.go:161 #: pkg/accounts.go:163
msgctxt "input" msgctxt "input"
msgid "Expiration date" msgid "Expiration date"
msgstr "Fecha de caducidad" msgstr "Fecha de caducidad"
#: pkg/accounts.go:227 #: pkg/accounts.go:229
msgid "Selected payment account type is not valid." msgid "Selected payment account type is not valid."
msgstr "Habéis escogido un tipo de cuenta de pago que no es válido." msgstr "Habéis escogido un tipo de cuenta de pago que no es válido."
#: pkg/accounts.go:230 #: pkg/accounts.go:232
msgid "IBAN can not be empty." msgid "IBAN can not be empty."
msgstr "No podéis dejar el IBAN en blanco." msgstr "No podéis dejar el IBAN en blanco."
#: pkg/accounts.go:231 #: pkg/accounts.go:233
msgid "This value is not a valid IBAN." msgid "This value is not a valid IBAN."
msgstr "Este valor no es un IBAN válido." msgstr "Este valor no es un IBAN válido."
#: pkg/accounts.go:234 #: pkg/accounts.go:236
msgid "Last four digits can not be empty." msgid "Last four digits can not be empty."
msgstr "No podéis dejar los cuatro últimos dígitos en blanco." msgstr "No podéis dejar los cuatro últimos dígitos en blanco."
#: pkg/accounts.go:235 #: pkg/accounts.go:237
msgid "You must enter the cards last four digits" msgid "You must enter the cards last four digits"
msgstr "Debéis entrar los cuatro últimos dígitos de la tarjeta" msgstr "Debéis entrar los cuatro últimos dígitos de la tarjeta"
#: pkg/accounts.go:236 #: pkg/accounts.go:238
msgid "Last four digits must be a number." msgid "Last four digits must be a number."
msgstr "Los cuatro últimos dígitos tienen que ser un número." msgstr "Los cuatro últimos dígitos tienen que ser un número."
#: pkg/accounts.go:239 #: pkg/accounts.go:241
msgid "Expiration date can not be empty." msgid "Expiration date can not be empty."
msgstr "No podéis dejar la fecha de caducidad en blanco." msgstr "No podéis dejar la fecha de caducidad en blanco."
#: pkg/accounts.go:241 #: pkg/accounts.go:243
msgid "Expiration date should be a valid date in format MM/YY (e.g., 08/24)." msgid "Expiration date should be a valid date in format MM/YY (e.g., 08/24)."
msgstr "La fecha de caducidad tiene que ser válida y en formato MM/AA (p. ej., 08/24)." msgstr "La fecha de caducidad tiene que ser válida y en formato MM/AA (p. ej., 08/24)."
#: pkg/accounts.go:245 #: pkg/accounts.go:247
msgid "Payment account name can not be empty." msgid "Payment account name can not be empty."
msgstr "No podéis dejar el nombre de la cuenta de pago en blanco." msgstr "No podéis dejar el nombre de la cuenta de pago en blanco."

View File

@ -24,6 +24,7 @@
<tr> <tr>
<th>{{( pgettext "Payment Date" "title" )}}</th> <th>{{( pgettext "Payment Date" "title" )}}</th>
<th>{{( pgettext "Description" "title" )}}</th> <th>{{( pgettext "Description" "title" )}}</th>
<th>{{( pgettext "Document" "title" )}}</th>
<th>{{( pgettext "Status" "title" )}}</th> <th>{{( pgettext "Status" "title" )}}</th>
<th>{{( pgettext "Tags" "title" )}}</th> <th>{{( pgettext "Tags" "title" )}}</th>
<th class="numeric">{{( pgettext "Total" "title" )}}</th> <th class="numeric">{{( pgettext "Total" "title" )}}</th>
@ -38,6 +39,11 @@
<tr> <tr>
<td>{{ .PaymentDate|formatDate }}</td> <td>{{ .PaymentDate|formatDate }}</td>
<td><a href="{{ companyURI "/payments/"}}{{ .Slug }}">{{ .Description }}</a></td> <td><a href="{{ companyURI "/payments/"}}{{ .Slug }}">{{ .Description }}</a></td>
<td>
{{- if .InvoiceNumber -}}
<a href="{{ companyURI "/expenses/"}}{{ .ExpenseSlug }}">{{ .InvoiceNumber }}</a>
{{- end -}}
</td>
<td class="payment-status-{{ .Status }}">{{ .StatusLabel }}</td> <td class="payment-status-{{ .Status }}">{{ .StatusLabel }}</td>
<td <td
data-hx-get="{{companyURI "/payments/"}}{{ .Slug }}/tags/edit" data-hx-get="{{companyURI "/payments/"}}{{ .Slug }}/tags/edit"
@ -89,7 +95,7 @@
{{- end }} {{- end }}
{{ else }} {{ else }}
<tr> <tr>
<td colspan="5">{{( gettext "No payments added yet." )}}</td> <td colspan="8">{{( gettext "No payments added yet." )}}</td>
</tr> </tr>
{{ end }} {{ end }}
</tbody> </tbody>