From 0c78b439d997a54c51bc60a3a701e5c7ff381032 Mon Sep 17 00:00:00 2001 From: satanas Date: Sun, 29 Apr 2012 17:01:48 -0300 Subject: [PATCH] Added date to order duration report --- app/models/easy_model.rb | 1 + config/reports/order_duration.yml | 45 ++++++++++++++++--------------- 2 files changed, 25 insertions(+), 21 deletions(-) diff --git a/app/models/easy_model.rb b/app/models/easy_model.rb index fe67ad5..ea04e0b 100644 --- a/app/models/easy_model.rb +++ b/app/models/easy_model.rb @@ -85,6 +85,7 @@ def self.order_duration(start_date, end_date) average_tons_per_hour = rtotal / (order_duration / 60) / 1000 rescue 0 data['results'] << { 'order' => o.code, + 'date' => o.created_at.strftime("%d/%m/%Y"), 'recipe_code' => o.recipe.code, 'recipe_name' => o.recipe.name, 'average_tons_per_hour' => average_tons_per_hour.to_s, diff --git a/config/reports/order_duration.yml b/config/reports/order_duration.yml index 328069d..858accc 100644 --- a/config/reports/order_duration.yml +++ b/config/reports/order_duration.yml @@ -80,64 +80,67 @@ report: order : label: Orden align: left - width: 25 + width: 20 2: + date: + label: Fecha + align: left + width: 18 + 3: recipe_code: label: Receta align: left - width: 15 - 3: + width: 20 + 4: recipe_name: - label: Nombre + label: Desc. Receta align: left - width: 45 - 4: + width: 40 + 5: average_tons_per_hour: label: Ton/Hrs align: right width: 20 precision: 2 - 5: + 6: average_batch_duration: label: Min/batch align: right width: 20 precision: 2 - 6: + 7: order_duration: label: Min align: right width: 15 precision: 0 - 7: + 8: real_batches: label: Batch align: right width: 10 - 8: + 9: start_time: label: Inicio align: right - width: 25 - 9: + width: 20 + 10: end_time: label: Fin align: right - width: 25 - 10: + width: 20 + 11: total_standard: - label: Total Estand. + label: Total Est. (Kg) align: right - width: 30 - unit: Kg + width: 28 totalize: true precision: 2 - 11: + 12: total_real: - label: Total Real + label: Total Real (Kg) align: right - width: 30 - unit: Kg + width: 28 totalize: true precision: 2 3: