chore: whitespace cleanup from codebase

This commit is contained in:
Ankush Menat
2021-08-19 14:33:03 +05:30
parent e536f6d13f
commit 9bb69e711a
1218 changed files with 1391 additions and 1643 deletions

View File

@@ -10,7 +10,7 @@ def set_up_address_templates(default_country=None):
def get_address_templates():
"""
Return country and path for all HTML files in this directory.
Returns a list of dicts.
"""
def country(file_name):

View File

@@ -3,6 +3,6 @@
{% if country in ["Germany", "Deutschland"] %}
{{ pincode }} {{ city }}
{% else %}
{{ pincode }} {{ city | upper }}<br>
{{ pincode }} {{ city | upper }}<br>
{{ country | upper }}
{% endif %}

View File

@@ -11,4 +11,3 @@ class EInvoiceSettings(Document):
def validate(self):
if self.enable and not self.credentials:
frappe.throw(_('You must add atleast one credentials to be able to use E Invoicing.'))

View File

@@ -25,4 +25,4 @@ frappe.ui.form.on('GST HSN Code', {
});
}
}
});
});

View File

@@ -30,4 +30,4 @@ def update_item_document(items, taxes):
'tax_category': tax.tax_category,
'valid_from': tax.valid_from
})
item_to_be_updated.save()
item_to_be_updated.save()

View File

@@ -294,4 +294,4 @@
text-align: right;
}
</style>
</style>

View File

@@ -43,4 +43,4 @@ frappe.ui.form.on('Import Supplier Invoice', {
}
}
});
});

View File

@@ -13,7 +13,7 @@ class LowerDeductionCertificate(Document):
def validate(self):
self.validate_dates()
self.validate_supplier_against_section_code()
def validate_dates(self):
if getdate(self.valid_upto) < getdate(self.valid_from):
frappe.throw(_("Valid Upto date cannot be before Valid From date"))
@@ -44,4 +44,4 @@ class LowerDeductionCertificate(Document):
return True
elif getdate(self.valid_from) <= valid_from and valid_upto <= getdate(self.valid_upto):
return True
return False
return False

View File

@@ -98,4 +98,4 @@ def create_80g_certificate(args):
certificate.update(args)
return certificate
return certificate

View File

@@ -455,7 +455,7 @@ ACCOUNT_NAME_COLUMNS = [
"Konto",
# Account name
"Kontenbeschriftung",
# Language of the account name
# Language of the account name
# "de-DE" or "en-GB"
"Sprach-ID"
]

View File

@@ -289,4 +289,4 @@ const show_einvoice_preview = (frm, einvoice) => {
}
}
});
};
};

View File

@@ -1125,4 +1125,4 @@ def check_scheduler_status():
def job_already_enqueued(job_name):
enqueued_jobs = [d.get("job_name") for d in get_info()]
if job_name in enqueued_jobs:
return True
return True

View File

@@ -49,4 +49,3 @@ erpnext.setup_auto_gst_taxation = (doctype) => {
}
});
}

View File

@@ -845,7 +845,7 @@ def get_depreciation_amount(asset, depreciable_value, row):
else:
depreciation_amount = (flt(row.value_after_depreciation) -
flt(row.expected_value_after_useful_life)) / (date_diff(asset.to_date, asset.available_for_use_date) / 365)
else:
rate_of_depreciation = row.rate_of_depreciation
# if its the first depreciation
@@ -862,7 +862,7 @@ def get_depreciation_amount(asset, depreciable_value, row):
return depreciation_amount
def set_item_tax_from_hsn_code(item):
if not item.taxes and item.gst_hsn_code:
if not item.taxes and item.gst_hsn_code:
hsn_doc = frappe.get_doc("GST HSN Code", item.gst_hsn_code)
for tax in hsn_doc.taxes:
@@ -870,4 +870,4 @@ def set_item_tax_from_hsn_code(item):
'item_tax_template': tax.item_tax_template,
'tax_category': tax.tax_category,
'valid_from': tax.valid_from
})
})

View File

@@ -76,4 +76,4 @@ state_codes = {'Siracusa': 'SR', 'Bologna': 'BO', 'Grosseto': 'GR', 'Caserta': '
'Cagliari': 'CA', 'Siena': 'SI', 'Vibo Valentia': 'VV', 'Reggio Calabria': 'RC', 'Ascoli Piceno': 'AP', 'Carbonia-Iglesias': 'CI', 'Oristano': 'OR',
'Asti': 'AT', 'Ravenna': 'RA', 'Vicenza': 'VI', 'Savona': 'SV', 'Biella': 'BI', 'Rimini': 'RN', 'Agrigento': 'AG', 'Prato': 'PO', 'Cuneo': 'CN',
'Cosenza': 'CS', 'Livorno or Leghorn': 'LI', 'Sondrio': 'SO', 'Cremona': 'CR', 'Isernia': 'IS', 'Trento': 'TN', 'Terni': 'TR', 'Bolzano/Bozen': 'BZ',
'Parma': 'PR', 'Varese': 'VA', 'Venezia': 'VE', 'Sassari': 'SS', 'Arezzo': 'AR'}
'Parma': 'PR', 'Varese': 'VA', 'Venezia': 'VE', 'Sassari': 'SS', 'Arezzo': 'AR'}

