Page 1 of 1

Default stock form

Posted: Fri Jan 09, 2015 9:20 am
by Ian
When clicking the “Print” button from the stock screen, the form defaults to “stock2”. The form we want to use is different per branch, currently called stockT.sty, stockB.sty etc.

Firstly, I can’t find where it is getting “stock2” from... Is this in an INI file somewhere?

STOCK.MAC does not yet have any code for mode=5. Would this be the best way to make it print to the appropriate form?

Secondly, the list of available forms appears to be in alphabetical order, but restarts at “A” part way down the list. Any idea why it does this and how to get it to resort?

Posted: Fri Jan 09, 2015 9:22 am
by COBS Tech Support
The code "STOCK2" could be stored internally in the software. It might be defined in: Customize, Install Settings|Transactions, then press Transaction Sequences & Forms.

It's defined next to "Stock Label".

If this field is left blank in the configuration, then it can be uniquely defined per user.

If that is the case then it's going to be stored in CAPWIN.INI inside the user's profile folder (as per Windows registry settings for INI locations). The section heading will be Forms, as per:

[Forms-XXX]

Where XXX is the company folder.

The entry in this case is StockLabel=

If you want to do something by department, then as you've indicated your best option is to replace the standard print functionality with your own print functionality and react to event 5. Return FALSE to indicate your script will be dealing with printing.