Addition of GST fields in Sales Order,Purchase Order,Purchase Receipt

This commit is contained in:
deepeshgarg007 2019-01-09 17:09:11 +05:30
parent 094d539cd9
commit d29ee97307
4 changed files with 124 additions and 35 deletions

View File

@ -572,7 +572,7 @@ execute:frappe.delete_doc_if_exists("Page", "sales-analytics")
execute:frappe.delete_doc_if_exists("Page", "purchase-analytics") execute:frappe.delete_doc_if_exists("Page", "purchase-analytics")
execute:frappe.delete_doc_if_exists("Page", "stock-analytics") execute:frappe.delete_doc_if_exists("Page", "stock-analytics")
execute:frappe.delete_doc_if_exists("Page", "production-analytics") execute:frappe.delete_doc_if_exists("Page", "production-analytics")
erpnext.patches.v11_0.ewaybill_fields_gst_india #2018-11-13 erpnext.patches.v11_0.ewaybill_fields_gst_india #2018-11-13 #2019-01-09
erpnext.patches.v11_0.drop_column_max_days_allowed erpnext.patches.v11_0.drop_column_max_days_allowed
erpnext.patches.v11_0.change_healthcare_desktop_icons erpnext.patches.v11_0.change_healthcare_desktop_icons
erpnext.patches.v10_0.update_user_image_in_employee erpnext.patches.v10_0.update_user_image_in_employee

View File

