[CHG] fp changes

This commit is contained in:
Xavier Morel
2015-03-16 10:07:10 +01:00
parent 1ad6d35dd8
commit 0e8449f623
5 changed files with 247 additions and 251 deletions
+2 -4
View File
@@ -36,11 +36,9 @@ li > p {
/* P&L & Balance Sheet columns */
.accounts-table > div > div {
flex: 1;
padding: 5px;
margin: 5%;
border: 3px solid #666;
margin: 0 5% 5% 5%;
border: 2px solid #666;
border-radius: 3px;
}
+64 -27
View File
@@ -151,36 +151,38 @@
var ASSETS = {
code: 1,
label: "Assets",
CASH: { code: 10000, label: "Cash" },
ACCOUNTS_RECEIVABLE: { code: 12000, label: "Accounts Receivable" },
STOCK: { code: 14000, label: "Stock" },
BUILDINGS: { code: 17100, label: "Buildings" },
DEPRECIATION: { code: 18100, label: "Accumulated Depreciation" },
TAXES_PAID: { code: 19000, label: "Taxes Paid" }
BANK: { code: 11000, label: "Cash" },
ACCOUNTS_RECEIVABLE: { code: 13100, label: "Accounts Receivable" },
STOCK_OUT: { code: 14600, label: "Temporary Inventory Output" },
STOCK: { code: 14000, label: "Inventory" },
STOCK_IN: { code: 14700, label: "Inventory Purchases" },
BUILDINGS: { code: 17200, label: "Buildings" },
DEPRECIATION: { code: 17800, label: "Accumulated Depreciation" },
TAXES_PAID: { code: 19000, label: "Deferred Tax Assets" }
};
var LIABILITIES = {
code: 2,
label: "Liabilities",
NOTES_PAYABLE: { code: 20100, label: "Notes Payable" },
ACCOUNTS_PAYABLE: { code: 21000, label: "Accounts Payable" },
TAXES_PAYABLE: { code: 29000, label: "Taxes Payable" }
DEFERRED_REVENUE: { code: 22300, label: "Deferred Revenue" },
TAXES_PAYABLE: { code: 26200, label: "Deferred Tax Liabilities" }
};
var EQUITY = {
code: 3,
label: "Equity",
CAPITAL: { code: 30000, label: "Owner's Capital" }
CAPITAL: { code: 31000, label: "Common Stock" }
};
var REVENUE = {
code: 4,
label: "Revenue",
SALES: { code: 40000, label: "Sales" }
SALES: { code: 41000, label: "Goods" },
SALES_SERVICES: { code: 42000, label: "Services" }
};
var EXPENSES = {
code: 5,
label: "Expenses",
PURCHASES: { code: 50000, label: "Purchases" },
GOODS_SOLD: { code: 55000, label: "Cost of Revenue" },
DEPRECIATION: { code: 58100, label: "Depreciation Expenses" }
GOODS_SOLD: { code: 51100, label: "Cost of Goods Sold" },
DEPRECIATION: { code: 52500, label: "Other Operating Expenses" }
};
var categories = Immutable.fromJS([ASSETS, LIABILITIES, EQUITY, REVENUE, EXPENSES]);
var accounts = categories.toSeq().flatMap(function (cat) {
@@ -199,17 +201,18 @@
});
var sale = 100,
cor = sale / 2,
cor = 50,
cor_tax = cor * 0.09,
tax = sale * 0.09,
total = sale + tax,
refund = sale * 0.1,
refund = sale,
refund_tax = refund * 0.09,
purchase = 80,
purchase_tax = 80 * 0.09;
purchase = 52,
purchase_tax = 52 * 0.09;
var operations = Immutable.fromJS([{
label: "Company Incorporation (Initial Capital $1,000)",
operations: [
{account: ASSETS.CASH.code, debit: constant(1000)},
{account: ASSETS.BANK.code, debit: constant(1000)},
{account: EQUITY.CAPITAL.code, credit: constant(1000)}
]
}, {
@@ -218,12 +221,18 @@
{account: ASSETS.ACCOUNTS_RECEIVABLE.code, debit: constant(total)},
{account: EXPENSES.GOODS_SOLD.code, debit: constant(cor)},
{account: REVENUE.SALES.code, credit: constant(sale)},
{account: ASSETS.STOCK.code, credit: constant(cor)},
{account: ASSETS.STOCK_OUT.code, credit: constant(cor)},
{account: LIABILITIES.TAXES_PAYABLE.code, credit: constant(tax)}
]
}, {
label: "Goods Shipment to Customer",
operations: [
{account: ASSETS.STOCK_OUT.code, debit: constant(cor)},
{account: ASSETS.STOCK.code, credit: constant(cor)}
]
}, {
id: 'refund',
label: "Customer Refund 10%",
label: "Customer Refund",
operations: [
{account: REVENUE.SALES.code, debit: constant(refund)},
{account: LIABILITIES.TAXES_PAYABLE.code, debit: constant(refund_tax)},
@@ -232,7 +241,7 @@
}, {
label: "Customer Payment",
operations: [
{account: ASSETS.CASH.code, debit: function (ops) {
{account: ASSETS.BANK.code, debit: function (ops) {
var refund_op = operations.find(function (op) {
return op.get('id') === 'refund';
});
@@ -250,17 +259,31 @@
}}
]
}, {
label: "Supplier Bill",
label: "Supplier Goods Received (Purchase Order: $50)",
operations: [
{account: EXPENSES.PURCHASES.code, debit: constant(purchase)},
{account: ASSETS.STOCK_IN.code, credit: constant(cor)},
{account: ASSETS.STOCK.code, debit: constant(cor)},
]
}, {
label: "Supplier Bill (Invoice: $50)",
operations: [
{account: ASSETS.STOCK_IN.code, debit: constant(cor)},
{account: ASSETS.TAXES_PAID.code, debit: constant(cor_tax)},
{account: LIABILITIES.ACCOUNTS_PAYABLE.code, credit: constant(cor + cor_tax)},
]
}, {
label: "Supplier Bill (Invoice: $52 but PO $50)",
operations: [
{account: ASSETS.STOCK.code, debit: constant(purchase-cor)},
{account: ASSETS.STOCK_IN.code, debit: constant(cor)},
{account: ASSETS.TAXES_PAID.code, debit: constant(purchase_tax)},
{account: LIABILITIES.ACCOUNTS_PAYABLE.code, credit: constant(purchase + purchase_tax)},
]
}, {
label: "Supplier Bill Paid",
label: "Supplier Bill Paid ($52 + 9% tax)",
operations: [
{account: LIABILITIES.ACCOUNTS_PAYABLE.code, debit: constant(purchase + purchase_tax)},
{account: ASSETS.CASH.code, credit: constant(purchase + purchase_tax)}
{account: ASSETS.BANK.code, credit: constant(purchase + purchase_tax)}
]
}, {
label: "Acquire a building (purchase contract)",
@@ -273,7 +296,7 @@
label: "Pay for building",
operations: [
{account: LIABILITIES.ACCOUNTS_PAYABLE.code, debit: constant(3300)},
{account: ASSETS.CASH.code, credit: constant(3300)}
{account: ASSETS.BANK.code, credit: constant(3300)}
]
}, {
label: "Yearly Asset Depreciation (10% per year)",
@@ -281,6 +304,20 @@
{account: EXPENSES.DEPRECIATION.code, debit: constant(300)},
{account: ASSETS.DEPRECIATION.code, credit: constant(300)}
]
}, {
label: "Customer Invoice (3 years service contract, $300)",
operations: [
{account: ASSETS.ACCOUNTS_RECEIVABLE.code, debit: constant(total*3)},
{account: LIABILITIES.DEFERRED_REVENUE.code, credit: constant(sale*2)},
{account: REVENUE.SALES_SERVICES.code, credit: constant(sale)},
{account: LIABILITIES.TAXES_PAYABLE.code, credit: constant(tax*3)}
]
}, {
label: "Revenue Recognition (second year service contract)",
operations: [
{account: LIABILITIES.DEFERRED_REVENUE.code, debit: constant(sale)},
{account: REVENUE.SALES_SERVICES.code, credit: constant(sale)},
]
}, {
id: 'pay_taxes',
label: "Pay Taxes Due",
@@ -297,7 +334,7 @@
return acc + op.get('credit', zero)(ops) - op.get('debit', zero)(ops);
}, 0);
}},
{account: ASSETS.CASH.code, credit: function (ops) {
{account: ASSETS.BANK.code, credit: function (ops) {
return operations.find(function (op) {
return op.get('id') === 'pay_taxes';
}).getIn(['operations', 0, 'debit'])(ops);
+134 -105
View File
@@ -24,7 +24,6 @@
var _this = this;
return React.DOM.div(
null,
"Example journal entries: ",
entries.map(function (entry, index) {
return React.DOM.label(
{
@@ -116,146 +115,176 @@
var entries = Immutable.fromJS([
{
title: "Company Founding",
title: "Company Incorporation",
operations: [
{account: 'Cash', debit: 10000},
{account: 'Common Stock', credit: 10000}
{account: 'Assets: Cash', debit: 1000},
{account: 'Equity: Common Stock', credit: 1000}
],
explanation: [
"The founders invest capital in the company",
"That capital is a debt of the company towards the founders",
"It is represented as shares into the ownership of the company",
"It is not a liability because it's not expected to be settled"
"The company receives $1,000 in cash",
"Shares worth of $1,000 belong to the founders"
],
configuration: []
}, {
title: "Buy work tooling (immediate cash payment)",
title: "Customer Invoice ($100 + 9% tax)",
operations: [
{account: 'Tooling', debit: 3000},
{account: 'Cash', credit: 3000}
{account: 'Revenue: Goods', credit: 100},
{account: 'Liabilities: Deferred Tax Liabilities', credit: 9},
{account: 'Assets: Accounts Receivable', debit: 109},
{account: 'Assets: Inventory', credit: 50},
{account: 'Expenses: Cost of Goods Sold', debit: 50}
],
explanation: [
"One asset (cash) is traded for an other asset (tooling)",
"No new liabilities incurred",
"Long-term assets are not expended immediately"
"Revenues increase by $100",
"A tax to pay at the end of the month of $9",
"The customer owns you $109",
"The inventory is decreased by $50 (shipping of the goods)",
"The cost of goods sold decreases the gross profit by $50"
],
configuration: []
configuration: [
"Revenue: defined on the product, or the product category if not on the product, field Income Account",
"Defered Tax Liabilities: defined on the tax used on the invoice line",
"Accounts Receivable: defined on the customer (property)",
"Inventory: defined on the category of the related product (property)",
"Expenses: defined on the product, or the category of product (property)",
null,
"The fiscal position used on the invoice may have a rule that replaces the Income Account or the tax defined on the product by another one."
]
}, {
title: "Buy work tooling (invoiced, to pay later)",
title: "Reception of Goods - perpetual inventory",
operations: [
{account: 'Tooling', debit: 3000},
{account: 'Accounts Payable', credit: 3000}
{account: 'Assets: Uninvoiced Inventory', debit: 48},
{account: 'Assets: Inventory', credit: 48},
],
explanation: [
"An asset can be acquired through a liability",
"Trade credits are short-term debts between businesses"
"Inventory is increased by $48, the expected amount coming from the purchase order",
"A temporary account is used for the counterpart and will be cleared when receiving the invoice"
],
configuration: []
configuration: [
"Uninvoiced Inventory: defined on the product or the category of related product, field: Stock Input Account",
"Inventory: defined on the product category, field: Stock Valuation",
null,
"In this scenario, the purchase order is at $48, but the invoice the company will receive later will be at $50 (extra shipping costs)."
]
}, {
title: "Customer Invoice ($100 + 9% tax) - perpetual inventory",
operations: [
{account: 'Revenue: Goods', credit: 100},
{account: 'Liabilities: Deferred Tax Liabilities', credit: 9},
{account: 'Assets: Accounts Receivable', debit: 109},
{account: 'Assets: Uninvoiced Inventory', credit: 48},
{account: 'Assets: Inventory', credit: 2},
{account: 'Expenses: Cost of Goods Sold', debit: 50}
],
explanation: [
"Revenues increase by $100",
"A tax to pay at the end of the month of $9",
"The customer owns you $109",
"The inventory is decreased by $2 ($48 has already been posted)",
"The temporary account (Uninvoiced Inventory) is cleared",
"The cost of goods sold decrease the gross profit by $50"
],
configuration: [
"Revenue Goods: defined on the product, or the product category if not on the product, field: Income Account",
"Defered Tax Liabilities: defined on the tax used on the invoice line",
"Accounts Receivable: defined on the customer (property)",
"Inventory: defined on the category of the related product: Price Difference",
"Uninvoiced Inventory: defined on the product or the category of the related product: Stock Input Account",
"Expenses: defined on the product, or the category of product (property)",
null,
"The fiscal position used on the invoice may have a rule that replaces the Income Account or the tax defined on the product by another one."
]
}, {
title: "Customer payment",
operations: [
{account: 'Assets: Cash', debit: 109},
{account: 'Assets: Accounts Receivable', credit: 109}
],
explanation: [
"The company receives $109 in cash",
"The customer owns you $109 less"
],
configuration: [
"Cash: defined on the journal used when registering the payment, fields Default Credit Account and Default Debit Account",
"Accounts Receivable: defined on the customer (property)"
]
}, {
title: "Buy an asset ($300,000 - no tax)",
operations: [
{account: 'Assets: Buildings', debit: 300000},
{account: 'Liabilities: Accounts Payable', credit: 300000}
],
explanation: [
"The company gets an asset worth of $300,000",
"The company needs to pay $300,000 to the vendor (traded an asset against a liability)"
],
configuration: [
"Buildings: Defined on the Asset category selected on the supplier bill line",
"Accounts Payable: defined on the supplier related to the bill (property)"
]
}, {
title: "Pay supplier invoice",
operations: [
{account: 'Accounts Payable', debit: 3000},
{account: 'Cash', credit: 3000}
{account: 'Liabilities: Accounts Payable', debit: 300000},
{account: 'Assets: Cash', credit: 300000}
],
explanation: [
"Liabilities must be settled",
"Settling a liability is an outflow of resources (assets)"
"The company owns $300,000 less to the supplier (liabilities are settled)",
"The company's cash is reduced by $300,000 (reduction of asset)"
],
configuration: []
configuration: [
"Accounts Payable: defined on the supplier you pay (property)",
"Cash: defined on the journal related to the payment method"
]
}, {
title: "Cash sale (paid immediately)",
title: "Cash sale (Sales Receipt)",
operations: [
{account: 'Cash', debit: 100},
{account: 'Sales', credit: 100}
],
explanation: [],
configuration: []
}, {
title: "Invoiced sale (trade credit)",
operations: [
{account: 'Accounts Receivable', debit: 1000},
{account: 'Sales', credit: 1000}
{account: 'Assets: Cash', debit: 109},
{account: 'Revenue: Goods', credit: 100},
{account: 'Liabilities: Deferred Tax Liabilities', credit: 9}
],
explanation: [
"A sale is revenue",
"What a client owes is an asset"
"Company's cash is increased by $109",
"Revenues increase by $100",
"A tax of $9 has to be paid"
],
configuration: []
configuration: [
"Cash: Payment method defined on the Sales Receipt",
"Sales: Defined on the product used in the sales receipt, or the category of product if empty",
"Deferred Tax Liabilities: Defined on the tax used in the sales receipt (coming from the product)"
]
}, {
title: "Customer pays invoice",
title: "Customer pays invoice, 5% early payment rebate",
operations: [
{account: 'Cash', debit: 1000},
{account: 'Accounts Receivable', credit: 1000}
{account: 'Assets: Cash', debit: 950},
{account: 'Revenue: Sales Discount', debit: 50},
{account: 'Assets: Accounts Receivable', credit: 1000}
],
explanation: [
"The customer owes less",
"The bank account increases",
"A client paying an invoice is a financial movement from one asset to an other",
"Company's cash is increased by $950",
"Sales discounts lowering effective revenues by $50",
"The customer owns $1000 less to the company"
],
configuration: []
configuration: [
"Cash: is defined on the journal related to the payment / bank statement",
"Sales Discount: is selected during the payment matching process",
"Accounts Receivable: is defined on the customer associated to the payment"
]
}, {
title: "Customer pays invoice, 10% early payment rebate",
title: "Fiscal year closing — positive earnings and 50% dividends",
operations: [
{account: 'Cash', debit: 900},
{account: 'Sales Discount', debit: 100},
{account: 'Accounts Receivable', credit: 1000}
{account: 'Net Profit', debit: 1000},
{account: 'Equity: Retained Earnings', credit: 500},
{account: 'Liabilities: Dividend Payable', credit: 500}
],
explanation: [
"Sales discounts are contra revenues",
"They are negative revenues, lowering effective revenue",
"They are not expenses"
"The P&L is cleared (net profit)",
"50% is transferred to retained earnings",
"50% will be paid to shareholders as dividends"
],
configuration: []
}, {
title: "Cash sale with tax",
operations: [
{account: 'Cash', debit: 109},
{account: 'Sales', credit: 100},
{account: 'Taxes Payable', credit: 9}
],
explanation: [
"Selling with tax means there is tax to pay",
"Tax to pay is a liability"
],
configuration: []
}, {
title: "Fiscal year cloture — positive earnings and 50% dividends",
operations: [
{account: 'Revenue', debit: 5000},
{account: 'Income Summary', credit: 5000},
null,
{account: 'Income Summary', debit: 4000},
{account: 'Expenses', credit: 4000},
null,
{account: 'Income Summary', debit: 1000},
{account: 'Retained Earnings', credit: 1000},
null,
{account: 'Retained Earnings', debit: 500},
{account: 'Dividend Payable', credit: 500}
],
explanation: [
"Closing a fiscal year means transferring all P&L accounts to retained earnings",
"If the retained earnings account is positive, a dividend may be paid to owners/shareholders",
],
configuration: []
}, {
title: "Fiscal year cloture — negative earnings and dividend irrelevant",
operations: [
{account: 'Revenue', debit: 5000},
{account: 'Income Summary', credit: 5000},
null,
{account: 'Income Summary', debit: 6000},
{account: 'Expenses', credit: 6000},
null,
{account: 'Retained Earnings', debit: 1000},
{account: 'Income Summary', credit: 1000}
],
explanation: [
"Dividends are paid from a positive retained earnings account",
"Net losses will lower retained earnings",
"Dividends may still be paid if the account is positive because of previous years"
],
configuration: []
configuration: [
"This transaction is recorded by the advisor before closing the fiscal year, depending on how the company uses its net profit."
]
}
]);
}());