mirror of
https://github.com/frappe/erpnext.git
synced 2026-05-07 23:31:20 +00:00
Merge branch 'master' of github.com:webnotes/erpnext into purchase_price_list
Conflicts: accounts/doctype/gl_control/gl_control.py
This commit is contained in:
@@ -1 +0,0 @@
|
||||
[{'creation': '2010-07-16 11:03:21', 'doctype': 'Item Group', 'lft': 1, 'owner': 'harshada@webnotestech.com', 'rgt': 286, 'company_abbr': None, 'docstatus': 0, 'item_group_name': 'All Item Groups', 'description': None, 'parent': None, 'is_group': 'Yes', 'company': None, 'show_in_catalogue': None, 'group_or_ledger': None, 'modified_by': 'harshada@webnotestech.com', 'group_name': None, 'trash_reason': None, 'name': 'All Item Groups', 'idx': None, 'modified': '2010-07-16 11:03:21', 'parent_item_group': '', 'old_parent': '', 'parenttype': None, 'parentfield': None}]
|
||||
@@ -1 +0,0 @@
|
||||
[{'creation': '2010-07-05 16:08:14', 'doctype': 'Item Group', 'lft': 76, 'owner': 'nabin@webnotestech.com', 'rgt': 77, 'company_abbr': None, 'docstatus': 0, 'item_group_name': 'Default', 'description': None, 'parent': None, 'is_group': 'No', 'company': None, 'show_in_catalogue': None, 'group_or_ledger': None, 'modified_by': 'nabin@webnotestech.com', 'group_name': None, 'trash_reason': None, 'name': 'Default', 'idx': None, 'modified': '2010-07-05 16:08:14', 'parent_item_group': 'All Item Groups', 'old_parent': '', 'parenttype': None, 'parentfield': None}]
|
||||
@@ -4,4 +4,7 @@ install_docs = [
|
||||
{"doctype":"Role", "role_name":"Material Master Manager", "name":"Material Master Manager"},
|
||||
{"doctype":"Role", "role_name":"Material User", "name":"Material User"},
|
||||
{"doctype":"Role", "role_name":"Quality Manager", "name":"Quality Manager"},
|
||||
{"doctype":"Item Group", "item_group_name":"All Item Groups", "is_group":"Yes"},
|
||||
{"doctype":"Item Group", "item_group_name":"Default",
|
||||
"parent_item_group":"All Item Groups", "is_group":"No"},
|
||||
]
|
||||
|
||||
@@ -77,7 +77,7 @@ class DocType:
|
||||
|
||||
def update_website(self):
|
||||
from website.utils import update_page_name
|
||||
update_page_name(self.doc, self.doc.item_name)
|
||||
update_page_name(self.doc, self.doc.name + " " + self.doc.item_name)
|
||||
|
||||
from website.helpers.product import invalidate_cache_for
|
||||
invalidate_cache_for(self.doc.item_group)
|
||||
|
||||
@@ -117,7 +117,7 @@ class DocType:
|
||||
from `tabDelivery Note Item` dni
|
||||
where parent=%s and item_code in (%s)
|
||||
group by item_code""" % ("%s", ", ".join(["%s"]*len(items))),
|
||||
tuple([self.doc.delivery_note] + items), as_dict=1, debug=1)
|
||||
tuple([self.doc.delivery_note] + items), as_dict=1)
|
||||
|
||||
ps_item_qty = dict([[d.item_code, d.qty] for d in self.doclist])
|
||||
|
||||
@@ -170,9 +170,6 @@ class DocType:
|
||||
webnotes.msgprint("Invalid new packed quantity for item %s. \
|
||||
Please try again or contact support@erpnext.com" % item['item_code'], raise_exception=1)
|
||||
|
||||
delivery_note_item = webnotes.conn.get_value("Delivery Note Item", {
|
||||
"parent": self.doc.delivery_note, "item_code": item["item_code"]})
|
||||
|
||||
webnotes.conn.sql("""\
|
||||
UPDATE `tabDelivery Note Item`
|
||||
SET packed_qty = %s
|
||||
|
||||
@@ -211,7 +211,6 @@ cur_frm.cscript.make_jv = function(doc, dr_or_cr, children) {
|
||||
jv.fiscal_year = sys_defaults.fiscal_year;
|
||||
jv.is_opening = 'No';
|
||||
jv.posting_date = doc.return_date;
|
||||
jv.voucher_date = dateutil.obj_to_str(new Date());
|
||||
|
||||
// Add children
|
||||
if(children) {
|
||||
|
||||
@@ -1,18 +0,0 @@
|
||||
[
|
||||
"Ordered Items To Be Delivered",
|
||||
"A logical Warehouse against which stock entries are made.",
|
||||
"For the convenience of customers, these codes can be used in print formats like Invoices and Delivery Notes",
|
||||
"Featured Item in Item Group",
|
||||
"Stock Analytics",
|
||||
"Distinct unit of an Item",
|
||||
"Stock Home",
|
||||
"Item-Wise Price List",
|
||||
"Aggregate group of **Items** into another **Item**. This is useful if you are bundling a certain **Items** into a package and you maintain stock of the packed **Items** and not the aggregate **Item**. The package **Item** will have \"Is Stock Item\" as \"No\" and \"Is Sales Item\" as \"Yes\".For Example: If you are selling Laptops and Backpacks separately and have a special price if the customer buys both, then the Laptop + Backpack will be a new Sales BOM Item.Note: BOM = Bill of Materials",
|
||||
"Stock Level",
|
||||
"Table for Item that will be shown in Web Site",
|
||||
"Stock Ageing",
|
||||
"Stock Balance",
|
||||
"A Product or a Service that is bought, sold or kept in stock.",
|
||||
"Generate packing slips for packages to be delivered. Used to notify package number, package contents and its weight.",
|
||||
"Stock Ledger"
|
||||
]
|
||||
@@ -1,18 +0,0 @@
|
||||
{
|
||||
"A Product or a Service that is bought, sold or kept in stock.": "\u090f\u0915 \u0909\u0924\u094d\u092a\u093e\u0926 \u092f\u093e \u0938\u0947\u0935\u093e \u0939\u0948 \u0915\u093f \u0916\u0930\u0940\u0926\u093e \u0939\u0948, \u092c\u0947\u091a\u093e \u092f\u093e \u0938\u094d\u091f\u0949\u0915 \u092e\u0947\u0902 \u0930\u0916\u093e.",
|
||||
"A logical Warehouse against which stock entries are made.": "\u090f\u0915 \u0924\u093e\u0930\u094d\u0915\u093f\u0915 \u0935\u0947\u092f\u0930\u0939\u093e\u0909\u0938 \u0915\u0947 \u0916\u093f\u0932\u093e\u092b \u091c\u094b \u0936\u0947\u092f\u0930 \u092a\u094d\u0930\u0935\u093f\u0937\u094d\u091f\u093f\u092f\u094b\u0902 \u092c\u0928\u093e \u0930\u0939\u0947 \u0939\u0948\u0902.",
|
||||
"Aggregate group of **Items** into another **Item**. This is useful if you are bundling a certain **Items** into a package and you maintain stock of the packed **Items** and not the aggregate **Item**. The package **Item** will have \"Is Stock Item\" as \"No\" and \"Is Sales Item\" as \"Yes\".For Example: If you are selling Laptops and Backpacks separately and have a special price if the customer buys both, then the Laptop + Backpack will be a new Sales BOM Item.Note: BOM = Bill of Materials": "** \u0906\u0907\u091f\u092e \u0915\u0947 \u0938\u0915\u0932 \u0938\u092e\u0942\u0939 \u092e\u0947\u0902 \u090f\u0915 \u0914\u0930 \u0906\u0907\u091f\u092e ** **. \u092f\u0939 \u0909\u092a\u092f\u094b\u0917\u0940 \u0939\u0948 \u0905\u0917\u0930 \u0906\u092a \u090f\u0915 \u092a\u0948\u0915\u0947\u091c \u092e\u0947\u0902 ** \u0915\u0941\u091b ** \u0906\u0907\u091f\u092e bundling \u0939\u0948\u0902 \u0914\u0930 \u0906\u092a \u092a\u0948\u0915 ** \u0914\u0930 \u0928\u0939\u0940\u0902 \u0915\u0941\u0932 ** \u0906\u0907\u091f\u092e ** ** \u0906\u0907\u091f\u092e \u0915\u0947 \u0938\u094d\u091f\u0949\u0915 \u0915\u094b \u092c\u0928\u093e\u090f \u0930\u0916\u0928\u0947. \u092a\u0948\u0915\u0947\u091c ** \u0906\u0907\u091f\u092e ** \u0939\u0948 "\u0938\u094d\u091f\u0949\u0915 \u0906\u0907\u091f\u092e \u0939\u0948" "\u0928\u0939\u0940\u0902" \u0915\u0947 \u0930\u0942\u092a \u092e\u0947\u0902 \u0914\u0930 \u0915\u0947 \u0930\u0942\u092a \u092e\u0947\u0902 "\u0939\u093e\u0901" "\u092c\u093f\u0915\u094d\u0930\u0940 \u0906\u0907\u091f\u092e \u0939\u0948," \u0909\u0926\u093e\u0939\u0930\u0923 \u0915\u0947 \u0932\u093f\u090f: \u092f\u0926\u093f \u0906\u092a \u0932\u0948\u092a\u091f\u0949\u092a \u0914\u0930 Backpacks \u092c\u0947\u091a \u0930\u0939\u0947 \u0939\u0948\u0902 \u0914\u0930 \u0905\u0932\u0917 \u0938\u0947 \u090f\u0915 \u0935\u093f\u0936\u0947\u0937 \u092e\u0942\u0932\u094d\u092f \u0939\u0948 \u0905\u0917\u0930 \u0917\u094d\u0930\u093e\u0939\u0915 \u0926\u094b\u0928\u094b\u0902 \u0916\u0930\u0940\u0926\u0924\u093e BOM = \u0935\u093f\u0927\u0947\u092f\u0915 \u0915\u0940 \u0938\u093e\u092e\u0917\u094d\u0930\u0940:, \u0924\u094b \u090f\u0915 \u0928\u092f\u093e \u0932\u0948\u092a\u091f\u0949\u092a + \u092c\u0948\u0917 \u092c\u093f\u0915\u094d\u0930\u0940 \u092c\u0940\u0913\u090f\u092e Item.Note \u0939\u094b\u0917\u093e",
|
||||
"Distinct unit of an Item": "\u090f\u0915 \u0906\u0907\u091f\u092e \u0915\u0940 \u0905\u0932\u0917 \u0907\u0915\u093e\u0908",
|
||||
"Featured Item in Item Group": "\u0906\u0907\u091f\u092e \u0938\u092e\u0942\u0939 \u092e\u0947\u0902 \u091a\u093f\u0924\u094d\u0930\u093f\u0924 \u0906\u0907\u091f\u092e",
|
||||
"For the convenience of customers, these codes can be used in print formats like Invoices and Delivery Notes": "\u0917\u094d\u0930\u093e\u0939\u0915\u094b\u0902 \u0915\u0940 \u0938\u0941\u0935\u093f\u0927\u093e \u0915\u0947 \u0932\u093f\u090f \u0907\u0928 \u0915\u094b\u0921 \u092a\u094d\u0930\u093f\u0902\u091f \u0938\u094d\u0935\u0930\u0942\u092a\u094b\u0902 \u092e\u0947\u0902 \u091a\u093e\u0932\u093e\u0928 \u0914\u0930 \u0935\u093f\u0924\u0930\u0923 \u0928\u094b\u091f \u0915\u0940 \u0924\u0930\u0939 \u0907\u0938\u094d\u0924\u0947\u092e\u093e\u0932 \u0915\u093f\u092f\u093e \u091c\u093e \u0938\u0915\u0924\u093e \u0939\u0948",
|
||||
"Generate packing slips for packages to be delivered. Used to notify package number, package contents and its weight.": "\u0926\u093f\u092f\u093e \u091c\u093e \u0938\u0902\u0915\u0941\u0932 \u0915\u0947 \u0932\u093f\u090f \u0928\u093f\u0915\u0932 \u091c\u093e\u0924\u093e \u0939\u0948 \u092a\u0948\u0915\u093f\u0902\u0917 \u0909\u0924\u094d\u092a\u0928\u094d\u0928 \u0915\u0930\u0924\u093e \u0939\u0948. \u092a\u0948\u0915\u0947\u091c \u0938\u0902\u0916\u094d\u092f\u093e, \u092a\u0948\u0915\u0947\u091c \u0938\u093e\u092e\u0917\u094d\u0930\u0940 \u0914\u0930 \u0905\u092a\u0928\u0947 \u0935\u091c\u0928 \u0915\u094b \u0938\u0942\u091a\u093f\u0924 \u0915\u0930\u0928\u0947 \u0915\u0947 \u0932\u093f\u090f \u0915\u093f\u092f\u093e \u091c\u093e\u0924\u093e \u0939\u0948.",
|
||||
"Item-Wise Price List": "\u0906\u0907\u091f\u092e \u0935\u093e\u0930 \u092e\u0942\u0932\u094d\u092f \u0938\u0942\u091a\u0940",
|
||||
"Ordered Items To Be Delivered": "\u0939\u093f\u0938\u093e\u092c \u0938\u0947 \u0926\u093f\u092f\u093e \u091c\u093e \u0906\u0907\u091f\u092e",
|
||||
"Stock Ageing": "\u0938\u094d\u091f\u0949\u0915 \u092c\u0942\u0922\u093c\u0947",
|
||||
"Stock Analytics": "\u0938\u094d\u091f\u0949\u0915 \u0935\u093f\u0936\u094d\u0932\u0947\u0937\u093f\u0915\u0940",
|
||||
"Stock Balance": "\u092c\u093e\u0915\u0940 \u0938\u094d\u091f\u093e\u0915",
|
||||
"Stock Home": "\u0938\u094d\u091f\u0949\u0915 \u0939\u094b\u092e",
|
||||
"Stock Ledger": "\u0938\u094d\u091f\u0949\u0915 \u0932\u0947\u091c\u0930",
|
||||
"Stock Level": "\u0938\u094d\u091f\u0949\u0915 \u0938\u094d\u0924\u0930",
|
||||
"Table for Item that will be shown in Web Site": "\u091f\u0947\u092c\u0932 \u0906\u0907\u091f\u092e \u0915\u0947 \u0932\u093f\u090f \u0939\u0948 \u0915\u093f \u0935\u0947\u092c \u0938\u093e\u0907\u091f \u092e\u0947\u0902 \u0926\u093f\u0916\u093e\u092f\u093e \u091c\u093e\u090f\u0917\u093e"
|
||||
}
|
||||
@@ -54,16 +54,13 @@ def update_entries_after(args, verbose=1):
|
||||
if not validate_negative_stock(qty_after_transaction, sle):
|
||||
qty_after_transaction += flt(sle.actual_qty)
|
||||
continue
|
||||
|
||||
|
||||
if sle.serial_no:
|
||||
valuation_rate = get_serialized_values(qty_after_transaction, sle,
|
||||
valuation_rate)
|
||||
valuation_rate = get_serialized_values(qty_after_transaction, sle, valuation_rate)
|
||||
elif valuation_method == "Moving Average":
|
||||
valuation_rate = get_moving_average_values(qty_after_transaction, sle,
|
||||
valuation_rate)
|
||||
valuation_rate = get_moving_average_values(qty_after_transaction, sle, valuation_rate)
|
||||
else:
|
||||
valuation_rate = get_fifo_values(qty_after_transaction, sle,
|
||||
stock_queue)
|
||||
valuation_rate = get_fifo_values(qty_after_transaction, sle, stock_queue)
|
||||
|
||||
qty_after_transaction += flt(sle.actual_qty)
|
||||
|
||||
|
||||
@@ -111,7 +111,7 @@ def get_fifo_rate(previous_stock_queue, qty):
|
||||
else:
|
||||
outgoing_cost = 0
|
||||
qty_to_pop = abs(qty)
|
||||
while qty_to_pop:
|
||||
while qty_to_pop and previous_stock_queue:
|
||||
batch = previous_stock_queue[0]
|
||||
if 0 < batch[0] <= qty_to_pop:
|
||||
# if batch qty > 0
|
||||
@@ -124,8 +124,8 @@ def get_fifo_rate(previous_stock_queue, qty):
|
||||
outgoing_cost += flt(qty_to_pop) * flt(batch[1])
|
||||
batch[0] -= qty_to_pop
|
||||
qty_to_pop = 0
|
||||
|
||||
return outgoing_cost / abs(qty)
|
||||
# if queue gets blank and qty_to_pop remaining, get average rate of full queue
|
||||
return outgoing_cost / abs(qty) - qty_to_pop
|
||||
|
||||
def get_valid_serial_nos(sr_nos, qty=0, item_code=''):
|
||||
"""split serial nos, validate and return list of valid serial nos"""
|
||||
|
||||
Reference in New Issue
Block a user