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'),
|
'purchase_date' => Helper::getFormattedDateObject($license->purchase_date, 'date'),
|
||||||
'termination_date' => Helper::getFormattedDateObject($license->termination_date, 'date'),
|
'termination_date' => Helper::getFormattedDateObject($license->termination_date, 'date'),
|
||||||
'depreciation' => ($license->depreciation) ? ['id' => (int) $license->depreciation->id,'name'=> e($license->depreciation->name)] : null,
|
'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),
|
'notes' => e($license->notes),
|
||||||
'expiration_date' => Helper::getFormattedDateObject($license->expiration_date, 'date'),
|
'expiration_date' => Helper::getFormattedDateObject($license->expiration_date, 'date'),
|
||||||
'seats' => (int) $license->seats,
|
'seats' => (int) $license->seats,
|
||||||
|
|
|
@ -601,8 +601,8 @@
|
||||||
}
|
}
|
||||||
if ("{{$snipeSettings->digit_separator}}" == "1.234,56") {
|
if ("{{$snipeSettings->digit_separator}}" == "1.234,56") {
|
||||||
// yank periods, change commas to periods
|
// yank periods, change commas to periods
|
||||||
periodless = number.toString().replace("\.","");
|
periodless = number.toString().replace(/\./g,"");
|
||||||
decimalfixed = periodless.replace(",",".");
|
decimalfixed = periodless.replace(/,/g,".");
|
||||||
} else {
|
} else {
|
||||||
// yank commas, that's it.
|
// yank commas, that's it.
|
||||||
decimalfixed = number.toString().replace(",","");
|
decimalfixed = number.toString().replace(",","");
|
||||||
|
|
Loading…
Reference in a new issue