mirror of
https://github.com/frappe/erpnext.git
synced 2026-09-13 17:20:36 +00:00
chore: whitespace cleanup from codebase
This commit is contained in:
@@ -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):
|
||||
|
||||
@@ -3,6 +3,6 @@
|
||||
{% if country in ["Germany", "Deutschland"] %}
|
||||
{{ pincode }} {{ city }}
|
||||
{% else %}
|
||||
{{ pincode }} {{ city | upper }}<br>
|
||||
{{ pincode }} {{ city | upper }}<br>
|
||||
{{ country | upper }}
|
||||
{% endif %}
|
||||
|
||||
@@ -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.'))
|
||||
|
||||
|
||||
@@ -25,4 +25,4 @@ frappe.ui.form.on('GST HSN Code', {
|
||||
});
|
||||
}
|
||||
}
|
||||
});
|
||||
});
|
||||
|
||||
@@ -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()
|
||||
|
||||
@@ -294,4 +294,4 @@
|
||||
text-align: right;
|
||||
}
|
||||
|
||||
</style>
|
||||
</style>
|
||||
|
||||
@@ -43,4 +43,4 @@ frappe.ui.form.on('Import Supplier Invoice', {
|
||||
}
|
||||
}
|
||||
|
||||
});
|
||||
});
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -98,4 +98,4 @@ def create_80g_certificate(args):
|
||||
|
||||
certificate.update(args)
|
||||
|
||||
return certificate
|
||||
return certificate
|
||||
|
||||
@@ -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"
|
||||
]
|
||||
|
||||
@@ -289,4 +289,4 @@ const show_einvoice_preview = (frm, einvoice) => {
|
||||
}
|
||||
}
|
||||
});
|
||||
};
|
||||
};
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -49,4 +49,3 @@ erpnext.setup_auto_gst_taxation = (doctype) => {
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
|
||||
@@ -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
|
||||
})
|
||||
})
|
||||
|
||||
@@ -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'}
|
||||
|
||||
@@ -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
|
||||
{}
|
||||
|
||||
@@ -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
|
||||
}
|
||||
]
|
||||
]
|
||||
|
||||
@@ -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())
|
||||
)
|
||||
);
|
||||
|
||||
@@ -388,4 +388,4 @@ def get_columns():
|
||||
},
|
||||
]
|
||||
|
||||
return columns
|
||||
return columns
|
||||
|
||||
@@ -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"]
|
||||
|
||||
@@ -21,4 +21,3 @@ def execute(filters=None):
|
||||
'export_type',
|
||||
'ecommerce_gstin'
|
||||
])
|
||||
|
||||
|
||||
@@ -285,5 +285,3 @@ def get_hsn_wise_json_data(filters, report_data):
|
||||
count +=1
|
||||
|
||||
return data
|
||||
|
||||
|
||||
|
||||
@@ -18,4 +18,4 @@ function fetch_gstins(report) {
|
||||
company_gstins.df.options = [""];
|
||||
company_gstins.refresh();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -52,7 +52,7 @@ def execute(filters=None):
|
||||
AND gl.party_type = "Supplier"
|
||||
AND gl.company = %(company)s
|
||||
{conditions}
|
||||
|
||||
|
||||
GROUP BY
|
||||
gl.party
|
||||
|
||||
|
||||
@@ -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;
|
||||
});
|
||||
});
|
||||
|
||||
@@ -69,4 +69,4 @@ def get_data(filters):
|
||||
|
||||
data.append(employee)
|
||||
|
||||
return data
|
||||
return data
|
||||
|
||||
@@ -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;
|
||||
});
|
||||
});
|
||||
|
||||
@@ -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)
|
||||
|
||||
@@ -74,4 +74,4 @@
|
||||
{% } %}
|
||||
</tbody>
|
||||
|
||||
</table>
|
||||
</table>
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
from __future__ import unicode_literals
|
||||
|
||||
def setup(company=None, patch=True):
|
||||
pass
|
||||
pass
|
||||
|
||||
Reference in New Issue
Block a user