mirror of
https://github.com/frappe/erpnext.git
synced 2026-05-26 00:14:50 +00:00
Merge branch 'develop' into item-dashboard-fixes
This commit is contained in:
@@ -377,6 +377,12 @@ class POSInvoice(SalesInvoice):
|
|||||||
"allow_print_before_pay": profile.get("allow_print_before_pay")
|
"allow_print_before_pay": profile.get("allow_print_before_pay")
|
||||||
}
|
}
|
||||||
|
|
||||||
|
def reset_mode_of_payments(self):
|
||||||
|
if self.pos_profile:
|
||||||
|
pos_profile = frappe.get_cached_doc('POS Profile', self.pos_profile)
|
||||||
|
update_multi_mode_option(self, pos_profile)
|
||||||
|
self.paid_amount = 0
|
||||||
|
|
||||||
def set_account_for_mode_of_payment(self):
|
def set_account_for_mode_of_payment(self):
|
||||||
self.payments = [d for d in self.payments if d.amount or d.base_amount or d.default]
|
self.payments = [d for d in self.payments if d.amount or d.base_amount or d.default]
|
||||||
for pay in self.payments:
|
for pay in self.payments:
|
||||||
|
|||||||
@@ -248,7 +248,6 @@ def make_quotation(source_name, target_doc=None):
|
|||||||
"doctype": "Quotation",
|
"doctype": "Quotation",
|
||||||
"field_map": {
|
"field_map": {
|
||||||
"opportunity_from": "quotation_to",
|
"opportunity_from": "quotation_to",
|
||||||
"opportunity_type": "order_type",
|
|
||||||
"name": "enq_no",
|
"name": "enq_no",
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
|||||||
@@ -10,6 +10,7 @@
|
|||||||
"naming_series",
|
"naming_series",
|
||||||
"student",
|
"student",
|
||||||
"student_name",
|
"student_name",
|
||||||
|
"student_mobile_number",
|
||||||
"course_schedule",
|
"course_schedule",
|
||||||
"student_group",
|
"student_group",
|
||||||
"column_break_3",
|
"column_break_3",
|
||||||
@@ -93,11 +94,19 @@
|
|||||||
"options": "Student Attendance",
|
"options": "Student Attendance",
|
||||||
"print_hide": 1,
|
"print_hide": 1,
|
||||||
"read_only": 1
|
"read_only": 1
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"fetch_from": "student.student_mobile_number",
|
||||||
|
"fieldname": "student_mobile_number",
|
||||||
|
"fieldtype": "Read Only",
|
||||||
|
"label": "Student Mobile Number",
|
||||||
|
"options": "Phone"
|
||||||
}
|
}
|
||||||
],
|
],
|
||||||
|
"index_web_pages_for_search": 1,
|
||||||
"is_submittable": 1,
|
"is_submittable": 1,
|
||||||
"links": [],
|
"links": [],
|
||||||
"modified": "2020-07-08 13:55:42.580181",
|
"modified": "2021-03-24 00:02:11.005895",
|
||||||
"modified_by": "Administrator",
|
"modified_by": "Administrator",
|
||||||
"module": "Education",
|
"module": "Education",
|
||||||
"name": "Student Attendance",
|
"name": "Student Attendance",
|
||||||
|
|||||||
@@ -397,6 +397,7 @@ erpnext.PointOfSale.Controller = class {
|
|||||||
this.recent_order_list.toggle_component(false);
|
this.recent_order_list.toggle_component(false);
|
||||||
frappe.run_serially([
|
frappe.run_serially([
|
||||||
() => this.frm.refresh(name),
|
() => this.frm.refresh(name),
|
||||||
|
() => this.frm.call('reset_mode_of_payments'),
|
||||||
() => this.cart.load_invoice(),
|
() => this.cart.load_invoice(),
|
||||||
() => this.item_selector.toggle_component(true)
|
() => this.item_selector.toggle_component(true)
|
||||||
]);
|
]);
|
||||||
|
|||||||
@@ -64,10 +64,7 @@ erpnext.PointOfSale.PastOrderSummary = class {
|
|||||||
{fieldname: 'print', fieldtype: 'Data', label: 'Print Preview'}
|
{fieldname: 'print', fieldtype: 'Data', label: 'Print Preview'}
|
||||||
],
|
],
|
||||||
primary_action: () => {
|
primary_action: () => {
|
||||||
const frm = this.events.get_frm();
|
this.print_receipt();
|
||||||
frm.doc = this.doc;
|
|
||||||
frm.print_preview.lang_code = frm.doc.language;
|
|
||||||
frm.print_preview.printit(true);
|
|
||||||
},
|
},
|
||||||
primary_action_label: __('Print'),
|
primary_action_label: __('Print'),
|
||||||
});
|
});
|
||||||
@@ -192,13 +189,21 @@ erpnext.PointOfSale.PastOrderSummary = class {
|
|||||||
});
|
});
|
||||||
|
|
||||||
this.$summary_container.on('click', '.print-btn', () => {
|
this.$summary_container.on('click', '.print-btn', () => {
|
||||||
const frm = this.events.get_frm();
|
this.print_receipt();
|
||||||
frm.doc = this.doc;
|
|
||||||
frm.print_preview.lang_code = frm.doc.language;
|
|
||||||
frm.print_preview.printit(true);
|
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
|
print_receipt() {
|
||||||
|
const frm = this.events.get_frm();
|
||||||
|
frappe.utils.print(
|
||||||
|
frm.doctype,
|
||||||
|
frm.docname,
|
||||||
|
frm.pos_print_format,
|
||||||
|
frm.doc.letter_head,
|
||||||
|
frm.doc.language || frappe.boot.lang
|
||||||
|
);
|
||||||
|
}
|
||||||
|
|
||||||
attach_shortcuts() {
|
attach_shortcuts() {
|
||||||
const ctrl_label = frappe.utils.is_mac() ? '⌘' : 'Ctrl';
|
const ctrl_label = frappe.utils.is_mac() ? '⌘' : 'Ctrl';
|
||||||
this.$summary_container.find('.print-btn').attr("title", `${ctrl_label}+P`);
|
this.$summary_container.find('.print-btn').attr("title", `${ctrl_label}+P`);
|
||||||
|
|||||||
Reference in New Issue
Block a user