diff --git a/workflow/engine/classes/class.pmFunctions.php b/workflow/engine/classes/class.pmFunctions.php index c9d22c336..1c769798a 100755 --- a/workflow/engine/classes/class.pmFunctions.php +++ b/workflow/engine/classes/class.pmFunctions.php @@ -2837,3 +2837,29 @@ function PMFAddAttachmentToArray($arrayData, $index, $value, $suffix = " Copy({i return $arrayData; } + +/** + *@method + * + * It delete the mask a field. + * + * @name PMFAddAttachmentToArray + * + * @param string | $field | Value the field + * @param string | $separator | Separator of thousands (, or .) + * @param string | $currency | symbol of currency + * @return $field | value without mask + * + */ + +function PMRemoveMask ($field, $separator = '.', $currency = '') +{ + $sep = array(); + if ( trim($currency) != '') { + $sep[] = $currency; + } + $sep[] = ($separator == ',') ? '.' : ','; + $field = str_replace($sep, '', $field); + $field = trim(str_replace($separator, '.', $field)); + return $field; +} \ No newline at end of file