Skip to main content

Import from XML file

This window imports one or more XML files written by Export to XML file, then shows a report of what it added, changed and ignored. The steps are in Import from an XML file. Manufacturing forms have a separate window that reads files of the same family: Import manufacturing forms.

Opening the window​

  1. Open the company file, then click the File tab.
  2. Click Import & Export.
  3. In the group Import and Export Cards and Operations, click Import from XML file. The button description is "Import from XML file".

The button appears when:

  • A file is open.
  • The licence includes the standard reports feature or the import and export from files feature, and includes warehouses.
  • The file is not working in multi-files mode.

In Users Management, the permission that carries the button name, under Operations, in the group "Al-Ameen Import/Export Utility", controls the button. Without it the button stays visible and nothing happens when you click it. You can also run the import from the command line with the Import command and a settings file; the wait window then appears (see The wait window), with the text "Import in progress".

The import window​

Its title is "Import from XML file". It opens with the list of files saved in the default import settings file on this computer. If the saved number of files is 25 or more the program loads nothing and the list starts empty.

ItemDescriptionValues and rules
Imported FilesA list with the description of each file you added, and a check box on each row.The program imports only the ticked rows. The description is what you typed in the Select File window.
ButtonWhat it does
New (Alt+N)Opens the Select File window with empty fields. If you click OK the program adds the file to the list, ticked.
Modify (Alt+M)Opens the same window to edit the selected row. Does nothing if no row is selected.
Delete (Alt+D)Asks "Are you sure to DELETE this file from the list", then "You can't undo the DELETE! Do you still want to DELETE?". If you answer Yes to both it removes the row from the list. It does not delete the file from disk. Delete and Modify become disabled after you delete the last row.
Import (Alt+I)Saves the list in the default settings file, then starts the import.
Save Settings (Alt+S)Opens a save-file window (XML Files or CFG Files) and writes the list in it, with each file's description, options and contra types. It does not write the default settings file.
Load Settings (Alt+L)Opens a file-choice window and replaces the list with what is in the file. If the file is not suitable a message appears.
CancelSaves the list and its options in the default settings file, then closes the window. So your changes to the list stay for next time even though you cancelled.

Running the import​

When you click Import:

  1. If no row is ticked the message "Please select file" appears and the window stays.
  2. The program checks each ticked file: that it exists, that the XML and the version number are valid, that it has not been imported before (unless Import Duplicated Files is on), and, if the file is a totals file (daily or total), that the bill and commercial paper types in it have contra types. When a check fails a message appears (see Messages) and the import stops before changing anything.
  3. If Import Special Offers and Delete All Old Special Offers are on for a file, the program deletes the old offers before the import.
  4. The program imports the files one after another in the order of the list. While it works, it suspends checks on some tables and turns them on again at the end.
  5. Each file is imported in one operation: if anything in it fails, the program cancels the import of that whole file and saves nothing from it. After a file succeeds the message "Import is completed successfully" appears.
  6. A file is imported in this order: bill, paper and entry types, branches and currencies, accounts, customers and their addresses, discount cards, groups, warehouses and cost centers, materials, special offers, then bills, commercial papers, entries and journal entries.
  7. If you chose Audit Accounts Balances or Audit Materials Balances and Prices for any file, at the end the program recalculates the accounts balances, or the materials balances and prices.
  8. At the end a message with three parts appears: "Files imported:", then "Files not imported:", then "Files not imported because of an error occurred during importing:", with the descriptions and paths of the files under each, or "Not found".
  9. If it imported something the program opens the import report and the window stays open. Otherwise the window closes itself, even after a failure message, unless the message was "Please select file".

If the file has the identifier of the last file imported into this file, and Import Duplicated Files is off, the program shows a message with the file description and path followed by "Already imported, import will be canceled", unticks the file, does not import it, and lists it in the error part of the last message.

The Select File window​

Its title is "Select File". It opens from New and Modify.

FieldDescriptionRequiredValues and rules
FilePath of the import file.YesType it or pick it with the browse button (filters XML Files, zip Files and all files). The extension is xml or zip. For zip the program extracts it into the same folder and puts the name of the resulting XML file in the field.
DescA name you know it by in the list.YesFree text. It appears in Imported Files and in the import messages.
Cost CenterA cost center kept with the file settings.NoA cost center card.
Options (the list)The import options for this file.NoSee the table after this one.
ButtonWhat it does
OKChecks the extension, that the file exists, its validity and version number, and the description, then keeps the choices.
CancelCloses the window without saving.
Advanced Options (Alt+A)Opens the Advanced Options window for this file. The File field must be filled, otherwise "Please select file" appears.

