]> gitweb.erp-flowers.ru Git - erp24_rep/yii-erp24/.git/commitdiff
ERP-85 Реализовать обмен данных с 1С Бухгалтерия
authormarina <m.zozirova@gmail.com>
Wed, 14 Aug 2024 06:43:49 +0000 (09:43 +0300)
committermarina <m.zozirova@gmail.com>
Wed, 14 Aug 2024 06:43:49 +0000 (09:43 +0300)
erp24/api2/controllers/DataBuhController.php

index 667dc153278db303b10ce719d6b99d933083a4a9..da404483aa9e413229e315295c947558b28f6b73 100644 (file)
@@ -11,8 +11,8 @@ use yii_app\records\ApiCronBuh;
 class DataBuhController extends BaseController
 {
     const OUT_DIR =
-//        __DIR__ . "/../json";
-        "/var/www/erp24/api2/json";
+//        DIR . "/../json";
+        "/var/www/erp24/api2/json_buh";
 //          "/var/www/www-root/data/www/api.bazacvetov24.ru/data/json";
 
     public function actionRequest() {
@@ -86,8 +86,8 @@ class DataBuhController extends BaseController
             $fl = time();
         }
 //        InfoLogService::setInfoLog(__FILE__, __LINE__, 'upload_' . $fl . '.json' , 'info_id_25_1');
-
-        file_put_contents(self::OUT_DIR . '/upload_' . $fl . '.json', PHP_EOL . $request);
+//
+//        file_put_contents(self::OUT_DIR . '/upload_' . $fl . '.json', PHP_EOL . $request);
 
         try {
 
@@ -103,7 +103,7 @@ class DataBuhController extends BaseController
             }
 
         } catch (Exception $e) {
-
+            file_put_contents(self::OUT_DIR . '/error_buh_upload.txt', PHP_EOL . 'result empty', FILE_APPEND);
         }
 
         return $this->asJson(['response' => true]);