Merge branch 'master' of git://github.com/colosa/processmaker into BUG-14056-3

This commit is contained in:
Luis Fernando Saisa Lopez
2014-05-19 14:44:16 -04:00

View File

@@ -2837,3 +2837,29 @@ function PMFAddAttachmentToArray($arrayData, $index, $value, $suffix = " Copy({i
return $arrayData; 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;
}