added missing billing profile vat code to invoice #1140
Merged
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
closed #1127
What happened?
Judging by this error #1127, the specific invoice view is missing the user profile's VAT code for which the invoice was generated.
What did you do?
I added a condition: if the user has a VAT code, it should be displayed in the view; if not, it should be omitted.
How to test?
Simply check the invoice: if the invoice is generated for a billing profile that has a VAT code, then this code should be displayed in the view. If not, it should be absent. Another test scenario could be to generate an invoice for a billing profile that has a VAT code, and then delete that billing profile. In either case, the VAT code should be displayed.