11 March, 2011

Ooops! I marked a SOP Line as Drop Ship after I fulfilled it

I recently received a request to lock down the Sales Transaction Entry Line Drop Ship checkbox when a line had been fulfilled.  This purpose was to prevent users from mistakenly marking a fulfilled line as Drop Shipped which automatically removes all of the Serial Numbers from the line.

To do this just add the Sales Transaction Entry window to Visual Basic.  Then add the Quantity Fulfilled field and Drop Ship checkbox to your project.  Copy the code below and paste it behind the SalesTransactionEntryDetail(Grid):

Private Sub Grid_AfterLineGotFocus()
    DropShipLock
End Sub

Private Sub QtyFulfilled_AfterUserChanged()
    DropShipLock
End Sub

Private Sub DropShipLock()
    If QtyFulfilled.Value <> 0 Then
        Dropship.Enabled = False
    Else
        Dropship.Enabled = True
    End If
End Sub

This will enable or disable the Drop Ship checkbox based on whether the Quantity Fulfilled is equal to 0 on both the Grid After Line Got focus and Quantity Fulfilled After User Changed events.

You can do this yourself as I describe above or download and import the package file with this code here.

1 comment:

Anthony said...

Very helpful and worked like a charm! No more accidental fulfillment deletions.

Thanks!