diff --git a/src/cli/one_helper/oneacct_helper.rb b/src/cli/one_helper/oneacct_helper.rb
index 9f889cc48f..02149bffb6 100644
--- a/src/cli/one_helper/oneacct_helper.rb
+++ b/src/cli/one_helper/oneacct_helper.rb
@@ -206,7 +206,7 @@ class AcctHelper < OpenNebulaHelper::OneHelper
end
column :COST, "Cost", :size=>15 do |d|
- d["COST"]
+ d["TOTAL_COST"]
end
default :USER_NAME, :GROUP_NAME, :VM_ID, :VM_NAME, :MONTH, :YEAR, :HOURS, :COST
diff --git a/src/oca/ruby/opennebula/virtual_machine_pool.rb b/src/oca/ruby/opennebula/virtual_machine_pool.rb
index f1ca0dec63..9114d4f36e 100644
--- a/src/oca/ruby/opennebula/virtual_machine_pool.rb
+++ b/src/oca/ruby/opennebula/virtual_machine_pool.rb
@@ -322,7 +322,7 @@ module OpenNebula
# into account, if no end time is required use -1
# @option params [Integer] :group Group id to filter the results
# @option params [String] :xpath Xpath expression to filter the results.
- # For example: SHOWBACK[COST>0]
+ # For example: SHOWBACK[TOTAL_COST>0]
# @option params [String] :order_by_1 Xpath expression to group the
# @option params [String] :order_by_2 Xpath expression to group the
# returned hash. This will be the second level of the hash
@@ -376,7 +376,7 @@ module OpenNebula
# into account, if no end time is required use -1
# @option params [Integer] :group Group id to filter the results
# @option params [String] :xpath Xpath expression to filter the results.
- # For example: SHOWBACK[COST>10]
+ # For example: SHOWBACK[TOTAL_COST>10]
#
# @return [String] the xml representing the showback data
def showback_xml(filter_flag=INFO_ALL, options={})
diff --git a/src/sunstone/public/js/sunstone.js b/src/sunstone/public/js/sunstone.js
index 1fdcba2968..3940ba71c0 100644
--- a/src/sunstone/public/js/sunstone.js
+++ b/src/sunstone/public/js/sunstone.js
@@ -5017,8 +5017,8 @@ function fillShowback(div, req, response) {
}
}
- vms_per_date[showback.YEAR][showback.MONTH].VMS.push([showback.VMID, showback.VMNAME, showback.UNAME, showback.HOURS, showback.COST]);
- vms_per_date[showback.YEAR][showback.MONTH].TOTAL += parseFloat(showback.COST);
+ vms_per_date[showback.YEAR][showback.MONTH].VMS.push([showback.VMID, showback.VMNAME, showback.UNAME, showback.HOURS, showback.TOTAL_COST]);
+ vms_per_date[showback.YEAR][showback.MONTH].TOTAL += parseFloat(showback.TOTAL_COST);
});
var series = []
diff --git a/src/vm/VirtualMachinePool.cc b/src/vm/VirtualMachinePool.cc
index 6025829b41..455f7de06a 100644
--- a/src/vm/VirtualMachinePool.cc
+++ b/src/vm/VirtualMachinePool.cc
@@ -513,7 +513,7 @@ struct SBRecord {
oss << "" << cpuc_s << ""
<< ""<< memc_s << ""
- << "" << cost_s << ""
+ << "" << cost_s << ""
<< "" << hour_s << "";
return oss;