diff --git a/app/Http/Transformers/LicensesTransformer.php b/app/Http/Transformers/LicensesTransformer.php index f68ad738d8..fa218da4d1 100644 --- a/app/Http/Transformers/LicensesTransformer.php +++ b/app/Http/Transformers/LicensesTransformer.php @@ -27,8 +27,8 @@ class LicensesTransformer 'company' => ($license->company) ? ['id' => (int) $license->company->id, 'name'=> e($license->company->name)] : null, 'manufacturer' => ($license->manufacturer) ? ['id' => (int) $license->manufacturer->id, 'name'=> e($license->manufacturer->name)] : null, 'product_key' => (Gate::allows('viewKeys', License::class)) ? e($license->serial) : '------------', - 'order_number' => e($license->order_number), - 'purchase_order' => e($license->purchase_order), + 'order_number' => ($license->order_number) ? e($license->order_number) : null, + 'purchase_order' => ($license->purchase_order) ? e($license->purchase_order) : null, '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, @@ -38,8 +38,9 @@ class LicensesTransformer 'expiration_date' => Helper::getFormattedDateObject($license->expiration_date, 'date'), 'seats' => (int) $license->seats, 'free_seats_count' => (int) $license->free_seats_count, - 'license_name' => e($license->license_name), - 'license_email' => e($license->license_email), + 'min_amt' => ($license->min_amt) ? (int) ($license->min_amt) : null, + 'license_name' => ($license->license_name) ? e($license->license_name) : null, + 'license_email' => ($license->license_email) ? e($license->license_email) : null, 'reassignable' => ($license->reassignable == 1) ? true : false, 'maintained' => ($license->maintained == 1) ? true : false, 'supplier' => ($license->supplier) ? ['id' => (int) $license->supplier->id, 'name'=> e($license->supplier->name)] : null, diff --git a/app/Presenters/LicensePresenter.php b/app/Presenters/LicensePresenter.php index 4b86a35069..c5c8982664 100644 --- a/app/Presenters/LicensePresenter.php +++ b/app/Presenters/LicensePresenter.php @@ -89,7 +89,14 @@ class LicensePresenter extends Presenter 'searchable' => false, 'sortable' => true, 'title' => trans('admin/accessories/general.remaining'), - ], [ + ], + [ + 'field' => 'min_amt', + 'searchable' => false, + 'sortable' => true, + 'title' => trans('mail.min_QTY'), + 'formatter' => 'minAmtFormatter', + ],[ 'field' => 'purchase_date', 'searchable' => true, 'sortable' => true,