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

VAT code review #325

Merged
merged 2 commits into from
Jul 17, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
Loading