mirror of
https://github.com/frappe/erpnext.git
synced 2026-05-27 17:04:47 +00:00
chore: resolve conflicts
This commit is contained in:
@@ -244,39 +244,6 @@ class PartyLedgerSummaryReport:
|
|||||||
},
|
},
|
||||||
]
|
]
|
||||||
|
|
||||||
<<<<<<< HEAD
|
|
||||||
# Hidden columns for handling 'User Permissions'
|
|
||||||
if self.filters.party_type == "Customer":
|
|
||||||
columns += [
|
|
||||||
{
|
|
||||||
"label": _("Territory"),
|
|
||||||
"fieldname": "territory",
|
|
||||||
"fieldtype": "Link",
|
|
||||||
"options": "Territory",
|
|
||||||
"hidden": 1,
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"label": _("Customer Group"),
|
|
||||||
"fieldname": "customer_group",
|
|
||||||
"fieldtype": "Link",
|
|
||||||
"options": "Customer Group",
|
|
||||||
"hidden": 1,
|
|
||||||
},
|
|
||||||
]
|
|
||||||
else:
|
|
||||||
columns += [
|
|
||||||
{
|
|
||||||
"label": _("Supplier Group"),
|
|
||||||
"fieldname": "supplier_group",
|
|
||||||
"fieldtype": "Link",
|
|
||||||
"options": "Supplier Group",
|
|
||||||
"hidden": 1,
|
|
||||||
}
|
|
||||||
]
|
|
||||||
|
|
||||||
=======
|
|
||||||
columns.append({"label": _("Dr/Cr"), "fieldname": "dr_or_cr", "fieldtype": "Data", "width": 100})
|
|
||||||
>>>>>>> 231479a6e2 (fix(ledger-summary-report): show party group and territory)
|
|
||||||
return columns
|
return columns
|
||||||
|
|
||||||
def get_data(self):
|
def get_data(self):
|
||||||
|
|||||||
@@ -151,96 +151,6 @@ class TestCustomerLedgerSummary(FrappeTestCase, AccountsTestMixin):
|
|||||||
with self.subTest(field=field):
|
with self.subTest(field=field):
|
||||||
self.assertEqual(report[0].get(field), expected_after_cr_and_payment.get(field))
|
self.assertEqual(report[0].get(field), expected_after_cr_and_payment.get(field))
|
||||||
|
|
||||||
<<<<<<< HEAD
|
|
||||||
=======
|
|
||||||
def test_customer_ledger_ignore_cr_dr_filter(self):
|
|
||||||
si = create_sales_invoice()
|
|
||||||
|
|
||||||
cr_note = make_return_doc(si.doctype, si.name)
|
|
||||||
cr_note.submit()
|
|
||||||
|
|
||||||
pr = frappe.get_doc("Payment Reconciliation")
|
|
||||||
pr.company = si.company
|
|
||||||
pr.party_type = "Customer"
|
|
||||||
pr.party = si.customer
|
|
||||||
pr.receivable_payable_account = si.debit_to
|
|
||||||
|
|
||||||
pr.get_unreconciled_entries()
|
|
||||||
|
|
||||||
invoices = [invoice.as_dict() for invoice in pr.invoices if invoice.invoice_number == si.name]
|
|
||||||
payments = [payment.as_dict() for payment in pr.payments if payment.reference_name == cr_note.name]
|
|
||||||
pr.allocate_entries(frappe._dict({"invoices": invoices, "payments": payments}))
|
|
||||||
pr.reconcile()
|
|
||||||
|
|
||||||
system_generated_journal = frappe.db.get_all(
|
|
||||||
"Journal Entry",
|
|
||||||
filters={
|
|
||||||
"docstatus": 1,
|
|
||||||
"reference_type": si.doctype,
|
|
||||||
"reference_name": si.name,
|
|
||||||
"voucher_type": "Credit Note",
|
|
||||||
"is_system_generated": True,
|
|
||||||
},
|
|
||||||
fields=["name"],
|
|
||||||
)
|
|
||||||
self.assertEqual(len(system_generated_journal), 1)
|
|
||||||
expected = {
|
|
||||||
"party": "_Test Customer",
|
|
||||||
"customer_name": "_Test Customer",
|
|
||||||
"customer_group": "_Test Customer Group",
|
|
||||||
"territory": "_Test Territory",
|
|
||||||
"party_name": "_Test Customer",
|
|
||||||
"opening_balance": 0,
|
|
||||||
"invoiced_amount": 100.0,
|
|
||||||
"paid_amount": 0.0,
|
|
||||||
"return_amount": 100.0,
|
|
||||||
"closing_balance": 0.0,
|
|
||||||
"currency": "INR",
|
|
||||||
"dr_or_cr": "",
|
|
||||||
}
|
|
||||||
# Without ignore_cr_dr_notes
|
|
||||||
columns, data = execute(
|
|
||||||
frappe._dict(
|
|
||||||
{
|
|
||||||
"company": si.company,
|
|
||||||
"from_date": si.posting_date,
|
|
||||||
"to_date": si.posting_date,
|
|
||||||
"ignore_cr_dr_notes": False,
|
|
||||||
}
|
|
||||||
)
|
|
||||||
)
|
|
||||||
self.assertEqual(len(data), 1)
|
|
||||||
self.assertDictEqual(expected, data[0])
|
|
||||||
|
|
||||||
# With ignore_cr_dr_notes
|
|
||||||
expected = {
|
|
||||||
"party": "_Test Customer",
|
|
||||||
"customer_name": "_Test Customer",
|
|
||||||
"customer_group": "_Test Customer Group",
|
|
||||||
"territory": "_Test Territory",
|
|
||||||
"party_name": "_Test Customer",
|
|
||||||
"opening_balance": 0,
|
|
||||||
"invoiced_amount": 100.0,
|
|
||||||
"paid_amount": 0.0,
|
|
||||||
"return_amount": 100.0,
|
|
||||||
"closing_balance": 0.0,
|
|
||||||
"currency": "INR",
|
|
||||||
"dr_or_cr": "",
|
|
||||||
}
|
|
||||||
columns, data = execute(
|
|
||||||
frappe._dict(
|
|
||||||
{
|
|
||||||
"company": si.company,
|
|
||||||
"from_date": si.posting_date,
|
|
||||||
"to_date": si.posting_date,
|
|
||||||
"ignore_cr_dr_notes": True,
|
|
||||||
}
|
|
||||||
)
|
|
||||||
)
|
|
||||||
self.assertEqual(len(data), 1)
|
|
||||||
self.assertEqual(expected, data[0])
|
|
||||||
|
|
||||||
>>>>>>> 8f91919933 (test: add party_group, territory in json)
|
|
||||||
def test_journal_voucher_against_return_invoice(self):
|
def test_journal_voucher_against_return_invoice(self):
|
||||||
filters = {"company": self.company, "from_date": today(), "to_date": today()}
|
filters = {"company": self.company, "from_date": today(), "to_date": today()}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user