VAT PDF Validation Results for Liga

VAT PDF Validation Results for Liga

This content is archived.

This page summarizes the validated results from the Confluence testing matrix for VAT custom labels, Tax_BA behavior, and VAT rendering combinations across Portrait and Landscape invoice PDFs.

Scope: 24 executed scenarios (CX-01 to CX-24), covering VAT Type 1 and VAT Type 2 across 6 VAT configuration patterns and 2 PDF templates.

Important context: These results are the cleaned and validated outcomes after re-running the tests with the correct VAT setup and matching records.

Executive summary

The overall logic is consistent in many areas, but the PDF output changes depending on three factors: template type (Portrait vs Landscape), whether VAT (B) is null or populated, and whether External Name VAT Classification is empty or populated.

  • Portrait behaves correctly for calculations in all tested cases, but label rendering varies by scenario.

  • Landscape consistently uses Tax_BA as a visible prefix/label source.

  • When Classification is populated and both A+B exist, both templates collapse the tax rows into a single combined row.

  • The main functional difference between VAT Type 1 and VAT Type 2 appears in the single-row scenario where VAT (B) = null and Classification is populated: Type 2 ignores Classification, while Type 1 shows it.

Key findings

1. Custom label behavior by template

  • Portrait: the VAT prefix behavior is not fully driven by the expected label logic in every scenario. In particular, when there is only one tax row and Classification is empty, Portrait does not show External Name A.

  • Landscape: Tax_BA is consistently reflected in the rendered output and appears as a prefix or first label component.

2. Portrait behavior

  • When VAT (B) = null and Classification is empty, Portrait shows a single generic label such as VAT 13,00% of net.

  • When there are two tax rows, Portrait correctly renders the external labels, for example VAT HST, VAT PST, VAT GST.

  • When Classification is populated and A+B both exist, Portrait collapses the rates into one row and uses Classification as the label.

  • When Classification is populated and B = null, Portrait shows Classification for Type 1, but not for Type 2.

3. Landscape behavior

  • Landscape consistently shows Tax_BA in the output.

  • When Classification is empty and two rows exist, Landscape may render labels such as HST GST and HST PST.

  • When Classification is populated and A+B both exist, Landscape collapses to one row and renders Tax_BA + Classification.

  • When Classification is populated and B = null, Landscape shows Tax_BA + Classification for Type 1, but ignores Classification for Type 2.

4. Confirmed Type 1 vs Type 2 difference

Confirmed difference: In the scenario where VAT (B) = null and Classification is populated, VAT Type 2 ignores Classification in both Portrait and Landscape, while VAT Type 1 displays it correctly.

Case

Type

Template

Classification

Rendered label

Result

Case

Type

Template

Classification

Rendered label

Result

CX-11

1

Portrait

Canadian Tax

VAT Canadian Tax (13,00%) of net

Expected

CX-12

1

Landscape

Canadian Tax

HST Canadian Tax (13,00%)

Expected

CX-23

2

Portrait

Canadian Tax

VAT 13,00% of net

Classification ignored

CX-24

2

Landscape

Canadian Tax

HST 13,00%

Classification ignored

Validated results by case

VAT Type 1 — CX-01 to CX-12

Case

Scenario

Template

Observed result

Status

Case

Scenario

Template

Observed result

Status

CX-01

B=null, no Classification

Portrait

VAT 13,00% of net

OK

CX-02

B=null, no Classification

Landscape

HST 13,00%

OK

CX-03

B=0, no Classification

Portrait

VAT HST (13,00%) of net / VAT PST (0,00%) of net

OK

CX-04

B=0, no Classification

Landscape

HST 13,00% / PST 0,00%

OK

CX-05

A=5, B=8, no Classification

Portrait

VAT GST (5,00%) of net / VAT PST (8,00%) of net

OK

CX-06

A=5, B=8, no Classification

Landscape

HST GST (5,00%) / HST PST (8,00%)

PARTIAL

CX-07

A=5, B=8, Classification=HST

Portrait

VAT HST (13,00%) of net

PARTIAL

CX-08

A=5, B=8, Classification=HST

Landscape

HST HST (13,00%)

PARTIAL

CX-09

A=5, B=8, Classification=Canadian Tax

Portrait

VAT Canadian Tax (13,00%) of net

PARTIAL

CX-10

A=5, B=8, Classification=Canadian Tax

Landscape

HST Canadian Tax (13,00%)

PARTIAL

CX-11

B=null, Classification=Canadian Tax

Portrait

VAT Canadian Tax (13,00%) of net

OK

CX-12

B=null, Classification=Canadian Tax

Landscape

HST Canadian Tax (13,00%)

OK

VAT Type 2 — CX-13 to CX-24

Case

Scenario

Template

Observed result

Status

Case

Scenario

Template

Observed result

Status

CX-13

B=null, no Classification

Portrait

VAT 13,00% of net

OK

CX-14

B=null, no Classification

Landscape

HST 13,00%

OK

CX-15

B=0, no Classification

Portrait

VAT HST (13,00%) of net / VAT PST (0,00%) of net

OK

CX-16

B=0, no Classification

Landscape

HST HST (13,00%) / HST PST (0,00%)

PARTIAL

CX-17

A=5, B=8, no Classification

Portrait

VAT GST (5,00%) of net / VAT PST (8,00%) of net

OK

CX-18

A=5, B=8, no Classification

Landscape

HST GST (5,00%) / HST PST (8,00%)

PARTIAL

CX-19

A=5, B=8, Classification=HST

Portrait

VAT HST (13,00%) of net

PARTIAL

CX-20

A=5, B=8, Classification=HST

Landscape

HST HST (13,00%)

PARTIAL

CX-21

A=5, B=8, Classification=Canadian Tax

