Merge pull request #21985 from marination/import-italian-invoice-dev
chore: Added Italian Import Supplier Invoice to Desk
diff --git a/erpnext/accounts/doctype/tax_withholding_category/tax_withholding_category.py b/erpnext/accounts/doctype/tax_withholding_category/tax_withholding_category.py
index 4d43919..83d7967 100644
--- a/erpnext/accounts/doctype/tax_withholding_category/tax_withholding_category.py
+++ b/erpnext/accounts/doctype/tax_withholding_category/tax_withholding_category.py
@@ -180,7 +180,7 @@
if company:
condition += "and company =%s" % (company)
if from_date and to_date:
- condition += "and posting_date between %s and %s" % (company, from_date, to_date)
+ condition += "and posting_date between %s and %s" % (from_date, to_date)
## Appending the same supplier again if length of suppliers list is 1
## since tuple of single element list contains None, For example ('Test Supplier 1', )
diff --git a/erpnext/education/doctype/fee_schedule/fee_schedule.json b/erpnext/education/doctype/fee_schedule/fee_schedule.json
index 1e98709..7918318 100644
--- a/erpnext/education/doctype/fee_schedule/fee_schedule.json
+++ b/erpnext/education/doctype/fee_schedule/fee_schedule.json
@@ -1,4 +1,5 @@
{
+ "actions": [],
"allow_import": 1,
"autoname": "naming_series:",
"creation": "2017-07-18 15:21:21.527136",
@@ -7,6 +8,7 @@
"engine": "InnoDB",
"field_order": [
"fee_structure",
+ "posting_date",
"due_date",
"naming_series",
"fee_creation_status",
@@ -259,10 +261,18 @@
{
"fieldname": "dimension_col_break",
"fieldtype": "Column Break"
+ },
+ {
+ "default": "Today",
+ "fieldname": "posting_date",
+ "fieldtype": "Date",
+ "label": "Posting Date",
+ "reqd": 1
}
],
"is_submittable": 1,
- "modified": "2019-05-26 09:10:34.522409",
+ "links": [],
+ "modified": "2020-05-15 08:39:20.682837",
"modified_by": "Administrator",
"module": "Education",
"name": "Fee Schedule",
diff --git a/erpnext/education/doctype/fee_schedule/fee_schedule.py b/erpnext/education/doctype/fee_schedule/fee_schedule.py
index a42800a..1543acd 100644
--- a/erpnext/education/doctype/fee_schedule/fee_schedule.py
+++ b/erpnext/education/doctype/fee_schedule/fee_schedule.py
@@ -87,6 +87,7 @@
}
}
})
+ fees_doc.posting_date = doc.posting_date
fees_doc.student = student.student
fees_doc.student_name = student.student_name
fees_doc.program = student.program
diff --git a/erpnext/erpnext_integrations/doctype/shopify_settings/shopify_settings.json b/erpnext/erpnext_integrations/doctype/shopify_settings/shopify_settings.json
index 8f1b746..d1e5f40 100644
--- a/erpnext/erpnext_integrations/doctype/shopify_settings/shopify_settings.json
+++ b/erpnext/erpnext_integrations/doctype/shopify_settings/shopify_settings.json
@@ -133,7 +133,7 @@
"label": "Customer Settings"
},
{
- "description": "If Shopify not contains a customer in Order, then while syncing Orders, the system will consider default customer for order",
+ "description": "If Shopify does not have a customer in the order, then while syncing the orders, the system will consider the default customer for the order",
"fieldname": "default_customer",
"fieldtype": "Link",
"label": "Default Customer",
@@ -277,4 +277,4 @@
],
"sort_field": "modified",
"sort_order": "DESC"
-}
\ No newline at end of file
+}
diff --git a/erpnext/manufacturing/report/exponential_smoothing_forecasting/exponential_smoothing_forecasting.py b/erpnext/manufacturing/report/exponential_smoothing_forecasting/exponential_smoothing_forecasting.py
index 1b49df6..cac8067 100644
--- a/erpnext/manufacturing/report/exponential_smoothing_forecasting/exponential_smoothing_forecasting.py
+++ b/erpnext/manufacturing/report/exponential_smoothing_forecasting/exponential_smoothing_forecasting.py
@@ -21,8 +21,6 @@
if value.get(period.key) and not forecast_data:
value[forecast_key] = flt(value.get("avg", 0)) or flt(value.get(period.key))
- # will be use to forecaset next period
- forecast_data.append([value.get(period.key), value.get(forecast_key)])
elif forecast_data:
previous_period_data = forecast_data[-1]
value[forecast_key] = (previous_period_data[1] +
@@ -31,6 +29,10 @@
)
)
+ if value.get(forecast_key):
+ # will be use to forecaset next period
+ forecast_data.append([value.get(period.key), value.get(forecast_key)])
+
class ForecastingReport(ExponentialSmoothingForecast):
def __init__(self, filters=None):
self.filters = frappe._dict(filters or {})
@@ -78,7 +80,9 @@
list_of_period_value = [value.get(p.key, 0) for p in self.period_list]
if list_of_period_value:
- value["avg"] = sum(list_of_period_value) / len(list_of_period_value)
+ total_qty = [1 for d in list_of_period_value if d]
+ if total_qty:
+ value["avg"] = flt(sum(list_of_period_value)) / flt(sum(total_qty))
def get_data_for_forecast(self):
cond = ""
@@ -152,15 +156,19 @@
"width": 130
}]
- width = 150 if self.filters.periodicity in ['Yearly', "Half-Yearly", "Quarterly"] else 100
+ width = 180 if self.filters.periodicity in ['Yearly', "Half-Yearly", "Quarterly"] else 100
for period in self.period_list:
if (self.filters.periodicity in ['Yearly', "Half-Yearly", "Quarterly"]
or period.from_date >= getdate(self.filters.from_date)):
- forecast_key = 'forecast_' + period.key
+ forecast_key = period.key
+ label = _(period.label)
+ if period.from_date >= getdate(self.filters.from_date):
+ forecast_key = 'forecast_' + period.key
+ label = _(period.label) + " " + _("(Forecast)")
columns.append({
- "label": _(period.label),
+ "label": label,
"fieldname": forecast_key,
"fieldtype": self.fieldtype,
"width": width,
diff --git a/erpnext/manufacturing/report/job_card_summary/job_card_summary.js b/erpnext/manufacturing/report/job_card_summary/job_card_summary.js
index 33953b1..bd68db1 100644
--- a/erpnext/manufacturing/report/job_card_summary/job_card_summary.js
+++ b/erpnext/manufacturing/report/job_card_summary/job_card_summary.js
@@ -41,7 +41,7 @@
reqd: 1
},
{
- label: __("To Posting Datetime"),
+ label: __("To Posting Date"),
fieldname:"to_date",
fieldtype: "Date",
default: frappe.defaults.get_user_default("year_end_date"),
diff --git a/erpnext/manufacturing/report/job_card_summary/job_card_summary.py b/erpnext/manufacturing/report/job_card_summary/job_card_summary.py
index 953d820..b1bff35 100644
--- a/erpnext/manufacturing/report/job_card_summary/job_card_summary.py
+++ b/erpnext/manufacturing/report/job_card_summary/job_card_summary.py
@@ -16,7 +16,7 @@
def get_data(filters):
query_filters = {
- "docstatus": ("=", 1),
+ "docstatus": ("<", 2),
"posting_date": ("between", [filters.from_date, filters.to_date])
}
@@ -35,7 +35,7 @@
job_cards = [d.name for d in data]
job_card_time_filter = {
- "docstatus": 1,
+ "docstatus": ("<", 2),
"parent": ("in", job_cards),
}
@@ -47,27 +47,28 @@
res = []
for d in data:
- if d.status == "Material Transferred":
+ if d.status != "Completed":
d.status = "Open"
if job_card_time_details.get(d.name):
d.from_time = job_card_time_details.get(d.name).from_time
d.to_time = job_card_time_details.get(d.name).to_time
- res.append(d)
+
+ res.append(d)
return res
def get_chart_data(job_card_details, filters):
labels, periodic_data = prepare_chart_data(job_card_details, filters)
- pending, completed = [], []
+ open_job_cards, completed = [], []
datasets = []
for d in labels:
- pending.append(periodic_data.get("Pending").get(d))
+ open_job_cards.append(periodic_data.get("Open").get(d))
completed.append(periodic_data.get("Completed").get(d))
- datasets.append({"name": "Pending", "values": pending})
+ datasets.append({"name": "Open", "values": open_job_cards})
datasets.append({"name": "Completed", "values": completed})
chart = {
@@ -84,7 +85,7 @@
labels = []
periodic_data = {
- "Pending": {},
+ "Open": {},
"Completed": {}
}
@@ -98,7 +99,7 @@
for d in job_card_details:
if getdate(d.posting_date) > from_date and getdate(d.posting_date) <= end_date:
- status = "Completed" if d.status == "Completed" else "Pending"
+ status = "Completed" if d.status == "Completed" else "Open"
if periodic_data.get(status).get(period):
periodic_data[status][period] += 1
diff --git a/erpnext/manufacturing/report/work_order_summary/work_order_summary.js b/erpnext/manufacturing/report/work_order_summary/work_order_summary.js
index 2292865..eb23f17 100644
--- a/erpnext/manufacturing/report/work_order_summary/work_order_summary.js
+++ b/erpnext/manufacturing/report/work_order_summary/work_order_summary.js
@@ -41,7 +41,7 @@
reqd: 1
},
{
- label: __("To Posting Datetime"),
+ label: __("To Posting Date"),
fieldname:"to_date",
fieldtype: "Date",
default: frappe.defaults.get_user_default("year_end_date"),