]> gitweb.erp-flowers.ru Git - erp24_rep/yii-erp24/.git/commitdiff
shipment index
authorAlexander Smirnov <fredeom@mail.ru>
Wed, 17 Apr 2024 11:05:37 +0000 (14:05 +0300)
committerAlexander Smirnov <fredeom@mail.ru>
Wed, 17 Apr 2024 11:05:37 +0000 (14:05 +0300)
erp24/controllers/ShipmentController.php
erp24/modul/shipment/divisionStore.php
erp24/modul/shipment/divisionStorePrint.php
erp24/modul/shipment/index.php
erp24/modul/shipment/storeOrderScore.php
erp24/views/shipment/division-store-print.php [new file with mode: 0644]
erp24/views/shipment/division-store.php [new file with mode: 0644]
erp24/views/shipment/store-order-score.php [new file with mode: 0644]

index 31ab8c648dd9feae61d41d8098619bb8efa7d63d..4c41495b8c5068e8d80d9c06a2aa74130b071593 100755 (executable)
@@ -16,4 +16,7 @@ class ShipmentController extends Controller
     //public function actionAdd() { return $this->render('add'); }
     public function actionStoreOrders() { return $this->render('store-orders'); }
     public function actionShipment() { return $this->render('shipment'); }
+    public function actionDivisionStore() { return $this->render('division-store'); }
+    public function actionDivisionStorePrint() { return $this->render('division-store-print'); }
+    public function actionStoreOrderScore() { return $this->render('store-order-score'); }
 }
