Initial version for repair chnage logic
Implement partial repair in invoice
Fix complication after partial repair work
invoice: rework invoice amounts definitions

These now behave the same as Analytics, as defined here:

  http://killbilling.org/analytics.html

Signed-off-by: Pierre-Alexandre Meyer <pierre@ning.com>
analytics: remove complexity

The complexity is now in invoice :-)

Signed-off-by: Pierre-Alexandre Meyer <pierre@ning.com>
server: fix tests failures

Signed-off-by: Pierre-Alexandre Meyer <pierre@ning.com>
Fix tests after Implementation of Partial repair and move of CBA into invoice DAO
Merge branch 'master' of github.com:killbill/killbill into invoice-rework
analytics: update is_recognizable in bii* tables

Switch to item_source, since is_recognizable is too specific.

Signed-off-by: Pierre-Alexandre Meyer <pierre@ning.com>
Merge remote-tracking branch 'origin/invoice-rework' into invoice-rework-2

Signed-off-by: Pierre-Alexandre Meyer <pierre@ning.com>

Conflicts:
	invoice/src/test/java/com/ning/billing/invoice/generator/TestDefaultInvoiceGenerator.java
invoice: fix merge issue

Signed-off-by: Pierre-Alexandre Meyer <pierre@ning.com>
analytics: fix isRevenueRecognizable helper

Make sure to look at items on the current invoice only.

Signed-off-by: Pierre-Alexandre Meyer <pierre@ning.com>
Invoice Partial repair logic debugging
Rework ClockMock for bug where adding months is wrong
util: fix ClockMock implementation

The clock was stuck in the getUTCNow() call (we were always returning a
constant point in time).

This fixes entitlement tests.

Signed-off-by: Pierre-Alexandre Meyer <pierre@ning.com>
beatrix: remove debugging class TestJoda

Signed-off-by: Pierre-Alexandre Meyer <pierre@ning.com>
beatrix, invoice: trivial code reformatting

Signed-off-by: Pierre-Alexandre Meyer <pierre@ning.com>
invoice: fix isRepareeItemForRepairedItem logic

We can't simply rely on dates in case of complete repairs, as the new
item matches the repaired item start date. This patch makes the code
check the catalog fields as well which fixes
TestIntegrationInvoiceWithRepairLogic beatrix tests

Signed-off-by: Pierre-Alexandre Meyer <pierre@ning.com>
invoice: fix bug in DefaultInvoiceGenerator

Rate being a BigDecimal, we should really use compareTo.

Signed-off-by: Pierre-Alexandre Meyer <pierre@ning.com>
beatrix: add missing expected NextEvent.INVOICE_ADJUSTMENT events

Signed-off-by: Pierre-Alexandre Meyer <pierre@ning.com>