User Manual
Go to AdmCloud
Available in All plans
Customization

HTML Variables for Printing Formats

This screen is a reference: for every AdmCloud document type (invoices, orders, receptions, work orders, etc.) it lists the data (@Model.Property) you can use when writing the code of an HTML Printing Format for that document: its exact name, a description and its data type. It isn't a screen where documents are entered or edited; it's a lookup guide for anyone designing or fine-tuning a custom printing format.

Module: Customization Opened from the "Document Printing Formats" link on the screen itself, or by going directly to /PFDocumentation

What is it and what is it for?

When you write an HTML Printing Format, your HTML is combined with Razor expressions (for example @Model.Header.Number or @Model.Relationship.Name) that AdmCloud replaces with the document's real data at print time. But the exact set of properties available on Model changes depending on the document type you're formatting: a Credit Invoice doesn't have the same properties as a Work Order or a Location Transfer.

This screen solves exactly that: it's a catalog, document by document, of which properties exist, what they represent and what type they are (text, date, a related AdmCloud record such as SA_Relationships, or a list such as List SA_Trans_Items). When the data type is an AdmCloud record or object, the link in that column takes you to the Data Dictionary for that table, where you can see its own fields in turn.

ℹ️

It's the same content shown on the Data Dictionary tab inside the HTML Printing Formats editor when that tab is enabled for your account: here you can browse it independently, by document, without needing to have a format open for editing.

How to use it

  1. Go to HTML Variables (address /PFDocumentation). You'll see the list of every document type available to format.
  2. Pick the document you're working on for your HTML Printing Format (for example, Credit Invoice or Sales Order).
  3. In that page's table, look up the field you need by its Field Name; the Description column tells you what it represents and the Data Type column tells you whether it's text, a date, a number, or a related object/list.
  4. If the data type links to a table (for example SA_Relationships or List SA_Trans_Items), follow the link to open the Data Dictionary for that table and see the inner fields available inside that property (for example, Header.Items.Item.Description inside an invoice's lines).
  5. Use the exact field name, as it appears in the table, preceded by Model., inside the code of your HTML Printing Format.

Data structure: common to every document

Every document type shares the same base group of properties, whether you're formatting an invoice, a reception or a work order:

Field What it's for Data type
RelationshipThe customer, vendor or contact on the document.SA_Relationships
LogoYour company's logo, as configured in the system.SA_Files
AddressThe customer/vendor address linked to the document.SA_Relationships_Addresses
Division / DepartmentThe document's division and department, if your company uses them.GL_Divisions / SA_Departments
ItemClassThe item's classification, available inside the document's lines.IC_ItemClasses
BarCodeBathThe document's barcode, for printing next to the document number.Text
CurrentUserName / CreatedByThe user currently printing the document, and who originally created it.Text
CompanyInfoYour company's data (legal name, tax ID, address, phone numbers, etc.)._CompanyInfo
HeaderThe transaction's full header (number, date, totals, currency, etc.).SA_Transactions
Header.ItemsThe document's lines (items or services), to loop over in your template.List of SA_Trans_Items
Header.Items.ItemThe item or service on each line, with its own data (code, description, unit, etc.).IC_Items
LocationThe location/warehouse linked to the document.SA_Locations
CaptionThe document type's display name (for example, "Credit Invoice"), useful for generic titles.Text
BankAccountNameThe name of the document's bank or cash account, when it applies.Text

On top of that base, each document type adds its own particular fields. For example, sales documents commonly include Terms (payment terms), SalesRep, Taxes (tax summary) or FiscalSequenceType (fiscal receipt type); purchasing and inventory documents include fields such as PO_Items (items from the related purchase order) or Prices (price levels); and Sales Orders also include Stock, with the item's available inventory at print time. The exact detail for each document always lives on its own page within this reference.

Documents covered in this reference

Document What it's used for
Credit Invoice / Cash InvoiceSales invoiced on credit terms or in cash, with payment terms, sales rep, taxes and shipment method.
Cash ReceiptCollections received from customers and the documents they were applied to.
Cash ReturnMerchandise returns with a cash refund.
Vendor Credit Note / Vendor PrepaymentCredits received from vendors and advances paid on account of purchases.
Quote / Quote RequestPrice proposals sent to a customer and budget requests received.
Sales Order / Customer Return RequestSales orders pending invoicing and merchandise return requests.
Purchase OrderPurchase orders sent to a vendor.
Reception / Vendor Reception / Reception LiquidationIncoming merchandise from a purchase and its fiscal or cost liquidation.
Location Transfer / Location Transfer SettlementInventory movements between locations or warehouses.
DispatchMerchandise delivery or shipment linked to a sales document.
Maintenance Order / Work OrderMaintenance work on fixed assets or general work orders.
Service OrderCustomer service jobs.
Promotion InvoiceSales invoices with promotional items or terms.
Account StatementA customer's or vendor's movements and outstanding balance as of a given date.

Besides these documents, the reference includes two supporting pages: BaseModel, detailing the common fields described above, and GenericModel, with the generic fields reusable in any template regardless of the document.

Tips and common mistakes

💡

Not sure a field exists for your document? Check that document's specific page first; if you can't find it there, check the BaseModel and GenericModel tables, since those are shared by every document type.

⚠️

The field name must be typed exactly as it appears in the table (including capitalization) and always preceded by Model.; a misspelled name causes a compile error when previewing or printing the format.

ℹ️

When a field is a list (like Header.Items) or an object with its own fields (like Header or Relationship), follow its Data Type link to the Data Dictionary to see which inner properties you can use, for example Header.Items.Item.Description or Relationship.Name.