project template in quotation
This commit is contained in:
parent
89bdbcfdcb
commit
909dab62b5
3 changed files with 111 additions and 53 deletions
|
|
@ -286,20 +286,21 @@ def get_estimate_templates(company):
|
|||
mapped_items = []
|
||||
for item in items:
|
||||
mapped_items.append({
|
||||
"itemCode": item.item_code,
|
||||
"itemName": item.item_name,
|
||||
"item_code": item.item_code,
|
||||
"item_name": item.item_name,
|
||||
"description": item.description,
|
||||
"quantity": item.qty,
|
||||
"discountPercentage": item.discount_percentage,
|
||||
"quantity": item.quantity,
|
||||
"discount_percentage": item.discount_percentage,
|
||||
"rate": item.rate
|
||||
})
|
||||
|
||||
result.append({
|
||||
"name": template.name,
|
||||
"templateName": template.template_name,
|
||||
"template_name": template.template_name,
|
||||
"active": template.is_active,
|
||||
"description": template.description,
|
||||
"items": mapped_items
|
||||
"items": mapped_items,
|
||||
"project_template": template.project_template,
|
||||
})
|
||||
|
||||
return build_success_response(result)
|
||||
|
|
@ -320,6 +321,7 @@ def create_estimate_template(data):
|
|||
"company": data.get("company"),
|
||||
"items": [],
|
||||
"template_name": data.get("template_name"),
|
||||
"custom_project_template": data.get("project_template", ""),
|
||||
"source_quotation": data.get("source_quotation", "")
|
||||
}
|
||||
|
||||
|
|
@ -448,8 +450,8 @@ def upsert_estimate(data):
|
|||
|
||||
def get_estimate_history(estimate_name):
|
||||
"""Get the history of changes for a specific estimate."""
|
||||
|
||||
return history
|
||||
pass
|
||||
# return history
|
||||
|
||||
# @frappe.whitelist()
|
||||
# def get_estimate_counts():
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue