Skip to main content

Copy Bills from Type to Type

This tool copies a set of bills from one bill form to another form, or to the same form. For each original bill it creates a new bill with its lines and data. It helps to turn delivery notes or quotations into bills, or to repeat a set of bills. The tool does the work when you click Ok, and afterwards shows the Copy Bills report.

For the practical steps see Copy bills from one type to another.

warning

The tool changes the file: it creates new bills, and it deletes the original bills if you tick Delete Copied Bills. There is no undo command. Back up the file before first use, and try one bill or a short period first. The tool creates the bills directly in the database, not through the bill window.

Opening the window​

  • From the ribbon: Invoices > Tools > Invoices Tools > Copy Bills from Type to Type. Open the menu of the Invoices Tools button and click the command.
  • The command appears if a file is open and your licence includes the extended reports.
  • The user needs the permission Copy Bills from Type to Type in Users Management, on the Reports page.
  • If the file has the replication system activated, the message "The tool cannot be used in a file that has the Replication system activated." appears and the window does not open.
  • If you have no Add permission on any form, the message "You don't have the authority to add bills" appears when the window opens. It appears again on Ok, and the program stops.
  • Forms that have approvals activated do not appear in either list (see Require approvals on a form).

Fields​

The window stays open after Ok. To keep your values open the system menu and choose Save as Default (see Save dialog values as default).

FieldDescriptionRequiredValues and rules
CustomerLimits the bills to one customer.NoA lookup box with the rules of lookup boxes. It is disabled if you choose Account.
AccountLimits the bills to the customers whose account is this account or one of its sub-accounts.NoA lookup box. It is disabled if you choose Customer.
Cost CenterLimits the bills to this cost center and its sub-centers.NoThe field shows only if your licence includes cost centers. Choosing a center enables the two cost center options in Report Options.
GroupLimits the copy to the materials of this group and its sub-groups.NoSee Limited materials.
WarehouseLimits the bills whose header warehouse is this warehouse or one of its sub-warehouses.NoA lookup box. Empty at first. The program does not check the warehouses of the lines.
Original Bills TypeThe form of the original bills.YesA list of the bill forms, the sales and purchase order forms and the opening inventory form. The first form is selected.
Copied Bills TypeThe form of the new bills.YesThe same list, with the forms you may add to. You can choose the same form as the original to repeat the bills.
Customers TermsA saved condition on customer cards that limits the customers.NoWithout at first. The box is explained in Materials terms and works the same way with customer conditions.
Materials TermsA saved condition on material cards that limits the copied materials.NoWithout at first. See Limited materials.
Invoice TermsA saved condition on bills that limits the bills.NoWithout at first.
Date from - toLimits the bills by date, both dates included.Yes, if you choose this buttonSelected each time you open the window. Default dates: from the start of the period if the program option "default start date is the start of the period" is on, otherwise from the first day of the current month, to today (or the end of the period if today is after it).
Bill Number from - toLimits the bills by number, both numbers included.Yes, if you choose this buttonThe date fields are disabled and the number fields enabled. Enter whole numbers.
Contain and Not contain (group Notes)Keeps the bills whose notes contain (or do not contain) the text.NoDo not type an apostrophe ' in them: it breaks the query.

Report options​

OptionWhat it doesDefault
Credit BillsCopies credit bills.Ticked
Cash BillsCopies cash bills.Not ticked
Delete Copied BillsDeletes the original bills after creating the new ones. The program asks you to confirm on Ok. It is disabled and unticked if the original form is a Saudi e-invoice form (a sale or sales return that generates an entry and is not a quotation) and the Saudi tax system is on.Not ticked
Cost Center Belongs to BillCopies the bills whose cost center is the chosen Cost Center or one of its sub-centers. Disabled unless you choose a cost center.Ticked
Cost Center Belongs to Bill ItemsCopies the bills that have this cost center on their lines, and those lines only. Disabled unless you choose a cost center.Not ticked
Post Bills that Automatically "Post to Warehouses"Posts the new bills to the warehouses if their form is set to Auto Post to Warehouses.Ticked
Process Bills with No CustomersIncludes the bills that have no customer. With this option Customers Terms no longer excludes any bill.Not ticked

