Skip to main content

Bill import drivers

This page explains the windows of the five drivers that appear in the Source list when you read bill items from a file or a device: the text file, the Palm device, the Psion device, the standard file and the Symbol device. The source window itself (its list, buttons and titles) is explained in Import bills. The steps to read a bill are in Import a bill from a file or device. Drivers in general are in Hardware and exchange drivers.

Opening the window​

The Source list is in the "Reading bill items" window. The commands that open it are explained in Import bills, and in Bill for the bill items grid. In this case the list shows five sources in this order:

Description in the listFileWhat it readsIts window
"File import driver (text file)"biFileImpA text file whose columns you define.Text file
"PSION import driver"biPsionA Psion stocktaking device on a serial port.Psion device
"Standard Import File Driver"biStdFileA file written by the standard export driver.Standard file
"SYMBOL import driver"biSymImpA Symbol stocktaking device on a serial port.Symbol device
"TABLE::PALM bill import driver"biPalmA Palm device on a serial port.Palm device

The window of the chosen source appears in one of two ways:

  • Click Setup in the source window. The window of the source always appears, and it saves what you change.
  • Click Ok in the source window. With the text file the window appears only if what is saved is incomplete: no file name, the file does not exist, or no field is ticked. With the standard file it appears only if no file name was saved. With Palm, Psion and Symbol no setup window appears, but the receiving window directly, with the last port you saved.

In the other cases the program reads the saved file directly. The Ctrl+O shortcut in the bill items grid does the same: it reads with the last source and shows no source window.

The program saves the file name, the ticked fields and the port for the current Windows user on this computer, so the first time is enough.

Text file​

The window title is "Read Materials from File". This source reads a text file in which each line is an item, and you define what each column carries.

FieldDescriptionRequiredValues and rules
File (Alt+F)The path of the text file.YesExample: D:\Import\items.txt. It starts with the last file the program read with this source.
Browse button (small square next to the path)Opens an open-file window.NoThe filter is Text files (*.txt) or All files (*.*). It puts the chosen file in File.
File FieldsA list of check boxes, one for each piece of information. Tick the information that your file carries.YesTick at least one field. The boxes start with what you saved last time, and none is ticked the first time.
ButtonWhat it does
OkChecks the file name, that it exists and that at least one field is ticked (see Messages), then saves the choices and closes the window so the program reads the file.
CancelCloses the window without reading and without saving.
Options (Alt+O)Opens the Export Options window to choose the separator between fields. It is explained in Program Options: files, shortcuts and backup.

File fields​

The list shows twenty-three fields in the order below. What matters in the file is the reading order (the last column): the program reads only the ticked fields, in this order, not in the order of the list. If you tick Material Code, Qty and Unit Price, the first column of the line is the code, the second is the quantity and the third is the price.

FieldWhat the program reads from itRequiredValues and rules
Material CodeThe code of the material in its card.Yes (one of these four)Reading order 1.
Material NameThe name of the material.Yes (one of the four)Reading order 2.
Latin nameThe Latin name of the material.Yes (one of the four)Reading order 3.
BarcodeThe barcode of the material.Yes (one of the four)Reading order 4. If the barcode belongs to one of the units of the material, the program uses that unit.
QtyThe quantity of the item.NoReading order 5. The program always reads it as positive.
UnitThe name of the unit of the item.NoReading order 6. The name of one of the units of the material. If it matches none, or you did not tick the field, the default unit of the material is used.
Unit NoThe unit number: 1, 2 or 3.NoReading order 7. A number above the units of the material, or zero, means unit 1.
GiftsThe free quantity.NoReading order 8. Always positive.
Unit PriceThe unit price.NoReading order 9. Always positive, and the program multiplies it by the parity of the bill currency. Without it the program puts the default price of the material, as if you typed the material by hand.
Percentage DiscountThe discount percentage on the item.NoReading order 10. A positive percentage.
NotesThe notes of the item.NoReading order 11.
WarehouseThe warehouse of the item.NoReading order 12. The code or name of the warehouse. A main warehouse, that is one that has sub warehouses, is not accepted: its item goes to the errors file (see Import a bill from a file or device).
Serial numberA serial number of the item.NoReading order 13. One number in each line.
Expiry DateThe expiry date.NoReading order 14. A / or - between the parts of the date is accepted, such as 31-12-2026. The cell may be empty. Where the program puts it in the item is decided by the Mapping option (Program Options: terms and fields).
CategoryThe category of the item.NoReading order 15. Text with the name of the category. Where the program puts it is decided by the Mapping option.
Cost centerThe cost center of the item.NoReading order 19. The code or name of the center. A main center is not accepted: its item goes to the errors file. Where the program puts it is decided by the Mapping option.
Production DateThe production date of the item.NoReading order 20. The same rules as Expiry Date. The cell may be empty.
Quantity 2The quantity of the item in the second unit.NoReading order 16. A number.
Quantity 3The quantity of the item in the third unit.NoReading order 17. A number.
Category Sale PriceThe sale price of the category of the item.NoReading order 22. It has an effect only in a bill form that has the category and category sale price columns, when the Link sale price with category option is on and the item has a category.
Addition %The addition percentage on the item.NoReading order 18. A positive percentage.
Value AddedThe tax amount on the item.NoReading order 21. Ticking it disables Value Added %.
Value Added %The tax percentage on the item.NoReading order 23. Ticking it disables Value Added.

