mirror of
https://github.com/frappe/erpnext.git
synced 2026-06-01 11:19:09 +00:00
refactor: change sales invoice button position (#45130)
(cherry picked from commit a0f17f8e73)
This commit is contained in:
@@ -994,7 +994,9 @@ frappe.ui.form.on("Sales Invoice", {
|
|||||||
|
|
||||||
refresh: function (frm) {
|
refresh: function (frm) {
|
||||||
if (frm.doc.docstatus === 0 && !frm.doc.is_return) {
|
if (frm.doc.docstatus === 0 && !frm.doc.is_return) {
|
||||||
frm.add_custom_button(__("Fetch Timesheet"), function () {
|
frm.add_custom_button(
|
||||||
|
__("Timesheet"),
|
||||||
|
function () {
|
||||||
let d = new frappe.ui.Dialog({
|
let d = new frappe.ui.Dialog({
|
||||||
title: __("Fetch Timesheet"),
|
title: __("Fetch Timesheet"),
|
||||||
fields: [
|
fields: [
|
||||||
@@ -1034,7 +1036,9 @@ frappe.ui.form.on("Sales Invoice", {
|
|||||||
primary_action_label: __("Get Timesheets"),
|
primary_action_label: __("Get Timesheets"),
|
||||||
});
|
});
|
||||||
d.show();
|
d.show();
|
||||||
});
|
},
|
||||||
|
__("Get Items From")
|
||||||
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (frm.doc.is_debit_note) {
|
if (frm.doc.is_debit_note) {
|
||||||
|
|||||||
@@ -303,11 +303,10 @@ erpnext.TransactionController = class TransactionController extends erpnext.taxe
|
|||||||
}
|
}
|
||||||
|
|
||||||
const me = this;
|
const me = this;
|
||||||
if (!this.frm.is_new() && this.frm.doc.docstatus === 0 && frappe.model.can_create("Quality Inspection")) {
|
if (!this.frm.is_new() && this.frm.doc.docstatus === 0 && frappe.model.can_create("Quality Inspection") && this.frm.doc.update_stock) {
|
||||||
this.frm.add_custom_button(__("Quality Inspection(s)"), () => {
|
this.frm.add_custom_button(__("Quality Inspection(s)"), () => {
|
||||||
me.make_quality_inspection();
|
me.make_quality_inspection();
|
||||||
}, __("Create"));
|
}, __("Create"));
|
||||||
this.frm.page.set_inner_btn_group_as_primary(__('Create'));
|
|
||||||
}
|
}
|
||||||
|
|
||||||
const inspection_type = ["Purchase Receipt", "Purchase Invoice", "Subcontracting Receipt"].includes(this.frm.doc.doctype)
|
const inspection_type = ["Purchase Receipt", "Purchase Invoice", "Subcontracting Receipt"].includes(this.frm.doc.doctype)
|
||||||
|
|||||||
Reference in New Issue
Block a user