]> gitweb.erp-flowers.ru Git - erp24_rep/yii-erp24/.git/commitdiff
Merge branch 'develop' into feature_smirnov_erp-140_fact_motivation
authorAlexander Smirnov <fredeom@mail.ru>
Tue, 3 Sep 2024 14:46:41 +0000 (17:46 +0300)
committerAlexander Smirnov <fredeom@mail.ru>
Tue, 3 Sep 2024 14:46:41 +0000 (17:46 +0300)
# Conflicts:
# erp24/records/MotivationCostsItem.php
# erp24/services/MotivationService.php
# erp24/views/motivation/index.php

1  2 
erp24/records/MotivationCostsItem.php
erp24/services/MotivationService.php

index 3d0abd1d11683d04fbf9a33d8731ef371b0313c6,18bc4a54063aa2fb25ad9198289b9e45b593f03e..33dc54a4450c84da05792ec901ede247876b4943
@@@ -48,15 -48,15 +48,24 @@@ class MotivationCostsItem extends Activ
          }
      }
  
 +    public static function writeOffsToMotivationItemArray() {
 +        return [
 +            WriteOffsErp::WRITE_OFFS_TYPE_BRAK => self::ITEM_WRITE_OFF_OF_ILLIQUID_GOODS_SPOILAGE_EXPIRATION_OF_SHELF_LIFE,
 +            WriteOffsErp::WRITE_OFFS_TYPE_DELIVERY_BRAK => self::ITEM_DEFECTIVE_DELIVERY,
 +            WriteOffsErp::WRITE_OFFS_TYPE_DUE_TO_EQUIPMENT_FAILURE_BRAK => self::ITEM_DEFECT_DUE_TO_EQUIPMENT_FAILURE,
 +            WriteOffsErp::WRITE_OFFS_TYPE_RESORTING_DOES_NOT_COUNT_TOWARDS_COST => self::ITEM_REGRADING,
 +        ];
 +    }
 +
+     public static function getWriteOffsItems() {
+         return [
+             WriteOffsErp::WRITE_OFFS_TYPE_BRAK,
+             WriteOffsErp::WRITE_OFFS_TYPE_DELIVERY_BRAK,
+             WriteOffsErp::WRITE_OFFS_TYPE_DUE_TO_EQUIPMENT_FAILURE_BRAK,
+             WriteOffsErp::WRITE_OFFS_TYPE_RESORTING_DOES_NOT_COUNT_TOWARDS_COST,
+         ];
+     }
      /**
       * {@inheritdoc}
       */
index b262da9e67b5d6f1b754399cd4b1cf513f741a55,5186306a9f39a4d4158191be7810e18a268163a7..1906133a6a3f086c4103e55b0f8f583f2ec8c3c5
@@@ -22,11 -22,13 +23,9 @@@ use yii_app\records\SalesProducts
  use yii_app\records\TimetableFactModel;
  use yii_app\records\Timetable;
  
- use yii_app\records\SelfCostProduct;
 -
 -use yii_app\records\EmployeePayment;
 -
--
  class MotivationService
  {
-     const  CODE_OFFLINE_SALES = 1;
+     const CODE_OFFLINE_SALES = 1;
      const CODE_ONLINE_SALES = 2;
      const CODE_ASSEMBLY_SERVICES = 3;
      const CODE_DELIVERY_SERVICES = 4;