[CHG] FP changes, todos

This commit is contained in:
Xavier Morel 2015-03-03 10:23:26 +01:00
parent 845f1cd1d0
commit 5299abc241
6 changed files with 240 additions and 197 deletions

View File

@ -144,26 +144,35 @@
var ASSETS = {
code: 1,
label: "Assets",
CASH: { code: 10100, label: "Cash" },
ACCOUNTS_RECEIVABLE: { code: 12100, label: "Accounts Receivable" }
CASH: { code: 10000, label: "Cash" },
ACCOUNTS_RECEIVABLE: { code: 12000, label: "Accounts Receivable" },
BUILDINGS: { code: 17100, label: "Buildings" },
DEPRECIATION: { code: 18100, label: "Accumulated Depreciation" }
};
var LIABILITIES = {
code: 2,
label: "Liabilities",
NOTES_PAYABLE: { code: 20100, label: "Notes Payable" },
ACCOUNTS_PAYABLE: { code: 21000, label: "Accounts Payable" },
TAXES_PAYABLE: { code: 23100, label: "Taxes Payable" }
TAXES_PAYABLE: { code: 24000, label: "Taxes Payable" }
};
var EQUITY = {
code: 3,
label: "Equity",
CAPITAL: { code: 30000, label: "Owner's Capital" }
};
var REVENUE = {
code: 4,
label: "Revenue",
SALES: { code: 40100, label: "Sales" }
SALES: { code: 40000, label: "Sales" }
};
var EXPENSES = {
code: 5,
label: "Expenses",
PURCHASES: { code: 50100, label: "Purchases" }
PURCHASES: { code: 50000, label: "Purchases" },
DEPRECIATION: { code: 58100, label: "Depreciation Expenses" }
};
var categories = Immutable.fromJS([ASSETS, LIABILITIES, REVENUE, EXPENSES]);
var categories = Immutable.fromJS([ASSETS, LIABILITIES, EQUITY, REVENUE, EXPENSES]);
var accounts = categories.toSeq().flatMap(function (cat) {
return Immutable.Seq.of(cat.set('level', 0)).concat(cat.filter(function (v, k) {
return k.toUpperCase() === k;
@ -185,17 +194,23 @@
refund = sale * 0.1,
purchase = 80;
var operations = Immutable.fromJS([{
label: "Company Incorporation (Initial Capital $1,000)",
operations: [
{account: ASSETS.CASH.code, debit: constant(1000)},
{account: EQUITY.CAPITAL.code, credit: constant(1000)}
]
}, {
label: "Customer Invoice ($100 + 9% tax)",
operations: [
{account: ASSETS.ACCOUNTS_RECEIVABLE.code, debit: function () { return total; }},
{account: REVENUE.SALES.code, credit: function () { return sale; }},
{account: LIABILITIES.TAXES_PAYABLE.code, credit: function () { return tax; }}
{account: ASSETS.ACCOUNTS_RECEIVABLE.code, debit: constant(total)},
{account: REVENUE.SALES.code, credit: constant(sale)},
{account: LIABILITIES.TAXES_PAYABLE.code, credit: constant(tax)}
]
}, {
label: "Customer Refund 10%",
operations: [
{account: REVENUE.SALES.code, debit: function () { return refund; }},
{account: ASSETS.ACCOUNTS_RECEIVABLE.code, credit: function () { return refund; }}
{account: REVENUE.SALES.code, debit: constant(refund)},
{account: ASSETS.ACCOUNTS_RECEIVABLE.code, credit: constant(refund)}
]
}, {
label: "Customer Payment",
@ -212,23 +227,37 @@
}}
]
}, {
label: "Supplier Invoice",
label: "Supplier Bill",
operations: [
{account: EXPENSES.PURCHASES.code, debit: function () { return purchase; }},
{account: LIABILITIES.ACCOUNTS_PAYABLE.code, credit: function () { return purchase; }}
{account: EXPENSES.PURCHASES.code, debit: constant(purchase)},
{account: LIABILITIES.ACCOUNTS_PAYABLE.code, credit: constant(purchase)}
]
}, {
label: "Supplier Invoice Paid",
label: "Supplier Bill Paid",
operations: [
{account: LIABILITIES.ACCOUNTS_PAYABLE.code, debit: function () { return purchase; }},
{account: ASSETS.CASH.code, credit: function () { return purchase; }}
{account: LIABILITIES.ACCOUNTS_PAYABLE.code, debit: constant(purchase)},
{account: ASSETS.CASH.code, credit: constant(purchase)}
]
}, {
label: "Buy and pay a building (an asset)",
operations: [
{account: ASSETS.BUILDINGS.code, debit: constant(3000)},
{account: LIABILITIES.NOTES_PAYABLE.code, credit: constant(2500)},
{account: ASSETS.CASH.code, credit: constant(500)}
]
}, {
label: "Yearly Asset Depreciation (10% per year)",
operations: [
{account: EXPENSES.DEPRECIATION.code, debit: constant(300)},
{account: ASSETS.DEPRECIATION.code, credit: constant(300)}
]
}, {
label: "Pay Taxes Due",
operations: [
{account: LIABILITIES.TAXES_PAYABLE.code, debit: function () { return tax; }},
{account: ASSETS.CASH.code, credit: function () { return tax; }}
{account: LIABILITIES.TAXES_PAYABLE.code, debit: constant(tax)},
{account: ASSETS.CASH.code, credit: constant(tax)}
]
}
]);
function constant(val) {return function () { return val; };}
})();

