Replies: 2 comments 1 reply
-
Ok apologies I was being a noob I've figured it out |
Beta Was this translation helpful? Give feedback.
-
var TaxCatCode = new TaxCategoryCodes(); so I just needed to use categoryCode: and then my variable TaxCatCode it's really obvious now but I have learnt something new today, which is good because I am self taught. Thank you for this wonderful tool :) |
Beta Was this translation helpful? Give feedback.
-
Apologies if this is really obvious but I'm relatively new to csharp.
On the TaxCategoryCodes if I wanted to switch the code how would I do it I'm currently getting an error
var TaxCatCode = new TaxCategoryCodes();
switch (TaxCode[A])
{
case "STD":
{
TaxCatCode = "S";
break;
}
case "ECP":
{
TaxCatCode = TaxCategoryCodes.K;
break;
}
case "BAU":
{
TaxCatCode = TaxCategoryCodes.AE;
break;
}
case "HAR":
{
TaxCatCode = TaxCategoryCodes.E;
break;
}
}
desc.AddTradeLineItem(lineID: InvcLine[A].ToString(), InvcPartNum[A], InvcLineDesc[A], UOM, UnitQty[A],
LineGrossAmt[A], UnitPrice[A], UnitQty[A], TotalLinePrice[A], TaxTypes.VAT, TaxCatCode, LineTaxPercent[A],
LineComment[A], null, "", "", null, null, null, null, BillStart, BillEnd);
Again apologies if it's a noob question but I'm not sure how else to change it based on the case
Beta Was this translation helpful? Give feedback.
All reactions