fixed conflict
This commit is contained in:
commit
e72ae2a19b
@ -16,8 +16,8 @@
|
|||||||
|
|
||||||
report.customize_filters = function() {
|
report.customize_filters = function() {
|
||||||
this.hide_all_filters();
|
this.hide_all_filters();
|
||||||
filter_list = ['From Voucher Date', 'To Voucher Date', 'Debit To', 'From Posting Date', 'To Posting Date']
|
filter_list = ['Debit To', 'From Posting Date', 'To Posting Date']
|
||||||
for(var i=0;i<filter_list.length;i++)
|
for(var i=0;i<filter_list.length;i++)
|
||||||
this.filter_fields_dict['Receivable Voucher'+FILTER_SEP +filter_list[i]].df.filter_hide = 0;
|
this.filter_fields_dict['Receivable Voucher'+FILTER_SEP +filter_list[i]].df.filter_hide = 0;
|
||||||
|
|
||||||
this.filter_fields_dict['RV Detail'+FILTER_SEP +'Item'].df.filter_hide = 0;
|
this.filter_fields_dict['RV Detail'+FILTER_SEP +'Item'].df.filter_hide = 0;
|
||||||
|
@ -368,11 +368,9 @@ cur_frm.cscript.calc_amount = function(doc, n) {
|
|||||||
|
|
||||||
tmp[rate_fld] = flt( flt(cl[i].purchase_ref_rate) - flt(flt(cl[i].purchase_ref_rate)*flt(cl[i].discount_rate)/100) )
|
tmp[rate_fld] = flt( flt(cl[i].purchase_ref_rate) - flt(flt(cl[i].purchase_ref_rate)*flt(cl[i].discount_rate)/100) )
|
||||||
set_multiple(tname, cl[i].name, tmp, fname);
|
set_multiple(tname, cl[i].name, tmp, fname);
|
||||||
msgprint(cl[i][rate_fld])
|
|
||||||
set_multiple(tname, cl[i].name, {'import_rate': flt(flt(cl[i][rate_fld]) / flt(doc.conversion_rate))}, fname);
|
set_multiple(tname, cl[i].name, {'import_rate': flt(flt(cl[i][rate_fld]) / flt(doc.conversion_rate))}, fname);
|
||||||
set_multiple(tname, cl[i].name, {'amount':flt(flt(cl[i].qty) * flt(cl[i][rate_fld]))}, fname);
|
set_multiple(tname, cl[i].name, {'amount':flt(flt(cl[i].qty) * flt(cl[i][rate_fld]))}, fname);
|
||||||
set_multiple(tname, cl[i].name, {'import_amount': flt(flt(cl[i].qty) * flt(cl[i][rate_fld]) / flt(doc.conversion_rate))}, fname);
|
set_multiple(tname, cl[i].name, {'import_amount': flt(flt(cl[i].qty) * flt(cl[i][rate_fld]) / flt(doc.conversion_rate))}, fname);
|
||||||
msgprint(cl[i]['amount'])
|
|
||||||
}else if( n==5){
|
}else if( n==5){
|
||||||
tmp[rate_fld] = flt( flt(cl[i].import_ref_rate) - flt(flt(cl[i].import_ref_rate)*flt(cl[i].discount_rate)/100) ) * flt(doc.conversion_rate);
|
tmp[rate_fld] = flt( flt(cl[i].import_ref_rate) - flt(flt(cl[i].import_ref_rate)*flt(cl[i].discount_rate)/100) ) * flt(doc.conversion_rate);
|
||||||
set_multiple(tname, cl[i].name, {'purchase_ref_rate': flt(flt(cl[i].import_ref_rate) * flt(doc.conversion_rate))}, fname);
|
set_multiple(tname, cl[i].name, {'purchase_ref_rate': flt(flt(cl[i].import_ref_rate) * flt(doc.conversion_rate))}, fname);
|
||||||
|
@ -157,3 +157,8 @@ cur_frm.fields_dict['bom_materials'].grid.get_field('bom_no').get_query = functi
|
|||||||
return 'SELECT DISTINCT `tabBill Of Materials`.`name`, `tabBill Of Materials`.`remarks` FROM `tabBill Of Materials` WHERE `tabBill Of Materials`.`item` = "' + d.item_code + '" AND `tabBill Of Materials`.`is_active` = "Yes" AND `tabBill Of Materials`.docstatus = 1 AND `tabBill Of Materials`.`name` like "%s" ORDER BY `tabBill Of Materials`.`name` LIMIT 50';
|
return 'SELECT DISTINCT `tabBill Of Materials`.`name`, `tabBill Of Materials`.`remarks` FROM `tabBill Of Materials` WHERE `tabBill Of Materials`.`item` = "' + d.item_code + '" AND `tabBill Of Materials`.`is_active` = "Yes" AND `tabBill Of Materials`.docstatus = 1 AND `tabBill Of Materials`.`name` like "%s" ORDER BY `tabBill Of Materials`.`name` LIMIT 50';
|
||||||
}
|
}
|
||||||
|
|
||||||
|
cur_frm.cscript.validate = function(doc, dt, dn) {
|
||||||
|
calculate_op_cost(doc, dt, dn);
|
||||||
|
calculate_rm_cost(doc, dt, dn);
|
||||||
|
calculate_total(doc);
|
||||||
|
}
|
@ -242,14 +242,21 @@ class DocType:
|
|||||||
|
|
||||||
def make_items_dict(self, item_list):
|
def make_items_dict(self, item_list):
|
||||||
for i in item_list:
|
for i in item_list:
|
||||||
self.item_dict[i[0]] = [(flt(self.item_dict.get(i[1], 0)) + flt(i[1])), i[2], i[3]]
|
self.item_dict[i[0]] = [(flt(self.item_dict.get(i[0], [0])[0]) + flt(i[1])), i[2], i[3]]
|
||||||
|
|
||||||
|
|
||||||
def get_csv(self):
|
def get_csv(self):
|
||||||
item_list = [['Item Code', 'Description', 'Stock UOM', 'Required Qty', 'Indented Qty', 'Ordered Qty', 'Actual Qty']]
|
item_list = [['Item Code', 'Description', 'Stock UOM', 'Required Qty', 'Warehouse', 'Indented Qty', 'Ordered Qty', 'Actual Qty']]
|
||||||
for d in self.item_dict:
|
for d in self.item_dict:
|
||||||
item_qty= sql("select sum(indented_qty), sum(ordered_qty), sum(actual_qty) from `tabBin` where item_code = %s", d)
|
item_list.append([d, self.item_dict[d][1], self.item_dict[d][2], self.item_dict[d][0]]),
|
||||||
item_list.append([d, self.item_dict[d][1], self.item_dict[d][2], self.item_dict[d][0], flt(item_qty[0][0]), flt(item_qty[0][1]), flt(item_qty[0][2])])
|
item_qty= sql("select warehouse, indented_qty, ordered_qty, actual_qty from `tabBin` where item_code = %s", d)
|
||||||
|
i_qty, o_qty, a_qty = 0,0,0
|
||||||
|
for w in item_qty:
|
||||||
|
i_qty, o_qty, a_qty = i_qty + flt(w[1]), o_qty + flt(w[2]), a_qty + flt(w[3])
|
||||||
|
item_list.append(['', '', '', '', w[0], flt(w[1]), flt(w[2]), flt(w[3])])
|
||||||
|
if item_qty:
|
||||||
|
item_list.append(['', '', '', '', 'Total', i_qty, o_qty, a_qty])
|
||||||
|
|
||||||
return item_list
|
return item_list
|
||||||
|
|
||||||
|
|
||||||
|
@ -74,7 +74,7 @@ GanttChart.prototype.make_date = function(label,idx) {
|
|||||||
var w = this.make_filter(label,idx);
|
var w = this.make_filter(label,idx);
|
||||||
var i = $a(w, 'input');
|
var i = $a(w, 'input');
|
||||||
|
|
||||||
var user_fmt = wn.control_panel.date_format;
|
var user_fmt = wn.boot.sysdefaults.date_format;
|
||||||
if(!this.user_fmt)this.user_fmt = 'dd-mm-yy';
|
if(!this.user_fmt)this.user_fmt = 'dd-mm-yy';
|
||||||
|
|
||||||
$(i).datepicker({
|
$(i).datepicker({
|
||||||
|
@ -140,6 +140,7 @@ var set_dynamic_label_child = function(doc, cdt, cdn, base_curr) {
|
|||||||
//------------------------------------------------------------------
|
//------------------------------------------------------------------
|
||||||
|
|
||||||
cur_frm.cscript.dynamic_label = function(doc, cdt, cdn, base_curr, callback) {
|
cur_frm.cscript.dynamic_label = function(doc, cdt, cdn, base_curr, callback) {
|
||||||
|
cur_frm.cscript.base_currency = base_curr;
|
||||||
set_dynamic_label_par(doc, cdt, cdn, base_curr);
|
set_dynamic_label_par(doc, cdt, cdn, base_curr);
|
||||||
set_dynamic_label_child(doc, cdt, cdn, base_curr);
|
set_dynamic_label_child(doc, cdt, cdn, base_curr);
|
||||||
|
|
||||||
|
@ -186,7 +186,7 @@ cur_frm.fields_dict['quotation_no'].get_query = function(doc) {
|
|||||||
if(doc.order_type) cond = ' ifnull(`tabQuotation`.order_type, "") = "'+doc.order_type+'" and';
|
if(doc.order_type) cond = ' ifnull(`tabQuotation`.order_type, "") = "'+doc.order_type+'" and';
|
||||||
if(doc.customer) cond += ' ifnull(`tabQuotation`.customer, "") = "'+doc.customer+'" and';
|
if(doc.customer) cond += ' ifnull(`tabQuotation`.customer, "") = "'+doc.customer+'" and';
|
||||||
|
|
||||||
return repl('SELECT DISTINCT name, customer, transaction_date FROM `tabQuotation` WHERE `tabQuotation`.company = "' + doc.company + '" and `tabQuotation`.`docstatus` = 1 and `tabQuotation`.status != "Order Lost" and %(cond)s `tabQuotation`.%(key)s LIKE "%s" ORDER BY `tabQuotation`.`name` DESC LIMIT 50', {cond:cond});
|
return repl('SELECT DISTINCT name, customer, transaction_date FROM `tabQuotation` WHERE `tabQuotation`.company = "' + doc.company + '" and `tabQuotation`.`docstatus` = 1 and `tabQuotation`.status != "Order Lost" and %(cond)s `tabQuotation`.%(key)s LIKE "%s" ORDER BY `tabQuotation`.`name` DESC LIMIT 50', {cond:cond});
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
@ -34,7 +34,8 @@ keydict = {
|
|||||||
'valuation_method': 'default_valuation_method',
|
'valuation_method': 'default_valuation_method',
|
||||||
'date_format': 'date_format',
|
'date_format': 'date_format',
|
||||||
'currency_format':'default_currency_format',
|
'currency_format':'default_currency_format',
|
||||||
'account_url':'account_url'
|
'account_url':'account_url',
|
||||||
|
'allow_negative_stock' : 'allow_negative_stock'
|
||||||
}
|
}
|
||||||
|
|
||||||
class DocType:
|
class DocType:
|
||||||
@ -66,4 +67,4 @@ class DocType:
|
|||||||
get_last_day(get_first_day(ysd,0,11)).strftime('%Y-%m-%d'))
|
get_last_day(get_first_day(ysd,0,11)).strftime('%Y-%m-%d'))
|
||||||
|
|
||||||
def get_defaults(self):
|
def get_defaults(self):
|
||||||
return webnotes.conn.get_defaults()
|
return webnotes.conn.get_defaults()
|
||||||
|
@ -3,58 +3,58 @@
|
|||||||
|
|
||||||
# These values are common in all dictionaries
|
# These values are common in all dictionaries
|
||||||
{
|
{
|
||||||
'creation': '2010-08-08 17:09:09',
|
'creation': '2010-09-20 11:59:26',
|
||||||
'docstatus': 0,
|
'docstatus': 0,
|
||||||
'modified': '2012-01-20 11:25:18',
|
'modified': '2012-04-18 12:48:57',
|
||||||
'modified_by': 'Administrator',
|
'modified_by': u'Administrator',
|
||||||
'owner': 'Administrator'
|
'owner': u'Administrator'
|
||||||
},
|
},
|
||||||
|
|
||||||
# These values are common for all DocType
|
# These values are common for all DocType
|
||||||
{
|
{
|
||||||
'_last_update': '1323855502',
|
'_last_update': u'1323855502',
|
||||||
'allow_copy': 1,
|
'allow_copy': 1,
|
||||||
'allow_email': 1,
|
'allow_email': 1,
|
||||||
'allow_print': 1,
|
'allow_print': 1,
|
||||||
'colour': 'White:FFF',
|
'colour': u'White:FFF',
|
||||||
'default_print_format': 'Standard',
|
'default_print_format': u'Standard',
|
||||||
'doctype': 'DocType',
|
'doctype': 'DocType',
|
||||||
'hide_toolbar': 0,
|
'hide_toolbar': 0,
|
||||||
'in_create': 1,
|
'in_create': 1,
|
||||||
'issingle': 1,
|
'issingle': 1,
|
||||||
'module': 'Setup',
|
'module': u'Setup',
|
||||||
'name': '__common__',
|
'name': '__common__',
|
||||||
'read_only': 1,
|
'read_only': 1,
|
||||||
'section_style': 'Tabbed',
|
'section_style': u'Tabbed',
|
||||||
'server_code_error': ' ',
|
'server_code_error': u' ',
|
||||||
'show_in_menu': 1,
|
'show_in_menu': 1,
|
||||||
'version': 517
|
'version': 518
|
||||||
},
|
},
|
||||||
|
|
||||||
# These values are common for all DocField
|
# These values are common for all DocField
|
||||||
{
|
{
|
||||||
'doctype': 'DocField',
|
'doctype': u'DocField',
|
||||||
'name': '__common__',
|
'name': '__common__',
|
||||||
'parent': 'Manage Account',
|
'parent': u'Manage Account',
|
||||||
'parentfield': 'fields',
|
'parentfield': u'fields',
|
||||||
'parenttype': 'DocType',
|
'parenttype': u'DocType',
|
||||||
'permlevel': 0
|
'permlevel': 0
|
||||||
},
|
},
|
||||||
|
|
||||||
# These values are common for all DocPerm
|
# These values are common for all DocPerm
|
||||||
{
|
{
|
||||||
'doctype': 'DocPerm',
|
'doctype': u'DocPerm',
|
||||||
'name': '__common__',
|
'name': '__common__',
|
||||||
'parent': 'Manage Account',
|
'parent': u'Manage Account',
|
||||||
'parentfield': 'permissions',
|
'parentfield': u'permissions',
|
||||||
'parenttype': 'DocType',
|
'parenttype': u'DocType',
|
||||||
'read': 1
|
'read': 1
|
||||||
},
|
},
|
||||||
|
|
||||||
# DocType, Manage Account
|
# DocType, Manage Account
|
||||||
{
|
{
|
||||||
'doctype': 'DocType',
|
'doctype': 'DocType',
|
||||||
'name': 'Manage Account'
|
'name': u'Manage Account'
|
||||||
},
|
},
|
||||||
|
|
||||||
# DocPerm
|
# DocPerm
|
||||||
@ -62,9 +62,9 @@
|
|||||||
'amend': 0,
|
'amend': 0,
|
||||||
'cancel': 0,
|
'cancel': 0,
|
||||||
'create': 1,
|
'create': 1,
|
||||||
'doctype': 'DocPerm',
|
'doctype': u'DocPerm',
|
||||||
'permlevel': 0,
|
'permlevel': 0,
|
||||||
'role': 'System Manager',
|
'role': u'System Manager',
|
||||||
'submit': 0,
|
'submit': 0,
|
||||||
'write': 1
|
'write': 1
|
||||||
},
|
},
|
||||||
@ -72,464 +72,474 @@
|
|||||||
# DocPerm
|
# DocPerm
|
||||||
{
|
{
|
||||||
'create': 1,
|
'create': 1,
|
||||||
'doctype': 'DocPerm',
|
'doctype': u'DocPerm',
|
||||||
'permlevel': 0,
|
'permlevel': 0,
|
||||||
'role': 'System Manager',
|
'role': u'System Manager',
|
||||||
'write': 1
|
'write': 1
|
||||||
},
|
},
|
||||||
|
|
||||||
# DocPerm
|
# DocPerm
|
||||||
{
|
{
|
||||||
'doctype': 'DocPerm',
|
'doctype': u'DocPerm',
|
||||||
'permlevel': 1,
|
'permlevel': 1,
|
||||||
'role': 'System Manager',
|
'role': u'All'
|
||||||
|
},
|
||||||
|
|
||||||
|
# DocPerm
|
||||||
|
{
|
||||||
|
'doctype': u'DocPerm',
|
||||||
|
'permlevel': 1,
|
||||||
|
'role': u'System Manager',
|
||||||
'write': 1
|
'write': 1
|
||||||
},
|
},
|
||||||
|
|
||||||
# DocPerm
|
# DocPerm
|
||||||
{
|
{
|
||||||
'doctype': 'DocPerm',
|
'doctype': u'DocPerm',
|
||||||
'permlevel': 1,
|
|
||||||
'role': 'All'
|
|
||||||
},
|
|
||||||
|
|
||||||
# DocPerm
|
|
||||||
{
|
|
||||||
'doctype': 'DocPerm',
|
|
||||||
'permlevel': 2,
|
'permlevel': 2,
|
||||||
'role': 'System Manager',
|
'role': u'System Manager',
|
||||||
'write': 1
|
'write': 1
|
||||||
},
|
},
|
||||||
|
|
||||||
# DocField
|
# DocField
|
||||||
{
|
{
|
||||||
'doctype': 'DocField',
|
'doctype': u'DocField',
|
||||||
'fieldtype': 'Section Break',
|
'fieldtype': u'Section Break',
|
||||||
'label': 'System'
|
'label': u'System'
|
||||||
},
|
},
|
||||||
|
|
||||||
# DocField
|
# DocField
|
||||||
{
|
{
|
||||||
'colour': 'White:FFF',
|
'colour': u'White:FFF',
|
||||||
'description': 'Example: http://frappe.erpnext.com',
|
'description': u'Example: http://frappe.erpnext.com',
|
||||||
'doctype': 'DocField',
|
'doctype': u'DocField',
|
||||||
'fieldname': 'account_url',
|
'fieldname': u'account_url',
|
||||||
'fieldtype': 'Data',
|
'fieldtype': u'Data',
|
||||||
'label': 'Account URL'
|
'label': u'Account URL'
|
||||||
},
|
},
|
||||||
|
|
||||||
# DocField
|
# DocField
|
||||||
{
|
{
|
||||||
'doctype': 'DocField',
|
'doctype': u'DocField',
|
||||||
'fieldtype': 'Column Break'
|
'fieldtype': u'Column Break'
|
||||||
},
|
},
|
||||||
|
|
||||||
# DocField
|
# DocField
|
||||||
{
|
{
|
||||||
'doctype': 'DocField',
|
'doctype': u'DocField',
|
||||||
'fieldname': 'sms_sender_name',
|
'fieldname': u'sms_sender_name',
|
||||||
'fieldtype': 'Data',
|
'fieldtype': u'Data',
|
||||||
'label': 'SMS Sender Name'
|
'label': u'SMS Sender Name'
|
||||||
},
|
},
|
||||||
|
|
||||||
# DocField
|
# DocField
|
||||||
{
|
{
|
||||||
'doctype': 'DocField',
|
'doctype': u'DocField',
|
||||||
'fieldtype': 'Section Break',
|
'fieldtype': u'Section Break',
|
||||||
'label': 'Company'
|
'label': u'Company'
|
||||||
},
|
},
|
||||||
|
|
||||||
# DocField
|
# DocField
|
||||||
{
|
{
|
||||||
'doctype': 'DocField',
|
'doctype': u'DocField',
|
||||||
'fieldname': 'default_company',
|
'fieldname': u'default_company',
|
||||||
'fieldtype': 'Link',
|
'fieldtype': u'Link',
|
||||||
'label': 'Default Company',
|
'label': u'Default Company',
|
||||||
'options': 'Company',
|
'options': u'Company',
|
||||||
'reqd': 0
|
'reqd': 0
|
||||||
},
|
},
|
||||||
|
|
||||||
# DocField
|
# DocField
|
||||||
{
|
{
|
||||||
'doctype': 'DocField',
|
'doctype': u'DocField',
|
||||||
'fieldname': 'current_fiscal_year',
|
'fieldname': u'current_fiscal_year',
|
||||||
'fieldtype': 'Link',
|
'fieldtype': u'Link',
|
||||||
'label': 'Current Fiscal Year',
|
'label': u'Current Fiscal Year',
|
||||||
'options': 'Fiscal Year',
|
'options': u'Fiscal Year',
|
||||||
'reqd': 1
|
'reqd': 1
|
||||||
},
|
},
|
||||||
|
|
||||||
# DocField
|
# DocField
|
||||||
{
|
{
|
||||||
'doctype': 'DocField',
|
'doctype': u'DocField',
|
||||||
'fieldname': 'date_format',
|
'fieldname': u'date_format',
|
||||||
'fieldtype': 'Select',
|
'fieldtype': u'Select',
|
||||||
'label': 'Date Format',
|
'label': u'Date Format',
|
||||||
'options': 'yyyy-mm-dd\ndd-mm-yyyy\ndd/mm/yyyy\nmm/dd/yyyy\nmm-dd-yyyy'
|
'options': u'yyyy-mm-dd\ndd-mm-yyyy\ndd/mm/yyyy\nmm/dd/yyyy\nmm-dd-yyyy'
|
||||||
},
|
},
|
||||||
|
|
||||||
# DocField
|
# DocField
|
||||||
{
|
{
|
||||||
'doctype': 'DocField',
|
'doctype': u'DocField',
|
||||||
'fieldtype': 'Column Break',
|
'fieldtype': u'Column Break',
|
||||||
'width': '50%'
|
'width': u'50%'
|
||||||
},
|
},
|
||||||
|
|
||||||
# DocField
|
# DocField
|
||||||
{
|
{
|
||||||
'default': 'INR',
|
'default': u'INR',
|
||||||
'doctype': 'DocField',
|
'doctype': u'DocField',
|
||||||
'fieldname': 'default_currency',
|
'fieldname': u'default_currency',
|
||||||
'fieldtype': 'Select',
|
'fieldtype': u'Select',
|
||||||
'label': 'Default Currency',
|
'label': u'Default Currency',
|
||||||
'options': 'link:Currency',
|
'options': u'link:Currency',
|
||||||
'reqd': 1
|
'reqd': 1
|
||||||
},
|
},
|
||||||
|
|
||||||
# DocField
|
# DocField
|
||||||
{
|
{
|
||||||
'doctype': 'DocField',
|
'doctype': u'DocField',
|
||||||
'fieldname': 'default_currency_format',
|
'fieldname': u'default_currency_format',
|
||||||
'fieldtype': 'Select',
|
'fieldtype': u'Select',
|
||||||
'label': 'Default Currency Format',
|
'label': u'Default Currency Format',
|
||||||
'options': 'Lacs\nMillions'
|
'options': u'Lacs\nMillions'
|
||||||
},
|
},
|
||||||
|
|
||||||
# DocField
|
# DocField
|
||||||
{
|
{
|
||||||
'doctype': 'DocField',
|
'doctype': u'DocField',
|
||||||
'fieldname': 'default_currency_fraction',
|
'fieldname': u'default_currency_fraction',
|
||||||
'fieldtype': 'Data',
|
'fieldtype': u'Data',
|
||||||
'label': 'Default Currency Fraction'
|
'label': u'Default Currency Fraction'
|
||||||
},
|
},
|
||||||
|
|
||||||
# DocField
|
# DocField
|
||||||
{
|
{
|
||||||
'doctype': 'DocField',
|
'doctype': u'DocField',
|
||||||
'fieldtype': 'Section Break',
|
'fieldtype': u'Section Break',
|
||||||
'label': 'Stock'
|
'label': u'Stock'
|
||||||
},
|
},
|
||||||
|
|
||||||
# DocField
|
# DocField
|
||||||
{
|
{
|
||||||
'doctype': 'DocField',
|
'doctype': u'DocField',
|
||||||
'fieldtype': 'Column Break',
|
'fieldtype': u'Column Break',
|
||||||
'width': '50%'
|
'width': u'50%'
|
||||||
},
|
},
|
||||||
|
|
||||||
# DocField
|
# DocField
|
||||||
{
|
{
|
||||||
'doctype': 'DocField',
|
'doctype': u'DocField',
|
||||||
'fieldname': 'default_item_group',
|
'fieldname': u'default_item_group',
|
||||||
'fieldtype': 'Link',
|
'fieldtype': u'Link',
|
||||||
'label': 'Default Item Group',
|
'label': u'Default Item Group',
|
||||||
'options': 'Item Group'
|
'options': u'Item Group'
|
||||||
},
|
},
|
||||||
|
|
||||||
# DocField
|
# DocField
|
||||||
{
|
{
|
||||||
'doctype': 'DocField',
|
'doctype': u'DocField',
|
||||||
'fieldtype': 'HTML',
|
'fieldtype': u'HTML',
|
||||||
'label': 'IGHelp',
|
'label': u'IGHelp',
|
||||||
'options': '<a href="#!Sales Browser/Item Group">To manage Item Groups, click here</a>'
|
'options': u'<a href="#!Sales Browser/Item Group">To manage Item Groups, click here</a>'
|
||||||
},
|
},
|
||||||
|
|
||||||
# DocField
|
# DocField
|
||||||
{
|
{
|
||||||
'doctype': 'DocField',
|
'doctype': u'DocField',
|
||||||
'fieldname': 'default_stock_uom',
|
'fieldname': u'default_stock_uom',
|
||||||
'fieldtype': 'Link',
|
'fieldtype': u'Link',
|
||||||
'label': 'Default Stock UOM',
|
'label': u'Default Stock UOM',
|
||||||
'options': 'UOM'
|
'options': u'UOM'
|
||||||
},
|
},
|
||||||
|
|
||||||
# DocField
|
# DocField
|
||||||
{
|
{
|
||||||
'doctype': 'DocField',
|
'doctype': u'DocField',
|
||||||
'fieldname': 'default_valuation_method',
|
'fieldname': u'default_valuation_method',
|
||||||
'fieldtype': 'Select',
|
'fieldtype': u'Select',
|
||||||
'label': 'Default Valuation Method',
|
'label': u'Default Valuation Method',
|
||||||
'options': 'FIFO\nMoving Average'
|
'options': u'FIFO\nMoving Average'
|
||||||
},
|
},
|
||||||
|
|
||||||
# DocField
|
# DocField
|
||||||
{
|
{
|
||||||
'doctype': 'DocField',
|
'colour': u'White:FFF',
|
||||||
'fieldname': 'default_warehouse_type',
|
'description': u'Applicable only if valuation method is moving average',
|
||||||
'fieldtype': 'Link',
|
'doctype': u'DocField',
|
||||||
'label': 'Default Warehouse Type',
|
'fieldname': u'allow_negative_stock',
|
||||||
'options': 'Warehouse Type'
|
'fieldtype': u'Check',
|
||||||
|
'label': u'Allow Negative Stock'
|
||||||
},
|
},
|
||||||
|
|
||||||
# DocField
|
# DocField
|
||||||
{
|
{
|
||||||
'doctype': 'DocField',
|
'doctype': u'DocField',
|
||||||
'fieldname': 'auto_indent',
|
'fieldname': u'default_warehouse_type',
|
||||||
'fieldtype': 'Check',
|
'fieldtype': u'Link',
|
||||||
'label': 'Raise Indent when stock reaches re-order level'
|
'label': u'Default Warehouse Type',
|
||||||
|
'options': u'Warehouse Type'
|
||||||
},
|
},
|
||||||
|
|
||||||
# DocField
|
# DocField
|
||||||
{
|
{
|
||||||
'default': '1',
|
'doctype': u'DocField',
|
||||||
'doctype': 'DocField',
|
'fieldname': u'auto_indent',
|
||||||
'fieldtype': 'Column Break',
|
'fieldtype': u'Check',
|
||||||
'width': '50%'
|
'label': u'Raise Indent when stock reaches re-order level'
|
||||||
},
|
},
|
||||||
|
|
||||||
# DocField
|
# DocField
|
||||||
{
|
{
|
||||||
'colour': 'White:FFF',
|
'default': u'1',
|
||||||
'description': 'Percentage you are allowed to receive or deliver more against the quantity ordered. <p>For example: If you have ordered 100 units. and your Allowance is 10% then you are allowed to receive 110 units</p>',
|
'doctype': u'DocField',
|
||||||
'doctype': 'DocField',
|
'fieldtype': u'Column Break',
|
||||||
'fieldname': 'tolerance',
|
'width': u'50%'
|
||||||
'fieldtype': 'Currency',
|
|
||||||
'label': 'Allowance Percent'
|
|
||||||
},
|
},
|
||||||
|
|
||||||
# DocField
|
# DocField
|
||||||
{
|
{
|
||||||
'colour': 'White:FFF',
|
'colour': u'White:FFF',
|
||||||
'description': 'Stock level frozen up to this date, nobody can do / modify entry except authorized person',
|
'description': u'Percentage you are allowed to receive or deliver more against the quantity ordered. <p>For example: If you have ordered 100 units. and your Allowance is 10% then you are allowed to receive 110 units</p>',
|
||||||
'doctype': 'DocField',
|
'doctype': u'DocField',
|
||||||
'fieldname': 'stock_frozen_upto',
|
'fieldname': u'tolerance',
|
||||||
'fieldtype': 'Date',
|
'fieldtype': u'Currency',
|
||||||
'label': 'Stock Frozen Upto'
|
'label': u'Allowance Percent'
|
||||||
},
|
},
|
||||||
|
|
||||||
# DocField
|
# DocField
|
||||||
{
|
{
|
||||||
'colour': 'White:FFF',
|
'colour': u'White:FFF',
|
||||||
'description': 'Users with this role are allowed to do / modify stock entry before frozen date',
|
'description': u'Stock level frozen up to this date, nobody can do / modify entry except authorized person',
|
||||||
'doctype': 'DocField',
|
'doctype': u'DocField',
|
||||||
'fieldname': 'stock_auth_role',
|
'fieldname': u'stock_frozen_upto',
|
||||||
'fieldtype': 'Link',
|
'fieldtype': u'Date',
|
||||||
'label': 'Authorized Role (Frozen Entry)',
|
'label': u'Stock Frozen Upto'
|
||||||
'options': 'Role'
|
|
||||||
},
|
},
|
||||||
|
|
||||||
# DocField
|
# DocField
|
||||||
{
|
{
|
||||||
'doctype': 'DocField',
|
'colour': u'White:FFF',
|
||||||
'fieldtype': 'Section Break',
|
'description': u'Users with this role are allowed to do / modify stock entry before frozen date',
|
||||||
'label': 'Accounts'
|
'doctype': u'DocField',
|
||||||
|
'fieldname': u'stock_auth_role',
|
||||||
|
'fieldtype': u'Link',
|
||||||
|
'label': u'Authorized Role (Frozen Entry)',
|
||||||
|
'options': u'Role'
|
||||||
},
|
},
|
||||||
|
|
||||||
# DocField
|
# DocField
|
||||||
{
|
{
|
||||||
'colour': 'White:FFF',
|
'doctype': u'DocField',
|
||||||
'description': 'Accounting entry frozen up to this date, nobody can do / modify entry except authorized person',
|
'fieldtype': u'Section Break',
|
||||||
'doctype': 'DocField',
|
'label': u'Accounts'
|
||||||
'fieldname': 'acc_frozen_upto',
|
|
||||||
'fieldtype': 'Date',
|
|
||||||
'label': 'Accounts Frozen Upto'
|
|
||||||
},
|
},
|
||||||
|
|
||||||
# DocField
|
# DocField
|
||||||
{
|
{
|
||||||
'colour': 'White:FFF',
|
'colour': u'White:FFF',
|
||||||
'description': 'Users with this role are allowed to do / modify accounting entry before frozen date',
|
'description': u'Accounting entry frozen up to this date, nobody can do / modify entry except authorized person',
|
||||||
'doctype': 'DocField',
|
'doctype': u'DocField',
|
||||||
'fieldname': 'bde_auth_role',
|
'fieldname': u'acc_frozen_upto',
|
||||||
'fieldtype': 'Link',
|
'fieldtype': u'Date',
|
||||||
'label': 'Authourized Role (Frozen Entry)',
|
'label': u'Accounts Frozen Upto'
|
||||||
'options': 'Role'
|
|
||||||
},
|
},
|
||||||
|
|
||||||
# DocField
|
# DocField
|
||||||
{
|
{
|
||||||
'doctype': 'DocField',
|
'colour': u'White:FFF',
|
||||||
'fieldname': 'credit_controller',
|
'description': u'Users with this role are allowed to do / modify accounting entry before frozen date',
|
||||||
'fieldtype': 'Link',
|
'doctype': u'DocField',
|
||||||
'label': 'Credit Controller',
|
'fieldname': u'bde_auth_role',
|
||||||
'options': 'Role'
|
'fieldtype': u'Link',
|
||||||
|
'label': u'Authourized Role (Frozen Entry)',
|
||||||
|
'options': u'Role'
|
||||||
},
|
},
|
||||||
|
|
||||||
# DocField
|
# DocField
|
||||||
{
|
{
|
||||||
'doctype': 'DocField',
|
'doctype': u'DocField',
|
||||||
'fieldtype': 'Column Break'
|
'fieldname': u'credit_controller',
|
||||||
|
'fieldtype': u'Link',
|
||||||
|
'label': u'Credit Controller',
|
||||||
|
'options': u'Role'
|
||||||
},
|
},
|
||||||
|
|
||||||
# DocField
|
# DocField
|
||||||
{
|
{
|
||||||
'doctype': 'DocField',
|
'doctype': u'DocField',
|
||||||
'fieldtype': 'HTML',
|
'fieldtype': u'Column Break'
|
||||||
'label': 'Account Info',
|
|
||||||
'options': '<div class="help-box">For more accounting defaults, Open <a href="#!List/Company">Company</a></div>'
|
|
||||||
},
|
},
|
||||||
|
|
||||||
# DocField
|
# DocField
|
||||||
{
|
{
|
||||||
'doctype': 'DocField',
|
'doctype': u'DocField',
|
||||||
'fieldtype': 'Section Break',
|
'fieldtype': u'HTML',
|
||||||
'label': 'Selling'
|
'label': u'Account Info',
|
||||||
|
'options': u'<div class="help-box">For more accounting defaults, Open <a href="#!List/Company">Company</a></div>'
|
||||||
},
|
},
|
||||||
|
|
||||||
# DocField
|
# DocField
|
||||||
{
|
{
|
||||||
'colour': 'White:FFF',
|
'doctype': u'DocField',
|
||||||
'default': 'Customer Name',
|
'fieldtype': u'Section Break',
|
||||||
'doctype': 'DocField',
|
'label': u'Selling'
|
||||||
'fieldname': 'cust_master_name',
|
|
||||||
'fieldtype': 'Select',
|
|
||||||
'label': 'Customer Master created by ',
|
|
||||||
'options': 'Customer Name\nNaming Series'
|
|
||||||
},
|
},
|
||||||
|
|
||||||
# DocField
|
# DocField
|
||||||
{
|
{
|
||||||
'doctype': 'DocField',
|
'colour': u'White:FFF',
|
||||||
'fieldname': 'default_customer_group',
|
'default': u'Customer Name',
|
||||||
'fieldtype': 'Link',
|
'doctype': u'DocField',
|
||||||
'label': 'Default Customer Group',
|
'fieldname': u'cust_master_name',
|
||||||
'options': 'Customer Group'
|
'fieldtype': u'Select',
|
||||||
|
'label': u'Customer Master created by ',
|
||||||
|
'options': u'\nCustomer Name\nNaming Series'
|
||||||
},
|
},
|
||||||
|
|
||||||
# DocField
|
# DocField
|
||||||
{
|
{
|
||||||
'doctype': 'DocField',
|
'doctype': u'DocField',
|
||||||
'fieldtype': 'HTML',
|
'fieldname': u'default_customer_group',
|
||||||
'label': 'CGHelp',
|
'fieldtype': u'Link',
|
||||||
'options': '<a href="#!Sales Browser/Customer Group">To manage Customer Groups, click here</a>'
|
'label': u'Default Customer Group',
|
||||||
|
'options': u'Customer Group'
|
||||||
},
|
},
|
||||||
|
|
||||||
# DocField
|
# DocField
|
||||||
{
|
{
|
||||||
'doctype': 'DocField',
|
'doctype': u'DocField',
|
||||||
'fieldname': 'default_territory',
|
'fieldtype': u'HTML',
|
||||||
'fieldtype': 'Link',
|
'label': u'CGHelp',
|
||||||
'label': 'Default Territory',
|
'options': u'<a href="#!Sales Browser/Customer Group">To manage Customer Groups, click here</a>'
|
||||||
'options': 'Territory'
|
|
||||||
},
|
},
|
||||||
|
|
||||||
# DocField
|
# DocField
|
||||||
{
|
{
|
||||||
'doctype': 'DocField',
|
'doctype': u'DocField',
|
||||||
'fieldtype': 'HTML',
|
'fieldname': u'default_territory',
|
||||||
'label': 'TerritoryHelp',
|
'fieldtype': u'Link',
|
||||||
'options': '<a href="#!Sales Browser/Territory">To manage Territory, click here</a>'
|
'label': u'Default Territory',
|
||||||
|
'options': u'Territory'
|
||||||
},
|
},
|
||||||
|
|
||||||
# DocField
|
# DocField
|
||||||
{
|
{
|
||||||
'doctype': 'DocField',
|
'doctype': u'DocField',
|
||||||
'fieldtype': 'Column Break',
|
'fieldtype': u'HTML',
|
||||||
'width': '50%'
|
'label': u'TerritoryHelp',
|
||||||
|
'options': u'<a href="#!Sales Browser/Territory">To manage Territory, click here</a>'
|
||||||
},
|
},
|
||||||
|
|
||||||
# DocField
|
# DocField
|
||||||
{
|
{
|
||||||
'doctype': 'DocField',
|
'doctype': u'DocField',
|
||||||
'fieldname': 'default_price_list',
|
'fieldtype': u'Column Break',
|
||||||
'fieldtype': 'Link',
|
'width': u'50%'
|
||||||
'label': 'Default Price List',
|
|
||||||
'options': 'Price List'
|
|
||||||
},
|
},
|
||||||
|
|
||||||
# DocField
|
# DocField
|
||||||
{
|
{
|
||||||
'doctype': 'DocField',
|
'doctype': u'DocField',
|
||||||
'fieldname': 'default_price_list_currency',
|
'fieldname': u'default_price_list',
|
||||||
'fieldtype': 'Link',
|
'fieldtype': u'Link',
|
||||||
'label': 'Default Price List Currency',
|
'label': u'Default Price List',
|
||||||
'options': 'Currency'
|
'options': u'Price List'
|
||||||
},
|
},
|
||||||
|
|
||||||
# DocField
|
# DocField
|
||||||
{
|
{
|
||||||
'colour': 'White:FFF',
|
'doctype': u'DocField',
|
||||||
'default': 'No',
|
'fieldname': u'default_price_list_currency',
|
||||||
'doctype': 'DocField',
|
'fieldtype': u'Link',
|
||||||
'fieldname': 'so_required',
|
'label': u'Default Price List Currency',
|
||||||
'fieldtype': 'Select',
|
'options': u'Currency'
|
||||||
'label': 'Sales Order Required',
|
|
||||||
'options': 'No\nYes'
|
|
||||||
},
|
},
|
||||||
|
|
||||||
# DocField
|
# DocField
|
||||||
{
|
{
|
||||||
'colour': 'White:FFF',
|
'colour': u'White:FFF',
|
||||||
'default': 'No',
|
'default': u'No',
|
||||||
'doctype': 'DocField',
|
'doctype': u'DocField',
|
||||||
'fieldname': 'dn_required',
|
'fieldname': u'so_required',
|
||||||
'fieldtype': 'Select',
|
'fieldtype': u'Select',
|
||||||
'label': 'Delivery Note Required',
|
'label': u'Sales Order Required',
|
||||||
'options': 'No\nYes'
|
'options': u'No\nYes'
|
||||||
},
|
},
|
||||||
|
|
||||||
# DocField
|
# DocField
|
||||||
{
|
{
|
||||||
'doctype': 'DocField',
|
'colour': u'White:FFF',
|
||||||
'fieldtype': 'Section Break',
|
'default': u'No',
|
||||||
'label': 'Buying'
|
'doctype': u'DocField',
|
||||||
|
'fieldname': u'dn_required',
|
||||||
|
'fieldtype': u'Select',
|
||||||
|
'label': u'Delivery Note Required',
|
||||||
|
'options': u'No\nYes'
|
||||||
},
|
},
|
||||||
|
|
||||||
# DocField
|
# DocField
|
||||||
{
|
{
|
||||||
'doctype': 'DocField',
|
'doctype': u'DocField',
|
||||||
'fieldname': 'default_supplier_type',
|
'fieldtype': u'Section Break',
|
||||||
'fieldtype': 'Link',
|
'label': u'Buying'
|
||||||
'label': 'Default Supplier Type',
|
|
||||||
'options': 'Supplier Type'
|
|
||||||
},
|
},
|
||||||
|
|
||||||
# DocField
|
# DocField
|
||||||
{
|
{
|
||||||
'colour': 'White:FFF',
|
'doctype': u'DocField',
|
||||||
'default': 'Supplier Name',
|
'fieldname': u'default_supplier_type',
|
||||||
'doctype': 'DocField',
|
'fieldtype': u'Link',
|
||||||
'fieldname': 'supp_master_name',
|
'label': u'Default Supplier Type',
|
||||||
'fieldtype': 'Select',
|
'options': u'Supplier Type'
|
||||||
'label': 'Supplier Master created by ',
|
|
||||||
'options': 'Supplier Name\nNaming Series'
|
|
||||||
},
|
},
|
||||||
|
|
||||||
# DocField
|
# DocField
|
||||||
{
|
{
|
||||||
'doctype': 'DocField',
|
'colour': u'White:FFF',
|
||||||
'fieldtype': 'Column Break',
|
'default': u'Supplier Name',
|
||||||
'width': '50%'
|
'doctype': u'DocField',
|
||||||
|
'fieldname': u'supp_master_name',
|
||||||
|
'fieldtype': u'Select',
|
||||||
|
'label': u'Supplier Master created by ',
|
||||||
|
'options': u'Supplier Name\nNaming Series'
|
||||||
},
|
},
|
||||||
|
|
||||||
# DocField
|
# DocField
|
||||||
{
|
{
|
||||||
'colour': 'White:FFF',
|
'doctype': u'DocField',
|
||||||
'default': 'No',
|
'fieldtype': u'Column Break',
|
||||||
'doctype': 'DocField',
|
'width': u'50%'
|
||||||
'fieldname': 'po_required',
|
|
||||||
'fieldtype': 'Select',
|
|
||||||
'label': 'Purchase Order Required',
|
|
||||||
'options': 'No\nYes'
|
|
||||||
},
|
},
|
||||||
|
|
||||||
# DocField
|
# DocField
|
||||||
{
|
{
|
||||||
'colour': 'White:FFF',
|
'colour': u'White:FFF',
|
||||||
'default': 'No',
|
'default': u'No',
|
||||||
'doctype': 'DocField',
|
'doctype': u'DocField',
|
||||||
'fieldname': 'pr_required',
|
'fieldname': u'po_required',
|
||||||
'fieldtype': 'Select',
|
'fieldtype': u'Select',
|
||||||
'label': 'Purchase Receipt Required',
|
'label': u'Purchase Order Required',
|
||||||
'options': 'No\nYes'
|
'options': u'No\nYes'
|
||||||
},
|
},
|
||||||
|
|
||||||
# DocField
|
# DocField
|
||||||
{
|
{
|
||||||
'doctype': 'DocField',
|
'colour': u'White:FFF',
|
||||||
'fieldtype': 'Section Break',
|
'default': u'No',
|
||||||
'label': 'HR',
|
'doctype': u'DocField',
|
||||||
'options': '<div style="padding-top: 8px;" class="columnHeading">HR</div>'
|
'fieldname': u'pr_required',
|
||||||
|
'fieldtype': u'Select',
|
||||||
|
'label': u'Purchase Receipt Required',
|
||||||
|
'options': u'No\nYes'
|
||||||
},
|
},
|
||||||
|
|
||||||
# DocField
|
# DocField
|
||||||
{
|
{
|
||||||
'colour': 'White:FFF',
|
'doctype': u'DocField',
|
||||||
'description': 'Employee record is created using selected field. ',
|
'fieldtype': u'Section Break',
|
||||||
'doctype': 'DocField',
|
'label': u'HR',
|
||||||
'fieldname': 'emp_created_by',
|
'options': u'<div style="padding-top: 8px;" class="columnHeading">HR</div>'
|
||||||
'fieldtype': 'Select',
|
},
|
||||||
'label': 'Employee Records to be created by ',
|
|
||||||
'options': '\nNaming Series\nEmployee Number'
|
# DocField
|
||||||
|
{
|
||||||
|
'colour': u'White:FFF',
|
||||||
|
'description': u'Employee record is created using selected field. ',
|
||||||
|
'doctype': u'DocField',
|
||||||
|
'fieldname': u'emp_created_by',
|
||||||
|
'fieldtype': u'Select',
|
||||||
|
'label': u'Employee Records to be created by ',
|
||||||
|
'options': u'\nNaming Series\nEmployee Number'
|
||||||
}
|
}
|
||||||
]
|
]
|
@ -183,18 +183,20 @@ class DocType:
|
|||||||
# get moving average inventory values
|
# get moving average inventory values
|
||||||
# ------------------------------------
|
# ------------------------------------
|
||||||
def get_moving_average_inventory_values(self, val_rate, in_rate, opening_qty, actual_qty, is_cancelled):
|
def get_moving_average_inventory_values(self, val_rate, in_rate, opening_qty, actual_qty, is_cancelled):
|
||||||
|
#msgprint(actual_qty)
|
||||||
if flt(in_rate) <= 0: # In case of delivery/stock issue in_rate = 0 or wrong incoming rate
|
if flt(in_rate) <= 0: # In case of delivery/stock issue in_rate = 0 or wrong incoming rate
|
||||||
in_rate = val_rate
|
in_rate = val_rate
|
||||||
if in_rate and val_rate == 0: # First entry
|
|
||||||
val_rate = in_rate
|
|
||||||
|
|
||||||
# val_rate is same as previous entry if :
|
# val_rate is same as previous entry if :
|
||||||
# 1. actual qty is negative(delivery note / stock entry)
|
# 1. actual qty is negative(delivery note / stock entry)
|
||||||
# 2. cancelled entry
|
# 2. cancelled entry
|
||||||
# 3. val_rate is negative
|
# 3. val_rate is negative
|
||||||
# Otherwise it will be calculated as per moving average
|
# Otherwise it will be calculated as per moving average
|
||||||
elif actual_qty > 0 and (opening_qty + actual_qty) > 0 and is_cancelled == 'No' and ((opening_qty * val_rate) + (actual_qty * in_rate)) > 0:
|
if actual_qty > 0 and (opening_qty + actual_qty) > 0 and is_cancelled == 'No' and ((opening_qty * val_rate) + (actual_qty * in_rate)) > 0:
|
||||||
|
opening_qty = opening_qty > 0 and opening_qty or 0
|
||||||
val_rate = ((opening_qty *val_rate) + (actual_qty * in_rate)) / (opening_qty + actual_qty)
|
val_rate = ((opening_qty *val_rate) + (actual_qty * in_rate)) / (opening_qty + actual_qty)
|
||||||
|
elif (opening_qty + actual_qty) <= 0:
|
||||||
|
val_rate = 0
|
||||||
stock_val = val_rate
|
stock_val = val_rate
|
||||||
return val_rate, stock_val
|
return val_rate, stock_val
|
||||||
|
|
||||||
@ -248,8 +250,10 @@ class DocType:
|
|||||||
# get stock value
|
# get stock value
|
||||||
# ----------------
|
# ----------------
|
||||||
def get_stock_value(self, val_method, cqty, stock_val, serial_nos):
|
def get_stock_value(self, val_method, cqty, stock_val, serial_nos):
|
||||||
if val_method == 'Moving Average' or serial_nos:
|
if serial_nos:
|
||||||
stock_val = flt(stock_val) * flt(cqty)
|
stock_val = flt(stock_val) * flt(cqty)
|
||||||
|
elif val_method == 'Moving Average':
|
||||||
|
stock_val = flt(cqty) > 0 and flt(stock_val) * flt(cqty) or 0
|
||||||
elif val_method == 'FIFO':
|
elif val_method == 'FIFO':
|
||||||
stock_val = sum([flt(d[0])*flt(d[1]) for d in self.fcfs_bal])
|
stock_val = sum([flt(d[0])*flt(d[1]) for d in self.fcfs_bal])
|
||||||
return stock_val
|
return stock_val
|
||||||
@ -277,6 +281,11 @@ class DocType:
|
|||||||
# get valuation method
|
# get valuation method
|
||||||
val_method = get_obj('Valuation Control').get_valuation_method(self.doc.item_code)
|
val_method = get_obj('Valuation Control').get_valuation_method(self.doc.item_code)
|
||||||
|
|
||||||
|
# allow negative stock (only for moving average method)
|
||||||
|
from webnotes.utils import get_defaults
|
||||||
|
allow_negative_stock = get_defaults().get('allow_negative_stock', 0)
|
||||||
|
|
||||||
|
|
||||||
# recalculate the balances for all stock ledger entries
|
# recalculate the balances for all stock ledger entries
|
||||||
# after the prev sle
|
# after the prev sle
|
||||||
sll = sql("""
|
sll = sql("""
|
||||||
@ -289,10 +298,10 @@ class DocType:
|
|||||||
order by timestamp(posting_date, posting_time) asc, name asc""", \
|
order by timestamp(posting_date, posting_time) asc, name asc""", \
|
||||||
(self.doc.item_code, self.doc.warehouse, \
|
(self.doc.item_code, self.doc.warehouse, \
|
||||||
prev_sle.get('posting_date','1900-01-01'), prev_sle.get('posting_time', '12:00')), as_dict = 1)
|
prev_sle.get('posting_date','1900-01-01'), prev_sle.get('posting_time', '12:00')), as_dict = 1)
|
||||||
|
|
||||||
for sle in sll:
|
for sle in sll:
|
||||||
# block if stock level goes negative on any date
|
# block if stock level goes negative on any date
|
||||||
self.validate_negative_stock(cqty, sle)
|
if val_method != 'Moving Average' or flt(allow_negative_stock) == 0:
|
||||||
|
self.validate_negative_stock(cqty, sle)
|
||||||
|
|
||||||
stock_val, in_rate = 0, sle['incoming_rate'] # IN
|
stock_val, in_rate = 0, sle['incoming_rate'] # IN
|
||||||
serial_nos = sle["serial_no"] and ("'"+"', '".join(cstr(sle["serial_no"]).split('\n')) \
|
serial_nos = sle["serial_no"] and ("'"+"', '".join(cstr(sle["serial_no"]).split('\n')) \
|
||||||
|
@ -321,7 +321,6 @@ class DocType(TransactionBase):
|
|||||||
def on_submit(self):
|
def on_submit(self):
|
||||||
self.validate_packed_qty()
|
self.validate_packed_qty()
|
||||||
set(self.doc, 'message', 'Items against your Order #%s have been delivered. Delivery #%s: ' % (self.doc.po_no, self.doc.name))
|
set(self.doc, 'message', 'Items against your Order #%s have been delivered. Delivery #%s: ' % (self.doc.po_no, self.doc.name))
|
||||||
self.check_qty_in_stock()
|
|
||||||
# Check for Approving Authority
|
# Check for Approving Authority
|
||||||
get_obj('Authorization Control').validate_approving_authority(self.doc.doctype, self.doc.company, self.doc.grand_total, self)
|
get_obj('Authorization Control').validate_approving_authority(self.doc.doctype, self.doc.company, self.doc.grand_total, self)
|
||||||
sl_obj = get_obj("Stock Ledger")
|
sl_obj = get_obj("Stock Ledger")
|
||||||
@ -360,14 +359,6 @@ class DocType(TransactionBase):
|
|||||||
webnotes.msgprint("Packing Error:\n" + err_msg, raise_exception=1)
|
webnotes.msgprint("Packing Error:\n" + err_msg, raise_exception=1)
|
||||||
|
|
||||||
|
|
||||||
# *********** Checks whether actual quantity is present in warehouse *************
|
|
||||||
def check_qty_in_stock(self):
|
|
||||||
for d in getlist(self.doclist, 'packing_details'):
|
|
||||||
is_stock_item = sql("select is_stock_item from `tabItem` where name = '%s'" % d.item_code)[0][0]
|
|
||||||
if is_stock_item == 'Yes' and d.warehouse and flt(d.qty) > flt(d.actual_qty):
|
|
||||||
msgprint("For Item: " + cstr(d.item_code) + " at Warehouse: " + cstr(d.warehouse) + " Quantity: " + cstr(d.qty) +" is not Available. (Must be less than or equal to " + cstr(d.actual_qty) + " )")
|
|
||||||
raise Exception, "Validation Error"
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
# ON CANCEL
|
# ON CANCEL
|
||||||
|
@ -42,9 +42,9 @@ class DocType :
|
|||||||
def pull_item_details(self):
|
def pull_item_details(self):
|
||||||
if self.doc.return_type == 'Sales Return':
|
if self.doc.return_type == 'Sales Return':
|
||||||
if self.doc.delivery_note_no:
|
if self.doc.delivery_note_no:
|
||||||
det = sql("select t1.name, t1.item_code, t1.description, t1.qty, t1.uom, t2.basic_rate, t3.customer, t3.customer_name, t3.customer_address, t2.serial_no, t2.batch_no from `tabDelivery Note Packing Detail` t1, `tabDelivery Note Detail` t2, `tabDelivery Note` t3 where t1.parent = t3.name and t2.parent = t3.name and t1.parent_detail_docname = t2.name and t3.name = '%s' and t3.docstatus = 1" % self.doc.delivery_note_no)
|
det = sql("select t1.name, t1.item_code, t1.description, t1.qty, t1.uom, t2.export_rate * t3.conversion_rate, t3.customer, t3.customer_name, t3.customer_address, t2.serial_no, t2.batch_no from `tabDelivery Note Packing Detail` t1, `tabDelivery Note Detail` t2, `tabDelivery Note` t3 where t1.parent = t3.name and t2.parent = t3.name and t1.parent_detail_docname = t2.name and t3.name = '%s' and t3.docstatus = 1" % self.doc.delivery_note_no)
|
||||||
elif self.doc.sales_invoice_no:
|
elif self.doc.sales_invoice_no:
|
||||||
det = sql("select t1.name, t1.item_code, t1.description, t1.qty, t1.stock_uom, t1.basic_rate, t2.customer, t2.customer_name, t2.customer_address, t1.serial_no from `tabRV Detail` t1, `tabReceivable Voucher` t2 where t1.parent = t2.name and t2.name = '%s' and t2.docstatus = 1" % self.doc.sales_invoice_no)
|
det = sql("select t1.name, t1.item_code, t1.description, t1.qty, t1.stock_uom, t1.export_rate * t2.conversion_rate, t2.customer, t2.customer_name, t2.customer_address, t1.serial_no from `tabRV Detail` t1, `tabReceivable Voucher` t2 where t1.parent = t2.name and t2.name = '%s' and t2.docstatus = 1" % self.doc.sales_invoice_no)
|
||||||
elif self.doc.return_type == 'Purchase Return' and self.doc.purchase_receipt_no:
|
elif self.doc.return_type == 'Purchase Return' and self.doc.purchase_receipt_no:
|
||||||
det = sql("select t1.name, t1.item_code, t1.description, t1.received_qty, t1.uom, t1.purchase_rate, t2.supplier, t2.supplier_name, t2.supplier_address, t1.serial_no, t1.batch_no from `tabPurchase Receipt Detail` t1, `tabPurchase Receipt` t2 where t1.parent = t2.name and t2.name = '%s' and t2.docstatus = 1" % self.doc.purchase_receipt_no)
|
det = sql("select t1.name, t1.item_code, t1.description, t1.received_qty, t1.uom, t1.purchase_rate, t2.supplier, t2.supplier_name, t2.supplier_address, t1.serial_no, t1.batch_no from `tabPurchase Receipt Detail` t1, `tabPurchase Receipt` t2 where t1.parent = t2.name and t2.name = '%s' and t2.docstatus = 1" % self.doc.purchase_receipt_no)
|
||||||
|
|
||||||
|
@ -265,9 +265,6 @@ class DocType(TransactionBase):
|
|||||||
if flt(d.transfer_qty) <= 0:
|
if flt(d.transfer_qty) <= 0:
|
||||||
msgprint("Transfer Quantity can not be less than or equal to zero at Row No " + cstr(d.idx))
|
msgprint("Transfer Quantity can not be less than or equal to zero at Row No " + cstr(d.idx))
|
||||||
raise Exception
|
raise Exception
|
||||||
if d.s_warehouse and flt(d.transfer_qty) > flt(d.actual_qty):
|
|
||||||
msgprint("Transfer Quantity is more than Available Qty at Row No " + cstr(d.idx))
|
|
||||||
raise Exception
|
|
||||||
|
|
||||||
|
|
||||||
def calc_amount(self):
|
def calc_amount(self):
|
||||||
|
@ -3,19 +3,18 @@
|
|||||||
|
|
||||||
# These values are common in all dictionaries
|
# These values are common in all dictionaries
|
||||||
{
|
{
|
||||||
'creation': '2010-08-08 17:09:25',
|
'creation': '2009-05-12 16:46:51',
|
||||||
'docstatus': 0,
|
'docstatus': 0,
|
||||||
'modified': '2012-03-21 14:04:38',
|
'modified': '2012-04-18 11:59:34',
|
||||||
'modified_by': u'Administrator',
|
'modified_by': u'Administrator',
|
||||||
'owner': u'Administrator'
|
'owner': u'Administrator'
|
||||||
},
|
},
|
||||||
|
|
||||||
# These values are common for all DocType
|
# These values are common for all DocType
|
||||||
{
|
{
|
||||||
'_last_update': u'1322549701',
|
'_last_update': u'1334728856',
|
||||||
'autoname': u'SLE/.########',
|
'autoname': u'SLE/.########',
|
||||||
'colour': u'White:FFF',
|
'colour': u'White:FFF',
|
||||||
'default_print_format': u'Standard',
|
|
||||||
'doctype': 'DocType',
|
'doctype': 'DocType',
|
||||||
'hide_toolbar': 1,
|
'hide_toolbar': 1,
|
||||||
'in_create': 1,
|
'in_create': 1,
|
||||||
@ -24,7 +23,7 @@
|
|||||||
'section_style': u'Simple',
|
'section_style': u'Simple',
|
||||||
'server_code_error': u' ',
|
'server_code_error': u' ',
|
||||||
'show_in_menu': 0,
|
'show_in_menu': 0,
|
||||||
'version': 53
|
'version': 54
|
||||||
},
|
},
|
||||||
|
|
||||||
# These values are common for all DocField
|
# These values are common for all DocField
|
||||||
@ -38,17 +37,12 @@
|
|||||||
|
|
||||||
# These values are common for all DocPerm
|
# These values are common for all DocPerm
|
||||||
{
|
{
|
||||||
'amend': 0,
|
|
||||||
'cancel': 0,
|
|
||||||
'create': 0,
|
|
||||||
'doctype': u'DocPerm',
|
'doctype': u'DocPerm',
|
||||||
'name': '__common__',
|
'name': '__common__',
|
||||||
'parent': u'Stock Ledger Entry',
|
'parent': u'Stock Ledger Entry',
|
||||||
'parentfield': u'permissions',
|
'parentfield': u'permissions',
|
||||||
'parenttype': u'DocType',
|
'parenttype': u'DocType',
|
||||||
'read': 1,
|
'read': 1
|
||||||
'submit': 0,
|
|
||||||
'write': 0
|
|
||||||
},
|
},
|
||||||
|
|
||||||
# DocType, Stock Ledger Entry
|
# DocType, Stock Ledger Entry
|
||||||
@ -57,20 +51,6 @@
|
|||||||
'name': u'Stock Ledger Entry'
|
'name': u'Stock Ledger Entry'
|
||||||
},
|
},
|
||||||
|
|
||||||
# DocPerm
|
|
||||||
{
|
|
||||||
'doctype': u'DocPerm',
|
|
||||||
'permlevel': 0,
|
|
||||||
'role': u'System Manager'
|
|
||||||
},
|
|
||||||
|
|
||||||
# DocPerm
|
|
||||||
{
|
|
||||||
'doctype': u'DocPerm',
|
|
||||||
'permlevel': 0,
|
|
||||||
'role': u'Material User'
|
|
||||||
},
|
|
||||||
|
|
||||||
# DocPerm
|
# DocPerm
|
||||||
{
|
{
|
||||||
'doctype': u'DocPerm',
|
'doctype': u'DocPerm',
|
||||||
@ -80,9 +60,26 @@
|
|||||||
|
|
||||||
# DocPerm
|
# DocPerm
|
||||||
{
|
{
|
||||||
|
'amend': 0,
|
||||||
|
'cancel': 0,
|
||||||
|
'create': 0,
|
||||||
'doctype': u'DocPerm',
|
'doctype': u'DocPerm',
|
||||||
'permlevel': 1,
|
'permlevel': 1,
|
||||||
'role': u'Material User'
|
'role': u'Material User',
|
||||||
|
'submit': 0,
|
||||||
|
'write': 0
|
||||||
|
},
|
||||||
|
|
||||||
|
# DocPerm
|
||||||
|
{
|
||||||
|
'amend': 0,
|
||||||
|
'cancel': 0,
|
||||||
|
'create': 0,
|
||||||
|
'doctype': u'DocPerm',
|
||||||
|
'permlevel': 0,
|
||||||
|
'role': u'Material User',
|
||||||
|
'submit': 0,
|
||||||
|
'write': 0
|
||||||
},
|
},
|
||||||
|
|
||||||
# DocPerm
|
# DocPerm
|
||||||
@ -97,12 +94,14 @@
|
|||||||
'doctype': u'DocField',
|
'doctype': u'DocField',
|
||||||
'fieldname': u'item_code',
|
'fieldname': u'item_code',
|
||||||
'fieldtype': u'Link',
|
'fieldtype': u'Link',
|
||||||
|
'hidden': 0,
|
||||||
'in_filter': 1,
|
'in_filter': 1,
|
||||||
'label': u'Item Code',
|
'label': u'Item Code',
|
||||||
'oldfieldname': u'item_code',
|
'oldfieldname': u'item_code',
|
||||||
'oldfieldtype': u'Link',
|
'oldfieldtype': u'Link',
|
||||||
'options': u'Item',
|
'options': u'Item',
|
||||||
'permlevel': 1,
|
'permlevel': 1,
|
||||||
|
'print_hide': 0,
|
||||||
'reqd': 0,
|
'reqd': 0,
|
||||||
'search_index': 1,
|
'search_index': 1,
|
||||||
'width': u'100px'
|
'width': u'100px'
|
||||||
@ -125,10 +124,13 @@
|
|||||||
'doctype': u'DocField',
|
'doctype': u'DocField',
|
||||||
'fieldname': u'batch_no',
|
'fieldname': u'batch_no',
|
||||||
'fieldtype': u'Data',
|
'fieldtype': u'Data',
|
||||||
|
'hidden': 0,
|
||||||
'label': u'Batch No',
|
'label': u'Batch No',
|
||||||
'oldfieldname': u'batch_no',
|
'oldfieldname': u'batch_no',
|
||||||
'oldfieldtype': u'Data',
|
'oldfieldtype': u'Data',
|
||||||
'permlevel': 0
|
'permlevel': 0,
|
||||||
|
'print_hide': 0,
|
||||||
|
'reqd': 0
|
||||||
},
|
},
|
||||||
|
|
||||||
# DocField
|
# DocField
|
||||||
@ -136,12 +138,15 @@
|
|||||||
'doctype': u'DocField',
|
'doctype': u'DocField',
|
||||||
'fieldname': u'warehouse',
|
'fieldname': u'warehouse',
|
||||||
'fieldtype': u'Link',
|
'fieldtype': u'Link',
|
||||||
|
'hidden': 0,
|
||||||
'in_filter': 1,
|
'in_filter': 1,
|
||||||
'label': u'Warehouse',
|
'label': u'Warehouse',
|
||||||
'oldfieldname': u'warehouse',
|
'oldfieldname': u'warehouse',
|
||||||
'oldfieldtype': u'Link',
|
'oldfieldtype': u'Link',
|
||||||
'options': u'Warehouse',
|
'options': u'Warehouse',
|
||||||
'permlevel': 1,
|
'permlevel': 1,
|
||||||
|
'print_hide': 0,
|
||||||
|
'reqd': 0,
|
||||||
'search_index': 1,
|
'search_index': 1,
|
||||||
'width': u'100px'
|
'width': u'100px'
|
||||||
},
|
},
|
||||||
@ -151,13 +156,16 @@
|
|||||||
'doctype': u'DocField',
|
'doctype': u'DocField',
|
||||||
'fieldname': u'warehouse_type',
|
'fieldname': u'warehouse_type',
|
||||||
'fieldtype': u'Select',
|
'fieldtype': u'Select',
|
||||||
|
'hidden': 0,
|
||||||
'in_filter': 1,
|
'in_filter': 1,
|
||||||
'label': u'Warehouse Type',
|
'label': u'Warehouse Type',
|
||||||
'oldfieldname': u'warehouse_type',
|
'oldfieldname': u'warehouse_type',
|
||||||
'oldfieldtype': u'Select',
|
'oldfieldtype': u'Select',
|
||||||
'options': u'link:Warehouse Type',
|
'options': u'\nStores',
|
||||||
'permlevel': 1,
|
'permlevel': 1,
|
||||||
'search_index': 0
|
'print_hide': 0,
|
||||||
|
'reqd': 0,
|
||||||
|
'search_index': 1
|
||||||
},
|
},
|
||||||
|
|
||||||
# DocField
|
# DocField
|
||||||
@ -166,11 +174,13 @@
|
|||||||
'doctype': u'DocField',
|
'doctype': u'DocField',
|
||||||
'fieldname': u'posting_date',
|
'fieldname': u'posting_date',
|
||||||
'fieldtype': u'Date',
|
'fieldtype': u'Date',
|
||||||
|
'hidden': 0,
|
||||||
'in_filter': 1,
|
'in_filter': 1,
|
||||||
'label': u'Posting Date',
|
'label': u'Posting Date',
|
||||||
'oldfieldname': u'posting_date',
|
'oldfieldname': u'posting_date',
|
||||||
'oldfieldtype': u'Date',
|
'oldfieldtype': u'Date',
|
||||||
'permlevel': 1,
|
'permlevel': 1,
|
||||||
|
'print_hide': 0,
|
||||||
'reqd': 0,
|
'reqd': 0,
|
||||||
'search_index': 1,
|
'search_index': 1,
|
||||||
'width': u'100px'
|
'width': u'100px'
|
||||||
@ -181,11 +191,14 @@
|
|||||||
'doctype': u'DocField',
|
'doctype': u'DocField',
|
||||||
'fieldname': u'posting_time',
|
'fieldname': u'posting_time',
|
||||||
'fieldtype': u'Time',
|
'fieldtype': u'Time',
|
||||||
|
'hidden': 0,
|
||||||
'in_filter': 0,
|
'in_filter': 0,
|
||||||
'label': u'Posting Time',
|
'label': u'Posting Time',
|
||||||
'oldfieldname': u'posting_time',
|
'oldfieldname': u'posting_time',
|
||||||
'oldfieldtype': u'Time',
|
'oldfieldtype': u'Time',
|
||||||
'permlevel': 1,
|
'permlevel': 1,
|
||||||
|
'print_hide': 0,
|
||||||
|
'reqd': 0,
|
||||||
'search_index': 0,
|
'search_index': 0,
|
||||||
'width': u'100px'
|
'width': u'100px'
|
||||||
},
|
},
|
||||||
@ -196,12 +209,15 @@
|
|||||||
'doctype': u'DocField',
|
'doctype': u'DocField',
|
||||||
'fieldname': u'transaction_date',
|
'fieldname': u'transaction_date',
|
||||||
'fieldtype': u'Date',
|
'fieldtype': u'Date',
|
||||||
|
'hidden': 0,
|
||||||
'in_filter': 1,
|
'in_filter': 1,
|
||||||
'label': u'Transaction Date',
|
'label': u'Transaction Date',
|
||||||
'oldfieldname': u'transaction_date',
|
'oldfieldname': u'transaction_date',
|
||||||
'oldfieldtype': u'Date',
|
'oldfieldtype': u'Date',
|
||||||
'permlevel': 1,
|
'permlevel': 1,
|
||||||
'search_index': 0,
|
'print_hide': 0,
|
||||||
|
'reqd': 0,
|
||||||
|
'search_index': 1,
|
||||||
'width': u'100px'
|
'width': u'100px'
|
||||||
},
|
},
|
||||||
|
|
||||||
@ -210,12 +226,15 @@
|
|||||||
'doctype': u'DocField',
|
'doctype': u'DocField',
|
||||||
'fieldname': u'voucher_type',
|
'fieldname': u'voucher_type',
|
||||||
'fieldtype': u'Data',
|
'fieldtype': u'Data',
|
||||||
|
'hidden': 0,
|
||||||
'in_filter': 1,
|
'in_filter': 1,
|
||||||
'label': u'Voucher Type',
|
'label': u'Voucher Type',
|
||||||
'oldfieldname': u'voucher_type',
|
'oldfieldname': u'voucher_type',
|
||||||
'oldfieldtype': u'Data',
|
'oldfieldtype': u'Data',
|
||||||
'permlevel': 1,
|
'permlevel': 1,
|
||||||
'search_index': 0,
|
'print_hide': 0,
|
||||||
|
'reqd': 0,
|
||||||
|
'search_index': 1,
|
||||||
'width': u'150px'
|
'width': u'150px'
|
||||||
},
|
},
|
||||||
|
|
||||||
@ -224,12 +243,15 @@
|
|||||||
'doctype': u'DocField',
|
'doctype': u'DocField',
|
||||||
'fieldname': u'voucher_no',
|
'fieldname': u'voucher_no',
|
||||||
'fieldtype': u'Data',
|
'fieldtype': u'Data',
|
||||||
|
'hidden': 0,
|
||||||
'in_filter': 1,
|
'in_filter': 1,
|
||||||
'label': u'Voucher No',
|
'label': u'Voucher No',
|
||||||
'oldfieldname': u'voucher_no',
|
'oldfieldname': u'voucher_no',
|
||||||
'oldfieldtype': u'Data',
|
'oldfieldtype': u'Data',
|
||||||
'permlevel': 1,
|
'permlevel': 1,
|
||||||
'search_index': 0,
|
'print_hide': 0,
|
||||||
|
'reqd': 0,
|
||||||
|
'search_index': 1,
|
||||||
'width': u'150px'
|
'width': u'150px'
|
||||||
},
|
},
|
||||||
|
|
||||||
@ -238,10 +260,13 @@
|
|||||||
'doctype': u'DocField',
|
'doctype': u'DocField',
|
||||||
'fieldname': u'voucher_detail_no',
|
'fieldname': u'voucher_detail_no',
|
||||||
'fieldtype': u'Data',
|
'fieldtype': u'Data',
|
||||||
|
'hidden': 0,
|
||||||
'label': u'Voucher Detail No',
|
'label': u'Voucher Detail No',
|
||||||
'oldfieldname': u'voucher_detail_no',
|
'oldfieldname': u'voucher_detail_no',
|
||||||
'oldfieldtype': u'Data',
|
'oldfieldtype': u'Data',
|
||||||
'permlevel': 1,
|
'permlevel': 1,
|
||||||
|
'print_hide': 0,
|
||||||
|
'reqd': 0,
|
||||||
'width': u'150px'
|
'width': u'150px'
|
||||||
},
|
},
|
||||||
|
|
||||||
@ -251,11 +276,14 @@
|
|||||||
'doctype': u'DocField',
|
'doctype': u'DocField',
|
||||||
'fieldname': u'actual_qty',
|
'fieldname': u'actual_qty',
|
||||||
'fieldtype': u'Currency',
|
'fieldtype': u'Currency',
|
||||||
|
'hidden': 0,
|
||||||
'in_filter': 1,
|
'in_filter': 1,
|
||||||
'label': u'Actual Quantity',
|
'label': u'Actual Quantity',
|
||||||
'oldfieldname': u'actual_qty',
|
'oldfieldname': u'actual_qty',
|
||||||
'oldfieldtype': u'Currency',
|
'oldfieldtype': u'Currency',
|
||||||
'permlevel': 1,
|
'permlevel': 1,
|
||||||
|
'print_hide': 0,
|
||||||
|
'reqd': 0,
|
||||||
'width': u'150px'
|
'width': u'150px'
|
||||||
},
|
},
|
||||||
|
|
||||||
@ -264,10 +292,13 @@
|
|||||||
'doctype': u'DocField',
|
'doctype': u'DocField',
|
||||||
'fieldname': u'incoming_rate',
|
'fieldname': u'incoming_rate',
|
||||||
'fieldtype': u'Currency',
|
'fieldtype': u'Currency',
|
||||||
|
'hidden': 0,
|
||||||
'label': u'Incoming Rate',
|
'label': u'Incoming Rate',
|
||||||
'oldfieldname': u'incoming_rate',
|
'oldfieldname': u'incoming_rate',
|
||||||
'oldfieldtype': u'Currency',
|
'oldfieldtype': u'Currency',
|
||||||
'permlevel': 0
|
'permlevel': 0,
|
||||||
|
'print_hide': 0,
|
||||||
|
'reqd': 0
|
||||||
},
|
},
|
||||||
|
|
||||||
# DocField
|
# DocField
|
||||||
@ -275,10 +306,13 @@
|
|||||||
'doctype': u'DocField',
|
'doctype': u'DocField',
|
||||||
'fieldname': u'stock_uom',
|
'fieldname': u'stock_uom',
|
||||||
'fieldtype': u'Data',
|
'fieldtype': u'Data',
|
||||||
|
'hidden': 0,
|
||||||
'label': u'Stock UOM',
|
'label': u'Stock UOM',
|
||||||
'oldfieldname': u'stock_uom',
|
'oldfieldname': u'stock_uom',
|
||||||
'oldfieldtype': u'Data',
|
'oldfieldtype': u'Data',
|
||||||
'permlevel': 1,
|
'permlevel': 1,
|
||||||
|
'print_hide': 0,
|
||||||
|
'reqd': 0,
|
||||||
'width': u'150px'
|
'width': u'150px'
|
||||||
},
|
},
|
||||||
|
|
||||||
@ -287,11 +321,14 @@
|
|||||||
'doctype': u'DocField',
|
'doctype': u'DocField',
|
||||||
'fieldname': u'bin_aqat',
|
'fieldname': u'bin_aqat',
|
||||||
'fieldtype': u'Currency',
|
'fieldtype': u'Currency',
|
||||||
|
'hidden': 0,
|
||||||
'in_filter': 1,
|
'in_filter': 1,
|
||||||
'label': u'Bin Actual Qty After Transaction',
|
'label': u'Bin Actual Qty After Transaction',
|
||||||
'oldfieldname': u'bin_aqat',
|
'oldfieldname': u'bin_aqat',
|
||||||
'oldfieldtype': u'Currency',
|
'oldfieldtype': u'Currency',
|
||||||
'permlevel': 1,
|
'permlevel': 1,
|
||||||
|
'print_hide': 0,
|
||||||
|
'reqd': 0,
|
||||||
'width': u'150px'
|
'width': u'150px'
|
||||||
},
|
},
|
||||||
|
|
||||||
@ -306,7 +343,8 @@
|
|||||||
'oldfieldtype': u'Currency',
|
'oldfieldtype': u'Currency',
|
||||||
'permlevel': 0,
|
'permlevel': 0,
|
||||||
'print_hide': 1,
|
'print_hide': 1,
|
||||||
'report_hide': 1
|
'report_hide': 1,
|
||||||
|
'reqd': 0
|
||||||
},
|
},
|
||||||
|
|
||||||
# DocField
|
# DocField
|
||||||
@ -320,7 +358,8 @@
|
|||||||
'oldfieldtype': u'Currency',
|
'oldfieldtype': u'Currency',
|
||||||
'permlevel': 0,
|
'permlevel': 0,
|
||||||
'print_hide': 1,
|
'print_hide': 1,
|
||||||
'report_hide': 1
|
'report_hide': 1,
|
||||||
|
'reqd': 0
|
||||||
},
|
},
|
||||||
|
|
||||||
# DocField
|
# DocField
|
||||||
@ -328,10 +367,13 @@
|
|||||||
'doctype': u'DocField',
|
'doctype': u'DocField',
|
||||||
'fieldname': u'valuation_rate',
|
'fieldname': u'valuation_rate',
|
||||||
'fieldtype': u'Currency',
|
'fieldtype': u'Currency',
|
||||||
|
'hidden': 0,
|
||||||
'label': u'Valuation Rate',
|
'label': u'Valuation Rate',
|
||||||
'oldfieldname': u'valuation_rate',
|
'oldfieldname': u'valuation_rate',
|
||||||
'oldfieldtype': u'Currency',
|
'oldfieldtype': u'Currency',
|
||||||
'permlevel': 0,
|
'permlevel': 0,
|
||||||
|
'print_hide': 0,
|
||||||
|
'reqd': 0,
|
||||||
'width': u'150px'
|
'width': u'150px'
|
||||||
},
|
},
|
||||||
|
|
||||||
@ -340,14 +382,18 @@
|
|||||||
'doctype': u'DocField',
|
'doctype': u'DocField',
|
||||||
'fieldname': u'stock_value',
|
'fieldname': u'stock_value',
|
||||||
'fieldtype': u'Currency',
|
'fieldtype': u'Currency',
|
||||||
|
'hidden': 0,
|
||||||
'label': u'Stock Value',
|
'label': u'Stock Value',
|
||||||
'oldfieldname': u'stock_value',
|
'oldfieldname': u'stock_value',
|
||||||
'oldfieldtype': u'Currency',
|
'oldfieldtype': u'Currency',
|
||||||
'permlevel': 0
|
'permlevel': 0,
|
||||||
|
'print_hide': 0,
|
||||||
|
'reqd': 0
|
||||||
},
|
},
|
||||||
|
|
||||||
# DocField
|
# DocField
|
||||||
{
|
{
|
||||||
|
'colour': u'White:FFF',
|
||||||
'doctype': u'DocField',
|
'doctype': u'DocField',
|
||||||
'fieldname': u'fcfs_stack',
|
'fieldname': u'fcfs_stack',
|
||||||
'fieldtype': u'Text',
|
'fieldtype': u'Text',
|
||||||
@ -359,6 +405,7 @@
|
|||||||
'permlevel': 2,
|
'permlevel': 2,
|
||||||
'print_hide': 1,
|
'print_hide': 1,
|
||||||
'report_hide': 1,
|
'report_hide': 1,
|
||||||
|
'reqd': 0,
|
||||||
'search_index': 0
|
'search_index': 0
|
||||||
},
|
},
|
||||||
|
|
||||||
@ -367,13 +414,16 @@
|
|||||||
'doctype': u'DocField',
|
'doctype': u'DocField',
|
||||||
'fieldname': u'company',
|
'fieldname': u'company',
|
||||||
'fieldtype': u'Select',
|
'fieldtype': u'Select',
|
||||||
|
'hidden': 0,
|
||||||
'in_filter': 1,
|
'in_filter': 1,
|
||||||
'label': u'Company',
|
'label': u'Company',
|
||||||
'oldfieldname': u'company',
|
'oldfieldname': u'company',
|
||||||
'oldfieldtype': u'Data',
|
'oldfieldtype': u'Data',
|
||||||
'options': u'link:Company',
|
'options': u'\nWeb Notes Technologies Pvt Ltd',
|
||||||
'permlevel': 1,
|
'permlevel': 1,
|
||||||
'search_index': 0,
|
'print_hide': 0,
|
||||||
|
'reqd': 0,
|
||||||
|
'search_index': 1,
|
||||||
'width': u'150px'
|
'width': u'150px'
|
||||||
},
|
},
|
||||||
|
|
||||||
@ -382,12 +432,15 @@
|
|||||||
'doctype': u'DocField',
|
'doctype': u'DocField',
|
||||||
'fieldname': u'fiscal_year',
|
'fieldname': u'fiscal_year',
|
||||||
'fieldtype': u'Data',
|
'fieldtype': u'Data',
|
||||||
|
'hidden': 0,
|
||||||
'in_filter': 1,
|
'in_filter': 1,
|
||||||
'label': u'Fiscal Year',
|
'label': u'Fiscal Year',
|
||||||
'oldfieldname': u'fiscal_year',
|
'oldfieldname': u'fiscal_year',
|
||||||
'oldfieldtype': u'Data',
|
'oldfieldtype': u'Data',
|
||||||
'permlevel': 1,
|
'permlevel': 1,
|
||||||
'search_index': 0,
|
'print_hide': 0,
|
||||||
|
'reqd': 0,
|
||||||
|
'search_index': 1,
|
||||||
'width': u'150px'
|
'width': u'150px'
|
||||||
},
|
},
|
||||||
|
|
||||||
@ -396,13 +449,16 @@
|
|||||||
'doctype': u'DocField',
|
'doctype': u'DocField',
|
||||||
'fieldname': u'is_cancelled',
|
'fieldname': u'is_cancelled',
|
||||||
'fieldtype': u'Select',
|
'fieldtype': u'Select',
|
||||||
|
'hidden': 0,
|
||||||
'in_filter': 1,
|
'in_filter': 1,
|
||||||
'label': u'Is Cancelled',
|
'label': u'Is Cancelled',
|
||||||
'oldfieldname': u'is_cancelled',
|
'oldfieldname': u'is_cancelled',
|
||||||
'oldfieldtype': u'Select',
|
'oldfieldtype': u'Select',
|
||||||
'options': u'\nYes\nNo',
|
'options': u'\nYes\nNo',
|
||||||
'permlevel': 1,
|
'permlevel': 1,
|
||||||
'search_index': 0,
|
'print_hide': 0,
|
||||||
|
'reqd': 0,
|
||||||
|
'search_index': 1,
|
||||||
'width': u'100px'
|
'width': u'100px'
|
||||||
},
|
},
|
||||||
|
|
||||||
@ -411,13 +467,16 @@
|
|||||||
'doctype': u'DocField',
|
'doctype': u'DocField',
|
||||||
'fieldname': u'is_stock_entry',
|
'fieldname': u'is_stock_entry',
|
||||||
'fieldtype': u'Select',
|
'fieldtype': u'Select',
|
||||||
|
'hidden': 0,
|
||||||
'in_filter': 1,
|
'in_filter': 1,
|
||||||
'label': u'Is Stock Entry',
|
'label': u'Is Stock Entry',
|
||||||
'oldfieldname': u'is_stock_entry',
|
'oldfieldname': u'is_stock_entry',
|
||||||
'oldfieldtype': u'Select',
|
'oldfieldtype': u'Select',
|
||||||
'options': u'\nYes\nNo',
|
'options': u'\nYes\nNo',
|
||||||
'permlevel': 1,
|
'permlevel': 1,
|
||||||
'search_index': 0,
|
'print_hide': 0,
|
||||||
|
'reqd': 0,
|
||||||
|
'search_index': 1,
|
||||||
'width': u'100px'
|
'width': u'100px'
|
||||||
}
|
}
|
||||||
]
|
]
|
Loading…
x
Reference in New Issue
Block a user