feat: add selling setting for cutoff date
This commit is contained in:
parent
9a705169fd
commit
b8dac84a90
@ -55,18 +55,24 @@ frappe.listview_settings['Sales Order'] = {
|
|||||||
});
|
});
|
||||||
|
|
||||||
listview.page.add_action_item(__("Delivery Note"), ()=>{
|
listview.page.add_action_item(__("Delivery Note"), ()=>{
|
||||||
var dialog = new frappe.ui.Dialog({
|
frappe.db.get_single_value("Selling Settings", "enable_cutoff_date_on_bulk_delivery_note_creation").then((value) => {
|
||||||
title: __("Select Items up to Delivery Date"),
|
if (value) {
|
||||||
fields: [{fieldtype: "Date", fieldname: "delivery_date", default: frappe.datetime.add_days(frappe.datetime.nowdate(), 1)}]
|
var dialog = new frappe.ui.Dialog({
|
||||||
});
|
title: __("Select Items up to Delivery Date"),
|
||||||
dialog.set_primary_action(__("Select"), function(values) {
|
fields: [{fieldtype: "Date", fieldname: "delivery_date", default: frappe.datetime.add_days(frappe.datetime.nowdate(), 1)}]
|
||||||
var until_delivery_date = values.delivery_date;
|
});
|
||||||
erpnext.bulk_transaction_processing.create(listview, "Sales Order", "Delivery Note", {
|
dialog.set_primary_action(__("Select"), function(values) {
|
||||||
until_delivery_date
|
var until_delivery_date = values.delivery_date;
|
||||||
});
|
erpnext.bulk_transaction_processing.create(listview, "Sales Order", "Delivery Note", {
|
||||||
dialog.hide();
|
until_delivery_date
|
||||||
});
|
});
|
||||||
dialog.show();
|
dialog.hide();
|
||||||
|
});
|
||||||
|
dialog.show();
|
||||||
|
} else {
|
||||||
|
erpnext.bulk_transaction_processing.create(listview, "Sales Order", "Delivery Note");
|
||||||
|
}
|
||||||
|
})
|
||||||
});
|
});
|
||||||
|
|
||||||
listview.page.add_action_item(__("Advance Payment"), ()=>{
|
listview.page.add_action_item(__("Advance Payment"), ()=>{
|
||||||
|
@ -32,7 +32,8 @@
|
|||||||
"allow_sales_order_creation_for_expired_quotation",
|
"allow_sales_order_creation_for_expired_quotation",
|
||||||
"dont_reserve_sales_order_qty_on_sales_return",
|
"dont_reserve_sales_order_qty_on_sales_return",
|
||||||
"hide_tax_id",
|
"hide_tax_id",
|
||||||
"enable_discount_accounting"
|
"enable_discount_accounting",
|
||||||
|
"enable_cutoff_date_on_bulk_delivery_note_creation"
|
||||||
],
|
],
|
||||||
"fields": [
|
"fields": [
|
||||||
{
|
{
|
||||||
@ -200,6 +201,12 @@
|
|||||||
"fieldname": "blanket_order_allowance",
|
"fieldname": "blanket_order_allowance",
|
||||||
"fieldtype": "Float",
|
"fieldtype": "Float",
|
||||||
"label": "Blanket Order Allowance (%)"
|
"label": "Blanket Order Allowance (%)"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"default": "0",
|
||||||
|
"fieldname": "enable_cutoff_date_on_bulk_delivery_note_creation",
|
||||||
|
"fieldtype": "Check",
|
||||||
|
"label": "Enable Cut-Off Date on Bulk Delivery Note Creation"
|
||||||
}
|
}
|
||||||
],
|
],
|
||||||
"icon": "fa fa-cog",
|
"icon": "fa fa-cog",
|
||||||
@ -207,7 +214,7 @@
|
|||||||
"index_web_pages_for_search": 1,
|
"index_web_pages_for_search": 1,
|
||||||
"issingle": 1,
|
"issingle": 1,
|
||||||
"links": [],
|
"links": [],
|
||||||
"modified": "2023-10-25 14:03:03.966701",
|
"modified": "2024-03-01 12:07:39.994520",
|
||||||
"modified_by": "Administrator",
|
"modified_by": "Administrator",
|
||||||
"module": "Selling",
|
"module": "Selling",
|
||||||
"name": "Selling Settings",
|
"name": "Selling Settings",
|
||||||
|
@ -30,6 +30,7 @@ class SellingSettings(Document):
|
|||||||
dont_reserve_sales_order_qty_on_sales_return: DF.Check
|
dont_reserve_sales_order_qty_on_sales_return: DF.Check
|
||||||
editable_bundle_item_rates: DF.Check
|
editable_bundle_item_rates: DF.Check
|
||||||
editable_price_list_rate: DF.Check
|
editable_price_list_rate: DF.Check
|
||||||
|
enable_cutoff_date_on_bulk_delivery_note_creation: DF.Check
|
||||||
enable_discount_accounting: DF.Check
|
enable_discount_accounting: DF.Check
|
||||||
hide_tax_id: DF.Check
|
hide_tax_id: DF.Check
|
||||||
maintain_same_rate_action: DF.Literal["Stop", "Warn"]
|
maintain_same_rate_action: DF.Literal["Stop", "Warn"]
|
||||||
|
Loading…
x
Reference in New Issue
Block a user