Units in transaction export csv file #3970

issue deeb33 opened this issue on March 28, 2014
  1. deeb33 commented at 7:29 AM on March 28, 2014: none

    The transaction Export function appears to output bitcoin in the same units as selected in settings (BTC/mBTC/uBTC.) and displayed on the transaction listing, but there is no indication of what unit is used in the csv file. Either the cvs file should output in btc or the units used needs to appear in the file.

  2. laanwj added the label GUI on Mar 28, 2014
  3. laanwj added the label Priority Medium on Mar 28, 2014
  4. laanwj commented at 8:35 AM on March 28, 2014: member

    Yes, the unit should be in the table header.

  5. laanwj added the label Improvement on Mar 28, 2014
  6. bardiharborow commented at 10:13 PM on March 30, 2014: contributor

    The issue comes from the fact that the export system exports from the qt table, not from the underlying data source, so whatever is displayed on the table is outputted. See src/qt/csvmodelwriter.cpp. If we were to specify the units in the table header, they would be included in the .cvs file. Not sure how to do that though. Still researching, I'll get back to you.

  7. Telepatheic commented at 11:15 AM on April 6, 2014: contributor

    This just needs writer.addColumn(tr("Amount"), 0, TransactionTableModel::FormattedAmountRole); changing in src/qt/transactionview.cpp.

    I'm not entirely sure on the best way of including the unit maybe: BitcoinUnits::name(model->getOptionsModel()->getDisplayUnit())

  8. laanwj commented at 5:53 AM on April 7, 2014: member

    Yeah, something like

    if (!model->getOptionsModel())  /* add null pointer check */
        return;
    ...
    writer.addColumn(tr("Amount") + " [" + BitcoinUnits::name(model->getOptionsModel()->getDisplayUnit()) + "]", 0, TransactionTableModel::FormattedAmountRole);
    
  9. gubatron commented at 2:43 PM on June 4, 2014: contributor

    I've gone ahead and added this to the amount column both here on the export writer, as well as on the columns of the recent transaction and recent payment request UI tables as part of a patch I'll be submitting soon.

  10. cozz referenced this in commit 910e60a060 on Jun 18, 2014
  11. cozz referenced this in commit 88cc74a64d on Jun 18, 2014
  12. wtogami referenced this in commit 535a7f89f4 on Sep 19, 2014
  13. laanwj commented at 10:28 AM on September 25, 2014: member

    Fixed by #4302

  14. laanwj closed this on Sep 25, 2014

  15. wtogami referenced this in commit d6b0b267fa on Oct 2, 2014
  16. MathyV referenced this in commit 42d8a144a0 on Nov 3, 2014
  17. wtogami referenced this in commit cbe6e7cd18 on Nov 14, 2014
  18. wtogami referenced this in commit 420fb3747c on Dec 23, 2014
  19. reddink referenced this in commit b062a0a12b on May 27, 2020
  20. DrahtBot locked this on Sep 8, 2021

github-metadata-mirror

This is a metadata mirror of the GitHub repository bitcoin/bitcoin. This site is not affiliated with GitHub. Content is generated from a GitHub metadata backup.
generated: 2026-04-14 21:15 UTC

This site is hosted by @0xB10C
More mirrored repositories can be found on mirror.b10c.me