Use BO Qty for Auto Generate from SO

We currently do not use this function in Sage but, we are looking more into it.  One quirk I am finding is when you select the "use back ordered quantity" as an option, the report created includes lines that do not have a back order quantity.  This follows the Sage logic in the Help article, "Select this check box to use the sales order back-ordered quantity as the ordered quantity on the purchase order. Clear this check box if you do not want to use the back-ordered quantity. This field is available only if Sales Order Quantity is selected in the Base Order Quantity On field and it applies only when the back-ordered quantity is greater than zero." 

I am struggling to figure out the why of this, I am thinking if the line doesn't have a backorder quantity then there is enough on hand inventory to fullfill the line, so it shouldn't include this quantity on the PO, has anyone else found a way around this?

  • 0

    Delete the Vendor# on those SO lines?

  • 0 in reply to Kevin M

    Would you see any possible complications down the road if I scripted the deletion of the vendor number if the BO Qty field is = 0?

  • 0 in reply to jland47

    I believe that field in SO line data is only used for the PO from SO process, so there should be no harm, but be sure to test.  It could always be added back manually.  (It's there so you could change which vendor is used for the created PO's).

  • 0 in reply to Kevin M

    I feel like this should be an easy script but I am missing something.  I've tried on a column post validate, table pre-write and table post-write.  Also tried using the "setnovalidate" to set the Vendor No value.  When the script does fire it deletes the whole line on the column post validate.  I used the QtyBo field and a UDF field I have.

    'Delete Vendor No so qty ordered is not included on Auto PO generation
    
    rVal = 0
    QBO = 0
    VendNo = ""
    sType = ""
    sItemType = ""
    
    
    rVal = oHeaderObj.GetValue("OrderType$", sType)
    
    if sType = "S" then
    
    rVal = oBusObj.GetValue("ItemType$", sItemType)
    
    	if trim(sItemType) = "1" then
    
    	rVal = oBusObj.GetValue("QuantityBackordered", QBO)
    
    		if QBO = 0 then
    
    		rVal = oBusObj.SetValue("VendorNo$",VendNo)
    		end if
    	end if
    end if

  • 0 in reply to jland47

    Pre-Write would be what I'd use... strange.  I don't see anything obviously wrong with the script.

  • 0 in reply to jland47

    You will have to clear both APDivisionNo & VendorNo, even if you aren't using divisions, it uses division "00" this will have to be removed as well.  You will need to clear the division first and then vendor number, as vendor number's validation uses both division and vendor number.

  • 0 in reply to jepritch

    The removal of the APDiv No worked, and the script does as needed if the items are entered line by line.  However, this is over my head, we have the DSD IM-1220 enhancement for size and color options.  When items are entered through the grid for the enhancement the first line on the order does not fire the script, if the BO Qty is = 0 the vendor number stays on the line, any other lines after the first line come out correctly.  Not sure if any of you guys would have any input on how to go around this or if I just need to get with DSD.

    Edited script below

    'Delete Vendor No so qty ordered is not included on Auto PO generation
    
    rVal = 0
    QBO = 0
    VendNo = ""
    APNo=""
    sType = ""
    sItemType = ""
    
    
    rVal = oHeaderObj.GetValue("OrderType$", sType)
    
    if sType = "S" then
    
    rVal = oBusObj.GetValue("ItemType$", sItemType)
    
    	if trim(sItemType) = "1" then
    
    	rVal = oBusObj.GetValue("QuantityBackordered", QBO)
    
    		if QBO = 0 then
    		
    		rVal= oBusObj.SetValue("APDivisionNo$",APNo)
    		rVal = oBusObj.SetValue("VendorNo$",VendNo)
    		end if
    	end if
    end if