add transaction counter

This commit is contained in:
edmondlang
2024-06-26 23:52:25 +08:00
parent dfedb99c13
commit 17a4522f50
+4
View File
@@ -1273,6 +1273,7 @@ Route::get('/payment-and-billing-2', function () {
Route::get('/show-all-extra-payments', function () {
ini_set('memory_limit', '-1');
ini_set('max_execution_time', 0);
$transactionCounter = 0;
$invoices = Transaction::where('type', TransactionType::SHIPPING_INVOICE)
->where('status', ApprovalStatus::COMPLETED)
@@ -1302,6 +1303,7 @@ Route::get('/show-all-extra-payments', function () {
if (($paidAmount <= $invoice->amount) || ($paidAmount - $invoice->amount < 0.01)) {
continue;
}
$transactionCounter += 1;
echo '<tr>';
echo '<td>' . $invoice->type . '</td>';
@@ -1312,6 +1314,8 @@ Route::get('/show-all-extra-payments', function () {
echo '</tr>';
}
echo '</table>';
echo'<br> Total: ' . $transactionCounter;
});
Route::get('/segments', function (Request $request) {