Documentation
¶
Overview ¶
templ: version: v0.3.1020
templ: version: v0.3.1020
templ: version: v0.3.1020
templ: version: v0.3.1020
Index ¶
- Constants
- Variables
- func Accounts(data layout.AppLayoutData, accounts []model.Account) templ.Component
- func BalanceSheet(props BalanceSheetProps) templ.Component
- func JournalEntries(props JournalEntriesProps) templ.Component
- func TrialBalance(props TrialBalanceProps) templ.Component
- type BalanceSheetData
- type BalanceSheetProps
- type BalanceSheetSection
- type JournalEntriesProps
- type TrialBalanceProps
Constants ¶
const DefaultPageSize = 20
DefaultPageSize is used when no valid per_page query param is supplied.
Variables ¶
var PageSizes = []int{20, 50, 100}
PageSizes are the selectable "items per page" options for the journal-entries list.
Functions ¶
func BalanceSheet ¶
func BalanceSheet(props BalanceSheetProps) templ.Component
func JournalEntries ¶
func JournalEntries(props JournalEntriesProps) templ.Component
func TrialBalance ¶
func TrialBalance(props TrialBalanceProps) templ.Component
Types ¶
type BalanceSheetData ¶
type BalanceSheetData struct {
Assets BalanceSheetSection
Liabilities BalanceSheetSection
Equity BalanceSheetSection
TotalAssets int64
TotalLiabilitiesAndEquity int64
Balanced bool
}
BalanceSheetData is a rolled-up view of a TrialBalanceAsOf result, grouped by account type. The Equity section's last row is a synthetic "Current Earnings (Unclosed)" line (AccountCode == "") — this ledger has no period-closing step, so revenue/expense accounts carry their lifetime balance forever; without folding their net into equity, TotalAssets would never equal TotalLiabilitiesAndEquity.
func RollUp ¶
func RollUp(balances []model.AccountBalance) BalanceSheetData
RollUp groups balances into a BalanceSheetData. See BalanceSheetData's doc comment for the synthetic Current Earnings line.
type BalanceSheetProps ¶
type BalanceSheetProps struct {
Data layout.AppLayoutData
Sheet BalanceSheetData
AsOf string
BranchID uuid.UUID
Branches []model.Branch
}
BalanceSheetProps holds the data needed to render the balance sheet page.
type BalanceSheetSection ¶
type BalanceSheetSection struct {
Accounts []model.AccountBalance
Total int64
}
BalanceSheetSection is one Assets/Liabilities/Equity section of a rolled-up balance sheet.
type JournalEntriesProps ¶
type JournalEntriesProps struct {
Data layout.AppLayoutData
Entries []model.JournalEntry
Page int
PerPage int
TotalItems int
DateFrom string
DateTo string
BranchID uuid.UUID
EventName string
Branches []model.Branch
}
JournalEntriesProps holds the data needed to render the journal-entries list page.
type TrialBalanceProps ¶
type TrialBalanceProps struct {
Data layout.AppLayoutData
Balances []model.AccountBalance
AsOf string
BranchID uuid.UUID
Branches []model.Branch
TotalDebit int64
TotalCredit int64
}
TrialBalanceProps holds the data needed to render the trial balance page.