Merge branch 'develop'

This commit is contained in:
Rushabh Mehta 2016-08-12 11:53:08 +05:30
commit c833cc8432
5 changed files with 21 additions and 19 deletions

View File

@ -2,7 +2,7 @@
from __future__ import unicode_literals
import frappe
__version__ = '7.0.26'
__version__ = '7.0.27'
def get_default_company(user=None):
'''Get default company for user'''

View File

@ -497,6 +497,18 @@ class PurchaseInvoice(BuyingController):
i += 1
if self.update_stock and valuation_tax:
for cost_center, amount in valuation_tax.items():
gl_entries.append(
self.get_gl_dict({
"account": self.expenses_included_in_valuation,
"cost_center": cost_center,
"against": self.supplier,
"credit": amount,
"remarks": self.remarks or "Accounting Entry for Stock"
})
)
def make_payment_gl_entries(self, gl_entries):
# Make Cash GL Entries
if cint(self.is_paid) and self.cash_bank_account and self.paid_amount:

View File

@ -55,14 +55,6 @@ def get_columns():
"fieldtype": "Date",
"width": 90
},
{
"fieldname": "payment_document",
"label": _("Payment Document"),
"fieldtype": "Link",
"options": "DocType",
"width": 120,
"hidden": 1
},
{
"fieldname": "payment_entry",
"label": _("Payment Entry"),

View File

@ -18,8 +18,10 @@ class Project(Document):
if not self.get('__unsaved') and not self.get("tasks"):
self.load_tasks()
self.set_onload('activity_summary', frappe.db.sql('''select activity_type, sum(hours) as total_hours
from `tabTimesheet Detail` where project=%s group by activity_type order by total_hours desc''', self.name, as_dict=True))
self.set_onload('activity_summary', frappe.db.sql('''select activity_type,
sum(hours) as total_hours
from `tabTimesheet Detail` where project=%s and docstatus < 2 group by activity_type
order by total_hours desc''', self.name, as_dict=True))
def __setup__(self):
self.onload()
@ -187,12 +189,12 @@ def get_list_context(context=None):
"row_template": "templates/includes/projects/project_row.html"
}
def get_users_for_project(doctype, txt, searchfield, start, page_len, filters):
def get_users_for_project(doctype, txt, searchfield, start, page_len, filters):
return frappe.db.sql("""select name, concat_ws(' ', first_name, middle_name, last_name)
from `tabUser`
where enabled=1
from `tabUser`
where enabled=1
and name not in ("Guest", "Administrator")
order by
order by
name asc""")
@frappe.whitelist()

View File

@ -78,10 +78,6 @@ class StockReconciliation(StockController):
default_currency = frappe.db.get_default("currency")
# validate no of rows
if len(self.items) > 100:
frappe.throw(_("""Max 100 rows for Stock Reconciliation."""))
for row_num, row in enumerate(self.items):
# find duplicates
if [row.item_code, row.warehouse] in item_warehouse_combinations: