CalculatorModSpain
extends CalculatorModClass
in package
This class implements the CalculatorModInterface for Spain.
Tags
Table of Contents
Constants
Methods
- accumulateSubtotals() : string
- apply() : string
- calculate() : string
- calculateLine() : string
- clear() : string
- save() : string
- updateSubtotals() : string
- applyOperation() : bool
- applyTravel() : bool
- applyUsedGoods() : bool
- done() : string
- isSpanishCompany() : bool
- stopAll() : string
- stopMods() : string
Constants
CONTINUE
public
mixed
CONTINUE
= 'continue'
STOP_ALL
public
mixed
STOP_ALL
= 'stop-all'
STOP_MODS
public
mixed
STOP_MODS
= 'stop-mods'
Methods
accumulateSubtotals()
public
accumulateSubtotals(array<string|int, mixed> &$subtotals, BusinessDocument $doc, array<string|int, mixed> &$lines) : string
Parameters
- $subtotals : array<string|int, mixed>
- $doc : BusinessDocument
- $lines : array<string|int, mixed>
Return values
stringapply()
public
apply(BusinessDocument $doc, array<string|int, mixed> &$lines) : string
Parameters
- $doc : BusinessDocument
- $lines : array<string|int, mixed>
Return values
stringcalculate()
public
calculate(BusinessDocument $doc, array<string|int, mixed> &$lines) : string
Parameters
- $doc : BusinessDocument
- $lines : array<string|int, mixed>
Return values
stringcalculateLine()
public
calculateLine(BusinessDocument $doc, BusinessDocumentLine $line) : string
Parameters
- $doc : BusinessDocument
- $line : BusinessDocumentLine
Return values
stringclear()
public
clear(BusinessDocument $doc, array<string|int, mixed> &$lines) : string
Parameters
- $doc : BusinessDocument
- $lines : array<string|int, mixed>
Return values
stringsave()
public
save(BusinessDocument $doc, array<string|int, mixed> &$lines) : string
Parameters
- $doc : BusinessDocument
- $lines : array<string|int, mixed>
Return values
stringupdateSubtotals()
public
updateSubtotals(array<string|int, mixed> &$subtotals, BusinessDocument $doc, array<string|int, mixed> $lines) : string
Parameters
- $subtotals : array<string|int, mixed>
- $doc : BusinessDocument
- $lines : array<string|int, mixed>
Return values
stringapplyOperation()
protected
static applyOperation(BusinessDocument $doc, BusinessDocumentLine $line) : bool
Parameters
- $doc : BusinessDocument
- $line : BusinessDocumentLine
Return values
boolapplyTravel()
protected
static applyTravel(array<string|int, mixed> &$subtotals, BusinessDocument $doc, BusinessDocumentLine $line, string $ivaKey, float $pvpTotal, float $totalCoste) : bool
Parameters
- $subtotals : array<string|int, mixed>
- $doc : BusinessDocument
- $line : BusinessDocumentLine
- $ivaKey : string
- $pvpTotal : float
- $totalCoste : float
Return values
boolapplyUsedGoods()
protected
static applyUsedGoods(array<string|int, mixed> &$subtotals, BusinessDocument $doc, BusinessDocumentLine $line, string $ivaKey, float $pvpTotal, float $totalCoste) : bool
Parameters
- $subtotals : array<string|int, mixed>
- $doc : BusinessDocument
- $line : BusinessDocumentLine
- $ivaKey : string
- $pvpTotal : float
- $totalCoste : float
Return values
booldone()
protected
done() : string
Return values
stringisSpanishCompany()
protected
static isSpanishCompany(BusinessDocument $doc) : bool
Parameters
- $doc : BusinessDocument
Return values
boolstopAll()
protected
stopAll() : string
Return values
stringstopMods()
protected
stopMods() : string