Overview
Comment:Fix import
Downloads: Tarball | ZIP archive | SQL archive
Timelines: family | ancestors | descendants | both | dev | 1.0.0-rc2
Files: files | file ages | folders
SHA1: 4fe6d3b70864d03bdab11b114a1f6e315f7dbb00
User & Date: bohwaz on 2020-11-27 15:15:50
Other Links: branch diff | manifest | tags
Context
2020-11-30
13:02
Fix custom user import check-in: 315a772f09 user: bohwaz tags: dev
2020-11-27
15:15
Fix import check-in: 4fe6d3b708 user: bohwaz tags: dev, 1.0.0-rc2
13:56
Don't hide form when there's an error check-in: e2f5f7cea6 user: bohwaz tags: dev
Changes

Modified src/include/lib/Garradin/Accounting/Transactions.php from [12105c65f5] to [642fbda057].

233
234
235
236
237
238
239
240

241
242
243

244
245
246
247
248
249
250
233
234
235
236
237
238
239

240
241
242

243
244
245
246
247
248
249
250







-
+


-
+







				if (!empty($row->analytical)) {
					$id_analytical = $accounts->getIdFromCode($row->analytical);

					if (!$id_analytical) {
						throw new UserException(sprintf('le compte analytique "%s" n\'existe pas dans le plan comptable', $row->analytical));
					}

					$row['id_analytical'] = $id_analytical;
					$data['id_analytical'] = $id_analytical;
				}
				elseif (property_exists($row, 'analytical')) {
					$row['id_analytical'] = null;
					$data['id_analytical'] = null;
				}

				if ($row->line_id) {
					$line = $transaction->getLine((int)$row->line_id);

					if (!$line) {
						throw new UserException(sprintf('le numéro de ligne "%s" n\'existe pas dans l\'écriture "%s"', $row->line_id, $transaction->id ?: 'à créer'));