From f41423e5d705241b0f57d7060e824b8c84859239 Mon Sep 17 00:00:00 2001 From: denisdulici Date: Sat, 1 Dec 2018 15:14:29 +0300 Subject: [PATCH] not using --- tests/Feature/Banking/Transaction.php | 92 --------------------------- 1 file changed, 92 deletions(-) delete mode 100644 tests/Feature/Banking/Transaction.php diff --git a/tests/Feature/Banking/Transaction.php b/tests/Feature/Banking/Transaction.php deleted file mode 100644 index 75465d7f4..000000000 --- a/tests/Feature/Banking/Transaction.php +++ /dev/null @@ -1,92 +0,0 @@ -get(); - - foreach ($bills as $bill) { - $bill_payments = $bill->payments; - - if ($bill_payments) { - foreach ($bill_payments as $bill_payment) { - $transactions[] = (object) [ - 'date' => $bill_payment->paid_at, - 'account' => $bill_payment->account->name, - 'type' => trans('invoices.status.partial'), - 'category' => trans_choice('general.invoices', 1), - 'description' => $bill_payment->description, - 'amount' => $bill_payment->amount, - 'currency_code' => $bill_payment->currency_code, - ]; - } - } - } - - $payments = Payment::where('vendor_id', $user_id)->get(); - - foreach ($payments as $payment) { - $transactions[] = (object) [ - 'date' => $payment->paid_at, - 'account' => $payment->account->name, - 'type' => 'Expense', - 'category' => $payment->category->name, - 'description' => $payment->description, - 'amount' => $payment->amount, - 'currency_code' => $payment->currency_code, - ]; - } - break; - case 'revenues': - $invoices = Invoice::where('customer_id', $user_id)->get(); - - foreach ($invoices as $invoice) { - $invoice_payments = $invoice->payments; - - if ($invoice_payments) { - foreach ($invoice_payments as $invoice_payment) { - $transactions[] = (object) [ - 'date' => $invoice_payment->paid_at, - 'account' => $invoice_payment->account->name, - 'type' => trans('invoices.status.partial'), - 'category' => trans_choice('general.invoices', 1), - 'description' => $invoice_payment->description, - 'amount' => $invoice_payment->amount, - 'currency_code' => $invoice_payment->currency_code, - ]; - } - } - } - - $revenues = Revenue::where('customer_id', $user_id)->get(); - - foreach ($revenues as $revenue) { - $transactions[] = (object) [ - 'date' => $revenue->paid_at, - 'account' => $revenue->account->name, - 'type' => trans_choice('general.payments', 1), - 'category' => $revenue->category->name, - 'description' => $revenue->description, - 'amount' => $revenue->amount, - 'currency_code' => $revenue->currency_code, - ]; - } - break; - } - - return $transactions; - } -}