Browse Source

Merge branch 'develop'

develop
Anand Doshi 9 years ago
parent
commit
b133240298
  1. 2
      erpnext/__version__.py
  2. 2
      erpnext/hooks.py
  3. 36
      erpnext/patches/v6_8/move_drop_ship_to_po_items.py
  4. 2
      setup.py

2
erpnext/__version__.py

@ -1,2 +1,2 @@
from __future__ import unicode_literals
__version__ = '6.10.0'
__version__ = '6.10.1'

2
erpnext/hooks.py

@ -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.10.0"
app_version = "6.10.1"
app_email = "info@erpnext.com"
app_license = "GNU General Public License (v3)"
source_link = "https://github.com/frappe/erpnext"

36
erpnext/patches/v6_8/move_drop_ship_to_po_items.py

@ -1,37 +1,39 @@
import frappe
def execute():
frappe.reload_doctype("Purchase Order")
frappe.reload_doctype("Purchase Order Item")
for po in frappe.get_all("Purchase Order", filters={"delivered_by_supplier": 1}, fields=["name"]):
purchase_order = frappe.get_doc("Purchase Order", po)
for item in purchase_order.items:
if item.prevdoc_doctype == "Sales Order":
delivered_by_supplier = frappe.get_value("Sales Order Item", item.prevdoc_detail_docname,
delivered_by_supplier = frappe.get_value("Sales Order Item", item.prevdoc_detail_docname,
"delivered_by_supplier")
if delivered_by_supplier:
frappe.db.sql("""update `tabPurchase Order Item`
frappe.db.sql("""update `tabPurchase Order Item`
set delivered_by_supplier=1, billed_amt=amount, received_qty=qty
where name=%s """, item.name)
update_per_received(purchase_order)
update_per_billed(purchase_order)
def update_per_received(po):
frappe.db.sql(""" update `tabPurchase Order`
set per_received = round((select sum(if(qty > ifnull(received_qty, 0),
ifnull(received_qty, 0), qty)) / sum(qty) *100
from `tabPurchase Order Item`
where parent = %(name)s), 2)
frappe.db.sql(""" update `tabPurchase Order`
set per_received = round((select sum(if(qty > ifnull(received_qty, 0),
ifnull(received_qty, 0), qty)) / sum(qty) *100
from `tabPurchase Order Item`
where parent = %(name)s), 2)
where name = %(name)s """, {"name": po.name})
def update_per_billed(po):
frappe.db.sql(""" update `tabPurchase Order`
set per_billed = round((select sum( if(amount > ifnull(billed_amt, 0),
ifnull(billed_amt, 0), amount)) / sum(amount) *100
from `tabPurchase Order Item`
where parent = %(name)s), 2)
frappe.db.sql(""" update `tabPurchase Order`
set per_billed = round((select sum( if(amount > ifnull(billed_amt, 0),
ifnull(billed_amt, 0), amount)) / sum(amount) *100
from `tabPurchase Order Item`
where parent = %(name)s), 2)
where name = %(name)s """, {"name": po.name})

2
setup.py

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

Loading…
Cancel
Save