mirror of
https://github.com/stokebob/bnhtrade.git
synced 2026-03-19 06:27:15 +00:00
Feature to handle different SKU tax types when creating sales invoices
Added feature to handle different tax types when creating Xero sales invoice from Amazon settlement reports. (#1)
This commit is contained in:
@@ -3875,15 +3875,24 @@ namespace bnhtradeDatabaseClient
|
|||||||
|
|
||||||
// get transaction type id for line
|
// get transaction type id for line
|
||||||
// build the match string
|
// build the match string
|
||||||
// NB special case for global accounting sale and refunds (also note Goodlwill is included)
|
// NB special case for global accounting sale and refunds (also note Goodlwill is included) and sku's where tax is included
|
||||||
string matchString = "<AmazonReport><SettlementReportLine><" + match01 + "><" + match02 + ">";
|
string matchString = "<AmazonReport><SettlementReportLine><" + match01 + "><" + match02 + ">";
|
||||||
if ((match01 == "Order" || match01 == "Refund") && match02 == "ItemPrice" && (match03 == "Principal" || match03 == "Goodwill"))
|
if ((match01 == "Order" || match01 == "Refund") && match02 == "ItemPrice" && (match03 == "Principal" || match03 == "Goodwill" || match03 == "Tax"))
|
||||||
{
|
{
|
||||||
if (lineSku == "")
|
if (lineSku == "")
|
||||||
{
|
{
|
||||||
throw new Exception("Could not retrive Sku from SettleLineId=" + settlementLineId);
|
throw new Exception("Could not retrive Sku from SettleLineId=" + settlementLineId);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (match03 == "Goodwill")
|
||||||
|
{
|
||||||
matchString = matchString + "<Principal>";
|
matchString = matchString + "<Principal>";
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
matchString = matchString + "<" + match03 + ">";
|
||||||
|
}
|
||||||
|
|
||||||
if (dicSkuToTaxCodeId.ContainsKey(lineSku))
|
if (dicSkuToTaxCodeId.ContainsKey(lineSku))
|
||||||
{
|
{
|
||||||
matchString = matchString + "<AccountTaxCodeID=" + dicSkuToTaxCodeId[lineSku] + ">";
|
matchString = matchString + "<AccountTaxCodeID=" + dicSkuToTaxCodeId[lineSku] + ">";
|
||||||
|
|||||||
Reference in New Issue
Block a user