[ifrs-cost-basis] slight reordering of columns

from https://bugs.gnucash.org/show_bug.cgi?id=797796#c228
This commit is contained in:
Christopher Lam 2021-12-13 22:51:13 +08:00
parent c3eaff9bb2
commit d3a7d3f104
2 changed files with 32 additions and 32 deletions

View File

@ -378,9 +378,9 @@ the split action field to detect capitalized fees on stock activity")
"proceeds-val" "proceeds-cost" "conv-purchase-val"
"conv-purchase-cost" "conv-dividends"
"conv-proceeds-val" "conv-proceeds-cost"
"average-cost-basis/unit-for-sale" "average-cost-basis-of-sale"
"cumulative-average-cost-basis"
"gain-post-commission" "gain-pre-commission" "net-proceeds"
"average-cost-basis/unit-for-sale" "average-cost-basis-of-sale"
"net-proceeds" "gain-post-commission" "gain-pre-commission"
"cumul-gross-profit" "cumul-net-profit" "cumul-tot-return"))
(let lp ((splits splits)
@ -502,12 +502,12 @@ the split action field to detect capitalized fees on stock activity")
(to-cell (to-report-currency conv-dividends))
(to-cell (to-report-currency conv-proceeds-value))
(to-cell (to-report-currency conv-proceeds-cost))
(to-cell (to-report-currency cumul-average-cost-basis))
(to-cell (to-report-currency average-cost-basis/unit-for-sale))
(to-cell (to-report-currency (M- average-cost-basis-of-sale)))
(to-cell (to-report-currency cumul-average-cost-basis))
(to-cell (to-report-currency net-proceeds))
(to-cell (to-report-currency gain-post-commission))
(to-cell (to-report-currency gain-pre-commission))
(to-cell (to-report-currency net-proceeds))
(to-cell (to-report-currency new-gross-profit))
(to-cell (to-report-currency new-net-profit))
(to-cell (to-report-currency new-tot-return))))

View File

