'Pull details from invoices for referrence'

def get_invoice_details(self, invoice_no):

    if invoice_no:
        inv = frappe.db.get_value(u'Sales    Invoice', invoice_no, [u'posting_date', u'territory', u'base_net_total', u'base_grand_total'], as_dict=True)
        return {u'invoice_date': inv.posting_date, u'territory': inv.territory, u'net_total': inv.base_net_total, u'grand_total': inv.base_grand_total}
