Bitrix-D7 23.9
 
Загрузка...
Поиск...
Не найдено
orderstatus.php
1<?php
2
3namespace Bitrix\Sale;
4
7
13{
14 const TYPE = 'O';
15
22 public static function getDisallowPayStatusList()
23 {
24 $allowFlag = false;
25 $resultList = array();
26
27 $allowPayStatus = Main\Config\Option::get("sale", "allow_pay_status", static::getInitialStatus());
28
29 $statusList = static::getAllStatuses();
30 if (!empty($statusList))
31 {
32 foreach ($statusList as $statusId)
33 {
34 if ($allowPayStatus == $statusId)
35 {
36 break;
37 }
38
39 if ($allowFlag === false)
40 {
41 $resultList[] = $statusId;
42 }
43 }
44 }
45
46 return $resultList;
47 }
48
55 public static function getAllowPayStatusList()
56 {
57 $allowFlag = false;
58 $resultList = array();
59
60 $allowPayStatus = Main\Config\Option::get("sale", "allow_pay_status", static::getInitialStatus());
61
62 $statusList = static::getAllStatuses();
63 if (!empty($statusList))
64 {
65 foreach ($statusList as $statusId)
66 {
67 if ($allowPayStatus == $statusId)
68 {
69 $allowFlag = true;
70 }
71
72 if ($allowFlag === true)
73 {
74 $resultList[] = $statusId;
75 }
76 }
77 }
78
79 return $resultList;
80 }
81
89 public static function isAllowPay($statusId)
90 {
91 $allowPayStatusList = static::getAllowPayStatusList();
92
93 if (!empty($allowPayStatusList))
94 {
95 foreach ($allowPayStatusList as $allowStatusId)
96 {
97 if ($allowStatusId == $statusId)
98 {
99 return true;
100 }
101
102 }
103 }
104
105 return false;
106 }
107
111 public static function getInitialStatus()
112 {
113 return 'N';
114 }
115
119 public static function getFinalStatus()
120 {
121 return 'F';
122 }
123}
static getDisallowPayStatusList()
static isAllowPay($statusId)