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

Develop to master #751

Merged
merged 19 commits into from
Oct 17, 2024
Merged

Develop to master #751

merged 19 commits into from
Oct 17, 2024

Conversation

NC-jsAhonen
Copy link
Contributor

No description provided.

NC-jsAhonen and others added 19 commits October 8, 2024 11:34
Calling the function without dry_run=True causes a side effect that causes unnecessary updates to RentAdjustment objects in case the value is 0, it is updated to 0.00.
verified by running statistics report with dry_run not set for calculate_rent_amount_for_year()
* Customize SAP export XML for AKV

- isolate common functionality from the previous Make/Tontit logic
- add a new invoice sales order adapter for AKV
- add a factory function to instantiate the adapters based on service unit ID, and fix old tests to use that factory
- add unit tests for the new AKV logic

AKV requested customizations for their SAP export XML from MVJ.
I created a bespoke sales order adapter for AKV, and a factory function
that initializes the sales invoice adapter based on the service unit ID.
The original adapter contains the Make/Tontit logic, which has been and
will be the default export logic for all other service units until
otherwise requested.

* Add enums to avoid magic variables and duplication

- ServiceUnitId
- SapSalesOfficeNumber
- SapSalesOrgNumber

* Add type hints, extract functions, and improve comments.

* Remove hardcoded parameter to municipality_factory

This avoids unnecessarily crashing this test when unrelated tests have
already created at least 10 municipalities via the factory function
before running this test case.

* Clarify in docstrings how to utilize temporary directories in testing

* Add mypy type check for invoice_sales_order_adapter.py

- mypy: Install missing type stubs
- mypy: signature compatible with base class
- mypy: fix incompatible types in assignment
- mypy: add missing return statements
- mypy: add type definition to parameter
This is for corner cases where some input item might be missing, and would result in ugly output.
@NC-jsAhonen NC-jsAhonen merged commit 626ad20 into master Oct 17, 2024
4 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants