Skip to content

From-Document Configuration ​

The from document (بناءً على) is the source document a new document is created from — for example a Sales Order that a Sales Invoice is built on. This tab of the Document Term controls how the origin's lines, quantities, and prices are copied and linked into the new document, how copied lines are collected and filtered, and which linked lines are locked from editing.

Where to find it

Open the document's Document Term (توجيه), then the From Document (بناءً على) tab.

The From Document tab of the Sales Invoice document term

Copying from the Source Document ​

These switches govern what is pulled from the origin document and how quantities and prices are carried over.

Consistency with from Doc termConfig.consistencyWithFromDoc — Controls how the new document's lines/quantities are validated against the origin: Ignore (no check), NetQuantities (totals must agree), or LinePerLine (each line matched against its origin line).

Copy details termConfig.copyDetailsOfFromDoc (default on) — When a from-document is selected, copy its detail lines into the new document. If disabled, only the header link is established and no lines are pulled in.

Consider Satisfied Qties In From Doc termConfig.considerSatisfiedQtiesInFromDoc — When copying remaining quantities from the origin, deduct quantities already satisfied (delivered/invoiced) by other related documents, so only the outstanding balance is brought over.

Consider Satisfied Qties In From Doc Fields termConfig.considerSatisfiedQtiesInFromDocFields — Selects which quantity-tracking fields are used when computing the "already satisfied" amount for the option above.

Do Not Copy Quantity With From Doc termConfig.doNotCopyQuantityWithFromDoc — Copy line data from the origin but leave the quantity blank rather than carrying the origin quantity over.

Copy Quantity To Field With From Doc termConfig.copyQuantityToFieldWithFromDoc — Instead of (or in addition to) the normal quantity field, copy the origin quantity into the specified target field id on the new line.

Make Qty Zero With From Doc termConfig.makeQtyZeroWithFromDoc — Copies lines from the origin but resets each copied line's quantity to zero, leaving the user to enter quantities manually.

Make Quantity One With Selection Of The Item That Has Line In FromDoc termConfig.makeQtyOneWithSelectionOfTheItemThatHasLineInFromDoc — When selecting an item that has a corresponding line in the from-document, default that line's quantity to 1 instead of copying the origin quantity.

Copy One Line Details Of FromDoc For Item Without Repeat termConfig.copyOneLineDetailsOfFromDocForItemWithoutRepeat — When an item appears on several origin lines, copy details from only one origin line for that item, avoiding duplicated lines.

Spread Selected Item Data When Item Of From Doc Added termConfig.spreadSelectedItemDataWhenItemOfFromDocAdded — When a from-document item is added to a line, auto-fill (spread) that line's item-related data (price, UOM, dimensions, etc.).

Spread Item Revision Lines termConfig.spreadItemRevisionLines — Explodes a single item line into one line per item revision when copying/adding.

Spread Item Colors And Sizes Lines termConfig.spreadItemColorAnsSizeLines — Explodes a single item line into one line per color/size combination.

Call Post Action Of Field After Spreading Revisions Or Sizes termConfig.callPostActionOfFieldAfterSpreadingRevisionsOrSizes — After spreading revision/color/size lines, run the post-action of the specified field id on the generated lines (e.g. to recalculate prices).

Copy Price From Parent Document With From Document termConfig.copyPriceFromParentDocWithFromDoc — Takes the unit price from the parent/origin document rather than recalculating it. Invoices only.

Extra From Doc Fields Copier termConfig.extraFromDocFieldsCopier — A free-text field map of additional sourceField=targetField pairs to copy from the origin document (header and detail) beyond the standard copied fields.

Prevent Fill Lot Id According To Expiry Date If Empty termConfig.preventFillLotIdAccordingToExpiryDateIfEmpty — Disables the default behavior of auto-deriving the lot/batch id from the expiry date when the lot field is empty.

Allow Creating Document From Expired Quotation termConfig.allowCreatingDocumentFromExpiredQuotation — By default a sales document created from a Sales Quotation must have its value date inside the quotation's Valid from / Valid to range, or the save is refused with Value date must be within the range of sales quotation valid from and valid to. Tick this on the new document's term to accept expired quotations. Sales documents only.

