diff --git a/assets/src/js/functions/textarea.js b/assets/src/js/functions/textarea.js index dba203734..90a41631e 100644 --- a/assets/src/js/functions/textarea.js +++ b/assets/src/js/functions/textarea.js @@ -38,10 +38,11 @@ function initCharCounter(input) { postText: '', showMaxLength: true, placement: 'bottom-right-inside', - utf8: false, + utf8: false, //Default: false appendToParent: true, alwaysShow: true, //threshold: 150, + twoCharLinebreak: false, //count linebreak as 2 characters to match IE/Chrome textarea validation. Default: true. warningClass: "small form-text text-muted", limitReachedClass: "small form-text text-warning", limitExceededClass: "small form-text text-danger", @@ -56,7 +57,8 @@ function initCharCounter(input) { limitReachedClass: "help-block text-danger", showMaxLength: false, placement: 'bottom-right-inside', - utf8: false, + utf8: false, //Default: false + twoCharLinebreak: false, //count linebreak as 2 characters to match IE/Chrome textarea validation. Default: true. appendToParent: true, alwaysShow: true }); diff --git a/modules/fatture/edit.php b/modules/fatture/edit.php index 777af5a37..5b5f0dbc3 100755 --- a/modules/fatture/edit.php +++ b/modules/fatture/edit.php @@ -547,7 +547,7 @@ echo ' ?>
- {[ "type": "textarea", "label": "", "name": "note", "help": "", "value": "$note$" ]} + {[ "type": "textarea", "label": "", "name": "note", "help": "", "value": "$note$", "charcounter": 1 ]}
diff --git a/plugins/exportFE/src/FatturaElettronica.php b/plugins/exportFE/src/FatturaElettronica.php index e9bc67ccb..73d908cf7 100755 --- a/plugins/exportFE/src/FatturaElettronica.php +++ b/plugins/exportFE/src/FatturaElettronica.php @@ -1037,7 +1037,15 @@ class FatturaElettronica } if (!empty($causale)) { - $result['CausaleTrasporto'] = $causale; + + /** + * Id SdI: 2.1.9.3 + * Caratteri min-max: 1 - 100 caretteri + * Ripetibile: No + */ + + $result['CausaleTrasporto'] = safe_truncate(html_entity_decode($causale), 100, null); + } if (!empty($documento['n_colli'])) { diff --git a/plugins/exportFE/src/Validator.php b/plugins/exportFE/src/Validator.php index ae40de2ef..bf8f7e906 100755 --- a/plugins/exportFE/src/Validator.php +++ b/plugins/exportFE/src/Validator.php @@ -636,6 +636,7 @@ class Validator $output = htmlspecialchars($output, ENT_NOQUOTES | ENT_XML1 | ENT_SUBSTITUTE, 'UTF-8', false); // Gestione dei caratteri non supportati e sostituzione con alternativi + // Problemi noti: sostituendo 1 carattere con 2 o più potrebbero verificarsi problemi se, per il testo di quel nodo, si era raggiunta la lunghezza massima prevista dal tracciato $output = replace($output, [ '€' => 'euro', '—' => '-',