Commit Graph

329 Commits

Author SHA1 Message Date
Gursheen Anand
670d61547f fix: date in master document for dictionary condition
(cherry picked from commit d96a777edd)

# Conflicts:
#	erpnext/accounts/utils.py
2024-01-11 13:26:01 +00:00
ruthra kumar
9836205725 fix: validation error on reconciling PE to Journals as Invoice
With the same exchange rate on Journal Entry and Payment Entry,
reconcilition should not post exc gain/loss journal and should not
throw validation error

(cherry picked from commit 5eeb650dfd)
2023-12-15 13:20:38 +05:30
ruthra kumar
e8ea6022f0 refactor: pass on filter to upfront outstanding query as well
(cherry picked from commit cfd3230c75)
2023-11-30 07:26:29 +00:00
Gursheen Kaur Anand
aea169d4d4 chore: resolve conflicts 2023-11-24 15:30:19 +05:30
Gursheen Anand
7dce68bdcc fix: annual income and expenses in digest
(cherry picked from commit 52305e3000)

# Conflicts:
#	erpnext/accounts/utils.py
2023-11-24 09:51:29 +00:00
ruthra kumar
ac13e7362c refactor: optimize outstanding vouchers query
(cherry picked from commit 8b04c1d4f6)
2023-11-23 04:12:42 +00:00
ruthra kumar
c4e57040b7 Merge pull request #38205 from vorasmit/partial-cancel
fix: partial cancel of gle and ple (backport #35609)
2023-11-22 10:27:05 +05:30
Dany Robert
392ee2e0fd fix: round unreconciled_amount before asserting 2023-11-20 14:36:58 +05:30
Smit Vora
80bc235d6e fix: partial cancel of gle and ple (backport #35609) 2023-11-20 10:56:56 +05:30
ruthra kumar
be925d2d33 refactor: avoid precision based validation error on reconciliation 2023-11-05 05:22:09 +05:30
ruthra kumar
d576fc7490 chore: resolve conflict 2023-10-24 08:48:53 +05:30
ruthra kumar
d71b885fb8 fix: overallocation on Payment with PO/SO
(cherry picked from commit 23df4205f8)

# Conflicts:
#	erpnext/accounts/utils.py
2023-10-24 03:14:51 +00:00
ruthra kumar
515bed8c80 refactor: pass gain loss posting date to controller
(cherry picked from commit 7e600a6494)
2023-10-23 15:57:16 +00:00
ruthra kumar
75d3093aea refactor: only cancel specific gain/loss je
(cherry picked from commit 5dbcf7d2b9)
2023-10-09 06:15:09 +00:00
ruthra kumar
606c99e57c fix: typo in doctype name and qb
(cherry picked from commit 9a1588f1cc)
2023-10-09 06:15:08 +00:00
ruthra kumar
f5718390b7 refactor: unlink individual vouchers from payments
(cherry picked from commit 9b6eac23b6)
2023-10-09 06:15:08 +00:00
ruthra kumar
3cbaea389b refactor: convert raw sql to query_builder
(cherry picked from commit 0130aea2aa)
2023-10-09 06:15:07 +00:00
marination
1181dcf521 fix: Update advance_paid in SO/PO after unlinking from advance entry
(cherry picked from commit 426350eee6)
2023-09-22 03:06:31 +00:00
ruthra kumar
01eae2b758 refactor: gain/loss should use same posting date as payment
(cherry picked from commit f7865da4d2)
2023-09-05 03:00:02 +00:00
ruthra kumar
d24c8b1bbc refactor: use payment's CC for gain/loss if company default is unset
(cherry picked from commit d6a3b9a5c7)

# Conflicts:
#	erpnext/accounts/doctype/payment_reconciliation/payment_reconciliation.py
2023-09-03 04:44:16 +00:00
ruthra kumar
9168b3b0e8 fix: deduplicate gain/loss JE creation for journals as payment
(cherry picked from commit 79c6f0165b)

# Conflicts:
#	erpnext/controllers/accounts_controller.py
2023-09-03 04:44:13 +00:00
ruthra kumar
20c45c7975 chore: linter fix 2023-08-23 14:15:35 +05:30
ruthra kumar
4556c36736 refactor: limit output to 50 in reconciliation tool
(cherry picked from commit 7a381affce)

# Conflicts:
#	erpnext/accounts/doctype/payment_reconciliation/payment_reconciliation.json
2023-08-23 03:43:28 +00:00
ruthra kumar
47345e81a1 perf: pull latest details only for referenced vouchers
(cherry picked from commit deb0d71294)

# Conflicts:
#	erpnext/accounts/doctype/payment_entry/payment_entry.py
2023-08-17 03:31:54 +00:00
ruthra kumar
f92453ae45 chore: resolve merge conflict in accounts/utils.py and its tests 2023-08-14 10:50:31 +05:30
ruthra kumar
8d32a1f4b3 chore: rename some internal variables
(cherry picked from commit d9d6856153)
2023-08-14 04:51:46 +00:00
ruthra kumar
22dbe52586 refactor: convert class method to standalone function
(cherry picked from commit 1ea1bfebc4)
2023-08-14 04:51:44 +00:00
ruthra kumar
7c3fc7eb3b refactor: cancel gain/loss JE on Journal as payment cancellation
(cherry picked from commit 6e18bb6456)
2023-08-14 04:51:41 +00:00
ruthra kumar
86aead3d45 refactor: remove call for setting deductions in payment entry
(cherry picked from commit 1bcb728c85)

# Conflicts:
#	erpnext/accounts/utils.py
2023-08-14 04:51:40 +00:00
ruthra kumar
220bf24555 refactor: exc booking logic for Journal Entry
(cherry picked from commit 7b516f8463)
2023-08-14 04:51:39 +00:00
ruthra kumar
c06a6bfc09 refactor: book exchange gain/loss through journal
(cherry picked from commit 81cd7873d3)
2023-08-14 04:51:37 +00:00
ruthra kumar
80eb8754db fix: incorrect idx on JE's after reconciliation
(cherry picked from commit 72f577aad2)
2023-08-01 11:49:27 +05:30
Deepesh Garg
6a6a3ae3c3 fix: FY in naming series variable for orders
(cherry picked from commit 7a7d32db81)
2023-07-21 10:36:30 +00:00
mergify[bot]
b877fa60db fix: Remove current fiscal year from Global Defaults (#35960)
* fix: Remove current fiscal year from Global Defaults (#35960)

* fix: Remove current fiscal year from Global Defaults

* fix: Remove button to set default

* fix: Add utils to get fiscal year

* fix: Incorrect import

* feat: Add hook for naming series parser

(cherry picked from commit 6270607c6d)

# Conflicts:
#	erpnext/accounts/doctype/fiscal_year/fiscal_year.py
#	erpnext/patches.txt
#	erpnext/public/js/utils.js

* chore: resolve conflicts

---------

Co-authored-by: Deepesh Garg <deepeshgarg6@gmail.com>
2023-07-17 11:52:37 +05:30
mergify[bot]
59b3277696 fix: also check on_hold (#35910)
fix: also check on_hold (#35910)

(cherry picked from commit 5aa02b8571)

Co-authored-by: RJPvT <48353029+RJPvT@users.noreply.github.com>
2023-07-10 20:34:32 +05:30
mergify[bot]
ebf3c0173e feat: Closing balance for period closing and reporting (#34257)
* feat: Introduce opening entry for reporting

(cherry picked from commit 9739d8b52a)

* feat: Introduce opening entry for reporting

(cherry picked from commit b44a19bd1a)

* fix: Add patches to create accounting dimension in Closing Balance

(cherry picked from commit 36c08d0835)

* feat: Cascade closing balances on PCV submit

(cherry picked from commit c3f39c3f32)

# Conflicts:
#	erpnext/accounts/doctype/period_closing_voucher/period_closing_voucher.py
#	erpnext/patches.txt

* feat: Add views in standard filter

(cherry picked from commit e18336ebe7)

* chore: Rewrite query using query builder

(cherry picked from commit 7fa7d6b5e4)

# Conflicts:
#	erpnext/accounts/doctype/period_closing_voucher/period_closing_voucher.py

* feat: Add validations against period closing voucher

(cherry picked from commit f92c63fb10)

* fix: Order by issue in aggregation query

(cherry picked from commit 6607c8bd82)

* fix: Add patch to update closing balances

(cherry picked from commit a663df376c)

* fix: Closing balance entries for period closing voucher

(cherry picked from commit 436fc03eda)

* fix: Update patch to generate closing balance entries

(cherry picked from commit 95c9aafda9)

# Conflicts:
#	erpnext/patches.txt

* perf: Apply closing balance in Trial Balance report

(cherry picked from commit e5f603c9d9)

# Conflicts:
#	erpnext/accounts/report/trial_balance/trial_balance.py

* chore: Minor fixes

(cherry picked from commit c089c4156c)

# Conflicts:
#	erpnext/patches.txt

* fix: Aggregation with previous closing balance

(cherry picked from commit 4a2046dfb6)

# Conflicts:
#	erpnext/patches.txt

* test: Add static posting dates to tests

(cherry picked from commit 310f71c313)

* chore: Add index to period closing voucher column

(cherry picked from commit 5dabc98ba5)

* chore: rename Closing Balance to Account Closing Balance

(cherry picked from commit 3249a79f07)

* test: Add test case for closing balance

(cherry picked from commit f0267feca8)

* chore: Use account closing balance in set gl entries

(cherry picked from commit 0157fa15eb)

# Conflicts:
#	erpnext/accounts/report/financial_statements.py

* fix: Update patch

(cherry picked from commit 76775a3e49)

* fix: Account sub query

(cherry picked from commit 7f11373b58)

* chore: Simplify query

(cherry picked from commit 00fe3042b2)

# Conflicts:
#	erpnext/accounts/doctype/period_closing_voucher/period_closing_voucher.py

* chore: Add missing validations

(cherry picked from commit 0aadb680eb)

* chore: Remove unnecessary list comprehension

(cherry picked from commit 44053db010)

# Conflicts:
#	erpnext/accounts/report/financial_statements.py

* fix: Ignore opening entries if PCV posted

(cherry picked from commit f9397a87ac)

# Conflicts:
#	erpnext/accounts/report/financial_statements.py

* fix: Don't validate if no GL Entry exists

(cherry picked from commit 528ab503f2)

* chore: Fix Typo

(cherry picked from commit 3fd95200da)

* fix: Validation for cancelation

(cherry picked from commit 30eb6c8512)

* fix: Partial trial balance view

(cherry picked from commit b7dcf27b01)

* fix: CS financial statement param

(cherry picked from commit f8cff09129)

* chore: Improve validation message

(cherry picked from commit 8ce1da111e)

* chore: Resolve conflicts

* chore: Resolve conflicts

---------

Co-authored-by: Deepesh Garg <deepeshgarg6@gmail.com>
2023-07-10 18:04:45 +05:30
ruthra kumar
862c5145c1 refactor: submit and make JV through background job
(cherry picked from commit 4f51c5a433)

# Conflicts:
#	erpnext/setup/doctype/company/company.json
2023-07-10 07:31:19 +00:00
mergify[bot]
b0234489ca fix: Remove special treatment for P&L Accounts (#35602)
fix: Remove special treatment for P&L Accounts

(cherry picked from commit 0bd4de4504)

Co-authored-by: Deepesh Garg <deepeshgarg6@gmail.com>
2023-06-23 15:55:51 +05:30
mergify[bot]
39b5147768 perf: Journal Entries (backport #34918) (#35054)
* refactor: rewrite `get_stock_value_on()` queries in `QB`

(cherry picked from commit e43bc38e05)

* refactor: sum up SLE value in query

(cherry picked from commit 9a37ac6c25)

* refactor: `get_stock_value_on()` to get stock value of multiple warehouses at once

(cherry picked from commit e782a054c8)

---------

Co-authored-by: s-aga-r <sagarsharma.s312@gmail.com>
2023-04-25 21:53:07 +05:30
mergify[bot]
5923a80a0f feat: Reconcile Payments in background (#34596)
feat: Reconcile Payments in background (#34596)

* feat: auto reconcile in background

* chore: Option to enable auto reconciliation in settings

* refactor: validate if feature is enabled in settings

* refactor: check for running job while using reconciliation tool

* chore: using doc to get filter values

* chore: use frappe.db.get_value in validations

* chore: cleanup commented out code

* chore: replace get_list with get_all

* chore: use block scope variable

* chore: type information for functions

* refactor: flag to ignore job validation check

* refactor: update parent doc status if all reconciled

* chore: create test_records file

* test: create a bunch of vouchers for testing auto reconcile

* chore: renamed auto_reconcile to process_payment_reconciliation

* chore: another child doctype to hold payments

* chore: remove duplicate field

* chore: add fetched payments to log

* chore: Popup comment message update

* chore: replace get_all with get_value

* chore: replace label in settings page

* chore: remove unit test and records

* refactor: status in reconciliation log

* refactor: set status in log as well

* chore: fix field name

* chore: change triggered job name

* chore: use status field in list view of log

* chore: status while there are no allocations

* refactor: split trigger function into two

* chore: adding cancelled status

* refactor: function trigger queued docs

* chore: cron job scheduled

* chore: fixing accouts settings json file

* chore: typos and variable scope

* chore: use 'pluck' in db call

* chore: remove redundant whitelist decorator

* chore: use single DB call to fetch values

* chore: replace get_all with get_value

* refactor: use raw db calls to fetch reconciliation log records

Using get_doc on `Process Payment Reconciliation Log` is costly when
handling large volumes of invoices.

Use raw frappe.db.get_all to selectively pull status and reconciled count

* chore: update status on successful batch operation

* chore: make payment table readonly

* chore: ability to pause the background job

* chore: remove isolate_each_allocation

* chore: more description in progress bar

* refactor: partially working state

* refactor: update reconcile flag and setting hard limits for fetching

* chore: make allocation editable -- NEED TO REVERT

* chore: pause button

* refactor: skip setter function in Payment Entry for better performan

* refactor: split reconcile function and skip a setter function

1. Split reconcile function into 2
2. While reconciling against payment entry, skip a
set_missing_ref_details setter method

* chore: increase payment limit

* refactor: replace frappe.db.get_all with frappe.db.get_value

* chore: remove unwanted doctypes

* refactor: make allocation table readonly

* perf: update ref_details only for newly linked invoices

* chore: rename skip flag

* refactor(UI): receivable_payable field should auto populate

* refactor: no control statements in finally block

* chore: cleanup section and rename checkbox

* chore: update new fieldname in code

* chore: update error msg

* refactor: start and pause integrated into status

pause checkbox has been removed

* refactor: added cancelled status to the log doctype

1. Moved the status section to the bottom in parent doc
2. Using alerts to indicate Job trigger status

(cherry picked from commit ed14d1ce44)

Co-authored-by: ruthra kumar <ruthra@erpnext.com>
2023-04-25 19:20:06 +05:30
ruthra kumar
8c5d644671 refactor: move set_missing_ref_detials out of set_missing_values
(cherry picked from commit 11cb2db3fe)
2023-04-20 13:29:47 +05:30
ruthra kumar
fd6db41b6e fix: removing redundant validation
(cherry picked from commit d52f7e2820)
2023-03-28 16:59:42 +05:30
ruthra kumar
c71d03555f fix: IntegrityError while cancelling journals against cr note
(cherry picked from commit b9a7ff7c3d)
2023-02-13 08:45:18 +00:00
ruthra kumar
8a498ed029 perf: improve reconciliation speed on JE's with 1000's of rows
1. No need to keep old PLE's on reconciliation.
2. Added Validation to catch debit-credit mismatch on JE's
3. Only update outstanding amount for newly reconciled invoices

(cherry picked from commit 11cf694d9a)
2023-01-16 04:12:07 +00:00
ruthra kumar
9b2b2812ca fix: cost_center filter gives incorrect output
filtering on cost center gives invoices that are reconciled as having outstanding

(cherry picked from commit 6d9d730759)
2022-12-15 09:33:07 +00:00
ruthra kumar
a399e2d765 refactor: split delete gl utility function into two
(cherry picked from commit 9209ec59c2)
2022-11-09 08:57:23 +00:00
ruthra kumar
9a5e238702 fix: party type and party mandatory on updating outstanding
(cherry picked from commit 43b80683eb)
2022-10-21 06:07:09 +00:00
ruthra kumar
a88ac4016a refactor: split ple creation function into two
refactor create_payment_ledger_entry function into 2.
one for generating ple map and one for DB entry creation

(cherry picked from commit 9b50221bf0)
2022-10-17 13:16:20 +00:00
Deepesh Garg
d9519f24aa chore: Remove HRMS related code (#32607)
Co-authored-by: Rucha Mahabal <ruchamahabal2@gmail.com>
(cherry picked from commit dc3fe85921)
2022-10-17 06:09:25 +00:00
ruthra kumar
62cabdf792 fix: delete old ple's on item value repost
(cherry picked from commit 65992304bc)
2022-10-13 08:32:51 +00:00