From 9f78a8a075a406633d88b74df66bd1130e662359 Mon Sep 17 00:00:00 2001 From: odiea Date: Thu, 28 Mar 2024 02:45:55 -0600 Subject: [PATCH] Changes to Cash_up and Cash_ups for better date feature and Table view to show data (#3958) * Update Cashup.php If(!count_only) was causing the table view to not show properly. * Update Cashups.php empty it must not be. --- app/Controllers/Cashups.php | 2 +- app/Models/Cashup.php | 9 +-------- 2 files changed, 2 insertions(+), 9 deletions(-) diff --git a/app/Controllers/Cashups.php b/app/Controllers/Cashups.php index 383cf3e94..7cea074be 100644 --- a/app/Controllers/Cashups.php +++ b/app/Controllers/Cashups.php @@ -95,7 +95,7 @@ class Cashups extends Secure_Controller } // open cashup - if(empty($cash_ups_info->cashup_id)) + if($cash_ups_info->cashup_id < 0) { $cash_ups_info->open_date = date('Y-m-d H:i:s'); $cash_ups_info->close_date = $cash_ups_info->open_date; diff --git a/app/Models/Cashup.php b/app/Models/Cashup.php index e9cda5b91..17816df4b 100644 --- a/app/Models/Cashup.php +++ b/app/Models/Cashup.php @@ -98,14 +98,7 @@ class Cashup extends Model if($count_only) { $builder->select('COUNT(cash_up.cashup_id) as count'); - } - - if(!$count_only) - { - $builder->select(' - cash_up.cashup_id, - '); - } + } else { $builder->select('