View File

@@ -202,7 +202,7 @@ def get_transactions(filters, as_dict=1):
FROM `tabGL Entry` gl
/* Kontonummer */
left join `tabAccount` acc
left join `tabAccount` acc
on gl.account = acc.name
left join `tabCustomer` cus
@@ -218,7 +218,7 @@ def get_transactions(filters, as_dict=1):
and par.parenttype = gl.party_type
and par.company = %(company)s
WHERE gl.company = %(company)s
WHERE gl.company = %(company)s
AND DATE(gl.posting_date) >= %(from_date)s
AND DATE(gl.posting_date) <= %(to_date)s
{}

View File

@@ -54,53 +54,53 @@ def get_columns():
"width": 0
},
{
"fieldtype": "Link",
"fieldname": "name",
"fieldtype": "Link",
"fieldname": "name",
"label": _("Sales Invoice"),
"options": "Sales Invoice",
"width": 140
},
{
"fieldtype": "Data",
"fieldname": "einvoice_status",
"label": _("Status"),
{
"fieldtype": "Data",
"fieldname": "einvoice_status",
"label": _("Status"),
"width": 100
},
{
{
"fieldtype": "Link",
"fieldname": "customer",
"options": "Customer",
"label": _("Customer")
},
{
{
"fieldtype": "Check",
"fieldname": "is_return",
"label": _("Is Return"),
"width": 85
},
{
"fieldtype": "Data",
"fieldname": "ack_no",
"label": "Ack. No.",
"fieldtype": "Data",
"fieldname": "ack_no",
"label": "Ack. No.",
"width": 145
},
{
"fieldtype": "Data",
"fieldname": "ack_date",
"label": "Ack. Date",
{
"fieldtype": "Data",
"fieldname": "ack_date",
"label": "Ack. Date",
"width": 165
},
{
"fieldtype": "Data",
"fieldname": "irn",
"fieldtype": "Data",
"fieldname": "irn",
"label": _("IRN No."),
"width": 250
},
{
"fieldtype": "Currency",
"options": "Company:company:default_currency",
"fieldname": "base_grand_total",
"options": "Company:company:default_currency",
"fieldname": "base_grand_total",
"label": _("Grand Total"),
"width": 120
}
]
]

View File

@@ -41,7 +41,7 @@ frappe.query_reports["Electronic Invoice Register"] = {
var w = window.open(
frappe.urllib.get_full_url(
"/api/method/erpnext.regional.italy.utils.export_invoices?"
"/api/method/erpnext.regional.italy.utils.export_invoices?"
+ "filters=" + JSON.stringify(reportview.get_filter_values())
)
);

View File

@@ -388,4 +388,4 @@ def get_columns():
},
]
return columns
return columns

View File

@@ -4,4 +4,4 @@
{% include "erpnext/accounts/report/purchase_register/purchase_register.js" %}
frappe.query_reports["GST Purchase Register"] = frappe.query_reports["Purchase Register"]
frappe.query_reports["GST Purchase Register"] = frappe.query_reports["Purchase Register"]

View File

@@ -21,4 +21,3 @@ def execute(filters=None):
'export_type',
'ecommerce_gstin'
])

View File

@@ -285,5 +285,3 @@ def get_hsn_wise_json_data(filters, report_data):
count +=1
return data

View File

@@ -18,4 +18,4 @@ function fetch_gstins(report) {
company_gstins.df.options = [""];
company_gstins.refresh();
}
}
}

View File

@@ -52,7 +52,7 @@ def execute(filters=None):
AND gl.party_type = "Supplier"
AND gl.company = %(company)s
{conditions}
GROUP BY
gl.party

View File

@@ -4,4 +4,4 @@
frappe.require("assets/erpnext/js/salary_slip_deductions_report_filters.js", function() {
frappe.query_reports["Professional Tax Deductions"] = erpnext.salary_slip_deductions_report_filters;
});
});

View File

@@ -69,4 +69,4 @@ def get_data(filters):
data.append(employee)
return data
return data

View File

@@ -4,4 +4,4 @@
frappe.require("assets/erpnext/js/salary_slip_deductions_report_filters.js", function() {
frappe.query_reports["Provident Fund Deductions"] = erpnext.salary_slip_deductions_report_filters;
});
});

View File

@@ -165,4 +165,4 @@ def get_years():
if not year_list:
year_list = [getdate().year]
return "\n".join(str(year) for year in year_list)
return "\n".join(str(year) for year in year_list)

View File

@@ -74,4 +74,4 @@
{% } %}
</tbody>
</table>
</table>

View File

@@ -1,4 +1,4 @@
from __future__ import unicode_literals
def setup(company=None, patch=True):
pass
pass