From 5ffd1b8daaa06865119fe0913f41dfcdfaaa8c62 Mon Sep 17 00:00:00 2001 From: Godfrey M Date: Tue, 1 Oct 2024 11:02:39 -0700 Subject: [PATCH 1/4] fixes if statement in transformer --- app/Http/Transformers/DepreciationReportTransformer.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/Http/Transformers/DepreciationReportTransformer.php b/app/Http/Transformers/DepreciationReportTransformer.php index 47d1cbc476..510083db4c 100644 --- a/app/Http/Transformers/DepreciationReportTransformer.php +++ b/app/Http/Transformers/DepreciationReportTransformer.php @@ -63,7 +63,7 @@ class DepreciationReportTransformer */ if (($asset->model) && ($asset->model->depreciation)) { $depreciated_value = Helper::formatCurrencyOutput($asset->getDepreciatedValue()); - if($asset->model->eol==0 || $asset->model->eol==null ){ + if($asset->model->eol===0 || $asset->model->eol===null ){ $monthly_depreciation = Helper::formatCurrencyOutput($asset->purchase_cost / $asset->model->depreciation->months); } else { From b7ad80bd319ad787990aee24dbcbb50bb175fa21 Mon Sep 17 00:00:00 2001 From: Godfrey M Date: Tue, 1 Oct 2024 11:24:24 -0700 Subject: [PATCH 2/4] fix monthly depreciation value --- app/Http/Transformers/DepreciationReportTransformer.php | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) diff --git a/app/Http/Transformers/DepreciationReportTransformer.php b/app/Http/Transformers/DepreciationReportTransformer.php index 510083db4c..a64c15d721 100644 --- a/app/Http/Transformers/DepreciationReportTransformer.php +++ b/app/Http/Transformers/DepreciationReportTransformer.php @@ -64,14 +64,13 @@ class DepreciationReportTransformer if (($asset->model) && ($asset->model->depreciation)) { $depreciated_value = Helper::formatCurrencyOutput($asset->getDepreciatedValue()); if($asset->model->eol===0 || $asset->model->eol===null ){ - $monthly_depreciation = Helper::formatCurrencyOutput($asset->purchase_cost / $asset->model->depreciation->months); - } - else { - $monthly_depreciation = Helper::formatCurrencyOutput(($asset->model->eol > 0 ? ($asset->purchase_cost / $asset->model->eol) : 0)); + $monthly_depreciation =Helper::formatCurrencyOutput($asset->purchase_cost / $asset->model->depreciation->months); } $diff = Helper::formatCurrencyOutput(($asset->purchase_cost - $asset->getDepreciatedValue())); } - + else { + $monthly_depreciation = Helper::formatCurrencyOutput(($asset->model->eol > 0 ? ($asset->purchase_cost / $asset->model->eol) : 0)); + } if ($asset->assigned) { $checkout_target = $asset->assigned->name; From b9cfdf2e54bdc3571e64e3ddd9dcfdec68b98222 Mon Sep 17 00:00:00 2001 From: Godfrey M Date: Tue, 1 Oct 2024 11:41:59 -0700 Subject: [PATCH 3/4] reworked monthly depreciation variable value --- app/Http/Transformers/DepreciationReportTransformer.php | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/app/Http/Transformers/DepreciationReportTransformer.php b/app/Http/Transformers/DepreciationReportTransformer.php index a64c15d721..33d9a1f5fd 100644 --- a/app/Http/Transformers/DepreciationReportTransformer.php +++ b/app/Http/Transformers/DepreciationReportTransformer.php @@ -63,12 +63,10 @@ class DepreciationReportTransformer */ if (($asset->model) && ($asset->model->depreciation)) { $depreciated_value = Helper::formatCurrencyOutput($asset->getDepreciatedValue()); - if($asset->model->eol===0 || $asset->model->eol===null ){ - $monthly_depreciation =Helper::formatCurrencyOutput($asset->purchase_cost / $asset->model->depreciation->months); - } + $monthly_depreciation =Helper::formatCurrencyOutput($asset->purchase_cost / $asset->model->depreciation->months); $diff = Helper::formatCurrencyOutput(($asset->purchase_cost - $asset->getDepreciatedValue())); } - else { + else if($asset->model->eol !== null) { $monthly_depreciation = Helper::formatCurrencyOutput(($asset->model->eol > 0 ? ($asset->purchase_cost / $asset->model->eol) : 0)); } From b483bb1633af5933fd8ac56a489bb8717fd14a5e Mon Sep 17 00:00:00 2001 From: snipe Date: Wed, 2 Oct 2024 12:40:45 +0100 Subject: [PATCH 4/4] Bumped version Signed-off-by: snipe --- config/version.php | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/config/version.php b/config/version.php index a4396196c5..e7eea2adfb 100644 --- a/config/version.php +++ b/config/version.php @@ -1,10 +1,10 @@ 'v7.0.13-pre', - 'full_app_version' => 'v7.0.13-pre - build 15360-g4ab478bb9', - 'build_version' => '15360', + 'app_version' => 'v7.0.13', + 'full_app_version' => 'v7.0.13 - build 15514-gdc0949da7', + 'build_version' => '15514', 'prerelease_version' => '', - 'hash_version' => 'g4ab478bb9', - 'full_hash' => 'v7.0.13-pre-111-g4ab478bb9', - 'branch' => 'master', + 'hash_version' => 'gdc0949da7', + 'full_hash' => 'v7.0.13-265-gdc0949da7', + 'branch' => 'develop', ); \ No newline at end of file