mirror of
https://github.com/snipe/snipe-it.git
synced 2025-02-21 03:15:45 -08:00
Fix license output, tweak CleanFloat function to handle numbers over 1 million
This commit is contained in:
parent
f3338667c7
commit
ae466be153
|
@ -31,7 +31,8 @@ class LicensesTransformer
|
|||
'purchase_date' => Helper::getFormattedDateObject($license->purchase_date, 'date'),
|
||||
'termination_date' => Helper::getFormattedDateObject($license->termination_date, 'date'),
|
||||
'depreciation' => ($license->depreciation) ? ['id' => (int) $license->depreciation->id,'name'=> e($license->depreciation->name)] : null,
|
||||
'purchase_cost' => e($license->purchase_cost),
|
||||
'purchase_cost' => Helper::formatCurrencyOutput($license->purchase_cost),
|
||||
'purchase_cost_numeric' => $license->purchase_cost,
|
||||
'notes' => e($license->notes),
|
||||
'expiration_date' => Helper::getFormattedDateObject($license->expiration_date, 'date'),
|
||||
'seats' => (int) $license->seats,
|
||||
|
|
|
@ -601,8 +601,8 @@
|
|||
}
|
||||
if ("{{$snipeSettings->digit_separator}}" == "1.234,56") {
|
||||
// yank periods, change commas to periods
|
||||
periodless = number.toString().replace("\.","");
|
||||
decimalfixed = periodless.replace(",",".");
|
||||
periodless = number.toString().replace(/\./g,"");
|
||||
decimalfixed = periodless.replace(/,/g,".");
|
||||
} else {
|
||||
// yank commas, that's it.
|
||||
decimalfixed = number.toString().replace(",","");
|
||||
|
|
Loading…
Reference in a new issue