2namespace Sale\Handlers\Delivery\Additional\DeliveryRequests\RusPost\Requests;
5use Bitrix\Main\Localization\Loc;
6use Bitrix\Sale\Delivery\Requests;
8Loc::loadMessages(__FILE__);
15abstract class BaseFile
extends Base
22 public function process(
array $shipmentIds,
array $additional =
array())
24 $result =
new Requests\ResultFile();
26 if(
count($shipmentIds) !== 1)
28 $result->addError(
new Main\
Error(Loc::getMessage(
'SALE_DLVRS_ADD_DREQ_RBASEF_01')));
32 $shipmentId = current($shipmentIds);
34 if(intval($shipmentId) <= 0)
36 $result->addError(
new Main\
Error(Loc::getMessage(
'SALE_DLVRS_ADD_DREQ_RBASEF_02')));
40 $res = Requests\ShipmentTable::getList(
array(
42 '=SHIPMENT_ID' => $shipmentId,
43 '=REQUEST.DELIVERY_ID' => $this->deliveryService->getId()
49 if(!$row || $row[
'EXTERNAL_ID'] ==
'')
54 'SALE_DLVRS_ADD_DREQ_RBASEF_03',
55 array(
'#SHIPMENT_LINK#' => Requests\Helper::getShipmentEditLink($shipmentId))
61 $this->
path = str_replace(
'{id}', $row[
'EXTERNAL_ID'], $this->
path);
72 $result =
new Requests\ResultFile();
75 if(@$this->httpClient->query($this->type, $this->getUrl()))
76 $httpRes = $this->httpClient->getResult();
78 $errors = $this->httpClient->getError();
80 if (!$httpRes && !empty(
$errors))
82 $result =
new Requests\Result();
84 foreach(
$errors as $errorCode => $errMes)
86 if($errMes ==
'Socket connection error.')
88 $errMes = Loc::getMessage(
89 'SALE_DLVRS_ADD_DREQ_RBASE_SEND_ERROR',
90 array(
'#URL#' => $this->url)
99 $status = $this->httpClient->getStatus();
104 $errorMsg = Loc::getMessage(
'SALE_DLVRS_ADD_DREQ_RBASEF_04');
106 $errorMsg = Loc::getMessage('SALE_DLVRS_ADD_DREQ_RBASEF_05');
108 $errorMsg = Loc::getMessage('SALE_DLVRS_ADD_DREQ_RBASEF_06');
118 $headers = $this->httpClient->getHeaders();
141 $result->setFileContent($httpRes);
</td ></tr ></table ></td ></tr >< tr >< td class="bx-popup-label bx-width30"><?=GetMessage("PAGE_NEW_TAGS")?> array( $site)
if(preg_match('/^ else[a-z0-9_]{2}$/i', $siteID)===1)
if(!function_exists(__NAMESPACE__.'\\___972068685'))
if( $daysToExpire >=0 &&$daysToExpire< 60 elseif)( $daysToExpire< 0)
</p ></td >< td valign=top style='border-top:none;border-left:none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;padding:0cm 2.0pt 0cm 2.0pt;height:9.0pt'>< p class=Normal align=center style='margin:0cm;margin-bottom:.0001pt;text-align:center;line-height:normal'>< a name=ТекстовоеПоле54 ></a ><?=($taxRate > count( $arTaxList) > 0) ? $taxRate."%"