The options list​

All items start unticked for a new file. Their order is as here:

OptionWhat it does
Auto Generate EntriesAfter importing bills, the program posts the imported bills of bill types that post automatically.
Import Duplicated FilesAllows importing a file that was imported before.
Post Bills to WarehousesAfter the import, the program generates the entry of the imported bills of bill types that generate their entry automatically.
Ignore Quantity WarningsWhile importing bills, stops the check on materials balances so that negative quantities do not block the import.
Don't Import VouchersIgnores the vouchers in the file.
Don't Import EntriesIgnores the entries in the file.
Import Special OffersImports the special offers (gifts).
Delete All Old Special OffersDeletes the existing special offers before importing the new ones. Disabled unless Import Special Offers is on; the program clears its box if you untick that one.
Import POS Special OffersImports the POS offers.
Update Existing Special OffersUpdates the existing POS offers instead of ignoring them.
Update EntriesUpdates the existing vouchers instead of ignoring them. Disabled with Repeat Entries.
Update BillsUpdates the existing bills if they are of the same type. Disabled with Repeat Bills.
Update Commercial PapersUpdates the existing commercial papers.
Update Materials CardsUpdates the existing material cards.
Update Customers CardsUpdates the existing customer cards.
Update Account CardsUpdates the existing account cards.
Update Cost Center CardsUpdates the existing cost center cards.
Apply Current File PricesFor bills in a currency: uses the exchange rate recorded in this file for the bill date, if it finds one.
Apply Card CodeMatches the existing cards by their code.
Repeat BillsImports a bill that already exists as a new bill instead of treating it as existing. Disabled with Update Bills.
Repeat EntriesThe same for vouchers. Disabled with Update Entries.
Audit Accounts BalancesAfter all files are imported, the program recalculates the accounts balances.
Audit Materials Balances and PricesAfter all files are imported, the program recalculates the materials balances and prices.

If you choose Update Bills, Repeat Bills is disabled, and the other way round. The same applies to Update Entries and Repeat Entries.

The Advanced Options window​

Its title is "Advanced Options". It opens from Advanced Options in the Select File window, and shows the types of the imported file so that you match each with a type in your file.

At the top there is a read-only box showing the path of the settings file in use.

FieldDescriptionRequiredValues and rules
Don't Import Accounts and CustomersDoes not import account and customer cards, and the bills use customers from your file.NoWhen on, First Payment Account is required, and each type in the bills grid needs a customer.
First Payment AccountThe account used with this option.When the option is onAn account card. Disabled and cleared if you untick the option.
Import to BranchA branch to which the imported items are assigned.NoA branch card. If you leave it empty the program uses the branch written in the file.

Three grids appear under them. The program fills the types of the imported file from the file itself: Arabic names in the Arabic interface, Latin names otherwise. It matches each type automatically with a type in your file that has the same name, and you change it from the cell.

The bills grid​

ColumnDescriptionValues and rules
Imported Bill TypeThe type in the XML file.Read only.
Bill New TypeThe matching type in your file.A list of the types suitable for the imported bill type.
Customer NameA customer to whom the bills are assigned.Search for it in the cell. Needed with Don't Import Accounts and Customers. Clear it with the Delete key.
Warehouse NameA warehouse to which the bills are assigned.Search for it. If you leave it empty the program uses the warehouse of the bill in the imported file, and if it has none the default warehouse of the type.
Payment TypeA list: None, On Credit and Cash.Stays None if the row has no customer.

The vouchers grid and the entries target​

ItemDescriptionValues and rules
Imported Entry TypeThe type in the XML file.Read only.
New Entry TypeThe matching type in your file.If the tax settings differ between the two types the message "Entry form has different tax settings" appears with the type name, and the choice is not accepted.
Import Entries ToA list that decides where the imported journal entries go.The first item is Journal Entry (the default, so they are imported as entries), then the voucher types in your file, which turns the entries into vouchers of the chosen type.

The commercial papers grid​

It appears if your file has commercial paper types.

ColumnDescriptionValues and rules
Imported Note TypeThe type in the XML file.Read only.
Note Paper TypeThe matching type in your file.A list of commercial paper types.
Account nameAn account used with this type.Search for it in the cell.

Buttons​

ButtonWhat it does
OKChecks (see Messages), then saves the types in the file settings and closes the window.
CancelIgnores what you changed. If you were editing a saved file everything goes back as it was, and if it was a new file the types are cleared.
Save SettingsOpens the window that saves the contra types with what is in the grids.
Load SettingsOpens the window that selects the contra types.

