mirror of
https://github.com/frappe/erpnext.git
synced 2026-05-26 08:24:47 +00:00
Merge branch 'develop' into multiple-pricing-rules-are-not-applied
This commit is contained in:
@@ -7,7 +7,7 @@ frappe.ui.form.on('Accounting Dimension', {
|
|||||||
frm.set_query('document_type', () => {
|
frm.set_query('document_type', () => {
|
||||||
let invalid_doctypes = frappe.model.core_doctypes_list;
|
let invalid_doctypes = frappe.model.core_doctypes_list;
|
||||||
invalid_doctypes.push('Accounting Dimension', 'Project',
|
invalid_doctypes.push('Accounting Dimension', 'Project',
|
||||||
'Cost Center', 'Accounting Dimension Detail');
|
'Cost Center', 'Accounting Dimension Detail', 'Company');
|
||||||
|
|
||||||
return {
|
return {
|
||||||
filters: {
|
filters: {
|
||||||
|
|||||||
@@ -19,7 +19,7 @@ class AccountingDimension(Document):
|
|||||||
|
|
||||||
def validate(self):
|
def validate(self):
|
||||||
if self.document_type in core_doctypes_list + ('Accounting Dimension', 'Project',
|
if self.document_type in core_doctypes_list + ('Accounting Dimension', 'Project',
|
||||||
'Cost Center', 'Accounting Dimension Detail') :
|
'Cost Center', 'Accounting Dimension Detail', 'Company') :
|
||||||
|
|
||||||
msg = _("Not allowed to create accounting dimension for {0}").format(self.document_type)
|
msg = _("Not allowed to create accounting dimension for {0}").format(self.document_type)
|
||||||
frappe.throw(msg)
|
frappe.throw(msg)
|
||||||
|
|||||||
@@ -14,6 +14,7 @@
|
|||||||
"column_break_9",
|
"column_break_9",
|
||||||
"update_stock",
|
"update_stock",
|
||||||
"ignore_pricing_rule",
|
"ignore_pricing_rule",
|
||||||
|
"hide_unavailable_items",
|
||||||
"warehouse",
|
"warehouse",
|
||||||
"campaign",
|
"campaign",
|
||||||
"company_address",
|
"company_address",
|
||||||
@@ -307,13 +308,19 @@
|
|||||||
"fieldtype": "Check",
|
"fieldtype": "Check",
|
||||||
"label": "Update Stock",
|
"label": "Update Stock",
|
||||||
"read_only": 1
|
"read_only": 1
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"default": "0",
|
||||||
|
"fieldname": "hide_unavailable_items",
|
||||||
|
"fieldtype": "Check",
|
||||||
|
"label": "Hide Unavailable Items"
|
||||||
}
|
}
|
||||||
],
|
],
|
||||||
"icon": "icon-cog",
|
"icon": "icon-cog",
|
||||||
"idx": 1,
|
"idx": 1,
|
||||||
"index_web_pages_for_search": 1,
|
"index_web_pages_for_search": 1,
|
||||||
"links": [],
|
"links": [],
|
||||||
"modified": "2020-10-20 13:16:50.665081",
|
"modified": "2020-10-29 13:18:38.795925",
|
||||||
"modified_by": "Administrator",
|
"modified_by": "Administrator",
|
||||||
"module": "Accounts",
|
"module": "Accounts",
|
||||||
"name": "POS Profile",
|
"name": "POS Profile",
|
||||||
|
|||||||
@@ -237,7 +237,7 @@ class TestSubscription(unittest.TestCase):
|
|||||||
subscription.party_type = 'Customer'
|
subscription.party_type = 'Customer'
|
||||||
subscription.party = '_Test Customer'
|
subscription.party = '_Test Customer'
|
||||||
subscription.append('plans', {'plan': '_Test Plan Name', 'qty': 1})
|
subscription.append('plans', {'plan': '_Test Plan Name', 'qty': 1})
|
||||||
subscription.start_date = '2018-01-01'
|
subscription.start_date = add_days(nowdate(), -1000)
|
||||||
subscription.insert()
|
subscription.insert()
|
||||||
subscription.process() # generate first invoice
|
subscription.process() # generate first invoice
|
||||||
|
|
||||||
|
|||||||
@@ -63,6 +63,7 @@ def get_pos_entries(filters, group_by_field):
|
|||||||
FROM
|
FROM
|
||||||
`tabPOS Invoice` p {from_sales_invoice_payment}
|
`tabPOS Invoice` p {from_sales_invoice_payment}
|
||||||
WHERE
|
WHERE
|
||||||
|
p.docstatus = 1 and
|
||||||
{group_by_mop_condition}
|
{group_by_mop_condition}
|
||||||
{conditions}
|
{conditions}
|
||||||
ORDER BY
|
ORDER BY
|
||||||
|
|||||||
@@ -9,9 +9,9 @@
|
|||||||
"filters_json": "{\"status\":\"In Location\",\"filter_based_on\":\"Fiscal Year\",\"period_start_date\":\"2020-04-01\",\"period_end_date\":\"2021-03-31\",\"date_based_on\":\"Purchase Date\",\"group_by\":\"--Select a group--\"}",
|
"filters_json": "{\"status\":\"In Location\",\"filter_based_on\":\"Fiscal Year\",\"period_start_date\":\"2020-04-01\",\"period_end_date\":\"2021-03-31\",\"date_based_on\":\"Purchase Date\",\"group_by\":\"--Select a group--\"}",
|
||||||
"group_by_type": "Count",
|
"group_by_type": "Count",
|
||||||
"idx": 0,
|
"idx": 0,
|
||||||
"is_public": 0,
|
"is_public": 1,
|
||||||
"is_standard": 1,
|
"is_standard": 1,
|
||||||
"modified": "2020-07-23 13:53:33.211371",
|
"modified": "2020-10-28 23:15:58.432189",
|
||||||
"modified_by": "Administrator",
|
"modified_by": "Administrator",
|
||||||
"module": "Assets",
|
"module": "Assets",
|
||||||
"name": "Asset Value Analytics",
|
"name": "Asset Value Analytics",
|
||||||
|
|||||||
@@ -8,9 +8,9 @@
|
|||||||
"dynamic_filters_json": "{\"company\":\"frappe.defaults.get_user_default(\\\"Company\\\")\",\"from_date\":\"frappe.datetime.add_months(frappe.datetime.nowdate(), -12)\",\"to_date\":\"frappe.datetime.nowdate()\"}",
|
"dynamic_filters_json": "{\"company\":\"frappe.defaults.get_user_default(\\\"Company\\\")\",\"from_date\":\"frappe.datetime.add_months(frappe.datetime.nowdate(), -12)\",\"to_date\":\"frappe.datetime.nowdate()\"}",
|
||||||
"filters_json": "{\"status\":\"In Location\",\"group_by\":\"Asset Category\",\"is_existing_asset\":0}",
|
"filters_json": "{\"status\":\"In Location\",\"group_by\":\"Asset Category\",\"is_existing_asset\":0}",
|
||||||
"idx": 0,
|
"idx": 0,
|
||||||
"is_public": 0,
|
"is_public": 1,
|
||||||
"is_standard": 1,
|
"is_standard": 1,
|
||||||
"modified": "2020-07-23 13:39:32.429240",
|
"modified": "2020-10-28 23:16:16.939070",
|
||||||
"modified_by": "Administrator",
|
"modified_by": "Administrator",
|
||||||
"module": "Assets",
|
"module": "Assets",
|
||||||
"name": "Category-wise Asset Value",
|
"name": "Category-wise Asset Value",
|
||||||
|
|||||||
@@ -8,9 +8,9 @@
|
|||||||
"dynamic_filters_json": "{\"company\":\"frappe.defaults.get_user_default(\\\"Company\\\")\",\"from_date\":\"frappe.datetime.add_months(frappe.datetime.nowdate(), -12)\",\"to_date\":\"frappe.datetime.nowdate()\"}",
|
"dynamic_filters_json": "{\"company\":\"frappe.defaults.get_user_default(\\\"Company\\\")\",\"from_date\":\"frappe.datetime.add_months(frappe.datetime.nowdate(), -12)\",\"to_date\":\"frappe.datetime.nowdate()\"}",
|
||||||
"filters_json": "{\"status\":\"In Location\",\"group_by\":\"Location\",\"is_existing_asset\":0}",
|
"filters_json": "{\"status\":\"In Location\",\"group_by\":\"Location\",\"is_existing_asset\":0}",
|
||||||
"idx": 0,
|
"idx": 0,
|
||||||
"is_public": 0,
|
"is_public": 1,
|
||||||
"is_standard": 1,
|
"is_standard": 1,
|
||||||
"modified": "2020-07-23 13:42:44.912551",
|
"modified": "2020-10-28 23:16:07.883312",
|
||||||
"modified_by": "Administrator",
|
"modified_by": "Administrator",
|
||||||
"module": "Assets",
|
"module": "Assets",
|
||||||
"name": "Location-wise Asset Value",
|
"name": "Location-wise Asset Value",
|
||||||
|
|||||||
@@ -735,10 +735,12 @@ def get_items_for_material_requests(doc, warehouses=None):
|
|||||||
mr_items = new_mr_items
|
mr_items = new_mr_items
|
||||||
|
|
||||||
if not mr_items:
|
if not mr_items:
|
||||||
frappe.msgprint(_("""As raw materials projected quantity is more than required quantity,
|
to_enable = frappe.bold(_("Ignore Existing Projected Quantity"))
|
||||||
there is no need to create material request for the warehouse {0}.
|
warehouse = frappe.bold(doc.get('for_warehouse'))
|
||||||
Still if you want to make material request,
|
message = _("As there are sufficient raw materials, Material Request is not required for Warehouse {0}.").format(warehouse) + "<br><br>"
|
||||||
kindly enable <b>Ignore Existing Projected Quantity</b> checkbox""").format(doc.get('for_warehouse')))
|
message += _(" If you still want to proceed, please enable {0}.").format(to_enable)
|
||||||
|
|
||||||
|
frappe.msgprint(message, title=_("Note"))
|
||||||
|
|
||||||
return mr_items
|
return mr_items
|
||||||
|
|
||||||
|
|||||||
@@ -352,9 +352,15 @@ erpnext.TransactionController = erpnext.taxes_and_totals.extend({
|
|||||||
|
|
||||||
let show_description = function(idx, exist = null) {
|
let show_description = function(idx, exist = null) {
|
||||||
if (exist) {
|
if (exist) {
|
||||||
scan_barcode_field.set_new_description(__('Row #{0}: Qty increased by 1', [idx]));
|
frappe.show_alert({
|
||||||
|
message: __('Row #{0}: Qty increased by 1', [idx]),
|
||||||
|
indicator: 'green'
|
||||||
|
});
|
||||||
} else {
|
} else {
|
||||||
scan_barcode_field.set_new_description(__('Row #{0}: Item added', [idx]));
|
frappe.show_alert({
|
||||||
|
message: __('Row #{0}: Item added', [idx]),
|
||||||
|
indicator: 'green'
|
||||||
|
});
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -365,7 +371,10 @@ erpnext.TransactionController = erpnext.taxes_and_totals.extend({
|
|||||||
}).then(r => {
|
}).then(r => {
|
||||||
const data = r && r.message;
|
const data = r && r.message;
|
||||||
if (!data || Object.keys(data).length === 0) {
|
if (!data || Object.keys(data).length === 0) {
|
||||||
scan_barcode_field.set_new_description(__('Cannot find Item with this barcode'));
|
frappe.show_alert({
|
||||||
|
message: __('Cannot find Item with this Barcode'),
|
||||||
|
indicator: 'red'
|
||||||
|
});
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -651,7 +660,7 @@ erpnext.TransactionController = erpnext.taxes_and_totals.extend({
|
|||||||
let child = frappe.model.add_child(me.frm.doc, "taxes");
|
let child = frappe.model.add_child(me.frm.doc, "taxes");
|
||||||
child.charge_type = "On Net Total";
|
child.charge_type = "On Net Total";
|
||||||
child.account_head = tax;
|
child.account_head = tax;
|
||||||
child.rate = rate;
|
child.rate = 0;
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -14,11 +14,11 @@ from six import string_types
|
|||||||
def get_items(start, page_length, price_list, item_group, pos_profile, search_value=""):
|
def get_items(start, page_length, price_list, item_group, pos_profile, search_value=""):
|
||||||
data = dict()
|
data = dict()
|
||||||
result = []
|
result = []
|
||||||
warehouse, show_only_available_items = "", False
|
warehouse, hide_unavailable_items = "", False
|
||||||
|
|
||||||
allow_negative_stock = frappe.db.get_single_value('Stock Settings', 'allow_negative_stock')
|
allow_negative_stock = frappe.db.get_single_value('Stock Settings', 'allow_negative_stock')
|
||||||
if not allow_negative_stock:
|
if not allow_negative_stock:
|
||||||
warehouse, show_only_available_items = frappe.db.get_value('POS Profile', pos_profile, ['warehouse', 'show_only_available_items'])
|
warehouse, hide_unavailable_items = frappe.db.get_value('POS Profile', pos_profile, ['warehouse', 'hide_unavailable_items'])
|
||||||
|
|
||||||
if not frappe.db.exists('Item Group', item_group):
|
if not frappe.db.exists('Item Group', item_group):
|
||||||
item_group = get_root_of('Item Group')
|
item_group = get_root_of('Item Group')
|
||||||
@@ -48,7 +48,7 @@ def get_items(start, page_length, price_list, item_group, pos_profile, search_va
|
|||||||
lft, rgt = frappe.db.get_value('Item Group', item_group, ['lft', 'rgt'])
|
lft, rgt = frappe.db.get_value('Item Group', item_group, ['lft', 'rgt'])
|
||||||
|
|
||||||
bin_join_selection, bin_join_condition = "", ""
|
bin_join_selection, bin_join_condition = "", ""
|
||||||
if show_only_available_items:
|
if hide_unavailable_items:
|
||||||
bin_join_selection = ", `tabBin` bin"
|
bin_join_selection = ", `tabBin` bin"
|
||||||
bin_join_condition = "AND bin.warehouse = %(warehouse)s AND bin.item_code = item.name AND bin.actual_qty > 0"
|
bin_join_condition = "AND bin.warehouse = %(warehouse)s AND bin.item_code = item.name AND bin.actual_qty > 0"
|
||||||
|
|
||||||
|
|||||||
@@ -168,6 +168,7 @@ def get_stock_ledger_entries(filters, items):
|
|||||||
from
|
from
|
||||||
`tabStock Ledger Entry` sle force index (posting_sort_index)
|
`tabStock Ledger Entry` sle force index (posting_sort_index)
|
||||||
where sle.docstatus < 2 %s %s
|
where sle.docstatus < 2 %s %s
|
||||||
|
and is_cancelled = 0
|
||||||
order by sle.posting_date, sle.posting_time, sle.creation, sle.actual_qty""" % #nosec
|
order by sle.posting_date, sle.posting_time, sle.creation, sle.actual_qty""" % #nosec
|
||||||
(item_conditions_sql, conditions), as_dict=1)
|
(item_conditions_sql, conditions), as_dict=1)
|
||||||
|
|
||||||
|
|||||||
@@ -45,7 +45,7 @@
|
|||||||
<p class='lead'>{{ education_settings.description }}</p>
|
<p class='lead'>{{ education_settings.description }}</p>
|
||||||
<p class="mt-4">
|
<p class="mt-4">
|
||||||
{% if frappe.session.user == 'Guest' %}
|
{% if frappe.session.user == 'Guest' %}
|
||||||
<a class="btn btn-primary btn-lg" href="'/login#signup'">{{_('Sign Up')}}</a>
|
<a class="btn btn-primary btn-lg" href="/login#signup">{{_('Sign Up')}}</a>
|
||||||
{% endif %}
|
{% endif %}
|
||||||
</p>
|
</p>
|
||||||
</div>
|
</div>
|
||||||
|
|||||||
Reference in New Issue
Block a user