diff --git a/app/Classes/Modules/Bookings/ControllersLogic/AutoPurchaseOrderFillLogic.php b/app/Classes/Modules/Bookings/ControllersLogic/AutoPurchaseOrderFillLogic.php index 5e65c6a4..7283548d 100644 --- a/app/Classes/Modules/Bookings/ControllersLogic/AutoPurchaseOrderFillLogic.php +++ b/app/Classes/Modules/Bookings/ControllersLogic/AutoPurchaseOrderFillLogic.php @@ -65,7 +65,7 @@ class AutoPurchaseOrderFillLogic extends AbstractControllerLogic public function logic(Request $request) : JsonResponse { $bookings = Booking::where(function($query){ - return $query->whereMonth('created_at', 01)->orWhereMonth('created_at', 02); + return $query->whereMonth('created_at', 03)->orWhereMonth('created_at', 04); })->whereDoesntHave('transactions', function($q){ $q->where('type', TransactionType::PURCHASE_ORDER); $q->whereIn('status', [ApprovalStatus::PENDING_VERIFICATION, ApprovalStatus::APPROVED]); diff --git a/app/Classes/Modules/Exports/Services/ExportsCustomers.php b/app/Classes/Modules/Exports/Services/ExportsCustomers.php index 1972935e..9f314030 100644 --- a/app/Classes/Modules/Exports/Services/ExportsCustomers.php +++ b/app/Classes/Modules/Exports/Services/ExportsCustomers.php @@ -7,21 +7,26 @@ use App\Classes\ValueObjects\Constants\CompanyType; use App\Models\Company; use Maatwebsite\Excel\Concerns\Exportable; use Maatwebsite\Excel\Concerns\FromQuery; +use Maatwebsite\Excel\Concerns\ShouldAutoSize; use Maatwebsite\Excel\Concerns\WithHeadingRow; +use Maatwebsite\Excel\Concerns\WithHeadings; use Maatwebsite\Excel\Concerns\WithMapping; -class ExportsCustomers implements FromQuery, WithHeadingRow, WithMapping +class ExportsCustomers implements FromQuery, WithHeadings, WithHeadingRow, WithMapping, ShouldAutoSize { - use Exportable; public function headings(): array { return [ 'Marking', - 'Name', + 'Company Name', + 'Email', + 'Account Name', + 'Phone Number', 'Business type', 'Number of bookings', + 'Last booking Date', 'Bookings total', 'Registration Date', 'System Registration' @@ -44,13 +49,18 @@ class ExportsCustomers implements FromQuery, WithHeadingRow, WithMapping public function map($company): array { + $employee = $company->employees()->first(); + $lastBooking = $company->bookings()->orderByDesc('id')->first(); + return [ $company->reference, $company->name, - $company->employees()->first() ? $company->employees()->first()->name : '', + $employee ? $employee->email : '', + $employee ? $employee->name : '', $company->contacts()->first() ? $company->contacts()->first()->phone : '', $company->type === CompanyType::COMPANY_BUSINESS ? 'Company' : 'individual', count($company->bookings), + $lastBooking ? $lastBooking->created_at : '', $company->bookings()->sum('fix_amount'), \PhpOffice\PhpSpreadsheet\Shared\Date::dateTimeToExcel($company->created_at), count($company->segments()->where('segment_id', '=', 5)->get()) ? 'Exchange 1.0' : 'Exchange 2.0' diff --git a/app/Classes/Modules/Transactions/Processors/CreateSupplierTransactionProcessor.php b/app/Classes/Modules/Transactions/Processors/CreateSupplierTransactionProcessor.php index db443184..65a52d99 100644 --- a/app/Classes/Modules/Transactions/Processors/CreateSupplierTransactionProcessor.php +++ b/app/Classes/Modules/Transactions/Processors/CreateSupplierTransactionProcessor.php @@ -97,7 +97,7 @@ class CreateSupplierTransactionProcessor $this->pushBill($billTransaction); $transferFeeNumber = $this->generatesTransactionBillNumber->execute('TRFR-'); - $transferFee = $this->calculatesTransactionTransferFee->execute($billTransaction->amount, $constant); + $transferFee = $this->calculatesTransactionTransferFee->execute($billTransaction->original_amount, $constant); $object = new TransactionObject($transferFeeNumber, TransactionType::TRANSFER_FEE, 1, $supplier->id, $supplier->banks()->where('default', true)->first()->id, PaymentMethodType::CASH, $payment->original_amount, $payment->original_amount, $payment->original_currency_id, $payment->original_currency_id, diff --git a/resources/assets/images/1688_approved.png b/resources/assets/images/1688_approved.png new file mode 100644 index 00000000..4275de56 Binary files /dev/null and b/resources/assets/images/1688_approved.png differ diff --git a/resources/assets/images/best-rate-300x127.png b/resources/assets/images/best-rate-300x127.png new file mode 100644 index 00000000..c5e9b1c8 Binary files /dev/null and b/resources/assets/images/best-rate-300x127.png differ diff --git a/resources/assets/vue/components/banks/forms/PhoneAccountFormComponent.vue b/resources/assets/vue/components/banks/forms/PhoneAccountFormComponent.vue index dfec0ddb..76401d2b 100644 --- a/resources/assets/vue/components/banks/forms/PhoneAccountFormComponent.vue +++ b/resources/assets/vue/components/banks/forms/PhoneAccountFormComponent.vue @@ -14,18 +14,10 @@ {{error}} -
-
- - - - -
-
- +
@@ -33,20 +25,17 @@
- +
-
+
-
Warning: We do not encourage to transfer to non-chinese recipient Alipay account ! Proceed Anyway.
-
-
-

Foreign name alipay may exceed Monthly / Yearly Limit , and may be unable to withdraw your funds out.

-
-
-
The risk is too high. I changed my mind.
+ + + +
@@ -54,7 +43,7 @@
{{disabled ? 'Change Recipient Account' : 'Cancel'}}
- +
@@ -102,7 +91,7 @@ bank_name: '-', holder_name: '', account_no: '', - bank_branch: '-', + bank_branch: '', country_id: this.country_id, }, englishTextWarning: false, @@ -117,15 +106,15 @@ account_no: { required }, - reference: { - required: requiredIf(function () { return this.parameters.type === 2 }) + bank_branch: { + required } } }, methods: { submitForm(){ - this.parameters.account_type = 3, - this.parameters.bank_name = '-', + this.parameters.account_type = 3; + this.parameters.bank_name = '-'; this.submit(route('api.bank.create'), 'post', this.section, true, false); }, successHandler(response){ diff --git a/resources/assets/vue/components/bookings/elements/BookingConfirmationComponent.vue b/resources/assets/vue/components/bookings/elements/BookingConfirmationComponent.vue index 26c036b7..e04d0bfb 100644 --- a/resources/assets/vue/components/bookings/elements/BookingConfirmationComponent.vue +++ b/resources/assets/vue/components/bookings/elements/BookingConfirmationComponent.vue @@ -73,7 +73,7 @@
-
+
@@ -103,7 +103,7 @@
- +
diff --git a/resources/assets/vue/components/bookings/forms/BookingFormComponent.vue b/resources/assets/vue/components/bookings/forms/BookingFormComponent.vue index 4ce30e7d..4d739aa5 100644 --- a/resources/assets/vue/components/bookings/forms/BookingFormComponent.vue +++ b/resources/assets/vue/components/bookings/forms/BookingFormComponent.vue @@ -1,6 +1,7 @@