Fetch actual stock and rate in stock entry as per fifo
This commit is contained in:
parent
daa7c74d3e
commit
f940ef7ada
@ -16,7 +16,6 @@ convert_to_lists = webnotes.conn.convert_to_lists
|
||||
|
||||
# -----------------------------------------------------------------------------------------
|
||||
|
||||
|
||||
class DocType:
|
||||
def __init__(self, doc, doclist=[]):
|
||||
self.doc = doc
|
||||
@ -59,6 +58,7 @@ class DocType:
|
||||
|
||||
|
||||
# Get UOM Details
|
||||
# ----------------
|
||||
def get_uom_details(self, arg = ''):
|
||||
arg, ret = eval(arg), {}
|
||||
uom = sql("select conversion_factor from `tabUOM Conversion Detail` where parent = %s and uom = %s", (arg['item_code'],arg['uom']), as_dict = 1)
|
||||
@ -252,7 +252,7 @@ class DocType:
|
||||
self.validate_for_production_order(pro_obj)
|
||||
self.validate_incoming_rate()
|
||||
self.validate_warehouse(pro_obj)
|
||||
self.get_current_stock(pro_obj.doc.bom_no)
|
||||
self.get_stock_and_rate(pro_obj and pro_obj.doc.bom_no or '')
|
||||
self.calc_amount()
|
||||
get_obj('Sales Common').validate_fiscal_year(self.doc.fiscal_year,self.doc.posting_date,'Posting Date')
|
||||
|
||||
|
@ -1,6 +1,6 @@
|
||||
[
|
||||
{
|
||||
'_last_update': '1301989672',
|
||||
'_last_update': '1308034183',
|
||||
'allow_attach': None,
|
||||
'allow_copy': None,
|
||||
'allow_email': None,
|
||||
@ -29,7 +29,7 @@
|
||||
'istable': None,
|
||||
'max_attachments': None,
|
||||
'menu_index': None,
|
||||
'modified': '2011-05-19 09:46:27',
|
||||
'modified': '2011-06-14 12:50:12',
|
||||
'modified_by': 'Administrator',
|
||||
'module': 'Material Management',
|
||||
'name': 'Stock Entry',
|
||||
@ -50,10 +50,10 @@
|
||||
'server_code_error': ' ',
|
||||
'show_in_menu': 0,
|
||||
'smallicon': None,
|
||||
'subject': 'eval:"%(remarks)s | " + ("%(from_warehouse)s" ? "From %(from_warehouse)s" : "") + ("%(to_warehouse)s" ? "To %(to_warehouse)s" : "")',
|
||||
'subject': '%(remarks)s',
|
||||
'tag_fields': 'purpose',
|
||||
'use_template': None,
|
||||
'version': 227
|
||||
'version': 243
|
||||
},
|
||||
{
|
||||
'amend': 1,
|
||||
@ -65,7 +65,7 @@
|
||||
'execute': None,
|
||||
'idx': 1,
|
||||
'match': None,
|
||||
'modified': '2011-05-19 09:46:27',
|
||||
'modified': '2011-06-14 12:50:12',
|
||||
'modified_by': 'Administrator',
|
||||
'name': 'PERM00541',
|
||||
'owner': 'Administrator',
|
||||
@ -88,7 +88,7 @@
|
||||
'execute': None,
|
||||
'idx': 2,
|
||||
'match': None,
|
||||
'modified': '2011-05-19 09:46:27',
|
||||
'modified': '2011-06-14 12:50:12',
|
||||
'modified_by': 'Administrator',
|
||||
'name': 'PERM00542',
|
||||
'owner': 'Administrator',
|
||||
@ -111,7 +111,7 @@
|
||||
'execute': None,
|
||||
'idx': 3,
|
||||
'match': None,
|
||||
'modified': '2011-05-19 09:46:27',
|
||||
'modified': '2011-06-14 12:50:12',
|
||||
'modified_by': 'Administrator',
|
||||
'name': 'PERM00543',
|
||||
'owner': 'Administrator',
|
||||
@ -134,7 +134,7 @@
|
||||
'execute': None,
|
||||
'idx': 4,
|
||||
'match': None,
|
||||
'modified': '2011-05-19 09:46:27',
|
||||
'modified': '2011-06-14 12:50:12',
|
||||
'modified_by': 'Administrator',
|
||||
'name': 'PERM00544',
|
||||
'owner': 'Administrator',
|
||||
@ -157,7 +157,7 @@
|
||||
'execute': None,
|
||||
'idx': 5,
|
||||
'match': None,
|
||||
'modified': '2011-05-19 09:46:27',
|
||||
'modified': '2011-06-14 12:50:12',
|
||||
'modified_by': 'Administrator',
|
||||
'name': 'PERM00545',
|
||||
'owner': 'jai@webnotestech.com',
|
||||
@ -180,7 +180,7 @@
|
||||
'execute': None,
|
||||
'idx': 6,
|
||||
'match': None,
|
||||
'modified': '2011-05-19 09:46:27',
|
||||
'modified': '2011-06-14 12:50:12',
|
||||
'modified_by': 'Administrator',
|
||||
'name': 'PERM00546',
|
||||
'owner': 'jai@webnotestech.com',
|
||||
@ -203,7 +203,7 @@
|
||||
'execute': None,
|
||||
'idx': 7,
|
||||
'match': None,
|
||||
'modified': '2011-05-19 09:46:27',
|
||||
'modified': '2011-06-14 12:50:12',
|
||||
'modified_by': 'Administrator',
|
||||
'name': 'PERM00547',
|
||||
'owner': 'jai@webnotestech.com',
|
||||
@ -226,7 +226,7 @@
|
||||
'execute': None,
|
||||
'idx': 8,
|
||||
'match': None,
|
||||
'modified': '2011-05-19 09:46:27',
|
||||
'modified': '2011-06-14 12:50:12',
|
||||
'modified_by': 'Administrator',
|
||||
'name': 'PERM00548',
|
||||
'owner': 'jai@webnotestech.com',
|
||||
@ -249,7 +249,7 @@
|
||||
'execute': None,
|
||||
'idx': 9,
|
||||
'match': None,
|
||||
'modified': '2011-05-19 09:46:27',
|
||||
'modified': '2011-06-14 12:50:12',
|
||||
'modified_by': 'Administrator',
|
||||
'name': 'PERM00549',
|
||||
'owner': 'jai@webnotestech.com',
|
||||
@ -272,7 +272,7 @@
|
||||
'execute': None,
|
||||
'idx': 10,
|
||||
'match': None,
|
||||
'modified': '2011-05-19 09:46:27',
|
||||
'modified': '2011-06-14 12:50:12',
|
||||
'modified_by': 'Administrator',
|
||||
'name': 'PERM00550',
|
||||
'owner': 'jai@webnotestech.com',
|
||||
@ -301,7 +301,7 @@
|
||||
'idx': 1,
|
||||
'in_filter': None,
|
||||
'label': 'Warehouse',
|
||||
'modified': '2011-05-19 09:46:27',
|
||||
'modified': '2011-06-14 12:50:12',
|
||||
'modified_by': 'Administrator',
|
||||
'name': 'FL03366',
|
||||
'no_column': None,
|
||||
@ -337,7 +337,7 @@
|
||||
'idx': 2,
|
||||
'in_filter': None,
|
||||
'label': None,
|
||||
'modified': '2011-05-19 09:46:27',
|
||||
'modified': '2011-06-14 12:50:12',
|
||||
'modified_by': 'Administrator',
|
||||
'name': 'FL03367',
|
||||
'no_column': None,
|
||||
@ -361,7 +361,7 @@
|
||||
'allow_on_submit': None,
|
||||
'colour': 'White:FFF',
|
||||
'creation': '2010-08-08 17:09:25',
|
||||
'default': 'STE',
|
||||
'default': None,
|
||||
'depends_on': None,
|
||||
'description': 'To manage multiple series please go to Setup > Manage Series',
|
||||
'docstatus': 0,
|
||||
@ -373,7 +373,7 @@
|
||||
'idx': 3,
|
||||
'in_filter': None,
|
||||
'label': 'Series',
|
||||
'modified': '2011-05-19 09:46:27',
|
||||
'modified': '2011-06-14 12:50:12',
|
||||
'modified_by': 'Administrator',
|
||||
'name': 'FL03368',
|
||||
'no_column': None,
|
||||
@ -409,7 +409,7 @@
|
||||
'idx': 4,
|
||||
'in_filter': None,
|
||||
'label': 'Amendment Date',
|
||||
'modified': '2011-05-19 09:46:27',
|
||||
'modified': '2011-06-14 12:50:12',
|
||||
'modified_by': 'Administrator',
|
||||
'name': 'FL03369',
|
||||
'no_column': None,
|
||||
@ -445,7 +445,7 @@
|
||||
'idx': 5,
|
||||
'in_filter': 1,
|
||||
'label': 'Purpose',
|
||||
'modified': '2011-05-19 09:46:27',
|
||||
'modified': '2011-06-14 12:50:12',
|
||||
'modified_by': 'Administrator',
|
||||
'name': 'FL03370',
|
||||
'no_column': None,
|
||||
@ -481,7 +481,7 @@
|
||||
'idx': 6,
|
||||
'in_filter': None,
|
||||
'label': 'Delivery Note No',
|
||||
'modified': '2011-05-19 09:46:27',
|
||||
'modified': '2011-06-14 12:50:12',
|
||||
'modified_by': 'Administrator',
|
||||
'name': 'FL03371',
|
||||
'no_column': None,
|
||||
@ -517,7 +517,7 @@
|
||||
'idx': 7,
|
||||
'in_filter': None,
|
||||
'label': 'Purchase Receipt No',
|
||||
'modified': '2011-05-19 09:46:27',
|
||||
'modified': '2011-06-14 12:50:12',
|
||||
'modified_by': 'Administrator',
|
||||
'name': 'FL03372',
|
||||
'no_column': None,
|
||||
@ -540,7 +540,7 @@
|
||||
{
|
||||
'allow_on_submit': None,
|
||||
'colour': None,
|
||||
'creation': '2011-02-04 17:22:22',
|
||||
'creation': '2011-02-01 14:10:05',
|
||||
'default': None,
|
||||
'depends_on': None,
|
||||
'description': None,
|
||||
@ -553,9 +553,9 @@
|
||||
'idx': 8,
|
||||
'in_filter': None,
|
||||
'label': 'Sales Invoice No',
|
||||
'modified': '2011-05-19 09:46:27',
|
||||
'modified': '2011-06-14 12:50:12',
|
||||
'modified_by': 'Administrator',
|
||||
'name': 'FL04499',
|
||||
'name': 'FL04464',
|
||||
'no_column': None,
|
||||
'no_copy': None,
|
||||
'oldfieldname': None,
|
||||
@ -589,7 +589,7 @@
|
||||
'idx': 9,
|
||||
'in_filter': None,
|
||||
'label': 'Supplier',
|
||||
'modified': '2011-05-19 09:46:27',
|
||||
'modified': '2011-06-14 12:50:12',
|
||||
'modified_by': 'Administrator',
|
||||
'name': 'FL03373',
|
||||
'no_column': None,
|
||||
@ -612,7 +612,7 @@
|
||||
{
|
||||
'allow_on_submit': None,
|
||||
'colour': None,
|
||||
'creation': '2010-09-01 15:47:54',
|
||||
'creation': '2010-09-01 15:48:04',
|
||||
'default': None,
|
||||
'depends_on': None,
|
||||
'description': None,
|
||||
@ -625,9 +625,9 @@
|
||||
'idx': 10,
|
||||
'in_filter': None,
|
||||
'label': 'Supplier Name',
|
||||
'modified': '2011-05-19 09:46:27',
|
||||
'modified': '2011-06-14 12:50:12',
|
||||
'modified_by': 'Administrator',
|
||||
'name': 'FL03788',
|
||||
'name': 'FL03800',
|
||||
'no_column': None,
|
||||
'no_copy': None,
|
||||
'oldfieldname': 'supplier_name',
|
||||
@ -661,7 +661,7 @@
|
||||
'idx': 11,
|
||||
'in_filter': None,
|
||||
'label': 'Supplier Address',
|
||||
'modified': '2011-05-19 09:46:27',
|
||||
'modified': '2011-06-14 12:50:12',
|
||||
'modified_by': 'Administrator',
|
||||
'name': 'FL03374',
|
||||
'no_column': None,
|
||||
@ -697,7 +697,7 @@
|
||||
'idx': 12,
|
||||
'in_filter': None,
|
||||
'label': 'Customer',
|
||||
'modified': '2011-05-19 09:46:27',
|
||||
'modified': '2011-06-14 12:50:12',
|
||||
'modified_by': 'Administrator',
|
||||
'name': 'FL03375',
|
||||
'no_column': None,
|
||||
@ -720,7 +720,7 @@
|
||||
{
|
||||
'allow_on_submit': None,
|
||||
'colour': None,
|
||||
'creation': '2010-09-01 15:47:54',
|
||||
'creation': '2010-09-01 15:48:04',
|
||||
'default': None,
|
||||
'depends_on': None,
|
||||
'description': None,
|
||||
@ -733,9 +733,9 @@
|
||||
'idx': 13,
|
||||
'in_filter': None,
|
||||
'label': 'Customer Name',
|
||||
'modified': '2011-05-19 09:46:27',
|
||||
'modified': '2011-06-14 12:50:12',
|
||||
'modified_by': 'Administrator',
|
||||
'name': 'FL03789',
|
||||
'name': 'FL03801',
|
||||
'no_column': None,
|
||||
'no_copy': None,
|
||||
'oldfieldname': 'customer_name',
|
||||
@ -769,7 +769,7 @@
|
||||
'idx': 14,
|
||||
'in_filter': None,
|
||||
'label': 'Customer Address',
|
||||
'modified': '2011-05-19 09:46:27',
|
||||
'modified': '2011-06-14 12:50:12',
|
||||
'modified_by': 'Administrator',
|
||||
'name': 'FL03376',
|
||||
'no_column': None,
|
||||
@ -805,7 +805,7 @@
|
||||
'idx': 15,
|
||||
'in_filter': 1,
|
||||
'label': 'Process',
|
||||
'modified': '2011-05-19 09:46:27',
|
||||
'modified': '2011-06-14 12:50:12',
|
||||
'modified_by': 'Administrator',
|
||||
'name': 'FL03377',
|
||||
'no_column': None,
|
||||
@ -841,7 +841,7 @@
|
||||
'idx': 16,
|
||||
'in_filter': 1,
|
||||
'label': 'Production Order',
|
||||
'modified': '2011-05-19 09:46:27',
|
||||
'modified': '2011-06-14 12:50:12',
|
||||
'modified_by': 'Administrator',
|
||||
'name': 'FL03378',
|
||||
'no_column': None,
|
||||
@ -877,7 +877,7 @@
|
||||
'idx': 17,
|
||||
'in_filter': None,
|
||||
'label': 'FG Completed Qty',
|
||||
'modified': '2011-05-19 09:46:27',
|
||||
'modified': '2011-06-14 12:50:12',
|
||||
'modified_by': 'Administrator',
|
||||
'name': 'FL03379',
|
||||
'no_column': None,
|
||||
@ -913,7 +913,7 @@
|
||||
'idx': 18,
|
||||
'in_filter': None,
|
||||
'label': 'Warehouse HTML',
|
||||
'modified': '2011-05-19 09:46:27',
|
||||
'modified': '2011-06-14 12:50:12',
|
||||
'modified_by': 'Administrator',
|
||||
'name': 'FL03380',
|
||||
'no_column': None,
|
||||
@ -949,7 +949,7 @@
|
||||
'idx': 19,
|
||||
'in_filter': None,
|
||||
'label': 'Source Warehouse',
|
||||
'modified': '2011-05-19 09:46:27',
|
||||
'modified': '2011-06-14 12:50:12',
|
||||
'modified_by': 'Administrator',
|
||||
'name': 'FL03381',
|
||||
'no_column': None,
|
||||
@ -985,7 +985,7 @@
|
||||
'idx': 20,
|
||||
'in_filter': 0,
|
||||
'label': 'Target Warehouse',
|
||||
'modified': '2011-05-19 09:46:27',
|
||||
'modified': '2011-06-14 12:50:12',
|
||||
'modified_by': 'Administrator',
|
||||
'name': 'FL03382',
|
||||
'no_column': None,
|
||||
@ -1005,42 +1005,6 @@
|
||||
'trigger': 'Client',
|
||||
'width': None
|
||||
},
|
||||
{
|
||||
'allow_on_submit': None,
|
||||
'colour': None,
|
||||
'creation': '2010-12-14 10:33:05',
|
||||
'default': None,
|
||||
'depends_on': None,
|
||||
'description': None,
|
||||
'docstatus': 0,
|
||||
'doctype': 'DocField',
|
||||
'fieldname': 'project_name',
|
||||
'fieldtype': 'Link',
|
||||
'hidden': None,
|
||||
'icon': None,
|
||||
'idx': 21,
|
||||
'in_filter': 1,
|
||||
'label': 'Project Name',
|
||||
'modified': '2011-05-19 09:46:27',
|
||||
'modified_by': 'Administrator',
|
||||
'name': 'FL04203',
|
||||
'no_column': None,
|
||||
'no_copy': None,
|
||||
'oldfieldname': 'project_name',
|
||||
'oldfieldtype': 'Link',
|
||||
'options': 'Project',
|
||||
'owner': 'ashwini@webnotestech.com',
|
||||
'parent': 'Stock Entry',
|
||||
'parentfield': 'fields',
|
||||
'parenttype': 'DocType',
|
||||
'permlevel': 0,
|
||||
'print_hide': None,
|
||||
'report_hide': None,
|
||||
'reqd': None,
|
||||
'search_index': None,
|
||||
'trigger': None,
|
||||
'width': None
|
||||
},
|
||||
{
|
||||
'allow_on_submit': None,
|
||||
'colour': None,
|
||||
@ -1054,10 +1018,10 @@
|
||||
'fieldtype': 'Column Break',
|
||||
'hidden': None,
|
||||
'icon': None,
|
||||
'idx': 22,
|
||||
'idx': 21,
|
||||
'in_filter': None,
|
||||
'label': None,
|
||||
'modified': '2011-05-19 09:46:27',
|
||||
'modified': '2011-06-14 12:50:12',
|
||||
'modified_by': 'Administrator',
|
||||
'name': 'FL03383',
|
||||
'no_column': None,
|
||||
@ -1090,10 +1054,10 @@
|
||||
'fieldtype': 'Date',
|
||||
'hidden': None,
|
||||
'icon': None,
|
||||
'idx': 23,
|
||||
'idx': 22,
|
||||
'in_filter': 1,
|
||||
'label': 'Transfer Date',
|
||||
'modified': '2011-05-19 09:46:27',
|
||||
'modified': '2011-06-14 12:50:12',
|
||||
'modified_by': 'Administrator',
|
||||
'name': 'FL03384',
|
||||
'no_column': None,
|
||||
@ -1126,10 +1090,10 @@
|
||||
'fieldtype': 'Date',
|
||||
'hidden': None,
|
||||
'icon': None,
|
||||
'idx': 24,
|
||||
'idx': 23,
|
||||
'in_filter': 1,
|
||||
'label': 'Posting Date',
|
||||
'modified': '2011-05-19 09:46:27',
|
||||
'modified': '2011-06-14 12:50:12',
|
||||
'modified_by': 'Administrator',
|
||||
'name': 'FL03385',
|
||||
'no_column': None,
|
||||
@ -1162,10 +1126,10 @@
|
||||
'fieldtype': 'Time',
|
||||
'hidden': None,
|
||||
'icon': None,
|
||||
'idx': 25,
|
||||
'idx': 24,
|
||||
'in_filter': 0,
|
||||
'label': 'Posting Time',
|
||||
'modified': '2011-05-19 09:46:27',
|
||||
'modified': '2011-06-14 12:50:12',
|
||||
'modified_by': 'Administrator',
|
||||
'name': 'FL03386',
|
||||
'no_column': None,
|
||||
@ -1198,10 +1162,10 @@
|
||||
'fieldtype': 'Link',
|
||||
'hidden': None,
|
||||
'icon': None,
|
||||
'idx': 26,
|
||||
'idx': 25,
|
||||
'in_filter': None,
|
||||
'label': 'Amended From',
|
||||
'modified': '2011-05-19 09:46:27',
|
||||
'modified': '2011-06-14 12:50:12',
|
||||
'modified_by': 'Administrator',
|
||||
'name': 'FL03387',
|
||||
'no_column': None,
|
||||
@ -1234,10 +1198,10 @@
|
||||
'fieldtype': 'Data',
|
||||
'hidden': None,
|
||||
'icon': None,
|
||||
'idx': 27,
|
||||
'idx': 26,
|
||||
'in_filter': None,
|
||||
'label': 'Transporter',
|
||||
'modified': '2011-05-19 09:46:27',
|
||||
'modified': '2011-06-14 12:50:12',
|
||||
'modified_by': 'Administrator',
|
||||
'name': 'FL03388',
|
||||
'no_column': None,
|
||||
@ -1270,10 +1234,10 @@
|
||||
'fieldtype': 'Select',
|
||||
'hidden': None,
|
||||
'icon': None,
|
||||
'idx': 28,
|
||||
'idx': 27,
|
||||
'in_filter': None,
|
||||
'label': 'Is Excisable Goods',
|
||||
'modified': '2011-05-19 09:46:27',
|
||||
'modified': '2011-06-14 12:50:12',
|
||||
'modified_by': 'Administrator',
|
||||
'name': 'FL03389',
|
||||
'no_column': None,
|
||||
@ -1306,10 +1270,10 @@
|
||||
'fieldtype': 'Select',
|
||||
'hidden': None,
|
||||
'icon': None,
|
||||
'idx': 29,
|
||||
'idx': 28,
|
||||
'in_filter': None,
|
||||
'label': 'Excisable Goods',
|
||||
'modified': '2011-05-19 09:46:27',
|
||||
'modified': '2011-06-14 12:50:12',
|
||||
'modified_by': 'Administrator',
|
||||
'name': 'FL03390',
|
||||
'no_column': None,
|
||||
@ -1342,10 +1306,10 @@
|
||||
'fieldtype': 'Select',
|
||||
'hidden': 1,
|
||||
'icon': None,
|
||||
'idx': 30,
|
||||
'idx': 29,
|
||||
'in_filter': None,
|
||||
'label': 'Under Rule',
|
||||
'modified': '2011-05-19 09:46:27',
|
||||
'modified': '2011-06-14 12:50:12',
|
||||
'modified_by': 'Administrator',
|
||||
'name': 'FL03391',
|
||||
'no_column': None,
|
||||
@ -1378,10 +1342,10 @@
|
||||
'fieldtype': 'Text',
|
||||
'hidden': None,
|
||||
'icon': None,
|
||||
'idx': 31,
|
||||
'idx': 30,
|
||||
'in_filter': None,
|
||||
'label': 'Remarks',
|
||||
'modified': '2011-05-19 09:46:27',
|
||||
'modified': '2011-06-14 12:50:12',
|
||||
'modified_by': 'Administrator',
|
||||
'name': 'FL03392',
|
||||
'no_column': None,
|
||||
@ -1414,10 +1378,10 @@
|
||||
'fieldtype': 'Data',
|
||||
'hidden': 1,
|
||||
'icon': None,
|
||||
'idx': 32,
|
||||
'idx': 31,
|
||||
'in_filter': 0,
|
||||
'label': 'Cancel Reason',
|
||||
'modified': '2011-05-19 09:46:27',
|
||||
'modified': '2011-06-14 12:50:12',
|
||||
'modified_by': 'Administrator',
|
||||
'name': 'FL03393',
|
||||
'no_column': None,
|
||||
@ -1450,10 +1414,10 @@
|
||||
'fieldtype': 'Section Break',
|
||||
'hidden': None,
|
||||
'icon': None,
|
||||
'idx': 33,
|
||||
'idx': 32,
|
||||
'in_filter': None,
|
||||
'label': 'Items',
|
||||
'modified': '2011-05-19 09:46:27',
|
||||
'modified': '2011-06-14 12:50:12',
|
||||
'modified_by': 'Administrator',
|
||||
'name': 'FL03394',
|
||||
'no_column': None,
|
||||
@ -1486,17 +1450,17 @@
|
||||
'fieldtype': 'Button',
|
||||
'hidden': None,
|
||||
'icon': None,
|
||||
'idx': 34,
|
||||
'idx': 33,
|
||||
'in_filter': None,
|
||||
'label': 'Get Current Stock',
|
||||
'modified': '2011-05-19 09:46:27',
|
||||
'label': 'Get Stock and Rate',
|
||||
'modified': '2011-06-14 12:50:12',
|
||||
'modified_by': 'Administrator',
|
||||
'name': 'FL03395',
|
||||
'no_column': None,
|
||||
'no_copy': None,
|
||||
'oldfieldname': None,
|
||||
'oldfieldtype': 'Button',
|
||||
'options': 'get_current_stock',
|
||||
'options': 'get_stock_and_rate',
|
||||
'owner': 'Administrator',
|
||||
'parent': 'Stock Entry',
|
||||
'parentfield': 'fields',
|
||||
@ -1522,10 +1486,10 @@
|
||||
'fieldtype': 'Column Break',
|
||||
'hidden': None,
|
||||
'icon': None,
|
||||
'idx': 35,
|
||||
'idx': 34,
|
||||
'in_filter': None,
|
||||
'label': None,
|
||||
'modified': '2011-05-19 09:46:27',
|
||||
'modified': '2011-06-14 12:50:12',
|
||||
'modified_by': 'Administrator',
|
||||
'name': 'FL03396',
|
||||
'no_column': None,
|
||||
@ -1558,10 +1522,10 @@
|
||||
'fieldtype': 'Button',
|
||||
'hidden': 0,
|
||||
'icon': None,
|
||||
'idx': 36,
|
||||
'idx': 35,
|
||||
'in_filter': None,
|
||||
'label': 'Get Items',
|
||||
'modified': '2011-05-19 09:46:27',
|
||||
'modified': '2011-06-14 12:50:12',
|
||||
'modified_by': 'Administrator',
|
||||
'name': 'FL03397',
|
||||
'no_column': None,
|
||||
@ -1594,10 +1558,10 @@
|
||||
'fieldtype': 'Section Break',
|
||||
'hidden': None,
|
||||
'icon': None,
|
||||
'idx': 37,
|
||||
'idx': 36,
|
||||
'in_filter': None,
|
||||
'label': None,
|
||||
'modified': '2011-05-19 09:46:27',
|
||||
'modified': '2011-06-14 12:50:12',
|
||||
'modified_by': 'Administrator',
|
||||
'name': 'FL03398',
|
||||
'no_column': None,
|
||||
@ -1630,10 +1594,10 @@
|
||||
'fieldtype': 'Table',
|
||||
'hidden': None,
|
||||
'icon': None,
|
||||
'idx': 38,
|
||||
'idx': 37,
|
||||
'in_filter': None,
|
||||
'label': 'MTN Details',
|
||||
'modified': '2011-05-19 09:46:27',
|
||||
'modified': '2011-06-14 12:50:12',
|
||||
'modified_by': 'Administrator',
|
||||
'name': 'FL03399',
|
||||
'no_column': None,
|
||||
@ -1666,10 +1630,10 @@
|
||||
'fieldtype': 'Currency',
|
||||
'hidden': None,
|
||||
'icon': None,
|
||||
'idx': 39,
|
||||
'idx': 38,
|
||||
'in_filter': None,
|
||||
'label': 'Total Amount',
|
||||
'modified': '2011-05-19 09:46:27',
|
||||
'modified': '2011-06-14 12:50:12',
|
||||
'modified_by': 'Administrator',
|
||||
'name': 'FL03400',
|
||||
'no_column': None,
|
||||
@ -1702,10 +1666,10 @@
|
||||
'fieldtype': 'Section Break',
|
||||
'hidden': None,
|
||||
'icon': None,
|
||||
'idx': 40,
|
||||
'idx': 39,
|
||||
'in_filter': None,
|
||||
'label': 'Other Details',
|
||||
'modified': '2011-05-19 09:46:27',
|
||||
'modified': '2011-06-14 12:50:12',
|
||||
'modified_by': 'Administrator',
|
||||
'name': 'FL03401',
|
||||
'no_column': None,
|
||||
@ -1738,10 +1702,10 @@
|
||||
'fieldtype': 'Link',
|
||||
'hidden': None,
|
||||
'icon': None,
|
||||
'idx': 41,
|
||||
'idx': 40,
|
||||
'in_filter': 1,
|
||||
'label': 'Company',
|
||||
'modified': '2011-05-19 09:46:27',
|
||||
'modified': '2011-06-14 12:50:12',
|
||||
'modified_by': 'Administrator',
|
||||
'name': 'FL03402',
|
||||
'no_column': None,
|
||||
@ -1774,10 +1738,10 @@
|
||||
'fieldtype': 'Select',
|
||||
'hidden': None,
|
||||
'icon': None,
|
||||
'idx': 42,
|
||||
'idx': 41,
|
||||
'in_filter': 0,
|
||||
'label': 'Fiscal Year',
|
||||
'modified': '2011-05-19 09:46:27',
|
||||
'modified': '2011-06-14 12:50:12',
|
||||
'modified_by': 'Administrator',
|
||||
'name': 'FL03403',
|
||||
'no_column': None,
|
||||
@ -1800,7 +1764,7 @@
|
||||
{
|
||||
'allow_on_submit': None,
|
||||
'colour': None,
|
||||
'creation': '2010-08-19 11:08:48',
|
||||
'creation': '2010-08-19 11:08:49',
|
||||
'default': None,
|
||||
'depends_on': None,
|
||||
'description': None,
|
||||
@ -1810,12 +1774,12 @@
|
||||
'fieldtype': 'Link',
|
||||
'hidden': None,
|
||||
'icon': None,
|
||||
'idx': 43,
|
||||
'idx': 42,
|
||||
'in_filter': None,
|
||||
'label': 'Select Print Heading',
|
||||
'modified': '2011-05-19 09:46:27',
|
||||
'modified': '2011-06-14 12:50:12',
|
||||
'modified_by': 'Administrator',
|
||||
'name': 'FL03754',
|
||||
'name': 'FL03766',
|
||||
'no_column': None,
|
||||
'no_copy': None,
|
||||
'oldfieldname': 'select_print_heading',
|
||||
|
@ -69,7 +69,6 @@ class DocType:
|
||||
in_rate = 0
|
||||
val_method = self.get_valuation_method(item)
|
||||
bin_obj = get_obj('Warehouse',warehouse).get_bin(item)
|
||||
|
||||
if serial_no:
|
||||
in_rate = self.get_serializable_inventory_rate(serial_no)
|
||||
elif val_method == 'FIFO':
|
||||
@ -77,7 +76,7 @@ class DocType:
|
||||
if qty:
|
||||
prev_sle = bin_obj.get_prev_sle(posting_date, posting_time)
|
||||
fcfs_stack = eval(prev_sle.get('fcfs_stack', '[]') or '[]')
|
||||
in_rate = fcfs_stack and self.get_fifo_rate(fcfs_stack, qty) or 0
|
||||
in_rate = fcfs_stack and self.get_fifo_rate(fcfs_stack, qty) or 0
|
||||
elif val_method == 'Moving Average':
|
||||
prev_sle = bin_obj.get_prev_sle(posting_date, posting_time)
|
||||
in_rate = prev_sle and prev_sle.get('valuation_rate', 0) or 0
|
||||
|
Loading…
x
Reference in New Issue
Block a user