The fields Material Name, Latin name and Barcode all fill the same value that the program uses to search for the material, so tick only one of them and put its value in the file.

Reading rules​

  • The program splits each line with the separator you chose in Options. The default separator is the Tab character. The program uses the first character of the separator. It does not save a separator you type yourself in the Other option: it works for the read from the same window, then the program goes back to Tab for the next read. The program does not read the Encoding and Surround Fields by Quotes choices of that window when it reads.
  • The program reads the file in the encoding that its beginning announces: UTF-8 with signature, UTF-16, UTF-32 or UTF-7. If it has no such mark at its beginning, the program reads it in the current Windows encoding (ANSI).
  • The program skips empty lines.
  • An empty cell stops the reading of the rest of the line, so the columns after it are not read. The exception is the cell of Expiry Date and Production Date: it may be empty.
  • The program searches for the material with the field you ticked, then puts the item in the bill grid from the current line. If it does not find the material it shows the message "Material not defined".

Palm device​

The window title is "Import bill from PALM". This source receives the stocktaking of a Palm device through a serial port, and the window shows only the progress of the receiving.

ItemDescription
Status:Next to it is an English text line with the receiving status: "Wait" at the beginning, then "Connecting" after the header line is accepted, then "Checking" and "Receiving" after the version line, then "end of string" when the end line arrives.
Line counterA text line in the middle of the window that shows the number of items received so far.
ButtonWhat it does
LogoutStops the receiving and closes the window. The program adds nothing to the bill.
ExitAlways disabled in this source. The window closes by itself when the end line arrives, and the program adds the items received.

The program receives the following lines in this order. Each line ends with a new line, and the values of a line are separated by the Tab character:

LineContent
FirstTABLE::PALM INVENTORY FILE
SecondVER=1.0
Item linesThe barcode of the material, then the quantity, then the unit number, then the serial number (optional).
LastEND.
  • The first and second lines are fixed. Anything else stops the receiving with a message (see Messages).
  • From each line the program reads: Barcode, Qty, Unit No and Serial number. The serial number is optional, and the program does not read it from the first item line. The program skips empty lines.
  • If a line comes with the same material as the previous one and has a serial number, the program adds the number to the previous item and does not open a new item.
  • This window does not open a port setup window. Define the port once with the Setup button in the source window: the Select Port window appears (Select Port). Choose COM and the speed of the device.

Psion device​

The window title is "Import bill from PSION". The layout and buttons of the window are as in Palm, and it differs in the Exit button: it becomes enabled after the third line, so you can end the receiving by hand if the end line does not arrive. Logout adds nothing.

ItemDescription
Status:An English text line: "Wait", then "Connecting", then "Receiving", then "end of string" when the end line arrives.
Line counterThe number of items received.
ButtonWhat it does
LogoutStops the receiving and closes the window without adding anything.
ExitDisabled at the start. It becomes enabled after the third line, and closes the window and adds what was received so far.

The program receives the following lines in this order, and the values of a line are separated by the Tab character:

LineContent
FirstPSION LINK FILE
SecondVER=2.0 or VER=3.0
ThirdA line the program ignores, such as TYPE=1.
Item linesThe barcode of the material, then the quantity.
LastEND.
  • With version 3.0 a line FIELDS=BQ (barcode and quantity) or FIELDS=BQN (barcode, quantity and notes) comes after the third line. Anything else stops the receiving.
  • From each line the program reads Barcode and Qty, and with FIELDS=BQN also Notes. After one read with FIELDS=BQN, the program keeps reading Notes in later reads until you close it.
  • Each line ends with one character (CR or LF). Otherwise the receiving stops with "invalid header".
  • The port is defined with the Setup button as in Palm.

