OOo-Info.org > english
 
Font size:      

Items and Discounts

Problem

Data of articles, prices and discounts in a calc spreadsheet shall be used for quick computing and creation of an order. Without macro, using only the possibilities of functions it would be a lot of work to produce the orders.

Solution

The macro gets data (items, prices and discounts) from different cells and sheets. It computes the results and creates a new document for the order.

A similar solution can also be developed for a database (f.e. created by the Base modul).

Download

Via this download link you get the macro embedded in the calc document.

Using the tool

The calc document contains two sheets with items, prices etc.

graphics1

The first sheet is provided for item numbers, item groups, item names and single prices.

graphics2

The second sheet is provided for group names and three different discounts for different quantities

To start the creation of an order you just click the „New Order“ button.

graphics3

The dialog for the orders in the first sheet of the document

The order operation works as follows:

1. Select „Item Name“ and „Quantity“ and click „Check Item“, now the desired „Price“ and „Discount“ informations appear.

2. Click „Add to Order“ before you select a new „Item Name“, the result sheet is created automatically and you can check the result. Also the order total is updated. Go back to your order sheet and continue your order - or just click „Cancel Order“, if you made a fault.

3. Via „Finish Order“ button you get the „Grand Total“ in the result sheet and a dialog for the selection of a folder to save the new file.

graphics4

Automatically created calc document for the results

The file name for the result sheet including date and time is created automatically, so you only have to define the folder name.