mirror of
https://github.com/frappe/erpnext.git
synced 2026-05-27 08:54:45 +00:00
chore: whitespace cleanup from codebase
This commit is contained in:
@@ -52,4 +52,4 @@ erpnext.crop.update_item_qty_amount = function(frm, cdt, cdn) {
|
||||
}
|
||||
});
|
||||
});
|
||||
};
|
||||
};
|
||||
|
||||
@@ -9,4 +9,4 @@ def get_data():
|
||||
'items': ['Crop Cycle']
|
||||
}
|
||||
]
|
||||
}
|
||||
}
|
||||
|
||||
@@ -105,7 +105,7 @@ QUnit.test("test: Crop", function (assert) {
|
||||
]
|
||||
]}
|
||||
]),
|
||||
// agriculture task list
|
||||
// agriculture task list
|
||||
() => {
|
||||
assert.equal(cur_frm.doc.name, 'Basil from seed');
|
||||
assert.equal(cur_frm.doc.period, 15);
|
||||
|
||||
@@ -11,4 +11,4 @@ test_dependencies = ["Fertilizer"]
|
||||
class TestCrop(unittest.TestCase):
|
||||
def test_crop_period(self):
|
||||
basil = frappe.get_doc('Crop', 'Basil from seed')
|
||||
self.assertEqual(basil.period, 15)
|
||||
self.assertEqual(basil.period, 15)
|
||||
|
||||
@@ -19,7 +19,7 @@ QUnit.test("test: Crop Cycle", function (assert) {
|
||||
{disease: 'Aphids'}
|
||||
]
|
||||
]},
|
||||
{linked_land_unit: [
|
||||
{linked_land_unit: [
|
||||
[
|
||||
{land_unit: 'Basil Farm'}
|
||||
]
|
||||
|
||||
@@ -17,4 +17,4 @@ class Disease(Document):
|
||||
frappe.throw(_("Start day is greater than end day in task '{0}'").format(task.task_name))
|
||||
# to calculate the period of the Crop Cycle
|
||||
if task.end_day > max_period: max_period = task.end_day
|
||||
self.treatment_period = max_period
|
||||
self.treatment_period = max_period
|
||||
|
||||
@@ -36,4 +36,3 @@ QUnit.test("test: Disease", function (assert) {
|
||||
]);
|
||||
|
||||
});
|
||||
|
||||
|
||||
@@ -9,4 +9,4 @@ import unittest
|
||||
class TestDisease(unittest.TestCase):
|
||||
def test_treatment_period(self):
|
||||
disease = frappe.get_doc('Disease', 'Aphids')
|
||||
self.assertEqual(disease.treatment_period, 3)
|
||||
self.assertEqual(disease.treatment_period, 3)
|
||||
|
||||
@@ -11,4 +11,4 @@ class Fertilizer(Document):
|
||||
def load_contents(self):
|
||||
docs = frappe.get_all("Agriculture Analysis Criteria", filters={'linked_doctype':'Fertilizer'})
|
||||
for doc in docs:
|
||||
self.append('fertilizer_contents', {'title': str(doc.name)})
|
||||
self.append('fertilizer_contents', {'title': str(doc.name)})
|
||||
|
||||
@@ -8,4 +8,4 @@ import unittest
|
||||
|
||||
class TestFertilizer(unittest.TestCase):
|
||||
def test_fertilizer_creation(self):
|
||||
self.assertEqual(frappe.db.exists('Fertilizer', 'Urea'), 'Urea')
|
||||
self.assertEqual(frappe.db.exists('Fertilizer', 'Urea'), 'Urea')
|
||||
|
||||
@@ -12,4 +12,4 @@ class PlantAnalysis(Document):
|
||||
def load_contents(self):
|
||||
docs = frappe.get_all("Agriculture Analysis Criteria", filters={'linked_doctype':'Plant Analysis'})
|
||||
for doc in docs:
|
||||
self.append('plant_analysis_criteria', {'title': str(doc.name)})
|
||||
self.append('plant_analysis_criteria', {'title': str(doc.name)})
|
||||
|
||||
@@ -11,4 +11,4 @@ class SoilAnalysis(Document):
|
||||
def load_contents(self):
|
||||
docs = frappe.get_all("Agriculture Analysis Criteria", filters={'linked_doctype':'Soil Analysis'})
|
||||
for doc in docs:
|
||||
self.append('soil_analysis_criteria', {'title': str(doc.name)})
|
||||
self.append('soil_analysis_criteria', {'title': str(doc.name)})
|
||||
|
||||
@@ -11,4 +11,4 @@ class TestSoilTexture(unittest.TestCase):
|
||||
soil_tex = frappe.get_all('Soil Texture', fields=['name'], filters={'collection_datetime': '2017-11-08'})
|
||||
doc = frappe.get_doc('Soil Texture', soil_tex[0].name)
|
||||
self.assertEqual(doc.silt_composition, 50)
|
||||
self.assertEqual(doc.soil_type, 'Silt Loam')
|
||||
self.assertEqual(doc.soil_type, 'Silt Loam')
|
||||
|
||||
@@ -24,4 +24,4 @@ class WaterAnalysis(Document):
|
||||
if self.collection_datetime > self.laboratory_testing_datetime:
|
||||
frappe.throw(_('Lab testing datetime cannot be before collection datetime'))
|
||||
if self.laboratory_testing_datetime > self.result_datetime:
|
||||
frappe.throw(_('Lab result datetime cannot be before testing datetime'))
|
||||
frappe.throw(_('Lab result datetime cannot be before testing datetime'))
|
||||
|
||||
@@ -426,5 +426,5 @@ def create_agriculture_data():
|
||||
title='Degree Days',
|
||||
standard=1,
|
||||
linked_doctype='Weather')
|
||||
]
|
||||
]
|
||||
insert_record(records)
|
||||
|
||||
Reference in New Issue
Block a user