[fixes]test case to check updated delivered qty

This commit is contained in:
Saurabh 2015-10-26 13:59:12 +05:30
parent 6d64fe378d
commit f857d81f35
2 changed files with 14 additions and 13 deletions

View File

@ -65,7 +65,7 @@
"ignore_user_permissions": 0,
"in_filter": 0,
"in_list_view": 0,
"label": "Series",
"label": "Series",
"no_copy": 1,
"oldfieldname": "naming_series",
"oldfieldtype": "Select",
@ -1168,7 +1168,7 @@
"ignore_user_permissions": 0,
"in_filter": 0,
"in_list_view": 0,
"label": "Apply Additional Discount On",
"label": "Apply Additional Discount On",
"no_copy": 0,
"options": "\nGrand Total\nNet Total",
"permlevel": 0,
@ -2211,7 +2211,7 @@
"ignore_user_permissions": 0,
"in_filter": 0,
"in_list_view": 0,
"label": "Source",
"label": "Source",
"no_copy": 0,
"oldfieldname": "source",
"oldfieldtype": "Select",
@ -2308,7 +2308,7 @@
"ignore_user_permissions": 0,
"in_filter": 1,
"in_list_view": 0,
"label": "Is Opening Entry",
"label": "Is Opening Entry",
"no_copy": 0,
"oldfieldname": "is_opening",
"oldfieldtype": "Select",
@ -2332,7 +2332,7 @@
"ignore_user_permissions": 0,
"in_filter": 0,
"in_list_view": 0,
"label": "C-Form Applicable",
"label": "C-Form Applicable",
"no_copy": 1,
"options": "No\nYes",
"permlevel": 0,
@ -2700,7 +2700,7 @@
"ignore_user_permissions": 0,
"in_filter": 0,
"in_list_view": 0,
"label": "Recurring Type",
"label": "Recurring Type",
"no_copy": 1,
"options": "\nMonthly\nQuarterly\nHalf-yearly\nYearly",
"permlevel": 0,
@ -2951,7 +2951,7 @@
"is_submittable": 1,
"issingle": 0,
"istable": 0,
"modified": "2015-10-02 07:39:09.123982",
"modified": "2015-10-26 12:12:40.616546",
"modified_by": "Administrator",
"module": "Accounts",
"name": "Sales Invoice",

View File

@ -299,6 +299,7 @@ class TestSalesOrder(unittest.TestCase):
def test_drop_shipping(self):
from erpnext.selling.doctype.sales_order.sales_order import make_purchase_order_for_drop_shipment, make_delivery_note
from erpnext.stock.doctype.item.test_item import make_item
from erpnext.buying.doctype.purchase_order.purchase_order import delivered_by_supplier
po_item = make_item("_Test Item for Drop Shipping", {"is_stock_item": 1, "is_sales_item": 1,
"is_purchase_item": 1, "is_drop_ship": 1, 'default_supplier': '_Test Supplier'})
@ -310,7 +311,7 @@ class TestSalesOrder(unittest.TestCase):
{
"item_code": po_item.item_code,
"warehouse": "_Test Warehouse - _TC",
"qty": 1,
"qty": 2,
"rate": 400,
"conversion_factor": 1.0,
"is_drop_ship": 1,
@ -319,7 +320,7 @@ class TestSalesOrder(unittest.TestCase):
{
"item_code": dn_item.item_code,
"warehouse": "_Test Warehouse - _TC",
"qty": 1,
"qty": 2,
"rate": 300,
"conversion_factor": 1.0
}
@ -334,9 +335,8 @@ class TestSalesOrder(unittest.TestCase):
po = make_purchase_order_for_drop_shipment(so.name, '_Test Supplier')
po.submit()
dn = make_delivery_note(so.name)
dn = create_dn_against_so(so, delivered_qty=1)
self.assertEquals(so.customer, po.customer)
self.assertEquals(po.items[0].prevdoc_doctype, "Sales Order")
self.assertEquals(po.items[0].prevdoc_docname, so.name)
@ -354,8 +354,9 @@ class TestSalesOrder(unittest.TestCase):
self.assertEquals(len(po.items), 1)
#test per_ordered status
per_ordered = frappe.db.get_value("Sales Order", so.name, "per_ordered")
self.assertEquals(per_ordered, 100.0)
delivered_by_supplier(po.name)
per_delivered = frappe.db.get_value("Sales Order", so.name, "per_delivered")
self.assertEquals(per_delivered, )
def test_reserved_qty_for_closing_so(self):
from erpnext.stock.doctype.item.test_item import make_item