Overview
Comment:Fix appropriation
Downloads: Tarball | ZIP archive | SQL archive
Timelines: family | ancestors | descendants | both | trunk | stable
Files: files | file ages | folders
SHA3-256: 72b5cf03ab6b281b8e29f2e3ccd2b197c1e9159a90a86c30b50e3ebaf89feb40
User & Date: bohwaz on 2022-12-07 13:03:32
Other Links: manifest | tags
Context
2022-12-09
14:12
Fix [f6e724cc24770a2eaad699bf2777a26d5b9a8d4c] email address appears inverted in some cases check-in: 307d6ee154 user: bohwaz tags: trunk, stable
2022-12-07
13:03
Fix appropriation check-in: 72b5cf03ab user: bohwaz tags: trunk, stable
2022-12-05
12:57
Remove verify link from users profile check-in: 40fa37da4f user: bohwaz tags: trunk, stable
Changes

Modified src/include/lib/Garradin/Accounting/Years.php from [133f10c676] to [8d6a84de42].

174
175
176
177
178
179
180
181




182
183
184
185
186
187
188
189
190
191
192
193
			$account = $balances[Account::TYPE_POSITIVE_RESULT];

			$line = Line::create($account->id, 0, abs($account->balance));
			$t->addLine($line);

			$sum -= $account->balance;
		}





		if ($sum > 0) {
			$line = Line::create($appropriation_account, $sum, 0);
		}
		else {
			$line = Line::create($appropriation_account, 0, abs($sum));
		}

		$t->addLine($line);

		return $t;
	}
}








>
>
>
>

|

|
|







174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
			$account = $balances[Account::TYPE_POSITIVE_RESULT];

			$line = Line::create($account->id, 0, abs($account->balance));
			$t->addLine($line);

			$sum -= $account->balance;
		}

		if ($sum == 0) {
			return null;
		}

		if ($sum > 0) {
			$line = Line::create($appropriation_account, 0, $sum);
		}
		elseif ($sum < 0) {
			$line = Line::create($appropriation_account, abs($sum), 0);
		}

		$t->addLine($line);

		return $t;
	}
}