diff --git a/app/Classes/Jobs/Commands/V2/OneTimeTransactionFixBillplzFailedCbV2CommandJob.php b/app/Classes/Jobs/Commands/V2/OneTimeTransactionFixBillplzFailedCbV2CommandJob.php index 92ff26bf..7c68d2f7 100644 --- a/app/Classes/Jobs/Commands/V2/OneTimeTransactionFixBillplzFailedCbV2CommandJob.php +++ b/app/Classes/Jobs/Commands/V2/OneTimeTransactionFixBillplzFailedCbV2CommandJob.php @@ -8,6 +8,7 @@ use Illuminate\Contracts\Queue\ShouldQueue; use Illuminate\Foundation\Bus\Dispatchable; use Illuminate\Queue\InteractsWithQueue; use Illuminate\Queue\SerializesModels; +use App\Classes\Modules\Billplzs\Processors\CallbackBillplzProcessor; use App\Classes\Modules\Billplzs\Processors\CallbackBillplzDataPatchProcessor; use App\Classes\ValueObjects\Constants\ApprovalStatus; use App\Models\Transaction; @@ -19,26 +20,26 @@ class OneTimeTransactionFixBillplzFailedCbV2CommandJob implements ShouldQueue public function handle() { - Log::info(Carbon::now() . ': Start job - One time fix failled callback from billplz for transaction with id 17310 cron ended.'); + Log::info(Carbon::now() . ': Start job - One time fix failled callback from billplz cron ended.'); $start = new Carbon(); - // ini_set('memory_limit', '-1'); - - //Transaction fix with this one time fix command: 15205, 16803, 17310 + //Transaction fix with this one time fix command: 15205, 16803, 17310, 22008, 6770 //This transaction, 16803 has approve payment but not its owner, shipping invoice - $transaction = Transaction::whereIn('id', [17310])->first(); - Log::info(Carbon::now() . ' : One time fix failled callback from billplz for transaction with id 17310 cron started.'); + $transactions = Transaction::whereIn('id', [22008, 6770])->get(); + Log::info(Carbon::now() . ' : One time fix failled callback from billplz started.'); - if($transaction && $transaction->id == 17310){ + foreach ($transactions as $transaction){ + if($transaction){ - Log::info(Carbon::now() . ' : 17310.'); - $status = ApprovalStatus::APPROVED; - // $this->callbackBillplzProcessor->execute($transaction, $status); - (App()->make(CallbackBillplzDataPatchProcessor::class))->execute($transaction, $status); + Log::info(Carbon::now() . ' : '.$transaction->id); + $status = ApprovalStatus::APPROVED; + (App()->make(CallbackBillplzProcessor::class))->execute($transaction, $status); + // (App()->make(CallbackBillplzDataPatchProcessor::class))->execute($transaction, $status); + } } $end = new Carbon(); $elapsedTime = $start->diff($end)->format('%H:%I:%S'); - Log::info(Carbon::now() . ': End job - One time fix failled callback from billplz for transaction with id 17310 cron ended. ElapsedTime: ' . $elapsedTime . '.'); + Log::info(Carbon::now() . ': End job - One time fix failled callback from billplz cron ended. ElapsedTime: ' . $elapsedTime . '.'); } } diff --git a/app/Classes/Modules/Orders/ControllersLogic/CreateSupplierTaxRebateLogic.php b/app/Classes/Modules/Orders/ControllersLogic/CreateSupplierTaxRebateLogic.php index 648f5b4a..7c01d501 100644 --- a/app/Classes/Modules/Orders/ControllersLogic/CreateSupplierTaxRebateLogic.php +++ b/app/Classes/Modules/Orders/ControllersLogic/CreateSupplierTaxRebateLogic.php @@ -24,8 +24,8 @@ class CreateSupplierTaxRebateLogic extends AbstractControllerLogic protected function notification(): array { return [ - 'title' => 'Create Supplier Tax Rebate', - 'message' => 'You have successfully created a Supplier Tax Rebate' + 'title' => 'Create Supplier Tax Refund', + 'message' => 'You have successfully created a Supplier Tax Refund' ]; } diff --git a/app/Classes/Modules/Orders/ControllersLogic/DeleteSupplierTaxRebateLogic.php b/app/Classes/Modules/Orders/ControllersLogic/DeleteSupplierTaxRebateLogic.php index ab2adcb8..cac68997 100644 --- a/app/Classes/Modules/Orders/ControllersLogic/DeleteSupplierTaxRebateLogic.php +++ b/app/Classes/Modules/Orders/ControllersLogic/DeleteSupplierTaxRebateLogic.php @@ -17,8 +17,8 @@ class DeleteSupplierTaxRebateLogic extends AbstractControllerLogic protected function notification(): array { return [ - 'title' => 'Delete Supplier Tax Rebate', - 'message' => 'You have successfully deleted a Supplier Tax Rebate' + 'title' => 'Delete Supplier Tax Refund', + 'message' => 'You have successfully deleted a Supplier Tax Refund' ]; } diff --git a/app/Classes/Modules/Transactions/Processors/ReleaseGoodsToCustomerProcessor.php b/app/Classes/Modules/Transactions/Processors/ReleaseGoodsToCustomerProcessor.php index c00bad32..3d23f50d 100644 --- a/app/Classes/Modules/Transactions/Processors/ReleaseGoodsToCustomerProcessor.php +++ b/app/Classes/Modules/Transactions/Processors/ReleaseGoodsToCustomerProcessor.php @@ -61,6 +61,8 @@ class ReleaseGoodsToCustomerProcessor $invoiceTransactions = $packingList->transactions()->where('status', ApprovalStatus::APPROVED)->whereIn('type', [TransactionType::SHIPPING_INVOICE, TransactionType::STORAGE_INVOICE])->get(); } + LogHelper::channel('storage_invoices')->info('invoiceTransactions: '. json_encode($invoiceTransactions)); + //Part 1: Process each single invoice type and get the total of all invoices (STORAGE + SHIPPING) foreach($invoiceTransactions as $invoiceTransaction){ $totalInvoiceAmountPaid = $invoiceTransaction->transactions->where('type', TransactionType::PAYMENT)->whereIn('status', [ApprovalStatus::APPROVED, ApprovalStatus::COMPLETED])->sum('amount'); diff --git a/app/Http/Controllers/Orders/DownloadTaxRebateQrPdfController.php b/app/Http/Controllers/Orders/DownloadTaxRebateQrPdfController.php index c91b056b..57904485 100644 --- a/app/Http/Controllers/Orders/DownloadTaxRebateQrPdfController.php +++ b/app/Http/Controllers/Orders/DownloadTaxRebateQrPdfController.php @@ -65,7 +65,7 @@ class DownloadTaxRebateQrPdfController $supplierTaxRebate = SupplierTaxRebate::where('reference_number', $tax_rebate_refeerence)->first(); if (!$supplierTaxRebate) { // If not found, throw an error - abort(404, 'Supplier Tax Rebate not found'); + abort(404, 'Supplier Tax Refund not found'); } $data = [ diff --git a/resources/assets/vue/components/companies/elements/NewServiceAnnouncementComponent.vue b/resources/assets/vue/components/companies/elements/NewServiceAnnouncementComponent.vue index 9f69a28e..66ce9ffa 100644 --- a/resources/assets/vue/components/companies/elements/NewServiceAnnouncementComponent.vue +++ b/resources/assets/vue/components/companies/elements/NewServiceAnnouncementComponent.vue @@ -2,7 +2,7 @@
A Tax Rebate QR Code allows suppliers to claim tax rebates.
We need some additional information for this
+
A Tax Refund QR Code allows suppliers to claim tax refunds.
We need some additional information for this
service.
联络人: {{$supplierTaxRebate['supplier_name']}}
联络号码: {{$supplierTaxRebate['supplier_contact_number']}}
- +