Consider Value Date From From Document In Pricing And Offers termConfig.considerValueDateFromFromDocInPricingAndOffers — When the document's prices are checked on save against price lists and offers, the From Document's value date is used instead of the document's own. An invoice dated after a price change, built on an order taken before it, is then checked at the order's prices. Sales documents only.

Allow Item Code And Name Without An Item termConfig.allowItemCodeAndNameWithoutAnItem — Permits typing a free item code/name on a line without selecting a registered item record.

Do Not Copy Contract Terms When Selected termConfig.doNotCopyContractTermsWhenSelected — When the origin is a contract, suppress copying the contract's terms/conditions into the new document. Contracting-material documents only.

Filtering Which Lines Are Collected ​

These options restrict which origin lines (and which from-documents) are brought into the new document.

Fetch Only Lines Matching Selected Item When Origin Document is Selected termConfig.fetchOnlyLinesMatchingItemFromOriginDoc — When an origin document is selected, copy only the origin lines whose item matches the item already on the current line, instead of all lines.

Show Only Items In OriginDoc Or FromDoc termConfig.showOnlyItemsInOriginDocOrFromDoc — Restricts the line item picker to only items present in the from-document / origin document.

Filter Lines With Same Warehouse From Doc Header termConfig.filterFromDocLinesByHeaderWarehouse — When pulling from-document lines, only bring lines whose warehouse equals the header warehouse of the current document.

Do Not Copy From Document Header Warehouse termConfig.doNotCopyFromDocHeaderWarehouse — When copying from origin, do not carry the origin's header warehouse into the new document header.

Filter From Doc By Supplier termConfig.filterFromDocBySupplier — Restricts the from-document lookup to origin documents matching the current document's supplier.

Filter From Doc By Customer termConfig.filterFromDocByCustomer — Restricts the from-document lookup to origin documents matching the current document's customer.

Do Not Empty Subsidiary With Choosing Supplier Or Customer termConfig.doNotEmptySubsidiaryWithSupplierOrCustomer — Prevents the subsidiary (ledger account) field from being cleared when a supplier/customer is selected.

Filter On Selected Items Only With From Doc termConfig.filterOnSelectedItemsOnlyWithFromDoc — When copying, only bring origin lines for the items already entered on the current document.

Show Only Orders With Unsatisfied Quantities In FromDoc termConfig.showOnlyOrdersWithUnsatisfiedQtyInFromDoc — Restricts the from-document / origin-document lookup to orders that still have an unsatisfied (outstanding) quantity, hiding fully-executed orders. When the lookup is triggered from a specific line, results are further narrowed to orders that have an outstanding quantity for that line's item.

The following options each restrict copying to origin lines whose accounting dimension matches the current document's dimension.

OptionField ID
Filter Lines With Same Analysis Set With From DoctermConfig.filterLinesWithSameAnalysisSetWithFromDoc
Filter Lines With Same Branch With FromDoctermConfig.filterLinesWithSameBranchWithFromDoc
Filter Lines With Same Department With From DoctermConfig.filterLinesWithSameDepartmentWithFromDoc
Filter Lines With Same Sector With From DoctermConfig.filterLinesWithSameSectorWithFromDoc

Collecting & Merging Similar Lines ​

The Collect Similar From Doc Lines (termConfig.collectSimilarFromDocLines) switch merges similar origin lines into one when copying. The options below — under termConfig.fromDocLinesCollectionOptions.* — control the "same line" comparison key: each enabled doNotConsider* flag removes that dimension from the key, so lines differing only in that dimension are merged together.

