oSlsHistory.DocketPrinted gives wrong information ??  Topic is solved

Discussions relating to Jiwa 7 plugin development, and the Jiwa 7 API.

oSlsHistory.DocketPrinted gives wrong information ??

Postby indikad » Tue Jun 28, 2016 11:04 pm

unsure if this is a bug
I am checking if a delivery docket was printed for the current snapshot on so line change (my current snapshot history number is 2) and my code returns true even when the current snapshot was not printed ( only the previous snapshot was printed and I am not sure if its getting confused with the previous print ).
also I have processed the order ( partial delivery for snaphot 1 ) and created snapshot 2 for another delivery.

if I checked the so_printLog i can see the delivery docket was printed only once and that was for the history number 1

code below

Code: Select all
AddHandler SalesOrdForm.SalesOrder.SalesOrderLineChanged  , AddressOf SalesOrderLineChanged

Sub SalesOrderLineChanged (ByVal sender As Object ,ByVal Item As JiwaFinancials.Jiwa.JiwaSales.SalesOrder.SalesOrderLine ,e As System.ComponentModel.PropertyChangedEventArgs  )
      msgbox ( " sales order line changed valie of e.PropertyName  = " + e.PropertyName.ToString())
      Dim salesOrder As JiwaSales.SalesOrder.SalesOrder = DirectCast( sender , JiwaSales.SalesOrder.SalesOrder)
               
      Dim bPrinted As Boolean = False
      Dim oSlsHistory As JiwaSales.SalesOrder.SalesOrderHistory
      oSlsHistory =  salesOrder.SalesOrderHistorys(salesOrder.CurrentHistoryNo)
      msgbox ( " curr history = " + salesOrder.CurrentHistoryNo.ToString() )
      '-----------------------------------
       'check if printed Delivery docket
       '-----------------------------------    
      oSlsHistory.invoice
      If oSlsHistory.DocketPrinted Then      
         MsgBox( "Delivery Docket. has been printed. ",vbOKOnly , "Jiwa")
         
      End If


oSlsHistory.DocketPrinted
indikad
Frequent Contributor
Frequent Contributor
 
Posts: 182
Joined: Thu Jun 18, 2009 1:14 pm
Topics Solved: 2

Re: oSlsHistory.DocketPrinted gives wrong information ??  Topic is solved

Postby Mike.Sheen » Wed Jun 29, 2016 10:23 am

indikad wrote:unsure if this is a bug


It's a bug. I've logged it as Bug #12831.

To work around this in your code, don't look at the DocketPrinted flag on the history class, just iterate through the printlog to work out if it was printed.
Mike Sheen
Chief Software Engineer
Jiwa Financials

If I do answer your question to your satisfaction, please mark it as the post solving the topic so others with the same issue can readily identify the solution
User avatar
Mike.Sheen
Overflow Error
Overflow Error
 
Posts: 2583
Joined: Tue Feb 12, 2008 11:12 am
Location: Perth, Republic of Western Australia
Topics Solved: 807

Re: oSlsHistory.DocketPrinted gives wrong information ??

Postby indikad » Wed Jun 29, 2016 10:36 am

Thanks Mike - i have resorted to checking the print log table.
indikad
Frequent Contributor
Frequent Contributor
 
Posts: 182
Joined: Thu Jun 18, 2009 1:14 pm
Topics Solved: 2


Return to Technical and or Programming

Who is online

Users browsing this forum: No registered users and 0 guests