Taxed

world.money.Taxed
See theTaxed companion class
object Taxed

Single-rate fast paths and accessors for Taxed.

Attributes

Companion
class
Graph
Supertypes
trait Product
trait Mirror
class Object
trait Matchable
class Any
Self type
Taxed.type

Members list

Type members

Inherited and Abstract types

type MirroredElemLabels <: Tuple

The names of the product elements.

The names of the product elements.

Attributes

Inherited from:
Mirror
type MirroredLabel <: String

The name of the type.

The name of the type.

Attributes

Inherited from:
Mirror

Value members

Concrete methods

def allocate[C <: Currency & Singleton](t: Taxed[C], weights: Seq[Ratio]): Either[Unallocatable, Vector[Taxed[C]]]

Splits the recorded document by weights, per component.

Splits the recorded document by weights, per component.

Attributes

def apply[C <: Currency & Singleton](t: Taxed[C], label: String): Option[Money[C]]

One component's charged amount, by its declared label.

One component's charged amount, by its declared label.

Attributes

def exclusive[C <: Currency & Singleton](amount: Money[C], rate: Percent, mode: Rounding)(using ValueOf[C]): Taxed[C]

Tax-exclusive single-rate pricing, the dominant till case: one unlabelled component.

Tax-exclusive single-rate pricing, the dominant till case: one unlabelled component.

Attributes

def inclusive[C <: Currency & Singleton](amount: Money[C], rate: Percent, mode: Rounding)(using ValueOf[C]): Either[Undefined, Taxed[C]]

Tax-inclusive single-rate pricing: the net extracted at this boundary, the tax the exact complement.

Tax-inclusive single-rate pricing: the net extracted at this boundary, the tax the exact complement.

Attributes

def split[C <: Currency & Singleton](t: Taxed[C], parts: Int): Either[Unallocatable, Vector[Taxed[C]]]

Equal parts of the recorded document.

Equal parts of the recorded document.

Attributes

Givens

Givens

given given_CanEqual_Taxed_Taxed: [C <: Currency & Singleton] => CanEqual[Taxed[C], Taxed[C]]

Extensions

Extensions

extension [C <: Currency & Singleton](t: Taxed[C])
def allocate(weights: Seq[Ratio]): Either[Unallocatable, Vector[Taxed[C]]]

Splits the recorded document by weights, for a partial refund or a credit note covering part of a line. Every recorded amount allocates independently, so the parts sum back to the whole per component. Recomputing tax on a partial amount could miss the recorded document by a rounding unit; this cannot.

Splits the recorded document by weights, for a partial refund or a credit note covering part of a line. Every recorded amount allocates independently, so the parts sum back to the whole per component. Recomputing tax on a partial amount could miss the recorded document by a rounding unit; this cannot.

Attributes

def apply(label: String): Option[Money[C]]
def gross: Money[C]
def payable: Money[C]

What the payer actually pays: gross minus every withheld amount.

What the payer actually pays: gross minus every withheld amount.

Attributes

def split(parts: Int): Either[Unallocatable, Vector[Taxed[C]]]

Equal parts of the recorded document; the two-way split of a half-returned line.

Equal parts of the recorded document; the two-way split of a half-returned line.

Attributes

def tax: Money[C]

The tax total across components.

The tax total across components.

Attributes

def unary_-: Taxed[C]