Merge branch 'develop'

This commit is contained in:
Rushabh Mehta 2015-12-02 14:54:45 +05:30
commit ceb82324ad
9 changed files with 23 additions and 12 deletions

View File

@ -1,2 +1,2 @@
from __future__ import unicode_literals
__version__ = '6.12.1'
__version__ = '6.12.2'

View File

@ -8,7 +8,6 @@ from frappe.utils import cstr, flt
from frappe import msgprint, _, throw
from frappe.model.mapper import get_mapped_doc
from erpnext.controllers.buying_controller import BuyingController
from erpnext.stock.doctype.item.item import get_last_purchase_details
from erpnext.stock.stock_balance import update_bin_qty, get_ordered_qty
from frappe.desk.notifications import clear_doctype_notifications
@ -282,7 +281,7 @@ def make_purchase_receipt(source_name, target_doc=None):
"parenttype": "prevdoc_doctype",
},
"postprocess": update_item,
"condition": lambda doc: doc.received_qty < doc.qty and doc.delivered_by_supplier!=1
"condition": lambda doc: abs(doc.received_qty) < abs(doc.qty) and doc.delivered_by_supplier!=1
},
"Purchase Taxes and Charges": {
"doctype": "Purchase Taxes and Charges",
@ -318,7 +317,7 @@ def make_purchase_invoice(source_name, target_doc=None):
"parent": "purchase_order",
},
"postprocess": update_item,
"condition": lambda doc: (doc.base_amount==0 or doc.billed_amt < doc.amount)
"condition": lambda doc: (doc.base_amount==0 or abs(doc.billed_amt) < abs(doc.amount))
},
"Purchase Taxes and Charges": {
"doctype": "Purchase Taxes and Charges",

View File

@ -7,7 +7,7 @@ app_publisher = "Frappe Technologies Pvt. Ltd."
app_description = """ERP made simple"""
app_icon = "icon-th"
app_color = "#e74c3c"
app_version = "6.12.1"
app_version = "6.12.2"
app_email = "info@erpnext.com"
app_license = "GNU General Public License (v3)"
source_link = "https://github.com/frappe/erpnext"

View File

@ -29,10 +29,15 @@ class SalarySlip(TransactionBase):
def check_sal_struct(self):
m = get_month_details(self.fiscal_year, self.month)
joining_date, relieving_date = frappe.db.get_value("Employee", self.employee,
["date_of_joining", "relieving_date"])
struct = frappe.db.sql("""select name from `tabSalary Structure`
where employee=%s and is_active = 'Yes'
and from_date <= %s and (to_date is null or to_date >= %s)""",
(self.employee, m.month_start_date, m.month_end_date))
and (from_date <= %s or from_date <= %s)
and (to_date is null or to_date >= %s or to_date >= %s)""",
(self.employee, m.month_start_date, joining_date, m.month_end_date, relieving_date))
if not struct:
msgprint(_("No active Salary Structure found for employee {0} and the month")

View File

@ -384,7 +384,7 @@ def make_delivery_note(source_name, target_doc=None):
"parent": "against_sales_order",
},
"postprocess": update_item,
"condition": lambda doc: doc.delivered_qty < doc.qty and doc.delivered_by_supplier!=1
"condition": lambda doc: abs(doc.delivered_qty) < abs(doc.qty) and doc.delivered_by_supplier!=1
},
"Sales Taxes and Charges": {
"doctype": "Sales Taxes and Charges",
@ -430,7 +430,7 @@ def make_sales_invoice(source_name, target_doc=None):
"parent": "sales_order",
},
"postprocess": update_item,
"condition": lambda doc: doc.qty and (doc.base_amount==0 or doc.billed_amt < doc.amount)
"condition": lambda doc: doc.qty and (doc.base_amount==0 or abs(doc.billed_amt) < abs(doc.amount))
},
"Sales Taxes and Charges": {
"doctype": "Sales Taxes and Charges",

View File

@ -332,7 +332,7 @@ def make_sales_invoice(source_name, target_doc=None):
"serial_no": "serial_no"
},
"postprocess": update_item,
"filter": lambda d: d.qty - invoiced_qty_map.get(d.name, 0)<=0
"filter": lambda d: abs(d.qty) - abs(invoiced_qty_map.get(d.name, 0))<=0
},
"Sales Taxes and Charges": {
"doctype": "Sales Taxes and Charges",

View File

@ -378,6 +378,13 @@ class Item(WebsiteGenerator):
if not (self.is_purchase_item or self.is_pro_applicable):
frappe.throw(_("""To set reorder level, item must be a Purchase Item or Manufacturing Item"""))
if self.re_order_level and not self.re_order_qty:
frappe.throw(_("Please set reorder quantity"))
for d in self.get("reorder_levels"):
if d.warehouse_reorder_level and not d.warehouse_reorder_qty:
frappe.throw(_("Row #{0}: Please set reorder quantity").format(d.idx))
def validate_warehouse_for_reorder(self):
warehouse = []
for i in self.get("reorder_levels"):

View File

@ -469,7 +469,7 @@ def make_purchase_invoice(source_name, target_doc=None):
"prevdoc_docname": "purchase_order",
},
"postprocess": update_item,
"filter": lambda d: d.qty - invoiced_qty_map.get(d.name, 0)<=0
"filter": lambda d: abs(d.qty) - abs(invoiced_qty_map.get(d.name, 0))<=0
},
"Purchase Taxes and Charges": {
"doctype": "Purchase Taxes and Charges",

View File

@ -1,6 +1,6 @@
from setuptools import setup, find_packages
version = "6.12.1"
version = "6.12.2"
with open("requirements.txt", "r") as f:
install_requires = f.readlines()