From 63902e9266c6bf54e4358dd4511164890b29fa7b Mon Sep 17 00:00:00 2001 From: Dillon Ngo Date: Sat, 28 Jun 2025 13:45:24 +0800 Subject: [PATCH 1/3] E-Invoice - Allow admin to update E-Invoice info on behalf of customer --- .../sections/CustomerProfileSectionComponent.vue | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/resources/assets/vue/components/companies/sections/CustomerProfileSectionComponent.vue b/resources/assets/vue/components/companies/sections/CustomerProfileSectionComponent.vue index 3342adb5..3d1b988c 100644 --- a/resources/assets/vue/components/companies/sections/CustomerProfileSectionComponent.vue +++ b/resources/assets/vue/components/companies/sections/CustomerProfileSectionComponent.vue @@ -176,6 +176,14 @@ }); } } + else{ + if( this.company.company_module.e_invoice && (this.company.company_module.tin === null || this.company.company_module.msic_code === null) ) + { + this.$nextTick(() => { + $('#modal-einvoice-info').modal('show'); + }); + } + } }, errorHandler(error, statusCode, section) { //E-Invoice if(section === this.section + 'CheckEInvoiceRule' && statusCode === 422){ From f56548efa72103ba4ae78ca500c8492d8435bc47 Mon Sep 17 00:00:00 2001 From: Dillon Ngo Date: Sat, 28 Jun 2025 15:30:16 +0800 Subject: [PATCH 2/3] E-Invoice - Minor amendment requested by Harry on TIN length validation --- .../components/companies/forms/EInvoiceInfoFormComponent.vue | 4 ++-- .../vue/components/general/forms/ValidationErrorComponent.vue | 2 ++ .../forms/ChangeCustomerCompanyDetailsFormComponent.vue | 4 ++-- 3 files changed, 6 insertions(+), 4 deletions(-) diff --git a/resources/assets/vue/components/companies/forms/EInvoiceInfoFormComponent.vue b/resources/assets/vue/components/companies/forms/EInvoiceInfoFormComponent.vue index 7813db1d..c7cd3fec 100644 --- a/resources/assets/vue/components/companies/forms/EInvoiceInfoFormComponent.vue +++ b/resources/assets/vue/components/companies/forms/EInvoiceInfoFormComponent.vue @@ -207,7 +207,7 @@ ? { required, alphaNum, - minLength: minLength(11), + minLength: minLength(10), //was 11 maxLength: maxLength(13) } : {}), @@ -216,7 +216,7 @@ required, alphaNum, minLength: minLength(10), - maxLength: maxLength(12) + maxLength: maxLength(13) ///was 12 } : {}) }, diff --git a/resources/assets/vue/components/general/forms/ValidationErrorComponent.vue b/resources/assets/vue/components/general/forms/ValidationErrorComponent.vue index bfa04a92..83690ed8 100644 --- a/resources/assets/vue/components/general/forms/ValidationErrorComponent.vue +++ b/resources/assets/vue/components/general/forms/ValidationErrorComponent.vue @@ -3,6 +3,7 @@ {{errorMessages[param]}} {{object.min}} characters + {{object.max}} characters {{object.eq}} field {{object.min}} {{errorMessages[param]}} {{object.max}} @@ -25,6 +26,7 @@ required: 'this field is required', email: 'enter a valid email address', minLength: 'this field must have at least', + maxLength: 'this field must not exceed', minValue: 'this field must at least be', sameAs: 'this field must match the', numeric: 'this field can only contain numbers', diff --git a/resources/assets/vue/components/orders/forms/ChangeCustomerCompanyDetailsFormComponent.vue b/resources/assets/vue/components/orders/forms/ChangeCustomerCompanyDetailsFormComponent.vue index daafd246..90c4511e 100644 --- a/resources/assets/vue/components/orders/forms/ChangeCustomerCompanyDetailsFormComponent.vue +++ b/resources/assets/vue/components/orders/forms/ChangeCustomerCompanyDetailsFormComponent.vue @@ -164,7 +164,7 @@ ? { required, alphaNum, - minLength: minLength(11), + minLength: minLength(10), //was 11 maxLength: maxLength(13) } : {}), @@ -173,7 +173,7 @@ required, alphaNum, minLength: minLength(10), - maxLength: maxLength(12) + maxLength: maxLength(13) //was 12 } : {}) } From c37ed89a7339f9846500d49af39066ea79e8b8fe Mon Sep 17 00:00:00 2001 From: Dillon Ngo Date: Sat, 28 Jun 2025 15:57:09 +0800 Subject: [PATCH 3/3] E-Invoice - Minor amendment requested by Harry on TIN length validation --- .../vue/components/general/forms/ValidationErrorComponent.vue | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/resources/assets/vue/components/general/forms/ValidationErrorComponent.vue b/resources/assets/vue/components/general/forms/ValidationErrorComponent.vue index 83690ed8..231668c1 100644 --- a/resources/assets/vue/components/general/forms/ValidationErrorComponent.vue +++ b/resources/assets/vue/components/general/forms/ValidationErrorComponent.vue @@ -26,7 +26,7 @@ required: 'this field is required', email: 'enter a valid email address', minLength: 'this field must have at least', - maxLength: 'this field must not exceed', + maxLength: 'this field must have at most', minValue: 'this field must at least be', sameAs: 'this field must match the', numeric: 'this field can only contain numbers',