@fuzzle/opencode-accountant 0.13.18-next.1 → 0.13.19-next.1
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.
- package/dist/index.js +5 -5
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -25272,7 +25272,8 @@ function generateSellEntry(trade, consumed, logger) {
|
|
|
25272
25272
|
}
|
|
25273
25273
|
function generateDividendEntry(dividend, logger) {
|
|
25274
25274
|
const date5 = formatDate(dividend.date);
|
|
25275
|
-
const
|
|
25275
|
+
const label = dividend.transactionType ?? "Dividend";
|
|
25276
|
+
const description = escapeDescription(`${label} ${dividend.symbol} - ${dividend.name}`);
|
|
25276
25277
|
logger?.debug(`Generating Dividend entry: ${dividend.symbol}, net: ${dividend.netAmount} ${dividend.currency}`);
|
|
25277
25278
|
const postings = [
|
|
25278
25279
|
{
|
|
@@ -25602,13 +25603,11 @@ var SIMPLE_TRANSACTION_TYPES = new Set([
|
|
|
25602
25603
|
"Payment",
|
|
25603
25604
|
"Debit",
|
|
25604
25605
|
"Fees Tax Statement",
|
|
25605
|
-
"Dividend (Reversed)",
|
|
25606
|
-
"Reversal (Dividend)",
|
|
25607
25606
|
"Redemption"
|
|
25608
25607
|
]);
|
|
25609
25608
|
var FOREX_TYPES = new Set(["Forex credit", "Forex debit"]);
|
|
25610
25609
|
var TRADE_TYPES = new Set(["Buy", "Sell"]);
|
|
25611
|
-
var DIVIDEND_TYPES = new Set(["Dividend"]);
|
|
25610
|
+
var DIVIDEND_TYPES = new Set(["Dividend", "Dividend (Reversed)", "Reversal (Dividend)"]);
|
|
25612
25611
|
var CORPORATE_ACTION_TYPES = new Set([
|
|
25613
25612
|
"Merger",
|
|
25614
25613
|
"Reverse Split",
|
|
@@ -25717,7 +25716,8 @@ function toDividendEntry(txn) {
|
|
|
25717
25716
|
grossAmount,
|
|
25718
25717
|
withholdingTax,
|
|
25719
25718
|
netAmount,
|
|
25720
|
-
currency: txn.currency
|
|
25719
|
+
currency: txn.currency,
|
|
25720
|
+
transactionType: txn.transaction
|
|
25721
25721
|
};
|
|
25722
25722
|
}
|
|
25723
25723
|
function toCorporateActionEntry(txn) {
|
package/package.json
CHANGED