mirror of
https://github.com/ajisaacs/OpenNest.git
synced 2026-10-29 14:41:09 -04:00
Auto Nest leaves out ledger item codes already on other open server nests, and save and post re-check a nest's codes before going on. - Server: GET /api/nests/stock-item-codes?exclude= lists the codes on non-deleted Draft, Quote and To Be Cut nests. Codes are stored in nest_stock_codes (schema v14) at every archive write; the upgrade reads each current archive once. - Data: INestRepository.GetStockCodesInUseAsync, LedgerCodesInUse (5 s, failures become an unknown answer), the pure LedgerCodeFilter for ledger rows (reusable by release-time nesting) and LedgerCodeCheck for the re-check. - Desktop: the Auto Nest ledger summary counts "(N on other nests)" or says other nests were not checked. Save, Save As and post open Ledger Stock Changed when codes are taken: proceed after a per-attempt acknowledgement, remove the codes (undoable), or cancel. A ledger that cannot be read skips the check with a status note. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
19 lines
587 B
C#
19 lines
587 B
C#
namespace OpenNest.Data;
|
|
|
|
/// <summary>
|
|
/// A ledger item code an open server nest's plates are coded with, returned by
|
|
/// <c>GET /api/nests/stock-item-codes</c>. One entry per code and nest; a bundle code used
|
|
/// for several sheets appears once.
|
|
/// </summary>
|
|
public sealed class NestStockCodeUse
|
|
{
|
|
public string ItemCode { get; init; } = "";
|
|
|
|
public Guid NestId { get; init; }
|
|
|
|
public string NestName { get; init; } = "";
|
|
|
|
/// <summary>Draft, Quote or To Be Cut: the statuses whose sheets are still to be cut.</summary>
|
|
public NestStatus Status { get; init; }
|
|
}
|