Merge Cash Bills
The Merge Cash Bills wizard joins bills that were paid in cash, have the same date and carry matching data into one bill, for the types and period you choose. It helps when many small cash sales were entered and you want fewer bills. This page explains the two pages of the wizard with their fields, buttons and messages, and what the program does to the bills. The steps are in Merge cash bills.
The operation deletes bills from the file and cannot be undone once it ends. Take a backup before you start, and ask the other users to leave the file.
Opening the wizard
Click File > Tools > Files Maintenance, select Merge Cash Bills and click Run. The window and the warning frame are explained in Run files maintenance.
- The operation is in the list when your key includes accounting, the file does not work in multi-file mode, and the Gulf, UAE and Syrian tax systems are all off (Available maintenance operations).
- The Files Maintenance permission guards the maintenance window (Run files maintenance). The permission named after the operation under Users Management > Operations controls only whether its tile shows on the desktop. The program does not check it when you run the operation from the Files Maintenance window, from its favorites menu or from Quick Launch search.
The description in the list
The Files Maintenance list shows the name of the operation with a description under it: "This operation enables you to merge cash invoices of certain client, warehouse, salesman or distributor; or merge invoices bearing the same cash or material accounts; or merge invoices related to same cost center; or even all cash invoices."
The backup page
The first page of the wizard is Make a Backup. Its types and fields are in Make a backup. After the backup, or after you choose not to make one, the Cash Bills Differences page appears. How the pages, their buttons and the cancel question work is in How the maintenance wizards work.
The Cash Bills Differences page
The page title is Cash Bills Differences, and the title of the wizard window is Merge Cash Bills. The page text says: "Select the below fields to merge bills containing them. If none was selected, bills with matching fields only will be merged".
The rule is the same for each of the first seven fields:
- Leave it empty: the program merges only bills that have the same value in this field.
- Choose a value: the program merges the bills whatever their value in this field, and puts your value in the merged bill.
Fields
| Field | Description | Required | Values and rules |
|---|---|---|---|
| Client | The customer that the merged bill carries. | No | Empty when the page opens. The field is not shown if your key does not include the customer card feature. Bills that have a customer take part only if you tick Merge Bills related to Customers on the next page. How to search is in Lookup and search. |
| Warehouse | The warehouse that the merged bill and its lines carry. | No | Empty when the page opens. The field is hidden if your key does not include the warehouse card feature; each bill then keeps its own warehouse. |
| Cash Account | The cash account that the merged bill carries. | No | Empty when the page opens. It is the account that a cash bill shows in its Customer Account field (The bill). |
| Materials Acc | The materials account that the merged bill carries. | No | Empty when the page opens. |
| Cost Center | The cost center that the merged bill and its lines carry. | No | Empty when the page opens. Shown only if your key includes the cost centers feature. |
| Salesman | The salesman. | No | Empty when the page opens. Different from the other fields: if you choose a salesman, only that salesman's bills take part. |
| Distributor | The distributor. | No | Empty when the page opens. Different from the other fields: if you choose a distributor, only that distributor's bills take part. |
When Security Level Difference
A group of two options. Don't merge is selected when the page opens.
| Option | What it does |
|---|---|
| Don't merge | Bills with different security levels are not merged. |
| Merge with high security level | Bills are merged whatever their security level, and the merged bill takes the highest level among the bills that were merged. |
Additions and Discounts
A group of three options. Don't merge is selected when the page opens. They decide what happens to the bill-level discount and addition rows (the rows of the discounts and additions table, not the discount of the material lines).
| Option | What it does |
|---|---|
| Don't merge | The discount and addition rows of all the bills move to the merged bill as they are, so they stay separate rows. |
| Merge discount with items' discount | The program spreads the bill discount and addition over the material lines in proportion to the value of each line, adds them to the line's discount and addition, and then deletes the discount and addition rows of the bill. |
| Merge Disc/Addition with material value | The program sets the line discount to zero, makes the material price in the line include its share of the discount and addition, and then deletes the discount and addition rows of the bill. |
Merging quantities
| Field | Description | Required | Values and rules |
|---|---|---|---|
| Merge materials quantities within bill | Joins similar lines of the merged bill into one line. | No | Not ticked when the page opens. Similar lines have the same material, unit, price, class, production and expiry dates, dimensions, currency, warehouse and cost center. Their quantities, bonuses, discounts, additions and tax are added up. The program also adds up the tax ratio of the joined lines: two lines at 15 give one line at 30. Check the tax of the bill after merging. Materials that have a serial number are not joined. |
Buttons
| Button | What it does |
|---|---|
| Next | Goes to the Merge Cash Bills page. It checks nothing on this page. |
| Back | Returns to the backup page. Your choices on this page are kept if you come back to it. |
| Cancel | Asks "Are you sure you want to exit and cancel the maintenance operation?" and then closes the wizard without changing any bill. |
| Help | Opens the help topic of the page, if there is one. |
The Merge Cash Bills page
The page title is Merge Cash Bills. Its text says: "Select the period and bills types you want to merge. Click "Start" to begin". It is the last page of the wizard.
Fields
| Field | Description | Required | Values and rules |
|---|---|---|---|
| From | The first day of the period. | Yes | Starts with today's date. The field cannot be empty. How it works is in Date fields and calendar. |
| To | The last day of the period. | Yes | Starts with today's date. The program does not check the order of the two dates: if From is after To, it processes no day. |
| Merge Bills related to Customers | Lets bills that name a customer take part. | No | Not ticked when the page opens. Not ticked: only bills with no customer take part. Ticked: bills of different customers are not merged together, unless you chose Client on the previous page. |
| Invoices | The list of bill types that take part. | Yes (at least one type) | All types are ticked when the page opens, so clear the ones you do not want. It lists the input and output types you have the permission to browse, and bill types show only if your key includes stock. A type that requires approvals is not listed (Require approvals on a form). With Turkish e-invoicing on, the types it covers are not listed. |
Under the Invoices list there is a field without a caption that shows the prompt Groups of forms. Choose a forms group in it to tick its types in the list and untick the others. The program empties the field when you click a check box in the list (Forms groups).
Under the fields there is a line that shows the day being processed and a progress bar. The bar appears after Start.
Buttons
| Button | What it does |
|---|---|
| Start | Checks that you ticked a type and then starts the operation. It asks for no confirmation. |
| Back | Returns to the Cash Bills Differences page. When you return to this page it is in its first state: both dates today, all types ticked and the check box cleared. |
| Next | Disabled: this is the last page. |
| Cancel | Before Start: asks "Are you sure you want to exit and cancel the maintenance operation?" and closes the wizard. While it runs: see the next section. |
| Help | Opens the help topic of the page, if there is one. |
While it runs
After Start, Start and Back are disabled, and the progress bar and the date of the day being processed appear. The program works through the period day by day and never merges bills of two different days. The whole operation is one transaction on the database: if it stops with an error, nothing changes.
Cancel stays enabled while it runs, unlike most maintenance wizards. If you click it the question "Are you sure you want to exit and cancel the maintenance operation?" appears. If you choose Yes the button is disabled, but the program does not stop the merge: it continues to the last day of the period, and then the two closing messages appear.
When the period ends the program writes the log (if it is on), shows "Bills Count That Have Been Collected" followed by the number, then "Operation successfully completed", and closes the wizard. You are back in Files Maintenance.
What the program does
For each day of the period the program picks the bills paid Cash that belong to the ticked types. It leaves out bills that name a customer unless you ticked Merge Bills related to Customers, and it limits the operation to a salesman or a distributor if you chose one.
How groups form. The bills of one group are merged into one bill. A group is made of bills that match in all of the following:
- Type, branch and date.
- The user who created the bill. There is no option to merge bills of different users.
- Currency and exchange rate.
- Security level, unless you chose Merge with high security level.
- Every field of the first page that you left empty: client, warehouse, cash account, materials account, cost center, salesman and distributor.
What stays and what is deleted. One bill stays from each group that has more than one bill, and the program does not decide which of the group stays. The material lines and the discount and addition rows of the other bills move to it. Then the other bills are deleted, with their entries and the links that tie them to the document that generated them. The bill that stays keeps its number, so the numbers of the deleted bills leave gaps. Renumber bills closes them. A bill that found nothing to merge with is not changed.
What changes in the bill that stays.
- It takes the values you chose on the first page, and its statement is cleared.
- The program recalculates its totals, discount, addition and tax.
- The program regenerates its entry if its total is not zero.
- The program puts the bill's warehouse and cost center on the own lines of the bill that stays: the ones you chose, or the bill's own if you left the fields empty, even when a line had another warehouse. Lines that came from the deleted bills keep their warehouse and cost center.
- The options for discounts and additions and for merging quantities apply as described in Fields.
The log. If the program option Activate log file is on, the program adds a log record with the note " - Group Cash Bills" after the operation succeeds. It also writes a line for every bill of a merged group, the bill that stays included, with the type name, the bill number, the number of the bill that stays and the bill's date. These lines show only with the operation's log record. They show in the Log File, on the Maintenances Log page (Log File, Maintenances Log).
Example: on 5-7-2026 there are three cash bills of one type, by the same user, branch and currency, none with a customer: the first for 100.00, the second for 50.00, the third for 30.00. The three are merged with the optional fields left empty. One bill stays with a total of 180.00 and two bills are deleted, so the message "Bills Count That Have Been Collected 2" appears. The program counts the deleted bills, not the bill that stays.
Messages
| Message | Why it appears | What to do |
|---|---|---|
| Must specify at least one bill form | You clicked Start and no type is ticked in Invoices. | Tick at least one type. |
| Database is Opened By Users : … Please check that all users logged out then try again. | Another user is working on the file. The message lists their names. Then "An error was encountered while performing the operation." appears. | Ask them to leave, then click Start again. |
| Error In Stored Proc: … | The database refused the merge command. The message shows the command. Then "An error was encountered while performing the operation." appears. Every change is undone. | Try again. If it repeats, contact technical support and send the text of the message. |
| Bills Count That Have Been Collected … | The merge ended. The number is the count of deleted bills in the whole period, and it is 0 if no bill was merged. | Close the message. |
| Operation successfully completed | After the previous message. | Close the message. The program returns to Files Maintenance. |
| Are you sure you want to exit and cancel the maintenance operation? | You clicked Cancel. | Yes to leave before Start. After Start, Yes does not stop the operation (While it runs). No to continue. |
Related
- Merge cash bills
- Run files maintenance
- Files maintenance operations
- Merge bills by customer: another tool, which creates a new bill from the bills of a customer.
This page applies to alameen ERP 10, version 10.1.79.764.