Fixes to Return Improvements pull request

- Added "Returned Qty" in Sales and Purchase Order
- Map Expense Account in Return Delivery Note
- Defined some No Copy fields
- Added "Credit Note" and "Debit Note" Print Headings
- Fixed patch
This commit is contained in:
Anand Doshi
2015-08-25 12:49:40 +05:30
parent b719c469c8
commit fe13bfed44
26 changed files with 313 additions and 167 deletions

View File

@@ -88,6 +88,7 @@ erpnext.TransactionController = erpnext.taxes_and_totals.extend({
this.set_dynamic_labels();
erpnext.pos.make_pos_btn(this.frm);
this.setup_sms();
this.make_show_payments_btn();
},
apply_default_taxes: function() {
@@ -123,6 +124,22 @@ erpnext.TransactionController = erpnext.taxes_and_totals.extend({
var sms_man = new SMSManager(this.frm.doc);
},
make_show_payments_btn: function() {
var me = this;
if (in_list(["Purchase Invoice", "Sales Invoice"], this.frm.doctype)) {
if(this.frm.doc.outstanding_amount !== this.frm.doc.base_grand_total) {
this.frm.add_custom_button(__("Show Payments"), function() {
frappe.route_options = {
"Journal Entry Account.reference_type": me.frm.doc.doctype,
"Journal Entry Account.reference_name": me.frm.doc.name
};
frappe.set_route("List", "Journal Entry");
});
}
}
},
hide_currency_and_price_list: function() {
if(this.frm.doc.conversion_rate == 1 && this.frm.doc.docstatus > 0) {
hide_field("currency_and_price_list");