From fbd56c2512f0828c75eff3bbfa84992ac2d86f0c Mon Sep 17 00:00:00 2001 From: Grisha Pomadchin Date: Tue, 27 Aug 2013 18:05:55 +0400 Subject: [PATCH] upd --- intaro.intarocrm/classes/general/RestApi.php | 10 +++++----- intaro.intarocrm/install/index.php | 11 ++++++----- intaro.intarocrm/install/version.php | 2 +- 3 files changed, 12 insertions(+), 11 deletions(-) diff --git a/intaro.intarocrm/classes/general/RestApi.php b/intaro.intarocrm/classes/general/RestApi.php index b8bbcf44..f4207900 100644 --- a/intaro.intarocrm/classes/general/RestApi.php +++ b/intaro.intarocrm/classes/general/RestApi.php @@ -308,7 +308,7 @@ class RestApi $dataJson = json_encode($deliveryType); $this->parameters['deliveryType'] = $dataJson; - $url = $this->apiUrl.'delivery-types/'.$deliveryType['code'].'/edit'; + $url = $this->apiUrl.'reference/delivery-types/'.$deliveryType['code'].'/edit'; $result = $this->curlRequest($url, 'POST'); return $result; } @@ -337,7 +337,7 @@ class RestApi $dataJson = json_encode($paymentType); $this->parameters['paymentType'] = $dataJson; - $url = $this->apiUrl.'payment-types/'.$paymentType['code'].'/edit'; + $url = $this->apiUrl.'reference/payment-types/'.$paymentType['code'].'/edit'; $result = $this->curlRequest($url, 'POST'); return $result; } @@ -366,7 +366,7 @@ class RestApi $dataJson = json_encode($paymentStatus); $this->parameters['paymentStatus'] = $dataJson; - $url = $this->apiUrl.'payment-statuses/'.$paymentStatus['code'].'/edit'; + $url = $this->apiUrl.'reference/payment-statuses/'.$paymentStatus['code'].'/edit'; $result = $this->curlRequest($url, 'POST'); return $result; } @@ -395,7 +395,7 @@ class RestApi $dataJson = json_encode($orderType); $this->parameters['orderType'] = $dataJson; - $url = $this->apiUrl.'order-types/'.$orderType['code'].'/edit'; + $url = $this->apiUrl.'reference/order-types/'.$orderType['code'].'/edit'; $result = $this->curlRequest($url, 'POST'); return $result; } @@ -423,7 +423,7 @@ class RestApi $dataJson = json_encode($status); $this->parameters['status'] = $dataJson; - $url = $this->apiUrl.'statuses/'.$status['code'].'/edit'; + $url = $this->apiUrl.'reference/statuses/'.$status['code'].'/edit'; $result = $this->curlRequest($url, 'POST'); return $result; } diff --git a/intaro.intarocrm/install/index.php b/intaro.intarocrm/install/index.php index f55fc3b1..c0a7c172 100755 --- a/intaro.intarocrm/install/index.php +++ b/intaro.intarocrm/install/index.php @@ -507,7 +507,7 @@ class intaro_intarocrm extends CModule else $finish = (int) $_POST['finish']; - $percent = 100 - round(($countLeft * 100 / $countAll), 1); + $percent = round(100 - ($countLeft * 100 / $countAll), 1); if(!$countLeft) $finish = 1; @@ -601,10 +601,11 @@ class intaro_intarocrm extends CModule ))); // error pushing customer - if (($this->INTARO_CRM_API->getStatusCode() != 200) - || ($this->INTARO_CRM_API->getStatusCode() != 201)) { - //handle err - ICrmOrderActions::eventLog('install/index.php', 'IntaroCrm\RestApi::deliveryTypeEdit', $this->INTARO_CRM_API->getLastError()); + if ($this->INTARO_CRM_API->getStatusCode() != 200) { + if ($this->INTARO_CRM_API->getStatusCode() != 201) { + //handle err + ICrmOrderActions::eventLog('install/index.php', 'IntaroCrm\RestApi::deliveryTypeEdit', $this->INTARO_CRM_API->getLastError()); + } } } while ($arDeliveryTypesList = $dbDeliveryTypesList->Fetch()); diff --git a/intaro.intarocrm/install/version.php b/intaro.intarocrm/install/version.php index 7f630053..56978304 100755 --- a/intaro.intarocrm/install/version.php +++ b/intaro.intarocrm/install/version.php @@ -1,5 +1,5 @@ "0.3.9", - "VERSION_DATE" => "2013-08-21 18:32:00", + "VERSION_DATE" => "2013-08-27 18:00:00", ); \ No newline at end of file