Standard file​

The window title is "Import bill". This source reads a file written by the standard export driver in another file of the program or in the same file. It is the widest source: it reads groups, currencies and materials with the items, and it creates in your file what is missing of groups, currencies and materials after you answer.

FieldDescriptionRequiredValues and rules
File (Alt+F)The path of the standard export file.YesExample: D:\Import\bill-export.txt. It starts with the last file the program saved with this source.
Browse buttonOpens an open-file window.NoThe filter is Text files (*.txt) or All files (*.*).
ButtonWhat it does
OkChecks the file name and that the file exists, then saves the name and closes the window so the program reads the file.
CancelCloses the window without reading.

What the program does with the file:

  1. It checks that the first line is the version line V=2.0. If it does not start with V, the program shows the message "Incorrect File Version". If it starts with V and the version is not 2.0, it shows "Incorrect file Version". Then the reading fails.
  2. It reads the rest of the lines. The first character of each line gives its kind: B branch, C currency, G group, M material, I bill item, S serial number of the previous item, and the program ignores V and ;.
  3. For each currency, group and material in the file that you do not have (the program matches by code) it asks you before creating it, as in Messages. A new material is created with its prices, units and branches as in the source file, and with a zero balance.
  4. It puts the items in the bill grid. Each item carries what the export wrote: the quantity, unit, price, gifts, discount percentage, warehouse, notes, length, width, height, count, quantities 2 and 3, value added, cost center, category, production and expiry dates, addition percentage and category sale price, with its serial numbers.

Symbol device​

The window title is "Import bill from SYMBOL". The layout and buttons of the window are as in Palm.

ItemDescription
Status:An English text line that stays "Wait".
Line counterThe number of items received.
ButtonWhat it does
Log outStops the receiving and closes the window without adding anything.
ExitAlways disabled.
  • In this version the window receives nothing from the device: the status stays "Wait", the counter stays 0, and the window does not close by itself. Close it with Log out. The program adds nothing to the bill.
  • The port is defined with the Setup button as in Palm.

Messages​

MessageWhy it appearsWhat to do
"File Name Missing"You clicked Ok and the path is empty, in the text file or the standard file window.Type or choose the path.
"The file not found"You clicked Ok and the path does not point to an existing file.Correct the path.
"Must select an item"You clicked Ok in the text file window and no field is ticked in File Fields.Tick the columns of your file.
"File is empty"The file has no data.Choose a file that has lines.
"Material not defined" with the field name (such as "Material Code"), its value and the line numberThe program did not find a material with the value of the line.Correct the value in the file or define the material, then read again.
"Error reading file:" with the pathReading the standard file failed: the file is empty, the version is not accepted, you answered No to a creation question, or a record could not be created. It appears after the message that gives the cause.Check the file, or answer Yes to the questions.
"Incorrect File Version" or "Incorrect file Version"The first line of the standard file does not start with V, or its version is not 2.0.Use a file written by the standard export of this version.
"Unknown item:" with the line under itA line in the standard file started with a character other than B, C, G, M, I, S, V and ;.Fix the file or export it again.
"found SN without item"An S line came in the standard file before any item.Fix the order of the file.
"This file contains a new group. Do you want to define any new groups and continue importing" with the code and name of the group under itThe standard file has a group that you do not have. The program asks only once: after Yes it creates what it finds without questions.Yes creates it, and No stops the reading.
" New Currency" with the code and name of the currency under itThe standard file has a currency that you do not have. The question is in English in every language, and answering Yes also cancels the later group questions.Yes creates it, and No stops the reading.
"This file contains a new material. Do you want to define any new materials and continue import operation?" with the code and name of the material under itThe standard file has a material that you do not have. The answer buttons are Yes, No and Ignore.Yes creates this material and asks about the next. Ignore creates this one and all the later ones without questions. No stops the reading, and what the program created before it remains.
"Error opening port"In Palm: the saved port could not be opened.Click Setup and check the port and the connection of the device.
"Error in port notification"Starting the receiving on the port failed.Try again, and check that no other program uses the port.
"invalid header: …" with the received line under itThe header or version line that came from the device is not what the source accepts (Palm and Psion).Send the stocktaking again from the device in the correct form.
"Buffer Overflow"A line longer than the source accepts arrived without a line separator.Check the form of sending in the device.

The messages that the source itself shows (the last ones) have the line "File:" and the name of the driver file. For the forms of messages see Messages and callouts.

This page applies to alameen ERP 10, version 10.1.79.764.