calculates profit and loss.
This commit is contained in:
@@ -35,6 +35,7 @@
|
||||
(re-frame/reg-sub
|
||||
::accounts
|
||||
(fn [db [_ type only-location]]
|
||||
(println (::report db))
|
||||
(->> db
|
||||
::report
|
||||
:balance-sheet-accounts
|
||||
@@ -112,14 +113,56 @@
|
||||
:to-date to
|
||||
:selected selected)]}))
|
||||
(def groupings
|
||||
{:expense [["Expenses" 4000 4999]
|
||||
["Expenses 2" 5000 5999]
|
||||
["Expenses 3" 6000 6999]
|
||||
["Expenses 4" 7000 7999]
|
||||
["Expenses 5" 8000 8999]]})
|
||||
|
||||
{:expense [["1100 Cash and Bank Accounts" 1100 1199]
|
||||
["1200 Accounts Receivable" 1200 1299]
|
||||
["1300 Inventory" 1300 1399]
|
||||
["1400 Prepaid Expenses" 1400 1499]
|
||||
["1500 Property and Equipment" 1500 1599]
|
||||
["1600 Intangible Assets" 1600 1699]
|
||||
["2100 Accounts Payable" 2100 2399]
|
||||
["2400 Accrued Expenses" 2400 2499]
|
||||
["2500 Other Liabilities" 2500 2599]
|
||||
["2600 Split Accounts" 2600 2699]
|
||||
["2700 Current Portion of Long-Term Debt" 2700 2799]
|
||||
["2800 Notes Payable" 2800 2899]
|
||||
|
||||
["4100-4200 Food Sales" 4100 4199]
|
||||
["4400-4600 Alcohol Sales" 4400 4599]
|
||||
["4700 Merchandise Sales" 4700 4799]
|
||||
["4800 Other Operating Income" 4800 4899]
|
||||
["5100-5200 Food Costs" 5100 5199]
|
||||
["5400-5600 Alcohol Cost" 5400 5599]
|
||||
["5700 Merchandise Cost" 5700 5799]
|
||||
["5800 Other Operating Cost" 5800 5899]
|
||||
["5900 Paper Cost" 5900 5999]
|
||||
["6010 HQ Payroll" 6010 6029]
|
||||
["6030 Payroll Benefits and Taxes" 6030 6099]
|
||||
["6100 Management Payroll" 6100 6199]
|
||||
["6200 Staff Payroll" 6200 6299]
|
||||
["7100 Ops Related DirGMC Exp" 7100 7199]
|
||||
["7200 Customer Related DirGMC Exp" 7200 7299]
|
||||
["7300 Employee Related DirGMC Exp" 7300 7399]
|
||||
["7400 Building and Equipment Related DirGMC Exp" 7400 7399]
|
||||
["7500 Office/ Management Related DirGMC Exp" 7500 7599]
|
||||
["8100 Operational" 8100 8199]
|
||||
["8200 Occupancy Costs" 8200 8299]
|
||||
["8300 Utilities" 8300 8399]
|
||||
["8400 Equipment Rental" 8400 8499]
|
||||
["8500-8700 Taxes and Insurance" 8500 8699]
|
||||
["8800 Depreciation" 8800 8899]
|
||||
["9100 Promotion and Outreach" 9100 9199]
|
||||
["9200 Employee Morale and Training" 9200 9299]
|
||||
["9300 Operational" 9300 9499]
|
||||
["9500 Interest and Bank Expenses" 9500 9599]
|
||||
["9600 Depreciation" 9600 9699]
|
||||
["9700 Taxes" 9700 9799]
|
||||
["9800 Other Expenses" 9800 9899]
|
||||
["9900 Tax Only Expenses" 9900 9999]]})
|
||||
|
||||
(defn grouping [{:keys [header accounts comparable-accounts groupings]}]
|
||||
|
||||
(println accounts)
|
||||
(for [[grouping-name from to] groupings
|
||||
:let [matching-accounts (filter
|
||||
#(<= from (:numeric-code %) to)
|
||||
|
||||
Reference in New Issue
Block a user