Sha256: 0409530b320c54c62e080f4a166a2625f220d4895ce87bfad95502f37a6e8236

Contents?: true

Size: 1.34 KB

Versions: 3

Compression:

Stored size: 1.34 KB

Contents

class Skr.Screens.ChartOfAccounts extends Skr.Screens.Base

    modelForAccess: 'gl-transaction'
    dataObjects:
        query: ->
            new Lanes.Models.Query
                title: 'Lines', src: Skr.Models.GlAccount
                syncOptions: {with: 'with_balances'}
                fields: [
                    { id:'id', visible: false }
                    { id: 'number', label: 'Acct #', fixedWidth: 120 }
                    'description'
                    {
                        id: 'balance', fixedWidth: 120, textAlign: 'right'
                        format: Lanes.u.format.currency
                    }
                ]

    reload: ->
        @query.results.reload()

    onRowClick: (account) ->
        Lanes.Screens.Definitions.all.get('gl-transactions')
            .display(props: {account: account})

    render: ->
        <LC.ScreenWrapper flexVertical identifier="chart-of-accounts">
            <div className="heading">
                <h3>Chart of Accounts</h3>
                <span className="explain">Click row to review transactions</span>
                <BS.Button onClick={@reload}>Reload</BS.Button>
            </div>
            <LC.Grid
                onSelectionChange={@onRowClick}
                query={@query}
                ref='grid'
                expandY={true}
            />

        </LC.ScreenWrapper>

Version data entries

3 entries across 3 versions & 1 rubygems

Version Path
stockor-0.4.0 client/skr/screens/chart-of-accounts/ChartOfAccounts.cjsx
stockor-0.3.0 client/skr/screens/chart-of-accounts/ChartOfAccounts.cjsx
stockor-0.2 client/skr/screens/chart-of-accounts/ChartOfAccounts.cjsx