Skip to content
Razor catalogue

On this page

@addTagHelper *, Webority.Ui.Razor

Net payable after TDS

Each line shows its operator, its working and its figure, so a figure on the page traces back to its inputs.

Bill less TDS
  1. Bill amount₹10,00,000.00
  2. minus TDS0.1% of ₹10,00,000.00, rounded to the rupee₹1,000.00
  3. equals Net payable₹9,99,000.00
Show code
<app-formula-steps>
    <app-formula-step label="Bill amount" result="₹10,00,000.00" />
    <app-formula-step sign="AppFormulaSign.Minus" label="TDS" result="₹1,000.00">0.1% of ₹10,00,000.00, rounded to the rupee</app-formula-step>
    <app-formula-step sign="AppFormulaSign.Equal" label="Net payable" result="₹9,99,000.00" />
</app-formula-steps>

With notes

A note sits beside its line, for the rule that explains where the figure came from.

A note on the TDS line
  1. Bill amount₹10,00,000.00
  2. minus TDS0.1% of ₹10,00,000.00, rounded to the rupee₹1,000.00Section 194Q
  3. equals Net payable₹9,99,000.00
Show code
<app-formula-steps>
    <app-formula-step label="Bill amount" result="₹10,00,000.00" />
    <app-formula-step sign="AppFormulaSign.Minus" label="TDS" result="₹1,000.00" note="Section 194Q">0.1% of ₹10,00,000.00, rounded to the rupee</app-formula-step>
    <app-formula-step sign="AppFormulaSign.Equal" label="Net payable" result="₹9,99,000.00" />
</app-formula-steps>

Times and divide

An equals line becomes the figure the next operator works on, so a chain of operations reads top to bottom.

Cases to packs
  1. Cases12
  2. times Units per case24
  3. equals Units288
  4. divided by Units per pack6
  5. equals Packs48
Show code
<app-formula-steps>
    <app-formula-step label="Cases" result="12" />
    <app-formula-step sign="AppFormulaSign.Times" label="Units per case" result="24" />
    <app-formula-step sign="AppFormulaSign.Equal" label="Units" result="288" />
    <app-formula-step sign="AppFormulaSign.Divide" label="Units per pack" result="6" />
    <app-formula-step sign="AppFormulaSign.Equal" label="Packs" result="48" />
</app-formula-steps>

Other languages

The words the list speaks are props, so the labels follow the page's language.

Label overrides
  1. Cases12
  2. add Spare cases3
  3. gives Total cases15
  4. less Damaged cases2
  5. gives Cases to ship13
Show code
<app-formula-steps label="Working" plus-label="add" minus-label="less" equal-label="gives">
    <app-formula-step label="Cases" result="12" />
    <app-formula-step sign="AppFormulaSign.Plus" label="Spare cases" result="3" />
    <app-formula-step sign="AppFormulaSign.Equal" label="Total cases" result="15" />
    <app-formula-step sign="AppFormulaSign.Minus" label="Damaged cases" result="2" />
    <app-formula-step sign="AppFormulaSign.Equal" label="Cases to ship" result="13" />
</app-formula-steps>

Guidance

What to do, and what to avoid.

Use it when

  • Show how a figure on the page is reached, line by line, with the real numbers.
  • The server computes the figure and the page only shows it: the lines display that result, and the page does no arithmetic of its own.

Reach for something else when

  • The figures are many rows the user scans, sorts or edits. → AppDataTable
  • The figures are a trend or a comparison shown as a picture. → AppChart
  • The figure is a single value with no working to show. → a plain value in the page text

End with the result line

Do
  1. Bill amount₹10,00,000.00
  2. minus TDS₹1,000.00
  3. equals Net payable₹9,99,000.00

Give each line the amount it stands for, and end with one equal line for the result.

Avoid
  1. Bill amount₹10,00,000.00
  2. minus TDS₹1,000.00

A list of amounts with no equal line leaves the reader to add them up and find the total.

Reference

Try every prop, read the full list, and check keyboard and screen reader behaviour.

  1. Bill amount₹10,00,000.00
  2. minus TDS0.1% of ₹10,00,000.00, rounded to the rupee₹1,000.00
  3. equals Net payable₹9,99,000.00
React, generated from the controls
<AppFormulaSteps
  steps={steps}
  label="Calculation"
/>
Razor, the same props
<app-formula-steps>
    <app-formula-step label="Bill amount" result="₹10,00,000.00" />
    <app-formula-step sign="AppFormulaSign.Minus" label="TDS" result="₹1,000.00">0.1% of ₹10,00,000.00, rounded to the rupee</app-formula-step>
    <app-formula-step sign="AppFormulaSign.Equal" label="Net payable" result="₹9,99,000.00" />
</app-formula-steps>

12 props. The 4 most used come first.

Used on most screens 4 props

PropTypeDefaultDescription
labeldefault Calculation string Calculation The accessible name of the list.
plus-labeldefault plus string plus The word a screen reader says for the plus operator.
minus-labeldefault minus string minus The word a screen reader says for the minus operator.
equal-labeldefault equals string equals The word a screen reader says for the equals operator.

Less common 8 props

PropTypeDefaultDescription
(app-formula-step) signdefault - plus | minus | times | divide | equal - The operator before this line. Equals marks a result line; a line with no sign keeps its column empty.
(app-formula-step) labeldefault - string - The name of the line: what the figure is.
(app-formula-step) resultdefault - string - The line's figure, already formatted.
(app-formula-step) notedefault - string - A short note beside the line, such as the section of a rule.
(app-formula-step) child contentdefault - text - The working in words and numbers, such as 0.1% of the bill, rounded to the rupee.
times-labeldefault times string times The word a screen reader says for the times operator.
divide-labeldefault divided by string divided by The word a screen reader says for the divide operator.
classdefault - string - Extra class names added to the list's root element.

Screen reader

3 notes
  • The lines are an ordered list with an accessible name, so a screen reader announces the count and reads each line in order.
  • A screen reader reads each operator as its word, such as minus or times, taken from the sign-word props.
  • Each operator glyph is hidden from assistive tech, so the symbol itself is never read out.

Do and avoid

1 pairs

End with the result line

Do
  1. Bill amount₹10,00,000.00
  2. minus TDS₹1,000.00
  3. equals Net payable₹9,99,000.00

Give each line the amount it stands for, and end with one equal line for the result.

Avoid
  1. Bill amount₹10,00,000.00
  2. minus TDS₹1,000.00

A list of amounts with no equal line leaves the reader to add them up and find the total.