code:
:: Costs Budget [nobr]

<<set $nextButton = "Back to Main", $nextLink = "Main", _archologyCosts = 0>>

<<if def $lastWeeksCashIncome>>
	<<set $lastWeeksCashIncome.Total = 0>>
	<<set $lastWeeksCashExpenses.Total = 0>>
	<<set $lastWeeksCashProfits.Total = 0>>
<</if>>

//Here you can view many of the financial details of your arcology, <<= properTitle()>>.  The detailed list of slaves and their costs (food, hormones) that you may remember can now be found in the "Slave maintenance" link.  Other links will allow you to directly control areas of your arcology to adjust spending to suit your tastes.

<<if $lineSeparations == 0>>
<<else>>
<</if>>

Your weekly costs are as follows://

/* Table of Totals */
<<if ndef $lastWeeksCashIncome>>
	Financial data currently unavailable.
<<else>>

<>

Penthouse

		Income
		Expense
		Totals

	<<if $lastWeeksCashIncome.whore || $lastWeeksCashExpenses.whore>> /* If it's not 0, it will return true. */

			Whores

				<<if Math.trunc($lastWeeksCashIncome.whore) > 0>>
					@@.yellowgreen;+<<print cashFormat(Math.trunc($lastWeeksCashIncome.whore))>>@@
				<<else>>
					<<print cashFormat(Math.trunc($lastWeeksCashIncome.whore))>>
				<</if>>

				<<if Math.trunc($lastWeeksCashExpenses.whore) < 0>>
					@@.red;-<<print cashFormat(Math.abs(Math.trunc($lastWeeksCashExpenses.whore)))>>@@
				<<else>>
					<<print cashFormat(Math.trunc($lastWeeksCashExpenses.whore))>>
				<</if>>

				<<set $lastWeeksCashProfits.whore = ($lastWeeksCashIncome.whore + $lastWeeksCashExpenses.whore)>>
				<<if $lastWeeksCashProfits.whore > 0>>
					@@.yellowgreen;+<<print cashFormat(Math.trunc($lastWeeksCashProfits.whore))>>@@
				<<elseif Math.trunc($lastWeeksCashProfits.whore) == 0>>
					<<print cashFormat(Math.trunc($lastWeeksCashProfits.whore))>>
				<<else>>
					@@.red;-<<print cashFormat(Math.abs(Math.trunc($lastWeeksCashProfits.whore)))>>@@
				<</if>>

	<</if>>

	<<if $lastWeeksCashIncome.rest || $lastWeeksCashExpenses.rest>>

			Resting

				<<if Math.trunc($lastWeeksCashIncome.rest) > 0>>
					@@.yellowgreen;+<<print cashFormat(Math.trunc($lastWeeksCashIncome.rest))>>@@
				<<else>>
					<<print cashFormat(Math.trunc($lastWeeksCashIncome.rest))>>
				<</if>>

				<<if Math.trunc($lastWeeksCashExpenses.rest) < 0>>
					@@.red;-<<print cashFormat(Math.abs(Math.trunc($lastWeeksCashExpenses.rest)))>>@@
				<<else>>
					<<print cashFormat(Math.trunc($lastWeeksCashExpenses.rest))>>
				<</if>>

				<<set $lastWeeksCashProfits.rest = ($lastWeeksCashIncome.rest + $lastWeeksCashExpenses.rest)>>
				<<if $lastWeeksCashProfits.rest > 0>>
					@@.yellowgreen;+<<print cashFormat(Math.trunc($lastWeeksCashProfits.rest))>>@@
				<<elseif Math.trunc($lastWeeksCashProfits.rest) == 0>>
					<<print cashFormat(Math.trunc($lastWeeksCashProfits.rest))>>
				<<else>>
					@@.red;-<<print cashFormat(Math.abs(Math.trunc($lastWeeksCashProfits.rest)))>>@@
				<</if>>

	<</if>>

	<<if $lastWeeksCashIncome.fucktoy || $lastWeeksCashExpenses.fucktoy>>

			Fucktoys <<if $Concubine != 0>>including your concubine <</if>>($fuckSlaves slaves)

				<<if $lastWeeksCashIncome.fucktoy > 0>>		/* TODO: not sure what to do for these */
					@@.green;$lastWeeksCashIncome.fucktoy rep@@
				<<else>>
					$lastWeeksCashIncome.fucktoy rep
				<</if>>

				<<if Math.trunc($lastWeeksCashExpenses.fucktoy) < 0>>
					@@.red;-<<print cashFormat(Math.abs(Math.trunc($lastWeeksCashExpenses.fucktoy)))>>@@
				<<else>>
					<<print cashFormat(Math.trunc($lastWeeksCashExpenses.fucktoy))>>
				<</if>>

				<<set $lastWeeksCashProfits.fucktoy = (+ $lastWeeksCashExpenses.fucktoy)>>
				<<if $lastWeeksCashProfits.fucktoy > 0>>
					@@.yellowgreen;+<<print cashFormat(Math.trunc($lastWeeksCashProfits.fucktoy))>>@@
				<<elseif Math.trunc($lastWeeksCashProfits.fucktoy) == 0>>
					<<print cashFormat(Math.trunc($lastWeeksCashProfits.fucktoy))>>
				<<else>>
					@@.red;-<<print cashFormat(Math.abs(Math.trunc($lastWeeksCashProfits.fucktoy)))>>@@
				<</if>>

	<</if>>

	<<if $lastWeeksCashIncome.houseServant || $lastWeeksCashExpenses.houseServant>>

			House servants

				<<if Math.trunc($lastWeeksCashIncome.houseServant) > 0>>
					@@.yellowgreen;+<<print cashFormat(Math.trunc($lastWeeksCashIncome.houseServant))>>@@
				<<else>>
					<<print cashFormat(Math.trunc($lastWeeksCashIncome.houseServant))>>
				<</if>>

				<<if Math.trunc($lastWeeksCashExpenses.houseServant) < 0>>
					@@.red;-<<print cashFormat(Math.abs(Math.trunc($lastWeeksCashExpenses.houseServant)))>>@@
				<<else>>
					<<print cashFormat(Math.trunc($lastWeeksCashExpenses.houseServant))>>
				<</if>>

				<<set $lastWeeksCashProfits.houseServant = ($lastWeeksCashIncome.houseServant + $lastWeeksCashExpenses.houseServant)>>
				<<if $lastWeeksCashProfits.houseServant > 0>>
					@@.yellowgreen;+<<print cashFormat(Math.trunc($lastWeeksCashProfits.houseServant))>>@@
				<<elseif Math.trunc($lastWeeksCashProfits.houseServant) == 0>>
					<<print cashFormat(Math.trunc($lastWeeksCashProfits.houseServant))>>
				<<else>>
					@@.red;-<<print cashFormat(Math.abs(Math.trunc($lastWeeksCashProfits.houseServant)))>>@@
				<</if>>

	<</if>>

	<<if $lastWeeksCashIncome.confined || $lastWeeksCashExpenses.confined>>

			Confined

				<<if Math.trunc($lastWeeksCashIncome.confined) > 0>>
					@@.yellowgreen;+<<print cashFormat(Math.trunc($lastWeeksCashIncome.confined))>>@@
				<<else>>
					<<print cashFormat(Math.trunc($lastWeeksCashIncome.confined))>>
				<</if>>

				<<if Math.trunc($lastWeeksCashExpenses.confined) < 0>>
					@@.red;-<<print cashFormat(Math.abs(Math.trunc($lastWeeksCashExpenses.confined)))>>@@
				<<else>>
					<<print cashFormat(Math.trunc($lastWeeksCashExpenses.confined))>>
				<</if>>

				<<set $lastWeeksCashProfits.confined = ($lastWeeksCashIncome.confined + $lastWeeksCashExpenses.confined)>>
				<<if $lastWeeksCashProfits.confined > 0>>
					@@.yellowgreen;+<<print cashFormat(Math.trunc($lastWeeksCashProfits.confined))>>@@
				<<elseif Math.trunc($lastWeeksCashProfits.confined) == 0>>
					<<print cashFormat(Math.trunc($lastWeeksCashProfits.confined))>>
				<<else>>
					@@.red;-<<print cashFormat(Math.abs(Math.trunc($lastWeeksCashProfits.confined)))>>@@
				<</if>>

	<</if>>

	<<if $lastWeeksCashIncome.publicServant || $lastWeeksCashExpenses.publicServant>>

			Public servants

				<<if $lastWeeksCashIncome.publicServant > 0>>	/* TODO: not sure what to do for these */
					@@.green;$lastWeeksCashIncome.publicServant rep@@
				<<else>>
					$lastWeeksCashIncome.publicServant rep
				<</if>>

				<<if Math.trunc($lastWeeksCashExpenses.publicServant) < 0>>
					@@.red;-<<print cashFormat(Math.abs(Math.trunc($lastWeeksCashExpenses.publicServant)))>>@@
				<<else>>
					<<print cashFormat(Math.trunc($lastWeeksCashExpenses.publicServant))>>
				<</if>>

				<<set $lastWeeksCashProfits.publicServant = ($lastWeeksCashIncome.publicServant + $lastWeeksCashExpenses.publicServant)>>
				<<if $lastWeeksCashProfits.publicServant > 0>>
					@@.yellowgreen;+<<print cashFormat(Math.trunc($lastWeeksCashProfits.publicServant))>>@@
				<<elseif Math.trunc($lastWeeksCashProfits.publicServant) == 0>>
					<<print cashFormat(Math.trunc($lastWeeksCashProfits.publicServant))>>
				<<else>>
					@@.red;-<<print cashFormat(Math.abs(Math.trunc($lastWeeksCashProfits.publicServant)))>>@@
				<</if>>

	<</if>>

	<<if $lastWeeksCashIncome.classes || $lastWeeksCashExpenses.classes>>

			Classes

				<<if Math.trunc($lastWeeksCashIncome.classes) > 0>>
					@@.yellowgreen;+<<print cashFormat(Math.trunc($lastWeeksCashIncome.classes))>>@@
				<<else>>
					<<print cashFormat(Math.trunc($lastWeeksCashIncome.classes))>>
				<</if>>

				<<if Math.trunc($lastWeeksCashExpenses.classes) < 0>>
					@@.red;-<<print cashFormat(Math.abs(Math.trunc($lastWeeksCashExpenses.classes)))>>@@
				<<else>>
					<<print cashFormat(Math.trunc($lastWeeksCashExpenses.classes))>>
				<</if>>

				<<set $lastWeeksCashProfits.classes = ($lastWeeksCashIncome.classes + $lastWeeksCashExpenses.classes)>>
				<<if $lastWeeksCashProfits.classes > 0>>
					@@.yellowgreen;+<<print cashFormat(Math.trunc($lastWeeksCashProfits.classes))>>@@
				<<elseif Math.trunc($lastWeeksCashProfits.classes) == 0>>
					<<print cashFormat(Math.trunc($lastWeeksCashProfits.classes))>>
				<<else>>
					@@.red;-<<print cashFormat(Math.abs(Math.trunc($lastWeeksCashProfits.classes)))>>@@
				<</if>>

	<</if>>

	<<if $lastWeeksCashIncome.milked || $lastWeeksCashExpenses.milked>>

			Milked

				<<if Math.trunc($lastWeeksCashIncome.milked) > 0>>
					@@.yellowgreen;+<<print cashFormat(Math.trunc($lastWeeksCashIncome.milked))>>@@
				<<else>>
					<<print cashFormat(Math.trunc($lastWeeksCashIncome.milked))>>
				<</if>>

				<<if Math.trunc($lastWeeksCashExpenses.milked) < 0>>
					@@.red;-<<print cashFormat(Math.abs(Math.trunc($lastWeeksCashExpenses.milked)))>>@@
				<<else>>
					<<print cashFormat(Math.trunc($lastWeeksCashExpenses.milked))>>
				<</if>>

				<<set $lastWeeksCashProfits.milked = ($lastWeeksCashIncome.milked + $lastWeeksCashExpenses.milked)>>
				<<if $lastWeeksCashProfits.milked > 0>>
					@@.yellowgreen;+<<print cashFormat(Math.trunc($lastWeeksCashProfits.milked))>>@@
				<<elseif Math.trunc($lastWeeksCashProfits.milked) == 0>>
					<<print cashFormat(Math.trunc($lastWeeksCashProfits.milked))>>
				<<else>>
					@@.red;-<<print cashFormat(Math.abs(Math.trunc($lastWeeksCashProfits.milked)))>>@@
				<</if>>

	<</if>>

	<<if $lastWeeksCashIncome.gloryhole || $lastWeeksCashExpenses.gloryhole>>

			Gloryhole

				<<if Math.trunc($lastWeeksCashIncome.gloryhole) > 0>>
					@@.yellowgreen;+<<print cashFormat(Math.trunc($lastWeeksCashIncome.gloryhole))>>@@
				<<else>>
					<<print cashFormat(Math.trunc($lastWeeksCashIncome.gloryhole))>>
				<</if>>

				<<if Math.trunc($lastWeeksCashExpenses.gloryhole) < 0>>
					@@.red;-<<print cashFormat(Math.abs(Math.trunc($lastWeeksCashExpenses.gloryhole)))>>@@
				<<else>>
					<<print cashFormat(Math.trunc($lastWeeksCashExpenses.gloryhole))>>
				<</if>>

				<<set $lastWeeksCashProfits.gloryhole = ($lastWeeksCashIncome.gloryhole + $lastWeeksCashExpenses.gloryhole)>>
				<<if $lastWeeksCashProfits.gloryhole > 0>>
					@@.yellowgreen;+<<print cashFormat(Math.trunc($lastWeeksCashProfits.gloryhole))>>@@
				<<elseif Math.trunc($lastWeeksCashProfits.gloryhole) == 0>>
					<<print cashFormat(Math.trunc($lastWeeksCashProfits.gloryhole))>>
				<<else>>
					@@.red;-<<print cashFormat(Math.abs(Math.trunc($lastWeeksCashProfits.gloryhole)))>>@@
				<</if>>

	<</if>>

