Class: GOBL::Bill::Totals

Inherits:
Object show all
Defined in:
lib/generated/gobl/bill/totals.rb

Overview

Totals contains the summaries of all calculations for the invoice.

Constant Summary collapse

SCHEMA_ID =

The Schema ID of the GOBL Totals structure

'https://gobl.org/draft-0/bill/invoice#/$defs/Totals'

Instance Attribute Summary collapse

Method Summary

Methods inherited from Object

new

Methods inherited from Struct

#as_json, from_data, from_json!, #to_json

Instance Attribute Details

#advanceGOBL::Num::Amount (readonly)

Total amount already paid in advance.

Returns:



77
# File 'lib/generated/gobl/bill/totals.rb', line 77

property :advance, GOBL::Num::Amount

#chargeGOBL::Num::Amount (readonly)

Sum of all document level charges

Returns:



29
# File 'lib/generated/gobl/bill/totals.rb', line 29

property :charge, GOBL::Num::Amount

#discountGOBL::Num::Amount (readonly)

Sum of all document level discounts

Returns:



24
# File 'lib/generated/gobl/bill/totals.rb', line 24

property :discount, GOBL::Num::Amount

#dueGOBL::Num::Amount (readonly)

How much actually needs to be paid now.

Returns:



82
# File 'lib/generated/gobl/bill/totals.rb', line 82

property :due, GOBL::Num::Amount

#outlaysGOBL::Num::Amount (readonly)

Total paid in outlays that need to be reimbursed

Returns:



66
# File 'lib/generated/gobl/bill/totals.rb', line 66

property :outlays, GOBL::Num::Amount

#payableGOBL::Num::Amount (readonly)

Total amount to be paid after applying taxes and outlays.

Returns:



71
# File 'lib/generated/gobl/bill/totals.rb', line 71

property :payable, GOBL::Num::Amount

#roundingGOBL::Num::Amount (readonly)

Rounding amount to apply to the invoice in case the total and payable amounts don’t quite match.

Returns:



61
# File 'lib/generated/gobl/bill/totals.rb', line 61

property :rounding, GOBL::Num::Amount

#sumGOBL::Num::Amount (readonly)

Sum of all line item sums

Returns:



18
# File 'lib/generated/gobl/bill/totals.rb', line 18

property :sum, GOBL::Num::Amount

#taxGOBL::Num::Amount (readonly)

Total amount of tax to apply to the invoice.

Returns:



50
# File 'lib/generated/gobl/bill/totals.rb', line 50

property :tax, GOBL::Num::Amount

#tax_includedGOBL::Num::Amount (readonly)

If prices include tax, this is the total tax included in the price.

Returns:



34
# File 'lib/generated/gobl/bill/totals.rb', line 34

property :tax_included, GOBL::Num::Amount

#taxesGOBL::Tax::Total (readonly)

Summary of all the taxes included in the invoice.

Returns:



45
# File 'lib/generated/gobl/bill/totals.rb', line 45

property :taxes, GOBL::Tax::Total

#totalGOBL::Num::Amount (readonly)

Sum of all line sums minus the discounts, plus the charges, without tax.

Returns:



39
# File 'lib/generated/gobl/bill/totals.rb', line 39

property :total, GOBL::Num::Amount

#total_with_taxGOBL::Num::Amount (readonly)

Grand total after all taxes have been applied.

Returns:



55
# File 'lib/generated/gobl/bill/totals.rb', line 55

property :total_with_tax, GOBL::Num::Amount