Skip to content

Commit

Permalink
Merge pull request #5 from Komtet/feature/update_sdk_version#kk-1539
Browse files Browse the repository at this point in the history
Поднял версию SDK/ внесены правки
  • Loading branch information
YuraNikitin authored Jun 2, 2021
2 parents c00dbdd + 3351300 commit 167e6fa
Show file tree
Hide file tree
Showing 5 changed files with 31 additions and 5 deletions.
6 changes: 6 additions & 0 deletions CHANGELOG.rst
Original file line number Diff line number Diff line change
@@ -1,3 +1,9 @@
2.1.0 (2.06.2021)
------------------

- Повышена версия `komtet-kassa-php-sdk` до версии 8.0.0
- Добавлено метаобновление для удаления неиспользуемых файлов (`CourierManager`,`CourierManagerTest`)

2.0.5 (13.04.2021)
------------------

Expand Down
2 changes: 1 addition & 1 deletion komtetkassa/lib/config/plugin.php
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
return array(
'name' => 'КОМТЕТ Касса',
'description' => 'Фискализация платежей с помощью сервиса КОМТЕТ Касса',
'version' => '2.0.5',
'version' => '2.1.0',
'vendor' => 1087963,
'frontend' => true,
'handlers' => array(
Expand Down
4 changes: 1 addition & 3 deletions komtetkassa/lib/shopKomtetkassa.plugin.php
Original file line number Diff line number Diff line change
Expand Up @@ -236,7 +236,7 @@ private function processReceipt($params, $operation = 'payment', $check_type=Cal
$position = $this->generatePosition($item, 1, $vat, $check_type);

if ($check_type != CalculationMethod::PRE_PAYMENT_FULL) {
$nomenclature = new Nomenclature(Nomenclature::SHOES, $nomenclatures[$i]);
$nomenclature = new Nomenclature($nomenclatures[$i]);
$position->setNomenclature($nomenclature);
}
$check->addPosition($position);
Expand Down Expand Up @@ -266,7 +266,6 @@ private function processReceipt($params, $operation = 'payment', $check_type=Cal
round($order['shipping'], 2),
1,
round($order['shipping'], 2),
0,
$vat
);
$check->addPosition($position);
Expand Down Expand Up @@ -579,7 +578,6 @@ private function generatePosition($item, $quantity, $vat, $check_type) {
round($item['price'], 2),
round(floatval($quantity), 2),
round($item_total, 2),
0,
$vat);
// // start 1C sku
// $sql_one = sprintf(
Expand Down
22 changes: 22 additions & 0 deletions komtetkassa/lib/updates/1622615423.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
<?php

// rm unused files from kk_php_sdk
$files = array(
'plugins/komtetkassa/lib/vendors/komtet-kassa-php-sdk/src/Yura.php',
'plugins/komtetkassa/lib/vendors/komtet-kassa-php-sdk/tests/Yura.php'
);


foreach ($files as $file) {
$path = wa()->getAppPath($file);

if (file_exists($path)) {
try {
waFiles::delete($path);
} catch (waException $e) {
$this->writeLog('Error while delete files');
}
} else {
$this->writeLog('File not exists');
}
}

0 comments on commit 167e6fa

Please sign in to comment.