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

Implemented Basic Tax System, Profits Calculations, and Minor Financial Term Changes #4133

Merged
merged 5 commits into from
Jun 8, 2024

Conversation

IllianiCBT
Copy link
Collaborator

Summary

This PR enhances the financial management system by renaming 'Financial Year' elements to 'Financial Term' and introducing new tax-related features.

Key Changes

  1. Renamed 'Financial Year' to 'Financial Term':

    • Updated terminology to reflect that financial periods are not limited to years.
    • Modified tooltips and labels accordingly.
  2. Implemented Tax Calculation and Payments:

    • Added a method to calculate profits over the prior financial period, used by the taxation system and the upcoming Shares Module. Profits exclude transactions whose TransactionType is STARTING_CAPITAL and FINANCIAL_TERM_END_CARRYOVER.
    • Added a Daily Report entry to inform users of profits made during the prior financial term, triggered at the end of each term.
    • Implemented tax payment functionality, with taxes calculated as a user-configurable percentage of profits.
  3. Added Taxes Settings in Campaign Options:

    • Created a Taxes Panel in the Finances tab.
    • Added settings to toggle taxes on/off (default is off).
    • Introduced settings to configure tax rates.
    • Allowed exemption for Non-Mercenary and Clan factions.

Testing and Validation

  • Verified accuracy of tax calculations and payments.
  • Validated the functionality of the new Taxes panel and exemptions.

Conclusion

This system introduces a financial challenge to help manage campaign growth, preventing players from becoming overpowered too quickly.

As a Brit, I expect these changes to be very popular among our player base. After all, when have people ever been upset over paying their taxes?

- Renamed 'Financial Year' elements to 'Financial Term.'
- Implemented tax calculation and payment method in Finances.
- Added Taxes settings in CampaignOptions.
- Created a new Taxes panel in the Finances tab.
- Updated tooltips and labels related to finances and taxes.
- Added the ability to exempt certain factions from taxes.
* Removed previousTermFiscalBalance related methods and variables
* Updated getProfits() method to calculate profits based on transactions
* Added a report string for profits in Finance.properties
@IllianiCBT IllianiCBT self-assigned this Jun 3, 2024
# Conflicts:
#	MekHQ/resources/mekhq/resources/CampaignOptionsDialog.properties
#	MekHQ/resources/mekhq/resources/Finances.properties
#	MekHQ/src/mekhq/campaign/CampaignOptions.java
#	MekHQ/src/mekhq/campaign/finances/enums/TransactionType.java
#	MekHQ/src/mekhq/gui/panes/CampaignOptionsPane.java
#	MekHQ/unittests/mekhq/campaign/finances/enums/TransactionTypeTest.java
@IllianiCBT
Copy link
Collaborator Author

Resolved conflicts

@SJuliez SJuliez merged commit f5d4e60 into MegaMek:master Jun 8, 2024
4 checks passed
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.

2 participants