changed date displayed in transaction listing from modified date to transaction/posting date
diff --git a/erpnext/accounts/doctype/journal_voucher/journal_voucher_list.js b/erpnext/accounts/doctype/journal_voucher/journal_voucher_list.js
index 129f3cd..e31cee8 100644
--- a/erpnext/accounts/doctype/journal_voucher/journal_voucher_list.js
+++ b/erpnext/accounts/doctype/journal_voucher/journal_voucher_list.js
@@ -6,6 +6,7 @@
'`tabJournal Voucher`.remark',
'`tabJournal Voucher`.total_debit',
'`tabJournal Voucher`.company',
+ "`tabJournal Voucher`.posting_date",
]);
this.stats = this.stats.concat(['voucher_type', 'company']);
},
@@ -31,6 +32,8 @@
},
css: {'text-align':'right'}
},
- {width: '12%', content: 'modified', css: {'text-align': 'right', 'color':'#777'}}
+ {width: '12%', content:'posting_date',
+ css: {'text-align': 'right', 'color':'#777'},
+ title: "Journal Voucher Date", type: "date"}
],
});
\ No newline at end of file
diff --git a/erpnext/accounts/doctype/purchase_invoice/purchase_invoice_list.js b/erpnext/accounts/doctype/purchase_invoice/purchase_invoice_list.js
index c0c6625..f9dd4cd 100644
--- a/erpnext/accounts/doctype/purchase_invoice/purchase_invoice_list.js
+++ b/erpnext/accounts/doctype/purchase_invoice/purchase_invoice_list.js
@@ -9,6 +9,7 @@
'IFNULL(`tabPurchase Invoice`.grand_total_import, 0) as grand_total_import',
'IFNULL(`tabPurchase Invoice`.grand_total, 0) as grand_total',
'IFNULL(`tabPurchase Invoice`.outstanding_amount, 0) as outstanding_amount',
+ "`tabPurchase Invoice`.posting_date"
]);
this.stats = this.stats.concat(['company']);
},
@@ -40,8 +41,8 @@
css: {'text-align':'right'}
},
{width: '10%', content: 'paid', type:'bar-graph', label:'Paid'},
- {width: '12%', content:'modified', css: {
- 'text-align': 'right', 'color':'#777'
- }},
+ {width: '12%', content:'posting_date',
+ css: {'text-align': 'right', 'color':'#777'},
+ title: "Purchase Invoice Date", type: "date"},
]
});
diff --git a/erpnext/accounts/doctype/sales_invoice/sales_invoice_list.js b/erpnext/accounts/doctype/sales_invoice/sales_invoice_list.js
index ae923f4..1c3b2d3 100644
--- a/erpnext/accounts/doctype/sales_invoice/sales_invoice_list.js
+++ b/erpnext/accounts/doctype/sales_invoice/sales_invoice_list.js
@@ -8,7 +8,8 @@
"ifnull(`tabSales Invoice`.outstanding_amount,0) as outstanding_amount",
"ifnull(`tabSales Invoice`.grand_total,0) as grand_total",
"`tabSales Invoice`.currency",
- "ifnull(`tabSales Invoice`.grand_total_export,0) as grand_total_export"
+ "ifnull(`tabSales Invoice`.grand_total_export,0) as grand_total_export",
+ "`tabSales Invoice`.posting_date",
]);
},
prepare_data: function(data) {
@@ -35,6 +36,8 @@
css: {'text-align':'right'}
},
{width: '10%', content: 'paid', type:'bar-graph', label:'Paid'},
- {width: '12%', content:'modified', css: {'text-align': 'right', 'color':'#777'}}
+ {width: '12%', content:'posting_date',
+ css: {'text-align': 'right', 'color':'#777'},
+ title: "Sales Invoice Date", type: "date"}
]
});
diff --git a/erpnext/buying/doctype/purchase_order/purchase_order_list.js b/erpnext/buying/doctype/purchase_order/purchase_order_list.js
index 0f90e12..69f97f5 100644
--- a/erpnext/buying/doctype/purchase_order/purchase_order_list.js
+++ b/erpnext/buying/doctype/purchase_order/purchase_order_list.js
@@ -7,7 +7,9 @@
"ifnull(`tabPurchase Order`.per_received,0) as per_received",
"ifnull(`tabPurchase Order`.per_billed,0) as per_billed",
"`tabPurchase Order`.currency",
- "ifnull(`tabPurchase Order`.grand_total_import,0) as grand_total_import"
+ "ifnull(`tabPurchase Order`.grand_total_import,0) as grand_total_import",
+ "`tabPurchase Order`.transaction_date",
+
]);
this.stats = this.stats.concat(['status', 'company']);
},
@@ -27,7 +29,9 @@
},
{width: '8%', content: 'per_received', type:'bar-graph', label:'Delivered'},
{width: '8%', content: 'per_billed', type:'bar-graph', label:'Billed'},
- {width: '12%', content:'modified', css: {'text-align': 'right', 'color':'#777'}}
+ {width: '12%', content:'transaction_date',
+ css: {'text-align': 'right', 'color':'#777'},
+ title: "Purchase Order Date", type: "date"}
]
});
diff --git a/erpnext/buying/doctype/purchase_request/purchase_request_list.js b/erpnext/buying/doctype/purchase_request/purchase_request_list.js
index e4266c7..967c2d4 100644
--- a/erpnext/buying/doctype/purchase_request/purchase_request_list.js
+++ b/erpnext/buying/doctype/purchase_request/purchase_request_list.js
@@ -6,6 +6,7 @@
"`tabPurchase Request`.status",
"IFNULL(`tabPurchase Request`.per_ordered, 0) as per_ordered",
"`tabPurchase Request`.remark",
+ "`tabPurchase Request`.transaction_date",
]);
this.stats = this.stats.concat(['status', 'company']);
},
@@ -28,7 +29,9 @@
{width: '17%', content:'name'},
{width: '50%', content:'status_html+remark+tags', css: {'color': '#222'}},
{width: '10%', content: 'per_ordered', type:'bar-graph', label:'Ordered'},
- {width: '12%', content:'modified', css: {'text-align': 'right', 'color':'#777'}}
+ {width: '12%', content:'transaction_date',
+ css: {'text-align': 'right', 'color':'#777'},
+ title: "Quotation Date", type: "date"}
]
});
diff --git a/erpnext/buying/doctype/supplier_quotation/supplier_quotation_list.js b/erpnext/buying/doctype/supplier_quotation/supplier_quotation_list.js
new file mode 100644
index 0000000..60b1f52
--- /dev/null
+++ b/erpnext/buying/doctype/supplier_quotation/supplier_quotation_list.js
@@ -0,0 +1,33 @@
+// render
+wn.doclistviews['Supplier Quotation'] = wn.views.ListView.extend({
+ init: function(d) {
+ this._super(d)
+ this.fields = this.fields.concat([
+ "`tabSupplier Quotation`.supplier_name",
+ "`tabSupplier Quotation`.currency",
+ "ifnull(`tabSupplier Quotation`.grand_total_import,0) as grand_total_import",
+ "`tabSupplier Quotation`.transaction_date",
+ ]);
+ this.stats = this.stats.concat(['status', 'company']);
+ },
+
+ columns: [
+ {width: '3%', content: 'check'},
+ {width: '5%', content:'avatar'},
+ {width: '3%', content:'docstatus'},
+ {width: '15%', content:'name'},
+ {width: '44%', content:'supplier_name+tags', css: {color:'#222'}},
+ {
+ width: '18%',
+ content: function(parent, data) {
+ $(parent).html(data.currency + ' ' + fmt_money(data.grand_total_import))
+ },
+ css: {'text-align':'right'}
+ },
+ {width: '12%', content:'transaction_date',
+ css: {'text-align': 'right', 'color':'#777'},
+ title: "Supplier Quotation Date", type: "date"}
+ ]
+
+});
+
diff --git a/erpnext/selling/doctype/opportunity/opportunity_list.js b/erpnext/selling/doctype/opportunity/opportunity_list.js
index a661d81..949422e 100644
--- a/erpnext/selling/doctype/opportunity/opportunity_list.js
+++ b/erpnext/selling/doctype/opportunity/opportunity_list.js
@@ -6,6 +6,7 @@
'tabOpportunity.lead_name',
'tabOpportunity.customer_name',
'tabOpportunity.status',
+ 'tabOpportunity.transaction_date',
]);
this.stats = this.stats.concat(['status', 'source', 'enquiry_from', 'company']);
},
@@ -33,6 +34,8 @@
{width: '15%', content:'name'},
{width: '18%', content:'status_html'},
{width: '52%', content:'enquiry_name+tags', css: {color:'#222'}},
- {width: '12%', content:'modified', css: {'text-align': 'right', 'color':'#777'}}
+ {width: '12%', content:'transaction_date',
+ css: {'text-align': 'right', 'color':'#777'},
+ title: "Opportunity Date", type: "date"}
]
})
diff --git a/erpnext/selling/doctype/quotation/quotation_list.js b/erpnext/selling/doctype/quotation/quotation_list.js
index d1fad5a..8530629 100644
--- a/erpnext/selling/doctype/quotation/quotation_list.js
+++ b/erpnext/selling/doctype/quotation/quotation_list.js
@@ -7,7 +7,8 @@
"`tabQuotation`.lead_name",
"`tabQuotation`.customer_name",
"`tabQuotation`.currency",
- "ifnull(`tabQuotation`.grand_total_export,0) as grand_total_export"
+ "ifnull(`tabQuotation`.grand_total_export,0) as grand_total_export",
+ "`tabQuotation`.transaction_date",
]);
this.stats = this.stats.concat(['status', 'quotation_to', 'company']);
},
@@ -34,7 +35,9 @@
},
css: {'text-align':'right'}
},
- {width: '12%', content:'modified', css: {'text-align': 'right', 'color':'#777'}}
+ {width: '12%', content:'transaction_date',
+ css: {'text-align': 'right', 'color':'#777'},
+ title: "Quotation Date", type: "date"}
]
});
diff --git a/erpnext/selling/doctype/sales_order/sales_order_list.js b/erpnext/selling/doctype/sales_order/sales_order_list.js
index c15944b..a386f35 100644
--- a/erpnext/selling/doctype/sales_order/sales_order_list.js
+++ b/erpnext/selling/doctype/sales_order/sales_order_list.js
@@ -9,7 +9,8 @@
"ifnull(`tabSales Order`.per_delivered,0) as per_delivered",
"ifnull(`tabSales Order`.per_billed,0) as per_billed",
"`tabSales Order`.currency",
- "ifnull(`tabSales Order`.grand_total_export,0) as grand_total_export"
+ "ifnull(`tabSales Order`.grand_total_export,0) as grand_total_export",
+ "`tabSales Order`.transaction_date",
]);
this.stats = this.stats.concat(['status', 'order_type', 'company']);
},
@@ -41,7 +42,9 @@
},
},
{width: '8%', content: 'per_billed', type:'bar-graph', label:'Billed'},
- {width: '12%', content:'modified', css: {'text-align': 'right', 'color':'#777'}}
+ {width: '12%', content:'transaction_date',
+ css: {'text-align': 'right', 'color':'#777'},
+ title: "Sales Order Date", type: "date"}
]
});
diff --git a/erpnext/stock/doctype/delivery_note/delivery_note_list.js b/erpnext/stock/doctype/delivery_note/delivery_note_list.js
index e65d75a..9c94fdb 100644
--- a/erpnext/stock/doctype/delivery_note/delivery_note_list.js
+++ b/erpnext/stock/doctype/delivery_note/delivery_note_list.js
@@ -4,7 +4,8 @@
this._super(d);
this.fields = this.fields.concat([
"`tabDelivery Note`.customer_name",
- "`tabDelivery Note`.sales_order_no"
+ "`tabDelivery Note`.sales_order_no",
+ "`tabDelivery Note`.posting_date",
]);
},
columns: [
@@ -14,6 +15,8 @@
{width: '15%', content:'name'},
{width: '47%', content:'customer_name+tags', css: {color:'#222'}},
{width: '15%', content:'sales_order_no', type:'link', doctype:'Sales Order'},
- {width: '12%', content:'modified', css: {'text-align': 'right', 'color':'#777'}}
+ {width: '12%', content:'posting_date',
+ css: {'text-align': 'right', 'color':'#777'},
+ title: "Delivery Note Date", type: "date"}
]
});
diff --git a/erpnext/stock/doctype/purchase_receipt/purchase_receipt_list.js b/erpnext/stock/doctype/purchase_receipt/purchase_receipt_list.js
index ae42eac..e04ef7e 100644
--- a/erpnext/stock/doctype/purchase_receipt/purchase_receipt_list.js
+++ b/erpnext/stock/doctype/purchase_receipt/purchase_receipt_list.js
@@ -5,6 +5,7 @@
this.fields = this.fields.concat([
"`tabPurchase Receipt`.supplier_name",
"group_concat(`tabPurchase Receipt Item`.prevdoc_docname) as purchase_order_no",
+ "`tabPurchase Receipt`.posting_date",
]);
this.group_by = "`tabPurchase Receipt`.name";
},
@@ -14,7 +15,9 @@
data.purchase_order_no = data.purchase_order_no.split(",");
var po_list = [];
$.each(data.purchase_order_no, function(i, v){
- if(po_list.indexOf(v)==-1) po_list.push(v);
+ if(po_list.indexOf(v)==-1) po_list.push(
+ repl("<a href=\"#Form/Purchase Order/%(name)s\">%(name)s</a>",
+ {name: v}));
});
data.purchase_order_no = po_list.join(", ");
}
@@ -26,6 +29,8 @@
{width: '15%', content:'name'},
{width: '32%', content:'supplier_name+tags', css: {color:'#222'}},
{width: '30%', content:'purchase_order_no'},
- {width: '12%', content:'modified', css: {'text-align': 'right', 'color':'#777'}}
+ {width: '12%', content:'posting_date',
+ css: {'text-align': 'right', 'color':'#777'},
+ title: "Purhcase Receipt Date", type: "date"}
]
});
diff --git a/erpnext/stock/doctype/stock_entry/stock_entry_list.js b/erpnext/stock/doctype/stock_entry/stock_entry_list.js
index 90f43a7..60526cb 100644
--- a/erpnext/stock/doctype/stock_entry/stock_entry_list.js
+++ b/erpnext/stock/doctype/stock_entry/stock_entry_list.js
@@ -6,6 +6,7 @@
"`tabStock Entry`.purpose",
"`tabStock Entry`.from_warehouse",
"`tabStock Entry`.to_warehouse",
+ "`tabStock Entry`.posting_date",
]);
},
columns: [
@@ -16,6 +17,8 @@
{width: '15%', content:'purpose+tags', css: {color:'#222'}},
{width: '18%', content:'from_warehouse', template: 'From %(from_warehouse)s'},
{width: '18%', content:'to_warehouse', template: 'To %(to_warehouse)s'},
- {width: '12%', content:'modified', css: {'text-align': 'right', 'color':'#777'}}
+ {width: '12%', content:'posting_date',
+ css: {'text-align': 'right', 'color':'#777'},
+ title: "Stock Entry Date", type: "date"}
]
});
diff --git a/public/js/all-app.js b/public/js/all-app.js
index 76eeb3f..fc1bb6d 100644
--- a/public/js/all-app.js
+++ b/public/js/all-app.js
@@ -1011,7 +1011,8 @@
else if(opts.type=='link'&&opts.doctype){$(parent).append(repl('<a href="#!Form/'+opts.doctype+'/'
+data[opts.content]+'">'+data[opts.content]+'</a>',data));}
else if(opts.template){$(parent).append(repl(opts.template,data));}
-else if(data[opts.content]){$(parent).append(' '+data[opts.content]);}},render:function(row,data){var me=this;this.prepare_data(data);rowhtml='';$.each(this.columns,function(i,v){rowhtml+=repl('<td style="width: %(width)s"></td>',v);});var tr=$(row).html('<table><tbody><tr>'+rowhtml+'</tr></tbody></table>').find('tr').get(0);$.each(this.columns,function(i,v){me.render_column(data,tr.cells[i],v);});},prepare_data:function(data){data.fullname=wn.user_info(data.owner).fullname;data.avatar=wn.user_info(data.owner).image;this.prepare_when(data,data.modified);if(data.docstatus==0||data.docstatus==null){data.docstatus_icon='icon-pencil';data.docstatus_title='Editable';}else if(data.docstatus==1){data.docstatus_icon='icon-lock';data.docstatus_title='Submitted';}else if(data.docstatus==2){data.docstatus_icon='icon-remove';data.docstatus_title='Cancelled';}
+else if(data[opts.content]){if(opts.type=="date"){data[opts.content]=wn.datetime.str_to_user(data[opts.content])}
+$(parent).append(repl('<span title="%(title)s"> %(content)s</span>',{"title":opts.title||opts.content,"content":data[opts.content]}));}},render:function(row,data){var me=this;this.prepare_data(data);rowhtml='';$.each(this.columns,function(i,v){rowhtml+=repl('<td style="width: %(width)s"></td>',v);});var tr=$(row).html('<table><tbody><tr>'+rowhtml+'</tr></tbody></table>').find('tr').get(0);$.each(this.columns,function(i,v){me.render_column(data,tr.cells[i],v);});},prepare_data:function(data){data.fullname=wn.user_info(data.owner).fullname;data.avatar=wn.user_info(data.owner).image;this.prepare_when(data,data.modified);if(data.docstatus==0||data.docstatus==null){data.docstatus_icon='icon-pencil';data.docstatus_title='Editable';}else if(data.docstatus==1){data.docstatus_icon='icon-lock';data.docstatus_title='Submitted';}else if(data.docstatus==2){data.docstatus_icon='icon-remove';data.docstatus_title='Cancelled';}
for(key in data){if(data[key]==null){data[key]='';}}},prepare_when:function(data,date_str){if(!date_str)date_str=data.modified;data.when=dateutil.str_to_user(date_str).split(' ')[0];var diff=dateutil.get_diff(dateutil.get_today(),date_str.split(' ')[0]);if(diff==0){data.when=dateutil.comment_when(date_str);}
if(diff==1){data.when='Yesterday'}
if(diff==2){data.when='2 days ago'}},add_user_tags:function(parent,data){var me=this;if(data._user_tags){if($(parent).html().length>0){$(parent).append('<br />');}