A contract is fields
Worth watching first:
- What lies under the page · Documents: structure and assembly
As text
The same as the films: every shot and its text. You can copy the text and give it to your own assistant along with your question.
A contract is fields
A new contract, invoice or power of attorney is rarely written from scratch: you take the previous document, save a copy and replace the names, amounts and dates in it. Somewhere an old amount stays behind, and the total in figures stops matching the total in words. These errors share one cause: the document's data is mixed in with its text. A supply contract shows how to separate the two and which errors disappear once you do.
In a supply contract of several pages, little changes from deal to deal: the party's name, its code, the quantity, the price, the date, the term and the bank account. These are data, the values that describe this particular deal. The rest is text: the wording of clauses that a lawyer agreed once and that moves from contract to contract unchanged. On the page you cannot tell one from the other, because both are printed the same way.
To separate data from text, each value is moved into a field of its own. A field is a named cell for one value: the name “price per tonne” and the value itself, 12,400.00. By its name the value can be found and inserted without rereading the text. It is stored in one place, so the party's name, which appears both at the top of the contract and by the signature, is corrected once, and the pages never disagree.
Each field also has a type, a mark that says what it holds: text, a number, money or a date. From the type the program knows what can be done with the value: numbers can be multiplied, days can be added to a date. It also knows what the field cannot hold, so it rejects 31 April or a seven-digit code as soon as they are entered. In running text only a careful reader would notice such an error.
Where the values were taken out, the text keeps blanks, each labeled with the name of its field. Fixed text with named blanks is called a template. It means the wording is not retyped or edited every time: it is agreed once, and after that nobody touches it. So replacing the price can no longer accidentally delete a word in the liability clause, and nothing from the previous contract stays in the new one.
Fields differ too, and what sets them apart is where the value comes from. A person enters a variable field for each deal: the party, the price, the term. Nobody enters a derived field: it is computed from other fields, like the sum or the VAT. Two more kinds concern the text: fixed text, the same in every contract, and an option, a choice among several ready wordings, such as prepayment or payment after delivery.
Of the four kinds, the derived field matters most for errors: it stores no value of its own and is computed from other fields every time. A quantity of 15 times a price of 12,400.00 gives 186,000.00. VAT at 20% of that sum is 37,200.00, and the total comes to 223,200.00. The program writes the amount in words from the same number, so words and figures cannot diverge, and if the price changes, the whole chain is recalculated.
Without derived fields a person types the same chain, and it holds only as long as they stay attentive. The sum line shows 168,000.00 instead of 186,000.00 because two digits swapped places. In the amount in words the person left out the word “three”, so the words say 220,200 and the figures 223,200. The page looks neat, and in reading such mismatches mostly go unnoticed. When a program computes the numbers, this kind of error has nowhere to come from.
The program assembles the finished contract: it takes the template, puts into each blank the value of the field with the same name and computes the derived fields itself. For Zerno-Treid that is 15 tonnes at 12,400.00 and a total of 223,200.00. The person fills in a card of seven fields and checks that card, instead of rereading several pages to find what changed.
One template yields as many contracts as there are sets of fields: here three, for three different deals. The text is the same in all of them, and the program computes each total from that contract's own quantity and price. When the wording has to change, it is changed in the template, and every later contract comes out with the new wording. The exercise for this part asks you to sort ten fragments of one contract by kind of field.
Next
- Who catches the error · Contract as data