Skip to content
Snippets Groups Projects
Commit faab3478 authored by MouseOfLight's avatar MouseOfLight
Browse files

Fixed the dividend not being shown due to the wrong ledger being queried.

parent 0219b9b4
No related branches found
No related tags found
1 merge request!5382Corporation: Fixes for week end ledger
...@@ -69,8 +69,8 @@ ...@@ -69,8 +69,8 @@
/*Calculating cash set aside for dividend*/ /*Calculating cash set aside for dividend*/
<h2>Dividend</h2> <h2>Dividend</h2>
<div> <div>
<<if $dividendRatio > 0>> <<if App.Corporate.dividendRatio > 0>>
The corporation is currently reserving <<= Math.floor($dividendRatio * 100)>>% of its profit to be paid out as dividends. The corporation is currently reserving <<= Math.floor(App.Corporate.dividendRatio * 100)>>% of its profit to be paid out as dividends.
<<else>> <<else>>
The corporation is currently not reserving a portion of its profit to be paid out as dividends. The corporation is currently not reserving a portion of its profit to be paid out as dividends.
<</if>> <</if>>
...@@ -80,14 +80,14 @@ ...@@ -80,14 +80,14 @@
</div> </div>
<div> <div>
<<if App.Corporate.dividend > 0>> <<if App.Corporate.dividend > 0>>
<<if _ledger.hasDividend>> <<if _weekLedger.hasDividend>>
It reserved <<print cashFormatColor(_ledger.dividend)>> this week. It reserved <<print cashFormatColor(_weekLedger.dividend)>> this week.
<</if>> <</if>>
A total of <<print cashFormatColor($corpDividend)>> has been put aside for its shareholders. A total of <<print cashFormatColor(App.Corporate.dividend)>> has been put aside for its shareholders.
<</if>> <</if>>
</div> </div>
<<if _ledger.hasPayout>> <<if _weekLedger.hasPayout>>
<div>This week the dividends were paid out, you received <<print cashFormatColor(_ledger.payout)>>.</div> <div>This week the dividends were paid out, you received <<print cashFormatColor(_weekLedger.payout)>>.</div>
<</if>> <</if>>
/*Bankrupted the Corporation*/ /*Bankrupted the Corporation*/
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment