mirror of
https://github.com/frappe/erpnext.git
synced 2026-06-05 13:24:47 +00:00
chore: resolve conflicts
This commit is contained in:
@@ -1584,11 +1584,7 @@
|
|||||||
"idx": 204,
|
"idx": 204,
|
||||||
"is_submittable": 1,
|
"is_submittable": 1,
|
||||||
"links": [],
|
"links": [],
|
||||||
<<<<<<< HEAD
|
|
||||||
"modified": "2023-10-01 21:01:47.282533",
|
"modified": "2023-10-01 21:01:47.282533",
|
||||||
=======
|
|
||||||
"modified": "2023-09-21 12:22:04.545106",
|
|
||||||
>>>>>>> e922ec60eb (feat: allow on submit fields)
|
|
||||||
"modified_by": "Administrator",
|
"modified_by": "Administrator",
|
||||||
"module": "Accounts",
|
"module": "Accounts",
|
||||||
"name": "Purchase Invoice",
|
"name": "Purchase Invoice",
|
||||||
|
|||||||
@@ -1710,65 +1710,6 @@ class TestPurchaseInvoice(unittest.TestCase, StockTestMixin):
|
|||||||
|
|
||||||
self.assertTrue(return_pi.docstatus == 1)
|
self.assertTrue(return_pi.docstatus == 1)
|
||||||
|
|
||||||
<<<<<<< HEAD
|
|
||||||
=======
|
|
||||||
def test_advance_entries_as_asset(self):
|
|
||||||
from erpnext.accounts.doctype.payment_entry.test_payment_entry import create_payment_entry
|
|
||||||
|
|
||||||
account = create_account(
|
|
||||||
parent_account="Current Assets - _TC",
|
|
||||||
account_name="Advances Paid",
|
|
||||||
company="_Test Company",
|
|
||||||
account_type="Receivable",
|
|
||||||
)
|
|
||||||
|
|
||||||
set_advance_flag(company="_Test Company", flag=1, default_account=account)
|
|
||||||
|
|
||||||
pe = create_payment_entry(
|
|
||||||
company="_Test Company",
|
|
||||||
payment_type="Pay",
|
|
||||||
party_type="Supplier",
|
|
||||||
party="_Test Supplier",
|
|
||||||
paid_from="Cash - _TC",
|
|
||||||
paid_to="Creditors - _TC",
|
|
||||||
paid_amount=500,
|
|
||||||
)
|
|
||||||
pe.submit()
|
|
||||||
|
|
||||||
pi = make_purchase_invoice(
|
|
||||||
company="_Test Company",
|
|
||||||
do_not_save=True,
|
|
||||||
do_not_submit=True,
|
|
||||||
rate=1000,
|
|
||||||
price_list_rate=1000,
|
|
||||||
qty=1,
|
|
||||||
)
|
|
||||||
pi.base_grand_total = 1000
|
|
||||||
pi.grand_total = 1000
|
|
||||||
pi.set_advances()
|
|
||||||
for advance in pi.advances:
|
|
||||||
advance.allocated_amount = 500 if advance.reference_name == pe.name else 0
|
|
||||||
pi.save()
|
|
||||||
pi.submit()
|
|
||||||
|
|
||||||
self.assertEqual(pi.advances[0].allocated_amount, 500)
|
|
||||||
|
|
||||||
# Check GL Entry against payment doctype
|
|
||||||
expected_gle = [
|
|
||||||
["Advances Paid - _TC", 0.0, 500, nowdate()],
|
|
||||||
["Cash - _TC", 0.0, 500, nowdate()],
|
|
||||||
["Creditors - _TC", 500, 0.0, nowdate()],
|
|
||||||
["Creditors - _TC", 500, 0.0, nowdate()],
|
|
||||||
]
|
|
||||||
|
|
||||||
check_gl_entries(self, pe.name, expected_gle, nowdate(), voucher_type="Payment Entry")
|
|
||||||
|
|
||||||
pi.load_from_db()
|
|
||||||
self.assertEqual(pi.outstanding_amount, 500)
|
|
||||||
|
|
||||||
set_advance_flag(company="_Test Company", flag=0, default_account="")
|
|
||||||
|
|
||||||
>>>>>>> c66c438575 (test: reposted acc entries for pi)
|
|
||||||
def test_gl_entries_for_standalone_debit_note(self):
|
def test_gl_entries_for_standalone_debit_note(self):
|
||||||
make_purchase_invoice(qty=5, rate=500, update_stock=True)
|
make_purchase_invoice(qty=5, rate=500, update_stock=True)
|
||||||
|
|
||||||
|
|||||||
@@ -551,46 +551,6 @@ class SalesInvoice(SellingController):
|
|||||||
self.validate_for_repost()
|
self.validate_for_repost()
|
||||||
self.db_set("repost_required", self.needs_repost)
|
self.db_set("repost_required", self.needs_repost)
|
||||||
|
|
||||||
<<<<<<< HEAD
|
|
||||||
<<<<<<< HEAD
|
|
||||||
# validate if deferred revenue is enabled for any item
|
|
||||||
# Don't allow to update the invoice if deferred revenue is enabled
|
|
||||||
=======
|
|
||||||
def validate_deferred_accounting_before_repost(self):
|
|
||||||
# validate if deferred revenue is enabled for any item
|
|
||||||
# Don't allow to update the invoice if deferred revenue is enabled
|
|
||||||
if self.needs_repost:
|
|
||||||
>>>>>>> 68effd93bd (refactor: move reposting logic to common controller)
|
|
||||||
for item in self.get("items"):
|
|
||||||
if item.enable_deferred_revenue:
|
|
||||||
frappe.throw(
|
|
||||||
_(
|
|
||||||
"Deferred Revenue is enabled for item {0}. You cannot update the invoice after submission."
|
|
||||||
).format(item.item_code)
|
|
||||||
)
|
|
||||||
<<<<<<< HEAD
|
|
||||||
|
|
||||||
self.db_set("repost_required", needs_repost)
|
|
||||||
|
|
||||||
def check_if_child_table_updated(
|
|
||||||
self, child_table, doc_before_update, fields_to_check, accounting_dimensions
|
|
||||||
):
|
|
||||||
# Check if any field affecting accounting entry is altered
|
|
||||||
for index, item in enumerate(self.get(child_table)):
|
|
||||||
for field in fields_to_check:
|
|
||||||
if doc_before_update.get(child_table)[index].get(field) != item.get(field):
|
|
||||||
return True
|
|
||||||
|
|
||||||
for dimension in accounting_dimensions:
|
|
||||||
if doc_before_update.get(child_table)[index].get(dimension) != item.get(dimension):
|
|
||||||
return True
|
|
||||||
|
|
||||||
return False
|
|
||||||
=======
|
|
||||||
>>>>>>> 68effd93bd (refactor: move reposting logic to common controller)
|
|
||||||
|
|
||||||
=======
|
|
||||||
>>>>>>> a856091ff4 (refactor: remove repeated validation for voucher)
|
|
||||||
def set_paid_amount(self):
|
def set_paid_amount(self):
|
||||||
paid_amount = 0.0
|
paid_amount = 0.0
|
||||||
base_paid_amount = 0.0
|
base_paid_amount = 0.0
|
||||||
|
|||||||
Reference in New Issue
Block a user