From 3991ce3e9af0657cb1a73f05e23af519978e1653 Mon Sep 17 00:00:00 2001 From: drkthunder02 Date: Thu, 1 Apr 2021 20:43:29 +0900 Subject: [PATCH] updated paid payments from the wallet journal --- .../MiningTaxes/ProcessMiningTaxesPaymentsJob.php | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/app/Jobs/Commands/MiningTaxes/ProcessMiningTaxesPaymentsJob.php b/app/Jobs/Commands/MiningTaxes/ProcessMiningTaxesPaymentsJob.php index 033564416..a32bff349 100644 --- a/app/Jobs/Commands/MiningTaxes/ProcessMiningTaxesPaymentsJob.php +++ b/app/Jobs/Commands/MiningTaxes/ProcessMiningTaxesPaymentsJob.php @@ -17,7 +17,7 @@ use App\Library\Lookups\LookupHelper; //Models use App\Models\MiningTaxes\Invoice; use App\Models\MiningTaxes\Payment; -use App\Models\Finances\PlayerDonationJournal; +use App\Models\Finances\AllianceWalletJournal; class ProcessMiningTaxesPaymentsJob implements ShouldQueue { @@ -53,15 +53,17 @@ class ProcessMiningTaxesPaymentsJob implements ShouldQueue //as a reason foreach($outstanding as $invoice) { //See if we have a reason with the correct uniqid from the player donation journal - $found = PlayerDonationJournal::where([ + $found = AllianceWalletJournal::where([ 'reason' => "MMT: " . $invoice->invoice_id, ])->count(); //If we have received the invoice, then mark the invoice as paid if($count > 0) { //If we have the count, then grab the journal entry in order to do some things with it - $journal = PlayerDonationJournal::where([ + $journal = AllianceWalletJournal::where([ 'reason' => "MMT: " . $invoice->invoice_id, + ])->orWhere([ + 'reason' => $invoice->invoice_id, ])->first(); //If the bill is paid on time, then update the invoice as such