mirror of
https://github.com/snipe/snipe-it.git
synced 2024-12-24 21:24:13 -08:00
Fixes #2673
This commit is contained in:
parent
67f199b09d
commit
ee2522571c
|
@ -92,7 +92,7 @@ class AccessoriesController extends Controller
|
|||
if (e(Input::get('purchase_cost')) == '0.00') {
|
||||
$accessory->purchase_cost = null;
|
||||
} else {
|
||||
$accessory->purchase_cost = e(Input::get('purchase_cost'));
|
||||
$accessory->purchase_cost = Helper::ParseFloat(e(Input::get('purchase_cost')))p;
|
||||
}
|
||||
|
||||
$accessory->qty = e(Input::get('qty'));
|
||||
|
@ -126,7 +126,7 @@ class AccessoriesController extends Controller
|
|||
}
|
||||
|
||||
return View::make('accessories/edit', compact('accessory'))
|
||||
->with('category_list', Helper::categoryList('accessory'))
|
||||
->with('category_list', erper::categoryList('accessory'))
|
||||
->with('company_list', Helper::companyList())
|
||||
->with('location_list', Helper::locationsList())
|
||||
->with('manufacturer_list', Helper::manufacturerList());
|
||||
|
|
|
@ -215,7 +215,7 @@ class AssetMaintenancesController extends Controller
|
|||
if (e(Input::get('cost')) == '') {
|
||||
$assetMaintenance->cost = '';
|
||||
} else {
|
||||
$assetMaintenance->cost = e(Input::get('cost'));
|
||||
$assetMaintenance->cost = Helper::ParseFloat(e(Input::get('cost')));
|
||||
}
|
||||
|
||||
if (e(Input::get('notes')) == '') {
|
||||
|
@ -363,7 +363,7 @@ class AssetMaintenancesController extends Controller
|
|||
if (e(Input::get('cost')) == '') {
|
||||
$assetMaintenance->cost = '';
|
||||
} else {
|
||||
$assetMaintenance->cost = e(Input::get('cost'));
|
||||
$assetMaintenance->cost = Helper::ParseFloat(e(Input::get('cost')));
|
||||
}
|
||||
|
||||
if (e(Input::get('notes')) == '') {
|
||||
|
|
|
@ -178,7 +178,7 @@ class AssetsController extends Controller
|
|||
if (e(Input::get('purchase_cost')) == '') {
|
||||
$asset->purchase_cost = null;
|
||||
} else {
|
||||
$asset->purchase_cost = (e(Input::get('purchase_cost')));
|
||||
$asset->purchase_cost = Helper::ParseFloat(e(Input::get('purchase_cost')));
|
||||
}
|
||||
|
||||
if (e(Input::get('purchase_date')) == '') {
|
||||
|
@ -354,7 +354,7 @@ class AssetsController extends Controller
|
|||
}
|
||||
|
||||
if ($request->has('purchase_cost')) {
|
||||
$asset->purchase_cost = e(Helper::formatCurrencyOutput($request->input('purchase_cost')));
|
||||
$asset->purchase_cost = Helper::ParseFloat(e($request->input('purchase_cost')));
|
||||
} else {
|
||||
$asset->purchase_cost = null;
|
||||
}
|
||||
|
@ -1491,7 +1491,7 @@ class AssetsController extends Controller
|
|||
}
|
||||
|
||||
if (Input::has('purchase_cost')) {
|
||||
$update_array['purchase_cost'] = e(Input::get('purchase_cost'));
|
||||
$update_array['purchase_cost'] = Helper::ParseFloat(e(Input::get('purchase_cost')));
|
||||
}
|
||||
|
||||
if (Input::has('supplier_id')) {
|
||||
|
|
|
@ -99,7 +99,7 @@ class ComponentsController extends Controller
|
|||
if (e(Input::get('purchase_cost')) == '0.00') {
|
||||
$component->purchase_cost = null;
|
||||
} else {
|
||||
$component->purchase_cost = e(Input::get('purchase_cost'));
|
||||
$component->purchase_cost = Helper::ParseFloat(e(Input::get('purchase_cost')));
|
||||
}
|
||||
|
||||
$component->total_qty = e(Input::get('total_qty'));
|
||||
|
@ -183,7 +183,7 @@ class ComponentsController extends Controller
|
|||
if (e(Input::get('purchase_cost')) == '0.00') {
|
||||
$component->purchase_cost = null;
|
||||
} else {
|
||||
$component->purchase_cost = e(Input::get('purchase_cost'));
|
||||
$component->purchase_cost = Helper::ParseFloat(e(Input::get('purchase_cost')));
|
||||
}
|
||||
|
||||
$component->total_qty = e(Input::get('total_qty'));
|
||||
|
|
|
@ -97,7 +97,7 @@ class ConsumablesController extends Controller
|
|||
if (e(Input::get('purchase_cost')) == '0.00') {
|
||||
$consumable->purchase_cost = null;
|
||||
} else {
|
||||
$consumable->purchase_cost = e(Input::get('purchase_cost'));
|
||||
$consumable->purchase_cost = Helper::ParseFloat(e(Input::get('purchase_cost')));
|
||||
}
|
||||
|
||||
$consumable->qty = e(Input::get('qty'));
|
||||
|
@ -182,10 +182,10 @@ class ConsumablesController extends Controller
|
|||
if (e(Input::get('purchase_cost')) == '0.00') {
|
||||
$consumable->purchase_cost = null;
|
||||
} else {
|
||||
$consumable->purchase_cost = e(Input::get('purchase_cost'));
|
||||
$consumable->purchase_cost = Helper::ParseFloat(e(Input::get('purchase_cost')));
|
||||
}
|
||||
|
||||
$consumable->qty = e(Input::get('qty'));
|
||||
$consumable->qty = Helper::ParseFloat(e(Input::get('qty')));
|
||||
|
||||
if ($consumable->save()) {
|
||||
return redirect()->to("admin/consumables")->with('success', trans('admin/consumables/message.update.success'));
|
||||
|
|
|
@ -87,17 +87,13 @@ class LicensesController extends Controller
|
|||
public function postCreate()
|
||||
{
|
||||
|
||||
|
||||
// get the POST data
|
||||
$new = Input::all();
|
||||
|
||||
// create a new model instance
|
||||
$license = new License();
|
||||
|
||||
if (e(Input::get('purchase_cost')) == '') {
|
||||
$license->purchase_cost = null;
|
||||
} else {
|
||||
$license->purchase_cost = e(Input::get('purchase_cost'));
|
||||
$license->purchase_cost = Helper::ParseFloat(e(Input::get('purchase_cost')));
|
||||
}
|
||||
|
||||
if (e(Input::get('supplier_id')) == '') {
|
||||
|
@ -289,10 +285,9 @@ class LicensesController extends Controller
|
|||
}
|
||||
|
||||
if (e(Input::get('purchase_cost')) == '') {
|
||||
$license->purchase_cost = null;
|
||||
$license->purchase_cost = null;
|
||||
} else {
|
||||
$license->purchase_cost = e(Input::get('purchase_cost'));
|
||||
//$license->purchase_cost = e(Input::get('purchase_cost'));
|
||||
$license->purchase_cost = Helper::ParseFloat(e(Input::get('purchase_cost')));
|
||||
}
|
||||
|
||||
if (e(Input::get('maintained')) == '') {
|
||||
|
|
Loading…
Reference in a new issue