@fuzzle/opencode-accountant 0.10.3-next.1 → 0.10.4-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.
Files changed (2) hide show
  1. package/dist/index.js +13 -13
  2. package/package.json +1 -1
package/dist/index.js CHANGED
@@ -24807,7 +24807,7 @@ import * as path13 from "path";
24807
24807
 
24808
24808
  // src/utils/symbolNormalizer.ts
24809
24809
  function normalizeSymbol(symbol2) {
24810
- return symbol2.toLowerCase().replace(/\./g, "-");
24810
+ return symbol2.toLowerCase();
24811
24811
  }
24812
24812
 
24813
24813
  // src/utils/swissquoteLotTracker.ts
@@ -25019,7 +25019,7 @@ function generateBuyEntry(trade, logger) {
25019
25019
  `;
25020
25020
  entry += ` ; swissquote:order:${trade.orderNum} isin:${trade.isin}
25021
25021
  `;
25022
- entry += ` assets:investments:stocks:${trade.symbol} ${qty} ${trade.symbol} @ ${price} ${trade.currency}
25022
+ entry += ` assets:investments:stocks:${trade.symbol} ${qty} @ ${price} ${trade.currency}
25023
25023
  `;
25024
25024
  if (fees > 0) {
25025
25025
  entry += ` expenses:fees:trading:swissquote ${formatAmount2(fees, trade.currency)}
@@ -25049,7 +25049,7 @@ function generateSellEntry(trade, consumed, logger) {
25049
25049
  for (const c of consumed) {
25050
25050
  const lotQty = formatQuantity(c.quantity);
25051
25051
  const lotPrice = c.lot.costBasis.toFixed(2);
25052
- entry += ` assets:investments:stocks:${trade.symbol} -${lotQty} ${trade.symbol} @ ${lotPrice} ${trade.currency}
25052
+ entry += ` assets:investments:stocks:${trade.symbol} -${lotQty} @ ${lotPrice} ${trade.currency}
25053
25053
  `;
25054
25054
  }
25055
25055
  entry += ` assets:broker:swissquote:${trade.currency.toLowerCase()} ${formatAmount2(cashIn, trade.currency)}
@@ -25097,13 +25097,13 @@ function generateSplitEntry(action, oldQuantity, newQuantity, logger) {
25097
25097
  `;
25098
25098
  entry += ` ; Ratio: ${ratio.toFixed(4)} (${oldQuantity} -> ${newQuantity})
25099
25099
  `;
25100
- entry += ` assets:investments:stocks:${action.symbol} -${formatQuantity(oldQuantity)} ${action.symbol}
25100
+ entry += ` assets:investments:stocks:${action.symbol} -${formatQuantity(oldQuantity)}
25101
25101
  `;
25102
- entry += ` equity:conversion ${formatQuantity(oldQuantity)} ${action.symbol}
25102
+ entry += ` equity:conversion ${formatQuantity(oldQuantity)}
25103
25103
  `;
25104
- entry += ` equity:conversion -${formatQuantity(newQuantity)} ${action.symbol}
25104
+ entry += ` equity:conversion -${formatQuantity(newQuantity)}
25105
25105
  `;
25106
- entry += ` assets:investments:stocks:${action.symbol} ${formatQuantity(newQuantity)} ${action.symbol}
25106
+ entry += ` assets:investments:stocks:${action.symbol} ${formatQuantity(newQuantity)}
25107
25107
  `;
25108
25108
  return entry;
25109
25109
  }
@@ -25123,7 +25123,7 @@ function generateWorthlessEntry(action, removedLots, logger) {
25123
25123
  for (const lot of removedLots) {
25124
25124
  const qty = formatQuantity(lot.quantity);
25125
25125
  const price = lot.costBasis.toFixed(2);
25126
- entry += ` assets:investments:stocks:${action.symbol} -${qty} ${action.symbol} @ ${price} ${currency}
25126
+ entry += ` assets:investments:stocks:${action.symbol} -${qty} @ ${price} ${currency}
25127
25127
  `;
25128
25128
  }
25129
25129
  entry += ` expenses:losses:capital ${formatAmount2(totalCost, currency)}
@@ -25148,16 +25148,16 @@ function generateMultiWayMergerEntry(group, crossCurrencyOutgoingSymbols, logger
25148
25148
  }
25149
25149
  for (const out of group.outgoing) {
25150
25150
  const qty = formatQuantity(Math.abs(out.quantity));
25151
- entry += ` assets:investments:stocks:${out.symbol} -${qty} ${out.symbol}
25151
+ entry += ` assets:investments:stocks:${out.symbol} -${qty}
25152
25152
  `;
25153
- entry += ` equity:conversion ${qty} ${out.symbol}
25153
+ entry += ` equity:conversion ${qty}
25154
25154
  `;
25155
25155
  }
25156
25156
  for (const inc of group.incoming) {
25157
25157
  const qty = formatQuantity(Math.abs(inc.quantity));
25158
- entry += ` equity:conversion -${qty} ${inc.symbol}
25158
+ entry += ` equity:conversion -${qty}
25159
25159
  `;
25160
- entry += ` assets:investments:stocks:${inc.symbol} ${qty} ${inc.symbol}
25160
+ entry += ` assets:investments:stocks:${inc.symbol} ${qty}
25161
25161
  `;
25162
25162
  }
25163
25163
  return entry;
@@ -25171,7 +25171,7 @@ function generateRightsDistributionEntry(action, logger) {
25171
25171
  `;
25172
25172
  entry += ` ; swissquote:order:${action.orderNum} isin:${action.isin}
25173
25173
  `;
25174
- entry += ` assets:investments:stocks:${action.symbol} ${qty} ${action.symbol} @ 0.00 CAD
25174
+ entry += ` assets:investments:stocks:${action.symbol} ${qty} @ 0.00 CAD
25175
25175
  `;
25176
25176
  entry += ` income:capital-gains:rights-distribution 0.00 CAD
25177
25177
  `;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@fuzzle/opencode-accountant",
3
- "version": "0.10.3-next.1",
3
+ "version": "0.10.4-next.1",
4
4
  "description": "An OpenCode accounting agent, specialized in double-entry-bookkepping with hledger",
5
5
  "author": {
6
6
  "name": "ali bengali",