@ -126,6 +126,9 @@ def make_custom_fields(update=True):
dict(fieldname='place_of_supply', label='Place of Supply', dict(fieldname='place_of_supply', label='Place of Supply',
fieldtype='Data', insert_after='shipping_address', fieldtype='Data', insert_after='shipping_address',
print_hide=1, read_only=0), print_hide=1, read_only=0),
]
purchase_invoice_itc_fields = [
dict(fieldname='eligibility_for_itc', label='Eligibility For ITC', dict(fieldname='eligibility_for_itc', label='Eligibility For ITC',
fieldtype='Select', insert_after='reason_for_issuing_document', print_hide=1, fieldtype='Select', insert_after='reason_for_issuing_document', print_hide=1,
options='input\ninput service\ncapital goods\nineligible', default="ineligible"), options='input\ninput service\ncapital goods\nineligible', default="ineligible"),
@ -152,6 +155,9 @@ def make_custom_fields(update=True):
dict(fieldname='company_gstin', label='Company GSTIN', dict(fieldname='company_gstin', label='Company GSTIN',
fieldtype='Data', insert_after='company_address', fieldtype='Data', insert_after='company_address',
fetch_from='company_address.gstin', print_hide=1), fetch_from='company_address.gstin', print_hide=1),
]
sales_invoice_shipping_fields = [
dict(fieldname='port_code', label='Port Code', dict(fieldname='port_code', label='Port Code',
fieldtype='Data', insert_after='reason_for_issuing_document', print_hide=1, fieldtype='Data', insert_after='reason_for_issuing_document', print_hide=1,
depends_on="eval:doc.invoice_type=='Export' "), depends_on="eval:doc.invoice_type=='Export' "),
@ -214,9 +220,12 @@ def make_custom_fields(update=True):
dict(fieldname='gst_state_number', label='GST State Number', dict(fieldname='gst_state_number', label='GST State Number',
fieldtype='Data', insert_after='gst_state', read_only=1), fieldtype='Data', insert_after='gst_state', read_only=1),
], ],
'Purchase Invoice': invoice_gst_fields + purchase_invoice_gst_fields, 'Purchase Invoice': invoice_gst_fields + purchase_invoice_gst_fields + purchase_invoice_itc_fields,
'Sales Invoice': invoice_gst_fields + sales_invoice_gst_fields, 'Purchase Order': purchase_invoice_gst_fields,
'Delivery Note': sales_invoice_gst_fields + ewaybill_fields, 'Purchase Receipt': purchase_invoice_gst_fields,
'Sales Invoice': invoice_gst_fields + sales_invoice_gst_fields + sales_invoice_shipping_fields,
'Delivery Note': sales_invoice_gst_fields + ewaybill_fields + sales_invoice_shipping_fields,
'Sales Order': sales_invoice_gst_fields,
'Sales Taxes and Charges Template': inter_state_gst_field, 'Sales Taxes and Charges Template': inter_state_gst_field,
'Purchase Taxes and Charges Template': inter_state_gst_field, 'Purchase Taxes and Charges Template': inter_state_gst_field,
'Item': [ 'Item': [

View File

@ -17,6 +17,20 @@ frappe.ui.form.on("Sales Order", {
// formatter for material request item // formatter for material request item
frm.set_indicator_formatter('item_code', frm.set_indicator_formatter('item_code',
function(doc) { return (doc.stock_qty<=doc.delivered_qty) ? "green" : "orange" }) function(doc) { return (doc.stock_qty<=doc.delivered_qty) ? "green" : "orange" })
frm.set_query('company_address', function(doc) {
if(!doc.company) {
frappe.throw(__('Please set Company'));
}
return {
query: 'frappe.contacts.doctype.address.address.address_query',
filters: {
link_doctype: 'Company',
link_name: doc.company
}
};
})
}, },
refresh: function(frm) { refresh: function(frm) {
if(frm.doc.docstatus == 1 && frm.doc.status == 'To Deliver and Bill') { if(frm.doc.docstatus == 1 && frm.doc.status == 'To Deliver and Bill') {

View File

@ -747,6 +747,71 @@
"translatable": 0, "translatable": 0,
"unique": 0 "unique": 0
}, },
{
"allow_bulk_edit": 0,
"allow_in_quick_entry": 0,
"allow_on_submit": 0,
"bold": 0,
"collapsible": 0,
"columns": 0,
"fieldname": "company_address_display",
"fieldtype": "Small Text",
"hidden": 0,
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
"in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"label": "",
"length": 0,
"no_copy": 0,
"permlevel": 0,
"precision": "",
"print_hide": 0,
"print_hide_if_no_value": 0,
"read_only": 1,
"remember_last_selected_value": 0,
"report_hide": 0,
"reqd": 0,
"search_index": 0,
"set_only_once": 0,
"translatable": 0,
"unique": 0
},
{
"allow_bulk_edit": 0,
"allow_in_quick_entry": 0,
"allow_on_submit": 0,
"bold": 0,
"collapsible": 0,
"columns": 0,
"fieldname": "company_address",
"fieldtype": "Link",
"hidden": 0,
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
"in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"label": "Company Address",
"length": 0,
"no_copy": 0,
"options": "Address",
"permlevel": 0,
"precision": "",
"print_hide": 0,
"print_hide_if_no_value": 0,
"read_only": 0,
"remember_last_selected_value": 0,
"report_hide": 0,
"reqd": 0,
"search_index": 0,
"set_only_once": 0,
"translatable": 0,
"unique": 0
},
{ {
"allow_bulk_edit": 0, "allow_bulk_edit": 0,
"allow_in_quick_entry": 0, "allow_in_quick_entry": 0,
@ -1128,6 +1193,7 @@
"label": "Price List Exchange Rate", "label": "Price List Exchange Rate",
"length": 0, "length": 0,
"no_copy": 0, "no_copy": 0,
"options": "",
"permlevel": 0, "permlevel": 0,
"precision": "9", "precision": "9",
"print_hide": 1, "print_hide": 1,
@ -1270,37 +1336,37 @@
"unique": 0 "unique": 0
}, },
{ {
"allow_bulk_edit": 0, "allow_bulk_edit": 0,
"allow_in_quick_entry": 0, "allow_in_quick_entry": 0,
"allow_on_submit": 0, "allow_on_submit": 0,
"bold": 0, "bold": 0,
"collapsible": 0, "collapsible": 0,
"columns": 0, "columns": 0,
"fieldname": "scan_barcode", "fieldname": "scan_barcode",
"fieldtype": "Data", "fieldtype": "Data",
"hidden": 0, "hidden": 0,
"ignore_user_permissions": 0, "ignore_user_permissions": 0,
"ignore_xss_filter": 0, "ignore_xss_filter": 0,
"in_filter": 0, "in_filter": 0,
"in_global_search": 0, "in_global_search": 0,
"in_list_view": 0, "in_list_view": 0,
"in_standard_filter": 0, "in_standard_filter": 0,
"label": "Scan Barcode", "label": "Scan Barcode",
"length": 0, "length": 0,
"no_copy": 0, "no_copy": 0,
"permlevel": 0, "permlevel": 0,
"precision": "", "precision": "",
"print_hide": 0, "print_hide": 0,
"print_hide_if_no_value": 0, "print_hide_if_no_value": 0,
"read_only": 0, "read_only": 0,
"remember_last_selected_value": 0, "remember_last_selected_value": 0,
"report_hide": 0, "report_hide": 0,
"reqd": 0, "reqd": 0,
"search_index": 0, "search_index": 0,
"set_only_once": 0, "set_only_once": 0,
"translatable": 0, "translatable": 0,
"unique": 0 "unique": 0
}, },
{ {
"allow_bulk_edit": 1, "allow_bulk_edit": 1,
"allow_in_quick_entry": 0, "allow_in_quick_entry": 0,
@ -4015,7 +4081,7 @@
"issingle": 0, "issingle": 0,
"istable": 0, "istable": 0,
"max_attachments": 0, "max_attachments": 0,
"modified": "2018-11-12 20:00:35.272747", "modified": "2019-01-09 16:51:47.917329",
"modified_by": "Administrator", "modified_by": "Administrator",
"module": "Selling", "module": "Selling",
"name": "Sales Order", "name": "Sales Order",