Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Check that $this->get_depreciation() returns #13346

Merged
merged 1 commit into from
Jul 20, 2023
Merged

Conversation

snipe
Copy link
Owner

@snipe snipe commented Jul 20, 2023

This fixes an error in the Depreciable.php file that doesn't check to see if $this->get_depreciation() exists and is not null before trying to get the months property.

This might be related to #13297 but I'm not sure. This is a hotfix, so we'll dig in deeper a little later.

Signed-off-by: snipe <snipe@snipe.net>
@snipe snipe merged commit 0b8a3ee into develop Jul 20, 2023
2 checks passed
@snipe snipe deleted the fixes/depreciable branch July 20, 2023 15:33
@what-the-diff
Copy link

what-the-diff bot commented Jul 20, 2023

PR Summary

  • Updated Depreciation Condition in Depreciable.php
    An improvement to the getLinearDepreciatedValue function has been made in the app/Models/Depreciable.php file. This update adds a new condition that ensures the function only processes assets that have both a set depreciation rate and a purchase date. This helps improve accuracy in calculating depreciated value, prevent possible errors and enhances efficiency in asset management.

@marcusmoore marcusmoore mentioned this pull request Jul 26, 2023
2 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

1 participant