from django.utils.translation import gettext_lazy as _ from apps.customers.domain.enums import CustomerType TYPE_LABELS = { CustomerType.COMPANY: _("Company"), CustomerType.CONSUMER: _("Consumer"), } TYPE_CHOICES = [(t.value, label) for t, label in TYPE_LABELS.items()] ERROR_MESSAGES = { "invalid_customer_name": _("Enter a name (at most 200 characters)."), "invalid_business_id": _("Enter a valid business ID, for example 1234567-1."), "invalid_personal_id": _("Enter a valid personal identity code."), "consumer_cannot_have_business_id": _("A consumer cannot have a business ID."), "company_cannot_have_personal_id": _("A company cannot have a personal identity code."), "internal_customer_must_be_company": _("The internal customer is always a company."), "business_id_taken": _("Another customer already has this business ID."), "personal_id_taken": _("Another customer already has this personal identity code."), "personal_id_removal_not_allowed": _( "You are not allowed to remove the personal identity code." ), "customer_not_found": _("The customer was not found."), "customer_in_use": _( "The customer cannot be deleted because it has contacts, billing units, jobs, " "sales or invoices." ), "internal_customer_cannot_be_deleted": _("The internal customer cannot be deleted."), "invalid_contact_name": _("Enter a name (at most 150 characters)."), "invalid_billing_unit_name": _("Enter a name (at most 200 characters)."), "invalid_e_invoice_address": _("The e-invoice address must be 12–35 letters or digits."), "e_invoice_operator_required": _("Enter the operator ID when an e-invoice address is given."), "invalid_email": _("Enter a valid email address."), "contact_not_found": _("The contact was not found."), "billing_unit_not_found": _("The billing unit was not found."), "contact_in_use": _("The contact cannot be deleted because a job refers to it."), "billing_unit_in_use": _("The billing unit cannot be deleted because a job refers to it."), "*": _("The change could not be saved."), }