I want to fire a plugin before printing - it will check the Alt Account No of the debtor and based on the value, do stuff.
My question is fairly simple. I cannot seem to get the AltAccountNo to display. I have a msgbox just to confirm, but it is showing a blank even though I know the debtor has an altAccountno. I have
- Code: Select all
Public Sub Setup(ByVal JiwaForm As JiwaApplication.IJiwaForm, ByVal Plugin As JiwaApplication.Plugin.Plugin) Implements JiwaApplication.IJiwaFormPlugin.Setup
Dim salesOrderForm As JiwaSalesUI.SalesOrder.SalesOrderEntryForm = DirectCast(JiwaForm, JiwaApplication.IJiwaForm)
AddHandler salesOrderForm.SalesOrder.Printing, AddressOf SOPrinting
End Sub
Private Sub SOPrinting (sender As Object, e As System.eventargs, ByRef Report As JiwaApplication.PrintGroup.SalesOrderReports.SalesOrderReport)
Dim salesOrder As JiwaSales.SalesOrder.SalesOrder = DirectCast( sender , JiwaSales.SalesOrder.SalesOrder)
msgbox(salesorder.Debtor.AltAccountNo)
msgbox(Report.DocumentType)
If salesorder.Debtor.AltAccountNo = "PROFORMA" Then
MessageBox.Show("PROFORMA CUSTOMER")
End If
End Sub
Is there some trick to getting the AltAccountNo?
Cheers