OptionField ID
Do Not Consider SizetermConfig.fromDocLinesCollectionOptions.doNotConsiderSize
Do Not Consider ColortermConfig.fromDocLinesCollectionOptions.doNotConsiderColor
Do Not Consider Revision IdtermConfig.fromDocLinesCollectionOptions.doNotConsiderRevisionId
Do Not Consider BoxtermConfig.fromDocLinesCollectionOptions.doNotConsiderBox
Do Not Consider Lot IdtermConfig.fromDocLinesCollectionOptions.doNotConsiderLotId
Do Not Consider Active PercentagetermConfig.fromDocLinesCollectionOptions.doNotConsiderActivePercent
Do Not Consider Inactive PercentagetermConfig.fromDocLinesCollectionOptions.doNotConsiderInActivePercent
Do Not Consider SubItemtermConfig.fromDocLinesCollectionOptions.doNotConsiderSubItem
Do Not Consider WarehousetermConfig.fromDocLinesCollectionOptions.doNotConsiderWarehouse
Do Not Consider MeasurestermConfig.fromDocLinesCollectionOptions.doNotConsiderMeasures
Do Not Consider SerialtermConfig.fromDocLinesCollectionOptions.doNotConsiderSerial
Do Not Consider LocatortermConfig.fromDocLinesCollectionOptions.doNotConsiderLocator

Copy Lines With The Same Customer Only With From Doc termConfig.copyLinesWithTheSameCustomerOnlyWithFromDoc — Sits in the same group. When the document has a customer, source lines that carry a different customer are not copied. Lines with no customer of their own are still copied.

Locking Linked Lines ​

The Prevent Editing Lines Linked To From Doc (termConfig.propertiesOfLinesLinkedToFromDoc.preventEditingLinesLinkedToFromDoc) master switch locks lines that are linked to a from-document against editing. The consider* flags below — under termConfig.propertiesOfLinesLinkedToFromDoc.* — select which dimensions are checked when identifying and locking those linked lines.

OptionField ID
Prevent Editing Lines Linked To From DoctermConfig.propertiesOfLinesLinkedToFromDoc.preventEditingLinesLinkedToFromDoc
Consider LottermConfig.propertiesOfLinesLinkedToFromDoc.considerLotId
Consider RevisiontermConfig.propertiesOfLinesLinkedToFromDoc.considerRevisionId
Consider Active PercentagetermConfig.propertiesOfLinesLinkedToFromDoc.considerActivePercentage
Consider Inactive PercentagetermConfig.propertiesOfLinesLinkedToFromDoc.considerInActivePercentage
Consider BoxtermConfig.propertiesOfLinesLinkedToFromDoc.considerBox
Consider ColortermConfig.propertiesOfLinesLinkedToFromDoc.considerColor
Consider SizetermConfig.propertiesOfLinesLinkedToFromDoc.considerSize
Consider LocatortermConfig.propertiesOfLinesLinkedToFromDoc.considerLocator
Consider MeasurestermConfig.propertiesOfLinesLinkedToFromDoc.considerMeasures
Consider SerialtermConfig.propertiesOfLinesLinkedToFromDoc.considerSerial
Consider WarehousetermConfig.propertiesOfLinesLinkedToFromDoc.considerWarehouse

Customer, Supplier and Overdraft ​

These two sit in the From Document group of most stock, sales and purchase terms.

Customer/supplier required termConfig.customerOrSupplierRequired — The document cannot be saved without a customer (sales side) or a supplier (purchase side). It is refused with Customer is required — «يجب عليك أدخال العميل», or on purchase invoices Supplier is required — «يجب عليك ادخال المورد». On a stock receipt or issue either party is enough. The check runs on stock receipts, stock issues and issue requests, sales and purchase invoices and returns, sales orders and proforma invoices, sales and purchase quotations and their requests, and sales replacements.

Prevent Overdraft termConfig.config.preventOverdraft — Checks every line of the term's documents for overdraft, even where the item, section, dimensions or global policy would allow it. It only tightens the check; turning it off never lets through a document the policy blocks. See Overdraft & Quantity Checking Configuration.

Sales Payments and Salesman ​

These options appear on sales invoices and the other sales documents that carry payment lines.

Copy Payment Methods termConfig.copyPaymentMethods — When the document is created from another sales document, that document's payment-method lines are copied too.

Copy To First Cash Line termConfig.copyToFirstCashLine — The first payment line whose payment method is a cash method takes whatever is left of the invoice value after the other payment lines, and follows it as lines or amounts change. When Paid Cash is filled on that line, the amount is capped at it. The Copy To First Cash Line action on the invoice does the same on demand.

