aoiro 0.1.0__tar.gz → 0.1.1__tar.gz
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- {aoiro-0.1.0 → aoiro-0.1.1}/PKG-INFO +1 -1
- {aoiro-0.1.0 → aoiro-0.1.1}/pyproject.toml +1 -1
- {aoiro-0.1.0 → aoiro-0.1.1}/src/aoiro/__init__.py +1 -1
- {aoiro-0.1.0 → aoiro-0.1.1}/src/aoiro/reader/_sales.py +16 -4
- {aoiro-0.1.0 → aoiro-0.1.1}/LICENSE +0 -0
- {aoiro-0.1.0 → aoiro-0.1.1}/README.md +0 -0
- {aoiro-0.1.0 → aoiro-0.1.1}/src/aoiro/__main__.py +0 -0
- {aoiro-0.1.0 → aoiro-0.1.1}/src/aoiro/_ledger.py +0 -0
- {aoiro-0.1.0 → aoiro-0.1.1}/src/aoiro/_multidimensional.py +0 -0
- {aoiro-0.1.0 → aoiro-0.1.1}/src/aoiro/_sheets.py +0 -0
- {aoiro-0.1.0 → aoiro-0.1.1}/src/aoiro/account.yml +0 -0
- {aoiro-0.1.0 → aoiro-0.1.1}/src/aoiro/cli.py +0 -0
- {aoiro-0.1.0 → aoiro-0.1.1}/src/aoiro/py.typed +0 -0
- {aoiro-0.1.0 → aoiro-0.1.1}/src/aoiro/reader/__init__.py +0 -0
- {aoiro-0.1.0 → aoiro-0.1.1}/src/aoiro/reader/_expenses.py +0 -0
- {aoiro-0.1.0 → aoiro-0.1.1}/src/aoiro/reader/_io.py +0 -0
@@ -120,14 +120,18 @@ def ledger_from_sales(
|
|
120
120
|
)
|
121
121
|
)
|
122
122
|
for (t, date, currency), df_ in df.groupby(["取引先", "振込日", "通貨"]):
|
123
|
-
|
123
|
+
fees = Decimal(df_["手数料"].sum())
|
124
|
+
receivable = Decimal(df_["金額"].sum())
|
125
|
+
recievable_without_fees = receivable - fees
|
124
126
|
if currency == "":
|
125
127
|
withholding = withholding_tax(
|
126
128
|
df_.loc[df_["源泉徴収"] == True, "金額"].sum()
|
127
129
|
)
|
128
130
|
values = [
|
129
131
|
LedgerElementImpl(
|
130
|
-
account="事業主貸",
|
132
|
+
account="事業主貸",
|
133
|
+
amount=recievable_without_fees - withholding,
|
134
|
+
currency=currency,
|
131
135
|
)
|
132
136
|
]
|
133
137
|
if withholding > 0:
|
@@ -140,15 +144,23 @@ def ledger_from_sales(
|
|
140
144
|
if (df_["源泉徴収"] == True).any():
|
141
145
|
raise ValueError("通貨が異なる取引に源泉徴収が含まれています。")
|
142
146
|
values = [
|
143
|
-
LedgerElementImpl(
|
147
|
+
LedgerElementImpl(
|
148
|
+
account="事業主貸",
|
149
|
+
amount=recievable_without_fees,
|
150
|
+
currency=currency,
|
151
|
+
)
|
144
152
|
]
|
153
|
+
if fees > 0:
|
154
|
+
values.append(
|
155
|
+
LedgerElementImpl(account="支払手数料", amount=fees, currency=currency)
|
156
|
+
)
|
145
157
|
ledger_lines.append(
|
146
158
|
GeneralLedgerLineImpl(
|
147
159
|
date=date,
|
148
160
|
values=[
|
149
161
|
*values,
|
150
162
|
LedgerElementImpl(
|
151
|
-
account="売掛金", amount=-
|
163
|
+
account="売掛金", amount=-receivable, currency=currency
|
152
164
|
),
|
153
165
|
],
|
154
166
|
)
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|