Commit 5840e8ce authored by Rafael Monnerat's avatar Rafael Monnerat

slapos_jio: Fix up displayed date and reference on the invoice list

    Invoice Number is added to make easier to user track which invoice is which.
parent e0fb870b
...@@ -25,20 +25,22 @@ ...@@ -25,20 +25,22 @@
if (result.data.rows[i].value.hasOwnProperty("start_date")) { if (result.data.rows[i].value.hasOwnProperty("start_date")) {
value = new Date(result.data.rows[i].value.start_date); value = new Date(result.data.rows[i].value.start_date);
result.data.rows[i].value.start_date = { result.data.rows[i].value.start_date = {
allow_empty_time: 0, "field_gadget_param": {
ampm_time_style: 0, allow_empty_time: 0,
css_class: "date_field", ampm_time_style: 0,
date_only: 1, css_class: "date_field",
description: "The Date", date_only: true,
editable: 0, description: "The Date",
hidden: 0, editable: 0,
hidden_day_is_last_day: 0, hidden: 0,
"default": value.toUTCString(), hidden_day_is_last_day: 0,
key: "date", "default": value.toUTCString(),
required: 0, key: "date",
timezone_style: 0, required: 0,
title: "Status Date", timezone_style: 0,
type: "DateTimeField" title: "Date",
type: "DateTimeField"
}
}; };
} }
...@@ -105,7 +107,8 @@ ...@@ -105,7 +107,8 @@
"Currency", "Currency",
"Payment", "Payment",
"Download", "Download",
"Invoices" "Invoices",
"Reference"
]; ];
return new RSVP.Queue() return new RSVP.Queue()
...@@ -118,6 +121,7 @@ ...@@ -118,6 +121,7 @@
}) })
.push(function (result) { .push(function (result) {
var column_list = [ var column_list = [
['reference', result[2][6]],
['start_date', result[2][0]], ['start_date', result[2][0]],
['total_price', result[2][1]], ['total_price', result[2][1]],
['resource_reference', result[2][2]], ['resource_reference', result[2][2]],
......
...@@ -236,7 +236,7 @@ ...@@ -236,7 +236,7 @@
</item> </item>
<item> <item>
<key> <string>serial</string> </key> <key> <string>serial</string> </key>
<value> <string>991.36496.17865.938</string> </value> <value> <string>992.9642.18182.11008</string> </value>
</item> </item>
<item> <item>
<key> <string>state</string> </key> <key> <string>state</string> </key>
...@@ -254,7 +254,7 @@ ...@@ -254,7 +254,7 @@
</tuple> </tuple>
<state> <state>
<tuple> <tuple>
<float>1619144094.17</float> <float>1621359340.83</float>
<string>UTC</string> <string>UTC</string>
</tuple> </tuple>
</state> </state>
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment