1
0
mirror of synced 2024-11-22 05:16:09 +03:00

history fix & new version

This commit is contained in:
Grisha Pomadchin 2014-03-13 12:07:52 +04:00
parent b16af9db1f
commit 2f309dee4a
2 changed files with 5 additions and 7 deletions

View File

@ -368,9 +368,9 @@ class ICrmOrderActions
$dateStart = $dateStart->format('Y-m-d H:i:s');
}
$orderHistory = $api->orderHistory($dateStart);
$dateFinish = new \DateTime();
$dateStart = new \DateTime($dateStart);
$orderHistory = $api->orderHistory($dateStart);
// pushing existing orders
foreach ($orderHistory as $order) {
@ -866,13 +866,11 @@ class ICrmOrderActions
// set PAYED
if($optionsPayment[$order['paymentStatus']])
CSaleOrder::PayOrder($order['externalId'], $optionsPayment[$order['paymentStatus']]);
$dateStart = new \DateTime();
}
}
if(count($orderHistory))
COption::SetOptionString(self::$MODULE_ID, self::$CRM_ORDER_HISTORY_DATE, $dateStart->format('Y-m-d H:i:s'));
COption::SetOptionString(self::$MODULE_ID, self::$CRM_ORDER_HISTORY_DATE, $dateFinish->format('Y-m-d H:i:s'));
$USER->Logout();
if($realUser) $USER->Authorize($realUser);

View File

@ -1,5 +1,5 @@
<?
$arModuleVersion = array(
"VERSION" => "0.5.3",
"VERSION_DATE" => "2014-01-28 12:55:00",
"VERSION" => "1.0.1",
"VERSION_DATE" => "2014-03-13 11:57:00",
);