Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Modifying Batch Number - SOP Entry - VSTools

Status
Not open for further replies.

Borvik

Programmer
Jan 2, 2002
1,392
US
This is partly related to my recent Focus triggers post.

We have people who are accidentally entering orders into wrong batches - they were viewing an order that was in a batch and saved it to start entering a new order, and the batch doesn't change - so they unwittingly enter the new order under the batch they were viewing. This has caused orders to invoice without shipping - and therefore will never ship.

In trying to alleviate this, I am attempting to trap the window clear event (now known to be the window pre script/OpenAfterOriginal) and change the batch number to the default sales entry batch.

So far this has not worked as expected - it appears to have worked, but I'm coming across the same issue described here:
Though I appear to already be doing the suggestion: (I created a static class GP with static globals such as SopEntry to hold references to the forms I'm using)
Code:
GP.SopEntry.BatchNumber.Value = DateTime.Now.DayOfWeek.ToString().ToUpper();
GP.SopEntry.BatchNumber.RunValidate();

When logging scripts I've come across this:
Code:
    ...
    'EnableCopySOEntry'
    '[0]'
    '[0]'
        'SOP_Entry Batch Number_CHG on form SOP_Entry'
            'SOPTypeToInt()', 0, 2, 0.00000
            'SetBatchNumber() of form SOP_Entry', 0, 1, 2, "WEDNESDAY", "", 10/5/2011, 0/0/0000, 0, 0, 1-, "", table 'Batch_Headers', table 'SY_Posting_Journal_Settings', 0/0/0000
                'SOP_Entry l_Note Show Hide[4]_CHG on form SOP_Entry'
                    'Check_For_Record_Note', 13794.00000, 0
                'BatchStatusRecovered()', 0, 0
                'SOP_Update_Batch_Activity', 8, "WEDNESDAY", "Sales Entry", 0, "Sales Transaction Entry", 1

Though when entering an order and changing the batch I see this:
Code:
'SOP_Entry Batch Number_CHG on form SOP_Entry'
    'SOPTypeToInt()', 0, 2, 0.00000
    'SetBatchNumber() of form SOP_Entry', 0, 1, 2, "MONDAY", "WEDNESDAY", 4/12/2017, 0/0/0000, 0, 0, 1-, "", table 'Batch_Headers', table 'SY_Posting_Journal_Settings', 0/0/0000
        'SOP_Update_Batch_Activity', 3, "WEDNESDAY", "Sales Entry", 0, "Sales Transaction Entry", 1
        'SOP_Entry l_Note Show Hide[4]_CHG on form SOP_Entry'
            'Check_For_Record_Note', 38.00000, 0
        'BatchStatusRecovered()', 0, 0
        'GLPostingDate_IsValid() of form SOP_Entry', 0, 4/12/2017, 2, 0/0/0000
        'GLPostingDate_Set of form SOP_Entry', 4/12/2017, 1, 0/0/0000, table 'SOP_HDR_WORK'
        'SOP_Update_Batch_Activity', 8, "MONDAY", "Sales Entry", 0, "Sales Transaction Entry", 1

Clearly I am missing something, but I just can't see what right now.

Any ideas?
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top