mirror of
https://github.com/snipe/snipe-it.git
synced 2024-12-25 05:34:06 -08:00
BugFix: Asset name was not included in custom report (#2733)
* BugFix: Asset name was not included in custom report * BugFix: Custom Asset Report did not escape commas in custom fields. So the csv file is inconsistent, if a custom field containes a comma. Added an escape function which escapes the commas with a backslash. A csvreader can be configured to handle the escape character.
This commit is contained in:
parent
fe5e813970
commit
4b6ba6cb30
|
@ -681,7 +681,7 @@ class ReportsController extends Controller
|
||||||
foreach ($customfields as $customfield) {
|
foreach ($customfields as $customfield) {
|
||||||
$column_name = $customfield->db_column_name();
|
$column_name = $customfield->db_column_name();
|
||||||
if (e(Input::get($customfield->db_column_name())) == '1') {
|
if (e(Input::get($customfield->db_column_name())) == '1') {
|
||||||
$row[] = $asset->$column_name;
|
$row[] = str_replace(",", "\,", $asset->$column_name);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -61,6 +61,12 @@
|
||||||
{{ trans('general.asset_tag') }}
|
{{ trans('general.asset_tag') }}
|
||||||
</label>
|
</label>
|
||||||
</div>
|
</div>
|
||||||
|
<div class="checkbox col-md-12">
|
||||||
|
<label>
|
||||||
|
{{ Form::checkbox('asset_name', '1') }}
|
||||||
|
{{ trans('admin/hardware/form.name') }}
|
||||||
|
</label>
|
||||||
|
</div>
|
||||||
<div class="checkbox col-md-12">
|
<div class="checkbox col-md-12">
|
||||||
<label>
|
<label>
|
||||||
{{ Form::checkbox('manufacturer', '1') }}
|
{{ Form::checkbox('manufacturer', '1') }}
|
||||||
|
|
Loading…
Reference in a new issue