• R/O
  • SSH
  • HTTPS

aoiro: Commit


Commit MetaInfo

Revisão13 (tree)
Hora2018-03-07 21:37:42
Autorhirukawa_ryo

Mensagem de Log

aoiro 0.2.5
次年度の開始仕訳で0円の元入金仕訳が出力されてしまうバグを修正しました。

Mudança Sumário

Diff

--- aoiro/trunk/src/main/java/net/osdn/aoiro/cui/Main.java (revision 12)
+++ aoiro/trunk/src/main/java/net/osdn/aoiro/cui/Main.java (revision 13)
@@ -49,7 +49,7 @@
4949 }
5050
5151 if(filename == null) {
52- System.out.println("Usage: aoiro.exe [-o] <仕訳データファイル>");
52+ System.out.println("Usage: aoiro.exe <options> <仕訳データファイル>");
5353 System.out.println("Options:");
5454 System.out.println(" -o 決算処理をせずに仕訳帳と総勘定元帳を出力します。");
5555 System.out.println(" -p 個人事業主用のデータファイルを使用します。");
--- aoiro/trunk/src/main/java/net/osdn/aoiro/report/BalanceSheet.java (revision 12)
+++ aoiro/trunk/src/main/java/net/osdn/aoiro/report/BalanceSheet.java (revision 13)
@@ -465,7 +465,9 @@
465465 continue;
466466 }
467467 if(accountTitle.getType() == AccountType.Assets) {
468- if(amount.getValue() > 0) {
468+ if(amount.getValue() == 0) {
469+ continue;
470+ } else if(amount.getValue() > 0) {
469471 debtors.add(e);
470472 debtorsTotal += amount.getValue();
471473 } else {
@@ -473,7 +475,9 @@
473475 creditorsTotal -= amount.getValue();
474476 }
475477 } else if(accountTitle.getType() == AccountType.Liabilities) {
476- if(amount.getValue() > 0) {
478+ if(amount.getValue() == 0) {
479+ continue;
480+ } else if(amount.getValue() > 0) {
477481 creditors.add(e);
478482 creditorsTotal += amount.getValue();
479483 } else {
--- aoiro/trunk/src/main/java/net/osdn/aoiro/report/ProfitAndLoss.java (revision 12)
+++ aoiro/trunk/src/main/java/net/osdn/aoiro/report/ProfitAndLoss.java (revision 13)
@@ -309,8 +309,11 @@
309309 //合計 (青色申告特別控除前の所得金額)
310310 {
311311 String displayName = list.get(0).getName();
312+ int amountValue = 0;
312313 Amount amount = list.get(0).getValue();
313- int amountValue = (amount.getNormalBalance() == Creditor.class) ? amount.getValue() : -amount.getValue();
314+ if(amount != null) {
315+ amountValue = (amount.getNormalBalance() == Creditor.class) ? amount.getValue() : -amount.getValue();
316+ }
314317
315318 printData.add("\t\t\\font serif 10 bold");
316319 printData.add("\t\t\\box " + String.format("2 %.2f 63 %.2f", y, ROW_HEIGHT));
Show on old repository browser