Export to XML file
This window writes the bills, entries, commercial papers and cards that you choose in the Customize window into an XML file (or a ZIP file that holds it). You import the result in another company file with Import from XML file. The steps are in Export to an XML file.
Manufacturing forms have their own window, which writes an XML file of the same family: Export manufacturing forms. That window has no Customize window and no saved settings, and always writes all the forms.
Opening the window
- Open the company file, then click the File tab.
- Click Import & Export.
- In the group Import and Export Cards and Operations, click Export to XML file. The button description is "Export to 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 also includes warehouses.
In Users Management, the permission that carries the button name controls it, under the Operations page, in the group "Al-Ameen Import/Export Utility". Without it the button stays visible, nothing happens when you click it, and no message appears. See File tab: Tools and Import and Export for the page.
You can also run the export from the command line with the Export command, giving the file name, the settings file and the start and end dates. The wait window then appears instead of the progress window.
The export window
The window title is "Export to XML file". It opens with two values kept from the last time: the name of the last file you exported to in the File field, and the export settings from the default settings file that the program keeps in the logs folder on this computer. If there is no default settings file with content, the window starts with the program's own values.
| Field | Description | Required | Values and rules |
|---|---|---|---|
| File | Path of the export file. | Yes | Type it or pick it with the browse button beside it, for example D:\Export\Jan.xml. The extension must be xml or zip, otherwise a message appears. With zip the program writes an XML file with the same name, compresses it into a ZIP file with the name you typed, and deletes the XML file. |
| Browse button (beside the field) | Opens a save-file window with the filters XML Files, zip Files and all files. | — | Puts the chosen path in the field. |
| Button | What it does |
|---|---|
Export (Alt+E) | Checks the extension and whether the file exists, then writes the file. If the export succeeds the program closes the window; if it fails the window stays open. |
Customize (Alt+C) | Opens the Customize window. |
| Retrieve Defaults | Sets the name of the default settings file and creates it empty if it does not exist. It does not change the values shown in the Customize window. |
| Save Settings | Opens a save-file window (filter XML Files or CFG Files), writes the current export settings to the file you choose, and also writes them to the default settings file. |
| Load Settings | Opens a file-choice window (XML Files or CFG Files) and reads the settings from it. If the file is not suitable a message appears. |
| Cancel | Closes the window without writing anything. |
What the settings files keep
A settings file keeps everything you set in the Customize window: bill, entry and paper numbers for each type, the dates, the export options, the bill export type, the card ranges, the warehouse and the report sources. It does not keep the name of the export file.
The program loads the default settings file only when it opens the window. Changes in the Customize window stay in the open window and are used by the export, but they are not written to the default settings file unless you click Save Settings.
The Customize window
Its title is "Customize". You choose here what to export. Some of its controls appear or disappear depending on Between Dates.
Choosing bills, entries and papers
| Field | Description | Required | Values and rules |
|---|---|---|---|
| Export Bills | Exports bills by number. | No | On by default. It is hidden when you turn on Between Dates. |
| Between Dates | Chooses bills, entries and papers by date and by a list of sources instead of by number. | No | Turning it on hides the number grids and the check boxes Export Bills, Export Entries and Export Commercial Papers, disables Export Manual Entries, and shows the two dates and the Report Sources list. |
| From | Start date. | Yes with Between Dates | Default is the first day of the year. It must not be after To, otherwise a message appears. |
| To | End date. | Yes with Between Dates | Default is today's date. |
| Report Sources | A list of bill, entry and commercial paper types, with a box for each. | Yes with Between Dates | Appears only with Between Dates. Select at least one type. If you select an entry type the entries of that type are exported, and if you select a commercial paper type the papers are exported. |
| Export Entries | Exports entries by number. | No | Enables the entry types grid. Hidden by Between Dates. |
| Export Commercial Papers | Exports commercial papers by number. | No | Enables the paper types grid if the file has commercial paper types. Hidden by Between Dates. |
The three number grids (shown when Between Dates is off):
| Grid | Columns | Rules |
|---|---|---|
| Bills | Invoice type (read only), From, To No | One row per bill type. Leave a row empty to skip that type. From may not be greater than To No, and may not be zero or empty while To No has a value. |
| Entries | Entry type, From, To No | One row per entry type. Same rules. Disabled unless Export Entries is on. |
| Commercial papers | Commercial Paper Type, From, To No | One row per paper type. Same rules. Disabled unless Export Commercial Papers is on. |
When the window opens, the grids show the lowest and highest number that exist for each type.
Exporting cards
A grid titled Export Cards, with a row for each card type. Its columns are Export (the type name), Export Type, From Code and To Code.
| Row | What it exports |
|---|---|
| Export Accounts | Account cards. |
| Export Warehouses | Warehouse cards. |
| Export Groups | Material group cards. |
| Export Materials | Material cards. |
| Export Cost Centers | Cost center cards. |
| A row for each extra card source | Added by other parts of the program according to the licence, named after the source. |
The Export Type column is a list whose value is None (the default), All or Detected Region. It opens when you click the cell. With Detected Region you type in From Code and To Code the code of the first and last card. When you change the value to None or All the program clears both codes. The two code cells accept typing only with Detected Region.
Rules at OK: the program compares only the first character of the two codes. If the first character of From Code comes after the first character of To Code, the message "First material code must be less than last code" appears. The check applies to materials, warehouses, groups and accounts. If you choose a condition in Materials Terms, the program does not apply the check to materials.
On top of the cards you set here, the program adds what the exported documents need. Bills add warehouses, cost centers, customers and their addresses, materials and groups, and add accounts if the export type is Detailed and Export Credit Bills as Cash is off. Entries add customers and their addresses.
Export options
A list titled Export Options, with a box for each item. The items in this order:
| Item | What it does | When it is available |
|---|---|---|
| Ignore Non-Existing Bill Numbers | Continues the export without asking about gaps in bill numbering inside the range. | With Export Bills. |
| Export Credit Bills as Cash | Writes credit bills as cash bills. | With Export Bills or Between Dates. |
| Export Special Offers | Adds to the file the special offers (gifts) linked to the exported materials and groups, and their accounts. | With Export Bills, Between Dates, or when materials or groups are exported. |
| Export Materials and Groups Accounts | Adds the accounts of materials and groups in the bill types. | Same as the previous item. The program clears its box if the condition is not met. |
| Export Cash Bills as One Bill | Combines the cash bills. | With Export Bills or Between Dates. |
| Export All Bills | Fills the bills grid with the range from 1 to the last existing number for each type. | With Export Bills while Between Dates is off. |
| Export Bills from Last Export | Reads the record of the previous export kept on this computer. If none exists the message "No Previous Export" appears. | Same condition. |
| Export Bills Starting from Last Export ones | Reads the same record. | Same condition. |
| Export Entries from Last Export | Reads the record of the previous entries export. | With Export Entries while Between Dates is off. |
| Export POS Special Offers | Adds the POS special offers. | Available with Export Bills. |
| Export Active Offers | Adds the active offers. | With Export POS Special Offers. |
| Export Inactive Special Offers | Adds the inactive offers. | Same condition. |
| Export Discount Offers | Adds the discount offers. | Same condition. |
| Export Gifts Offers | Adds the gift offers. | Same condition. |
Extra rules:
- The program does not leave both Export Active Offers and Export Inactive Special Offers unticked, nor both Export Discount Offers and Export Gifts Offers. If you untick the second box of a pair it puts the tick back.
- At most one of the three bill items (Export All Bills, Export Bills from Last Export, Export Bills Starting from Last Export ones) can be on. If you choose two, the program clears all three.
- The settings file keeps only the first five items of the list. Export All Bills, Export Bills from Last Export, Export Bills Starting from Last Export ones, Export Entries from Last Export and Export POS Special Offers start unticked each time the window opens, and the four items under the offers start ticked.
Export type and bills filter
| Field | Description | Required | Values and rules |
|---|---|---|---|
| Type of Bill Export | The shape of the bills in the file. | Yes | One choice: Detailed (the default, each bill with its materials), Daily Total (the total of each day) or Total all (one total for the period). The three choices and the grid are disabled while Export Bills is off, and are enabled when you turn on Between Dates. |
| Warehouse (under Bills Filter) | Limits the bills to one warehouse. | No | A warehouse card. Available with Export Bills or Between Dates. Leave it empty for all warehouses. |
Manual entries
| Field | Description | Required | Values and rules |
|---|---|---|---|
| Export Manual Entries | Exports entries that were entered by hand, by number. | No | Between Dates disables it. With Between Dates the manual entries are exported if the manual entry type is selected in Report Sources. |
| From Entry | Number of the first entry. | When on | A number. The default is the first entry in the file. |
| To Entry | Number of the last entry. | When on | A number. The default is the last entry in the file. |
Materials terms
Materials Terms is a list of the material conditions saved in the file, with an area under it that shows the terms of the chosen condition. The program saves your choice in the settings. The same list is described in Insert expiry dates in output bills.
Buttons
| Button | What it does |
|---|---|
| OK | Checks your choices (see Messages), closes the window and keeps the choices in the export window. |
| Cancel | Closes the window. It does not apply what you changed. |
The Customize window does not write to the default settings file.
The progress window
When you click Export, a progress window appears with a line that names the current stage, a progress bar and a cancel button. The stage names are like: "Preparing Bills", "Preparing Warehouses of Bills", "Exporting Cost Centers", "Preparing Customers", "Preparing Accounts", "Preparing Materials", "Preparing Groups", then "Exporting Accounts", "Exporting Customers", "Exporting materials" and "Exporting Groups". Cancelling in this window stops the export, the program does not write the file, and no message appears.
The wait window
It appears only when you run the export from the command line. Its title is "Please Wait" and its text is "Exporting to File. Please Wait".
| Button | What it does |
|---|---|
| Close | Closes the window. Disabled until the export ends. |
| Emptying | Disabled until the export ends. Nothing happens when you click it. |
| Summary | Disabled until the export ends. Shows the lines of the program message log file one after another, skipping the first line. If the file is empty the path appears followed by : is empty. |
When the export ends the text changes to Export completed successfully or Export failed, in English in both languages.
What is written to the file
The file starts with the version number of the file format, a unique identifier and the export settings. Then come the bill, paper and entry types in use, the branches and currencies, then accounts, customers with their addresses and discount cards, groups, warehouses, cost centers and materials (and material segments if the segments feature is in the licence), then entries, manual entries, bills and commercial papers. Only what you chose, or what the chosen documents need, is written. The import rejects a file of a different format version.
When the export succeeds, the program writes a line to the operations log for each type and each card type with its counts, and keeps on this computer the numbers of the last bills and entries exported, which the "from last export" items use.
Messages
| Message | When it appears | What to do |
|---|---|---|
| Imported file must be of ZIP or XML format, and it can't be empty | You clicked Export and the File field is empty or its extension is not xml or zip. | Type a path that ends with .xml or .zip. |
| File already exists. Do you want to replace it? (with the file path) | The file exists. The message has Yes and No buttons. | Choose Yes to replace it, or No and change the name. With zip the program checks the XML file that has the same name. |
| Please select export type | You clicked OK in Customize without choosing anything to export. | Choose bills, entries, papers, cards or offers. |
| First material code must be less than last code | The first character of From Code is after the first character of To Code. | Correct the two codes. |
| Please select start bill number | In the bills, entries or papers grid: From is greater than To No, or From is empty while To No has a value. | Correct the row or empty it. |
| StartDate > EndDate | From is after To. The message is in English in both languages. | Correct the two dates. |
| Please select start and end number for a bill type from CUSTOMIZE button | You clicked Export and nothing in your choices is exported. | Open Customize and choose what to export. |
| Select at least one bill type | Between Dates with Export Commercial Papers, and no type chosen in Report Sources. | Choose a type. |
| Incorrect bill number: (with the type name) Are you sure to continue export operation and to ignore bills with incorrect numbers? | A bill type has gaps in the numbering inside the chosen range and Ignore Non-Existing Bill Numbers is off. | Yes to continue, or No to stop the export. |
| No Previous Export | You chose an item from "last export" and this computer has no previous record. | Export once by numbers first. |
| Export process is completed successfully to file: (with the path) | The file was written. | Nothing. The window closes. |
| Materials have been exported successfully | Only materials were selected, and the file was written. | Nothing. |
| An error occurred during exporting materials | Exporting materials alone failed. | Try again. |
| An error occurred while exporting | A step of the export failed (bills or another step). | Check the file before using it. |
| Error encountered while loading settings. Please select another file. | The Load Settings file has no export settings. | Choose a file you saved with Save Settings. |
| Error opening file (with the path) | The settings file could not be opened. The message is in English in both languages. | Check that the file exists. |
No message appears if you cancel in the progress window, or if the program does not write the file for another reason; check that the file exists after the export.
Related
This page applies to alameen ERP 10, version 10.1.79.764.