[CLAUDE] PurchaseEvaluation: Mig 54 giá đề xuất PRO/CCM + CEO chọn giá chốt + CCM duyệt-done ô-tích
All checks were successful
Deploy SOLUTION_ERP / build-deploy (push) Successful in 5m22s

Theo note anh Kiệt FDC (go-live so-sánh-giá thứ Hai):
- (1) Giá chào thầu thêm giá đề xuất NGOÀI giá NCC: PRO nhập dải Min/Max +
  CCM nhập 1 giá (2 lệnh role-gate Procurement/CostControl, fail-closed).
  Khi duyệt cấp cuối, người duyệt CHỌN 1 giá chốt (Ncc/ProMin/ProMax/Ccm)
  -> luu ApprovedPriceAmount/Source (bind tai moi nhanh DaDuyet, bat buoc
  chon; auto-approve he thong mien).
- (3) CCM duyet-done mien CEO: DOI tu AUTO-threshold (S69) sang O-TICH-TAY
  (finalizeByCcmDelegation) -- CCM chu dong tich, fail-closed theo nguong
  + role + gia goi. An toan hon (khong vo tinh bo CEO).
- Mig 54 additive-nullable (5 cot PE) - FE 2 app SHA-mirror - test 306->334
  (+28: opt-in 6->11, +10 gia chot, +13 setter authz).

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
This commit is contained in:
pqhuy1987
2026-06-18 15:51:39 +07:00
parent 77ad219361
commit 1d86abcdc5
20 changed files with 7931 additions and 101 deletions

View File

@ -65,6 +65,22 @@ public class PurchaseEvaluation : AuditableEntity
public bool IsUrgentByPro { get; set; }
public bool IsUrgentByCcm { get; set; }
// [Mig 54 2026-06-18 — anh Kiệt FDC] Giá đề xuất tại mục "c. Giá chào thầu" — NGOÀI
// giá NCC báo lên (WinnerQuoteTotal = SUM báo giá của NCC được chọn, computed). PRO
// (role Procurement) nhập dải Min/Max — nếu chỉ 1 trong 2 → hiểu là giá chốt đó. CCM
// (role CostControl) nhập 1 giá đề xuất để CEO nhìn + duyệt theo. Role-gate qua
// UpdatePeSuggestedPrice{Pro,Ccm}Command (mirror ngân sách PRO/CCM Mig 50).
public decimal? ProSuggestedMinPrice { get; set; }
public decimal? ProSuggestedMaxPrice { get; set; }
public decimal? CcmSuggestedPrice { get; set; }
// [Mig 54] Giá CHỐT người duyệt cấp cuối chọn khi duyệt (① "duyệt theo giá đề xuất").
// Set tại MỌI nhánh DaDuyet của ApproveV2Async (terminal + CCM-delegation-finalize).
// ApprovedPriceSource ∈ {Ncc, ProMin, ProMax, Ccm} = nguồn giá đã chọn; Amount =
// snapshot giá trị lúc duyệt. Null cho phiếu duyệt trước Mig 54 hoặc luồng V1 legacy.
public decimal? ApprovedPriceAmount { get; set; }
public string? ApprovedPriceSource { get; set; }
public List<PurchaseEvaluationSupplier> Suppliers { get; set; } = new();
public List<PurchaseEvaluationDetail> Details { get; set; } = new();
public List<PurchaseEvaluationQuote> Quotes { get; set; } = new();