mirror of
https://github.com/frappe/erpnext.git
synced 2026-05-25 07:54:46 +00:00
merge
This commit is contained in:
@@ -18,10 +18,10 @@ from __future__ import unicode_literals
|
||||
import webnotes
|
||||
|
||||
from webnotes.utils import cstr, flt, getdate
|
||||
from webnotes.model import db_exists
|
||||
from webnotes.model.wrapper import getlist, copy_doclist
|
||||
from webnotes.model.wrapper import getlist
|
||||
from webnotes.model.code import get_obj
|
||||
from webnotes import msgprint
|
||||
from setup.utils import get_company_currency
|
||||
|
||||
sql = webnotes.conn.sql
|
||||
|
||||
@@ -149,7 +149,7 @@ class DocType(TransactionBase):
|
||||
sales_com_obj.check_conversion_rate(self)
|
||||
|
||||
# Get total in Words
|
||||
dcc = TransactionBase().get_company_currency(self.doc.company)
|
||||
dcc = get_company_currency(self.doc.company)
|
||||
self.doc.in_words = sales_com_obj.get_total_in_words(dcc, self.doc.rounded_total)
|
||||
self.doc.in_words_export = sales_com_obj.get_total_in_words(self.doc.currency, self.doc.rounded_total_export)
|
||||
|
||||
|
||||
@@ -2,9 +2,9 @@
|
||||
{
|
||||
"owner": "Administrator",
|
||||
"docstatus": 0,
|
||||
"creation": "2013-01-16 11:35:56",
|
||||
"creation": "2013-01-17 10:57:15",
|
||||
"modified_by": "Administrator",
|
||||
"modified": "2013-01-19 12:09:54"
|
||||
"modified": "2013-01-17 11:22:07"
|
||||
},
|
||||
{
|
||||
"allow_attach": 1,
|
||||
@@ -35,6 +35,7 @@
|
||||
"parenttype": "DocType",
|
||||
"report": 1,
|
||||
"permlevel": 0,
|
||||
"amend": 0,
|
||||
"parentfield": "permissions"
|
||||
},
|
||||
{
|
||||
@@ -50,15 +51,6 @@
|
||||
"fieldtype": "Section Break",
|
||||
"permlevel": 0
|
||||
},
|
||||
{
|
||||
"oldfieldtype": "Small Text",
|
||||
"doctype": "DocField",
|
||||
"label": "Trash Reason",
|
||||
"oldfieldname": "trash_reason",
|
||||
"fieldname": "trash_reason",
|
||||
"fieldtype": "Small Text",
|
||||
"permlevel": 1
|
||||
},
|
||||
{
|
||||
"description": "Item will be saved by this name in the data base.",
|
||||
"oldfieldtype": "Data",
|
||||
@@ -598,18 +590,6 @@
|
||||
"depends_on": "eval:doc.is_sales_item==\"Yes\"",
|
||||
"permlevel": 0
|
||||
},
|
||||
{
|
||||
"description": "Create a price list from Price List master and enter standard ref rates against each of them. On selection of a price list in Quotation, Sales Order or Delivery Note, corresponding ref rate will be fetched for this item.",
|
||||
"oldfieldtype": "Table",
|
||||
"doctype": "DocField",
|
||||
"label": "Item Prices",
|
||||
"oldfieldname": "ref_rate_details",
|
||||
"options": "Item Price",
|
||||
"fieldname": "ref_rate_details",
|
||||
"fieldtype": "Table",
|
||||
"depends_on": "eval:doc.is_sales_item==\"Yes\"",
|
||||
"permlevel": 0
|
||||
},
|
||||
{
|
||||
"description": "For the convenience of customers, these codes can be used in print formats like Invoices and Delivery Notes",
|
||||
"depends_on": "eval:doc.is_sales_item==\"Yes\"",
|
||||
@@ -638,6 +618,25 @@
|
||||
"fieldtype": "Table",
|
||||
"permlevel": 0
|
||||
},
|
||||
{
|
||||
"doctype": "DocField",
|
||||
"label": "Price Lists and Rates",
|
||||
"fieldname": "price_list_section",
|
||||
"fieldtype": "Section Break",
|
||||
"permlevel": 0
|
||||
},
|
||||
{
|
||||
"description": "Create a price list from Price List master and enter standard ref rates against each of them. On selection of a price list in Quotation, Sales Order or Delivery Note, corresponding ref rate will be fetched for this item.",
|
||||
"oldfieldtype": "Table",
|
||||
"doctype": "DocField",
|
||||
"label": "Item Prices",
|
||||
"oldfieldname": "ref_rate_details",
|
||||
"options": "Item Price",
|
||||
"fieldname": "ref_rate_details",
|
||||
"fieldtype": "Table",
|
||||
"depends_on": "eval:doc.is_sales_item==\"Yes\"",
|
||||
"permlevel": 0
|
||||
},
|
||||
{
|
||||
"oldfieldtype": "Section Break",
|
||||
"doctype": "DocField",
|
||||
|
||||
@@ -2,31 +2,24 @@
|
||||
{
|
||||
"owner": "Administrator",
|
||||
"docstatus": 0,
|
||||
"creation": "2012-03-27 14:36:36",
|
||||
"creation": "2013-01-15 18:43:18",
|
||||
"modified_by": "Administrator",
|
||||
"modified": "2012-03-27 14:36:36"
|
||||
"modified": "2013-01-17 17:53:42"
|
||||
},
|
||||
{
|
||||
"section_style": "Tray",
|
||||
"istable": 1,
|
||||
"in_create": 1,
|
||||
"module": "Stock",
|
||||
"server_code_error": " ",
|
||||
"read_only": 0,
|
||||
"istable": 1,
|
||||
"autoname": "RFD/.#####",
|
||||
"name": "__common__",
|
||||
"colour": "White:FFF",
|
||||
"in_create": 1,
|
||||
"doctype": "DocType",
|
||||
"show_in_menu": 0,
|
||||
"version": 3
|
||||
"module": "Stock",
|
||||
"name": "__common__"
|
||||
},
|
||||
{
|
||||
"name": "__common__",
|
||||
"parent": "Item Price",
|
||||
"search_index": 1,
|
||||
"doctype": "DocField",
|
||||
"parenttype": "DocType",
|
||||
"in_filter": 1,
|
||||
"permlevel": 0,
|
||||
"parentfield": "fields"
|
||||
},
|
||||
@@ -40,9 +33,11 @@
|
||||
"label": "Price List Name",
|
||||
"oldfieldname": "price_list_name",
|
||||
"fieldname": "price_list_name",
|
||||
"fieldtype": "Select",
|
||||
"fieldtype": "Link",
|
||||
"search_index": 1,
|
||||
"reqd": 1,
|
||||
"options": "link:Price List"
|
||||
"options": "Price List",
|
||||
"in_filter": 1
|
||||
},
|
||||
{
|
||||
"oldfieldtype": "Currency",
|
||||
@@ -51,7 +46,9 @@
|
||||
"oldfieldname": "ref_rate",
|
||||
"fieldname": "ref_rate",
|
||||
"fieldtype": "Currency",
|
||||
"reqd": 0
|
||||
"search_index": 0,
|
||||
"reqd": 0,
|
||||
"in_filter": 1
|
||||
},
|
||||
{
|
||||
"oldfieldtype": "Select",
|
||||
@@ -60,7 +57,23 @@
|
||||
"oldfieldname": "ref_currency",
|
||||
"fieldname": "ref_currency",
|
||||
"fieldtype": "Select",
|
||||
"search_index": 1,
|
||||
"reqd": 1,
|
||||
"options": "link:Currency"
|
||||
"options": "link:Currency",
|
||||
"in_filter": 1
|
||||
},
|
||||
{
|
||||
"description": "Allow this price in sales related forms",
|
||||
"doctype": "DocField",
|
||||
"label": "For Selling",
|
||||
"fieldname": "selling",
|
||||
"fieldtype": "Check"
|
||||
},
|
||||
{
|
||||
"description": "Allow this price in purchase related forms",
|
||||
"doctype": "DocField",
|
||||
"label": "For Buying",
|
||||
"fieldname": "buying",
|
||||
"fieldtype": "Check"
|
||||
}
|
||||
]
|
||||
@@ -22,6 +22,29 @@ wn.require('app/accounts/doctype/purchase_taxes_and_charges_master/purchase_taxe
|
||||
wn.require('app/buying/doctype/purchase_common/purchase_common.js');
|
||||
wn.require('app/utilities/doctype/sms_control/sms_control.js');
|
||||
|
||||
erpnext.buying.PurchaseReceiptController = erpnext.buying.BuyingController.extend({
|
||||
refresh: function() {
|
||||
this._super();
|
||||
|
||||
if(this.frm.doc.docstatus == 1) {
|
||||
if(flt(this.frm.doc.per_billed, 2) < 100) {
|
||||
cur_frm.add_custom_button('Make Purchase Invoice',
|
||||
cur_frm.cscript['Make Purchase Invoice']);
|
||||
}
|
||||
cur_frm.add_custom_button('Send SMS', cur_frm.cscript['Send SMS']);
|
||||
}
|
||||
|
||||
if(wn.boot.control_panel.country == 'India') {
|
||||
unhide_field(['challan_no', 'challan_date']);
|
||||
}
|
||||
}
|
||||
});
|
||||
|
||||
var new_cscript = new erpnext.buying.PurchaseReceiptController({frm: cur_frm});
|
||||
|
||||
// for backward compatibility: combine new and previous states
|
||||
$.extend(cur_frm.cscript, new_cscript);
|
||||
|
||||
//========================== On Load ================================================================
|
||||
cur_frm.cscript.onload = function(doc, cdt, cdn) {
|
||||
if(!doc.fiscal_year && doc.__islocal){ wn.model.set_default_values(doc);}
|
||||
@@ -38,26 +61,6 @@ cur_frm.cscript.onload_post_render = function(doc, dt, dn) {
|
||||
cur_frm.cscript.dynamic_label(doc, dt, dn, callback);
|
||||
}
|
||||
|
||||
//========================== Refresh ===============================================================
|
||||
cur_frm.cscript.refresh = function(doc, cdt, cdn) {
|
||||
cur_frm.clear_custom_buttons();
|
||||
|
||||
erpnext.hide_naming_series();
|
||||
if(doc.supplier) $(cur_frm.fields_dict.contact_section.row.wrapper).toggle(true);
|
||||
else $(cur_frm.fields_dict.contact_section.row.wrapper).toggle(false);
|
||||
|
||||
if (!cur_frm.cscript.is_onload) cur_frm.cscript.dynamic_label(doc, cdt, cdn);
|
||||
|
||||
if(doc.docstatus == 1){
|
||||
if (flt(doc.per_billed, 2) < 100) cur_frm.add_custom_button('Make Purchase Invoice', cur_frm.cscript['Make Purchase Invoice']);
|
||||
cur_frm.add_custom_button('Send SMS', cur_frm.cscript['Send SMS']);
|
||||
}
|
||||
|
||||
if(wn.boot.control_panel.country == 'India') {
|
||||
unhide_field(['challan_no', 'challan_date']);
|
||||
}
|
||||
}
|
||||
|
||||
//Supplier
|
||||
cur_frm.cscript.supplier = function(doc,dt,dn) {
|
||||
if (doc.supplier) {
|
||||
@@ -65,7 +68,6 @@ cur_frm.cscript.supplier = function(doc,dt,dn) {
|
||||
JSON.stringify({ supplier: doc.supplier }),'', doc, dt, dn, 1, function() {
|
||||
cur_frm.refresh();
|
||||
});
|
||||
$(cur_frm.fields_dict.contact_section.row.wrapper).toggle(true);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -18,18 +18,16 @@ from __future__ import unicode_literals
|
||||
import webnotes
|
||||
|
||||
from webnotes.utils import cstr, flt, get_defaults, getdate
|
||||
from webnotes.model import db_exists
|
||||
from webnotes.model.doc import addchild, make_autoname
|
||||
from webnotes.model.wrapper import getlist, copy_doclist
|
||||
from webnotes.model.doc import addchild
|
||||
from webnotes.model.wrapper import getlist
|
||||
from webnotes.model.code import get_obj
|
||||
from webnotes import msgprint
|
||||
from setup.utils import get_company_currency
|
||||
|
||||
sql = webnotes.conn.sql
|
||||
|
||||
|
||||
from utilities.transaction_base import TransactionBase
|
||||
|
||||
class DocType(TransactionBase):
|
||||
from controllers.buying_controller import BuyingController
|
||||
class DocType(BuyingController):
|
||||
def __init__(self, doc, doclist=[]):
|
||||
self.doc = doc
|
||||
self.doclist = doclist
|
||||
@@ -38,32 +36,9 @@ class DocType(TransactionBase):
|
||||
self.fname = 'purchase_receipt_details'
|
||||
self.count = 0
|
||||
|
||||
# Autoname
|
||||
# ---------
|
||||
def autoname(self):
|
||||
self.doc.name = make_autoname(self.doc.naming_series+'.#####')
|
||||
|
||||
def validate_fiscal_year(self):
|
||||
get_obj(dt = 'Purchase Common').validate_fiscal_year(self.doc.fiscal_year,self.doc.posting_date,'Transaction Date')
|
||||
|
||||
def get_item_details(self, arg = ''):
|
||||
if arg:
|
||||
return get_obj(dt='Purchase Common').get_item_details(self,arg)
|
||||
else:
|
||||
import json
|
||||
obj = get_obj('Purchase Common')
|
||||
for doc in self.doclist:
|
||||
if doc.fields.get('item_code'):
|
||||
temp = {
|
||||
'item_code': doc.fields.get('item_code'),
|
||||
'warehouse': doc.fields.get('warehouse')
|
||||
}
|
||||
ret = obj.get_item_details(self, json.dumps(temp))
|
||||
for r in ret:
|
||||
if not doc.fields.get(r):
|
||||
doc.fields[r] = ret[r]
|
||||
|
||||
|
||||
# GET TERMS & CONDITIONS
|
||||
# =====================================================================================
|
||||
def get_tc_details(self):
|
||||
@@ -125,14 +100,6 @@ class DocType(TransactionBase):
|
||||
#d.valuation_rate = (flt(d.purchase_rate) + ((flt(d.amount) * (total_b_cost)) / (self.doc.net_total * flt(d.qty))) + (flt(d.rm_supp_cost) / flt(d.qty))) / flt(d.conversion_factor)
|
||||
d.valuation_rate = (flt(d.purchase_rate) + ((flt(d.amount) * (total_b_cost)) / (self.doc.net_total * flt(d.qty))) + (flt(d.rm_supp_cost) / flt(d.qty)) + (flt(d.item_tax_amount)/flt(d.qty))) / flt(d.conversion_factor)
|
||||
|
||||
# Check for Stopped status
|
||||
def check_for_stopped_status(self, pc_obj):
|
||||
check_list =[]
|
||||
for d in getlist(self.doclist, 'purchase_receipt_details'):
|
||||
if d.fields.has_key('prevdoc_docname') and d.prevdoc_docname and d.prevdoc_docname not in check_list:
|
||||
check_list.append(d.prevdoc_docname)
|
||||
pc_obj.check_for_stopped_status( d.prevdoc_doctype, d.prevdoc_docname)
|
||||
|
||||
#check in manage account if purchase order required or not.
|
||||
# ====================================================================================
|
||||
def po_required(self):
|
||||
@@ -146,6 +113,8 @@ class DocType(TransactionBase):
|
||||
|
||||
# validate
|
||||
def validate(self):
|
||||
super(DocType, self).validate()
|
||||
|
||||
self.po_required()
|
||||
self.validate_fiscal_year()
|
||||
|
||||
@@ -163,13 +132,12 @@ class DocType(TransactionBase):
|
||||
pc_obj = get_obj(dt='Purchase Common')
|
||||
pc_obj.validate_for_items(self)
|
||||
pc_obj.validate_mandatory(self)
|
||||
pc_obj.validate_conversion_rate(self)
|
||||
pc_obj.get_prevdoc_date(self)
|
||||
pc_obj.validate_reference_value(self)
|
||||
self.check_for_stopped_status(pc_obj)
|
||||
|
||||
# get total in words
|
||||
dcc = TransactionBase().get_company_currency(self.doc.company)
|
||||
dcc = get_company_currency(self.doc.company)
|
||||
self.doc.in_words = pc_obj.get_total_in_words(dcc, self.doc.grand_total)
|
||||
self.doc.in_words_import = pc_obj.get_total_in_words(self.doc.currency, self.doc.grand_total_import)
|
||||
# update valuation rate
|
||||
@@ -255,7 +223,6 @@ class DocType(TransactionBase):
|
||||
self.values.append({
|
||||
'item_code' : d.fields.has_key('item_code') and d.item_code or d.rm_item_code,
|
||||
'warehouse' : wh,
|
||||
'transaction_date' : getdate(self.doc.modified).strftime('%Y-%m-%d'),
|
||||
'posting_date' : self.doc.posting_date,
|
||||
'posting_time' : self.doc.posting_time,
|
||||
'voucher_type' : 'Purchase Receipt',
|
||||
@@ -287,7 +254,6 @@ class DocType(TransactionBase):
|
||||
check_list.append(d.prevdoc_docname)
|
||||
pc_obj.check_for_stopped_status( d.prevdoc_doctype, d.prevdoc_docname)
|
||||
|
||||
|
||||
# on submit
|
||||
def on_submit(self):
|
||||
purchase_controller = webnotes.get_obj("Purchase Common")
|
||||
|
||||
@@ -2,13 +2,14 @@
|
||||
{
|
||||
"owner": "Administrator",
|
||||
"docstatus": 0,
|
||||
"creation": "2012-07-17 13:24:57",
|
||||
"creation": "2013-01-18 12:47:03",
|
||||
"modified_by": "Administrator",
|
||||
"modified": "2012-12-03 17:10:41"
|
||||
"modified": "2013-01-18 13:25:36"
|
||||
},
|
||||
{
|
||||
"is_submittable": 1,
|
||||
"autoname": "naming_series:",
|
||||
"allow_attach": 1,
|
||||
"is_submittable": 1,
|
||||
"search_fields": "status, posting_date, supplier",
|
||||
"module": "Stock",
|
||||
"doctype": "DocType",
|
||||
@@ -36,6 +37,7 @@
|
||||
"doctype": "DocType"
|
||||
},
|
||||
{
|
||||
"print_width": "50%",
|
||||
"oldfieldtype": "Column Break",
|
||||
"doctype": "DocField",
|
||||
"width": "50%",
|
||||
@@ -48,7 +50,6 @@
|
||||
"description": "To manage multiple series please go to Setup > Manage Series",
|
||||
"no_copy": 1,
|
||||
"oldfieldtype": "Select",
|
||||
"colour": "White:FFF",
|
||||
"doctype": "DocField",
|
||||
"label": "Series",
|
||||
"oldfieldname": "naming_series",
|
||||
@@ -60,15 +61,14 @@
|
||||
},
|
||||
{
|
||||
"print_hide": 1,
|
||||
"print_width": "150px",
|
||||
"permlevel": 0,
|
||||
"oldfieldtype": "Link",
|
||||
"colour": "White:FFF",
|
||||
"allow_on_submit": 0,
|
||||
"doctype": "DocField",
|
||||
"label": "Supplier",
|
||||
"oldfieldname": "supplier",
|
||||
"width": "150px",
|
||||
"trigger": "Client",
|
||||
"fieldname": "supplier",
|
||||
"fieldtype": "Link",
|
||||
"search_index": 1,
|
||||
@@ -118,6 +118,7 @@
|
||||
"permlevel": 1
|
||||
},
|
||||
{
|
||||
"print_width": "50%",
|
||||
"oldfieldtype": "Column Break",
|
||||
"doctype": "DocField",
|
||||
"width": "50%",
|
||||
@@ -128,9 +129,9 @@
|
||||
{
|
||||
"print_hide": 1,
|
||||
"description": "The date at which current entry will get or has actually executed.",
|
||||
"print_width": "100px",
|
||||
"no_copy": 1,
|
||||
"oldfieldtype": "Date",
|
||||
"colour": "White:FFF",
|
||||
"doctype": "DocField",
|
||||
"label": "Posting Date",
|
||||
"oldfieldname": "posting_date",
|
||||
@@ -145,9 +146,9 @@
|
||||
{
|
||||
"print_hide": 1,
|
||||
"description": "Time at which materials were received",
|
||||
"print_width": "100px",
|
||||
"no_copy": 1,
|
||||
"oldfieldtype": "Time",
|
||||
"colour": "White:FFF",
|
||||
"doctype": "DocField",
|
||||
"label": "Posting Time",
|
||||
"oldfieldname": "posting_time",
|
||||
@@ -161,9 +162,9 @@
|
||||
},
|
||||
{
|
||||
"print_hide": 0,
|
||||
"print_width": "100px",
|
||||
"no_copy": 1,
|
||||
"oldfieldtype": "Data",
|
||||
"colour": "White:FFF",
|
||||
"doctype": "DocField",
|
||||
"label": "Challan No",
|
||||
"oldfieldname": "challan_no",
|
||||
@@ -176,9 +177,9 @@
|
||||
},
|
||||
{
|
||||
"print_hide": 0,
|
||||
"print_width": "100px",
|
||||
"no_copy": 1,
|
||||
"oldfieldtype": "Date",
|
||||
"colour": "White:FFF",
|
||||
"doctype": "DocField",
|
||||
"label": "Challan Date",
|
||||
"oldfieldname": "challan_date",
|
||||
@@ -191,7 +192,6 @@
|
||||
},
|
||||
{
|
||||
"oldfieldtype": "Section Break",
|
||||
"colour": "White:FFF",
|
||||
"doctype": "DocField",
|
||||
"label": "Items",
|
||||
"fieldname": "items",
|
||||
@@ -200,8 +200,8 @@
|
||||
},
|
||||
{
|
||||
"print_hide": 0,
|
||||
"allow_on_submit": 1,
|
||||
"oldfieldtype": "Table",
|
||||
"allow_on_submit": 1,
|
||||
"doctype": "DocField",
|
||||
"label": "Purchase Receipt Items",
|
||||
"oldfieldname": "purchase_receipt_details",
|
||||
@@ -213,44 +213,12 @@
|
||||
},
|
||||
{
|
||||
"oldfieldtype": "Section Break",
|
||||
"colour": "White:FFF",
|
||||
"doctype": "DocField",
|
||||
"options": "Simple",
|
||||
"fieldname": "section_break0",
|
||||
"fieldtype": "Section Break",
|
||||
"permlevel": 0
|
||||
},
|
||||
{
|
||||
"print_hide": 1,
|
||||
"oldfieldtype": "Currency",
|
||||
"doctype": "DocField",
|
||||
"label": "Net Total",
|
||||
"oldfieldname": "net_total",
|
||||
"width": "150px",
|
||||
"fieldname": "net_total",
|
||||
"fieldtype": "Currency",
|
||||
"reqd": 1,
|
||||
"permlevel": 1
|
||||
},
|
||||
{
|
||||
"print_hide": 1,
|
||||
"oldfieldtype": "Currency",
|
||||
"doctype": "DocField",
|
||||
"label": "Net Total (Import)",
|
||||
"oldfieldname": "net_total_import",
|
||||
"fieldname": "net_total_import",
|
||||
"fieldtype": "Currency",
|
||||
"permlevel": 1
|
||||
},
|
||||
{
|
||||
"oldfieldtype": "Button",
|
||||
"doctype": "DocField",
|
||||
"label": "Re-Calculate Values",
|
||||
"trigger": "Client",
|
||||
"fieldname": "recalculate_values",
|
||||
"fieldtype": "Button",
|
||||
"permlevel": 0
|
||||
},
|
||||
{
|
||||
"print_hide": 1,
|
||||
"oldfieldtype": "Button",
|
||||
@@ -262,6 +230,83 @@
|
||||
"permlevel": 0
|
||||
},
|
||||
{
|
||||
"doctype": "DocField",
|
||||
"fieldname": "column_break_18",
|
||||
"fieldtype": "Column Break",
|
||||
"permlevel": 0
|
||||
},
|
||||
{
|
||||
"oldfieldtype": "Button",
|
||||
"doctype": "DocField",
|
||||
"label": "Re-Calculate Values",
|
||||
"fieldname": "recalculate_values",
|
||||
"fieldtype": "Button",
|
||||
"permlevel": 0
|
||||
},
|
||||
{
|
||||
"doctype": "DocField",
|
||||
"fieldname": "section_break_20",
|
||||
"fieldtype": "Section Break",
|
||||
"permlevel": 0
|
||||
},
|
||||
{
|
||||
"print_hide": 0,
|
||||
"description": "You can make a purchase receipt from multiple purchase orders. Select purchase orders one by one and click on the button below.",
|
||||
"no_copy": 1,
|
||||
"oldfieldtype": "Link",
|
||||
"doctype": "DocField",
|
||||
"label": "Purchase Order",
|
||||
"oldfieldname": "purchase_order_no",
|
||||
"options": "Purchase Order",
|
||||
"fieldname": "purchase_order_no",
|
||||
"fieldtype": "Link",
|
||||
"permlevel": 0
|
||||
},
|
||||
{
|
||||
"print_hide": 1,
|
||||
"oldfieldtype": "Button",
|
||||
"doctype": "DocField",
|
||||
"label": "Pull Purchase Order Details",
|
||||
"options": "get_po_details",
|
||||
"fieldname": "pull_purchase_order_details",
|
||||
"fieldtype": "Button",
|
||||
"permlevel": 0
|
||||
},
|
||||
{
|
||||
"doctype": "DocField",
|
||||
"label": "Currency & Price List",
|
||||
"fieldname": "currency_price_list",
|
||||
"fieldtype": "Section Break",
|
||||
"permlevel": 0
|
||||
},
|
||||
{
|
||||
"print_hide": 1,
|
||||
"description": "Supplier's currency",
|
||||
"oldfieldtype": "Select",
|
||||
"doctype": "DocField",
|
||||
"label": "Currency",
|
||||
"oldfieldname": "currency",
|
||||
"options": "link:Currency",
|
||||
"fieldname": "currency",
|
||||
"fieldtype": "Select",
|
||||
"reqd": 1,
|
||||
"permlevel": 0
|
||||
},
|
||||
{
|
||||
"print_hide": 1,
|
||||
"description": "Rate at which supplier's currency is converted to company's base currency",
|
||||
"default": "1.00",
|
||||
"oldfieldtype": "Currency",
|
||||
"doctype": "DocField",
|
||||
"label": "Exchange Rate",
|
||||
"oldfieldname": "conversion_rate",
|
||||
"fieldname": "conversion_rate",
|
||||
"fieldtype": "Float",
|
||||
"reqd": 1,
|
||||
"permlevel": 0
|
||||
},
|
||||
{
|
||||
"print_width": "50%",
|
||||
"oldfieldtype": "Column Break",
|
||||
"doctype": "DocField",
|
||||
"width": "50%",
|
||||
@@ -271,62 +316,37 @@
|
||||
},
|
||||
{
|
||||
"print_hide": 1,
|
||||
"description": "Supplier's currency",
|
||||
"oldfieldtype": "Select",
|
||||
"colour": "White:FFF",
|
||||
"description": "Consider this Price List for fetching rate. (only which have \"For Buying\" as checked)",
|
||||
"doctype": "DocField",
|
||||
"label": "Currency",
|
||||
"oldfieldname": "currency",
|
||||
"permlevel": 0,
|
||||
"fieldname": "currency",
|
||||
"fieldtype": "Select",
|
||||
"reqd": 1,
|
||||
"options": "link:Currency"
|
||||
},
|
||||
{
|
||||
"print_hide": 1,
|
||||
"description": "Rate at which supplier's currency is converted to company's base currency",
|
||||
"default": "1.00",
|
||||
"oldfieldtype": "Currency",
|
||||
"colour": "White:FFF",
|
||||
"doctype": "DocField",
|
||||
"label": "Conversion Rate",
|
||||
"oldfieldname": "conversion_rate",
|
||||
"trigger": "Client",
|
||||
"fieldname": "conversion_rate",
|
||||
"fieldtype": "Float",
|
||||
"reqd": 1,
|
||||
"label": "Price List",
|
||||
"options": "Price List",
|
||||
"fieldname": "price_list_name",
|
||||
"fieldtype": "Link",
|
||||
"permlevel": 0
|
||||
},
|
||||
{
|
||||
"print_hide": 0,
|
||||
"description": "You can make a purchase receipt from multiple purchase orders. Select purchase orders one by one and click on the button below.",
|
||||
"no_copy": 1,
|
||||
"oldfieldtype": "Link",
|
||||
"colour": "White:FFF",
|
||||
"print_hide": 1,
|
||||
"depends_on": "price_list_name",
|
||||
"doctype": "DocField",
|
||||
"label": "Purchase Order",
|
||||
"oldfieldname": "purchase_order_no",
|
||||
"permlevel": 0,
|
||||
"fieldname": "purchase_order_no",
|
||||
"label": "Price List Currency",
|
||||
"options": "Currency",
|
||||
"fieldname": "price_list_currency",
|
||||
"fieldtype": "Link",
|
||||
"options": "Purchase Order"
|
||||
"hidden": 0,
|
||||
"permlevel": 0
|
||||
},
|
||||
{
|
||||
"print_hide": 1,
|
||||
"oldfieldtype": "Button",
|
||||
"colour": "White:FFF",
|
||||
"depends_on": "price_list_name",
|
||||
"doctype": "DocField",
|
||||
"label": "Pull Purchase Order Details",
|
||||
"options": "get_po_details",
|
||||
"fieldname": "pull_purchase_order_details",
|
||||
"fieldtype": "Button",
|
||||
"label": "Price List Exchange Rate",
|
||||
"fieldname": "plc_conversion_rate",
|
||||
"fieldtype": "Float",
|
||||
"permlevel": 0
|
||||
},
|
||||
{
|
||||
"description": "Add / Edit Taxes and Charges",
|
||||
"oldfieldtype": "Section Break",
|
||||
"colour": "White:FFF",
|
||||
"doctype": "DocField",
|
||||
"label": "Taxes",
|
||||
"fieldname": "taxes",
|
||||
@@ -337,7 +357,6 @@
|
||||
"print_hide": 1,
|
||||
"description": "If you have created a standard template in Purchase Taxes and Charges Master, select one and click on the button below.",
|
||||
"oldfieldtype": "Link",
|
||||
"colour": "White:FFF",
|
||||
"doctype": "DocField",
|
||||
"label": "Purchase Taxes and Charges",
|
||||
"oldfieldname": "purchase_other_charges",
|
||||
@@ -371,21 +390,10 @@
|
||||
"oldfieldtype": "Button",
|
||||
"doctype": "DocField",
|
||||
"label": "Calculate Tax",
|
||||
"trigger": "Client",
|
||||
"fieldname": "calculate_tax",
|
||||
"fieldtype": "Button",
|
||||
"permlevel": 0
|
||||
},
|
||||
{
|
||||
"print_hide": 1,
|
||||
"oldfieldtype": "Currency",
|
||||
"doctype": "DocField",
|
||||
"label": "Total Tax",
|
||||
"oldfieldname": "total_tax",
|
||||
"fieldname": "total_tax",
|
||||
"fieldtype": "Currency",
|
||||
"permlevel": 1
|
||||
},
|
||||
{
|
||||
"print_hide": 1,
|
||||
"oldfieldtype": "HTML",
|
||||
@@ -398,7 +406,6 @@
|
||||
{
|
||||
"description": "Detailed Breakup of the totals",
|
||||
"oldfieldtype": "Section Break",
|
||||
"colour": "White:FFF",
|
||||
"doctype": "DocField",
|
||||
"label": "Totals",
|
||||
"fieldname": "totals",
|
||||
@@ -409,83 +416,12 @@
|
||||
"print_hide": 1,
|
||||
"oldfieldtype": "Currency",
|
||||
"doctype": "DocField",
|
||||
"label": "Grand Total",
|
||||
"oldfieldname": "grand_total",
|
||||
"fieldname": "grand_total",
|
||||
"label": "Net Total (Import)",
|
||||
"oldfieldname": "net_total_import",
|
||||
"fieldname": "net_total_import",
|
||||
"fieldtype": "Currency",
|
||||
"permlevel": 1
|
||||
},
|
||||
{
|
||||
"print_hide": 1,
|
||||
"oldfieldtype": "Currency",
|
||||
"colour": "White:FFF",
|
||||
"doctype": "DocField",
|
||||
"label": "Rounded Total",
|
||||
"oldfieldname": "rounded_total",
|
||||
"fieldname": "rounded_total",
|
||||
"fieldtype": "Currency",
|
||||
"permlevel": 1
|
||||
},
|
||||
{
|
||||
"print_hide": 1,
|
||||
"description": "In Words will be visible once you save the Purchase Receipt.",
|
||||
"oldfieldtype": "Data",
|
||||
"colour": "White:FFF",
|
||||
"doctype": "DocField",
|
||||
"label": "In Words",
|
||||
"oldfieldname": "in_words",
|
||||
"fieldname": "in_words",
|
||||
"fieldtype": "Data",
|
||||
"permlevel": 1
|
||||
},
|
||||
{
|
||||
"print_hide": 1,
|
||||
"oldfieldtype": "Currency",
|
||||
"doctype": "DocField",
|
||||
"label": "Taxes and Charges Added",
|
||||
"oldfieldname": "other_charges_added",
|
||||
"fieldname": "other_charges_added",
|
||||
"fieldtype": "Currency",
|
||||
"permlevel": 1
|
||||
},
|
||||
{
|
||||
"print_hide": 1,
|
||||
"oldfieldtype": "Currency",
|
||||
"doctype": "DocField",
|
||||
"label": "Taxes and Charges Deducted",
|
||||
"oldfieldname": "other_charges_deducted",
|
||||
"fieldname": "other_charges_deducted",
|
||||
"fieldtype": "Currency",
|
||||
"permlevel": 1
|
||||
},
|
||||
{
|
||||
"doctype": "DocField",
|
||||
"width": "50%",
|
||||
"fieldname": "column_break3",
|
||||
"fieldtype": "Column Break",
|
||||
"permlevel": 0
|
||||
},
|
||||
{
|
||||
"print_hide": 1,
|
||||
"oldfieldtype": "Currency",
|
||||
"doctype": "DocField",
|
||||
"label": "Grand Total (Import)",
|
||||
"oldfieldname": "grand_total_import",
|
||||
"fieldname": "grand_total_import",
|
||||
"fieldtype": "Currency",
|
||||
"permlevel": 1
|
||||
},
|
||||
{
|
||||
"print_hide": 1,
|
||||
"oldfieldtype": "Data",
|
||||
"colour": "White:FFF",
|
||||
"doctype": "DocField",
|
||||
"label": "In Words (Import)",
|
||||
"oldfieldname": "in_words_import",
|
||||
"fieldname": "in_words_import",
|
||||
"fieldtype": "Data",
|
||||
"permlevel": 1
|
||||
},
|
||||
{
|
||||
"print_hide": 1,
|
||||
"oldfieldtype": "Currency",
|
||||
@@ -506,10 +442,111 @@
|
||||
"fieldtype": "Currency",
|
||||
"permlevel": 1
|
||||
},
|
||||
{
|
||||
"print_hide": 1,
|
||||
"oldfieldtype": "Currency",
|
||||
"doctype": "DocField",
|
||||
"label": "Grand Total (Import)",
|
||||
"oldfieldname": "grand_total_import",
|
||||
"fieldname": "grand_total_import",
|
||||
"fieldtype": "Currency",
|
||||
"permlevel": 1
|
||||
},
|
||||
{
|
||||
"print_hide": 1,
|
||||
"oldfieldtype": "Data",
|
||||
"doctype": "DocField",
|
||||
"label": "In Words (Import)",
|
||||
"oldfieldname": "in_words_import",
|
||||
"fieldname": "in_words_import",
|
||||
"fieldtype": "Data",
|
||||
"permlevel": 1
|
||||
},
|
||||
{
|
||||
"print_width": "50%",
|
||||
"doctype": "DocField",
|
||||
"width": "50%",
|
||||
"fieldname": "column_break3",
|
||||
"fieldtype": "Column Break",
|
||||
"permlevel": 0
|
||||
},
|
||||
{
|
||||
"print_hide": 1,
|
||||
"print_width": "150px",
|
||||
"oldfieldtype": "Currency",
|
||||
"doctype": "DocField",
|
||||
"label": "Net Total",
|
||||
"oldfieldname": "net_total",
|
||||
"width": "150px",
|
||||
"fieldname": "net_total",
|
||||
"fieldtype": "Currency",
|
||||
"reqd": 1,
|
||||
"permlevel": 1
|
||||
},
|
||||
{
|
||||
"print_hide": 1,
|
||||
"oldfieldtype": "Currency",
|
||||
"doctype": "DocField",
|
||||
"label": "Taxes and Charges Added",
|
||||
"oldfieldname": "other_charges_added",
|
||||
"fieldname": "other_charges_added",
|
||||
"fieldtype": "Currency",
|
||||
"permlevel": 1
|
||||
},
|
||||
{
|
||||
"print_hide": 1,
|
||||
"oldfieldtype": "Currency",
|
||||
"doctype": "DocField",
|
||||
"label": "Taxes and Charges Deducted",
|
||||
"oldfieldname": "other_charges_deducted",
|
||||
"fieldname": "other_charges_deducted",
|
||||
"fieldtype": "Currency",
|
||||
"permlevel": 1
|
||||
},
|
||||
{
|
||||
"print_hide": 1,
|
||||
"oldfieldtype": "Currency",
|
||||
"doctype": "DocField",
|
||||
"label": "Total Tax",
|
||||
"oldfieldname": "total_tax",
|
||||
"fieldname": "total_tax",
|
||||
"fieldtype": "Currency",
|
||||
"permlevel": 1
|
||||
},
|
||||
{
|
||||
"print_hide": 1,
|
||||
"oldfieldtype": "Currency",
|
||||
"doctype": "DocField",
|
||||
"label": "Grand Total",
|
||||
"oldfieldname": "grand_total",
|
||||
"fieldname": "grand_total",
|
||||
"fieldtype": "Currency",
|
||||
"permlevel": 1
|
||||
},
|
||||
{
|
||||
"print_hide": 1,
|
||||
"oldfieldtype": "Currency",
|
||||
"doctype": "DocField",
|
||||
"label": "Rounded Total",
|
||||
"oldfieldname": "rounded_total",
|
||||
"fieldname": "rounded_total",
|
||||
"fieldtype": "Currency",
|
||||
"permlevel": 1
|
||||
},
|
||||
{
|
||||
"print_hide": 1,
|
||||
"description": "In Words will be visible once you save the Purchase Receipt.",
|
||||
"oldfieldtype": "Data",
|
||||
"doctype": "DocField",
|
||||
"label": "In Words",
|
||||
"oldfieldname": "in_words",
|
||||
"fieldname": "in_words",
|
||||
"fieldtype": "Data",
|
||||
"permlevel": 1
|
||||
},
|
||||
{
|
||||
"description": "Add Terms and Conditions for the Purchase Receipt. You can also prepare a Terms and Conditions Master and use the Template.",
|
||||
"oldfieldtype": "Section Break",
|
||||
"colour": "White:FFF",
|
||||
"doctype": "DocField",
|
||||
"label": "Terms and Conditions",
|
||||
"fieldname": "terms_section_break",
|
||||
@@ -571,6 +608,12 @@
|
||||
"fieldtype": "Link",
|
||||
"permlevel": 0
|
||||
},
|
||||
{
|
||||
"doctype": "DocField",
|
||||
"fieldname": "column_break_57",
|
||||
"fieldtype": "Column Break",
|
||||
"permlevel": 0
|
||||
},
|
||||
{
|
||||
"print_hide": 1,
|
||||
"doctype": "DocField",
|
||||
@@ -583,7 +626,6 @@
|
||||
{
|
||||
"description": "Filing in Additional Information about the Purchase Receipt will help you analyze your data better.",
|
||||
"oldfieldtype": "Section Break",
|
||||
"colour": "White:FFF",
|
||||
"doctype": "DocField",
|
||||
"label": "More Info",
|
||||
"fieldname": "more_info",
|
||||
@@ -593,9 +635,9 @@
|
||||
{
|
||||
"print_hide": 1,
|
||||
"permlevel": 1,
|
||||
"print_width": "150px",
|
||||
"no_copy": 1,
|
||||
"oldfieldtype": "Select",
|
||||
"colour": "White:FFF",
|
||||
"doctype": "DocField",
|
||||
"label": "Status",
|
||||
"oldfieldname": "status",
|
||||
@@ -612,7 +654,6 @@
|
||||
"description": "% of materials billed against this Purchase Receipt",
|
||||
"no_copy": 1,
|
||||
"oldfieldtype": "Currency",
|
||||
"colour": "White:FFF",
|
||||
"doctype": "DocField",
|
||||
"label": "% Billed",
|
||||
"oldfieldname": "per_billed",
|
||||
@@ -626,17 +667,18 @@
|
||||
"description": "Select \"Yes\" for sub - contracting items",
|
||||
"default": "No",
|
||||
"oldfieldtype": "Select",
|
||||
"colour": "White:FFF",
|
||||
"doctype": "DocField",
|
||||
"label": "Is Subcontracted",
|
||||
"oldfieldname": "is_subcontracted",
|
||||
"permlevel": 0,
|
||||
"options": "\nYes\nNo",
|
||||
"fieldname": "is_subcontracted",
|
||||
"fieldtype": "Select",
|
||||
"options": "\nYes\nNo"
|
||||
"permlevel": 0
|
||||
},
|
||||
{
|
||||
"print_hide": 1,
|
||||
"permlevel": 1,
|
||||
"print_width": "150px",
|
||||
"no_copy": 1,
|
||||
"oldfieldtype": "Data",
|
||||
"doctype": "DocField",
|
||||
@@ -646,26 +688,11 @@
|
||||
"fieldname": "amended_from",
|
||||
"fieldtype": "Data",
|
||||
"hidden": 1,
|
||||
"permlevel": 1
|
||||
},
|
||||
{
|
||||
"print_hide": 1,
|
||||
"description": "The date at which current entry is corrected in the system.",
|
||||
"no_copy": 1,
|
||||
"oldfieldtype": "Date",
|
||||
"doctype": "DocField",
|
||||
"label": "Amendment Date",
|
||||
"oldfieldname": "amendment_date",
|
||||
"width": "100px",
|
||||
"fieldname": "amendment_date",
|
||||
"fieldtype": "Date",
|
||||
"hidden": 1,
|
||||
"permlevel": 0
|
||||
"options": "Purchase Receipt"
|
||||
},
|
||||
{
|
||||
"print_hide": 1,
|
||||
"oldfieldtype": "Data",
|
||||
"colour": "White:FFF",
|
||||
"doctype": "DocField",
|
||||
"label": "Range",
|
||||
"oldfieldname": "range",
|
||||
@@ -700,13 +727,11 @@
|
||||
"print_hide": 1,
|
||||
"no_copy": 1,
|
||||
"oldfieldtype": "Link",
|
||||
"colour": "White:FFF",
|
||||
"allow_on_submit": 1,
|
||||
"doctype": "DocField",
|
||||
"label": "Select Print Heading",
|
||||
"oldfieldname": "select_print_heading",
|
||||
"permlevel": 0,
|
||||
"trigger": "Client",
|
||||
"fieldname": "select_print_heading",
|
||||
"fieldtype": "Link",
|
||||
"options": "Print Heading",
|
||||
@@ -716,9 +741,9 @@
|
||||
"print_hide": 1,
|
||||
"permlevel": 0,
|
||||
"description": "Select the relevant company name if you have multiple companies",
|
||||
"print_width": "150px",
|
||||
"no_copy": 0,
|
||||
"oldfieldtype": "Link",
|
||||
"colour": "White:FFF",
|
||||
"doctype": "DocField",
|
||||
"label": "Company",
|
||||
"oldfieldname": "company",
|
||||
@@ -733,6 +758,7 @@
|
||||
},
|
||||
{
|
||||
"print_hide": 1,
|
||||
"print_width": "150px",
|
||||
"permlevel": 0,
|
||||
"oldfieldtype": "Select",
|
||||
"doctype": "DocField",
|
||||
@@ -748,6 +774,7 @@
|
||||
},
|
||||
{
|
||||
"print_hide": 1,
|
||||
"print_width": "50%",
|
||||
"oldfieldtype": "Column Break",
|
||||
"doctype": "DocField",
|
||||
"width": "50%",
|
||||
@@ -757,9 +784,9 @@
|
||||
},
|
||||
{
|
||||
"print_hide": 1,
|
||||
"print_width": "30%",
|
||||
"permlevel": 0,
|
||||
"oldfieldtype": "HTML",
|
||||
"colour": "White:FFF",
|
||||
"doctype": "DocField",
|
||||
"label": "Other Details",
|
||||
"width": "30%",
|
||||
@@ -774,7 +801,6 @@
|
||||
"description": "Warehouse where you are maintaining stock of rejected items",
|
||||
"no_copy": 1,
|
||||
"oldfieldtype": "Link",
|
||||
"colour": "White:FFF",
|
||||
"doctype": "DocField",
|
||||
"label": "Rejected Warehouse",
|
||||
"oldfieldname": "rejected_warehouse",
|
||||
@@ -788,9 +814,9 @@
|
||||
"print_hide": 1,
|
||||
"permlevel": 0,
|
||||
"description": "Supplier warehouse where you have issued raw materials for sub - contracting",
|
||||
"print_width": "50px",
|
||||
"no_copy": 1,
|
||||
"oldfieldtype": "Link",
|
||||
"colour": "White:FFF",
|
||||
"doctype": "DocField",
|
||||
"label": "Supplier Warehouse",
|
||||
"oldfieldname": "supplier_warehouse",
|
||||
@@ -803,7 +829,6 @@
|
||||
"print_hide": 1,
|
||||
"no_copy": 1,
|
||||
"oldfieldtype": "Data",
|
||||
"colour": "White:FFF",
|
||||
"doctype": "DocField",
|
||||
"label": "Cancel Reason",
|
||||
"oldfieldname": "cancel_reason",
|
||||
@@ -849,9 +874,9 @@
|
||||
{
|
||||
"print_hide": 0,
|
||||
"description": "Transporter lorry number",
|
||||
"print_width": "100px",
|
||||
"no_copy": 1,
|
||||
"oldfieldtype": "Data",
|
||||
"colour": "White:FFF",
|
||||
"doctype": "DocField",
|
||||
"label": "LR No",
|
||||
"oldfieldname": "lr_no",
|
||||
@@ -863,9 +888,9 @@
|
||||
{
|
||||
"print_hide": 0,
|
||||
"description": "Date on which lorry started from supplier warehouse",
|
||||
"print_width": "100px",
|
||||
"no_copy": 1,
|
||||
"oldfieldtype": "Date",
|
||||
"colour": "White:FFF",
|
||||
"doctype": "DocField",
|
||||
"label": "LR Date",
|
||||
"oldfieldname": "lr_date",
|
||||
@@ -875,6 +900,7 @@
|
||||
"permlevel": 0
|
||||
},
|
||||
{
|
||||
"print_width": "50%",
|
||||
"doctype": "DocField",
|
||||
"width": "50%",
|
||||
"fieldname": "column_break5",
|
||||
@@ -885,7 +911,6 @@
|
||||
"print_hide": 1,
|
||||
"description": "Following table will show values if items are sub - contracted. These values will be fetched from the master of \"Bill of Materials\" of sub - contracted items.",
|
||||
"oldfieldtype": "Section Break",
|
||||
"colour": "White:FFF",
|
||||
"doctype": "DocField",
|
||||
"label": "Raw Material Details",
|
||||
"fieldname": "raw_material_details",
|
||||
@@ -922,8 +947,7 @@
|
||||
"write": 1,
|
||||
"role": "Purchase User",
|
||||
"cancel": 1,
|
||||
"permlevel": 0,
|
||||
"match": ""
|
||||
"permlevel": 0
|
||||
},
|
||||
{
|
||||
"doctype": "DocPerm",
|
||||
@@ -933,12 +957,12 @@
|
||||
{
|
||||
"doctype": "DocPerm",
|
||||
"role": "Supplier",
|
||||
"match": "supplier",
|
||||
"permlevel": 0
|
||||
"permlevel": 0,
|
||||
"match": "supplier"
|
||||
},
|
||||
{
|
||||
"write": 1,
|
||||
"doctype": "DocPerm",
|
||||
"write": 1,
|
||||
"role": "All",
|
||||
"permlevel": 2
|
||||
},
|
||||
|
||||
@@ -14,7 +14,7 @@
|
||||
// You should have received a copy of the GNU General Public License
|
||||
// along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
|
||||
wn.require("public/app/js/stock_controller.js");
|
||||
wn.require("public/app/js/controllers/stock_controller.js");
|
||||
wn.provide("erpnext.stock");
|
||||
|
||||
erpnext.stock.StockEntry = erpnext.stock.StockController.extend({
|
||||
|
||||
@@ -14,7 +14,7 @@
|
||||
// You should have received a copy of the GNU General Public License
|
||||
// along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
|
||||
wn.require("public/app/js/stock_controller.js");
|
||||
wn.require("public/app/js/controllers/stock_controller.js");
|
||||
wn.provide("erpnext.stock");
|
||||
|
||||
erpnext.stock.StockReconciliation = erpnext.stock.StockController.extend({
|
||||
|
||||
Reference in New Issue
Block a user