Page 1 of 1

SalesOrderObject.Debtor.OnHold gives wrong information

PostPosted: Thu Jun 30, 2016 1:18 pm
by indikad
please let me know if this is a bug (on version 149 - so could have got fixed later )

I m calling this bit of code from SalesOrdForm.SalesOrder.SaveStart

even when the debtor is on hold the "SalesOrderObject.Debtor.OnHold " returns false.

Code: Select all
Sub SalesOrderSaveStart2 ( sender As Object ,  e As System.EventArgs )   
      Try                           
         Dim SalesOrderObject As JiwaSales.SalesOrder.SalesOrder = DirectCast( sender , JiwaSales.SalesOrder.SalesOrder)   
      
                        If SalesOrderObject.Debtor.OnHold = True Then
            msgbox ( " debtor is on hold  " )
            
         End If

Re: SalesOrderObject.Debtor.OnHold gives wrong information  Topic is solved

PostPosted: Thu Jun 30, 2016 4:21 pm
by Mike.Sheen
Hi Indika,

It is a bug, but can be worked around by examining the SalesOrderObject.Debtor.AccountOnHold property instead.

The salesOrder.Debtor class inherits from the JiwaFinancials.Jiwa.JiwaApplication.Entities.Debtor.Debtor class and extends it to provide some more information, but incorrectly does not override the OnHold property, and instead introduces a new property named AccountOnHold.

Logged as bug BUGS-5059