diff --git a/app/Classes/Modules/Exports/Services/ExportsPaymentTransactions.php b/app/Classes/Modules/Exports/Services/ExportsPaymentTransactions.php index d63fc67b..ab1af2d0 100644 --- a/app/Classes/Modules/Exports/Services/ExportsPaymentTransactions.php +++ b/app/Classes/Modules/Exports/Services/ExportsPaymentTransactions.php @@ -60,7 +60,15 @@ class ExportsPaymentTransactions implements FromQuery, WithHeadings, WithHeading $query = Transaction::query(); - $query->where('type', TransactionType::SHIPPING_INVOICE)->whereIn('status', [ApprovalStatus::COMPLETED]); + // paidInvoiceSection + $approvalStatus = ApprovalStatus::COMPLETED; + + if ($this->request->route('section') == 'pendingPaymentSection') { + // pendingPaymentSection + $approvalStatus = ApprovalStatus::APPROVED; + } + + $query->where('type', TransactionType::SHIPPING_INVOICE)->whereIn('status', [$approvalStatus]); if($start_date && $end_date) { $query->whereBetween('updated_at', [ diff --git a/resources/assets/vue/components/paymentsBilling/elements/AdminPaymentsBillingWithSearchComponent.vue b/resources/assets/vue/components/paymentsBilling/elements/AdminPaymentsBillingWithSearchComponent.vue index cb683e08..746e6c71 100644 --- a/resources/assets/vue/components/paymentsBilling/elements/AdminPaymentsBillingWithSearchComponent.vue +++ b/resources/assets/vue/components/paymentsBilling/elements/AdminPaymentsBillingWithSearchComponent.vue @@ -1,25 +1,36 @@