Bitrix-D7
23.9
Загрузка...
Поиск...
Не найдено
creditpaymentreturncheck.php
1
<?php
2
3
namespace
Bitrix\Sale\Cashbox
;
4
5
use
Bitrix\Main
;
6
7
Main\Localization\Loc::loadMessages(__FILE__);
8
14
class
CreditPaymentReturnCheck
extends
Check
15
{
19
public
static
function
getType
()
20
{
21
return
'creditpaymentreturn'
;
22
}
23
27
public
static
function
getName
()
28
{
29
return
Main\Localization\Loc::getMessage(
'SALE_CASHBOX_CREDIT_PAYMENT_RETURN_NAME'
);
30
}
31
35
public
static
function
getCalculatedSign
()
36
{
37
return
static::CALCULATED_SIGN_CONSUMPTION;
38
}
39
43
public
static
function
getSupportedRelatedEntityType
()
44
{
45
return
static::SUPPORTED_ENTITY_TYPE_NONE;
46
}
47
59
protected
function
extractDataInternal
()
60
{
61
$result = parent::extractDataInternal();
62
63
unset($result[
'DELIVERY'
]);
64
$result[
'PRODUCTS'
] = array(
65
array(
66
'NAME'
=> Main\Localization\
Loc::getMessage
(
'SALE_CASHBOX_CREDIT_PAYMENT_RETURN_ITEM_NAME'
),
67
'QUANTITY'
=> 1,
68
'PRICE'
=> $result[
'TOTAL_SUM'
],
69
'SUM'
=> $result[
'TOTAL_SUM'
],
70
'BASE_PRICE'
=> $result[
'TOTAL_SUM'
],
71
'PAYMENT_OBJECT'
=> static::PAYMENT_OBJECT_PAYMENT,
72
)
73
);
74
75
if
(isset($result[
'PAYMENTS'
]))
76
{
77
foreach
($result[
'PAYMENTS'
] as $i => $payment)
78
{
79
$result[
'PAYMENTS'
][$i][
'IS_CASH'
] =
'N'
;
80
$result[
'PAYMENTS'
][$i][
'TYPE'
] = static::PAYMENT_TYPE_CASHLESS;
81
}
82
}
83
84
return
$result;
85
}
86
}
Bitrix\Main\Localization\Loc\getMessage
static getMessage($code, $replace=null, $language=null)
Definition
loc.php:29
Bitrix\Sale\Cashbox\Check
Definition
check.php:23
Bitrix\Sale\Cashbox\CreditPaymentReturnCheck
Definition
creditpaymentreturncheck.php:15
Bitrix\Sale\Cashbox\CreditPaymentReturnCheck\extractDataInternal
extractDataInternal()
Definition
creditpaymentreturncheck.php:59
Bitrix\Sale\Cashbox\CreditPaymentReturnCheck\getType
static getType()
Definition
creditpaymentreturncheck.php:19
Bitrix\Sale\Cashbox\CreditPaymentReturnCheck\getName
static getName()
Definition
creditpaymentreturncheck.php:27
Bitrix\Sale\Cashbox\CreditPaymentReturnCheck\getSupportedRelatedEntityType
static getSupportedRelatedEntityType()
Definition
creditpaymentreturncheck.php:43
Bitrix\Sale\Cashbox\CreditPaymentReturnCheck\getCalculatedSign
static getCalculatedSign()
Definition
creditpaymentreturncheck.php:35
Bitrix\Main
Bitrix\Sale\Cashbox
Definition
abstractcheck.php:3
modules
sale
lib
cashbox
creditpaymentreturncheck.php
Создано системой
1.10.0