19 package org.turro.financials.treasury.m303;
21 import org.turro.financials.entity.Account;
22 import org.turro.financials.entity.Register;
23 import org.turro.financials.entity.RegisterEntry;
24 import org.turro.math.Zero;
25 import org.turro.util.CompareUtil;
31 public class Item349 implements Comparable<Item349> {
34 public double amount[] =
new double[2];
43 if(acc.
getId().matches(opAcc.replaceAll(
"_",
".").replaceAll(
"%",
".*"))) {
44 if(acc.
getId().startsWith(
"60") || acc.
getId().startsWith(
"70")) {
45 amount[0] +=
Zero.
near(re.getCredit(), 2) ? re.getDebit() : re.getCredit();
47 amount[1] +=
Zero.
near(re.getCredit(), 2) ? re.getDebit() : re.getCredit();
56 if(isAccountName(acc)) {
63 private static boolean isAccountName(
Account acc) {
64 if(acc.
getId().startsWith(
"43") || acc.
getId().startsWith(
"44") ||
65 acc.
getId().startsWith(
"40") || acc.
getId().startsWith(
"41")) {
73 return CompareUtil.compare(
name, o.
name);
Set< RegisterEntry > getRegisterEntries()
void addAmounts(Register r, String opAcc)
static String getName(Register r)
static boolean near(double value, int digits)