This repository has been archived by the owner on Apr 20, 2021. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 28
/
journal_line.go
40 lines (28 loc) · 1.55 KB
/
journal_line.go
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
package accounting
//JournalLine is a line on a Journal
type JournalLine struct {
//Xero identifier
JournalLineID string `json:"JournalLineID" xml:"JournalLineID"`
//Xero identifier for an account
AccountID string `json:"AccountID" xml:"AccountID"`
// See Accounts
AccountCode string `json:"AccountCode" xml:"AccountCode"`
// See Accounts
AccountType string `json:"AccountType" xml:"AccountType"`
// See Accounts
AccountName string `json:"AccountName" xml:"AccountName"`
// The description from the source transaction line item. Only returned if populated.
Description string `json:"Description,omitempty" xml:"Description,omitempty"`
// Net amount of journal line. This will be a positive value for a debit and negative for a credit
NetAmount float32 `json:"NetAmount" xml:"NetAmount"`
// Gross amount of journal line (NetAmount + TaxAmount).
GrossAmount float32 `json:"GrossAmount" xml:"GrossAmount"`
// The calculated tax amount based on the TaxType and LineAmount
TaxAmount float32 `json:"TaxAmount,omitempty" xml:"TaxAmount,omitempty"`
// Used as an override if the default Tax Code for the selected <AccountCode> is not correct – see TaxTypes.
TaxType string `json:"TaxType,omitempty" xml:"TaxType,omitempty"`
//see tax TaxTypes
TaxName string `json:"TaxName,omitempty" xml:"TaxName,omitempty"`
// Optional Tracking Category – see Tracking. Any JournalLine can have a maximum of 2 <TrackingCategory> elements.
TrackingCategories []TrackingCategory `json:"TrackingCategories,omitempty" xml:"TrackingCategories>TrackingCategory,omitempty"`
}