Copy Sales Man To First Author termConfig.copySalesManToFirstAuthor — On save, the document's First Author is set to the user linked to the salesman's employee record, so the record counts as the salesman's own. Nothing changes when the salesman has no linked user.

Fields Not Copied ​

Do Not Copy Fields With From Doc termConfig.doNotCopyFieldsWithFromDoc (grid) — Lists specific fields that must NOT be copied from the origin document. Each row names one field (column fieldID, id termConfig.doNotCopyFieldsWithFromDoc.fieldID) to exclude when copying data from the from-document.

Creation Criteria ​

Criteria Definitions termConfig.criteriaDefinitions (grid) — Defines per-target-type copy rules: when a criteria matches, the named created type uses the given extra-fields copier.

ColumnField IDMeaning
Created TypetermConfig.criteriaDefinitions.createdTypeThe target document/entity type this rule applies to.
WhentermConfig.criteriaDefinitions.whenConditionThe criteria/condition under which this copy rule fires.
Copier Extra FieldstermConfig.criteriaDefinitions.copierExtraFieldsThe set of extra fields to copy when the rule matches.

Stock-Document Collection in Invoices ​

When an invoice or return auto-collects (links) stock documents, these options control which stock docs are gathered and how their lines are merged. They apply to the invoice/return family (Sales Invoice, Purchase Invoice, Sales/Purchase Returns, Sales Replacement, and their service-center variants).

Consider From Document When Collect Documents termConfig.considerFromDocWhenCollectDocs — Take the from-document link into account when collecting stock documents, so only stock docs tied to that origin are collected.

Consider Contact In Collecting Stock Documents Inside Invoices termConfig.considerContactInCollectingStockDocs — A stock doc only collects if its contact matches the invoice's contact.

Consider Subsidiary In Collecting Stock Documents Inside Invoices termConfig.considerSubsidiaryInCollectingStockDocs — Matches subsidiary (ledger account) when auto-collecting stock documents into the invoice.

Copy Stock Docs From Origin Doc termConfig.copyStockDocsFromOriginDoc — When a document is copied from an origin, also carry over the stock-document links attached to that origin.

Copy Pricing Qty From Stock Doc Field termConfig.copyPricingQtyFromStockDocField — Selects which numeric quantity field (N1/N2/N3) of the linked stock document supplies the pricing quantity used on the invoice line.

Mark Do Not Show In Stock Docs If All Items Type Are Service termConfig.markDoNotShowInStockDocsIfAllItemsService — When every line of the document is a service item, saving ticks the document's own Do Not Show In Stock Docs, so it no longer appears in the From Document picker of stock receipts and issues — there is nothing to receive or issue against it. Purchase invoices and sales returns.

The Stock Dock In Invoice Collection Options group (termConfig.stockDockInInvoiceCollectionOptions.*) governs how stock-document lines are merged and matched when collected into the invoice. The collectStockDocSimilarLines switch merges similar lines; each doNotConsider* flag drops that dimension from the similar-line key.

OptionField ID
Collect Stock Documents Similar LinestermConfig.stockDockInInvoiceCollectionOptions.collectStockDocSimilarLines
Do Not Consider SizetermConfig.stockDockInInvoiceCollectionOptions.doNotConsiderSize
Do Not Consider ColortermConfig.stockDockInInvoiceCollectionOptions.doNotConsiderColor
Do Not Consider Revision IdtermConfig.stockDockInInvoiceCollectionOptions.doNotConsiderRevisionId
Do Not Consider BoxtermConfig.stockDockInInvoiceCollectionOptions.doNotConsiderBox
Do Not Consider Lot IdtermConfig.stockDockInInvoiceCollectionOptions.doNotConsiderLotId
Do Not Consider Active PercentagetermConfig.stockDockInInvoiceCollectionOptions.doNotConsiderActivePercent
Do Not Consider Inactive PercentagetermConfig.stockDockInInvoiceCollectionOptions.doNotConsiderInActivePercent
Do Not Consider SubItemtermConfig.stockDockInInvoiceCollectionOptions.doNotConsiderSubItem
Do Not Consider WarehousetermConfig.stockDockInInvoiceCollectionOptions.doNotConsiderWarehouse
Do Not Consider MeasurestermConfig.stockDockInInvoiceCollectionOptions.doNotConsiderMeasures
Do Not Consider SerialtermConfig.stockDockInInvoiceCollectionOptions.doNotConsiderSerial
Do Not Consider LocatortermConfig.stockDockInInvoiceCollectionOptions.doNotConsiderLocator

