Purchase Order - extral line item column  Topic is solved

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

Purchase Order - extral line item column

Postby neil.interactit » Thu Sep 03, 2015 11:38 am

Hi guys,

I have a requirement to add a new purchase order line item picklist column, to lookup a GL account, and to save the result with the line item ...

poextracol.png
poextracol.png (11.68 KiB) Viewed 5288 times


I have not been able to solve this trawling through existing posts.

Thanks in advance,
Neil.
neil.interactit
Kohai
Kohai
 
Posts: 232
Joined: Wed Dec 03, 2014 2:36 pm
Topics Solved: 6

Re: Purchase Order - extral line item column  Topic is solved

Postby Scott.Pearce » Thu Sep 03, 2015 12:09 pm

You need purchase order line custom fields.

I'll add support for this in the next build. This will be quicker than trying to code up our own workaround now.

Logged as bug (enhancement) #12027.
Scott Pearce
Senior Analyst/Programmer
Jiwa Financials
User avatar
Scott.Pearce
Senpai
Senpai
 
Posts: 765
Joined: Tue Feb 12, 2008 11:27 am
Location: New South Wales, Australia
Topics Solved: 230

Re: Purchase Order - extral line item column

Postby neil.interactit » Tue Sep 08, 2015 5:10 pm

Thanks Scott.

Due to the client needing this in the current Jiwa version, I have coded a workaround using UserDefinedString1 ...

Code: Select all
    Private purchaseOrderForm As JiwaFinancials.Jiwa.JiwaPurchaseOrdersUI.PurchaseOrders
    Public Sub Setup(ByVal JiwaForm As JiwaApplication.IJiwaForm, ByVal Plugin As JiwaApplication.Plugin.Plugin) Implements JiwaApplication.IJiwaFormPlugin.Setup
      purchaseOrderForm = DirectCast(JiwaForm, JiwaFinancials.Jiwa.JiwaPurchaseOrdersUI.PurchaseOrders)
      ' ...
      AddHandler purchaseOrderForm.LinesJiwaGrid.CellClick, AddressOf PurchaseOrderForm_LinesJiwaGrid_CellClick
    End Sub

    Private Sub PurchaseOrderForm_LinesJiwaGrid_CellClick(sender As Object, e As CellClickEventArgs)
        If e.ColumnHeader Or e.RowHeader Then Return
        Dim col = DirectCast(sender, FarPoint.Win.Spread.FpSpread).ActiveSheet.Columns(e.Column)
        If col.Tag <> "UserDefinedString1" Then Return
        Dim ledger As New JiwaApplication.Entities.GeneralLedger.Account()
        ledger.Search(purchaseOrderForm)
        purchaseOrderForm.PurchaseOrder.Lines.Item(e.Row + 1).UserDefinedString1 = ledger.AccountNo
    End Sub


Works well.

Cheers,
Neil
neil.interactit
Kohai
Kohai
 
Posts: 232
Joined: Wed Dec 03, 2014 2:36 pm
Topics Solved: 6


Return to Technical and or Programming

Who is online

Users browsing this forum: No registered users and 2 guests