Merge pull request #166 from mchev/customer_tax_id

Include a Tax ID field in both customer creation and invoices
This commit is contained in:
mchev
2024-11-02 10:28:49 +01:00
committed by GitHub
11 changed files with 72 additions and 10 deletions

View File

@@ -116,6 +116,15 @@
/>
</BaseInputGroup>
</BaseInputGrid>
<BaseInputGroup :label="$t('customers.tax_id')">
<BaseInput
v-model="customerStore.currentCustomer.tax_id"
type="text"
class="mt-1 md:mt-0"
/>
</BaseInputGroup>
</BaseInputGrid>
</BaseTab>

View File

@@ -157,6 +157,24 @@
@input="v$.currentCustomer.prefix.$touch()"
/>
</BaseInputGroup>
<BaseInputGroup
:label="$t('customers.tax_id')"
:error="
v$.currentCustomer.tax_id.$error &&
v$.currentCustomer.tax_id.$errors[0].$message
"
:content-loading="isFetchingInitialData"
>
<BaseInput
v-model="customerStore.currentCustomer.tax_id"
:content-loading="isFetchingInitialData"
type="text"
name="tax_id"
:invalid="v$.currentCustomer.tax_id.$error"
@input="v$.currentCustomer.tax_id.$touch()"
/>
</BaseInputGroup>
</BaseInputGrid>
</div>
@@ -645,6 +663,9 @@ const rules = computed(() => {
minLength(3)
),
},
tax_id: {
required: helpers.withMessage(t('validation.required'), required),
},
currency_id: {
required: helpers.withMessage(t('validation.required'), required),
},