Skip to content

Commit

Permalink
fix: bugs with profitts
Browse files Browse the repository at this point in the history
  • Loading branch information
dd84ai committed Mar 31, 2024
1 parent 8f823c9 commit 42e667b
Show file tree
Hide file tree
Showing 4 changed files with 8 additions and 6 deletions.
8 changes: 4 additions & 4 deletions darkstat/front/commodities.templ
Original file line number Diff line number Diff line change
Expand Up @@ -48,11 +48,11 @@ templ CommoditiesT(commodities []configs_export.Commodity) {
>
<td>{ commodity.Name }</td>
<td>{ strconv.Itoa(commodity.Price) }</td>
<td>{ strconv.Itoa(commodity.PricePerVolume) }</td>
<td>{ fmt.Sprintf("%.2f", commodity.PricePerVolume) }</td>
<td>{ fmt.Sprintf("%.6f", commodity.Volume) }</td>
<td>{ strconv.Itoa(commodity.BestBuyPricePerVol) }</td>
<td>{ strconv.Itoa(commodity.BestSellPricePerVol) }</td>
<td>{ strconv.Itoa(commodity.ProffitMarginPerVol) }</td>
<td>{ fmt.Sprintf("%.2f", commodity.BestBuyPricePerVol) }</td>
<td>{ fmt.Sprintf("%.2f", commodity.BestSellPricePerVol) }</td>
<td>{ fmt.Sprintf("%.2f", commodity.ProffitMarginPerVol) }</td>
<td>{ commodity.Nickname }</td>
<td>{ strconv.Itoa(commodity.NameID) }</td>
<td>{ strconv.Itoa(commodity.InfocardID) }</td>
Expand Down
2 changes: 1 addition & 1 deletion darkstat/front/shared.templ
Original file line number Diff line number Diff line change
Expand Up @@ -203,7 +203,7 @@ templ GoodAtBaseInfoT(base_infos []configs_export.GoodAtBase, show_price_per_vol
<td>{ base_info.SystemName }</td>
<td>{ strconv.Itoa(base_info.Price) }</td>
if show_price_per_volume {
<td>{ strconv.Itoa(base_info.PricePerVolume) }</td>
<td>{ fmt.Sprintf("%.2f", base_info.PricePerVolume) }</td>
}
<td>{ strconv.FormatBool(base_info.BaseSells) }</td>
<td>{ strconv.Itoa(base_info.LevelRequired) }</td>
Expand Down
2 changes: 1 addition & 1 deletion go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ go 1.21.1

require (
github.com/a-h/templ v0.2.543
github.com/darklab8/fl-configs v0.21.0
github.com/darklab8/fl-configs v0.21.1
github.com/darklab8/go-typelog v0.6.0
github.com/darklab8/go-utils v0.12.0
github.com/yosssi/gohtml v0.0.0-20201013000340-ee4748c638f4
Expand Down
2 changes: 2 additions & 0 deletions go.sum
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,8 @@ github.com/darklab8/fl-configs v0.20.0 h1:nrIDsLnMVlrSy4MzoP3g4g350k+iOyhSqzXBcD
github.com/darklab8/fl-configs v0.20.0/go.mod h1:8zaCaFL21TvawP65KB9NOJ+nEpaMDQYsnoOi77RiSVY=
github.com/darklab8/fl-configs v0.21.0 h1:B31NaDIZ/ApRX6JboCmD+m99NSH73YMMsv6yn30pxJc=
github.com/darklab8/fl-configs v0.21.0/go.mod h1:8zaCaFL21TvawP65KB9NOJ+nEpaMDQYsnoOi77RiSVY=
github.com/darklab8/fl-configs v0.21.1 h1:dBIVOJocWL9JefjU616cY4KdpxyCgEBuvpETf7PrIVA=
github.com/darklab8/fl-configs v0.21.1/go.mod h1:8zaCaFL21TvawP65KB9NOJ+nEpaMDQYsnoOi77RiSVY=
github.com/darklab8/go-typelog v0.6.0 h1:Ci8imc7ScXiy5e1qMgf46NyJjrqNLPoIE1gbVe7bxl4=
github.com/darklab8/go-typelog v0.6.0/go.mod h1:AwwOf3dkp/tpevHFNbkB+PbwlDrUUgO1CVFkEnj+q5w=
github.com/darklab8/go-utils v0.12.0 h1:LxsG3yVNf9W4xyV+tHPOaZB2ewItgM/1BzOXyKFvofs=
Expand Down

0 comments on commit 42e667b

Please sign in to comment.