Compare commits
21 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
2a903a0608 | ||
|
|
71b4e48ea5 | ||
|
|
ae2d92ee76 | ||
|
|
21cf1fd851 | ||
|
|
02c281cc2f | ||
|
|
a938d3956a | ||
|
|
02b0ed4199 | ||
|
|
0018db344c | ||
|
|
e9a4f4e70d | ||
|
|
be03de3ad6 | ||
|
|
d235325a95 | ||
|
|
6daa6e422e | ||
|
|
07913c3ff2 | ||
|
|
71ba7ea717 | ||
|
|
3b0e6cecd6 | ||
|
|
4d5d3b7685 | ||
|
|
3bf9071598 | ||
|
|
46af07cc09 | ||
|
|
27692670b1 | ||
|
|
3708df61bf | ||
|
|
3f2dd04b10 |
@@ -2,7 +2,7 @@
|
||||
from __future__ import unicode_literals
|
||||
import frappe
|
||||
|
||||
__version__ = '8.1.4'
|
||||
__version__ = '8.1.7'
|
||||
|
||||
|
||||
def get_default_company(user=None):
|
||||
|
||||
|
Before Width: | Height: | Size: 109 KiB After Width: | Height: | Size: 109 KiB |
@@ -4,7 +4,7 @@ You can send email reminders to your Customers and Suppliers so that they can di
|
||||
|
||||
To send GSTIN Reminders, you can either open the Customer / Supplier record or **GST Settings**
|
||||
|
||||
<img class="screenshot" alt="GST Settings" src="{{docs_base_url}}/assets/img/regional/india/gstin-settings.png">
|
||||
<img class="screenshot" alt="GST Settings" src="{{docs_base_url}}/assets/img/regional/india/gst-settings.png">
|
||||
|
||||
Here you can click on the "Send GSTIN Update Reminders" button to send email reminders to all your customers
|
||||
|
||||
|
||||
@@ -7,9 +7,25 @@ import frappe
|
||||
def execute():
|
||||
""" delete deprecated reports """
|
||||
|
||||
reports = ["Monthly Salary Register", "Customer Addresses And Contacts",
|
||||
"Supplier Addresses And Contacts"]
|
||||
reports = [
|
||||
"Monthly Salary Register", "Customer Addresses And Contacts",
|
||||
"Supplier Addresses And Contacts"
|
||||
]
|
||||
|
||||
for report in reports:
|
||||
if frappe.db.exists("Report", report):
|
||||
frappe.delete_doc("Report", report, ignore_permissions=True)
|
||||
check_and_update_desktop_icon_for_report(report)
|
||||
frappe.delete_doc("Report", report, ignore_permissions=True)
|
||||
|
||||
def check_and_update_desktop_icon_for_report(report):
|
||||
""" delete desktop icon for deprecated desktop icon and update the _report for Addresses And Contacts"""
|
||||
|
||||
if report == "Monthly Salary Register":
|
||||
frappe.delete_doc("Desktop Icon", report)
|
||||
|
||||
elif report in ["Customer Addresses And Contacts", "Supplier Addresses And Contacts"]:
|
||||
name = frappe.db.get_value("Desktop Icon", {"_report": report})
|
||||
if name:
|
||||
frappe.db.set_value("Desktop Icon", name, "_report", "Addresses And Contacts")
|
||||
|
||||
frappe.db.commit()
|
||||
|
||||
@@ -2,6 +2,7 @@ import frappe
|
||||
from frappe.email import sendmail_to_system_managers
|
||||
|
||||
def execute():
|
||||
frappe.reload_doc('regional', 'doctype', 'gst_settings')
|
||||
frappe.reload_doc('regional', 'doctype', 'gst_hsn_code')
|
||||
|
||||
for report_name in ('GST Sales Register', 'GST Purchase Register',
|
||||
@@ -11,9 +12,16 @@ def execute():
|
||||
|
||||
if frappe.db.get_single_value('System Settings', 'country')=='India':
|
||||
from erpnext.regional.india.setup import setup
|
||||
delete_custom_field_tax_id_if_exists()
|
||||
setup(patch=True)
|
||||
send_gst_update_email()
|
||||
|
||||
def delete_custom_field_tax_id_if_exists():
|
||||
for field in frappe.db.sql_list("""select name from `tabCustom Field` where fieldname='tax_id'
|
||||
and dt in ('Sales Order', 'Salse Invoice', 'Delivery Note')"""):
|
||||
frappe.delete_doc("Custom Field", field, ignore_permissions=True)
|
||||
frappe.db.commit()
|
||||
|
||||
def send_gst_update_email():
|
||||
message = """Hello,
|
||||
|
||||
@@ -30,5 +38,7 @@ Templates and update your Customer's and Supplier's GST Numbers.</p>
|
||||
ERPNext Team.
|
||||
""".format(gst_document_link="<a href='http://frappe.github.io/erpnext/user/manual/en/regional/india/'> ERPNext GST Document </a>")
|
||||
|
||||
sendmail_to_system_managers("[Important] ERPNext GST updates", message)
|
||||
|
||||
try:
|
||||
sendmail_to_system_managers("[Important] ERPNext GST updates", message)
|
||||
except Exception as e:
|
||||
pass
|
||||
@@ -83,7 +83,7 @@
|
||||
"issingle": 1,
|
||||
"istable": 0,
|
||||
"max_attachments": 0,
|
||||
"modified": "2017-06-27 16:20:21.206397",
|
||||
"modified": "2017-06-28 16:20:21.206397",
|
||||
"modified_by": "Administrator",
|
||||
"module": "Regional",
|
||||
"name": "GST Settings",
|
||||
|
||||
@@ -196,7 +196,7 @@ def set_defaults(args):
|
||||
hr_settings.save()
|
||||
|
||||
domain_settings = frappe.get_doc("Domain Settings")
|
||||
domain_settings.append('active_domains', dict(domain=args.domain))
|
||||
domain_settings.append('active_domains', dict(domain=_(args.domain)))
|
||||
domain_settings.save()
|
||||
|
||||
def create_feed_and_todo():
|
||||
|
||||
@@ -5,8 +5,16 @@
|
||||
{% block header %}<h2>Update GSTIN</h2>{% endblock %}
|
||||
|
||||
{% block page_content %}
|
||||
<h3>{{ party.name }}</h3>
|
||||
{% if invalid_gstin %}
|
||||
<h3>{{ party_name }}</h3>
|
||||
{% if not_found %}
|
||||
<p class='alert alert-danger' style='max-width: 300px;'>
|
||||
Company Not Found
|
||||
</p>
|
||||
<p>
|
||||
If this problem persists, please contact the company.
|
||||
</p>
|
||||
|
||||
{% elif invalid_gstin %}
|
||||
<p class='alert alert-danger' style='max-width: 300px;'>
|
||||
Invalid GSTIN
|
||||
</p>
|
||||
|
||||
@@ -4,6 +4,7 @@ from frappe import _
|
||||
def get_context(context):
|
||||
context.no_cache = 1
|
||||
party = frappe.form_dict.party
|
||||
context.party_name = party
|
||||
|
||||
try:
|
||||
update_gstin(context)
|
||||
@@ -11,16 +12,17 @@ def get_context(context):
|
||||
context.invalid_gstin = 1
|
||||
|
||||
party_type = 'Customer'
|
||||
party = frappe.db.get_value('Customer', party)
|
||||
party_name = frappe.db.get_value('Customer', party)
|
||||
|
||||
if not party:
|
||||
if not party_name:
|
||||
party_type = 'Supplier'
|
||||
party = frappe.db.get_value('Supplier', party)
|
||||
party_name = frappe.db.get_value('Supplier', party)
|
||||
|
||||
if not party:
|
||||
frappe.throw(_("Not Found"), frappe.DoesNotExistError)
|
||||
if not party_name:
|
||||
context.not_found = 1
|
||||
return
|
||||
|
||||
context.party = frappe.get_doc(party_type, party)
|
||||
context.party = frappe.get_doc(party_type, party_name)
|
||||
context.party.onload()
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user