created simplified mining tax invoice

This commit is contained in:
2021-05-25 00:33:02 +09:00
parent ec50817657
commit 75a72826fd

View File

@@ -85,6 +85,7 @@ class TestController extends Controller
*/
foreach($mains as $main) {
//Declare some variables for each run through the for loop
$ledge = array();
$ledgers = new Collection;
$mainLedgers = new Collection;
$mainLedgerCount = 0;
@@ -105,14 +106,20 @@ class TestController extends Controller
//Cycle through the entries, and add them to the ledger to send with the invoice
foreach($mainLedgers as $row) {
$ledgers->push([
$ledge = [
'character_id' => $row->character_id,
'character_name' => $row->character_name,
'type_id' => $row->type_id,
'ore_name' => $row->ore_name,
'quantity' => $row->quantity,
'amount' => $row->amount,
]);
];
if($ledgers->empty()) {
$ledgers->collect($ledge);
} else {
$ledgers->push($ledge);
}
}
}