@ -268,59 +268,59 @@
(test-equal "BUY 50 SPY"
'("12/11/19" "Buy SPY" "50 SPY" "150 SPY" "Buy" "CAD" "C$1.0000"
"C$16,000.00" "C$9.95" "C$16,000.00" "C$9.95" "C$200.10"
"C$36,019.90" "C$0.00" "C$0.00" "C$0.00")
"C$16,000.00" "C$9.95" "C$16,000.00" "C$9.95" "C$36,019.90"
"C$200.10" "C$0.00" "C$0.00" "C$0.00")
(sxml->table-row-col sxml 1 2 #f))
(test-equal "Sell 75 SPY"
'("03/18/20" "Sell SPY" "-75 SPY" "75 SPY" "Sell" "CAD" "C$1.0000"
"C$12,000.00" "C$9.95" "C$12,000.00" "C$9.95" "C$240.13"
"C$18,009.95" "C$18,009.95" "-C$6,019.90" "-C$6,009.95"
"C$11,990.05" "-C$6,009.95" "-C$6,019.90" "-C$6,019.90")
"C$12,000.00" "C$9.95" "C$12,000.00" "C$9.95" "C$18,009.95"
"C$240.13" "C$18,009.95" "C$11,990.05" "-C$6,019.90"
"-C$6,009.95" "-C$6,009.95" "-C$6,019.90" "-C$6,019.90")
(sxml->table-row-col sxml 1 3 #f))
(test-equal "BUY 250 SPY"
'("04/01/20" "Buy SPY" "250 SPY" "325 SPY" "Buy" "CAD" "C$1.0000"
"C$42,000.00" "C$9.95" "C$42,000.00" "C$9.95" "C$240.13"
"C$60,019.90" "-C$6,009.95" "-C$6,019.90" "-C$6,019.90")
"C$42,000.00" "C$9.95" "C$42,000.00" "C$9.95" "C$60,019.90"
"C$240.13" "-C$6,009.95" "-C$6,019.90" "-C$6,019.90")
(sxml->table-row-col sxml 1 4 #f))
(test-equal "Return Capital $2500"
'("04/16/20" "Return of Capital" "0 SPY" "325 SPY" "Return of Capital"
"CAD" "C$1.0000" "-C$2,500.00" "-C$2,500.00" "C$184.68"
"C$57,519.90" "-C$6,009.95" "-C$6,019.90" "-C$6,019.90")
"CAD" "C$1.0000" "-C$2,500.00" "-C$2,500.00" "C$57,519.90"
"C$184.68" "-C$6,009.95" "-C$6,019.90" "-C$6,019.90")
(sxml->table-row-col sxml 1 5 #f))
(test-equal "BUY 125 SPY"
'("05/02/20" "Buy spy" "125 SPY" "450 SPY" "Buy" "CAD" "C$1.0000"
"C$47,500.00" "C$0.00" "C$47,500.00" "C$0.00" "C$176.98"
"C$105,019.90" "-C$6,009.95" "-C$6,019.90" "-C$6,019.90")
"C$47,500.00" "C$0.00" "C$47,500.00" "C$0.00" "C$105,019.90"
"C$176.98" "-C$6,009.95" "-C$6,019.90" "-C$6,019.90")
(sxml->table-row-col sxml 1 6 #f))
(test-equal "2:1 split"
'("05/11/20" "stock split" "450 SPY" "900 SPY" "Stock split"
"CAD" "C$1.0000" "C$233.38" "C$105,019.90" "-C$6,009.95"
"-C$6,019.90" "-C$6,019.90")
' ("05/11/20" "stock split" "450 SPY" "900 SPY" "Stock split"
"CAD" "C$1.0000" "C$105,019.90" "C$233.38" "-C$6,009.95"
"-C$6,019.90" "-C$6,019.90")
(sxml->table-row-col sxml 1 7 #f))
(test-equal "sell 135 SPY"
'("05/21/20" "Sell SPY" "-135 SPY" "765 SPY" "Sell" "CAD" "C$1.0000"
"C$21,500.00" "C$9.95" "C$21,500.00" "C$9.95" "C$116.69"
"C$15,752.98" "C$89,266.92" "C$5,737.06" "C$5,747.02"
"C$21,490.05" "-C$262.94" "-C$282.84" "-C$282.84")
"C$21,500.00" "C$9.95" "C$21,500.00" "C$9.95" "C$89,266.92"
"C$116.69" "C$15,752.98" "C$21,490.05" "C$5,737.06"
"C$5,747.02" "-C$262.94" "-C$282.84" "-C$282.84")
(sxml->table-row-col sxml 1 8 #f))
(test-equal "BUY 150 SPY"
'("06/03/20" "Buy spy" "150 SPY" "915 SPY" "Buy" "CAD" "C$1.0000"
"C$21,000.00" "C$0.00" "C$21,000.00" "C$0.00" "C$116.69"
"C$110,266.92" "-C$262.94" "-C$282.84" "-C$282.84")
"C$21,000.00" "C$0.00" "C$21,000.00" "C$0.00" "C$110,266.92"
"C$116.69" "-C$262.94" "-C$282.84" "-C$282.84")
(sxml->table-row-col sxml 1 9 #f))
(test-equal "sell 915 SPY close long"
'("06/10/20" "Sell SPY" "-915 SPY" "0 SPY" "Sell" "CAD"
"C$1.0000" "C$128,100.00" "C$9.95" "C$128,100.00" "C$9.95"
"C$120.51" "C$110,266.92" "C$0.00" "C$17,823.14" "C$17,833.08"
"C$128,090.05" "C$17,570.15" "C$17,540.30" "C$17,540.30")
' ("06/10/20" "Sell SPY" "-915 SPY" "0 SPY" "Sell" "CAD"
"C$1.0000" "C$128,100.00" "C$9.95" "C$128,100.00" "C$9.95"
"C$0.00" "C$120.51" "C$110,266.92" "C$128,090.05" "C$17,823.14"
"C$17,833.08" "C$17,570.15" "C$17,540.30" "C$17,540.30")
(sxml->table-row-col sxml 1 10 #f))
(test-equal "short-sell 85 SPY"
@ -332,21 +332,21 @@
(test-equal "short-sell 65 SPY"
'("06/15/20" "Sell SPY Short" "-65 SPY" "-150 SPY" "Short Sell"
"CAD" "C$1.0000" "-C$11,050.00" "C$9.95" "-C$11,050.00" "C$9.95"
"C$139.88" "-C$22,930.10" "C$17,570.15" "C$17,540.30" "C$17,540.30")
"-C$22,930.10" "C$139.88" "C$17,570.15" "C$17,540.30" "C$17,540.30")
(sxml->table-row-col sxml 1 12 #f))
(test-equal "buy 50 SPY short"
'("06/18/20" "Buy SPY Close Short" "50 SPY" "-100 SPY" "Cover Buy"
"CAD" "C$1.0000" "-C$5,000.00" "C$9.95" "-C$5,000.00" "C$9.95"
"C$152.87" "-C$7,643.37" "-C$15,286.73" "C$2,633.42" "C$2,643.37"
"-C$5,009.95" "C$20,213.52" "C$20,173.72" "C$20,173.72")
"-C$15,286.73" "C$152.87" "-C$7,643.37" "-C$5,009.95" "C$2,633.42"
"C$2,643.37" "C$20,213.52" "C$20,173.72" "C$20,173.72")
(sxml->table-row-col sxml 1 13 #f))
(test-equal "BUY 100 SPY close short"
'("06/20/20" "Buy SPY Close Short" "100 SPY" "0 SPY" "Cover Buy"
"CAD" "C$1.0000" "-C$8,000.00" "C$4.98" "-C$8,000.00" "C$4.98"
"C$152.87" "-C$15,286.73" "C$0.00" "C$7,281.75" "C$7,286.73"
"-C$8,004.98" "C$27,500.25" "C$27,455.47" "C$27,455.47")
"C$0.00" "C$152.87" "-C$15,286.73" "-C$8,004.98" "C$7,281.75"
"C$7,286.73" "C$27,500.25" "C$27,455.47" "C$27,455.47")
(sxml->table-row-col sxml 1 14 #f))
(test-equal "BUY 100 SPY"