View File

@ -25,19 +25,23 @@
return React.DOM.div(
null,
"Example journal entries: ",
React.DOM.select(
{
value: entries.indexOf(this.props.entry),
onChange: function (e) {
data.reset(entries.get(e.target.value));
}
},
entries.map(function (entry, index) {
return React.DOM.option(
{key: index, value: index},
entry.get('title')
);
}).toArray()),
entries.map(function (entry, index) {
return React.DOM.label(
{
key: index,
style: { display: 'block' },
},
React.DOM.input({
type: 'radio',
checked: Immutable.is(entry, this.props.entry),
onChange: function (e) {
data.reset(entry);
}
}),
' ',
entry.get('title')
);
}, this).toArray(),
this.props.entry && React.DOM.p(null, this.props.entry.get('help'))
);
}
@ -89,13 +93,13 @@
{account: 'Common Stock', credit: 10000}
]
}, {
title: "Buy work tooling",
title: "Buy work tooling (immediate cash payment)",
operations: [
{account: 'Tooling', debit: 3000},
{account: 'Cash', credit: 3000}
]
}, {
title: "Buy work tooling (invoiced)",
title: "Buy work tooling (invoiced, to pay later)",
operations: [
{account: 'Tooling', debit: 3000},
{account: 'Accounts Payable', credit: 3000}

View File

@ -6609,6 +6609,9 @@ body {
dt:hover > a > .viewcode-link {
display: inline;
}
blockquote.highlights {
border: none;
}
div.section > h1 {
padding-bottom: 9px;
margin: 40px 0 20px;
@ -6822,7 +6825,7 @@ td.field-body > ul {
padding-right: 1em;
}
.stripe .section:not(.force-right) > .force-right,
.stripe .section:not(.force-right) > [class*=highlight] {
.stripe .section:not(.force-right) > [class*=highlight-] {
float: none;
clear: none;
margin-left: 50%;
@ -6830,31 +6833,31 @@ td.field-body > ul {
color: #eeeeee;
}
.stripe .section:not(.force-right) > .force-right legend,
.stripe .section:not(.force-right) > [class*=highlight] legend {
.stripe .section:not(.force-right) > [class*=highlight-] legend {
color: inherit;
}
.stripe .section:not(.force-right) > .force-right input,
.stripe .section:not(.force-right) > [class*=highlight] input {
.stripe .section:not(.force-right) > [class*=highlight-] input {
color: inherit;
background-color: #555555;
}
.stripe .section:not(.force-right) > .force-right a,
.stripe .section:not(.force-right) > [class*=highlight] a {
.stripe .section:not(.force-right) > [class*=highlight-] a {
color: #d9a8cc;
}
.stripe .section:not(.force-right) > .force-right code,
.stripe .section:not(.force-right) > [class*=highlight] code,
.stripe .section:not(.force-right) > [class*=highlight-] code,
.stripe .section:not(.force-right) > .force-right .literal,
.stripe .section:not(.force-right) > [class*=highlight] .literal {
.stripe .section:not(.force-right) > [class*=highlight-] .literal {
color: #f9f2f4;
background-color: #555555;
}
.stripe .section:not(.force-right) > .force-right:not(.highlight-json) .highlight,
.stripe .section:not(.force-right) > [class*=highlight]:not(.highlight-json) .highlight {
.stripe .section:not(.force-right) > [class*=highlight-]:not(.highlight-json) .highlight {
border-bottom-color: #777777;
}
.stripe .section:not(.force-right) > .force-right.admonition,
.stripe .section:not(.force-right) > [class*=highlight].admonition {
.stripe .section:not(.force-right) > [class*=highlight-].admonition {
margin-left: 51%;
width: 49%;
border-top-color: #777777;
@ -6862,7 +6865,7 @@ td.field-body > ul {
border-right-color: #777777;
}
.stripe .section:not(.force-right) > .force-right .highlight,
.stripe .section:not(.force-right) > [class*=highlight] .highlight {
.stripe .section:not(.force-right) > [class*=highlight-] .highlight {
border-color: #555555;
border-style: solid;
border-width: 1px 0;
@ -6940,281 +6943,281 @@ td.field-body > ul {
/* Literal.Number.Integer.Long */
}
.stripe .section:not(.force-right) > .force-right .highlight .lineno,
.stripe .section:not(.force-right) > [class*=highlight] .highlight .lineno {
.stripe .section:not(.force-right) > [class*=highlight-] .highlight .lineno {
color: #586e75;
}
.stripe .section:not(.force-right) > .force-right .highlight .c,
.stripe .section:not(.force-right) > [class*=highlight] .highlight .c {
.stripe .section:not(.force-right) > [class*=highlight-] .highlight .c {
color: #586e75;
}
.stripe .section:not(.force-right) > .force-right .highlight .err,
.stripe .section:not(.force-right) > [class*=highlight] .highlight .err {
.stripe .section:not(.force-right) > [class*=highlight-] .highlight .err {
color: #cccccc;
}
.stripe .section:not(.force-right) > .force-right .highlight .g,
.stripe .section:not(.force-right) > [class*=highlight] .highlight .g {
.stripe .section:not(.force-right) > [class*=highlight-] .highlight .g {
color: #cccccc;
}
.stripe .section:not(.force-right) > .force-right .highlight .k,
.stripe .section:not(.force-right) > [class*=highlight] .highlight .k {
.stripe .section:not(.force-right) > [class*=highlight-] .highlight .k {
color: #859900;
}
.stripe .section:not(.force-right) > .force-right .highlight .l,
.stripe .section:not(.force-right) > [class*=highlight] .highlight .l {
.stripe .section:not(.force-right) > [class*=highlight-] .highlight .l {
color: #cccccc;
}
.stripe .section:not(.force-right) > .force-right .highlight .n,
.stripe .section:not(.force-right) > [class*=highlight] .highlight .n {
.stripe .section:not(.force-right) > [class*=highlight-] .highlight .n {
color: #cccccc;
}
.stripe .section:not(.force-right) > .force-right .highlight .o,
.stripe .section:not(.force-right) > [class*=highlight] .highlight .o {
.stripe .section:not(.force-right) > [class*=highlight-] .highlight .o {
color: #859900;
}
.stripe .section:not(.force-right) > .force-right .highlight .x,
.stripe .section:not(.force-right) > [class*=highlight] .highlight .x {
.stripe .section:not(.force-right) > [class*=highlight-] .highlight .x {
color: #cb4b16;
}
.stripe .section:not(.force-right) > .force-right .highlight .p,
.stripe .section:not(.force-right) > [class*=highlight] .highlight .p {
.stripe .section:not(.force-right) > [class*=highlight-] .highlight .p {
color: #cccccc;
}
.stripe .section:not(.force-right) > .force-right .highlight .cm,
.stripe .section:not(.force-right) > [class*=highlight] .highlight .cm {
.stripe .section:not(.force-right) > [class*=highlight-] .highlight .cm {
color: #586e75;
}
.stripe .section:not(.force-right) > .force-right .highlight .cp,
.stripe .section:not(.force-right) > [class*=highlight] .highlight .cp {
.stripe .section:not(.force-right) > [class*=highlight-] .highlight .cp {
color: #859900;
}
.stripe .section:not(.force-right) > .force-right .highlight .c1,
.stripe .section:not(.force-right) > [class*=highlight] .highlight .c1 {
.stripe .section:not(.force-right) > [class*=highlight-] .highlight .c1 {
color: #586e75;
}
.stripe .section:not(.force-right) > .force-right .highlight .cs,
.stripe .section:not(.force-right) > [class*=highlight] .highlight .cs {
.stripe .section:not(.force-right) > [class*=highlight-] .highlight .cs {
color: #859900;
}
.stripe .section:not(.force-right) > .force-right .highlight .gd,
.stripe .section:not(.force-right) > [class*=highlight] .highlight .gd {
.stripe .section:not(.force-right) > [class*=highlight-] .highlight .gd {
color: #2aa198;
}
.stripe .section:not(.force-right) > .force-right .highlight .ge,
.stripe .section:not(.force-right) > [class*=highlight] .highlight .ge {
.stripe .section:not(.force-right) > [class*=highlight-] .highlight .ge {
color: #cccccc;
font-style: italic;
}
.stripe .section:not(.force-right) > .force-right .highlight .gr,
.stripe .section:not(.force-right) > [class*=highlight] .highlight .gr {
.stripe .section:not(.force-right) > [class*=highlight-] .highlight .gr {
color: #dc322f;
}
.stripe .section:not(.force-right) > .force-right .highlight .gh,
.stripe .section:not(.force-right) > [class*=highlight] .highlight .gh {
.stripe .section:not(.force-right) > [class*=highlight-] .highlight .gh {
color: #cb4b16;
}
.stripe .section:not(.force-right) > .force-right .highlight .gi,
.stripe .section:not(.force-right) > [class*=highlight] .highlight .gi {
.stripe .section:not(.force-right) > [class*=highlight-] .highlight .gi {
color: #859900;
}
.stripe .section:not(.force-right) > .force-right .highlight .go,
.stripe .section:not(.force-right) > [class*=highlight] .highlight .go {
.stripe .section:not(.force-right) > [class*=highlight-] .highlight .go {
color: #cccccc;
}
.stripe .section:not(.force-right) > .force-right .highlight .gp,
.stripe .section:not(.force-right) > [class*=highlight] .highlight .gp {
.stripe .section:not(.force-right) > [class*=highlight-] .highlight .gp {
color: #cccccc;
}
.stripe .section:not(.force-right) > .force-right .highlight .gs,
.stripe .section:not(.force-right) > [class*=highlight] .highlight .gs {
.stripe .section:not(.force-right) > [class*=highlight-] .highlight .gs {
color: #cccccc;
font-weight: bold;
}
.stripe .section:not(.force-right) > .force-right .highlight .gu,
.stripe .section:not(.force-right) > [class*=highlight] .highlight .gu {
.stripe .section:not(.force-right) > [class*=highlight-] .highlight .gu {
color: #cb4b16;
}
.stripe .section:not(.force-right) > .force-right .highlight .gt,
.stripe .section:not(.force-right) > [class*=highlight] .highlight .gt {
.stripe .section:not(.force-right) > [class*=highlight-] .highlight .gt {
color: #cccccc;
}
.stripe .section:not(.force-right) > .force-right .highlight .kc,
.stripe .section:not(.force-right) > [class*=highlight] .highlight .kc {
.stripe .section:not(.force-right) > [class*=highlight-] .highlight .kc {
color: #cb4b16;
}
.stripe .section:not(.force-right) > .force-right .highlight .kd,
.stripe .section:not(.force-right) > [class*=highlight] .highlight .kd {
.stripe .section:not(.force-right) > [class*=highlight-] .highlight .kd {
color: #268bd2;
}
.stripe .section:not(.force-right) > .force-right .highlight .kn,
.stripe .section:not(.force-right) > [class*=highlight] .highlight .kn {
.stripe .section:not(.force-right) > [class*=highlight-] .highlight .kn {
color: #859900;
}
.stripe .section:not(.force-right) > .force-right .highlight .kp,
.stripe .section:not(.force-right) > [class*=highlight] .highlight .kp {
.stripe .section:not(.force-right) > [class*=highlight-] .highlight .kp {
color: #859900;
}
.stripe .section:not(.force-right) > .force-right .highlight .kr,
.stripe .section:not(.force-right) > [class*=highlight] .highlight .kr {
.stripe .section:not(.force-right) > [class*=highlight-] .highlight .kr {
color: #268bd2;
}
.stripe .section:not(.force-right) > .force-right .highlight .kt,
.stripe .section:not(.force-right) > [class*=highlight] .highlight .kt {
.stripe .section:not(.force-right) > [class*=highlight-] .highlight .kt {
color: #dc322f;
}
.stripe .section:not(.force-right) > .force-right .highlight .ld,
.stripe .section:not(.force-right) > [class*=highlight] .highlight .ld {
.stripe .section:not(.force-right) > [class*=highlight-] .highlight .ld {
color: #cccccc;
}
.stripe .section:not(.force-right) > .force-right .highlight .m,
.stripe .section:not(.force-right) > [class*=highlight] .highlight .m {
.stripe .section:not(.force-right) > [class*=highlight-] .highlight .m {
color: #2aa198;
}
.stripe .section:not(.force-right) > .force-right .highlight .s,
.stripe .section:not(.force-right) > [class*=highlight] .highlight .s {
.stripe .section:not(.force-right) > [class*=highlight-] .highlight .s {
color: #2aa198;
}
.stripe .section:not(.force-right) > .force-right .highlight .na,
.stripe .section:not(.force-right) > [class*=highlight] .highlight .na {
.stripe .section:not(.force-right) > [class*=highlight-] .highlight .na {
color: #cccccc;
}
.stripe .section:not(.force-right) > .force-right .highlight .nb,
.stripe .section:not(.force-right) > [class*=highlight] .highlight .nb {
.stripe .section:not(.force-right) > [class*=highlight-] .highlight .nb {
color: #b58900;
}
.stripe .section:not(.force-right) > .force-right .highlight .nc,
.stripe .section:not(.force-right) > [class*=highlight] .highlight .nc {
.stripe .section:not(.force-right) > [class*=highlight-] .highlight .nc {
color: #268bd2;
}
.stripe .section:not(.force-right) > .force-right .highlight .no,
.stripe .section:not(.force-right) > [class*=highlight] .highlight .no {
.stripe .section:not(.force-right) > [class*=highlight-] .highlight .no {
color: #cb4b16;
}
.stripe .section:not(.force-right) > .force-right .highlight .nd,
.stripe .section:not(.force-right) > [class*=highlight] .highlight .nd {
.stripe .section:not(.force-right) > [class*=highlight-] .highlight .nd {
color: #268bd2;
}
.stripe .section:not(.force-right) > .force-right .highlight .ni,
.stripe .section:not(.force-right) > [class*=highlight] .highlight .ni {
.stripe .section:not(.force-right) > [class*=highlight-] .highlight .ni {
color: #cb4b16;
}
.stripe .section:not(.force-right) > .force-right .highlight .ne,
.stripe .section:not(.force-right) > [class*=highlight] .highlight .ne {
.stripe .section:not(.force-right) > [class*=highlight-] .highlight .ne {
color: #cb4b16;
}
.stripe .section:not(.force-right) > .force-right .highlight .nf,
.stripe .section:not(.force-right) > [class*=highlight] .highlight .nf {
.stripe .section:not(.force-right) > [class*=highlight-] .highlight .nf {
color: #268bd2;
}
.stripe .section:not(.force-right) > .force-right .highlight .nl,
.stripe .section:not(.force-right) > [class*=highlight] .highlight .nl {
.stripe .section:not(.force-right) > [class*=highlight-] .highlight .nl {
color: #cccccc;
}
.stripe .section:not(.force-right) > .force-right .highlight .nn,
.stripe .section:not(.force-right) > [class*=highlight] .highlight .nn {
.stripe .section:not(.force-right) > [class*=highlight-] .highlight .nn {
color: #cccccc;
}
.stripe .section:not(.force-right) > .force-right .highlight .nx,
.stripe .section:not(.force-right) > [class*=highlight] .highlight .nx {
.stripe .section:not(.force-right) > [class*=highlight-] .highlight .nx {
color: #cccccc;
}
.stripe .section:not(.force-right) > .force-right .highlight .py,
.stripe .section:not(.force-right) > [class*=highlight] .highlight .py {
.stripe .section:not(.force-right) > [class*=highlight-] .highlight .py {
color: #cccccc;
}
.stripe .section:not(.force-right) > .force-right .highlight .nt,
.stripe .section:not(.force-right) > [class*=highlight] .highlight .nt {
.stripe .section:not(.force-right) > [class*=highlight-] .highlight .nt {
color: #268bd2;
}
.stripe .section:not(.force-right) > .force-right .highlight .nv,
.stripe .section:not(.force-right) > [class*=highlight] .highlight .nv {
.stripe .section:not(.force-right) > [class*=highlight-] .highlight .nv {
color: #268bd2;
}
.stripe .section:not(.force-right) > .force-right .highlight .ow,
.stripe .section:not(.force-right) > [class*=highlight] .highlight .ow {
.stripe .section:not(.force-right) > [class*=highlight-] .highlight .ow {
color: #859900;
}
.stripe .section:not(.force-right) > .force-right .highlight .w,
.stripe .section:not(.force-right) > [class*=highlight] .highlight .w {
.stripe .section:not(.force-right) > [class*=highlight-] .highlight .w {
color: #cccccc;
}
.stripe .section:not(.force-right) > .force-right .highlight .mf,
.stripe .section:not(.force-right) > [class*=highlight] .highlight .mf {
.stripe .section:not(.force-right) > [class*=highlight-] .highlight .mf {
color: #2aa198;
}
.stripe .section:not(.force-right) > .force-right .highlight .mh,
.stripe .section:not(.force-right) > [class*=highlight] .highlight .mh {
.stripe .section:not(.force-right) > [class*=highlight-] .highlight .mh {
color: #2aa198;
}
.stripe .section:not(.force-right) > .force-right .highlight .mi,
.stripe .section:not(.force-right) > [class*=highlight] .highlight .mi {
.stripe .section:not(.force-right) > [class*=highlight-] .highlight .mi {
color: #2aa198;
}
.stripe .section:not(.force-right) > .force-right .highlight .mo,
.stripe .section:not(.force-right) > [class*=highlight] .highlight .mo {
.stripe .section:not(.force-right) > [class*=highlight-] .highlight .mo {
color: #2aa198;
}
.stripe .section:not(.force-right) > .force-right .highlight .sb,
.stripe .section:not(.force-right) > [class*=highlight] .highlight .sb {
.stripe .section:not(.force-right) > [class*=highlight-] .highlight .sb {
color: #586e75;
}
.stripe .section:not(.force-right) > .force-right .highlight .sc,
.stripe .section:not(.force-right) > [class*=highlight] .highlight .sc {
.stripe .section:not(.force-right) > [class*=highlight-] .highlight .sc {
color: #2aa198;
}
.stripe .section:not(.force-right) > .force-right .highlight .sd,
.stripe .section:not(.force-right) > [class*=highlight] .highlight .sd {
.stripe .section:not(.force-right) > [class*=highlight-] .highlight .sd {
color: #cccccc;
}
.stripe .section:not(.force-right) > .force-right .highlight .s2,
.stripe .section:not(.force-right) > [class*=highlight] .highlight .s2 {
.stripe .section:not(.force-right) > [class*=highlight-] .highlight .s2 {
color: #2aa198;
}
.stripe .section:not(.force-right) > .force-right .highlight .se,
.stripe .section:not(.force-right) > [class*=highlight] .highlight .se {
.stripe .section:not(.force-right) > [class*=highlight-] .highlight .se {
color: #cb4b16;
}
.stripe .section:not(.force-right) > .force-right .highlight .sh,
.stripe .section:not(.force-right) > [class*=highlight] .highlight .sh {
.stripe .section:not(.force-right) > [class*=highlight-] .highlight .sh {
color: #cccccc;
}
.stripe .section:not(.force-right) > .force-right .highlight .si,
.stripe .section:not(.force-right) > [class*=highlight] .highlight .si {
.stripe .section:not(.force-right) > [class*=highlight-] .highlight .si {
color: #2aa198;
}
.stripe .section:not(.force-right) > .force-right .highlight .sx,
.stripe .section:not(.force-right) > [class*=highlight] .highlight .sx {
.stripe .section:not(.force-right) > [class*=highlight-] .highlight .sx {
color: #2aa198;
}
.stripe .section:not(.force-right) > .force-right .highlight .sr,
.stripe .section:not(.force-right) > [class*=highlight] .highlight .sr {
.stripe .section:not(.force-right) > [class*=highlight-] .highlight .sr {
color: #dc322f;
}
.stripe .section:not(.force-right) > .force-right .highlight .s1,
.stripe .section:not(.force-right) > [class*=highlight] .highlight .s1 {
.stripe .section:not(.force-right) > [class*=highlight-] .highlight .s1 {
color: #2aa198;
}
.stripe .section:not(.force-right) > .force-right .highlight .ss,
.stripe .section:not(.force-right) > [class*=highlight] .highlight .ss {
.stripe .section:not(.force-right) > [class*=highlight-] .highlight .ss {
color: #2aa198;
}
.stripe .section:not(.force-right) > .force-right .highlight .bp,
.stripe .section:not(.force-right) > [class*=highlight] .highlight .bp {
.stripe .section:not(.force-right) > [class*=highlight-] .highlight .bp {
color: #268bd2;
}
.stripe .section:not(.force-right) > .force-right .highlight .vc,
.stripe .section:not(.force-right) > [class*=highlight] .highlight .vc {
.stripe .section:not(.force-right) > [class*=highlight-] .highlight .vc {
color: #268bd2;
}
.stripe .section:not(.force-right) > .force-right .highlight .vg,
.stripe .section:not(.force-right) > [class*=highlight] .highlight .vg {
.stripe .section:not(.force-right) > [class*=highlight-] .highlight .vg {
color: #268bd2;
}
.stripe .section:not(.force-right) > .force-right .highlight .vi,
.stripe .section:not(.force-right) > [class*=highlight] .highlight .vi {
.stripe .section:not(.force-right) > [class*=highlight-] .highlight .vi {
color: #268bd2;
}
.stripe .section:not(.force-right) > .force-right .highlight .il,
.stripe .section:not(.force-right) > [class*=highlight] .highlight .il {
.stripe .section:not(.force-right) > [class*=highlight-] .highlight .il {
color: #2aa198;
}
.stripe .body > .section > .section {

View File

@ -393,6 +393,9 @@ dt:hover > a > .viewcode-link {
// either that or overwrite visit_attribution/depart_attribution
blockquote p.attribution:extend(blockquote footer) {}
blockquote.highlights {
border: none;
}
div.section > h1 {
.page-header();
@ -622,7 +625,7 @@ td.field-body {
padding-right: 1em;
}
.section:not(.force-right) > .force-right,
.section:not(.force-right) > [class*=highlight] {
.section:not(.force-right) > [class*=highlight-] {
float: none;
clear: none;
margin-left: 50%;

Binary file not shown.

Before

Width:  |  Height:  |  Size: 59 KiB

172
index.rst
View File

@ -1,143 +1,142 @@
:classes: stripe
==========================================
Understanding Accounting For Entrepreneurs
==========================================
Financial accounting is used to know the situation of a company (its balance
sheet) and its performance (Profit and Loss, P&L). It is set up by reporting
every financial transaction in the relevant accounts of a Chart of Accounts.
====================================
Accounting Memento For Entrepreneurs
====================================
.. rst-class:: intro-list
* .. rst-class:: intro-p-l
**P&L** is always analysed on a specific period rather than since the
company's founding (e.g. 2014, Q3 2012, …).
The **Profit and Loss** (P&L) report shows the performance of the company
over a specific period (usually the current year).
* .. rst-class:: intro-gross-profit
**Gross profits** is revenues (sales, interest, royalties) minus cost of
goods sold (raw materials, storage costs, production labor costs).
The **Gross Profit** equals the revenues from sales minus the cost of goods
sold.
* .. rst-class:: intro-opex
**Operating expenses** include administration, sales and R&D salaries as
well as rent and utilities, legal costs, insurance, ... anything beyond
fabrication itself.
**Operating Expenses** (OPEX) include admininstration, sales and R&D
salaries as well as rent and utilities, miscellaneous costs, insurances, …
anything beyond the costs of products sold.
* .. rst-class:: intro-balance
The **Balance sheet** is a snapshot of the situation at a specific moment,
listing the company's assets and its liabilities at that point.
The **Balance Sheet** is a snapshot of the company's finances at a specific
date (as opposed to the Profit and Loss which is an analysis over a period)
* .. rst-class:: intro-assets
**Assets** represent the company's wealth. A person's assets would be a
house or car ("fixed" or "tangible" assets), bank accounts or cash ("liquid"
or "current" assets). For a company, a client owing money is an asset. An
employee is not an asset as it is not owned by the company (slavery being
illegal under the International Covenant on Civil and Political Rights's
article 8).
**Assets** represent the company's wealth, things it owns. Fixed assets
includes building and offices, current assets include bank accounts and
cash. A client owing money is an asset. An employee is not an asset.
* .. rst-class:: intro-liabilities
**Liabilities** are obligations from past events resulting in future use or
transfer of current assets (utility bills, debts, payroll, unpaid
suppliers).
transfer of current assets (utility bills, debts, unpaid suppliers).
* .. rst-class:: intro-equity
**Equity** is assets which have no liability counterpart: shares, other
stocks and surplus.
**Equity** the amount of the funds contributed by the owners (founders or
shareholders) plus previously retained retained earnings (or losses).
A difference is made between buying an assets (e.g. a building) and expenses
(e.g. fuel). Assets have an intrinsic value over time, versus expenses having
value in them being consumed for the company to "work".
Assets have necessarily been financed via liabilities or equity: a company can
buy work space through profits, borrowing money or injected capital (for
shares).
buy work space through profits, debts or injected capital (fund raising).
A difference is made between assets (e.g. a building) and expenses (e.g. fuel)
in assets having intrinsic value over time, versus expenses having value in
them being consumed for the company to "work".
.. highlights:: What is owned (assets) has been financed through debts to
reimburse (liabilities) or equity (profits, capital).
.. rst-class:: force-right accounts-table
.. h:div:: force-right accounts-table
.. figure:: images/accounts.png
:align: center
Assets = Liabilities + Equity
What is owned has been financed through debts to reimburse or acquired
assets (profits, capical).
.. placeholder
Chart of Accounts
=================
The **chart of accounts** lists all the accounts used by the company, whether
they are balance sheet accounts (assets and liabilities) or P&L accounts
(revenues and expenses), and provides their state at a given moment, generally
the current point of an ongoing financial period, or the state at the end of a
closed financial period.
The accounts are used to organize and classify the finances of the company in
order to better understand its state and health, and the chart of accounts can
be used to get a snapshot of a company's financial period: because it includes
P&L, a chart of accounts is also generally viewed over a specific period.
they are balance sheet accounts or P&L accounts. Every financial transaction
(e.g. a payment, an invoice) impacts accounts by moving value from one account
(credit) to an other account (debit).
.. rst-class:: force-right
Balance = debit - credit
Balance = Debit - Credit
------------------------
.. h:div:: chart-of-accounts
Requires javascript
.. placeholder
Journal Entries
===============
The chart of accounts displays the state of the company at a given moment
("current" or over an accounting period).
Every financial document of the company (e.g. an invoice, a bank statement, a
pay slip, a capital increase contract) is recorded as a journal entry,
impacting several accounts.
This state is the effect of the company's financial operations (being paid for
services, paying rent, receiving interests, …). These transactions are
recorded as journal entries over the course of financial periods:
Each *journal entry* is the interaction between at least two accounts (one
being debited and the other one credited). For a journal entry to be
*balanced*, the sum of all its debits must be equal to the sum of all its
credits. A journal entry almost always corresponds to a separate justifying
document (invoice, pay slip, …; financial audits may include matching entries
to the "hard" evidence of these documents).
A journal entry is composed of multiple *journal items*. Journal items are
either a credit or a debit on a specific account, and journal entries are thus
composed of at least two items.
For a journal entry to be *balanced*, the sum of all its debits must be equal
to the sum of all its credits.
Companies can triage entries in various journals based on their nature or
context. Common journals are:
* a sales journal with all client transactions
* a purchase journal with all supplier transactions
* a sales journal with all customer invoices and refunds
* a purchase journal with all supplier bills
* a bank journal for bank statements
* a cash journal for cash operations
.. h:div:: force-right journal-entries
examples of accounting entries for various transactions
examples of accounting entries for various transactions. Example:
Example 1: Customer Invoice:
Explanation:
. You generate a revenue of $1,000
. You have a tax to pay of $90
. The customer owes $1,090
Configuration:
. Income: defined on the product, or the product category
. Account Receivable: defined on the customer
. Tax: defined on the tax set on the invoice line
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.
Example 2: Customer Payment:
Explanation:
. Your customer owes $1,090 less
. Your receive $1,090 on your bank account
Configuration:
. Bank Account: defined on the related bank journal
. Account Receivable: defined on the customer
.. todo::
* help explaining what the operation is about?
* link to relevant Odoo operation?
* use radio buttons instead of the selection box
Reconciliation
==============
At a financial level, journal entries (and the corresponding operations in a
company's account) are independent from one another: the invoices a company
emits and the payments it receives are separate journal entries and the
account operations are not correlated.
emits and the payments it receives are separate journal entries.
It's thus easy to know how much was sold (by tallying the income account) and
how the company is still owed overall (receivables) but not how much a
@ -145,7 +144,7 @@ specific client owes or which specific invoices are still unpaid (in order to
send reminders for instance).
Reconciliation is the process of correlating and linking journal items,
matching the credits and debits of a specific financial account:
matching the credits and debits of a specific account:
* within a single account, look for all non-reconciled items (usually with a
specific second party, e.g. all operations on *Accounts Receivable*
@ -172,24 +171,29 @@ specific customer will result in:
+-------------------------+-------------------------+-------------------------+
|Accounts Receivable |Debit |Credit |
+=========================+=========================+=========================+
|Invoice 1 |121 | |
|Invoice 1 |100 | |
+-------------------------+-------------------------+-------------------------+
|Payment 1 | |75 |
|Payment 1.1 | |70 |
+-------------------------+-------------------------+-------------------------+
|Payment 2 (partial) | |46 |
|Invoice 2 |65 | |
+-------------------------+-------------------------+-------------------------+
| |
|Payment 1.2 | |30 |
+-------------------------+-------------------------+-------------------------+
|Invoice 2 |63 | |
|Payment 2 | |65 |
+-------------------------+-------------------------+-------------------------+
|Payment 2 | |29 |
|Invoice 3 |50 | |
+-------------------------+-------------------------+-------------------------+
|Open Balance | |34 |
| | | |
+-------------------------+-------------------------+-------------------------+
|Total To Pay |50 | |
+-------------------------+-------------------------+-------------------------+
The reconciliation process yields the first invoice being paid in full, but
the customer having "Invoice 2" still open (it has an open balance) and an
outstanding debt of 34€.
.. todo::
Add a button "Reconcile", when clicked:
- slowly hide: Invoice 2, Payment 2
- then, slowly hide: Invoice 1, Payment 1.1, Payment 1.2
Bank Reconciliation
-------------------