Page 1 of 1

Purchase Order - extral line item column

PostPosted: Thu Sep 03, 2015 11:38 am
by neil.interactit
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 5291 times


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

Thanks in advance,
Neil.

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

PostPosted: Thu Sep 03, 2015 12:09 pm
by Scott.Pearce
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.

Re: Purchase Order - extral line item column

PostPosted: Tue Sep 08, 2015 5:10 pm
by neil.interactit
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