',
- ]); ?>.
diff --git a/modules/statistiche/edit.php b/modules/statistiche/edit.php
index 38c386dc7..e7bab1be8 100644
--- a/modules/statistiche/edit.php
+++ b/modules/statistiche/edit.php
@@ -153,7 +153,7 @@ if (!empty($clienti)) {
';
}
diff --git a/plugins/pianificazione_interventi/add_articolo.php b/plugins/pianificazione_interventi/add_articolo.php
index 63e93a590..832d38b2f 100644
--- a/plugins/pianificazione_interventi/add_articolo.php
+++ b/plugins/pianificazione_interventi/add_articolo.php
@@ -126,7 +126,7 @@ echo '
// Prezzo di vendita
echo '
- {[ "type": "number", "label": "'.tr('Costo unitario').'", "name": "prezzo_vendita", "required": 1, "value": "'.$prezzo_vendita.'", "icon-after": "€" ]}
+ {[ "type": "number", "label": "'.tr('Costo unitario').'", "name": "prezzo_vendita", "required": 1, "value": "'.$prezzo_vendita.'", "icon-after": "'.currency().'" ]}
';
// Sconto
diff --git a/plugins/pianificazione_interventi/add_righe.php b/plugins/pianificazione_interventi/add_righe.php
index c364a9dba..89be8b774 100644
--- a/plugins/pianificazione_interventi/add_righe.php
+++ b/plugins/pianificazione_interventi/add_righe.php
@@ -80,13 +80,13 @@ echo '
echo '
- {[ "type": "number", "label": "'.tr('Prezzo di acquisto (un.)').'", "name": "prezzo_acquisto", "required": 1, "value": "'.$prezzo_acquisto.'", "icon-after": "€" ]}
+ {[ "type": "number", "label": "'.tr('Prezzo di acquisto (un.)').'", "name": "prezzo_acquisto", "required": 1, "value": "'.$prezzo_acquisto.'", "icon-after": "'.currency().'" ]}
';
// Prezzo di vendita
echo '
- {[ "type": "number", "label": "'.tr('Prezzo di vendita (un.)').'", "name": "prezzo_vendita", "required": 1, "value": "'.$prezzo_vendita.'", "icon-after": "€" ]}
+ {[ "type": "number", "label": "'.tr('Prezzo di vendita (un.)').'", "name": "prezzo_vendita", "required": 1, "value": "'.$prezzo_vendita.'", "icon-after": "'.currency().'" ]}
';
// Sconto unitario
diff --git a/plugins/pianificazione_interventi/ajax_articoli.php b/plugins/pianificazione_interventi/ajax_articoli.php
index 351d9f0a6..295af01bb 100644
--- a/plugins/pianificazione_interventi/ajax_articoli.php
+++ b/plugins/pianificazione_interventi/ajax_articoli.php
@@ -83,7 +83,7 @@ if (!empty($rs)) {
if ($pricing) {
echo '
- '.Translator::numberToLocale($r['prezzo_acquisto']).' €
+ '.Translator::numberToLocale($r['prezzo_acquisto']).' '.currency().'
| ';
}
@@ -91,14 +91,14 @@ if (!empty($rs)) {
// Prezzo unitario
echo '
- '.Translator::numberToLocale($r['prezzo_vendita']).' €';
+ '.Translator::numberToLocale($r['prezzo_vendita']).' '.currency().'';
if ($r['sconto_unitario'] > 0) {
echo '
- '.tr('sconto _TOT_ _TYPE_', [
'_TOT_' => Translator::numberToLocale($r['sconto_unitario']),
- '_TYPE_' => ($r['tipo_sconto'] == 'PRC' ? '%' : '€'),
+ '_TYPE_' => ($r['tipo_sconto'] == 'PRC' ? '%' : currency()),
]).'
';
}
@@ -108,14 +108,14 @@ if (!empty($rs)) {
echo '
|
- '.Translator::numberToLocale($r['iva']).' €';
+ '.Translator::numberToLocale($r['iva']).' '.currency();
echo '
| ';
// Prezzo di vendita
echo '
- '.Translator::numberToLocale(sum($r['prezzo_vendita'] * $r['qta'], -$r['sconto'])).' €
+ '.Translator::numberToLocale(sum($r['prezzo_vendita'] * $r['qta'], -$r['sconto'])).' '.currency().'
| ';
}
diff --git a/plugins/pianificazione_interventi/ajax_righe.php b/plugins/pianificazione_interventi/ajax_righe.php
index 1295f20cc..cd8ce4fa4 100644
--- a/plugins/pianificazione_interventi/ajax_righe.php
+++ b/plugins/pianificazione_interventi/ajax_righe.php
@@ -48,7 +48,7 @@ if (!empty($rs2)) {
//Costo unitario
echo '
- '.Translator::numberToLocale($r['prezzo_acquisto']).' €
+ '.Translator::numberToLocale($r['prezzo_acquisto']).' '.currency().'
| ';
if ($pricing) {
@@ -57,14 +57,14 @@ if (!empty($rs2)) {
echo '
- '.Translator::numberToLocale($r['prezzo_vendita']).' €';
+ '.Translator::numberToLocale($r['prezzo_vendita']).' '.currency().'';
if ($r['sconto_unitario'] > 0) {
echo '
- '.tr('sconto _TOT_ _TYPE_', [
'_TOT_' => Translator::numberToLocale($r['sconto_unitario']),
- '_TYPE_' => ($r['tipo_sconto'] == 'PRC' ? '%' : '€'),
+ '_TYPE_' => ($r['tipo_sconto'] == 'PRC' ? '%' : currency()),
]).'
';
}
@@ -74,14 +74,13 @@ if (!empty($rs2)) {
echo '
|
- '.Translator::numberToLocale($r['iva']).' €';
- echo '
+ '.Translator::numberToLocale($r['iva']).' '.currency().'
| ';
// Prezzo di vendita
echo '
- '.Translator::numberToLocale(sum($r['prezzo_vendita'] * $r['qta'], -$r['sconto'])).' €
+ '.Translator::numberToLocale(sum($r['prezzo_vendita'] * $r['qta'], -$r['sconto'])).' '.currency().'
| ';
}
diff --git a/src/HTMLBuilder/Wrapper/HTMLWrapper.php b/src/HTMLBuilder/Wrapper/HTMLWrapper.php
index 8ad2227b6..1ae28f1f8 100644
--- a/src/HTMLBuilder/Wrapper/HTMLWrapper.php
+++ b/src/HTMLBuilder/Wrapper/HTMLWrapper.php
@@ -138,7 +138,7 @@ class HTMLWrapper implements WrapperInterface
],
[
'id' => 'UNT',
- 'descrizione' => tr('€'),
+ 'descrizione' => currency(),
],
];
} elseif ($type == 'email') {
diff --git a/src/Translator.php b/src/Translator.php
index ebbb586f1..43aad50d0 100644
--- a/src/Translator.php
+++ b/src/Translator.php
@@ -11,6 +11,8 @@ class Translator extends Util\Singleton
{
/** @var Intl\Formatter Oggetto per la conversione di date e numeri nella lingua selezionata */
protected static $formatter;
+ /** @var string Simbolo della valuta corrente */
+ protected static $currency;
/** @var Symfony\Component\Translation\Translator Oggetto dedicato alle traduzioni */
protected $translator;
@@ -144,6 +146,25 @@ class Translator extends Util\Singleton
return self::$formatter;
}
+ /**
+ * Restituisce il simbolo della valuta del gestione.
+ *
+ * @since 2.4.9
+ *
+ * @return string
+ */
+ public static function getCurrency()
+ {
+ if (!isset(self::$currency)) {
+ $id = setting('Valuta');
+ $valuta = database()->fetchOne('SELECT symbol FROM zz_currencies WHERE id = '.prepare($id));
+
+ self::$currency = $valuta['symbol'];
+ }
+
+ return self::$currency;
+ }
+
/**
* Converte il numero dalla formattazione locale a quella inglese.
*
diff --git a/templates/contratti/body.php b/templates/contratti/body.php
index 06d61ef2b..963bdf75c 100644
--- a/templates/contratti/body.php
+++ b/templates/contratti/body.php
@@ -136,7 +136,7 @@ foreach ($righe as $r) {
";
if (empty($r['is_descrizione'])) {
echo '
- '.(empty($r['qta']) || empty($r['subtotale']) ? '' : Translator::numberToLocale($r['subtotale'] / $r['qta'])).' €';
+ '.(empty($r['qta']) || empty($r['subtotale']) ? '' : Translator::numberToLocale($r['subtotale'] / $r['qta'])).' '.currency();
}
echo '
| ';
@@ -146,13 +146,13 @@ foreach ($righe as $r) {
";
if (empty($r['is_descrizione'])) {
echo '
- '.(empty($r['subtotale']) ? '' : Translator::numberToLocale($r['subtotale'])).' €';
+ '.(empty($r['subtotale']) ? '' : Translator::numberToLocale($r['subtotale'])).' '.currency();
if ($r['sconto'] > 0) {
echo '
- '.tr('sconto _TOT_ _TYPE_', [
'_TOT_' => Translator::numberToLocale($r['sconto_unitario']),
- '_TYPE_' => ($r['tipo_sconto'] == 'PRC' ? '%' : '€'),
+ '_TYPE_' => ($r['tipo_sconto'] == 'PRC' ? '%' : currency()),
]).'';
if ($count <= 1) {
@@ -198,7 +198,7 @@ if ($options['pricing']) {
|
- '.Translator::numberToLocale($imponibile).' €
+ '.Translator::numberToLocale($imponibile).' '.currency().'
|
';
@@ -209,7 +209,7 @@ if ($options['pricing']) {
- -'.Translator::numberToLocale($sconto).' €
+ -'.Translator::numberToLocale($sconto).' '.currency().'
|
';
}
@@ -221,7 +221,7 @@ if ($options['pricing']) {
'.tr('Quotazione totale', [], ['upper' => true]).':
- '.Translator::numberToLocale($totale).' €
+ '.Translator::numberToLocale($totale).' '.currency().'
|
';
}
diff --git a/templates/contratti_cons/body.php b/templates/contratti_cons/body.php
index a8214b841..7e3f4de18 100644
--- a/templates/contratti_cons/body.php
+++ b/templates/contratti_cons/body.php
@@ -132,11 +132,11 @@ if (!empty($interventi)) {
echo '
- '.Translator::numberToLocale($int['sconto']).' €
+ '.Translator::numberToLocale($int['sconto']).' '.currency().'
|
- '.Translator::numberToLocale($int['subtotale']).' €
+ '.Translator::numberToLocale($int['subtotale']).' '.currency().'
| ';
} else {
echo '
@@ -192,11 +192,11 @@ if (!empty($interventi)) {
echo '
- '.Translator::numberToLocale($sconto_int).' €
+ '.Translator::numberToLocale($sconto_int).' '.currency().'
|
- '.Translator::numberToLocale($totale_int).' €
+ '.Translator::numberToLocale($totale_int).' '.currency().'
| ';
} else {
echo '
@@ -285,13 +285,13 @@ if (!empty($interventi)) {
// Prezzo unitario
echo "
- ".Translator::numberToLocale($r['prezzo_vendita']).' €';
+ ".Translator::numberToLocale($r['prezzo_vendita']).' '.currency();
if ($r['sconto'] > 0) {
echo "
- ".tr('sconto _TOT_ _TYPE_', [
'_TOT_' => Translator::numberToLocale($r['sconto_unitario']),
- '_TYPE_' => ($r['tipo_sconto'] == 'PRC' ? '%' : '€'),
+ '_TYPE_' => ($r['tipo_sconto'] == 'PRC' ? '%' : currency()),
]).'';
if ($count <= 1) {
@@ -306,13 +306,13 @@ if (!empty($interventi)) {
$netto = $r['prezzo_vendita'] * $r['qta'];
echo '
|
- '.Translator::numberToLocale($netto).' €';
+ '.Translator::numberToLocale($netto).' '.currency();
if ($r['sconto'] > 0) {
echo "
- ".tr('sconto _TOT_ _TYPE_', [
'_TOT_' => Translator::numberToLocale($r['sconto']),
- '_TYPE_' => '€',
+ '_TYPE_' => currency(),
]).'';
if ($count <= 1) {
@@ -356,7 +356,7 @@ if (!empty($interventi)) {
|
- '.Translator::numberToLocale($totale_art).' €
+ '.Translator::numberToLocale($totale_art).' '.currency().'
|
';
}
@@ -433,13 +433,13 @@ if (!empty($interventi)) {
// Prezzo unitario
echo "
- ".Translator::numberToLocale($r['prezzo_vendita']).' €';
+ ".Translator::numberToLocale($r['prezzo_vendita']).' '.currency();
if ($r['sconto'] > 0) {
echo "
- ".tr('sconto _TOT_ _TYPE_', [
'_TOT_' => Translator::numberToLocale($r['sconto_unitario']),
- '_TYPE_' => ($r['tipo_sconto'] == 'PRC' ? '%' : '€'),
+ '_TYPE_' => ($r['tipo_sconto'] == 'PRC' ? '%' : currency()),
]).'';
if ($count <= 1) {
@@ -454,13 +454,13 @@ if (!empty($interventi)) {
$netto = $r['prezzo_vendita'] * $r['qta'];
echo '
|
- '.Translator::numberToLocale($netto).' €';
+ '.Translator::numberToLocale($netto).' '.currency();
if ($r['sconto'] > 0) {
echo "
- ".tr('sconto _TOT_ _TYPE_', [
'_TOT_' => Translator::numberToLocale($r['sconto']),
- '_TYPE_' => '€',
+ '_TYPE_' => currency(),
]).'';
if ($count <= 1) {
@@ -502,7 +502,7 @@ if (!empty($interventi)) {
|
- '.Translator::numberToLocale($totale_spese).' €
+ '.Translator::numberToLocale($totale_spese).' '.currency().'
|
';
@@ -541,7 +541,7 @@ if ($options['pricing']) {
- '.Translator::numberToLocale($imponibile).' €
+ '.Translator::numberToLocale($imponibile).' '.currency().'
|
';
@@ -554,7 +554,7 @@ if ($options['pricing']) {
- -'.Translator::numberToLocale($sconto).' €
+ -'.Translator::numberToLocale($sconto).' '.currency().'
|
';
@@ -566,7 +566,7 @@ if ($options['pricing']) {
- '.Translator::numberToLocale($totale).' €
+ '.Translator::numberToLocale($totale).' '.currency().'
|
';
}
@@ -585,7 +585,7 @@ if ($options['pricing']) {
- '.Translator::numberToLocale($iva).' €
+ '.Translator::numberToLocale($iva).' '.currency().'
|
';
@@ -599,7 +599,7 @@ if ($options['pricing']) {
'.tr('Totale consuntivo (no IVA)', [], ['upper' => true]).':
- '.Translator::numberToLocale($totale).' €
+ '.Translator::numberToLocale($totale).' '.currency().'
|
';
@@ -610,7 +610,7 @@ if ($options['pricing']) {
'.tr('Budget (no IVA)', [], ['upper' => true]).':
- '.Translator::numberToLocale($budget).' €
+ '.Translator::numberToLocale($budget).' '.currency().'
|
';
@@ -621,7 +621,7 @@ if ($options['pricing']) {
'.tr('Rapporto budget/spesa (no IVA)', [], ['upper' => true]).':
- '.Translator::numberToLocale($rapporto).' €
+ '.Translator::numberToLocale($rapporto).' '.currency().'
|
';
}
diff --git a/templates/ddt/body.php b/templates/ddt/body.php
index 1ce2e1cb2..787569b54 100644
--- a/templates/ddt/body.php
+++ b/templates/ddt/body.php
@@ -106,7 +106,7 @@ foreach ($rs_gen as $r) {
";
if (empty($r['is_descrizione'])) {
echo '
- '.Translator::numberToLocale($r['subtotale'] / $r['qta']).' €';
+ '.Translator::numberToLocale($r['subtotale'] / $r['qta']).' '.currency();
}
echo '
| ';
@@ -116,7 +116,7 @@ foreach ($rs_gen as $r) {
";
if (empty($r['is_descrizione'])) {
echo '
- '.Translator::numberToLocale($r['subtotale']).' €';
+ '.Translator::numberToLocale($r['subtotale']).' '.currency();
if ($r['sconto'] > 0) {
if ($count <= 1) {
@@ -125,7 +125,7 @@ foreach ($rs_gen as $r) {
echo '
- '.tr('sconto _TOT_ _TYPE_', [
'_TOT_' => Translator::numberToLocale($r['sconto_unitario']),
- '_TYPE_' => ($r['tipo_sconto'] == 'PRC' ? '%' : '€'),
+ '_TYPE_' => ($r['tipo_sconto'] == 'PRC' ? '%' : currency()),
]).'';
}
}
diff --git a/templates/ddt/footer.php b/templates/ddt/footer.php
index 79e687550..f9a4a63fd 100644
--- a/templates/ddt/footer.php
+++ b/templates/ddt/footer.php
@@ -21,7 +21,7 @@ if ($options['pricing']) {
echo "
|
- ".Translator::numberToLocale($imponibile).' €
+ ".Translator::numberToLocale($imponibile).' '.currency().'
|
';
@@ -35,7 +35,7 @@ if ($options['pricing']) {
- ".Translator::numberToLocale($iva).' €
+ ".Translator::numberToLocale($iva).' '.currency().'
|
';
@@ -49,7 +49,7 @@ if ($options['pricing']) {
- ".Translator::numberToLocale($totale).' €
+ ".Translator::numberToLocale($totale).' '.currency().'
|
';
} else {
diff --git a/templates/fatturato/pdfgen.fatturato.php b/templates/fatturato/pdfgen.fatturato.php
index e993351cd..361c08927 100644
--- a/templates/fatturato/pdfgen.fatturato.php
+++ b/templates/fatturato/pdfgen.fatturato.php
@@ -50,9 +50,9 @@ for ($r = 0; $r < sizeof($rs); ++$r) {
$rs2 = $dbo->fetchArray("SELECT SUM(subtotale-co_righe_documenti.sconto) AS imponibile, SUM(iva) AS iva, (SELECT SUM(bollo) FROM co_documenti WHERE DATE_FORMAT(data,'%m-%Y') = \"".$rs[$r]['periodo'].'" AND idtipodocumento IN(SELECT id FROM co_tipidocumento WHERE dir="'.$dir."\")) AS bollo, SUM(co_righe_documenti.rivalsainps) AS rivalsainps, SUM(co_righe_documenti.ritenutaacconto) AS ritenutaacconto FROM co_righe_documenti INNER JOIN co_documenti ON co_righe_documenti.iddocumento=co_documenti.id WHERE DATE_FORMAT(data,'%m-%Y') = \"".$rs[$r]['periodo'].'" AND idtipodocumento IN(SELECT id FROM co_tipidocumento WHERE dir="'.$dir.'")');
$body .= "
".$mesi[intval(date('m', strtotime($rs[$r]['data'])))].' '.date('Y', strtotime($rs[$r]['data']))." | \n";
- $body .= "".Translator::numberToLocale($rs2[0]['imponibile'])." € | \n";
- $body .= "".Translator::numberToLocale($rs2[0]['iva'])." € | \n";
- $body .= "".Translator::numberToLocale($rs2[0]['imponibile'] + $rs2[0]['iva'] + $rs2[0]['rivalsainps'] + $rs2[0]['bollo'] + $rs2[0]['ritenutaacconto'])." € |
\n";
+ $body .= "
".Translator::numberToLocale($rs2[0]['imponibile']).' '.currency()." | \n";
+ $body .= "
".Translator::numberToLocale($rs2[0]['iva']).' '.currency()." | \n";
+ $body .= "
".Translator::numberToLocale($rs2[0]['imponibile'] + $rs2[0]['iva'] + $rs2[0]['rivalsainps'] + $rs2[0]['bollo'] + $rs2[0]['ritenutaacconto']).' '.currency()." | \n";
$totale_imponibile += $rs2[0]['imponibile'];
$totale_iva += $rs2[0]['iva'];
@@ -62,9 +62,9 @@ for ($r = 0; $r < sizeof($rs); ++$r) {
// Totali
$body .= "
\n";
$body .= " TOTALE: | \n";
-$body .= " ".Translator::numberToLocale($totale_imponibile)." € | \n";
-$body .= " ".Translator::numberToLocale($totale_iva)." € | \n";
-$body .= " ".Translator::numberToLocale($totale)." € | \n";
+$body .= " ".Translator::numberToLocale($totale_imponibile).' '.currency()." | \n";
+$body .= " ".Translator::numberToLocale($totale_iva).' '.currency()." | \n";
+$body .= " ".Translator::numberToLocale($totale).' '.currency()." | \n";
$body .= "
\n";
$body .= "\n";
diff --git a/templates/fatture/body.php b/templates/fatture/body.php
index 6f647d1e2..8730d4684 100644
--- a/templates/fatture/body.php
+++ b/templates/fatture/body.php
@@ -147,13 +147,13 @@ foreach ($righe as $r) {
";
if (empty($r['is_descrizione'])) {
echo '
- '.(empty($r['qta']) ? '' : Translator::numberToLocale($r['subtotale'] / $r['qta'])).' €';
+ '.(empty($r['qta']) ? '' : Translator::numberToLocale($r['subtotale'] / $r['qta'])).' '.currency();
if ($r['sconto'] > 0) {
echo "
".tr('sconto _TOT_ _TYPE_', [
'_TOT_' => Translator::numberToLocale($r['sconto_unitario']),
- '_TYPE_' => ($r['tipo_sconto'] == 'PRC' ? '%' : '€'),
+ '_TYPE_' => ($r['tipo_sconto'] == 'PRC' ? '%' : currency()),
]).'';
if ($count <= 1) {
@@ -170,13 +170,13 @@ foreach ($righe as $r) {
| ";
if (empty($r['is_descrizione'])) {
echo '
- '.Translator::numberToLocale($r['subtotale'] - $r['sconto']).' €';
+ '.Translator::numberToLocale($r['subtotale'] - $r['sconto']).' '.currency();
if ($r['sconto'] > 0) {
/*echo "
".tr('sconto _TOT_ _TYPE_', [
'_TOT_' => Translator::numberToLocale($r['sconto']),
- '_TYPE_' => '€',
+ '_TYPE_' => currency(),
]).'';*/
if ($count <= 1) {
diff --git a/templates/fatture/footer.php b/templates/fatture/footer.php
index daeb4c8ec..87f44797b 100644
--- a/templates/fatture/footer.php
+++ b/templates/fatture/footer.php
@@ -31,7 +31,7 @@ if (!empty($rs2)) {
".Translator::dateToLocale($rs2[$i]['scadenza'])."
|
- ".Translator::numberToLocale($rs2[$i]['da_pagare']).' €
+ ".Translator::numberToLocale($rs2[$i]['da_pagare']).' '.currency().'
|
';
}
@@ -75,11 +75,11 @@ if (!empty($v_iva)) {
- ".Translator::numberToLocale($v_totale[$desc_iva])." €
+ ".Translator::numberToLocale($v_totale[$desc_iva]).' '.currency()."
|
- ".Translator::numberToLocale($v_iva[$desc_iva]).' €
+ ".Translator::numberToLocale($v_iva[$desc_iva]).' '.currency().'
|
';
}
@@ -132,28 +132,28 @@ echo "
- ".Translator::numberToLocale($imponibile).' €
+ ".Translator::numberToLocale($imponibile).' '.currency().'
| ';
if (!empty($sconto)) {
echo "
- ".Translator::numberToLocale($sconto)." €
+ ".Translator::numberToLocale($sconto).' '.currency()."
|
- ".Translator::numberToLocale($imponibile - $sconto).' €
+ ".Translator::numberToLocale($imponibile - $sconto).' '.currency().'
| ';
}
echo "
- ".Translator::numberToLocale($totale_iva)." €
+ ".Translator::numberToLocale($totale_iva).' '.currency()."
|
- ".Translator::numberToLocale($totale).' €
+ ".Translator::numberToLocale($totale).' '.currency().'
|
';
@@ -199,21 +199,21 @@ if (!empty($record['rivalsainps'])) {
- '.Translator::numberToLocale($record['rivalsainps']).' €
+ '.Translator::numberToLocale($record['rivalsainps']).' '.currency().'
| ';
if (abs($record['bollo']) > 0) {
echo '
- '.Translator::numberToLocale($record['bollo']).' €
+ '.Translator::numberToLocale($record['bollo']).' '.currency().'
| ';
}
echo '
- '.Translator::numberToLocale($totale).' €
+ '.Translator::numberToLocale($totale).' '.currency().'
|
';
}
@@ -273,21 +273,21 @@ if (!empty($record['ritenutaacconto']) || !empty($fattura->totale_ritenuta_contr
- '.Translator::numberToLocale($record['ritenutaacconto'] + $fattura->totale_ritenuta_contributi).' €
+ '.Translator::numberToLocale($record['ritenutaacconto'] + $fattura->totale_ritenuta_contributi).' '.currency().'
| ';
if (empty($record['rivalsainps']) && abs($record['bollo']) > 0) {
echo '
- '.Translator::numberToLocale($record['bollo']).' €
+ '.Translator::numberToLocale($record['bollo']).' '.currency().'
| ';
}
echo '
- '.Translator::numberToLocale($totale - $record['ritenutaacconto'] - $fattura->totale_ritenuta_contributi).' €
+ '.Translator::numberToLocale($totale - $record['ritenutaacconto'] - $fattura->totale_ritenuta_contributi).' '.currency().'
|
';
}
@@ -311,11 +311,11 @@ if (!empty($record['split_payment'])) {
echo '
- '.Translator::numberToLocale($totale_iva).' €
+ '.Translator::numberToLocale($totale_iva).' '.currency().'
|
- '.Translator::numberToLocale($totale - $totale_iva - $record['ritenutaacconto'] - $fattura->totale_ritenuta_contributi).' €
+ '.Translator::numberToLocale($totale - $totale_iva - $record['ritenutaacconto'] - $fattura->totale_ritenuta_contributi).' '.currency().'
|
';
}
@@ -341,11 +341,11 @@ if (empty($record['ritenutaacconto']) && empty($record['rivalsainps']) && empty(
- '.Translator::numberToLocale($record['bollo']).' €
+ '.Translator::numberToLocale($record['bollo']).' '.currency().'
|
- '.Translator::numberToLocale($totale - $record['ritenutaacconto']).' €
+ '.Translator::numberToLocale($totale - $record['ritenutaacconto']).' '.currency().'
|
';
}
diff --git a/templates/interventi/body.php b/templates/interventi/body.php
index 58b7df7d1..f15972f86 100644
--- a/templates/interventi/body.php
+++ b/templates/interventi/body.php
@@ -199,7 +199,7 @@ if (!empty($rs2)) {
- '.Translator::numberToLocale($costi_intervento['ricambi_scontato']).' €
+ '.Translator::numberToLocale($costi_intervento['ricambi_scontato']).' '.currency().'
|
';
}
@@ -260,13 +260,13 @@ if (!empty($rs2)) {
// Prezzo unitario
echo '
- '.($options['pricing'] ? Translator::numberToLocale($r['prezzo_vendita']).' €' : '-');
+ '.($options['pricing'] ? Translator::numberToLocale($r['prezzo_vendita']).' '.currency() : '-');
if ($options['pricing'] && $r['sconto'] > 0) {
echo "
".tr('sconto _TOT_ _TYPE_', [
'_TOT_' => Translator::numberToLocale($r['sconto_unitario']),
- '_TYPE_' => ($r['tipo_sconto'] == 'PRC' ? '%' : '€'),
+ '_TYPE_' => ($r['tipo_sconto'] == 'PRC' ? '%' : currency()),
]).'';
}
@@ -293,7 +293,7 @@ if (!empty($rs2)) {
|
- '.Translator::numberToLocale($costi_intervento['altro_scontato']).' €
+ '.Translator::numberToLocale($costi_intervento['altro_scontato']).' '.currency().'
|
';
}
@@ -397,7 +397,7 @@ echo '
if ($options['pricing']) {
echo '
- '.tr('Totale manodopera').': '.Translator::numberToLocale($costi_intervento['manodopera_addebito']).' €
+ '.tr('Totale manodopera').': '.Translator::numberToLocale($costi_intervento['manodopera_addebito']).' '.currency().'
| ';
} else {
echo '
@@ -424,7 +424,7 @@ echo '
if ($options['pricing']) {
echo '
- '.tr('Costi di trasferta').': '.Translator::numberToLocale($records[0]['tot_km_consuntivo']).' €
+ '.tr('Costi di trasferta').': '.Translator::numberToLocale($records[0]['tot_km_consuntivo']).' '.currency().'
| ';
} else {
echo '
@@ -435,7 +435,7 @@ if ($options['pricing']) {
if ($options['pricing']) {
echo '
- '.tr('Diritto di chiamata').': '.Translator::numberToLocale($records[0]['tot_dirittochiamata']).' €
+ '.tr('Diritto di chiamata').': '.Translator::numberToLocale($records[0]['tot_dirittochiamata']).' '.currency().'
| ';
} else {
echo '
@@ -453,7 +453,7 @@ if ($options['pricing']) {
- '.Translator::numberToLocale($costi_intervento['totale_addebito']).' €
+ '.Translator::numberToLocale($costi_intervento['totale_addebito']).' '.currency().'
|
';
@@ -468,7 +468,7 @@ if ($options['pricing']) {
- -'.Translator::numberToLocale($totale_sconto).' €
+ -'.Translator::numberToLocale($totale_sconto).' '.currency().'
|
';
@@ -480,7 +480,7 @@ if ($options['pricing']) {
- '.Translator::numberToLocale($costi_intervento['totale_scontato']).' €
+ '.Translator::numberToLocale($costi_intervento['totale_scontato']).' '.currency().'
|
';
}
@@ -494,7 +494,7 @@ if ($options['pricing']) {
- '.Translator::numberToLocale($costi_intervento['iva_totale']).' €
+ '.Translator::numberToLocale($costi_intervento['iva_totale']).' '.currency().'
|
';
@@ -505,7 +505,7 @@ if ($options['pricing']) {
'.tr('Totale intervento', [], ['upper' => true]).':
- '.Translator::numberToLocale($costi_intervento['totale']).' €
+ '.Translator::numberToLocale($costi_intervento['totale']).' '.currency().'
|
';
}
diff --git a/templates/magazzino_inventario/pdfgen.magazzino_inventario.php b/templates/magazzino_inventario/pdfgen.magazzino_inventario.php
index 6d7b328f0..aef49d93f 100644
--- a/templates/magazzino_inventario/pdfgen.magazzino_inventario.php
+++ b/templates/magazzino_inventario/pdfgen.magazzino_inventario.php
@@ -74,10 +74,10 @@ for ($r = 0; $r < sizeof($rs); ++$r) {
$body .= "
\n";
$body .= " ".$rs[$r]['codice']." | \n";
$body .= " ".$rs[$r]['descrizione']." | \n";
- $body .= " ".Translator::numberToLocale($rs[$r]['prezzo_vendita'])." € | \n";
+ $body .= " ".Translator::numberToLocale($rs[$r]['prezzo_vendita']).' '.currency()." | \n";
$body .= " ".$rs[$r]['um'].' '.Translator::numberToLocale($rs[$r]['qta'])." | \n";
- $body .= " ".Translator::numberToLocale($rs[$r]['prezzo_acquisto'])." € | \n";
- $body .= " ".Translator::numberToLocale(($rs[$r]['prezzo_acquisto'] * $rs[$r]['qta']))." € | \n";
+ $body .= " ".Translator::numberToLocale($rs[$r]['prezzo_acquisto']).' '.currency()." | \n";
+ $body .= " ".Translator::numberToLocale(($rs[$r]['prezzo_acquisto'] * $rs[$r]['qta'])).' '.currency()." | \n";
$body .= "
\n";
$totale_qta += $rs[$r]['qta'];
@@ -90,7 +90,7 @@ $body .= "
| \n";
$body .= "
".Translator::numberToLocale($totale_qta)." | \n";
$body .= "
| \n";
-$body .= "
".Translator::numberToLocale($totale_acquisto)." € | \n";
+$body .= "
".Translator::numberToLocale($totale_acquisto).' '.currency()." | \n";
$body .= "\n";
$body .= "\n";
diff --git a/templates/ordini/body.php b/templates/ordini/body.php
index 97ef904c9..eb03275f2 100644
--- a/templates/ordini/body.php
+++ b/templates/ordini/body.php
@@ -131,13 +131,13 @@ foreach ($righe as $r) {
";
if (empty($r['is_descrizione'])) {
echo '
- '.(empty($r['qta']) || empty($r['subtotale']) ? '' : Translator::numberToLocale($r['subtotale'] / $r['qta'])).' €';
+ '.(empty($r['qta']) || empty($r['subtotale']) ? '' : Translator::numberToLocale($r['subtotale'] / $r['qta'])).' '.currency();
if ($r['sconto'] > 0) {
echo "
- ".tr('sconto _TOT_ _TYPE_', [
'_TOT_' => Translator::numberToLocale($r['sconto_unitario']),
- '_TYPE_' => ($r['tipo_sconto'] == 'PRC' ? '%' : '€'),
+ '_TYPE_' => ($r['tipo_sconto'] == 'PRC' ? '%' : currency()),
]).'';
if ($count <= 1) {
@@ -153,13 +153,13 @@ foreach ($righe as $r) {
| ";
if (empty($r['is_descrizione'])) {
echo '
- '.(empty($r['subtotale']) ? '' : Translator::numberToLocale($r['subtotale'])).' €';
+ '.(empty($r['subtotale']) ? '' : Translator::numberToLocale($r['subtotale'])).' '.currency();
if ($r['sconto'] > 0) {
echo "
- ".tr('sconto _TOT_ _TYPE_', [
'_TOT_' => Translator::numberToLocale($r['sconto']),
- '_TYPE_' => '€',
+ '_TYPE_' => currency(),
]).'';
if ($count <= 1) {
@@ -213,7 +213,7 @@ if ($options['pricing']) {
|
- '.Translator::numberToLocale($imponibile).' €
+ '.Translator::numberToLocale($imponibile).' '.currency().'
|
';
@@ -226,7 +226,7 @@ if ($options['pricing']) {
- -'.Translator::numberToLocale($sconto).' €
+ -'.Translator::numberToLocale($sconto).' '.currency().'
|
';
@@ -238,7 +238,7 @@ if ($options['pricing']) {
- '.Translator::numberToLocale($totale).' €
+ '.Translator::numberToLocale($totale).' '.currency().'
|
';
}
@@ -251,7 +251,7 @@ if ($options['pricing']) {
- '.Translator::numberToLocale($iva).' €
+ '.Translator::numberToLocale($iva).' '.currency().'
|
';
@@ -264,7 +264,7 @@ if ($options['pricing']) {
'.tr('Quotazione totale', [], ['upper' => true]).':
- '.Translator::numberToLocale($totale).' €
+ '.Translator::numberToLocale($totale).' '.currency().'
|
';
}
diff --git a/templates/preventivi/body.php b/templates/preventivi/body.php
index 27bac1605..e3bd4231d 100644
--- a/templates/preventivi/body.php
+++ b/templates/preventivi/body.php
@@ -122,13 +122,13 @@ foreach ($righe as $r) {
";
if (empty($r['is_descrizione'])) {
echo '
- '.(empty($r['qta']) || empty($r['subtotale']) ? '' : Translator::numberToLocale($r['subtotale'] / $r['qta'])).' €';
+ '.(empty($r['qta']) || empty($r['subtotale']) ? '' : Translator::numberToLocale($r['subtotale'] / $r['qta'])).' '.currency();
if ($r['sconto'] > 0) {
echo "
- ".tr('sconto _TOT_ _TYPE_', [
'_TOT_' => Translator::numberToLocale($r['sconto_unitario']),
- '_TYPE_' => ($r['tipo_sconto'] == 'PRC' ? '%' : '€'),
+ '_TYPE_' => ($r['tipo_sconto'] == 'PRC' ? '%' : currency()),
]).'';
if ($count <= 1) {
@@ -144,13 +144,13 @@ foreach ($righe as $r) {
| ";
if (empty($r['is_descrizione'])) {
echo '
- '.(empty($r['subtotale']) ? '' : Translator::numberToLocale($r['subtotale'])).' €';
+ '.(empty($r['subtotale']) ? '' : Translator::numberToLocale($r['subtotale'])).' '.currency();
if ($r['sconto'] > 0) {
echo "
- ".tr('sconto _TOT_ _TYPE_', [
'_TOT_' => Translator::numberToLocale($r['sconto']),
- '_TYPE_' => '€',
+ '_TYPE_' => currency(),
]).'';
if ($count <= 1) {
@@ -204,7 +204,7 @@ if ($options['pricing'] and !isset($options['hide_total'])) {
|
- '.Translator::numberToLocale($imponibile).' €
+ '.Translator::numberToLocale($imponibile).' '.currency().'
|
';
@@ -217,7 +217,7 @@ if ($options['pricing'] and !isset($options['hide_total'])) {
- -'.Translator::numberToLocale($sconto).' €
+ -'.Translator::numberToLocale($sconto).' '.currency().'
|
';
@@ -229,7 +229,7 @@ if ($options['pricing'] and !isset($options['hide_total'])) {
- '.Translator::numberToLocale($totale).' €
+ '.Translator::numberToLocale($totale).' '.currency().'
|
';
}
@@ -242,7 +242,7 @@ if ($options['pricing'] and !isset($options['hide_total'])) {
- '.Translator::numberToLocale($iva).' €
+ '.Translator::numberToLocale($iva).' '.currency().'
|
';
@@ -255,7 +255,7 @@ if ($options['pricing'] and !isset($options['hide_total'])) {
'.tr('Quotazione totale', [], ['upper' => true]).':
- '.Translator::numberToLocale($totale).' €
+ '.Translator::numberToLocale($totale).' '.currency().'
|
';
}
diff --git a/templates/preventivi_cons/body.php b/templates/preventivi_cons/body.php
index a1d231eda..19c37e264 100644
--- a/templates/preventivi_cons/body.php
+++ b/templates/preventivi_cons/body.php
@@ -112,11 +112,11 @@ if (!empty($interventi)) {
- '.Translator::numberToLocale($int['sconto']).' €
+ '.Translator::numberToLocale($int['sconto']).' '.currency().'
|
- '.Translator::numberToLocale($int['subtotale']).' €
+ '.Translator::numberToLocale($int['subtotale']).' '.currency().'
|
';
@@ -156,11 +156,11 @@ if (!empty($interventi)) {
- '.Translator::numberToLocale($sconto_int).' €
+ '.Translator::numberToLocale($sconto_int).' '.currency().'
|
- '.Translator::numberToLocale($totale_int).' €
+ '.Translator::numberToLocale($totale_int).' '.currency().'
|
';
@@ -241,13 +241,13 @@ if (!empty($interventi)) {
// Prezzo unitario
echo "
- ".Translator::numberToLocale($r['prezzo_vendita']).' €';
+ ".Translator::numberToLocale($r['prezzo_vendita']).' '.currency();
if ($r['sconto'] > 0) {
echo "
- ".tr('sconto _TOT_ _TYPE_', [
'_TOT_' => Translator::numberToLocale($r['sconto_unitario']),
- '_TYPE_' => ($r['tipo_sconto'] == 'PRC' ? '%' : '€'),
+ '_TYPE_' => ($r['tipo_sconto'] == 'PRC' ? '%' : currency()),
]).'';
if ($count <= 1) {
@@ -262,13 +262,13 @@ if (!empty($interventi)) {
$netto = $r['prezzo_vendita'] * $r['qta'];
echo '
|
- '.Translator::numberToLocale($netto).' €';
+ '.Translator::numberToLocale($netto).' '.currency();
if ($r['sconto'] > 0) {
echo "
- ".tr('sconto _TOT_ _TYPE_', [
'_TOT_' => Translator::numberToLocale($r['sconto']),
- '_TYPE_' => '€',
+ '_TYPE_' => currency(),
]).'';
if ($count <= 1) {
@@ -303,7 +303,7 @@ if (!empty($interventi)) {
|
- '.Translator::numberToLocale($totale_art).' €
+ '.Translator::numberToLocale($totale_art).' '.currency().'
|
';
@@ -378,13 +378,13 @@ if (!empty($interventi)) {
// Prezzo unitario
echo "
- ".Translator::numberToLocale($r['prezzo_vendita']).' €';
+ ".Translator::numberToLocale($r['prezzo_vendita']).' '.currency();
if ($r['sconto'] > 0) {
echo "
- ".tr('sconto _TOT_ _TYPE_', [
'_TOT_' => Translator::numberToLocale($r['sconto_unitario']),
- '_TYPE_' => ($r['tipo_sconto'] == 'PRC' ? '%' : '€'),
+ '_TYPE_' => ($r['tipo_sconto'] == 'PRC' ? '%' : currency()),
]).'';
if ($count <= 1) {
@@ -399,13 +399,13 @@ if (!empty($interventi)) {
$netto = $r['prezzo_vendita'] * $r['qta'];
echo '
|
- '.Translator::numberToLocale($netto).' €';
+ '.Translator::numberToLocale($netto).' '.currency();
if ($r['sconto'] > 0) {
echo "
- ".tr('sconto _TOT_ _TYPE_', [
'_TOT_' => Translator::numberToLocale($r['sconto']),
- '_TYPE_' => '€',
+ '_TYPE_' => currency(),
]).'';
if ($count <= 1) {
@@ -440,7 +440,7 @@ if (!empty($interventi)) {
|
- '.Translator::numberToLocale($totale_spese).' €
+ '.Translator::numberToLocale($totale_spese).' '.currency().'
|
';
@@ -475,7 +475,7 @@ if ($show) {
- '.Translator::numberToLocale($imponibile).' €
+ '.Translator::numberToLocale($imponibile).' '.currency().'
|
';
@@ -488,7 +488,7 @@ if ($show) {
- -'.Translator::numberToLocale($sconto).' €
+ -'.Translator::numberToLocale($sconto).' '.currency().'
|
';
@@ -500,7 +500,7 @@ if ($show) {
- '.Translator::numberToLocale($totale).' €
+ '.Translator::numberToLocale($totale).' '.currency().'
|
';
}
@@ -519,7 +519,7 @@ if ($show) {
- '.Translator::numberToLocale($iva).' €
+ '.Translator::numberToLocale($iva).' '.currency().'
|
';
@@ -533,7 +533,7 @@ echo '
'.tr('Totale consuntivo (no iva)', [], ['upper' => true]).':
- '.Translator::numberToLocale($totale).' €
+ '.Translator::numberToLocale($totale).' '.currency().'
|
';
@@ -544,7 +544,7 @@ echo '
'.tr('Budget (no IVA)', [], ['upper' => true]).':
- '.Translator::numberToLocale($budget).' €
+ '.Translator::numberToLocale($budget).' '.currency().'
|
';
@@ -555,7 +555,7 @@ echo '
'.tr('Rapporto budget/spesa (no IVA)', [], ['upper' => true]).':
- '.Translator::numberToLocale($rapporto).' €
+ '.Translator::numberToLocale($rapporto).' '.currency().'
|
';
diff --git a/templates/registro_iva/body.php b/templates/registro_iva/body.php
index 966fed840..f63629146 100644
--- a/templates/registro_iva/body.php
+++ b/templates/registro_iva/body.php
@@ -74,13 +74,13 @@ for ($i = 0; $i < sizeof($rs); ++$i) {
echo '
'.date('d/m/Y', strtotime($rs[$i]['data'])).' | ';
echo '
'.$rs[$i]['codice_tipo_documento_fe'].' | ';
echo '
'.$rs[$i]['codice_anagrafica'].' / '.tr($rs[$i]['ragione_sociale'], [], ['upper' => true]).' | ';
- echo "
".Translator::numberToLocale(get_totale_fattura($rs[$i]['iddocumento'])).' € | ';
+ echo "
".Translator::numberToLocale(get_totale_fattura($rs[$i]['iddocumento'])).' '.currency().' | ';
}
- echo "
".Translator::numberToLocale($rs[$i]['subtotale']).' € | ';
+ echo "
".Translator::numberToLocale($rs[$i]['subtotale']).' '.currency().' | ';
echo "
".Translator::numberToLocale($rs[$i]['percentuale'], 0).' | ';
echo "
".$rs[$i]['desc_iva'].' | ';
- echo "
".Translator::numberToLocale($rs[$i]['iva']).' € | ';
+ echo "
".Translator::numberToLocale($rs[$i]['iva']).' '.currency().' | ';
echo ' ';
$v_iva[$rs[$i]['desc_iva']] += $rs[$i]['iva'];
@@ -113,11 +113,11 @@ foreach ($v_iva as $desc_iva => $tot_iva) {
echo " \n";
echo "
\n";
- echo Translator::numberToLocale($v_totale[$desc_iva])." €\n";
+ echo Translator::numberToLocale($v_totale[$desc_iva]).' '.currency()."\n";
echo " | \n";
echo "
\n";
- echo Translator::numberToLocale($v_iva[$desc_iva])." €\n";
+ echo Translator::numberToLocale($v_iva[$desc_iva]).' '.currency()."\n";
echo " |
\n";
}
@@ -125,8 +125,8 @@ foreach ($v_iva as $desc_iva => $tot_iva) {
echo "
TOTALE |
- ".Translator::numberToLocale($totale_subtotale)." € |
- ".Translator::numberToLocale($totale_iva).' € |
+ ".Translator::numberToLocale($totale_subtotale).' '.currency()." |
+ ".Translator::numberToLocale($totale_iva).' '.currency().' |
';
echo '
diff --git a/templates/riepilogo_interventi/pdfgen.riepilogo_interventi.php b/templates/riepilogo_interventi/pdfgen.riepilogo_interventi.php
index 85ca26c8d..e79836564 100644
--- a/templates/riepilogo_interventi/pdfgen.riepilogo_interventi.php
+++ b/templates/riepilogo_interventi/pdfgen.riepilogo_interventi.php
@@ -229,7 +229,7 @@ if (sizeof($info_intervento) > 0) {
$body .= "\n";
$body .= "
\n";
- $body .= ''.Translator::numberToLocale($totale_calcolato)." €\n";
+ $body .= ''.Translator::numberToLocale($totale_calcolato).' '.currency()."\n";
$body .= " | \n";
// Riga dello sconto
@@ -239,14 +239,14 @@ if (sizeof($info_intervento) > 0) {
$body .= "
\n";
$body .= "Arrotondamenti:\n";
$body .= " | \n";
- $body .= "".Translator::numberToLocale( -$sconto)." €\n";
+ $body .= "".Translator::numberToLocale( -$sconto)." ".currency()."\n";
$body .= " |
\n\n";
*/
$body .= "
\n";
$body .= "Totale scontato:\n";
$body .= " | \n";
- $body .= ''.Translator::numberToLocale($totale_calcolato - $sconto)." €\n";
+ $body .= ''.Translator::numberToLocale($totale_calcolato - $sconto).' '.currency()."\n";
$body .= " |
\n";
}
@@ -304,12 +304,12 @@ if (sizeof($rs2) > 0) {
$netto = $rs2[$i]['prezzo_vendita'];
$netto = $netto + $netto / 100 * $rs2[$i]['prc_guadagno'];
$iva = $netto / 100 * $rs2[$i]['prciva_vendita'];
- $body .= '
'.Translator::numberToLocale($netto)." €\n";
+ $body .= '
'.Translator::numberToLocale($netto).' '.currency()."\n";
$body .= "\n";
// Prezzo di vendita
$body .= "
\n";
- $body .= ''.Translator::numberToLocale($netto * $qta)." €\n";
+ $body .= ''.Translator::numberToLocale($netto * $qta).' '.currency()."\n";
$body .= " | \n";
$totale_articoli += $netto * $qta;
}
@@ -320,7 +320,7 @@ if (sizeof($rs2) > 0) {
$body .= "\n";
$body .= "
\n";
- $body .= ''.Translator::numberToLocale($totale_articoli)." €\n";
+ $body .= ''.Translator::numberToLocale($totale_articoli).' '.currency()."\n";
$body .= " | \n";
$body .= "
\n";
}
@@ -371,12 +371,12 @@ if (sizeof($rs2) > 0) {
// Prezzo unitario
$body .= "
\n";
$netto = $rs2[$i]['prezzo_vendita'];
- $body .= ''.Translator::numberToLocale($netto)." €\n";
+ $body .= ''.Translator::numberToLocale($netto).' '.currency()."\n";
$body .= " | \n";
// Prezzo di vendita
$body .= "
\n";
- $body .= ''.Translator::numberToLocale($netto * $qta)." €\n";
+ $body .= ''.Translator::numberToLocale($netto * $qta).' '.currency()."\n";
$body .= " | \n";
$totale_spese += $netto * $qta;
}
@@ -387,14 +387,14 @@ if (sizeof($rs2) > 0) {
$body .= "\n";
$body .= "
\n";
- $body .= ''.Translator::numberToLocale($totale_spese)." €\n";
+ $body .= ''.Translator::numberToLocale($totale_spese).' '.currency()."\n";
$body .= " | \n";
$body .= "
\n";
}
// Totale complessivo intervento
$body .= "
\n";
-$body .= 'TOTALE INTERVENTI: '.Translator::numberToLocale($totale_intervento_scontato + $totale_articoli + $totale_spese)." €\n";
+$body .= 'TOTALE INTERVENTI: '.Translator::numberToLocale($totale_intervento_scontato + $totale_articoli + $totale_spese).' '.currency()."\n";
$body .= "
\n";
$report_name = 'riepilogo_interventi.pdf';
diff --git a/templates/spesometro/body.php b/templates/spesometro/body.php
index 6c2d832e0..2ee61d16a 100644
--- a/templates/spesometro/body.php
+++ b/templates/spesometro/body.php
@@ -92,19 +92,19 @@ foreach ($anagrafiche as $i => $anagrafica) {
// Imponible
echo '
- '.Translator::numberToLocale($riga['imponibile']).' €
+ '.Translator::numberToLocale($riga['imponibile']).' '.currency().'
| ';
// IVA
echo '
- '.Translator::numberToLocale($riga['iva']).' €
+ '.Translator::numberToLocale($riga['iva']).' '.currency().'
| ';
// Totale
echo '
- '.Translator::numberToLocale($riga['totale']).' €
+ '.Translator::numberToLocale($riga['totale']).' '.currency().'
|
';
@@ -131,7 +131,7 @@ echo '
- '.Translator::numberToLocale(sum($imponibile)).' €
+ '.Translator::numberToLocale(sum($imponibile)).' '.currency().'
|
';
@@ -147,7 +147,7 @@ foreach ($iva as $desc => $values) {
- '.Translator::numberToLocale($sum).' €
+ '.Translator::numberToLocale($sum).' '.currency().'
|
';
@@ -162,7 +162,7 @@ echo '
- '.Translator::numberToLocale($totale_iva).' €
+ '.Translator::numberToLocale($totale_iva).' '.currency().'
|
';
@@ -173,7 +173,7 @@ echo '
'.tr('Totale', [], ['upper' => true]).':
- '.Translator::numberToLocale(sum($totale)).' €
+ '.Translator::numberToLocale(sum($totale)).' '.currency().'
|
';
diff --git a/update/2_4_9.sql b/update/2_4_9.sql
index 2f280e44b..54e59231e 100644
--- a/update/2_4_9.sql
+++ b/update/2_4_9.sql
@@ -204,3 +204,17 @@ UPDATE `in_righe_interventi` SET `um` = NULL WHERE `um` = '';
ALTER TABLE `mg_articoli_interventi` CHANGE `um` `um` VARCHAR(20) NULL;
UPDATE `mg_articoli_interventi` SET `um` = NULL WHERE `um` = '';
+-- Supporto a valute differenti
+CREATE TABLE IF NOT EXISTS `zz_currencies` (
+ `id` int(11) NOT NULL AUTO_INCREMENT,
+ `name` varchar(255) NOT NULL,
+ `title` varchar(255) NOT NULL,
+ `symbol` varchar(255) NOT NULL,
+ PRIMARY KEY (`id`)
+) ENGINE=InnoDB;
+
+INSERT INTO `zz_currencies` (`id`, `name`, `title`, `symbol`) VALUES
+(NULL, 'Euro', 'Euro', '€'),
+(NULL, 'Sterlina', 'Sterlina', '£');
+
+INSERT INTO `zz_settings` (`id`, `nome`, `valore`, `tipo`, `editable`, `sezione`, `order`) VALUES (NULL, 'Valuta', '1', 'query=SELECT id AS id, CONCAT(title, '' - '', symbol) AS text FROM zz_currencies', 1, 'Generali', 12);