commit melhorias compras4
tests / ci (push) Canceled after 0s

This commit is contained in:
2026-11-22 16:28:03 +02:00
parent efd97e265b
commit 36dcfdf00c
118 changed files with 6042 additions and 92 deletions
+12
View File
@@ -29,6 +29,18 @@ class PurchaseOrder extends Model
return ['snapshot' => 'array', 'issued_at' => 'datetime'];
}
/** Older synthetic documents may predate the complete frozen document structure. */
public function hasCompleteDocumentSnapshot(): bool
{
foreach (['company', 'department', 'cost_center', 'requisition', 'issuer', 'requester', 'supplier', 'quotation', 'award', 'approval_rules', 'decision_matrix', 'final_approvals'] as $key) {
if (! is_array($this->snapshot[$key] ?? null)) {
return false;
}
}
return true;
}
/** @return HasMany<PurchaseOrderItem, $this> */
public function items(): HasMany
{