From: Alexander Smirnov Date: Tue, 3 Sep 2024 14:46:41 +0000 (+0300) Subject: Merge branch 'develop' into feature_smirnov_erp-140_fact_motivation X-Git-Tag: 1.4~5^2~8 X-Git-Url: https://gitweb.erp-flowers.ru/?a=commitdiff_plain;h=1e37446b1b44eb606f5abbda9bea76e4f68948f5;p=erp24_rep%2Fyii-erp24%2F.git Merge branch 'develop' into feature_smirnov_erp-140_fact_motivation # Conflicts: # erp24/records/MotivationCostsItem.php # erp24/services/MotivationService.php # erp24/views/motivation/index.php --- 1e37446b1b44eb606f5abbda9bea76e4f68948f5 diff --cc erp24/records/MotivationCostsItem.php index 3d0abd1d,18bc4a54..33dc54a4 --- a/erp24/records/MotivationCostsItem.php +++ b/erp24/records/MotivationCostsItem.php @@@ -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} */ diff --cc erp24/services/MotivationService.php index b262da9e,5186306a..1906133a --- a/erp24/services/MotivationService.php +++ b/erp24/services/MotivationService.php @@@ -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;