...
This commit is contained in:
@@ -9,4 +9,4 @@ heroscript := os.join_path(os.dir(@FILE), 'examples/complete.heroscript')
|
|||||||
// Execute the script and print results
|
// Execute the script and print results
|
||||||
bizmodel.play(heroscript_path:heroscript)!
|
bizmodel.play(heroscript_path:heroscript)!
|
||||||
mut bm := bizmodel.get("threefold")!
|
mut bm := bizmodel.get("threefold")!
|
||||||
bm.sheet.pprint(nr_columns: 25)!
|
bm.sheet.pprint(nr_columns: 10)!
|
||||||
|
|||||||
@@ -16,7 +16,7 @@ bizmodel.play(heroscript_path:heroscript)!
|
|||||||
|
|
||||||
|
|
||||||
mut bm := bizmodel.get("threefold")!
|
mut bm := bizmodel.get("threefold")!
|
||||||
bm.sheet.pprint(nr_columns: 25)!
|
bm.sheet.pprint(nr_columns: 10)!
|
||||||
|
|
||||||
// buildpath := '${os.home_dir()}/hero/var/mdbuild/bizmodel'
|
// buildpath := '${os.home_dir()}/hero/var/mdbuild/bizmodel'
|
||||||
// println("buildpath: ${buildpath}")
|
// println("buildpath: ${buildpath}")
|
||||||
|
|||||||
@@ -57,6 +57,9 @@ pub fn (mut m BizModel) play(mut plbook PlayBook) ! {
|
|||||||
m.hrcost_total()!
|
m.hrcost_total()!
|
||||||
m.funding_total()!
|
m.funding_total()!
|
||||||
m.cost_total()!
|
m.cost_total()!
|
||||||
|
m.pl_total()!
|
||||||
|
|
||||||
|
// m.sheet.pprint(nr_columns: 10)!
|
||||||
|
|
||||||
|
|
||||||
for action in actions.filter(it.name in action_priorities[3]) {
|
for action in actions.filter(it.name in action_priorities[3]) {
|
||||||
|
|||||||
26
lib/biz/bizmodel/play_pl.v
Normal file
26
lib/biz/bizmodel/play_pl.v
Normal file
@@ -0,0 +1,26 @@
|
|||||||
|
module bizmodel
|
||||||
|
|
||||||
|
import arrays
|
||||||
|
import freeflowuniverse.herolib.core.playbook { Action, PlayBook }
|
||||||
|
import freeflowuniverse.herolib.ui.console
|
||||||
|
|
||||||
|
// revenue_total calculates and aggregates the total revenue and cost of goods sold (COGS) for the business model
|
||||||
|
fn (mut sim BizModel) pl_total() ! {
|
||||||
|
mut sheet := sim.sheet
|
||||||
|
|
||||||
|
// sheet.pprint(nr_columns: 10)!
|
||||||
|
|
||||||
|
mut pl_total := sheet.group2row(
|
||||||
|
name: 'pl_summary'
|
||||||
|
include: ['pl']
|
||||||
|
tags: 'summary'
|
||||||
|
descr: 'Cashflow Summary'
|
||||||
|
)!
|
||||||
|
|
||||||
|
// sheet.pprint(nr_columns: 10)!
|
||||||
|
|
||||||
|
// println(pl_total)
|
||||||
|
|
||||||
|
// if true{panic("sdsd")}
|
||||||
|
|
||||||
|
}
|
||||||
@@ -32,8 +32,14 @@
|
|||||||
|
|
||||||
@{bizmodel.sheet.wiki(title:'P&L Overview', includefilter:'pl')!}
|
@{bizmodel.sheet.wiki(title:'P&L Overview', includefilter:'pl')!}
|
||||||
|
|
||||||
|
### result
|
||||||
|
|
||||||
|
@{bizmodel.sheet.wiki(title:'P&L Result', includefilter:'summary')!}
|
||||||
|
|
||||||
|
|
||||||
@{bizmodel.graph_bar_row(rowname:'revenue_total', unit:'million', title:'A Title', title_sub:'Sub')!}
|
@{bizmodel.graph_bar_row(rowname:'revenue_total', unit:'million', title:'A Title', title_sub:'Sub')!}
|
||||||
|
|
||||||
|
|
||||||
Unit is in Million USD.
|
Unit is in Million USD.
|
||||||
|
|
||||||
@{bizmodel.graph_bar_row(rowname:'revenue_total', unit:'million')!}
|
@{bizmodel.graph_bar_row(rowname:'revenue_total', unit:'million')!}
|
||||||
@@ -42,8 +48,9 @@ Unit is in Million USD.
|
|||||||
|
|
||||||
@{bizmodel.graph_pie_row(rowname:'revenue_total', unit:'million', size:'80%')!}
|
@{bizmodel.graph_pie_row(rowname:'revenue_total', unit:'million', size:'80%')!}
|
||||||
|
|
||||||
## Some Details
|
|
||||||
|
<!-- ## Some Details
|
||||||
|
|
||||||
> show how we can do per month
|
> show how we can do per month
|
||||||
|
|
||||||
@{bizmodel.sheet_wiki(includefilter:'pl', period_months:1)!}
|
@{bizmodel.sheet_wiki(includefilter:'pl', period_months:1)!} -->
|
||||||
@@ -39,6 +39,9 @@
|
|||||||
|
|
||||||
@{model.sheet.wiki(title:'P&L Overview', includefilter:['pl']) or {panic(err)}}
|
@{model.sheet.wiki(title:'P&L Overview', includefilter:['pl']) or {panic(err)}}
|
||||||
|
|
||||||
|
@{model.sheet.wiki(title:'P&L Result', includefilter:['summary']) or {panic(err)}}
|
||||||
|
|
||||||
|
|
||||||
@{model.sheet.bar_chart(rowname:'revenue_total', unit: .million, title:'Total Revenue', title_sub:'Sub') or {panic(err)}.mdx()}
|
@{model.sheet.bar_chart(rowname:'revenue_total', unit: .million, title:'Total Revenue', title_sub:'Sub') or {panic(err)}.mdx()}
|
||||||
|
|
||||||
Unit is in Million USD.
|
Unit is in Million USD.
|
||||||
@@ -47,8 +50,8 @@ Unit is in Million USD.
|
|||||||
|
|
||||||
@{model.sheet.pie_chart(rowname:'revenue_total', unit: .million, size:'80%') or {panic(err)}.mdx()}
|
@{model.sheet.pie_chart(rowname:'revenue_total', unit: .million, size:'80%') or {panic(err)}.mdx()}
|
||||||
|
|
||||||
## Some Details
|
<!-- ## Some Details
|
||||||
|
|
||||||
> show how we can do per month
|
> show how we can do per month
|
||||||
|
|
||||||
@{model.sheet.wiki(includefilter:['pl'], period_type:.month) or {panic(err)}}
|
@{model.sheet.wiki(includefilter:['pl'], period_type:.month) or {panic(err)}} -->
|
||||||
Reference in New Issue
Block a user