Skip to content

Commit

Permalink
fix: conflicts
Browse files Browse the repository at this point in the history
  • Loading branch information
rohitwaghchaure authored Jul 3, 2023
1 parent d4e680c commit b9833db
Showing 1 changed file with 0 additions and 49 deletions.
49 changes: 0 additions & 49 deletions erpnext/stock/doctype/purchase_receipt/test_purchase_receipt.py
Original file line number Diff line number Diff line change
Expand Up @@ -1849,54 +1849,6 @@ def test_internal_pr_reference(self):
pr.items[0].delivery_note_item = delivery_note_item
pr.save()

<<<<<<< HEAD
=======
def test_purchase_return_valuation_with_rejected_qty(self):
item_code = "_Test Item Return Valuation"
create_item(item_code)

warehouse = create_warehouse("_Test Warehouse Return Valuation")
rejected_warehouse = create_warehouse("_Test Rejected Warehouse Return Valuation")

# Step 1: Create Purchase Receipt with valuation rate 100
make_purchase_receipt(
item_code=item_code,
warehouse=warehouse,
qty=10,
rate=100,
rejected_qty=2,
rejected_warehouse=rejected_warehouse,
)

# Step 2: Create One more Purchase Receipt with valuation rate 200
pr = make_purchase_receipt(
item_code=item_code,
warehouse=warehouse,
qty=10,
rate=200,
rejected_qty=2,
rejected_warehouse=rejected_warehouse,
)

# Step 3: Create Purchase Return for 2 qty
from erpnext.stock.doctype.purchase_receipt.purchase_receipt import make_purchase_return

pr_return = make_purchase_return(pr.name)
pr_return.items[0].qty = 2 * -1
pr_return.items[0].received_qty = 2 * -1
pr_return.items[0].rejected_qty = 0
pr_return.items[0].rejected_warehouse = ""
pr_return.save()
pr_return.submit()

data = frappe.get_all(
"Stock Ledger Entry",
filters={"voucher_no": pr_return.name, "docstatus": 1},
fields=["SUM(stock_value_difference) as stock_value_difference"],
)[0]

self.assertEqual(abs(data["stock_value_difference"]), 400.00)

def test_purchase_receipt_with_backdated_landed_cost_voucher(self):
from erpnext.controllers.sales_and_purchase_return import make_return_doc
from erpnext.stock.doctype.landed_cost_voucher.test_landed_cost_voucher import (
Expand Down Expand Up @@ -2012,7 +1964,6 @@ def test_purchase_receipt_with_backdated_landed_cost_voucher(self):
ste5.reload()
self.assertEqual(ste5.items[0].valuation_rate, valuation_rate)

>>>>>>> c0c693d8b0 (fix: reposting has not changed valuation rate)

def prepare_data_for_internal_transfer():
from erpnext.accounts.doctype.sales_invoice.test_sales_invoice import create_internal_supplier
Expand Down

0 comments on commit b9833db

Please sign in to comment.