mirror of
https://github.com/frappe/erpnext.git
synced 2026-05-25 16:04:46 +00:00
Merge branch 'develop' into dev-stock-entry-fg-validation
This commit is contained in:
@@ -48,12 +48,6 @@ frappe.ui.form.on('Accounting Dimension', {
|
|||||||
frm.set_value('label', frm.doc.document_type);
|
frm.set_value('label', frm.doc.document_type);
|
||||||
frm.set_value('fieldname', frappe.model.scrub(frm.doc.document_type));
|
frm.set_value('fieldname', frappe.model.scrub(frm.doc.document_type));
|
||||||
|
|
||||||
if (frm.is_new()){
|
|
||||||
let row = frappe.model.add_child(frm.doc, "Accounting Dimension Detail", "dimension_defaults");
|
|
||||||
row.reference_document = frm.doc.document_type;
|
|
||||||
frm.refresh_fields("dimension_defaults");
|
|
||||||
}
|
|
||||||
|
|
||||||
frappe.db.get_value('Accounting Dimension', {'document_type': frm.doc.document_type}, 'document_type', (r) => {
|
frappe.db.get_value('Accounting Dimension', {'document_type': frm.doc.document_type}, 'document_type', (r) => {
|
||||||
if (r && r.document_type) {
|
if (r && r.document_type) {
|
||||||
frm.set_df_property('document_type', 'description', "Document type is already set as dimension");
|
frm.set_df_property('document_type', 'description', "Document type is already set as dimension");
|
||||||
|
|||||||
@@ -1,4 +1,5 @@
|
|||||||
{
|
{
|
||||||
|
"actions": [],
|
||||||
"autoname": "field:label",
|
"autoname": "field:label",
|
||||||
"creation": "2019-05-04 18:13:37.002352",
|
"creation": "2019-05-04 18:13:37.002352",
|
||||||
"doctype": "DocType",
|
"doctype": "DocType",
|
||||||
@@ -46,7 +47,8 @@
|
|||||||
"options": "Accounting Dimension Detail"
|
"options": "Accounting Dimension Detail"
|
||||||
}
|
}
|
||||||
],
|
],
|
||||||
"modified": "2019-07-17 16:49:31.134385",
|
"links": [],
|
||||||
|
"modified": "2020-03-22 20:34:39.805728",
|
||||||
"modified_by": "Administrator",
|
"modified_by": "Administrator",
|
||||||
"module": "Accounts",
|
"module": "Accounts",
|
||||||
"name": "Accounting Dimension",
|
"name": "Accounting Dimension",
|
||||||
@@ -63,9 +65,20 @@
|
|||||||
"role": "System Manager",
|
"role": "System Manager",
|
||||||
"share": 1,
|
"share": 1,
|
||||||
"write": 1
|
"write": 1
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"create": 1,
|
||||||
|
"delete": 1,
|
||||||
|
"email": 1,
|
||||||
|
"export": 1,
|
||||||
|
"print": 1,
|
||||||
|
"read": 1,
|
||||||
|
"report": 1,
|
||||||
|
"role": "Accounts Manager",
|
||||||
|
"share": 1,
|
||||||
|
"write": 1
|
||||||
}
|
}
|
||||||
],
|
],
|
||||||
"quick_entry": 1,
|
|
||||||
"sort_field": "modified",
|
"sort_field": "modified",
|
||||||
"sort_order": "ASC",
|
"sort_order": "ASC",
|
||||||
"track_changes": 1
|
"track_changes": 1
|
||||||
|
|||||||
@@ -1,4 +1,5 @@
|
|||||||
{
|
{
|
||||||
|
"actions": [],
|
||||||
"allow_import": 1,
|
"allow_import": 1,
|
||||||
"allow_rename": 1,
|
"allow_rename": 1,
|
||||||
"autoname": "naming_series:",
|
"autoname": "naming_series:",
|
||||||
@@ -214,7 +215,8 @@
|
|||||||
{
|
{
|
||||||
"fieldname": "opportunity_amount",
|
"fieldname": "opportunity_amount",
|
||||||
"fieldtype": "Currency",
|
"fieldtype": "Currency",
|
||||||
"label": "Opportunity Amount"
|
"label": "Opportunity Amount",
|
||||||
|
"options": "currency"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"default": "0",
|
"default": "0",
|
||||||
@@ -418,7 +420,8 @@
|
|||||||
],
|
],
|
||||||
"icon": "fa fa-info-sign",
|
"icon": "fa fa-info-sign",
|
||||||
"idx": 195,
|
"idx": 195,
|
||||||
"modified": "2019-09-30 12:58:37.385400",
|
"links": [],
|
||||||
|
"modified": "2020-03-20 12:28:45.228994",
|
||||||
"modified_by": "Administrator",
|
"modified_by": "Administrator",
|
||||||
"module": "CRM",
|
"module": "CRM",
|
||||||
"name": "Opportunity",
|
"name": "Opportunity",
|
||||||
|
|||||||
@@ -177,6 +177,10 @@ class StockEntry(StockController):
|
|||||||
stock_items = self.get_stock_items()
|
stock_items = self.get_stock_items()
|
||||||
serialized_items = self.get_serialized_items()
|
serialized_items = self.get_serialized_items()
|
||||||
for item in self.get("items"):
|
for item in self.get("items"):
|
||||||
|
if item.qty and item.qty < 0:
|
||||||
|
frappe.throw(_("Row {0}: The item {1}, quantity must be positive number")
|
||||||
|
.format(item.idx, frappe.bold(item.item_code)))
|
||||||
|
|
||||||
if item.item_code not in stock_items:
|
if item.item_code not in stock_items:
|
||||||
frappe.throw(_("{0} is not a stock Item").format(item.item_code))
|
frappe.throw(_("{0} is not a stock Item").format(item.item_code))
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user