\ No newline at end of file
index f42201cf61182501bdfd9e987214f3a33e4e180b..ff202f2a4302d8292548aff576f5fd369a8fd017 100644 (file)
@@ -1,19 +1,18 @@
-<?
-include_once("startup.php");
-include_once("inc/db.php");
-include_once("inc/base_new.php");
-include_once("inc/design_new.php");
-//include_once("inc/shipment.php");
-include"templates/top.php";
-if(!empty($_REQUEST["id"])) { 
-$orderId=(int)$_REQUEST["id"]; 
+<?php
+include_once(dirname(__DIR__, 2) . "/startup.php");
+include_once(dirname(__DIR__, 2) . "/inc/db.php");
+include_once(dirname(__DIR__, 2) . "/inc/base_new.php");
+include_once(dirname(__DIR__, 2) . "/inc/design_new.php");
 
-include"modul/shipment/functionsShipment.php";
+if(!empty($_REQUEST["id"])) {
+$orderId=(int)$_REQUEST["id"];
+
+include_once(__DIR__ . "/functionsShipment.php");
 
 
  
 
-if($OrderData["status"]==6) {
+if(($OrderData["status"] ?? 0) ==6) {
 
 
 
@@ -31,7 +30,7 @@ if($OrderData["status"]==6) {
 ]; 
 
 
-$dateup=$db::getRow("SELECT extract(epoch FROM  date_update) as date_update,   date_update as date_update2
+$dateup=$db::getRow("SELECT extract(epoch from date_update) as date_update,   date_update as date_update2
  FROM store_orders_fields_data WHERE 
 order_id=? AND field_name IN ('quantity_zakup_new','division_store_ratio','division_store','division_store_hand','division_store_summ','storehouse_balance_store')
 AND value!=0 order by date_update DESC LIMIT 1",[$orderId]);
@@ -127,9 +126,14 @@ echo'
  
 printRelatedOrders();
 
+echo"
+
+
+";
+
 
 echo"<div id=\"edit_div\"></div><div class=\"table-responsive\">
-<table class=\"table-hover zak\"><thead><tr class=\"zag\">
+<table class=\"table-hover zak\"><thead ><tr class=\"zag\">
 
 <th class=\"td_product\">
 <br> 
@@ -459,6 +463,7 @@ input.editColor{width:auto;max-width:70px;}
 </style>'; 
 
 
+
        $_CONFIG["jscss"] .='<!-- MODAL -->
                <div class="modal fade" id="modal-7">
                        <div class="modal-dialog  modal-lg modal-dialog-centered text-center" role="document">
index 99ecc5aac646706fff7289e2c769a3b6091c2669..2223f4594afc786d588b4410d2a067b8cf2332de 100644 (file)
@@ -1,22 +1,23 @@
-<?
-include_once("startup.php");
-include_once("inc/db.php");
-include_once("inc/base_new.php");
-include_once("inc/design_new.php");
-//include_once("inc/shipment.php");
-include"templates/top.php";
-if(!empty($_REQUEST["id"])) { 
-$orderId=(int)$_REQUEST["id"]; 
+<?php
+include_once(dirname(__DIR__, 2) . "/startup.php");
+include_once(dirname(__DIR__, 2) . "/inc/db.php");
+include_once(dirname(__DIR__, 2) . "/inc/base_new.php");
+include_once(dirname(__DIR__, 2) . "/inc/design_new.php");
 
-include"modul/shipment/functionsShipment.php";
+if(!empty($_REQUEST["id"])) {
+$orderId=(int)$_REQUEST["id"];
+
+include_once(__DIR__ . "/functionsShipment.php");
 
 
  
 
-if($OrderData["status"]>=6) {
+if(($OrderData["status"] ?? 0)>=6) {
 
 
+$colors_view=true;
 
+if($_GET["colors"]=="false")  $colors_view=false; 
 
 $FiledsData=getDataFiledsData($orderId);
 
@@ -109,6 +110,8 @@ $divisionCnt=0;
 
 
     $colorAllSumm=0;  $colorAllFact=0;
+    
+  if($colors_view==true){    
      foreach($productsColorsArray[$productId] as $color) {
           $divisionCnt=0;  
           
@@ -152,6 +155,8 @@ $divisionCnt=0;
          }
     } // end colors
     
+  }
+    
     // сумма по цветам товара
     /*
      if(!empty($colorsCnt)) {
index d9c7c2e2a550a00d21dbafa457524850158bbfd4..94446441efb29ba442b40904810a749486f98d78 100644 (file)
@@ -91,9 +91,9 @@ echo'
 
 
 
-if($row["status"]>=6) echo'<a class="dropdown-item" href=/shipment/divisionStore/?id='.$row["id"].'>деление - на основе заказа магазина <sup class="btn btn-sm btn-success">new</sup></a>
-<a class="dropdown-item" href=/shipment/divisionStorePrint/?id='.$row["id"].'>Печать деления для кладовщика <sup class="btn btn-sm btn-success">new</sup></a>
-<a class="dropdown-item" href=/shipment/divisionStorePrint/?id='.$row["id"].'&colors=false>Печать деления для кладовщика без цветов<sup class="btn btn-sm btn-success">new</sup></a>
+if($row["status"]>=6) echo'<a class="dropdown-item" href=/shipment/division-store/?id='.$row["id"].'>деление - на основе заказа магазина <sup class="btn btn-sm btn-success">new</sup></a>
+<a class="dropdown-item" href=/shipment/division-store-print/?id='.$row["id"].'>Печать деления для кладовщика <sup class="btn btn-sm btn-success">new</sup></a>
+<a class="dropdown-item" href=/shipment/division-store-print/?id='.$row["id"].'&colors=false>Печать деления для кладовщика без цветов<sup class="btn btn-sm btn-success">new</sup></a>
 
 ';
 
@@ -103,7 +103,7 @@ if(in_array($_SESSION["group_id"],[1,70,10])) {
 
 
 if($row["status"]>=6) echo'
-<a class="dropdown-item" href=/shipment/storeOrderScore/?id='.$row["id"].'>Оценка качества цветка в поставке <sup class="btn btn-sm btn-success">new</sup></a>';
+<a class="dropdown-item" href=/shipment/store-order-score/?id='.$row["id"].'>Оценка качества цветка в поставке <sup class="btn btn-sm btn-success">new</sup></a>';
 
 
 echo'</div> </div>
@@ -217,9 +217,9 @@ echo'
 <a class="dropdown-item" href=/shipment/divisionPrintEdit/?id='.$rows["id"].'>деление - по цветам (старое - с 3 февраля не актуально)</a>';
 
 if($rows["status"]>=6)
-echo'<a class="dropdown-item" href=/shipment/divisionStore/?id='.$rows["id"].'>деление - на основе заказа магазина <sup class="btn btn-sm btn-success">new</sup></a>
-<a class="dropdown-item" href=/shipment/divisionStorePrint/?id='.$rows["id"].'>Печать деления для кладовщика <sup class="btn btn-sm btn-success">new</sup></a>
-<a class="dropdown-item" href=/shipment/divisionStorePrint/?id='.$rows["id"].'&colors=false>Печать деления для кладовщика без цветов<sup class="btn btn-sm btn-success">new</sup></a>
+echo'<a class="dropdown-item" href=/shipment/division-store/?id='.$rows["id"].'>деление - на основе заказа магазина <sup class="btn btn-sm btn-success">new</sup></a>
+<a class="dropdown-item" href=/shipment/division-store-print/?id='.$rows["id"].'>Печать деления для кладовщика <sup class="btn btn-sm btn-success">new</sup></a>
+<a class="dropdown-item" href=/shipment/division-store-print/?id='.$rows["id"].'&colors=false>Печать деления для кладовщика без цветов<sup class="btn btn-sm btn-success">new</sup></a>
 
 ';
 
@@ -227,7 +227,7 @@ if(in_array($_SESSION["group_id"],[1,70,10])) {
     echo'<a class="dropdown-item" href=/shipment/divisionClone/?id='.$rows["id"].'>копировать закупку для частичной поставки <sup class="btn btn-sm btn-success">new</sup></a>';  
 }
 if($rows["status"]>=6) echo'
-<a class="dropdown-item" href=/shipment/storeOrderScore/?id='.$rows["id"].'>Оценка качества цветка в поставке <sup class="btn btn-sm btn-success">new</sup></a>';
+<a class="dropdown-item" href=/shipment/store-order-score/?id='.$rows["id"].'>Оценка качества цветка в поставке <sup class="btn btn-sm btn-success">new</sup></a>';
 
 
 echo'</div> </div>
index 8109333bea42df874aac4f677f57bda41f84065e..3073b59e497311c397d397b1af6028a16dad17ed 100644 (file)
@@ -1,15 +1,16 @@
-<?
-include_once("startup.php");
-include_once("inc/db.php");
-include_once("inc/base_new.php");
-include_once("templates/top.php");
+<?php
+include_once(dirname(__DIR__, 2) . "/startup.php");
+include_once(dirname(__DIR__, 2) . "/inc/db.php");
+include_once(dirname(__DIR__, 2) . "/inc/base_new.php");
+
 $modul="shipment";
 global $act;
 $act="storeOrderScore";
 $group_id=(int)$_SESSION["group_id"]; // ID группы сотрудника
 if(!empty($_REQUEST["store_id"])) $store_id=htmlentities($_REQUEST["store_id"]);
 if(!empty($_REQUEST["id"])) { $orderId=(int)$_REQUEST["id"]; } else exit("Укажите ID закупки");
-include_once"modul/shipment/functionsShipment.php";
+
+include_once(__DIR__ . "/functionsShipment.php");
 
 
 
@@ -57,7 +58,7 @@ if(!empty($_POST["save"]) and !empty($store_id))  {
  
 echo'<h3 class="page-title mb-0 text-primary">
 <a href="/shipment/" class="btn me-2 btn-light">❮ назад в закупки</a>
-Оцените '.$OrderData["name"].' id='.$orderId.'</h3>';
+Оцените '.($OrderData["name"]??'').' id='.$orderId.'</h3>';
 
 showOrderStoresPanel();
 
diff --git a/erp24/views/shipment/division-store-print.php b/erp24/views/shipment/division-store-print.php
new file mode 100644 (file)
index 0000000..c5ffbe7
--- /dev/null
@@ -0,0 +1,5 @@
+<?php
+
+chdir(__DIR__ . '/../../');
+
+include 'modul/shipment/divisionStorePrint.php';
\ No newline at end of file
diff --git a/erp24/views/shipment/division-store.php b/erp24/views/shipment/division-store.php
new file mode 100644 (file)
index 0000000..1019d72
--- /dev/null
@@ -0,0 +1,5 @@
+<?php
+
+chdir(__DIR__ . '/../../');
+
+include 'modul/shipment/divisionStore.php';
\ No newline at end of file
diff --git a/erp24/views/shipment/store-order-score.php b/erp24/views/shipment/store-order-score.php
new file mode 100644 (file)
index 0000000..83480be
--- /dev/null
@@ -0,0 +1,5 @@
+<?php
+
+chdir(__DIR__ . '/../../');
+
+include 'modul/shipment/storeOrderScore.php';
\ No newline at end of file