fix(inventory): keep field yacimientos structural
This commit is contained in:
@@ -123,13 +123,17 @@ export class F3FieldInventoryStructureService {
|
|||||||
[key: string]: unknown;
|
[key: string]: unknown;
|
||||||
};
|
};
|
||||||
|
|
||||||
// F5: the Inventory screens count only concrete instances confirmed/created in field.
|
// Área/Yacimiento remain structural context. A concrete Installation/Subinstallation
|
||||||
// Legacy/context/catalog records intentionally remain false until explicitly validated.
|
// created in field is a real Inventory instance from the moment it is registered.
|
||||||
await this.dataSource.query(`
|
await this.dataSource.query(`
|
||||||
UPDATE assets
|
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
|
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);
|
if (!family) return this.fieldInventory.detail(visitId, created.asset.id, principal);
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user