Sales Contract Applet
Sets up a repeating customer commitment — a maintenance agreement, a subscription, a rental — as a contract folder initialised from a template, carrying the duration, the dates, the signable agreement and the recurring sales invoices that bill it. A folder posts nothing; each occurrence becomes a real sales invoice through the same backend job as Recurring Sales Invoice. Most contracts are created without opening this applet: finalising a sales document with a contract item line creates one folder per unit sold, which fails unless the item carries a sales contract template. Nothing expires a contract — its status is Active or Inactive, changed by hand.
Overview
The Sales Contract Applet is where a repeating customer commitment is set up and then billed: a maintenance agreement, a subscription, a rental. You build a sales contract template once, attach an agreement template (the document the customer signs, held as a mail-merge file), and then initialise a sales contract folder from that template for a particular customer. The folder carries the duration, the dates and the recurring sales invoices that bill it.
The applet is administrative in shape — the registry lists it as a TNT-ADMIN applet — and a lot of what happens around it happens in the backend rather than here. In particular, a finalised sales document whose line is a contract item creates folders and their recurring invoices automatically; see Lifecycle and effects.
Where it fits
| Applet | Why | |
|---|---|---|
| Bills through | Recurring Sales Invoice Applet | A folder holds recurring sales invoices and writes to the same recurring document tables |
| Becomes | Sales Invoice (Internal) | Each recurring occurrence is materialised as a real sales invoice by the backend job |
| Triggers it | Sales Invoice (Internal) | Finalising an invoice with a contract item line creates folders and recurring invoices automatically |
| Items | Item Maintenance | A contract item must carry a sales contract template on its item record, or the backend processor throws |
| Customers | Customer Maintenance | The party to the contract |
| Assets | Fixed Asset | A folder can be linked to a fixed asset |
Screens and menus
Open the applet from the Applet Store or its menu link, which lands on the folder listing. The bare applet address does not resolve — typed without the rest of the path, it shows a not-found page.
Three menu entries:
| Menu | What it is |
|---|---|
| SC Template | Sales contract templates — the reusable shape of a contract |
| Sales Contract Folder | The contracts themselves, one per customer commitment |
| Agreement Template | The signable document, held as a mail-merge file |
Settings has three entries: Application Settings, Default Selection, Printable Format Settings. The Settings area opens on the client-side permission listing, not on any of those three. Personalization lists Default Selection.
Sales Contract Folder
The folder container is a stack of nineteen view columns: listing, Initialize, folder edit, customer and member pickers, add agreement template, create recurring sales invoice, item and line-item screens, bin and batch listings, attachments, sales-invoice edit, and the address pickers.
The folder edit screen has seven tabs: Main Details, EKYC, Agreement, Attachmment (spelled that way on screen — the misspelling is the product’s), Recurring Sales Invoice, Gen Doc and Fixed Asset.
Sales Contract Template
Listing, create and edit, plus two sub-tabs on the edit screen — Sales Invoice Template and Agreement Template — and an item picker. The listing shows active templates only.
Agreement Template
Listing, create and edit. An agreement template is stored as a mail-merge header: a document number, a name, a URL key pointing at the file, and a type of either Google Docs or MS Docs. The applet holds the pointer; it does not hold the document.
Configuration
Before you can use it
- A sales contract template, or Initialize has nothing to offer.
- An agreement template, if the contract needs a signable document. It needs the document’s URL key and its type.
- Contract items linked to a template. For the automatic path (see Lifecycle and effects) the item record must carry a sales contract template, and that template must be linked to a generic-document template. Both are hard backend requirements; without them the background job fails — see Troubleshooting.
- A printable format filed under transaction type
SALES_CONTRACTif the contract is to be printed. - A customer — the folder’s Entity ID is required.
Applet settings
Where they live. Application Settings is the shared settings screen. Default Selection and Printable Format Settings are this applet’s own; Personalization’s Default Selection is per-login and says so on screen (“This will override Applet Default Settings”).
| Setting | What it controls | Default | Effect when changed |
|---|---|---|---|
DEFAULT_BRANCH | Pre-selects the branch, location and company on the recurring-invoice form when the invoice has none of its own | none — blank until set | Applied as the fallback when the form opens: an invoice that already carries a branch, location or company keeps it, and only the empty ones take the default. Picking a branch on this screen also stores that branch’s main location as the default location and its company as the default company, which you cannot see or change here |
salesManLabels | The labels the sales-agent control shows | none; no control anywhere in this applet sets it | Used on the folder and on the recurring-invoice form. It must be set outside this applet |
| Printable format default | The default format for a contract | unset | Formats are filed under transaction type SALES_CONTRACT and are Jasper JRXML only |
DEFAULT_BRANCH, DEFAULT_LOCATION and DEFAULT_COMPANY are fallbacks, not overrides. The
recurring-invoice form takes the invoice’s own company, branch and location when it has them and these
defaults only where it does not. Branch and Location stay required, so with no default set the person
entering the invoice picks both by hand every time.The settings model declares about fifty further INCLUDE_*, ENABLE_*, ENABLE_CUSTOM_STATUS_* and
HIDE_* keys. Twenty of the HIDE_* keys do something: each hides one column on the recurring-invoice
line editor — the unit-price, discount, quantity, UOM, tax and withholding-tax columns — and they are the
Field Settings toggles that matter for this applet. The rest are read by nothing here.
Document behaviour settings
There is no status-flow, posting, workflow or approval setting, because there is no posting and no workflow. The applet has no e-Invoice control of any kind.
Feature visibility / permissions
The applet contains one client-side permission check in total:
INTERNAL_SALES_INVOICE_DISPLAY_PRICING, which hides prices on the recurring-invoice line listing. Note that it is a sales-invoice key, not a
contract key.
Backend permissions:
| Family | Constants |
|---|---|
The contract document type (INTERNAL_SALES_CONTRACT) | TNT_API_DOC_INTERNAL_SALES_CONTRACT_CREATE_TGT_GUID, …_READ_…, …_UPDATE_…, …_DELETE_… |
| Sales contract template | API_TNT_DM_ERP_FI_SALES_CONTRACT_TEMPLATE_HDR_ OWNER / ADMIN / MEMBER / CREATE / UPDATE / DELETE / READ |
| Template attachments | API_TNT_DM_ERP_FI_SALES_CONTRACT_TEMPLATE_ATTACHMENT_HDR_ OWNER…READ |
| Contract folder | API_TNT_DM_ERP_FI_SALES_CONTRACT_FOLDER_HDR_ OWNER / ADMIN / MEMBER, plus CREATE and UPDATE which are branch- and location-scoped |
Creating or initialising a folder needs …_FOLDER_HDR_CREATE; saving one needs …_FOLDER_HDR_UPDATE.
Fields
Sales Contract Folder — Main Details
| Field | Meaning | Required | Notes |
|---|---|---|---|
| Template Code, Template Name | The template the folder was initialised from | System | Read-only on screen; populated from the template. Nothing on the server stops them being changed through the API — only the template link is checked |
| Contract No | The contract’s number | System | Read-only; server-assigned |
| Entity ID | The customer | Yes | Read-only; set from the Select Customer screen |
| Entity Name, Identity No., Email Address, Phone Number | Customer details | No | Read-only, copied from the customer record. E-mail is validated as an address but is not required |
| Identity Type | Customer identity type | No | Editable on screen, and never saved. The box is filled from the customer record each time the folder opens, and SAVE does not send it, so what you type is gone on reopening. Correct the identity type on the customer record instead |
| Unit | DAYS or MONTHS | Yes | Together with Contract Duration, how long the contract runs |
| EKYC Status | Result of the identity check | No | Read-only, on the EKYC tab. The check itself runs through a third-party identity-verification integration — what it does, its pass thresholds, and what has to be arranged before it will run at all are on Identity Verification and E-Signature |
Sales Contract Template
Create requires Sales Contract Template Number and Sales Contract Template Name. Status defaults to ACTIVE and ACTIVE is the only
option offered, on both create and edit — there is
no way to deactivate a template from this applet. Optional: EKYC required, EKYC validity period in months,
subscription duration with a Months/Days unit, fixed asset, remarks.
On the edit screen the template number and name are editable, so nothing on a template is immutable after save.
Agreement Template
| Field | Meaning | Required | Notes |
|---|---|---|---|
| URL Key | The key that locates the document file | Yes | The applet holds this pointer, not the file |
| Type | GOOGLE DOCS or MS DOCS | No | Defaults to Google Docs |
| Signature required | A mark carried onto every agreement PDF this template produces for a contract folder | No | Blank saves as no. It is a label only: nothing in this applet or the platform sends a signing request because of it, so collect signatures through your own process (the checkbox reads Signature Rquired on screen) |
| Status | ACTIVE or INACTIVE | No | Defaults to ACTIVE |
Lifecycle and effects
What the applet writes
- Contract folders. Initialize creates the folder directly from a template, with no sales order and no sales invoice created.
- Sales contract templates, agreement (mail-merge) templates, fixed-asset links and attachments.
- Recurring sales invoices — the Create Recurring Sales Invoice screen creates a recurring sales invoice tied to the folder. These are the same records the Recurring Sales Invoice Applet manages, and the same backend job materialises them.
The automatic path — where most contracts actually come from
When a sales invoice is finalised — from Sales Invoice (Internal) or through the API’s
update-posting-status route — a background job looks at each of its lines. It is queued only when the
finalised document is a sales invoice: a contract item sold on a cash bill, a sales order or any other
document creates nothing here. The job acts on an item line
whose item’s transaction type is SALES_CONTRACT, on a FINAL document, that it has not already
handled. For each such line it:
- Looks up the sales contract template on the item record — and fails with “Item not Connected to any Sales Contract Template…” if the item has none.
- Looks up the template’s link to a generic-document template — failing with “SALES_CONTRACT_TEMPLATE NOT LINKED TO ANY GENERIC_DOC_TEMPLATE…” if absent.
- Adjusts the start date by the link’s offset.
- Creates one folder per unit of quantity sold.
- Populates and creates the recurring sales invoice for each folder.
- Marks the line handled so it cannot recur.
So selling a contract item on an invoice is what normally creates the contract. Initialize is the manual alternative, and the controller says so.
The agreement PDF: what gets filled in, and what comes out blank
An agreement template is a Google document. The contract turns it into a PDF for the customer to sign. None of this shows on screen until the PDF appears on the folder’s Agreement tab, or fails to.
What happens behind the scene. After the automatic path creates the folders, BigLedger queues one merge for each folder. The merge covers every agreement template linked on the sales contract template’s Agreement Template tab. For each one it:
- Opens the document in Google Docs, using BigLedger’s own Google account.
- If the agreement template has fill-in fields, makes a copy named after the original plus the contract number. In the copy, every marker (the field’s code in double curly braces) is replaced with a value.
- Exports the result as a PDF and stores it on the folder. On the Agreement tab, Download saves it as "<contract number> - Agreement".
Sell three units of a maintenance-plan item and you get three folders, each with its own PDF.
What a fill-in field can take. The customer’s name, phone and e-mail from the customer record, the member’s card number, the company code and the branch code. The list also offers document numbers and billing and shipping address lines. Those always come out blank: the merge never loads the invoice they would come from.
Things to know before you rely on it:
- No screen sets up the fill-in fields. They exist only through the API. An agreement template without them is exported exactly as written, so the customer receives your template with its markers still in it.
- Only the automatic path makes a PDF. A folder created with Initialize gets no agreement. The folder’s own add-agreement-template screen saves nothing.
- The document must be one BigLedger’s Google account can open. Choosing MS DOCS as the type changes nothing: the merge always goes through Google Docs, and the stored PDF is marked as Google Docs.
- A failed merge tells nobody. It is written to the server log only, and the Agreement tab stays empty.
- An inactive agreement template is still merged while it is linked. To stop it, remove the link on the sales contract template’s Agreement Template tab.
- Values are taken once, when the folder is created. Correct the customer’s phone number afterwards and the PDF keeps the old one.
- Signature required is a note, not a process. It is stored with the PDF, and nothing in BigLedger collects a signature against it.
The job that stays with a person. Whoever sold the contract opens the new folder the same day and reads the PDF against the customer record: markers left in, blank address lines, the wrong name. If the tab is empty, or the PDF is not fit to send, prepare the agreement outside BigLedger from the same template and upload the signed copy on the folder’s attachments tab, which the screen spells Attachmment. Doing this every time is what makes it a check. Nothing else will notice.
Posting proof block
A contract folder posts nothing: no journal, no stock movement, no GL code to resolve, and no VOID.
INTERNAL_SALES_CONTRACT documents. It writes contract folders, templates and
recurring sales invoices. A sales-contract document type exists and is registered; the applet simply is
not the thing that creates it.What the applet cannot do
- No Final, Void, Discard, Close or Expire. None of those controls exists for a contract folder, and nothing enforces any status transition — only that a status is set.
- No Final on a recurring invoice from here either. There is no Final button.
Posting is done by the backend job, which sets the recurring row’s posting status to
POSTED. - Nothing expires a contract. No job, no scheduler and no validator reads the end date to change a status.
Related applets
- Recurring Sales Invoice Applet — the same recurring records, with the recurrence rule, the scope dialog and the series semantics documented in full.
- Sales Invoice (Internal) — both the trigger (a finalised contract-item line creates folders) and the destination (each recurring occurrence becomes an invoice there).
- Item Maintenance — where a contract item is linked to its sales contract template. Miss this and the backend processor throws.
- Customer Maintenance — the party to the contract.
- Fixed Asset — a folder can carry a fixed-asset link.
Troubleshooting
| Symptom | Cause | Fix |
|---|---|---|
| Opening the applet shows a 404 | The bare applet address has no default page | Use the registry’s link, which ends in /sales-contract. This is the path the applet store launches |
| “Item not Connected to any Sales Contract Template…” | A finalised invoice line is a contract item, but the item record has no sales contract template | Set the sales contract template on the item in Item Maintenance |
| “SALES_CONTRACT_TEMPLATE NOT LINKED TO ANY GENERIC_DOC_TEMPLATE…” | The template has no generic-document template link | Link the sales contract template to a generic-document template |
| The Agreement tab is empty, or the PDF still shows its markers or blank address lines | The folder came from Initialize, the merge failed without a message, the template has no fill-in fields, or the field asks for a document number or address, which always comes out blank | See The agreement PDF above. Prepare the agreement outside BigLedger and upload it on the Attachmment tab |
| The invoice finalised but no contract folder appeared | The background job is queued only for a sales invoice, and acts only on an item line whose item transaction type is SALES_CONTRACT, on a FINAL document, not already handled. Its errors are logged, not shown | Check the item’s transaction type and the line type; then ask an administrator for the job’s log |
| Default branch and location are ignored | The defaults fill only fields the invoice left empty; an invoice that already carried a branch or location keeps it | Select branch and location on the form |
| A template cannot be deactivated | The status picker offers only ACTIVE on both create and edit | There is no supported way to do it from this applet |
| DELETE on a contract folder happened with no confirmation | The folder’s delete button has no confirmation dialog, unlike the recurring-invoice delete, which does | Care. The toast on success reads “The sales contract folder has been deleted” |
| A failure toast says “undefined” | The failure message is lost on its way to the toast | Ignore the toast text; ask an administrator what the server returned |
| “The agreement template link has been deleted” after deleting a fixed-asset link | Wrong message on the right effect — the fixed-asset link delete raises the agreement-template toast | The fixed-asset link really was deleted |
| The Gen Doc tab is empty and cannot be filled | The tab is not connected to anything: it fetches nothing and its buttons do nothing | Nothing to do; the tab does not work |
| Closing the recurring-invoice scope dialog with the × throws an error | Closing with the × is not handled | Use Cancel rather than the × |
Related documentation
- POS and Sales module
- Identity Verification and E-Signature — what the EKYC tab does, and what the product does not do about signing or credit checks
- Recurring Sales Invoice Applet