Refactor stock cleanup logic in syncDatabase functions to remove orphaned stock entries with invalid branch_id and streamline logging for orphaned entries.

This commit is contained in:
Torsten Schulz (local)
2025-12-18 15:13:24 +01:00
parent 63f9443b77
commit 1a69b83983
2 changed files with 47 additions and 18 deletions

View File

@@ -6,8 +6,7 @@ class FalukantStock extends Model { }
FalukantStock.init({
branchId: {
type: DataTypes.INTEGER,
allowNull: false,
defaultValue: 0
allowNull: false
},
stockTypeId: {
type: DataTypes.INTEGER,