Compare commits

...

1103 Commits

Author SHA1 Message Date
coderabbitai[bot]
b7ae191478 📝 Add docstrings to fix/warehouse-source-reference
Docstrings generation was requested by @matteoarosti.

* https://github.com/frappe/erpnext/pull/50058#issuecomment-3399282664

The following files were modified:

* `erpnext/manufacturing/report/production_planning_report/production_planning_report.py`
2025-10-13 22:40:48 +00:00
El-Shafei H.
6cacead726 fix(Supplier Quotation Comparison): add a missing translate function (#49497)
* Update supplier_quotation_comparison.py

* refactor: text cleaning
2025-10-13 23:58:57 +05:30
akhilakr113
2d8513de4e fix: extend quotation filters to exclude 'Ordered' quotations in 'Get Items From' on Sales Order (#50029)
* feat: show item name in update items dialog for sales and purchase order

* feat: remove the ordered quotation from listing the quotation in sales order get items from

* chore: remove this pr from this
2025-10-13 23:45:26 +05:30
Mihir Kandoi
992027fe89 Merge pull request #50025 from thomasantony12/dev-batch_order_fix
fix: Batch ordering based on the method mentioned in settings
2025-10-13 19:45:41 +05:30
rohitwaghchaure
4eb045d927 Merge pull request #50047 from vorasmit/compex-fetch-rm-items
fix: enhance sub-assembly item handling in raw material request calculations
2025-10-13 19:36:07 +05:30
Mihir Kandoi
1717a7c983 refactor: move value inline 2025-10-13 19:26:34 +05:30
rohitwaghchaure
2de4b2ea56 Merge pull request #50048 from rohitwaghchaure/fixed-unhide-field
fix: show qty in popup while making additional transfer entry
2025-10-13 17:27:43 +05:30
Rohit Waghchaure
b08e0014f7 fix: show qty in popup while making additional transfer entry 2025-10-13 16:46:42 +05:30
Smit Vora
f912c8419a fix: enhance sub-assembly item handling in raw material request calculations 2025-10-13 16:16:01 +05:30
Khushi Rawat
f757adc7f7 Merge pull request #50040 from khushi8112/add-composite-indexes-advance-payment-ledger
perf: add composite indexes to Advance Payment Ledger Entry
2025-10-13 16:07:07 +05:30
rohitwaghchaure
df65fbbc4a Merge pull request #50043 from rohitwaghchaure/fixed-delivered-qty-in-sre
fix: delivered qty in reservation entry
2025-10-13 15:32:40 +05:30
khushi8112
59bd35c64d fix: revert unrelated manual modified timestamp change 2025-10-13 15:15:48 +05:30
Rohit Waghchaure
bd03bcdcb2 fix: delivered qty in reservation entry 2025-10-13 14:52:04 +05:30
khushi8112
7fcf277055 perf: add composite indexes to Advance Payment Ledger Entry table 2025-10-13 13:56:30 +05:30
ruthra kumar
1e2bcde0f5 Merge pull request #50017 from aerele/service_stop_date_comparison
fix(deferred revenue): validate service stop date
2025-10-13 12:37:15 +05:30
Diptanil Saha
f23d6911f3 Merge pull request #50034 from diptanilsaha/gh_49941
fix: set default roles on Role Profiles during reinstallation
2025-10-13 12:06:34 +05:30
diptanilsaha
12c1b8a910 fix: set default roles on role_profile during reinstallation 2025-10-13 02:20:48 +05:30
Khushi Rawat
f4c37f1f20 Merge pull request #49508 from khushi8112/print-format-for-sales-invoice
feat: print format for sales invoice
2025-10-12 20:06:53 +05:30
MochaMind
a799af7f9f fix: sync translations from crowdin (#49959) 2025-10-12 16:10:52 +02:00
MochaMind
f697679b37 chore: update POT file (#50030) 2025-10-12 16:03:02 +02:00
khushi8112
f14b3ed723 refactor: add permission check and minor fixes 2025-10-12 19:22:26 +05:30
thomasantony12
fab7f9ee53 chore: use get_single_value instead of get_cached_doc 2025-10-12 18:05:29 +05:30
khushi8112
6e07aac5b7 fix: add filter query for address field 2025-10-12 13:11:04 +05:30
khushi8112
a4fe0fb809 refactor: use query builder to set company address 2025-10-12 13:11:04 +05:30
khushi8112
533257c4f3 refactor: use get_value to improve performance 2025-10-12 13:11:04 +05:30
khushi8112
33110951b3 refactor: replace get_doc with get_value 2025-10-12 13:11:04 +05:30
khushi8112
12ebab1657 refactor: change print format type html to custom 2025-10-12 13:11:04 +05:30
khushi8112
50eb6786bf feat: condition based item code column 2025-10-12 13:11:04 +05:30
khushi8112
590207419a style: slight spacing and alignment fix 2025-10-12 13:11:04 +05:30
khushi8112
92f69ae484 fix: validate email address 2025-10-12 13:11:04 +05:30
khushi8112
610dcbb974 chore: remove frappe.db.commit 2025-10-12 13:11:04 +05:30
khushi8112
e3ca318e93 fix: small ui changes 2025-10-12 13:11:04 +05:30
khushi8112
98838b1dd5 feat: input website, email, phone_no if not already set in company 2025-10-12 13:11:04 +05:30
khushi8112
abc7bf2fd6 style: add company and customer name on bill_to and bill_from section 2025-10-12 13:11:04 +05:30
khushi8112
8a19dc4a20 style: format and display the address for improved visual clarity 2025-10-12 13:11:04 +05:30
khushi8112
301b294da9 style: fix layout issues with extended data 2025-10-12 13:11:04 +05:30
khushi8112
bf6c331ac4 fix: show tax breakup in print format 2025-10-12 13:11:04 +05:30
khushi8112
780d3f5ba4 fix: better sub total section with tax breakup 2025-10-12 13:11:04 +05:30
khushi8112
dbf9faa87c feat: prompt user to input company logo and address if missing in print preview 2025-10-12 13:11:04 +05:30
khushi8112
6494fc42c6 refactor: create_letter_head for readability 2025-10-12 13:11:04 +05:30
khushi8112
3abdfcb269 fix: app path correctly 2025-10-12 13:11:04 +05:30
khushi8112
0d58dfd0fa feat: add default letterhead with HTML template via after_install 2025-10-12 13:11:04 +05:30
khushi8112
f6ebf2d0b3 feat: letterhead for print format 2025-10-12 13:11:04 +05:30
khushi8112
842a3645dc refactor: remove tax breakup table from the print format 2025-10-12 13:11:04 +05:30
khushi8112
a6d92e5ec7 refactor: small changes for better readability 2025-10-12 13:11:04 +05:30
khushi8112
ce19514a2c refactor: update letterhead styles for wkhtmltopdf compatibility 2025-10-12 13:11:04 +05:30
khushi8112
e223731924 refactor: remove flex usage for better wkhtmltopdf support 2025-10-12 13:11:04 +05:30
khushi8112
39b6aab714 fix: update styles to work with wkhtmltopdf rendering 2025-10-12 13:11:04 +05:30
khushi8112
6703610596 fix: do not make letterhead default 2025-10-12 13:11:04 +05:30
khushi8112
f4f2d11fa4 style: always show border even when logo is missing 2025-10-12 13:11:04 +05:30
khushi8112
5c4f778223 style: center-align logo within its container div 2025-10-12 13:11:04 +05:30
khushi8112
5f97bec2b3 refactor: revert debugging changes 2025-10-12 13:11:04 +05:30
khushi8112
f1a2e1b725 refactor: remove img tag for testing 2025-10-12 13:11:03 +05:30
khushi8112
17397ae652 test: add in_install condition for debugging 2025-10-12 13:11:03 +05:30
khushi8112
6b83309750 test: just debugging 2025-10-12 13:11:03 +05:30
khushi8112
e08f82909c fix: radius of the items/tax table thead 2025-10-12 13:11:03 +05:30
khushi8112
4cc2afbd83 feat: print format design two 2025-10-12 13:11:03 +05:30
khushi8112
c780796284 fix: remove border if company logo not available 2025-10-12 13:11:03 +05:30
khushi8112
ddf4a83cf8 fix: condition based address display 2025-10-12 13:11:03 +05:30
khushi8112
b5c739d1cc fix: broken img tag in letterhead 2025-10-12 13:11:03 +05:30
khushi8112
2bc19783cb fix: letterhead styling 2025-10-12 13:11:03 +05:30
khushi8112
1adbf90d8c fix: css changes in letterhead 2025-10-12 13:11:03 +05:30
khushi8112
7386270fce feat: add letterhead fixture 2025-10-12 13:11:03 +05:30
khushi8112
156dda8157 style: change padding 2025-10-12 13:11:03 +05:30
khushi8112
af974fbccd feat: add css 2025-10-12 13:11:03 +05:30
khushi8112
e85238383f feat: default print format for sales invoice 2025-10-12 13:11:03 +05:30
rohitwaghchaure
b380b60486 Merge pull request #50024 from rohitwaghchaure/fixed-adjustment-sle-entry
fix: stock ledger adjustment entry
2025-10-12 11:40:41 +05:30
thomasantony12
7fa800b874 fix: Batch ordering based on the method mentioned in settings 2025-10-12 11:28:05 +05:30
Rohit Waghchaure
8b6e58d02a fix: stock ledger adjustment entry 2025-10-12 11:12:04 +05:30
ravibharathi656
58203a89f1 fix(deferred revenue): validate service stop date 2025-10-11 12:28:42 +05:30
rohitwaghchaure
eb5899c786 Merge pull request #50007 from rohitwaghchaure/fixed-expense-account-in-company
feat: service expense account in the company
2025-10-10 16:49:32 +05:30
Rohit Waghchaure
4605051903 feat: service expense account in the company 2025-10-10 16:21:03 +05:30
rohitwaghchaure
15397b17f3 Merge pull request #49985 from mihir-kandoi/gh-49622
fix: call onload of buying controller in purchase_receipt.js
2025-10-10 14:11:50 +05:30
rohitwaghchaure
b63566681b Merge pull request #50002 from rohitwaghchaure/fixed-posting-date-in-serial-no
fix: posting date in serial no
2025-10-10 14:08:22 +05:30
rohitwaghchaure
a5e49ea8a1 Merge pull request #49993 from mihir-kandoi/gh-46943
fix: incorrect PR status when using set landed cost based on PI rate
2025-10-10 14:08:02 +05:30
Rohit Waghchaure
98f186b0e0 fix: posting date in serial no 2025-10-10 12:46:33 +05:30
Diptanil Saha
eac6e6a7dd Merge pull request #49940 from ljain112/perf-status-updater
perf: optimize validate_qty method to eliminate N+1 query problem
2025-10-10 11:26:46 +05:30
Khushi Rawat
2de3f63478 Merge pull request #49980 from aerele/fixed-asset-register-show-opening-entries
fix: fixed asset register showing opening entries
2025-10-10 11:12:39 +05:30
Khushi Rawat
334bb609f0 Merge pull request #49995 from rehanrehman389/report-show-asset-name
feat: add asset name to Asset Depreciations and Balances report
2025-10-10 11:04:40 +05:30
Rehan Ansari
b4cf6a1fb9 feat: add asset name to Asset Depreciations and Balances report 2025-10-09 23:40:56 +05:30
Mihir Kandoi
4a26810871 fix: fix: incorrect PR status when using set landed cost based on PI rate 2025-10-09 20:47:00 +05:30
rohitwaghchaure
96cd8cdb38 Merge pull request #49991 from rohitwaghchaure/fixed-consider-negative-batches
fix: consider negative qty in batch qty calculation
2025-10-09 20:37:06 +05:30
Rohit Waghchaure
912ffc2d64 fix: consider negative qty in batch qty calculation 2025-10-09 19:42:54 +05:30
ljain112
f1f61ff61b refactor: replace SQL query with Query Builder in fetch_items_with_pending_qty method 2025-10-09 17:51:51 +05:30
Diptanil Saha
aaca906a0f Merge pull request #49764 from elshafei-developer/add-employee-name-to-session-user
feat: Cache employee name in session data on boot
2025-10-09 15:30:20 +05:30
ruthra kumar
94b75e80b9 fix: use naming series configuration for Sales Partner 2025-10-09 15:16:34 +05:30
Mihir Kandoi
67f7341721 fix: call onload of buying controller in purchase_receipt.js 2025-10-09 15:12:56 +05:30
rohitwaghchaure
b11d064a2a Merge pull request #49975 from rohitwaghchaure/fixed-sales-return-issue
fix: sales return for product bundle items
2025-10-09 15:08:57 +05:30
Murtaza Ghadiali
959c311795 refactor: use naming series configuration for Sales Partner ID
Replaced hardcoded ID assignment with Naming Series configuration so that Sales Partner IDs can be managed via Setup > Naming Series. Fixes #49623
2025-10-09 14:53:45 +05:30
Rohit Waghchaure
1d57bbca11 test: test case for sales return for product bundle 2025-10-09 13:56:04 +05:30
ravibharathi656
c9d98eb4f0 fix: fixed asset register showing opening entries 2025-10-09 13:51:29 +05:30
Soham Kulkarni
fc7a33ebf8 Merge pull request #49979 from sokumon/format-url
fix: format workstation link correctly
2025-10-09 13:05:02 +05:30
sokumon
b48bff2029 fix: format workstation link correctly 2025-10-09 13:01:46 +05:30
Diptanil Saha
a82c0c20f0 Merge pull request #49939 from aerele/retain-address
fix: preserve address if present
2025-10-09 11:09:08 +05:30
El-Shafei H.
83d575206b feat: cache employee name in session data on boot 2025-10-09 08:25:58 +03:00
El-Shafei H.
e2d4ce74d9 Merge branch 'frappe:develop' into add-employee-name-to-session-user 2025-10-09 08:22:38 +03:00
Rohit Waghchaure
13ce7279a8 fix: sales return for product bundle items 2025-10-09 10:15:42 +05:30
ruthra kumar
4672c2c383 Merge pull request #49848 from Jaswanth-Sriram-Veturi/perf/transaction-set-dynamic-labels
perf: avoid unnecessary set_dynamic_labels updates
2025-10-09 10:15:01 +05:30
Jaswanth Sriram
946073cfd9 perf: avoid unnecessary set_dynamic_labels updates 2025-10-09 10:13:49 +05:30
rohitwaghchaure
1d97b7cc2b Merge pull request #49973 from rohitwaghchaure/fixed-support-47931
fix: Reset Raw Materials Table button not working
2025-10-08 22:34:17 +05:30
Rohit Waghchaure
128e243945 fix: Reset Raw Materials Table button not working 2025-10-08 21:46:17 +05:30
rohitwaghchaure
a6a04e8245 Merge pull request #49969 from rohitwaghchaure/fixed-incorrect-qty-in-stock-levels
fix: incorrect qty in stock levels
2025-10-08 19:28:24 +05:30
rohitwaghchaure
6c8e909599 Merge pull request #49967 from rohitwaghchaure/fixed-batch-qty-for-expired-batches
fix: batch qty for expired batches
2025-10-08 19:18:06 +05:30
Rohit Waghchaure
aab6271b14 fix: incorrect qty in stock levels 2025-10-08 19:06:53 +05:30
Rohit Waghchaure
ff2faf36a7 fix: batch qty for expired batches 2025-10-08 18:55:03 +05:30
rohitwaghchaure
231356a005 Merge pull request #49966 from rohitwaghchaure/fixed-incorrect-field
fix: incorrect field valuation_rate
2025-10-08 18:45:22 +05:30
Rohit Waghchaure
630d873214 fix: incorrect field valuation_rate 2025-10-08 18:27:44 +05:30
Diptanil Saha
6cc421eec6 Merge pull request #49957 from diptanilsaha/psoa_fixes
fix: process statement of accounts
2025-10-08 14:55:34 +05:30
Khushi Rawat
67427264d3 Merge pull request #49954 from aerele/asset-custodian-not-clearing
fix(asset movement): clear custodian if not present
2025-10-08 12:34:01 +05:30
El-Shafei H.
5d0958c5b1 feat: Cache employee name in session data on boot 2025-10-08 09:51:13 +03:00
El-Shafei H.
1d7a8dda26 Merge branch 'frappe:develop' into add-employee-name-to-session-user 2025-10-08 09:49:56 +03:00
ravibharathi656
323d8eaccd fix(asset movement): clear custodian if not present 2025-10-08 08:45:01 +05:30
Diptanil Saha
d5301d3111 Merge pull request #49712 from diptanilsaha/consolidated_tb
feat: consolidated trial balance report
2025-10-07 22:23:19 +05:30
rohitwaghchaure
ef41654fcf Merge pull request #49944 from rohitwaghchaure/fixed-pick-correct-serial-batch
fix: reserved serial / batch not picked in stock entry
2025-10-07 20:10:34 +05:30
Rohit Waghchaure
aedefc867e fix: reserved serial / batch not picked in stock entry 2025-10-07 18:21:24 +05:30
diptanilsaha
4a4c2188ec fix(process statement of accounts): naming of reports 2025-10-07 16:04:23 +05:30
Henning Wendtland
22e4c7446e feat: add company links to Email Account and Communication (#49721)
Co-authored-by: barredterra <14891507+barredterra@users.noreply.github.com>
2025-10-07 11:58:19 +02:00
rohitwaghchaure
6cf24feffc Merge pull request #49935 from rohitwaghchaure/fixed-old-serial-nos-filter
refactor: old serial nos filter
2025-10-07 15:21:33 +05:30
Khushi Rawat
b6e9b532aa Merge pull request #49084 from khushi8112/rename-and-patch-gross-purchase-amount-field
refactor: rename and patch gross purchase amount field
2025-10-07 14:17:43 +05:30
khushi8112
8f43b41cad refactor: use correct field name 2025-10-07 13:43:25 +05:30
Khushi Rawat
bc17d778a6 chore: added patch to update existing records 2025-10-07 13:43:23 +05:30
Khushi Rawat
de6e787087 refactor: updated gross_purchase_amount to net_purchase_amount across codebase 2025-10-07 13:43:14 +05:30
Khushi Rawat
58eda49549 refactor: renamed gross purchase amount to net purchase amount 2025-10-07 13:43:14 +05:30
ljain112
f00a63b69d perf: optimize validate_qty method to eliminate N+1 query problem 2025-10-07 12:46:30 +05:30
ravibharathi656
0678638106 fix: preserve address if present 2025-10-07 12:46:09 +05:30
diptanilsaha
d610d1dccd feat(process statement of accounts): added more frequency options for auto email 2025-10-07 12:29:24 +05:30
Lakshit Jain
3c70cbbaf8 feat: dynamic due date in payment terms when fetched from order (#48864)
* fix: dynamic due date when payment terms are fetched from order

* fix(test): use change_settings decorator for settings enable and disable

* fix(test): compare schedule for due_date dynamically

* fix: save conditions for due date at invoice level

* fix: make fields read only and on change of date unset the date condition fields

* fix: remove fetch_form

* fix: correct field assingment

* fix: revert unwanted changes

* refactor: streamline payment term field assignments and enhance discount date handling

* refactor: remove payment_term from fields_to_copy and optimize currency handling in transaction callback

* refactor: ensure default values for payment schedule and discount validity fields
2025-10-07 12:27:23 +05:30
Rohit Waghchaure
6a8bd0ae9e refactor: old serial nos filter 2025-10-07 12:00:41 +05:30
rohitwaghchaure
47c0b47722 Merge pull request #49846 from aerele/add_filters_to_show_disabled_items
chore(Stock Qty vs Serial No Count): add show_disabled_items filter
2025-10-07 11:28:41 +05:30
diptanilsaha
dbab718aaa fix(process statement of accounts): allow renaming 2025-10-07 11:18:30 +05:30
rohitwaghchaure
ff0969ace6 Merge pull request #49762 from KerollesFathy/fix-create-boms
fix(manufacturing): prevent KeyError in BOM Creator when sub-assembly reused
2025-10-07 10:55:43 +05:30
rohitwaghchaure
6836b8830a Merge pull request #49702 from ljain112/disabled-item-tax-template
fix: do not fetch disabled item tax template
2025-10-07 10:55:00 +05:30
ruthra kumar
8e2d4b2b77 Merge pull request #49910 from frappe/l10n_develop
fix: sync translations from crowdin
2025-10-07 10:44:05 +05:30
ruthra kumar
d652fbeb01 Merge pull request #49930 from ruthra-kumar/better_description_on_rename_tool
chore: better description for attachment in Rename Tool
2025-10-07 10:43:28 +05:30
ruthra kumar
06702ffae2 chore: better description for attachment in Rename Tool 2025-10-07 10:24:48 +05:30
rohitwaghchaure
083a28d3b4 Merge pull request #49928 from rohitwaghchaure/fixed-warning-message
fix: warning message if the batch has incorrect qty
2025-10-07 10:19:48 +05:30
Rohit Waghchaure
870181de87 fix: warning message if the batch has incorrect qty 2025-10-07 09:49:10 +05:30
rohitwaghchaure
67170d0a27 Merge pull request #49743 from aerele/item-valuation-rate
fix: use valuation_rate from item master if no bin is present
2025-10-07 09:42:04 +05:30
rohitwaghchaure
6026e9b3d4 Merge pull request #49911 from rehanrehman389/feat/accounting-period-disable
feat: add disabled field to Accounting Period
2025-10-07 09:19:39 +05:30
Khushi Rawat
da59db357e Merge pull request #49870 from aerele/fixed-register-asset-value
fix: show asset value as revaluation amount or gross purchase amount
2025-10-07 03:10:10 +05:30
rohitwaghchaure
b2da214346 Merge pull request #49923 from rohitwaghchaure/fixed-recalculate-batch-qty
feat: recalculate batch qty
2025-10-06 21:59:25 +05:30
Rohit Waghchaure
70117d3b06 feat: recalculate batch qty 2025-10-06 21:22:49 +05:30
rohitwaghchaure
0168639125 Merge pull request #49913 from aerele/support-50177
fix: check is_rejected attribute
2025-10-06 19:37:37 +05:30
rohitwaghchaure
c848c2dba8 Merge pull request #49917 from rohitwaghchaure/fixed-batch-qty-issue
fix: do not consider draft bundles
2025-10-06 19:37:10 +05:30
Rohit Waghchaure
a60f7eaf3a fix: do not consider draft bundles 2025-10-06 19:16:52 +05:30
rohitwaghchaure
cb952285b0 Merge pull request #49915 from rohitwaghchaure/fixed-patch-update-posting-datetime
fix: patch unknown column posting_date
2025-10-06 18:49:46 +05:30
rohitwaghchaure
c25a85199c Merge pull request #49890 from rohitwaghchaure/fixed-perf-serial-no-reposting
perf: serial nos / batches reposting
2025-10-06 18:38:49 +05:30
l0gesh29
3773f56b0b fix: exclude opening entries 2025-10-06 18:14:37 +05:30
Rohit Waghchaure
235acd4713 fix: patch unknown column posting_date 2025-10-06 18:08:53 +05:30
Rohit Waghchaure
acb3ef78a7 perf: serial nos / batches reposting 2025-10-06 18:06:16 +05:30
Kavin
2ac2e02b2f fix: check is_rejected attribute 2025-10-06 17:49:28 +05:30
ruthra kumar
ab4b47c0af Merge pull request #49600 from aerele/profit-loss-totals
fix(profit and loss statement): incorrect total calculation
2025-10-06 17:09:59 +05:30
rohitwaghchaure
2322a26916 Merge pull request #49834 from rohitwaghchaure/feat-track-purchases
feat: track purchases in accounting and configure item / item group / brand wise COGS
2025-10-06 16:46:14 +05:30
Rohit Waghchaure
05f2b43344 feat: track purchases in accounting 2025-10-06 16:23:45 +05:30
rehansari26
bd928e0d56 feat: add disabled field to Accounting Period 2025-10-06 16:20:26 +05:30
MochaMind
4cfd186aec fix: Tamil translations 2025-10-06 15:44:12 +05:30
MochaMind
85737327a3 fix: Esperanto translations 2025-10-06 15:44:08 +05:30
MochaMind
09bedef9e1 fix: French translations 2025-10-06 15:44:05 +05:30
MochaMind
1edd030e60 fix: Serbian (Latin) translations 2025-10-06 15:44:01 +05:30
MochaMind
d22f4682b1 fix: Norwegian Bokmal translations 2025-10-06 15:43:56 +05:30
MochaMind
c021cf01fc fix: Bosnian translations 2025-10-06 15:43:53 +05:30
MochaMind
58abcdf0c9 fix: Croatian translations 2025-10-06 15:43:49 +05:30
MochaMind
dd281b6375 fix: Thai translations 2025-10-06 15:43:45 +05:30
MochaMind
0a186328e4 fix: Persian translations 2025-10-06 15:43:41 +05:30
MochaMind
ed7c021900 fix: Indonesian translations 2025-10-06 15:43:37 +05:30
MochaMind
c3c1b1f830 fix: Portuguese, Brazilian translations 2025-10-06 15:43:34 +05:30
MochaMind
6e1fcfd210 fix: Vietnamese translations 2025-10-06 15:43:31 +05:30
MochaMind
2bc097a82c fix: Chinese Simplified translations 2025-10-06 15:43:27 +05:30
MochaMind
c6c1ab458c fix: Turkish translations 2025-10-06 15:43:23 +05:30
MochaMind
72efd21c47 fix: Swedish translations 2025-10-06 15:43:19 +05:30
MochaMind
c7290ce4a7 fix: Serbian (Cyrillic) translations 2025-10-06 15:43:15 +05:30
MochaMind
126fe8c974 fix: Russian translations 2025-10-06 15:43:11 +05:30
MochaMind
cf492c3eb7 fix: Portuguese translations 2025-10-06 15:43:07 +05:30
MochaMind
a1c74679da fix: Polish translations 2025-10-06 15:43:04 +05:30
MochaMind
59f5fb6494 fix: Dutch translations 2025-10-06 15:43:00 +05:30
MochaMind
c75fbbd8f4 fix: Italian translations 2025-10-06 15:42:57 +05:30
MochaMind
c261a436ac fix: Hungarian translations 2025-10-06 15:42:53 +05:30
MochaMind
b85817d9c1 fix: German translations 2025-10-06 15:42:50 +05:30
MochaMind
86b30c422b fix: Danish translations 2025-10-06 15:42:45 +05:30
MochaMind
3fcab6e727 fix: Czech translations 2025-10-06 15:42:42 +05:30
MochaMind
770297fd43 fix: Arabic translations 2025-10-06 15:42:39 +05:30
MochaMind
7d9bd48a4f fix: Spanish translations 2025-10-06 15:42:35 +05:30
Diptanil Saha
a5a3f52c64 Merge pull request #49816 from HarryPaulo/fix-decimal-break-dirty
fix: dirty on decimal values for field discount amount
2025-10-06 15:23:10 +05:30
ruthra kumar
f9cafcc282 Merge pull request #49635 from aerele/subscription-prorate
fix(subscription): include days before
2025-10-06 15:20:51 +05:30
ruthra kumar
5fe8692a8d Merge pull request #49852 from fawaaaz111/patch-4
fix: SQL operator precedence in Project query customer filter
2025-10-06 13:04:10 +05:30
Diptanil Saha
69cb2ca839 Merge pull request #49879 from diptanilsaha/bank_reco_si_pay_ref
fix(bank reconciliation tool): show reference no for sales invoice and enabled auto reconcile for sales invoices
2025-10-06 12:37:20 +05:30
ruthra kumar
72b4aa1aac Merge pull request #49865 from aerele/posting-date-gross-profit
fix: delete column dynamically based on the naming by
2025-10-06 12:34:34 +05:30
Diptanil Saha
e77144414a Merge pull request #49682 from srujan00123/fix-mt940-statement-number-parsing
fix(bank): handle MT940 statement numbers longer than 5 digits
2025-10-06 12:30:55 +05:30
ravibharathi656
b452e06b82 test: add invoice generation before period with prorate 2025-10-06 12:12:27 +05:30
ruthra kumar
dffa8010c1 Merge pull request #49871 from aerele/shipping-address-purchase-order
fix: retain shipping address in doc
2025-10-06 11:28:16 +05:30
Nabin Hait
dcbcc596f2 fix: Set paid amount automatically only if return entry validated and has negative grand total (#49829) 2025-10-06 11:27:55 +05:30
ruthra kumar
c0c2e2367c Merge pull request #49862 from frappe/l10n_develop
fix: sync translations from crowdin
2025-10-06 09:29:35 +05:30
Khushi Rawat
95b9870de1 fix: broken reference to removed 'use_new_budget_controller' field in accounts settings 2025-10-06 09:28:25 +05:30
Srujan N
374e89ab33 fix: resolve linting issues in MT940 bank statement import
- Prefix unused variable with underscore
- Fix import ordering in test file
2025-10-05 22:48:44 +00:00
Srujan N
523a5d0a49 fix: add missing whitelist decorator to convert_mt940_to_csv function
The convert_mt940_to_csv function is called from the frontend JavaScript
code but was missing the @frappe.whitelist() decorator, causing a
"Method Not Allowed" error when users try to import MT940 files.

This fix ensures the function is properly exposed as a public API endpoint
while maintaining the security improvements from the previous commit that
removed unnecessary whitelist from internal helper functions.
2025-10-05 22:40:31 +00:00
Srujan N
25cafa6044 fix: remove whitelist from internal MT940 helper function 2025-10-05 22:38:38 +00:00
Srujan N
3ed8a99603 fix: add docstrings to MT940 utility functions 2025-10-05 22:38:11 +00:00
Srujan N
cdeeb36fe4 test: add comprehensive unit tests for MT940 preprocessing
Added 9 test cases covering all scenarios:
- Statement numbers >5 digits truncated correctly (167619 → 67619)
- Normal statement numbers (≤5 digits) remain unchanged
- Sequence numbers (/1, /2) preserved during truncation
- Multiple :28C: occurrences in same document
- Edge cases (empty content, missing :28C: tags)
- Full MT940 document processing
- MT940 format detection with required tags
- Boundary conditions (exactly 5/6 digits, very long numbers)
- Real-world production case (sanitized for privacy)

All tests pass successfully ensuring robust MT940 parsing
across various real-world scenarios and edge cases.
2025-10-05 22:38:11 +00:00
Srujan N
8598ca9a9d fix: remove unnecessary whitelist from internal helper function 2025-10-05 22:37:12 +00:00
Diptanil Saha
bdc04bf531 Merge pull request #49889 from rehanrehman389/feat/project-filter
feat: add project filter to Delayed Tasks Summary report
2025-10-06 02:08:20 +05:30
Rehan Ansari
88097e78d2 feat: add project filter to Delayed Tasks Summary report 2025-10-06 00:21:00 +05:30
MochaMind
ee65ceebad chore: update POT file (#49887) 2025-10-05 12:06:57 +02:00
Raffael Meyer
21c0fc5db6 fix(Common Code): fetch canonical URI from Code List (#49882) 2025-10-04 18:28:29 +02:00
diptanilsaha
3bbca629c6 fix(bank reconciliation tool): show reference no for sales invoice and auto reconcile sales invoices 2025-10-04 13:02:16 +05:30
rohitwaghchaure
be820ffe59 Merge pull request #49876 from rohitwaghchaure/fixed-indexing-for-batch
fix: optimize SQL query by adding index on batch
2025-10-04 10:59:33 +05:30
rohitwaghchaure
c253fb8902 Merge pull request #49872 from aerele/support-49125
fix: remove allow_on_submit for pick list items
2025-10-04 10:05:00 +05:30
Rohit Waghchaure
8756f91857 fix: optimize SQL query by adding index on batch 2025-10-04 10:03:48 +05:30
Kavin
da716b824f fix: remove allow_on_submit for pick list items 2025-10-03 18:43:10 +05:30
ravibharathi656
039f5e6143 fix: retain shipping address in doc 2025-10-03 17:05:32 +05:30
Mihir Kandoi
44fd94c0d4 Merge pull request #49867 from mihir-kandoi/fix-failing-patch
fix: failing patch
2025-10-03 15:31:13 +05:30
Mihir Kandoi
41d1703e7c fix: failing patch 2025-10-03 15:11:06 +05:30
l0gesh29
4f503ac7f6 fix: delete column dynamically based on the naming by 2025-10-03 14:03:28 +05:30
MochaMind
0fef95bfbb fix: Swedish translations 2025-10-03 11:04:39 +05:30
ruthra kumar
8c82b86b42 Merge pull request #49844 from frappe/l10n_develop
fix: sync translations from crowdin
2025-10-03 10:59:11 +05:30
rohitwaghchaure
a93eed0fb7 Merge pull request #49806 from aerele/fix/overproduction-allowed-qty-validation-wo
fix: validate transfer_qty based on overproduction wo percentage
2025-10-02 20:05:10 +05:30
rohitwaghchaure
437d0eea77 Merge pull request #49850 from aerele/support-49718
fix: add default scrap warehouse in wo
2025-10-02 20:04:47 +05:30
Fawaz Alhafiz
0ec30a1cea fix: SQL operator precedence in Project query customer filter
Added explicit parentheses around customer OR conditions in get_project_name()
to ensure proper grouping with AND filters. Without these parentheses, SQL
operator precedence caused the status filter to be bypassed when a customer
filter was applied, resulting in completed and cancelled projects appearing
in link field dropdowns.

Before:
WHERE customer='X' OR customer IS NULL OR customer='' AND status NOT IN (...)
was interpreted as:
WHERE customer='X' OR customer IS NULL OR (customer='' AND status NOT IN (...))

After:
WHERE (customer='X' OR customer IS NULL OR customer='') AND status NOT IN (...)

Fixes: Completed/cancelled projects showing in Project link fields
Affected: Any doctype using Project link fields with customer filters
2025-10-02 14:24:51 +03:00
Kavin
7e51346946 fix: add default scrap warehouse in wo 2025-10-02 15:18:09 +05:30
MochaMind
6849149176 fix: Persian translations 2025-10-02 10:50:03 +05:30
MochaMind
a5e29e3659 fix: Swedish translations 2025-10-02 10:49:48 +05:30
Raffael Meyer
87cbed0911 feat(Supplier): remove create buttons (#49843) 2025-10-02 00:26:31 +02:00
Raffael Meyer
ca3e3a7941 refactor(Supplier): custom buttons call make methods (#49840) 2025-10-01 23:31:03 +02:00
Diptanil Saha
584f6c42f0 Merge pull request #49820 from lauty95/translations
fix: financial ratios translation and pdf export error
2025-10-01 23:19:08 +05:30
Mihir Kandoi
282d28fbce Merge pull request #49836 from rohitwaghchaure/fixed-stock-reservation-on-cancel-wo
fix: reverse delivered qty in stock resrvation on cancellation
2025-10-01 21:03:57 +05:30
Rohit Waghchaure
20e9706ec3 fix: reverse delivered qty in stock resrvation on cancellation 2025-10-01 20:44:27 +05:30
Mihir Kandoi
9c1be96990 Merge pull request #49832 from mihir-kandoi/too-many-writes
fix: too many writes on patch run
2025-10-01 18:56:29 +05:30
MochaMind
25e5a623d6 fix: sync translations from crowdin (#49821) 2025-10-01 15:16:29 +02:00
Mihir Kandoi
35a8d02866 fix: Add try-finally for setting buying price list 2025-10-01 18:39:29 +05:30
Mihir Kandoi
44ff6ed6a1 fix: too many writes on patch run 2025-10-01 18:30:44 +05:30
lauty95
a403940612 fix: es.po file 2025-10-01 11:51:11 +00:00
rethik
bf5f24c0e0 chore: add show_disabled_items filter to show both enabled and disabled items 2025-10-01 17:08:15 +05:30
Raheel Khan
35474d997d fix: skip party validation for payroll & it's journal & GL entry submission (#49638)
* fix: skip validation for manual je & gl submission linked with payroll entry

* refactor: change condition

* fix: add checkbox in jouranl entry account and passed it true from payroll to skip party validation

* refactor: add checkbox to skip party validation in journal entry
2025-10-01 16:17:25 +05:30
rohitwaghchaure
ad886b6389 Merge pull request #49824 from rohitwaghchaure/fixed-button-view
fix: grouping of buttons in work order
2025-10-01 14:19:40 +05:30
Rohit Waghchaure
6408975b61 fix: grouping of buttons in work order 2025-10-01 13:49:52 +05:30
ruthra kumar
877f5611b1 Merge pull request #49689 from aerele/pi-payments
fix(accounting): ensure proper removal of advance references during u…
2025-10-01 12:09:41 +05:30
Diptanil Saha
d65c715e11 Merge pull request #49496 from elshafei-developer/Add-a-missing-translate-function
fix(Accounts Payable Summary): add a missing translate function
2025-10-01 02:14:56 +05:30
diptanilsaha
a7a8ff2086 test: consolidated trial balance 2025-10-01 01:02:51 +05:30
diptanilsaha
71a8df2189 feat: gl entries with values in reporting_currency 2025-10-01 00:50:02 +05:30
diptanilsaha
181ad0bdcd feat: consolidated trial balance report 2025-10-01 00:49:55 +05:30
lauty95
1963e03264 fix: syntax error 2025-09-30 18:59:07 +00:00
lauty95
d383c70020 fix: add financial ratios translations 2025-09-30 18:54:44 +00:00
rohitwaghchaure
27fac7a352 Merge pull request #49818 from rohitwaghchaure/fixed-ignore-orders
fix: ignore orders in mps
2025-09-30 22:19:38 +05:30
Rohit Waghchaure
bccbfe97b3 fix: ignore orders in mps 2025-09-30 21:46:40 +05:30
HarryPaulo
0e8f8677b8 fix: decimal break with dirty 2025-09-30 15:11:19 +00:00
HarryPaulo
3ffd50c772 fix: decimal break for discount amount 2025-09-30 15:03:59 +00:00
Kavin
b527d38bfa test: test overproduction allowed qty in wo 2025-09-30 19:13:23 +05:30
Kavin
526b850e61 fix: set fg_completed_qty based upon fg item qty 2025-09-30 19:13:22 +05:30
Kavin
4024d8846b fix: validate transfer_qty based on overproduction wo percentage 2025-09-30 19:01:58 +05:30
rohitwaghchaure
2757368579 Merge pull request #49750 from aerele/support-49391
fix: get unconsumed qty as per BOM required qty
2025-09-30 17:57:51 +05:30
rohitwaghchaure
b593150521 Merge pull request #49803 from rohitwaghchaure/fixed-sabb-valuation-rate
fix: valuation rate for old batch
2025-09-30 17:11:33 +05:30
rohitwaghchaure
14128a47e7 Merge pull request #49748 from aerele/fix-pick-list-qty
fix: update item details only in draft state
2025-09-30 16:37:48 +05:30
rohitwaghchaure
7592c0956c Merge pull request #49766 from aerele/support-49394
fix: use sales_order from data instead of doc
2025-09-30 16:35:43 +05:30
rohitwaghchaure
a2d907d8bc Merge pull request #49794 from aerele/support-49604
fix: don't recalculate stock_qty with conversion_factor
2025-09-30 16:32:38 +05:30
Rohit Waghchaure
d864d166f9 fix: valuation rate for old batch 2025-09-30 16:29:36 +05:30
PRASATHRAJA
4a01c53cca Merge pull request #49639 from aerele/credit-limit-jv
fix(Credit-limit): consider current voucher for credit limit validation
2025-09-30 10:38:03 +00:00
ruthra kumar
3057a47994 Merge pull request #49799 from ljain112/fix-gl-cc
fix: do not validate cost center in cancelled gl entry
2025-09-30 14:33:12 +05:30
ljain112
29cbddbc77 fix: do not validate cost center in cancelled gl entry 2025-09-30 14:09:35 +05:30
Kavin
34d2c8d9c2 test: required_qty clamping in manufacture entry 2025-09-30 00:27:58 +05:30
Kavin
fed8236919 fix: don't recalculate stock_qty with conversion_factor 2025-09-29 22:15:52 +05:30
rohitwaghchaure
9b09dd063d Merge pull request #49790 from aerele/ticket-48131
fix: update subcontracted_quantity with set_value
2025-09-29 21:49:56 +05:30
rohitwaghchaure
f18385c35d Merge pull request #49791 from rohitwaghchaure/fixed-reposting-item-wh
refactor: convert item warehouse based reposting
2025-09-29 21:49:24 +05:30
Rohit Waghchaure
8411e4c5b2 refactor: convert item-wh based reposting 2025-09-29 19:17:40 +05:30
venkat102
81614939ab fix: convert with flt 2025-09-29 18:09:02 +05:30
rohitwaghchaure
ea4379e4f2 Merge pull request #49781 from rohitwaghchaure/fixed-extra-tramsfer-materials
fix: additional material transfer
2025-09-29 17:27:42 +05:30
venkat102
89a603f20c fix: use get_value instead of get_doc 2025-09-29 17:25:06 +05:30
venkat102
ea63bfc9af fix: update subcontracted_quantity with set_value 2025-09-29 17:23:38 +05:30
ruthra kumar
073f88892e Merge pull request #49590 from ruthra-kumar/make_checkboxes_opt_out
refactor: make checkboxes opt out
2025-09-29 16:56:27 +05:30
Rohit Waghchaure
3c03c94f1a fix: additional material transfer 2025-09-29 16:42:11 +05:30
ruthra kumar
d22434d31e Merge pull request #49773 from aerele/reference-number-small-text
fix(bank transaction): change reference number to small text
2025-09-29 16:42:06 +05:30
ruthra kumar
dc14a629ff Merge pull request #49708 from aerele/add-show-zero-values-filter
feat: add show zero value filter in profit and loss and balance sheet
2025-09-29 16:27:47 +05:30
ruthra kumar
f746540420 Merge pull request #49718 from aerele/tax-template-cost-center
fix: set cost center in taxes if not set
2025-09-29 15:49:17 +05:30
ruthra kumar
7fcdebcbd1 Merge pull request #49735 from aerele/payment-entry-exchange-rate-internal-transfer
fix(payment entry): trigger currency on account set
2025-09-29 14:26:47 +05:30
ruthra kumar
6e46c8f7c7 Merge pull request #49618 from aerele/ticket-47708
fix: add date filter for getting return invoice items
2025-09-29 14:12:03 +05:30
ruthra kumar
3cc9fb92d8 Merge pull request #49640 from aerele/payment-request-precision
fix: include precision in validation
2025-09-29 14:11:40 +05:30
Navin-S-R
d5c457b8c5 test: validate profit values for later period returns 2025-09-29 12:14:59 +05:30
rohitwaghchaure
fb802bc26b Merge pull request #49770 from rohitwaghchaure/fixed-removed-print-statement
chore: removed print statement
2025-09-29 12:02:03 +05:30
Rohit Waghchaure
324bdcb177 chore: removed print statement 2025-09-29 11:41:27 +05:30
ruthra kumar
452eaaf44e Merge pull request #49767 from frappe/l10n_develop
fix: sync translations from crowdin
2025-09-29 11:16:31 +05:30
MochaMind
e57e8aa708 fix: Esperanto translations 2025-09-29 10:38:26 +05:30
MochaMind
acdfdb1389 fix: French translations 2025-09-29 10:38:23 +05:30
MochaMind
3a1c12d49c fix: Serbian (Latin) translations 2025-09-29 10:38:19 +05:30
MochaMind
875cf68df8 fix: Norwegian Bokmal translations 2025-09-29 10:38:16 +05:30
MochaMind
6bc0d71fc8 fix: Bosnian translations 2025-09-29 10:38:12 +05:30
MochaMind
552c6eb9f5 fix: Croatian translations 2025-09-29 10:38:09 +05:30
MochaMind
8202d2ed47 fix: Thai translations 2025-09-29 10:38:06 +05:30
MochaMind
3718ac0c33 fix: Persian translations 2025-09-29 10:38:03 +05:30
MochaMind
a3937ed44e fix: Indonesian translations 2025-09-29 10:37:59 +05:30
MochaMind
fb515c8ddc fix: Portuguese, Brazilian translations 2025-09-29 10:37:56 +05:30
MochaMind
02c7006525 fix: Vietnamese translations 2025-09-29 10:37:53 +05:30
MochaMind
cd8d4af900 fix: Chinese Simplified translations 2025-09-29 10:37:50 +05:30
MochaMind
dc5fd40a0c fix: Turkish translations 2025-09-29 10:37:47 +05:30
MochaMind
e3fe298297 fix: Swedish translations 2025-09-29 10:37:44 +05:30
MochaMind
533af66057 fix: Serbian (Cyrillic) translations 2025-09-29 10:37:40 +05:30
MochaMind
dbda66a62f fix: Russian translations 2025-09-29 10:37:37 +05:30
MochaMind
bebbfd8f94 fix: Portuguese translations 2025-09-29 10:37:33 +05:30
MochaMind
82741fbbe7 fix: Polish translations 2025-09-29 10:37:30 +05:30
MochaMind
b11a1ecb7a fix: Dutch translations 2025-09-29 10:37:27 +05:30
MochaMind
b11d5ab04d fix: Italian translations 2025-09-29 10:37:24 +05:30
MochaMind
5cee8edbb4 fix: Hungarian translations 2025-09-29 10:37:21 +05:30
MochaMind
2dd5e2abd0 fix: German translations 2025-09-29 10:37:18 +05:30
MochaMind
4a771fe765 fix: Danish translations 2025-09-29 10:37:14 +05:30
MochaMind
8d10759631 fix: Czech translations 2025-09-29 10:37:11 +05:30
MochaMind
d5ab4c1d7d fix: Arabic translations 2025-09-29 10:37:08 +05:30
MochaMind
81ae03e1a5 fix: Spanish translations 2025-09-29 10:37:04 +05:30
Kavin
9f9120451b fix: use sales_order from data instead of doc 2025-09-28 22:59:22 +05:30
MochaMind
76a27541f3 fix: sync translations from crowdin (#49715) 2025-09-28 17:37:24 +02:00
MochaMind
9889d23b8c chore: update POT file (#49765) 2025-09-28 12:16:22 +02:00
El-Shafei H.
3578ee1195 Merge branch 'frappe:develop' into add-employee-name-to-session-user 2025-09-28 08:37:11 +03:00
KerollesFathy
4f8b2e520a fix(manufacturing): prevent KeyError in BOM Creator when sub-assembly reused
Ensure missing (fg_item, fg_reference_id) keys are initialized in
production_item_wise_rm before appending items. This avoids crashes
when the same sub-assembly is referenced under multiple parents.
2025-09-27 12:54:10 +00:00
rohitwaghchaure
0dc2545fb9 Merge pull request #49757 from rohitwaghchaure/subcontracting-receipt-service-expense-account
feat: service expense account in the subcontracting receipt
2025-09-26 21:12:26 +05:30
Rohit Waghchaure
6e597b9c42 feat: service expense account in the subcontracting receipt 2025-09-26 19:45:17 +05:30
rohitwaghchaure
48acbe6b50 Merge pull request #49752 from rohitwaghchaure/fixed-expense-account-for-op-component
fix: incorrect operating component in stock entry
2025-09-26 19:04:29 +05:30
rohitwaghchaure
75cf70c8f3 Merge pull request #49741 from aerele/stock-entry-manufacture-expense-account
fix(stock entry): set expense account from company for manufacture
2025-09-26 18:57:23 +05:30
Rohit Waghchaure
d10530ee47 fix: incorrect operating component in stock entry 2025-09-26 18:43:39 +05:30
Kavin
cf4b395ee3 fix: get unconsumed qty as per BOM qty 2025-09-26 17:51:26 +05:30
ravibharathi656
90f399d0fc fix(bank transaction): change reference number to small text 2025-09-26 17:07:03 +05:30
Kavin
689172ff22 fix: update item details only in draft state 2025-09-26 16:13:13 +05:30
ravibharathi656
b2e109318f fix: use stock adjustment account if no expense account 2025-09-26 14:54:21 +05:30
ravibharathi656
23b1b7ee04 fix: use item valuation rate if no bin 2025-09-26 13:19:31 +05:30
ravibharathi656
06177ffaff fix(stock entry): set expense account from company for manufacture 2025-09-26 12:28:27 +05:30
rohitwaghchaure
a664f3039b Merge pull request #49734 from rohitwaghchaure/fixed-set-bacthes-in-scr-for-rm
fix: auto batch not set for raw materials in subcontracting receipt
2025-09-26 10:36:00 +05:30
ruthra kumar
daf1d52fc9 Merge pull request #49717 from ruthra-kumar/improving_trial_balance_perf
refactor: improve trial balance performance
2025-09-26 10:15:16 +05:30
Rohit Waghchaure
23f9d4c600 fix: auto batch not set for raw materials in subcontracting receipt 2025-09-26 09:23:49 +05:30
ravibharathi656
096e74b1ee fix(payment entry): trigger currency on account set 2025-09-25 23:23:40 +05:30
ravibharathi656
33ab24943c feat: add show zero value filter in profit and loss and balance sheet 2025-09-25 22:42:14 +05:30
ravibharathi656
b75940bf0e fix: set cost center in taxes if not set 2025-09-25 22:38:58 +05:30
rohitwaghchaure
5ffbf59d78 Merge pull request #49725 from aerele/fix-pick-list-locations
fix: remove item name in get_item_details
2025-09-25 18:51:11 +05:30
Kavin
47055901c0 fix: remove item name to avoid overriding item row name 2025-09-25 18:05:21 +05:30
rohitwaghchaure
a4e291bb77 Merge pull request #49720 from rohitwaghchaure/fixed-perf-reposting
perf: reposting for backdated transactions
2025-09-25 17:44:35 +05:30
Rohit Waghchaure
1b0fc0541b perf: reposting for backdated transactions 2025-09-25 17:24:54 +05:30
ruthra kumar
cee3813ced refactor: improve trial balance performance 2025-09-25 17:03:57 +05:30
ruthra kumar
6bd36a137c Merge pull request #49722 from rohitwaghchaure/fixed-test-case-test_backdated_stock_reco_entry
chore: fixed test case test_backdated_stock_reco_entry
2025-09-25 17:02:44 +05:30
Rohit Waghchaure
f4b18f2ad7 chore: fixed test case test_backdated_stock_reco_entry 2025-09-25 16:35:28 +05:30
rohitwaghchaure
62a8e4a561 Merge pull request #49710 from rohitwaghchaure/fixed-posting-datetime-for-sabb
refactor: posting datetime for SABB
2025-09-24 23:56:42 +05:30
Rohit Waghchaure
99b7a9d15c refactor: posting datetime for SABB 2025-09-24 23:15:55 +05:30
ruthra kumar
9391c8911c refactor: rename reactivity checkbox 2025-09-24 16:24:03 +05:30
ruthra kumar
d3d03e8d83 refactor: rename checkbox for budget controller 2025-09-24 16:24:01 +05:30
El-Shafei H.
6730960f56 Merge branch 'frappe:develop' into add-employee-name-to-session-user 2025-09-24 11:26:38 +03:00
ruthra kumar
1f91dcb1bd Merge pull request #49706 from frappe/l10n_develop
fix: sync translations from crowdin
2025-09-24 13:53:08 +05:30
El-Shafei H.
320f0056a2 Merge branch 'frappe:develop' into Add-a-missing-translate-function 2025-09-24 11:17:35 +03:00
Pandiyan P
a7ec01bf21 fix(accounting): ensure proper removal of advance references during unreconcillation 2025-09-24 11:37:16 +05:30
MochaMind
36f923c540 fix: Norwegian Bokmal translations 2025-09-24 08:26:11 +05:30
Raffael Meyer
8bc7fe7e55 fix: fallback to default selling price list only in selling transactions (#49705) 2025-09-23 20:13:35 +00:00
Henning Wendtland
ff78aaeb3b feat: allow fallback to default selling price list (#49634)
Co-authored-by: barredterra <14891507+barredterra@users.noreply.github.com>
2025-09-23 19:29:13 +00:00
ljain112
b10cf4a928 fix: do not fetch disabled item tax template 2025-09-23 19:10:23 +05:30
rohitwaghchaure
027a4ea1bf Merge pull request #49698 from rohitwaghchaure/fixed-serial-no-reservation
fix: serial no reservation issue
2025-09-23 17:22:02 +05:30
Rohit Waghchaure
c21a713750 fix: serial no reservation issue 2025-09-23 17:02:42 +05:30
Mithili G
b98977dc75 fix: remove remarks if show_remarks is unchecked (#49567)
* fix: remove remarks if show_remarks is unchecked

* chore: resolve conflicts in accounts receivable

---------

Co-authored-by: mithili <mithili15602@gamil.com>
2025-09-23 16:43:41 +05:30
Nareshkanna S
1979879b07 fix: only show filters in print view if 'Include filters' is enabled 2025-09-23 16:22:08 +05:30
Jannat Patel
f5057cfb66 Merge pull request #49694 from pateljannat/sales-data
chore: update sales_data from site_info
2025-09-23 14:49:15 +05:30
Jannat Patel
5a26d593e4 test: activation with site_info 2025-09-23 14:06:02 +05:30
Jannat Patel
866b252309 chore: update sales_data from site_info 2025-09-23 13:09:59 +05:30
rohitwaghchaure
2065f2b117 Merge pull request #49184 from rohitwaghchaure/feat-mrp
feat: MPS (SO Schedules) and MRP
2025-09-23 12:06:10 +05:30
rohitwaghchaure
b99d2e16c4 Merge pull request #49648 from aerele/fix-sre-validation-for-old-batch
fix: Consider non SABB batch qty in reserved batch validation
2025-09-23 11:50:14 +05:30
rohitwaghchaure
468d181a00 Merge pull request #49684 from aerele/fetch-actual-qty-pick-list
feat: populate available qty in pick list locations
2025-09-23 11:49:46 +05:30
rohitwaghchaure
997d573dc0 Merge pull request #49687 from rohitwaghchaure/fixed-warehouse-validation
fix: warehouse for batch validation
2025-09-23 11:41:50 +05:30
Diptanil Saha
2442be5773 Merge pull request #49676 from aerele/support-48980
fix: auto commit if too many writes reached
2025-09-23 10:59:14 +05:30
Rohit Waghchaure
381072170a fix: warehouse for batch validation 2025-09-23 10:56:50 +05:30
Kavin
e3ab0e7c67 refactor: fetching qty on warehouse trigger
Co-authored-by: coderabbitai[bot] <136622811+coderabbitai[bot]@users.noreply.github.com>
2025-09-23 10:56:14 +05:30
ruthra kumar
a68cbb177c Merge pull request #49678 from barredterra/yarn-cache-dir
ci: update yarn cache dir command
2025-09-23 10:49:59 +05:30
ruthra kumar
f8f47d0a73 Merge pull request #49675 from ShreyasTheNewbie/develop
fix(pricing_rule): handle dict type when checking coupon_code_based
2025-09-23 10:39:06 +05:30
ruthra kumar
e6ad752c99 Merge pull request #49683 from frappe/l10n_develop
fix: sync translations from crowdin
2025-09-23 10:34:36 +05:30
Kavin
d8756fc7de feat: populate available qty in pick list locations 2025-09-23 08:39:39 +05:30
Kavin
fc967fceb2 chore: rename stock qty label 2025-09-23 08:35:24 +05:30
MochaMind
b7fbe31558 fix: Norwegian Bokmal translations 2025-09-23 08:31:01 +05:30
MochaMind
eef77291ad fix: Persian translations 2025-09-23 08:30:46 +05:30
Srujan N
82285e236f fix: handle MT940 statement numbers longer than 5 digits
The MT940 standard expects statement numbers to be maximum 5 digits,
but some banks provide longer statement numbers that cause parsing errors.

Problem:
- MT940 files with statement numbers > 5 digits fail to parse
- Error: "Unable to parse StatementNumber object from '167619/1'"
- This breaks bank statement import functionality

Solution:
- Add preprocess_mt940_content() function to truncate long statement numbers
- Preserve sequence numbers (e.g., '/1') when present
- Apply preprocessing before mt940.parse() to ensure compatibility

The fix truncates statement numbers to the last 5 digits while maintaining
the MT940 format structure, allowing successful parsing of previously
failing bank statements.
2025-09-22 20:46:44 +00:00
barredterra
2579402852 ci: update yarn cache dir command 2025-09-22 20:39:43 +02:00
MochaMind
609164fb9a fix: sync translations from crowdin (#49660) 2025-09-22 16:21:27 +02:00
Kavin
66712fa8b5 fix: restore auto_commit_on_many_writes flag 2025-09-22 19:31:27 +05:30
Kavin
99a0ba0b45 fix: auto commit if too many writes reached 2025-09-22 18:54:57 +05:30
Shreyas Sojitra
790876ea5b fix(pricing_rule): handle dict type when checking coupon_code_based 2025-09-22 18:43:28 +05:30
Rohit Waghchaure
f7a37d2812 feat: demand planning, MPS and MRP 2025-09-22 18:18:18 +05:30
ruthra kumar
993ba4cf45 Merge pull request #49643 from aerele/po-super-class
fix(purchase order): invoke superclass onload method
2025-09-22 13:40:55 +05:30
ruthra kumar
bb081e46d7 Merge pull request #49644 from aerele/po-party-currency
fix(purchase order): get party type based on supplier field
2025-09-22 13:35:10 +05:30
ruthra kumar
6985f0efc3 Merge pull request #49653 from aerele/ar-exclude-employee
fix(accounts receivable): exclude employee transactions
2025-09-22 13:34:53 +05:30
Ravibharathi
302ff49b7f Merge pull request #49470 from aerele/bank-clearance-tax-calculation
fix(bank clearance): use base total taxes and charges if exists
2025-09-22 11:26:56 +05:30
Diptanil Saha
ee2b65806b Merge pull request #49649 from diptanilsaha/issue-replied
fix: set first_response_time on set_first_response
2025-09-22 00:05:07 +05:30
diptanilsaha
ba459204b0 fix: set first_response_time on status change of issue 2025-09-21 23:44:33 +05:30
MochaMind
7d4785784b fix: sync translations from crowdin (#49625) 2025-09-21 14:01:24 +02:00
MochaMind
35b503932d chore: update POT file (#49655) 2025-09-21 13:59:21 +02:00
venkat102
736a776d3d fix(accounts receivable): exclude employee transactions 2025-09-21 11:14:06 +05:30
Kavin
ae8b34e03c fix: Consider non SABB batch qty in reserved batch validation 2025-09-20 17:42:54 +05:30
venkat102
11b9b1adc5 fix(purchase order): get party type based on supplier field 2025-09-20 13:16:28 +05:30
venkat102
9f6bc7fe49 fix(purchase order): invoke superclass onload method 2025-09-20 13:07:57 +05:30
l0gesh29
1de0c46c51 fix: include precision in validation 2025-09-19 19:29:43 +05:30
Navin-S-R
2abb011816 fix: add date filter for getting return invoice items 2025-09-19 18:21:30 +05:30
ravibharathi656
eda1dae882 refactor(subscription): default prorate 0 2025-09-19 16:48:35 +05:30
ravibharathi656
9164162a9e fix(subscription): include days before 2025-09-19 16:23:26 +05:30
ravibharathi656
b7c6d8e2a6 fix(profit and loss statement): incorrect total calculation 2025-09-19 00:06:16 +05:30
Mihir Kandoi
7e63f1d220 Merge pull request #49615 from aerele/fixed-support-48949
fix(stock): NoneType object error on stock entry
2025-09-18 20:16:40 +05:30
MochaMind
3d8502f408 fix: sync translations from crowdin (#49607) 2025-09-18 15:44:21 +02:00
ruthra kumar
c3e869c701 Merge pull request #49467 from aerele/qb-user-perm
fix: add condition for name
2025-09-18 16:41:16 +05:30
Kavin
aee03417de fix(stock): NoneType object error on stock entry 2025-09-18 16:31:07 +05:30
Diptanil Saha
14d8b87c8e Merge pull request #49608 from diptanilsaha/psoa_ar_show_future_payments
fix(process statement of accounts): total row in accounts receivable with future payments
2025-09-18 15:31:16 +05:30
rohitwaghchaure
2a86a1fb98 Merge pull request #49609 from rohitwaghchaure/fixed-drop-indexes-from-sle
fix: drop index batch_no_item_code_warehouse_index
2025-09-18 13:26:19 +05:30
Rohit Waghchaure
28180ccaa4 fix: drop index batch_no_item_code_warehouse_index 2025-09-18 13:08:26 +05:30
diptanilsaha
7bf17372b0 fix(process statement of accounts): total row in accounts receivable with future payments 2025-09-18 11:30:53 +05:30
venkat102
a5b881ea74 test: add test to validate user permission in qb 2025-09-18 00:02:10 +05:30
rohitwaghchaure
ac40b46a6d Merge pull request #49589 from rohitwaghchaure/fixed-op-cost-for-sfg
fix: operation cost for Semi FG item
2025-09-17 22:18:51 +05:30
Rohit Waghchaure
69682cb064 fix: operation cost for Semi FG item 2025-09-17 21:57:34 +05:30
Raheel Khan
8b543e5503 fix: skip receivable/payable account validation in payroll entry if party is not available (#49585)
* fix: skip receivable/payable account validation if party is not available in creation of payroll entry

* refactor: rename flag
2025-09-17 13:06:00 +00:00
Diógenes Souza
c4f90c3b34 fix: 'NoneType' object has no attribute 'get' in get_item_details.py (#49381) 2025-09-17 18:05:49 +05:30
Anwar Patel
244dce5098 fix: Incorrect filters in Voucher Child Table of Land Cost Voucher DocType (#49500)
* fix: company filter in receipt_document in landed cost voucher

* refactor: use strict equality
2025-09-17 17:43:29 +05:30
Bhavansathru
194ab87fef fix(payment-reconciliation): apply field precision for allocated and difference amounts (#49448)
fix(payment-reconciliation): handle allocated and difference amount with field precision for accurate exchange rate calculations
2025-09-17 17:04:02 +05:30
Logesh Periyasamy
e0299e1cbd fix: add option for currency field (#49572) 2025-09-17 17:01:53 +05:30
MochaMind
9c970acbda fix: sync translations from crowdin (#49581)
* fix: Norwegian Bokmal translations

* fix: French translations
2025-09-17 17:01:18 +05:30
rohitwaghchaure
06dde659c2 Merge pull request #49587 from rohitwaghchaure/fixed-support-48584
fix: incorrect current qty calculation for the batch
2025-09-17 17:00:23 +05:30
Logesh Periyasamy
9fc17e0e3a fix: project accounting dimension and gl posting date column width (#49563)
* fix: add width for posting_date

* fix: add project field for missing doctype

* fix: remove allow_on_submit to align with cost center
2025-09-17 16:57:48 +05:30
Rohit Waghchaure
535f8657ed fix: incorrect current qty calculation for the batch 2025-09-17 16:33:26 +05:30
Diptanil Saha
c77781a14f Merge pull request #49584 from diptanilsaha/custom-print-format-psoa
feat(accounts): enable print format selection in Process Statement of Accounts
2025-09-17 12:19:04 +05:30
diptanilsaha
c9d22386ed fix: added print format validation on process statement of accounts 2025-09-17 11:42:36 +05:30
diptanilsaha
2e7c3207c4 feat(accounts): enable print format selection in Process Statement of Accounts 2025-09-17 11:23:44 +05:30
Diptanil Saha
0aef591f5d Merge pull request #49281 from diptanilsaha/reporting_currency
feat: adding reporting_currency and dr/cr in reporting currency fields in GL Entry and Account Closing Balance
2025-09-17 10:44:04 +05:30
rohitwaghchaure
39049948b8 Merge pull request #49558 from rohitwaghchaure/fixed-valuation-rate-issue
fix: set basic rate on selection of the batch
2025-09-16 12:55:04 +05:30
ruthra kumar
39b9d798d9 Merge pull request #49511 from aerele/sales-invoice-tax-id
fix(sales invoice): fetch tax id from customer
2025-09-16 12:01:33 +05:30
Rohit Waghchaure
bebb8ae1ea fix: set basic rate on selection of the batch 2025-09-16 11:57:43 +05:30
ruthra kumar
1c8266af39 Merge pull request #49557 from frappe/l10n_develop
fix: sync translations from crowdin
2025-09-16 10:17:44 +05:30
MochaMind
73729f6ab0 fix: French translations 2025-09-16 07:06:51 +05:30
MochaMind
a287201011 fix: Norwegian Bokmal translations 2025-09-16 07:06:45 +05:30
MochaMind
a4e2fbdcf9 fix: Persian translations 2025-09-16 07:06:34 +05:30
MochaMind
21dc0a0b1a fix: Swedish translations 2025-09-16 07:06:18 +05:30
MochaMind
98626aaa6c fix: Portuguese translations 2025-09-16 07:06:09 +05:30
MochaMind
86a8015cea fix: German translations 2025-09-16 07:05:56 +05:30
MochaMind
8330b349d2 fix: Danish translations 2025-09-16 07:05:53 +05:30
Diptanil Saha
29197af11a Merge pull request #49438 from pipech/fix-thai-fiscal-year
fix(acc): thai fiscal year
2025-09-16 00:50:30 +05:30
rohitwaghchaure
a00a3868ed Merge pull request #49549 from rohitwaghchaure/fixed-not-allow-backdated-entries
fix: do not allow backdated entries if stock reco exists in future for serial or batch
2025-09-15 15:40:42 +05:30
Rohit Waghchaure
335dcc976c fix: do not allow backdated entries if stock reco exists in future for serial or batch 2025-09-15 15:22:41 +05:30
Raffael Meyer
6972f161b8 fix(accounts): dynamic zero cutoff (#48899)
* fix(accounts): dynamic zero cutoff

The cutoff for displaying zero values in accounting reports has so far been hardcoded to 0.005, giving wrong results for currencies that require a higher precision. This PR changes this to a dynamic value calculated from the Currency's _Fraction Units_.

* style: fix typo
2025-09-15 08:33:03 +02:00
Khushi Rawat
79b8505972 Merge pull request #49524 from KerollesFathy/fix-assets-movement-typos
fix: Assets Movement Typos
2025-09-15 11:54:56 +05:30
MochaMind
fe7b797e5f fix: sync translations from crowdin (#49550)
* fix: Spanish translations

* fix: Arabic translations

* fix: Czech translations

* fix: Danish translations

* fix: German translations

* fix: Hungarian translations

* fix: Italian translations

* fix: Dutch translations

* fix: Polish translations

* fix: Portuguese translations

* fix: Russian translations

* fix: Serbian (Cyrillic) translations

* fix: Swedish translations

* fix: Turkish translations

* fix: Chinese Simplified translations

* fix: Vietnamese translations

* fix: Portuguese, Brazilian translations

* fix: Indonesian translations

* fix: Persian translations

* fix: Thai translations

* fix: Croatian translations

* fix: Bosnian translations

* fix: Norwegian Bokmal translations

* fix: Serbian (Latin) translations

* fix: French translations

* fix: Esperanto translations
2025-09-15 07:45:05 +02:00
ravibharathi656
df329964dd fix(sales invoice): fetch tax id from customer 2025-09-15 10:12:20 +05:30
MochaMind
1845d12951 Merge pull request #49532 from frappe/l10n_develop 2025-09-14 20:33:38 +02:00
Raffael Meyer
67c2ab4c9f Merge pull request #49546 from frappe/pot_develop_2025-09-14
chore: update POT file
2025-09-14 13:40:25 +02:00
frappe-pr-bot
405e1ab6d3 chore: update POT file 2025-09-14 09:35:06 +00:00
rohitwaghchaure
cf066edd7f Merge pull request #49542 from rohitwaghchaure/fixed-validation-place
fix: validation for document status
2025-09-14 12:26:43 +05:30
Rohit Waghchaure
96e2e356b6 fix: validation for document status 2025-09-14 11:55:08 +05:30
rohitwaghchaure
0fef2d4b02 Merge pull request #49539 from rohitwaghchaure/fixed-support-48168
fix: precision issue for valuation rate calculation
2025-09-14 11:51:03 +05:30
rohitwaghchaure
b265b82f0b Merge pull request #49538 from rohitwaghchaure/fixed-docstatus-issue-of-sabb
fix: SABB document status validation
2025-09-14 11:25:33 +05:30
Rohit Waghchaure
c92a06d77d fix: precision issue for valuation rate calculation 2025-09-14 11:22:14 +05:30
Rohit Waghchaure
c0236191aa fix: SABB document status validation 2025-09-14 10:53:38 +05:30
KerollesFathy
5f083d55b5 fix: correct grammatical errors in asset movement validation messages 2025-09-10 18:00:44 +00:00
KerollesFathy
56da3bd2e4 fix: correct typo in asset movement purpose validation 2025-09-10 17:57:30 +00:00
Raffael Meyer
f27077a45f Merge pull request #49505 from frappe/l10n_develop
fix: sync translations from crowdin
2025-09-10 17:08:15 +02:00
MochaMind
38b51df17e fix: Norwegian Bokmal translations 2025-09-10 06:21:56 +05:30
rohitwaghchaure
f145e6267b Merge pull request #49503 from rohitwaghchaure/feat-allow-to-transfer-additonal-materials
Feat allow to transfer additional materials
2025-09-09 14:13:24 +05:30
Sagar Vora
09d9c0ddd3 Merge pull request #49506 from sagarvora/extend-not-override
fix: use the new `extend_doctype_class` hook
2025-09-09 06:21:19 +00:00
Rohit Waghchaure
e4b5507446 test: test case for additional material transfer 2025-09-09 11:44:17 +05:30
Sagar Vora
a028d856bc fix: use the new extend_doctype_class hook 2025-09-09 11:34:49 +05:30
MochaMind
e3e4680ad2 fix: Norwegian Bokmal translations 2025-09-09 06:13:49 +05:30
MochaMind
276406bc1c fix: Danish translations 2025-09-09 06:13:46 +05:30
MochaMind
156e46ccb0 fix: Esperanto translations 2025-09-09 06:13:42 +05:30
MochaMind
07a5aba2aa fix: Dutch translations 2025-09-09 06:13:38 +05:30
MochaMind
4ce8d9af6a fix: Serbian (Latin) translations 2025-09-09 06:13:35 +05:30
MochaMind
0474b8595b fix: Bosnian translations 2025-09-09 06:13:32 +05:30
MochaMind
ca8677a0ff fix: Croatian translations 2025-09-09 06:13:28 +05:30
MochaMind
03e5467ba2 fix: Thai translations 2025-09-09 06:13:25 +05:30
MochaMind
e960f8217b fix: Persian translations 2025-09-09 06:13:21 +05:30
MochaMind
a81e807a70 fix: Indonesian translations 2025-09-09 06:13:17 +05:30
MochaMind
3b4ee30dd7 fix: Portuguese, Brazilian translations 2025-09-09 06:13:14 +05:30
MochaMind
521ebc25aa fix: Vietnamese translations 2025-09-09 06:13:11 +05:30
MochaMind
1291df9a63 fix: Chinese Simplified translations 2025-09-09 06:13:08 +05:30
MochaMind
70d7ceb2f2 fix: Turkish translations 2025-09-09 06:13:04 +05:30
MochaMind
512419eee7 fix: Swedish translations 2025-09-09 06:13:01 +05:30
MochaMind
c6be380e83 fix: Serbian (Cyrillic) translations 2025-09-09 06:12:57 +05:30
MochaMind
200496254b fix: Russian translations 2025-09-09 06:12:53 +05:30
MochaMind
2596ef202b fix: Portuguese translations 2025-09-09 06:12:50 +05:30
MochaMind
ac71969512 fix: Polish translations 2025-09-09 06:12:46 +05:30
MochaMind
734a7b8be9 fix: Italian translations 2025-09-09 06:12:43 +05:30
MochaMind
aa9c4555fd fix: Hungarian translations 2025-09-09 06:12:39 +05:30
MochaMind
7e5be50997 fix: German translations 2025-09-09 06:12:36 +05:30
MochaMind
03e3a693ff fix: Czech translations 2025-09-09 06:12:33 +05:30
MochaMind
d4ae2f89b2 fix: Arabic translations 2025-09-09 06:12:30 +05:30
MochaMind
17c24a4168 fix: Spanish translations 2025-09-09 06:12:26 +05:30
MochaMind
c41824c4d0 fix: French translations 2025-09-09 06:12:23 +05:30
Rohit Waghchaure
3ad611966e feat: allow to transfer additional materials 2025-09-08 20:54:43 +05:30
El-Shafei H.
4b7cb6bfad feat: add employee name to session user 2025-09-08 13:46:52 +03:00
El-Shafei H.
4c7a0a4e4c fix: add missing translation function 2025-09-08 10:40:11 +03:00
El-Shafei H.
4527877bb5 fix: add missing translation function 2025-09-08 10:38:57 +03:00
Raffael Meyer
ddc97df31a Merge pull request #49355 from frappe/l10n_develop 2025-09-08 06:59:23 +02:00
Raffael Meyer
c21ebafaa5 Merge pull request #49494 from frappe/pot_develop_2025-09-07 2025-09-08 06:58:57 +02:00
MochaMind
17276a2c0c fix: Norwegian Bokmal translations 2025-09-08 05:47:32 +05:30
MochaMind
4ecdd1fd0e fix: Danish translations 2025-09-08 05:47:29 +05:30
MochaMind
7e093d08a9 fix: Swedish translations 2025-09-08 05:46:59 +05:30
rohitwaghchaure
955e8714ee Merge pull request #49477 from rohitwaghchaure/fixed-batch-qty-calculation
fix: batch qty calculation performance issue
2025-09-07 16:49:07 +05:30
Rohit Waghchaure
1a262483a4 fix: batch qty calculation performance issue 2025-09-07 16:24:00 +05:30
frappe-pr-bot
eead27560c chore: update POT file 2025-09-07 09:35:18 +00:00
MochaMind
b658330881 fix: Norwegian Bokmal translations 2025-09-07 05:45:53 +05:30
MochaMind
4f968f5c65 fix: Danish translations 2025-09-07 05:45:50 +05:30
MochaMind
838183941a fix: Swedish translations 2025-09-07 05:45:46 +05:30
Diptanil Saha
92d86eb30b Merge pull request #49485 from diptanilsaha/skip_bank_ac_creation
fix: skip 'Bank Account' creation on setup
2025-09-06 13:13:24 +05:30
diptanilsaha
efeda90cad fix: renamed temporary bank account to 'Demo Bank Account' 2025-09-06 02:38:53 +05:30
diptanilsaha
47d4319f83 fix: skip 'Bank Account' creation on setup 2025-09-06 02:03:03 +05:30
MochaMind
eb5a9db749 fix: Norwegian Bokmal translations 2025-09-05 05:50:49 +05:30
MochaMind
a2ccb5fa87 fix: Hungarian translations 2025-09-05 05:50:45 +05:30
MochaMind
b56dbe98cf fix: German translations 2025-09-05 05:50:42 +05:30
venkat102
cf5a2d6351 fix: add condition for name 2025-09-04 21:00:52 +05:30
rohitwaghchaure
564de01463 Merge pull request #49453 from rohitwaghchaure/fixed-fifo-valuation-for-non-batchwise-valuation
fix: non batch-wise valuation for batch item
2025-09-04 14:30:17 +05:30
rohitwaghchaure
ac8637d5a0 chore: fix test case 2025-09-04 13:00:32 +05:30
MochaMind
7c10775bc8 fix: Norwegian Bokmal translations 2025-09-04 05:09:55 +05:30
MochaMind
49a96f4306 fix: Serbian (Latin) translations 2025-09-04 05:09:52 +05:30
MochaMind
161ed5290e fix: Serbian (Cyrillic) translations 2025-09-04 05:09:48 +05:30
MochaMind
a0d3b931f3 fix: Hungarian translations 2025-09-04 05:09:44 +05:30
Rohit Waghchaure
11b82ba008 fix: non batch-wise valuation for batch item 2025-09-04 00:48:45 +05:30
rohitwaghchaure
1b73170e8c Merge pull request #49449 from rohitwaghchaure/fixed-support-46728
fix: incorrect stock value in the report
2025-09-04 00:47:16 +05:30
rohitwaghchaure
59c46a1789 Merge pull request #49425 from rohitwaghchaure/fixed-valuation-for-batch
fix: valuation for batch items
2025-09-04 00:47:02 +05:30
Rohit Waghchaure
24e0e3505d fix: valuation for batch items 2025-09-03 19:20:56 +05:30
Rohit Waghchaure
5824b5effd fix: incorrect stock value in the report 2025-09-03 19:03:08 +05:30
rohitwaghchaure
fba16efc07 Merge pull request #49442 from rohitwaghchaure/fixed-incorrect-batch-qty-issue
fix: incorrect batch qty
2025-09-03 16:42:09 +05:30
Mihir Kandoi
9aeb21d0c8 Merge pull request #49441 from mihir-kandoi/fix-wrong-wh-sre-transfer
fix: incorrect warehouse passed during SRE transfer in WO
2025-09-03 16:14:38 +05:30
Rohit Waghchaure
000135a3d4 fix: incorrect batch qty 2025-09-03 16:04:13 +05:30
Mihir Kandoi
260574719e fix: incorect warehouse passed during SRE transfer in WO 2025-09-03 15:53:53 +05:30
Mihir Kandoi
ead1ce2742 Merge pull request #49437 from mihir-kandoi/refactor-49320
refactor: PR 49320
2025-09-03 14:20:29 +05:30
Mihir Kandoi
991413608b refactor: PR 49320 2025-09-03 13:07:08 +05:30
pipech
fe74e0888b fix: thai fiscal year 2025-09-03 14:27:02 +07:00
diptanilsaha
ceff8c92fd fix: used wrong parameter for get_value to fetch previous fiscal year 2025-09-03 12:36:44 +05:30
diptanilsaha
d8babf66ae feat: add patch to set reporting_currency on GL Entry and Account Closing Balance 2025-09-03 12:36:44 +05:30
diptanilsaha
8dbbcf5ffb feat: dr/cr amounts in reporting_currency on account_closing_balance 2025-09-03 12:36:44 +05:30
diptanilsaha
fab9c4d7df feat: dr/cr amounts in reporting_currency on gl entries 2025-09-03 12:36:44 +05:30
diptanilsaha
2383051b74 feat: reporting_currency on company 2025-09-03 12:36:39 +05:30
MochaMind
d2d3294f02 fix: Norwegian Bokmal translations 2025-09-03 05:05:41 +05:30
MochaMind
62037301ee fix: Serbian (Latin) translations 2025-09-03 05:05:38 +05:30
MochaMind
b860f3d31d fix: Serbian (Cyrillic) translations 2025-09-03 05:05:34 +05:30
MochaMind
b8c72c05bb fix: Hungarian translations 2025-09-03 05:05:28 +05:30
Raffael Meyer
f1eda7c4ec Merge pull request #49374 from MarcCon/fix/ignore-permissions 2025-09-02 19:19:27 +02:00
Raffael Meyer
83eafe118e Merge pull request #49432 from barredterra/use-valid-ibans 2025-09-02 19:15:39 +02:00
barredterra
0b178b9449 test: use valid IBANs in party matching test case 2025-09-02 17:41:29 +02:00
ruthra kumar
1e7f374d6e Merge pull request #49306 from aerele/exchange-rate-revaluation-check-gain-loss
fix(exchange rate revaluation): add check for gain_loss
2025-09-02 13:33:55 +05:30
ruthra kumar
fcb86023cb Merge pull request #49332 from aerele/ticket-47028
perf: check PCV (smaller) table before checking GL Entries
2025-09-02 13:16:05 +05:30
Diptanil Saha
2dba591d37 Merge pull request #49407 from diptanilsaha/force_index_fetch_gle
fix(perf): applying consistent index to fetch gl entries for financial statements
2025-09-02 12:11:48 +05:30
ruthra kumar
385a2beaf9 Merge pull request #49379 from aerele/balance-type
fix: add is_cancelled in condition
2025-09-02 10:56:32 +05:30
MochaMind
cc2cc812cc fix: Norwegian Bokmal translations 2025-09-02 05:07:26 +05:30
MochaMind
a1c3c60fca fix: Danish translations 2025-09-02 05:07:23 +05:30
MochaMind
bbbd693c1c fix: Serbian (Latin) translations 2025-09-02 05:07:19 +05:30
MochaMind
f42f59a6b2 fix: Serbian (Cyrillic) translations 2025-09-02 05:07:16 +05:30
MochaMind
886cec797c fix: Hungarian translations 2025-09-02 05:07:10 +05:30
Raffael Meyer
2ea2c5c11e Merge pull request #49377 from barredterra/iban-options 2025-09-01 15:16:13 +02:00
ruthra kumar
b0f59ebf79 Merge pull request #49366 from aerele/tb-simple
fix(trial-balance-simple): ignore cancelled gl and add company filter
2025-09-01 16:45:38 +05:30
rohitwaghchaure
35fee187b6 Merge pull request #49403 from rohitwaghchaure/fixed-support-47626
fix: validation for Recreate Stock Ledgers
2025-09-01 16:12:10 +05:30
diptanilsaha
3e2fb85ae6 fix(perf): applying consistent index to fetch gl entries for financial statements 2025-09-01 15:15:42 +05:30
ruthra kumar
0cb5b571b0 Merge pull request #49335 from aerele/ticket-47331
fix: show company currency symbol
2025-09-01 15:06:10 +05:30
ruthra kumar
3131cf335e Merge pull request #49331 from aerele/patch-sync-auto-reconcile-config
fix: run sync auto reconcile config with force
2025-09-01 14:41:56 +05:30
Rohit Waghchaure
785845a425 fix: validation for Recreate Stock Ledgers 2025-09-01 13:39:35 +05:30
ruthra kumar
fa3ee91414 Merge pull request #49302 from aerele/fix/budget-warning
fix(budget):  fiscal year assignment and approver role in budget
2025-09-01 12:34:07 +05:30
MochaMind
f8fa8bdda7 fix: Norwegian Bokmal translations 2025-09-01 04:54:02 +05:30
MochaMind
69d509a098 fix: Danish translations 2025-09-01 04:53:59 +05:30
MochaMind
5a9fb3db1f fix: Esperanto translations 2025-09-01 04:53:56 +05:30
MochaMind
8c8bfd4277 fix: Dutch translations 2025-09-01 04:53:53 +05:30
MochaMind
47f0507643 fix: Serbian (Latin) translations 2025-09-01 04:53:50 +05:30
MochaMind
cb68c784fe fix: Bosnian translations 2025-09-01 04:53:47 +05:30
MochaMind
b1d3d39a11 fix: Croatian translations 2025-09-01 04:53:43 +05:30
MochaMind
31d9fc5367 fix: Thai translations 2025-09-01 04:53:40 +05:30
MochaMind
80a38732f9 fix: Persian translations 2025-09-01 04:53:37 +05:30
MochaMind
c228d1a05a fix: Indonesian translations 2025-09-01 04:53:33 +05:30
MochaMind
6bbba727a5 fix: Portuguese, Brazilian translations 2025-09-01 04:53:30 +05:30
MochaMind
0149bc633c fix: Vietnamese translations 2025-09-01 04:53:28 +05:30
MochaMind
574198bceb fix: Chinese Simplified translations 2025-09-01 04:53:24 +05:30
MochaMind
edd3383f7d fix: Turkish translations 2025-09-01 04:53:21 +05:30
MochaMind
2384b37305 fix: Swedish translations 2025-09-01 04:53:18 +05:30
MochaMind
c71dd00cc3 fix: Serbian (Cyrillic) translations 2025-09-01 04:53:14 +05:30
MochaMind
bd18ce7326 fix: Russian translations 2025-09-01 04:53:11 +05:30
MochaMind
9a85e1a811 fix: Portuguese translations 2025-09-01 04:53:08 +05:30
MochaMind
ad1b77f280 fix: Polish translations 2025-09-01 04:53:05 +05:30
MochaMind
99d89b207e fix: Italian translations 2025-09-01 04:53:02 +05:30
MochaMind
66f60c64bd fix: Hungarian translations 2025-09-01 04:52:58 +05:30
MochaMind
9f8abd585a fix: German translations 2025-09-01 04:52:55 +05:30
MochaMind
1f937a7c76 fix: Czech translations 2025-09-01 04:52:52 +05:30
MochaMind
9234e27a70 fix: Arabic translations 2025-09-01 04:52:49 +05:30
MochaMind
6ba476a3cd fix: Spanish translations 2025-09-01 04:52:46 +05:30
MochaMind
5f4c1f331d fix: French translations 2025-09-01 04:52:43 +05:30
MochaMind
c95b8e8d30 chore: update POT file (#49396) 2025-08-31 14:05:57 +02:00
Mihir Kandoi
b1d91f429c Merge pull request #49394 from fawaaaz111/patch-1
chore: remove unused import (Order) module
2025-08-31 13:19:47 +05:30
Fawaz Alhafiz
4e86a46008 chore: remove unused import (Order) module 2025-08-31 09:43:01 +03:00
MochaMind
0ad348d714 fix: Bosnian translations 2025-08-31 04:28:37 +05:30
MochaMind
7f1240e2eb fix: Croatian translations 2025-08-31 04:28:34 +05:30
MochaMind
6806c5e977 fix: Swedish translations 2025-08-31 04:28:31 +05:30
Mihir Kandoi
4bdb4fb170 fix(repost item valuation): validate voucher type in transaction (#49388) 2025-08-30 23:25:24 +05:30
rohitwaghchaure
06a999ebaa Merge pull request #49386 from rohitwaghchaure/fixed-support-47111
fix: Issue with Barcode Scanning in Stock Entry
2025-08-30 12:35:55 +05:30
ravibharathi656
5663c2a1ca fix(repost item valuation): validate voucher type in transaction 2025-08-29 23:27:14 +05:30
Rohit Waghchaure
13e3db3730 fix: Issue with Barcode Scanning in Stock Entry 2025-08-29 23:11:16 +05:30
rohitwaghchaure
bba77529f8 Merge pull request #49376 from aerele/reorder-repost-item-valuation-function
fix(repost item valuation): reorder function call
2025-08-29 22:21:28 +05:30
Raffael Meyer
625321ba8a fix: stop creating transaction logs (#49383) 2025-08-29 15:33:07 +00:00
barredterra
4dd428de41 chore(Bank Account): remove IBAN validation
This is now handled by the Frappe Framework.
2025-08-29 15:23:13 +02:00
Diptanil Saha
9ece6ebef8 Merge pull request #49373 from diptanilsaha/psoa_ar_future_payments
feat(Process Statment of Accounts): added show_future_payments filter for account_receivable report type
2025-08-29 18:02:26 +05:30
diptanilsaha
155bdd0251 refactor: renamed variables 2025-08-29 17:35:31 +05:30
l0gesh29
77a9cf6398 fix: add is_cancelled in condition 2025-08-29 16:30:29 +05:30
barredterra
c45ea53889 fix(Bank Account): length of IBAN field 2025-08-29 12:32:29 +02:00
ravibharathi656
d117411070 chore: remove console log 2025-08-29 15:31:47 +05:30
barredterra
cab262c147 feat: set options for IBAN fields
Sets options to "IBAN" for the respective Data fields to take advantage of a new formatting feature provided by the  Frappe Framework.
2025-08-29 11:56:42 +02:00
ravibharathi656
aaa4f0ae26 fix(repost item valuation): reorder function call 2025-08-29 14:56:29 +05:30
Marc-Constantin Enke
00fd1d2f26 feat: add permission check for custom button 2025-08-29 11:09:22 +02:00
Marc-Constantin Enke
7f55f421ab fix: remove ignore_permissions 2025-08-29 11:07:37 +02:00
diptanilsaha
170fe86f38 feat(Process Statment of Accounts): added show_future_payments filter for account_receivable report type 2025-08-29 13:34:03 +05:30
MochaMind
781c377588 fix: Norwegian Bokmal translations 2025-08-29 03:50:30 +05:30
MochaMind
7318c6007d fix: Danish translations 2025-08-29 03:50:27 +05:30
jll-02
aedb171dd4 fix: 🐛 fixing buying controller to include transaction controller… (#49140)
* fix: 🐛 fixing buying controller to include transaction controller function

* refactor: fixed formatting

---------

Co-authored-by: Mihir Kandoi <kandoimihir@gmail.com>
2025-08-28 23:37:42 +05:30
Anwar Patel
1fbde7b8c6 Merge pull request #49289 from anwarpatelnoori/stage
fix: Company currency label is not displayed in Landed Cost Voucher doctype for the field Total Vendor Invoices Cost
2025-08-28 23:36:38 +05:30
ravibharathi656
e8288a2f63 fix: run config with force 2025-08-28 19:41:13 +05:30
l0gesh29
afb067ce50 fix: ignore cancelled gl and add company filter 2025-08-28 19:16:10 +05:30
rohitwaghchaure
0c400f9355 Merge pull request #49345 from rohitwaghchaure/fxied-minor-fixes-08-27
chore: minor fixes
2025-08-28 07:35:29 +05:30
MochaMind
e36cc5641c fix: Norwegian Bokmal translations 2025-08-28 03:55:18 +05:30
MochaMind
a98eb60a27 fix: Danish translations 2025-08-28 03:55:14 +05:30
Mihir Kandoi
147e99a0cc Merge pull request #49308 from lauty95/settings_workspace
Removing Newsletter from Settings Workspace
2025-08-27 22:17:52 +05:30
Mihir Kandoi
b38b2d2283 fix: show create purchase receipt button in purchase invoice only when update stock is not checked (#49254)
fix: show create purchase receipt button only when update stock is not checked
2025-08-27 22:09:22 +05:30
Khushi Rawat
e065794838 Merge pull request #49190 from KerollesFathy/prevent-negative-repair-cost
fix: add non-negative constraint to Repair Cost field
2025-08-27 22:08:10 +05:30
Mihir Kandoi
903194abed Merge pull request #49244 from elshafei-developer/fix-convert-NaN-to-numerical-in-number_card
fix: convert NaN to numerical
2025-08-27 22:06:00 +05:30
0xD0M1M0
2bf0ba9802 feat: optional fixed outgoing email for RfQ (#49258)
* feat: optional fixed outgoing email for RfQ

* fix: linters

* fix: select only outgoing account

* fix: linters
2025-08-27 22:01:54 +05:30
Rohit Waghchaure
39ec44f169 chore: minor fixes 2025-08-27 19:39:59 +05:30
Raffael Meyer
e1cac75f85 fix: add option to disable Transaction Log (#49342) 2025-08-27 11:44:03 +00:00
MochaMind
5e9e95e00b fix: sync translations from crowdin (#49339) 2025-08-27 00:10:31 +02:00
rohitwaghchaure
58d9113fd6 Merge pull request #49320 from mihir-kandoi/fix-swh-scrap-reqd
fix: source warehouse in manufacture entry and reqd prop of scrap warehouse
2025-08-26 21:30:03 +05:30
Navin-S-R
49bb095152 fix: show company currency symbol 2025-08-26 20:29:24 +05:30
rohitwaghchaure
2f4caf755e Merge pull request #49333 from rohitwaghchaure/fixed-stock-reservation-issue
fix: validation issue for reserved batch
2025-08-26 19:47:44 +05:30
Rohit Waghchaure
f38abe38d7 fix: validation issue for reserved batch 2025-08-26 19:20:34 +05:30
Mihir Kandoi
fe0722c4f1 fix: source warehouse in manufacture entry and reqd prop of scrap warehouse 2025-08-26 17:34:30 +05:30
ruthra kumar
c585903a4a Merge pull request #49236 from aerele/immutable-ledger-ple
fix: handle ple for immutable ledger
2025-08-26 16:03:44 +05:30
l0gesh29
48eb488918 fix: handle ple for immutable ledger 2025-08-26 15:48:03 +05:30
Khushi Rawat
68e1f9d4b0 Merge pull request #49319 from khushi8112/set-value-for-asset-owner-company
fix: set value for asset owner company field
2025-08-26 14:36:01 +05:30
khushi8112
a24f1d056b fix: set value for asset owner company field 2025-08-26 12:35:37 +05:30
ruthra kumar
0b0365d559 Merge pull request #49316 from frappe/l10n_develop
fix: sync translations from crowdin
2025-08-26 11:05:09 +05:30
MochaMind
3401438878 fix: Persian translations 2025-08-26 03:12:01 +05:30
rohitwaghchaure
00ea513546 Merge pull request #48875 from aerele/sales-order-to-sales-invoice-item-quantity
fix: incorrect pending qty when creating sales invoice from sales order
2025-08-26 01:08:00 +05:30
Sagar Vora
4bf3a73b50 Merge pull request #49312 from sagarvora/fix-pick-list-scanning 2025-08-25 19:07:43 +00:00
Sagar Vora
72a38929e5 fix: correct logic for warehouse field label 2025-08-26 00:29:26 +05:30
Vignesh Sekar
4d3ddeae8d perf: check PCV (smaller) table before checking GL Entries 2025-08-26 00:14:15 +05:30
Sagar Vora
4005e4412d fix: match warehouse only when last_scanned_warehouse field exists 2025-08-26 00:10:16 +05:30
rohitwaghchaure
470efbeaf5 Merge pull request #49310 from rohitwaghchaure/fixed-sre-issues
fix: SRE status and delivered qty
2025-08-25 23:50:52 +05:30
ravibharathi656
368dbe3bbf chore: remove update_stock 2025-08-25 21:23:14 +05:30
ravibharathi656
e5affb16c7 fix(exchange rate revaluation): add check for gain_loss 2025-08-25 21:12:26 +05:30
ravibharathi656
e5d4b4f0f0 test: add pending quantity check for invoice creation 2025-08-25 21:05:12 +05:30
ravibharathi656
a5138f4899 fix: incorrect pending qty when creating sales invoice from sales order 2025-08-25 21:05:11 +05:30
Rohit Waghchaure
4cac80a968 fix: sre status and delivered qty 2025-08-25 21:00:08 +05:30
Lautaro Juarez
f74d8439a1 removing newsletter from workspace 2025-08-25 10:55:35 -03:00
ruthra kumar
fa182395f6 Merge pull request #49301 from aerele/fix/set-valid-naming-series-in-test
fix: set valid serial no naming series format
2025-08-25 17:21:48 +05:30
ruthra kumar
ed84d33b28 Merge pull request #49296 from emmanuel-mwendwa/fix/monthly-err-filter
fix(accounts): correct typo in monthly auto exchange rate revaluation filter
2025-08-25 17:07:05 +05:30
Bhavan23
770d6dd8e2 fix(budget): always set fiscal year before fetching company approver role 2025-08-25 11:14:44 +00:00
Kavin
46b85c7857 fix: set valid serial no naming series format 2025-08-25 16:37:59 +05:30
ruthra kumar
626be61218 Merge pull request #49252 from aerele/dr/cr-posting-date
feat(payment-reconciliation): add posting date field for debit/credit…
2025-08-25 16:08:40 +05:30
Diptanil Saha
9a5348b0e0 Merge pull request #49297 from diptanilsaha/test-sabb-serial-no
test: fix naming series for serial no on test_serial_no_valuation_for_legacy_ledgers
2025-08-25 15:28:39 +05:30
diptanilsaha
5ebd7d72fc test: fix naming series for serial no on test_serial_no_valuation_for_legacy_ledgers 2025-08-25 15:10:03 +05:30
ruthra kumar
a3bd10f6c6 Merge pull request #49295 from frappe/l10n_develop
fix: sync translations from crowdin
2025-08-25 11:00:56 +05:30
CoiledCoder
15040a362d refactor: centralize exchange rate revaluation scheduling logic
- Introduced a private helper `_auto_create_exchange_rate_revaluation_for(frequency)`
- Removed duplicate logic across daily, weekly, and monthly ERR functions
- Prevents future copy-paste bugs
- Keeps existing behavior unchanged
2025-08-25 03:35:55 +00:00
CoiledCoder
19729a307f fix: correct typo in monthly auto exchange rate revaluation filter
The "auto_create_exchange_rate_revaluation_monthly" function was
using the wrong filter key `"Montly"` instead of `"Monthly"`.
As a result, no companies configured for monthly ERR were being
processed.
2025-08-25 02:07:05 +00:00
MochaMind
42710f9ba1 fix: Esperanto translations 2025-08-25 02:16:10 +05:30
MochaMind
b2e94ed29d fix: Dutch translations 2025-08-25 02:16:06 +05:30
MochaMind
6908101735 fix: Serbian (Latin) translations 2025-08-25 02:16:03 +05:30
MochaMind
d211641ce2 fix: Bosnian translations 2025-08-25 02:16:00 +05:30
MochaMind
c3bca6ed60 fix: Croatian translations 2025-08-25 02:15:57 +05:30
MochaMind
9423f37e12 fix: Thai translations 2025-08-25 02:15:54 +05:30
MochaMind
c93da6cbbc fix: Persian translations 2025-08-25 02:15:51 +05:30
MochaMind
709ae67b3f fix: Indonesian translations 2025-08-25 02:15:48 +05:30
MochaMind
efad850ef3 fix: Portuguese, Brazilian translations 2025-08-25 02:15:44 +05:30
MochaMind
622eafdcc0 fix: Vietnamese translations 2025-08-25 02:15:41 +05:30
MochaMind
5cddf86c7c fix: Chinese Simplified translations 2025-08-25 02:15:38 +05:30
MochaMind
28931bd49a fix: Turkish translations 2025-08-25 02:15:34 +05:30
MochaMind
61360fa813 fix: Swedish translations 2025-08-25 02:15:31 +05:30
MochaMind
a41f6c7fcd fix: Serbian (Cyrillic) translations 2025-08-25 02:15:28 +05:30
MochaMind
22aa830f53 fix: Russian translations 2025-08-25 02:15:25 +05:30
MochaMind
5aaf1501a2 fix: Portuguese translations 2025-08-25 02:15:22 +05:30
MochaMind
6781c69d33 fix: Polish translations 2025-08-25 02:15:18 +05:30
MochaMind
9a1f033fb4 fix: Italian translations 2025-08-25 02:15:15 +05:30
MochaMind
259c74eb3a fix: Hungarian translations 2025-08-25 02:15:12 +05:30
MochaMind
b107cf7d03 fix: German translations 2025-08-25 02:15:09 +05:30
MochaMind
97b0985261 fix: Czech translations 2025-08-25 02:15:06 +05:30
MochaMind
055b1c3bdc fix: Arabic translations 2025-08-25 02:15:03 +05:30
MochaMind
fa0856de8b fix: Spanish translations 2025-08-25 02:14:59 +05:30
MochaMind
db1d77269a fix: French translations 2025-08-25 02:14:56 +05:30
MochaMind
44634cde63 chore: update POT file (#49292) 2025-08-24 15:32:02 +02:00
Raffael Meyer
eabf69ea00 Merge pull request #49285 from barredterra/create-pricing-rule 2025-08-22 20:01:18 +02:00
barredterra
7bc508004b chore!: remove unused utils 2025-08-22 19:44:14 +02:00
barredterra
831dfc8f6d perf: create Pricing Rule from Customer and Supplier 2025-08-22 19:44:14 +02:00
mergify[bot]
7435b28092 fix(Supplier): add make_method for Pricing Rule (backport #49282) (#49284)
Co-authored-by: Raffael Meyer <14891507+barredterra@users.noreply.github.com>
2025-08-22 19:38:12 +02:00
Raffael Meyer
34584cd8f8 refactor!: remove whitelisted method make_bank_account (#49001) 2025-08-22 16:15:19 +00:00
MochaMind
677a5e829e fix: sync translations from crowdin (#49238) 2025-08-22 12:04:33 +02:00
Raffael Meyer
d1f8105abf ci: make coderabbit less chatty (#49203)
* ci: make coderabbit less chatty

* ci: disable high level summary

* ci: disable reviews on style PRs

* ci: fake tests on ignored paths

---------

Co-authored-by: mergify[bot] <37929162+mergify[bot]@users.noreply.github.com>
Co-authored-by: Ankush Menat <ankush@frappe.io>
2025-08-22 03:37:31 +00:00
Raffael Meyer
c54ccc56c7 feat: add make methods for Bank Account (#49000)
* perf(make_bank_account): remove useless roundtrip to server

* feat: add make methods for Bank Account

Auto-fill Party Type and Party when creating a Bank Account from Customer, Supplier or Employee.
2025-08-22 01:09:47 +02:00
Mihir Kandoi
e909fd352a Merge pull request #49050 from mihir-kandoi/48873
fix: ensure variant conversion factor is returned before the template's
2025-08-22 00:23:52 +05:30
rohitwaghchaure
916ed3d6aa Merge pull request #49269 from rohitwaghchaure/fixed-github-49237
fix: Serial Nos popup only appears 1 time
2025-08-21 23:28:10 +05:30
Rohit Waghchaure
5503d4b05b fix: Serial Nos popup only appears 1 time 2025-08-21 23:24:35 +05:30
Hussain Nagaria
a5f200636a feat: show title in link field for Project DocType (#49265) 2025-08-21 12:47:06 +00:00
KerollesFathy
673bb99573 Merge branch 'develop' into prevent-negative-repair-cost 2025-08-20 22:58:19 +00:00
rohitwaghchaure
d64cd86f52 Merge pull request #49255 from rohitwaghchaure/fixed-github-49034
fix: sub-operation not working
2025-08-20 22:55:24 +05:30
rohitwaghchaure
3ddd5bb65a Merge pull request #49243 from aerele/transaction-cumulative
fix: hide is_cumulative for apply_on is set to Transaction
2025-08-20 22:54:32 +05:30
Rohit Waghchaure
876598f714 fix: sub-operation not working 2025-08-20 22:19:03 +05:30
anwarpatelnoori
ed550bb633 fix: show create purchase receipt button only when update stock is not checked 2025-08-20 14:18:35 +00:00
l0gesh29
6b4004b127 feat(payment-reconciliation): add posting date field for debit/credit note auto jv creation 2025-08-20 19:25:38 +05:30
Mihir Kandoi
96feae60da Merge pull request #49250 from mihir-kandoi/fix-child-item-picker-pr-pi
fix: child item picker picking all items when creating PI from PR
2025-08-20 17:48:04 +05:30
rohitwaghchaure
fb1bf29136 Merge pull request #49249 from rohitwaghchaure/fixed-stock-reservation
fix: stock reservation
2025-08-20 17:21:51 +05:30
Mihir Kandoi
738c1e0d0a fix: child item picker picking all items when creating PI from PR 2025-08-20 17:20:03 +05:30
Rohit Waghchaure
19b64d4b0f fix: stock reservation 2025-08-20 16:58:13 +05:30
Kavin
67e57018bc Merge pull request #49183 from aerele/fix/mr-status-from-wo
Fix/mr status from wo
2025-08-20 15:12:18 +05:30
El-Shafei H.
fac8013dba fix: convert NaN to numerical 2025-08-20 10:15:27 +03:00
Diptanil Saha
3c6b2a7c03 Merge pull request #49235 from barredterra/prty
style: format controllers with prettier
2025-08-20 12:03:38 +05:30
Navin-S-R
699d42b26c fix: hide is_cumulative for apply_on is set to Transaction 2025-08-20 11:56:13 +05:30
barredterra
1cdf32d807 style: format controllers with prettier 2025-08-19 15:43:35 +02:00
barredterra
a0f23339cc ci: update pre-commit config 2025-08-19 15:43:24 +02:00
Raffael Meyer
77478303fe fix: set missing due date in Purchase Invoice and POS Invoice (#49232) 2025-08-19 14:29:59 +02:00
rohitwaghchaure
3f354b78dc Merge pull request #49228 from rohitwaghchaure/fixed-set-default-company
fix: company issue in setup wizard
2025-08-19 16:21:22 +05:30
rohitwaghchaure
c7a2a26f50 Merge pull request #49223 from aerele/fix/putaway-rule-in-se
fix(stock): don't override t_warehouse if no rules found
2025-08-19 16:08:01 +05:30
Rohit Waghchaure
1fb0d1460a fix: company issue in setup wizard 2025-08-19 16:02:54 +05:30
rohitwaghchaure
acab260762 Merge pull request #49213 from rohitwaghchaure/feat-workstation-operating-component
refactor: workstation operating component
2025-08-19 14:26:21 +05:30
ruthra kumar
a7ec036d95 Merge pull request #49121 from rehanrehman389/je-reversal-duplicate
fix: prevent duplicate reverse Journal Entry
2025-08-19 14:10:07 +05:30
ruthra kumar
bb2236ba85 Merge pull request #49102 from aerele/duplicate-quotation-currency
fix(quotation): update currency on duplicate
2025-08-19 14:04:04 +05:30
Kavin
66f217c8e6 fix(stock): don't override t_warehouse if no rules found 2025-08-19 13:46:41 +05:30
Rohit Waghchaure
7cd0db219a refactor: workstation operating component 2025-08-19 13:29:32 +05:30
Logesh Periyasamy
d656e02441 Merge pull request #49185 from aerele/mop-sales-register
fix: handle mode of payment filter
2025-08-19 12:02:31 +05:30
ruthra kumar
67d3ad47d7 Merge pull request #49055 from aerele/accounting-dimension-filer-fieldname
fix: fetch fieldname in accounting dimension filter
2025-08-19 10:48:09 +05:30
ruthra kumar
4ec2e16b98 Merge pull request #49192 from diptanilsaha/sql_qb
fix: improve queries with query builder and input sanitization
2025-08-19 10:30:13 +05:30
rohitwaghchaure
645abe0c77 Merge pull request #49216 from aerele/pick-list-update-warehouse-property
fix(pick list): update warehouse property on refresh
2025-08-19 10:27:37 +05:30
ruthra kumar
e623b262ab Merge pull request #49214 from frappe/l10n_develop
fix: sync translations from crowdin
2025-08-19 10:11:55 +05:30
ravibharathi656
5472ff4ac3 fix(pick list): update warehouse property on refresh 2025-08-19 08:29:48 +05:30
Khushi Rawat
f377c94b64 Merge pull request #49141 from khushi8112/consider-asset-value-adjustments-in-report
refactor: consider asset value adjustments in report
2025-08-19 02:57:23 +05:30
MochaMind
6b7ceb92fa fix: Persian translations 2025-08-19 00:24:00 +05:30
MochaMind
9a15f4fc8d fix: Italian translations 2025-08-19 00:23:28 +05:30
Diptanil Saha
fc9fa2a7f8 Merge pull request #49211 from diptanilsaha/paid_amount_gt_mop
fix: prevent auto-setting payment amount if set_grand_total_to_default_mop is disabled
2025-08-18 17:32:59 +05:30
diptanilsaha
b617b5aa20 fix: prevent auto-setting payment amounts if set_grand_total_to_default_mop is disabled 2025-08-18 17:17:35 +05:30
ruthra kumar
15006c27cc Merge pull request #49206 from akhilnarang/update-codeowners
chore(codeowners): set ruthra for pyproject.toml
2025-08-18 16:31:46 +05:30
Sagar Vora
bd3892982f fix: update dunning status based on credit notes (#49066)
Co-authored-by: Sagar Vora <16315650+sagarvora@users.noreply.github.com>
2025-08-18 10:47:15 +00:00
Karm Soni
53520af2fd test: update test data for internal customer and supplier 2025-08-18 15:48:43 +05:30
Diptanil Saha
5ff508de2c Merge pull request #49205 from diptanilsaha/gt_default_mop
fix: apply grand total to default payment mode in Sales and POS invoices
2025-08-18 15:12:18 +05:30
Karm Soni
059c541875 fix: update payment schedule then make gl entries 2025-08-18 14:57:41 +05:30
Sagar Vora
d959ca1694 fix: handle dunning status change on all changes to outstanding amount 2025-08-18 14:57:41 +05:30
Sagar Vora
fe2d0ea43b refactor: commonify and improve perf 2025-08-18 14:57:41 +05:30
Karm Soni
6c644dd5d2 refactor: combine the return conditions 2025-08-18 14:57:41 +05:30
Karm Soni
b304c1d079 feat: add dunning resolution for credit notes and update hooks 2025-08-18 14:57:40 +05:30
Diptanil Saha
8cf672d878 Merge pull request #49169 from aerele/asset-make-journal-entry
fix(asset): prevent translation function shadowing in make_journal_entry
2025-08-18 14:55:39 +05:30
diptanilsaha
9aa7f87a27 fix: apply grand total to default payment mode in Sales and POS invoices 2025-08-18 14:47:43 +05:30
Akhil Narang
692c848154 chore(codeowners): set ruthra for pyproject.toml
Not sure why I was here tbh

Signed-off-by: Akhil Narang <me@akhilnarang.dev>
2025-08-18 13:54:43 +05:30
rohitwaghchaure
4378be45e4 Merge pull request #49182 from aerele/item-searchfield-report
fix: handle all searchfields in items
2025-08-18 09:29:23 +05:30
rohitwaghchaure
dbb8c34486 Merge pull request #49186 from mihir-kandoi/reserve-extra-items-during-sre-transfer
fix: reserve extra items during SRE transfer
2025-08-18 09:26:20 +05:30
MochaMind
0933701f55 fix: sync translations from crowdin (#49202) 2025-08-17 20:43:53 +02:00
Raffael Meyer
5bd45b5a42 fix: ignore links in Dunning patch (#49201) 2025-08-17 20:36:16 +02:00
Raffael Meyer
48ff8175eb ci: disable coderabbit status comment (#49173) 2025-08-17 12:55:26 +02:00
MochaMind
8d4562d071 chore: update POT file (#49198) 2025-08-17 12:54:29 +02:00
rohitwaghchaure
334c17f8ab Merge pull request #49193 from rohitwaghchaure/fixed-support-45657
fix: additional cost not consider in valuation rate for Stock Entry transfer
2025-08-17 10:51:42 +05:30
Rohit Waghchaure
bbc772abe7 fix: additional cost not consider in valuation rate for Stock Entry transfer 2025-08-17 10:34:33 +05:30
diptanilsaha
1231ca17c9 fix: handle empty loyalty point details 2025-08-16 23:48:10 +05:30
diptanilsaha
e563ed0c75 fix: use query builder instead of raw SQL in get_timesheet_detail_rate 2025-08-16 23:08:29 +05:30
diptanilsaha
7f2a52ff71 fix: use query builder instead of raw SQL in get_rfq_containing_supplier 2025-08-16 23:08:12 +05:30
diptanilsaha
7fa4ed6139 fix: use query builder instead of raw SQL in unset_existing_data 2025-08-16 23:07:26 +05:30
diptanilsaha
eb22794f14 fix: sanitize column name for inventory_dimensions in get_stock_balance 2025-08-16 23:07:26 +05:30
diptanilsaha
1db135262d fix: use query builder instead of raw SQL in get_blanket_orders 2025-08-16 23:07:12 +05:30
diptanilsaha
6320f7290f fix: formatted string for disabled filter in get_income_account 2025-08-16 23:07:11 +05:30
diptanilsaha
de919568b4 fix: use query builder instead of raw SQL in get_material_requests_based_on_supplier 2025-08-16 23:06:57 +05:30
diptanilsaha
8696ba2f5d fix: use query builder instead of raw SQL in get_loyalty_details 2025-08-16 23:06:11 +05:30
KerollesFathy
c140596ab3 fix: add non-negative constraint to Repair Cost field 2025-08-16 13:42:45 +00:00
Mihir Kandoi
bba72e9b2f fix: reserve extra items during SRE transfer 2025-08-16 13:09:33 +05:30
ravibharathi656
ad559c3491 fix: handle all searchfields in items 2025-08-15 10:02:54 +05:30
divyalekha99
078b8439d9 fix: wrap inter-company order button labels in __() for translation (#49178)
* Updated purchase_order.js

* Update sales_order.js
2025-08-14 20:28:51 +05:30
Diptanil Saha
0b475aa13e Merge pull request #49108 from LewisMojica/develop
fix(pos): include Product Bundle components in reserved qty to preven…
2025-08-14 18:47:26 +05:30
Diptanil Saha
734880f314 Merge pull request #49163 from diptanilsaha/fix-product-bundle-qty
fix: product bundle child item quantity should be a positive number
2025-08-14 18:46:23 +05:30
barredterra
cff2629131 ci: skip patch and server tests for unrelated config changes 2025-08-14 14:52:15 +02:00
MochaMind
667213e52b fix: sync translations from crowdin (#49152) 2025-08-14 14:32:57 +02:00
barredterra
f0c9b3852f ci: disable coderabbit status comment
Disables this kind of comment: https://github.com/frappe/erpnext/pull/49152#issuecomment-3184835491
2025-08-14 14:30:36 +02:00
l0gesh29
5e82de1b71 fix(asset): prevent translation function shadowing in make_journal_entry 2025-08-14 16:25:53 +05:30
Sagar Vora
29ca1a1f40 chore: remove stale type hint 2025-08-14 13:06:31 +05:30
Sagar Vora
eb5946fa99 Merge pull request #49165 from karm1000/remove-last-scanned-warehouse-from-python 2025-08-14 07:00:45 +00:00
Sagar Vora
2fc39859ad Merge pull request #49164 from karm1000/reorder-last-scanned-warehouse-in-si 2025-08-14 06:39:45 +00:00
Karm Soni
58322c271b refactor: remove last_scanned_warehouse field from python 2025-08-14 12:01:45 +05:30
Karm Soni
319414486a fix: reorder last_scanned_warehouse in sales invoice 2025-08-14 11:51:33 +05:30
diptanilsaha
711076d02d fix: product bundle child item quantity should be a positive number 2025-08-14 11:49:09 +05:30
Soni Karm
227fadc541 feat: enhance barcode scanner to support warehouse scanning (#48865)
Co-authored-by: Sagar Vora <16315650+sagarvora@users.noreply.github.com>
2025-08-14 11:32:02 +05:30
rohitwaghchaure
4cd0db764f Merge pull request #49155 from rohitwaghchaure/fixed-ignore-message-bom-creator
chore: convert message to toast notification
2025-08-14 10:34:37 +05:30
Rohit Waghchaure
fc71001110 chore: convert message to toast notification 2025-08-14 08:50:21 +05:30
Lewis
54d3e5675f chore: improve code clarity per reviewer feedback
- Rename stock_qty variable to reserved_qty for clarity
- Update get_pos_reserved_qty_from_table to return float
- Simplify aggregation logic in get_pos_reserved_qty
- Ensure return values match docstring specifications
2025-08-13 16:25:58 -04:00
rohitwaghchaure
b9fc3db613 Merge pull request #49154 from rohitwaghchaure/fixed-incorrect-stock-reco-current-qty
fix: current qty for batch in stock reco
2025-08-13 23:56:51 +05:30
Rohit Waghchaure
817e719cc2 fix: current qty for batch in stock reco 2025-08-13 23:39:16 +05:30
Khushi Rawat
7ba61be796 Merge pull request #49075 from rehanrehman389/asset-docstatus-check
fix: add validation for draft PR/PI in Asset
2025-08-13 17:17:37 +05:30
Khushi Rawat
4a48b13715 refactor: validate linked purchase docs before field usage 2025-08-13 16:38:30 +05:30
khushi8112
cd2bab7c5f fix: add value adjustment amount in report for group by category filter 2025-08-13 16:19:51 +05:30
khushi8112
f8050f4278 fix: add value adjustment amount in asset value 2025-08-13 16:17:24 +05:30
Mihir Kandoi
3bcf1cbdce Merge pull request #49134 from karm1000/default-val-now-in-subcontracting-receipt
chore: add default value for posting_time field in subcontracting receipt
2025-08-13 14:04:18 +05:30
Mihir Kandoi
0f68dc4505 Merge pull request #49133 from mihir-kandoi/auto-reserve-serial-batch
fix: do not auto reserve serial/batch if SRE already has serial/batch set
2025-08-13 13:45:04 +05:30
Karm Soni
b7470617e0 chore: add default value for posting_time field in subcontracting receipt 2025-08-13 12:55:14 +05:30
Mihir Kandoi
ac9b0409f5 fix: do not auto reserve serial/batch if SRE already has serial/batch set 2025-08-13 12:24:44 +05:30
Lewis
d77d79e011 fix(pos): use packed_items snapshot for bundle reservations
Replaced live Product Bundle queries with `Packed Item` table
lookups to ensure historical reservation accuracy.
Addresses bundle qty underestimation and avoids errors when
bundle definitions change after sale.

Inspired by approach from @diptanilsaha in #49106.
2025-08-12 20:10:39 -04:00
Lewis
f5e5f7b588 fix: remove unclear message related to availability of product bundle 2025-08-12 18:53:09 -04:00
Lewis
a65b200eb7 fix(pos): populate packed_items table in POS Invoice 2025-08-12 18:33:02 -04:00
MochaMind
8290731253 fix: sync translations from crowdin (#49126) 2025-08-13 00:07:51 +02:00
Raffael Meyer
9429c05693 ci: disable Coderabbit on translation PRs (#49128) 2025-08-13 00:06:10 +02:00
Lewis
0fc187adc3 chore: apply pre-commit formatting 2025-08-12 16:36:00 -04:00
Mihir Kandoi
99956649e3 Merge pull request #49120 from mihir-kandoi/fix-auto-reserve-serial-batch
fix: check for auto reserve serial/batch before auto reserving
2025-08-12 22:03:59 +05:30
rohitwaghchaure
e91d886e76 Merge pull request #49123 from rohitwaghchaure/fixed-sub-assembl-in-pp
fix: do not fetch sub-assembly in PP
2025-08-12 22:01:34 +05:30
Mihir Kandoi
514cfe2c29 Merge pull request #49122 from mihir-kandoi/gh49113
feat: select child item when creating one document from another
2025-08-12 21:36:31 +05:30
Mihir Kandoi
a9936ae133 feat: select child item when creating one document from another 2025-08-12 21:05:51 +05:30
Rohit Waghchaure
1e87600119 fix: do not fetch sub-assembly in PP 2025-08-12 20:36:03 +05:30
rehansari26
a9aeb8ac54 fix: prevent duplicate reverse Journal Entry 2025-08-12 17:23:02 +05:30
Mihir Kandoi
2c64b76392 fix: check for auto reserve serial/batch before auto reserving 2025-08-12 16:51:06 +05:30
Sagar Vora
655a241958 Merge pull request #49118 from sagarvora/rm-query-exists 2025-08-12 11:19:39 +00:00
Sagar Vora
6bf63f66ec fix: guard against default not set in stock settings 2025-08-12 16:31:15 +05:30
Sagar Vora
8b75993d3a perf: remove unecessary calls to deepcopy 2025-08-12 16:17:02 +05:30
Sagar Vora
e11cadca58 perf: remove unnecessary branching and use cache in get_item_warehouse 2025-08-12 16:16:24 +05:30
l0gesh29
77021fff74 fix: handle default dimension for all company 2025-08-12 14:28:56 +05:30
l0gesh29
16e440f9a7 fix: handle default accounting dimension 2025-08-12 14:28:56 +05:30
l0gesh29
3cf765d985 fix: add patch 2025-08-12 14:28:18 +05:30
l0gesh29
42f9d27d79 fix: fetch fieldname in accounting dimension filter 2025-08-12 14:27:32 +05:30
l0gesh29
ac2acc535d fix: add fieldname in accounting dimension filter 2025-08-12 14:27:32 +05:30
Diptanil Saha
81c8972a66 Merge pull request #49112 from diptanilsaha/patch_set_invoice_doctype
fix: patch to set invoice_type on POS Settings
2025-08-12 12:49:55 +05:30
diptanilsaha
0941b908dd fix: patch to set invoice type on POS Settings 2025-08-12 12:23:45 +05:30
ruthra kumar
f9f4e4b84c Merge pull request #49104 from frappe/l10n_develop
fix: sync translations from crowdin
2025-08-12 10:53:56 +05:30
ruthra kumar
b8ea6fc708 Merge pull request #48419 from ljain112/experiment-ple
fix: do not create delinked payment ledger entries on cancel
2025-08-12 10:51:20 +05:30
ruthra kumar
0c7dcec5c2 Merge pull request #49086 from aerele/process-statement-of-accounts-auto-email
fix(process statement of accounts): use date instead of formatted date
2025-08-12 10:47:15 +05:30
ruthra kumar
92327729d6 Merge pull request #49096 from aerele/po-dialog
fix: table render issue on pop-up edit
2025-08-12 10:39:51 +05:30
Lewis Mojica
5a5804ca87 chore: remove unused variable 2025-08-11 16:06:08 -04:00
Lewis
984d744ac2 fix(pos): include Product Bundle components in reserved qty to prevent overselling
- Add `get_bundle_pos_reserved_qty` to account for component items in submitted POS Invoices
- Update `get_pos_reserved_qty` to sum direct and bundle reservations
- Remove double subtraction in `get_bundle_availability` to avoid underestimating bundle availability
- Prevents overselling when multiple POS sessions sell bundles with shared components
- Fixes #49021
2025-08-11 15:27:18 -04:00
MochaMind
1e992bb263 fix: Esperanto translations 2025-08-11 22:37:03 +05:30
MochaMind
21e7675a44 fix: Dutch translations 2025-08-11 22:36:58 +05:30
MochaMind
26586a42a4 fix: Serbian (Latin) translations 2025-08-11 22:36:55 +05:30
MochaMind
823413a9c4 fix: Bosnian translations 2025-08-11 22:36:51 +05:30
MochaMind
25240967ba fix: Croatian translations 2025-08-11 22:36:48 +05:30
MochaMind
4ce058fc47 fix: Thai translations 2025-08-11 22:36:44 +05:30
MochaMind
b9a08e7920 fix: Persian translations 2025-08-11 22:36:41 +05:30
MochaMind
68f23c7a70 fix: Indonesian translations 2025-08-11 22:36:37 +05:30
MochaMind
43dbc1efbb fix: Portuguese, Brazilian translations 2025-08-11 22:36:32 +05:30
MochaMind
472c0c2b27 fix: Vietnamese translations 2025-08-11 22:36:29 +05:30
MochaMind
d0e59b580e fix: Chinese Simplified translations 2025-08-11 22:36:25 +05:30
MochaMind
a8b69efa84 fix: Turkish translations 2025-08-11 22:36:22 +05:30
MochaMind
8b27c2b8ee fix: Swedish translations 2025-08-11 22:36:18 +05:30
MochaMind
e346e988ca fix: Serbian (Cyrillic) translations 2025-08-11 22:36:14 +05:30
MochaMind
a271fd2590 fix: Russian translations 2025-08-11 22:36:09 +05:30
MochaMind
7be3eb36d9 fix: Portuguese translations 2025-08-11 22:36:06 +05:30
MochaMind
62269b595a fix: Polish translations 2025-08-11 22:36:02 +05:30
MochaMind
7d03e609a6 fix: Italian translations 2025-08-11 22:35:59 +05:30
MochaMind
91652921a3 fix: Hungarian translations 2025-08-11 22:35:55 +05:30
MochaMind
cde9d3a9ce fix: German translations 2025-08-11 22:35:51 +05:30
MochaMind
c655d1db3a fix: Czech translations 2025-08-11 22:35:48 +05:30
MochaMind
4fa74d29a9 fix: Arabic translations 2025-08-11 22:35:44 +05:30
MochaMind
752253704c fix: Spanish translations 2025-08-11 22:35:41 +05:30
MochaMind
8d35676e5a fix: French translations 2025-08-11 22:35:37 +05:30
rohitwaghchaure
4cc6596d44 Merge pull request #49087 from rohitwaghchaure/sabb-traceability-expiry-date-report
fix: batch expiry date, serial no warranty and AMC expiry date in traceability report
2025-08-11 21:40:38 +05:30
Rohit Waghchaure
16d5caa719 fix: batch expiry date, serial no warranty and amc expiry date in traceability report 2025-08-11 19:42:12 +05:30
ravibharathi656
430a06d056 fix(quotation): update currency on duplicate 2025-08-11 17:59:59 +05:30
ruthra kumar
0c62e1a9ae Merge pull request #48862 from khushi8112/show-party-name-in-reports
feat: show party name in reports
2025-08-11 17:47:09 +05:30
Lakshit Jain
d45cd5af2b Merge pull request #49093 from ljain112/fix-account-coa
fix: allow creation of root accounts in account tree view
2025-08-11 17:07:03 +05:30
ruthra kumar
2713055447 Merge pull request #49092 from ruthra-kumar/opp_type
refactor: use translated value of set default in Opportunity
2025-08-11 16:53:00 +05:30
l0gesh29
3431c6c90e fix: table render issue on pop-up edit 2025-08-11 16:52:29 +05:30
Asmita Hase
f0e7eb44f1 Merge pull request #49088 from AssemBahnasy/fix-party-type-employee-filter-develop 2025-08-11 16:44:28 +05:30
ruthra kumar
2b777caa83 refactor: use translated value of set default in Opportunity 2025-08-11 16:27:10 +05:30
Assem Bahnasy
8a9bf166c6 refactor: Move Employee inclusion to SQL level to preserve search semantics 2025-08-11 12:41:34 +03:00
Assem Bahnasy
a08c7f37d3 refactor: Use parameterized SQL queries to prevent injection and handle None values 2025-08-11 11:55:56 +03:00
ruthra kumar
3302795e50 Merge pull request #48952 from frappe/l10n_develop
fix: sync translations from crowdin
2025-08-11 13:46:41 +05:30
ruthra kumar
e867a42181 Merge pull request #49077 from frappe/pot_develop_2025-08-10
chore: update POT file
2025-08-11 13:38:57 +05:30
ravibharathi656
aa3f50ab77 fix(process statement of accounts): use date instead of formatted date 2025-08-11 12:18:17 +05:30
ruthra kumar
fc5946c139 Merge pull request #48730 from rtdany10/vat_201_export
fix(regional-uae): mark export items as zero rated
2025-08-11 11:35:08 +05:30
Mihir Kandoi
2fd4db0891 Merge pull request #49082 from mihir-kandoi/fix-sre-closed-status-query
fix: modify all remaining SRE queries to consider new Closed status
2025-08-11 10:37:47 +05:30
Vishist16
3ee23d9ee8 fix: handle negative inventory check (#48558) (#48691)
* fix: handle negative inventory check (#48558)

* fix: updated DocField via Desk UI as suggested

* fix: update DocField via Desk UI and fix linting issues
2025-08-11 10:29:27 +05:30
Mihir Kandoi
dbaa44688e fix: modify all remaining SRE queries to consider new Closed status 2025-08-11 10:21:16 +05:30
Mihir Kandoi
fe4f7b9c2f Merge pull request #49068 from KerollesFathy/query-filter-disabled-scraped-items-on-job-card
fix(job-card): Add filter to item_code query for scrap_items to exclude disabled
2025-08-11 10:12:58 +05:30
Mihir Kandoi
7adab6f5ec Merge pull request #49071 from navinrc/add-item-name-to-material-request-dialog
feat: add item_name column to Material Request dialog in Purchase Order
2025-08-11 10:02:27 +05:30
MochaMind
5b4e28fac6 fix: Swedish translations 2025-08-10 22:40:23 +05:30
MochaMind
12c91af5bc fix: Italian translations 2025-08-10 22:40:20 +05:30
frappe-pr-bot
d1f24ca4a5 chore: update POT file 2025-08-10 09:37:20 +00:00
Rehan Ansari
4cf481cca8 fix: add validation for draft PR/PI in Asset 2025-08-10 00:40:52 +05:30
MochaMind
dd910d7c1a fix: Serbian (Latin) translations 2025-08-09 22:23:46 +05:30
MochaMind
1770fe6590 fix: Swedish translations 2025-08-09 22:23:43 +05:30
MochaMind
a72a1ca517 fix: Serbian (Cyrillic) translations 2025-08-09 22:23:39 +05:30
MochaMind
9d2e5391cc fix: Italian translations 2025-08-09 22:23:33 +05:30
navinrc
4312719010 feat: add item_name column to Material Request dialog in Purchase Order 2025-08-09 01:06:51 +05:30
MochaMind
9540ffeec0 fix: Italian translations 2025-08-08 22:14:35 +05:30
KerollesFathy
89c2bbed7c fix: Add filter to item_code query for scrap_items to exclude disabled items 2025-08-08 14:45:25 +00:00
rohitwaghchaure
a7e70b1094 Merge pull request #49067 from rohitwaghchaure/fixed-github-49064
fix: restrict fixed asset items in the BOM
2025-08-08 19:29:45 +05:30
Rohit Waghchaure
760c373eb2 fix: restrict fixed asset items in the BOM 2025-08-08 19:00:32 +05:30
rohitwaghchaure
89aab0af18 Merge pull request #49060 from mihir-kandoi/modify-all-queries-for-closed-status-sre
fix: modify all SRE queries to consider new Closed status
2025-08-08 16:12:22 +05:30
Mihir Kandoi
345ca405b0 fix: modify all SRE queries to consider new Closed status 2025-08-08 15:10:43 +05:30
Asmita Hase
7d06622881 Merge pull request #49053 from asmitahase/employee-party 2025-08-08 13:57:49 +05:30
Asmita Hase
fa5419dede Merge pull request #49051 from asmitahase/patch-again 2025-08-08 12:58:29 +05:30
Asmita Hase
e7a2ff1884 fix: dont validate account type in for employee party type 2025-08-08 12:58:06 +05:30
Asmita Hase
6d908f44a5 chore: trigger create_advance_payment_ledger_records patch 2025-08-08 12:18:36 +05:30
Mihir Kandoi
d61977d002 fix: ensure variant conversion factor is returned before the template's 2025-08-08 11:57:15 +05:30
Dany Robert
29c3ef8280 fix: handle case where taxes is added invoice changed to non-export later 2025-08-08 11:01:59 +05:30
Mihir Kandoi
f9c797a402 Merge pull request #48813 from aerele/filter-expense-head-account
fix(purchase invoice): filter only enabled account
2025-08-08 10:54:10 +05:30
Dany Robert
c8940a39b3 chore: code styling 2025-08-08 10:02:35 +05:30
Dany Robert
38471995e7 fix: show message only if no tax is applied 2025-08-08 09:58:16 +05:30
MochaMind
00b3576134 fix: Italian translations 2025-08-07 21:52:10 +05:30
Asmita Hase
94c45d1db3 Merge pull request #49042 from asmitahase/ignore-validation-flag 2025-08-07 17:58:43 +05:30
rohitwaghchaure
00518069ac Merge pull request #49040 from rohitwaghchaure/fixed-calculation-sabb-traceability
fix: qty calculation in SABB traceability
2025-08-07 17:32:23 +05:30
Asmita Hase
0665d13fd3 fix: added a flag on journal entry to ignore party account type validation if required 2025-08-07 17:31:36 +05:30
Rohit Waghchaure
505814c07a fix: qty calculation in SABB traceability 2025-08-07 16:22:52 +05:30
rohitwaghchaure
c15d7fe86e Merge pull request #49022 from rohitwaghchaure/fixed-valuation-rate-batch-ma
fix: zero valuation rate for the batch
2025-08-07 13:54:13 +05:30
mithili
23308f6d10 chore: add back filter 2025-08-07 11:10:43 +05:30
mithili
7c8dd86a35 fix: add condition to fetch active accounts 2025-08-07 11:10:43 +05:30
mithili
c3111db6e2 fix(purchase invoice): filter only enabled account 2025-08-07 11:10:42 +05:30
Diptanil Saha
09f65713ca Merge pull request #49023 from diptanilsaha/fix_account_reports_presentation_currency
fix: NoneType error on applying presentation_currency filter on financial statements and trial balance report
2025-08-07 02:10:10 +05:30
Rohit Waghchaure
c8410cb5ca fix: zero valuation rate for the batch 2025-08-07 01:47:54 +05:30
diptanilsaha
d7e22de44c fix: nonetype error on applying presentation_currency filter on financial statements and trial balance report 2025-08-07 01:37:33 +05:30
rohitwaghchaure
5918199845 Merge pull request #49020 from rohitwaghchaure/fixed-source-document-batch
fix: source document in batch
2025-08-06 23:18:11 +05:30
Rohit Waghchaure
8b0b938595 fix: source document in batch 2025-08-06 22:22:36 +05:30
rohitwaghchaure
2c35299cbb Merge pull request #49010 from rohitwaghchaure/fixed-support-45862-1
fix: timeout while submitting purchase receipt
2025-08-06 20:04:55 +05:30
Khushi Rawat
07d1663f2c Merge pull request #49011 from khushi8112/fixed-asset-register
fix: fetch revaluated asset value for fixed asset register
2025-08-06 17:13:48 +05:30
khushi8112
a33bcb47b3 chore: format code 2025-08-06 16:48:09 +05:30
khushi8112
67ec4fa477 fix: fetch revaluated asset value for all the assets 2025-08-06 16:47:01 +05:30
Rohit Waghchaure
c433943c46 fix: timeout while submitting purchase receipt 2025-08-06 16:43:26 +05:30
rohitwaghchaure
865956e537 Merge pull request #48950 from rohitwaghchaure/feat-batch-traceability-report
feat: batch traceability report
2025-08-06 15:55:43 +05:30
Rohit Waghchaure
7b05a2a097 feat: serial no and batch traceability report 2025-08-06 15:17:35 +05:30
Dany Robert
eb6c8d8938 chore: linters 2025-08-06 11:40:33 +05:30
Asmita Hase
28cbd18300 Merge pull request #49003 from asmitahase/fix-references-for-advance
refactor: get advance payment doctypes from hooks
2025-08-06 11:22:09 +05:30
Asmita Hase
b4f831a931 chore: removed uncessary comment 2025-08-06 10:42:47 +05:30
Asmita Hase
a273147b6e chore: add account type to employee advance account in standard chart of accounts 2025-08-06 10:36:18 +05:30
Asmita Hase
2cb2e05b19 refactor: get advance payment doctypes from hooks 2025-08-06 10:34:48 +05:30
MochaMind
f2d31e3b77 fix: Persian translations 2025-08-05 21:36:28 +05:30
Logesh Periyasamy
a8d17b7590 Merge pull request #48761 from aerele/exchange-gain-or-loss-on-repost
fix: prevent gain or loss entry cancellation upon reposting
2025-08-05 20:55:44 +05:30
ruthra kumar
c46b3d4b83 Merge pull request #48901 from aerele/cc-allocation-round-off
fix: do not split round off when there is a cost center allocation
2025-08-05 20:16:38 +05:30
ravibharathi656
dd24cce509 test: add test for cost center allocation commercial rounding 2025-08-05 17:58:33 +05:30
ruthra kumar
b0d9c4f563 Merge pull request #48947 from aerele/process-statement-of-accounts
fix(process statement of accounts): make date fields mandatory
2025-08-05 16:35:46 +05:30
Mihir Kandoi
ccc48f909a Merge pull request #48949 from KerollesFathy/add-work-order-on-project-dashboard
feat: add Manufacture section to project dashboard to show linked Work Orders
2025-08-05 16:29:18 +05:30
Mihir Kandoi
60b7e22e93 Merge pull request #48948 from KerollesFathy/prevent-negative-operation-time-and-batch-size
feat: add non-negative constraint to batch size and sub operation time fields
2025-08-05 16:28:45 +05:30
venkat102
f0df41d521 fix: do not split round off when there is a cost center allocation 2025-08-05 16:18:53 +05:30
Mihir Kandoi
9ad7dad86d Merge pull request #48946 from KerollesFathy/prevent-negative-completed-qty-on-job-card
feat: Add non-negative constraint to completed qty fields in job card and time log
2025-08-05 16:16:44 +05:30
KerollesFathy
ece7165022 Merge branch 'develop' into add-work-order-on-project-dashboard 2025-08-05 10:42:06 +00:00
KerollesFathy
e4db7f8d0a Merge branch 'develop' into prevent-negative-operation-time-and-batch-size 2025-08-05 10:41:29 +00:00
Diptanil Saha
9a61d2d531 Merge pull request #48988 from diptanilsaha/pos_set_grand_total_to_default_mop
refactor(pos): set/reset grand total to default mode of payment
2025-08-05 16:02:22 +05:30
diptanilsaha
265f7ce092 refactor(pos): set/reset grand total to default mode of payment 2025-08-05 15:59:46 +05:30
KerollesFathy
db8d368717 Merge branch 'develop' into prevent-negative-completed-qty-on-job-card 2025-08-05 10:17:23 +00:00
ruthra kumar
30c59bddf9 Merge pull request #48798 from aerele/gl-report-show-amount-in-company-currency
feat: add show_amount_in_company_currency in gl report
2025-08-05 15:21:52 +05:30
ruthra kumar
bc26c87a63 Merge pull request #48909 from aerele/tax-withholding-details-report
fix(tax withholding details): avoid voucher duplication
2025-08-05 15:15:04 +05:30
Khushi Rawat
338ee746ec Merge pull request #48968 from khushi8112/validate-asset-before-submitting-depreciation-schedule
fix: validate asset before submitting depreciation schedule
2025-08-05 15:01:41 +05:30
Khushi Rawat
3bda9c54ae Merge pull request #48974 from khushi8112/invalid-field-query-error
fix: use maintenance_status filter for indicators
2025-08-05 15:00:30 +05:30
Mihir Kandoi
8b6f328665 Merge pull request #48969 from frappe/mergify/bp/develop/pr-48767
Fix: Procurement Tracker - No permission to read Employee #48765 (backport #48767)
2025-08-05 14:43:16 +05:30
khushi8112
1b674a1051 fix: use maintenance_status filter for indicators 2025-08-05 14:39:26 +05:30
ruthra kumar
8a10e327ff Merge pull request #48848 from ernestoruiz89/patch-2
chore: add translation function to Update budget.py
2025-08-05 14:38:07 +05:30
ruthra kumar
2c80b2baa7 Merge pull request #48774 from aerele/batch-wise-bank-reconciliation
perf: process auto bank reconciliation in batches
2025-08-05 14:37:46 +05:30
khushi8112
d6fb99916e chore: fetch docstatus to validate 2025-08-05 14:34:39 +05:30
ruthra kumar
9502b163e1 Merge pull request #48853 from flaviacastro/fix/pricing-rule-help-content
fix: pricing rule help content
2025-08-05 14:32:38 +05:30
ruthra kumar
269020984b Merge pull request #48718 from aerele/subscription-settings-timeout
refactor: process subscriptions in batch wise
2025-08-05 14:26:56 +05:30
Liuyang
e058998689 Fix: Procurement Tracker - No permission to read Employee #48765
(cherry picked from commit 284e45011e)
2025-08-05 08:51:52 +00:00
ruthra kumar
349ad94ff3 Merge pull request #48861 from ljain112/chore-tds-label
chore: correct description for `consider_party_ledger_amount` in Tax Withholding Category
2025-08-05 14:21:16 +05:30
khushi8112
f5a71c6b88 chore: add mistakenly removed test records 2025-08-05 14:19:53 +05:30
khushi8112
d5edca2022 fix: validate if journal entry linked to schedule is in draft 2025-08-05 14:16:05 +05:30
ravibharathi656
283d69c0bd refactor: process subscriptions in batch wise 2025-08-05 14:09:06 +05:30
Mihir Kandoi
cc2a27315a Merge pull request #48693 from cogk/fix-correctly-get-attachments-folder
fix: Use correct Attachments folder in code list import
2025-08-05 14:03:29 +05:30
khushi8112
a4628c2024 fix: submit depreciation schedule only for submitted asset 2025-08-05 14:00:27 +05:30
Khushi Rawat
708ba3b229 Merge pull request #48929 from ernestoruiz89/patch-3
chore: add translation function on remarks in asset depreciation entry
2025-08-05 13:37:54 +05:30
Diptanil Saha
14e17f584a Merge pull request #48964 from diptanilsaha/remove_api_calls_to_set_default_payments
fix: remove api call to set default payments
2025-08-05 13:15:41 +05:30
diptanilsaha
871b8473fa fix: remove api call to set default payments 2025-08-05 12:58:53 +05:30
Khushi Rawat
a60db40fd2 fix: add missing parentheses 2025-08-05 12:50:33 +05:30
Dany Robert
86db6a5b06 Merge branch 'develop' into vat_201_export 2025-08-05 12:22:26 +05:30
ruthra kumar
e556616ad1 Merge pull request #48860 from aerele/build_qb_match_conditions
fix: add doctype fieldname in condition
2025-08-05 12:01:25 +05:30
Mihir Kandoi
88c2be7e68 Merge pull request #48940 from mihir-kandoi/fix-missing-account-gl-entry-subcontracting
fix: failing subcontracting patch
2025-08-05 11:37:36 +05:30
Diptanil Saha
3274285729 fix(bank statement import): return blank template instead of template with 5 records on download template (#48960) 2025-08-05 11:26:25 +05:30
Mihir Kandoi
14b47e81ce fix: failing subcontracting patch 2025-08-05 11:21:36 +05:30
diptanilsaha
7dc2abb516 fix(bank statement import): return blank template instead of template with 5 records on download template 2025-08-05 11:19:48 +05:30
ravibharathi656
23bc180d98 fix(process statement of accounts): make date fields mandatory 2025-08-05 10:54:02 +05:30
Flavia de Castro
aa7727d50a Merge branch 'frappe:develop' into fix/pricing-rule-help-content 2025-08-04 15:43:44 -03:00
Diptanil Saha
0212be2e58 Merge pull request #48945 from diptanilsaha/child_company_coa_currency
fix: set default_currency in accounts during child company creation
2025-08-05 00:05:42 +05:30
Diptanil Saha
cc26d5da14 chore: remove wrongly configured 'pos*' assignment from CODEOWNERS (#48954) 2025-08-04 23:53:34 +05:30
diptanilsaha
de153aeb1d fix: set default_currency in accounts during child company creation 2025-08-04 23:49:01 +05:30
rohitwaghchaure
7f6038208d Merge pull request #48951 from rohitwaghchaure/fixed-test-cases-posting_time
chore: added now as default value for the posting time
2025-08-04 22:51:00 +05:30
Rohit Waghchaure
b3cebd87c8 chore: added now as default value for the posting time 2025-08-04 22:22:55 +05:30
MochaMind
7bd24308d3 fix: Serbian (Latin) translations 2025-08-04 21:19:45 +05:30
MochaMind
cd9651afc1 fix: Persian translations 2025-08-04 21:19:32 +05:30
MochaMind
3aa950c32e fix: Serbian (Cyrillic) translations 2025-08-04 21:19:12 +05:30
KerollesFathy
2729d7521d feat: add 'Manufacture' section to project dashboard and show linked Work Orders 2025-08-04 13:43:42 +00:00
KerollesFathy
f4722d3b24 feat: add non-negative constraint to batch size and sub operation time fields 2025-08-04 13:20:30 +00:00
KerollesFathy
c30665fda7 feat: Add non-negative constraint to completed qty fields in job card and time log 2025-08-04 12:58:49 +00:00
Dany Robert
0c15b65756 fix: avoid property setter for custom field 2025-08-04 15:52:22 +05:30
Dany Robert
d25846f383 fix: simplify export determination logic 2025-08-04 15:45:43 +05:30
Ravibharathi
02380c3eab Merge pull request #48575 from aerele/company-payment-gateway
feat(payment gateway account): add company
2025-08-04 14:23:56 +05:30
ruthra kumar
655aff7c92 Merge pull request #48926 from pps190/fix-report-currency
fix: provide missing `company` in report records that require reference to `Company:company:default_currency`
2025-08-04 10:29:20 +05:30
rohitwaghchaure
1d8f1d66e4 Merge pull request #48933 from frappe/mergify/bp/develop/pr-48914
perf: process_gl_map causing performance issues in the reposting (backport #48914)
2025-08-04 09:56:22 +05:30
ruthra kumar
3395fc1fde Merge pull request #48136 from aerele/enable_dim_submit
fix(accounts):enable allow_on_submit for accounting dimensions in repost settings allowed doctypes
2025-08-04 09:04:27 +05:30
MochaMind
415b751bab fix: sync translations from crowdin (#48911) 2025-08-03 20:46:02 +02:00
rohitwaghchaure
67b95c4abf chore: fix conflicts 2025-08-03 16:21:45 +05:30
MochaMind
5c3c11cda3 chore: update POT file (#48931) 2025-08-03 12:30:10 +02:00
Rohit Waghchaure
af7dc363e1 perf: process_gl_map causing performance issues in the reposting
(cherry picked from commit a96fa55704)

# Conflicts:
#	erpnext/stock/doctype/stock_entry/stock_entry.py
2025-08-03 09:46:15 +00:00
Ernesto Ruiz
803180d5de chore: add translation function on remark in setup_journal_entry_metadata in depreciation.py 2025-08-02 13:43:18 -06:00
Ernesto Ruiz
119904e44f chore: add translation function on remarks in make_journal_entry in asset.py 2025-08-02 13:29:33 -06:00
Diptanil Saha
2c44e4ec2c Merge pull request #48523 from ibrahim317/fix-lead-quick-entry
fix: add undefined check for cur_frm in lead doctype (#48522)
2025-08-03 00:01:57 +05:30
Mihir Kandoi
7358f44cc2 Merge pull request #48748 from devdusija/fix/account-currency-validation
fix: account currency validation to exclude cancelled entries
2025-08-02 22:17:14 +05:30
Devin Slauenwhite
c03f1c25cf fix: payment ledger voucher seperator row currencies 2025-08-02 12:29:40 -04:00
Devin Slauenwhite
97959dbe75 fix: provide company for outstanding record. 2025-08-02 12:23:12 -04:00
Devin Slauenwhite
7f3905185c fix: provide missing company in report records that require reference to Company:company:default_currency 2025-08-02 11:38:47 -04:00
Devin Slauenwhite
316470eee4 Revert "fix: set proper currency format"
This reverts PR https://github.com/frappe/erpnext/pull/42458
This reverts commit 2533808f1e.
2025-08-02 11:15:25 -04:00
Mihir Kandoi
fc56b1e8aa Merge pull request #48915 from aerele/fix/set_use_serial_batch_fields
fix: set use_serial_batch_fields when creating PR from PO
2025-08-02 20:41:39 +05:30
ibrahim
f4e5e0812b refactor: run pre-commit for formatting on lead client script (#48523) 2025-08-02 17:01:41 +03:00
Kavin
a384c96617 fix: set use_serial_batch_fields when creating PR from PO 2025-08-02 14:48:06 +05:30
Mihir Kandoi
9c5ba2b0b3 Merge pull request #48908 from mihir-kandoi/st45545
fix: include Sales Invoice in SABB validation for packed items
2025-08-01 17:18:57 +05:30
ravibharathi656
8837016243 fix(tax withholding details): avoid voucher duplication 2025-08-01 17:02:43 +05:30
Mihir Kandoi
2ce297aff8 fix: include Sales Invoice in SABB validation for packed items 2025-08-01 17:00:38 +05:30
ruthra kumar
4785f0b31d Merge pull request #48905 from ljain112/fix-advance-patch
fix: do not execute patch if no advance doctypes
2025-08-01 15:31:05 +05:30
ljain112
e38dfbfa91 fix: do not execute patch if no advance doctypes 2025-08-01 14:51:25 +05:30
Mihir Kandoi
f916f29e47 Merge pull request #48904 from mihir-kandoi/fix-stock-reco-reservation-error
fix: consider Closed SREs during Stock Reco
2025-08-01 13:26:19 +05:30
Mihir Kandoi
3a9b65ebef fix: consider Closed SREs during Stock Reco 2025-08-01 13:08:23 +05:30
MochaMind
34b0aef5ce fix: sync translations from crowdin (#48867) 2025-07-31 18:05:15 +02:00
Mihir Kandoi
1481bc80e3 Merge pull request #48898 from mihir-kandoi/st45012
fix: remove incorrect references from stock entry dashboard/connections tab
2025-07-31 21:18:53 +05:30
Mihir Kandoi
6d82e3cc28 fix: remove incorrect references from stock entry dashboard/connections tab 2025-07-31 21:01:55 +05:30
Vishist16
3a80e116e8 fix: prevent negative values in BOM fields (#48520, #48662) (#48696)
* fix: prevent negative values in BOM fields (#48520, #48662)

* fix: applied non_negative validation using Desk UI for BOM fields
2025-07-31 20:50:41 +05:30
rohitwaghchaure
6e8589a69a Merge pull request #48893 from rohitwaghchaure/feat-landed-cost-report
feat: landed cost report
2025-07-31 20:35:26 +05:30
Lakshit Jain
e70caedddc fix: multiple fixes for advance payment accounting 2025-07-31 20:17:14 +05:30
Rohit Waghchaure
a0bb8411ef feat: landed cost report 2025-07-31 16:22:02 +05:30
Mihir Kandoi
5a718d681a Merge pull request #48890 from mihir-kandoi/add-date-to-patch
chore: add date so patch can rerun
2025-07-31 16:16:07 +05:30
Mihir Kandoi
ba45f7610d chore: add date so patch can rerun 2025-07-31 15:58:25 +05:30
Mihir Kandoi
892dc1862a Merge pull request #48887 from mihir-kandoi/st45406
fix: failing subcontracting patch
2025-07-31 15:39:54 +05:30
Mihir Kandoi
bb43419944 fix: failing subcontracting patch 2025-07-31 15:23:14 +05:30
rohitwaghchaure
0707c9d732 Merge pull request #48869 from rohitwaghchaure/feat-link-vendor-invoices
feat: link vendor invoices in the LCV
2025-07-31 13:18:31 +05:30
Diptanil Saha
edd41fd693 Merge pull request #48619 from nikkothari22/bank-account-default
fix(accounts): allow default bank account per company
2025-07-31 12:02:51 +05:30
Mihir Kandoi
e2a25ae3c5 Merge pull request #48873 from mihir-kandoi/47305
fix: return conversion factor of variant and not template
2025-07-31 12:02:39 +05:30
Mihir Kandoi
732a9b86c6 fix: return conversion factor of variant and not template 2025-07-31 11:45:20 +05:30
ruthra kumar
d4ad4a2f6e Merge pull request #48684 from cogk/fix-add-title-to-payment-schedule-error-message
fix: Add title to payment schedule error message
2025-07-31 10:28:28 +05:30
Rohit Waghchaure
ee47c5eba9 feat: link vendor invoices in the LCV 2025-07-30 23:18:55 +05:30
khushi8112
70411ec086 fix: show name of the employee in general ledger report 2025-07-30 17:59:06 +05:30
khushi8112
b0c0a86fcf chore: code format 2025-07-30 17:01:44 +05:30
khushi8112
9dee411eb5 feat: add customer name column in gross profit report 2025-07-30 17:00:33 +05:30
khushi8112
3d94a7cf2c feat: add party name in GL entries 2025-07-30 16:58:38 +05:30
khushi8112
5f24061dd4 feat: add party name column in general ledger report 2025-07-30 16:56:12 +05:30
ljain112
f619bca2d6 chore: correct description for consider_party_ledger_amount in Tax Withholding Category 2025-07-30 16:50:49 +05:30
l0gesh29
e2d63e4c32 fix: add doctype fieldname in condition 2025-07-30 16:38:33 +05:30
Diptanil Saha
848d4d3767 Merge pull request #48858 from diptanilsaha/st_45201
fix: server error on opportunity summary by sales stage report
2025-07-30 15:49:08 +05:30
diptanilsaha
830b3ba1e5 fix: server error on opportunity summary by sales stage report 2025-07-30 15:22:56 +05:30
flaviacastro
8c736b5bbd fix: pricing rule help content 2025-07-29 19:25:26 +00:00
Mihir Kandoi
30b3570987 Merge pull request #48851 from mihir-kandoi/develop
Update CODEOWNERS
2025-07-29 22:17:38 +05:30
Mihir Kandoi
b9b3302b69 Update CODEOWNERS 2025-07-29 21:58:14 +05:30
Diptanil Saha
9c14aa08f8 Merge pull request #48839 from frappe/mihirs_fault
fix: change modified timestamp so migrations work
2025-07-29 20:59:24 +05:30
Diptanil Saha
89564bd10b Merge pull request #48844 from aerele/pos-search-fields
fix: set mandatory field for pos search fields
2025-07-29 20:55:04 +05:30
Diptanil Saha
c41adc4b9c Merge pull request #48845 from diptanilsaha/feat_item_selector_list_view
feat: list view on item selector in pos
2025-07-29 20:49:59 +05:30
Ernesto Ruiz
0b08fe2bac fix: add translation function to update budget.py 2025-07-29 09:07:04 -06:00
Ernesto Ruiz
0a34facb81 chore: add translation function to Update budget.py 2025-07-29 09:05:23 -06:00
Ravibharathi
99f7eb38d3 fix: update advance paid amount on unreconcile 2025-07-29 20:35:12 +05:30
ruthra kumar
bb129b7883 Merge pull request #48835 from aerele/user-permission-report
fix: include empty values in user permission
2025-07-29 19:55:14 +05:30
diptanilsaha
140698d676 feat: list view on item selector in pos 2025-07-29 19:23:23 +05:30
rohitwaghchaure
7970819904 Merge pull request #48743 from aerele/pick-list-location-warehouse
fix(pick list): make warehouse editable
2025-07-29 18:24:09 +05:30
mithili
f6212f7b51 fix: set mandatory field for pos search fields 2025-07-29 18:20:50 +05:30
rohitwaghchaure
a7a6ca197c Merge pull request #48841 from rohitwaghchaure/fixed-support-45167
fix: serial no warehouse for backdated stock reco
2025-07-29 18:15:38 +05:30
Rohit Waghchaure
1deedc766c fix: serial no warehouse for backdated stock reco 2025-07-29 17:49:46 +05:30
Ayush Chaudhari
c18d565d3e fix: change modified timestamp so migrations work 2025-07-29 17:13:26 +05:30
ruthra kumar
b8015d1032 Merge pull request #48837 from ruthra-kumar/fix_link_error_on_po_cancellation
fix: unable to cancel PO if unreconciliation is done
2025-07-29 17:03:42 +05:30
ruthra kumar
cf70147c0d fix: ignore is overridden by transaction.js upon clicking cancel
which overrides with 'Serial and Batch Bundle'
2025-07-29 17:00:57 +05:30
ruthra kumar
4c08165b69 Merge pull request #48782 from ljain112/fix-silly
fix: attribute error in payment entry
2025-07-29 16:41:53 +05:30
ljain112
f7ee9ee967 chore: added test case for reconciliation_effect_date 2025-07-29 16:11:46 +05:30
l0gesh29
f13d98fc7c fix: include empty values in user permission 2025-07-29 16:03:10 +05:30
Khushi Rawat
ac47b42c66 Merge pull request #48759 from aerele/revert-39776
revert: do not save when set email campaign status
2025-07-29 14:37:48 +05:30
Diptanil Saha
394b5b5b94 Merge pull request #48769 from aerele/letter-head-company
fix: set letter head from company if exists
2025-07-29 13:51:58 +05:30
ruthra kumar
8ae48f9baa Merge pull request #48593 from aerele/fix/so-disable-address-update
fix(sales-order): disallow address edits after sales order is submitted
2025-07-29 13:38:57 +05:30
Mihir Kandoi
1a1eb00689 Merge pull request #48700 from Vishist16/fix-negative-scrap-qty-jobcard-48545
fix: prevent negative scrap quantity in Job Card (#48545)
2025-07-29 13:26:55 +05:30
Bhavan23
daac7c589b fix(sales-order): disallow address edits after sales order is submitted 2025-07-29 13:23:37 +05:30
Logesh Periyasamy
88b9f8d68c feat: show opening/closing balance in cash flow report (#47877)
* feat: add checkbox to carryforward opening balance

* fix: ignore period closing voucher

* chore: rename filter check box

* feat: add total for opening and closing balance

* fix: update section name

* fix: remove section rename

---------

Co-authored-by: venkat102 <venkatesharunachalam659@gmail.com>
2025-07-29 13:05:29 +05:30
Mihir Kandoi
c86e75c091 Merge pull request #48557 from KerollesFathy/ft/cost-non-negative-on-ws
feat: Add non-negative constraint to workstation cost fields
2025-07-29 13:03:33 +05:30
ruthra kumar
444225f0ec Merge pull request #48757 from aerele/update-subscription-details
fix: add patch for update subscription details
2025-07-29 12:06:43 +05:30
Mihir Kandoi
3d5b46bdfc Merge pull request #48820 from mihir-kandoi/st44923
fix: over billed purchase receipt status
2025-07-29 11:31:21 +05:30
Mihir Kandoi
15e354f76e fix: over billed purchase receipt status 2025-07-29 11:15:14 +05:30
MochaMind
b1037eaade fix: sync translations from crowdin (#48817) 2025-07-28 16:56:08 +02:00
Diptanil Saha
a20d0d8f60 Merge pull request #48778 from aerele/payment-term-template-sales-invoice
fix: fetch payment term template from order
2025-07-28 20:24:35 +05:30
ruthra kumar
bf99f8095d Merge pull request #48797 from aerele/auto-repeat-field-no-copy
fix: avoid auto_repeat on duplicate
2025-07-28 17:58:12 +05:30
Diptanil Saha
7464fdb8e8 Merge pull request #48794 from diptanilsaha/internal_trans_valuation_rate
fix: fetch item valuation rate for internal transactions when server side reactivity is disabled
2025-07-28 17:45:29 +05:30
ruthra kumar
ea5761ee9c Merge pull request #48800 from frappe/mergify/bp/develop/pr-48041
fix: Misclassification of Journal Voucher Entries in Customer Ledger Summary (backport #48041)
2025-07-28 17:39:26 +05:30
ruthra kumar
c29fb45e10 Merge pull request #48796 from aerele/item-wise-sales-purchase-register-user-permission
fix: remove alias for order by field
2025-07-28 17:39:02 +05:30
diptanilsaha
9c4aac03df fix: fetch item valuation rate for internal transactions 2025-07-28 17:33:28 +05:30
ruthra kumar
f12b1bbf5d Merge pull request #48480 from aerele/currency-sales-partner-commision-report
Currency sales partner commision report
2025-07-28 17:11:24 +05:30
Mihir Kandoi
da498b0558 Merge pull request #48804 from mihir-kandoi/st44619
fix: sql error in quality inspection
2025-07-28 16:53:21 +05:30
Mihir Kandoi
062b245e3f fix: sql error in quality inspection 2025-07-28 16:37:29 +05:30
rohitwaghchaure
2b2c7bdf09 Merge pull request #48787 from rohitwaghchaure/fixed-pervent-concurrent-issue
fix: concurrency issues
2025-07-28 16:27:56 +05:30
rohitwaghchaure
d0504546ec Merge pull request #48801 from rohitwaghchaure/fixed-support-44546
fix: incorrect GL entries
2025-07-28 16:27:32 +05:30
Mihir Kandoi
da68fa0980 Merge pull request #48676 from mihir-kandoi/fix-no-account-in-gl-entry
fix: missing account in GL entries (subcontracting)
2025-07-28 16:20:45 +05:30
ruthra kumar
8d96acfc98 Merge pull request #48413 from ljain112/fix-ple
perf: multiple fixes related to ple and gle
2025-07-28 16:11:31 +05:30
ruthra kumar
96c59e0435 refactor(test): fix test data; no double counting 2025-07-28 15:49:18 +05:30
Mihir Kandoi
2ec69545ea Merge pull request #48793 from mihir-kandoi/st44120
fix: status in MR (material transfer) when using transit stock entries
2025-07-28 15:32:26 +05:30
Mihir Kandoi
baa612bc72 fix: status in MR (material transfer) when using transit stock entries 2025-07-28 15:16:50 +05:30
ruthra kumar
56085fe6a9 chore: resolve conflict 2025-07-28 15:00:09 +05:30
Rohit Waghchaure
4c273fcc99 fix: incorrect GL entries 2025-07-28 14:56:17 +05:30
l0gesh29
8fdda31e45 chore: rename variable 2025-07-28 14:52:03 +05:30
Mihir Kandoi
73e34ff9a9 Merge branch 'develop' into fix-no-account-in-gl-entry 2025-07-28 14:50:26 +05:30
Assem Bahnasy
d915c2b404 fix: Misclassification of Journal Voucher Entries in Customer Ledger Summary (#48041)
* fix: miscalculation of Invoiced Amount, Paid Amount, and Credit Amount in Customer Ledger Summary

* style: Apply ruff-format to customer_ledger_summary.py and ignore .venv/

* fix: Ensure .venv/ is ignored in .gitignore

* chore: removing backportrc line

* test: adding test_journal_voucher_against_return_invoice()

* fix: fixed test_journal_voucher_against_return_invoice function

* Revert .gitignore changes

---------

Co-authored-by: ruthra kumar <ruthra@erpnext.com>
(cherry picked from commit 01fcd98c84)

# Conflicts:
#	erpnext/accounts/report/customer_ledger_summary/test_customer_ledger_summary.py
2025-07-28 09:07:05 +00:00
l0gesh29
468e5e9b2e feat: add show_amount_in_company_currency in gl report 2025-07-28 13:54:02 +05:30
l0gesh29
048b87328b fix: remove alias for order by field 2025-07-28 12:57:06 +05:30
mithili
2c54f49cbc fix: avoid auto_repeat on duplicate 2025-07-28 12:30:14 +05:30
Diptanil Saha
fccfcd6b0e Merge pull request #48675 from aerele/item-price-internal-transaction
feat(internal-transaction): fetch valuation rate for internal transaction
2025-07-28 11:48:30 +05:30
Dany Robert
1170e4fb2c fix(regional-uae): restrict zero rated export to invoice 2025-07-28 05:32:04 +00:00
ruthra kumar
20c2af9cd4 Merge pull request #48788 from frappe/l10n_develop
fix: sync translations from crowdin
2025-07-28 10:36:46 +05:30
MochaMind
1d991af821 fix: Persian translations 2025-07-27 18:54:32 +05:30
Rohit Waghchaure
a186b1266d fix: prevent concurrency issues 2025-07-27 18:46:43 +05:30
ljain112
dc841fe661 fix: attribute error in payment entry 2025-07-26 12:56:10 +05:30
ravibharathi656
5ed34d6ff9 fix: fetch payment term template from order 2025-07-25 13:30:05 +05:30
mithili
9638151f9d refactor: remove join in sql 2025-07-24 18:41:44 +05:30
mithili
998617879c chore: update query to fetch company currency 2025-07-24 18:41:44 +05:30
mithili
984947f333 fix: get default company currency 2025-07-24 18:41:44 +05:30
mithili
2de2ea9f58 fix: set company as mandatory 2025-07-24 18:41:43 +05:30
ravibharathi656
657de2cc7e perf: process auto bank reconciliation in batches 2025-07-24 17:04:03 +05:30
ravibharathi656
d163da171f fix: set letter head from company if exists 2025-07-24 14:55:21 +05:30
ravibharathi656
d3253d7d06 revert: do not save when set email campaign status 2025-07-23 16:16:46 +05:30
l0gesh29
c7b1379a7f fix: update subscription details patch 2025-07-23 15:46:08 +05:30
ravibharathi656
f5beda48dc fix(pick list): make warehouse editable 2025-07-23 08:34:52 +05:30
Dev Dusija
c9c45fe89f fix: account currency validation to exclude cancelled entries 2025-07-22 23:56:48 +05:30
Dany Robert
dc72e6cf36 fix(regional-uae): split export determination 2025-07-21 14:47:14 +00:00
Dany Robert
b8224693c4 fix(regional-uae): mark export items as zero rated 2025-07-21 14:22:05 +00:00
Vishist Singh Solanki
94ec76545c fix: prevent negative scrap quantity in Job Card (#48545) 2025-07-18 16:07:14 +00:00
Corentin Forler
bc2cb1737a fix: Use correct Attachments folder in code list import 2025-07-18 16:17:42 +02:00
Corentin Forler
205037fd6b fix: Add title to payment schedule error message 2025-07-18 14:07:11 +02:00
Mihir Kandoi
1ff47f0780 Merge branch 'develop' into fix-no-account-in-gl-entry 2025-07-18 16:28:16 +05:30
Mihir Kandoi
cb02391f37 fix: recreate GL entry instead of repost 2025-07-18 16:26:57 +05:30
Mihir Kandoi
b53723acad fix: include cost center in patch 2025-07-18 15:33:31 +05:30
Mihir Kandoi
c022b80e05 fix: missing account in GL entries (subcontracting) 2025-07-18 15:13:59 +05:30
l0gesh29
a88c62a307 feat: fetch valuation rate for internal transaction 2025-07-18 14:08:36 +05:30
l0gesh29
98724dff32 feat: add fetch_valuation_rate_for_internal_transaction in accounts settings 2025-07-18 14:07:25 +05:30
Nikhil Kothari
982550b92c fix(accounts): allow default bank account per company 2025-07-15 21:32:07 -05:00
KerollesFathy
92a12d7fea fix: Add non-negative constraint to job capacity field in workstation 2025-07-13 13:03:01 +00:00
KerollesFathy
a2bb557570 feat: Add non-negative constraint to workstation cost fields 2025-07-13 12:44:09 +00:00
Ibrahim
d8371c41cf fix: add undefined check for cur_frm in lead doctype (#48522) 2025-07-10 23:24:08 +03:00
ljain112
901a89ebcd fix: do not create delinked payment ledger entries on cancel 2025-07-06 17:15:12 +05:30
ljain112
df0994c0d3 fix: query voucher outstanding only when all the conditions are true. 2025-07-06 14:09:05 +05:30
ljain112
fc622631c0 fix: do not query outstanding for Journal Entry 2025-07-06 13:59:07 +05:30
ljain112
46a6290ce9 perf: use cached value for account validations in gl and ple 2025-07-06 13:14:40 +05:30
ravibharathi656
1e37fd8991 fix: include child doctypes in allow_on_submit patch for accounting dimensions 2025-06-19 18:47:13 +05:30
ravibharathi656
55e79c4dfd fix: enable allow_on_submit for accounting dimensions in allowed doctypes 2025-06-19 18:46:34 +05:30
ravibharathi656
fbd8fd7d22 fix: include child doctypes in repostable accounting types 2025-06-19 18:45:34 +05:30
516 changed files with 379825 additions and 76216 deletions

12
.coderabbit.yml Normal file
View File

@@ -0,0 +1,12 @@
reviews:
auto_review:
ignore_title_keywords:
- "sync translations"
- "update POT file"
- "style: "
review_status: false
poem: false
collapse_walkthrough: true
sequence_diagrams: false
changed_files_summary: false
high_level_summary: false

View File

@@ -8,6 +8,9 @@ on:
- '**.md'
- '**.html'
- '**.csv'
- 'crowdin.yml'
- '.coderabbit.yml'
- '.mergify.yml'
workflow_dispatch:
permissions:
@@ -82,7 +85,7 @@ jobs:
- name: Get yarn cache directory path
id: yarn-cache-dir-path
run: echo "::set-output name=dir::$(yarn cache dir)"
run: echo "dir=$(yarn cache dir)" >> $GITHUB_OUTPUT
- uses: actions/cache@v4
id: yarn-cache

View File

@@ -10,6 +10,9 @@ on:
- "**.md"
- "**.html"
- "**.csv"
- 'crowdin.yml'
- '.coderabbit.yml'
- '.mergify.yml'
permissions:
contents: read

View File

@@ -111,7 +111,7 @@ jobs:
- name: Get yarn cache directory path
id: yarn-cache-dir-path
run: echo "::set-output name=dir::$(yarn cache dir)"
run: echo "dir=$(yarn cache dir)" >> $GITHUB_OUTPUT
- uses: actions/cache@v4
id: yarn-cache

View File

@@ -9,6 +9,9 @@ on:
- "**.css"
- "**.md"
- "**.html"
- 'crowdin.yml'
- '.coderabbit.yml'
- '.mergify.yml'
permissions:
contents: read

View File

@@ -9,6 +9,9 @@ on:
- '**.css'
- '**.md'
- '**.html'
- 'crowdin.yml'
- '.coderabbit.yml'
- '.mergify.yml'
schedule:
# Run everday at midnight UTC / 5:30 IST
- cron: "0 0 * * *"
@@ -106,7 +109,7 @@ jobs:
- name: Get yarn cache directory path
id: yarn-cache-dir-path
run: echo "::set-output name=dir::$(yarn cache dir)"
run: echo "dir=$(yarn cache dir)" >> $GITHUB_OUTPUT
- uses: actions/cache@v4
id: yarn-cache

View File

@@ -6,6 +6,9 @@ on:
- '**.js'
- '**.md'
- '**.html'
- 'crowdin.yml'
- '.coderabbit.yml'
- '.mergify.yml'
types: [opened, labelled, synchronize, reopened]
concurrency:
@@ -91,7 +94,7 @@ jobs:
- name: Get yarn cache directory path
id: yarn-cache-dir-path
run: echo "::set-output name=dir::$(yarn cache dir)"
run: echo "dir=$(yarn cache dir)" >> $GITHUB_OUTPUT
- uses: actions/cache@v4
id: yarn-cache

View File

@@ -32,8 +32,6 @@ repos:
cypress/.*|
.*node_modules.*|
.*boilerplate.*|
erpnext/public/js/controllers/.*|
erpnext/templates/pages/order.js|
erpnext/templates/includes/.*
)$

View File

@@ -8,17 +8,16 @@ erpnext/assets/ @khushi8112
erpnext/regional @ruthra-kumar
erpnext/selling @ruthra-kumar
erpnext/support/ @ruthra-kumar
pos*
erpnext/buying/ @rohitwaghchaure
erpnext/buying/ @rohitwaghchaure @mihir-kandoi
erpnext/maintenance/ @rohitwaghchaure
erpnext/manufacturing/ @rohitwaghchaure
erpnext/manufacturing/ @rohitwaghchaure @mihir-kandoi
erpnext/quality_management/ @rohitwaghchaure
erpnext/stock/ @rohitwaghchaure
erpnext/subcontracting @rohitwaghchaure
erpnext/stock/ @rohitwaghchaure @mihir-kandoi
erpnext/subcontracting @mihir-kandoi
erpnext/controllers/ @ruthra-kumar @rohitwaghchaure
erpnext/controllers/ @ruthra-kumar @rohitwaghchaure @mihir-kandoi
erpnext/patches/ @ruthra-kumar
.github/ @ruthra-kumar
pyproject.toml @akhilnarang
pyproject.toml @ruthra-kumar

View File

@@ -10,8 +10,10 @@ from frappe.contacts.doctype.address.address import (
class ERPNextAddress(Address):
def validate(self):
self.validate_reference()
self.update_compnay_address()
super().validate()
self.update_company_address()
if hasattr(super(), "validate"):
super().validate()
def link_address(self):
"""Link address based on owner"""
@@ -20,7 +22,7 @@ class ERPNextAddress(Address):
return super().link_address()
def update_compnay_address(self):
def update_company_address(self):
for link in self.get("links"):
if link.link_doctype == "Company":
self.is_your_company_address = 1
@@ -38,6 +40,10 @@ class ERPNextAddress(Address):
"""
After Address is updated, update the related 'Primary Address' on Customer.
"""
if hasattr(super(), "on_update"):
super().on_update()
address_display = get_address_display(self.as_dict())
filters = {"customer_primary_address": self.name}
customers = frappe.db.get_all("Customer", filters=filters, as_list=True)

View File

@@ -46,7 +46,8 @@ def validate_service_stop_date(doc):
if (
old_stop_dates
and old_stop_dates.get(item.name)
and item.service_stop_date != old_stop_dates.get(item.name)
and item.service_stop_date
and getdate(item.service_stop_date) != getdate(old_stop_dates.get(item.name))
):
frappe.throw(_("Cannot change Service Stop Date for item in row {0}").format(item.idx))

View File

@@ -167,7 +167,7 @@ class Account(NestedSet):
if par.root_type:
self.root_type = par.root_type
if self.is_group:
if cint(self.is_group):
db_value = self.get_doc_before_save()
if db_value:
if self.report_type != db_value.report_type:
@@ -210,7 +210,7 @@ class Account(NestedSet):
if doc_before_save and not doc_before_save.parent_account:
throw(_("Root cannot be edited."), RootNotEditable)
if not self.parent_account and not self.is_group:
if not self.parent_account and not cint(self.is_group):
throw(_("The root account {0} must be a group").format(frappe.bold(self.name)))
def validate_root_company_and_sync_account_to_children(self):
@@ -259,7 +259,7 @@ class Account(NestedSet):
if self.check_gle_exists():
throw(_("Account with existing transaction cannot be converted to ledger"))
elif self.is_group:
elif cint(self.is_group):
if self.account_type and not self.flags.exclude_account_type_check:
throw(_("Cannot covert to Group because Account Type is selected."))
elif self.check_if_child_exists():
@@ -302,7 +302,9 @@ class Account(NestedSet):
self.account_currency = frappe.get_cached_value("Company", self.company, "default_currency")
self.currency_explicitly_specified = False
gl_currency = frappe.db.get_value("GL Entry", {"account": self.name}, "account_currency")
gl_currency = frappe.db.get_value(
"GL Entry", {"account": self.name, "is_cancelled": 0}, "account_currency"
)
if gl_currency and self.account_currency != gl_currency:
if frappe.db.get_value("GL Entry", {"account": self.name}):

View File

@@ -236,10 +236,6 @@ frappe.treeview_settings["Account"] = {
root_company,
]);
} else {
const node = treeview.tree.get_selected_node();
if (node.is_root) {
frappe.throw(__("Cannot create root account."));
}
treeview.new_node();
}
},
@@ -258,8 +254,7 @@ frappe.treeview_settings["Account"] = {
].treeview.page.fields_dict.root_company.get_value() ||
frappe.flags.ignore_root_company_validation) &&
node.expandable &&
!node.hide_add &&
!node.is_root
!node.hide_add
);
},
click: function () {

View File

@@ -18,6 +18,7 @@ def create_charts(
accounts = []
def _import_accounts(children, parent, root_type, root_account=False):
nonlocal custom_chart
for account_name, child in children.items():
if root_account:
root_type = child.get("root_type")
@@ -55,7 +56,8 @@ def create_charts(
"account_number": account_number,
"account_type": child.get("account_type"),
"account_currency": child.get("account_currency")
or frappe.get_cached_value("Company", company, "default_currency"),
if custom_chart
else frappe.get_cached_value("Company", company, "default_currency"),
"tax_rate": child.get("tax_rate"),
}
)

View File

@@ -13,7 +13,7 @@ def get():
_("Bank Accounts"): {"account_type": "Bank", "is_group": 1},
_("Cash In Hand"): {_("Cash"): {"account_type": "Cash"}, "account_type": "Cash"},
_("Loans and Advances (Assets)"): {
_("Employee Advances"): {},
_("Employee Advances"): {"account_type": "Payable"},
},
_("Securities and Deposits"): {_("Earnest Money"): {}},
_("Stock Assets"): {

View File

@@ -20,7 +20,7 @@ def get():
"account_number": "1100",
},
_("Loans and Advances (Assets)"): {
_("Employee Advances"): {"account_number": "1610"},
_("Employee Advances"): {"account_number": "1610", "account_type": "Payable"},
"account_number": "1600",
},
_("Securities and Deposits"): {

View File

@@ -11,6 +11,9 @@
"cost_center",
"debit",
"credit",
"reporting_currency_exchange_rate",
"debit_in_reporting_currency",
"credit_in_reporting_currency",
"account_currency",
"debit_in_account_currency",
"credit_in_account_currency",
@@ -124,12 +127,30 @@
"fieldname": "is_period_closing_voucher_entry",
"fieldtype": "Check",
"label": "Is Period Closing Voucher Entry"
},
{
"fieldname": "debit_in_reporting_currency",
"fieldtype": "Currency",
"label": "Debit Amount in Reporting Currency",
"options": "Company:company:reporting_currency"
},
{
"fieldname": "credit_in_reporting_currency",
"fieldtype": "Currency",
"label": "Credit Amount in Reporting Currency",
"options": "Company:company:reporting_currency"
},
{
"fieldname": "reporting_currency_exchange_rate",
"fieldtype": "Float",
"label": "Reporting Currency Exchange Rate",
"precision": "9"
}
],
"icon": "fa fa-list",
"in_create": 1,
"links": [],
"modified": "2024-03-27 13:05:56.710541",
"modified": "2025-08-22 19:13:50.400404",
"modified_by": "Administrator",
"module": "Accounts",
"name": "Account Closing Balance",
@@ -158,7 +179,8 @@
"role": "Auditor"
}
],
"row_format": "Dynamic",
"sort_field": "creation",
"sort_order": "DESC",
"states": []
}
}

View File

@@ -2,12 +2,15 @@
# For license information, please see license.txt
import frappe
from frappe import _
from frappe.model.document import Document
from frappe.utils import cint, cstr
from frappe.utils import cint, cstr, flt
from erpnext.accounts.doctype.accounting_dimension.accounting_dimension import (
get_accounting_dimensions,
)
from erpnext.exceptions import ReportingCurrencyExchangeNotFoundError
from erpnext.setup.utils import get_exchange_rate
class AccountClosingBalance(Document):
@@ -26,12 +29,15 @@ class AccountClosingBalance(Document):
cost_center: DF.Link | None
credit: DF.Currency
credit_in_account_currency: DF.Currency
credit_in_reporting_currency: DF.Currency
debit: DF.Currency
debit_in_account_currency: DF.Currency
debit_in_reporting_currency: DF.Currency
finance_book: DF.Link | None
is_period_closing_voucher_entry: DF.Check
period_closing_voucher: DF.Link | None
project: DF.Link | None
reporting_currency_exchange_rate: DF.Float
# end: auto-generated types
pass
@@ -55,6 +61,7 @@ def make_closing_entries(closing_entries, voucher_name, company, closing_date):
"closing_date": closing_date,
}
)
set_amount_in_reporting_currency(cle, company, closing_date)
cle.flags.ignore_permissions = True
cle.flags.ignore_links = True
cle.submit()
@@ -144,3 +151,29 @@ def get_previous_closing_entries(company, closing_date, accounting_dimensions):
entries = query.run(as_dict=1)
return entries
def set_amount_in_reporting_currency(cle, company, closing_date):
default_currency, reporting_currency = frappe.get_cached_value(
"Company", company, ["default_currency", "reporting_currency"]
)
reporting_currency_exchange_rate = get_exchange_rate(default_currency, reporting_currency, closing_date)
if not reporting_currency_exchange_rate:
frappe.throw(
title=_("Reporting Currency Exchange Not Found"),
msg=_(
"Unable to find exchange rate for {0} to {1} for key date {2}. Please create a Currency Exchange record manually."
).format(default_currency, reporting_currency, closing_date),
exc=ReportingCurrencyExchangeNotFoundError,
)
debit_in_reporting_currency = flt(cle.get("debit", 0) * reporting_currency_exchange_rate)
credit_in_reporting_currency = flt(cle.get("credit", 0) * reporting_currency_exchange_rate)
cle.update(
{
"reporting_currency_exchange_rate": reporting_currency_exchange_rate,
"debit_in_reporting_currency": debit_in_reporting_currency,
"credit_in_reporting_currency": credit_in_reporting_currency,
}
)

View File

@@ -111,17 +111,15 @@ class AccountingDimension(Document):
def make_dimension_in_accounting_doctypes(doc, doclist=None):
if not doclist:
doclist = get_doctypes_with_dimensions()
doc_count = len(get_accounting_dimensions())
count = 0
repostable_doctypes = get_allowed_types_from_settings()
repostable_doctypes = get_allowed_types_from_settings(child_doc=True)
for doctype in doclist:
if (doc_count + 1) % 2 == 0:
insert_after_field = "dimension_col_break"
else:
insert_after_field = "accounting_dimensions_section"
df = {
"fieldname": doc.fieldname,
"label": doc.label,

View File

@@ -7,6 +7,7 @@
"engine": "InnoDB",
"field_order": [
"accounting_dimension",
"fieldname",
"disabled",
"column_break_2",
"company",
@@ -90,11 +91,17 @@
"fieldname": "apply_restriction_on_values",
"fieldtype": "Check",
"label": "Apply restriction on dimension values"
},
{
"fieldname": "fieldname",
"fieldtype": "Data",
"hidden": 1,
"label": "Fieldname"
}
],
"index_web_pages_for_search": 1,
"links": [],
"modified": "2024-03-27 13:05:57.199186",
"modified": "2025-08-08 14:13:22.203011",
"modified_by": "Administrator",
"module": "Accounts",
"name": "Accounting Dimension Filter",
@@ -139,8 +146,9 @@
}
],
"quick_entry": 1,
"row_format": "Dynamic",
"sort_field": "creation",
"sort_order": "DESC",
"states": [],
"track_changes": 1
}
}

View File

@@ -17,17 +17,16 @@ class AccountingDimensionFilter(Document):
from frappe.types import DF
from erpnext.accounts.doctype.allowed_dimension.allowed_dimension import AllowedDimension
from erpnext.accounts.doctype.applicable_on_account.applicable_on_account import (
ApplicableOnAccount,
)
from erpnext.accounts.doctype.applicable_on_account.applicable_on_account import ApplicableOnAccount
accounting_dimension: DF.Literal
accounting_dimension: DF.Literal[None]
accounts: DF.Table[ApplicableOnAccount]
allow_or_restrict: DF.Literal["Allow", "Restrict"]
apply_restriction_on_values: DF.Check
company: DF.Link
dimensions: DF.Table[AllowedDimension]
disabled: DF.Check
fieldname: DF.Data | None
# end: auto-generated types
def before_save(self):
@@ -37,6 +36,10 @@ class AccountingDimensionFilter(Document):
self.set("dimensions", [])
def validate(self):
self.fieldname = frappe.db.get_value(
"Accounting Dimension", {"document_type": self.accounting_dimension}, "fieldname"
) or frappe.scrub(self.accounting_dimension) # scrub to handle default accounting dimension
self.validate_applicable_accounts()
def validate_applicable_accounts(self):
@@ -71,7 +74,7 @@ def get_dimension_filter_map():
"""
SELECT
a.applicable_on_account, d.dimension_value, p.accounting_dimension,
p.allow_or_restrict, a.is_mandatory
p.allow_or_restrict, p.fieldname, a.is_mandatory
FROM
`tabApplicable On Account` a,
`tabAccounting Dimension Filter` p
@@ -86,8 +89,6 @@ def get_dimension_filter_map():
dimension_filter_map = {}
for f in filters:
f.fieldname = scrub(f.accounting_dimension)
build_map(
dimension_filter_map,
f.fieldname,

View File

@@ -11,6 +11,7 @@
"end_date",
"column_break_4",
"company",
"disabled",
"section_break_7",
"closed_documents"
],
@@ -49,6 +50,13 @@
"options": "Company",
"reqd": 1
},
{
"default": "0",
"fieldname": "disabled",
"fieldtype": "Check",
"in_list_view": 1,
"label": "Disabled"
},
{
"fieldname": "section_break_7",
"fieldtype": "Section Break"
@@ -62,10 +70,11 @@
}
],
"links": [],
"modified": "2024-03-27 13:05:57.388109",
"modified": "2025-10-06 15:00:15.568067",
"modified_by": "Administrator",
"module": "Accounts",
"name": "Accounting Period",
"naming_rule": "By fieldname",
"owner": "Administrator",
"permissions": [
{
@@ -105,8 +114,9 @@
"write": 1
}
],
"row_format": "Dynamic",
"sort_field": "creation",
"sort_order": "DESC",
"states": [],
"track_changes": 1
}
}

View File

@@ -28,6 +28,7 @@ class AccountingPeriod(Document):
closed_documents: DF.Table[ClosedDocument]
company: DF.Link
disabled: DF.Check
end_date: DF.Date
period_name: DF.Data
start_date: DF.Date
@@ -116,6 +117,7 @@ def validate_accounting_period_on_doc_save(doc, method=None):
.where(
(ap.name == cd.parent)
& (ap.company == doc.company)
& (ap.disabled == 0)
& (cd.closed == 1)
& (cd.document_type == doc.doctype)
& (date >= ap.start_date)

View File

@@ -42,6 +42,7 @@
"show_payment_schedule_in_print",
"item_price_settings_section",
"maintain_same_internal_transaction_rate",
"fetch_valuation_rate_for_internal_transaction",
"column_break_feyo",
"maintain_same_rate_action",
"role_to_override_stop_action",
@@ -97,7 +98,7 @@
"payment_request_settings",
"create_pr_in_draft_status",
"budget_settings",
"use_new_budget_controller"
"use_legacy_budget_controller"
],
"fields": [
{
@@ -597,12 +598,6 @@
"fieldtype": "Tab Break",
"label": "Budget"
},
{
"default": "1",
"fieldname": "use_new_budget_controller",
"fieldtype": "Check",
"label": "Use New Budget Controller"
},
{
"default": "1",
"description": "If enabled, user will be alerted before resetting posting date to current date in relevant transactions",
@@ -644,6 +639,18 @@
"fieldname": "drop_ar_procedures",
"fieldtype": "Button",
"label": "Drop Procedures"
},
{
"default": "0",
"fieldname": "fetch_valuation_rate_for_internal_transaction",
"fieldtype": "Check",
"label": "Fetch Valuation Rate for Internal Transaction"
},
{
"default": "0",
"fieldname": "use_legacy_budget_controller",
"fieldtype": "Check",
"label": "Use Legacy Budget Controller"
}
],
"grid_page_length": 50,
@@ -652,7 +659,7 @@
"index_web_pages_for_search": 1,
"issingle": 1,
"links": [],
"modified": "2025-06-23 15:55:33.346398",
"modified": "2025-09-24 16:08:08.515254",
"modified_by": "Administrator",
"module": "Accounts",
"name": "Accounts Settings",

View File

@@ -49,6 +49,7 @@ class AccountsSettings(Document):
enable_immutable_ledger: DF.Check
enable_party_matching: DF.Check
exchange_gain_loss_posting_date: DF.Literal["Invoice", "Payment", "Reconciliation Date"]
fetch_valuation_rate_for_internal_transaction: DF.Check
frozen_accounts_modifier: DF.Link | None
general_ledger_remarks_length: DF.Int
ignore_account_closing_balance: DF.Check
@@ -73,7 +74,7 @@ class AccountsSettings(Document):
submit_journal_entries: DF.Check
unlink_advance_payment_on_cancelation_of_order: DF.Check
unlink_payment_on_cancellation_of_invoice: DF.Check
use_new_budget_controller: DF.Check
use_legacy_budget_controller: DF.Check
# end: auto-generated types
def validate(self):

View File

@@ -12,7 +12,8 @@
"against_voucher_no",
"amount",
"currency",
"event"
"event",
"delinked"
],
"fields": [
{
@@ -68,12 +69,20 @@
"label": "Company",
"options": "Company",
"read_only": 1
},
{
"default": "0",
"fieldname": "delinked",
"fieldtype": "Check",
"label": "DeLinked",
"read_only": 1
}
],
"grid_page_length": 50,
"in_create": 1,
"index_web_pages_for_search": 1,
"links": [],
"modified": "2024-11-05 10:31:28.736671",
"modified": "2025-10-13 15:11:58.300836",
"modified_by": "Administrator",
"module": "Accounts",
"name": "Advance Payment Ledger Entry",
@@ -107,7 +116,8 @@
"share": 1
}
],
"row_format": "Dynamic",
"sort_field": "creation",
"sort_order": "DESC",
"states": []
}
}

View File

@@ -1,9 +1,11 @@
# Copyright (c) 2024, Frappe Technologies Pvt. Ltd. and contributors
# For license information, please see license.txt
# import frappe
import frappe
from frappe.model.document import Document
from erpnext.accounts.utils import get_advance_payment_doctypes, update_voucher_outstanding
class AdvancePaymentLedgerEntry(Document):
# begin: auto-generated types
@@ -19,9 +21,28 @@ class AdvancePaymentLedgerEntry(Document):
amount: DF.Currency
company: DF.Link | None
currency: DF.Link | None
delinked: DF.Check
event: DF.Data | None
voucher_no: DF.DynamicLink | None
voucher_type: DF.Link | None
# end: auto-generated types
pass
def on_update(self):
if (
self.against_voucher_type in get_advance_payment_doctypes()
and self.flags.update_outstanding == "Yes"
and not frappe.flags.is_reverse_depr_entry
):
update_voucher_outstanding(self.against_voucher_type, self.against_voucher_no, None, None, None)
def on_doctype_update():
frappe.db.add_index(
"Advance Payment Ledger Entry",
["against_voucher_type", "against_voucher_no"],
)
frappe.db.add_index(
"Advance Payment Ledger Entry",
["voucher_type", "voucher_no"],
)

View File

@@ -17,6 +17,7 @@
"accounting_dimensions_section",
"cost_center",
"dimension_col_break",
"project",
"section_break_8",
"rate",
"section_break_9",
@@ -95,6 +96,13 @@
"fieldname": "dimension_col_break",
"fieldtype": "Column Break"
},
{
"allow_on_submit": 1,
"fieldname": "project",
"fieldtype": "Link",
"label": "Project",
"options": "Project"
},
{
"fieldname": "section_break_8",
"fieldtype": "Section Break"

View File

@@ -132,7 +132,8 @@
"fieldtype": "Data",
"in_list_view": 1,
"label": "IBAN",
"length": 30
"length": 34,
"options": "IBAN"
},
{
"fieldname": "column_break_12",
@@ -208,6 +209,7 @@
"label": "Disabled"
}
],
"grid_page_length": 50,
"links": [
{
"group": "Transactions",
@@ -250,7 +252,7 @@
"link_fieldname": "default_bank_account"
}
],
"modified": "2024-10-30 09:41:14.113414",
"modified": "2025-08-29 12:32:01.081687",
"modified_by": "Administrator",
"module": "Accounts",
"name": "Bank Account",
@@ -282,9 +284,10 @@
"write": 1
}
],
"row_format": "Dynamic",
"search_fields": "bank,account",
"sort_field": "creation",
"sort_order": "DESC",
"states": [],
"track_changes": 1
}
}

View File

@@ -52,7 +52,6 @@ class BankAccount(Document):
def validate(self):
self.validate_company()
self.validate_iban()
self.validate_account()
self.update_default_bank_account()
@@ -72,35 +71,6 @@ class BankAccount(Document):
if self.is_company_account and not self.company:
frappe.throw(_("Company is mandatory for company account"))
def validate_iban(self):
"""
Algorithm: https://en.wikipedia.org/wiki/International_Bank_Account_Number#Validating_the_IBAN
"""
# IBAN field is optional
if not self.iban:
return
def encode_char(c):
# Position in the alphabet (A=1, B=2, ...) plus nine
return str(9 + ord(c) - 64)
# remove whitespaces, upper case to get the right number from ord()
iban = "".join(self.iban.split(" ")).upper()
# Move country code and checksum from the start to the end
flipped = iban[4:] + iban[:4]
# Encode characters as numbers
encoded = [encode_char(c) if ord(c) >= 65 and ord(c) <= 90 else c for c in flipped]
try:
to_check = int("".join(encoded))
except ValueError:
frappe.throw(_("IBAN is not valid"))
if to_check % 97 != 1:
frappe.throw(_("IBAN is not valid"))
def update_default_bank_account(self):
if self.is_default and not self.disabled:
frappe.db.set_value(
@@ -109,6 +79,7 @@ class BankAccount(Document):
"party_type": self.party_type,
"party": self.party,
"is_company_account": self.is_company_account,
"company": self.company,
"is_default": 1,
"disabled": 0,
},
@@ -117,15 +88,6 @@ class BankAccount(Document):
)
@frappe.whitelist()
def make_bank_account(doctype, docname):
doc = frappe.new_doc("Bank Account")
doc.party_type = doctype
doc.party = docname
return doc
def get_party_bank_account(party_type, party):
return frappe.db.get_value(
"Bank Account",

View File

@@ -8,38 +8,4 @@ from frappe.tests import IntegrationTestCase
class TestBankAccount(IntegrationTestCase):
def test_validate_iban(self):
valid_ibans = [
"GB82 WEST 1234 5698 7654 32",
"DE91 1000 0000 0123 4567 89",
"FR76 3000 6000 0112 3456 7890 189",
]
invalid_ibans = [
# wrong checksum (3rd place)
"GB72 WEST 1234 5698 7654 32",
"DE81 1000 0000 0123 4567 89",
"FR66 3000 6000 0112 3456 7890 189",
]
bank_account = frappe.get_doc({"doctype": "Bank Account"})
try:
bank_account.validate_iban()
except AttributeError:
msg = "BankAccount.validate_iban() failed for empty IBAN"
self.fail(msg=msg)
for iban in valid_ibans:
bank_account.iban = iban
try:
bank_account.validate_iban()
except ValidationError:
msg = f"BankAccount.validate_iban() failed for valid IBAN {iban}"
self.fail(msg=msg)
for not_iban in invalid_ibans:
bank_account.iban = not_iban
msg = f"BankAccount.validate_iban() accepted invalid IBAN {not_iban}"
with self.assertRaises(ValidationError, msg=msg):
bank_account.validate_iban()
pass

View File

@@ -155,8 +155,10 @@ def get_payment_entries_for_bank_clearance(
entries = []
condition = ""
pe_condition = ""
if not include_reconciled_entries:
condition = "and (clearance_date IS NULL or clearance_date='0000-00-00')"
pe_condition = "and (pe.clearance_date IS NULL or pe.clearance_date='0000-00-00')"
journal_entries = frappe.db.sql(
f"""
@@ -181,19 +183,20 @@ def get_payment_entries_for_bank_clearance(
payment_entries = frappe.db.sql(
f"""
select
"Payment Entry" as payment_document, name as payment_entry,
reference_no as cheque_number, reference_date as cheque_date,
if(paid_from=%(account)s, paid_amount + total_taxes_and_charges, 0) as credit,
if(paid_from=%(account)s, 0, received_amount + total_taxes_and_charges) as debit,
posting_date, ifnull(party,if(paid_from=%(account)s,paid_to,paid_from)) as against_account, clearance_date,
if(paid_to=%(account)s, paid_to_account_currency, paid_from_account_currency) as account_currency
from `tabPayment Entry`
"Payment Entry" as payment_document, pe.name as payment_entry,
pe.reference_no as cheque_number, pe.reference_date as cheque_date,
if(pe.paid_from=%(account)s, pe.paid_amount + if(pe.payment_type = 'Pay' and c.default_currency = pe.paid_from_account_currency, pe.base_total_taxes_and_charges, pe.total_taxes_and_charges) , 0) as credit,
if(pe.paid_from=%(account)s, 0, pe.received_amount + pe.total_taxes_and_charges) as debit,
pe.posting_date, ifnull(pe.party,if(pe.paid_from=%(account)s,pe.paid_to,pe.paid_from)) as against_account, pe.clearance_date,
if(pe.paid_to=%(account)s, pe.paid_to_account_currency, pe.paid_from_account_currency) as account_currency
from `tabPayment Entry` as pe
join `tabCompany` c on c.name = pe.company
where
(paid_from=%(account)s or paid_to=%(account)s) and docstatus=1
and posting_date >= %(from)s and posting_date <= %(to)s
{condition}
(pe.paid_from=%(account)s or pe.paid_to=%(account)s) and pe.docstatus=1
and pe.posting_date >= %(from)s and pe.posting_date <= %(to)s
{pe_condition}
order by
posting_date ASC, name DESC
pe.posting_date ASC, pe.name DESC
""",
{
"account": account,

View File

@@ -146,6 +146,7 @@
"fieldname": "iban",
"fieldtype": "Data",
"label": "IBAN",
"options": "IBAN",
"read_only": 1
},
{
@@ -214,9 +215,10 @@
"read_only": 1
}
],
"grid_page_length": 50,
"is_submittable": 1,
"links": [],
"modified": "2024-03-27 13:06:37.731207",
"modified": "2025-08-29 11:52:33.550847",
"modified_by": "Administrator",
"module": "Accounts",
"name": "Bank Guarantee",
@@ -250,9 +252,10 @@
}
],
"quick_entry": 1,
"row_format": "Dynamic",
"search_fields": "customer",
"sort_field": "creation",
"sort_order": "DESC",
"states": [],
"title_field": "customer"
}
}

View File

@@ -9,7 +9,7 @@ from frappe import _
from frappe.model.document import Document
from frappe.query_builder.custom import ConstantColumn
from frappe.query_builder.functions import Sum
from frappe.utils import cint, flt
from frappe.utils import cint, create_batch, flt
from erpnext import get_default_cost_center
from erpnext.accounts.doctype.bank_transaction.bank_transaction import get_total_allocated_amount
@@ -377,16 +377,17 @@ def auto_reconcile_vouchers(
bank_transactions = get_bank_transactions(bank_account)
if len(bank_transactions) > 10:
frappe.enqueue(
method="erpnext.accounts.doctype.bank_reconciliation_tool.bank_reconciliation_tool.start_auto_reconcile",
queue="long",
bank_transactions=bank_transactions,
from_date=from_date,
to_date=to_date,
filter_by_reference_date=filter_by_reference_date,
from_reference_date=from_reference_date,
to_reference_date=to_reference_date,
)
for bank_transaction_batch in create_batch(bank_transactions, 1000):
frappe.enqueue(
method="erpnext.accounts.doctype.bank_reconciliation_tool.bank_reconciliation_tool.start_auto_reconcile",
queue="long",
bank_transactions=bank_transaction_batch,
from_date=from_date,
to_date=to_date,
filter_by_reference_date=filter_by_reference_date,
from_reference_date=from_reference_date,
to_reference_date=to_reference_date,
)
frappe.msgprint(_("Auto Reconciliation has started in the background"))
else:
start_auto_reconcile(
@@ -408,7 +409,7 @@ def start_auto_reconcile(
for transaction in bank_transactions:
linked_payments = get_linked_payments(
transaction.name,
["payment_entry", "journal_entry"],
["payment_entry", "journal_entry", "sales_invoice"],
from_date,
to_date,
filter_by_reference_date,
@@ -665,7 +666,7 @@ def get_matching_queries(
queries.append(query)
if transaction.deposit > 0.0 and "sales_invoice" in document_types:
query = get_si_matching_query(exact_match, currency, common_filters)
query = get_si_matching_query(exact_match, currency, common_filters, transaction)
queries.append(query)
if transaction.withdrawal > 0.0:
@@ -853,11 +854,14 @@ def get_je_matching_query(
return query
def get_si_matching_query(exact_match, currency, common_filters):
def get_si_matching_query(exact_match, currency, common_filters, transaction):
# get matching sales invoice query
si = frappe.qb.DocType("Sales Invoice")
sip = frappe.qb.DocType("Sales Invoice Payment")
ref_condition = sip.reference_no == transaction.reference_number
ref_rank = frappe.qb.terms.Case().when(ref_condition, 1).else_(0)
amount_equality = sip.amount == common_filters.amount
amount_rank = frappe.qb.terms.Case().when(amount_equality, 1).else_(0)
amount_condition = amount_equality if exact_match else sip.amount > 0.0
@@ -870,11 +874,11 @@ def get_si_matching_query(exact_match, currency, common_filters):
.join(si)
.on(sip.parent == si.name)
.select(
(party_rank + amount_rank + 1).as_("rank"),
(ref_rank + party_rank + amount_rank + 1).as_("rank"),
ConstantColumn("Sales Invoice").as_("doctype"),
si.name,
sip.amount.as_("paid_amount"),
ConstantColumn("").as_("reference_no"),
sip.reference_no,
ConstantColumn("").as_("reference_date"),
si.customer.as_("party"),
ConstantColumn("Customer").as_("party_type"),
@@ -888,6 +892,9 @@ def get_si_matching_query(exact_match, currency, common_filters):
.where(si.currency == currency)
)
if frappe.flags.auto_reconcile_vouchers is True:
query = query.where(ref_condition)
return query

View File

@@ -252,7 +252,7 @@ frappe.ui.form.on("Bank Statement Import", {
open_url_post(method, {
doctype: "Bank Transaction",
export_records: "5_records",
export_records: "blank_template",
export_fields: {
"Bank Transaction": [
"date",

View File

@@ -111,20 +111,54 @@ class BankStatementImport(DataImport):
return None
def preprocess_mt940_content(content: str) -> str:
"""Preprocess MT940 content to fix statement number format issues.
The MT940 standard expects statement numbers to be maximum 5 digits,
but some banks provide longer statement numbers that cause parsing errors.
This function truncates statement numbers longer than 5 digits to the last 5 digits.
"""
# Fast-path: bail if no :28C: tag exists
if ":28C:" not in content:
return content
# Match :28C: at start of line, capture digits and optional /seq, preserve whitespace
pattern = re.compile(r"(?m)^(:28C:)(\d{6,})(/\d+)?(\s*)$")
def replace_statement_number(match):
prefix = match.group(1) # ':28C:'
statement_num = match.group(2) # The statement number
sequence_part = match.group(3) or "" # The sequence part like '/1'
trailing_space = match.group(4) or "" # Preserve trailing whitespace
# If statement number is longer than 5 digits, truncate to last 5 digits
if len(statement_num) > 5:
statement_num = statement_num[-5:]
return prefix + statement_num + sequence_part + trailing_space
# Apply the replacement
processed_content = pattern.sub(replace_statement_number, content)
return processed_content
@frappe.whitelist()
def convert_mt940_to_csv(data_import, mt940_file_path):
doc = frappe.get_doc("Bank Statement Import", data_import)
file_doc, content = get_file(mt940_file_path)
_file_doc, content = get_file(mt940_file_path)
if not is_mt940_format(content):
is_mt940 = is_mt940_format(content)
if not is_mt940:
frappe.throw(_("The uploaded file does not appear to be in valid MT940 format."))
if is_mt940_format(content) and not doc.import_mt940_fromat:
if is_mt940 and not doc.import_mt940_fromat:
frappe.throw(_("MT940 file detected. Please enable 'Import MT940 Format' to proceed."))
try:
transactions = mt940.parse(content)
# Preprocess MT940 content to fix statement number format issues
processed_content = preprocess_mt940_content(content)
transactions = mt940.parse(processed_content)
except Exception as e:
frappe.throw(_("Failed to parse MT940 format. Error: {0}").format(str(e)))
@@ -249,6 +283,7 @@ def start_import(data_import, bank_account, import_file_path, google_sheets_url,
def update_mapping_db(bank, template_options):
"""Update bank transaction mapping database with template options."""
bank = frappe.get_doc("Bank", bank)
for d in bank.bank_transaction_mapping:
d.delete()
@@ -260,6 +295,7 @@ def update_mapping_db(bank, template_options):
def add_bank_account(data, bank_account):
"""Add bank account information to data rows."""
bank_account_loc = None
if "Bank Account" not in data[0]:
data[0].append("Bank Account")
@@ -276,6 +312,7 @@ def add_bank_account(data, bank_account):
def write_files(import_file, data):
"""Write processed data to CSV or Excel files."""
full_file_path = import_file.file_doc.get_full_path()
parts = import_file.file_doc.get_extension()
extension = parts[1]
@@ -285,11 +322,12 @@ def write_files(import_file, data):
with open(full_file_path, "w", newline="") as file:
writer = csv.writer(file)
writer.writerows(data)
elif extension == "xlsx" or "xls":
elif extension in ("xlsx", "xls"):
write_xlsx(data, "trans", file_path=full_file_path)
def write_xlsx(data, sheet_name, wb=None, column_widths=None, file_path=None):
"""Write data to Excel file with formatting."""
# from xlsx utils with changes
column_widths = column_widths or []
if wb is None:

View File

@@ -1,10 +1,209 @@
# Copyright (c) 2020, Frappe Technologies and Contributors
# See license.txt
# import frappe
import unittest
from frappe.tests import IntegrationTestCase
from erpnext.accounts.doctype.bank_statement_import.bank_statement_import import (
is_mt940_format,
preprocess_mt940_content,
)
class TestBankStatementImport(IntegrationTestCase):
pass
class TestBankStatementImport(unittest.TestCase):
"""Unit tests for Bank Statement Import functions"""
def test_preprocess_mt940_content_with_long_statement_number(self):
"""Test that statement numbers longer than 5 digits are truncated to last 5 digits"""
# Test case with 6-digit statement number (167619 -> 67619)
mt940_content = ":28C:167619/1"
expected_content = ":28C:67619/1"
result = preprocess_mt940_content(mt940_content)
self.assertEqual(result, expected_content)
def test_preprocess_mt940_content_with_normal_statement_number(self):
"""Test that statement numbers with 5 or fewer digits are unchanged"""
# Test case with 5-digit statement number (should remain unchanged)
mt940_content = ":28C:12345/1"
result = preprocess_mt940_content(mt940_content)
self.assertEqual(result, mt940_content) # Should be unchanged
# Test case with 4-digit statement number (should remain unchanged)
mt940_content = ":28C:1234/1"
result = preprocess_mt940_content(mt940_content)
self.assertEqual(result, mt940_content) # Should be unchanged
def test_preprocess_mt940_content_without_sequence_number(self):
"""Test statement number truncation without sequence number"""
# Test case with long statement number but no sequence (no /1)
mt940_content = ":28C:987654321"
expected_content = ":28C:54321"
result = preprocess_mt940_content(mt940_content)
self.assertEqual(result, expected_content)
def test_preprocess_mt940_content_multiple_occurrences(self):
"""Test multiple statement numbers in the same content"""
mt940_content = """:28C:167619/1
:28C:987654/2"""
expected_content = """:28C:67619/1
:28C:87654/2"""
result = preprocess_mt940_content(mt940_content)
self.assertEqual(result, expected_content)
def test_preprocess_mt940_content_edge_cases(self):
"""Test edge cases like empty content and content without :28C: tags"""
# Test empty content
self.assertEqual(preprocess_mt940_content(""), "")
# Test content without :28C: tags
content_without_28c = """:20:STARTUMSE
:25:12345678901234567890
:60F:C031002EUR0,00"""
result = preprocess_mt940_content(content_without_28c)
self.assertEqual(result, content_without_28c) # Should be unchanged
def test_preprocess_mt940_content_with_full_mt940_document(self):
"""Test preprocessing with complete MT940 document"""
mt940_content = """:20:STARTUMSE
:25:12345678901234567890
:28C:167619/1
:60F:C031002EUR0,00
:61:0310021002DR123,45NMSCNONREF//8327000090031789
:86:806?20EREF+NONREF?21MREF+M180031?22CRED+DE98ZZZ09999999999
:62F:C031002EUR-123,45
-"""
expected_content = """:20:STARTUMSE
:25:12345678901234567890
:28C:67619/1
:60F:C031002EUR0,00
:61:0310021002DR123,45NMSCNONREF//8327000090031789
:86:806?20EREF+NONREF?21MREF+M180031?22CRED+DE98ZZZ09999999999
:62F:C031002EUR-123,45
-"""
result = preprocess_mt940_content(mt940_content)
self.assertEqual(result, expected_content)
def test_is_mt940_format_detection(self):
"""Test MT940 format detection function"""
# Valid MT940 content with all required tags
valid_mt940 = """:20:STARTUMSE
:25:12345678901234567890
:28C:167619/1
:60F:C031002EUR0,00
:61:0310021002DR123,45NMSCNONREF//8327000090031789"""
self.assertTrue(is_mt940_format(valid_mt940))
# Invalid MT940 content (CSV format)
invalid_mt940 = """Date,Description,Amount
2023-01-01,Test Transaction,100.00
2023-01-02,Another Transaction,-50.00"""
self.assertFalse(is_mt940_format(invalid_mt940))
# Partially valid MT940 (missing some required tags)
partial_mt940 = """:20:STARTUMSE
:25:12345678901234567890
:60F:C031002EUR0,00"""
self.assertFalse(is_mt940_format(partial_mt940))
# Empty content
self.assertFalse(is_mt940_format(""))
def test_preprocess_mt940_content_boundary_conditions(self):
"""Test boundary conditions for statement number length"""
# Test exactly 6 digits (should be truncated)
mt940_content = ":28C:123456/1"
expected_content = ":28C:23456/1"
result = preprocess_mt940_content(mt940_content)
self.assertEqual(result, expected_content)
# Test exactly 5 digits (should remain unchanged)
mt940_content = ":28C:12345/1"
result = preprocess_mt940_content(mt940_content)
self.assertEqual(result, mt940_content)
# Test very long statement number
mt940_content = ":28C:123456789012345/1"
expected_content = ":28C:12345/1" # Last 5 digits
result = preprocess_mt940_content(mt940_content)
self.assertEqual(result, expected_content)
def test_preprocess_mt940_content_real_world_case(self):
"""Test with real-world MT940 content that was failing in production"""
# This is based on actual MT940 content that was causing parsing errors (sanitized)
mt940_content = """{1:F0112345678901X0000000000}{2:I94012345678901XN}{4:
:20:STMTREF167619
:25:1234567890
:28C:167619/1
:60F:C250622USD0,00
:61:2507170717C100000,00NMSCNOREF
:86:BY EXAMPLE INST 123456/03-07-25/TESTBANK/CITY
:61:2507240724C1,00NMSCNEFTINW-1234567890
:86:NEFT TEST123456789 EXAMPLE MERCHANT SERVICES
:61:2507310731D305,62NMSCTBMS-1234567890
:86:Chrg: Debit Card Annual Fee 1234 for 2025
:61:2508030803D1066,00NMSC123456789
:86:PCD/1234/EXAMPLE DOMAIN/01234567890123/23:27
:61:2508060806D2000,00NMSCUPI-123456789
:86:UPI/TEST USER/123456789/PaidViaTestApp
:61:2508140814D5000,00NMSCUPI-123456789
:86:UPI/TEST USER/123456789/PaidViaTestApp
:61:2509190919D900,00NMSCUPI-123456789
:86:UPI/EXAMPLE MERCHANT/123456789/Pay
:61:2509190919D2606,00NMSCUPI-123456789
:86:UPI/JOHN DOE/123456789/PaidViaTestApp
:62F:C250922USD88123,38
-}"""
# Expected result with statement number 167619 truncated to 67619
expected_content = """{1:F0112345678901X0000000000}{2:I94012345678901XN}{4:
:20:STMTREF167619
:25:1234567890
:28C:67619/1
:60F:C250622USD0,00
:61:2507170717C100000,00NMSCNOREF
:86:BY EXAMPLE INST 123456/03-07-25/TESTBANK/CITY
:61:2507240724C1,00NMSCNEFTINW-1234567890
:86:NEFT TEST123456789 EXAMPLE MERCHANT SERVICES
:61:2507310731D305,62NMSCTBMS-1234567890
:86:Chrg: Debit Card Annual Fee 1234 for 2025
:61:2508030803D1066,00NMSC123456789
:86:PCD/1234/EXAMPLE DOMAIN/01234567890123/23:27
:61:2508060806D2000,00NMSCUPI-123456789
:86:UPI/TEST USER/123456789/PaidViaTestApp
:61:2508140814D5000,00NMSCUPI-123456789
:86:UPI/TEST USER/123456789/PaidViaTestApp
:61:2509190919D900,00NMSCUPI-123456789
:86:UPI/EXAMPLE MERCHANT/123456789/Pay
:61:2509190919D2606,00NMSCUPI-123456789
:86:UPI/JOHN DOE/123456789/PaidViaTestApp
:62F:C250922USD88123,38
-}"""
result = preprocess_mt940_content(mt940_content)
self.assertEqual(result, expected_content)
# Verify that the problematic statement number was actually changed
self.assertIn(":28C:67619/1", result)
self.assertNotIn(":28C:167619/1", result)
# Verify that other content remains unchanged
self.assertIn(":20:STMTREF167619", result) # Reference should remain unchanged
self.assertIn("UPI/TEST USER/123456789/PaidViaTestApp", result)
def test_preprocess_mt940_content_whitespace_variants(self):
"""Test handling of whitespace and different line endings"""
# Test with trailing spaces
mt940_content = ":28C:167619/1 \n"
expected_content = ":28C:67619/1 \n"
result = preprocess_mt940_content(mt940_content)
self.assertEqual(result, expected_content)
# Test with Windows line endings (CRLF)
mt940_content = ":28C:167619/1\r\n"
expected_content = ":28C:67619/1\r\n"
result = preprocess_mt940_content(mt940_content)
self.assertEqual(result, expected_content)
# Test with leading spaces (should not match as it's not line start)
mt940_content = " :28C:167619/1\n"
result = preprocess_mt940_content(mt940_content)
self.assertEqual(result, mt940_content) # Should remain unchanged

View File

@@ -116,7 +116,7 @@
{
"allow_on_submit": 1,
"fieldname": "reference_number",
"fieldtype": "Data",
"fieldtype": "Small Text",
"label": "Reference Number"
},
{
@@ -223,7 +223,8 @@
{
"fieldname": "bank_party_iban",
"fieldtype": "Data",
"label": "Party IBAN (Bank Statement)"
"label": "Party IBAN (Bank Statement)",
"options": "IBAN"
},
{
"fieldname": "bank_party_account_number",
@@ -238,7 +239,7 @@
"grid_page_length": 50,
"is_submittable": 1,
"links": [],
"modified": "2025-06-18 17:24:57.044666",
"modified": "2025-09-26 17:06:29.207673",
"modified_by": "Administrator",
"module": "Accounts",
"name": "Bank Transaction",

View File

@@ -36,7 +36,7 @@ class BankTransaction(Document):
party: DF.DynamicLink | None
party_type: DF.Link | None
payment_entries: DF.Table[BankTransactionPayments]
reference_number: DF.Data | None
reference_number: DF.SmallText | None
status: DF.Literal["", "Pending", "Settled", "Unreconciled", "Reconciled", "Cancelled"]
transaction_id: DF.Data | None
transaction_type: DF.Data | None

View File

@@ -7,6 +7,9 @@ from frappe.utils import nowdate
from erpnext.accounts.doctype.bank_transaction.test_bank_transaction import create_bank_account
IBAN_1 = "DE02000000003716541159"
IBAN_2 = "DE02500105170137075030"
class TestAutoMatchParty(IntegrationTestCase):
@classmethod
@@ -22,24 +25,24 @@ class TestAutoMatchParty(IntegrationTestCase):
frappe.db.set_single_value("Accounts Settings", "enable_fuzzy_matching", 0)
def test_match_by_account_number(self):
create_supplier_for_match(account_no="000000003716541159")
create_supplier_for_match(account_no=IBAN_1[11:])
doc = create_bank_transaction(
withdrawal=1200,
transaction_id="562213b0ca1bf838dab8f2c6a39bbc3b",
account_no="000000003716541159",
iban="DE02000000003716541159",
account_no=IBAN_1[11:],
iban=IBAN_1,
)
self.assertEqual(doc.party_type, "Supplier")
self.assertEqual(doc.party, "John Doe & Co.")
def test_match_by_iban(self):
create_supplier_for_match(iban="DE02000000003716541159")
create_supplier_for_match(iban=IBAN_1)
doc = create_bank_transaction(
withdrawal=1200,
transaction_id="c5455a224602afaa51592a9d9250600d",
account_no="000000003716541159",
iban="DE02000000003716541159",
account_no=IBAN_1[11:],
iban=IBAN_1,
)
self.assertEqual(doc.party_type, "Supplier")
@@ -51,7 +54,7 @@ class TestAutoMatchParty(IntegrationTestCase):
withdrawal=1200,
transaction_id="1f6f661f347ff7b1ea588665f473adb1",
party_name="Ella Jackson",
iban="DE04000000003716545346",
iban=IBAN_2,
)
self.assertEqual(doc.party_type, "Supplier")
self.assertEqual(doc.party, "Jackson Ella W.")

View File

@@ -23,8 +23,8 @@ frappe.ui.form.on("Budget", {
});
erpnext.accounts.dimensions.setup_dimension_filters(frm, frm.doctype);
frappe.db.get_single_value("Accounts Settings", "use_new_budget_controller").then((value) => {
if (!value) {
frappe.db.get_single_value("Accounts Settings", "use_legacy_budget_controller").then((value) => {
if (value) {
frm.get_field("control_action_for_cumulative_expense_section").hide();
}
});

View File

@@ -145,8 +145,10 @@ def validate_expense_against_budget(args, expense_amount=0):
if not frappe.db.count("Budget", cache=True):
return
if args.get("company") and not args.fiscal_year:
if not args.fiscal_year:
args.fiscal_year = get_fiscal_year(args.get("posting_date"), company=args.get("company"))[0]
if args.get("company"):
frappe.flags.exception_approver_role = frappe.get_cached_value(
"Company", args.get("company"), "exception_budget_approver_role"
)
@@ -302,7 +304,7 @@ def compare_expense_with_budget(args, budget_amount, action_for, action, budget_
def get_expense_breakup(args, currency, budget_against):
msg = "<hr>Total Expenses booked through - <ul>"
msg = "<hr> {{ _('Total Expenses booked through') }} - <ul>"
common_filters = frappe._dict(
{
@@ -316,7 +318,7 @@ def get_expense_breakup(args, currency, budget_against):
"<li>"
+ frappe.utils.get_link_to_report(
"General Ledger",
label="Actual Expenses",
label=_("Actual Expenses"),
filters=common_filters.copy().update(
{
"from_date": frappe.get_cached_value("Fiscal Year", args.fiscal_year, "year_start_date"),
@@ -334,7 +336,7 @@ def get_expense_breakup(args, currency, budget_against):
"<li>"
+ frappe.utils.get_link_to_report(
"Material Request",
label="Material Requests",
label=_("Material Requests"),
report_type="Report Builder",
doctype="Material Request",
filters=common_filters.copy().update(
@@ -357,7 +359,7 @@ def get_expense_breakup(args, currency, budget_against):
"<li>"
+ frappe.utils.get_link_to_report(
"Purchase Order",
label="Unbilled Orders",
label=_("Unbilled Orders"),
report_type="Report Builder",
doctype="Purchase Order",
filters=common_filters.copy().update(

View File

@@ -24,7 +24,7 @@ class TestBudget(ERPNextTestSuite):
cls.make_projects()
def setUp(self):
frappe.db.set_single_value("Accounts Settings", "use_new_budget_controller", True)
frappe.db.set_single_value("Accounts Settings", "use_legacy_budget_controller", False)
def test_monthly_budget_crossed_ignore(self):
set_total_expense_zero(nowdate(), "cost_center")

View File

@@ -462,9 +462,8 @@ def unset_existing_data(company):
"Sales Taxes and Charges Template",
"Purchase Taxes and Charges Template",
]:
frappe.db.sql(
f'''delete from `tab{doctype}` where `company`="%s"''' % (company) # nosec
)
dt = frappe.qb.DocType(doctype)
frappe.qb.from_(dt).where(dt.company == company).delete().run()
def set_default_accounts(company):

View File

@@ -3,6 +3,7 @@
import unittest
import frappe
from frappe.query_builder.functions import Sum
from frappe.tests import IntegrationTestCase
from frappe.utils import add_days, today
@@ -190,6 +191,31 @@ class TestCostCenterAllocation(IntegrationTestCase):
coa2.cancel()
jv.cancel()
@IntegrationTestCase.change_settings("System Settings", {"rounding_method": "Commercial Rounding"})
def test_debit_credit_on_cost_center_allocation_for_commercial_rounding(self):
from erpnext.accounts.doctype.sales_invoice.test_sales_invoice import create_sales_invoice
cca = create_cost_center_allocation(
"_Test Company",
"Main Cost Center 1 - _TC",
{"Sub Cost Center 2 - _TC": 50, "Sub Cost Center 3 - _TC": 50},
)
si = create_sales_invoice(rate=145.65, cost_center="Main Cost Center 1 - _TC")
gl_entry = frappe.qb.DocType("GL Entry")
gl_entries = (
frappe.qb.from_(gl_entry)
.select(Sum(gl_entry.credit).as_("cr"), Sum(gl_entry.debit).as_("dr"))
.where(gl_entry.voucher_type == "Sales Invoice")
.where(gl_entry.voucher_no == si.name)
).run(as_dict=1)
self.assertEqual(gl_entries[0].cr, gl_entries[0].dr)
si.cancel()
cca.cancel()
def create_cost_center_allocation(
company,

View File

@@ -11,6 +11,7 @@
-> Resolves dunning automatically
"""
import json
import frappe
@@ -163,43 +164,66 @@ class Dunning(AccountsController):
]
def resolve_dunning(doc, state):
"""
Check if all payments have been made and resolve dunning, if yes. Called
when a Payment Entry is submitted.
"""
for reference in doc.references:
# Consider partial and full payments:
# Submitting full payment: outstanding_amount will be 0
# Submitting 1st partial payment: outstanding_amount will be the pending installment
# Cancelling full payment: outstanding_amount will revert to total amount
# Cancelling last partial payment: outstanding_amount will revert to pending amount
submit_condition = reference.outstanding_amount < reference.total_amount
cancel_condition = reference.outstanding_amount <= reference.total_amount
def update_linked_dunnings(doc, previous_outstanding_amount):
if (
doc.doctype != "Sales Invoice"
or doc.is_return
or previous_outstanding_amount == doc.outstanding_amount
):
return
if reference.reference_doctype == "Sales Invoice" and (
submit_condition if doc.docstatus == 1 else cancel_condition
):
state = "Resolved" if doc.docstatus == 2 else "Unresolved"
dunnings = get_linked_dunnings_as_per_state(reference.reference_name, state)
to_resolve = doc.outstanding_amount < previous_outstanding_amount
state = "Unresolved" if to_resolve else "Resolved"
dunnings = get_linked_dunnings_as_per_state(doc.name, state)
if not dunnings:
return
for dunning in dunnings:
resolve = True
dunning = frappe.get_doc("Dunning", dunning.get("name"))
for overdue_payment in dunning.overdue_payments:
outstanding_inv = frappe.get_value(
"Sales Invoice", overdue_payment.sales_invoice, "outstanding_amount"
)
outstanding_ps = frappe.get_value(
"Payment Schedule", overdue_payment.payment_schedule, "outstanding"
)
resolve = resolve and (False if (outstanding_ps > 0 and outstanding_inv > 0) else True)
dunnings = [frappe.get_doc("Dunning", dunning.name) for dunning in dunnings]
invoices = set()
payment_schedule_ids = set()
new_status = "Resolved" if resolve else "Unresolved"
for dunning in dunnings:
for overdue_payment in dunning.overdue_payments:
invoices.add(overdue_payment.sales_invoice)
if overdue_payment.payment_schedule:
payment_schedule_ids.add(overdue_payment.payment_schedule)
if dunning.status != new_status:
dunning.status = new_status
dunning.save()
invoice_outstanding_amounts = dict(
frappe.get_all(
"Sales Invoice",
filters={"name": ["in", list(invoices)]},
fields=["name", "outstanding_amount"],
as_list=True,
)
)
ps_outstanding_amounts = (
dict(
frappe.get_all(
"Payment Schedule",
filters={"name": ["in", list(payment_schedule_ids)]},
fields=["name", "outstanding"],
as_list=True,
)
)
if payment_schedule_ids
else {}
)
for dunning in dunnings:
has_outstanding = False
for overdue_payment in dunning.overdue_payments:
invoice_outstanding = invoice_outstanding_amounts[overdue_payment.sales_invoice]
ps_outstanding = ps_outstanding_amounts.get(overdue_payment.payment_schedule, 0)
has_outstanding = invoice_outstanding > 0 and ps_outstanding > 0
if has_outstanding:
break
new_status = "Resolved" if not has_outstanding else "Unresolved"
if dunning.status != new_status:
dunning.status = new_status
dunning.save()
def get_linked_dunnings_as_per_state(sales_invoice, state):

View File

@@ -139,6 +139,64 @@ class TestDunning(IntegrationTestCase):
self.assertEqual(sales_invoice.status, "Overdue")
self.assertEqual(dunning.status, "Unresolved")
def test_dunning_resolution_from_credit_note(self):
"""
Test that dunning is resolved when a credit note is issued against the original invoice.
"""
sales_invoice = create_sales_invoice_against_cost_center(
posting_date=add_days(today(), -10), qty=1, rate=100
)
dunning = create_dunning_from_sales_invoice(sales_invoice.name)
dunning.submit()
self.assertEqual(dunning.status, "Unresolved")
credit_note = frappe.copy_doc(sales_invoice)
credit_note.is_return = 1
credit_note.return_against = sales_invoice.name
credit_note.update_outstanding_for_self = 0
for item in credit_note.items:
item.qty = -item.qty
credit_note.save()
credit_note.submit()
dunning.reload()
self.assertEqual(dunning.status, "Resolved")
credit_note.cancel()
dunning.reload()
self.assertEqual(dunning.status, "Unresolved")
def test_dunning_not_affected_by_standalone_credit_note(self):
"""
Test that dunning is NOT resolved when a credit note has update_outstanding_for_self checked.
"""
sales_invoice = create_sales_invoice_against_cost_center(
posting_date=add_days(today(), -10), qty=1, rate=100
)
dunning = create_dunning_from_sales_invoice(sales_invoice.name)
dunning.submit()
self.assertEqual(dunning.status, "Unresolved")
credit_note = frappe.copy_doc(sales_invoice)
credit_note.is_return = 1
credit_note.return_against = sales_invoice.name
credit_note.update_outstanding_for_self = 1
for item in credit_note.items:
item.qty = -item.qty
credit_note.save()
credit_note = frappe.get_doc("Sales Invoice", credit_note.name)
credit_note.submit()
dunning.reload()
self.assertEqual(dunning.status, "Unresolved")
def create_dunning(overdue_days, dunning_type_name=None):
posting_date = add_days(today(), -1 * overdue_days)

View File

@@ -134,7 +134,8 @@ class ExchangeRateRevaluation(Document):
accounts = self.get_accounts_data()
if accounts:
for acc in accounts:
self.append("accounts", acc)
if acc.get("gain_loss"):
self.append("accounts", acc)
@frappe.whitelist()
def get_accounts_data(self):

View File

@@ -29,14 +29,17 @@
"against_voucher",
"voucher_detail_no",
"transaction_exchange_rate",
"reporting_currency_exchange_rate",
"amounts_section",
"debit_in_account_currency",
"debit",
"debit_in_transaction_currency",
"debit_in_reporting_currency",
"column_break_bm1w",
"credit_in_account_currency",
"credit",
"credit_in_transaction_currency",
"credit_in_reporting_currency",
"dimensions_section",
"cost_center",
"column_break_lmnm",
@@ -353,13 +356,31 @@
{
"fieldname": "column_break_8abq",
"fieldtype": "Column Break"
},
{
"fieldname": "debit_in_reporting_currency",
"fieldtype": "Currency",
"label": "Debit Amount in Reporting Currency",
"options": "Company:company:reporting_currency"
},
{
"fieldname": "credit_in_reporting_currency",
"fieldtype": "Currency",
"label": "Credit Amount in Reporting Currency",
"options": "Company:company:reporting_currency"
},
{
"fieldname": "reporting_currency_exchange_rate",
"fieldtype": "Float",
"label": "Reporting Currency Exchange Rate",
"precision": "9"
}
],
"icon": "fa fa-list",
"idx": 1,
"in_create": 1,
"links": [],
"modified": "2025-03-21 15:29:11.221890",
"modified": "2025-08-22 12:57:17.750252",
"modified_by": "Administrator",
"module": "Accounts",
"name": "GL Entry",
@@ -390,8 +411,9 @@
}
],
"quick_entry": 1,
"row_format": "Dynamic",
"search_fields": "voucher_no,account,posting_date,against_voucher",
"sort_field": "creation",
"sort_order": "DESC",
"states": []
}
}

View File

@@ -18,8 +18,9 @@ from erpnext.accounts.party import (
validate_party_frozen_disabled,
validate_party_gle_currency,
)
from erpnext.accounts.utils import get_account_currency, get_fiscal_year
from erpnext.exceptions import InvalidAccountCurrency
from erpnext.accounts.utils import OUTSTANDING_DOCTYPES, get_account_currency, get_fiscal_year
from erpnext.exceptions import InvalidAccountCurrency, ReportingCurrencyExchangeNotFoundError
from erpnext.setup.utils import get_exchange_rate
exclude_from_linked_with = True
@@ -42,9 +43,11 @@ class GLEntry(Document):
cost_center: DF.Link | None
credit: DF.Currency
credit_in_account_currency: DF.Currency
credit_in_reporting_currency: DF.Currency
credit_in_transaction_currency: DF.Currency
debit: DF.Currency
debit_in_account_currency: DF.Currency
debit_in_reporting_currency: DF.Currency
debit_in_transaction_currency: DF.Currency
due_date: DF.Date | None
finance_book: DF.Link | None
@@ -57,6 +60,7 @@ class GLEntry(Document):
posting_date: DF.Date | None
project: DF.Link | None
remarks: DF.Text | None
reporting_currency_exchange_rate: DF.Float
to_rename: DF.Check
transaction_currency: DF.Link | None
transaction_date: DF.Date | None
@@ -88,6 +92,8 @@ class GLEntry(Document):
self.validate_party()
self.validate_currency()
self.set_amount_in_reporting_currency()
def on_update(self):
adv_adj = self.flags.adv_adj
if not self.flags.from_repost and self.voucher_type != "Period Closing Voucher":
@@ -131,18 +137,20 @@ class GLEntry(Document):
if not self.is_cancelled and not (self.party_type and self.party):
account_type = frappe.get_cached_value("Account", self.account, "account_type")
if account_type == "Receivable":
frappe.throw(
_("{0} {1}: Customer is required against Receivable account {2}").format(
self.voucher_type, self.voucher_no, self.account
if not frappe.flags.party_not_required: # skipping validation if party is not required
if account_type == "Receivable":
frappe.throw(
_("{0} {1}: Customer is required against Receivable account {2}").format(
self.voucher_type, self.voucher_no, self.account
)
)
)
elif account_type == "Payable":
frappe.throw(
_("{0} {1}: Supplier is required against Payable account {2}").format(
self.voucher_type, self.voucher_no, self.account
elif account_type == "Payable":
frappe.throw(
_("{0} {1}: Supplier is required against Payable account {2}").format(
self.voucher_type, self.voucher_no, self.account
)
)
)
# Zero value transaction is not allowed
if not (
@@ -224,26 +232,23 @@ class GLEntry(Document):
def validate_account_details(self, adv_adj):
"""Account must be ledger, active and not freezed"""
ret = frappe.db.sql(
"""select is_group, docstatus, company
from tabAccount where name=%s""",
self.account,
as_dict=1,
)[0]
account = frappe.get_cached_value(
"Account", self.account, fieldname=["is_group", "docstatus", "company"], as_dict=True
)
if ret.is_group == 1:
if account.is_group == 1:
frappe.throw(
_(
"""{0} {1}: Account {2} is a Group Account and group accounts cannot be used in transactions"""
).format(self.voucher_type, self.voucher_no, self.account)
)
if ret.docstatus == 2:
if account.docstatus == 2:
frappe.throw(
_("{0} {1}: Account {2} is inactive").format(self.voucher_type, self.voucher_no, self.account)
)
if ret.company != self.company:
if account.company != self.company:
frappe.throw(
_("{0} {1}: Account {2} does not belong to Company {3}").format(
self.voucher_type, self.voucher_no, self.account, self.company
@@ -251,7 +256,7 @@ class GLEntry(Document):
)
def validate_cost_center(self):
if not self.cost_center:
if not self.cost_center or self.is_cancelled:
return
is_group, company = frappe.get_cached_value("Cost Center", self.cost_center, ["is_group", "company"])
@@ -295,6 +300,25 @@ class GLEntry(Document):
if self.party_type and self.party:
validate_party_gle_currency(self.party_type, self.party, self.company, self.account_currency)
def set_amount_in_reporting_currency(self):
default_currency, reporting_currency = frappe.get_cached_value(
"Company", self.company, ["default_currency", "reporting_currency"]
)
transaction_date = self.transaction_date or self.posting_date
self.reporting_currency_exchange_rate = get_exchange_rate(
default_currency, reporting_currency, transaction_date
)
if not self.reporting_currency_exchange_rate:
frappe.throw(
title=_("Reporting Currency Exchange Not Found"),
msg=_(
"Unable to find exchange rate for {0} to {1} for key date {2}. Please create a Currency Exchange record manually."
).format(default_currency, reporting_currency, transaction_date),
exc=ReportingCurrencyExchangeNotFoundError,
)
self.debit_in_reporting_currency = flt(self.debit * self.reporting_currency_exchange_rate)
self.credit_in_reporting_currency = flt(self.credit * self.reporting_currency_exchange_rate)
def validate_and_set_fiscal_year(self):
if not self.fiscal_year:
self.fiscal_year = get_fiscal_year(self.posting_date, company=self.company)[0]
@@ -311,7 +335,7 @@ def validate_balance_type(account, adv_adj=False):
if balance_must_be:
balance = frappe.db.sql(
"""select sum(debit) - sum(credit)
from `tabGL Entry` where account = %s""",
from `tabGL Entry` where is_cancelled = 0 and account = %s""",
account,
)[0][0]
@@ -385,7 +409,7 @@ def update_outstanding_amt(
)
)
if against_voucher_type in ["Sales Invoice", "Purchase Invoice", "Fees"]:
if against_voucher_type in OUTSTANDING_DOCTYPES:
ref_doc = frappe.get_doc(against_voucher_type, against_voucher)
# Didn't use db_set for optimization purpose

View File

@@ -196,6 +196,7 @@ frappe.ui.form.on("Journal Entry", {
});
erpnext.accounts.dimensions.update_dimension(frm, frm.doctype);
erpnext.utils.set_letter_head(frm);
},
voucher_type: function (frm) {

View File

@@ -64,6 +64,7 @@
"addtional_info",
"mode_of_payment",
"payment_order",
"party_not_required",
"column_break3",
"is_opening",
"stock_entry",
@@ -577,6 +578,14 @@
"fieldname": "get_balance_for_periodic_accounting",
"fieldtype": "Button",
"label": "Get Balance"
},
{
"default": "0",
"fieldname": "party_not_required",
"fieldtype": "Check",
"hidden": 1,
"label": "Party Not Required",
"no_copy": 1
}
],
"icon": "fa fa-file-text",
@@ -591,7 +600,7 @@
"table_fieldname": "payment_entries"
}
],
"modified": "2025-07-06 15:22:58.465131",
"modified": "2025-09-29 13:05:46.982277",
"modified_by": "Administrator",
"module": "Accounts",
"name": "Journal Entry",

View File

@@ -72,6 +72,7 @@ class JournalEntry(AccountsController):
mode_of_payment: DF.Link | None
multi_currency: DF.Check
naming_series: DF.Literal["ACC-JV-.YYYY.-"]
party_not_required: DF.Check
pay_to_recd_from: DF.Data | None
payment_order: DF.Link | None
periodic_entry_difference_account: DF.Link | None
@@ -193,10 +194,8 @@ class JournalEntry(AccountsController):
def on_submit(self):
self.validate_cheque_info()
self.check_credit_limit()
self.make_gl_entries()
self.make_advance_payment_ledger_entries()
self.update_advance_paid()
self.check_credit_limit()
self.update_asset_value()
self.update_inter_company_jv()
self.update_invoice_discounting()
@@ -298,8 +297,6 @@ class JournalEntry(AccountsController):
"Advance Payment Ledger Entry",
)
self.make_gl_entries(1)
self.make_advance_payment_ledger_entries()
self.update_advance_paid()
self.unlink_advance_entry_reference()
self.unlink_asset_reference()
self.unlink_inter_company_jv()
@@ -309,18 +306,6 @@ class JournalEntry(AccountsController):
def get_title(self):
return self.pay_to_recd_from or self.accounts[0].account
def update_advance_paid(self):
advance_paid = frappe._dict()
advance_payment_doctypes = get_advance_payment_doctypes()
for d in self.get("accounts"):
if d.is_advance:
if d.reference_type in advance_payment_doctypes:
advance_paid.setdefault(d.reference_type, []).append(d.reference_name)
for voucher_type, order_list in advance_paid.items():
for voucher_no in list(set(order_list)):
frappe.get_doc(voucher_type, voucher_no).set_total_advance_paid()
def validate_inter_company_accounts(self):
if self.voucher_type == "Inter Company Journal Entry" and self.inter_company_journal_entry_reference:
doc = frappe.db.get_value(
@@ -660,8 +645,11 @@ class JournalEntry(AccountsController):
def validate_party(self):
for d in self.get("accounts"):
account_type = frappe.get_cached_value("Account", d.account, "account_type")
if account_type in ["Receivable", "Payable"]:
if not (d.party_type and d.party):
if (
not (d.party_type and d.party) and not self.party_not_required
): # skipping validation if party_not_required is passed via payroll entry
frappe.throw(
_(
"Row {0}: Party Type and Party is required for Receivable / Payable account {1}"
@@ -670,6 +658,8 @@ class JournalEntry(AccountsController):
elif (
d.party_type
and frappe.db.get_value("Party Type", d.party_type, "account_type") != account_type
and d.party_type
!= "Employee" # making an excpetion for employee since they can be both payable and receivable
):
frappe.throw(
_("Row {0}: Account {1} and Party Type {2} have different account types").format(
@@ -1195,49 +1185,70 @@ class JournalEntry(AccountsController):
self.transaction_exchange_rate = row.exchange_rate
break
advance_doctypes = get_advance_payment_doctypes()
for d in self.get("accounts"):
if d.debit or d.credit or (self.voucher_type == "Exchange Gain Or Loss"):
r = [d.user_remark, self.remark]
r = [x for x in r if x]
remarks = "\n".join(r)
row = {
"account": d.account,
"party_type": d.party_type,
"due_date": self.due_date,
"party": d.party,
"against": d.against_account,
"debit": flt(d.debit, d.precision("debit")),
"credit": flt(d.credit, d.precision("credit")),
"account_currency": d.account_currency,
"debit_in_account_currency": flt(
d.debit_in_account_currency, d.precision("debit_in_account_currency")
),
"credit_in_account_currency": flt(
d.credit_in_account_currency, d.precision("credit_in_account_currency")
),
"transaction_currency": self.transaction_currency,
"transaction_exchange_rate": self.transaction_exchange_rate,
"debit_in_transaction_currency": flt(
d.debit_in_account_currency, d.precision("debit_in_account_currency")
)
if self.transaction_currency == d.account_currency
else flt(d.debit, d.precision("debit")) / self.transaction_exchange_rate,
"credit_in_transaction_currency": flt(
d.credit_in_account_currency, d.precision("credit_in_account_currency")
)
if self.transaction_currency == d.account_currency
else flt(d.credit, d.precision("credit")) / self.transaction_exchange_rate,
"against_voucher_type": d.reference_type,
"against_voucher": d.reference_name,
"remarks": remarks,
"voucher_detail_no": d.reference_detail_no,
"cost_center": d.cost_center,
"project": d.project,
"finance_book": self.finance_book,
"advance_voucher_type": d.advance_voucher_type,
"advance_voucher_no": d.advance_voucher_no,
}
if d.reference_type in advance_doctypes:
row.update(
{
"against_voucher_type": self.doctype,
"against_voucher": self.name,
"advance_voucher_type": d.reference_type,
"advance_voucher_no": d.reference_name,
}
)
# set flag to skip party validation
account_type = frappe.get_cached_value("Account", d.account, "account_type")
if account_type in ["Receivable", "Payable"] and self.party_not_required:
frappe.flags.party_not_required = True
gl_map.append(
self.get_gl_dict(
{
"account": d.account,
"party_type": d.party_type,
"due_date": self.due_date,
"party": d.party,
"against": d.against_account,
"debit": flt(d.debit, d.precision("debit")),
"credit": flt(d.credit, d.precision("credit")),
"account_currency": d.account_currency,
"debit_in_account_currency": flt(
d.debit_in_account_currency, d.precision("debit_in_account_currency")
),
"credit_in_account_currency": flt(
d.credit_in_account_currency, d.precision("credit_in_account_currency")
),
"transaction_currency": self.transaction_currency,
"transaction_exchange_rate": self.transaction_exchange_rate,
"debit_in_transaction_currency": flt(
d.debit_in_account_currency, d.precision("debit_in_account_currency")
)
if self.transaction_currency == d.account_currency
else flt(d.debit, d.precision("debit")) / self.transaction_exchange_rate,
"credit_in_transaction_currency": flt(
d.credit_in_account_currency, d.precision("credit_in_account_currency")
)
if self.transaction_currency == d.account_currency
else flt(d.credit, d.precision("credit")) / self.transaction_exchange_rate,
"against_voucher_type": d.reference_type,
"against_voucher": d.reference_name,
"remarks": remarks,
"voucher_detail_no": d.reference_detail_no,
"cost_center": d.cost_center,
"project": d.project,
"finance_book": self.finance_book,
},
row,
item=d,
)
)
@@ -1262,6 +1273,7 @@ class JournalEntry(AccountsController):
merge_entries=merge_entries,
update_outstanding=update_outstanding,
)
frappe.flags.party_not_required = False
if cancel:
cancel_exchange_gain_loss_journal(frappe._dict(doctype=self.doctype, name=self.name))
@@ -1794,6 +1806,14 @@ def make_inter_company_journal_entry(name, voucher_type, company):
@frappe.whitelist()
def make_reverse_journal_entry(source_name, target_doc=None):
existing_reverse = frappe.db.exists("Journal Entry", {"reversal_of": source_name, "docstatus": 1})
if existing_reverse:
frappe.throw(
_("A Reverse Journal Entry {0} already exists for this Journal Entry.").format(
get_link_to_form("Journal Entry", existing_reverse)
)
)
from frappe.model.mapper import get_mapped_doc
def post_process(source, target):

View File

@@ -8,6 +8,7 @@ from frappe.utils import flt, nowdate
from erpnext.accounts.doctype.account.test_account import get_inventory_account
from erpnext.accounts.doctype.journal_entry.journal_entry import StockAccountInvalidTransaction
from erpnext.exceptions import InvalidAccountCurrency
from erpnext.selling.doctype.customer.test_customer import make_customer, set_credit_limit
class TestJournalEntry(IntegrationTestCase):
@@ -591,6 +592,15 @@ class TestJournalEntry(IntegrationTestCase):
self.assertEqual(jv.pay_to_recd_from, "_Test Receiver 2")
def test_credit_limit_for_customer(self):
customer = make_customer("_Test New Customer")
set_credit_limit("_Test New Customer", "_Test Company", 50)
jv = make_journal_entry(account1="Debtors - _TC", account2="_Test Cash - _TC", amount=100, save=False)
jv.accounts[0].party_type = "Customer"
jv.accounts[0].party = customer
jv.save()
self.assertRaises(frappe.ValidationError, jv.submit)
def make_journal_entry(
account1,

View File

@@ -32,6 +32,8 @@
"reference_name",
"reference_due_date",
"reference_detail_no",
"advance_voucher_type",
"advance_voucher_no",
"col_break3",
"is_advance",
"user_remark",
@@ -262,20 +264,37 @@
"hidden": 1,
"label": "Reference Detail No",
"no_copy": 1
},
{
"fieldname": "advance_voucher_type",
"fieldtype": "Link",
"label": "Advance Voucher Type",
"no_copy": 1,
"options": "DocType",
"read_only": 1
},
{
"fieldname": "advance_voucher_no",
"fieldtype": "Dynamic Link",
"label": "Advance Voucher No",
"no_copy": 1,
"options": "advance_voucher_type",
"read_only": 1
}
],
"idx": 1,
"istable": 1,
"links": [],
"modified": "2024-03-27 13:09:58.647732",
"modified": "2025-09-29 13:01:48.916517",
"modified_by": "Administrator",
"module": "Accounts",
"name": "Journal Entry Account",
"naming_rule": "Random",
"owner": "Administrator",
"permissions": [],
"row_format": "Dynamic",
"sort_field": "creation",
"sort_order": "DESC",
"states": [],
"track_changes": 1
}
}

View File

@@ -17,8 +17,9 @@ class JournalEntryAccount(Document):
account: DF.Link
account_currency: DF.Link | None
account_type: DF.Data | None
advance_voucher_no: DF.DynamicLink | None
advance_voucher_type: DF.Link | None
against_account: DF.Text | None
balance: DF.Currency
bank_account: DF.Link | None
cost_center: DF.Link | None
credit: DF.Currency
@@ -31,7 +32,6 @@ class JournalEntryAccount(Document):
parentfield: DF.Data
parenttype: DF.Data
party: DF.DynamicLink | None
party_balance: DF.Currency
party_type: DF.Link | None
project: DF.Link | None
reference_detail_no: DF.Data | None

View File

@@ -25,6 +25,7 @@
"accounting_dimensions_section",
"cost_center",
"dimension_col_break",
"project",
"help_section",
"loyalty_program_help"
],
@@ -144,6 +145,12 @@
{
"fieldname": "dimension_col_break",
"fieldtype": "Column Break"
},
{
"fieldname": "project",
"fieldtype": "Link",
"label": "Project",
"options": "Project"
}
],
"links": [],

View File

@@ -5,6 +5,7 @@
import frappe
from frappe import _
from frappe.model.document import Document
from frappe.query_builder.functions import Sum
from frappe.utils import flt, today
@@ -55,22 +56,30 @@ def get_loyalty_details(
if not expiry_date:
expiry_date = today()
condition = ""
if company:
condition = " and company=%s " % frappe.db.escape(company)
if not include_expired_entry:
condition += " and expiry_date>='%s' " % expiry_date
LoyaltyPointEntry = frappe.qb.DocType("Loyalty Point Entry")
loyalty_point_details = frappe.db.sql(
f"""select sum(loyalty_points) as loyalty_points,
sum(purchase_amount) as total_spent from `tabLoyalty Point Entry`
where customer=%s and loyalty_program=%s and posting_date <= %s
{condition}
group by customer""",
(customer, loyalty_program, expiry_date),
as_dict=1,
query = (
frappe.qb.from_(LoyaltyPointEntry)
.select(
Sum(LoyaltyPointEntry.loyalty_points).as_("loyalty_points"),
Sum(LoyaltyPointEntry.purchase_amount).as_("total_spent"),
)
.where(
(LoyaltyPointEntry.customer == customer)
& (LoyaltyPointEntry.loyalty_program == loyalty_program)
& (LoyaltyPointEntry.posting_date <= expiry_date)
)
.groupby(LoyaltyPointEntry.customer)
)
if company:
query = query.where(LoyaltyPointEntry.company == company)
if not include_expired_entry:
query = query.where(LoyaltyPointEntry.expiry_date >= expiry_date)
loyalty_point_details = query.run(as_dict=True)
if loyalty_point_details:
return loyalty_point_details[0]
else:

View File

@@ -14,6 +14,7 @@
"accounting_dimensions_section",
"cost_center",
"dimension_col_break",
"project",
"section_break_4",
"invoices"
],
@@ -63,6 +64,12 @@
"label": "Cost Center",
"options": "Cost Center"
},
{
"fieldname": "project",
"fieldtype": "Link",
"label": "Project",
"options": "Project"
},
{
"collapsible": 1,
"fieldname": "accounting_dimensions_section",

View File

@@ -74,6 +74,6 @@ def create_party_link(primary_role, primary_party, secondary_party):
party_link.secondary_role = "Customer" if primary_role == "Supplier" else "Supplier"
party_link.secondary_party = secondary_party
party_link.save(ignore_permissions=True)
party_link.save()
return party_link

View File

@@ -273,6 +273,7 @@ frappe.ui.form.on("Payment Entry", {
frm.events.hide_unhide_fields(frm);
frm.events.set_dynamic_labels(frm);
erpnext.accounts.dimensions.update_dimension(frm, frm.doctype);
erpnext.utils.set_letter_head(frm);
},
contact_person: function (frm) {
@@ -584,6 +585,7 @@ frappe.ui.form.on("Payment Entry", {
if (frm.doc.payment_type == "Pay") {
frm.events.paid_amount(frm);
}
frm.events.paid_from_account_currency(frm);
}
);
},
@@ -606,6 +608,7 @@ frappe.ui.form.on("Payment Entry", {
frm.events.received_amount(frm);
}
}
frm.events.paid_to_account_currency(frm);
}
);
},

View File

@@ -199,12 +199,10 @@ class PaymentEntry(AccountsController):
def on_submit(self):
if self.difference_amount:
frappe.throw(_("Difference Amount must be zero"))
self.update_payment_requests()
self.update_payment_schedule()
self.make_gl_entries()
self.update_outstanding_amounts()
self.update_payment_schedule()
self.update_payment_requests()
self.make_advance_payment_ledger_entries()
self.update_advance_paid() # advance_paid_status depends on the payment request amount
self.set_status()
def validate_for_repost(self):
@@ -304,13 +302,11 @@ class PaymentEntry(AccountsController):
"Advance Payment Ledger Entry",
)
super().on_cancel()
self.update_payment_requests(cancel=True)
self.update_payment_schedule(cancel=1)
self.make_gl_entries(cancel=1)
self.update_outstanding_amounts()
self.delink_advance_entry_references()
self.update_payment_schedule(cancel=1)
self.update_payment_requests(cancel=True)
self.make_advance_payment_ledger_entries()
self.update_advance_paid() # advance_paid_status depends on the payment request amount
self.set_status()
def update_payment_requests(self, cancel=False):
@@ -1439,23 +1435,27 @@ class PaymentEntry(AccountsController):
dr_or_cr + "_in_transaction_currency": d.allocated_amount
if self.transaction_currency == self.party_account_currency
else allocated_amount_in_company_currency / self.transaction_exchange_rate,
"advance_voucher_type": d.advance_voucher_type,
"advance_voucher_no": d.advance_voucher_no,
},
item=self,
)
)
if self.book_advance_payments_in_separate_party_account:
if d.reference_doctype in advance_payment_doctypes:
# Upon reconciliation, whole ledger will be reposted. So, reference to SO/PO is fine
gle.update(
{
"against_voucher_type": d.reference_doctype,
"against_voucher": d.reference_name,
}
)
else:
# Do not reference Invoices while Advance is in separate party account
gle.update({"against_voucher_type": self.doctype, "against_voucher": self.name})
if d.reference_doctype in advance_payment_doctypes:
# advance reference
gle.update(
{
"against_voucher_type": self.doctype,
"against_voucher": self.name,
"advance_voucher_type": d.reference_doctype,
"advance_voucher_no": d.reference_name,
}
)
elif self.book_advance_payments_in_separate_party_account:
# Do not reference Invoices while Advance is in separate party account
gle.update({"against_voucher_type": self.doctype, "against_voucher": self.name})
else:
gle.update(
{
@@ -1560,13 +1560,14 @@ class PaymentEntry(AccountsController):
"voucher_no": self.name,
"voucher_detail_no": invoice.name,
}
if invoice.reconcile_effect_on:
posting_date = invoice.reconcile_effect_on
else:
# For backwards compatibility
# Supporting reposting on payment entries reconciled before select field introduction
posting_date = get_reconciliation_effect_date(invoice, self.company, self.posting_date)
posting_date = get_reconciliation_effect_date(
invoice.reference_doctype, invoice.reference_name, self.company, self.posting_date
)
frappe.db.set_value("Payment Entry Reference", invoice.name, "reconcile_effect_on", posting_date)
dr_or_cr, account = self.get_dr_and_account_for_advances(invoice)
@@ -1584,6 +1585,8 @@ class PaymentEntry(AccountsController):
{
"against_voucher_type": invoice.reference_doctype,
"against_voucher": invoice.reference_name,
"advance_voucher_type": invoice.advance_voucher_type,
"advance_voucher_no": invoice.advance_voucher_no,
"posting_date": posting_date,
}
)
@@ -1608,6 +1611,8 @@ class PaymentEntry(AccountsController):
{
"against_voucher_type": "Payment Entry",
"against_voucher": self.name,
"advance_voucher_type": invoice.advance_voucher_type,
"advance_voucher_no": invoice.advance_voucher_no,
}
)
gle = self.get_gl_dict(
@@ -1756,17 +1761,6 @@ class PaymentEntry(AccountsController):
return flt(gl_dict.get(field, 0) / (conversion_rate or 1))
def update_advance_paid(self):
if self.payment_type not in ("Receive", "Pay") or not self.party:
return
advance_payment_doctypes = get_advance_payment_doctypes()
for d in self.get("references"):
if d.allocated_amount and d.reference_doctype in advance_payment_doctypes:
frappe.get_lazy_doc(
d.reference_doctype, d.reference_name, for_update=True
).set_total_advance_paid()
def on_recurring(self, reference_doc, auto_repeat_doc):
self.reference_no = reference_doc.name
self.reference_date = nowdate()

View File

@@ -52,7 +52,7 @@ class TestPaymentEntry(IntegrationTestCase):
self.assertEqual(pe.paid_to_account_type, "Cash")
expected_gle = dict(
(d[0], d) for d in [["Debtors - _TC", 0, 1000, so.name], ["_Test Cash - _TC", 1000.0, 0, None]]
(d[0], d) for d in [["Debtors - _TC", 0, 1000, pe.name], ["_Test Cash - _TC", 1000.0, 0, None]]
)
self.validate_gl_entries(pe.name, expected_gle)
@@ -84,7 +84,7 @@ class TestPaymentEntry(IntegrationTestCase):
expected_gle = dict(
(d[0], d)
for d in [["_Test Receivable USD - _TC", 0, 5500, so.name], [pe.paid_to, 5500.0, 0, None]]
for d in [["_Test Receivable USD - _TC", 0, 5500, pe.name], [pe.paid_to, 5500.0, 0, None]]
)
self.validate_gl_entries(pe.name, expected_gle)

View File

@@ -22,7 +22,9 @@
"exchange_gain_loss",
"account",
"payment_request",
"payment_request_outstanding"
"payment_request_outstanding",
"advance_voucher_type",
"advance_voucher_no"
],
"fields": [
{
@@ -151,20 +153,37 @@
"fieldtype": "Date",
"label": "Reconcile Effect On",
"read_only": 1
},
{
"columns": 2,
"fieldname": "advance_voucher_type",
"fieldtype": "Link",
"label": "Advance Voucher Type",
"options": "DocType",
"read_only": 1
},
{
"columns": 2,
"fieldname": "advance_voucher_no",
"fieldtype": "Dynamic Link",
"label": "Advance Voucher No",
"options": "advance_voucher_type",
"read_only": 1
}
],
"index_web_pages_for_search": 1,
"istable": 1,
"links": [],
"modified": "2025-01-13 15:56:18.895082",
"modified": "2025-07-25 04:32:11.040025",
"modified_by": "Administrator",
"module": "Accounts",
"name": "Payment Entry Reference",
"owner": "Administrator",
"permissions": [],
"quick_entry": 1,
"row_format": "Dynamic",
"sort_field": "creation",
"sort_order": "DESC",
"states": [],
"track_changes": 1
}
}

View File

@@ -16,6 +16,8 @@ class PaymentEntryReference(Document):
account: DF.Link | None
account_type: DF.Data | None
advance_voucher_no: DF.DynamicLink | None
advance_voucher_type: DF.Link | None
allocated_amount: DF.Float
bill_no: DF.Data | None
due_date: DF.Date | None
@@ -26,7 +28,6 @@ class PaymentEntryReference(Document):
parentfield: DF.Data
parenttype: DF.Data
payment_request: DF.Link | None
payment_request_outstanding: DF.Float
payment_term: DF.Link | None
payment_term_outstanding: DF.Float
payment_type: DF.Data | None

View File

@@ -8,4 +8,14 @@ frappe.ui.form.on("Payment Gateway Account", {
frm.set_df_property("payment_gateway", "read_only", 1);
}
},
setup(frm) {
frm.set_query("payment_account", function () {
return {
filters: {
company: frm.doc.company,
},
};
});
},
});

View File

@@ -7,6 +7,7 @@
"field_order": [
"payment_gateway",
"payment_channel",
"company",
"is_default",
"column_break_4",
"payment_account",
@@ -71,11 +72,21 @@
"fieldtype": "Select",
"label": "Payment Channel",
"options": "\nEmail\nPhone\nOther"
},
{
"fieldname": "company",
"fieldtype": "Link",
"in_list_view": 1,
"label": "Company",
"options": "Company",
"print_hide": 1,
"remember_last_selected_value": 1,
"reqd": 1
}
],
"index_web_pages_for_search": 1,
"links": [],
"modified": "2024-03-29 18:53:09.836254",
"modified": "2025-07-14 16:49:55.210352",
"modified_by": "Administrator",
"module": "Accounts",
"name": "Payment Gateway Account",
@@ -94,6 +105,7 @@
"write": 1
}
],
"row_format": "Dynamic",
"sort_field": "creation",
"sort_order": "DESC",
"states": []

View File

@@ -15,6 +15,7 @@ class PaymentGatewayAccount(Document):
if TYPE_CHECKING:
from frappe.types import DF
company: DF.Link
currency: DF.ReadOnly | None
is_default: DF.Check
message: DF.SmallText | None
@@ -24,7 +25,8 @@ class PaymentGatewayAccount(Document):
# end: auto-generated types
def autoname(self):
self.name = self.payment_gateway + " - " + self.currency
abbr = frappe.db.get_value("Company", self.company, "abbr")
self.name = self.payment_gateway + " - " + self.currency + " - " + abbr
def validate(self):
self.currency = frappe.get_cached_value("Account", self.payment_account, "account_currency")
@@ -34,13 +36,15 @@ class PaymentGatewayAccount(Document):
def update_default_payment_gateway(self):
if self.is_default:
frappe.db.sql(
"""update `tabPayment Gateway Account` set is_default = 0
where is_default = 1 """
frappe.db.set_value(
"Payment Gateway Account",
{"is_default": 1, "name": ["!=", self.name], "company": self.company},
"is_default",
0,
)
def set_as_default_if_not_set(self):
if not frappe.db.get_value(
"Payment Gateway Account", {"is_default": 1, "name": ("!=", self.name)}, "name"
if not frappe.db.exists(
"Payment Gateway Account", {"is_default": 1, "name": ("!=", self.name), "company": self.company}
):
self.is_default = 1

View File

@@ -197,4 +197,4 @@
"sort_field": "creation",
"sort_order": "DESC",
"states": []
}
}

View File

@@ -16,7 +16,7 @@ from erpnext.accounts.doctype.gl_entry.gl_entry import (
validate_balance_type,
validate_frozen_account,
)
from erpnext.accounts.utils import update_voucher_outstanding
from erpnext.accounts.utils import OUTSTANDING_DOCTYPES, update_voucher_outstanding
from erpnext.exceptions import InvalidAccountDimensionError, MandatoryAccountDimensionError
@@ -51,38 +51,36 @@ class PaymentLedgerEntry(Document):
# end: auto-generated types
def validate_account(self):
valid_account = frappe.db.get_list(
"Account",
"name",
filters={"name": self.account, "account_type": self.account_type, "company": self.company},
ignore_permissions=True,
account = frappe.get_cached_value(
"Account", self.account, fieldname=["account_type", "company"], as_dict=True
)
if not valid_account:
if account.company != self.company:
frappe.throw(_("{0} account is not of company {1}").format(self.account, self.company))
if account.account_type != self.account_type:
frappe.throw(_("{0} account is not of type {1}").format(self.account, self.account_type))
def validate_account_details(self):
"""Account must be ledger, active and not freezed"""
ret = frappe.db.sql(
"""select is_group, docstatus, company
from tabAccount where name=%s""",
self.account,
as_dict=1,
)[0]
account = frappe.get_cached_value(
"Account", self.account, fieldname=["is_group", "docstatus", "company"], as_dict=True
)
if ret.is_group == 1:
if account.is_group == 1:
frappe.throw(
_(
"""{0} {1}: Account {2} is a Group Account and group accounts cannot be used in transactions"""
).format(self.voucher_type, self.voucher_no, self.account)
)
if ret.docstatus == 2:
if account.docstatus == 2:
frappe.throw(
_("{0} {1}: Account {2} is inactive").format(self.voucher_type, self.voucher_no, self.account)
)
if ret.company != self.company:
if account.company != self.company:
frappe.throw(
_("{0} {1}: Account {2} does not belong to Company {3}").format(
self.voucher_type, self.voucher_no, self.account, self.company
@@ -170,7 +168,7 @@ class PaymentLedgerEntry(Document):
# update outstanding amount
if (
self.against_voucher_type in ["Journal Entry", "Sales Invoice", "Purchase Invoice", "Fees"]
self.against_voucher_type in OUTSTANDING_DOCTYPES
and self.flags.update_outstanding == "Yes"
and not frappe.flags.is_reverse_depr_entry
):

View File

@@ -28,6 +28,7 @@
"accounting_dimensions_section",
"cost_center",
"dimension_col_break",
"project",
"sec_break1",
"invoice_name",
"invoices",
@@ -194,6 +195,12 @@
"label": "Cost Center",
"options": "Cost Center"
},
{
"fieldname": "project",
"fieldtype": "Link",
"label": "Project",
"options": "Project"
},
{
"depends_on": "eval:doc.party",
"description": "Only 'Payment Entries' made against this advance account are supported.",

View File

@@ -5,6 +5,7 @@
import frappe
from frappe import _, msgprint, qb
from frappe.model.document import Document
from frappe.model.meta import get_field_precision
from frappe.query_builder import Criterion
from frappe.query_builder.custom import ConstantColumn
from frappe.utils import flt, fmt_money, get_link_to_form, getdate, nowdate, today
@@ -392,6 +393,12 @@ class PaymentReconciliation(Document):
inv.outstanding_amount = flt(entry.get("outstanding_amount"))
def get_difference_amount(self, payment_entry, invoice, allocated_amount):
allocated_amount_precision = get_field_precision(
frappe.get_meta("Payment Reconciliation Allocation").get_field("allocated_amount")
)
difference_amount_precision = get_field_precision(
frappe.get_meta("Payment Reconciliation Allocation").get_field("difference_amount")
)
difference_amount = 0
if frappe.get_cached_value(
"Account", self.receivable_payable_account, "account_currency"
@@ -399,8 +406,14 @@ class PaymentReconciliation(Document):
if invoice.get("exchange_rate") and payment_entry.get("exchange_rate", 1) != invoice.get(
"exchange_rate", 1
):
allocated_amount_in_ref_rate = payment_entry.get("exchange_rate", 1) * allocated_amount
allocated_amount_in_inv_rate = invoice.get("exchange_rate", 1) * allocated_amount
allocated_amount_in_ref_rate = flt(
payment_entry.get("exchange_rate", 1) * flt(allocated_amount, allocated_amount_precision),
difference_amount_precision,
)
allocated_amount_in_inv_rate = flt(
invoice.get("exchange_rate", 1) * flt(allocated_amount, allocated_amount_precision),
difference_amount_precision,
)
difference_amount = allocated_amount_in_ref_rate - allocated_amount_in_inv_rate
return difference_amount
@@ -576,6 +589,7 @@ class PaymentReconciliation(Document):
"difference_amount": flt(row.get("difference_amount")),
"difference_account": row.get("difference_account"),
"difference_posting_date": row.get("gain_loss_posting_date"),
"debit_or_credit_note_posting_date": row.get("debit_or_credit_note_posting_date"),
"cost_center": row.get("cost_center"),
}
)
@@ -765,7 +779,7 @@ def reconcile_dr_cr_note(dr_cr_notes, company, active_dimensions=None):
{
"doctype": "Journal Entry",
"voucher_type": voucher_type,
"posting_date": today(),
"posting_date": inv.get("debit_or_credit_note_posting_date") or today(),
"company": company,
"multi_currency": 1 if inv.currency != company_currency else 0,
"accounts": [

View File

@@ -1714,6 +1714,67 @@ class TestPaymentReconciliation(IntegrationTestCase):
)
self.assertEqual(len(pl_entries), 3)
def test_advance_payment_reconciliation_date_for_older_date(self):
old_settings = frappe.db.get_value(
"Company",
self.company,
[
"reconciliation_takes_effect_on",
"default_advance_paid_account",
"book_advance_payments_in_separate_party_account",
],
as_dict=True,
)
frappe.db.set_value(
"Company",
self.company,
{
"book_advance_payments_in_separate_party_account": 1,
"default_advance_paid_account": self.advance_payable_account,
"reconciliation_takes_effect_on": "Oldest Of Invoice Or Advance",
},
)
self.supplier = "_Test Supplier"
pi1 = self.create_purchase_invoice(qty=10, rate=100)
po = self.create_purchase_order(qty=10, rate=100)
pay = get_payment_entry(po.doctype, po.name)
pay.paid_amount = 1000
pay.save().submit()
pr = frappe.new_doc("Payment Reconciliation")
pr.company = self.company
pr.party_type = "Supplier"
pr.party = self.supplier
pr.receivable_payable_account = get_party_account(pr.party_type, pr.party, pr.company)
pr.default_advance_account = self.advance_payable_account
pr.get_unreconciled_entries()
invoices = [x.as_dict() for x in pr.invoices]
payments = [x.as_dict() for x in pr.payments]
pr.allocate_entries(frappe._dict({"invoices": invoices, "payments": payments}))
pr.allocation[0].allocated_amount = 100
pr.reconcile()
pay.reload()
self.assertEqual(getdate(pay.references[0].reconcile_effect_on), getdate(pi1.posting_date))
# test setting of date if not available
frappe.db.set_value("Payment Entry Reference", pay.references[1].name, "reconcile_effect_on", None)
pay.reload()
pay.cancel()
pay.reload()
pi1.reload()
po.reload()
self.assertEqual(getdate(pay.references[0].reconcile_effect_on), getdate(pi1.posting_date))
pi1.cancel()
po.cancel()
frappe.db.set_value("Company", self.company, old_settings)
def test_advance_payment_reconciliation_against_journal_for_customer(self):
frappe.db.set_value(
"Company",
@@ -2147,6 +2208,138 @@ class TestPaymentReconciliation(IntegrationTestCase):
self.assertEqual(len(pr.get("payments")), 0)
self.assertEqual(pr.get("invoices")[0].get("outstanding_amount"), 200)
def test_partial_advance_payment_with_closed_fiscal_year(self):
"""
Test Advance Payment partial reconciliation before period closing and partial after period closing
"""
default_settings = frappe.db.get_value(
"Company",
self.company,
[
"book_advance_payments_in_separate_party_account",
"default_advance_paid_account",
"reconciliation_takes_effect_on",
],
as_dict=True,
)
first_fy_start_date = frappe.db.get_value(
"Fiscal Year", {"disabled": 0}, [{"MIN": "year_start_date"}]
)
prev_fy_start_date = add_years(first_fy_start_date, -1)
prev_fy_end_date = add_days(first_fy_start_date, -1)
create_fiscal_year(
company=self.company, year_start_date=prev_fy_start_date, year_end_date=prev_fy_end_date
)
frappe.db.set_value(
"Company",
self.company,
{
"book_advance_payments_in_separate_party_account": 1,
"default_advance_paid_account": self.advance_payable_account,
"reconciliation_takes_effect_on": "Oldest Of Invoice Or Advance",
},
)
self.supplier = "_Test Supplier"
# Create advance payment of 1000 (previous FY)
pe = self.create_payment_entry(amount=1000, posting_date=prev_fy_start_date)
pe.party_type = "Supplier"
pe.party = self.supplier
pe.payment_type = "Pay"
pe.paid_from = self.cash
pe.paid_to = self.advance_payable_account
pe.save().submit()
# Create purchase invoice of 600 (previous FY)
pi1 = self.create_purchase_invoice(qty=1, rate=600, do_not_submit=True)
pi1.posting_date = prev_fy_start_date
pi1.set_posting_time = 1
pi1.supplier = self.supplier
pi1.credit_to = self.creditors
pi1.save().submit()
# Reconcile advance payment
pr = self.create_payment_reconciliation(party_is_customer=False)
pr.party = self.supplier
pr.receivable_payable_account = self.creditors
pr.default_advance_account = self.advance_payable_account
pr.from_invoice_date = pr.to_invoice_date = pi1.posting_date
pr.from_payment_date = pr.to_payment_date = pe.posting_date
pr.get_unreconciled_entries()
invoices = [x.as_dict() for x in pr.invoices if x.invoice_number == pi1.name]
payments = [x.as_dict() for x in pr.payments if x.reference_name == pe.name]
pr.allocate_entries(frappe._dict({"invoices": invoices, "payments": payments}))
pr.reconcile()
# Verify partial reconciliation
pe.reload()
pi1.reload()
self.assertEqual(len(pe.references), 1)
self.assertEqual(pe.references[0].allocated_amount, 600)
self.assertEqual(flt(pe.unallocated_amount), 400)
self.assertEqual(pi1.outstanding_amount, 0)
self.assertEqual(pi1.status, "Paid")
# Close accounting period for March (previous FY)
pcv = make_period_closing_voucher(
company=self.company, cost_center=self.cost_center, posting_date=prev_fy_end_date
)
pcv.reload()
self.assertEqual(pcv.gle_processing_status, "Completed")
# Change reconciliation setting to "Reconciliation Date"
frappe.db.set_value(
"Company",
self.company,
"reconciliation_takes_effect_on",
"Reconciliation Date",
)
# Create new purchase invoice for 400 in new fiscal year
pi2 = self.create_purchase_invoice(qty=1, rate=400, do_not_submit=True)
pi2.posting_date = today()
pi2.set_posting_time = 1
pi2.supplier = self.supplier
pi2.currency = "INR"
pi2.credit_to = self.creditors
pi2.save()
pi2.submit()
# Allocate 600 from advance payment to purchase invoice
pr = self.create_payment_reconciliation(party_is_customer=False)
pr.party = self.supplier
pr.receivable_payable_account = self.creditors
pr.default_advance_account = self.advance_payable_account
pr.from_invoice_date = pr.to_invoice_date = pi2.posting_date
pr.from_payment_date = pr.to_payment_date = pe.posting_date
pr.get_unreconciled_entries()
invoices = [x.as_dict() for x in pr.invoices if x.invoice_number == pi2.name]
payments = [x.as_dict() for x in pr.payments if x.reference_name == pe.name]
pr.allocate_entries(frappe._dict({"invoices": invoices, "payments": payments}))
pr.reconcile()
pe.reload()
pi2.reload()
# Assert advance payment is fully allocated
self.assertEqual(len(pe.references), 2)
self.assertEqual(flt(pe.unallocated_amount), 0)
# Assert new invoice is fully paid
self.assertEqual(pi2.outstanding_amount, 0)
self.assertEqual(pi2.status, "Paid")
# Verify reconciliation dates are correct based on company setting
self.assertEqual(getdate(pe.references[0].reconcile_effect_on), getdate(pi1.posting_date))
self.assertEqual(getdate(pe.references[1].reconcile_effect_on), getdate(pi2.posting_date))
frappe.db.set_value("Company", self.company, default_settings)
def make_customer(customer_name, currency=None):
if not frappe.db.exists("Customer", customer_name):

View File

@@ -20,6 +20,7 @@
"section_break_5",
"difference_amount",
"gain_loss_posting_date",
"debit_or_credit_note_posting_date",
"column_break_7",
"difference_account",
"exchange_rate",
@@ -168,19 +169,25 @@
{
"fieldname": "dimension_col_break",
"fieldtype": "Column Break"
},
{
"fieldname": "debit_or_credit_note_posting_date",
"fieldtype": "Date",
"label": "Debit / Credit Note Posting Date"
}
],
"is_virtual": 1,
"istable": 1,
"links": [],
"modified": "2024-03-27 13:10:10.704417",
"modified": "2025-08-20 19:12:50.406769",
"modified_by": "Administrator",
"module": "Accounts",
"name": "Payment Reconciliation Allocation",
"owner": "Administrator",
"permissions": [],
"row_format": "Dynamic",
"sort_field": "creation",
"sort_order": "DESC",
"states": [],
"track_changes": 1
}
}

View File

@@ -18,6 +18,7 @@ class PaymentReconciliationAllocation(Document):
amount: DF.Currency
cost_center: DF.Link | None
currency: DF.Link | None
debit_or_credit_note_posting_date: DF.Date | None
difference_account: DF.Link | None
difference_amount: DF.Currency
exchange_rate: DF.Float

View File

@@ -9,6 +9,14 @@ frappe.ui.form.on("Payment Request", {
query: "erpnext.setup.doctype.party_type.party_type.get_party_type",
};
});
frm.set_query("payment_gateway_account", function () {
return {
filters: {
company: frm.doc.company,
},
};
});
},
});

View File

@@ -228,7 +228,8 @@
"fetch_from": "bank_account.iban",
"fieldname": "iban",
"fieldtype": "Read Only",
"label": "IBAN"
"label": "IBAN",
"options": "IBAN"
},
{
"fetch_from": "bank_account.branch_code",
@@ -458,11 +459,12 @@
"label": "Phone Number"
}
],
"grid_page_length": 50,
"in_create": 1,
"index_web_pages_for_search": 1,
"is_submittable": 1,
"links": [],
"modified": "2025-01-04 05:39:32.448857",
"modified": "2025-08-29 11:52:48.555415",
"modified_by": "Administrator",
"module": "Accounts",
"name": "Payment Request",
@@ -497,8 +499,9 @@
"write": 1
}
],
"row_format": "Dynamic",
"show_preview_popup": 1,
"sort_field": "creation",
"sort_order": "DESC",
"states": []
}
}

View File

@@ -129,7 +129,13 @@ class PaymentRequest(Document):
existing_payment_request_amount = flt(get_existing_payment_request_amount(ref_doc))
if existing_payment_request_amount + flt(self.grand_total) > ref_amount:
if (
flt(
existing_payment_request_amount + flt(self.grand_total, self.precision("grand_total")),
get_currency_precision(),
)
> ref_amount
):
frappe.throw(
_("Total Payment Request amount cannot be greater than {0} amount").format(
self.reference_doctype
@@ -534,7 +540,8 @@ def make_payment_request(**args):
frappe.throw(_("Payment Requests cannot be created against: {0}").format(frappe.bold(args.dt)))
ref_doc = args.ref_doc or frappe.get_doc(args.dt, args.dn)
if not args.get("company"):
args.company = ref_doc.company
gateway_account = get_gateway_details(args) or frappe._dict()
grand_total = get_amount(ref_doc, gateway_account.get("payment_account"))
@@ -781,7 +788,7 @@ def get_gateway_details(args): # nosemgrep
"""
Return gateway and payment account of default payment gateway
"""
gateway_account = args.get("payment_gateway_account", {"is_default": 1})
gateway_account = args.get("payment_gateway_account", {"is_default": 1, "company": args.company})
return get_payment_gateway_account(gateway_account)

View File

@@ -34,12 +34,14 @@ payment_method = [
"payment_gateway": "_Test Gateway",
"payment_account": "_Test Bank - _TC",
"currency": "INR",
"company": "_Test Company",
},
{
"doctype": "Payment Gateway Account",
"payment_gateway": "_Test Gateway",
"payment_account": "_Test Bank USD - _TC",
"currency": "USD",
"company": "_Test Company",
},
{
"doctype": "Payment Gateway Account",
@@ -47,6 +49,7 @@ payment_method = [
"payment_account": "_Test Bank USD - _TC",
"payment_channel": "Other",
"currency": "USD",
"company": "_Test Company",
},
{
"doctype": "Payment Gateway Account",
@@ -54,6 +57,7 @@ payment_method = [
"payment_account": "_Test Bank USD - _TC",
"payment_channel": "Phone",
"currency": "USD",
"company": "_Test Company",
},
]
@@ -67,7 +71,11 @@ class TestPaymentRequest(IntegrationTestCase):
for method in payment_method:
if not frappe.db.get_value(
"Payment Gateway Account",
{"payment_gateway": method["payment_gateway"], "currency": method["currency"]},
{
"payment_gateway": method["payment_gateway"],
"currency": method["currency"],
"company": method["company"],
},
"name",
):
frappe.get_doc(method).insert(ignore_permissions=True)
@@ -103,7 +111,7 @@ class TestPaymentRequest(IntegrationTestCase):
dt="Sales Order",
dn=so_inr.name,
recipient_id="saurabh@erpnext.com",
payment_gateway_account="_Test Gateway - INR",
payment_gateway_account="_Test Gateway - INR - _TC",
)
self.assertEqual(pr.reference_doctype, "Sales Order")
@@ -117,7 +125,7 @@ class TestPaymentRequest(IntegrationTestCase):
dt="Sales Invoice",
dn=si_usd.name,
recipient_id="saurabh@erpnext.com",
payment_gateway_account="_Test Gateway - USD",
payment_gateway_account="_Test Gateway - USD - _TC",
)
self.assertEqual(pr.reference_doctype, "Sales Invoice")
@@ -130,7 +138,7 @@ class TestPaymentRequest(IntegrationTestCase):
pr = make_payment_request(
dt="Sales Order",
dn=so.name,
payment_gateway_account="_Test Gateway Other - USD",
payment_gateway_account="_Test Gateway Other - USD - _TC",
submit_doc=True,
return_doc=True,
)
@@ -145,7 +153,7 @@ class TestPaymentRequest(IntegrationTestCase):
pr = make_payment_request(
dt="Sales Order",
dn=so.name,
payment_gateway_account="_Test Gateway - USD", # email channel
payment_gateway_account="_Test Gateway - USD - _TC", # email channel
submit_doc=False,
return_doc=True,
)
@@ -163,7 +171,7 @@ class TestPaymentRequest(IntegrationTestCase):
pr = make_payment_request(
dt="Sales Order",
dn=so.name,
payment_gateway_account="_Test Gateway Phone - USD",
payment_gateway_account="_Test Gateway Phone - USD - _TC",
submit_doc=True,
return_doc=True,
)
@@ -180,7 +188,7 @@ class TestPaymentRequest(IntegrationTestCase):
pr = make_payment_request(
dt="Sales Order",
dn=so.name,
payment_gateway_account="_Test Gateway - USD", # email channel
payment_gateway_account="_Test Gateway - USD - _TC", # email channel
submit_doc=True,
return_doc=True,
)
@@ -201,7 +209,7 @@ class TestPaymentRequest(IntegrationTestCase):
pr = make_payment_request(
dt="Sales Order",
dn=so.name,
payment_gateway_account="_Test Gateway - USD", # email channel
payment_gateway_account="_Test Gateway - USD - _TC", # email channel
make_sales_invoice=True,
mute_email=True,
submit_doc=True,
@@ -232,7 +240,7 @@ class TestPaymentRequest(IntegrationTestCase):
party="_Test Supplier USD",
recipient_id="user@example.com",
mute_email=1,
payment_gateway_account="_Test Gateway - USD",
payment_gateway_account="_Test Gateway - USD - _TC",
submit_doc=1,
return_doc=1,
)
@@ -257,7 +265,7 @@ class TestPaymentRequest(IntegrationTestCase):
dn=purchase_invoice.name,
recipient_id="user@example.com",
mute_email=1,
payment_gateway_account="_Test Gateway - USD",
payment_gateway_account="_Test Gateway - USD - _TC",
return_doc=1,
)
@@ -276,7 +284,7 @@ class TestPaymentRequest(IntegrationTestCase):
dn=purchase_invoice.name,
recipient_id="user@example.com",
mute_email=1,
payment_gateway_account="_Test Gateway - USD",
payment_gateway_account="_Test Gateway - USD - _TC",
return_doc=1,
)
@@ -300,7 +308,7 @@ class TestPaymentRequest(IntegrationTestCase):
dn=so_inr.name,
recipient_id="saurabh@erpnext.com",
mute_email=1,
payment_gateway_account="_Test Gateway - INR",
payment_gateway_account="_Test Gateway - INR - _TC",
submit_doc=1,
return_doc=1,
)
@@ -322,7 +330,7 @@ class TestPaymentRequest(IntegrationTestCase):
dn=si_usd.name,
recipient_id="saurabh@erpnext.com",
mute_email=1,
payment_gateway_account="_Test Gateway - USD",
payment_gateway_account="_Test Gateway - USD - _TC",
submit_doc=1,
return_doc=1,
)
@@ -366,7 +374,7 @@ class TestPaymentRequest(IntegrationTestCase):
dn=si_usd.name,
recipient_id="saurabh@erpnext.com",
mute_email=1,
payment_gateway_account="_Test Gateway - USD",
payment_gateway_account="_Test Gateway - USD - _TC",
submit_doc=1,
return_doc=1,
)
@@ -471,7 +479,7 @@ class TestPaymentRequest(IntegrationTestCase):
self.assertEqual(pe.paid_amount, 800) # paid amount set from pr's outstanding amount
self.assertEqual(pe.references[0].allocated_amount, 800)
self.assertEqual(pe.references[0].outstanding_amount, 800) # for Orders it is not zero
self.assertEqual(pe.references[0].outstanding_amount, 0) # Also for orders it will zero
self.assertEqual(pe.references[0].payment_request, pr.name)
so.load_from_db()

View File

@@ -10,14 +10,19 @@
"description",
"section_break_4",
"due_date",
"invoice_portion",
"mode_of_payment",
"column_break_5",
"invoice_portion",
"due_date_based_on",
"credit_days",
"credit_months",
"section_break_6",
"discount_type",
"discount_date",
"column_break_9",
"discount",
"discount_type",
"column_break_9",
"discount_validity_based_on",
"discount_validity",
"section_break_9",
"payment_amount",
"outstanding",
@@ -172,12 +177,50 @@
"label": "Paid Amount (Company Currency)",
"options": "Company:company:default_currency",
"read_only": 1
},
{
"fieldname": "due_date_based_on",
"fieldtype": "Select",
"label": "Due Date Based On",
"options": "\nDay(s) after invoice date\nDay(s) after the end of the invoice month\nMonth(s) after the end of the invoice month",
"read_only": 1
},
{
"depends_on": "eval:in_list(['Day(s) after invoice date', 'Day(s) after the end of the invoice month'], doc.due_date_based_on)",
"fieldname": "credit_days",
"fieldtype": "Int",
"label": "Credit Days",
"non_negative": 1,
"read_only": 1
},
{
"depends_on": "eval:doc.due_date_based_on=='Month(s) after the end of the invoice month'",
"fieldname": "credit_months",
"fieldtype": "Int",
"label": "Credit Months",
"non_negative": 1,
"read_only": 1
},
{
"depends_on": "discount",
"fieldname": "discount_validity_based_on",
"fieldtype": "Select",
"label": "Discount Validity Based On",
"options": "\nDay(s) after invoice date\nDay(s) after the end of the invoice month\nMonth(s) after the end of the invoice month",
"read_only": 1
},
{
"depends_on": "discount_validity_based_on",
"fieldname": "discount_validity",
"fieldtype": "Int",
"label": "Discount Validity",
"read_only": 1
}
],
"index_web_pages_for_search": 1,
"istable": 1,
"links": [],
"modified": "2025-03-11 11:06:51.792982",
"modified": "2025-07-31 08:38:25.820701",
"modified_by": "Administrator",
"module": "Accounts",
"name": "Payment Schedule",
@@ -189,4 +232,4 @@
"sort_order": "DESC",
"states": [],
"track_changes": 1
}
}

View File

@@ -17,12 +17,27 @@ class PaymentSchedule(Document):
base_outstanding: DF.Currency
base_paid_amount: DF.Currency
base_payment_amount: DF.Currency
credit_days: DF.Int
credit_months: DF.Int
description: DF.SmallText | None
discount: DF.Float
discount_date: DF.Date | None
discount_type: DF.Literal["Percentage", "Amount"]
discount_validity: DF.Int
discount_validity_based_on: DF.Literal[
"",
"Day(s) after invoice date",
"Day(s) after the end of the invoice month",
"Month(s) after the end of the invoice month",
]
discounted_amount: DF.Currency
due_date: DF.Date
due_date_based_on: DF.Literal[
"",
"Day(s) after invoice date",
"Day(s) after the end of the invoice month",
"Month(s) after the end of the invoice month",
]
invoice_portion: DF.Percent
mode_of_payment: DF.Link | None
outstanding: DF.Currency

View File

@@ -162,4 +162,4 @@
"sort_order": "DESC",
"states": [],
"track_changes": 1
}
}

View File

@@ -75,6 +75,17 @@ class PeriodClosingVoucher(AccountsController):
return
previous_fiscal_year_start_date = previous_fiscal_year[0][1]
previous_fiscal_year_closed = frappe.db.exists(
"Period Closing Voucher",
{
"period_end_date": ("between", [previous_fiscal_year_start_date, last_year_closing]),
"docstatus": 1,
"company": self.company,
},
)
if previous_fiscal_year_closed:
return
gle_exists_in_previous_year = frappe.db.exists(
"GL Entry",
{
@@ -86,16 +97,7 @@ class PeriodClosingVoucher(AccountsController):
if not gle_exists_in_previous_year:
return
previous_fiscal_year_closed = frappe.db.exists(
"Period Closing Voucher",
{
"period_end_date": ("between", [previous_fiscal_year_start_date, last_year_closing]),
"docstatus": 1,
"company": self.company,
},
)
if not previous_fiscal_year_closed:
frappe.throw(_("Previous Year is not closed, please close it first"))
frappe.throw(_("Previous Year is not closed, please close it first"))
def block_if_future_closing_voucher_exists(self):
future_closing_voucher = self.get_future_closing_voucher()

View File

@@ -14,6 +14,7 @@ erpnext.selling.POSInvoiceController = class POSInvoiceController extends erpnex
}
company() {
erpnext.utils.set_letter_head(this.frm);
erpnext.accounts.dimensions.update_dimension(this.frm, this.frm.doctype);
this.frm.set_value("set_warehouse", "");
this.frm.set_value("taxes_and_charges", "");
@@ -54,6 +55,16 @@ erpnext.selling.POSInvoiceController = class POSInvoiceController extends erpnex
});
erpnext.accounts.dimensions.setup_dimension_filters(this.frm, this.frm.doctype);
if (this.frm.doc.pos_profile) {
frappe.db
.get_value("POS Profile", this.frm.doc.pos_profile, "set_grand_total_to_default_mop")
.then((r) => {
if (!r.exc) {
this.frm.set_default_payment = r.message.set_grand_total_to_default_mop;
}
});
}
}
onload_post_render(frm) {
@@ -119,6 +130,7 @@ erpnext.selling.POSInvoiceController = class POSInvoiceController extends erpnex
this.frm.meta.default_print_format = r.message.print_format || "";
this.frm.doc.campaign = r.message.campaign;
this.frm.allow_print_before_pay = r.message.allow_print_before_pay;
this.frm.set_default_payment = r.message.set_default_payment;
}
this.frm.script_manager.trigger("update_stock");
this.calculate_taxes_and_totals();

View File

@@ -43,6 +43,7 @@
"items_section",
"update_stock",
"scan_barcode",
"last_scanned_warehouse",
"items",
"pricing_rule_details",
"pricing_rules",
@@ -296,6 +297,7 @@
"search_index": 1
},
{
"default": "Now",
"fieldname": "posting_time",
"fieldtype": "Time",
"label": "Posting Time",
@@ -1593,12 +1595,19 @@
"fieldname": "more_info_tab",
"fieldtype": "Tab Break",
"label": "More Info"
},
{
"depends_on": "eval: doc.last_scanned_warehouse",
"fieldname": "last_scanned_warehouse",
"fieldtype": "Data",
"is_virtual": 1,
"label": "Last Scanned Warehouse"
}
],
"icon": "fa fa-file-text",
"is_submittable": 1,
"links": [],
"modified": "2025-07-18 16:50:30.516162",
"modified": "2025-08-04 22:22:31.471752",
"modified_by": "Administrator",
"module": "Accounts",
"name": "POS Invoice",

View File

@@ -217,6 +217,7 @@ class POSInvoice(SalesInvoice):
self.validate_loyalty_transaction()
self.validate_company_with_pos_company()
self.validate_full_payment()
self.update_packing_list()
if self.coupon_code:
from erpnext.accounts.doctype.pricing_rule.utils import validate_coupon_code
@@ -410,9 +411,9 @@ class POSInvoice(SalesInvoice):
)
elif is_stock_item and flt(available_stock) < flt(d.stock_qty):
frappe.throw(
_(
"Row #{}: Stock quantity not enough for Item Code: {} under warehouse {}. Available quantity {}."
).format(d.idx, item_code, warehouse, available_stock),
_("Row #{}: Stock quantity not enough for Item Code: {} under warehouse {}.").format(
d.idx, item_code, warehouse
),
title=_("Item Unavailable"),
)
@@ -716,7 +717,13 @@ class POSInvoice(SalesInvoice):
"Account", self.debit_to, "account_currency"
)
if not self.due_date and self.customer:
self.due_date = get_due_date(self.posting_date, "Customer", self.customer, self.company)
self.due_date = get_due_date(
self.posting_date,
"Customer",
self.customer,
self.company,
template_name=self.payment_terms_template,
)
super(SalesInvoice, self).set_missing_values(for_validate)
@@ -731,6 +738,7 @@ class POSInvoice(SalesInvoice):
"utm_campaign": profile.get("utm_campaign"),
"utm_medium": profile.get("utm_medium"),
"allow_print_before_pay": profile.get("allow_print_before_pay"),
"set_default_payment": profile.get("set_grand_total_to_default_mop"),
}
@frappe.whitelist()
@@ -867,10 +875,8 @@ def get_bundle_availability(bundle_item_code, warehouse):
bundle_bin_qty = 1000000
for item in product_bundle.items:
item_bin_qty = get_bin_qty(item.item_code, warehouse)
item_pos_reserved_qty = get_pos_reserved_qty(item.item_code, warehouse)
available_qty = item_bin_qty - item_pos_reserved_qty
max_available_bundles = available_qty / item.qty
max_available_bundles = item_bin_qty / item.qty
if bundle_bin_qty > max_available_bundles and frappe.get_value(
"Item", item.item_code, "is_stock_item"
):
@@ -893,13 +899,49 @@ def get_bin_qty(item_code, warehouse):
def get_pos_reserved_qty(item_code, warehouse):
"""
Calculate total quantity reserved for the given item and warehouse.
Includes:
- Direct sales of the item in submitted POS Invoices
- Sales of the item as a component of a Product Bundle
Excludes consolidated invoices (already merged into Sales Invoices via
POS Closing Entry). Used to reflect near real-time availability in the
POS UI and to prevent overselling while multiple sessions may be active.
"""
pinv_item_reserved_qty = get_pos_reserved_qty_from_table("POS Invoice Item", item_code, warehouse)
packed_item_reserved_qty = get_pos_reserved_qty_from_table("Packed Item", item_code, warehouse)
reserved_qty = pinv_item_reserved_qty + packed_item_reserved_qty
return reserved_qty
def get_pos_reserved_qty_from_table(child_table, item_code, warehouse):
"""
Get the total reserved quantity for a given item in POS Invoices
from a specific child table.
Args:
child_table (str): Name of the child table to query
(e.g., "POS Invoice Item", "Packed Item").
item_code (str): The Item Code to filter by.
warehouse (str): The Warehouse to filter by.
Returns:
float: The total reserved quantity for the item in the given
warehouse from submitted, unconsolidated POS Invoices.
"""
p_inv = frappe.qb.DocType("POS Invoice")
p_item = frappe.qb.DocType("POS Invoice Item")
p_item = frappe.qb.DocType(child_table)
qty_column = "qty" if child_table == "Packed Item" else "stock_qty"
reserved_qty = (
frappe.qb.from_(p_inv)
.from_(p_item)
.select(Sum(p_item.stock_qty).as_("stock_qty"))
.select(Sum(p_item[qty_column]).as_("stock_qty"))
.where(
(p_inv.name == p_item.parent)
& (IfNull(p_inv.consolidated_invoice, "") == "")

View File

@@ -135,6 +135,7 @@ frappe.ui.form.on("POS Profile", {
company: function (frm) {
frm.trigger("toggle_display_account_head");
erpnext.accounts.dimensions.update_dimension(frm, frm.doctype);
erpnext.utils.set_letter_head(frm);
},
toggle_display_account_head: function (frm) {

View File

@@ -19,13 +19,14 @@
"fieldname": "field",
"fieldtype": "Select",
"in_list_view": 1,
"label": "Field"
"label": "Field",
"reqd": 1
}
],
"index_web_pages_for_search": 1,
"istable": 1,
"links": [],
"modified": "2024-03-27 13:10:16.969895",
"modified": "2025-07-29 18:08:40.323579",
"modified_by": "Administrator",
"module": "Accounts",
"name": "POS Search Fields",
@@ -35,4 +36,4 @@
"sort_order": "DESC",
"states": [],
"track_changes": 1
}
}

View File

@@ -41,56 +41,68 @@ frappe.ui.form.on("Pricing Rule", {
<tr><td>
<h4>
<i class="fa fa-hand-right"></i>
{{__('Notes')}}
${__("Notes")}
</h4>
<ul>
<li>
{{__("Pricing Rule is made to overwrite Price List / define discount percentage, based on some criteria.")}}
${__("Pricing Rule is made to overwrite Price List / define discount percentage, based on some criteria.")}
</li>
<li>
{{__("If selected Pricing Rule is made for 'Rate', it will overwrite Price List. Pricing Rule rate is the final rate, so no further discount should be applied. Hence, in transactions like Sales Order, Purchase Order etc, it will be fetched in 'Rate' field, rather than 'Price List Rate' field.")}}
${__(
"If selected Pricing Rule is made for 'Rate', it will overwrite Price List. Pricing Rule rate is the final rate, so no further discount should be applied. Hence, in transactions like Sales Order, Purchase Order etc, it will be fetched in 'Rate' field, rather than 'Price List Rate' field."
)}
</li>
<li>
{{__('Discount Percentage can be applied either against a Price List or for all Price List.')}}
${__("Discount Percentage can be applied either against a Price List or for all Price List.")}
</li>
<li>
{{__('To not apply Pricing Rule in a particular transaction, all applicable Pricing Rules should be disabled.')}}
${__(
"To not apply Pricing Rule in a particular transaction, all applicable Pricing Rules should be disabled."
)}
</li>
</ul>
</td></tr>
<tr><td>
<h4><i class="fa fa-question-sign"></i>
{{__('How Pricing Rule is applied?')}}
${__("How Pricing Rule is applied?")}
</h4>
<ol>
<li>
{{__("Pricing Rule is first selected based on 'Apply On' field, which can be Item, Item Group or Brand.")}}
${__("Pricing Rule is first selected based on 'Apply On' field, which can be Item, Item Group or Brand.")}
</li>
<li>
{{__("Then Pricing Rules are filtered out based on Customer, Customer Group, Territory, Supplier, Supplier Type, Campaign, Sales Partner etc.")}}
${__(
"Then Pricing Rules are filtered out based on Customer, Customer Group, Territory, Supplier, Supplier Type, Campaign, Sales Partner etc."
)}
</li>
<li>
{{__('Pricing Rules are further filtered based on quantity.')}}
${__("Pricing Rules are further filtered based on quantity.")}
</li>
<li>
{{__('If two or more Pricing Rules are found based on the above conditions, Priority is applied. Priority is a number between 0 to 20 while default value is zero (blank). Higher number means it will take precedence if there are multiple Pricing Rules with same conditions.')}}
${__(
"If two or more Pricing Rules are found based on the above conditions, Priority is applied. Priority is a number between 0 to 20 while default value is zero (blank). Higher number means it will take precedence if there are multiple Pricing Rules with same conditions."
)}
</li>
<li>
{{__('Even if there are multiple Pricing Rules with highest priority, then following internal priorities are applied:')}}
${__(
"Even if there are multiple Pricing Rules with highest priority, then following internal priorities are applied:"
)}
<ul>
<li>
{{__('Item Code > Item Group > Brand')}}
${__("Item Code > Item Group > Brand")}
</li>
<li>
{{__('Customer > Customer Group > Territory')}}
${__("Customer > Customer Group > Territory")}
</li>
<li>
{{__('Supplier > Supplier Type')}}
${__("Supplier > Supplier Type")}
</li>
</ul>
</li>
<li>
{{__('If multiple Pricing Rules continue to prevail, users are asked to set Priority manually to resolve conflict.')}}
${__(
"If multiple Pricing Rules continue to prevail, users are asked to set Priority manually to resolve conflict."
)}
</li>
</ol>
</td></tr>

View File

@@ -174,6 +174,7 @@
},
{
"default": "0",
"depends_on": "eval:doc.apply_on != 'Transaction'",
"fieldname": "is_cumulative",
"fieldtype": "Check",
"label": "Is Cumulative"
@@ -656,7 +657,7 @@
"icon": "fa fa-gift",
"idx": 1,
"links": [],
"modified": "2025-02-17 18:15:39.824639",
"modified": "2025-08-20 11:40:07.096854",
"modified_by": "Administrator",
"module": "Accounts",
"name": "Pricing Rule",

View File

@@ -452,7 +452,7 @@ def get_pricing_rule_for_item(args, doc=None, for_validate=False):
get_pricing_rule_items(pricing_rule, other_items=fetch_other_item) or []
)
if pricing_rule.coupon_code_based == 1:
if pricing_rule.get("coupon_code_based") == 1:
if not args.coupon_code:
continue
coupon_code = frappe.db.get_value(
@@ -702,17 +702,6 @@ def set_transaction_type(args):
args.transaction_type = "buying"
@frappe.whitelist()
def make_pricing_rule(doctype, docname):
doc = frappe.new_doc("Pricing Rule")
doc.applicable_for = doctype
doc.set(frappe.scrub(doctype), docname)
doc.selling = 1 if doctype == "Customer" else 0
doc.buying = 1 if doctype == "Supplier" else 0
return doc
@frappe.whitelist()
@frappe.validate_and_sanitize_search_inputs
def get_item_uoms(doctype, txt, searchfield, start, page_len, filters):

View File

@@ -13,7 +13,7 @@
</div>
{% endif %}
</div>
<h2 class="text-center">{{ _("STATEMENT OF ACCOUNTS") }}</h2>
<h2 class="text-center">{{ _("GENERAL LEDGER") }}</h2>
<div>
{% if filters.party[0] == filters.party_name[0] %}
<h5 style="float: left;">{{ _("Customer: ") }} <b>{{ filters.party_name[0] }}</b></h5>
@@ -34,11 +34,13 @@
<thead>
<tr>
<th style="width: 12%">{{ _("Date") }}</th>
<th style="width: 15%">{{ _("Reference") }}</th>
<th style="width: 25%">{{ _("Remarks") }}</th>
<th style="width: 20%">{{ _("Reference") }}</th>
<th style="width: 15%">{{ _("Debit") }}</th>
<th style="width: 15%">{{ _("Credit") }}</th>
<th style="width: 18%">{{ _("Balance (Dr - Cr)") }}</th>
{% if filters.show_remarks %}
<th style="width: 20%">{{ _("Remarks") }}</th>
{% endif %}
</tr>
</thead>
<tbody>
@@ -47,36 +49,51 @@
{% if(row.posting_date) %}
<td>{{ frappe.format(row.posting_date, 'Date') }}</td>
<td>{{ row.voucher_type }}
<br>{{ row.voucher_no }}</td>
<td>
{% if not (filters.party or filters.account) %}
<br>{{ row.voucher_no }}
{% if not (filters.party or filters.account) %}
{{ row.party or row.account }}
<br>
{% endif %}
<br>{{ _("Remarks:") }} {{ row.remarks }}
{% if row.bill_no %}
<br>{{ _("Supplier Invoice No") }}: {{ row.bill_no }}
{{ _("Supplier Invoice No") }}: {{ row.bill_no }}
{% endif %}
</td>
<td style="text-align: right">
{{ frappe.utils.fmt_money(row.debit, currency=filters.presentation_currency) }}</td>
<td style="text-align: right">
{{ frappe.utils.fmt_money(row.credit, currency=filters.presentation_currency) }}</td>
<td style="text-align: right">
{{ frappe.utils.fmt_money(row.balance, currency=filters.presentation_currency) }}
</td>
{% if filters.show_remarks %}
<td>
{% if row.remarks %}
{{ _("Remarks:") }} {{ row.remarks }}
{% endif %}
</td>
{% endif %}
{% else %}
<td></td>
<td></td>
<td><b>{{ frappe.format(row.account, {fieldtype: "Link"}) or "&nbsp;" }}</b></td>
<td>
<b>{{ frappe.format(row.account, {fieldtype: "Link"}) or "&nbsp;" }}</b>
</td>
<td style="text-align: right">
{{ row.get('account', '') and frappe.utils.fmt_money(row.debit, currency=filters.presentation_currency) }}
</td>
<td style="text-align: right">
{{ row.get('account', '') and frappe.utils.fmt_money(row.credit, currency=filters.presentation_currency) }}
</td>
{% endif %}
<td style="text-align: right">
{{ frappe.utils.fmt_money(row.balance, currency=filters.presentation_currency) }}
</td>
{% if filters.show_remarks %}
<td>
{% if row.remarks %}
{{ _("Remarks:") }} {{ row.remarks }}
{% endif %}
</td>
{% endif %}
{% endif %}
</tr>
{% endfor %}
</tbody>

View File

@@ -83,6 +83,16 @@ frappe.ui.form.on("Process Statement Of Accounts", {
},
};
});
frm.set_query("print_format", function () {
return {
filters: {
print_format_for: "Report",
report: frm.doc.report,
disabled: 0,
print_format_type: "Jinja",
},
};
});
if (frm.doc.__islocal) {
frm.set_value("from_date", frappe.datetime.add_months(frappe.datetime.get_today(), -1));
frm.set_value("to_date", frappe.datetime.get_today());
@@ -92,6 +102,7 @@ frappe.ui.form.on("Process Statement Of Accounts", {
frm.set_value("account", "");
frm.set_value("cost_center", "");
frm.set_value("project", "");
erpnext.utils.set_letter_head(frm);
},
report: function (frm) {
let filters = {
@@ -105,6 +116,16 @@ frappe.ui.form.on("Process Statement Of Accounts", {
filters: filters,
};
});
frm.set_query("print_format", function () {
return {
filters: {
print_format_for: "Report",
report: frm.doc.report,
disabled: 0,
print_format_type: "Jinja",
},
};
});
},
customer_collection: function (frm) {
frm.set_value("collection_name", "");

View File

@@ -1,5 +1,6 @@
{
"actions": [],
"allow_rename": 1,
"autoname": "Prompt",
"creation": "2020-05-22 16:46:18.712954",
"doctype": "DocType",
@@ -27,6 +28,7 @@
"sales_person",
"show_remarks",
"based_on_payment_terms",
"show_future_payments",
"section_break_3",
"customer_collection",
"collection_name",
@@ -37,6 +39,7 @@
"column_break_17",
"customers",
"preferences",
"print_format",
"orientation",
"include_break",
"include_ageing",
@@ -67,7 +70,7 @@
"fieldname": "frequency",
"fieldtype": "Select",
"label": "Frequency",
"options": "Weekly\nMonthly\nQuarterly"
"options": "Daily\nWeekly\nBiweekly\nMonthly\nQuarterly"
},
{
"fieldname": "company",
@@ -78,18 +81,18 @@
"reqd": 1
},
{
"depends_on": "eval:(doc.enable_auto_email == 0 && doc.report == 'General Ledger');",
"depends_on": "eval:(!doc.enable_auto_email && doc.report == 'General Ledger');",
"fieldname": "from_date",
"fieldtype": "Date",
"label": "From Date",
"mandatory_depends_on": "eval:doc.frequency == '';"
"mandatory_depends_on": "eval:(!doc.enable_auto_email && doc.report == \"General Ledger\") "
},
{
"depends_on": "eval:(doc.enable_auto_email == 0 && doc.report == 'General Ledger');",
"depends_on": "eval:(!doc.enable_auto_email && doc.report == 'General Ledger');",
"fieldname": "to_date",
"fieldtype": "Date",
"label": "To Date",
"mandatory_depends_on": "eval:doc.frequency == '';"
"mandatory_depends_on": "eval:(!doc.enable_auto_email && doc.report == \"General Ledger\") "
},
{
"fieldname": "cost_center",
@@ -330,7 +333,8 @@
"depends_on": "eval:(doc.report == 'Accounts Receivable');",
"fieldname": "posting_date",
"fieldtype": "Date",
"label": "Posting Date"
"label": "Posting Date",
"mandatory_depends_on": "eval:(doc.report == 'Accounts Receivable');"
},
{
"depends_on": "eval: (doc.report == 'Accounts Receivable');",
@@ -397,10 +401,23 @@
"fieldtype": "Select",
"label": "Categorize By",
"options": "\nCategorize by Voucher\nCategorize by Voucher (Consolidated)"
},
{
"default": "0",
"depends_on": "eval:(doc.report == 'Accounts Receivable');",
"fieldname": "show_future_payments",
"fieldtype": "Check",
"label": "Show Future Payments"
},
{
"fieldname": "print_format",
"fieldtype": "Link",
"label": "Print Format",
"options": "Print Format"
}
],
"links": [],
"modified": "2025-07-08 16:52:12.602384",
"modified": "2025-10-07 12:19:20.719898",
"modified_by": "Administrator",
"module": "Accounts",
"name": "Process Statement Of Accounts",

View File

@@ -8,7 +8,7 @@ import frappe
from frappe import _
from frappe.desk.reportview import get_match_cond
from frappe.model.document import Document
from frappe.utils import add_days, add_months, format_date, getdate, today
from frappe.utils import add_days, add_months, add_to_date, format_date, getdate, today
from frappe.utils.jinja import validate_template
from frappe.utils.pdf import get_pdf
from frappe.www.printview import get_print_style
@@ -55,7 +55,7 @@ class ProcessStatementOfAccounts(Document):
enable_auto_email: DF.Check
filter_duration: DF.Int
finance_book: DF.Link | None
frequency: DF.Literal["Weekly", "Monthly", "Quarterly"]
frequency: DF.Literal["Daily", "Weekly", "Biweekly", "Monthly", "Quarterly"]
from_date: DF.Date | None
ignore_cr_dr_notes: DF.Check
ignore_exchange_rate_revaluation_journals: DF.Check
@@ -67,11 +67,13 @@ class ProcessStatementOfAccounts(Document):
pdf_name: DF.Data | None
posting_date: DF.Date | None
primary_mandatory: DF.Check
print_format: DF.Link | None
project: DF.TableMultiSelect[PSOAProject]
report: DF.Literal["General Ledger", "Accounts Receivable"]
sales_partner: DF.Link | None
sales_person: DF.Link | None
sender: DF.Link | None
show_future_payments: DF.Check
show_net_values_in_party_account: DF.Check
show_remarks: DF.Check
start_date: DF.Date | None
@@ -108,6 +110,25 @@ class ProcessStatementOfAccounts(Document):
self.to_date = self.start_date
self.from_date = add_months(self.to_date, -1 * self.filter_duration)
if self.print_format:
pf = frappe.db.get_value(
"Print Format",
self.print_format,
["print_format_type", "print_format_for", "report", "disabled"],
as_dict=True,
)
if not pf:
frappe.throw(title=_("Invalid Print Format"), msg=_("Selected Print Format does not exist."))
if pf.print_format_type != "Jinja":
frappe.throw(title=_("Invalid Print Format"), msg=_("Print Format Type should be Jinja."))
if pf.print_format_for != "Report" or pf.report != self.report or pf.disabled:
frappe.throw(
title=_("Invalid Print Format"),
msg=_(
"Print Format must be an enabled Report Print Format matching the selected Report."
),
)
def validate_account(self):
if not self.account:
return
@@ -266,6 +287,7 @@ def get_ar_filters(doc, entry):
"sales_person": doc.sales_person if doc.sales_person else None,
"territory": doc.territory if doc.territory else None,
"based_on_payment_terms": doc.based_on_payment_terms,
"show_future_payments": doc.show_future_payments,
"report_name": "Accounts Receivable",
"ageing_based_on": doc.ageing_based_on,
"range1": 30,
@@ -288,6 +310,10 @@ def get_html(doc, filters, entry, col, res, ageing):
if process_soa_html and process_soa_html.get(doc.report):
template_path = process_soa_html[doc.report][-1]
if doc.print_format:
custom_html, custom_css = frappe.db.get_value("Print Format", doc.print_format, ["html", "css"])
template_path = f"<style>{custom_css}</style> {custom_html}"
if doc.letter_head:
from frappe.www.printview import get_letter_head
@@ -529,8 +555,9 @@ def send_emails(document_name, from_scheduler=False, posting_date=None):
if doc.enable_auto_email and from_scheduler:
new_to_date = getdate(posting_date or today())
if doc.frequency == "Weekly":
new_to_date = add_days(new_to_date, 7)
if doc.frequency in ("Daily", "Weekly", "Biweekly"):
frequency = {"Daily": 1, "Weekly": 7, "Biweekly": 14}
new_to_date = add_days(new_to_date, frequency[doc.frequency])
else:
new_to_date = add_months(new_to_date, 1 if doc.frequency == "Monthly" else 3)
new_from_date = add_months(new_to_date, -1 * doc.filter_duration)
@@ -550,7 +577,7 @@ def send_auto_email():
selected = frappe.get_list(
"Process Statement Of Accounts",
filters={"enable_auto_email": 1},
or_filters={"to_date": format_date(today()), "posting_date": format_date(today())},
or_filters={"to_date": today(), "posting_date": today()},
)
for entry in selected:
send_emails(entry.name, from_scheduler=True)

View File

@@ -23,7 +23,7 @@
{% endif %}
</div>
<h2 class="text-center" style="margin-top:0">{{ _(report.report_name) }}</h2>
<h2 class="text-center" style="margin-top:0">{{ _("STATEMENT OF ACCOUNTS") }}</h2>
<h4 class="text-center">
{{ filters.customer_name }}
</h4>
@@ -52,20 +52,22 @@
</div>
</div>
{% if(filters.show_future_payments) %}
{% set balance_row = data.slice(-1).pop() %}
{% if(filters.show_future_payments)%}
{% set balance_row = data[-1] %}
{% set ns = namespace(idx=None) %}
{% for i in report.columns %}
{% if i.fieldname == 'age' %}
{% set elem = i %}
{% if i.fieldname == "age" and ns.idx is none %}
{% set ns.idx = loop.index0 %}
{% endif %}
{% endfor %}
{% set start = report.columns.findIndex(elem) %}
{% set range1 = report.columns[start].label %}
{% set range2 = report.columns[start+1].label %}
{% set range3 = report.columns[start+2].label %}
{% set range4 = report.columns[start+3].label %}
{% set range5 = report.columns[start+4].label %}
{% set range6 = report.columns[start+5].label %}
{% set age = report.columns[ns.idx].label %}
{% set range1 = report.columns[ns.idx+1].label %}
{% set range2 = report.columns[ns.idx+2].label %}
{% set range3 = report.columns[ns.idx+3].label %}
{% set range4 = report.columns[ns.idx+4].label %}
{% set range5 = report.columns[ns.idx+5].label %}
{% if(balance_row) %}
<table class="table table-bordered table-condensed">
@@ -84,12 +86,12 @@
<thead>
<tr>
<th>{{ _(" ") }}</th>
<th>{{ _(age) }}</th>
<th>{{ _(range1) }}</th>
<th>{{ _(range2) }}</th>
<th>{{ _(range3) }}</th>
<th>{{ _(range4) }}</th>
<th>{{ _(range5) }}</th>
<th>{{ _(range6) }}</th>
<th>{{ _("Total") }}</th>
</tr>
</thead>
@@ -97,25 +99,25 @@
<tr>
<td>{{ _("Total Outstanding") }}</td>
<td class="text-right">
{{ format_number(balance_row["age"], null, 2) }}
{{ frappe.utils.flt(balance_row["age"], 2) }}
</td>
<td class="text-right">
{{ frappe.utils.fmt_money(balance_row["range1"], data[data.length-1]["currency"]) }}
{{ frappe.utils.fmt_money(balance_row["range1"], currency=balance_row["currency"]) }}
</td>
<td class="text-right">
{{ frappe.utils.fmt_money(balance_row["range2"], data[data.length-1]["currency"]) }}
{{ frappe.utils.fmt_money(balance_row["range2"], currency=balance_row["currency"]) }}
</td>
<td class="text-right">
{{ frappe.utils.fmt_money(balance_row["range3"], data[data.length-1]["currency"]) }}
{{ frappe.utils.fmt_money(balance_row["range3"], currency=balance_row["currency"]) }}
</td>
<td class="text-right">
{{ frappe.utils.fmt_money(balance_row["range4"], data[data.length-1]["currency"]) }}
{{ frappe.utils.fmt_money(balance_row["range4"], currency=balance_row["currency"]) }}
</td>
<td class="text-right">
{{ frappe.utils.fmt_money(balance_row["range5"], data[data.length-1]["currency"]) }}
{{ frappe.utils.fmt_money(balance_row["range5"], currency=balance_row["currency"]) }}
</td>
<td class="text-right">
{{ frappe.utils.fmt_money(flt(balance_row["outstanding"]), data[data.length-1]["currency"]) }}
{{ frappe.utils.fmt_money(frappe.utils.flt(balance_row["outstanding"]), currency=balance_row["currency"]) }}
</td>
</tr>
<td>{{ _("Future Payments") }}</td>
@@ -126,7 +128,7 @@
<td></td>
<td></td>
<td class="text-right">
{{ frappe.utils.fmt_money(flt(balance_row[("future_amount")]), data[data.length-1]["currency"]) }}
{{ frappe.utils.fmt_money(frappe.utils.flt(balance_row["future_amount"]), currency=balance_row["currency"]) }}
</td>
<tr class="cvs-footer">
<th class="text-left">{{ _("Cheques Required") }}</th>
@@ -137,7 +139,7 @@
<th></th>
<th></th>
<th class="text-right">
{{ frappe.utils.fmt_money(flt(balance_row["outstanding"] - balance_row[("future_amount")]), data[data.length-1]["currency"]) }}</th>
{{ frappe.utils.fmt_money(frappe.utils.flt(balance_row["outstanding"] - balance_row["future_amount"]), currency=balance_row["currency"]) }}</th>
</tr>
</tbody>
@@ -157,7 +159,7 @@
{% else %}
<th style="width: 24%">{{ _("Reference") }}</th>
{% endif %}
{% if not(filters.show_future_payments) %}
{% if not(filters.show_future_payments) and filters.show_remarks %}
<th style="width: 20%">
{% if (filters.customer or filters.supplier or filters.customer_name) %}
{{ _("Remarks") }}
@@ -226,7 +228,7 @@
<td>{{ data[i]["sales_person"] }}</td>
{% endif %}
{% if not (filters.show_future_payments) %}
{% if not (filters.show_future_payments) and filters.show_remarks %}
<td>
{% if(not(filters.customer or filters.supplier or filters.customer_name)) %}
{{ data[i]["party"] }}
@@ -325,12 +327,23 @@
{% endfor %}
<td></td>
<td></td>
<td></td>
<td></td>
<td style="text-align: right"><b>{{ frappe.utils.fmt_money(data|sum(attribute="invoiced"), currency=data[0]["currency"]) }}</b></td>
<td style="text-align: right"><b>{{ frappe.utils.fmt_money(data|sum(attribute="paid"), currency=data[0]["currency"]) }}</b></td>
<td style="text-align: right"><b>{{ frappe.utils.fmt_money(data|sum(attribute="credit_note"), currency=data[0]["currency"]) }}</b></td>
<td style="text-align: right"><b>{{ frappe.utils.fmt_money(data|sum(attribute="outstanding"), currency=data[0]["currency"]) }}</b></td>
{% if (filters.show_future_payments) or filters.show_remarks %}
<td></td>
{% endif %}
{% if not(filters.show_future_payments) %}
<td></td>
<td style="text-align: right"><b>{{ frappe.utils.fmt_money(data|sum(attribute="invoiced"), currency=data[0]["currency"]) }}</b></td>
<td style="text-align: right"><b>{{ frappe.utils.fmt_money(data|sum(attribute="paid"), currency=data[0]["currency"]) }}</b></td>
<td style="text-align: right"><b>{{ frappe.utils.fmt_money(data|sum(attribute="credit_note"), currency=data[0]["currency"]) }}</b></td>
<td style="text-align: right"><b>{{ frappe.utils.fmt_money(data|sum(attribute="outstanding"), currency=data[0]["currency"]) }}</b></td>
{% else %}
<td style="text-align: right"><b>{{ frappe.utils.fmt_money(data|sum(attribute="invoiced"), currency=data[0]["currency"]) }}</b></td>
<td style="text-align: right"><b>{{ frappe.utils.fmt_money(data|sum(attribute="outstanding"), currency=data[0]["currency"]) }}</b></td>
<td></td>
<td></td>
<td style="text-align: right"><b>{{ frappe.utils.fmt_money(data|sum(attribute="future_amount"), currency=data[0]["currency"]) }}</b></td>
<td style="text-align: right"><b>{{ frappe.utils.fmt_money(data|sum(attribute="remaining_balance"), currency=data[0]["currency"]) }}</b></td>
{% endif %}
</tbody>
</table>
<br>

View File

@@ -81,6 +81,7 @@ class TestProcessStatementOfAccounts(AccountsTestMixin, IntegrationTestCase):
process_soa = create_process_soa(
name="_Test Process SOA", enable_auto_email=1, report="Accounts Receivable"
)
send_emails(process_soa.name, from_scheduler=True)
process_soa.load_from_db()
self.assertEqual(process_soa.posting_date, getdate(add_days(today(), 7)))

View File

@@ -3,7 +3,7 @@
import frappe
from frappe.model.document import Document
from frappe.utils import getdate
from frappe.utils import create_batch, getdate
from erpnext.accounts.doctype.subscription.subscription import DateTimeLikeObject, process_all
@@ -23,7 +23,23 @@ class ProcessSubscription(Document):
# end: auto-generated types
def on_submit(self):
process_all(subscription=self.subscription, posting_date=self.posting_date)
self.process_all_subscription()
def process_all_subscription(self):
filters = {"status": ("!=", "Cancelled")}
if self.subscription:
filters["name"] = self.subscription
subscriptions = frappe.get_all("Subscription", filters, pluck="name")
for subscription in create_batch(subscriptions, 500):
frappe.enqueue(
method="erpnext.accounts.doctype.subscription.subscription.process_all",
queue="long",
subscription=subscription,
posting_date=self.posting_date,
)
def create_subscription_process(

View File

@@ -93,12 +93,14 @@
},
{
"default": "0",
"depends_on": "eval:doc.apply_on != 'Transaction'",
"fieldname": "mixed_conditions",
"fieldtype": "Check",
"label": "Mixed Conditions"
},
{
"default": "0",
"depends_on": "eval:doc.apply_on != 'Transaction'",
"fieldname": "is_cumulative",
"fieldtype": "Check",
"label": "Is Cumulative"
@@ -278,7 +280,7 @@
}
],
"links": [],
"modified": "2024-03-27 13:10:22.103686",
"modified": "2025-08-20 11:48:23.231081",
"modified_by": "Administrator",
"module": "Accounts",
"name": "Promotional Scheme",

View File

@@ -35,7 +35,10 @@ erpnext.accounts.PurchaseInvoice = class PurchaseInvoice extends erpnext.buying.
this.frm.set_query("expense_account", "items", function () {
return {
query: "erpnext.controllers.queries.get_expense_account",
filters: { company: doc.company },
filters: {
company: doc.company,
disabled: 0,
},
};
});
}
@@ -162,6 +165,9 @@ erpnext.accounts.PurchaseInvoice = class PurchaseInvoice extends erpnext.buying.
per_billed: ["<", 99.99],
company: me.frm.doc.company,
},
allow_child_item_selection: true,
child_fieldname: "items",
child_columns: ["item_code", "item_name", "qty", "amount", "billed_amt"],
});
},
__("Get Items From")
@@ -184,6 +190,9 @@ erpnext.accounts.PurchaseInvoice = class PurchaseInvoice extends erpnext.buying.
company: me.frm.doc.company,
is_return: 0,
},
allow_child_item_selection: true,
child_fieldname: "items",
child_columns: ["item_code", "item_name", "qty", "amount", "billed_amt"],
});
},
__("Get Items From")
@@ -647,7 +656,7 @@ frappe.ui.form.on("Purchase Invoice", {
},
add_custom_buttons: function (frm) {
if (frm.doc.docstatus == 1 && frm.doc.per_received < 100) {
if (frm.doc.docstatus == 1 && frm.doc.per_received < 100 && frm.doc.update_stock == 0) {
frm.add_custom_button(
__("Purchase Receipt"),
() => {

Some files were not shown because too many files have changed in this diff Show More