When raising a PO via requisitions would be useful to have an option to have the order originator as being the Person raising original requestion, rather than the person approving the Requisition.

SUGGESTED

When raising a PO via requisitions would be useful to have an option to have the order originator as being the Person raising original requestion, rather than the person approving the Requisition, this is for a new customer who has 1 person approving all requisitions but after they have done that initial requisition approval, they want the Purchase Order to actually be approved by a different user who is the line manager based upon the person raising the requisition instead of the person approving the requisition which gets transferred into the order originator field.

Parents Reply Children
  • 0 in reply to Geoff Turner

    For our customer they are always 1 requisition 1 purchase order, for my client they have a very simple requirement and most requisitions are 1 requisition line 1 Purchase Order line, and just want ability for the order originator to have a tick box to say set order originator as requestor ?

  • 0 in reply to Adrian Evans

    Well I've actually done that as bespoke, so here you are: POP for SageCity.sdbx

    After letting your business partner check it out, install it using System Admin / Add-ons

    The .sdbx file (actually in zip format) contains 2 modifications to the Sage.MMS.POP.GeneratePurchaseOrdersFromRequisitionsForm:

    • a Form Customisation file, which adds the tick box
    • a VBScript file which copies the originator from the (1st) requisition to the new purchase order

    This is the VBScript:

    Imports Sage.Accounting.POP
    Imports Sage.ObjectStore
    Imports Sage.Common.Messaging
    Imports System 
    
    Module addInModule
    private originatorCheckBox as Sage.Common.Controls.CheckBox
    private messageHandler as CancelMessageHandler
    Public Sub Main
    	originatorCheckBox=form.FindControlByName("originatorCheckBox").UnderlyingControl
    	if originatorCheckBox IsNot Nothing then
    		messageHandler=new CancelMessageHandler(AddressOf POPOrderSaving)
    		MessageService.GetInstance.Subscribe(POPLedgerMessageSource.POPOrderSaving,messageHandler)
    		AddHandler form.Closed,AddressOf form_Closed
    	end if
    End Sub
    Private Function POPOrderSaving(oPOPOrder As POPOrder, eventArgs As Sage.Common.Messaging.CancelMessageArgs) As Sage.Common.Messaging.Response
    	if originatorCheckBox.Checked Then
    		dim oRequisition as POPRequisition=Nothing
    		using oRequisitionLines as new POPRequisitionFulfilmentLines
    			oRequisitionLines.Query.Filters.Add(New Filter(POPRequisitionFulfilmentLine.FIELD_LINKEDITEM,oPOPOrder.Lines.First.POPOrderReturnLine))
    			if oRequisitionLines.First IsNot nothing Then
    				oRequisition=oRequisitionLines.First.POPRequisitionLine.POPRequisition
    			end if	
    		end using
    		if oRequisition isnot nothing then
    			oPOPOrder.DocumentOriginator=oRequisition.POPRequisitionCreatedByUser 
    			oPOPOrder.DocumentOriginatorName=oRequisition.POPRequisitionCreatedByUserName
    		end if	
    	end if
    	Return New Response(ResponseArgs.Empty)
    End Function
    Private Sub form_Closed
    	MessageService.GetInstance.UnSubscribe(POPLedgerMessageSource.POPOrderSaving,messageHandler)
    End Sub
    End Module