• R/O
  • SSH
  • HTTPS

aoiro: Commit


Commit MetaInfo

Révision52 (tree)
l'heure2020-06-26 12:12:01
Auteurhirukawa_ryo

Message de Log

* aoiro 0.7
純資産(NetAssets)を資本(Equity)に置き換えました。

Change Summary

Modification

--- aoiro/trunk/src/main/java/net/osdn/aoiro/AccountSettlement.java (revision 51)
+++ aoiro/trunk/src/main/java/net/osdn/aoiro/AccountSettlement.java (revision 52)
@@ -207,8 +207,8 @@
207207 //負債勘定科目
208208 Set<AccountTitle> liabilitiesAccountTitles = new LinkedHashSet<>();
209209
210- //純資産勘定科目
211- Set<AccountTitle> netAssetsAccountTitles = new LinkedHashSet<>();
210+ //資本(純資産)勘定科目
211+ Set<AccountTitle> equityAccountTitles = new LinkedHashSet<>();
212212
213213 //使用されている収益勘定科目と費用勘定科目を抽出します。
214214 for(JournalEntry entry : journalEntries) {
@@ -521,21 +521,21 @@
521521 }
522522 }
523523
524- //使用されている純資産勘定科目を抽出します。
524+ //使用されている資本(純資産)勘定科目を抽出します。
525525 for(JournalEntry entry : journalEntries) {
526526 for(Creditor creditor : entry.getCreditors()) {
527- if(creditor.getAccountTitle().getType() == AccountType.NetAssets) {
528- netAssetsAccountTitles.add(creditor.getAccountTitle());
527+ if(creditor.getAccountTitle().getType() == AccountType.Equity) {
528+ equityAccountTitles.add(creditor.getAccountTitle());
529529 }
530530 }
531531 for(Debtor debtor : entry.getDebtors()) {
532- if(debtor.getAccountTitle().getType() == AccountType.NetAssets) {
533- netAssetsAccountTitles.add(debtor.getAccountTitle());
532+ if(debtor.getAccountTitle().getType() == AccountType.Equity) {
533+ equityAccountTitles.add(debtor.getAccountTitle());
534534 }
535535 }
536536 }
537537
538- //純資産(資本)の残高振替
538+ //資本(純資産)の残高振替
539539 {
540540 List<Debtor> debtors = new ArrayList<>();
541541 long debtorsTotal = 0;
@@ -542,7 +542,7 @@
542542 List<Creditor> creditors = new ArrayList<>();
543543 long creditorsTotal = 0;
544544
545- for(AccountTitle accountTitle : netAssetsAccountTitles) {
545+ for(AccountTitle accountTitle : equityAccountTitles) {
546546 long total = 0;
547547 List<JournalEntry> entries = getJournalEntriesByAccount(journalEntries, accountTitle);
548548 for(JournalEntry entry : entries) {
--- aoiro/trunk/src/main/java/net/osdn/aoiro/loader/yaml/AccountTitlesLoader.java (revision 51)
+++ aoiro/trunk/src/main/java/net/osdn/aoiro/loader/yaml/AccountTitlesLoader.java (revision 52)
@@ -1,7 +1,6 @@
11 package net.osdn.aoiro.loader.yaml;
22
33 import java.io.IOException;
4-import java.lang.reflect.Array;
54 import java.nio.charset.StandardCharsets;
65 import java.nio.file.Files;
76 import java.nio.file.Path;
@@ -141,10 +140,10 @@
141140 throw error(" [エラー] " + path + "\r\n 純資産の形式に誤りがあります。");
142141 }
143142 @SuppressWarnings("unchecked")
144- List<String> netAssets = (List<String>)obj2;
145- if(netAssets != null) {
146- for(String displayName : netAssets) {
147- AccountTitle accountTitle = new AccountTitle(AccountType.NetAssets, displayName);
143+ List<String> equity = (List<String>)obj2;
144+ if(equity != null) {
145+ for(String displayName : equity) {
146+ AccountTitle accountTitle = new AccountTitle(AccountType.Equity, displayName);
148147 accountTitles.add(accountTitle);
149148 accountTitleByDisplayName.put(displayName, accountTitle);
150149 }
@@ -207,7 +206,7 @@
207206 throw error(" [エラー] " + path + "\r\n 損益計算書に資産の勘定科目を指定することはできません: " + displayName);
208207 } else if(accountTitle.getType() == AccountType.Liabilities) {
209208 throw error(" [エラー] " + path + "\r\n 損益計算書に負債の勘定科目を指定することはできません: " + displayName);
210- } else if(accountTitle.getType() == AccountType.NetAssets) {
209+ } else if(accountTitle.getType() == AccountType.Equity) {
211210 throw error(" [エラー] " + path + "\r\n 損益計算書に資本(純資産)の勘定科目を指定することはできません: " + displayName);
212211 }
213212 return accountTitle;
@@ -607,7 +606,7 @@
607606 System.out.println(" [警告] 貸借対照表に「" + accountTitle.getDisplayName() + "」が含まれていません。");
608607 valid = false;
609608 }
610- if(accountTitle.getType() == AccountType.NetAssets && !bsAccountTitles.contains(accountTitle)) {
609+ if(accountTitle.getType() == AccountType.Equity && !bsAccountTitles.contains(accountTitle)) {
611610 System.out.println(" [警告] 貸借対照表に「" + accountTitle.getDisplayName() + "」が含まれていません。");
612611 valid = false;
613612 }
@@ -728,7 +727,7 @@
728727 case Liabilities:
729728 liabilities.add(accountTitle.getDisplayName());
730729 break;
731- case NetAssets:
730+ case Equity:
732731 equity.add(accountTitle.getDisplayName());
733732 break;
734733 case Revenue:
--- aoiro/trunk/src/main/java/net/osdn/aoiro/model/AccountTitle.java (revision 51)
+++ aoiro/trunk/src/main/java/net/osdn/aoiro/model/AccountTitle.java (revision 52)
@@ -19,10 +19,10 @@
1919 public static AccountTitle BALANCE = new AccountTitle(AccountType.Assets, "残高", true);
2020
2121 /** 決算勘定「繰越利益剰余金」です。収益-費用で算出されます。法人で使用する勘定科目です。*/
22- public static AccountTitle RETAINED_EARNINGS = new AccountTitle(AccountType.NetAssets, "繰越利益剰余金", true);
22+ public static AccountTitle RETAINED_EARNINGS = new AccountTitle(AccountType.Equity, "繰越利益剰余金", true);
2323
2424 /** 決算勘定「控除前の所得金額」です。収益-費用で算出されます。個人事業主で使用する勘定科目です。*/
25- public static AccountTitle PRETAX_INCOME = new AccountTitle(AccountType.NetAssets, "控除前の所得金額", true);
25+ public static AccountTitle PRETAX_INCOME = new AccountTitle(AccountType.Equity, "控除前の所得金額", true);
2626
2727 /** 種類 */
2828 private AccountType type;
--- aoiro/trunk/src/main/java/net/osdn/aoiro/model/AccountType.java (revision 51)
+++ aoiro/trunk/src/main/java/net/osdn/aoiro/model/AccountType.java (revision 52)
@@ -11,8 +11,8 @@
1111 /** 負債 */
1212 Liabilities(Creditor.class),
1313
14- /** 純資産 */
15- NetAssets(Creditor.class),
14+ /** 資本(純資産) */
15+ Equity(Creditor.class),
1616
1717 /** 収益 */
1818 Revenue(Creditor.class),
@@ -28,7 +28,7 @@
2828
2929 /** この勘定の通常のバランスを返します。
3030 * Assets(資産)、Expense(費用)は借方(Debtor.class)を返し、借方で増加、貸方で減少する勘定です。
31- * Liabilities(負債)、NetAssets(純資産)、収益(Revenue)は貸方(Creditor.class)を返し、借方で減少、貸方で増加する勘定です。
31+ * Liabilities(負債)、Equity(資本)、収益(Revenue)は貸方(Creditor.class)を返し、借方で減少、貸方で増加する勘定です。
3232 *
3333 * @return 通常バランスが借方の場合、Debtor.class を返します。通常バランスが貸方の場合、Creditor.class を返します。
3434 */
--- aoiro/trunk/src/main/java/net/osdn/aoiro/report/BalanceSheet.java (revision 51)
+++ aoiro/trunk/src/main/java/net/osdn/aoiro/report/BalanceSheet.java (revision 52)
@@ -14,11 +14,9 @@
1414 import java.time.format.DateTimeFormatter;
1515 import java.util.ArrayList;
1616 import java.util.HashMap;
17-import java.util.HashSet;
1817 import java.util.List;
1918 import java.util.Map;
2019 import java.util.Map.Entry;
21-import java.util.Set;
2220
2321 import net.osdn.aoiro.AccountSettlement;
2422 import net.osdn.aoiro.Util;
@@ -163,7 +161,7 @@
163161 assetsList = getList(child);
164162 } else if(child.getName().equals("負債")) {
165163 liabilitiesList = getList(child);
166- } else if(child.getName().equals("純資産") || child.getName().equals("資本")) {
164+ } else if(child.getName().equals("資本") || child.getName().equals("純資産")) {
167165 equityList = getList(child);
168166 }
169167 }
@@ -589,7 +587,7 @@
589587 }
590588 y += ROW_HEIGHT;
591589 }
592- //純資産(資本)
590+ //資本(純資産)
593591 y = (rows - equityList.size()) * ROW_HEIGHT;
594592 printData.add("\t\\line " + String.format("87.7 %.2f -0 %.2f", y, y));
595593 for(int i = 1; i < equityList.size(); i++) {
@@ -652,7 +650,7 @@
652650 }
653651 }
654652 if(liabilitiesList.size() > 0 || equityList.size() > 0) {
655- //合計(負債、純資産)
653+ //合計(負債、資本)
656654 String displayName = "合計";
657655 int openingAmount = 0;
658656 int closingAmount = 0;
@@ -715,7 +713,7 @@
715713 String nextOpeningDate = DateTimeFormatter.ISO_LOCAL_DATE.format(this.closingDate.plusDays(1));
716714
717715 if(isSoloProprietorship) {
718- //個人事業主の場合は、事業主貸(資産)、事業主借(負債)、所得金額(純資産)が次期の元入金に加算されます。
716+ //個人事業主の場合は、事業主貸(資産)、事業主借(負債)、所得金額(資本)が次期の元入金に加算されます。
719717 //事業主貸、事業主借を除く資産と負債を集計して次期開始仕訳を作成します。
720718 //相手勘定科目はすべて元入金になります。
721719 for(Entry<AccountTitle, Amount> e : closingBalances.entrySet()) {
@@ -791,7 +789,7 @@
791789 } else {
792790 creditors.add(e);
793791 }
794- } else if(accountTitle.getType() == AccountType.Liabilities || accountTitle.getType() == AccountType.NetAssets) {
792+ } else if(accountTitle.getType() == AccountType.Liabilities || accountTitle.getType() == AccountType.Equity) {
795793 if(amount.getValue() == 0) {
796794 continue;
797795 } else if(amount.getValue() > 0) {
--- aoiro/trunk/src/main/java/net/osdn/aoiro/report/GeneralLedger.java (revision 51)
+++ aoiro/trunk/src/main/java/net/osdn/aoiro/report/GeneralLedger.java (revision 52)
@@ -219,7 +219,7 @@
219219 printData.add("\t\t\\font serif 10");
220220 printData.add("\t\t\\align center right");
221221 printData.add("\t\t\\text " + String.format("%,d", counterpartAccount.getAmount()));
222- //資産、費用の場合は増加、負債、純資産、収益の場合は減少
222+ //資産、費用の場合は増加、負債、資本(純資産)、収益の場合は減少
223223 if(account.getAccountTitle().getType().getNormalBalance() == Debtor.class) {
224224 accountTitleTotal += counterpartAccount.getAmount();
225225 } else {
@@ -234,7 +234,7 @@
234234 printData.add("\t\t\\font serif 10");
235235 printData.add("\t\t\\align center right");
236236 printData.add("\t\t\\text " + String.format("%,d", counterpartAccount.getAmount()));
237- //負債、純資産、収益の場合は増加、資産、費用の場合は減少
237+ //負債、資本(純資産)、収益の場合は増加、資産、費用の場合は減少
238238 if(account.getAccountTitle().getType().getNormalBalance() == Creditor.class) {
239239 accountTitleTotal += counterpartAccount.getAmount();
240240 } else {
--- aoiro/trunk/src/main/java/net/osdn/aoiro/report/StatementOfChangesInEquity.java (revision 51)
+++ aoiro/trunk/src/main/java/net/osdn/aoiro/report/StatementOfChangesInEquity.java (revision 52)
@@ -81,7 +81,7 @@
8181 for(JournalEntry entry : journalEntries) {
8282 if(entry.isOpening()) { //当期首残高
8383 for(Debtor debtor : entry.getDebtors()) {
84- if(debtor.getAccountTitle().getType() == AccountType.NetAssets) {
84+ if(debtor.getAccountTitle().getType() == AccountType.Equity) {
8585 Amount amount = openingBalances.get(debtor.getAccountTitle());
8686 if(amount == null) {
8787 amount = new Amount(debtor.getAccountTitle().getType().getNormalBalance(), 0);
@@ -95,7 +95,7 @@
9595 }
9696 }
9797 for(Creditor creditor : entry.getCreditors()) {
98- if(creditor.getAccountTitle().getType() == AccountType.NetAssets) {
98+ if(creditor.getAccountTitle().getType() == AccountType.Equity) {
9999 Amount amount = openingBalances.get(creditor.getAccountTitle());
100100 if(amount == null) {
101101 amount = new Amount(creditor.getAccountTitle().getType().getNormalBalance(), 0);
@@ -110,7 +110,7 @@
110110 }
111111 } else if(entry.isBalance()) { //当期末残高
112112 for(Debtor debtor : entry.getDebtors()) {
113- if(debtor.getAccountTitle().getType() == AccountType.NetAssets) {
113+ if(debtor.getAccountTitle().getType() == AccountType.Equity) {
114114 Amount amount = closingBalances.get(debtor.getAccountTitle());
115115 if(amount == null) {
116116 amount = new Amount(debtor.getAccountTitle().getType().getNormalBalance(), 0);
@@ -124,7 +124,7 @@
124124 }
125125 }
126126 for(Creditor creditor : entry.getCreditors()) {
127- if(creditor.getAccountTitle().getType() == AccountType.NetAssets) {
127+ if(creditor.getAccountTitle().getType() == AccountType.Equity) {
128128 Amount amount = closingBalances.get(creditor.getAccountTitle());
129129 if(amount == null) {
130130 amount = new Amount(creditor.getAccountTitle().getType().getNormalBalance(), 0);
@@ -139,7 +139,7 @@
139139 }
140140 } else { //当期変動額
141141 for(Debtor debtor : entry.getDebtors()) {
142- if(debtor.getAccountTitle().getType() == AccountType.NetAssets) {
142+ if(debtor.getAccountTitle().getType() == AccountType.Equity) {
143143 Map<AccountTitle, Amount> map = changes.get(entry.getDescription());
144144 if(map == null) {
145145 map = new HashMap<AccountTitle, Amount>();
@@ -158,7 +158,7 @@
158158 }
159159 }
160160 for(Creditor creditor : entry.getCreditors()) {
161- if(creditor.getAccountTitle().getType() == AccountType.NetAssets) {
161+ if(creditor.getAccountTitle().getType() == AccountType.Equity) {
162162 Map<AccountTitle, Amount> map = changes.get(entry.getDescription());
163163 if(map == null) {
164164 map = new HashMap<AccountTitle, Amount>();
Afficher sur ancien navigateur de dépôt.