Lua Examples

The following are examples of scripts applicable to the program in order to better understand the various functions.

These models have been designed to meet the most varied needs, to be tested and modified within your databases.

In case you need help or a script that you can't find, write to us as to this link.

To see how to create a new script consult the guide to this page.

To use the scripts, copy the lines in the boxes inside the editor

The boxes follow the order that you must also respect in order to try them.

Create a cost history for the items

Let's create a table to save the history of all the cost changes that our articles have had.

Use a bar code reader inside a document

Let's intercept the reading of a barcode to automatically insert our articles into a document.

Update the customer's name inside the documents

Let's automatically update the customer's name in all the documents where it is called.

Create an invoice from appointments

Let's create an invoice by grouping all the business appointments made with a customer.

Check our GPS position

Let's see how to read our GPS position from the phone to check the data entered by our operators.

Create the monthly from the workers' hour markers

Let's create a document directly within the database that contains the hours worked by our workers for each month.

Import an xml file

Let's import an xml file to load data into our database.

Export to an xml file

Let's export an invoice within an xml file.

Stop the saving of an order

By handling errors we do not allow saving an order if the customer is insolvent.

Update the prices of the bill of materials

Let's see how to update the prices of the items starting from the bill of materials.

Update the support account from the due date to the invoice

Starting from a payment deadline, we modify the support account and update the associated invoice.

Group customer orders on an invoice

Let's recover orders placed for a customer and create a single invoice.

Change the currency on all fields

Let's use this script to directly edit all currency fields by changing the currency symbol.

Create a script report

Let's create a script type report to see how to manage the main stages of creation (only for Windows).

Print multiple orders together at once

Let's use a script to create a single print consisting of multiple order prints.

Create customers from a list of reports

In this example we will create the customer data form referred to in technical intervention reports. The procedure is very convenient when we have to load the reports through an excel file.