From: marina Date: Fri, 20 Dec 2024 08:50:01 +0000 (+0300) Subject: фиксы X-Git-Tag: 1.7~119^2~2 X-Git-Url: https://gitweb.erp-flowers.ru/?a=commitdiff_plain;h=58deaf6e4716cb643b323331cfa526d36d65ddae;p=erp24_rep%2Fyii-erp24%2F.git фиксы --- diff --git a/erp24/views/cron/1c.php b/erp24/views/cron/1c.php index 9e1b2e9d..f178ae8a 100644 --- a/erp24/views/cron/1c.php +++ b/erp24/views/cron/1c.php @@ -33,45 +33,52 @@ $items=array( //"prices"=>array("name"=>"Цены"), ); - -echo'
'; -echo ''; -foreach($items as $name => $ar) { - echo'
'.$ar["name"].''; - echo""; - foreach($ar["array"] ?? [] as $tip => $val) { -// if($name=="checks") $type="date"; else $type="text"; - echo''; - } - echo '
'.$tip.'
'; -} -echo'
'; -echo'

'; -$m=array(); -$request_id=time(); -$m["request_id"]=$request_id; -foreach($_POST["in"] ?? [] as $n => $array5) { - $m3=array(); - foreach($_POST["in_in"][$n] ?? [] as $t => $ar) { - $m[$n][$t]="".$ar; +$request_id = time(); +$m = array(); +$m["request_id"] = $request_id; + +if ($_SERVER['REQUEST_METHOD'] === 'POST' && isset($_POST["save"])) { + foreach ($_POST["in"] ?? [] as $n => $array5) { + $m3 = array(); + foreach ($_POST["in_in"][$n] ?? [] as $t => $ar) { + $m[$n][$t] = "" . $ar; + } + if (empty($m[$n])) { + $m[$n] = true; + } } - if(empty($m[$n])) $m[$n]=true; -} - -$json2=json_encode($m,JSON_UNESCAPED_UNICODE); -echo $json2; -if(!empty($_POST["in"]) and $json2!="[]") { + $json2 = json_encode($m, JSON_UNESCAPED_UNICODE); + if (!empty($_POST["in"]) && $json2 != "[]") { + $db::sql("INSERT INTO api_cron (date, date_up, status, json_post, request_id) VALUES (NOW(), NOW(), 0, ?, ?)", [$json2, $request_id]); + } - - $db::sql("INSERT INTO api_cron (date, date_up, status,json_post,request_id) VALUES (NOW(), NOW(), 0, ?, ?)",[$json2,$request_id]); - + header('Location: ' . $_SERVER['PHP_SELF']); + exit; } - +?> + +
+ + + $ar): ?> +
+ + $val): ?> + + + + + +
+ + +
+
+ +

+"ожидает выполнения",1=>"выполнено"]; $data = $db::getRows("SELECT * FROM api_cron WHERE 1=1 order by date DESC LIMIT 30 "); echo"

Здания для 1с

"; diff --git a/erp24/views/replacement-invoice/view.php b/erp24/views/replacement-invoice/view.php index 33c7f394..987cf935 100644 --- a/erp24/views/replacement-invoice/view.php +++ b/erp24/views/replacement-invoice/view.php @@ -20,7 +20,6 @@ $this->params['breadcrumbs'][] = $this->title; $model, 'attributes' => [ - 'id', 'guid', [ 'format' => 'raw', @@ -30,7 +29,12 @@ $this->params['breadcrumbs'][] = $this->title; } ], 'number', - 'number_1c', + [ + 'attribute' => 'number_1c', + 'value' => function ($model) { + return $model->number_1c ?? ''; + } + ], [ 'attribute' => 'status', 'value' => function ($model) { @@ -39,16 +43,22 @@ $this->params['breadcrumbs'][] = $this->title; ], [ 'attribute' => 'date', - 'format' => 'datetime', ], [ 'label' => 'Текст ошибки', 'attribute' => 'error_text', + 'value' => function ($model) { + return $model->error_text ?? ''; + } + ], + [ + 'attribute' => 'comment', + 'value' => function ($model) { + return $model->comment ?? ''; + } ], - 'comment', [ 'attribute' => 'created_at', - 'format' => 'datetime', ], [ 'format' => 'raw', @@ -109,7 +119,7 @@ $this->params['breadcrumbs'][] = $this->title; return $model->summ_self_cost ?? 'N/A'; }, ], - 'updated_at:datetime', + 'updated_at', [ 'attribute' => 'updated_admin_id', 'value' => function ($model) { diff --git a/erp24/web/js/shift-transfer/replacement.js b/erp24/web/js/shift-transfer/replacement.js index 1e15c059..cbf220b2 100644 --- a/erp24/web/js/shift-transfer/replacement.js +++ b/erp24/web/js/shift-transfer/replacement.js @@ -195,7 +195,7 @@ $('.field-shifttransfer-equalizationremains').on('input', '.list-cell__product_r return; } - if (quantity < 0) { + if (quantity <= 0) { alert('Количество не может быть отрицательным!'); $this.val(''); return; @@ -258,6 +258,7 @@ $('.field-shifttransfer-equalizationremains').on('input change', '.list-cell__pr var max = parseFloat($(inputElement).attr('max')); var value = parseFloat($(inputElement).val()); + setDynamicMaxValue(inputElement, rowId); if (value > max) {