Refactor authorization and token refresh logic; update tax handling and invoice generation
- Changed variable name from `$stmt_service` to `$stmt_refreshkey` for clarity in `authorization.php` and `token_refresh.php`. - Added null coalescing operator to ensure criteria are set to an empty string if not provided in `products_software_versions.php`. - Modified SQL script to add `eu` column to `taxes` table and update tax rates based on EU membership. - Enhanced invoice generation logic in `functions.php` to include VAT notes based on customer country and VAT number. - Updated email and PDF templates to display VAT notes and percentages correctly. - Adjusted JavaScript tax calculation logic to handle VAT based on country and VAT number. - Fixed API URL in `index.php` for token refresh endpoint. - Updated countries data structure in `countries.php` to include EU membership status.
This commit is contained in:
@@ -72,8 +72,8 @@ if ($stmt->rowCount() == 1) {
|
|||||||
|
|
||||||
$user_data['refreshkey'] = bin2hex(random_bytes(25));
|
$user_data['refreshkey'] = bin2hex(random_bytes(25));
|
||||||
$sql_refreshkey = 'UPDATE users SET refreshkey = ? WHERE id = ?';
|
$sql_refreshkey = 'UPDATE users SET refreshkey = ? WHERE id = ?';
|
||||||
$stmt_service = $pdo->prepare($sql_refreshkey);
|
$stmt_refreshkey = $pdo->prepare($sql_refreshkey);
|
||||||
$stmt_service->execute([$user_data['refreshkey'], $user_data['id']]);
|
$stmt_refreshkey->execute([$user_data['refreshkey'], $user_data['id']]);
|
||||||
|
|
||||||
$token = createCommunicationToken($user_data['userkey']);
|
$token = createCommunicationToken($user_data['userkey']);
|
||||||
|
|
||||||
|
|||||||
@@ -26,7 +26,7 @@ if(isset($get_content) && $get_content!=''){
|
|||||||
foreach ($requests as $y){
|
foreach ($requests as $y){
|
||||||
$v = explode("=", $y);
|
$v = explode("=", $y);
|
||||||
//INCLUDE VARIABLES IN ARRAY
|
//INCLUDE VARIABLES IN ARRAY
|
||||||
$criterias[$v[0]] = $v[1];
|
$criterias[$v[0]] = $v[1] ?? '';
|
||||||
|
|
||||||
if ($v[0] == 'page' || $v[0] =='p' || $v[0] =='totals' || $v[0] =='list' || $v[0] =='history'|| $v[0] =='success_msg'){
|
if ($v[0] == 'page' || $v[0] =='p' || $v[0] =='totals' || $v[0] =='list' || $v[0] =='history'|| $v[0] =='success_msg'){
|
||||||
//do nothing
|
//do nothing
|
||||||
|
|||||||
@@ -65,8 +65,8 @@ if ($stmt->rowCount() == 1) {
|
|||||||
//Refresh REFRESHKEY
|
//Refresh REFRESHKEY
|
||||||
$user_data['refreshkey'] = bin2hex(random_bytes(25));
|
$user_data['refreshkey'] = bin2hex(random_bytes(25));
|
||||||
$sql_refreshkey = 'UPDATE users SET refreshkey = ? WHERE id = ?';
|
$sql_refreshkey = 'UPDATE users SET refreshkey = ? WHERE id = ?';
|
||||||
$stmt_service = $pdo->prepare($sql_refreshkey);
|
$stmt_refreshkey = $pdo->prepare($sql_refreshkey);
|
||||||
$stmt_service->execute([$user_data['refreshkey'], $user_data['id']]);
|
$stmt_refreshkey->execute([$user_data['refreshkey'], $user_data['id']]);
|
||||||
|
|
||||||
$token = createCommunicationToken($user_data['userkey']);
|
$token = createCommunicationToken($user_data['userkey']);
|
||||||
|
|
||||||
|
|||||||
@@ -4,6 +4,8 @@ TRUNCATE TABLE `role_access_permissions`;
|
|||||||
TRUNCATE TABLE `user_roles`;
|
TRUNCATE TABLE `user_roles`;
|
||||||
TRUNCATE TABLE `access_elements`;
|
TRUNCATE TABLE `access_elements`;
|
||||||
|
|
||||||
|
ALTER TABLE taxes ADD COLUMN eu TINYINT(1) DEFAULT 0;
|
||||||
|
|
||||||
INSERT INTO access_elements (access_name,access_path,description,is_active,created,createdby,updated,updatedby,access_group) VALUES
|
INSERT INTO access_elements (access_name,access_path,description,is_active,created,createdby,updated,updatedby,access_group) VALUES
|
||||||
('Access Element','access_element','Auto-scanned: access_element',1,'2026-01-18 18:49:49','0','2026-01-18 18:49:49',NULL,'Views'),
|
('Access Element','access_element','Auto-scanned: access_element',1,'2026-01-18 18:49:49','0','2026-01-18 18:49:49',NULL,'Views'),
|
||||||
('Access Element Manage','access_element_manage','Auto-scanned: access_element_manage',1,'2026-01-18 18:49:49','0','2026-01-18 18:49:49',NULL,'Views'),
|
('Access Element Manage','access_element_manage','Auto-scanned: access_element_manage',1,'2026-01-18 18:49:49','0','2026-01-18 18:49:49',NULL,'Views'),
|
||||||
@@ -921,5 +923,14 @@ WHERE warranty_date IS NOT NULL;
|
|||||||
|
|
||||||
alter table users add refreshkey varchar(255);
|
alter table users add refreshkey varchar(255);
|
||||||
|
|
||||||
|
UPDATE taxes SET eu = 1 WHERE country IN (
|
||||||
|
'Austria', 'Belgium', 'Bulgaria', 'Croatia', 'Cyprus', 'Czech Republic',
|
||||||
|
'Denmark', 'Estonia', 'Finland', 'France', 'Germany', 'Greece',
|
||||||
|
'Hungary', 'Ireland', 'Italy', 'Latvia', 'Lithuania', 'Luxembourg',
|
||||||
|
'Malta', 'Netherlands', 'Poland', 'Portugal', 'Romania', 'Slovakia',
|
||||||
|
'Slovenia', 'Spain', 'Sweden'
|
||||||
|
);
|
||||||
|
|
||||||
|
UPDATE taxes SET rate = 0.00 WHERE eu = 0 OR eu IS NULL;
|
||||||
|
|
||||||
SET FOREIGN_KEY_CHECKS=1;
|
SET FOREIGN_KEY_CHECKS=1;
|
||||||
@@ -5627,12 +5627,12 @@ function generateSoftwareInvoice($invoice_data, $order_id, $language = 'US') {
|
|||||||
// Extract customer data
|
// Extract customer data
|
||||||
$customer = $invoice_data['customer'] ?? [];
|
$customer = $invoice_data['customer'] ?? [];
|
||||||
$customer_email = $customer['email'] ?? $invoice_data['payer_email'] ?? '';
|
$customer_email = $customer['email'] ?? $invoice_data['payer_email'] ?? '';
|
||||||
$customer_name = trim(($customer['first_name'] ?? '') . ' ' . ($customer['last_name'] ?? ''));
|
$customer_name = $customer['name'] ?? trim(($customer['first_name'] ?? '') . ' ' . ($customer['last_name'] ?? ''));
|
||||||
$customer_address = $customer['address_street'] ?? '';
|
$customer_address = $customer['street'] ?? $customer['address_street'] ?? '';
|
||||||
$customer_city = $customer['address_city'] ?? '';
|
$customer_city = $customer['city'] ?? $customer['address_city'] ?? '';
|
||||||
$customer_state = $customer['address_state'] ?? '';
|
$customer_state = $customer['state'] ?? $customer['address_state'] ?? '';
|
||||||
$customer_zip = $customer['address_zip'] ?? '';
|
$customer_zip = $customer['zip'] ?? $customer['address_zip'] ?? '';
|
||||||
$customer_country = $customer['address_country'] ?? '';
|
$customer_country = $customer['country'] ?? $customer['address_country'] ?? '';
|
||||||
|
|
||||||
// Extract transaction data
|
// Extract transaction data
|
||||||
$pricing = $invoice_data['pricing'] ?? [];
|
$pricing = $invoice_data['pricing'] ?? [];
|
||||||
@@ -5744,6 +5744,54 @@ function generateSoftwareInvoice($invoice_data, $order_id, $language = 'US') {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// Calculate VAT note based on country and VAT number
|
||||||
|
$vat_note = '';
|
||||||
|
$customer_vat_number = $customer['vat_number'] ?? '';
|
||||||
|
|
||||||
|
// Load countries array
|
||||||
|
include dirname(__FILE__,2).'/settings/countries.php';
|
||||||
|
|
||||||
|
debuglog("Customer Country: " . ($customer_country ?? 'NULL'));
|
||||||
|
debuglog("Customer VAT: " . ($customer_vat_number ?? 'NULL'));
|
||||||
|
|
||||||
|
if (!empty($customer_country) && isset($countries)) {
|
||||||
|
// Find country data
|
||||||
|
$country_data = null;
|
||||||
|
foreach ($countries as $country_info) {
|
||||||
|
if ($country_info['country'] === $customer_country) {
|
||||||
|
$country_data = $country_info;
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
if ($country_data) {
|
||||||
|
$is_eu = $country_data['eu'] === 1;
|
||||||
|
$is_netherlands = $customer_country === 'Netherlands';
|
||||||
|
|
||||||
|
if ($is_netherlands) {
|
||||||
|
// Netherlands: no special note needed
|
||||||
|
$vat_note = '';
|
||||||
|
} elseif ($is_eu) {
|
||||||
|
if (!empty($customer_vat_number)) {
|
||||||
|
// EU with VAT number: reverse charge
|
||||||
|
$vat_note = 'Reverse charge VAT';
|
||||||
|
} else {
|
||||||
|
// EU without VAT number: local VAT
|
||||||
|
$vat_note = 'Local VAT';
|
||||||
|
}
|
||||||
|
} else {
|
||||||
|
// Non-EU: out of scope
|
||||||
|
$vat_note = 'Out of scope of EU VAT. Buyer is responsible for local taxes and duties';
|
||||||
|
}
|
||||||
|
|
||||||
|
debuglog("VAT Note set to: " . ($vat_note ?: 'EMPTY'));
|
||||||
|
} else {
|
||||||
|
debuglog("Country NOT found in array: " . $customer_country);
|
||||||
|
}
|
||||||
|
} else {
|
||||||
|
debuglog("Empty customer_country or countries not loaded");
|
||||||
|
}
|
||||||
|
|
||||||
// Build HTML for PDF and EMAIL
|
// Build HTML for PDF and EMAIL
|
||||||
include dirname(__FILE__,2).'/assets/mail/email_template_invoice.php';
|
include dirname(__FILE__,2).'/assets/mail/email_template_invoice.php';
|
||||||
include dirname(__FILE__,2).'/assets/mail/pdf_template_invoice.php';
|
include dirname(__FILE__,2).'/assets/mail/pdf_template_invoice.php';
|
||||||
@@ -5816,7 +5864,8 @@ function generateCountriesFile($token){
|
|||||||
foreach($taxes as $tax){
|
foreach($taxes as $tax){
|
||||||
$countries[$tax['id']] = [
|
$countries[$tax['id']] = [
|
||||||
'country' => $tax['country'] ?? '',
|
'country' => $tax['country'] ?? '',
|
||||||
'taxes' => $tax['rate'] ?? 0
|
'taxes' => $tax['rate'] ?? 0,
|
||||||
|
'eu' => $tax['eu'] ?? 0
|
||||||
];
|
];
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -5826,7 +5875,7 @@ function generateCountriesFile($token){
|
|||||||
$fileContent .= "// Generated on: " . date('Y-m-d H:i:s') . "\n\n";
|
$fileContent .= "// Generated on: " . date('Y-m-d H:i:s') . "\n\n";
|
||||||
$fileContent .= "\$countries = [\n";
|
$fileContent .= "\$countries = [\n";
|
||||||
foreach($countries as $id => $data){
|
foreach($countries as $id => $data){
|
||||||
$fileContent .= " " . $id . " => ['country' => '" . addslashes($data['country']) . "', 'taxes' => " . $data['taxes'] . "],\n";
|
$fileContent .= " " . $id . " => ['country' => '" . addslashes($data['country']) . "', 'taxes' => " . $data['taxes'] . ",'eu' => " . $data['eu'] . "],\n";
|
||||||
}
|
}
|
||||||
$fileContent .= "];\n";
|
$fileContent .= "];\n";
|
||||||
|
|
||||||
|
|||||||
@@ -122,14 +122,24 @@ $message .= '</tbody>
|
|||||||
</tr>';
|
</tr>';
|
||||||
|
|
||||||
if ($tax_amount > 0) {
|
if ($tax_amount > 0) {
|
||||||
|
$tax_percentage = ($subtotal > 0) ? round(($tax_amount / $subtotal) * 100, 2) : 0;
|
||||||
|
$vat_label = htmlspecialchars($lbl_tax) . ' (' . $tax_percentage . '%)';
|
||||||
|
if (!empty($vat_note)) {
|
||||||
|
$vat_label .= ' <small style="font-size: 11px; color: #888;">(' . htmlspecialchars($vat_note) . ')</small>';
|
||||||
|
}
|
||||||
$message .= '<tr>
|
$message .= '<tr>
|
||||||
<td style="text-align: left; padding: 5px 0;">' . htmlspecialchars($lbl_tax) . '</td>
|
<td style="text-align: left; padding: 5px 0;">' . $vat_label . '</td>
|
||||||
<td style="text-align: right; padding: 5px 0;">€ ' . number_format($tax_amount, 2) . '</td>
|
<td style="text-align: right; padding: 5px 0;">€ ' . number_format($tax_amount, 2) . '</td>
|
||||||
</tr>';
|
</tr>';
|
||||||
} else {
|
} else {
|
||||||
|
$vat_label = 'VAT';
|
||||||
|
if (!empty($vat_note)) {
|
||||||
|
$vat_label .= ' <small style="font-size: 11px; color: #888;">(' . htmlspecialchars($vat_note) . ')</small>';
|
||||||
|
}
|
||||||
|
$vat_amount_display = !empty($vat_note) ? '€ 0.00' : 'included';
|
||||||
$message .= '<tr>
|
$message .= '<tr>
|
||||||
<td style="text-align: left; padding: 5px 0;">VAT</td>
|
<td style="text-align: left; padding: 5px 0;">' . $vat_label . '</td>
|
||||||
<td style="text-align: right; padding: 5px 0;">included</td>
|
<td style="text-align: right; padding: 5px 0;">' . $vat_amount_display . '</td>
|
||||||
</tr>';
|
</tr>';
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -299,14 +299,23 @@ $pdf .= '</tbody>
|
|||||||
|
|
||||||
if ($tax_amount > 0) {
|
if ($tax_amount > 0) {
|
||||||
$tax_percentage = ($subtotal > 0) ? round(($tax_amount / $subtotal) * 100, 2) : 0;
|
$tax_percentage = ($subtotal > 0) ? round(($tax_amount / $subtotal) * 100, 2) : 0;
|
||||||
|
$vat_label = htmlspecialchars($lbl_tax) . ' (' . $tax_percentage . '%)';
|
||||||
|
if (!empty($vat_note)) {
|
||||||
|
$vat_label .= ' <small style="font-size: 9px; color: #666;">(' . htmlspecialchars($vat_note) . ')</small>';
|
||||||
|
}
|
||||||
$pdf .= '<div class="total-row">
|
$pdf .= '<div class="total-row">
|
||||||
<div class="total-label">' . htmlspecialchars($lbl_tax) . ' (' . $tax_percentage . '%)</div>
|
<div class="total-label">' . $vat_label . '</div>
|
||||||
<div class="total-amount">€ ' . number_format($tax_amount, 2) . '</div>
|
<div class="total-amount">€ ' . number_format($tax_amount, 2) . '</div>
|
||||||
</div>';
|
</div>';
|
||||||
} else {
|
} else {
|
||||||
|
$vat_label = 'VAT';
|
||||||
|
if (!empty($vat_note)) {
|
||||||
|
$vat_label .= ' <small style="font-size: 9px; color: #666;">(' . htmlspecialchars($vat_note) . ')</small>';
|
||||||
|
}
|
||||||
|
$vat_amount_display = !empty($vat_note) ? '€ 0.00' : 'included';
|
||||||
$pdf .= '<div class="total-row">
|
$pdf .= '<div class="total-row">
|
||||||
<div class="total-label">VAT</div>
|
<div class="total-label">' . $vat_label . '</div>
|
||||||
<div class="total-amount">included</div>
|
<div class="total-amount">' . $vat_amount_display . '</div>
|
||||||
</div>';
|
</div>';
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -1485,12 +1485,35 @@ function showPaymentModal(option) {
|
|||||||
// Function to calculate and update tax
|
// Function to calculate and update tax
|
||||||
function updateTaxDisplay() {
|
function updateTaxDisplay() {
|
||||||
const selectedCountry = document.getElementById("paymentCountry").value;
|
const selectedCountry = document.getElementById("paymentCountry").value;
|
||||||
|
const vatNumber = document.getElementById("paymentVatNumber").value.trim();
|
||||||
let taxRate = 0;
|
let taxRate = 0;
|
||||||
|
let vatNote = '';
|
||||||
|
|
||||||
if (selectedCountry && typeof COUNTRIES !== 'undefined' && COUNTRIES) {
|
if (selectedCountry && typeof COUNTRIES !== 'undefined' && COUNTRIES) {
|
||||||
const countryData = Object.values(COUNTRIES).find(c => c.country === selectedCountry);
|
const countryData = Object.values(COUNTRIES).find(c => c.country === selectedCountry);
|
||||||
if (countryData) {
|
if (countryData) {
|
||||||
taxRate = parseFloat(countryData.taxes) || 0;
|
const isEU = countryData.eu === 1;
|
||||||
|
const isNetherlands = selectedCountry === 'Netherlands';
|
||||||
|
const countryTaxRate = parseFloat(countryData.taxes) || 0;
|
||||||
|
|
||||||
|
if (isNetherlands) {
|
||||||
|
// Netherlands: always take the tax percentage
|
||||||
|
taxRate = countryTaxRate;
|
||||||
|
} else if (isEU) {
|
||||||
|
if (vatNumber) {
|
||||||
|
// EU with VAT number: 0% VAT, reverse charge
|
||||||
|
taxRate = 0;
|
||||||
|
vatNote = 'Reverse charge VAT';
|
||||||
|
} else {
|
||||||
|
// EU without VAT number: use country VAT
|
||||||
|
taxRate = countryTaxRate;
|
||||||
|
vatNote = 'Local VAT';
|
||||||
|
}
|
||||||
|
} else {
|
||||||
|
// Non-EU: use country tax percentage (usually 0)
|
||||||
|
taxRate = countryTaxRate;
|
||||||
|
vatNote = 'Out of scope of EU VAT. Buyer is responsible for local taxes and duties';
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -1503,13 +1526,13 @@ function showPaymentModal(option) {
|
|||||||
|
|
||||||
if (taxRate > 0) {
|
if (taxRate > 0) {
|
||||||
taxDisplay.innerHTML = `
|
taxDisplay.innerHTML = `
|
||||||
<span>VAT (${taxRate}%):</span>
|
<span>VAT (${taxRate}%)${vatNote ? ' <small style="font-size: 9px; color: #888;">(' + vatNote + ')</small>' : ''}:</span>
|
||||||
<span style="font-weight: 600;">${currency} ${taxAmount.toFixed(2)}</span>
|
<span style="font-weight: 600;">${currency} ${taxAmount.toFixed(2)}</span>
|
||||||
`;
|
`;
|
||||||
} else {
|
} else {
|
||||||
taxDisplay.innerHTML = `
|
taxDisplay.innerHTML = `
|
||||||
<span>VAT:</span>
|
<span>VAT${vatNote ? ' <small style="font-size: 9px; color: #888;">(' + vatNote + ')</small>' : ''}:</span>
|
||||||
<span style="font-weight: 600;">-</span>
|
<span style="font-weight: 600;">${vatNote ? '0%' : '-'}</span>
|
||||||
`;
|
`;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -1541,8 +1564,9 @@ function showPaymentModal(option) {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
// Add event listener to country select to update tax
|
// Add event listeners to country select and VAT number to update tax
|
||||||
document.getElementById("paymentCountry").addEventListener('change', updateTaxDisplay);
|
document.getElementById("paymentCountry").addEventListener('change', updateTaxDisplay);
|
||||||
|
document.getElementById("paymentVatNumber").addEventListener('input', updateTaxDisplay);
|
||||||
|
|
||||||
// Close modal on cancel
|
// Close modal on cancel
|
||||||
document.getElementById("cancelPayment").onclick = () => {
|
document.getElementById("cancelPayment").onclick = () => {
|
||||||
|
|||||||
@@ -54,7 +54,7 @@ if (!isset($_SESSION['authorization']['userkey']) ||
|
|||||||
|
|
||||||
// Token missing, expired, or about to expire - get new token
|
// Token missing, expired, or about to expire - get new token
|
||||||
if (isset($_SESSION['authorization']['refreshkey'])) {
|
if (isset($_SESSION['authorization']['refreshkey'])) {
|
||||||
$api_url = '/v2/token_refresh?refreshkey='.$_SESSION['authorization']['refreshkey'];
|
$api_url = '/v2/token_refresh/refreshkey='.$_SESSION['authorization']['refreshkey'];
|
||||||
$responses = ioServer($api_url, '');
|
$responses = ioServer($api_url, '');
|
||||||
|
|
||||||
//Decode Payload
|
//Decode Payload
|
||||||
|
|||||||
@@ -1,148 +1,148 @@
|
|||||||
<?php
|
<?php
|
||||||
// Auto-generated countries file from taxes API
|
// Auto-generated countries file from taxes API
|
||||||
// Generated on: 2026-01-16 14:21:38
|
// Generated on: 2026-02-05 14:44:35
|
||||||
|
|
||||||
$countries = [
|
$countries = [
|
||||||
1 => ['country' => 'Austria', 'taxes' => 20.00],
|
1 => ['country' => 'Austria', 'taxes' => 20.00,'eu' => 1],
|
||||||
2 => ['country' => 'Belgium', 'taxes' => 21.00],
|
2 => ['country' => 'Belgium', 'taxes' => 21.00,'eu' => 1],
|
||||||
3 => ['country' => 'Bulgaria', 'taxes' => 20.00],
|
3 => ['country' => 'Bulgaria', 'taxes' => 20.00,'eu' => 1],
|
||||||
4 => ['country' => 'Croatia', 'taxes' => 25.00],
|
4 => ['country' => 'Croatia', 'taxes' => 25.00,'eu' => 1],
|
||||||
5 => ['country' => 'Cyprus', 'taxes' => 19.00],
|
5 => ['country' => 'Cyprus', 'taxes' => 19.00,'eu' => 1],
|
||||||
6 => ['country' => 'Czech Republic', 'taxes' => 21.00],
|
6 => ['country' => 'Czech Republic', 'taxes' => 21.00,'eu' => 1],
|
||||||
7 => ['country' => 'Denmark', 'taxes' => 25.00],
|
7 => ['country' => 'Denmark', 'taxes' => 25.00,'eu' => 1],
|
||||||
8 => ['country' => 'Estonia', 'taxes' => 24.00],
|
8 => ['country' => 'Estonia', 'taxes' => 24.00,'eu' => 1],
|
||||||
9 => ['country' => 'Finland', 'taxes' => 25.50],
|
9 => ['country' => 'Finland', 'taxes' => 25.50,'eu' => 1],
|
||||||
10 => ['country' => 'France', 'taxes' => 20.00],
|
10 => ['country' => 'France', 'taxes' => 20.00,'eu' => 1],
|
||||||
11 => ['country' => 'Germany', 'taxes' => 19.00],
|
11 => ['country' => 'Germany', 'taxes' => 19.00,'eu' => 1],
|
||||||
12 => ['country' => 'Greece', 'taxes' => 24.00],
|
12 => ['country' => 'Greece', 'taxes' => 24.00,'eu' => 1],
|
||||||
13 => ['country' => 'Hungary', 'taxes' => 27.00],
|
13 => ['country' => 'Hungary', 'taxes' => 27.00,'eu' => 1],
|
||||||
14 => ['country' => 'Ireland', 'taxes' => 23.00],
|
14 => ['country' => 'Ireland', 'taxes' => 23.00,'eu' => 1],
|
||||||
15 => ['country' => 'Italy', 'taxes' => 22.00],
|
15 => ['country' => 'Italy', 'taxes' => 22.00,'eu' => 1],
|
||||||
16 => ['country' => 'Latvia', 'taxes' => 21.00],
|
16 => ['country' => 'Latvia', 'taxes' => 21.00,'eu' => 1],
|
||||||
17 => ['country' => 'Lithuania', 'taxes' => 21.00],
|
17 => ['country' => 'Lithuania', 'taxes' => 21.00,'eu' => 1],
|
||||||
18 => ['country' => 'Luxembourg', 'taxes' => 16.00],
|
18 => ['country' => 'Luxembourg', 'taxes' => 16.00,'eu' => 1],
|
||||||
19 => ['country' => 'Malta', 'taxes' => 18.00],
|
19 => ['country' => 'Malta', 'taxes' => 18.00,'eu' => 1],
|
||||||
20 => ['country' => 'Netherlands', 'taxes' => 21.00],
|
20 => ['country' => 'Netherlands', 'taxes' => 21.00,'eu' => 1],
|
||||||
21 => ['country' => 'Poland', 'taxes' => 23.00],
|
21 => ['country' => 'Poland', 'taxes' => 23.00,'eu' => 1],
|
||||||
22 => ['country' => 'Portugal', 'taxes' => 23.00],
|
22 => ['country' => 'Portugal', 'taxes' => 23.00,'eu' => 1],
|
||||||
23 => ['country' => 'Romania', 'taxes' => 19.00],
|
23 => ['country' => 'Romania', 'taxes' => 19.00,'eu' => 1],
|
||||||
24 => ['country' => 'Slovakia', 'taxes' => 23.00],
|
24 => ['country' => 'Slovakia', 'taxes' => 23.00,'eu' => 1],
|
||||||
25 => ['country' => 'Slovenia', 'taxes' => 22.00],
|
25 => ['country' => 'Slovenia', 'taxes' => 22.00,'eu' => 1],
|
||||||
26 => ['country' => 'Spain', 'taxes' => 21.00],
|
26 => ['country' => 'Spain', 'taxes' => 21.00,'eu' => 1],
|
||||||
27 => ['country' => 'Sweden', 'taxes' => 25.00],
|
27 => ['country' => 'Sweden', 'taxes' => 25.00,'eu' => 1],
|
||||||
28 => ['country' => 'United Kingdom', 'taxes' => 20.00],
|
28 => ['country' => 'United Kingdom', 'taxes' => 0.00,'eu' => 0],
|
||||||
29 => ['country' => 'Switzerland', 'taxes' => 8.10],
|
29 => ['country' => 'Switzerland', 'taxes' => 0.00,'eu' => 0],
|
||||||
30 => ['country' => 'Norway', 'taxes' => 25.00],
|
30 => ['country' => 'Norway', 'taxes' => 0.00,'eu' => 0],
|
||||||
31 => ['country' => 'Iceland', 'taxes' => 24.00],
|
31 => ['country' => 'Iceland', 'taxes' => 0.00,'eu' => 0],
|
||||||
32 => ['country' => 'Albania', 'taxes' => 20.00],
|
32 => ['country' => 'Albania', 'taxes' => 0.00,'eu' => 0],
|
||||||
33 => ['country' => 'Serbia', 'taxes' => 20.00],
|
33 => ['country' => 'Serbia', 'taxes' => 0.00,'eu' => 0],
|
||||||
34 => ['country' => 'North Macedonia', 'taxes' => 18.00],
|
34 => ['country' => 'North Macedonia', 'taxes' => 0.00,'eu' => 0],
|
||||||
35 => ['country' => 'Bosnia and Herzegovina', 'taxes' => 17.00],
|
35 => ['country' => 'Bosnia and Herzegovina', 'taxes' => 0.00,'eu' => 0],
|
||||||
36 => ['country' => 'Montenegro', 'taxes' => 21.00],
|
36 => ['country' => 'Montenegro', 'taxes' => 0.00,'eu' => 0],
|
||||||
37 => ['country' => 'Moldova', 'taxes' => 20.00],
|
37 => ['country' => 'Moldova', 'taxes' => 0.00,'eu' => 0],
|
||||||
38 => ['country' => 'Ukraine', 'taxes' => 20.00],
|
38 => ['country' => 'Ukraine', 'taxes' => 0.00,'eu' => 0],
|
||||||
39 => ['country' => 'Belarus', 'taxes' => 20.00],
|
39 => ['country' => 'Belarus', 'taxes' => 0.00,'eu' => 0],
|
||||||
40 => ['country' => 'Turkey', 'taxes' => 20.00],
|
40 => ['country' => 'Turkey', 'taxes' => 0.00,'eu' => 0],
|
||||||
41 => ['country' => 'Andorra', 'taxes' => 4.50],
|
41 => ['country' => 'Andorra', 'taxes' => 0.00,'eu' => 0],
|
||||||
42 => ['country' => 'Australia', 'taxes' => 10.00],
|
42 => ['country' => 'Australia', 'taxes' => 0.00,'eu' => 0],
|
||||||
43 => ['country' => 'New Zealand', 'taxes' => 15.00],
|
43 => ['country' => 'New Zealand', 'taxes' => 0.00,'eu' => 0],
|
||||||
44 => ['country' => 'Japan', 'taxes' => 10.00],
|
44 => ['country' => 'Japan', 'taxes' => 0.00,'eu' => 0],
|
||||||
45 => ['country' => 'China', 'taxes' => 13.00],
|
45 => ['country' => 'China', 'taxes' => 0.00,'eu' => 0],
|
||||||
46 => ['country' => 'India', 'taxes' => 18.00],
|
46 => ['country' => 'India', 'taxes' => 0.00,'eu' => 0],
|
||||||
47 => ['country' => 'South Korea', 'taxes' => 10.00],
|
47 => ['country' => 'South Korea', 'taxes' => 0.00,'eu' => 0],
|
||||||
48 => ['country' => 'Singapore', 'taxes' => 9.00],
|
48 => ['country' => 'Singapore', 'taxes' => 0.00,'eu' => 0],
|
||||||
49 => ['country' => 'Indonesia', 'taxes' => 11.00],
|
49 => ['country' => 'Indonesia', 'taxes' => 0.00,'eu' => 0],
|
||||||
50 => ['country' => 'Thailand', 'taxes' => 7.00],
|
50 => ['country' => 'Thailand', 'taxes' => 0.00,'eu' => 0],
|
||||||
51 => ['country' => 'Vietnam', 'taxes' => 8.00],
|
51 => ['country' => 'Vietnam', 'taxes' => 0.00,'eu' => 0],
|
||||||
52 => ['country' => 'Philippines', 'taxes' => 12.00],
|
52 => ['country' => 'Philippines', 'taxes' => 0.00,'eu' => 0],
|
||||||
53 => ['country' => 'Malaysia', 'taxes' => 0.00],
|
53 => ['country' => 'Malaysia', 'taxes' => 0.00,'eu' => 0],
|
||||||
54 => ['country' => 'Taiwan', 'taxes' => 5.00],
|
54 => ['country' => 'Taiwan', 'taxes' => 0.00,'eu' => 0],
|
||||||
55 => ['country' => 'Pakistan', 'taxes' => 18.00],
|
55 => ['country' => 'Pakistan', 'taxes' => 0.00,'eu' => 0],
|
||||||
56 => ['country' => 'Bangladesh', 'taxes' => 15.00],
|
56 => ['country' => 'Bangladesh', 'taxes' => 0.00,'eu' => 0],
|
||||||
57 => ['country' => 'Sri Lanka', 'taxes' => 18.00],
|
57 => ['country' => 'Sri Lanka', 'taxes' => 0.00,'eu' => 0],
|
||||||
58 => ['country' => 'Nepal', 'taxes' => 13.00],
|
58 => ['country' => 'Nepal', 'taxes' => 0.00,'eu' => 0],
|
||||||
59 => ['country' => 'Cambodia', 'taxes' => 10.00],
|
59 => ['country' => 'Cambodia', 'taxes' => 0.00,'eu' => 0],
|
||||||
60 => ['country' => 'Myanmar', 'taxes' => 5.00],
|
60 => ['country' => 'Myanmar', 'taxes' => 0.00,'eu' => 0],
|
||||||
61 => ['country' => 'Laos', 'taxes' => 10.00],
|
61 => ['country' => 'Laos', 'taxes' => 0.00,'eu' => 0],
|
||||||
62 => ['country' => 'Mongolia', 'taxes' => 10.00],
|
62 => ['country' => 'Mongolia', 'taxes' => 0.00,'eu' => 0],
|
||||||
63 => ['country' => 'Kazakhstan', 'taxes' => 12.00],
|
63 => ['country' => 'Kazakhstan', 'taxes' => 0.00,'eu' => 0],
|
||||||
64 => ['country' => 'Uzbekistan', 'taxes' => 12.00],
|
64 => ['country' => 'Uzbekistan', 'taxes' => 0.00,'eu' => 0],
|
||||||
65 => ['country' => 'Armenia', 'taxes' => 20.00],
|
65 => ['country' => 'Armenia', 'taxes' => 0.00,'eu' => 0],
|
||||||
66 => ['country' => 'Georgia', 'taxes' => 18.00],
|
66 => ['country' => 'Georgia', 'taxes' => 0.00,'eu' => 0],
|
||||||
67 => ['country' => 'Azerbaijan', 'taxes' => 18.00],
|
67 => ['country' => 'Azerbaijan', 'taxes' => 0.00,'eu' => 0],
|
||||||
68 => ['country' => 'Fiji', 'taxes' => 9.00],
|
68 => ['country' => 'Fiji', 'taxes' => 0.00,'eu' => 0],
|
||||||
69 => ['country' => 'Papua New Guinea', 'taxes' => 10.00],
|
69 => ['country' => 'Papua New Guinea', 'taxes' => 0.00,'eu' => 0],
|
||||||
70 => ['country' => 'Samoa', 'taxes' => 15.00],
|
70 => ['country' => 'Samoa', 'taxes' => 0.00,'eu' => 0],
|
||||||
71 => ['country' => 'Tonga', 'taxes' => 15.00],
|
71 => ['country' => 'Tonga', 'taxes' => 0.00,'eu' => 0],
|
||||||
72 => ['country' => 'Vanuatu', 'taxes' => 15.00],
|
72 => ['country' => 'Vanuatu', 'taxes' => 0.00,'eu' => 0],
|
||||||
73 => ['country' => 'Bhutan', 'taxes' => 7.00],
|
73 => ['country' => 'Bhutan', 'taxes' => 0.00,'eu' => 0],
|
||||||
74 => ['country' => 'Saudi Arabia', 'taxes' => 15.00],
|
74 => ['country' => 'Saudi Arabia', 'taxes' => 0.00,'eu' => 0],
|
||||||
75 => ['country' => 'United Arab Emirates', 'taxes' => 5.00],
|
75 => ['country' => 'United Arab Emirates', 'taxes' => 0.00,'eu' => 0],
|
||||||
76 => ['country' => 'Bahrain', 'taxes' => 10.00],
|
76 => ['country' => 'Bahrain', 'taxes' => 0.00,'eu' => 0],
|
||||||
77 => ['country' => 'Kuwait', 'taxes' => 0.00],
|
77 => ['country' => 'Kuwait', 'taxes' => 0.00,'eu' => 0],
|
||||||
78 => ['country' => 'Oman', 'taxes' => 5.00],
|
78 => ['country' => 'Oman', 'taxes' => 0.00,'eu' => 0],
|
||||||
79 => ['country' => 'Qatar', 'taxes' => 0.00],
|
79 => ['country' => 'Qatar', 'taxes' => 0.00,'eu' => 0],
|
||||||
80 => ['country' => 'Israel', 'taxes' => 17.00],
|
80 => ['country' => 'Israel', 'taxes' => 0.00,'eu' => 0],
|
||||||
81 => ['country' => 'Jordan', 'taxes' => 16.00],
|
81 => ['country' => 'Jordan', 'taxes' => 0.00,'eu' => 0],
|
||||||
82 => ['country' => 'Lebanon', 'taxes' => 11.00],
|
82 => ['country' => 'Lebanon', 'taxes' => 0.00,'eu' => 0],
|
||||||
83 => ['country' => 'Egypt', 'taxes' => 14.00],
|
83 => ['country' => 'Egypt', 'taxes' => 0.00,'eu' => 0],
|
||||||
85 => ['country' => 'South Africa', 'taxes' => 15.00],
|
85 => ['country' => 'South Africa', 'taxes' => 0.00,'eu' => 0],
|
||||||
86 => ['country' => 'Nigeria', 'taxes' => 7.50],
|
86 => ['country' => 'Nigeria', 'taxes' => 0.00,'eu' => 0],
|
||||||
87 => ['country' => 'Kenya', 'taxes' => 16.00],
|
87 => ['country' => 'Kenya', 'taxes' => 0.00,'eu' => 0],
|
||||||
88 => ['country' => 'Ghana', 'taxes' => 15.00],
|
88 => ['country' => 'Ghana', 'taxes' => 0.00,'eu' => 0],
|
||||||
89 => ['country' => 'Morocco', 'taxes' => 20.00],
|
89 => ['country' => 'Morocco', 'taxes' => 0.00,'eu' => 0],
|
||||||
90 => ['country' => 'Tunisia', 'taxes' => 19.00],
|
90 => ['country' => 'Tunisia', 'taxes' => 0.00,'eu' => 0],
|
||||||
91 => ['country' => 'Algeria', 'taxes' => 19.00],
|
91 => ['country' => 'Algeria', 'taxes' => 0.00,'eu' => 0],
|
||||||
92 => ['country' => 'Egypt', 'taxes' => 14.00],
|
92 => ['country' => 'Egypt', 'taxes' => 0.00,'eu' => 0],
|
||||||
93 => ['country' => 'Ethiopia', 'taxes' => 15.00],
|
93 => ['country' => 'Ethiopia', 'taxes' => 0.00,'eu' => 0],
|
||||||
94 => ['country' => 'Tanzania', 'taxes' => 18.00],
|
94 => ['country' => 'Tanzania', 'taxes' => 0.00,'eu' => 0],
|
||||||
95 => ['country' => 'Uganda', 'taxes' => 18.00],
|
95 => ['country' => 'Uganda', 'taxes' => 0.00,'eu' => 0],
|
||||||
96 => ['country' => 'Zimbabwe', 'taxes' => 15.00],
|
96 => ['country' => 'Zimbabwe', 'taxes' => 0.00,'eu' => 0],
|
||||||
97 => ['country' => 'Zambia', 'taxes' => 16.00],
|
97 => ['country' => 'Zambia', 'taxes' => 0.00,'eu' => 0],
|
||||||
98 => ['country' => 'Botswana', 'taxes' => 14.00],
|
98 => ['country' => 'Botswana', 'taxes' => 0.00,'eu' => 0],
|
||||||
99 => ['country' => 'Mauritius', 'taxes' => 15.00],
|
99 => ['country' => 'Mauritius', 'taxes' => 0.00,'eu' => 0],
|
||||||
100 => ['country' => 'Namibia', 'taxes' => 15.00],
|
100 => ['country' => 'Namibia', 'taxes' => 0.00,'eu' => 0],
|
||||||
101 => ['country' => 'Rwanda', 'taxes' => 18.00],
|
101 => ['country' => 'Rwanda', 'taxes' => 0.00,'eu' => 0],
|
||||||
102 => ['country' => 'Senegal', 'taxes' => 18.00],
|
102 => ['country' => 'Senegal', 'taxes' => 0.00,'eu' => 0],
|
||||||
103 => ['country' => 'Ivory Coast', 'taxes' => 18.00],
|
103 => ['country' => 'Ivory Coast', 'taxes' => 0.00,'eu' => 0],
|
||||||
104 => ['country' => 'Cameroon', 'taxes' => 19.25],
|
104 => ['country' => 'Cameroon', 'taxes' => 0.00,'eu' => 0],
|
||||||
105 => ['country' => 'Angola', 'taxes' => 14.00],
|
105 => ['country' => 'Angola', 'taxes' => 0.00,'eu' => 0],
|
||||||
106 => ['country' => 'Mozambique', 'taxes' => 16.00],
|
106 => ['country' => 'Mozambique', 'taxes' => 0.00,'eu' => 0],
|
||||||
107 => ['country' => 'Madagascar', 'taxes' => 20.00],
|
107 => ['country' => 'Madagascar', 'taxes' => 0.00,'eu' => 0],
|
||||||
108 => ['country' => 'Mali', 'taxes' => 18.00],
|
108 => ['country' => 'Mali', 'taxes' => 0.00,'eu' => 0],
|
||||||
109 => ['country' => 'Burkina Faso', 'taxes' => 18.00],
|
109 => ['country' => 'Burkina Faso', 'taxes' => 0.00,'eu' => 0],
|
||||||
110 => ['country' => 'Niger', 'taxes' => 19.00],
|
110 => ['country' => 'Niger', 'taxes' => 0.00,'eu' => 0],
|
||||||
111 => ['country' => 'Benin', 'taxes' => 18.00],
|
111 => ['country' => 'Benin', 'taxes' => 0.00,'eu' => 0],
|
||||||
112 => ['country' => 'Togo', 'taxes' => 18.00],
|
112 => ['country' => 'Togo', 'taxes' => 0.00,'eu' => 0],
|
||||||
113 => ['country' => 'Guinea', 'taxes' => 18.00],
|
113 => ['country' => 'Guinea', 'taxes' => 0.00,'eu' => 0],
|
||||||
114 => ['country' => 'Malawi', 'taxes' => 16.50],
|
114 => ['country' => 'Malawi', 'taxes' => 0.00,'eu' => 0],
|
||||||
115 => ['country' => 'Gabon', 'taxes' => 18.00],
|
115 => ['country' => 'Gabon', 'taxes' => 0.00,'eu' => 0],
|
||||||
116 => ['country' => 'Mauritania', 'taxes' => 16.00],
|
116 => ['country' => 'Mauritania', 'taxes' => 0.00,'eu' => 0],
|
||||||
117 => ['country' => 'Lesotho', 'taxes' => 15.00],
|
117 => ['country' => 'Lesotho', 'taxes' => 0.00,'eu' => 0],
|
||||||
118 => ['country' => 'Eswatini', 'taxes' => 15.00],
|
118 => ['country' => 'Eswatini', 'taxes' => 0.00,'eu' => 0],
|
||||||
119 => ['country' => 'Liberia', 'taxes' => 18.00],
|
119 => ['country' => 'Liberia', 'taxes' => 0.00,'eu' => 0],
|
||||||
120 => ['country' => 'Canada', 'taxes' => 5.00],
|
120 => ['country' => 'Canada', 'taxes' => 0.00,'eu' => 0],
|
||||||
121 => ['country' => 'United States', 'taxes' => 10.00],
|
121 => ['country' => 'United States', 'taxes' => 0.00,'eu' => 0],
|
||||||
122 => ['country' => 'Mexico', 'taxes' => 16.00],
|
122 => ['country' => 'Mexico', 'taxes' => 0.00,'eu' => 0],
|
||||||
123 => ['country' => 'Argentina', 'taxes' => 21.00],
|
123 => ['country' => 'Argentina', 'taxes' => 0.00,'eu' => 0],
|
||||||
124 => ['country' => 'Brazil', 'taxes' => 17.00],
|
124 => ['country' => 'Brazil', 'taxes' => 0.00,'eu' => 0],
|
||||||
125 => ['country' => 'Chile', 'taxes' => 19.00],
|
125 => ['country' => 'Chile', 'taxes' => 0.00,'eu' => 0],
|
||||||
126 => ['country' => 'Colombia', 'taxes' => 19.00],
|
126 => ['country' => 'Colombia', 'taxes' => 0.00,'eu' => 0],
|
||||||
127 => ['country' => 'Peru', 'taxes' => 18.00],
|
127 => ['country' => 'Peru', 'taxes' => 0.00,'eu' => 0],
|
||||||
128 => ['country' => 'Ecuador', 'taxes' => 15.00],
|
128 => ['country' => 'Ecuador', 'taxes' => 0.00,'eu' => 0],
|
||||||
129 => ['country' => 'Uruguay', 'taxes' => 22.00],
|
129 => ['country' => 'Uruguay', 'taxes' => 0.00,'eu' => 0],
|
||||||
130 => ['country' => 'Paraguay', 'taxes' => 10.00],
|
130 => ['country' => 'Paraguay', 'taxes' => 0.00,'eu' => 0],
|
||||||
131 => ['country' => 'Bolivia', 'taxes' => 13.00],
|
131 => ['country' => 'Bolivia', 'taxes' => 0.00,'eu' => 0],
|
||||||
132 => ['country' => 'Venezuela', 'taxes' => 16.00],
|
132 => ['country' => 'Venezuela', 'taxes' => 0.00,'eu' => 0],
|
||||||
133 => ['country' => 'Costa Rica', 'taxes' => 13.00],
|
133 => ['country' => 'Costa Rica', 'taxes' => 0.00,'eu' => 0],
|
||||||
134 => ['country' => 'Panama', 'taxes' => 7.00],
|
134 => ['country' => 'Panama', 'taxes' => 0.00,'eu' => 0],
|
||||||
135 => ['country' => 'Guatemala', 'taxes' => 12.00],
|
135 => ['country' => 'Guatemala', 'taxes' => 0.00,'eu' => 0],
|
||||||
136 => ['country' => 'Honduras', 'taxes' => 15.00],
|
136 => ['country' => 'Honduras', 'taxes' => 0.00,'eu' => 0],
|
||||||
137 => ['country' => 'El Salvador', 'taxes' => 13.00],
|
137 => ['country' => 'El Salvador', 'taxes' => 0.00,'eu' => 0],
|
||||||
138 => ['country' => 'Nicaragua', 'taxes' => 15.00],
|
138 => ['country' => 'Nicaragua', 'taxes' => 0.00,'eu' => 0],
|
||||||
139 => ['country' => 'Dominican Republic', 'taxes' => 18.00],
|
139 => ['country' => 'Dominican Republic', 'taxes' => 0.00,'eu' => 0],
|
||||||
140 => ['country' => 'Jamaica', 'taxes' => 15.00],
|
140 => ['country' => 'Jamaica', 'taxes' => 0.00,'eu' => 0],
|
||||||
141 => ['country' => 'Trinidad and Tobago', 'taxes' => 12.50],
|
141 => ['country' => 'Trinidad and Tobago', 'taxes' => 0.00,'eu' => 0],
|
||||||
142 => ['country' => 'Barbados', 'taxes' => 17.50],
|
142 => ['country' => 'Barbados', 'taxes' => 0.00,'eu' => 0],
|
||||||
143 => ['country' => 'Bahamas', 'taxes' => 10.00],
|
143 => ['country' => 'Bahamas', 'taxes' => 0.00,'eu' => 0],
|
||||||
];
|
];
|
||||||
|
|||||||
Reference in New Issue
Block a user