One of Credit Bills and Cash Bills always stays ticked: if you clear both, the program ticks the item you clicked. If you choose a cost center and neither cost center option is ticked, the program ticks Cost Center Belongs to Bill.

Buttons​

ButtonWhat it does
OkChecks the conditions, then shows the bills for you to choose and does the copy as described in What happens after Ok. It does not close the window.
CancelCloses the window without a change.

What happens after Ok​

  1. If you ticked Delete Copied Bills, the program asks: "The original bills (Copied) will be deleted! Deletion can't be undone. Are you sure ?". Click Yes to continue, or No to stay in the window without doing anything.
  2. The program checks the conditions. The messages in Messages appear if something is missing, and for the customer and material conditions the messages of Materials terms.
  3. The program reads the bills without changing anything and shows the Bills to be Copied window.
  4. After Ok in that window: if you do not have the permission Re-Copy Bills, the message "You don't have the authority to copy previously copied bills" appears, and the program leaves out every chosen bill that was copied before. The message appears on every run for a user without the permission.
  5. If a chosen bill was copied before and its copy still exists, the Copied Bills window appears.
  6. The program does the copy as in What the tool copies. Then, for each new bill, it copies the payment terms and the custom fields from the original bill in a separate step after the main copy ends.
  7. It shows the Copy Bills report.

Bills to be Copied​

A list of the bills that matched the conditions. A bill whose security level is above your permission to browse its form does not appear. If no bill matched, the list is empty and nothing happens after Ok.

ColumnMeaning
Check box (no heading)Ticks the bill to copy. All bills are ticked when the window opens.
NumberThe bill number.
DateThe bill date.
Customer NameThe name of the bill customer (the Latin name when the interface is not Arabic).
Net invoice valueThe bill value after discounts, additions and taxes.
Value AddedThe tax value of the bill.
Maturity DateThe due date from the payment terms, for a credit bill whose form has payment terms.

The bills are ordered by customer name, then date, and you can sort them by clicking a column heading.

note

The program reads the ticks by the original order of the rows. Tick and untick before you change the order of the list by clicking a column heading, and check in the result report which bills were copied.

ButtonWhat it does
OkAccepts the ticked bills. If you ticked none, nothing happens.
CancelCloses the window without copying.

Copied Bills​

It appears when a chosen bill was copied before and its copy still exists. The text is "Some of the bills were previously copied. Do you want to copy them again?". Under it the list shows all the bills that matched your conditions and were copied before, even those whose tick you removed.

ColumnMeaning
Customer NameThe customer name, on the first row of the customer only.
BillThe number of the original bill, written with the form name of the earlier copy, a colon and the number.
Copied BillThe earlier copy, written with its form name, a colon and the number.
ButtonWhat it does
YesCopies the chosen bills again, if you have the permission Re-Copy Bills. The earlier copies stay as they are.
NoLeaves out every bill that was copied before and copies the rest.

The program treats a bill as copied before as long as its copy exists. If you delete the copy and keep the original, the original is copied again without this question.

What the tool copies​

The new bill​

Each ticked bill gives one new bill. Bills are not merged.

ItemWhat it gets
FormCopied Bills Type.
NumberContinues the last number of this form in the same branch. If the form has no bills in the branch, the new bills get numbers from 1 in the order they are created in the run.
DateThe date of the original bill, not today's date.
Customer and account, currency and rate, warehouse, branch, cost center, payment method, first payment, salesman, distributor and the extra text fieldsAs in the original bill.
NotesThe notes of the original bill, then with no space "(Bill Copied from" the original form name and number ")" in the program language. In English like "Urgent(Bill Copied from Delivery12)", in Arabic like "عاجل(فاتورة منسوخة من تسليم12)".
User and security levelThe user who ran the tool, and security level 1.
Payment terms and custom fieldsThe program copies them from the original bill after the main copy ends. If you delete the original in the same run, check that they reached the new bill.
Not carried overThe payment links.

The lines​

  • All the lines of the bill are copied as they are: material, quantity, unit, price, gifts, discount, addition, notes, second and third quantities, batch, production and expiry dates, dimensions, warehouse, cost center, currency and piece count. No line is repriced.
  • The bill discounts and additions (the discount grid) are copied as they are.
  • If the new form has no tax system and the original form has one, the program folds the tax into the prices of the lines that have tax and clears the tax column. Check the prices of the copied bills in this case before you rely on them.
  • The serial numbers on the lines of the original bill are copied to the new lines.
  • The program recalculates the totals of the new bill.
  • If the copied form is a sales order or purchase order, the program creates the order records of each new bill: its first state (the first state selected in the form), a follow-up row for each line, and the approvals of the users set in the form.

