mirror of
https://github.com/frappe/erpnext.git
synced 2026-05-31 18:59:08 +00:00
Merge branch 'develop'
This commit is contained in:
@@ -2,7 +2,7 @@
|
|||||||
from __future__ import unicode_literals
|
from __future__ import unicode_literals
|
||||||
import frappe
|
import frappe
|
||||||
|
|
||||||
__version__ = '7.0.26'
|
__version__ = '7.0.27'
|
||||||
|
|
||||||
def get_default_company(user=None):
|
def get_default_company(user=None):
|
||||||
'''Get default company for user'''
|
'''Get default company for user'''
|
||||||
|
|||||||
@@ -497,6 +497,18 @@ class PurchaseInvoice(BuyingController):
|
|||||||
|
|
||||||
i += 1
|
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):
|
def make_payment_gl_entries(self, gl_entries):
|
||||||
# Make Cash GL Entries
|
# Make Cash GL Entries
|
||||||
if cint(self.is_paid) and self.cash_bank_account and self.paid_amount:
|
if cint(self.is_paid) and self.cash_bank_account and self.paid_amount:
|
||||||
|
|||||||
@@ -55,14 +55,6 @@ def get_columns():
|
|||||||
"fieldtype": "Date",
|
"fieldtype": "Date",
|
||||||
"width": 90
|
"width": 90
|
||||||
},
|
},
|
||||||
{
|
|
||||||
"fieldname": "payment_document",
|
|
||||||
"label": _("Payment Document"),
|
|
||||||
"fieldtype": "Link",
|
|
||||||
"options": "DocType",
|
|
||||||
"width": 120,
|
|
||||||
"hidden": 1
|
|
||||||
},
|
|
||||||
{
|
{
|
||||||
"fieldname": "payment_entry",
|
"fieldname": "payment_entry",
|
||||||
"label": _("Payment Entry"),
|
"label": _("Payment Entry"),
|
||||||
|
|||||||
@@ -18,8 +18,10 @@ class Project(Document):
|
|||||||
if not self.get('__unsaved') and not self.get("tasks"):
|
if not self.get('__unsaved') and not self.get("tasks"):
|
||||||
self.load_tasks()
|
self.load_tasks()
|
||||||
|
|
||||||
self.set_onload('activity_summary', frappe.db.sql('''select activity_type, sum(hours) as total_hours
|
self.set_onload('activity_summary', frappe.db.sql('''select activity_type,
|
||||||
from `tabTimesheet Detail` where project=%s group by activity_type order by total_hours desc''', self.name, as_dict=True))
|
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):
|
def __setup__(self):
|
||||||
self.onload()
|
self.onload()
|
||||||
@@ -187,12 +189,12 @@ def get_list_context(context=None):
|
|||||||
"row_template": "templates/includes/projects/project_row.html"
|
"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)
|
return frappe.db.sql("""select name, concat_ws(' ', first_name, middle_name, last_name)
|
||||||
from `tabUser`
|
from `tabUser`
|
||||||
where enabled=1
|
where enabled=1
|
||||||
and name not in ("Guest", "Administrator")
|
and name not in ("Guest", "Administrator")
|
||||||
order by
|
order by
|
||||||
name asc""")
|
name asc""")
|
||||||
|
|
||||||
@frappe.whitelist()
|
@frappe.whitelist()
|
||||||
|
|||||||
@@ -78,10 +78,6 @@ class StockReconciliation(StockController):
|
|||||||
|
|
||||||
default_currency = frappe.db.get_default("currency")
|
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):
|
for row_num, row in enumerate(self.items):
|
||||||
# find duplicates
|
# find duplicates
|
||||||
if [row.item_code, row.warehouse] in item_warehouse_combinations:
|
if [row.item_code, row.warehouse] in item_warehouse_combinations:
|
||||||
|
|||||||
Reference in New Issue
Block a user