From 439f978a6abf813bae40a5754848d8c040ea7929 Mon Sep 17 00:00:00 2001 From: Cyrill Kolchin <37548980+k-k-mygento@users.noreply.github.com> Date: Tue, 15 May 2018 12:30:43 +0300 Subject: [PATCH] add getVATAmount function (#9) * add getVATAmount function * CI fix; Translate fix --- Block/Extensions.php | 8 +++----- Helper/Data.php | 9 +++++++++ composer.json | 2 +- etc/module.xml | 2 +- i18n/ru_RU.csv | 2 +- 5 files changed, 15 insertions(+), 8 deletions(-) diff --git a/Block/Extensions.php b/Block/Extensions.php index 61b1cfd..c039da8 100644 --- a/Block/Extensions.php +++ b/Block/Extensions.php @@ -114,16 +114,14 @@ public function render(AbstractElement $element) $email ); $tender = __('Tender offer can be checked ' - . 'here'); + . 'here', $site); $html .= '' . ''; - $html .= '' . - ''; $html .= ''; $html .= '
' . __('Support') . ':' . $url . '.

' . $bugs . - '

' . $emailtext . '
' . __('License') . ':' . $tender . '
' - . 'mygento logo' + . 'mygento logo' . '' . $hiretext . '

' . __( 'You can check all providable services on ' . 'our website.', diff --git a/Helper/Data.php b/Helper/Data.php index 9f0dbaf..9842c34 100644 --- a/Helper/Data.php +++ b/Helper/Data.php @@ -252,4 +252,13 @@ public function formatToNumber($value) )); return $value; } + + public function getVATAmount($price, $VATValue) + { + $priceWithoutVat = $price / (1 + $VATValue / 100); + + $vatAmount = round($price - $priceWithoutVat, 2); + + return $vatAmount; + } } diff --git a/composer.json b/composer.json index 6ae8dc6..40548ba 100644 --- a/composer.json +++ b/composer.json @@ -1,7 +1,7 @@ { "name": "mygento/base", "type": "magento2-module", - "version": "2.2.10", + "version": "2.2.11", "license": "OSL-3.0", "homepage": "https://github.com/mygento/base", "description": "Mygento Base", diff --git a/etc/module.xml b/etc/module.xml index 3ae6670..5abd9a8 100644 --- a/etc/module.xml +++ b/etc/module.xml @@ -7,5 +7,5 @@ */ --> - + diff --git a/i18n/ru_RU.csv b/i18n/ru_RU.csv index dd4286a..20b4879 100644 --- a/i18n/ru_RU.csv +++ b/i18n/ru_RU.csv @@ -7,7 +7,7 @@ "License","Лицензирование" "You can check all providable services on our website.","Со списком предоставляемых услуг вы можете ознакомиться на нашем сайте." "You can hire us for any Magento extension customization and development.
Write us to %1","Вы можете нанять нашу команду для любых работ с модулями Magento.
Пишите нам на %1" -"Tender offer can be checked here","Ознакомиться с публичной офертой можно здесь" +"Tender offer can be checked here","Ознакомиться с публичной офертой можно здесь" "No usage","Не использовать" "VAT Free","НДС не облагается" "VAT18","НДС 18%"