Bitrix-D7
23.9
Загрузка...
Поиск...
Не найдено
shipmentitem.php
1
<?php
8
namespace
Bitrix\Sale\Internals
;
9
10
use
Bitrix\Main
;
11
use
Bitrix\Main\Localization\Loc
;
12
use
Bitrix\Main\ORM\Data\DataManager
;
13
14
Loc::loadMessages
(__FILE__);
15
45
class
ShipmentItemTable
extends
DataManager
46
{
47
53
public
static
function
getFilePath
()
54
{
55
return
__FILE__;
56
}
57
58
64
public
static
function
deleteWithItems
($id)
65
{
66
$id = intval($id);
67
if
($id <= 0)
68
throw
new
Main\ArgumentNullException
(
"id"
);
69
70
$itemsFromDbList = ShipmentItemStoreTable::getList(
71
array(
72
"filter"
=> array(
73
'ORDER_DELIVERY_BASKET_ID'
=> $id,
74
),
75
"select"
=> array(
"ID"
)
76
)
77
);
78
while
($itemsFromDbItem = $itemsFromDbList->fetch())
79
ShipmentItemStoreTable::delete($itemsFromDbItem[
'ID'
]);
80
81
return
ShipmentItemTable::delete
($id);
82
}
83
89
public
static
function
getTableName
()
90
{
91
return
'b_sale_order_dlv_basket'
;
92
}
93
99
public
static
function
getMap
()
100
{
101
global $DB;
102
103
return
array(
104
'ID'
=> array(
105
'data_type'
=>
'integer'
,
106
'primary'
=>
true
,
107
'autocomplete'
=>
true
,
108
'title'
=>
Loc::getMessage
(
'ORDER_DELIVERY_BASKET_ENTITY_ID_FIELD'
),
109
),
110
'ORDER_DELIVERY_ID'
=> array(
111
'data_type'
=>
'integer'
,
112
'required'
=>
true
,
113
'title'
=>
Loc::getMessage
(
'ORDER_DELIVERY_BASKET_ENTITY_ORDER_DELIVERY_ID_FIELD'
),
114
),
115
'DELIVERY'
=> array(
116
'data_type'
=>
'Shipment'
,
117
'reference'
=> array(
118
'=this.ORDER_DELIVERY_ID'
=>
'ref.ID'
119
)
120
),
121
'BASKET_ID'
=> array(
122
'data_type'
=>
'integer'
,
123
'required'
=>
true
,
124
'title'
=>
Loc::getMessage
(
'ORDER_DELIVERY_BASKET_ENTITY_BASKET_ID_FIELD'
),
125
),
126
'BASKET'
=> array(
127
'data_type'
=>
'Bitrix\Sale\Internals\Basket'
,
128
'reference'
=> array(
129
'=this.BASKET_ID'
=>
'ref.ID'
130
)
131
),
132
'DATE_INSERT'
=> array(
133
'data_type'
=>
'datetime'
134
),
135
'DATE_INSERT_SHORT'
=> array(
136
'data_type'
=>
'datetime'
,
137
'expression'
=> array(
138
$DB->datetimeToDateFunction(
'%s'
),
'DATE_INSERT'
139
)
140
),
141
'QUANTITY'
=> array(
142
'data_type'
=>
'float'
,
143
'required'
=>
true
,
144
'title'
=>
Loc::getMessage
(
'ORDER_DELIVERY_BASKET_ENTITY_QUANTITY_FIELD'
),
145
),
146
'RESERVED_QUANTITY'
=> array(
147
'data_type'
=>
'float'
,
148
'required'
=>
true
,
149
'title'
=>
Loc::getMessage
(
'ORDER_DELIVERY_BASKET_ENTITY_RESERVED_QUANTITY_FIELD'
),
150
),
151
'XML_ID'
=> array(
'data_type'
=>
'string'
),
152
);
153
}
154
}
Bitrix\Main\ArgumentNullException
Definition
exception.php:54
Bitrix\Main\Localization\Loc
Definition
loc.php:11
Bitrix\Main\Localization\Loc\loadMessages
static loadMessages($file)
Definition
loc.php:64
Bitrix\Main\Localization\Loc\getMessage
static getMessage($code, $replace=null, $language=null)
Definition
loc.php:29
Bitrix\Main\ORM\Data\DataManager
Definition
datamanager.php:33
Bitrix\Main\ORM\Data\DataManager\delete
static delete($primary)
Definition
datamanager.php:1632
Bitrix\Sale\Internals\ShipmentItemTable
Definition
shipmentitem.php:46
Bitrix\Sale\Internals\ShipmentItemTable\getMap
static getMap()
Definition
shipmentitem.php:99
Bitrix\Sale\Internals\ShipmentItemTable\getFilePath
static getFilePath()
Definition
shipmentitem.php:53
Bitrix\Sale\Internals\ShipmentItemTable\deleteWithItems
static deleteWithItems($id)
Definition
shipmentitem.php:64
Bitrix\Sale\Internals\ShipmentItemTable\getTableName
static getTableName()
Definition
shipmentitem.php:89
Bitrix\Main
Bitrix\Sale\Internals
Definition
accountnumber.php:3
modules
sale
lib
internals
shipmentitem.php
Создано системой
1.10.0