{% set defaultFields = { "purchasedVehicleFields": { "sellingVehiclePurchasePriceWithoutTax": { "name": "total.purchasePriceWithoutTax", "type": "money" }, "sellingVehiclePurchasePriceWithTax": { "name": "total.purchasePriceWithTax", "type": "money" }, "sellingVehiclePurchaseTotalChargeWithoutTax": { "name": "total.purchaseTotalChargeWithoutTax", "type": "money" }, "sellingVehiclePurchaseCostPriceWithoutTax": { "name": "total.purchaseCostPriceWithoutTax", "type": "money" } }, "sellingVehicleFields": { "sellingVehicleSellPriceWithoutTaxWithoutSellTotalCollectedTax": { "name": "total.sellPriceWithoutTaxWithoutSellTotalCollectedTax", "type": "money" }, "sellingVehicleSellPriceWithTax": { "name": "total.marginSellPriceWithTax", "type": "money" }, "sellingVehicleSellTotalCollectedTax": { "name": "total.sellTotalCollectedTax", "type": "money" }, "sellingVehicleGrossMargin": { "name": "total.grossMargin", "type": "money" }, "sellingVehicleNetMargin": { "name": "total.netMargin", "type": "money" }, "sellingVehicleAverageGrossMargin": { "name": "total.averageGrossMargin", "type": "money" }, "sellingVehicleAverageNetMargin": { "name": "total.averageNetMargin", "type": "money" } }, "sellPartExchangeVehicleFields": { "sellPartExchangesNb": { "name": "total.sellPartExchangesNb", "type": "number" }, "sellPartExchangePurchaseWithoutTax": { "name": "total.sellPartExchangePurchaseWithoutTax", "type": "money" }, "sellPartExchangeSellPriceWithoutTax": { "name": "total.sellPartExchangeSellPriceWithoutTax", "type": "money" }, "partExchangeGrossMargin": { "name": "total.partExchangeGrossMargin", "type": "money" }, "partExchangeNetMargin": { "name": "total.partExchangeNetMargin", "type": "money" }, "averagePartExchangeGrossMargin": { "name": "total.averagePartExchangeGrossMargin", "type": "money" }, "averagePartExchangeNetMargin": { "name": "total.averagePartExchangeNetMargin", "type": "money" } }, "partExchangeVehicleFields": { "partExchangesNb": { "name": "total.partExchangesNb", "type": "number" }, "partExchangePriceWithoutTax": { "name": "total.partExchangePriceWithoutTax", "type": "money" }, "partExchangePriceWithTax": { "name": "total.partExchangePriceWithTax", "type": "money" } }, "totalVehicleFields": { "sellsNb": { "name": "total.sellsNb", "type": "number" }, "sellingVehicleVehiclesNb": { "name": "total.vehiclesNb", "type": "number" }, "partExchangesNb": { "name": "total.partExchangesNb", "type": "number" }, "sellingVehicleAverageStockDuration": { "name": "total.averageStockDuration", "type": "number" } }, "purchasedServiceFields": { "sellingServicePurchasePriceWithoutTax": { "name": "total.purchasePriceWithoutTax", "type": "money" }, "sellingServicePurchasePriceWithTax": { "name": "total.purchasePriceWithTax", "type": "money" }, "sellingServicePurchaseCostPriceWithoutTax": { "name": "total.purchaseCostPriceWithoutTax", "type": "money" } }, "sellingServiceFields": { "sellingServiceSellPriceWithoutTaxWithoutSellTotalCollectedTax": { "name": "total.sellPriceWithoutTaxWithoutSellTotalCollectedTax", "type": "money" }, "sellingServiceSellPriceWithTax": { "name": "total.marginSellPriceWithTax", "type": "money" }, "sellingServiceSellTotalCollectedTax": { "name": "total.sellTotalCollectedTax", "type": "money" }, "sellingServiceGrossMargin": { "name": "total.grossMargin", "type": "money" }, "sellingServiceNetMargin": { "name": "total.netMargin", "type": "money" }, "sellingServiceAverageGrossMargin": { "name": "total.averageGrossMargin", "type": "money" }, "sellingServiceAverageNetMargin": { "name": "total.averageNetMargin", "type": "money" } }, "totalServiceFields": { "sellsNb": { "name": "total.sellsNb", "type": "number" }, "sellingServiceServicesNb": { "name": "total.servicesNb", "type": "number" } }, "purchasedTotalFields": { "totalPurchasePriceWithoutTax": { "name": "total.purchasePriceWithoutTax", "type": "money" }, "totalPurchasePriceWithTax": { "name": "total.purchasePriceWithTax", "type": "money" }, "totalChargesWithoutTax": { "name": "total.purchaseTotalChargeWithoutTax", "type": "money" }, "totalPurchaseCostPriceWithoutTax": { "name": "total.purchaseCostPriceWithoutTax", "type": "money" } }, "sellingTotalFields": { "totalSellPriceWithoutTaxWithoutSellTotalCollectedTax": { "name": "total.sellPriceWithoutTaxWithoutSellTotalCollectedTax", "type": "money" }, "marginSellPriceWithTax": { "name": "total.marginSellPriceWithTax", "type": "money" }, "sellPriceWithTax": { "name": "total.sellPriceWithTax", "type": "money" }, "totalSellTotalCollectedTax": { "name": "total.sellTotalCollectedTax", "type": "money" }, "totalGrossMargin": { "name": "total.grossMargin", "type": "money" }, "totalNetMargin": { "name": "total.netMargin", "type": "money" }, "totalAverageGrossMargin": { "name": "total.averageGrossMargin", "type": "money" }, "totalAverageNetMargin": { "name": "total.averageNetMargin", "type": "money" } }, } %} {% set totalFields = defaultFields["totalServiceFields"]|merge(defaultFields["totalVehicleFields"]) %} {% set defaultFields = defaultFields|merge({("totalFields") : totalFields}) %} {% set fields = [] %} {% for fieldKey in fieldsKeys %} {% set fields = fields|merge({(fieldKey): defaultFields[fieldKey] }) %} {% endfor %} {% include 'AppBundle:Admin:CRUD\\Analysis\\Include\\include_stats.html.twig' with { 'callbackQueryObjectPrefix': callbackQueryObjectPrefix, 'fields': fields } %}