forked from frappe/erpnext
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* fix: Allow multi-currency opening invoices * feat: add payment terms status rpr to Selling homepage * fix: Consistent accounting dimensions across Sales and Purchase docs * fix: Ignore custom field validation while setup * chore: Remove domains from Setup * refactor: Remove education domain from ERPNext * chore: remove files related to LMS * chore: clean up hooks * chore: Remove course links from training doctypes * chore: Remove references for Assessment Group * chore: Remove Fees Doctype * chore: Remove references for Student doctype * chore: Add patch to delete education doctypes * chore: Clean up patches * fix: Multi currency opening invoices * fix(UX): record reason for skipping attendance or marking absent for auto attendance (frappe#30844) * fix: Cost center filter on payment reconciliation * fix(minor): discount accounting patch * fix(minor): fix create_accounting_dimensions_in_orders.py * feat: Copy task color from project template (frappe#30857) Co-authored-by: Rucha Mahabal <ruchamahabal2@gmail.com> * chore: correct link * fix: convert default_item_manufacturer to link field (frappe#30835) * fix(minor): update frappe.error_log to new API (frappe#30864) * fix(minor): update frappe.error_log to new API * refactor: changes for updated log_error api Co-authored-by: Ankush Menat <ankush@frappe.io> * fix(UX): misleading stock entry lables (frappe#30870) * fix(UX): misleading stock entry lables * chore: field labels [skip ci] Co-authored-by: Marica <maricadsouza221197@gmail.com> Co-authored-by: Marica <maricadsouza221197@gmail.com> * test: Add test for payment reconciliation * fix: Vat Audit report fixes (cherry picked from commit d5319a4) * fix: Supply type for overseas invoices with payment of tax * fix: supply type for sez invoices with payment of tax * fix(india): e-invoice generation for registered composition gst category type (frappe#30814) * fix: supplier quotation comparission report button * fix: payment days calculation for employees joining/leaving mid-month (frappe#30863) * chore: Resolve conflicts * fix: Ignore loan repayments made from salary slip (cherry picked from commit b7e1d40) * fix: show group warehouse in Sales Order (frappe#30891) * fix: Show linked time sheets in sales invoice dashboard Co-authored-by: Deepesh Garg <deepeshgarg6@gmail.com> Co-authored-by: ruthra kumar <ruthra@erpnext.com> Co-authored-by: Deepesh Garg <42651287+deepeshgarg007@users.noreply.github.com> Co-authored-by: Rucha Mahabal <ruchamahabal2@gmail.com> Co-authored-by: Rushabh Mehta <rmehta@gmail.com> Co-authored-by: sersaber <93864988+sersaber@users.noreply.github.com> Co-authored-by: Ankush Menat <ankush@frappe.io> Co-authored-by: Ankush Menat <ankushmenat@gmail.com> Co-authored-by: Marica <maricadsouza221197@gmail.com> Co-authored-by: Saqib Ansari <nextchamp.saqib@gmail.com> Co-authored-by: maharshivpatel <39730881+maharshivpatel@users.noreply.github.com> Co-authored-by: Francisco Roldán <franciscoproldan@gmail.com>
- Loading branch information
1 parent
d2ecd62
commit 3b7efd6
Showing
554 changed files
with
1,028 additions
and
28,428 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
91 changes: 89 additions & 2 deletions
91
erpnext/accounts/doctype/payment_reconciliation/test_payment_reconciliation.py
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,9 +1,96 @@ | ||
# Copyright (c) 2021, Frappe Technologies Pvt. Ltd. and Contributors | ||
# See license.txt | ||
|
||
# import frappe | ||
import unittest | ||
|
||
import frappe | ||
from frappe.utils import add_days, getdate | ||
|
||
from erpnext.accounts.doctype.sales_invoice.test_sales_invoice import create_sales_invoice | ||
|
||
|
||
class TestPaymentReconciliation(unittest.TestCase): | ||
pass | ||
@classmethod | ||
def setUpClass(cls): | ||
make_customer() | ||
make_invoice_and_payment() | ||
|
||
def test_payment_reconciliation(self): | ||
payment_reco = frappe.get_doc("Payment Reconciliation") | ||
payment_reco.company = "_Test Company" | ||
payment_reco.party_type = "Customer" | ||
payment_reco.party = "_Test Payment Reco Customer" | ||
payment_reco.receivable_payable_account = "Debtors - _TC" | ||
payment_reco.from_invoice_date = add_days(getdate(), -1) | ||
payment_reco.to_invoice_date = getdate() | ||
payment_reco.from_payment_date = add_days(getdate(), -1) | ||
payment_reco.to_payment_date = getdate() | ||
payment_reco.maximum_invoice_amount = 1000 | ||
payment_reco.maximum_payment_amount = 1000 | ||
payment_reco.invoice_limit = 10 | ||
payment_reco.payment_limit = 10 | ||
payment_reco.bank_cash_account = "_Test Bank - _TC" | ||
payment_reco.cost_center = "_Test Cost Center - _TC" | ||
payment_reco.get_unreconciled_entries() | ||
|
||
self.assertEqual(len(payment_reco.get("invoices")), 1) | ||
self.assertEqual(len(payment_reco.get("payments")), 1) | ||
|
||
payment_entry = payment_reco.get("payments")[0].reference_name | ||
invoice = payment_reco.get("invoices")[0].invoice_number | ||
|
||
payment_reco.allocate_entries( | ||
{ | ||
"payments": [payment_reco.get("payments")[0].as_dict()], | ||
"invoices": [payment_reco.get("invoices")[0].as_dict()], | ||
} | ||
) | ||
payment_reco.reconcile() | ||
|
||
payment_entry_doc = frappe.get_doc("Payment Entry", payment_entry) | ||
self.assertEqual(payment_entry_doc.get("references")[0].reference_name, invoice) | ||
|
||
|
||
def make_customer(): | ||
if not frappe.db.get_value("Customer", "_Test Payment Reco Customer"): | ||
frappe.get_doc( | ||
{ | ||
"doctype": "Customer", | ||
"customer_name": "_Test Payment Reco Customer", | ||
"customer_type": "Individual", | ||
"customer_group": "_Test Customer Group", | ||
"territory": "_Test Territory", | ||
} | ||
).insert() | ||
|
||
|
||
def make_invoice_and_payment(): | ||
si = create_sales_invoice( | ||
customer="_Test Payment Reco Customer", qty=1, rate=690, do_not_save=True | ||
) | ||
si.cost_center = "_Test Cost Center - _TC" | ||
si.save() | ||
si.submit() | ||
|
||
pe = frappe.get_doc( | ||
{ | ||
"doctype": "Payment Entry", | ||
"payment_type": "Receive", | ||
"party_type": "Customer", | ||
"party": "_Test Payment Reco Customer", | ||
"company": "_Test Company", | ||
"paid_from_account_currency": "INR", | ||
"paid_to_account_currency": "INR", | ||
"source_exchange_rate": 1, | ||
"target_exchange_rate": 1, | ||
"reference_no": "1", | ||
"reference_date": getdate(), | ||
"received_amount": 690, | ||
"paid_amount": 690, | ||
"paid_from": "Debtors - _TC", | ||
"paid_to": "_Test Bank - _TC", | ||
"cost_center": "_Test Cost Center - _TC", | ||
} | ||
) | ||
pe.insert() | ||
pe.submit() |
Oops, something went wrong.