How-to: Background job for stock valuation
Introduction
Stock
valuation is a process of accessing the value of the current inventory. It
consolidates the inflow and outflow of the inventory transactions, and
calculates the current value of the stock. In Exact Globe+, you can perform
stock valuation at Inventory ➔
Warehouse management ➔ Stock valuation. However, this
might take some time to process depending on the data. Thus, a background job
has been implemented whereby you can schedule the process to run based on the
time you have defined.
You
can run the background job on silent mode (command prompt) or using a task
scheduler. However, the valuation method will be based on the settings defined
at Valuation method under the Entry section at System ➔
General ➔ Settings ➔
Inventory settings. If Standard cost price (Classic) is selected at Valuation
method, the report will not be generated. After the background job has
completed, a stock valuation report will be generated, and placed in the usr
folder in the Exact software folder with format “StockValuations_YYYYMMDDHHMMSS”.
For example, C:\Program Files\Exact
Software\usr\StockValuations_20120409154330. Before starting the background
job, your user rights to access the Inventory ➔
Warehouse management ➔ Stock valuation menu path will be
checked. If you do not have rights to access the menu path, an error message
“You have insufficient rights to perform this operation” will be displayed.
Description
To
create the scheduled task, you need the Exact.Inventory.StockRevaluation.exe
file. You can find this file in the bin folder of the Exact Globe+
installation.
To
create the scheduled task, you can use the following syntax:
Exact.Inventory.StockRevaluation.exe -rsqlservername -Ddatabasename -u
-f00000000435 -~ -BckJob <parameters>
The
following parameters are available: The parameters in red are mandatory.
Stock valuation screen field
|
Parameter
|
Description
|
|
-r
|
Server
name
|
|
-D
|
Database
name
|
|
-u
|
User
name (obsolete)
|
|
-F00000000435
|
For
checking, and you must have the stock valuation menu rights to perform stock
valuation via the background job. If you do not have rights, the error
message “You have insufficient rights to perform this operation” will be
displayed. If this parameter is not defined or wrongly defined, the message
“Invalid parameters” will be displayed.
|
|
-~
|
You
have to end the system parameters with these characters. After this, you can
provide parameters for the functional flow of the application. If you do not
provide this parameter, all the parameters above will be treated as
parameters for your application rather than system parameters to
automatically log in to a specific database.
|
|
-BckJob;
|
To
indicate the executable file is triggered via the task scheduler or command
prompt. If this is not defined, the Stock valuation screen will be
displayed.
|
Transaction date
|
-TDF;
-TDT;
|
To
indicate the transaction date range for filtering purposes. You can define
one or both of the parameters.
For
example:
If “-TDF31052012;” is defined, the system will retrieve all the records after
31/05/2012.
If
“-TDT31122012;” is defined, the system will retrieve all the records before
31/12/2012.
If
“-TDF31052012;” and “-TDT31122012;” are defined, the system will retrieve all
the records between 31/05/2012 and 31/12/2012.
If
“-TDF;” and “-TDT;” is NOT defined, the system will retrieve all the
transaction records.
This
parameter is applicable only if the Stock valuation as from last
revaluation check box at System ➔ General ➔ Settings ➔ Inventory settings, under the Entry section is not
selected. If you type “- TDF”, and “- TDT”, this parameter will be ignored
even if the Stock valuation as from last revaluation check box is
selected, and the logic will be the same as Inventory ➔ Warehouse management ➔ Stock valuation.
|
Item group
|
-IGF;
-IGT;
|
To
indicate the item group range for filtering purposes. You can define one or
both of the parameters.
For
example:
If “-IGF5;” is defined, the system will retrieve all the records after item
group 5.
If
“-IGT10;” is defined, the system will retrieve all the records before item
group 10.
If
“-IGF5;” and “-IGT10;” are defined, the system will retrieve the records
between item group 5 and item group 10.
If
“-IGF;” and “-IGT;” are not defined, the system will retrieve all the item
group records.
|
Item
|
-IF;
-IT;
|
To
indicate the item code range for filtering purposes. You can define one or
both of the parameters.
For
example:
If “-IF100;” is defined, the system will retrieve all the records after item
code 100.
If
“-IT200;” is defined, the system will retrieve all the records up to and
including item code 200.
If
“-IF100;” and “-IT200;” are defined, the system will retrieve the records
from and including 100, and up to and including 200.
If
“-IF;” and “-IT;” are not defined, the system will retrieve all the item code
records.
|
Make item
|
-M;
|
This
is an optional parameter. The values for this parameter are:
A - All
Y – Make item
N – Non-make
Anything other than these values will, by default, be
"A".
|
Level
|
-L;
|
This
is an optional parameter. The values for this parameter are:
A - All
0 – Level zero
1 – Level one
2 – Level two
3 – Level three
Anything other than these values will, by default, be
"A".
|
User-defined
field via [Inventory ➔ Items ➔ Assortments]
|
-ASST01;
-ASST02;
-ASST03;
-ASST04;
-ASST05;
-ASST06;
-ASST07;
-ASST08;
-ASST09;
-ASST10;
|
To
indicate the item assortment for filtering purposes. In Exact Globe+, up to
10 assortments can be defined. If you defined 4 assortment parameters but
there are only 3 assortments defined in Exact +, the last defined parameter
will be ignored.
Type
“ASST01” followed by assortment properties code.
For
example:
- ASST01ABC;
|
Zero
amounts (APP)
All
amounts (APP)
Cost price/Purchase price
|
-ZAAPP;
-AAAPP;
-PAPP;
|
This
group of parameters is only valid if the Valuation method per item
check box under the Entry section at System à General à Settings à Inventory settings is selected. Otherwise, these parameters
will be ignored.
If
you define “-ZAAPP;”, the Zero amounts (APP) check box will be
selected.
If
you define “-AAAPP;”, the All amounts (APP) check box will be
selected.
If
both parameters are defined, the second parameter will always overwrite the
value of the first parameter.
If
“-ZAAPP;” is defined, the possible values for -PAPP; are C (Cost
price) or P (Purchase price). For example, PAPPP. Anything other than
the possible values will, by default, be C.
For
“-AAAPP;”, you do not have to define the value behind because it will, by
default, always be 1. (APP).
|
Zero amounts (SCP)
|
-ZASCP;
|
This
group of parameters is only valid if the Valuation method per item
check box under the Entry section at System ➔ General ➔ Settings ➔ Inventory settings is selected. Otherwise, these parameters
will be ignored.
If
you define “-ZASCP;”, the Zero amounts (SCP) check box will be
selected. You do not need to define the value after Use price because
by default, it will always be C (Cost price).
|
Zero
amounts (FIFO/LIFOActual costing)
Cost price/Purchase price
|
-ZAOth;
-POth;
|
This
group of parameters is only valid if the Valuation method per item
check box under the Entry section at System ➔ General ➔ Settings ➔ Inventory settings is selected. Otherwise, these parameters
will be ignored.
If
you define -ZAOth;, the Zero amounts (FIFO/LIFO/Actual costing) check
box will be selected. The possible values for -POth; are C (Cost
price) or P (Purchase price).
|
Zero
amounts
All
amounts
Cost
price/Purchase price
|
-ZAmt;
-AAmt;
-P;
|
This
group of parameters is only valid if the Valuation method per item
check box under the Entry section at System ➔ General ➔ Settings ➔ Inventory settings is not selected. Otherwise, these parameters
will be ignored. Depending on the stock valuation method, the logic is same
as the above.
|
|
-S;
|
To
indicate to execute the executable file in silent mode. Error or warning
messages will not be displayed.
|
Report
|
-R;
|
The
values for the parameters are:
N - None
T – Totals only
D – Detailed information
Anything
other than these values will, by default, be N. If this parameter is
not defined or wrongly defined, the report will not be generated.
|
Example:
-rMySQLServer -D955 -u -f00000000435 -~ -BckJob; -TDF; -TDT; -IGF;
-IGT; -IF; -IT; -ASST01; -ZAAPP; -PAPPC; -ZASCP; -ZAOth; -POthC; -S; -RT;
To
create a scheduled task, follow these steps:
- Open
the task scheduler in Windows by typing Task scheduler in the
Windows search box.
- Create
a new scheduled task by clicking Create Basic Task.
- At the Create
Basic Task Wizard field, define a name for the task and click Next.
- In
the next screen, select the frequency to execute the task. Then, click Next.
- Select
the time and day for this task to start and click Next.
- In the
next screen, select Start a program, and then click Next.
- Click Browse
to select the Exact.Inventory.StockRevaluation.exe file in C:\Program
Files\Exact Software\bin. At Add arguments (optional), append
the syntax for the scheduled task. For instance: -rMySQLServer -D955
-u -f00000000435 -~ -BckJob; -TDF; -TDT; -IGF; -IGT; -IF; -IT; -ASST01;
-ZAAPP; -PAPPC; -ZASCP; -ZAOth; -POthC; -S; -RT;
- Click Next.
- Click Finish
to create the task.
The
task will be executed under the username that created the scheduled task. If
you want to run the task under a different username and/or execute the task
when the user is not logged in, do these additional steps:
- Right
click the task and select Properties.
- Click Change
User or Group to select a different user.
- Enable
the setting Run whether user is logged on or not to make sure the
task is also executed when the user is not logged in.
Main Category: |
Attachments & notes |
Document Type: |
Online help main |
Category: |
|
Security level: |
All - 0 |
Sub category: |
|
Document ID: |
23.532.191 |
Assortment: |
Exact Globe+
|
Date: |
26-09-2022 |
Release: |
404 |
Attachment: |
|
Disclaimer |
|
|