• R/O
  • SSH
  • HTTPS

aoiro: Commit


Commit MetaInfo

Revisão19 (tree)
Hora2018-08-23 21:40:23
Autorhirukawa_ryo

Mensagem de Log

* aoiro 0.3.1 法人の場合は家事按分.ymlを参照しない(存在しなくてよい)ようにしました。

Mudança Sumário

Diff

--- aoiro/trunk/default/法人/家事按分.yml (revision 18)
+++ aoiro/trunk/default/法人/家事按分.yml (nonexistent)
@@ -1,3 +0,0 @@
1-- {勘定科目: 水道光熱費, 事業割合: 100.0}
2-- {勘定科目: 地代家賃, 事業割合: 100.0}
3-- {勘定科目: 通信費, 事業割合: 99.0}
--- aoiro/trunk/src/main/java/net/osdn/aoiro/cui/Main.java (revision 18)
+++ aoiro/trunk/src/main/java/net/osdn/aoiro/cui/Main.java (revision 19)
@@ -89,24 +89,31 @@
8989 return;
9090 }
9191
92- File proportionalDivisionsFile = getProportionalDivisionsFile(inputDir, defaultDir);
93- if(proportionalDivisionsFile == null) {
94- System.err.println("ファイルが見つかりません: 家事按分.yml");
95- pause();
96- return;
92+ File proportionalDivisionsFile = null;
93+ if(isSoloProprietorship) {
94+ proportionalDivisionsFile = getProportionalDivisionsFile(inputDir, defaultDir);
95+ if(proportionalDivisionsFile == null) {
96+ System.err.println("ファイルが見つかりません: 家事按分.yml");
97+ pause();
98+ return;
99+ }
97100 }
98101
99- System.out.println(" (1) 勘定科目 | " + accountTitlesFile.getAbsolutePath());
102+ int processNumber = 0;
103+ System.out.println(" (" + (++processNumber) + ") 勘定科目 | " + accountTitlesFile.getAbsolutePath());
100104 YamlAccountTitlesLoader accountTitlesLoader = new YamlAccountTitlesLoader(accountTitlesFile);
101105 Set<AccountTitle> accountTitles = accountTitlesLoader.getAccountTitles();
102106
103- System.out.println(" (2) 家事按分 | " + proportionalDivisionsFile.getAbsolutePath());
104- YamlProportionalDivisionsLoader proportionalDivisionsLoader = new YamlProportionalDivisionsLoader(proportionalDivisionsFile, accountTitles);
105- List<ProportionalDivision> proportionalDivisions = proportionalDivisionsLoader.getProportionalDivisions();
107+ List<ProportionalDivision> proportionalDivisions = null;
108+ if(proportionalDivisionsFile != null) {
109+ System.out.println(" (" + (++processNumber) + ") 家事按分 | " + proportionalDivisionsFile.getAbsolutePath());
110+ YamlProportionalDivisionsLoader proportionalDivisionsLoader = new YamlProportionalDivisionsLoader(proportionalDivisionsFile, accountTitles);
111+ proportionalDivisions = proportionalDivisionsLoader.getProportionalDivisions();
112+ }
106113
107114 YamlJournalsLoader journalsLoader = new YamlJournalsLoader(journalEntryFile, accountTitles);
108115 List<JournalEntry> journalEntries = journalsLoader.getJournalEntries();
109- System.out.println(" (3) 仕訳   | " + journalEntryFile.getAbsolutePath() + " (" + journalEntries.size() + "件)");
116+ System.out.println(" (" + (++processNumber) + ") 仕訳   | " + journalEntryFile.getAbsolutePath() + " (" + journalEntries.size() + "件)");
110117
111118 System.out.println("");
112119
Show on old repository browser