Skip to content

Commit

Permalink
fix: conflicts
Browse files Browse the repository at this point in the history
  • Loading branch information
rohitwaghchaure committed May 1, 2023
1 parent 198a64d commit 6bdf143
Showing 1 changed file with 0 additions and 63 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -272,62 +272,6 @@ def test_gl_complete_gl_reposting(self):
[{"credit": 50, "debit": 0}],
gle_filters={"account": "Stock In Hand - TCP1"},
)
<<<<<<< HEAD
=======

def test_duplicate_ple_on_repost(self):
from erpnext.accounts import utils

# lower numbers to simplify test
orig_chunk_size = utils.GL_REPOSTING_CHUNK
utils.GL_REPOSTING_CHUNK = 2
self.addCleanup(setattr, utils, "GL_REPOSTING_CHUNK", orig_chunk_size)

rate = 100
item = self.make_item()
item.valuation_rate = 90
item.allow_negative_stock = 1
item.save()

company = "_Test Company with perpetual inventory"

# consume non-existing stock
sinv = create_sales_invoice(
company=company,
posting_date=today(),
debit_to="Debtors - TCP1",
income_account="Sales - TCP1",
expense_account="Cost of Goods Sold - TCP1",
warehouse="Stores - TCP1",
update_stock=1,
currency="INR",
item_code=item.name,
cost_center="Main - TCP1",
qty=1,
rate=rate,
)

# backdated receipt triggers repost
make_stock_entry(
item=item.name,
company=company,
qty=5,
rate=rate,
target="Stores - TCP1",
posting_date=add_to_date(today(), days=-1),
)

ple_entries = frappe.db.get_list(
"Payment Ledger Entry",
filters={"voucher_type": sinv.doctype, "voucher_no": sinv.name, "delinked": 0},
)

# assert successful deduplication on PLE
self.assertEqual(len(ple_entries), 1)

# outstanding should not be affected
sinv.reload()
self.assertEqual(sinv.outstanding_amount, 100)

def test_account_freeze_validation(self):
today = nowdate()
Expand All @@ -348,12 +292,5 @@ def test_account_freeze_validation(self):
accounts_settings.save()

self.assertRaises(frappe.ValidationError, riv.save)

<<<<<<< HEAD
accounts_settings.acc_frozen_upto = ''
accounts_settings.save()
>>>>>>> 61f05132db (feat: validate repost item valuation against accounts freeze date)
=======
accounts_settings.acc_frozen_upto = ""
accounts_settings.save()
>>>>>>> be15419bd5 (chore: pre-commit)

0 comments on commit 6bdf143

Please sign in to comment.