Bitrix-D7 23.9
 
Загрузка...
Поиск...
Не найдено
creditpaymentreturncashcheck.php
1<?php
2
3namespace Bitrix\Sale\Cashbox;
4
6
7Main\Localization\Loc::loadMessages(__FILE__);
8
15{
19 public static function getType()
20 {
21 return 'creditpaymentreturncash';
22 }
23
27 public static function getName()
28 {
29 return Main\Localization\Loc::getMessage('SALE_CASHBOX_CREDIT_PAYMENT_RETURN_CASH_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_CASH_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'] = 'Y';
80 $result['PAYMENTS'][$i]['TYPE'] = static::PAYMENT_TYPE_CASH;
81 }
82 }
83
84 return $result;
85 }
86}
static getMessage($code, $replace=null, $language=null)
Definition loc.php:29