Class BalanceDebitorActionDisplayServiceImpl
java.lang.Object
ch.tocco.nice2.optional.debitor.impl.action.BalanceDebitorActionDisplayServiceImpl
- All Implemented Interfaces:
BalanceDebitorActionDisplayService
public class BalanceDebitorActionDisplayServiceImpl
extends Object
implements BalanceDebitorActionDisplayService
-
Constructor Summary
ConstructorsConstructorDescriptionBalanceDebitorActionDisplayServiceImpl(EntityExplorerActionSelectionService selectionService, Context context, DefaultDisplayService defaultDisplayService) -
Method Summary
Modifier and TypeMethodDescriptionReturns the default loss and gain accounts based on the Voucher_types win and loss.getNumberOfDebitorsUnbalanced(EntityExplorerActionSelection selectedDebitors) Get count of negatively and postively unbalanced debitors, ignoring balanced debitors.booleanisAnyBalanceGreaterThan(EntityExplorerActionSelection selectedDebitors, BigDecimal maxDiscrepancy) Check if any Debitor balance deviates more than given value from zero.
-
Constructor Details
-
BalanceDebitorActionDisplayServiceImpl
public BalanceDebitorActionDisplayServiceImpl(EntityExplorerActionSelectionService selectionService, Context context, DefaultDisplayService defaultDisplayService)
-
-
Method Details
-
isAnyBalanceGreaterThan
public boolean isAnyBalanceGreaterThan(EntityExplorerActionSelection selectedDebitors, BigDecimal maxDiscrepancy) Description copied from interface:BalanceDebitorActionDisplayServiceCheck if any Debitor balance deviates more than given value from zero.- Specified by:
isAnyBalanceGreaterThanin interfaceBalanceDebitorActionDisplayService- Parameters:
selectedDebitors- debitors selectedmaxDiscrepancy- max. amount balance may deviate from zero- Returns:
- true if any debitor's balance is off by more than value. Otherwise, false.
-
getNumberOfDebitorsUnbalanced
public Map<String,Object> getNumberOfDebitorsUnbalanced(EntityExplorerActionSelection selectedDebitors) Description copied from interface:BalanceDebitorActionDisplayServiceGet count of negatively and postively unbalanced debitors, ignoring balanced debitors.- Specified by:
getNumberOfDebitorsUnbalancedin interfaceBalanceDebitorActionDisplayService- Parameters:
selectedDebitors- Debitors selected- Returns:
- Map with keys "postive" to hold count of positively unbalanced debitors, and "negative" for negatively unbalanced.
-
getDefaultAccounts
Description copied from interface:BalanceDebitorActionDisplayServiceReturns the default loss and gain accounts based on the Voucher_types win and loss.- Specified by:
getDefaultAccountsin interfaceBalanceDebitorActionDisplayService
-