'Do we tax the service or not.. takes care of T1 svc taxing
TaxedAmount = 0
isTaxable = "No"
StateTax = 0
FedTax = 0
USFTax = 0
If PlanInfo.Fields("Taxable") Then
isTaxable = "Yes"
'discount applyied then tax result
If Csng(ServiceInfo.Fields("Discount")) > 0 Then
TaxableAmt = InvoiceRate - Csng(ServiceInfo.Fields("Discount"))
TaxedAmount = TaxableAmt * (PlanInfo.Fields("TaxPercent"))
Else
'otherwise tax it normally
TaxableAmt = InvoiceRate
TaxedAmount = InvoiceRate * (PlanInfo.Fields("TaxPercent"))
End If
InvoiceAmount = InvoiceAmount + TaxedAmount
TotalAR = TotalAR + TaxedAmount
End If