From bbdb5edd7f8711c0afa7064a654d0a7efbb56851 Mon Sep 17 00:00:00 2001 From: Moritz Bunkus Date: Tue, 16 Aug 2016 09:30:52 +0200 Subject: [PATCH] =?utf8?q?Bankauszug=20verbuchen:=20etwas=20Dokumentation?= =?utf8?q?=20erg=C3=A4nzen?= MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit --- SL/Controller/BankTransaction.pm | 65 ++++++++++++++++++++++++++++++++ 1 file changed, 65 insertions(+) diff --git a/SL/Controller/BankTransaction.pm b/SL/Controller/BankTransaction.pm index c16173537..841a47208 100644 --- a/SL/Controller/BankTransaction.pm +++ b/SL/Controller/BankTransaction.pm @@ -755,3 +755,68 @@ sub init_models { } 1; +__END__ + +=pod + +=encoding utf8 + +=head1 NAME + +SL::Controller::BankTransaction - Posting payments to invoices from +bank transactions imported earlier + +=head1 FUNCTIONS + +=over 4 + +=item C + +Takes a bank transaction ID (as parameter C and +tries to post its amount to a certain number of invoices (parameter +C, an array ref of database IDs to purchase or sales +invoice objects). + +The whole function is wrapped in a database transaction. If an +exception occurs the bank transaction is not posted at all. The same +is true if the code detects an error during the execution, e.g. a bank +transaction that's already been posted earlier. In both cases the +database transaction will be rolled back. + +If warnings but not errors occur the database transaction is still +committed. + +The return value is an error object or C if the function +succeeded. The calling function will collect all warnings and errors +and display them in a nicely formatted table if any occurred. + +An error object is a hash reference containing the following members: + +=over 2 + +=item * C — can be either C or C. Warnings are +displayed slightly different than errors. + +=item * C — a human-readable message included in the list of +errors meant as the description of why the problem happened + +=item * C, C — the same parameters +that the function was called with + +=item * C — the database object +(C) corresponding to C + +=item * C — an array ref of the database objects (either +C or C) corresponding to +C + +=back + +=back + +=head1 AUTHOR + +Niclas Zimmermann Eniclas@kivitendo-premium.deE, +Geoffrey Richardson Einformation@richardson-bueren.deE + +=cut -- 2.20.1