Limited materials​

With Group or Materials Terms only the lines of the matching materials are copied, and the bill discounts and additions are not. If you also tick Delete Copied Bills, the program deletes these lines from the original bills, deletes the whole original bill if no line is left, and regenerates the entries of the bills that keep some lines. The program has cancelled the posting of every original bill before this and does not post the bills that keep some lines again: post them from the bill window.

What happens to the original bills and entries​

CaseOriginal billsNew bill
Delete Copied Bills not tickedThey stay as they are, with their posting, entries and links.Created in addition to them.
Delete Copied Bills tickedThe program cancels their posting to the warehouses, then deletes them, with their lines, discount grid, links to other bills, serial number links and entry.Created before the deletion.
  • Entry: the program generates an entry for the new bill if its form is set to Generates Entry Automatically, with the accounts of the form.
  • Posting: with Post Bills that Automatically "Post to Warehouses" ticked and the new form set to Auto Post to Warehouses, the new bill is posted. Otherwise it is saved unposted, and you post it from the bill window.
  • Double effect: if you keep the original bills and both forms post to the warehouses or generate entries, the material quantities and the customer account count both bills. The same happens when you copy a bill to its own form.
  • Bills you may not delete: the program deletes an original bill if its security level does not exceed your delete permission on its form. A bill you may not delete stays, but the program has already cancelled its posting. The message "Some bills were not deleted because you don't have the authority to delete them" appears.
  • Payments: the program does not move payment links to the new bill. See Link payments to bills.
  • Undo: there is no undo command. To cancel a copy, delete the new bills in the bill window. If you kept the original bills they can be copied again. If you deleted them, the program cannot bring them back; only the backup can.
  • Log: if operations logging is on in the program options, the program writes a log record for each new bill and each deleted bill.

Example​

A "Delivery" bill number 12 dated 05-12-2026 for the customer "Ahmed", credit, with the notes "Urgent". It has rice 10 at 2.00 with a line discount 1.00, and sugar 5 at 3.00. The last number of the form "Sale" in the branch is 40. We copy it to "Sale" without deleting.

Original billNew bill
Form and numberDelivery 12Sale 41
Date05-12-202605-12-2026
NotesUrgentUrgent(Bill Copied from Delivery12)
Rice line10 × 2.00, discount 1.0010 × 2.00, discount 1.00
Sugar line5 × 3.005 × 3.00
Total34.0034.00

Total = 10 × 2.00 − 1.00 + 5 × 3.00 = 34.00. The original bill stays, so if both forms post, the quantities and the balance are counted twice.

Messages​

MessageWhy it appearsWhat to do
You don't have the authority to add billsNo form in the Copied Bills Type list has an add permission for you. It appears when the window opens and on Ok.Ask for an add permission on a form, or remove its approvals.
Must select "Between Dates" or select "from No. to No."You chose Bill Number from - to and both numbers are 0 or less.Enter a positive number in at least one field.
More thanYou chose Bill Number from - to and the first number is greater than the last. The message shows with this phrase alone.Correct the two numbers.
The original bills (Copied) will be deleted! Deletion can't be undone. Are you sure ?You ticked Delete Copied Bills and clicked Ok.Yes continues, No returns to the window.
You don't have the authority to copy previously copied billsYou do not have the permission Re-Copy Bills in Users Management > Operations.Ask for the permission, or accept that bills copied before are left out.
Some of the bills were previously copied. Do you want to copy them again?A chosen bill was copied before and its copy still exists.Yes copies them again, No leaves them out.
No bills were copiedThe copy produced no bill, for example because all chosen bills were copied before and you answered No.Check your conditions and your answers.
Some bills were not deleted because you don't have the authority to delete themThe file has a bill whose security level is above your delete permission. It appears after every run, even without Delete Copied Bills.Check the original bills in the report.

If the run ends with no report and no message, check the last number of the copied form before you try again, to see whether bills were created.

This page applies to alameen ERP 10, version 10.1.79.764.