@@ -22,6 +22,41 @@ LedgerSMB::Workflow::Action::Reconciliation - Collection of actions for reconcil
2222
2323=head1 DESCRIPTION
2424
25+ This action holds all functionality required to run a (basic) reconciliation
26+ process: matching of (bank) statement lines against what is recorded in the
27+ books.
28+
29+ =head2 Book-side algorithm
30+
31+ In some cases, it's required or desirable to combine multiple journal lines
32+ into a single line to be matched with the (bank) statement. One case concerns
33+ payments; these are recorded as multiple journal lines when they are used to
34+ clear multiple invoices, however in practice there's only a single payment.
35+
36+ A special case is where a payment is combined with transaction costs; the payment
37+ is recorded in the cash screen and the transaction costs (or other correction) is
38+ recorded using a general journal, using the same C< source > .
39+
40+ Last, all general journal lines with the same C< source > are combined into a
41+ single line; except where the C< source > is an empty string or C< NULL > value.
42+
43+
44+ =head2 Reconciliation algorithm
45+
46+ Items are taken from the C< _stmt_todo > context parameter in the order given.
47+ Handling of items differs between the cases where the statement item has a
48+ C< source > specified or not.
49+
50+ If there B<is > a C<source > , the algorithm finds items in the books which have
51+ the same posting date I<and > C<source > value. If there is only one, it's a
52+ match. If there are multiple, the search is repeated; this time the C<amount >
53+ is included. If there is exactly one resulting item, it's a match. Otherwise
54+ the algorithm fails.
55+
56+ If there is B<no > C<source > , the algorithm searches items in the books where
57+ C<amount > and C<post_date > match and the book item does not have a C<source >
58+ value. The first of all matching items is considered a match.
59+
2560=head1 PROPERTIES
2661
2762=head2 entrypoint
@@ -34,12 +69,24 @@ Available values:
3469
3570=item * add_pending_items
3671
72+ Processes payments and general journal lines, combining them into
73+ lines which are eligible for inclusion into the reconciliation report.
74+
75+ The C<_book_todo > context parameter is modified to include the result.
76+
3777=item * approve
3878
3979=item * delete
4080
4181=item * reconcile
4282
83+ Processes the items in the C<_book_todo > and C<_stmt_todo > context
84+ parameters. Matched items are moved to the C<_recon_done > context
85+ parameter.
86+
87+ The C<_stmt_todo > parameter needs to be set up in the context based
88+ on an imported statement file before invoking this action.
89+
4390=item * reject
4491
4592=item * submit
0 commit comments