147 RegisterGenerator reg =
new RegisterGenerator();
148 RegisterView formalView = ViewWrapper.getFormalView();
149 reg.getRegister().setView(formalView);
150 reg.getRegister().setRegisterDate(date);
154 for(SettlementEntry se :
this) {
155 Account acc =
new Account();
156 acc.setId(se.getAccount());
157 if(se.isChecked() && se.isCreditorIRPF()) {
158 reg.addAccount(acc, I_.get(
"Settlement") +
" " + I_.get(
"Treasury"), se.getAmount(), 0);
159 total -= se.getAmount();
164 Account acc =
new Account();
165 acc.setId(
"4751000000");
166 reg.addAccount(acc, I_.get(
"Settlement") +
" " + I_.get(
"Treasury"), 0.0, -total);
167 }
else if(total > 0.0) {
168 Account acc =
new Account();
169 acc.setId(
"4730000000");
170 reg.addAccount(acc, I_.get(
"Settlement") +
" " + I_.get(
"Treasury"), total, 0.0);
173 FinancialsMenu.showRegister(reg.getRegister());
175 RegisterGenerator reg2 =
new RegisterGenerator();
176 reg2.getRegister().setView(formalView);
177 reg2.getRegister().setRegisterDate(settlementDate);
180 Account acc =
new Account();
181 acc.setId(
"4751000000");
182 reg2.addAccount(acc, I_.get(
"Settlement") +
" " + I_.get(
"Treasury"), -total, 0.0);
183 }
else if(total > 0.0) {
184 Account acc =
new Account();
185 acc.setId(
"4730000000");
186 reg2.addAccount(acc, I_.get(
"Settlement") +
" " + I_.get(
"Treasury"), 0.0, total);
189 for(SettlementEntry se :
this) {
190 Account acc =
new Account();
191 acc.setId(se.getAccount());
192 if(se.isChecked() && se.isCreditorVAT()) {
193 reg2.addAccount(acc, I_.get(
"Settlement") +
" " + I_.get(
"Treasury"), se.getAmount(), 0);
194 total -= se.getAmount();
195 }
else if(se.isChecked() && se.isDebtor()) {
196 reg2.addAccount(acc, I_.get(
"Settlement") +
" " + I_.get(
"Treasury"), 0, se.getAmount());
197 total += se.getAmount();
202 reg2.addAccount(store, I_.get(
"Settlement") +
" " + I_.get(
"Treasury"), 0.0, -total);
203 }
else if(total > 0.0) {
204 reg2.addAccount(store, I_.get(
"Settlement") +
" " + I_.get(
"Treasury"), total, 0.0);
207 FinancialsMenu.showRegister(reg2.getRegister());