feat: guided import and export for parties, items, prices, opening stock and chart of accounts (#44)

Companies starting on Khaemhat need to bring their master data from another
system or a spreadsheet, and the chart of accounts has no Italian exchange
standard, so SPEC 12.12 asks for a guided wizard and an own layout.

- Administration > Import / export: CSV (separator and encoding guessed),
  XLSX (in-house reader, first sheet) and JSON, automatic column mapping with
  aliases, row-by-row check, error report, import confirmation and log entry.
- Rows go through PartyService, ItemService and PriceListService, so the
  import has exactly the rules, error codes and history of the forms; options
  cover existing and missing codes, VIES and city from postal code.
- Export writes the same columns as the import, plus empty templates.
- Opening stock and the chart of accounts (khaemhat-coa layout, natura, tipo,
  flag) are check-only until M6 and M7 add the ledgers to write into.
- PartyService.SaveAsync takes an explicit VIES switch for the import.
- ADR 0031, wiki Import-Export, CHANGELOG and STATUS updated.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
Alby96andClaude Opus 5.5 committed 2026-11-12 11:52:59 +01:00
1 parent 3dbbaba86e
commit caa33a2cee
29 files changed
+4783 -90

No files matched your search

+23
View File
@@ -332,3 +332,26 @@ h1[tabindex="-1"]:focus { outline: none; box-shadow: none; }
/* Stronger than the striped and hovered rows, so every pending cell shows. */
.grid tbody tr td.kh-changed { background: var(--kh-warn-soft); font-weight: 600; }
.grid td.kh-derived { color: var(--kh-text-2); font-style: italic; }
/* Guided import and export (mockup 077): the wizard and the export on the left, mapping or preview on the right. */
.kh-import { display: grid; grid-template-columns: 330px minmax(0, 1fr); gap: var(--kh-gap); align-items: start; }
.kh-import-side { display: flex; flex-direction: column; gap: var(--kh-gap); }
.kh-import-main { min-width: 0; }
.kh-import-options { display: grid; grid-template-columns: repeat(12, 1fr); gap: 10px 12px; margin-top: 14px; padding-top: 14px; border-top: 1px solid var(--kh-border); }
.kh-import-options .f { display: flex; flex-direction: column; gap: 4px; }
.kh-import-options input[type=file].in { padding: 4px; height: auto; }
.kh-import-lead { margin: 0 0 10px; }
.kh-import-list { margin: 0 0 12px; padding-left: 18px; display: grid; gap: 4px; }
.kh-import-h { font-size: 13px; margin: 14px 0 8px; }
.kh-import-chips { display: flex; flex-wrap: wrap; gap: 6px; }
.kh-import-chips .chip.soft { background: var(--kh-surface-3); color: var(--kh-text-2); }
.kh-import-actions { display: flex; gap: 8px; margin-top: 12px; flex-wrap: wrap; }
.kh-import-callout { margin: 0 12px 10px; }
.kh-import-map td select.in { min-width: 220px; }
.kh-import-preview td.kh-import-outcome { white-space: normal; min-width: 220px; }
.kh-import-msg { display: block; font-size: 11.5px; margin-top: 3px; }
.kh-import-msg.err { color: var(--kh-err); }
.kh-import-msg.warn { color: var(--kh-warn-text, var(--kh-text-2)); }
.grid tbody tr td.kh-import-cell-err { background: var(--kh-err-soft); }
.grid tbody tr td.kh-import-cell-warn { background: var(--kh-warn-soft); }
@media (max-width: 1100px) { .kh-import { grid-template-columns: 1fr; } }