diff --git a/app/Classes/ValueObjects/Constants/BankAccountType.php b/app/Classes/ValueObjects/Constants/BankAccountType.php index c1ae288e..f6ef447b 100644 --- a/app/Classes/ValueObjects/Constants/BankAccountType.php +++ b/app/Classes/ValueObjects/Constants/BankAccountType.php @@ -10,4 +10,6 @@ final class BankAccountType { public const ALIPAY= 3; + public const ALIPAY_RECIPIENT = 4; + } diff --git a/app/Http/Resources/CompanyResource.php b/app/Http/Resources/CompanyResource.php index eff2bd1b..bbafbefc 100644 --- a/app/Http/Resources/CompanyResource.php +++ b/app/Http/Resources/CompanyResource.php @@ -56,7 +56,7 @@ class CompanyResource extends JsonResource 'last_payment' => $lastPayment ? $lastPayment->created_at->diffForHumans() : 'No Payments', 'personal_banks' => BankResource::collection($this->banks->where('type', BankAccountType::PERSONAL)), 'recipient_banks' => [ - 'accounts' => BankResource::collection($this->banks->where('type', BankAccountType::EXTERNAL)), + 'accounts' => BankResource::collection($this->banks->whereIn('type', [BankAccountType::EXTERNAL, BankAccountType::ALIPAY_RECIPIENT])), 'default' => new BankResource($this->banks->where('type', BankAccountType::EXTERNAL)->where('default', true)->first()) ], 'segments' => SegmentResource::collection($this->segments), diff --git a/public/images/alipay_logo.png b/public/images/alipay_logo.png new file mode 100644 index 00000000..5bd88d72 Binary files /dev/null and b/public/images/alipay_logo.png differ diff --git a/resources/assets/vue/components/banks/elements/BankAccountComponent.vue b/resources/assets/vue/components/banks/elements/BankAccountComponent.vue index 0585e4aa..54d01e04 100644 --- a/resources/assets/vue/components/banks/elements/BankAccountComponent.vue +++ b/resources/assets/vue/components/banks/elements/BankAccountComponent.vue @@ -11,7 +11,7 @@
-
{{item.type === 2 ? item.reference : item.company_business_type === 1 ? 'Company\'s Bank Account' : 'Personal Bank Account'}}
+
{{item.type === 2 ? item.reference : item.type === 4 ? 'Alipay' : item.company_business_type === 1 ? 'Company\'s Bank Account' : 'Personal Bank Account'}}
default
diff --git a/resources/assets/vue/components/bookings/elements/BookingConfirmationComponent.vue b/resources/assets/vue/components/bookings/elements/BookingConfirmationComponent.vue index 84cba3e6..29e664f0 100644 --- a/resources/assets/vue/components/bookings/elements/BookingConfirmationComponent.vue +++ b/resources/assets/vue/components/bookings/elements/BookingConfirmationComponent.vue @@ -105,7 +105,9 @@
- + + +
@@ -116,7 +118,7 @@
-
+
@@ -150,8 +152,9 @@
- + +
@@ -329,6 +332,21 @@ }, isOneSizEightEightOrder() { return this.oneSixEightEightServiceIds.includes(this.data.serviceType.id); + }, + isAlipayOrder() { + return this.data.serviceType.id === 11; + }, + filterBankType() { + if (this.isAlipayOrder) { + return [4]; + } + + if (!this.isAlipayOrder && !this.isOneSizEightEightOrder) { + return [1, 2]; + } + + + return []; } }, created(){ diff --git a/resources/assets/vue/components/bookings/forms/BookingPaymentQuotationComponent.vue b/resources/assets/vue/components/bookings/forms/BookingPaymentQuotationComponent.vue index 10246745..a3116164 100644 --- a/resources/assets/vue/components/bookings/forms/BookingPaymentQuotationComponent.vue +++ b/resources/assets/vue/components/bookings/forms/BookingPaymentQuotationComponent.vue @@ -61,7 +61,8 @@
-
+ +
-
{{item.bank.holder_name}} {{item.bank.type === 3 ? item.bank.account_no : item.bank.account_no.replace(/[^\dA-Z]/g, '').replace(/(.{4})/g, '$1 ').trim()}}
+
{{item.bank.holder_name}} {{[3, 4].includes(item.bank.type) ? item.bank.account_no : item.bank.account_no.replace(/[^\dA-Z]/g, '').replace(/(.{4})/g, '$1 ').trim()}}
-
+
{{item.bank.bank_name}} ({{item.bank.bank_branch}}) ({{item.bank.swift}})
diff --git a/resources/assets/vue/components/companies/elements/CompanyBankAccountComponent.vue b/resources/assets/vue/components/companies/elements/CompanyBankAccountComponent.vue index 913dd328..1b911592 100644 --- a/resources/assets/vue/components/companies/elements/CompanyBankAccountComponent.vue +++ b/resources/assets/vue/components/companies/elements/CompanyBankAccountComponent.vue @@ -11,7 +11,7 @@
-
{{item.type === 2 ? item.reference : item.company_business_type === 1 ? 'Company\'s Bank Account' : 'Personal Bank Account'}}
+
{{item.type === 2 ? item.reference : item.type === 4 ? 'Alipay' : item.company_business_type === 1 ? 'Company\'s Bank Account' : 'Personal Bank Account'}}