These buttons do not save a settings file; they save the contra types under a name in the company file so you can reuse them with other import files.

Saving the contra types​

The window title is "Contra Types".

FieldDescriptionRequiredValues and rules
NameThe name of the set of types.YesType a new name or choose a saved list. If the name is the one selected in the list the program asks "The name already exists. Are you sure to modify it?", then replaces the set.

The two buttons are Ok, which saves the set (bills, vouchers and papers, with the customer and warehouse of each bill), and Cancel.

Selecting the contra types​

The window title is "Select Contra Types". It has a list of the saved sets.

ButtonWhat it does
OkApplies the selected set to the grids: for each imported type that has a row in the set, it puts the matching type, customer and warehouse. Does nothing if no set is selected.
Delete (Alt+D)Does not delete the selected set.
CancelCloses the window.

The import report​

It opens after the import if the program imported something. Its title is "Detailed report of imported cards and activities". It opens in the shared report viewer; see Viewer for the viewer features.

A main grid with a row for each file; each row expands to show its details.

Column (files)Description
File NamePath of the file.
Import DateThe import date.
Start TimeThe time the import of the file started.
End TimeThe time it ended.
Column (details)Description
Card or ActivityThe kind of card or activity imported, such as account, customer, material or bill.
CodeThe card code or the activity number.
NameIts name.
Old CodeThe code the card had before the update. Stays empty on customer rows.
Old NameAppears on customer rows and carries the old name.
OperationAdd, Modify or Ignore.
NotesThe reason for the ignore or a remark about the row, such as "Guide already exists", "Code already exists", "Name already exists" and "Activity Date is before Beginning Date, before Fixing Date, or is after Closing Date".

Ignored rows have a different format from the others (the unposted format). In the right-click menu of a row only the view command that matches its kind appears: View Customer Card..., View Account Card..., View Group Card..., View Material Card..., View Cost Center Card..., View Warehouse Card..., View Bill..., View Voucher..., View Commercial Paper... and View Entry.... Currency and branch rows have no command.

Messages​

MessageWhen it appearsWhat to do
Please select fileImport with no ticked row, or Advanced Options while the File field is empty.Tick a row or choose a file.
Imported file must be of ZIP or XML format, and it can't be emptyOK in the Select File window and the extension is neither xml nor zip.Choose a correct file.
The file not found (File not found at import)The file does not exist at OK or at Import.Correct the path.
Error in extracting fileA zip file could not be extracted.Make sure it is an exported alameen file.
file type is not xmlThe file is not XML. The message is in English in both languages.Choose the right file.
Error in reading XML fileThe file is not an export file.Choose an export file.
File version is incorrectThe version number of the file format differs from what the program reads. At import the program adds "Correct Version:" and the number after it.Export the file from a compatible version.
Please set file descriptionOK while Desc is empty.Type a description.
The File: (description and path) Already imported, import will be canceledThe file was imported before and Import Duplicated Files is off.Turn it on to import the file again.
The Imported Bill Types In The File (with the file path) Different from defined types. Please select types from modify/advanced options windowA totals file (daily or total) has types with no contra type.Open Modify, then Advanced Options and choose the types.
Commercial papers types defined in file : (with the path) Different from defined types…The same for commercial papers.Choose the contra types.
Please select Contra bill types from Modify button then Customize buttonDuring the import: a bill type in the file has no type in your file with the same name and no contra type was chosen. The import of the file stops.Choose it in Advanced Options.
Please select Contra entry types from Modify button then Customize buttonThe same for vouchers. The program matches by name and tax settings.Choose it.
Please select Contra commercial papers types from Modify button then Customize buttonThe same for commercial papers.Choose it.
you must select FPAccOK in Advanced Options with Don't Import Accounts and Customers and no First Payment Account. In English in both languages.Choose the account.
You must select CustomerDon't Import Accounts and Customers is on and a type in the bills grid has no customer. In English in both languages.Choose a customer for each type.
Entry form has different tax settingsA contra voucher type has tax settings that differ from the file's type.Choose a matching type.
The name already exists. Are you sure to modify it?Saving a set of types under an existing name.Yes to replace.
An error encountered while loading settings. Please select a different file.The Load Settings file has no import list.Choose a file you saved from this window.
Import is completed successfullyThe import of a file ended.Nothing.

This page applies to alameen ERP 10, version 10.1.79.764.