Introduction
Acme Manufacturing Plc. manufactures a range of cheap catering equipment for the European market. Some of the parts used are fabricated within the company, but most are standard units purchased from a range of companies in Europe and Ireland.
General Description
A program is required which will process the Stock file and Manufacturer file to create an Orders file containing ordering information for all the parts that need to be re-ordered (i.e. where the QtyInStock is less than the ReorderLevel).
For each stock item that needs to be re-ordered the program will create a record in the
Orders file and will set an ONORDER flag in the Stock
file to show that the item has been ordered.
Acme Manufacturing tries to pay all suppliers in EU countries in advance. For these
countries, the COSTOFITEMS and
POSTAGE
fields of each Orders file record must be calculated.
With the exception of the Republic of Ireland, postage rates for all EU countries are the
same. The postage rates are obtained by calling a program "PostageRate" with two parameters;
the
POSTNUMBER (In) and the
POSTCHARGE (In/Out). The
POSTNUMBER is derived, as shown by the decision table
below. The POSTCHARGE is the value returned (in Euro and
Cent :- max €99.99) by "PostageRate" for a particular
POSTNUMBER. Note, that if the total weight of the items
ordered is greater than 50kg then the items cannot be sent by post and the
POSTAGE must be set to €0.00.
|
WEIGHT TO |
Y |
Y |
||||||||||
1 kg |
Y |
Y |
||||||||||
3 kg |
Y |
Y |
||||||||||
5 kg |
Y |
Y |
||||||||||
10 kg |
Y |
Y |
||||||||||
50 kg |
Y |
Y |
||||||||||
|
COUNTRY |
||||||||||||
Republic |
Y |
Y |
Y |
Y |
Y |
Y |
||||||
Other EU |
Y |
Y |
Y |
Y |
Y |
Y |
||||||
|
Post Number |
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
File Descriptions
Orders file (Sequential)
|
Field |
Type |
Length |
Values |
ITEMDESCRIPTION |
X |
30 |
-- |
MANFNAME |
X |
30 |
-- |
QTYREQUIRED |
9 |
6 |
1 - 999999 |
COSTOFITEMS |
9 |
7 |
0.00 - 99999.99 |
POSTAGE |
9 |
4 |
0.00 - 99.99 |
The last two items are 0 for all non EU countries.
The QTYREQUIRED is obtained from the REORDERQTY field in the Stock File.
The COSTOFITEMS is the QTYREQUIRED multiplied by the ITEMCOST.
Stock File (Relative)
|
Field |
Type |
Length |
Values |
STOCKNUMBER |
9 |
5 |
10001 - 99999 |
MANFCODE |
X |
4 |
AAAA- ZZZZ |
ITEMDESCRIPTION |
X |
30 |
-- |
QTYINSTOCK |
9 |
6 |
1 - 999999 |
REORDERLEVEL |
9 |
3 |
1 - 999 |
REORDERQTY |
9 |
6 |
1 - 999999 |
ITEMCOST |
9 |
5 |
0.00- 999.99 |
ITEMWEIGHT |
9 |
5 |
1g- 99999g |
ONORDER |
X |
1 |
Y/N |
Note: The relative record key is obtained by subtracting 10000 from the STOCKNUMBER.
Manufacturer File (Indexed)
|
Field |
Key |
Type |
Length |
Values |
MANFCODE |
Primary |
X |
4 |
AAAA -ZZZZ |
MANFNAME |
ALT with Duplicates |
X |
30 |
- |
MANFADDRESS |
- |
X |
70 |
- |
Note.
The constituent parts of the address are separated by commas, with the country name coming last.
The country name for Ireland and Northern Ireland is always Ireland even though, for postage charge purposes, Northern Ireland is treated as an Other EU country.
The second last item in an Irish address is the county name. This allows us to
distinguish Northern Ireland addresses from those in the Republic.
e.g.
SMALL PARTS LTD.,15 SHORE ROAD,BALLYMENA,ANTRIM,IRELAND
Each constituent part of the address will immediately follow its preceding comma.
Addresses are always in upper case.
EU countries
Austria, Belgium, Denmark, England, Finland, France, Germany,
Greece, Ireland, Italy, Luxembourg, Portugal, Scotland, Spain, Sweden, Wales.
Northern Ireland counties
Antrim, Armagh, Derry, Down, Fermanagh, Tyrone.