Repository navigation
Feature/29 business central import - #88
Merged
Merged
Conversation
…usiness Central code
…ep manual category and quality class on re-import
…Business Central export
anis022
requested changes
Nov 19, 2026
anis022
left a comment
Member
There was a problem hiding this comment.
Nice work, left 4 comments to fix before merging.
… report the line instead
Signed-off-by: Marie-Josée Sarkis <mariejoseesarkis@hotmail.com>
Lightsul
added a commit
that referenced
this pull request
Nov 23, 2026
Renumber the receipt status SQL script to 0008, since 0007 is now the catalog quality class migration from #88. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
4 of 6 tasks
Lightsul
added a commit
that referenced
this pull request
Nov 23, 2026
Renumber the receipt status SQL script to 0008, since 0007 is now the catalog quality class migration from #88.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Closes #29
Overview
POST api/catalog-items/import(Admin, ManagePriceGrid permission)BusinessCentralExportReader: reads the Excel file with ClosedXML, columns found by nameCatalogImporter: creates or updates by BC code, so no duplicatesCatalogImportController: checks the file (missing, not .xlsx, > 10 MB, missing sheet or column) and returns a reportCatalogSaveErrors: recognizes database conflicts, shared withCatalogItemsController([Issue]: Food catalog (name, category, Business Central code) #27)To classifyand an empty class until someone picks it (no default, so a forgotten class never gives a wrong receipt value)409, nothing is saved, and importing again works#REF!,#N/A...) are reported as row errorsCoût unitaireis not imported (internal value, not the fair market value)docs/database/catalog.md, migrationMakeCatalogItemQualityClassOptionalwith SQL script0007, updated.dbmlfiles and diagrams (some images were outdated since [Issue]: Food catalog (name, category, Business Central code) #27)Testing
Automated tests (Docker must be running): all 455 pass with
dotnet test.CatalogImporterTests: create, update the name, no duplicates on re-import, same code on several rows, unit never changed, empty class, category/class kept, invalid rows reported without blocking, conflict on saveBusinessCentralExportReaderTests: reading, numeric codes as text, columns in any order, empty rows, non-Inventairerows reported, Excel errors reported, formulas not calculated, missing sheet/column, non-Excel fileCatalogImportEndpointTests:401/403by role,200with the report, re-import, errors sorted by row,400for bad files,409on conflictCatalogItemQualityClassOptionalMigrationTests: items without class, existing classes kept, rollback refused while an item has no classCatalogSaveErrorsTests: database errors recognized correctlyCatalogItemValidatorTestsandCatalogEndpointTests([Issue]: Food catalog (name, category, Business Central code) #27): a class is still required when creating or editing by handManual test with the real export:
Listes des Articles - BC, 747 items, kept outside the repo)Here's the output (with only a snippet of the item list itself):
What wasn't tested:
Screenshots / Screencasts
No UI change.
Checklist
Notes
ManagePriceGridpermission.