Match error message for quote and invoice quantity field

This commit is contained in:
jordi fita mas 2025-01-23 19:34:02 +01:00
parent a0961f9da9
commit 913612a179
3 changed files with 13 additions and 15 deletions

View File

@ -993,7 +993,7 @@ func (form *quoteProductForm) Validate() bool {
validator.CheckValidDecimal(form.Price, -math.MaxFloat64, math.MaxFloat64, gettext("Price must be a decimal number.", form.locale)) validator.CheckValidDecimal(form.Price, -math.MaxFloat64, math.MaxFloat64, gettext("Price must be a decimal number.", form.locale))
} }
if validator.CheckRequiredInput(form.Quantity, gettext("Quantity can not be empty.", form.locale)) { if validator.CheckRequiredInput(form.Quantity, gettext("Quantity can not be empty.", form.locale)) {
validator.CheckValidInteger(form.Quantity, math.MinInt32, math.MaxInt32, gettext("Quantity must be an integer.", form.locale)) validator.CheckValidInteger(form.Quantity, math.MinInt32, math.MaxInt32, gettext("Quantity must be an integer number.", form.locale))
} }
if validator.CheckRequiredInput(form.Discount, gettext("Discount can not be empty.", form.locale)) { if validator.CheckRequiredInput(form.Discount, gettext("Discount can not be empty.", form.locale)) {
validator.CheckValidInteger(form.Discount, 0, 100, gettext("Discount must be a percentage between 0 and 100.", form.locale)) validator.CheckValidInteger(form.Discount, 0, 100, gettext("Discount must be a percentage between 0 and 100.", form.locale))

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: 2025-01-23 19:28+0100\n" "POT-Creation-Date: 2025-01-23 19:33+0100\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"
@ -1337,8 +1337,8 @@ msgstr "El preu ha de ser un número decimal."
msgid "Quantity can not be empty." msgid "Quantity can not be empty."
msgstr "No podeu deixar la quantitat en blanc." msgstr "No podeu deixar la quantitat en blanc."
#: pkg/quote.go:996 #: pkg/quote.go:996 pkg/invoices.go:1267
msgid "Quantity must be an integer." msgid "Quantity must be an integer number."
msgstr "La quantitat ha de ser un número enter." msgstr "La quantitat ha de ser un número enter."
#: pkg/quote.go:998 pkg/invoices.go:1269 #: pkg/quote.go:998 pkg/invoices.go:1269
@ -1620,10 +1620,6 @@ msgstr "DD/MM/YYYY"
msgid "Invoice product ID must be a number greater than zero." 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." msgstr "LID del producte de factura ha de ser un número major a zero."
#: pkg/invoices.go:1267
msgid "Quantity must be an integer number."
msgstr "La quantitat ha de ser un número enter."
#: pkg/contacts.go:290 #: pkg/contacts.go:290
msgctxt "input" msgctxt "input"
msgid "Need to input tax details" msgid "Need to input tax details"
@ -1651,6 +1647,9 @@ msgctxt "input"
msgid "Holded Excel file" msgid "Holded Excel file"
msgstr "Fitxer Excel del Holded" msgstr "Fitxer Excel del Holded"
#~ msgid "Quantity must be an integer."
#~ msgstr "La quantitat ha de ser un número enter."
#~ msgctxt "link" #~ msgctxt "link"
#~ msgid "Login" #~ msgid "Login"
#~ msgstr "Entrada" #~ msgstr "Entrada"

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: 2025-01-23 19:28+0100\n" "POT-Creation-Date: 2025-01-23 19:33+0100\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"
@ -1337,8 +1337,8 @@ msgstr "El precio tiene que ser un número decimal."
msgid "Quantity can not be empty." msgid "Quantity can not be empty."
msgstr "No podéis dejar la cantidad en blanco." msgstr "No podéis dejar la cantidad en blanco."
#: pkg/quote.go:996 #: pkg/quote.go:996 pkg/invoices.go:1267
msgid "Quantity must be an integer." msgid "Quantity must be an integer number."
msgstr "La cantidad tiene que ser un número entero." msgstr "La cantidad tiene que ser un número entero."
#: pkg/quote.go:998 pkg/invoices.go:1269 #: pkg/quote.go:998 pkg/invoices.go:1269
@ -1620,10 +1620,6 @@ msgstr "DD/MM/YYYY"
msgid "Invoice product ID must be a number greater than zero." 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." msgstr "El ID de producto de factura tiene que ser un número mayor a cero."
#: pkg/invoices.go:1267
msgid "Quantity must be an integer number."
msgstr "La cantidad tiene que ser un número entero."
#: pkg/contacts.go:290 #: pkg/contacts.go:290
msgctxt "input" msgctxt "input"
msgid "Need to input tax details" msgid "Need to input tax details"
@ -1651,6 +1647,9 @@ msgctxt "input"
msgid "Holded Excel file" msgid "Holded Excel file"
msgstr "Archivo Excel de Holded" msgstr "Archivo Excel de Holded"
#~ msgid "Quantity must be an integer."
#~ msgstr "La cantidad tiene que ser un número entero."
#~ msgctxt "link" #~ msgctxt "link"
#~ msgid "Login" #~ msgid "Login"
#~ msgstr "Entrada" #~ msgstr "Entrada"