BusinessDocumentFormTools extends BusinessDocumentFormTools
Class created by Core/Base/PluginManager
Table of Contents
$commissionTools | CommissionTools | |
---|---|---|
$taxZones | \FacturaScripts\Dinamic\Model\ImpuestoZona[] | |
$recargo | bool | |
$siniva | bool | |
recalculateForm() | Calculate document totals from form data and returns the new total and document lines. | string |
recalculateFormLine() | BusinessDocumentLine | |
recalculateFormLineTaxZones() | mixed | |
__construct() | mixed | |
getSubtotals() | Returns subtotals by tax. | array |
recalculate() | Recalculates document totals. | mixed |
clearTotals() | mixed | |
loadRegimenIva() | mixed | |
loadTaxZones() | mixed | |
recalculateLine() | mixed | |
recalculateLineTax() | string |
Properties
$commissionTools
protected
CommissionTools
$commissionTools
$taxZones
protected
\FacturaScripts\Dinamic\Model\ImpuestoZona[]
$taxZones
= []
$recargo
protected
bool
$recargo
= false
$siniva
protected
bool
$siniva
= false
Methods
recalculateForm()
Calculate document totals from form data and returns the new total and document lines.
public
recalculateForm(
&$doc :
BusinessDocument
, &$formLines :
array
)
: string
Parameters
- $doc : BusinessDocument
- $formLines : array
Return values
stringrecalculateFormLine()
protected
recalculateFormLine(
$fLine :
array
, $doc :
BusinessDocument
)
: BusinessDocumentLine
Parameters
- $fLine : array
- $doc : BusinessDocument
Return values
BusinessDocumentLinerecalculateFormLineTaxZones()
protected
recalculateFormLineTaxZones(
&$line :
BusinessDocumentLine
)
: mixed
Parameters
- $line : BusinessDocumentLine
Return values
mixed__construct()
public
__construct(
)
: mixed
Return values
mixedgetSubtotals()
Returns subtotals by tax.
public
getSubtotals(
$lines :
\FacturaScripts\Core\Model\Base\BusinessDocumentLine[]
, $discounts :
array
)
: array
Parameters
- $lines : \FacturaScripts\Core\Model\Base\BusinessDocumentLine[]
- $discounts : array
Return values
arrayrecalculate()
Recalculates document totals.
public
recalculate(
&$doc :
BusinessDocument
)
: mixed
Parameters
- $doc : BusinessDocument
Return values
mixedclearTotals()
protected
clearTotals(
&$doc :
BusinessDocument
)
: mixed
Parameters
- $doc : BusinessDocument
Return values
mixedloadRegimenIva()
protected
loadRegimenIva(
$reg :
string
)
: mixed
Parameters
- $reg : string
Return values
mixedloadTaxZones()
protected
loadTaxZones(
$doc :
BusinessDocument
)
: mixed
Parameters
- $doc : BusinessDocument
Return values
mixedrecalculateLine()
protected
recalculateLine(
&$line :
BusinessDocumentLine
)
: mixed
Parameters
- $line : BusinessDocumentLine
Return values
mixedrecalculateLineTax()
protected
recalculateLineTax(
&$line :
BusinessDocumentLine
)
: string
Parameters
- $line : BusinessDocumentLine