From db49d0f4b51f7a67cd548241a6b51ecf84f46166 Mon Sep 17 00:00:00 2001
From: Ibnu Maksum <ibnumaksum@gmail.com>
Date: Fri, 23 Feb 2024 14:57:00 +0700
Subject: [PATCH] Fix variable customer

---
 system/controllers/prepaid.php | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/system/controllers/prepaid.php b/system/controllers/prepaid.php
index 1936b98a..07f2bd95 100644
--- a/system/controllers/prepaid.php
+++ b/system/controllers/prepaid.php
@@ -145,9 +145,9 @@ switch ($action) {
         $in = ORM::for_table('tbl_transactions')->where('id', $id)->find_one();
         $ui->assign('in', $in);
         if (!empty($routes['3']) && $routes['3'] == 'send') {
-            $c = ORM::for_table('tbl_customers')->where('username', $d['username'])->find_one();
+            $c = ORM::for_table('tbl_customers')->where('username', $in['username'])->find_one();
             if ($c) {
-                Message::sendInvoice($c, $d);
+                Message::sendInvoice($c, $in);
                 r2(U . 'prepaid/view/' . $id, 's', "Success send to customer");
             }
             r2(U . 'prepaid/view/' . $id, 'd', "Customer not found");