PluginProbe
Easy Invoice – Invoice Generator, PDF Quotes & Payments / 2.3.7
Easy Invoice – Invoice Generator, PDF Quotes & Payments v2.3.7
2.4.0 2.4.1 2.3.8 2.3.7 2.3.6 2.3.5 2.3.4 2.3.3 2.3.2 2.3.1 2.2.0 2.1.21 2.1.20 2.1.19 2.1.18 2.1.0 2.1.1 2.1.10 2.1.11 2.1.12 2.1.13 2.1.14 2.1.15 2.1.16 2.1.2 All 57 releases
easy-invoice / includes / Helpers / FormattingHelper.php

FormattingHelper.php in Easy Invoice – Invoice Generator, PDF Quotes & Payments 2.3.7, at includes/Helpers/FormattingHelper.php

37 lines 1.1 KB
No matching file
Up and down to move Enter to open Esc to close
Raw Download Zip
1 <?php
2
3 // Currency Settings Helper Functions
4 function easy_invoice_get_currency_code() {
5 return get_option('easy_invoice_currency_code', 'USD');
6 }
7
8 function easy_invoice_get_currency_position() {
9 return get_option('easy_invoice_currency_position', 'left');
10 }
11
12 function easy_invoice_get_currency_symbol_type() {
13 return get_option('easy_invoice_currency_symbol_type', 'symbol');
14 }
15
16 function easy_invoice_get_currency_symbol() {
17 $currency_code = easy_invoice_get_currency_code();
18 $currency_symbol_type = easy_invoice_get_currency_symbol_type();
19
20 if ($currency_symbol_type === 'code') {
21 return $currency_code;
22 }
23
24 return \EasyInvoice\Helpers\CurrencyHelper::getCurrencySymbol($currency_code);
25 }
26
27 function easy_invoice_get_thousands_separator() {
28 return get_option('easy_invoice_thousands_separator', ',');
29 }
30
31 function easy_invoice_get_decimal_separator() {
32 return get_option('easy_invoice_decimal_separator', '.');
33 }
34
35 function easy_invoice_get_decimal_precision() {
36 return intval(get_option('easy_invoice_decimal_precision', 2));
37 }