7Localization\Loc::loadMessages(__FILE__);
16 private const FFD_12_VERSION = 4;
21 private const PLANNED_STATUS_SALE = 1;
22 private const PLANNED_STATUS_SALE_RETURN = 3;
29 return Localization\Loc::getMessage(
'SALE_CASHBOX_ORANGE_DATA_TITLE_FFD_12');
35 protected function buildPosition(array $checkData, array $item,
bool $isSellReturn): array
44 'plannedStatus' => $isSellReturn ? self::PLANNED_STATUS_SALE_RETURN : self::PLANNED_STATUS_SALE,
47 if (isset($item[
'marking_code']))
49 $result[
'itemCode'] = $this->buildPositionMarkingCode($item);
52 $result[
'quantityMeasurementUnit'] = $this->buildPositionQuantityMeasurementUnit($item);
54 if (isset($item[
'supplier_info']))
68 $result = parent::buildCheckQuery($check);
69 $result[
'content'][
'ffdVersion'] = self::FFD_12_VERSION;
80 $correctionInfo = $data[
'correction_info'];
83 $result[
'content'][
'ffdVersion'] = self::FFD_12_VERSION;
92 foreach ($vats as $vat)
94 $result[
'content'][$vat[
'code']] = $vat[
'value'];
114 return '/correction12/';
159 private function buildPositionMarkingCode(array $item)
161 return $item[
'marking_code'];
176 private function buildPositionQuantityMeasurementUnit(array $item): ?int
179 if (is_null($tag2108Value) || $tag2108Value ===
'')
184 return (is_null($tag2108Value) || $tag2108Value ===
'') ? null : (int)$tag2108Value;
getValueFromSettings($name, $code)
buildCorrectionCheckQuery(CorrectionCheck $check)
buildCheckQuery(Check $check)
static hasMeasureSettings()
buildPosition(array $checkData, array $item, bool $isSellReturn)
buildPositionQuantity(array $item)
getCorrectionTypeMap($type)
buildPositionPrice(array $item)
buildPositionPaymentMethodType(array $checkData)
getCheckData(AbstractCheck $check)
buildCheckQueryByCheckData(array $checkData, bool $isSellReturn)
buildPositionPaymentSubjectType(array $item)
buildPositionText(array $item)
buildPositionSupplier(array $supplier)
getCorrectionTotalSum($correctionInfo)
getCorrectionCauseDocumentNumber($correctionInfo)
getVatsByCheckData(array $data)
getCorrectionCauseDocumentDate($correctionInfo)
buildPositionTax(array $checkData, $item)
const PAYMENT_OBJECT_EXCISE
const PAYMENT_OBJECT_LOTTERY
const PAYMENT_OBJECT_SOCIAL_INSURANCE
const PAYMENT_OBJECT_COMPOSITE
const PAYMENT_OBJECT_LOTTERY_PRIZE
const PAYMENT_OBJECT_MEDICAL_INSURANCE_IP
const PAYMENT_OBJECT_COMMODITY_MARKING_EXCISE
const PAYMENT_OBJECT_NON_OPERATING_GAIN
const PAYMENT_OBJECT_COMMODITY_MARKING_NO_MARKING_EXCISE
const PAYMENT_OBJECT_RESORT_FEE
const PAYMENT_OBJECT_PENSION_INSURANCE_IP
const PAYMENT_OBJECT_PROPERTY_RIGHT
const PAYMENT_OBJECT_GAMBLING_PRIZE
const PAYMENT_OBJECT_COMMODITY_MARKING
const PAYMENT_OBJECT_COMMODITY
const PAYMENT_OBJECT_AGENT_COMMISSION
const PAYMENT_OBJECT_ANOTHER
const PAYMENT_OBJECT_DEPOSIT
const PAYMENT_OBJECT_MEDICAL_INSURANCE
const PAYMENT_OBJECT_SERVICE
const PAYMENT_OBJECT_INTELLECTUAL_ACTIVITY
const PAYMENT_OBJECT_PAYMENT
const PAYMENT_OBJECT_EXPENSE
const PAYMENT_OBJECT_GAMBLING_BET
const PAYMENT_OBJECT_CASINO_PAYMENT
const PAYMENT_OBJECT_PENSION_INSURANCE
const PAYMENT_OBJECT_COMMODITY_MARKING_NO_MARKING
const PAYMENT_OBJECT_SALES_TAX