forked from OMGStandards/DigitalReceipt
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathtotals.yaml
106 lines (103 loc) · 3.58 KB
/
totals.yaml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
MonetaryTotal:
description: |
An aggregated monetary value or countable quantity that summarizes
the details.
type: object
properties:
totalAmount:
description: |
Amount of the Total.
$ref: "common.yaml#/MonetaryAmount"
totalQuantity:
description: |
Countable quantity of the Total.
type: integer
format: int32
typeCode:
description: |
Code that identifies the type the Total.
$ref: "#/TransactionTotalTypeCodeEnum"
customTotalTypeCode:
description: |
Custom code that identifies the type the Total.
It can only be used if totalTypeCode is set to Custom.
type: string
beforeVoidedFlag:
description: |
The total amount before transaction was voided.
Since some totals might be zeroed when transaction is voided,
the total values can be captured with raised beforeVoidedFlag.
type: boolean
default: false
extensibilityData:
description: |
Data that provides extensibility to the defined data structure.
This property is an array of DataSets where each DataSet is a
named collection of name-value pairs.
$ref: "common.yaml#/ExtensibilityData"
required:
- typeCode
additionalProperties: false
TransactionTotalTypeCodeEnum:
description: |
Enumeration of types of Totals.
ExcludingTax - total net amount of transaction excluding tax amount.
IncludingTax - total amount of transaction including tax amount.
Tax - total amount of tax (excluding tax on fees) collected from customer
for this transaction.
Discounts - total amount of all discounts within transaction
Savings - total of customer savings that might include discounts and
prices compared to competition.
Tender - total net amount of all tenders applied to transaction.
TaxExempt - total amount of all tax exemptions
SaleQuantity - total countable quantity of items sold in the transaction.
ReturnQuantity - total countable quantity of items returned in the
transaction.
NonTaxableFees - total non-taxable fees. Fees are typically added
to total including tax to receive grand total for the transaction.
TaxableFeesExcludingTax - total taxable fees excluding tax amount.
Fees are typically added to total including tax to receive grand
total for the transaction. Since this total excudes taxes (see below),
fee taxes have to be added as well to calculate grand total.
FeesTax - total amount of fee taxes collected in this transaction.
Fee taxes are added to taxable fees excluding tax to get actual amount
to be included into grand total.
Grand - grand total. The final amount after everything is added up.
LineItemCount - total number of line items.
Grand Total formula:
Total-ExcludingTax
+
Total-Tax
= ---------------------
Total-IncludingTax
+
Total-NonTaxableFees
+
Total-TaxableFeesExcludingTax
+
Total-FeesTax
= ---------------------
Grand-Total
type: string
enum:
- ExcludingTax
- IncludingTax
- Tax
- Discounts
- Savings
- Tender
- TaxExempt
- SaleQuantity
- ReturnQuantity
- NonTaxableFees
- TaxableFeesExcludingTax
- FeesTax
- Grand
- LineItemCount
- Custom
TotalCollection:
description: |
Collection of transaction totals.
type: array
items:
$ref: "#/MonetaryTotal"