2014-10-21 10:46:30 +00:00
|
|
|
# Copyright (c) 2013, Web Notes Technologies Pvt. Ltd. and Contributors
|
|
|
|
# License: GNU General Public License v3. See license.txt
|
|
|
|
|
|
|
|
from __future__ import unicode_literals
|
|
|
|
import frappe
|
2014-10-22 10:26:38 +00:00
|
|
|
from erpnext.templates.utils import get_currency_context
|
2014-10-21 10:46:30 +00:00
|
|
|
|
|
|
|
no_cache = 1
|
|
|
|
no_sitemap = 1
|
|
|
|
|
|
|
|
def get_context(context):
|
|
|
|
invoices_context = get_currency_context()
|
|
|
|
invoices_context.update({
|
|
|
|
"title": "Invoices",
|
2014-10-22 10:26:38 +00:00
|
|
|
"method": "erpnext.templates.pages.invoices.get_invoices",
|
2014-10-21 10:46:30 +00:00
|
|
|
"icon": "icon-file-text",
|
|
|
|
"empty_list_message": "No Invoices Found",
|
|
|
|
"page": "invoice"
|
|
|
|
})
|
|
|
|
return invoices_context
|
|
|
|
|
|
|
|
@frappe.whitelist()
|
|
|
|
def get_invoices(start=0):
|
2014-10-22 10:26:38 +00:00
|
|
|
from erpnext.templates.utils import get_transaction_list
|
|
|
|
from erpnext.templates.pages.invoice import modify_status
|
2014-10-21 10:46:30 +00:00
|
|
|
invoices = get_transaction_list("Sales Invoice", start, ["outstanding_amount"])
|
|
|
|
for d in invoices:
|
|
|
|
modify_status(d)
|
|
|
|
return invoices
|