Purchase Order - Supplier PartNo  Topic is solved

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

Purchase Order - Supplier PartNo

Postby Ernst » Thu Jun 02, 2016 1:57 pm

Have put in the code below, to Unlock the Supplier Partno. It works fine and the supplier partno becomes modifiable. But any changes you make just get ignored.?
Even if you change the supplierpartno field on the PO lines, it just continues to show the supplier partno from inventory.
This is JIWA7.0.157, and the code is vb.net., Not sure if this is a JIWA bug, or I need some more code.


Private Sub PurchaseOrder_ReadEnd(sender As Object, e As System.EventArgs)
Dim purchaseOrder As JiwaPurchaseOrders.PurchaseOrder = sender
Dim purchaseOrderForm As JiwaPurchaseOrdersUI.MainForm = purchaseOrder.Client

With purchaseOrderForm.LinesJiwaGrid
For row As Integer = 0 To .ActiveSheet.RowCount - 1
If .GridText("RecID", Row).ToString.Trim.Length > 0 Then
.LockColumn(False, "SuppPartno", row)
End If
Next
End With
End Sub

Private Sub PurchaseOrder_Line_Added(item As JiwaPurchaseOrders.Line)
'
Dim purchaseOrderForm As JiwaPurchaseOrdersUI.MainForm = item.Lines.PurchaseOrder.Client

With purchaseOrderForm.LinesJiwaGrid
For row As Integer = 0 To .ActiveSheet.RowCount - 1
If .GridText("RecID", Row).ToString.Trim = item.RecID Then
.LockColumn(False, "SuppPartno", row)
Exit For
End If
Next
End With
User avatar
Ernst
Kohai
Kohai
 
Posts: 242
Joined: Tue Feb 19, 2008 3:43 pm
Topics Solved: 13

Re: Purchase Order - Supplier PartNo  Topic is solved

Postby Mike.Sheen » Fri Jun 03, 2016 11:03 pm

The business logic for the purchase order makes no attempt to update the SuppPartNo column of PO_Lines, and this is why despite you unlocking the field it reverts back. The form does take changes for that column and pass it on to the business logic, but it's simply not written away.

I don't know why this is, so I've logged bug DEV-5011 to look at this.

In the meantime, a plugin can perform an update query to do this as a work around. You will need to hook into the SaveEnding event of the PO and iterate through the purchase order lines and issue an update query on PO_Lines to update the column value.
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: Purchase Order - Supplier PartNo

Postby Ernst » Wed Mar 08, 2017 12:14 pm

Just looked on 7.0.175, still not working
User avatar
Ernst
Kohai
Kohai
 
Posts: 242
Joined: Tue Feb 19, 2008 3:43 pm
Topics Solved: 13

Re: Purchase Order - Supplier PartNo

Postby Mike.Sheen » Wed Mar 08, 2017 5:05 pm

Hi Ernst,

I've updated my previous post so the link to the issue DEV-5011 is correct.

This is now fixed will be in the next development build.

Mike
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


Return to Technical and or Programming

Who is online

Users browsing this forum: No registered users and 3 guests