mirror of
https://github.com/frappe/erpnext.git
synced 2026-05-16 03:29:16 +00:00
Merge branch 'version-11-hotfix' into version-11
This commit is contained in:
@@ -5,7 +5,7 @@ import frappe
|
|||||||
from erpnext.hooks import regional_overrides
|
from erpnext.hooks import regional_overrides
|
||||||
from frappe.utils import getdate
|
from frappe.utils import getdate
|
||||||
|
|
||||||
__version__ = '11.1.63'
|
__version__ = '11.1.64'
|
||||||
|
|
||||||
def get_default_company(user=None):
|
def get_default_company(user=None):
|
||||||
'''Get default company for user'''
|
'''Get default company for user'''
|
||||||
|
|||||||
@@ -17,7 +17,7 @@ def _execute(filters=None, additional_table_columns=None, additional_query_colum
|
|||||||
filters.update({"from_date": filters.get("date_range") and filters.get("date_range")[0], "to_date": filters.get("date_range") and filters.get("date_range")[1]})
|
filters.update({"from_date": filters.get("date_range") and filters.get("date_range")[0], "to_date": filters.get("date_range") and filters.get("date_range")[1]})
|
||||||
columns = get_columns(additional_table_columns)
|
columns = get_columns(additional_table_columns)
|
||||||
|
|
||||||
company_currency = erpnext.get_company_currency(filters.get('company'))
|
company_currency = frappe.get_cached_value('Company', filters.get("company"), "default_currency")
|
||||||
|
|
||||||
item_list = get_items(filters, additional_query_columns)
|
item_list = get_items(filters, additional_query_columns)
|
||||||
if item_list:
|
if item_list:
|
||||||
|
|||||||
@@ -67,8 +67,8 @@ def _execute(filters, additional_table_columns=None, additional_query_columns=No
|
|||||||
total_tax = 0
|
total_tax = 0
|
||||||
for tax_acc in tax_accounts:
|
for tax_acc in tax_accounts:
|
||||||
if tax_acc not in income_accounts:
|
if tax_acc not in income_accounts:
|
||||||
tax_amount = flt(invoice_tax_map.get(inv.name, {}).get(tax_acc))
|
tax_amount_precision = get_field_precision(frappe.get_meta("Sales Taxes and Charges").get_field("tax_amount"), currency=company_currency) or 2
|
||||||
total_tax += tax_amount
|
tax_amount = flt(invoice_tax_map.get(inv.name, {}).get(tax_acc), tax_amount_precision)
|
||||||
row.append(tax_amount)
|
row.append(tax_amount)
|
||||||
|
|
||||||
# total tax, grand total, outstanding amount & rounded total
|
# total tax, grand total, outstanding amount & rounded total
|
||||||
|
|||||||
@@ -5,9 +5,8 @@
|
|||||||
"docstatus": 0,
|
"docstatus": 0,
|
||||||
"doctype": "Report",
|
"doctype": "Report",
|
||||||
"idx": 0,
|
"idx": 0,
|
||||||
"is_standard": "Yes",
|
"is_standard": "Yes",
|
||||||
"letter_head": "Capital Traders",
|
"modified": "2019-02-12 05:10:02.987274",
|
||||||
"modified": "2018-12-12 05:10:02.987274",
|
|
||||||
"modified_by": "Administrator",
|
"modified_by": "Administrator",
|
||||||
"module": "Accounts",
|
"module": "Accounts",
|
||||||
"name": "Supplier Ledger Summary",
|
"name": "Supplier Ledger Summary",
|
||||||
|
|||||||
@@ -6,8 +6,7 @@
|
|||||||
"doctype": "Report",
|
"doctype": "Report",
|
||||||
"idx": 0,
|
"idx": 0,
|
||||||
"is_standard": "Yes",
|
"is_standard": "Yes",
|
||||||
"letter_head": "Gadgets International",
|
"modified": "2018-09-21 11:25:00.551823",
|
||||||
"modified": "2018-08-21 11:25:00.551823",
|
|
||||||
"modified_by": "Administrator",
|
"modified_by": "Administrator",
|
||||||
"module": "Accounts",
|
"module": "Accounts",
|
||||||
"name": "TDS Computation Summary",
|
"name": "TDS Computation Summary",
|
||||||
|
|||||||
@@ -6,8 +6,7 @@
|
|||||||
"doctype": "Report",
|
"doctype": "Report",
|
||||||
"idx": 0,
|
"idx": 0,
|
||||||
"is_standard": "Yes",
|
"is_standard": "Yes",
|
||||||
"letter_head": "Gadgets International",
|
"modified": "2019-09-24 13:46:16.473711",
|
||||||
"modified": "2018-08-21 11:33:40.804532",
|
|
||||||
"modified_by": "Administrator",
|
"modified_by": "Administrator",
|
||||||
"module": "Accounts",
|
"module": "Accounts",
|
||||||
"name": "TDS Payable Monthly",
|
"name": "TDS Payable Monthly",
|
||||||
|
|||||||
@@ -7,8 +7,7 @@
|
|||||||
"doctype": "Report",
|
"doctype": "Report",
|
||||||
"idx": 0,
|
"idx": 0,
|
||||||
"is_standard": "Yes",
|
"is_standard": "Yes",
|
||||||
"letter_head": "",
|
"modified": "2019-04-17 00:20:27.248275",
|
||||||
"modified": "2017-04-17 00:20:27.248275",
|
|
||||||
"modified_by": "Administrator",
|
"modified_by": "Administrator",
|
||||||
"module": "CRM",
|
"module": "CRM",
|
||||||
"name": "Campaign Efficiency",
|
"name": "Campaign Efficiency",
|
||||||
|
|||||||
@@ -6,8 +6,7 @@
|
|||||||
"doctype": "Report",
|
"doctype": "Report",
|
||||||
"idx": 0,
|
"idx": 0,
|
||||||
"is_standard": "Yes",
|
"is_standard": "Yes",
|
||||||
"letter_head": "",
|
"modified": "2019-09-19 14:40:52.035394",
|
||||||
"modified": "2018-09-17 14:40:52.035394",
|
|
||||||
"modified_by": "Administrator",
|
"modified_by": "Administrator",
|
||||||
"module": "CRM",
|
"module": "CRM",
|
||||||
"name": "Lead Conversion Time",
|
"name": "Lead Conversion Time",
|
||||||
|
|||||||
@@ -7,8 +7,7 @@
|
|||||||
"doctype": "Report",
|
"doctype": "Report",
|
||||||
"idx": 0,
|
"idx": 0,
|
||||||
"is_standard": "Yes",
|
"is_standard": "Yes",
|
||||||
"letter_head": "Shishuvan Secondary School",
|
"modified": "2019-02-08 15:11:35.339434",
|
||||||
"modified": "2018-02-08 15:11:35.339434",
|
|
||||||
"modified_by": "Administrator",
|
"modified_by": "Administrator",
|
||||||
"module": "Education",
|
"module": "Education",
|
||||||
"name": "Final Assessment Grades",
|
"name": "Final Assessment Grades",
|
||||||
|
|||||||
File diff suppressed because it is too large
Load Diff
@@ -6,8 +6,7 @@
|
|||||||
"doctype": "Report",
|
"doctype": "Report",
|
||||||
"idx": 0,
|
"idx": 0,
|
||||||
"is_standard": "Yes",
|
"is_standard": "Yes",
|
||||||
"letter_head": "Gadgets International",
|
"modified": "2018-06-28 16:22:24.040106",
|
||||||
"modified": "2018-05-28 16:22:24.040106",
|
|
||||||
"modified_by": "Administrator",
|
"modified_by": "Administrator",
|
||||||
"module": "Manufacturing",
|
"module": "Manufacturing",
|
||||||
"name": "BOM Variance Report",
|
"name": "BOM Variance Report",
|
||||||
|
|||||||
@@ -2,6 +2,7 @@ frappe.provide('frappe.ui.form');
|
|||||||
|
|
||||||
frappe.ui.form.CustomerQuickEntryForm = frappe.ui.form.QuickEntryForm.extend({
|
frappe.ui.form.CustomerQuickEntryForm = frappe.ui.form.QuickEntryForm.extend({
|
||||||
init: function(doctype, after_insert) {
|
init: function(doctype, after_insert) {
|
||||||
|
this.skip_redirect_on_error = true;
|
||||||
this._super(doctype, after_insert);
|
this._super(doctype, after_insert);
|
||||||
},
|
},
|
||||||
|
|
||||||
@@ -37,8 +38,7 @@ frappe.ui.form.CustomerQuickEntryForm = frappe.ui.form.QuickEntryForm.extend({
|
|||||||
{
|
{
|
||||||
label: __("Address Line 1"),
|
label: __("Address Line 1"),
|
||||||
fieldname: "address_line1",
|
fieldname: "address_line1",
|
||||||
fieldtype: "Data",
|
fieldtype: "Data"
|
||||||
reqd: 1
|
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
label: __("Address Line 2"),
|
label: __("Address Line 2"),
|
||||||
@@ -56,8 +56,7 @@ frappe.ui.form.CustomerQuickEntryForm = frappe.ui.form.QuickEntryForm.extend({
|
|||||||
{
|
{
|
||||||
label: __("City"),
|
label: __("City"),
|
||||||
fieldname: "city",
|
fieldname: "city",
|
||||||
fieldtype: "Data",
|
fieldtype: "Data"
|
||||||
reqd: 1,
|
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
label: __("State"),
|
label: __("State"),
|
||||||
@@ -68,8 +67,7 @@ frappe.ui.form.CustomerQuickEntryForm = frappe.ui.form.QuickEntryForm.extend({
|
|||||||
label: __("Country"),
|
label: __("Country"),
|
||||||
fieldname: "country",
|
fieldname: "country",
|
||||||
fieldtype: "Link",
|
fieldtype: "Link",
|
||||||
options: "Country",
|
options: "Country"
|
||||||
reqd: 1
|
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
label: __("Customer POS Id"),
|
label: __("Customer POS Id"),
|
||||||
|
|||||||
@@ -153,8 +153,7 @@ def get_invoice_summary(items, taxes):
|
|||||||
tax_rate=tax.rate,
|
tax_rate=tax.rate,
|
||||||
tax_amount=(reference_row.tax_amount * tax.rate) / 100,
|
tax_amount=(reference_row.tax_amount * tax.rate) / 100,
|
||||||
net_amount=reference_row.tax_amount,
|
net_amount=reference_row.tax_amount,
|
||||||
taxable_amount=(reference_row.tax_amount if tax.charge_type == 'On Previous Row Amount'
|
taxable_amount=reference_row.tax_amount,
|
||||||
else reference_row.total),
|
|
||||||
item_tax_rate={tax.account_head: tax.rate},
|
item_tax_rate={tax.account_head: tax.rate},
|
||||||
charges=True,
|
charges=True,
|
||||||
type="Actual",
|
type="Actual",
|
||||||
@@ -189,6 +188,10 @@ def get_invoice_summary(items, taxes):
|
|||||||
summary_data[key]["tax_exemption_reason"] = tax.tax_exemption_reason
|
summary_data[key]["tax_exemption_reason"] = tax.tax_exemption_reason
|
||||||
summary_data[key]["tax_exemption_law"] = tax.tax_exemption_law
|
summary_data[key]["tax_exemption_law"] = tax.tax_exemption_law
|
||||||
|
|
||||||
|
if summary_data.get("0.0") and tax.charge_type in ["On Previous Row Total",
|
||||||
|
"On Previous Row Amount"]:
|
||||||
|
summary_data[key]["taxable_amount"] = tax.total
|
||||||
|
|
||||||
if summary_data == {}: #Implies that Zero VAT has not been set on any item.
|
if summary_data == {}: #Implies that Zero VAT has not been set on any item.
|
||||||
summary_data.setdefault("0.0", {"tax_amount": 0.0, "taxable_amount": tax.total,
|
summary_data.setdefault("0.0", {"tax_amount": 0.0, "taxable_amount": tax.total,
|
||||||
"tax_exemption_reason": tax.tax_exemption_reason, "tax_exemption_law": tax.tax_exemption_law})
|
"tax_exemption_reason": tax.tax_exemption_reason, "tax_exemption_law": tax.tax_exemption_law})
|
||||||
|
|||||||
@@ -6,8 +6,7 @@
|
|||||||
"doctype": "Report",
|
"doctype": "Report",
|
||||||
"idx": 0,
|
"idx": 0,
|
||||||
"is_standard": "Yes",
|
"is_standard": "Yes",
|
||||||
"letter_head": "Standard",
|
"modified": "2019-04-26 12:59:38.603649",
|
||||||
"modified": "2018-04-26 12:59:38.603649",
|
|
||||||
"modified_by": "Administrator",
|
"modified_by": "Administrator",
|
||||||
"module": "Regional",
|
"module": "Regional",
|
||||||
"name": "HSN-wise-summary of outward supplies",
|
"name": "HSN-wise-summary of outward supplies",
|
||||||
|
|||||||
@@ -340,6 +340,16 @@ def make_contact(args, is_primary_contact=1):
|
|||||||
return contact
|
return contact
|
||||||
|
|
||||||
def make_address(args, is_primary_address=1):
|
def make_address(args, is_primary_address=1):
|
||||||
|
reqd_fields = []
|
||||||
|
for field in ['city', 'country']:
|
||||||
|
if not args.get(field):
|
||||||
|
reqd_fields.append( '<li>' + field.title() + '</li>')
|
||||||
|
|
||||||
|
if reqd_fields:
|
||||||
|
msg = _("Following fields are mandatory to create address:")
|
||||||
|
frappe.throw("{0} <br><br> <ul>{1}</ul>".format(msg, '\n'.join(reqd_fields)),
|
||||||
|
title = _("Missing Values Required"))
|
||||||
|
|
||||||
address = frappe.get_doc({
|
address = frappe.get_doc({
|
||||||
'doctype': 'Address',
|
'doctype': 'Address',
|
||||||
'address_title': args.get('name'),
|
'address_title': args.get('name'),
|
||||||
|
|||||||
@@ -7,8 +7,7 @@
|
|||||||
"doctype": "Report",
|
"doctype": "Report",
|
||||||
"idx": 0,
|
"idx": 0,
|
||||||
"is_standard": "Yes",
|
"is_standard": "Yes",
|
||||||
"letter_head": "Delta9",
|
"modified": "2019-06-14 03:25:36.263179",
|
||||||
"modified": "2019-06-12 03:25:36.263179",
|
|
||||||
"modified_by": "Administrator",
|
"modified_by": "Administrator",
|
||||||
"module": "Selling",
|
"module": "Selling",
|
||||||
"name": "Customer-wise Item Price",
|
"name": "Customer-wise Item Price",
|
||||||
|
|||||||
Reference in New Issue
Block a user