Merge branch 'develop' into item-dashboard-fixes
This commit is contained in:
commit
36d125a720
@ -376,6 +376,12 @@ class POSInvoice(SalesInvoice):
|
||||
"campaign": profile.get("campaign"),
|
||||
"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):
|
||||
self.payments = [d for d in self.payments if d.amount or d.base_amount or d.default]
|
||||
|
@ -248,7 +248,6 @@ def make_quotation(source_name, target_doc=None):
|
||||
"doctype": "Quotation",
|
||||
"field_map": {
|
||||
"opportunity_from": "quotation_to",
|
||||
"opportunity_type": "order_type",
|
||||
"name": "enq_no",
|
||||
}
|
||||
},
|
||||
|
@ -10,6 +10,7 @@
|
||||
"naming_series",
|
||||
"student",
|
||||
"student_name",
|
||||
"student_mobile_number",
|
||||
"course_schedule",
|
||||
"student_group",
|
||||
"column_break_3",
|
||||
@ -93,11 +94,19 @@
|
||||
"options": "Student Attendance",
|
||||
"print_hide": 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,
|
||||
"links": [],
|
||||
"modified": "2020-07-08 13:55:42.580181",
|
||||
"modified": "2021-03-24 00:02:11.005895",
|
||||
"modified_by": "Administrator",
|
||||
"module": "Education",
|
||||
"name": "Student Attendance",
|
||||
|
@ -397,6 +397,7 @@ erpnext.PointOfSale.Controller = class {
|
||||
this.recent_order_list.toggle_component(false);
|
||||
frappe.run_serially([
|
||||
() => this.frm.refresh(name),
|
||||
() => this.frm.call('reset_mode_of_payments'),
|
||||
() => this.cart.load_invoice(),
|
||||
() => this.item_selector.toggle_component(true)
|
||||
]);
|
||||
|
@ -64,10 +64,7 @@ erpnext.PointOfSale.PastOrderSummary = class {
|
||||
{fieldname: 'print', fieldtype: 'Data', label: 'Print Preview'}
|
||||
],
|
||||
primary_action: () => {
|
||||
const frm = this.events.get_frm();
|
||||
frm.doc = this.doc;
|
||||
frm.print_preview.lang_code = frm.doc.language;
|
||||
frm.print_preview.printit(true);
|
||||
this.print_receipt();
|
||||
},
|
||||
primary_action_label: __('Print'),
|
||||
});
|
||||
@ -192,13 +189,21 @@ erpnext.PointOfSale.PastOrderSummary = class {
|
||||
});
|
||||
|
||||
this.$summary_container.on('click', '.print-btn', () => {
|
||||
const frm = this.events.get_frm();
|
||||
frm.doc = this.doc;
|
||||
frm.print_preview.lang_code = frm.doc.language;
|
||||
frm.print_preview.printit(true);
|
||||
this.print_receipt();
|
||||
});
|
||||
}
|
||||
|
||||
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() {
|
||||
const ctrl_label = frappe.utils.is_mac() ? '⌘' : 'Ctrl';
|
||||
this.$summary_container.find('.print-btn').attr("title", `${ctrl_label}+P`);
|
||||
|
Loading…
x
Reference in New Issue
Block a user