Import Accounts Cards
The Import Accounts Cards wizard reads a text file that holds accounts. It adds the closing accounts and the normal accounts to the chart of accounts, and sets the closing account and the main account of each account. The file can come from alameen ERP 10 or from another program. In the wizard you choose the file, the separator and the meaning of each column, and then a message shows how many accounts were imported. For the practical steps see Import accounts cards. This wizard shows no report and does not ask a question before it starts, unlike Import Customers Cards.
Opening the wizard
- From the File tab > Import & Export, in the group named "Import Different Types of Cards Exported from Text Files, whether Exported from alameensoft or Other Programs", click Import Accounts Cards. See File tab: Tools and Import & Export.
- The button shows when your licence includes the import and export from files feature. It also shows in multiple-files mode.
- The user needs the Import Accounts Cards permission in Users Management, on the Operations page, in the group named after the import and export tool. The page linked above explains what happens when you click the button without it.
The wizard has four steps, and you move between them with Next and Back. Every window is titled Import Accounts Cards. In the last step Next is disabled and Start appears. When you click Cancel in any step the program asks: "Do you want to exit out importing customer cards". That is the text of the question in the program, and it appears here too. Choose Yes to leave.
The program remembers on this computer the last file, separator and columns, and shows them next time. It saves them when you click Start and the checks pass.
Introduction
The page explains that the wizard helps you, step by step, to import accounts cards from a text file, that the file can come from alameen or from another program and can hold the names and codes of accounts and the codes of closing accounts, and that Next moves forward, Back moves back and Cancel quits. It has no fields.
Select File
The page explains that you specify the name of the text file that contains account information. It is the file step of Import Materials Cards: a file name box, a browse button next to it that opens a file picker with the filter Text files (*.txt) or all files, and the last file you imported shown in the box. When you click Next the program checks that the file exists. If not, it shows "The file doesn't exist" without the path.
Fields Separator
This page is the same as the Fields Separator step of Import Customers Cards: Tab (the default), Comma, Semicolon and Other, with a box in which you type one character. If you choose Other and leave the box empty, the message "You must specify field separator" appears.
File Fields
The page explains that you must specify the content of the fields of the file, such as names and account codes, and the line to begin with to import the file.
| Item | Description | Required | Values and rules |
|---|---|---|---|
| Start line | The number of the first account line in the file, so you can skip a header line. | Yes | A number above zero. The default is 1 every time, and the program does not save it. |
| Fields grid | The first row holds a list for each column, from which you choose what the column holds. Under it are the lines of the file split by the separator. The column headers are Column 1 and so on, the row headers Row 1 and so on, and the header of the first row is Fields. | — | Up to 35 columns. The grid shows the lines of the file from the first one (up to 10000 lines) whatever the Start line. |
Buttons: Start, Back and Cancel.
The first time, the program puts in the first eleven columns, in order: Account code, Account name, Closing Account Code, Main Account Code, Latin name, Account type, Notes, Currency Code, Account type (the nature), Allocated Budget type and Allocated Budget value. Change those that do not fit your file to None. After that the program shows the columns it saved, which are always only the first eleven, whatever you choose in the columns after them.
Checks when you click Start
The program checks the columns in this order and stops at the first problem:
- Start line is above zero.
- No field is repeated (except None).
- Account code is chosen.
- Account name is chosen.
- Closing Account Code is chosen, even if its cells are empty.
Then the import starts with no question. The program closes the wizard when it finishes, and also when the import stops early.
File columns
The list of each column offers the choices below. Choose None for a column that you do not want to import. The program removes spaces at both ends of each value it reads. A line whose code or name is empty is skipped with no message and is not counted in any number.
| Column | What it does and how it is read |
|---|---|
| Account code | The code of the account. Required. |
| Account name | The name of the account. Required. |
| Closing Account Code | For a normal account: the code of a closing account that exists in the chart or in the same file, which is the closing account it belongs to. If it does not match a closing account, the program does not import the account. For a closing account: the code of the closing account it belongs to, left empty for the top closing account. The column is required in the list. |
| Main Account Code | The code of the account that becomes the main account of the normal account. If it does not match an account in the chart, the account has no main account. It is not read for a closing account. |
| Latin name | The Latin name of the account. |
| Account type | The text ختامي or the number 2 creates a closing account. Any other value, or not choosing the column, creates a normal account. The English text Final is not read. |
| Notes | The notes text. |
| Currency Code | Must match the code of an existing currency. The program sets it as the currency of the account with its exchange rate (the rate only for a normal account). |
| Account type (the second entry in the list) | The nature of the account. 1 or مدين: debit. 2 or دائن: credit. Any other value: Debit and Credit. In the English list this column has the same name as the account type column, and it is the second one. |
| Allocated Budget type | 1 or مدين: a debit budget. 2 or دائن: a credit budget. Any other value: None. |
| Allocated Budget value | A number, the budget value of the account. |
Only the columns you chose are written. See Account Card for the meaning of the fields.
How the program processes the lines
The program reads lines from the start line. The number of lines it reads is 10000 minus the start line number (for example 9998 lines if the start line is 2), and it ignores the lines after that with no message. Then it does the following:
Lines it counts as errors
The program counts a line as an error and records it in the error file if:
- its code exists in the chart of accounts;
- its code is repeated in the file: every line that shares the code counts as an error;
- its name equals the name of an existing account with a different code;
- its name is repeated in the file: every line after the first counts as an error;
- its Latin name (not empty) equals the Latin name of an existing account with a different code;
- its Latin name is repeated in the file, which includes empty cells if you chose the column: every line after the first counts as an error.
The program does not add a normal account that it counts as an error. It handles a closing account as described below, even if it counted it as an error.
Closing accounts
The program handles the lines of closing accounts first. It looks in the chart for an account whose code or name is the code or the name of the line. If it finds one it modifies it with the values of the chosen columns, and if not it adds a new closing account. Then it sets the closing account above it from Closing Account Code if it finds one, and otherwise it stays at the top level.
Normal accounts
For each normal account line that it did not count as an error, the program looks among the closing accounts for the one whose code is Closing Account Code, including the ones it added in this run. If it does not find it, it skips the line with no message, so the line is not in the error file. If it finds it, it adds a new normal account that belongs to that closing account, with the chosen values.
Main account
At the end the program sets the main account. For each line for which it found a closing account (and that has Main Account Code, or is a closing account), it looks for the account whose code is Main Account Code (or Closing Account Code for a closing account) and makes it the main account of the account whose code or name is that of the line. If it does not find it, it removes the main account. This includes the lines counted as errors, so the main account of an existing account whose code or name matches the line can change.
The program does not wrap the import in a single transaction, so it saves each account as it handles it. It shows no report.
The final message
When it finishes a message appears made of these lines:
- "Import is completed successfully".
- " Total number of accounts cards : …": the number of lines that have a code and a name, including those counted as errors.
- "Total cards containing errors (not imported): …" and then "Lines containing errors were stored in file:" and the path of a temporary file: they appear if there are lines counted as errors, and the file holds a line for each in the form
code-name. - "The number of new accounts that have been imported: …": the number of lines not counted as errors, even if the program skipped some because their closing account does not exist.
If the program finds no line with a code and a name, the same message appears with the numbers 0.
Messages
| Message | Why it appears | What to do |
|---|---|---|
| "The file doesn't exist" | There is no file at the path written in the file step. | Correct the path. |
| "You must specify field separator" | You chose Other and left the character empty. | Type the separator character. |
| "Start line must be more than zero" | You typed 0 in Start line. | Type 1 or more. |
| "Field duplicated: …" | You chose the same field for two columns. | Choose None for one of them. |
| "You must specify the field: …" | You did not choose Account code, Account name or Closing Account Code. | Choose the required field. |
| "File is empty" | The size of the file is zero. | Choose a file that holds accounts. |
| "Do you want to exit out importing customer cards" | You clicked Cancel. | Choose Yes to leave. |
| "Can't open file:" | The temporary error file could not be created. | Check the space and the write permission of the temporary folder. |
| "Import is completed successfully" and what follows | The import ended. | Check the numbers and the error file. |
Related
This page applies to alameen ERP 10, version 10.1.79.764.