Structures
		/* TODO: using h2s doesn't fit in with the rest of the game */

	<<if $lastWeeksCashIncome.brothel || $lastWeeksCashExpenses.brothel>>

			[[$brothelNameCaps|Brothel][$nextButton = "Back to Budget", $nextLink = "Costs Budget"]] ($brothelSlaves slaves)

				<<if Math.trunc($lastWeeksCashIncome.brothel) > 0>>
					@@.yellowgreen;+<<print cashFormat(Math.trunc($lastWeeksCashIncome.brothel))>>@@
				<<else>>
					<<print cashFormat(Math.trunc($lastWeeksCashIncome.brothel))>>
				<</if>>

				<<if Math.trunc($lastWeeksCashExpenses.brothel) < 0>>
					@@.red;-<<print cashFormat(Math.abs(Math.trunc($lastWeeksCashExpenses.brothel)))>>@@
				<<else>>
					<<print cashFormat(Math.trunc($lastWeeksCashExpenses.brothel))>>
				<</if>>

				<<set $lastWeeksCashProfits.brothel = ($lastWeeksCashIncome.brothel + $lastWeeksCashExpenses.brothel)>>
				<<if $lastWeeksCashProfits.brothel > 0>>
					@@.yellowgreen;+<<print cashFormat(Math.trunc($lastWeeksCashProfits.brothel))>>@@
				<<elseif Math.trunc($lastWeeksCashProfits.brothel) == 0>>
					<<print cashFormat(Math.trunc($lastWeeksCashProfits.brothel))>>
				<<else>>
					@@.red;-<<print cashFormat(Math.abs(Math.trunc($lastWeeksCashProfits.brothel)))>>@@
				<</if>>

	<</if>>

	<<if $lastWeeksCashIncome.whoreBrothel || $lastWeeksCashExpenses.whoreBrothel>> /* If it's not 0, it will return true. */

			Brothel whores

				<<if Math.trunc($lastWeeksCashIncome.whoreBrothel) > 0>>
					@@.yellowgreen;+<<print cashFormat(Math.trunc($lastWeeksCashIncome.whoreBrothel))>>@@
				<<else>>
					<<print cashFormat(Math.trunc($lastWeeksCashIncome.whoreBrothel))>>
				<</if>>

				<<if Math.trunc($lastWeeksCashExpenses.whoreBrothel) < 0>>
					@@.red;-<<print cashFormat(Math.abs(Math.trunc($lastWeeksCashExpenses.whoreBrothel)))>>@@
				<<else>>
					<<print cashFormat(Math.trunc($lastWeeksCashExpenses.whoreBrothel))>>
				<</if>>

				<<set $lastWeeksCashProfits.whoreBrothel = ($lastWeeksCashIncome.whoreBrothel + $lastWeeksCashExpenses.whoreBrothel)>>
				<<if $lastWeeksCashProfits.whoreBrothel > 0>>
					@@.yellowgreen;+<<print cashFormat(Math.trunc($lastWeeksCashProfits.whoreBrothel))>>@@
				<<elseif Math.trunc($lastWeeksCashProfits.whoreBrothel) == 0>>
					<<print cashFormat(Math.trunc($lastWeeksCashProfits.whoreBrothel))>>
				<<else>>
					@@.red;-<<print cashFormat(Math.abs(Math.trunc($lastWeeksCashProfits.whoreBrothel)))>>@@
				<</if>>

	<</if>>

	<<if $lastWeeksCashIncome.brothelAds || $lastWeeksCashExpenses.brothelAds>>

			[[Brothel ads|Brothel Advertisement][$nextButton = "Back to Budget", $nextLink = "Costs Budget"]] also increase the income of whoring slaves in "jobs."		/* TODO: this is also weird */

				<<if Math.trunc($lastWeeksCashIncome.brothelAds) > 0>>
					@@.yellowgreen;+<<print cashFormat(Math.trunc($lastWeeksCashIncome.brothelAds))>>@@
				<<else>>
					<<print cashFormat(Math.trunc($lastWeeksCashIncome.brothelAds))>>
				<</if>>

				<<if Math.trunc($lastWeeksCashExpenses.brothelAds) < 0>>
					@@.red;-<<print cashFormat(Math.abs(Math.trunc($lastWeeksCashExpenses.brothelAds)))>>@@
				<<else>>
					<<print cashFormat(Math.trunc($lastWeeksCashExpenses.brothelAds))>>
				<</if>>

				<<set $lastWeeksCashProfits.brothelAds = ($lastWeeksCashIncome.brothelAds + $lastWeeksCashExpenses.brothelAds)>>
				<<if $lastWeeksCashProfits.brothelAds > 0>>
					@@.yellowgreen;+<<print cashFormat(Math.trunc($lastWeeksCashProfits.brothelAds))>>@@
				<<elseif Math.trunc($lastWeeksCashProfits.brothelAds) == 0>>
					<<print cashFormat(Math.trunc($lastWeeksCashProfits.brothelAds))>>
				<<else>>
					@@.red;-<<print cashFormat(Math.abs(Math.trunc($lastWeeksCashProfits.brothelAds)))>>@@
				<</if>>

	<</if>>

	<<if $brothel > 0>>

	<</if>>

	<<if $lastWeeksCashIncome.club || $lastWeeksCashExpenses.club>>

			[[$clubNameCaps|Club][$nextButton = "Back to Budget", $nextLink = "Costs Budget"]] ($clubSlaves slaves)

				<<if $lastWeeksCashIncome.club > 0>>	/* TODO: not sure what to do for these */
					@@.green;$lastWeeksCashIncome.club rep@@
				<<else>>
					$lastWeeksCashIncome.club rep
				<</if>>

				<<if Math.trunc($lastWeeksCashExpenses.club) < 0>>
					@@.red;-<<print cashFormat(Math.abs(Math.trunc($lastWeeksCashExpenses.club)))>>@@
				<<else>>
					<<print cashFormat(Math.trunc($lastWeeksCashExpenses.club))>>
				<</if>>

				<<set $lastWeeksCashProfits.club = ($lastWeeksCashIncome.club + $lastWeeksCashExpenses.club)>>
				<<if $lastWeeksCashProfits.club > 0>>
					@@.yellowgreen;+<<print cashFormat(Math.trunc($lastWeeksCashProfits.club))>>@@
				<<elseif Math.trunc($lastWeeksCashProfits.club) == 0>>
					<<print cashFormat(Math.trunc($lastWeeksCashProfits.club))>>
				<<else>>
					@@.red;-<<print cashFormat(Math.abs(Math.trunc($lastWeeksCashProfits.club)))>>@@
				<</if>>

	<</if>>

	<<if $lastWeeksCashIncome.clubAds || $lastWeeksCashExpenses.clubAds>>

			[[Club ads|Club Advertisement][$nextButton = "Back to Budget", $nextLink = "Costs Budget"]]

				<<if Math.trunc($lastWeeksCashIncome.clubAds) > 0>>
					@@.yellowgreen;+<<print cashFormat(Math.trunc($lastWeeksCashIncome.clubAds))>>@@
				<<else>>
					<<print cashFormat(Math.trunc($lastWeeksCashIncome.clubAds))>>
				<</if>>

				<<if Math.trunc($lastWeeksCashExpenses.clubAds) < 0>>
					@@.red;-<<print cashFormat(Math.abs(Math.trunc($lastWeeksCashExpenses.clubAds)))>>@@
				<<else>>
					<<print cashFormat(Math.trunc($lastWeeksCashExpenses.clubAds))>>
				<</if>>

				<<set $lastWeeksCashProfits.clubAds = ($lastWeeksCashIncome.clubAds + $lastWeeksCashExpenses.clubAds)>>
				<<if $lastWeeksCashProfits.clubAds > 0>>
					@@.yellowgreen;+<<print cashFormat(Math.trunc($lastWeeksCashProfits.clubAds))>>@@
				<<elseif Math.trunc($lastWeeksCashProfits.clubAds) == 0>>
					<<print cashFormat(Math.trunc($lastWeeksCashProfits.clubAds))>>
				<<else>>
					@@.red;-<<print cashFormat(Math.abs(Math.trunc($lastWeeksCashProfits.clubAds)))>>@@
				<</if>>

	<</if>>

	<<if $club > 0>>

	<</if>>

	<<if $lastWeeksCashIncome.arcade || $lastWeeksCashExpenses.arcade>>

		[[$arcadeNameCaps|Arcade][$nextButton = "Back to Budget", $nextLink = "Costs Budget"]] ($arcadeSlaves slaves)

			<<if Math.trunc($lastWeeksCashIncome.arcade) > 0>>
				@@.yellowgreen;+<<print cashFormat(Math.trunc($lastWeeksCashIncome.arcade))>>@@
			<<else>>
				<<print cashFormat(Math.trunc($lastWeeksCashIncome.arcade))>>
			<</if>>

			<<if Math.trunc($lastWeeksCashExpenses.arcade) < 0>>
				@@.red;-<<print cashFormat(Math.abs(Math.trunc($lastWeeksCashExpenses.arcade)))>>@@
			<<else>>
				<<print cashFormat(Math.trunc($lastWeeksCashExpenses.arcade))>>
			<</if>>

			<<set $lastWeeksCashProfits.arcade = ($lastWeeksCashIncome.arcade + $lastWeeksCashExpenses.arcade)>>
			<<if $lastWeeksCashProfits.arcade > 0>>
				@@.yellowgreen;+<<print cashFormat(Math.trunc($lastWeeksCashProfits.arcade))>>@@
			<<else>>
				@@.red;-<<print cashFormat(Math.abs(Math.trunc($lastWeeksCashProfits.arcade)))>>@@
			<</if>>

	<</if>>

	<<if $lastWeeksCashIncome.gloryholeArcade || $lastWeeksCashExpenses.gloryholeArcade>>

			Arcade slaves

				<<if Math.trunc($lastWeeksCashIncome.gloryholeArcade) > 0>>
					@@.yellowgreen;+<<print cashFormat(Math.trunc($lastWeeksCashIncome.gloryholeArcade))>>@@
				<<else>>
					<<print cashFormat(Math.trunc($lastWeeksCashIncome.gloryholeArcade))>>
				<</if>>

				<<if Math.trunc($lastWeeksCashExpenses.gloryholeArcade) < 0>>
					@@.red;-<<print cashFormat(Math.abs(Math.trunc($lastWeeksCashExpenses.gloryholeArcade)))>>@@
				<<else>>
					<<print cashFormat(Math.trunc($lastWeeksCashExpenses.gloryholeArcade))>>
				<</if>>

				<<set $lastWeeksCashProfits.gloryholeArcade = ($lastWeeksCashIncome.gloryholeArcade + $lastWeeksCashExpenses.gloryholeArcade)>>
				<<if $lastWeeksCashProfits.gloryholeArcade > 0>>
					@@.yellowgreen;+<<print cashFormat(Math.trunc($lastWeeksCashProfits.gloryholeArcade))>>@@
				<<elseif Math.trunc($lastWeeksCashProfits.gloryholeArcade) == 0>>
					<<print cashFormat(Math.trunc($lastWeeksCashProfits.gloryholeArcade))>>
				<<else>>
					@@.red;-<<print cashFormat(Math.abs(Math.trunc($lastWeeksCashProfits.gloryholeArcade)))>>@@
				<</if>>

	<</if>>

	<<if $arcade > 0>>

	<</if>>

	<<if $lastWeeksCashIncome.dairy || $lastWeeksCashExpenses.dairy>>

			[[$dairyNameCaps|Dairy][$nextButton = "Back to Budget", $nextLink = "Costs Budget"]] ($dairySlaves slaves)

				<<if Math.trunc($lastWeeksCashIncome.dairy) > 0>>
					@@.yellowgreen;+<<print cashFormat(Math.trunc($lastWeeksCashIncome.dairy))>>@@
				<<else>>
					<<print cashFormat(Math.trunc($lastWeeksCashIncome.dairy))>>
				<</if>>

				<<if Math.trunc($lastWeeksCashExpenses.dairy) < 0>>
					@@.red;-<<print cashFormat(Math.abs(Math.trunc($lastWeeksCashExpenses.dairy)))>>@@
				<<else>>
					<<print cashFormat(Math.trunc($lastWeeksCashExpenses.dairy))>>
				<</if>>

				<<set $lastWeeksCashProfits.dairy = ($lastWeeksCashIncome.dairy + $lastWeeksCashExpenses.dairy)>>
				<<if $lastWeeksCashProfits.dairy > 0>>
					@@.yellowgreen;+<<print cashFormat(Math.trunc($lastWeeksCashProfits.dairy))>>@@
				<<elseif Math.trunc($lastWeeksCashProfits.dairy) == 0>>
					<<print cashFormat(Math.trunc($lastWeeksCashProfits.dairy))>>
				<<else>>
					@@.red;-<<print cashFormat(Math.abs(Math.trunc($lastWeeksCashProfits.dairy)))>>@@
				<</if>>

	<</if>>

	<<if $lastWeeksCashIncome.milkedDairy || $lastWeeksCashExpenses.milkedDairy>>

			Dairy cows

				<<if Math.trunc($lastWeeksCashIncome.milkedDairy) > 0>>
					@@.yellowgreen;+<<print cashFormat(Math.trunc($lastWeeksCashIncome.milkedDairy))>>@@
				<<else>>
					<<print cashFormat(Math.trunc($lastWeeksCashIncome.milkedDairy))>>
				<</if>>

				<<if Math.trunc($lastWeeksCashExpenses.milkedDairy) < 0>>
					@@.red;-<<print cashFormat(Math.abs(Math.trunc($lastWeeksCashExpenses.milkedDairy)))>>@@
				<<else>>
					<<print cashFormat(Math.trunc($lastWeeksCashExpenses.milkedDairy))>>
				<</if>>

				<<set $lastWeeksCashProfits.milkedDairy = ($lastWeeksCashIncome.milkedDairy + $lastWeeksCashExpenses.milkedDairy)>>
				<<if $lastWeeksCashProfits.milkedDairy > 0>>
					@@.yellowgreen;+<<print cashFormat(Math.trunc($lastWeeksCashProfits.milkedDairy))>>@@
				<<elseif Math.trunc($lastWeeksCashProfits.milkedDairy) == 0>>
					<<print cashFormat(Math.trunc($lastWeeksCashProfits.milkedDairy))>>
				<<else>>
					@@.red;-<<print cashFormat(Math.abs(Math.trunc($lastWeeksCashProfits.milkedDairy)))>>@@
				<</if>>

	<</if>>

	<<if $dairy > 0>>

	<</if>>

	<<if $lastWeeksCashIncome.servantsQuarters || $lastWeeksCashExpenses.servantsQuarters>>

			[[Servants' Quarters][$nextButton = "Back to Budget", $nextLink = "Costs Budget"]] ($servantsQuartersSlaves slaves)

				<<if Math.trunc($lastWeeksCashIncome.servantsQuarters) > 0>>
					@@.yellowgreen;+<<print cashFormat(Math.trunc($lastWeeksCashIncome.servantsQuarters))>>@@
				<<else>>
					<<print cashFormat(Math.trunc($lastWeeksCashIncome.servantsQuarters))>>
				<</if>>
				 /*Does not count servants who are serving, only what Stewardess makes.  If I can find savings, perhaps show as negative expense? */

				<<if Math.trunc($lastWeeksCashExpenses.servantsQuarters) < 0>>
					@@.red;-<<print cashFormat(Math.abs(Math.trunc($lastWeeksCashExpenses.servantsQuarters)))>>@@
				<<else>>
					<<print cashFormat(Math.trunc($lastWeeksCashExpenses.servantsQuarters))>>
				<</if>>

				<<set $lastWeeksCashProfits.servantsQuarters = ($lastWeeksCashIncome.servantsQuarters + $lastWeeksCashExpenses.servantsQuarters)>>
				<<if $lastWeeksCashProfits.servantsQuarters > 0>>
					@@.yellowgreen;<<print cashFormat(Math.trunc($lastWeeksCashProfits.servantsQuarters))>>@@
				<<elseif Math.trunc($lastWeeksCashProfits.servantsQuarters) == 0>>
					<<print cashFormat(Math.trunc($lastWeeksCashProfits.servantsQuarters))>>
				<<else>>
					@@.red;-<<print cashFormat(Math.abs(Math.trunc($lastWeeksCashProfits.servantsQuarters)))>>@@
				<</if>>

	<</if>>

	<<if $lastWeeksCashIncome.masterSuite || $lastWeeksCashExpenses.masterSuite>>

			[[Master Suite][$nextButton = "Back to Budget", $nextLink = "Costs Budget"]] ($masterSuiteSlaves slaves)

				<<if $lastWeeksCashIncome.masterSuite > 0>>		/* TODO: not sure what to do for these */
					@@.green;$lastWeeksCashIncome.masterSuite rep@@
				<<else>>
					$lastWeeksCashIncome.masterSuite rep
				<</if>>

				<<if Math.trunc($lastWeeksCashExpenses.masterSuite) < 0>>
					@@.red;-<<print cashFormat(Math.abs(Math.trunc($lastWeeksCashExpenses.masterSuite)))>>@@
				<<else>>
					<<print cashFormat(Math.trunc($lastWeeksCashExpenses.masterSuite))>>
				<</if>>

				<<set $lastWeeksCashProfits.masterSuite = ($lastWeeksCashIncome.masterSuite + $lastWeeksCashExpenses.masterSuite)>>
				<<if $lastWeeksCashProfits.masterSuite > 0>>
					@@.yellowgreen;+<<print cashFormat(Math.trunc($lastWeeksCashProfits.masterSuite))>>@@
				<<elseif Math.trunc($lastWeeksCashProfits.masterSuite) == 0>>
					<<print cashFormat(Math.trunc($lastWeeksCashProfits.masterSuite))>>
				<<else>>
					@@.red;-<<print cashFormat(Math.abs(Math.trunc($lastWeeksCashProfits.masterSuite)))>>@@
				<</if>>

	<</if>>

	<<if $lastWeeksCashIncome.school || $lastWeeksCashExpenses.school>>

			[[$schoolroomNameCaps|Schoolroom][$nextButton = "Back to Budget", $nextLink = "Costs Budget"]] ($schoolroomSlaves slaves)

				<<if Math.trunc($lastWeeksCashIncome.school) > 0>>
					@@.yellowgreen;+<<print cashFormat(Math.trunc($lastWeeksCashIncome.school))>>@@
				<<else>>
					<<print cashFormat(Math.trunc($lastWeeksCashIncome.school))>>
				<</if>>

				<<if Math.trunc($lastWeeksCashExpenses.school) < 0>>
					@@.red;-<<print cashFormat(Math.abs(Math.trunc($lastWeeksCashExpenses.school)))>>@@
				<<else>>
					<<print cashFormat(Math.trunc($lastWeeksCashExpenses.school))>>
				<</if>>

				<<set $lastWeeksCashProfits.school = ($lastWeeksCashIncome.school + $lastWeeksCashExpenses.school)>>
				<<if $lastWeeksCashProfits.school > 0>>
					@@.yellowgreen;+<<print cashFormat(Math.trunc($lastWeeksCashProfits.school))>>@@
				<<elseif Math.trunc($lastWeeksCashProfits.school) == 0>>
					<<print cashFormat(Math.trunc($lastWeeksCashProfits.school))>>
				<<else>>
					@@.red;-<<print cashFormat(Math.abs(Math.trunc($lastWeeksCashProfits.school)))>>@@
				<</if>>

	<</if>>

	<<if $lastWeeksCashIncome.spa || $lastWeeksCashExpenses.spa>>

			[[$spaNameCaps|Spa][$nextButton = "Back to Budget", $nextLink = "Costs Budget"]] ($spaSlaves slaves)

				<<if Math.trunc($lastWeeksCashIncome.spa) > 0>>
					@@.yellowgreen;+<<print cashFormat(Math.trunc($lastWeeksCashIncome.spa))>>@@
				<<else>>
					<<print cashFormat(Math.trunc($lastWeeksCashIncome.spa))>>
				<</if>>

				<<if Math.trunc($lastWeeksCashExpenses.spa) < 0>>
					@@.red;-<<print cashFormat(Math.abs(Math.trunc($lastWeeksCashExpenses.spa)))>>@@
				<<else>>
					<<print cashFormat(Math.trunc($lastWeeksCashExpenses.spa))>>
				<</if>>

				<<set $lastWeeksCashProfits.spa = ($lastWeeksCashIncome.spa + $lastWeeksCashExpenses.spa)>>
				<<if $lastWeeksCashProfits.spa > 0>>
					@@.yellowgreen;+<<print cashFormat(Math.trunc($lastWeeksCashProfits.spa))>>@@
				<<elseif Math.trunc($lastWeeksCashProfits.spa) == 0>>
					<<print cashFormat(Math.trunc($lastWeeksCashProfits.spa))>>
				<<else>>
					@@.red;-<<print cashFormat(Math.abs(Math.trunc($lastWeeksCashProfits.spa)))>>@@
				<</if>>

	<</if>>

	<<if $lastWeeksCashIncome.clinic || $lastWeeksCashExpenses.clinic>>

			[[$clinicNameCaps|Clinic][$nextButton = "Back to Budget", $nextLink = "Costs Budget"]] ($clinicSlaves slaves)

				<<if Math.trunc($lastWeeksCashIncome.clinic) > 0>>
					@@.yellowgreen;+<<print cashFormat(Math.trunc($lastWeeksCashIncome.clinic))>>@@
				<<else>>
					<<print cashFormat(Math.trunc($lastWeeksCashIncome.clinic))>>
				<</if>>

				<<if Math.trunc($lastWeeksCashExpenses.clinic) < 0>>
					@@.red;-<<print cashFormat(Math.abs(Math.trunc($lastWeeksCashExpenses.clinic)))>>@@
				<<else>>
					<<print cashFormat(Math.trunc($lastWeeksCashExpenses.clinic))>>
				<</if>>

				<<set $lastWeeksCashProfits.clinic = ($lastWeeksCashIncome.clinic + $lastWeeksCashExpenses.clinic)>>
				<<if $lastWeeksCashProfits.clinic > 0>>
					@@.yellowgreen;+<<print cashFormat(Math.trunc($lastWeeksCashProfits.clinic))>>@@
				<<elseif Math.trunc($lastWeeksCashProfits.clinic) == 0>>
					<<print cashFormat(Math.trunc($lastWeeksCashProfits.clinic))>>
				<<else>>
					@@.red;-<<print cashFormat(Math.abs(Math.trunc($lastWeeksCashProfits.clinic)))>>@@
				<</if>>

	<</if>>

	<<if $lastWeeksCashIncome.cellblock || $lastWeeksCashExpenses.cellblock>>

			[[$cellblockNameCaps|Cellblock][$nextButton = "Back to Budget", $nextLink = "Costs Budget"]] ($cellblockSlaves slaves)

				<<if Math.trunc($lastWeeksCashIncome.cellblock) > 0>>
					@@.yellowgreen;+<<print cashFormat(Math.trunc($lastWeeksCashIncome.cellblock))>>@@
				<<else>>
					<<print cashFormat(Math.trunc($lastWeeksCashIncome.cellblock))>>
				<</if>>

				<<if Math.trunc($lastWeeksCashExpenses.cellblock) < 0>>
					@@.red;-<<print cashFormat(Math.abs(Math.trunc($lastWeeksCashExpenses.cellblock)))>>@@
				<<else>>
					<<print cashFormat(Math.trunc($lastWeeksCashExpenses.cellblock))>>
				<</if>>

				<<set $lastWeeksCashProfits.cellblock = ($lastWeeksCashIncome.cellblock + $lastWeeksCashExpenses.cellblock)>>
				<<if $lastWeeksCashProfits.cellblock > 0>>
					@@.yellowgreen;+<<print cashFormat(Math.trunc($lastWeeksCashProfits.cellblock))>>@@
				<<elseif Math.trunc($lastWeeksCashProfits.cellblock) == 0>>
					<<print cashFormat(Math.trunc($lastWeeksCashProfits.cellblock))>>
				<<else>>
					@@.red;-<<print cashFormat(Math.abs(Math.trunc($lastWeeksCashProfits.cellblock)))>>@@
				<</if>>

	<</if>>

	<<if $lastWeeksCashIncome.lab || $lastWeeksCashExpenses.lab>>

			[[Research Lab][$nextButton = "Back to Budget", $nextLink = "Costs Budget"]] maintenance

				<<if Math.trunc($lastWeeksCashIncome.lab) > 0>>
					@@.yellowgreen;+<<print cashFormat(Math.trunc($lastWeeksCashIncome.lab))>>@@
				<<else>>
					<<print cashFormat(Math.trunc($lastWeeksCashIncome.lab))>>
				<</if>>

				@@.red;-<<print cashFormat(Math.abs(Math.trunc($lastWeeksCashExpenses.lab)))>>@@

				<<set $lastWeeksCashProfits.lab = ($lastWeeksCashIncome.lab + $lastWeeksCashExpenses.lab)>>
				<<if $lastWeeksCashProfits.lab > 0>>
					@@.yellowgreen;+<<print cashFormat(Math.trunc($lastWeeksCashProfits.lab))>>@@
				<<elseif Math.trunc($lastWeeksCashProfits.lab) == 0>>
					<<print cashFormat(Math.trunc($lastWeeksCashProfits.lab))>>
				<<else>>
					@@.red;-<<print cashFormat(Math.abs(Math.trunc($lastWeeksCashProfits.lab)))>>@@
				<</if>>

		<<if $researchLab.hired != 0>>

				[[Research Lab][$nextButton = "Back to Budget", $nextLink = "Costs Budget"]] ($researchLab.hired scientists)

				@@.red;-<<print cashFormat(Math.trunc(300*$researchLab.hired))>>@@
				@@.red;-<<print cashFormat(Math.abs(Math.trunc(300*$researchLab.hired)))>>@@

		<</if>>
		<<if $researchLab.menials != 0>>

				[[Research Lab][$nextButton = "Back to Budget", $nextLink = "Costs Budget"]] ($researchLab.menials menial slaves)

				@@.red;-+<<print cashFormat(Math.trunc(100*$researchLab.menials))>>@@
				@@.red;-<<print cashFormat(Math.abs(Math.trunc(100*$researchLab.menials)))>>@@

		<</if>>
	<</if>>

	<<if $lastWeeksCashIncome.incubator || $lastWeeksCashExpenses.incubator>>

			[[$incubatorNameCaps|Incubator][$nextButton = "Back to Budget", $nextLink = "Costs Budget"]] ($incubatorSlaves slaves)

				<<if Math.trunc($lastWeeksCashIncome.incubator) > 0>>
					@@.yellowgreen;+<<print cashFormat(Math.trunc($lastWeeksCashIncome.incubator))>>@@
				<<else>>
					<<print cashFormat(Math.trunc($lastWeeksCashIncome.incubator))>>
				<</if>>

				<<if Math.trunc($lastWeeksCashExpenses.incubator) < 0>>
					@@.red;-<<print cashFormat(Math.abs(Math.trunc($lastWeeksCashExpenses.incubator)))>>@@
				<<else>>
					<<print cashFormat(Math.trunc($lastWeeksCashExpenses.incubator))>>
				<</if>>

				<<set $lastWeeksCashProfits.incubator = ($lastWeeksCashIncome.incubator + $lastWeeksCashExpenses.incubator)>>
				<<if $lastWeeksCashProfits.incubator > 0>>
					@@.yellowgreen;+<<print cashFormat(Math.trunc($lastWeeksCashProfits.incubator))>>@@
				<<elseif Math.trunc($lastWeeksCashProfits.incubator) == 0>>
					<<print cashFormat(Math.trunc($lastWeeksCashProfits.incubator))>>
				<<else>>
					@@.red;-<<print cashFormat(Math.abs(Math.trunc($lastWeeksCashProfits.incubator)))>>@@
				<</if>>

	<</if>>

	<<if $lastWeeksCashIncome.nursery || $lastWeeksCashExpenses.nursery>>

			[[$nurseryNameCaps|Nursery][$nextButton = "Back to Budget", $nextLink = "Costs Budget"]] ($nurserySlaves slaves)

				<<if Math.trunc($lastWeeksCashIncome.nursery) > 0>>
					@@.yellowgreen;+<<print cashFormat(Math.trunc($lastWeeksCashIncome.nursery))>>@@
				<<else>>
					<<print cashFormat(Math.trunc($lastWeeksCashIncome.nursery))>>
				<</if>>

				<<if Math.trunc($lastWeeksCashExpenses.nursery) < 0>>
					@@.red;-<<print cashFormat(Math.abs(Math.trunc($lastWeeksCashExpenses.nursery)))>>@@
				<<else>>
					<<print cashFormat(Math.trunc($lastWeeksCashExpenses.nursery))>>
				<</if>>

				<<set $lastWeeksCashProfits.nursery = ($lastWeeksCashIncome.nursery + $lastWeeksCashExpenses.nursery)>>
				<<if $lastWeeksCashProfits.nursery > 0>>
					@@.yellowgreen;+<<print cashFormat(Math.trunc($lastWeeksCashProfits.nursery))>>@@
				<<elseif Math.trunc($lastWeeksCashProfits.nursery) == 0>>
					<<print cashFormat(Math.trunc($lastWeeksCashProfits.nursery))>>
				<<else>>
					@@.red;-<<print cashFormat(Math.abs(Math.trunc($lastWeeksCashProfits.nursery)))>>@@
				<</if>>

	<</if>>

	<<if $lastWeeksCashIncome.farmyard || $lastWeeksCashExpenses.farmyard>>

			[[$farmyardNameCaps|Farmyard][$nextButton = "Back to Budget", $nextLink = "Costs Budget"]] ($farmyardSlaves slaves)

				<<if Math.trunc($lastWeeksCashIncome.farmyard) > 0>>
					@@.yellowgreen;+<<print cashFormat(Math.trunc($lastWeeksCashIncome.farmyard))>>@@
				<<else>>
					<<print cashFormat(Math.trunc($lastWeeksCashIncome.farmyard))>>
				<</if>>

				<<if Math.trunc($lastWeeksCashExpenses.farmyard) < 0>>
					@@.red;-<<print cashFormat(Math.abs(Math.trunc($lastWeeksCashExpenses.farmyard)))>>@@
				<<else>>
					<<print cashFormat(Math.trunc($lastWeeksCashExpenses.farmyard))>>
				<</if>>

				<<set $lastWeeksCashProfits.farmyard = ($lastWeeksCashIncome.farmyard + $lastWeeksCashExpenses.farmyard)>>
				<<if $lastWeeksCashProfits.farmyard > 0>>
					@@.yellowgreen;+<<print cashFormat(Math.trunc($lastWeeksCashProfits.farmyard))>>@@
				<<elseif Math.trunc($lastWeeksCashProfits.farmyard) == 0>>
					<<print cashFormat(Math.trunc($lastWeeksCashProfits.farmyard))>>
				<<else>>
					@@.red;-<<print cashFormat(Math.abs(Math.trunc($lastWeeksCashProfits.farmyard)))>>@@
				<</if>>

	<</if>>

	<<if $lastWeeksCashIncome.pit || $lastWeeksCashExpenses.pit>>

			[[$pitNameCaps|Pit][$nextButton = "Back to Budget", $nextLink = "Costs Budget"]] ($fighterIDs.length slaves)

				<<if Math.trunc($lastWeeksCashIncome.pit) > 0>>
					@@.yellowgreen;+<<print cashFormat(Math.trunc($lastWeeksCashIncome.pit))>>@@
				<<else>>
					<<print cashFormat(Math.trunc($lastWeeksCashIncome.pit))>>
				<</if>>

				<<if Math.trunc($lastWeeksCashExpenses.pit) < 0>>
					@@.red;-<<print cashFormat(Math.abs(Math.trunc($lastWeeksCashExpenses.pit)))>>@@
				<<else>>
					<<print cashFormat(Math.trunc($lastWeeksCashExpenses.pit))>>
				<</if>>

				<<set $lastWeeksCashProfits.pit = ($lastWeeksCashIncome.pit + $lastWeeksCashExpenses.pit)>>
				<<if $lastWeeksCashProfits.pit > 0>>
					@@.yellowgreen;+<<print cashFormat(Math.trunc($lastWeeksCashProfits.pit))>>@@
				<<elseif Math.trunc($lastWeeksCashProfits.pit) == 0>>
					<<print cashFormat(Math.trunc($lastWeeksCashProfits.pit))>>
				<<else>>
					@@.red;-<<print cashFormat(Math.abs(Math.trunc($lastWeeksCashProfits.pit)))>>@@
				<</if>>

	<</if>>

	<<if $lastWeeksCashIncome.environment || $lastWeeksCashExpenses.environment>>

			Environment

				<<if Math.trunc($lastWeeksCashIncome.environment) > 0>>
					@@.yellowgreen;+<<print cashFormat(Math.trunc($lastWeeksCashIncome.environment))>>@@
				<<else>>
					<<print cashFormat(Math.trunc($lastWeeksCashIncome.environment))>>
				<</if>>

				<<if Math.trunc($lastWeeksCashExpenses.environment) < 0>>
					@@.red;-<<print cashFormat(Math.abs(Math.trunc($lastWeeksCashExpenses.environment)))>>@@
				<<else>>
					<<print cashFormat(Math.trunc($lastWeeksCashExpenses.environment))>>
				<</if>>

				<<set $lastWeeksCashProfits.environment = ($lastWeeksCashIncome.environment + $lastWeeksCashExpenses.environment)>>
				<<if $lastWeeksCashProfits.environment > 0>>
					@@.yellowgreen;+<<print cashFormat(Math.trunc($lastWeeksCashProfits.environment))>>@@
				<<elseif Math.trunc($lastWeeksCashProfits.environment) == 0>>
					<<print cashFormat(Math.trunc($lastWeeksCashProfits.environment))>>
				<<else>>
					@@.red;-<<print cashFormat(Math.abs(Math.trunc($lastWeeksCashProfits.environment)))>>@@
				<</if>>

	<</if>>

	<<if $lastWeeksCashIncome.weather || $lastWeeksCashExpenses.weather>>	/* TODO: this doesn't fit in */

				<<if $lastWeeksCashExpenses.weather < 0 && $weatherCladding == 0>>
					Weather is causing @@.red;expensive damage.@@  Consider a protective [[upgrade|Manage Arcology][$nextButton = "Back to Budget", $nextLink = "Costs Budget"]].
				<<else>>
					Weather
				<</if>>

				<<if Math.trunc($lastWeeksCashIncome.weather) > 0>>
					@@.yellowgreen;+<<print cashFormat(Math.trunc($lastWeeksCashIncome.weather))>>@@
				<<else>>
					<<print cashFormat(Math.trunc($lastWeeksCashIncome.weather))>>
				<</if>>

				<<if Math.trunc($lastWeeksCashExpenses.weather) < 0>>
					@@.red;-<<print cashFormat(Math.abs(Math.trunc($lastWeeksCashExpenses.weather)))>>@@
				<<else>>
					<<print cashFormat(Math.trunc($lastWeeksCashExpenses.weather))>>
				<</if>>

				<<set $lastWeeksCashProfits.weather = ($lastWeeksCashIncome.weather + $lastWeeksCashExpenses.weather)>>
				<<if $lastWeeksCashProfits.weather > 0>>
					@@.yellowgreen;+<<print cashFormat(Math.trunc($lastWeeksCashProfits.weather))>>@@
				<<elseif Math.trunc($lastWeeksCashProfits.weather) == 0>>
					<<print cashFormat(Math.trunc($lastWeeksCashProfits.weather))>>
				<<else>>
					@@.red;-<<print cashFormat(Math.abs(Math.trunc($lastWeeksCashProfits.weather)))>>@@
				<</if>>

	<</if>>

Slaves

		[[Slave maintenance|Costs Report][$nextButton = "Back to Budget", $nextLink = "Costs Budget"]] ($slaves.length slaves)

			<<if Math.trunc($lastWeeksCashIncome.slaveUpkeep) > 0>>
				@@.yellowgreen;+<<print cashFormat(Math.trunc($lastWeeksCashIncome.slaveUpkeep))>>@@
			<<else>>
				<<print cashFormat(Math.trunc($lastWeeksCashIncome.slaveUpkeep))>>
			<</if>>

			<<if Math.trunc($lastWeeksCashExpenses.slaveUpkeep) < 0>>
				@@.red;-<<print cashFormat(Math.abs(Math.trunc($lastWeeksCashExpenses.slaveUpkeep)))>>@@
			<<else>>
				<<print cashFormat(Math.trunc($lastWeeksCashExpenses.slaveUpkeep))>>
			<</if>>

			<<set $lastWeeksCashProfits.slaveUpkeep = ($lastWeeksCashIncome.slaveUpkeep + $lastWeeksCashExpenses.slaveUpkeep)>>
			<<if $lastWeeksCashProfits.slaveUpkeep > 0>>
				@@.yellowgreen;+<<print cashFormat(Math.trunc($lastWeeksCashProfits.slaveUpkeep))>>@@
			<<else>>
				@@.red;-<<print cashFormat(Math.abs(Math.trunc($lastWeeksCashProfits.slaveUpkeep)))>>@@
			<</if>>

	<<if $lastWeeksCashIncome.extraMilk || $lastWeeksCashExpenses.extraMilk>>

			Extra milk

				<<if Math.trunc($lastWeeksCashIncome.extraMilk) > 0>>
					@@.yellowgreen;+<<print cashFormat(Math.trunc($lastWeeksCashIncome.extraMilk))>>@@
				<<else>>
					<<print cashFormat(Math.trunc($lastWeeksCashIncome.extraMilk))>>
				<</if>>

				<<if Math.trunc($lastWeeksCashExpenses.extraMilk) < 0>>
					@@.red;-<<print cashFormat(Math.abs(Math.trunc($lastWeeksCashExpenses.extraMilk)))>>@@
				<<else>>
					<<print cashFormat(Math.trunc($lastWeeksCashExpenses.extraMilk))>>
				<</if>>

				<<set $lastWeeksCashProfits.extraMilk = ($lastWeeksCashIncome.extraMilk + $lastWeeksCashExpenses.extraMilk)>>
				<<if $lastWeeksCashProfits.extraMilk > 0>>
					@@.yellowgreen;+<<print cashFormat(Math.trunc($lastWeeksCashProfits.extraMilk))>>@@
				<<elseif Math.trunc($lastWeeksCashProfits.extraMilk) == 0>>
					<<print cashFormat(Math.trunc($lastWeeksCashProfits.extraMilk))>>
				<<else>>
					@@.red;-<<print cashFormat(Math.abs(Math.trunc($lastWeeksCashProfits.extraMilk)))>>@@
				<</if>>

	<</if>>

	<<if $lastWeeksCashIncome.slaveTransfer || $lastWeeksCashExpenses.slaveTransfer>>

			Selling/buying major slaves

				<<if Math.trunc($lastWeeksCashIncome.slaveTransfer) > 0>>
					@@.yellowgreen;+<<print cashFormat(Math.trunc($lastWeeksCashIncome.slaveTransfer))>>@@
				<<else>>
					<<print cashFormat(Math.trunc($lastWeeksCashIncome.slaveTransfer))>>
				<</if>>

				<<if Math.trunc($lastWeeksCashExpenses.slaveTransfer) < 0>>
					@@.red;-<<print cashFormat(Math.abs(Math.trunc($lastWeeksCashExpenses.slaveTransfer)))>>@@
				<<else>>
					<<print cashFormat(Math.trunc($lastWeeksCashExpenses.slaveTransfer))>>
				<</if>>

				<<set $lastWeeksCashProfits.slaveTransfer = ($lastWeeksCashIncome.slaveTransfer + $lastWeeksCashExpenses.slaveTransfer)>>
				<<if $lastWeeksCashProfits.slaveTransfer > 0>>
					@@.yellowgreen;+<<print cashFormat(Math.trunc($lastWeeksCashProfits.slaveTransfer))>>@@
				<<elseif Math.trunc($lastWeeksCashProfits.slaveTransfer) == 0>>
					<<print cashFormat(Math.trunc($lastWeeksCashProfits.slaveTransfer))>>
				<<else>>
					@@.red;-<<print cashFormat(Math.abs(Math.trunc($lastWeeksCashProfits.slaveTransfer)))>>@@
				<</if>>

	<</if>>

	<<if $lastWeeksCashIncome.menialTransfer || $lastWeeksCashExpenses.menialTransfer>>

			Menials: [[Assistant's|Personal assistant options][$nextButton = "Back to Budget", $nextLink = "Costs Budget"]] flipping

				<<if Math.trunc($lastWeeksCashIncome.menialTransfer) > 0>>
					@@.yellowgreen;+<<print cashFormat(Math.trunc($lastWeeksCashIncome.menialTransfer))>>@@
				<<else>>
					<<print cashFormat(Math.trunc($lastWeeksCashIncome.menialTransfer))>>
				<</if>>

				<<if Math.trunc($lastWeeksCashExpenses.menialTransfer) < 0>>
					@@.red;-<<print cashFormat(Math.abs(Math.trunc($lastWeeksCashExpenses.menialTransfer)))>>@@
				<<else>>
					<<print cashFormat(Math.trunc($lastWeeksCashExpenses.menialTransfer))>>
				<</if>>

				<<set $lastWeeksCashProfits.menialTransfer = ($lastWeeksCashIncome.menialTransfer + $lastWeeksCashExpenses.menialTransfer)>>
				<<if $lastWeeksCashProfits.menialTransfer > 0>>
					@@.yellowgreen;+<<print cashFormat(Math.trunc($lastWeeksCashProfits.menialTransfer))>>@@
				<<elseif Math.trunc($lastWeeksCashProfits.menialTransfer) == 0>>
					<<print cashFormat(Math.trunc($lastWeeksCashProfits.menialTransfer))>>
				<<else>>
					@@.red;-<<print cashFormat(Math.abs(Math.trunc($lastWeeksCashProfits.menialTransfer)))>>@@
				<</if>>

	<</if>>

	<<if $lastWeeksCashIncome.fuckdollsTransfer || $lastWeeksCashExpenses.fuckdollsTransfer>>

			Fuckdolls: [[Assistant's|Personal assistant options][$nextButton = "Back to Budget", $nextLink = "Costs Budget"]] flipping

				<<if Math.trunc($lastWeeksCashIncome.fuckdollsTransfer) > 0>>
					@@.yellowgreen;+<<print cashFormat(Math.trunc($lastWeeksCashIncome.fuckdollsTransfer))>>@@
				<<else>>
					<<print cashFormat(Math.trunc($lastWeeksCashIncome.fuckdollsTransfer))>>
				<</if>>

				<<if Math.trunc($lastWeeksCashExpenses.fuckdollsTransfer) < 0>>
					@@.red;-<<print cashFormat(Math.abs(Math.trunc($lastWeeksCashExpenses.fuckdollsTransfer)))>>@@
				<<else>>
					<<print cashFormat(Math.trunc($lastWeeksCashExpenses.fuckdollsTransfer))>>
				<</if>>

				<<set $lastWeeksCashProfits.fuckdollsTransfer = ($lastWeeksCashIncome.fuckdollsTransfer + $lastWeeksCashExpenses.fuckdollsTransfer)>>
				<<if $lastWeeksCashProfits.fuckdollsTransfer > 0>>
					@@.yellowgreen;+<<print cashFormat(Math.trunc($lastWeeksCashProfits.fuckdollsTransfer))>>@@
				<<elseif Math.trunc($lastWeeksCashProfits.fuckdollsTransfer) == 0>>
					<<print cashFormat(Math.trunc($lastWeeksCashProfits.fuckdollsTransfer))>>
				<<else>>
					@@.red;-<<print cashFormat(Math.abs(Math.trunc($lastWeeksCashProfits.fuckdollsTransfer)))>>@@
				<</if>>

	<</if>>

	<<if $lastWeeksCashIncome.menialBioreactorsTransfer || $lastWeeksCashExpenses.menialBioreactorsTransfer>>

			Bioreactors: [[Assistant's|Personal assistant options][$nextButton = "Back to Budget", $nextLink = "Costs Budget"]] flipping

				<<if Math.trunc($lastWeeksCashIncome.menialBioreactorsTransfer) > 0>>
					@@.yellowgreen;+<<print cashFormat(Math.trunc($lastWeeksCashIncome.menialBioreactorsTransfer))>>@@
				<<else>>
					<<print cashFormat(Math.trunc($lastWeeksCashIncome.menialBioreactorsTransfer))>>
				<</if>>

				<<if Math.trunc($lastWeeksCashExpenses.menialBioreactorsTransfer) < 0>>
					@@.red;-<<print cashFormat(Math.abs(Math.trunc($lastWeeksCashExpenses.menialBioreactorsTransfer)))>>@@
				<<else>>
					<<print cashFormat(Math.trunc($lastWeeksCashExpenses.menialBioreactorsTransfer))>>
				<</if>>

				<<set $lastWeeksCashProfits.menialBioreactorsTransfer = ($lastWeeksCashIncome.menialBioreactorsTransfer + $lastWeeksCashExpenses.menialBioreactorsTransfer)>>
				<<if $lastWeeksCashProfits.menialBioreactorsTransfer > 0>>
					@@.yellowgreen;+<<print cashFormat(Math.trunc($lastWeeksCashProfits.menialBioreactorsTransfer))>>@@
				<<elseif Math.trunc($lastWeeksCashProfits.menialBioreactorsTransfer) == 0>>
					<<print cashFormat(Math.trunc($lastWeeksCashProfits.menialBioreactorsTransfer))>>
				<<else>>
					@@.red;-<<print cashFormat(Math.abs(Math.trunc($lastWeeksCashProfits.menialBioreactorsTransfer)))>>@@
				<</if>>

	<</if>>

	<<if $lastWeeksCashIncome.babyTransfer || $lastWeeksCashExpenses.babyTransfer>>

			Selling/buying babies

				<<if Math.trunc($lastWeeksCashIncome.babyTransfer) > 0>>
					@@.yellowgreen;+<<print cashFormat(Math.trunc($lastWeeksCashIncome.babyTransfer))>>@@
				<<else>>
					<<print cashFormat(Math.trunc($lastWeeksCashIncome.babyTransfer))>>
				<</if>>

				<<if Math.trunc($lastWeeksCashExpenses.babyTransfer) < 0>>
					@@.red;-<<print cashFormat(Math.abs(Math.trunc($lastWeeksCashExpenses.babyTransfer)))>>@@
				<<else>>
					<<print cashFormat(Math.trunc($lastWeeksCashExpenses.babyTransfer))>>
				<</if>>

				<<set $lastWeeksCashProfits.babyTransfer = ($lastWeeksCashIncome.babyTransfer + $lastWeeksCashExpenses.babyTransfer)>>
				<<if $lastWeeksCashProfits.babyTransfer > 0>>
					@@.yellowgreen;+<<print cashFormat(Math.trunc($lastWeeksCashProfits.babyTransfer))>>@@
				<<elseif Math.trunc($lastWeeksCashProfits.babyTransfer) == 0>>
					<<print cashFormat(Math.trunc($lastWeeksCashProfits.babyTransfer))>>
				<<else>>
					@@.red;-<<print cashFormat(Math.abs(Math.trunc($lastWeeksCashProfits.babyTransfer)))>>@@
				<</if>>

	<</if>>

	<<if ($lastWeeksCashIncome.menialTrades) || ($lastWeeksCashExpenses.menialTrades)>>

			Menials: labor

				<<if Math.trunc($lastWeeksCashIncome.menialTrades) > 0>>
					@@.yellowgreen;+<<print cashFormat(Math.trunc($lastWeeksCashIncome.menialTrades))>>@@
				<<else>>
					<<print cashFormat(Math.trunc($lastWeeksCashIncome.menialTrades))>>
				<</if>>

				<<if Math.trunc($lastWeeksCashExpenses.menialTrades) < 0>>
					@@.red;-<<print cashFormat(Math.abs(Math.trunc($lastWeeksCashExpenses.menialTrades)))>>@@
				<<else>>
					<<print cashFormat(Math.trunc($lastWeeksCashExpenses.menialTrades))>>
				<</if>>

				<<set $lastWeeksCashProfits.menialTrades = ($lastWeeksCashIncome.menialTrades + $lastWeeksCashExpenses.menialTrades)>>
				<<if $lastWeeksCashProfits.menialTrades > 0>>
					@@.yellowgreen;+<<print cashFormat(Math.trunc($lastWeeksCashProfits.menialTrades))>>@@
				<<elseif Math.trunc($lastWeeksCashProfits.menialTrades) == 0>>
					<<print cashFormat(Math.trunc($lastWeeksCashProfits.menialTrades))>>
				<<else>>
					@@.red;-<<print cashFormat(Math.abs(Math.trunc($lastWeeksCashProfits.menialTrades)))>>@@
				<</if>>

	<</if>>

	<<if $lastWeeksCashIncome.fuckdolls || $lastWeeksCashExpenses.fuckdolls>>

			Fuckdolls

				<<if Math.trunc($lastWeeksCashIncome.fuckdolls) > 0>>
					@@.yellowgreen;+<<print cashFormat(Math.trunc($lastWeeksCashIncome.fuckdolls))>>@@
				<<else>>
					<<print cashFormat(Math.trunc($lastWeeksCashIncome.fuckdolls))>>
				<</if>>

				<<if Math.trunc($lastWeeksCashExpenses.fuckdolls) < 0>>
					@@.red;-<<print cashFormat(Math.abs(Math.trunc($lastWeeksCashExpenses.fuckdolls)))>>@@
				<<else>>
					<<print cashFormat(Math.trunc($lastWeeksCashExpenses.fuckdolls))>>
				<</if>>

				<<set $lastWeeksCashProfits.fuckdolls = ($lastWeeksCashIncome.fuckdolls + $lastWeeksCashExpenses.fuckdolls)>>
				<<if $lastWeeksCashProfits.fuckdolls > 0>>
					@@.yellowgreen;+<<print cashFormat(Math.trunc($lastWeeksCashProfits.fuckdolls))>>@@
				<<elseif Math.trunc($lastWeeksCashProfits.fuckdolls) == 0>>
					<<print cashFormat(Math.trunc($lastWeeksCashProfits.fuckdolls))>>
				<<else>>
					@@.red;-<<print cashFormat(Math.abs(Math.trunc($lastWeeksCashProfits.fuckdolls)))>>@@
				<</if>>

	<</if>>

	<<if ($lastWeeksCashIncome.menialBioreactors) || ($lastWeeksCashExpenses.menialBioreactors)>>

			Menials: bioreactors

				<<if Math.trunc($lastWeeksCashIncome.menialBioreactors) > 0>>
					@@.yellowgreen;+<<print cashFormat(Math.trunc($lastWeeksCashIncome.menialBioreactors))>>@@
				<<else>>
					<<print cashFormat(Math.trunc($lastWeeksCashIncome.menialBioreactors))>>
				<</if>>

				<<if Math.trunc($lastWeeksCashExpenses.menialBioreactors) < 0>>
					@@.red;-<<print cashFormat(Math.abs(Math.trunc($lastWeeksCashExpenses.menialBioreactors)))>>@@
				<<else>>
					<<print cashFormat(Math.trunc($lastWeeksCashExpenses.menialBioreactors))>>
				<</if>>

				<<set $lastWeeksCashProfits.menialBioreactors = ($lastWeeksCashIncome.menialBioreactors + $lastWeeksCashExpenses.menialBioreactors)>>
				<<if $lastWeeksCashProfits.menialBioreactors > 0>>
					@@.yellowgreen;+<<print cashFormat(Math.trunc($lastWeeksCashProfits.menialBioreactors))>>@@
				<<elseif Math.trunc($lastWeeksCashProfits.menialBioreactors) == 0>>
					<<print cashFormat(Math.trunc($lastWeeksCashProfits.menialBioreactors))>>
				<<else>>
					@@.red;-<<print cashFormat(Math.abs(Math.trunc($lastWeeksCashProfits.menialBioreactors)))>>@@
				<</if>>

	<</if>>

	<<if $lastWeeksCashIncome.porn || $lastWeeksCashExpenses.porn>>

			Porn

				<<if Math.trunc($lastWeeksCashIncome.porn) > 0>>
					@@.yellowgreen;+<<print cashFormat(Math.trunc($lastWeeksCashIncome.porn))>>@@
				<<else>>
					<<print cashFormat(Math.trunc($lastWeeksCashIncome.porn))>>
				<</if>>

				<<if Math.trunc($lastWeeksCashExpenses.porn) < 0>>
					@@.red;-<<print cashFormat(Math.abs(Math.trunc($lastWeeksCashExpenses.porn)))>>@@
				<<else>>
					<<print cashFormat(Math.trunc($lastWeeksCashExpenses.porn))>>
				<</if>>

				<<set $lastWeeksCashProfits.porn = ($lastWeeksCashIncome.porn + $lastWeeksCashExpenses.porn)>>
				<<if $lastWeeksCashProfits.porn > 0>>
					@@.yellowgreen;+<<print cashFormat(Math.trunc($lastWeeksCashProfits.porn))>>@@
				<<elseif Math.trunc($lastWeeksCashProfits.porn) == 0>>
					<<print cashFormat(Math.trunc($lastWeeksCashProfits.porn))>>
				<<else>>
					@@.red;-<<print cashFormat(Math.abs(Math.trunc($lastWeeksCashProfits.porn)))>>@@
				<</if>>

	<</if>>

	<<if $lastWeeksCashIncome.recruiter || $lastWeeksCashExpenses.recruiter>>

			Recruiter

				<<if Math.trunc($lastWeeksCashIncome.recruiter) > 0>>
					@@.yellowgreen;+<<print cashFormat(Math.trunc($lastWeeksCashIncome.recruiter))>>@@
				<<else>>
					<<print cashFormat(Math.trunc($lastWeeksCashIncome.recruiter))>>
				<</if>>

				<<if Math.trunc($lastWeeksCashExpenses.recruiter) < 0>>
					@@.red;-<<print cashFormat(Math.abs(Math.trunc($lastWeeksCashExpenses.recruiter)))>>@@
				<<else>>
					<<print cashFormat(Math.trunc($lastWeeksCashExpenses.recruiter))>>
				<</if>>

				<<set $lastWeeksCashProfits.recruiter = ($lastWeeksCashIncome.recruiter + $lastWeeksCashExpenses.recruiter)>>
				<<if $lastWeeksCashProfits.recruiter > 0>>
					@@.yellowgreen;+<<print cashFormat(Math.trunc($lastWeeksCashProfits.recruiter))>>@@
				<<elseif Math.trunc($lastWeeksCashProfits.recruiter) == 0>>
					<<print cashFormat(Math.trunc($lastWeeksCashProfits.recruiter))>>
				<<else>>
					@@.red;-<<print cashFormat(Math.abs(Math.trunc($lastWeeksCashProfits.recruiter)))>>@@
				<</if>>

	<</if>>

	<<if $lastWeeksCashIncome.menialRetirement || $lastWeeksCashExpenses.menialRetirement>>

			Menials retiring

				<<if Math.trunc($lastWeeksCashIncome.menialRetirement) > 0>>
					@@.yellowgreen;+<<print cashFormat(Math.trunc($lastWeeksCashIncome.menialRetirement))>>@@
				<<else>>
					<<print cashFormat(Math.trunc($lastWeeksCashIncome.menialRetirement))>>
				<</if>>

				<<if Math.trunc($lastWeeksCashExpenses.menialRetirement) < 0>>
					@@.red;-<<print cashFormat(Math.abs(Math.trunc($lastWeeksCashExpenses.menialRetirement)))>>@@
				<<else>>
					<<print cashFormat(Math.trunc($lastWeeksCashExpenses.menialRetirement))>>
				<</if>>

				<<set $lastWeeksCashProfits.menialRetirement = ($lastWeeksCashIncome.menialRetirement + $lastWeeksCashExpenses.menialRetirement)>>
				<<if $lastWeeksCashProfits.menialRetirement > 0>>
					@@.yellowgreen;+<<print cashFormat(Math.trunc($lastWeeksCashProfits.menialRetirement))>>@@
				<<elseif Math.trunc($lastWeeksCashProfits.menialRetirement) == 0>>
					<<print cashFormat(Math.trunc($lastWeeksCashProfits.menialRetirement))>>
				<<else>>
					@@.red;-<<print cashFormat(Math.abs(Math.trunc($lastWeeksCashProfits.menialRetirement)))>>@@
				<</if>>

	<</if>>

	<<if $lastWeeksCashIncome.slaveMod || $lastWeeksCashExpenses.slaveMod>>

			Slave modification

				<<if Math.trunc($lastWeeksCashIncome.slaveMod) > 0>>
					@@.yellowgreen;+<<print cashFormat(Math.trunc($lastWeeksCashIncome.slaveMod))>>@@
				<<else>>
					<<print cashFormat(Math.trunc($lastWeeksCashIncome.slaveMod))>>
				<</if>>

				<<if Math.trunc($lastWeeksCashExpenses.slaveMod) < 0>>
					@@.red;-<<print cashFormat(Math.abs(Math.trunc($lastWeeksCashExpenses.slaveMod)))>>@@
				<<else>>
					<<print cashFormat(Math.trunc($lastWeeksCashExpenses.slaveMod))>>
				<</if>>

				<<set $lastWeeksCashProfits.slaveMod = ($lastWeeksCashIncome.slaveMod + $lastWeeksCashExpenses.slaveMod)>>
				<<if $lastWeeksCashProfits.slaveMod > 0>>
					@@.yellowgreen;+<<print cashFormat(Math.trunc($lastWeeksCashProfits.slaveMod))>>@@
				<<elseif Math.trunc($lastWeeksCashProfits.slaveMod) == 0>>
					<<print cashFormat(Math.trunc($lastWeeksCashProfits.slaveMod))>>
				<<else>>
					@@.red;-<<print cashFormat(Math.abs(Math.trunc($lastWeeksCashProfits.slaveMod)))>>@@
				<</if>>

	<</if>>

	<<if $lastWeeksCashIncome.slaveSurgery || $lastWeeksCashExpenses.slaveSurgery>>

			Slave surgery

				<<if Math.trunc($lastWeeksCashIncome.slaveSurgery) > 0>>
					@@.yellowgreen;+<<print cashFormat(Math.trunc($lastWeeksCashIncome.slaveSurgery))>>@@
				<<else>>
					<<print cashFormat(Math.trunc($lastWeeksCashIncome.slaveSurgery))>>
				<</if>>

				<<if Math.trunc($lastWeeksCashExpenses.slaveSurgery) < 0>>
					@@.red;-<<print cashFormat(Math.abs(Math.trunc($lastWeeksCashExpenses.slaveSurgery)))>>@@
				<<else>>
					<<print cashFormat(Math.trunc($lastWeeksCashExpenses.slaveSurgery))>>
				<</if>>

				<<set $lastWeeksCashProfits.slaveSurgery = ($lastWeeksCashIncome.slaveSurgery + $lastWeeksCashExpenses.slaveSurgery)>>
				<<if $lastWeeksCashProfits.slaveSurgery > 0>>
					@@.yellowgreen;+<<print cashFormat(Math.trunc($lastWeeksCashProfits.slaveSurgery))>>@@
				<<elseif Math.trunc($lastWeeksCashProfits.slaveSurgery) == 0>>
					<<print cashFormat(Math.trunc($lastWeeksCashProfits.slaveSurgery))>>
				<<else>>
					@@.red;-<<print cashFormat(Math.abs(Math.trunc($lastWeeksCashProfits.slaveSurgery)))>>@@
				<</if>>

	<</if>>

	<<if $lastWeeksCashIncome.birth || $lastWeeksCashExpenses.birth>>

			Slave surgery

				<<if Math.trunc($lastWeeksCashIncome.birth) > 0>>
					@@.yellowgreen;+<<print cashFormat(Math.trunc($lastWeeksCashIncome.birth))>>@@
				<<else>>
					<<print cashFormat(Math.trunc($lastWeeksCashIncome.birth))>>
				<</if>>

				<<if Math.trunc($lastWeeksCashExpenses.birth) < 0>>
					@@.red;-<<print cashFormat(Math.abs(Math.trunc($lastWeeksCashExpenses.birth)))>>@@
				<<else>>
					<<print cashFormat(Math.trunc($lastWeeksCashExpenses.birth))>>
				<</if>>

				<<set $lastWeeksCashProfits.birth = ($lastWeeksCashIncome.birth + $lastWeeksCashExpenses.birth)>>
				<<if $lastWeeksCashProfits.birth > 0>>
					@@.yellowgreen;+<<print cashFormat(Math.trunc($lastWeeksCashProfits.birth))>>@@
				<<elseif Math.trunc($lastWeeksCashProfits.birth) == 0>>
					<<print cashFormat(Math.trunc($lastWeeksCashProfits.birth))>>
				<<else>>
					@@.red;-<<print cashFormat(Math.abs(Math.trunc($lastWeeksCashProfits.birth)))>>@@
				<</if>>

	<</if>>

Finance

	<<if $lastWeeksCashIncome.personalBusiness || $lastWeeksCashExpenses.personalBusiness>>

			Personal business

				<<if Math.trunc($lastWeeksCashIncome.personalBusiness) > 0>>
					@@.yellowgreen;+<<print cashFormat(Math.trunc($lastWeeksCashIncome.personalBusiness))>>@@
				<<else>>
					<<print cashFormat(Math.trunc($lastWeeksCashIncome.personalBusiness))>>
				<</if>>

				<<if Math.trunc($lastWeeksCashExpenses.personalBusiness) < 0>>
					@@.red;-<<print cashFormat(Math.abs(Math.trunc($lastWeeksCashExpenses.personalBusiness)))>>@@
				<<else>>
					<<print cashFormat(Math.trunc($lastWeeksCashExpenses.personalBusiness))>>
				<</if>>

				<<set $lastWeeksCashProfits.personalBusiness = ($lastWeeksCashIncome.personalBusiness + $lastWeeksCashExpenses.personalBusiness)>>
				<<if $lastWeeksCashProfits.personalBusiness > 0>>
					@@.yellowgreen;+<<print cashFormat(Math.trunc($lastWeeksCashProfits.personalBusiness))>>@@
				<<elseif Math.trunc($lastWeeksCashProfits.personalBusiness) == 0>>
					<<print cashFormat(Math.trunc($lastWeeksCashProfits.personalBusiness))>>
				<<else>>
					@@.red;-<<print cashFormat(Math.abs(Math.trunc($lastWeeksCashProfits.personalBusiness)))>>@@
				<</if>>

	<</if>>

		<<if $girls == 3>>
			Since you are accustomed to luxury, your personal living expenses are:
		<<elseif $girls == 2>>
			Since you are used to living well, your personal living expenses are:
		<<else>>
			Since you are used to a fairly normal life, your personal living expenses are:
		<</if>>

				<<if Math.trunc($lastWeeksCashIncome.personalLivingExpenses) > 0>>
					@@.yellowgreen;+<<print cashFormat(Math.trunc($lastWeeksCashIncome.personalLivingExpenses))>>@@
				<<else>>
					<<print cashFormat(Math.trunc($lastWeeksCashIncome.personalLivingExpenses))>>
				<</if>>

				<<if Math.trunc($lastWeeksCashExpenses.personalLivingExpenses) < 0>>
					@@.red;-<<print cashFormat(Math.abs(Math.trunc($lastWeeksCashExpenses.personalLivingExpenses)))>>@@
				<<else>>
					<<print cashFormat(Math.trunc($lastWeeksCashExpenses.personalLivingExpenses))>>
				<</if>>

				<<set $lastWeeksCashProfits.personalLivingExpenses = ($lastWeeksCashIncome.personalLivingExpenses + $lastWeeksCashExpenses.personalLivingExpenses)>>
				<<if $lastWeeksCashProfits.personalLivingExpenses > 0>>
					@@.yellowgreen;+<<print cashFormat(Math.trunc($lastWeeksCashProfits.personalLivingExpenses))>>@@
				<<elseif Math.trunc($lastWeeksCashProfits.personalLivingExpenses) == 0>>
					<<print cashFormat(Math.trunc($lastWeeksCashProfits.personalLivingExpenses))>>
				<<else>>
					@@.red;-<<print cashFormat(Math.abs(Math.trunc($lastWeeksCashProfits.personalLivingExpenses)))>>@@
				<</if>>

	<<if $lastWeeksCashIncome.PCtraining || $lastWeeksCashExpenses.PCtraining>>

			Your training

				<<if Math.trunc($lastWeeksCashIncome.PCtraining) > 0>>
					@@.yellowgreen;+<<print cashFormat(Math.trunc($lastWeeksCashIncome.PCtraining))>>@@
				<<else>>
					<<print cashFormat(Math.trunc($lastWeeksCashIncome.PCtraining))>>
				<</if>>

				<<if Math.trunc($lastWeeksCashExpenses.PCtraining) < 0>>
					@@.red;-<<print cashFormat(Math.abs(Math.trunc($lastWeeksCashExpenses.PCtraining)))>>@@
				<<else>>
					<<print cashFormat(Math.trunc($lastWeeksCashExpenses.PCtraining))>>
				<</if>>

				<<set $lastWeeksCashProfits.PCtraining = ($lastWeeksCashIncome.PCtraining + $lastWeeksCashExpenses.PCtraining)>>
				<<if $lastWeeksCashProfits.PCtraining > 0>>
					@@.yellowgreen;+<<print cashFormat(Math.trunc($lastWeeksCashProfits.PCtraining))>>@@
				<<elseif Math.trunc($lastWeeksCashProfits.PCtraining) == 0>>
					<<print cashFormat(Math.trunc($lastWeeksCashProfits.PCtraining))>>
				<<else>>
					@@.red;-<<print cashFormat(Math.abs(Math.trunc($lastWeeksCashProfits.PCtraining)))>>@@
				<</if>>

	<</if>>

	<<if $lastWeeksCashIncome.PCmedical || $lastWeeksCashExpenses.PCmedical>>

			Your medical expenses

				<<if Math.trunc($lastWeeksCashIncome.PCmedical) > 0>>
					@@.yellowgreen;+<<print cashFormat(Math.trunc($lastWeeksCashIncome.PCmedical))>>@@
				<<else>>
					<<print cashFormat(Math.trunc($lastWeeksCashIncome.PCmedical))>>
				<</if>>

				<<if Math.trunc($lastWeeksCashExpenses.PCmedical) < 0>>
					@@.red;-<<print cashFormat(Math.abs(Math.trunc($lastWeeksCashExpenses.PCmedical)))>>@@
				<<else>>
					<<print cashFormat(Math.trunc($lastWeeksCashExpenses.PCmedical))>>
				<</if>>

				<<set $lastWeeksCashProfits.PCmedical = ($lastWeeksCashIncome.PCmedical + $lastWeeksCashExpenses.PCmedical)>>
				<<if $lastWeeksCashProfits.PCmedical > 0>>
					@@.yellowgreen;+<<print cashFormat(Math.trunc($lastWeeksCashProfits.PCmedical))>>@@
				<<elseif Math.trunc($lastWeeksCashProfits.PCmedical) == 0>>
					<<print cashFormat(Math.trunc($lastWeeksCashProfits.PCmedical))>>
				<<else>>
					@@.red;-<<print cashFormat(Math.abs(Math.trunc($lastWeeksCashProfits.PCmedical)))>>@@
				<</if>>

	<</if>>

	<<if $lastWeeksCashIncome.PCskills || $lastWeeksCashExpenses.PCskills>>

			Your skills

				<<if Math.trunc($lastWeeksCashIncome.PCskills) > 0>>
					@@.yellowgreen;+<<print cashFormat(Math.trunc($lastWeeksCashIncome.PCskills))>>@@
				<<else>>
					<<print cashFormat(Math.trunc($lastWeeksCashIncome.PCskills))>>
				<</if>>

				<<if Math.trunc($lastWeeksCashExpenses.PCskills) < 0>>
					@@.red;-<<print cashFormat(Math.abs(Math.trunc($lastWeeksCashExpenses.PCskills)))>>@@
				<<else>>
					<<print cashFormat(Math.trunc($lastWeeksCashExpenses.PCskills))>>
				<</if>>

				<<set $lastWeeksCashProfits.PCskills = ($lastWeeksCashIncome.PCskills + $lastWeeksCashExpenses.PCskills)>>
				<<if $lastWeeksCashProfits.PCskills > 0>>
					@@.yellowgreen;+<<print cashFormat(Math.trunc($lastWeeksCashProfits.PCskills))>>@@
				<<elseif Math.trunc($lastWeeksCashProfits.PCskills) == 0>>
					<<print cashFormat(Math.trunc($lastWeeksCashProfits.PCskills))>>
				<<else>>
					@@.red;-<<print cashFormat(Math.abs(Math.trunc($lastWeeksCashProfits.PCskills)))>>@@
				<</if>>

	<</if>>

			Your rents
			<<if $lastWeeksCashExpenses.rents < 0>>
				and bribes
			<</if>>

			<<if Math.trunc($lastWeeksCashIncome.rents) > 0>>
				@@.yellowgreen;+<<print cashFormat(Math.trunc($lastWeeksCashIncome.rents))>>@@
			<<else>>
				<<print cashFormat(Math.trunc($lastWeeksCashIncome.rents))>>
			<</if>>

			<<if Math.trunc($lastWeeksCashExpenses.rents) < 0>>
				@@.red;-<<print cashFormat(Math.abs(Math.trunc($lastWeeksCashExpenses.rents)))>>@@
			<<else>>
				<<print cashFormat(Math.trunc($lastWeeksCashExpenses.rents))>>
			<</if>>

			<<set $lastWeeksCashProfits.rents = ($lastWeeksCashIncome.rents + $lastWeeksCashExpenses.rents)>>
			<<if $lastWeeksCashIncome.rents > 0>>
				@@.yellowgreen;<<print cashFormat(Math.trunc($lastWeeksCashIncome.rents))>>@@
			<<elseif Math.trunc($lastWeeksCashIncome.rents) == 0>>
				<<print cashFormat(Math.trunc($lastWeeksCashIncome.rents))>>
			<<else>>
				@@.red;-<<print cashFormat(Math.abs(Math.trunc($lastWeeksCashIncome.rents)))>>@@
			<</if>>

	<<if $lastWeeksCashIncome.stocks>>

			Stock dividends on ($personalShares/<<print ($publicShares + $personalShares)>> shares).

				<<if Math.trunc($lastWeeksCashIncome.stocks) > 0>>
					@@.yellowgreen;+<<print cashFormat(Math.trunc($lastWeeksCashIncome.stocks))>>@@
				<<else>>
					<<print cashFormat(Math.trunc($lastWeeksCashIncome.stocks))>>
				<</if>>

				<<if Math.trunc($lastWeeksCashExpenses.stocks) < 0>>
					@@.red;-<<print cashFormat(Math.abs(Math.trunc($lastWeeksCashExpenses.stocks)))>>@@
				<<else>>
					<<print cashFormat(Math.trunc($lastWeeksCashExpenses.stocks))>>
				<</if>>

				<<set $lastWeeksCashProfits.stocks = ($lastWeeksCashIncome.stocks + $lastWeeksCashExpenses.stocks)>>
				<<if $lastWeeksCashProfits.stocks > 0>>
					@@.yellowgreen;+<<print cashFormat(Math.trunc($lastWeeksCashProfits.stocks))>>@@
				<<elseif Math.trunc($lastWeeksCashProfits.stocks) == 0>>
					<<print cashFormat(Math.trunc($lastWeeksCashProfits.stocks))>>
				<<else>>
					@@.red;-<<print cashFormat(Math.abs(Math.trunc($lastWeeksCashProfits.stocks)))>>@@
				<</if>>

	<</if>>

	<<if $lastWeeksCashIncome.stocksTraded|| $lastWeeksCashExpenses.stocksTraded>>

			Stock trading

				<<if Math.trunc($lastWeeksCashIncome.stocksTraded) > 0>>
					@@.yellowgreen;+<<print cashFormat(Math.trunc($lastWeeksCashIncome.stocksTraded))>>@@
				<<else>>
					<<print cashFormat(Math.trunc($lastWeeksCashIncome.stocksTraded))>>
				<</if>>

				<<if Math.trunc($lastWeeksCashExpenses.stocksTraded) < 0>>
					@@.red;-<<print cashFormat(Math.abs(Math.trunc($lastWeeksCashExpenses.stocksTraded)))>>@@
				<<else>>
					<<print cashFormat(Math.trunc($lastWeeksCashExpenses.stocksTraded))>>
				<</if>>

				<<set $lastWeeksCashProfits.stocksTraded = ($lastWeeksCashIncome.stocksTraded + $lastWeeksCashExpenses.stocksTraded)>>
				<<if $lastWeeksCashProfits.stocksTraded > 0>>
					@@.yellowgreen;+<<print cashFormat(Math.trunc($lastWeeksCashProfits.stocksTraded))>>@@
				<<elseif Math.trunc($lastWeeksCashProfits.stocksTraded) == 0>>
					<<print cashFormat(Math.trunc($lastWeeksCashProfits.stocksTraded))>>
				<<else>>
					@@.red;-<<print cashFormat(Math.abs(Math.trunc($lastWeeksCashProfits.stocksTraded)))>>@@
				<</if>>

	<</if>>

	<<if $lastWeeksCashIncome.fines || $lastWeeksCashExpenses.fines>>

			Fines

				<<if Math.trunc($lastWeeksCashIncome.fines) > 0>>
					@@.yellowgreen;+<<print cashFormat(Math.trunc($lastWeeksCashIncome.fines))>>@@
				<<else>>
					<<print cashFormat(Math.trunc($lastWeeksCashIncome.fines))>>
				<</if>>

				<<if Math.trunc($lastWeeksCashExpenses.fines) < 0>>
					@@.red;-<<print cashFormat(Math.abs(Math.trunc($lastWeeksCashExpenses.fines)))>>@@
				<<else>>
					<<print cashFormat(Math.trunc($lastWeeksCashExpenses.fines))>>
				<</if>>

				<<set $lastWeeksCashProfits.fines = ($lastWeeksCashIncome.fines + $lastWeeksCashExpenses.fines)>>
				<<if $lastWeeksCashProfits.fines > 0>>
					@@.yellowgreen;+<<print cashFormat(Math.trunc($lastWeeksCashProfits.fines))>>@@
				<<elseif Math.trunc($lastWeeksCashProfits.fines) == 0>>
					<<print cashFormat(Math.trunc($lastWeeksCashProfits.fines))>>
				<<else>>
					@@.red;-<<print cashFormat(Math.abs(Math.trunc($lastWeeksCashProfits.fines)))>>@@
				<</if>>

	<</if>>

	<<if $lastWeeksCashIncome.event || $lastWeeksCashExpenses.event>>

			Events

				<<if Math.trunc($lastWeeksCashIncome.event) > 0>>
					@@.yellowgreen;+<<print cashFormat(Math.trunc($lastWeeksCashIncome.event))>>@@
				<<else>>
					<<print cashFormat(Math.trunc($lastWeeksCashIncome.event))>>
				<</if>>

				<<if Math.trunc($lastWeeksCashExpenses.event) < 0>>
					@@.red;-<<print cashFormat(Math.abs(Math.trunc($lastWeeksCashExpenses.event)))>>@@
				<<else>>
					<<print cashFormat(Math.trunc($lastWeeksCashExpenses.event))>>
				<</if>>

				<<set $lastWeeksCashProfits.event = ($lastWeeksCashIncome.event + $lastWeeksCashExpenses.event)>>
				<<if $lastWeeksCashProfits.event > 0>>
					@@.yellowgreen;+<<print cashFormat(Math.trunc($lastWeeksCashProfits.event))>>@@
				<<elseif Math.trunc($lastWeeksCashProfits.event) == 0>>
					<<print cashFormat(Math.trunc($lastWeeksCashProfits.event))>>
				<<else>>
					@@.red;-<<print cashFormat(Math.abs(Math.trunc($lastWeeksCashProfits.event)))>>@@
				<</if>>

	<</if>>

	<<if $lastWeeksCashIncome.war || $lastWeeksCashExpenses.war>>

			Archology conflict

				<<if Math.trunc($lastWeeksCashIncome.war) > 0>>
					@@.yellowgreen;+<<print cashFormat(Math.trunc($lastWeeksCashIncome.war))>>@@
				<<else>>
					<<print cashFormat(Math.trunc($lastWeeksCashIncome.war))>>
				<</if>>

				<<if Math.trunc($lastWeeksCashExpenses.war) < 0>>
					@@.red;-<<print cashFormat(Math.abs(Math.trunc($lastWeeksCashExpenses.war)))>>@@
				<<else>>
					<<print cashFormat(Math.trunc($lastWeeksCashExpenses.war))>>
				<</if>>

				<<set $lastWeeksCashProfits.war = ($lastWeeksCashIncome.war + $lastWeeksCashExpenses.war)>>
				<<if $lastWeeksCashProfits.war > 0>>
					@@.yellowgreen;+<<print cashFormat(Math.trunc($lastWeeksCashProfits.war))>>@@
				<<elseif Math.trunc($lastWeeksCashProfits.war) == 0>>
					<<print cashFormat(Math.trunc($lastWeeksCashProfits.war))>>
				<<else>>
					@@.red;-<<print cashFormat(Math.abs(Math.trunc($lastWeeksCashProfits.war)))>>@@
				<</if>>

	<</if>>

	<<if $lastWeeksCashIncome.PCtraining || $lastWeeksCashExpenses.PCtraining>>

				<<if ($personalAttention == "trading")>>
					[[Trading trainer|Personal Attention Select][$nextButton = "Back to Budget", $nextLink = "Costs Budget"]] fees
				<<elseif ($personalAttention == "warfare")>>
					[[Warfare trainer|Personal Attention Select][$nextButton = "Back to Budget", $nextLink = "Costs Budget"]] fees
				<<elseif ($personalAttention == "slaving")>>
					[[Slaving trainer|Personal Attention Select][$nextButton = "Back to Budget", $nextLink = "Costs Budget"]] fees
				<<elseif ($personalAttention == "engineering")>>
					[[Engineering trainer|Personal Attention Select][$nextButton = "Back to Budget", $nextLink = "Costs Budget"]] fees
				<<elseif ($personalAttention == "medicine")>>
					[[Medicine trainer|Personal Attention Select][$nextButton = "Back to Budget", $nextLink = "Costs Budget"]] fees
				<</if>>

				<<if Math.trunc($lastWeeksCashIncome.PCtraining) > 0>>
					@@.yellowgreen;+<<print cashFormat(Math.trunc($lastWeeksCashIncome.PCtraining))>>@@
				<<else>>
					<<print cashFormat(Math.trunc($lastWeeksCashIncome.PCtraining))>>
				<</if>>

				<<if Math.trunc($lastWeeksCashExpenses.PCtraining) < 0>>
					@@.red;-<<print cashFormat(Math.abs(Math.trunc($lastWeeksCashExpenses.PCtraining)))>>@@
				<<else>>
					<<print cashFormat(Math.trunc($lastWeeksCashExpenses.PCtraining))>>
				<</if>>

				<<set $lastWeeksCashProfits.PCtraining = ($lastWeeksCashIncome.PCtraining + $lastWeeksCashExpenses.PCtraining)>>
				<<if $lastWeeksCashProfits.PCtraining > 0>>
					@@.yellowgreen;+<<print cashFormat(Math.trunc($lastWeeksCashProfits.PCtraining))>>@@
				<<elseif Math.trunc($lastWeeksCashProfits.PCtraining) == 0>>
					<<print cashFormat(Math.trunc($lastWeeksCashProfits.PCtraining))>>
				<<else>>
					@@.red;-<<print cashFormat(Math.abs(Math.trunc($lastWeeksCashProfits.PCtraining)))>>@@
				<</if>>

	<</if>>

	<<if $lastWeeksCashIncome.capEx || $lastWeeksCashExpenses.capEx>>

			Capital expenses

				<<if Math.trunc($lastWeeksCashIncome.capEx) > 0>>
					@@.yellowgreen;+<<print cashFormat(Math.trunc($lastWeeksCashIncome.capEx))>>@@
				<<else>>
					<<print cashFormat(Math.trunc($lastWeeksCashIncome.capEx))>>
				<</if>>

				<<if Math.trunc($lastWeeksCashExpenses.capEx) < 0>>
					@@.red;-<<print cashFormat(Math.abs(Math.trunc($lastWeeksCashExpenses.capEx)))>>@@
				<<else>>
					<<print cashFormat(Math.trunc($lastWeeksCashExpenses.capEx))>>
				<</if>>

				<<set $lastWeeksCashProfits.capEx = ($lastWeeksCashIncome.capEx + $lastWeeksCashExpenses.capEx)>>
				<<if $lastWeeksCashProfits.capEx > 0>>
					@@.yellowgreen;+<<print cashFormat(Math.trunc($lastWeeksCashProfits.capEx))>>@@
				<<elseif Math.trunc($lastWeeksCashProfits.capEx) == 0>>
					<<print cashFormat(Math.trunc($lastWeeksCashProfits.capEx))>>
				<<else>>
					@@.red;-<<print cashFormat(Math.abs(Math.trunc($lastWeeksCashProfits.capEx)))>>@@
				<</if>>

	<</if>>

	<<if $lastWeeksCashIncome.cheating || $lastWeeksCashExpenses.cheating>>

			CHEATING

				<<if Math.trunc($lastWeeksCashIncome.cheating) > 0>>
					@@.yellowgreen;+<<print cashFormat(Math.trunc($lastWeeksCashIncome.cheating))>>@@
				<<else>>
					<<print cashFormat(Math.trunc($lastWeeksCashIncome.cheating))>>
				<</if>>

				<<if Math.trunc($lastWeeksCashExpenses.cheating) < 0>>
					@@.red;-<<print cashFormat(Math.abs(Math.trunc($lastWeeksCashExpenses.cheating)))>>@@
				<<else>>
					<<print cashFormat(Math.trunc($lastWeeksCashExpenses.cheating))>>
				<</if>>

				<<set $lastWeeksCashProfits.cheating = ($lastWeeksCashIncome.cheating + $lastWeeksCashExpenses.cheating)>>
				<<if $lastWeeksCashProfits.cheating > 0>>
					@@.yellowgreen;+<<print cashFormat(Math.trunc($lastWeeksCashProfits.cheating))>>@@
				<<elseif Math.trunc($lastWeeksCashProfits.cheating) == 0>>
					<<print cashFormat(Math.trunc($lastWeeksCashProfits.cheating))>>
				<<else>>
					@@.red;-<<print cashFormat(Math.abs(Math.trunc($lastWeeksCashProfits.cheating)))>>@@
				<</if>>

	<</if>>

Policies

	<<if $lastWeeksCashIncome.policies || $lastWeeksCashExpenses.policies>>

			[[Policies|Policies][$nextButton = "Back to Budget", $nextLink = "Costs Budget"]] and [[Edicts|edicts][$nextButton = "Back to Budget", $nextLink = "Costs Budget"]]

				<<if Math.trunc($lastWeeksCashIncome.policies) > 0>>
					@@.yellowgreen;+<<print cashFormat(Math.trunc($lastWeeksCashIncome.policies))>>@@
				<<else>>
					<<print cashFormat(Math.trunc($lastWeeksCashIncome.policies))>>
				<</if>>

				<<if Math.trunc($lastWeeksCashExpenses.policies) < 0>>
					@@.red;-<<print cashFormat(Math.abs(Math.trunc($lastWeeksCashExpenses.policies)))>>@@
				<<else>>
					<<print cashFormat(Math.trunc($lastWeeksCashExpenses.policies))>>
				<</if>>

				<<set $lastWeeksCashProfits.policies = ($lastWeeksCashIncome.policies + $lastWeeksCashExpenses.policies)>>
				<<if $lastWeeksCashProfits.policies > 0>>
					@@.yellowgreen;+<<print cashFormat(Math.trunc($lastWeeksCashProfits.policies))>>@@
				<<elseif Math.trunc($lastWeeksCashProfits.policies) == 0>>
					<<print cashFormat(Math.trunc($lastWeeksCashProfits.policies))>>
				<<else>>
					@@.red;-<<print cashFormat(Math.abs(Math.trunc($lastWeeksCashProfits.policies)))>>@@
				<</if>>

	<</if>>

	<<if $FSSpending != 0>>

			[[Society shaping|Future Society][$nextButton = "Back to Budget", $nextLink = "Costs Budget"]]

				<<if Math.trunc($lastWeeksCashIncome.futureSocieties) > 0>>
					@@.yellowgreen;+<<print cashFormat(Math.trunc($lastWeeksCashIncome.futureSocieties))>>@@
				<<else>>
					<<print cashFormat(Math.trunc($lastWeeksCashIncome.futureSocieties))>>
				<</if>>

				<<if Math.trunc($lastWeeksCashExpenses.futureSocieties) < 0>>
					@@.red;-<<print cashFormat(Math.abs(Math.trunc($lastWeeksCashExpenses.futureSocieties)))>>@@
				<<else>>
					<<print cashFormat(Math.trunc($lastWeeksCashExpenses.futureSocieties))>>
				<</if>>

				<<set $lastWeeksCashProfits.futureSocieties = ($lastWeeksCashIncome.futureSocieties + $lastWeeksCashExpenses.futureSocieties)>>
				<<if $lastWeeksCashProfits.futureSocieties > 0>>
					@@.yellowgreen;+<<print cashFormat(Math.trunc($lastWeeksCashProfits.futureSocieties))>>@@
				<<elseif Math.trunc($lastWeeksCashProfits.futureSocieties) == 0>>
					<<print cashFormat(Math.trunc($lastWeeksCashProfits.futureSocieties))>>
				<<else>>
					@@.red;-<<print cashFormat(Math.abs(Math.trunc($lastWeeksCashProfits.futureSocieties)))>>@@
				<</if>>

	<</if>>

	<<if $lastWeeksCashIncome.schoolBacking || $lastWeeksCashExpenses.schoolBacking>>

				<<if $TSS.subsidize != 0>>[[The Slavegirl School|Policies][$nextButton = "Back to Budget", $nextLink = "Costs Budget"]] branch campus influence
				<<elseif $GRI.subsidize != 0>>[[Growth Research Institute|Policies][$nextButton = "Back to Budget", $nextLink = "Costs Budget"]] subsidiary lab influence
				<<elseif $SCP.subsidize != 0>>[[St. Claver Preparatory|Policies][$nextButton = "Back to Budget", $nextLink = "Costs Budget"]] branch campus influence
				<<elseif $LDE.subsidize != 0>>[[L'Encole des Enculees|Policies][$nextButton = "Back to Budget", $nextLink = "Costs Budget"]] branch campus influence
				<<elseif $TGA.subsidize != 0>>[[The Gymnasium-Academy|Policies][$nextButton = "Back to Budget", $nextLink = "Costs Budget"]] branch campus influence
				<<elseif $TCR.subsidize != 0>>[[The Cattle Ranch|Policies][$nextButton = "Back to Budget", $nextLink = "Costs Budget"]] branch campus influence
				<<elseif $HA.subsidize != 0>>[[Hippolyta Academy|Policies][$nextButton = "Back to Budget", $nextLink = "Costs Budget"]] branch campus influence
				<<elseif $TFS.subsidize != 0>>[[The Futanari Sisters|Policies][$nextButton = "Back to Budget", $nextLink = "Costs Budget"]] community influence
				<<elseif $TSS.schoolPresent == 1>>[[The Slavegirl School|Policies][$nextButton = "Back to Budget", $nextLink = "Costs Budget"]] branch campus upkeep
				<<elseif $GRI.schoolPresent == 1>>[[Growth Research Institute|Policies][$nextButton = "Back to Budget", $nextLink = "Costs Budget"]] subsidiary lab upkeep
				<<elseif $SCP.schoolPresent == 1>>[[St. Claver Preparatory|Policies][$nextButton = "Back to Budget", $nextLink = "Costs Budget"]] branch campus upkeep
				<<elseif $LDE.schoolPresent == 1>>[[L'Encole des Enculees|Policies][$nextButton = "Back to Budget", $nextLink = "Costs Budget"]] branch campus upkeep
				<<elseif $TGA.schoolPresent == 1>>[[The Gymnasium-Academy|Policies][$nextButton = "Back to Budget", $nextLink = "Costs Budget"]] branch campus upkeep
				<<elseif $TCR.schoolPresent == 1>>[[The Cattle Ranch|Policies][$nextButton = "Back to Budget", $nextLink = "Costs Budget"]] branch campus upkeep
				<<elseif $HA.schoolPresent == 1>>[[Hippolyta Academy|Policies][$nextButton = "Back to Budget", $nextLink = "Costs Budget"]] branch campus upkeep
				<<else>> Unknown school expense
				<</if>>

				<<if Math.trunc($lastWeeksCashIncome.schoolBacking) > 0>>
					@@.yellowgreen;+<<print cashFormat(Math.trunc($lastWeeksCashIncome.schoolBacking))>>@@
				<<else>>
					<<print cashFormat(Math.trunc($lastWeeksCashIncome.schoolBacking))>>
				<</if>>

				<<if Math.trunc($lastWeeksCashExpenses.schoolBacking) < 0>>
					@@.red;-<<print cashFormat(Math.abs(Math.trunc($lastWeeksCashExpenses.schoolBacking)))>>@@
				<<else>>
					<<print cashFormat(Math.trunc($lastWeeksCashExpenses.schoolBacking))>>
				<</if>>

				<<set $lastWeeksCashProfits.schoolBacking = ($lastWeeksCashIncome.schoolBacking + $lastWeeksCashExpenses.schoolBacking)>>
				<<if $lastWeeksCashProfits.schoolBacking > 0>>
					@@.yellowgreen;+<<print cashFormat(Math.trunc($lastWeeksCashProfits.schoolBacking))>>@@
				<<elseif Math.trunc($lastWeeksCashProfits.schoolBacking) == 0>>
					<<print cashFormat(Math.trunc($lastWeeksCashProfits.schoolBacking))>>
				<<else>>
					@@.red;-<<print cashFormat(Math.abs(Math.trunc($lastWeeksCashProfits.schoolBacking)))>>@@
				<</if>>

	<</if>>

	<<if $citizenOrphanageTotal > 0>>

			Education of $citizenOrphanageTotal of your slaves' children in citizen schools

				<<if Math.trunc($lastWeeksCashIncome.citizenOrphanage) > 0>>
					@@.yellowgreen;+<<print cashFormat(Math.trunc($lastWeeksCashIncome.citizenOrphanage))>>@@
				<<else>>
					<<print cashFormat(Math.trunc($lastWeeksCashIncome.citizenOrphanage))>>
				<</if>>

				<<if Math.trunc($lastWeeksCashExpenses.citizenOrphanage) < 0>>
					@@.red;-<<print cashFormat(Math.abs(Math.trunc($lastWeeksCashExpenses.citizenOrphanage)))>>@@
				<<else>>
					<<print cashFormat(Math.trunc($lastWeeksCashExpenses.citizenOrphanage))>>
				<</if>>

				<<set $lastWeeksCashProfits.citizenOrphanage = ($lastWeeksCashIncome.citizenOrphanage + $lastWeeksCashExpenses.citizenOrphanage)>>
				<<if $lastWeeksCashProfits.citizenOrphanage > 0>>
					@@.yellowgreen;+<<print cashFormat(Math.trunc($lastWeeksCashProfits.citizenOrphanage))>>@@
				<<elseif Math.trunc($lastWeeksCashProfits.citizenOrphanage) == 0>>
					<<print cashFormat(Math.trunc($lastWeeksCashProfits.citizenOrphanage))>>
				<<else>>
					@@.red;-<<print cashFormat(Math.abs(Math.trunc($lastWeeksCashProfits.citizenOrphanage)))>>@@
				<</if>>

	<</if>>

	<<if $privateOrphanageTotal > 0>>

			Private tutelage of $privateOrphanageTotal of your slaves' children

				<<if Math.trunc($lastWeeksCashIncome.privateOrphanage) > 0>>
					@@.yellowgreen;+<<print cashFormat(Math.trunc($lastWeeksCashIncome.privateOrphanage))>>@@
				<<else>>
					<<print cashFormat(Math.trunc($lastWeeksCashIncome.privateOrphanage))>>
				<</if>>

				<<if Math.trunc($lastWeeksCashExpenses.privateOrphanage) < 0>>
					@@.red;-<<print cashFormat(Math.abs(Math.trunc($lastWeeksCashExpenses.privateOrphanage)))>>@@
				<<else>>
					<<print cashFormat(Math.trunc($lastWeeksCashExpenses.privateOrphanage))>>
				<</if>>

				<<set $lastWeeksCashProfits.privateOrphanage = ($lastWeeksCashIncome.privateOrphanage + $lastWeeksCashExpenses.privateOrphanage)>>
				<<if $lastWeeksCashProfits.privateOrphanage > 0>>
					@@.yellowgreen;+<<print cashFormat(Math.trunc($lastWeeksCashProfits.privateOrphanage))>>@@
				<<elseif Math.trunc($lastWeeksCashProfits.privateOrphanage) == 0>>
					<<print cashFormat(Math.trunc($lastWeeksCashProfits.privateOrphanage))>>
				<<else>>
					@@.red;-<<print cashFormat(Math.abs(Math.trunc($lastWeeksCashProfits.privateOrphanage)))>>@@
				<</if>>

	<</if>>

	<<if $mercenaries > 0>>

			Security: [[$mercenariesTitle|Barracks][$nextButton = "Back to Budget", $nextLink = "Costs Budget"]]
			<<if $barracks>><<else>>
//@@.red;Cost increased by the lack of an armory to house them.@@//<</if>>
			<<if ($PC.warfare >= 100) || ($PC.career == "arcology owner")>>
//Cost reduced by your @@.springgreen;mercenary contacts.@@//<</if>>

				<<if Math.trunc($lastWeeksCashIncome.mercenaries) > 0>>
					@@.yellowgreen;+<<print cashFormat(Math.trunc($lastWeeksCashIncome.mercenaries))>>@@
				<<else>>
					<<print cashFormat(Math.trunc($lastWeeksCashIncome.mercenaries))>>
				<</if>>

				<<if Math.trunc($lastWeeksCashExpenses.mercenaries) < 0>>
					@@.red;-<<print cashFormat(Math.abs(Math.trunc($lastWeeksCashExpenses.mercenaries)))>>@@
				<<else>>
					<<print cashFormat(Math.trunc($lastWeeksCashExpenses.mercenaries))>>
				<</if>>

				<<set $lastWeeksCashProfits.mercenaries = ($lastWeeksCashIncome.mercenaries + $lastWeeksCashExpenses.mercenaries)>>
				<<if $lastWeeksCashProfits.mercenaries > 0>>
					@@.yellowgreen;+<<print cashFormat(Math.trunc($lastWeeksCashProfits.mercenaries))>>@@
				<<elseif Math.trunc($lastWeeksCashProfits.mercenaries) == 0>>
					<<print cashFormat(Math.trunc($lastWeeksCashProfits.mercenaries))>>
				<<else>>
					@@.red;-<<print cashFormat(Math.abs(Math.trunc($lastWeeksCashProfits.mercenaries)))>>@@
				<</if>>

	<</if>>

	<<if $lastWeeksCashIncome.securityExpansion || $lastWeeksCashExpenses.securityExpansion>>

			Security expansion

				<<if Math.trunc($lastWeeksCashIncome.securityExpansion) > 0>>
					@@.yellowgreen;+<<print cashFormat(Math.trunc($lastWeeksCashIncome.securityExpansion))>>@@
				<<else>>
					<<print cashFormat(Math.trunc($lastWeeksCashIncome.securityExpansion))>>
				<</if>>

				<<if Math.trunc($lastWeeksCashExpenses.securityExpansion) < 0>>
					@@.red;-<<print cashFormat(Math.abs(Math.trunc($lastWeeksCashExpenses.securityExpansion)))>>@@
				<<else>>
					<<print cashFormat(Math.trunc($lastWeeksCashExpenses.securityExpansion))>>
				<</if>>

				<<set $lastWeeksCashProfits.securityExpansion = ($lastWeeksCashIncome.securityExpansion + $lastWeeksCashExpenses.securityExpansion)>>
				<<if $lastWeeksCashProfits.securityExpansion > 0>>
					@@.yellowgreen;+<<print cashFormat(Math.trunc($lastWeeksCashProfits.securityExpansion))>>@@
				<<elseif Math.trunc($lastWeeksCashProfits.securityExpansion) == 0>>
					<<print cashFormat(Math.trunc($lastWeeksCashProfits.securityExpansion))>>
				<<else>>
					@@.red;-<<print cashFormat(Math.abs(Math.trunc($lastWeeksCashProfits.securityExpansion)))>>@@
				<</if>>

	<</if>>

	<<if $lastWeeksCashIncome.specialForces || $lastWeeksCashExpenses.specialForces>>

			Special forces

				<<if Math.trunc($lastWeeksCashIncome.specialForces) > 0>>
					@@.yellowgreen;+<<print cashFormat(Math.trunc($lastWeeksCashIncome.specialForces))>>@@
				<<else>>
					<<print cashFormat(Math.trunc($lastWeeksCashIncome.specialForces))>>
				<</if>>

				<<if Math.trunc($lastWeeksCashExpenses.specialForces) < 0>>
					@@.red;-<<print cashFormat(Math.abs(Math.trunc($lastWeeksCashExpenses.specialForces)))>>@@
				<<else>>
					<<print cashFormat(Math.trunc($lastWeeksCashExpenses.specialForces))>>
				<</if>>

				<<set $lastWeeksCashProfits.specialForces = ($lastWeeksCashIncome.specialForces + $lastWeeksCashExpenses.specialForces)>>
				<<if $lastWeeksCashProfits.specialForces > 0>>
					@@.yellowgreen;+<<print cashFormat(Math.trunc($lastWeeksCashProfits.specialForces))>>@@
				<<elseif Math.trunc($lastWeeksCashProfits.specialForces) == 0>>
					<<print cashFormat(Math.trunc($lastWeeksCashProfits.specialForces))>>
				<<else>>
					@@.red;-<<print cashFormat(Math.abs(Math.trunc($lastWeeksCashProfits.specialForces)))>>@@
				<</if>>

	<</if>>

	<<if (def $peacekeepers) and ($peacekeepers != 0) >>
		<<if $peacekeepers.undermining != 0>>

				Undermine political support for the nearby old world peacekeeping mission.

					<<if Math.trunc($lastWeeksCashIncome.peacekeepers) > 0>>
						@@.yellowgreen;+<<print cashFormat(Math.trunc($lastWeeksCashIncome.peacekeepers))>>@@
					<<else>>
						<<print cashFormat(Math.trunc($lastWeeksCashIncome.peacekeepers))>>
					<</if>>

					<<if Math.trunc($lastWeeksCashExpenses.peacekeepers) < 0>>
						@@.red;-<<print cashFormat(Math.abs(Math.trunc($lastWeeksCashExpenses.peacekeepers)))>>@@
					<<else>>
						<<print cashFormat(Math.trunc($lastWeeksCashExpenses.peacekeepers))>>
					<</if>>

					<<set $lastWeeksCashProfits.peacekeepers = ($lastWeeksCashIncome.peacekeepers + $lastWeeksCashExpenses.peacekeepers)>>
					<<if $lastWeeksCashProfits.peacekeepers > 0>>
						@@.yellowgreen;+<<print cashFormat(Math.trunc($lastWeeksCashProfits.peacekeepers))>>@@
					<<else>>
						@@.red;-<<print cashFormat(Math.abs(Math.trunc($lastWeeksCashProfits.peacekeepers)))>>@@
					<</if>>

		<</if>>
	<</if>>

	<<if $lastWeeksCashIncome.recruiter || $lastWeeksCashExpenses.recruiter>>

			__Recruiting__

				<<if Math.trunc($lastWeeksCashIncome.recruiter) > 0>>
					@@.yellowgreen;+<<print cashFormat(Math.trunc($lastWeeksCashIncome.recruiter))>>@@
				<<else>>
					<<print cashFormat(Math.trunc($lastWeeksCashIncome.recruiter))>>
				<</if>>

				<<if Math.trunc($lastWeeksCashExpenses.recruiter) < 0>>
					@@.red;-<<print cashFormat(Math.abs(Math.trunc($lastWeeksCashExpenses.recruiter)))>>@@
				<<else>>
					<<print cashFormat(Math.trunc($lastWeeksCashExpenses.recruiter))>>
				<</if>>

				<<set $lastWeeksCashProfits.recruiter = ($lastWeeksCashIncome.recruiter + $lastWeeksCashExpenses.recruiter)>>
				<<if $lastWeeksCashProfits.recruiter > 0>>
					@@.yellowgreen;+<<print cashFormat(Math.trunc($lastWeeksCashProfits.recruiter))>>@@
				<<elseif Math.trunc($lastWeeksCashProfits.recruiter) == 0>>
					<<print cashFormat(Math.trunc($lastWeeksCashProfits.recruiter))>>
				<<else>>
					@@.red;-<<print cashFormat(Math.abs(Math.trunc($lastWeeksCashProfits.recruiter)))>>@@
				<</if>>

	<</if>>

		Tracked totals

			<<set $lastWeeksCashIncome.Total = hashSum($lastWeeksCashIncome)>>
			<<if $lastWeeksCashIncome.Total > 0>>
				@@.yellowgreen;+<<print cashFormat(Math.trunc($lastWeeksCashIncome.Total))>>@@
			<<else>>
				@@.red;-<<print cashFormat(Math.abs(Math.trunc($lastWeeksCashIncome.Total)))>>@@
			<</if>>

			<<set $lastWeeksCashExpenses.Total = hashSum($lastWeeksCashExpenses)>>
			<<if $lastWeeksCashExpenses.Total > 0>>
				@@.yellowgreen;+<<print cashFormat(Math.trunc($lastWeeksCashExpenses.Total))>>@@
			<<else>>
				@@.red;-<<print cashFormat(Math.abs(Math.trunc($lastWeeksCashExpenses.Total)))>>@@
			<</if>>

			<<set $lastWeeksCashProfits.Total  = ($lastWeeksCashIncome.Total + $lastWeeksCashExpenses.Total)>>
			/* each "profit" item is calculated on this sheet, and there's two ways to generate a profit total: the difference of the income and expense totals, and adding all the profit items.  If they aren't the same, I probably forgot to properly add an item's profit calculation to this sheet.*/
			<<if $lastWeeksCashProfits.Total != hashSum($lastWeeksCashProfits) - $lastWeeksCashProfits.Total>>/* Profits includes the total number of profits, so we have to subtract it back out */
				<<print (cashFormat(Math.trunc(hashSum($lastWeeksCashProfits)-$lastWeeksCashProfits.Total)))>>

				@@.red;Fix profit calc
@@
			<</if>>
			<<if $lastWeeksCashProfits.Total > 0>>
				@@.yellowgreen;+<<print cashFormat(Math.trunc($lastWeeksCashProfits.Total))>>@@
			<<else>>
				@@.red;-<<print cashFormat(Math.abs(Math.trunc($lastWeeksCashProfits.Total)))>>@@
			<</if>>

		Expenses budget for week <<print ($week+1)>>

		<<if $costs < 0>>
				@@.yellowgreen;+<<print cashFormat($costs)>>@@
			<<else>>
				@@.red;<<print cashFormat($costs)>>@@
			<</if>>

		Last week actuals

		<<if ($cash-$cashLastWeek) > 0>>
				@@.yellowgreen;+<<print cashFormat($cash-$cashLastWeek)>>@@
			<<else>>
				@@.red;<<print cashFormat($cash-$cashLastWeek)>>@@
			<</if>>

	<<if ($cash-$cashLastWeek) == $lastWeeksCashProfits.Total>>

			@@.green;The books are balanced, <<= properTitle()>>!@@

	<<else>>

			Transaction tracking off by:

			/*<<print ($lastWeeksCashExpenses.Total + $costs)>>*/
			<<if (($cash-$cashLastWeek) - $lastWeeksCashProfits.Total) > 0>>
					@@.yellowgreen;+<<print cashFormat(Math.trunc(($cash-$cashLastWeek) - $lastWeeksCashProfits.Total))>>@@
				<<elseif Math.trunc((($cash-$cashLastWeek) - $lastWeeksCashProfits.Total)) == 0>>
					<<print cashFormat(Math.trunc((($cash-$cashLastWeek) - $lastWeeksCashProfits.Total)))>>
				<<else>>
					@@.red;-<<print cashFormat(Math.abs(Math.trunc(($cash-$cashLastWeek) - $lastWeeksCashProfits.Total)))>>@@
				<</if>>

	<</if>>

 /* long entries */

<</if>>

<<if ndef $lastWeeksErrors>>
	<<set $lastWeeksErrors = "Errors: ">>
<</if>>

<<if $lastWeeksErrors !== "Errors:">>
	<<link "Reset">>
		<<set $lastWeeksErrors = "Errors: ">>
	<</link>>
	@@.red;<<print $lastWeeksErrors>>@@
<</if>>