Class: GOBL::Bill::Totals

Inherits:
Object show all
Defined in:
lib/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'

Constants included from Hashme

Hashme::Boolean

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:



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

property :advance, GOBL::Num::Amount

#chargeGOBL::Num::Amount (readonly)

Sum of all document level charges

Returns:



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

property :charge, GOBL::Num::Amount

#discountGOBL::Num::Amount (readonly)

Sum of all document level discounts

Returns:



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

property :discount, GOBL::Num::Amount

#dueGOBL::Num::Amount (readonly)

How much actually needs to be paid now.

Returns:



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

property :due, GOBL::Num::Amount

#outlaysGOBL::Num::Amount (readonly)

Total paid in outlays that need to be reimbursed

Returns:



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

property :outlays, GOBL::Num::Amount

#payableGOBL::Num::Amount (readonly)

Total amount to be paid after applying taxes and outlays.

Returns:



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

property :payable, GOBL::Num::Amount

#sumGOBL::Num::Amount (readonly)

Sum of all line item sums

Returns:



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

property :sum, GOBL::Num::Amount

#taxGOBL::Num::Amount (readonly)

Total amount of tax to apply to the invoice.

Returns:



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

property :tax, GOBL::Num::Amount

#tax_includedGOBL::Num::Amount (readonly)

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

Returns:



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

property :tax_included, GOBL::Num::Amount

#taxesGOBL::Tax::Total (readonly)

Summary of all the taxes included in the invoice.

Returns:



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

property :taxes, GOBL::Tax::Total

#totalGOBL::Num::Amount (readonly)

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

Returns:



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

property :total, GOBL::Num::Amount

#total_with_taxGOBL::Num::Amount (readonly)

Grand total after all taxes have been applied.

Returns:



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

property :total_with_tax, GOBL::Num::Amount