Skip to content

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.

A sales contract folder has two statuses: ACTIVE and INACTIVE. There is no Draft, Under Review, Pending, Expired or Terminated state, no Final, Void, Discard or Close control, and nothing expires a contract automatically. The status is a free-text column the applet renders as a two-value picker; the backend’s only rule about it is that it must not be null. Any workflow beyond that is something a business runs by hand.

Where it fits

AppletWhy
Bills throughRecurring Sales Invoice AppletA folder holds recurring sales invoices and writes to the same recurring document tables
BecomesSales Invoice (Internal)Each recurring occurrence is materialised as a real sales invoice by the backend job
Triggers itSales Invoice (Internal)Finalising an invoice with a contract item line creates folders and recurring invoices automatically
ItemsItem MaintenanceA contract item must carry a sales contract template on its item record, or the backend processor throws
CustomersCustomer MaintenanceThe party to the contract
AssetsFixed AssetA 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:

MenuWhat it is
SC TemplateSales contract templates — the reusable shape of a contract
Sales Contract FolderThe contracts themselves, one per customer commitment
Agreement TemplateThe 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.

There is no “create a contract” form. The create screen is Initialize, and it has exactly one input: a sales contract template. The folder is created from that template by the backend, and everything else is filled in afterwards on the edit screen.

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_CONTRACT if 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”).

SettingWhat it controlsDefaultEffect when changed
DEFAULT_BRANCHPre-selects the branch, location and company on the recurring-invoice form when the invoice has none of its ownnone — blank until setApplied 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
salesManLabelsThe labels the sales-agent control showsnone; no control anywhere in this applet sets itUsed on the folder and on the recurring-invoice form. It must be set outside this applet
Printable format defaultThe default format for a contractunsetFormats 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:

FamilyConstants
The contract document type (INTERNAL_SALES_CONTRACT)TNT_API_DOC_INTERNAL_SALES_CONTRACT_CREATE_TGT_GUID, …_READ_…, …_UPDATE_…, …_DELETE_…
Sales contract templateAPI_TNT_DM_ERP_FI_SALES_CONTRACT_TEMPLATE_HDR_ OWNER / ADMIN / MEMBER / CREATE / UPDATE / DELETE / READ
Template attachmentsAPI_TNT_DM_ERP_FI_SALES_CONTRACT_TEMPLATE_ATTACHMENT_HDR_ OWNER…READ
Contract folderAPI_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

FieldMeaningRequiredNotes
Template Code, Template NameThe template the folder was initialised fromSystemRead-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 NoThe contract’s numberSystemRead-only; server-assigned
Entity IDThe customerYesRead-only; set from the Select Customer screen
Entity Name, Identity No., Email Address, Phone NumberCustomer detailsNoRead-only, copied from the customer record. E-mail is validated as an address but is not required
Identity TypeCustomer identity typeNoEditable 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
UnitDAYS or MONTHSYesTogether with Contract Duration, how long the contract runs
EKYC StatusResult of the identity checkNoRead-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

FieldMeaningRequiredNotes
URL KeyThe key that locates the document fileYesThe applet holds this pointer, not the file
TypeGOOGLE DOCS or MS DOCSNoDefaults to Google Docs
Signature requiredA mark carried onto every agreement PDF this template produces for a contract folderNoBlank 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)
StatusACTIVE or INACTIVENoDefaults 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:

  1. 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.
  2. 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.
  3. Adjusts the start date by the link’s offset.
  4. Creates one folder per unit of quantity sold.
  5. Populates and creates the recurring sales invoice for each folder.
  6. 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:

  1. Opens the document in Google Docs, using BigLedger’s own Google account.
  2. 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.
  3. 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.

This applet does not write 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

SymptomCauseFix
Opening the applet shows a 404The bare applet address has no default pageUse 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 templateSet 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 linkLink the sales contract template to a generic-document template
The Agreement tab is empty, or the PDF still shows its markers or blank address linesThe 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 blankSee The agreement PDF above. Prepare the agreement outside BigLedger and upload it on the Attachmment tab
The invoice finalised but no contract folder appearedThe 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 shownCheck the item’s transaction type and the line type; then ask an administrator for the job’s log
Default branch and location are ignoredThe defaults fill only fields the invoice left empty; an invoice that already carried a branch or location keeps itSelect branch and location on the form
A template cannot be deactivatedThe status picker offers only ACTIVE on both create and editThere is no supported way to do it from this applet
DELETE on a contract folder happened with no confirmationThe folder’s delete button has no confirmation dialog, unlike the recurring-invoice delete, which doesCare. 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 toastIgnore the toast text; ask an administrator what the server returned
“The agreement template link has been deleted” after deleting a fixed-asset linkWrong message on the right effect — the fixed-asset link delete raises the agreement-template toastThe fixed-asset link really was deleted
The Gen Doc tab is empty and cannot be filledThe tab is not connected to anything: it fetches nothing and its buttons do nothingNothing to do; the tab does not work
Closing the recurring-invoice scope dialog with the × throws an errorClosing with the × is not handledUse Cancel rather than the ×

Related documentation

Last updated on