# Path: jasper_erpnext_report/utils/jasper_file_jrxml.py
# def write_file_jrxml(fname, content, dn=None, content_type=None, parent=None):
# 	dt = frappe.form_dict.doctype
# 	if dt == "Jasper Reports":
# 		wobj = WriteFileJrxml(dt, fname, content, parent)
# 		f = wobj.process(dn=dn)
# 
# 		return f


import frappe
import mimetypes
from frappe import _
from frappe.utils.file_manager import get_uploaded_content
from jasper_erpnext_report.utils.jasper_file_jrxml import write_file_jrxml
from __future__ import unicode_literals
__author__ = 'luissaguas'





def save_upload_file(fname, content, dn, parent=None):

	content_type = mimetypes.guess_type(fname)[0]

# Path: jasper_erpnext_report/utils/jasper_file_jrxml.py
# def write_file_jrxml(fname, content, dn=None, content_type=None, parent=None):
# 	dt = frappe.form_dict.doctype
# 	if dt == "Jasper Reports":
# 		wobj = WriteFileJrxml(dt, fname, content, parent)
# 		f = wobj.process(dn=dn)
# 
# 		return f


# Path: jasper_erpnext_report/utils/upload.py
import frappe
import mimetypes
from frappe import _
from frappe.utils.file_manager import get_uploaded_content
from jasper_erpnext_report.utils.jasper_file_jrxml import write_file_jrxml

from __future__ import unicode_literals
__author__ = 'luissaguas'





def save_upload_file(fname, content, dn, parent=None):

	content_type = mimetypes.guess_type(fname)[0]

	file_data = write_file_jrxml(fname, content, dn=dn, content_type=content_type, parent=parent)