mirror of
https://github.com/frappe/erpnext.git
synced 2026-05-16 03:29:16 +00:00
fix: conflicts while merging brnach version-13 to develop
This commit is contained in:
@@ -310,6 +310,7 @@
|
||||
"read_only": 1
|
||||
},
|
||||
{
|
||||
"default": "1",
|
||||
"fieldname": "exchange_rate",
|
||||
"fieldtype": "Float",
|
||||
"label": "Exchange Rate"
|
||||
@@ -319,7 +320,7 @@
|
||||
"idx": 1,
|
||||
"is_submittable": 1,
|
||||
"links": [],
|
||||
"modified": "2021-05-18 16:10:08.249619",
|
||||
"modified": "2021-06-09 12:08:53.930200",
|
||||
"modified_by": "Administrator",
|
||||
"module": "Projects",
|
||||
"name": "Timesheet",
|
||||
|
||||
@@ -227,7 +227,8 @@ def get_projectwise_timesheet_data(project=None, parent=None, from_time=None, to
|
||||
return frappe.db.sql("""SELECT tsd.name as name,
|
||||
tsd.parent as parent, tsd.billing_hours as billing_hours,
|
||||
tsd.billing_amount as billing_amount, tsd.activity_type as activity_type,
|
||||
tsd.description as description, ts.currency as currency
|
||||
tsd.description as description, ts.currency as currency,
|
||||
tsd.project_name as project_name
|
||||
FROM `tabTimesheet Detail` tsd
|
||||
INNER JOIN `tabTimesheet` ts ON ts.name = tsd.parent
|
||||
WHERE tsd.parenttype = 'Timesheet'
|
||||
@@ -235,6 +236,19 @@ def get_projectwise_timesheet_data(project=None, parent=None, from_time=None, to
|
||||
and tsd.is_billable = 1
|
||||
and tsd.sales_invoice is null""".format(condition), {'project': project, 'parent': parent, 'from_time': from_time, 'to_time': to_time}, as_dict=1)
|
||||
|
||||
@frappe.whitelist()
|
||||
def get_timesheet_detail_rate(timelog, currency):
|
||||
timelog_detail = frappe.db.sql("""SELECT tsd.billing_amount as billing_amount,
|
||||
ts.currency as currency FROM `tabTimesheet Detail` tsd
|
||||
INNER JOIN `tabTimesheet` ts ON ts.name=tsd.parent
|
||||
WHERE tsd.name = '{0}'""".format(timelog), as_dict = 1)[0]
|
||||
|
||||
if timelog_detail.currency:
|
||||
exchange_rate = get_exchange_rate(timelog_detail.currency, currency)
|
||||
|
||||
return timelog_detail.billing_amount * exchange_rate
|
||||
return timelog_detail.billing_amount
|
||||
|
||||
@frappe.whitelist()
|
||||
@frappe.validate_and_sanitize_search_inputs
|
||||
def get_timesheet(doctype, txt, searchfield, start, page_len, filters):
|
||||
|
||||
Reference in New Issue
Block a user