Sales Order Before Lines Added and AddInventoryItemStart  Topic is solved

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

Sales Order Before Lines Added and AddInventoryItemStart

Postby Ernst » Mon Dec 14, 2020 3:55 pm

Using JIWA721 now.
In JIWA6 we had this bit of code in JIWA6 (see below) before lines added. The purpose was to pick up an inner or Outer Barcode, scanned into the partno, and then supply the correct partno. And also get the correct pack qty, if it was inner or Outer.

Have tried using SalesOrderLines.AddInventoryItemStart in JIWA7 which has a similar rtnInventorySeed field, but the rtnInventorySeed does not accept changes. And we cannot get to an object to do a read. Have tried the .adding sub also. But a correct partno is required to get to that stage. SO this does not help. Any ideas appreciated??

With SalesOrderObject.Database
rHwnd = .StatementOpen(CInt(.ConnectionRead1))
SQL = " select partno,barcodein,barcodeout,innersize,Outersize from SS_IN_CUSTOM_Barcodes where barcodein = '" & rtnInventorySeed & "' or barcodeout = '" & rtnInventorySeed & "'"
' MsgBox SQL
If .ExecuteSelect(CInt(rHwnd),SQL) = True Then
'
.BindMem CInt(rHwnd),1,vbString
.BindMem CInt(rHwnd),2,vbString
.BindMem CInt(rHwnd),3,vbString
.BindMem CInt(rHwnd),4,vbDouble
.BindMem CInt(rHwnd),5,vbDouble
If .FetchRow(CInt(rHwnd)) = True Then
If .GetData(CInt(rHwnd),2) = rtnInventorySeed Then
rtnInventorySeed = .GetData(CInt(rHwnd),1)
Static1 = .GetData(CInt(rHwnd),4)
End If
If .GetData(CInt(rHwnd),3) = rtnInventorySeed Then
rtnInventorySeed = .GetData(CInt(rHwnd),1)
Static1 = .GetData(CInt(rHwnd),5)
End If
End If
End If
.StatementClose CInt(rHwnd)
End With
User avatar
Ernst
Kohai
Kohai
 
Posts: 242
Joined: Tue Feb 19, 2008 3:43 pm
Topics Solved: 13

Re: Sales Order Before Lines Added and AddInventoryItemStart  Topic is solved

Postby Ernst » Mon Dec 14, 2020 4:07 pm

Mmmm, Just looking at this again. I think the Unit Of Measure tab with its barcodes, will be just fine. I'll convert all the Outer/ Inner barcodes on the custom tab to the UOM tab.

And that should do it.
User avatar
Ernst
Kohai
Kohai
 
Posts: 242
Joined: Tue Feb 19, 2008 3:43 pm
Topics Solved: 13


Return to Technical and or Programming

Who is online

Users browsing this forum: No registered users and 2 guests