CAPITAL Office Business Software
CAPITAL Support Forum
FAQSearchMembersGroupsRegisterProfilePM'sLogin/Out
Easy way to adjust stock

 
Post new topic   Reply to topic    CAPITAL Office Business Software Forum Index -> Scripting & Customisation
View previous topic :: View next topic  
Author Message
Rob
Guest





PostPosted: Thu Aug 06, 2009 4:54 pm    Post subject: Easy way to adjust stock Reply with quote

Hi,

I operate a small business with only a few staff and want to avoid having to to do formal stocktakes if I just want to adjust a few stock item quantities at a time.

Can I set-up an 'on-the-fly' stocktake adjustment on the stock record using scripting?
Back to top
COBS Tech Support



Joined: 09 Sep 2005
Posts: 651

PostPosted: Thu Aug 06, 2009 5:00 pm    Post subject: Reply with quote

Yes, the steps are:

1. Go to Screen Builder
2. Open Stock Screen
3. Add a new field to the stock screen with these values:

User Field: ADJSTOCK

Type: Quantity

Sort: None

Label: Adjust Stock

4. Press OK to close.

5. From the menu select File|Screen Script.

6. Paste this script into the window:

Code:
If Mode = 9 .And. Focus = "ADJSTOCK"
   Declare nAdjust Type Number
   nAdjust := SCRRead("ADJSTOCK")
   SCRWrite("ADJSTOCK", 0)
   SCRWrite("STOCK_IN", SCRRead("STOCK_IN") - nAdjust)
   SCRWrite("STVARIANCE", SCRRead("STVARIANCE") + nAdjust)
Endif


7. Press Save
8. Select File|Exit then press Yes to save changed.

You should now be able to enter adjustment quantities onto your stock record that will reduce your stock on hand and your stock variance.
Back to top
View user's profile Send private message
Display posts from previous:   
Post new topic   Reply to topic    CAPITAL Office Business Software Forum Index -> Scripting & Customisation All times are GMT + 10 Hours
Page 1 of 1

 
Jump to:  
You can post new topics in this forum
You can reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum

phpBB Template by Vereor
Protected by Anti-Spam ACP