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

Added component costs to asset view #12880

Merged
merged 1 commit into from
May 3, 2023
Merged

Conversation

Godmartinz
Copy link
Collaborator

Description

Adds the total cost of components attached to an asset in the asset view. This total is not reflected in current value or purchase cost.
image

Fixes #sc-19399

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 Apr 19, 2023

PR Summary

  • Added method to get total component cost for assets
    A new method called getComponentCost() has been added to the Asset model, allowing the calculation of the total cost of components associated with an asset.

  • Updated language file for component cost display
    A new key-value pair has been added to the language file in admin/hardware/table.php to display 'Total Components Cost' in the appropriate language.

  • Display total component cost in asset view
    On the asset view page, a conditional check has been added to ensure there are associated components with the asset having a purchase cost, so that total component cost can be calculated and displayed in the proper currency format using Helper::formatCurrencyOutput().

@snipe snipe changed the title adds component costs to asset view Added component costs to asset view Apr 20, 2023
@snipe snipe merged commit 4a643c1 into snipe:develop May 3, 2023
3 checks passed
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.

None yet

2 participants