The consider* flags add a reference or attribute back into the matching key, and a few behavioral toggles govern quantity matching and unlinking.

OptionField ID
Consider Reference 1termConfig.stockDockInInvoiceCollectionOptions.considerRef1
Consider Reference 2termConfig.stockDockInInvoiceCollectionOptions.considerRef2
Consider Reference 3termConfig.stockDockInInvoiceCollectionOptions.considerRef3
Consider DrivertermConfig.stockDockInInvoiceCollectionOptions.considerDriver
Consider Unit Price of Line or From DoctermConfig.stockDockInInvoiceCollectionOptions.considerUnitPriceOfLineOrFromParent
Invoice Quantity Must Match Stock Related Documents QuantitytermConfig.stockDockInInvoiceCollectionOptions.matchInvoiceQtyWithRelatedDocsQty
Automatically Unlink Manually-Linked Stock Documents When Deleting Those DocumentstermConfig.stockDockInInvoiceCollectionOptions.autoUnlinkManuallyLinkedStockDocsWithDelete

The Filter Stock Docs By family limits collected stock docs to those whose accounting dimension matches the invoice's.

OptionField ID
Filter By SectortermConfig.stockDockInInvoiceCollectionOptions.filterBySector
Filter By BranchtermConfig.stockDockInInvoiceCollectionOptions.filterByBranch
Filter By DepartmenttermConfig.stockDockInInvoiceCollectionOptions.filterByDepartment
Filter By Analysis SettermConfig.stockDockInInvoiceCollectionOptions.filterByAnalysisSet

Price Update on Apply ​

When the Apply button links stock documents to an invoice or return, these options control whether and how line prices are recalculated. They apply to the invoice/return family.

Don Not Update Price When Apply termConfig.donNotUpdatePriceWhenApply — When applying (linking) stock documents to the invoice, do not recalculate/update line prices.

Instantly Apply On Stock Doc Selection termConfig.instantlyApplyOnSIssuesSelection — Applies a stock issue/document to the invoice immediately upon selecting it, without a separate Apply step.

The Price Update With Apply Button Policy group (termConfig.priceUpdateDimensionsOnApply.*) determines which dimensions are considered when re-pricing lines on Apply.

OptionField ID
Consider BoxtermConfig.priceUpdateDimensionsOnApply.considerBox
Consider LottermConfig.priceUpdateDimensionsOnApply.considerLotId
Consider RevisiontermConfig.priceUpdateDimensionsOnApply.considerRevisionId
Consider SizetermConfig.priceUpdateDimensionsOnApply.considerSize
Consider ColortermConfig.priceUpdateDimensionsOnApply.considerColor
Consider Active PercentagetermConfig.priceUpdateDimensionsOnApply.considerActivePercentage
Consider Inactive PercentagetermConfig.priceUpdateDimensionsOnApply.considerInActivePercentage

Material-Issue Validation ​

These options apply when copying remaining quantities into material-issue documents (Contracting Material Issue and its request, plus manufacturing raw-material issues).

Copy Remaining Quantity Considering Previously Issued Quantity termConfig.copyRemainingQtyConsideringPreviouslyIssued — When copying remaining quantity from the origin, subtract quantities already issued on previous issue documents so only the truly remaining amount is brought over.

Do Not Save If Actual Quantity Greatr Than Planned Quantity termConfig.doNotSaveIfActualQtyGreatrThanTotalQty — Blocks save when the actual issued quantity exceeds the planned quantity on the analysis card.

Do Not Save If Actual Cost Greatr Than Planned Cost termConfig.doNotSaveIfActualCostGreatrThanTotalCost — Blocks save when the actual cost exceeds the planned cost on the analysis card.