]> gitweb.erp-flowers.ru Git - erp24_rep/yii-erp24/.git/commitdiff
payment pretty print origin/feature_smirnov_20250424_sales_checks
authorAlexander Smirnov <fredeom@mail.ru>
Thu, 24 Apr 2025 13:34:58 +0000 (16:34 +0300)
committerAlexander Smirnov <fredeom@mail.ru>
Thu, 24 Apr 2025 13:34:58 +0000 (16:34 +0300)
erp24/modul/sales_checks/index.php

index acdfada889b3120fe4cb146a8edeb6c1c725a772..bf3d0b340e11c6fb30bee36bba35faec5914097e 100644 (file)
@@ -115,7 +115,15 @@ if(!empty($row["phone"])) echo'бонусная <a href="/bonus/bonus-users/?sea
 
 if(!empty($row["order_id"])) echo'заказ с сайта '.$row["order_id"].'';
 
-echo'</td><td>'.$row["payments"].'</td>
+$decodedJson = json_decode($row["payments"], true);
+$out = '';
+if ($decodedJson === null && json_last_error() !== JSON_ERROR_NONE) {
+    $out = 'Ошибка в JSON';
+} else {
+    $out = json_encode($decodedJson, JSON_PRETTY_PRINT | JSON_UNESCAPED_UNICODE);
+}
+
+echo'</td><td><details>'.\yii\helpers\Html::tag('pre', $out) . '</details></td>
 
 
 </tr>';