From 1ffbd6116255d22ad264e5e0f27e1f3639634ea1 Mon Sep 17 00:00:00 2001 From: iyzoer Date: Thu, 18 May 2017 09:11:53 +0300 Subject: [PATCH] rename vars --- admin/model/extension/retailcrm/history.php | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/admin/model/extension/retailcrm/history.php b/admin/model/extension/retailcrm/history.php index 537ae34..35755e0 100644 --- a/admin/model/extension/retailcrm/history.php +++ b/admin/model/extension/retailcrm/history.php @@ -44,19 +44,19 @@ class ModelExtensionRetailcrmHistory extends Model ? new DateTime($history['retailcrm_history']) : new DateTime(date('Y-m-d H:i:s', strtotime('-1 days', strtotime(date('Y-m-d H:i:s'))))); - $packs = $crm->ordersHistory(array( + $packsOrders = $crm->ordersHistory(array( 'startDate' => $lastRun->format('Y-m-d H:i:s'), ), 1, 100); $packsCustomers = $crm->customersHistory(array( 'startDate' => $lastRun->format('Y-m-d H:i:s'), ), 1, 100); - if(!$packs->isSuccessful() && count($packs->history) <= 0 && !$packsCustomers->isSuccessful() && count($Customers->history) <= 0) + if(!$packsOrders->isSuccessful() && count($packsOrders->history) <= 0 && !$packsCustomers->isSuccessful() && count($Customers->history) <= 0) return false; - $orders = RetailcrmHistoryHelper::assemblyOrder($packs->history); + $orders = RetailcrmHistoryHelper::assemblyOrder($packsOrders->history); $customers = RetailcrmHistoryHelper::assemblyCustomer($packsCustomers->history); - $generatedAt = $packs['generatedAt']; + $generatedAt = $packsOrders['generatedAt']; $this->subtotalSettings = $this->model_setting_setting->getSetting('sub_total'); $this->totalSettings = $this->model_setting_setting->getSetting('total');