• R/O
  • SSH
  • HTTPS

aoiro: Commit


Commit MetaInfo

Revision60 (tree)
Zeit2020-10-02 09:25:47
Autorhirukawa_ryo

Log Message

* aoiro 0.7.2
ProfitAndLoss リストデータと月別集計データを取得するメソッドを追加しました。
BalanceSheet リストデータを取得するメソッドを追加しました。
これらのメソッドはGUI画面に損益計算書・貸借対照表を表示するために使用します。

Ändern Zusammenfassung

Diff

--- aoiro/trunk/src/main/java/net/osdn/aoiro/report/BalanceSheet.java (revision 59)
+++ aoiro/trunk/src/main/java/net/osdn/aoiro/report/BalanceSheet.java (revision 60)
@@ -218,6 +218,24 @@
218218 }
219219 }
220220
221+ // PDF出力に使用する資産のリストデータです。
222+ // 貸借対照表を画面に表示するなどPDF出力とは別の用途で使用するのに役立ちます。
223+ public List<Node<Entry<List<AccountTitle>, Amount[]>>> getAssetsList() {
224+ return assetsList;
225+ }
226+
227+ // PDF出力に使用する負債のリストデータです。
228+ // 貸借対照表を画面に表示するなどPDF出力とは別の用途で使用するのに役立ちます。
229+ public List<Node<Entry<List<AccountTitle>, Amount[]>>> getLiabilitiesList() {
230+ return liabilitiesList;
231+ }
232+
233+ // PDF出力に使用する資本(純資産)のリストデータです。
234+ // 貸借対照表を画面に表示するなどPDF出力とは別の用途で使用するのに役立ちます。
235+ public List<Node<Entry<List<AccountTitle>, Amount[]>>> getEquityList() {
236+ return equityList;
237+ }
238+
221239 public List<String> getWarnings() {
222240 return warnings;
223241 }
--- aoiro/trunk/src/main/java/net/osdn/aoiro/report/ProfitAndLoss.java (revision 59)
+++ aoiro/trunk/src/main/java/net/osdn/aoiro/report/ProfitAndLoss.java (revision 60)
@@ -112,7 +112,19 @@
112112 }
113113 r.close();
114114 }
115-
115+
116+ // PDF出力に使用するリストデータです。
117+ // 損益計算書を画面に表示するなどPDF出力とは別の用途で使用するのに役立ちます。
118+ public List<Node<Entry<List<AccountTitle>, Amount>>> getList() {
119+ return list;
120+ }
121+
122+ // PDF出力に使用する月別集計データです。
123+ // 損益計算書を画面に表示するなどPDF出力とは別の用途で使用するのに役立ちます。
124+ public List<Entry<String, Amount[]>> getMonthlyTotals() {
125+ return monthlyTotals;
126+ }
127+
116128 private Amount retrieve(Node<Entry<List<AccountTitle>, Amount>> node, List<JournalEntry> journalEntries) {
117129 Amount amount = null;
118130 for(Node<Entry<List<AccountTitle>, Amount>> child : node.getChildren()) {
@@ -200,10 +212,12 @@
200212 //月別集計
201213 protected List<Entry<String, Amount[]>> getMonthlyTotals(List<JournalEntry> journalEntries) {
202214 Map<String, Amount[]> map = new LinkedHashMap<>();
203- YearMonth ym = YearMonth.from(this.openingDate);
204- for(int i = 0; i < 12; i++) {
205- String month = ym.plusMonths(i).getMonthValue() + "月";
206- map.put(month, new Amount[2]);
215+ if(this.openingDate != null) {
216+ YearMonth ym = YearMonth.from(this.openingDate);
217+ for(int i = 0; i < 12; i++) {
218+ String month = ym.plusMonths(i).getMonthValue() + "月";
219+ map.put(month, new Amount[2]);
220+ }
207221 }
208222 if(isSoloProprietorship) {
209223 map.put("家事消費等", new Amount[2]);
Show on old repository browser