Overview
Comment:Make sure the date is valid
Downloads: Tarball | ZIP archive | SQL archive
Timelines: family | ancestors | descendants | both | trunk | stable
Files: files | file ages | folders
SHA3-256: 617e234f736ce56c108dd0f7759e39767d929711c4a33ddbb6e89875221f839b
User & Date: bohwaz on 2022-02-16 00:28:54
Other Links: manifest | tags
Context
2022-02-16
23:07
Add a config constant to enable SQL queries debug to track slow queries check-in: d500eccadc user: bohwaz tags: trunk, stable
00:28
Make sure the date is valid check-in: 617e234f73 user: bohwaz tags: trunk, stable
00:07
Change wording of email footer check-in: 6e5e62b292 user: bohwaz tags: trunk, stable
Changes

Modified src/www/admin/acc/transactions/new.php from [25055afc38] to [be9d05a5cb].

43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
		$line->account = [$line->id_account => sprintf('%s — %s', $line->account_code, $line->account_name)];
	}

	unset($line);
}

// Set last used date
if (empty($transaction->date) && $session->get('acc_last_date')) {
	$transaction->date = \DateTime::createFromFormat('!Y-m-d', $session->get('acc_last_date'));
}
// Set date of the day if no date was set
elseif (empty($transaction->date)) {
	$transaction->date = new \DateTime;
}

// Make sure the date cannot be outside of the current year







|
|







43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
		$line->account = [$line->id_account => sprintf('%s — %s', $line->account_code, $line->account_name)];
	}

	unset($line);
}

// Set last used date
if (empty($transaction->date) && $session->get('acc_last_date') && $date = \DateTime::createFromFormat('!Y-m-d', $session->get('acc_last_date'))) {
	$transaction->date = $date;
}
// Set date of the day if no date was set
elseif (empty($transaction->date)) {
	$transaction->date = new \DateTime;
}

// Make sure the date cannot be outside of the current year