Error when generating report with custom field

when we generate a report that has a calculated field, we get an error because it generates it twice.

C:\laragon\www\Pms2025\vendor\doctrine\dbal\src\Driver\API\MySQL\ExceptionConverter.php(55): An exception occurred while executing a query: SQLSTATE[42S21]: Column already exists: 1060 Duplicate column name ‘TotalFactura’

in models:

// Get list of fields
private function sqlSelectFields(): string
{
    return "*, (select sum(Cantidad*PrecioUnidad) from facturas_detalles where facturas_detalles.NumeroFactura=facturas.NumeroFactura) AS `TotalFactura`, (select sum(Cantidad*PrecioUnidad) from facturas_detalles where facturas_detalles.NumeroFactura=facturas.NumeroFactura) AS `TotalFactura`";
}

Avoid using Custom Field as source table for reports. You better use a database view, see Preparing Data for Reports.