In the UK there is not a single rate of VAT (sales tax) which covers all items, instead there are different rates which cover different categories of items:
Although these categories are defined on the PRICE_COMPONENT table by default, you can disable any that you don't use by setting their end_date in the past thereby making the entry historic instead of current.
The following VAT entries are defined on the PRODUCT_CATEGORY table by default. You can add others if you wish.
Id | Description |
---|---|
VAT-S | Standard Rate VAT |
VAT-R | Reduced Rate VAT |
VAT-0 | Zero Rate VAT |
VAT-E | VAT Exempt |
If you use more than one tax rate then you must add entries to the PROD_CAT_CLASS table in order to link each PRODUCT with the relevant PRODUCT_CATEGORYs. Note that it is not necessary to link Standard Rate products with the Standard Rate category as every product is assumed to be Standard Rate unless it is linked to one of the non-standard rates.
You must then ensure that the PRICE_COMPONENT table contains entries for each tax rate that you intend to use. Note that each of these records has its own start and end date, so it is possible to define different percentages for different date ranges. If a particular tax rate is not applicable for your installation then you can set the end date to a date which has already passed. This will cause the search for a record which is current (valid for today's date) to return nothing.
Sales Tax for Standard Rate:
field | value |
---|---|
order_adjustment_type_id | Set to "Sales Tax". |
price_type | Set to "Surcharge". |
price_frequency | Set to "One Time Charge". |
prod_cat_id | Set to "VAT-S". |
percent | Set to 17.5 (or whatever is applicable). |
area_id | Optional. If you need to deal with sales tax for more than one country then you must specify the country here. |
start_date | The date on which this rate comes into effect. |
end_date | Optional. The date on which this rate ends. Blank signifies an unspecified date in the future. A date in the past will signify that this entry has expired (has become historic instead of current). |
Sales Tax for Reduced Rate:
field | value |
---|---|
order_adjustment_type_id | Set to "Sales Tax". |
price_type | Set to "Surcharge". |
price_frequency | Set to "One Time Charge". |
prod_cat_id | Set to "VAT-R". |
percent | Set to 5.0 (or whatever is applicable). |
area_id | Optional. If you need to deal with sales tax for more than one country then you must specify the country here. |
start_date | The date on which this rate comes into effect. |
end_date | Optional. The date on which this rate ends. Blank signifies an unspecified date in the future. A date in the past will signify that this entry has expired (has become historic instead of current). |
Sales Tax for Zero Rated/Exempt:
field | value |
---|---|
order_adjustment_type_id | Set to "Sales Tax". |
price_type | Set to "Surcharge". |
price_frequency | Set to "One Time Charge". |
prod_cat_id | Set to "VAT-0" or "VAT_E". |
percent | Set to 0. |
area_id | Optional. If you need to deal with sales tax for more than one country then you must specify the country here. |
start_date | The date on which this rate comes into effect. |
end_date | Optional. The date on which this rate ends. Blank signifies an unspecified date in the future. A date in the past will signify that this entry has expired (has become historic instead of current). |
Each time an order item is added, amended or deleted, the total from all items is recalculated, and any order adjustments are applied to this total. Note that sales tax is applied after any discounts and surcharges. A separate subtotal is obtained for products within each category, and the rate for that category is applied to that subtotal. Every product is automatically deemed to be standard rate unless it has been associated with a non-standard rate category.
Note that if any of these adjustments is linked to a particular area_id they will only apply to customers whose primary address is within that area.
Organisations such as distilleries and breweries which manufacture alcoholic liquors must levy a special alcohol tax on all their sales in addition to any VAT. Unlike VAT which is a simple percentage which can be applied to the order total, alcohol tax is determined by the volume and strength (known as ABV or % Alcohol By Volume) within each product. As different products can vary in both volumes and strength it therefore becomes necessary for the organisation to perform its own calculation for each product and to define the result as surcharge on an Item Adjustment.
The first step is to define an entry on the ITEM_ADJUSTMENT_TYPE table as follows:
Id | Type | Description |
---|---|---|
ALCOHOL | Surcharge | Alcohol Tax |
The second step is to add entries to the PRICE_COMPONENT table to define the actual tax amount, one for each product. Note that each of these records has its own start and end date, so it is possible to define different values for different date ranges.
field | value |
---|---|
item_adjustment_type_id | Select "Alcohol Tax". |
price_type | Set to "Surcharge". |
price_frequency | Set to "One Time Charge". |
product_id | Required. The product identity. |
quantity_break_id | Must be empty. |
value | Enter the value which has been calculated using this product's volume and ABV. |
area_id | Select "United Kingdom" to limit this entry to customers within the UK only. |
start_date | The date on which this surcharge comes into effect. |
Each time an order item is added any adjustments for that product will be identified and added to that order. Any adjustment value will be added to the base price for that item.
Note that as each of these adjustments is linked to a particular area_id, they will only apply to customers whose primary address is within that area.
After an alcoholic liquor has been distilled it is stored in a bonded warehouse before it is sold. As soon as it is removed from that bonded warehouse the government's alcohol tax becomes payable UNLESS it is moved to another bonded warehouse. This includes being sold to a customer who will store the product in his own bonded warehouse, possibly because that product will be blended into his own product. It then becomes the responsibility of that customer, not this organisation, to pay the alcohol tax to the government, and to add the alcohol tax to his customers' invoices.
It is therefore necessary to identify such customers so that, even though they reside in the UK, they are not eligible for UK alcohol tax.
The first step is to create an entry on the PARTY_CLASS table as follows:
Id | Description | Party Type |
---|---|---|
TAX | Taxation Options | Organisation |
The second step is to create a related entry on the PARTY_SUBCLASS table as follows:
Class | Subclass | Description |
---|---|---|
TAX | BONDED | Bonded (exempt from alcohol tax) |
The third step is to create a entry on the PARTY_PRICE_EXCLUSION table for each alcohol tax entry as follows:
Field | Value |
---|---|
price_component_id | The identity of a price component which identifies a product's alcohol tax. |
party_subclass_id | BONDED (from the PARTY_SUBCLASS table above) |
start_date | The date on which this entry comes into effect. |
The final step is to identify those customers (parties) to whom this exclusion applies. This is done by locating the customer's PARTY record, then adding an entry to the PARTY_SUBCLASS_LINK table as follows.
Field | Value |
---|---|
party_id | The identity of an entry on the PARTY table. |
party_subclass_id | BONDED (from the PARTY_SUBCLASS table above) |
start_date | The date on which this entry comes into effect. |
This means that even though a UK customer may be eligible for the UK alcohol tax, it is not applied in those cases where the customer shares a PARTY_SUBCLASS entry with one that is defined on that adjustment's exclusion list.
Please read the following for background information regarding the handling of currencies:
For Sales Orders the two parties are identified as follows:
All order values are input in transaction currency which may or may not be the same as the organisation's home/operating currency. If they are different then the current exchange rate between those two currencies will be captured, and this rate will be used to convert all transaction/foreign currency amounts into home/functional currency. All the order processing enquiry screens will have a "Switch Currencies" button which, when pressed, will toggle the display to show the amounts in one currency or the other. With all communications with the customer, such as with emails or PDF copies, the values will always be shown in the transaction/foreign currency.
All order payments will also be entered in transaction currency, and the enquiry screens will also have a "Switch Currencies" button.
It may be the case that there are certain items in the organisation's product catalog which are not for sale to customers, such as unfinished goods. The easiest way to ensure that such products are not added to sales orders is to remove them from the list of products which a sales person sees during the order entry process. If a product cannot be seen, it cannot be selected.
In the GM-X application there are several tasks which provide lists of products, and there is one which is specifically used for sales order entry, so it is simple to modify this task to exclude certain products. The only difficulty is deciding which products? The answer lies in the use of flexible product categories.
The first step is to create an entry on the PRODUCT_CATEGORY table as follows:
Id | Description |
---|---|
NOTFORSALE | Not for sale |
The second step is to add entries to the PROD_CAT_CLASS table which links selected PRODUCTs to this new category. NOTE - this is done automatically whenever a new product is created to give the user time to add all the associated data, such as features and price components. Once the data is complete the product will not appear in any 'for sale' lists until this entry has been removed.
During the sales order entry process the user must access a POPUP form to choose from the list of available products, and this particular form has been programmed to exclude any product which has a current "NOTFORSALE" entry on the PROD_CAT_CLASS table.
Note that it is possible to have multiple 'Not For Sale' categories by using codes which begin with 'NOTFORSALE', as in the following:
Id | Description |
---|---|
NOTFORSALE1 | Not for sale (category 1) |
NOTFORSALE2 | Not for sale (category 2) |
It is quite common for large, important customers to negotiate a special price for a product instead of the "normal" price which is charged to everyone else. This is known as Contract Pricing or Agreement Pricing.
All that is necessary is to create an entry on the PRICE_COMPONENT table for each combination of product and customer, as follows:
field | value |
---|---|
price_type | Set to "Base Price". |
price_frequency | Set to "One Time Charge". |
product_id | The product identity |
value | The agreed price for this customer, in home currency. |
customer_id | The customer (party) identity. |
start_date | The date on which this price comes into effect. |
When an organisation with existing inventory starts to use this system there may be existing stock which needs to be recorded. The steps to achieve this are as follows:
After creating the SHIPMENT record the system will automatically create a PACKAGE record so that you can then create a PACKAGE_IN_CONTENT record for each product identifying the quantity that you wish to add to inventory.
The 'Add Item Receipt' screen will show the product_id and ask you to choose an inventory_item_id using a popup button. You may either:
When you press the 'Submit' button on the 'Add Item Receipt' screen this will:
This is where raw materials are taken from inventory and turned into finished goods by some production process.
NOTE: A more sophisticated process is described in How do I convert raw materials into a finished product?.
This is where raw materials are converted into finished goods by some production process, and the finished goods are then booked into inventory.
There are several stages in the preparation of outgoing shipments which involve running different tasks in several subsystems.
Each postal address within the PARTY system contains the following information:
These addresses are held separately from individual party details as it is possible for an address to be shared by multiple parties, and instead of duplicating the details each party contains a pointer to a particular address_id.
The full details of each address are not held on a single database table. Instead they are distributed as follows:
Other tables are used as follows:
It is possible to create geographic areas which are not used in postal addresses, such as sales areas or delivery areas, which act as containers for other areas. These areas, and the areas which are contained within them, must be created manually as they cannot be handled with the input of postal addresses.
It is also possible for a geographic area to be contained within more than one senior area. For example, an English county belongs within the country "England", but is also belongs within the country "United Kingdom". Thus it is possible to search for addresses in the UK, which includes England, Scotland, Wales and Northern Ireland, or to search for addresses in England only.
There are some towns in the UK which can belong in several areas at the same time. For example, "Sutton" is a town in the county of "Surrey", but it also belongs in the pseudo-county called "Greater London". Provided that the AREA_HIERARCHY table contains the correct links then any address which includes the town "Sutton" will be included on any search for either "Surrey" or "Greater London".
When a postal address is entered it is not a simple matter of writing all the details to a single database record.
When an address is entered it contains a number of geographical areas, so that address is certain to be included in a search that specifies any of those areas. However, a valid postal address may not contain every possible area with which it should be associated, so it may not appear in a search which specifies one of those "missing" areas. This situation arise for several reasons:
This situation can easily be rectified, not by changing the address, but ensuring that the AREA_HIERARCHY table contains an entry which links each "town" to all of its possible "regions". It is possible to link a "town" to as many "regions" as you like so that a particular town, and thereby all the addresses within that town, can be included in a search which specifies any one of those regions.
When a search is initiated on a particular geographic area the contents of the POSTAL_ADDRESS_AREA table is examined in order to identify all addresses which lie within that area. However, as has been explained earlier, it is possible that an address which exists in that area does not have an entry on the POSTAL_ADDRESS_AREA therefore would not be included in the search results. This problem is solved by including in the search criteria all those areas which have been identified on the GEOGRAPHIC_AREA_HIERARCHY table as being immediately junior to the primary search area.
When an inbound Supplier Shipment is received the goods are usually inspected before being placed into inventory. If there are any problems then the affected goods should be returned to the supplier using an outbound Purchase Return using the following steps:
After a customer receives his goods he may want to return them for some reason. This will require a type of inbound shipment known as a Customer Return.
This is similar to FAQ#1, but each PRICE_COMPONENT entry must have its area_id set to the country in question.
All entries in the PRICE_COMPONENT table have a start_date and an end_date which identifies the date range for which the price applies. An entry without an end date will effectively run on forever. Records with start and end dates effectively have three ranges:
This means that only one record will be valid on any one date.
If you want a new price to become effective on a particular date then you must create a new record with the new value and its start date. It is imperative that you do not simply change the value on the exiting record as you will lose all reference to the old value.
The procedure for creating a new record with a new start date is quite simple:
As well as creating a new record with a new start date the system will automatically set the end date on the current record to the day before.
On the ORDER_ADJUSTMENT_TYPE table is a field called is_manual which can either be set to 'YES' for manual or 'NO' for automatic. When a sales order is created all those adjustment types which are marked as 'automatic' will then be examined to see if there are any current entries on the PRICE_COMPONENT table for the customer or customer's country. Note that for the UK there may be up to four categories of sales tax as identified in FAQ#1. These entries will be automatically added to the ORDER_ADJUSTMENT table and will supply either a value or a percentage. Until items are added to the order the value for applicable_amount will be zero.
As each item is added to an order the system will determine which tax category (Standard rate, Reduced rate, Zero rated or Exempt) applies to the product. If none is found the system will assume that the Standard rate applies by default. It is only necessary to link a product with a tax category when it belongs to something other than the Standard rate. The system will then accumulate the goods amount for all order items within each tax category and use this as the applicable_amount to which the percentage will be applied in order to determine the total tax due for that rate.
If your organisation does not have any products which fall within a particular tax category the simplest way to prevent them from being added to each order is to locate the entry on the PRICE_COMPONENT table and set the end_date to a date in the past. This will then mark the entry as 'expired', and the system will ignore it.
The PARTY table contains an entry for every organisation and person who is required to be known to this application. One of these organisations is known as the "client" organisation, and is the one for whom the application is being run. This organisation is also known as the "Functional Unit" and can be identified by adding the "Functional Unit" ROLE to the organisation's PARTY data. This data then provides the following:
It is possible for a GM-X installation to handle the business for a group of organisations which do business under their own name, possibly in different countries with different currencies and calendars. In this case the following needs to happen:
When passing through the LOGON screen this information can then be made available to the application. If the user has not related to a Functional Unit then the following will happen:
NOTE: Entries on the PRICE_COMPONENT table which do not have a value for party_id_functional will be treated as Global prices and will be available to all organisations within the group, but if any prices exist for a Functional Unit then it is assumed that all prices will be defined for that Functional Unit, and the system will not fall back to the Global price.
If a GM-X instillation is handling multiple functional units which move inventory between themselves then please read FAQ35 which explains how the ownership of inventory items can be determined and how it can be changed.
If you have a Supplier Portal which allows an external party to access your system then you should do the following:
When the supplier's representative logs on his employer's organisation will automatically become his Functional Unit without the need to have that fact identified on the PARTY ROLE table.
They are defined on the UNIT_OF_MEASURE table with a uom_cat_id which identifies them as currency codes. On the GM-X->Product->Setup->UOM menu is an option called "Currencies" which will active the "List Currencies" screen in order to list all the currency codes that are defined in your copy of the database. Here are some examples:
Category | Description | Abbreviation | Scale |
---|---|---|---|
CURR | UK Pounds | GBP | 2 |
US Dollars | USD | 2 | |
Canadian Dollars | CAD | 2 | |
Euros | EUR | 2 | |
Australian Dollars | AUD | 2 | |
Japanese Yen | JPY | 0 |
The scale column identifies how many decimal places should be used when displaying amounts in that currency. In the above example this shows that Japanese Yen should always be shown as whole numbers such as 1000
instead of 1000.00
.
They are defined on the UOM_CONVERSION table which identifies two currencies and the conversion_factor (exchange rate) which will allow values to be converted from one currency to another. When in the "List Currencies" screen (see FAQ#21) there is a navigation button called "Exchange Rates" which will show all the current rates from the selected currency to other currencies as well as the date on which each rate was set.
Once a rate has been set it will remain active until it is replaced with a different value with a later start_date. This will also cause the end_date of the current record to be updated to be set one day earlier, thus making that record "historic" instead of "current". Instead of having a single record with nothing but the current exchange rate, by having multiple records with different date ranges it is possible to keep a history of what rate was applicable on a particular date. Here are some examples:
FROM currency | TO currency | Conversion Factor |
---|---|---|
UK Pounds | US Dollars | 2.04631 |
Canadian Dollars | 2.1521 | |
Euros | 1.49183 | |
Australian Dollars | 2.33514 | |
Japanese Yen | 243.816 |
Note that if you wish to switch the FROM and the TO currencies then this will require a separate entry in the database. It is not general practice simply to take the rate for converting in one way and invert it for converting the other way.
Each GM-X installation should have at least one Functional Unit (see FAQ#20) defined on the ORGANISATION table. The currency code for this party then becomes the operating currency (also known as the home or functional currency) for all the financial transactions (sales orders, invoices, etc.)
For parties which are not Functional Units, such as customers or suppliers, the currency_code on their PARTY records identifies the currency in which they prefer to operate.
While some organisations only ever operate in a single country and currency, some organisations conduct business with parties who operate in different countries and in different currencies. In this case it is necessary for each of the two parties to be able to view each transaction in their preferred currency as well as the other currency. The currency of the internal organisation is known as "home/functional" currency, while the currency of the other party is known as "foreign/transaction" currency.
Objects such as Orders, Invoices, Quotations and Expenses are documents which itemise financial dealings between two parties. These two parties are:
Note also that as well as documents being created on behalf of the Functional Unit which are then sent to external parties, it is also possible for documents to be created by external parties and received by the Functional Unit. It is possible for the external party to create the document directly in the organisation's system using a Supplier Portal, or to create the document in their system which is then sent to the receiving party over a blockchain.
In order to deal with this multi-currency requirement the GM-X database contains additional fields as well as the standard fields which hold values in the organisation's home currency. These fields are:
Field | Type | Description |
---|---|---|
currency_code | string | Links to an entry on the CURRENCY_CODE table. This identifies the transaction currency. This defaults to the operating/home currency of the receiving party, but may be changed by the user. |
exchange_rate | numeric | Optional. The exchange rate which allows values to be converted from functional currency to transaction currency. This is only required if the two currencies are different. |
There may be one or more fields on a database table which hold financial amounts. Each of these has a version called <value> which holds the amount in home/functional currency, and another version called <value>_tx which holds the equivalent amount in foreign/transaction currency. | ||
<value> | numeric | This holds a value which is expressed in home currency. |
<value>_tx | numeric | This is the same as <value>, but expressed in transaction currency. |
Note that the screens will only show one of these values at a time. A navigation button called "Switch Currency" will allow the display to be toggled between the two currencies. All input and update screens will only ever operate in transaction currency, in which case the input amount will be stored in <value>_tx, then multiplied by the inverse of exchange_rate before being stored in <value>.
Having received a Quotation from a supplier and accepted it, either for all items or just a subset, there are two ways in which a Purchase Order (PO) can be sent to the supplier for those selected items:
This only applies for products which are tracked by lot or serial number. It requires the following steps:
Note that quarantined stock may be reserved, but cannot be issued.
An invoice can be generated from the sales order when either of the following tasks is executed:
To signify which of these is required the string "create_invoice=TRUE" should be inserted into the SETTINGS field of the relevant task on the MENU database. This will cause the task acc_invoice_header(add4) (for orders) or acc_invoice_header(add1)so (for shipments) to be run automatically in the background. This will copy the details from the sales order into the Invoice database after which it will automatically run task acc_invoice_header(upd1)email.
Task acc_invoice_header(add4) will create an invoice from the sales order details, then set the order status to 'Invoice Created'.
Task acc_invoice_header(add1)so is the same as acc_invoice_header(add4), but with a confirmation screen.
Task acc_invoice_header(upd1)email will display a confirmation screen before sending the email to the customer. This will require that the customer has a suitable email address set up on the PARTY_CONTACT_MECHANISM table with a purpose of 'EMAIL_INV' (Invoice Email). If one is not found it will use the primary (or only) email address.
A Purchase Order (PO) is sent to the supplier when the PO is approved. This is done on the "List Purchase Orders (To Be Approved)" screen by selecting a PO and pressing the "Approve - to Supplier" navigation button. This will create a PDF document and email to the supplier.
This requires a suitable email address entry being set up for the supplier on the PARTY_CONTACT_MECHANISM table with a purpose of 'ADDR-PO' (Purchase Order) which requires a linked entry on the CONTACT_MECH_PURPOSE_TYPE table. If one does not exist with that particular purpose it will look for a single entry of the 'EMAIL' type.
All possible status values for orders, whether for sales, purchases or transfers, are held on the ORDER_STATUS_TYPE table. Some of these may not be used in particular installations, so can be ignored, or even deleted.
Every order starts its life with a status of 'Pending' (PEND), and every subsequent change moves it from its current value to a new value. In order to signify that a particular change an entry needs to be added to the ORDER_STATUS_RULES table in order to signify which combinations of current/from and new/to values are allowed. Any change using a combination which is not identified on this table will therefore be rejected.
All possible status values for orders, whether for sales, purchases or transfers, are held on the ORDER_STATUS_TYPE table. In order to send out an email whenever an order's status is changed to one of these values then you need to specify a value for template_id and is_email_auto.
The template_id will point to a record on the EMAIL_TEMPLATE table. The email_template field will specify the message that is to be sent out. This should contain the text of the message either in plain text or HTML format. It may also contain certain keywords enclosed in a pair of '#' characters which will identify values that will be obtained from the database at runtime, thus allowing the message to be personalised.
Note hat settings on the EMAIL_TEMPLATE table will allow the message to be sent again a specified number of times after a specified delay. The same message template can be used again, or it can be switched to a different message.
Nobody can log onto the system unless they first pass through the LOGON screen. This requires two values:
After logging on the user will be taken to the starting menu which is defined on the MNU_ROLE table. From this point on the user will only be allowed to access those parts of the system which have been granted to those MNU_ROLES to which the user has been associated.
If passwords are taken from the MNU_USER table the system administrator may have set up rules which require the password to be changed. If a change is triggered then this must be performed before the starting menu can be displayed.
Please see How do I access the system? for the basic rules.
If the application is only dealing with a single Functional Unit then party_id=1 will be used as the default value. Note that this is initially created with the name 'Client Organisation', so all its details will be to be changed to appropriate values.
If a value other than the default is required then that party should have an entry on the PARTY_ROLE_LINK table which links it to the 'Functional Unit' role.
If there is only one Functional Unit then no further action is required.
If there is more than one Functional Unit then the following steps will be required:
These two parties should then have an entry on the PARTY_RELATIONSHIP table with the following values:
Field | Value |
---|---|
rel_type_id | 'Employment' |
rel_status_id | 'Active' |
rel_priority_id | (Not relevant) |
rel_weighting_factor | (Not relevant) |
start_date | The starting date for this entry. |
end_date | The ending date for this entry. |
party_id_1 | The identity of the Organisation in this relationship |
role_type_id_1 | 'Organisation Role' |
role_subtype_id_1 | 'Employer' |
party_id_2 | The identity of the Person in this relationship |
role_type_id_2 | 'Person Role' |
role_subtype_id_2 | 'Employee' |
Note that the order in which the details of the two parties is entered is not significant. The employee details could be entered as party#1 with the employer details as party#2.
During the logon process the following lookups will be performed:
Please see How do I access the system? for the basic rules.
The user should only be linked to the 'Supplier' role as this will restrict access to only those functions which are allowed for a member of an external organisation.
The user should have an entry on the PERSON table, and this party_id should be inserted into the party_id field on the MNU_USER record so that the two entries can be linked.
The person's employer needs to have an entry on the ORGANISATION table and an entry on the PARTY_ROLE_LINK table which links it to the Supplier role.
The two parties - employer and employee - should have an entry on the PARTY_RELATIONSHIP table using the same values as shown in FAQ32.
This procedure, which is known as a "conversion", requires the following to be set up on the database:
The task which performs this process has the following steps:
When the SUBMIT button is pressed this task will create the necessary entries on the ITEM_RECEIPT table for the target/output product and ITEM_ISSUANCE table for each consumed/input product.
In the situation where a GM-X installation is handling multiple Functional Units which buy and sell inventory among themselves it is vitally important that the owner of that inventory can be easily identified and only be altered in the right circumstances.
For receiving into inventory the guiding principles which are followed in GM-X are s follows:
Note that the Shipment Subsystem is used to transfer stock from one party/location to another as denoted by the party_id_sender and party_id_receiver on the SHIPMENT record. For outbound shipments the products are issued from the stock owned by the party_id_sender. For inbound shipments the products are received into stock owned by the party_id_receiver. For Transfer Orders the two parties are the same, but the sending address must be different from the receiving address.
For issuing from inventory the guiding principles which are followed in GM-X are as follows:
In many places within the application there are dropdown lists or radio buttons where, instead of free-format text, the user can only choose a value from a list of options which is provided by the application. These values can be obtained from one of two places:
Options provided in a language_array.inc file cannot be amended by the user, but those in a database table can. While some of these database values are completely under the control of the user and can be added or deleted when required, there may be some values which have special significance to the application and which should never be deleted. For example, on the ROLE_SUBTYPE table there are values such as "Customer", "Supplier" and "Functional Unit" which are required by several parts of the application. In order to prevent such values from being deleted a mechanism has been devised to interrupt the deletion process with an error message which says "This entry is reserved for use by the application and cannot be deleted".
In order to activate this mechanism all that is required is to create a file of restricted words and place it within the relevant subsystem directory. This file can exist with any one of the following names:
This mechanism will search for the file in the above order and stop when the search is successul. Note that the first two versions allow different values to be supplied for different project codes while the last defines a single set of values which will apply to all project codes.
Here is the contents of an existing file as an example:
<?php $array = array(); // this file identifies records on certain tables which should NOT be deleted. // each entry in this array should identify the table and the primary key values. // $array['<tablename>'][] = array('<column_id>' => 'value'); $array['party_identity_type'][] = array('identity_type_id' => 'ALTERNATIVE'); $array['relationship_priority'][] = array('rel_priority_id' => 'MED'); $array['relationship_status'][] = array('rel_status_id' => 'ACT'); $array['relationship_type'][] = array('rel_type_id' => 'CUSTOMER'); $array['relationship_type'][] = array('rel_type_id' => 'SUPPLIER'); $array['role_subtype'][] = array('role_type_id' => 'ORG', 'role_subtype_id' => 'FUNC'); $array['role_subtype'][] = array('role_type_id' => 'CUST', 'role_subtype_id' => 'CUSTOMER'); $array['role_subtype'][] = array('role_type_id' => 'SUPP', 'role_subtype_id' => 'SUPPLIER'); return $array; ?>
Note that this file should produce a variable called $array which is a multi-dimensional/multi-level array. The key at the first level identifies the table name within that subsystem, the key at the second level identifies the column name on that table, and the value identifies the value which should not be deleted.
There may be circumstances where an installation being used by a client contains the files for some subsystems which have not actually been licensed by that client. Instead of removing the details of the unlicensed subsystems from the MENU database the alternative is to use a new configuration file whso name is in the format licensed.subsystems.<project>.inc where <project> is a unique identifier which is given to each cient organisation. An example of its contents is given below:
<?php // this identifies the licensed subsystems $licensed[] = 'menu'; $licensed[] = 'audit'; $licensed[] = 'workflow'; $licensed[] = 'order'; $licensed[] = 'party'; $licensed[] = 'product'; ?>
This file is optional, which means that if it does not exist when the user logs on then nothing will happen. If it does exist then whenever a script is run and a table object is created the contents of the $parent_relations and $child_relations arrays will be scanned for entries which belong to subsystems which are not in that list and remove them. This will prevent any framework code from trying to access any unlicensed subsystems.
Payment terms are usually expressed as "Net X days" where X can be 30, 60 or 90 (or whatever the organisation chooses). This number of days is added to the invoice date in order to identify the date on which payment is due. If payment is not made by the date the organisation may charge interest on the amount due.
To apply payment terms automatically to each order/invoice please follow these steps:
Whenever an order is created the following procedure will be performed:
For invoices the procedure will use the INVOICE_TERMS table.
Note that records on the ORDER_TERMS and INVOICE_TERMS tables can be added or deleted manually at any time.
For invoices this record will be used to calculate the due_date on the INVOICE_HEADER record. This value can be changed manually, but if emptied it will be recalculated using the INVOICE_TERMS record.
In order to encourage customers to pay their invoices early they may offer what is known as a Early Settlement Discount which allows the customer to deduct that discounted amount from the invoice amount provided that they settle within the specfied time limit. This then requires the following records on the database:
Note that the values for term_type_id and order_adjustment_type_id must be the same so that they can be linked. It is suggested, though not required, that meaningful identities such as 'ESD-2-10' be used instead of random strings of letters and numbers.
Whenever a new order is created any entries on the PARTY_TERMS table for that customer will be copied to the ORDER_TERMS table. A lookup will then be performed on the PRICE_COMPONENT table for a matching entry, and if one is found it will be added to the ORDER_ADJUSTMENT table.
Note that the same processing will be performed whenever an invoice is created in order to add records to the INVOICE_TERMS and INVOICE_ADJUSTMENT tables.
While the value of the discount amount will be calculated it will NOT be deducted from the net order/invoice amount. It will only be applied when the invoice is settled with the specified time period.
Note that this design supports only the "gross method" accounting treatment for financial discounts, also known as "cash discounts" or "early payment discounts". Under the gross method, invoices, credit notes and debit notes which are open and outstanding are carried on the books at full face value until paid or settled, and financial discounts are recognised as business income only when customers take the financial discounts offered. Market research indicates that nearly all businesses use gross method instead of the "net method", under which open invoices, credit notes and debit notes are carried on the books at net value after the financial discount offered.
Unlike a standard sales tax which is added to the invoice total and then paid by the payor to the payee, this amount is deducted from the invoice total by the payor and never received by the payee. The payee should then regard this amount as an expense.
This then requires the following records on the database:
Copyright © 1999-2022 by Geoprise Technologies Licensing, All Rights Reserved.