Set corrected states list in GST State field's options
This commit is contained in:
parent
0a32b7a6eb
commit
7312186c76
@ -81,7 +81,6 @@ def set_address_details(out, party, party_type, doctype=None, company=None):
|
||||
out.update(get_company_address(company))
|
||||
if out.company_address:
|
||||
out.update(get_fetch_values(doctype, 'company_address', out.company_address))
|
||||
|
||||
|
||||
def set_contact_details(out, party, party_type):
|
||||
out.contact_person = get_default_contact(party_type, party.name)
|
||||
|
@ -415,4 +415,5 @@ erpnext.patches.v8_1.removed_roles_from_gst_report_non_indian_account
|
||||
erpnext.patches.v8_1.gst_fixes #2017-07-06
|
||||
erpnext.patches.v8_0.update_production_orders
|
||||
erpnext.patches.v8_1.remove_sales_invoice_from_returned_serial_no
|
||||
erpnext.patches.v8_1.allow_invoice_copy_to_edit_after_submit
|
||||
erpnext.patches.v8_1.allow_invoice_copy_to_edit_after_submit
|
||||
erpnext.patches.v8_1.update_gst_state
|
6
erpnext/patches/v8_1/update_gst_state.py
Normal file
6
erpnext/patches/v8_1/update_gst_state.py
Normal file
@ -0,0 +1,6 @@
|
||||
import frappe
|
||||
from erpnext.regional.india import states
|
||||
|
||||
def execute():
|
||||
frappe.db.sql("update `tabCustom Field` set options=%s where fieldname='gst_state'", '\n'.join(states))
|
||||
frappe.db.sql("update `tabAddress` set gst_state='Chhattisgarh' where gst_state='Chattisgarh'")
|
@ -26,6 +26,7 @@ states = [
|
||||
'Mizoram',
|
||||
'Nagaland',
|
||||
'Odisha',
|
||||
'Other Territory',
|
||||
'Pondicherry',
|
||||
'Punjab',
|
||||
'Rajasthan',
|
||||
|
@ -504,12 +504,12 @@ def make_sales_invoice(source_name, target_doc=None, ignore_permissions=False):
|
||||
target.flags.ignore_permissions = True
|
||||
target.run_method("set_missing_values")
|
||||
target.run_method("calculate_taxes_and_totals")
|
||||
|
||||
|
||||
# set company address
|
||||
target.update(get_company_address(target.company))
|
||||
if target.company_address:
|
||||
target.update(get_fetch_values("Sales Invoice", 'company_address', target.company_address))
|
||||
|
||||
|
||||
def update_item(source, target, source_parent):
|
||||
target.amount = flt(source.amount) - flt(source.billed_amt)
|
||||
target.base_amount = target.amount * flt(source_parent.conversion_rate)
|
||||
|
@ -382,12 +382,11 @@ def make_sales_invoice(source_name, target_doc=None):
|
||||
frappe.throw(_("All these items have already been invoiced"))
|
||||
|
||||
target.run_method("calculate_taxes_and_totals")
|
||||
|
||||
|
||||
# set company address
|
||||
target.update(get_company_address(target.company))
|
||||
if target.company_address:
|
||||
target.update(get_fetch_values("Sales Invoice", 'company_address', target.company_address))
|
||||
|
||||
target.update(get_fetch_values("Sales Invoice", 'company_address', target.company_address))
|
||||
|
||||
def update_item(source_doc, target_doc, source_parent):
|
||||
target_doc.qty = source_doc.qty - invoiced_qty_map.get(source_doc.name, 0)
|
||||
|
Loading…
x
Reference in New Issue
Block a user