Portrait

VAT Canadian Tax (13,00%) of net

PARTIAL

CX-22

A=5, B=8, Classification=Canadian Tax

Landscape

HST Canadian Tax (13,00%)

PARTIAL

CX-23

B=null, Classification=Canadian Tax

Portrait

VAT 13,00% of net

PARTIAL

CX-24

B=null, Classification=Canadian Tax

Landscape

HST 13,00%

PARTIAL

Interpretation by scenario pattern

Pattern

Type 1

Type 2

Observation

Pattern

Type 1

Type 2

Observation

B=null, Classification empty

Portrait generic; Landscape shows HST

Same

No meaningful difference between types

B=0, Classification empty

Portrait normal; Landscape may prefix with Tax_BA depending on template behavior

Same Portrait; Landscape prefixes with Tax_BA

Landscape label format is noisier

A+B, Classification empty

Portrait shows GST/PST; Landscape shows HST GST / HST PST

Same

Landscape adds Tax_BA prefix

A+B, Classification populated

Both templates collapse to one combined row

Same

Classification drives grouping

B=null, Classification populated

Classification shown in both templates

Classification ignored in both templates

Main Type 2 issue

Suggested message to Liga

The tests are now fully validated in Confluence. The main conclusion is that VAT Type 1 and VAT Type 2 behave the same in most scenarios. The confirmed difference is the single-row case with VAT(B)=null and Classification populated: Type 1 shows the Classification in both Portrait and Landscape, while Type 2 ignores it. Landscape also consistently renders Tax_BA as part of the visible label, which explains outputs like “HST GST” or “HST Canadian Tax”.

Reference

Source Confluence page: https://advendio.atlassian.net/wiki/spaces/SO/pages/5363597315

Step-by-step execution guide for the 24 CX tests

Purpose: This section documents the exact execution steps used for the 24-test matrix, so the scenarios can be reproduced consistently.

General setup before running the matrix

  1. Make sure there is only one active VAT record matching the test criteria for the selected period. For these tests, use the CA/CA VAT record, for example CA_HST.

  2. Confirm the VAT record validity dates cover the Campaign Item and invoice dates.

  3. Confirm Country Buyer = CA and Country Seller = CA.

  4. Use a Canadian Account as buyer/debtor and a Canadian Legal Entity as seller.

  5. Prepare two Invoice Preferences:

    • Portrait with Show Gross Campaign Cost enabled.

    • Landscape with Show Gross Campaign Cost enabled.

  6. Prepare two Ad Specs:

    • One with VAT Type = 1.

    • One with VAT Type = 2.

  7. For each new scenario, first update the VAT record, then create a new Campaign Item. This is important because VAT values are copied/frozen on the Campaign Item at creation time.

  8. After creating each Campaign Item, verify that the VAT fields on the Campaign Item reflect the VAT record values before generating the Pre-Invoice/PDF.

  9. For each pair of tests, use the same Campaign Item for Portrait and Landscape. Change only the Invoice Preference, delete the Pre-Invoice/Invoice as needed, regenerate, and capture the PDF result.

Custom label setup used for the original cross-validation

  1. Go to Setup → Custom Labels.

  2. Set VATId_BA / VAT Id to the desired prefix value, for example HST, when validating Portrait custom label behavior.

  3. Set Tax_BA to the desired prefix value, for example HST, when validating Landscape custom label behavior.

  4. Save both labels.

  5. If the goal is to validate clean baseline output without custom-label prefixes, remove or clear these custom-label overrides before re-running Landscape cases.

Execution steps by case

Case

VAT Type

Template

VAT record setup before creating CI

Execution steps

What to verify in PDF

Case

VAT Type

Template

VAT record setup before creating CI

Execution steps

What to verify in PDF

CX-01

1

Portrait

Type=1; VAT(A)=13; VAT(B)=null; External Name(A)=HST; External Name(B)=empty; Classification=empty.

Update VAT record → create new CI with VAT Type 1 Ad Spec → verify CI VAT fields → set Invoice Preference to Portrait → generate Pre-Invoice/Invoice/PDF.

One tax row, 13,00%, correct amount. Confirm whether Portrait renders External Name A.

CX-02

1

Landscape

Same CI/setup as CX-01.

Change Invoice Preference to Landscape → delete/regenerate Pre-Invoice/Invoice/PDF.

One tax row, 13,00%, correct amount. Confirm Landscape label rendering.

CX-03

1

Portrait

Type=1; VAT(A)=13; VAT(B)=0; External Name(A)=HST; External Name(B)=PST; Classification=empty.

Update VAT record → create new CI with VAT Type 1 Ad Spec → verify A=13 and B=0 on CI → set Invoice Preference to Portrait → generate PDF.

Two tax rows: HST 13,00% and PST 0,00%; correct amounts.

CX-04

1

Landscape

Same CI/setup as CX-03.

Change Invoice Preference to Landscape → delete/regenerate Pre-Invoice/Invoice/PDF.

Two tax rows: HST 13,00% and PST 0,00%; correct amounts.

CX-05

1

Portrait

Type=1; VAT(A)=5; VAT(B)=8; External Name(A)=GST; External Name(B)=PST; Classification=empty.

Update VAT record → create new CI with VAT Type 1 Ad Spec → verify GST/PST and rates on CI → set Invoice Preference to Portrait → generate PDF.

Two rows: GST 5,00% and PST 8,00%; total tax equals 13,00%.

CX-06

1

Landscape

Same CI/setup as CX-05.

Change Invoice Preference to Landscape → delete/regenerate Pre-Invoice/Invoice/PDF.

Two rows: GST 5,00% and PST 8,00%. If Tax_BA is populated, verify whether it appears as prefix.

CX-07

1

Portrait

Comments