This commit is contained in:
3
docs/8.0/ayanova/docs/form-inv-part-serials.md
Normal file
3
docs/8.0/ayanova/docs/form-inv-part-serials.md
Normal file
@@ -0,0 +1,3 @@
|
||||
# INV-PART-SERIALS Placeholder
|
||||
|
||||
This is a placeholder page for sections that are not written yet
|
||||
3
docs/8.0/ayanova/docs/form-inv-part-stock-levels.md
Normal file
3
docs/8.0/ayanova/docs/form-inv-part-stock-levels.md
Normal file
@@ -0,0 +1,3 @@
|
||||
# INV-PART-STOCK-LEVELS Placeholder
|
||||
|
||||
This is a placeholder page for sections that are not written yet
|
||||
@@ -61,6 +61,8 @@ nav:
|
||||
- Inventory:
|
||||
- 'Parts': 'form-inv-parts.md'
|
||||
- 'Part warehouses': 'form-inv-part-warehouses.md'
|
||||
- 'Part serial numbers': 'form-inv-part-serials.md'
|
||||
- 'Part stock levels': 'form-inv-part-stock-levels.md'
|
||||
- 'Part assemblies': 'form-inv-part-assemblies.md'
|
||||
- 'Part inventory': 'form-inv-part-inventory.md'
|
||||
- 'Part requests': 'form-inv-part-requests.md'
|
||||
|
||||
@@ -236,7 +236,7 @@ namespace AyaNova.Biz
|
||||
////////////////////////////////////////////////////////////////////////////////////////////////
|
||||
//UPDATE STOCK LEVELS
|
||||
//
|
||||
internal async Task<List<String>> PutStockLevelsAsync(long id, List<PartStockLevel> putPartStockLevels)
|
||||
internal async Task<List<PartStockLevel>> PutStockLevelsAsync(long id, List<PartStockLevel> putPartStockLevels)
|
||||
{
|
||||
//Fixup serials
|
||||
|
||||
@@ -247,7 +247,7 @@ namespace AyaNova.Biz
|
||||
//Remove any that should not be there anymore
|
||||
foreach (PartStockLevel existingPS in ExistingStockLevels)
|
||||
{
|
||||
if (!putPartStockLevels.Any(z => z.PartWarehouseId==existingPS.PartWarehouseId))
|
||||
if (!putPartStockLevels.Any(z => z.PartWarehouseId == existingPS.PartWarehouseId))
|
||||
{
|
||||
//no longer in the collection so ditch it
|
||||
ct.PartStockLevel.Remove(existingPS);
|
||||
@@ -258,7 +258,7 @@ namespace AyaNova.Biz
|
||||
//Add any new ones
|
||||
foreach (PartStockLevel putPS in putPartStockLevels)
|
||||
{
|
||||
if (!ExistingStockLevels.Any(z => z.PartWarehouseId==putPS.PartWarehouseId))
|
||||
if (!ExistingStockLevels.Any(z => z.PartWarehouseId == putPS.PartWarehouseId))
|
||||
{
|
||||
ct.PartStockLevel.Add(new PartStockLevel() { PartWarehouseId = putPS.PartWarehouseId, PartId = id });
|
||||
nAdded++;
|
||||
@@ -279,9 +279,9 @@ namespace AyaNova.Biz
|
||||
return null;
|
||||
}
|
||||
|
||||
await EventLogProcessor.LogEventToDatabaseAsync(new Event(UserId, id, BizType, AyaEvent.Modified, $"LT:PartSerialNumbersAvailable change (+{nAdded}, -{nRemoved})"), ct);
|
||||
await EventLogProcessor.LogEventToDatabaseAsync(new Event(UserId, id, BizType, AyaEvent.Modified, $"LT:PartStockingLevels change (+{nAdded}, -{nRemoved})"), ct);
|
||||
|
||||
return await ct.PartSerial.Where(z => z.PartId == id).OrderBy(z => z.Serial).Select(z => z.Serial).ToListAsync();
|
||||
return await ct.PartStockLevel.AsNoTracking().Where(z => z.PartId == id).OrderBy(z => z.PartWarehouseId).ToListAsync();
|
||||
}
|
||||
|
||||
////////////////////////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
@@ -22,8 +22,8 @@ namespace AyaNova.Util
|
||||
//!!!!WARNING: BE SURE TO UPDATE THE DbUtil::EmptyBizDataFromDatabaseForSeedingOrImporting WHEN NEW TABLES ADDED!!!!
|
||||
private const int DESIRED_SCHEMA_LEVEL = 15;
|
||||
|
||||
internal const long EXPECTED_COLUMN_COUNT = 700;
|
||||
internal const long EXPECTED_INDEX_COUNT = 122;
|
||||
internal const long EXPECTED_COLUMN_COUNT = 704;
|
||||
internal const long EXPECTED_INDEX_COUNT = 124;
|
||||
|
||||
//!!!!WARNING: BE SURE TO UPDATE THE DbUtil::EmptyBizDataFromDatabaseForSeedingOrImporting WHEN NEW TABLES ADDED!!!!
|
||||
|
||||
|
||||
Reference in New Issue
Block a user