Just writing a quick little plugin to force the Sales Order line tax rate to "No Code" based on a particular condition - in this case a debtor classification.
It seems I can't set the TaxRate because it is read only.
version 7.0.157.
Language: The proper one. VB .Net.
What do you recommend to set it?
My code at the moment
- Code: Select all
Sub LineAdded(SalesOrderLine As JiwaSales.SalesOrder.SalesOrderLine)
Dim salesOrder As JiwaSales.SalesOrder.SalesOrder = DirectCast(SalesOrderLine.SalesOrderLines.SalesOrder, JiwaSales.SalesOrder.SalesOrder)
Dim MyTaxRate As JiwaApplication.JiwaTaxSystemRates.TaxRates =JiwaApplication.Manager.Instance.BusinessLogicFactory.CreateBusinessLogic(Of JiwaApplication.JiwaTaxSystemRates.TaxRates)(Nothing)
'MyTaxRate.Read("1c8929e75bd341a19d4d") doesn't work
MyTaxRate.Read() 'unsure if this is needed.
'Find the debtor classification
If salesOrder.Debtor.Classification.Description = "Whatever" Then
SalesOrderLine.TaxRate = MyTaxRate
End If
End Sub
Thanks

