Koha/t/db_dependent/api/v1
Tomas Cohen Arazi bb7c908dc0 Bug 20942: Split debit and credit lines
This patch splits the balance to match this object schema:

{
    balance             => #,
    outstanding_credits => {
        total => #,
        lines => [ credit_line_1, ..., credit_line_n ]
    },
    outstanding_debits  => {
        total => #,
        lines => [ debit_line_1, ..., debit_line_m ]
    }
}

This change is made to ease usage from the UI. Also because the
outstanding credits need to be applied to outstanding debits in order to
the balance value to make sense. So we still need to have each total.

Tests are added for this change, and the schema files are adjusted as
well.

To test:
- Apply this patch
- Run:
  $ kshell
 k$ prove t/db_dependent/api/v1/patrons_accounts.t
=> SUCCESS: Tests pass!
- Sign off :-D

staff_id is changed into user_id as voted on the dev meeting the RFC got
approved.

Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>

Signed-off-by: Josef Moravec <josef.moravec@gmail.com>

Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>

Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
2018-07-18 16:49:27 +00:00
..
acquisitions_vendors.t Bug 18120: /acquisitions/vendors unit tests 2017-09-29 17:13:13 -03:00
auth.t Bug 18137: (QA followup) Make sure the session exists and is expired on expiration tests 2017-09-21 11:27:05 -03:00
cities.t Bug 20004: Unit tests 2018-02-16 17:53:41 -03:00
holds.t Bug 20167: Regression test 2018-03-15 08:24:00 +00:00
illrequests.t Bug 7317: (QA followup) Rename 'branch' for 'library' 2017-11-09 11:42:16 -03:00
oauth.t Bug 20624: Net::OAuth2::AuthorizationServer is not a hard dependency 2018-05-09 12:56:03 -03:00
patrons.t Bug 20287: Fix tests expecting a warning 2018-07-18 15:49:56 +00:00
patrons_accounts.t Bug 20942: Split debit and credit lines 2018-07-18 16:49:27 +00:00