mining operations

This commit is contained in:
2021-06-07 20:06:17 +09:00
parent bd03a983a2
commit cd0710c428

View File

@@ -68,15 +68,17 @@ class ProcessAllianceMiningOperations implements ShouldQueue
$ledgers = Ledger::where([ $ledgers = Ledger::where([
'observer_id' => $operation->structure_id, 'observer_id' => $operation->structure_id,
'invoiced' => 'No', 'invoiced' => 'No',
'last_updated' => $operation->operation_date,
])->get(); ])->get();
foreach($ledgers as $ledger) { foreach($ledgers as $ledger) {
Ledger::where([ Ledger::where([
'observer_id' => $operation->structure_id, 'observer_id' => $operation->structure_id,
'invoiced' => 'No', 'invoiced' => 'No',
'last_updated' => $operation->operation_date,
])->update([ ])->update([
'invoiced' => 'Yes', 'invoiced' => 'Yes',
'invoice_id' => 'MiningOp ' . $operation->id, 'invoice_id' => 'MiningOp' . $operation->id,
]); ]);
} }