• R/O
  • SSH
  • HTTPS

aoiro: Commit


Commit MetaInfo

Revisão6 (tree)
Hora2018-01-22 17:25:47
Autorhirukawa_ryo

Mensagem de Log

* aoiro 0.1.3
損益計算書の合計(青色申告特別控除前の所得金額)がマイナスのときに△符号が付かないバグを修正しました。

Mudança Sumário

Diff

--- aoiro/trunk/src/main/java/net/osdn/aoiro/report/ProfitAndLoss.java (revision 5)
+++ aoiro/trunk/src/main/java/net/osdn/aoiro/report/ProfitAndLoss.java (revision 6)
@@ -306,13 +306,20 @@
306306 printData.add("\t\\line " + String.format("95 30.8 95 %.2f", 37 + y + ROW_HEIGHT + 0.4));
307307 printData.add("\t\\box 0 37 -0 -0");
308308
309- printData.add("\t\t\\font serif 10 bold");
310- printData.add("\t\t\\box " + String.format("2 %.2f 63 %.2f", y, ROW_HEIGHT));
311- printData.add("\t\t\\align center left");
312- printData.add("\t\t\\text " + list.get(0).getName());
313- printData.add("\t\t\\box " + String.format("63 %.2f 27 %.2f", y, ROW_HEIGHT));
314- printData.add("\t\t\\align center right");
315- printData.add("\t\t\\text " + formatMoney(list.get(0).getValue().getValue()));
309+ //合計 (青色申告特別控除前の所得金額)
310+ {
311+ String displayName = list.get(0).getName();
312+ Amount amount = list.get(0).getValue();
313+ int amountValue = (amount.getNormalBalance() == Creditor.class) ? amount.getValue() : -amount.getValue();
314+
315+ printData.add("\t\t\\font serif 10 bold");
316+ printData.add("\t\t\\box " + String.format("2 %.2f 63 %.2f", y, ROW_HEIGHT));
317+ printData.add("\t\t\\align center left");
318+ printData.add("\t\t\\text " + displayName);
319+ printData.add("\t\t\\box " + String.format("63 %.2f 27 %.2f", y, ROW_HEIGHT));
320+ printData.add("\t\t\\align center right");
321+ printData.add("\t\t\\text " + formatMoney(amountValue));
322+ }
316323
317324 //月別
318325 Amount salesTotal = null;
Show on old repository browser