fix(inventory): keep field yacimientos structural
This commit is contained in:
@@ -123,13 +123,17 @@ export class F3FieldInventoryStructureService {
|
||||
[key: string]: unknown;
|
||||
};
|
||||
|
||||
// F5: the Inventory screens count only concrete instances confirmed/created in field.
|
||||
// Legacy/context/catalog records intentionally remain false until explicitly validated.
|
||||
// Área/Yacimiento remain structural context. A concrete Installation/Subinstallation
|
||||
// created in field is a real Inventory instance from the moment it is registered.
|
||||
await this.dataSource.query(`
|
||||
UPDATE assets
|
||||
SET is_inventory_instance=true,updated_by=$2::uuid,updated_at=CURRENT_TIMESTAMP
|
||||
SET is_inventory_instance=$3::boolean,updated_by=$2::uuid,updated_at=CURRENT_TIMESTAMP
|
||||
WHERE id=$1::uuid
|
||||
`, [created.asset.id, principal.userId]);
|
||||
`, [
|
||||
created.asset.id,
|
||||
principal.userId,
|
||||
typeCode === 'instalacion' || typeCode === 'subinstalacion',
|
||||
]);
|
||||
|
||||
if (!family) return this.fieldInventory.detail(visitId, created.asset.id, principal);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user