Merge branch 'develop'
This commit is contained in:
commit
ceb82324ad
@ -1,2 +1,2 @@
|
||||
from __future__ import unicode_literals
|
||||
__version__ = '6.12.1'
|
||||
__version__ = '6.12.2'
|
||||
|
@ -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",
|
||||
|
@ -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"
|
||||
|
@ -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")
|
||||
|
@ -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",
|
||||
|
@ -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",
|
||||
|
@ -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"):
|
||||
|
@ -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",
|
||||
|
Loading…
Reference in New Issue
Block a user