Skip to content

Commit

Permalink
Merge pull request #325 from fiskaltrust/fma-vatcodereview
Browse files Browse the repository at this point in the history
VAT code review
  • Loading branch information
StefanKert authored Jul 17, 2024
2 parents abdd4d9 + 20c829f commit 0b24014
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 34 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -400,35 +400,15 @@ public static List<DocumentTaxData> GenerateTaxDataForReceiptRequest(ReceiptRequ
return items;
}

public static string GetVatCodeForChargeItemCase(long chargeItemCase) => chargeItemCase switch
public static string GetVatCodeForChargeItemCase(long chargeItemCase) => (chargeItemCase & 0x0000_0000_0000_F00F) switch
{
0x4954_2000_0020_0013 => "",
0x4954_2000_0020_0011 => "",
0x4954_2000_0020_0012 => "",
0x4954_2000_0020_0014 => "",
0x4954_2000_0020_1014 => "N3",
0x4954_2000_0020_2014 => "N2",
0x4954_2000_0020_3014 => "N4",
0x4954_2000_0020_4014 => "N5",
0x4954_2000_0020_5014 => "N6",
0x4954_2000_0020_8014 => "N1",
0x4954_2000_0020_7014 => "VI",
0x4954_2000_0000_8038 => "N1",
0x4954_2000_0022_0013 => "",
0x4954_2000_0022_0011 => "",
0x4954_2000_0022_0012 => "",
0x4954_2000_0022_0014 => "",
0x4954_2000_0022_1014 => "N3",
0x4954_2000_0022_2014 => "N2",
0x4954_2000_0022_3014 => "N4",
0x4954_2000_0022_4014 => "N5",
0x4954_2000_0022_5014 => "N6",
0x4954_2000_0022_8014 => "N1",
0x4954_2000_0022_7014 => "VI",
0x4954_2000_0021_0013 => "",
0x4954_2000_0021_0011 => "",
0x4954_2000_0021_0012 => "",
0x4954_2000_0021_0014 => "",
0x0000_0000_0000_1008 => "N3",
0x0000_0000_0000_2008 => "N2",
0x0000_0000_0000_3008 => "N4",
0x0000_0000_0000_4008 => "N5",
0x0000_0000_0000_5008 => "N6",
0x0000_0000_0000_8008 => "N1",
0x0000_0000_0000_7008 => "VI",
_ => ""
};

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -136,7 +136,7 @@ public static ReceiptRequest GetTakeAway_Delivery_Cash()
"Amount": 10,
"VATRate": 0,
"VATAmount": 0,
"ftChargeItemCase": 5283883447186624532,
"ftChargeItemCase": 5283883447186624536,
"Description": "TakeAway - Delivery - Item VAT NI",
"Moment": "{{current_moment}}"
},
Expand All @@ -145,7 +145,7 @@ public static ReceiptRequest GetTakeAway_Delivery_Cash()
"Amount": 10,
"VATRate": 0,
"VATAmount": 0,
"ftChargeItemCase": 5283883447186628628,
"ftChargeItemCase": 5283883447186628632,
"Description": "TakeAway - Delivery - Item VAT NS",
"Moment": "{{current_moment}}"
},
Expand All @@ -154,7 +154,7 @@ public static ReceiptRequest GetTakeAway_Delivery_Cash()
"Amount": 10,
"VATRate": 0,
"VATAmount": 0,
"ftChargeItemCase": 5283883447186632724,
"ftChargeItemCase": 5283883447186632728,
"Description": "TakeAway - Delivery - Item VAT ES",
"Moment": "{{current_moment}}"
},
Expand All @@ -163,7 +163,7 @@ public static ReceiptRequest GetTakeAway_Delivery_Cash()
"Amount": 10,
"VATRate": 0,
"VATAmount": 0,
"ftChargeItemCase": 5283883447186636820,
"ftChargeItemCase": 5283883447186636824,
"Description": "TakeAway - Delivery - Item VAT RM",
"Moment": "{{current_moment}}"
},
Expand All @@ -172,7 +172,7 @@ public static ReceiptRequest GetTakeAway_Delivery_Cash()
"Amount": 10,
"VATRate": 0,
"VATAmount": 0,
"ftChargeItemCase": 5283883447186640916,
"ftChargeItemCase": 5283883447186640920,
"Description": "TakeAway - Delivery - Item VAT AL",
"Moment": "{{current_moment}}"
},
Expand All @@ -181,7 +181,7 @@ public static ReceiptRequest GetTakeAway_Delivery_Cash()
"Amount": 10,
"VATRate": 0,
"VATAmount": 0,
"ftChargeItemCase": 5283883447186653204,
"ftChargeItemCase": 5283883447186653208,
"Description": "TakeAway - Delivery - Item VAT EE",
"Moment": "{{current_moment}}"
}
Expand Down

0 comments on commit 0b24014

Please sign in to comment.