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

Ttva 146 sap xml doc #155

Merged
merged 9 commits into from
Aug 8, 2023
Merged

Conversation

danjacob-anders
Copy link

@danjacob-anders danjacob-anders commented Aug 4, 2023

https://andersinno.atlassian.net/jira/software/c/projects/TTVA/boards/11?modal=detail&selectedIssue=TTVA-146

This PR includes the following changes:

  • model changes to Reservations to handle invoice approval/generation workflow
  • API changes to manage "invoice requested" state changes for admin (see Ttva 147 invoicing admin changes varaamo#122 for corresponding changes in Varaamo)
  • SAP XML invoice generation

The XML files for now are written to file by a Django command. It is expected that this command will be updated to also dispatch the invoices via FTP to TietoEvry (or other provider) in a subsequent ticket. Some values have been added to the XML document where possible, otherwise dummy placeholder values have been used.

@danjacob-anders danjacob-anders force-pushed the ttva-146-sap-xml-doc branch 7 times, most recently from bea2e96 to d8bfb31 Compare August 7, 2023 06:53
@danjacob-anders danjacob-anders force-pushed the ttva-146-sap-xml-doc branch 3 times, most recently from 38392c4 to 2da3971 Compare August 7, 2023 11:06
This field should be set when admin approves of an invoice request. This
field can also be used for logic in determining when to generate a new
invoice SAP XML document.

Refs: TTVA-146
This timestamp ensures that XML documents for SAP are not sent/created
more than once.

Refs: TTVA-146
When a reservation of state INVOICE_REQUESTED is confirmed, set
timestamps etc. correctly so the invoice can be handled correctly.

Refs: TTVA-146
Code formatted with Black/isort

Refs: TTVA-146
This field should be used to map to the <ProfitCenter> and
<SalesOrganization> elements in the
SAP xml document.

Refs: TTVA-146
…n Unit form

Also included optimization to prefetch munipality translations for
select field (was over 600+ queries).

Refs: TTVA-146
payments/sap_invoices.py Outdated Show resolved Hide resolved
sap_invoices module for handling logic.

Refs: TTVA-146
Code formatted with isort/Black

Refs: TTVA-146
This value is required for XML SAP sales order generation.

Refs: TTVA-146
Copy link
Collaborator

@jopesy jopesy left a comment

Choose a reason for hiding this comment

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

Top-quality PR once again. Looks great!

@danjacob-anders danjacob-anders merged commit 79d7ff6 into tre-varaamo-qa Aug 8, 2023
1 check 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.

2 participants