From: Aleksey Filippov Date: Sat, 4 May 2024 06:42:19 +0000 (+0300) Subject: правки по загрузке данных из АМО X-Git-Tag: 1.1~55^2~1 X-Git-Url: https://gitweb.erp-flowers.ru/?a=commitdiff_plain;h=249eeaba2376fc1c5997a1fad89628b2b2144e59;p=erp24_rep%2Fyii-erp24%2F.git правки по загрузке данных из АМО --- diff --git a/erp24/api1/views/cron/amo142.php b/erp24/api1/views/cron/amo142.php index 71becc54..16071a44 100644 --- a/erp24/api1/views/cron/amo142.php +++ b/erp24/api1/views/cron/amo142.php @@ -8,11 +8,6 @@ include_once(dirname(__DIR__, 3) . "/inc/uni.php"); include_once(dirname(__DIR__, 3) . "/inc/uni2.php"); -if ($_GET["token_cloud"]!="iC04295J9HyD2H3GJF3btky") { - var_dump($_GET); - echo ' test 11 ' . time(); - exit('234'); -} // https://api.bazacvetov24.ru/cron/amo142/?token_cloud=iC04295J9HyD2H3GJF3btky @@ -188,7 +183,7 @@ $date1=time()-86400*$n; $date2=time()-86400*($n-1); //$date1=mktime(0,0,0,2,28,2022); //$date2=mktime(0,0,0,3,1,2022); -$limiter=25; +$limiter=1000; $status_amo=142; if(!empty($_REQUEST["limit"])) $limiter=intval($_REQUEST["limit"]); @@ -350,7 +345,7 @@ $delivery__date .='&filter[custom_fields_values][647935][from]='.$unix_delivery_ //print_r($deal0); - if (!array_key_exists("_embedded", $deal0)) { + if (empty($deal0) || !array_key_exists("_embedded", $deal0)) { echo "

"; echo print_r($deal0); echo ' ' . __FILE__ . ' ' . __LINE__ . ' '; diff --git a/erp24/modul/orders/delivery.php b/erp24/modul/orders/delivery.php index fa4e2cbc..22bd97e5 100644 --- a/erp24/modul/orders/delivery.php +++ b/erp24/modul/orders/delivery.php @@ -266,6 +266,8 @@ WHERE $where AND delivery_date <= NOW() order by delivery_date DESC, updated_at $data = $db::getRows("SELECT *, TO_CHAR(delivery_date, 'DD.MM.YYYY') as dated FROM orders_amo WHERE $where AND delivery_date <= NOW() order by delivery_date DESC, updated_at DESC LIMIT 1750"); +echo"
всего " . count($data) . ""; + echo""; $cnt = $cnt ?? 0; $in_orders = [];