Skip to content

Added Daily depreciation calculations for assets and reports #13206

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

Open
wants to merge 18 commits into
base: develop
Choose a base branch
from

Conversation

Godmartinz
Copy link
Member

@Godmartinz Godmartinz commented Jun 26, 2023

Description

This adds the ability to choose daily depreciation as an option for linear depreciation calculations.
image

On the depreciations report page the column Number of Months has been renamed Length of Term and moved next to the Rate of Depreciation column.
image

On the assets page it will say which unit of depreciation is being used (days/months) on the depreciations row:
image

List of Depreciations also have a term_type column added as well:
image

Fixes # (issue)

Type of change

Please delete options that are not relevant.

  • Bug fix (non-breaking change which fixes an issue)
  • [x ] New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to not work as expected)
  • This change requires a documentation update

How Has This Been Tested?

Please describe the tests that you ran to verify your changes. Provide instructions so we can reproduce. Please also list any relevant details for your test configuration

  • Test A
  • Test B

Test Configuration:

  • PHP version:
  • MySQL version
  • Webserver version
  • OS version

Checklist:

@what-the-diff
Copy link

what-the-diff bot commented Jun 26, 2023

PR Summary

  • Extended Depreciation Functionality
    The depreciation system now supports different term types and lengths, increasing the flexibility of asset depreciation calculation and reporting.

  • Added Term Length and Term Type Fields
    The new fields term_length and term_type have been added to multiple parts of the system, such as controllers, transformers, presenters, and factories to ensure a consistent and smooth integration.

  • Adjusted Depreciation Calculation Methods
    Modifications to existing depreciation calculation methods, such as Linear, Monthly, and Half-Year, were made to accommodate the new term_length and term_type options.

  • Updated User Interface
    The user interface now includes drop-down menus and input fields for the new term_length and term_type data, providing a more complete and user-friendly experience.

  • New Database Migration
    A migration has been added to include the term_type field in the depreciations table for proper storage and management of the new data.

@Godmartinz Godmartinz requested a review from akemidx June 26, 2023 18:07
Copy link
Member

@snipe snipe left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This looks good to me - but can we un-donk the small pixel difference shown here?

248888317-318b963b-5e61-40b2-94ae-3d5b014a32be

@Godmartinz
Copy link
Member Author

image

@Godmartinz Godmartinz requested a review from snipe June 28, 2023 18:28
@snipe
Copy link
Member

snipe commented Aug 21, 2023

@Godmartinz I have a few outstanding questions/comments here, and it looks like we have merge conflicts now - can you peep this one more time? Thanks!

@Godmartinz
Copy link
Member Author

Alignment fixed, conflicts resolved.

@Godmartinz
Copy link
Member Author

@snipe anything else that needs to be done here?

@snipe
Copy link
Member

snipe commented Nov 13, 2023

Just my question above: Will this affect the other select2's throughout the system as well?

@snipe
Copy link
Member

snipe commented Nov 24, 2023

Ping @Godmartinz

@Godmartinz
Copy link
Member Author

@snipe The selector that was being used was only the first class in the group needed. I've updated the css selector and checked other forms. this only affects the depreciation months select, as intended.

# Conflicts:
#	app/Http/Transformers/DepreciationReportTransformer.php
#	resources/lang/iu-NU/admin/hardware/table.php
@Godmartinz
Copy link
Member Author

Godmartinz commented Oct 2, 2024

@uberbrady @snipe conflicts resolved, just need to get tests in order

@Godmartinz Godmartinz requested a review from uberbrady October 2, 2024 18:34
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants