Compare commits

...

2074 Commits

Author SHA1 Message Date
copilot-swe-agent[bot]
66dac9b7a5 Replace pandas with pure Python in sales forecast report
Co-authored-by: ankush <9079960+ankush@users.noreply.github.com>
2025-12-23 07:30:44 +00:00
copilot-swe-agent[bot]
7eadf19116 Initial plan 2025-12-23 07:23:18 +00:00
rohitwaghchaure
bb21415a72 Merge pull request #51259 from nishkagosalia/gh-51233
fix: company creation for Italy country
2025-12-23 12:42:41 +05:30
Nishka Gosalia
bc784a0e73 fix: company creation for Italy country 2025-12-22 20:23:03 +05:30
Mihir Kandoi
48c53c06ce Merge pull request #51266 from mihir-kandoi/fix-phantom-bom-filter 2025-12-22 19:33:03 +05:30
Mihir Kandoi
5e8d7a949c fix: filter not changing when field is changed 2025-12-22 19:31:24 +05:30
rohitwaghchaure
1d0aa4d3ec Merge pull request #51251 from rohitwaghchaure/fixed-added-limit-serial-nos
fix: limit condition to fetch serial nos
2025-12-22 17:44:58 +05:30
Khushi Rawat
f1b79e6687 Merge pull request #51262 from khushi8112/validate-finance-books-row-values
fix: validate depreciation row values
2025-12-22 17:34:18 +05:30
Rohit Waghchaure
da4b78491d fix: limit condition to fetch serial nos 2025-12-22 17:21:48 +05:30
khushi8112
16c6b2c39f fix: validate depreciation row values 2025-12-22 16:50:43 +05:30
rohitwaghchaure
9e28703ad9 Merge pull request #51258 from frappe/revert-50978-fixed-support-55110
Revert "fix: performance of the reposting"
2025-12-22 16:41:38 +05:30
rohitwaghchaure
e9c37642c8 chore: fix linters issue 2025-12-22 16:23:15 +05:30
rohitwaghchaure
d191b80587 chore: fix test case 2025-12-22 16:22:44 +05:30
rohitwaghchaure
280558efa2 Revert "fix: performance of the reposting" 2025-12-22 16:19:11 +05:30
Mihir Kandoi
fbb67265b2 Merge pull request #51224 from aerele/task-end-date 2025-12-22 15:34:30 +05:30
Khushi Rawat
58e4f5690e Merge pull request #51186 from khushi8112/finance-book-wise-balance
fix: filter COA balances by finance book
2025-12-22 14:41:38 +05:30
rohitwaghchaure
0e1b45ca26 Merge pull request #51215 from vorasmit/fix-disassembly
fix: de-duplicate rows on disassembly with multiple manufacture entries
2025-12-22 11:38:35 +05:30
Mihir Kandoi
dfe57b9fd3 Merge pull request #51249 from mihir-kandoi/fix-local-tests 2025-12-22 11:29:58 +05:30
Mihir Kandoi
19bfa9225d fix: flaky local test 2025-12-22 11:10:42 +05:30
rohitwaghchaure
5ae7805429 Merge pull request #51244 from rohitwaghchaure/fixed-support-55963
fix: same serial number was picked in multiple sales invoices
2025-12-22 09:38:43 +05:30
rohitwaghchaure
586431ca1c Merge pull request #51242 from aerele/fix/batch-qty-ignore-reserved-stock
fix(stock-report): ignore reserved stock in batch qty calculation
2025-12-21 22:25:52 +05:30
Rohit Waghchaure
61c31f0cd0 fix: same serial number was picked in multiple sales invoices 2025-12-21 22:22:28 +05:30
MochaMind
6c65c8955c chore: update POT file (#51240) 2025-12-21 14:27:20 +01:00
Pugazhendhi Velu
9a1f551e53 fix(stock-report): ignore reserved stock in batch qty calculation 2025-12-21 12:22:47 +00:00
SowmyaArunachalam
b8434ecfb0 test(task): validate expected end date 2025-12-19 23:27:51 +05:30
SowmyaArunachalam
820ccba9a4 fix(task): calculate end date if not available 2025-12-19 22:20:03 +05:30
rohitwaghchaure
c62b66038b Merge pull request #49951 from aerele/feat/update-batch-qty-report
feat(report): add batch qty update functionality in report
2025-12-19 20:25:22 +05:30
Pugazhendhi Velu
15d9d8b719 fix: update batch_qty using get_batch_qty 2025-12-19 14:12:45 +00:00
Pugazhendhi Velu
cf03d03033 fix: use get_batch_qty to fetch batch data 2025-12-19 14:12:44 +00:00
Pugazhendhi Velu
9cc77934a6 refactor: fetch batch qty difference in a single db query 2025-12-19 14:12:44 +00:00
Pugazhendhi Velu
f40c492a05 feat(report): add batch qty update functionality in report 2025-12-19 14:12:44 +00:00
Smit Vora
5b3d2c0d02 test: ensure full qty reversal for items outside of BOM on disassemble 2025-12-19 19:32:34 +05:30
Smit Vora
ce123f1a89 fix: support disassemble of RMs other than in BOM 2025-12-19 19:03:22 +05:30
Smit Vora
18ac589796 test: ensure no regression after save and submit on disassemble 2025-12-19 18:19:40 +05:30
Smit Vora
df13308663 fix: don't fetch qty as it's unused 2025-12-19 18:14:06 +05:30
rohitwaghchaure
32b3a13591 Merge pull request #51219 from rohitwaghchaure/fixed-projects-home
fix: chart and number cards for projects and qc
2025-12-19 18:13:30 +05:30
rohitwaghchaure
83522bf079 Merge pull request #51214 from aerele/fix/recalculate-batch-qty
fix(stock): ignore reserved stock while calculating batch qty
2025-12-19 18:00:04 +05:30
Rohit Waghchaure
7c6f0e4463 fix: chart and number cards for projects and qc 2025-12-19 17:48:50 +05:30
Sudharsanan11
4d8ec5f54c test(stock): add test for ignore reserve stock 2025-12-19 17:25:20 +05:30
rohitwaghchaure
68fabb72fa Merge pull request #51218 from rohitwaghchaure/fixed-subcontracting-home
fix: chart and number cards for subcontracting
2025-12-19 17:21:47 +05:30
Sudharsanan11
b23c6e2687 fix(stock): ignore reserved stock while calculating batch qty 2025-12-19 17:20:17 +05:30
rohitwaghchaure
8c0dbb5bf6 Merge pull request #51217 from rohitwaghchaure/fixed-buying-home
fix: number cards for buying module
2025-12-19 17:18:37 +05:30
Rohit Waghchaure
3b221b0078 fix: chart and number cards for subcontracting 2025-12-19 16:58:29 +05:30
Rohit Waghchaure
fb0bd44a85 fix: number cards for buying module 2025-12-19 16:57:44 +05:30
Diptanil Saha
cb951bbb18 Merge pull request #51216 from diptanilsaha/gh_50890 2025-12-19 15:53:22 +05:30
diptanilsaha
0942845af7 fix(pos): prevent setting focus to item search field after item selection 2025-12-19 15:41:48 +05:30
rohitwaghchaure
b567eac01d Merge pull request #51209 from rohitwaghchaure/fixed-manufacturing-dashboard
fix: manufacturing chart and number cards
2025-12-19 15:14:32 +05:30
Rohit Waghchaure
278963be69 fix: manufacturing chart and number cards 2025-12-19 14:12:18 +05:30
Khushi Rawat
c55c97a9fe fix: add space 2025-12-19 14:11:54 +05:30
Smit Vora
a091e47bd7 fix: de-duplicate rows on disassembly with multiple manufacture entries 2025-12-19 14:07:09 +05:30
khushi8112
358083d759 fix: include entries with null finance book 2025-12-19 13:50:20 +05:30
Khushi Rawat
fdebf25ca7 Merge pull request #51205 from khushi8112/do-not-disable-primary-action-button
fix: do not hide primary-action for composite asset
2025-12-19 00:06:57 +05:30
Mihir Kandoi
6710a8b032 Merge pull request #51166 from mihir-kandoi/gh50060 2025-12-18 21:27:55 +05:30
Mihir Kandoi
d78a626661 chore: make mr_item indexed 2025-12-18 21:09:38 +05:30
Mihir Kandoi
48ea75c452 Merge branch 'gh50060' of https://github.com/mihir-kandoi/erpnext into gh50060 2025-12-18 21:07:57 +05:30
khushi8112
e04353fc31 fix: add server side validation 2025-12-18 17:34:31 +05:30
khushi8112
e2ac7646e6 fix: set frm.has_active_capitalization before using it 2025-12-18 17:15:10 +05:30
ruthra kumar
7a3206f0bf Merge pull request #51197 from ruthra-kumar/fix_deterministic_bug_in_sql_procedures
refactor: remove custom sql function in AR SQL procedure approach
2025-12-18 17:07:24 +05:30
khushi8112
482efee6c0 fix: do not hide primary-action for composite asset 2025-12-18 16:43:26 +05:30
Mihir Kandoi
41e1f92612 Merge pull request #51204 from mihir-kandoi/gh51201 2025-12-18 16:40:24 +05:30
Mihir Kandoi
39031ae8a2 fix: customer quick entry address 2025-12-18 16:37:27 +05:30
Diptanil Saha
e53a74f2be fix(payment entry): make taxes & charges section non-collapsible and remove border (#51191) 2025-12-18 16:23:24 +05:30
Diptanil Saha
3a604dd249 fix(pegged currencies): skip adding currencies_to_add items on pegged_currency_item if source_currency or pegged_against currency doc does not exist (#51188) 2025-12-18 16:22:56 +05:30
Mihir Kandoi
11ce4ad102 Merge pull request #51202 from mihir-kandoi/gh51195 2025-12-18 16:15:01 +05:30
Mihir Kandoi
adabb6acb3 fix: NoneType error when starting job card 2025-12-18 16:06:58 +05:30
ruthra kumar
d1e0992253 refactor: remove custom sql function in AR SQL procedure approach 2025-12-18 15:45:05 +05:30
Khushi Rawat
260e6fb979 Merge pull request #51175 from khushi8112/asset-depreciation-manual-value-update
fix: manual depreciation update logic
2025-12-18 15:32:36 +05:30
Mihir Kandoi
a0af90f755 Merge pull request #51194 from mihir-kandoi/type-resolve-error 2025-12-18 15:18:18 +05:30
Mihir Kandoi
b0d3681593 Merge pull request #51189 from mihir-kandoi/gh49776 2025-12-18 15:11:40 +05:30
Mihir Kandoi
8b1fd7469c fix: get_item_tax_template error 2025-12-18 14:56:51 +05:30
khushi8112
f991420152 fix: Apply finance book filter conditionally 2025-12-18 14:54:37 +05:30
khushi8112
31374e1134 fix: filter account balances by default finance book in COA tree view 2025-12-18 14:54:37 +05:30
khushi8112
c186b1d9c8 fix: additional check to regenerate depreciation 2025-12-18 14:52:58 +05:30
khushi8112
178bc759c7 fix: logic error in docstatus check and use better arg 2025-12-18 14:52:58 +05:30
khushi8112
aa8e8da29f fix: check and update depreciation if depreciation method was changed 2025-12-18 14:52:58 +05:30
khushi8112
028b6790cf fix: update depreciation schedule when asset value changes for manual depreciation 2025-12-18 14:52:58 +05:30
Mihir Kandoi
333169e52b test: patch: add test case and patch 2025-12-18 09:17:42 +00:00
Mihir Kandoi
17320d1062 refactor: pick list from material request 2025-12-18 09:17:42 +00:00
Mihir Kandoi
34cee8fa9c fix: set conversion factor before validation 2025-12-18 09:16:55 +00:00
Ankush Menat
fe66bd4dc2 test: fix tests failing due to dependent state (#51187)
* test: Use fixture instead of hardcoded employee

* test: create user before assigning
2025-12-18 09:13:05 +00:00
Mihir Kandoi
9638e7ea83 Merge pull request #51168 from nishkagosalia/gh-42873 2025-12-18 10:14:05 +05:30
Mihir Kandoi
80933ec66b test: patch: add test case and patch 2025-12-17 20:16:13 +05:30
rohitwaghchaure
abef84358c Merge pull request #51022 from rohitwaghchaure/feat-run-parallel-reposting
feat: run parallel reposting
2025-12-17 16:41:40 +05:30
Diptanil Saha
64e50f2e55 Merge pull request #51169 from diptanilsaha/gh_39653 2025-12-17 15:21:29 +05:30
diptanilsaha
848f8d6b1f fix(payment entry): set row id for 'On Previous Row Amount' or 'On Previous Row Total' charge type on tax table 2025-12-17 15:12:45 +05:30
Nishka Gosalia
1562e9b828 fix: Disallow due date to be before the posting date in Quotation 2025-12-17 14:44:24 +05:30
Mihir Kandoi
1778e2c564 refactor: pick list from material request 2025-12-17 14:41:09 +05:30
Khushi Rawat
da4d6cb567 Merge pull request #51156 from aerele/asset-depreciation-schedule-calculation
fix: show company currency in asset depreciation schedule
2025-12-17 14:33:34 +05:30
Khushi Rawat
5f80857bc9 fix: show correct PR amount in email template (#51033)
* fix: show correct PR amount in email template

* fix: add translation string
2025-12-17 14:06:54 +05:30
Diptanil Saha
a412e0b357 Merge pull request #51155 from diptanilsaha/st_55683 2025-12-17 13:53:40 +05:30
Nishka Gosalia
f4c0611cc5 feat: update item button addition for quotation (#50976)
* feat: update item button addition for quotation

* feat: update item button addition for supplier quotation

* fix: test case

---------

Co-authored-by: Nishka Gosalia <nishkagosalia@Nishkas-MacBook-Air.local>
Co-authored-by: Mihir Kandoi <kandoimihir@gmail.com>
2025-12-17 13:53:10 +05:30
rohitwaghchaure
dec474ef3a fix: incorrect current qty in stock reco (#51152) 2025-12-17 13:15:00 +05:30
diptanilsaha
f3142c4af6 fix: allow rename for market segment doctype 2025-12-17 12:39:34 +05:30
Ankush Menat
0b3e40b155 perf!: Avoid updating sales data on every transaction (#51151) 2025-12-17 07:04:46 +00:00
sudarshan-g
e32f898dd7 fix: show company currency in asset depreciation schedule 2025-12-17 12:09:22 +05:30
NaviN
5f6ed62c03 fix: use serial and batch bundle to fetch incoming rate (#51119) 2025-12-16 15:51:43 +01:00
Soham Kulkarni
382e4fe843 Merge pull request #51139 from sokumon/portal-redirect 2025-12-16 19:58:23 +05:30
Diptanil Saha
f07f2cfe88 Merge pull request #51120 from aerele/item-group-filter-quickentry 2025-12-16 18:26:17 +05:30
Mihir Kandoi
978aa9ac23 Merge pull request #51141 from aerele/fix/filter-disabled-suppliers 2025-12-16 18:21:23 +05:30
Mihir Kandoi
af4707d1ee Merge pull request #51136 from mihir-kandoi/gh42070 2025-12-16 18:17:51 +05:30
Mihir Kandoi
76da5efaa9 Merge pull request #51137 from mihir-kandoi/gh42599 2025-12-16 18:13:33 +05:30
sokumon
5986d79643 fix: remove /portal redirects 2025-12-16 18:12:58 +05:30
Sudharsanan11
6cc2290f6e fix(buying): add disabled filter for supplier 2025-12-16 17:58:20 +05:30
Raffael Meyer
ba9bbed038 fix(Rename Tool): use "Link" field instead of "Select" 2025-12-16 17:54:50 +05:30
Mihir Kandoi
273ff33ebf Merge pull request #51130 from mihir-kandoi/gh51126 2025-12-16 17:52:18 +05:30
Mihir Kandoi
38affb0562 fix: delayed tasks summary chart color 2025-12-16 17:47:23 +05:30
Mihir Kandoi
44840b8b80 fix: work order status for non tracked SFG 2025-12-16 17:33:41 +05:30
Kavin
2f19244660 fix(subcontract): ignore BOM qty validation for alternative items (#51122) 2025-12-16 17:26:34 +05:30
Logesh Periyasamy
890316a793 fix: add validation for transferred qty and handle MR transfer status for in-transit entry. (#50683)
* fix: add validation for transferred qty

* fix: modify if statement

* test: add unit test for mr transfer status in-transit entry
2025-12-16 17:25:30 +05:30
Mihir Kandoi
b6aec1d31a fix: ignore transfer material against if track semi finished goods 2025-12-16 16:36:48 +05:30
ruthra kumar
c2cd09cda7 Merge pull request #51048 from aerele/fetch-exchange-gain-loss-account
fix(payment entry): fetch gain loss account from company boot
2025-12-16 16:27:35 +05:30
ruthra kumar
c4136870cf Merge pull request #51123 from ruthra-kumar/fix_security_issue_in_payment_request
fix: ensure type on method parameter
2025-12-16 15:33:10 +05:30
ruthra kumar
c055e86e51 fix: ensure type on method parameter 2025-12-16 14:05:28 +05:30
Afsal Syed
3bef6bf5ef fix: add link filters for item group in quickentry 2025-12-16 13:03:31 +05:30
Mihir Kandoi
9ff5425859 Merge pull request #51100 from mihir-kandoi/gh41716 2025-12-16 12:01:37 +05:30
Mihir Kandoi
d0bdbfecef Merge pull request #51102 from mihir-kandoi/price-list-js-error 2025-12-16 11:24:28 +05:30
Mihir Kandoi
c287665033 fix: rejected qty not outward-ed in SCR 2025-12-16 11:23:19 +05:30
ruthra kumar
ac6583574e Merge pull request #51114 from frappe/l10n_develop
fix: sync translations from crowdin
2025-12-16 11:05:32 +05:30
ruthra kumar
9a4619a289 Merge pull request #51077 from aerele/standardize-cost-center-trigger
refactor: standardize cost_center updation across transactions
2025-12-16 10:51:29 +05:30
MochaMind
0563faca54 fix: Hungarian translations 2025-12-16 07:05:45 +05:30
MochaMind
bc213c45aa fix: Persian translations 2025-12-16 07:05:26 +05:30
0xD0M1M0
ad2c58cf2a feat: introduce extended bank transaction fields (#50021)
Co-authored-by: barredterra <14891507+barredterra@users.noreply.github.com>
2025-12-15 20:27:23 +01:00
Soham Kulkarni
8ea4e2139b Merge pull request #51097 from sokumon/portal-redirect 2025-12-15 17:56:24 +05:30
ruthra kumar
9331f8ce7e Merge pull request #50837 from Jatin3128/gh_38620
feat(accounting-period): add role-based bypass for accounting period restrictions
2025-12-15 17:36:43 +05:30
MochaMind
41cf546946 fix: sync translations from crowdin (#51000) 2025-12-15 12:28:21 +01:00
ruthra kumar
6adbe7a3fd Merge pull request #50782 from vorasmit/net-gl-balances
fix: only show net balance as opening in general ledger
2025-12-15 15:29:47 +05:30
Smit Vora
af9742a3ee Merge pull request #50788 from vorasmit/cascade-available-qty 2025-12-15 14:38:22 +05:30
Mihir Kandoi
b923a6b72c Merge pull request #51098 from mihir-kandoi/fix-dispatch-addr 2025-12-15 14:24:32 +05:30
Mihir Kandoi
09a8905b2d fix: price list arg type error 2025-12-15 14:20:10 +05:30
rohitwaghchaure
766d157320 fix: manufacturing sidebar (#51101) 2025-12-15 12:19:28 +05:30
sokumon
9486d0d462 fix: add list template to all portal doctypes 2025-12-15 10:38:30 +05:30
Mihir Kandoi
d7fea5d4e1 fix: incorrect mapping of dispatch addr when creating PO from SO 2025-12-15 07:30:45 +05:30
Mihir Kandoi
ae339f69f4 Merge pull request #49139 from Anjalii-Patel/fix-employee-report-self 2025-12-15 01:55:22 +05:30
MochaMind
af4d14e820 chore: update POT file (#51095) 2025-12-14 13:34:30 +01:00
Ankush Menat
db7456eea2 fix: Short circuit guest perm checks 2025-12-14 12:10:26 +05:30
Mihir Kandoi
88acf05ba2 Merge pull request #51091 from aerele/purchase-invoice-item-default-conversion-factor 2025-12-13 14:48:40 +05:30
Mihir Kandoi
bf3b3d4c02 Merge pull request #51090 from mihir-kandoi/active-empployee-filter 2025-12-13 14:47:26 +05:30
Mihir Kandoi
9b794d5a42 Merge pull request #51083 from aerele/mr-customer-provided-status 2025-12-13 14:39:35 +05:30
Mihir Kandoi
d811a368a9 fix: add filter to employee field in Job Card Time Log 2025-12-13 14:29:21 +05:30
Mihir Kandoi
719cb42c1e Merge pull request #51050 from mihir-kandoi/gh41617 2025-12-13 14:23:54 +05:30
ravibharathi656
8d523d2cd3 fix: remove default conversion factor in purchase invoice item 2025-12-13 14:16:03 +05:30
Mihir Kandoi
3de80ec640 fix: test cases 2025-12-13 13:39:19 +05:30
Mihir Kandoi
c9eda3c279 fix: bom creator page width and rate calculation 2025-12-13 11:40:51 +05:30
rohitwaghchaure
10a66b8e73 Merge pull request #51063 from KerollesFathy/fix-get-doctypes-to-be-ignored-list
fix(transaction-deletion): Add virtual doctypes to the list of ignored doctypes
2025-12-13 07:41:06 +05:30
KerollesFathy
0f7d89f4d1 refactor: remove redundant assignment of doctypes_to_be_ignored_list 2025-12-12 20:38:02 +00:00
SowmyaArunachalam
aa8a0d0a9f test(material-request): add test to validate status 2025-12-12 22:56:17 +05:30
rohitwaghchaure
2fa948b070 Merge pull request #51079 from rohitwaghchaure/fixed-support-54205
fix: stock ageing report
2025-12-12 20:42:30 +05:30
Rohit Waghchaure
cb84ffd972 fix: stock ageing report 2025-12-12 17:36:23 +05:30
Navin-S-R
c28f6f1856 refactor: standardize cost_center updation across transactions 2025-12-12 14:25:08 +05:30
Khushi Rawat
25bf2d94e7 Merge pull request #51070 from khushi8112/budget-validation-condition
fix: validate budget after cost center allocation
2025-12-12 13:51:08 +05:30
rohitwaghchaure
2db85ad883 Merge pull request #51069 from rohitwaghchaure/fixed-github-47939
fix: incorrect invoice qty
2025-12-12 13:36:08 +05:30
rohitwaghchaure
c3723e798d Merge pull request #51034 from aerele/fix/company-address-validation
fix(accounts): handle drop ship in company linked address validation
2025-12-12 13:34:14 +05:30
Sudharsanan11
f6a96e5563 test(accounts): add validation test for dispatch address with drop ship enabled 2025-12-12 13:14:40 +05:30
Sudharsanan11
2ec119e561 fix(accounts): handle drop ship in company linked address validation 2025-12-12 13:14:33 +05:30
Khushi Rawat
a8b94f2090 Merge pull request #51041 from aerele/fix-trial-balance-roundoff
fix(trial_balance): remove hardcoded precision for currency values
2025-12-12 13:09:08 +05:30
Rohit Waghchaure
96cdb7d54f fix: incorrect invoice qty 2025-12-12 13:06:51 +05:30
khushi8112
f9be8a46fb fix: validate budget after cost center allocation 2025-12-12 12:52:04 +05:30
rohitwaghchaure
3c032e1f35 Merge pull request #51047 from aerele/fix/disassembly-stock-entry
fix(manufacturing): get items for disassembly order
2025-12-12 11:44:12 +05:30
SowmyaArunachalam
97a7c0162d fix(material-request): update customer provided status 2025-12-12 11:21:42 +05:30
KerollesFathy
45a7195abe refactor: switch to or_filters so the query hits the DB only once 2025-12-11 20:56:05 +00:00
KerollesFathy
c7a7cb2b90 fix: Add virtual doctypes to the list of ignored doctypes in transaction deletion 2025-12-11 19:45:01 +00:00
Sagar Vora
7ad123592c Merge pull request #51057 from sagarvora/remove-draft-guard
fix: re-calculate outstanding / write-off amount during submission
2025-12-11 23:04:29 +05:30
Sagar Vora
09c9ac1b66 fix: re-calculate outstanding / write-off amount during submission 2025-12-11 22:37:59 +05:30
Soham Kulkarni
9cc48f3686 Merge pull request #51055 from jacob-salvi/develop 2025-12-11 19:11:19 +05:30
jacob-salvi
5ed48a8539 chore: exporting desktop icons 2025-12-11 18:49:30 +05:30
Sagar Vora
bd595602de chore: ignore noisy commits from git blame (#51049) 2025-12-11 18:05:51 +05:30
Sagar Vora
b3fdef8d19 fix: ensure fresh grand_total_diff is used for each calculation 2025-12-11 12:18:37 +00:00
Sudharsanan11
99148a2aba fix(manufacturing): get items for disassembly order 2025-12-11 16:35:02 +05:30
Sudharsanan11
86d6facab3 fix(manufacturing): add validation for disassemble qty 2025-12-11 16:32:04 +05:30
ravibharathi656
8e54be7808 fix(payment entry): fetch gain loss account from company boot 2025-12-11 16:20:10 +05:30
Khushi Rawat
f15efc543b feat: supplier invoice date in opening invoice creation tool (#50835) 2025-12-11 16:09:22 +05:30
Diptanil Saha
d4ef2ebd3c Merge pull request #51037 from diptanilsaha/frankfurter-api-backward-compatibility 2025-12-11 15:53:48 +05:30
Rohit Waghchaure
767e4762bb feat: run parallel reposting 2025-12-11 15:47:18 +05:30
diptanilsaha
5c2bb66028 fix(currency exchange settings): added backward compatibility for frankfurter api 2025-12-11 15:14:28 +05:30
Navin-S-R
a8af04f6fc fix(trial_balance): remove hardcoded precision for currency values 2025-12-11 15:07:46 +05:30
rohitwaghchaure
605b7c5efe Merge pull request #51035 from rohitwaghchaure/fixed-serial-nos-for-putaway
fix: put-away rule not applying on serial nos
2025-12-11 14:38:19 +05:30
Mihir Kandoi
a34dd9d247 Merge pull request #50955 from aerele/issue-50951 2025-12-11 14:24:10 +05:30
Rohit Waghchaure
6bb0bdcdca fix: putaway rule not applying on serial nos 2025-12-11 13:43:58 +05:30
rohitwaghchaure
a20fd7428c Merge pull request #51030 from mihir-kandoi/gh49703
fix: update project costing based on child table field and not parent…
2025-12-11 13:22:32 +05:30
Mihir Kandoi
8d9b83e410 Merge pull request #51014 from mihir-kandoi/gh42653-3 2025-12-11 11:35:33 +05:30
Mihir Kandoi
e57d2b4811 fix: update project costing based on child table field and not parent level 2025-12-11 11:21:35 +05:30
rohitwaghchaure
f3ba59480b Merge pull request #51027 from rohitwaghchaure/fixed-support-48228
fix: Serial/Batches not fetching when creating Material Transfer from Purchase Receipt
2025-12-11 10:57:44 +05:30
Mihir Kandoi
4e4452b73e Merge pull request #51019 from mihir-kandoi/gh50781 2025-12-11 10:23:28 +05:30
Mihir Kandoi
dbbad3e6ee Merge pull request #51015 from mihir-kandoi/gh46164 2025-12-11 10:22:58 +05:30
Rohit Waghchaure
d16c50486a fix: Serial/Batches not fetching when creating Material Transfer from Purchase Receipt 2025-12-11 10:12:42 +05:30
Nishka Gosalia
254eb5e7d6 Merge pull request #51021 from nishkagosalia/gh-50390 2025-12-11 03:26:39 +00:00
Mihir Kandoi
074bdd119b fix: check if terms is not set in selling controller 2025-12-10 21:58:16 +05:30
Mihir Kandoi
3787b9fbe5 fix: check if terms is not set in buying controller 2025-12-10 21:57:33 +05:30
Mihir Kandoi
77045e45c5 fix: where condition 2025-12-10 21:54:43 +05:30
Mihir Kandoi
a52f42c7e4 fix: add is_active filter 2025-12-10 21:53:11 +05:30
Diptanil Saha
8e0227ea68 Merge pull request #50963 from Jatin3128/gh_38026 2025-12-10 17:41:23 +05:30
Diptanil Saha
c02fb7a619 Merge pull request #50967 from Jatin3128/gh_49740 2025-12-10 17:19:27 +05:30
Mihir Kandoi
0bec419301 fix: check if item is variant when creating WO from MR 2025-12-10 16:53:02 +05:30
rohitwaghchaure
4f99045ca0 Merge pull request #51007 from rohitwaghchaure/fixed-reposting-only-gl
fix: repost accounting ledgers for skipped records
2025-12-10 15:12:30 +05:30
Diptanil Saha
eb8ea4a02d Merge pull request #50948 from aerele/fix/delivery-note-trends 2025-12-10 15:11:56 +05:30
rohitwaghchaure
74f748e1f5 Merge pull request #51009 from nishkagosalia/gh-50389-2
fix: updating base amounts through python for timesheet
2025-12-10 14:43:05 +05:30
Mihir Kandoi
7f1c11c92e fix: consider reserved qty when fetching items from SO in PP 2025-12-10 14:27:52 +05:30
Mihir Kandoi
8cb0632081 fix: make sure buying/selling default terms from company master is default 2025-12-10 14:08:22 +05:30
Nishka Gosalia
e8a8d3947c fix: updating base amount in timesheet 2025-12-10 13:12:47 +05:30
Nishka Gosalia
4568114ba8 test: test cases added for checking the base amounts in timesheet 2025-12-10 13:03:14 +05:30
Nishka Gosalia
88d8310a47 fix: updating base amounts through python for timesheet 2025-12-10 13:03:14 +05:30
Khushi Rawat
85114eda7c Merge pull request #50804 from ljain112/fix-asset-repair-amount
fix: correct logic for repair cost in asset repair
2025-12-10 12:58:13 +05:30
Rohit Waghchaure
5757feb45a fix: repost accounting ledgers for skipped records 2025-12-10 12:07:46 +05:30
Khushi Rawat
f301b36b5e Merge pull request #50999 from khushi8112/budget-fixes
fix: better manual budget distribution
2025-12-10 11:57:13 +05:30
Sudharsanan11
198eb372e3 fix(stock): remove total bar in chart view 2025-12-10 11:39:55 +05:30
Mihir Kandoi
60470e2a5b Merge pull request #50952 from rtdany10/wo-flt-issue 2025-12-10 09:51:55 +05:30
Diptanil Saha
dc718f7acb Merge pull request #51001 from diptanilsaha/gh-39891 2025-12-10 09:49:44 +05:30
diptanilsaha
2fe5fad884 fix(share balance): use currency field instead of int for rate and amount 2025-12-10 08:13:22 +05:30
khushi8112
ed4c17d3a2 fix: patch to set budget distribution total 2025-12-10 03:06:05 +05:30
khushi8112
f194ac093c feat: show budget distribution total 2025-12-10 02:48:44 +05:30
khushi8112
1c82f42fa8 fix: better manual budget distribution on update 2025-12-10 02:19:29 +05:30
khushi8112
d42aad18a7 fix: remove revise budget permission 2025-12-10 00:46:03 +05:30
khushi8112
6a03fc6ede fix: add company-based filter to account field 2025-12-10 00:41:39 +05:30
khushi8112
75999a7ae4 fix: make amount and percent field read only when distribute equally is enabled 2025-12-10 00:38:33 +05:30
Diptanil Saha
b53b6cac52 Merge pull request #50944 from aerele/return-discount-validation 2025-12-09 20:46:24 +05:30
Diptanil Saha
ca12d88514 Merge pull request #50979 from ljain112/fix-item-wise-sales-register-develop 2025-12-09 20:04:13 +05:30
Mihir Kandoi
68703d6e5b Merge pull request #50930 from elshafei-developer/Fix-typo 2025-12-09 18:40:07 +05:30
Mihir Kandoi
8f2b3f8703 Merge pull request #50912 from aerele/issue-50832 2025-12-09 18:35:48 +05:30
Mihir Kandoi
997401a16a Merge pull request #50910 from aerele/fix/validate-picklist-partial-reserved-qty 2025-12-09 18:33:29 +05:30
Mihir Kandoi
a62b0ca196 Merge pull request #50984 from mihir-kandoi/phantom-bom-item-filter 2025-12-09 18:29:40 +05:30
Mihir Kandoi
2e5241a211 Merge pull request #50987 from mihir-kandoi/inward-status-fix 2025-12-09 18:29:02 +05:30
Diptanil Saha
4edcc12edc Merge pull request #50970 from Abdeali099/cancle-PI-fix 2025-12-09 17:11:31 +05:30
MochaMind
cbc0f327d6 fix: sync translations from crowdin (#50852) 2025-12-09 12:37:24 +01:00
rohitwaghchaure
30ae3e0b59 Merge pull request #50978 from rohitwaghchaure/fixed-support-55110
fix: performance of the reposting
2025-12-09 16:35:03 +05:30
Diptanil Saha
a28d799c09 Merge pull request #50968 from Abdeali099/pr-bulk-update 2025-12-09 16:28:31 +05:30
Mihir Kandoi
ec3cd7e09c feat: add return status 2025-12-09 16:15:58 +05:30
Diptanil Saha
13d4f5ec31 Merge pull request #49963 from ljain112/tds-jv 2025-12-09 15:41:35 +05:30
Mihir Kandoi
baf884f95c fix: item should not be a fixed asset if bom is phantom 2025-12-09 15:38:46 +05:30
Rohit Waghchaure
1bcfad8eb1 fix: performance of the reposting 2025-12-09 14:51:32 +05:30
ljain112
2767cb04fb fix: handle duplicate description in item-wise report 2025-12-09 13:34:14 +05:30
rohitwaghchaure
5401843315 Merge pull request #50974 from rohitwaghchaure/fixed-sre-for-return-components
fix: SRE while returning components
2025-12-09 11:44:40 +05:30
Rohit Waghchaure
5e2d246931 fix: SRE while returning components 2025-12-08 22:41:07 +05:30
rohitwaghchaure
e8f87927e1 Merge pull request #50972 from rohitwaghchaure/fixed-github-50917
fix: incorrect condition
2025-12-08 20:08:51 +05:30
rohitwaghchaure
107fa1d605 Merge pull request #50971 from rohitwaghchaure/fixed-github-33408
fix: do not create a Purchase Receipt for returned items (Debit Note)
2025-12-08 19:53:50 +05:30
Rohit Waghchaure
264baf34f6 fix: incorrect condition 2025-12-08 19:50:26 +05:30
Rohit Waghchaure
66407d22fc fix: do not create a Purchase Receipt for returned items (Debit Note) 2025-12-08 19:24:57 +05:30
Abdeali Chharchhoda
f26ee9e546 fix: ensure payment request button only shows for submitted invoices 2025-12-08 18:51:21 +05:30
Abdeali Chharchhoda
5154fa8259 refactor: payment request status updates with bulk database operation 2025-12-08 18:00:29 +05:30
Jatin3128
b2feb5abbe feat(sales_order, purchase_order): add bulk close and reopen actions in list view 2025-12-08 17:28:25 +05:30
Soham Kulkarni
b58c4edd5d chore: move report to the correct module (#50959) 2025-12-08 14:55:27 +05:30
rohitwaghchaure
c5bbabac4b Merge pull request #50962 from rohitwaghchaure/fixed-github-50829
fix: warning message to avoid serial no series overlap issue
2025-12-08 14:40:10 +05:30
Jatin3128
6ac76bac6e fix(payment_entry): add due date to payment reference rows 2025-12-08 14:17:32 +05:30
Rohit Waghchaure
c5fdc256fa fix: warning message to avoid serial no series overlap issue 2025-12-08 14:17:02 +05:30
MochaMind
0376bba345 chore: update POT file (#50957) 2025-12-07 16:32:50 +01:00
rohitwaghchaure
2e803e6494 Merge pull request #50937 from aerele/support-54673
fix: validate available stock with multiple dimensions
2025-12-07 10:46:38 +05:30
Afsal Syed
f13022835a fix: sanitize address display by stripping HTML tags using html2text 2025-12-06 21:41:33 +05:30
venkat102
6e44951a96 fix: use separate item 2025-12-06 14:00:51 +05:30
Dany Robert
80730908c9 fix: precision issue on job card submission 2025-12-06 10:49:15 +05:30
venkat102
66f56eea33 fix: enable validate_negative_stock in existing dimensions 2025-12-06 00:24:20 +05:30
Diptanil Saha
31d55248e4 Merge pull request #50931 from diptanilsaha/gh-49357 2025-12-05 16:31:54 +05:30
Diptanil Saha
994dd425d4 Merge pull request #50943 from diptanilsaha/gh-49427 2025-12-05 16:31:08 +05:30
ravibharathi656
fab1ef5d76 fix: include return invoice discount in discount validation 2025-12-05 15:40:34 +05:30
Khushi Rawat
97711b7e83 Merge pull request #50941 from khushi8112/asset-over-creation-from-pr-pi
fix(asset): prevent creating assets beyond purchased quantity
2025-12-05 15:11:24 +05:30
khushi8112
7012345968 fix: filter out cancelled asset in the query 2025-12-05 13:08:29 +05:30
khushi8112
7bfcdb13b1 fix: better validation message 2025-12-05 12:55:41 +05:30
diptanilsaha
d6bdbfe266 fix(sales invoice): 100% additional discount gl issue with discount accounting 2025-12-05 12:50:28 +05:30
khushi8112
2db09b3840 fix(asset): prevent creating assets beyond purchased quantity 2025-12-05 09:59:05 +05:30
venkat102
1e2c56874f test: validate negative stock with multiple inventory dimensions 2025-12-04 23:58:25 +05:30
rohitwaghchaure
17ff48ab92 Merge pull request #50929 from rohitwaghchaure/fixed-backflushed-basedd-on-for-job-card
fix: backflush based on for job card
2025-12-04 23:11:35 +05:30
Rohit Waghchaure
c807a7be7b fix: backflush based on for job card 2025-12-04 22:53:30 +05:30
rohitwaghchaure
44919be5a6 Merge pull request #50936 from rohitwaghchaure/fixed-stock-resevation-job-card-manufacture
fix: SRE for manufacture entry for job card
2025-12-04 22:49:51 +05:30
venkat102
8f86c1b3e9 fix: validate available stock with multiple dimensions 2025-12-04 22:05:21 +05:30
Rohit Waghchaure
4ad8e55d06 fix: SRE for manufacture entry for job card 2025-12-04 22:03:54 +05:30
El-Shafei H.
b5ad4acc41 Fix typo in docstring for update_product_bundle_rate 2025-12-04 12:03:41 +03:00
Khushi Rawat
931f0663b1 Merge pull request #50927 from khushi8112/income-as-root-type-for-round-off-account
feat: allow income as root type for round off account
2025-12-04 13:14:12 +05:30
khushi8112
2bdcec0a7e feat: allow income as root type for round off account 2025-12-04 13:03:57 +05:30
Khushi Rawat
eb38accb33 Merge pull request #50824 from khushi8112/move-accounts-freezing-setting-to-company
refactor: Move accounts freezing setting to company
2025-12-04 12:16:46 +05:30
Khushi Rawat
c5b1af84eb Merge pull request #50879 from aerele/is-fixed-asset-set-only-once
fix: remove set_only_once from is_fixed_asset field
2025-12-04 12:14:19 +05:30
Khushi Rawat
01c14b5ce4 Merge pull request #50923 from khushi8112/fix-manual-depreciation-reset-issue
fix: do not recalculate depreciation if already exist
2025-12-04 11:56:45 +05:30
Khushi Rawat
a7155c1fdb Merge pull request #50746 from aerele/asset-depreciation-role
feat(asset): make asset depreciation failure notification role configurable
2025-12-04 11:41:06 +05:30
khushi8112
b75e7a1188 fix: do not recalculate depreciation if already exist 2025-12-04 11:37:05 +05:30
rohitwaghchaure
d6087e5d92 Merge pull request #50913 from rohitwaghchaure/fixed-github-46923
fix: variant items not fetched while making BOM for Variant Item
2025-12-04 10:07:22 +05:30
ravibharathi656
70521fb9bf fix: remove set_only_once from is_fixed_asset 2025-12-04 09:17:32 +05:30
SowmyaArunachalam
b5ee193566 chore(asset): change field name 2025-12-03 20:53:38 +05:30
Rohit Waghchaure
a0256bd798 fix: variant items not fetched while making BOM for Variant Item 2025-12-03 19:24:43 +05:30
Pugazhendhi Velu
445a255a7f test: add test for return status in delivery note 2025-12-03 13:19:59 +00:00
Pugazhendhi Velu
af212f520d fix: change is_return value in filter from Yes to 1 2025-12-03 13:14:39 +00:00
Pugazhendhi Velu
dec67eecad fix: add return status for delivery note 2025-12-03 13:10:22 +00:00
rohitwaghchaure
6515bb04bf Merge pull request #50905 from rohitwaghchaure/fixed-github-46855
fix: LCV is not changing the valuation of the repacked item
2025-12-03 18:27:18 +05:30
rohitwaghchaure
b96b7bd046 Merge pull request #50853 from mihir-kandoi/gh33087
fix: incorrect putaway rule validation on stock reco
2025-12-03 18:26:46 +05:30
Sudharsanan11
758553b9fc test(picklist): add test for reserved qty after partial delivery 2025-12-03 18:23:32 +05:30
Sudharsanan11
f5b75b27d7 fix(picklist): calculate picked qty excluding the delivered qty 2025-12-03 18:23:32 +05:30
Mihir Kandoi
7c1a947cd8 Merge pull request #50906 from mihir-kandoi/gh39459 2025-12-03 18:09:37 +05:30
Rohit Waghchaure
ccbbc60585 fix: LCV is not changing the valuation of the repacked item 2025-12-03 18:07:45 +05:30
rohitwaghchaure
47af1cec1b Merge pull request #50902 from mihir-kandoi/gh39358
fix: fg qty uom in manufacture entry
2025-12-03 18:05:31 +05:30
Mihir Kandoi
ec06f4a71b fix: untranslated string in job card 2025-12-03 17:51:06 +05:30
Mihir Kandoi
d9a377108c fix: fg qty uom in manufacture entry 2025-12-03 15:45:56 +05:30
rohitwaghchaure
ed73bd6626 Merge pull request #50896 from rohitwaghchaure/fixed-github-50892
fix: quality inspection showing Not Saved
2025-12-03 13:38:15 +05:30
Rohit Waghchaure
3f78d6afed fix: quality inspection showing Not Saved 2025-12-03 13:00:06 +05:30
Khushi Rawat
4e578c4f83 fix: conflicts 2025-12-03 11:47:04 +05:30
khushi8112
404e68bdc2 fix: more patch related changes 2025-12-03 11:45:01 +05:30
khushi8112
4f33ee01cf fix: undo incorrect patch modification 2025-12-03 11:45:01 +05:30
khushi8112
c7e7e02b5b refactor: use Singles table to get acc_frozen_upto and modifier during migration 2025-12-03 11:45:01 +05:30
khushi8112
4df20a3122 fix: patch to migrate setting 2025-12-03 11:45:01 +05:30
khushi8112
29048c3364 refactor: fix incorrect conditon 2025-12-03 11:45:01 +05:30
khushi8112
09cdb943ec fix: remove duplicate method 2025-12-03 11:45:01 +05:30
khushi8112
0373f7f33f chore: validation for none type object 2025-12-03 11:45:01 +05:30
khushi8112
95877e73f0 fix: use correct date value 2025-12-03 11:45:01 +05:30
khushi8112
16f4e12854 chore: fix typo 2025-12-03 11:45:01 +05:30
khushi8112
9cc8a42074 fix: use correct field name 2025-12-03 11:45:01 +05:30
khushi8112
28febc69e8 fix: validate pending reposting till acc frozen date 2025-12-03 11:45:01 +05:30
Khushi Rawat
eee78766cd chore: resolved conflicts 2025-12-03 11:45:01 +05:30
Khushi Rawat
826c74eb71 chore: remove debug flag accidentally left in code 2025-12-03 11:45:01 +05:30
Khushi Rawat
6da10b9f97 fix: update validation and test cases 2025-12-03 11:45:01 +05:30
Khushi Rawat
cd540ab4cc chore: migration patch for account freezing fields 2025-12-03 11:45:01 +05:30
Khushi Rawat
b2e4e76b97 refactor: remove accounts freezing settings from accounts settings 2025-12-03 11:45:01 +05:30
Khushi Rawat
479e412a44 refactor: get frozen accounts settings from Company in tests 2025-12-03 11:45:01 +05:30
Khushi Rawat
d330700f39 refactor: get frozen accounts settings from Company in patches 2025-12-03 11:44:59 +05:30
Khushi Rawat
dc85babb4d refactor: get frozen accounts settings from Company in Deferred Revenue 2025-12-03 11:42:48 +05:30
Khushi Rawat
17a6392407 refactor: updated logic in depreciation and gl to validate acc frozen date company wise 2025-12-03 11:42:48 +05:30
Khushi Rawat
58db596027 feat: move frozen account settings to Company for company-specific configuration 2025-12-03 11:42:48 +05:30
ruthra kumar
7bca3bbcd8 Merge pull request #50875 from ruthra-kumar/ci_fix_broken_coverage
ci: fix coverage
2025-12-03 11:09:22 +05:30
Mihir Kandoi
b12b40f373 Merge pull request #50869 from mihir-kandoi/gh31117 2025-12-02 22:00:17 +05:30
rohitwaghchaure
72edd86561 Merge pull request #50888 from rohitwaghchaure/fixed-github-48282
fix: cost center not reset
2025-12-02 21:59:58 +05:30
Rohit Waghchaure
29f2ecbd6f fix: cost center not reset 2025-12-02 21:49:03 +05:30
rohitwaghchaure
8053303378 Merge pull request #50882 from rohitwaghchaure/fixed-mandatory-depends-on-for-rejected-inventory-dimension
fix: mandatory depends on for the rejected inventory dimension field
2025-12-02 20:39:59 +05:30
rohitwaghchaure
1a920c035b Merge pull request #50880 from rohitwaghchaure/fixed-sre-status-condition
fix: SRE validation
2025-12-02 20:36:33 +05:30
Diptanil Saha
f106d0e762 Merge pull request #50864 from aerele/allow-leaf-nodes-only 2025-12-02 20:36:04 +05:30
Rohit Waghchaure
5daa625fe8 fix: mandatory depends on for the rejected inventory dimension field 2025-12-02 20:21:07 +05:30
Diptanil Saha
9f599ee52d Merge pull request #50372 from aerele/validate-company-linked-address-field 2025-12-02 20:14:06 +05:30
Rohit Waghchaure
d82464b2f9 fix: SRE validation 2025-12-02 20:04:42 +05:30
ruthra kumar
88e94aa53a ci: code coverage action 2025-12-02 19:34:46 +05:30
rohitwaghchaure
95ff1d48ab Merge pull request #50874 from rohitwaghchaure/fixed-ux-material-request
fix: UX for auto created material request via reorder
2025-12-02 17:55:03 +05:30
rohitwaghchaure
3c6369d396 Merge pull request #50808 from aerele/support-51284
fix(stock entry): use fg item expense account for direct manufacturing entry
2025-12-02 17:31:54 +05:30
rohitwaghchaure
bee0e5d8d4 Merge pull request #50850 from aerele/support-53932
fix(barcode_scanner): set serial and batch before item to prevent FIFO override
2025-12-02 17:31:25 +05:30
Rohit Waghchaure
1e60076ade fix: UX for auto created material request via reorder 2025-12-02 17:21:50 +05:30
Diptanil Saha
4ad624be9c Merge pull request #50773 from aerele/delet-invoice-with-cancelled-repost 2025-12-02 17:12:19 +05:30
Diptanil Saha
026487dce7 Merge pull request #50846 from aerele/validate-product-bundle-stock-in-pos 2025-12-02 17:07:00 +05:30
Mihir Kandoi
9b5d215a7a fix: do cancellation procedures on WO close 2025-12-02 15:36:17 +05:30
Sudharsanan11
2612152456 test(pos): add test for product bundle negative stock validation 2025-12-02 15:19:08 +05:30
Smit Vora
75839f36ba Merge pull request #50733 from vorasmit/qb-changes 2025-12-02 14:41:58 +05:30
ravibharathi656
e08805128b fix: exclude is_group records 2025-12-02 14:09:12 +05:30
Smit Vora
09325aad3d refactor: tax witholding in JV out of document class 2025-12-02 14:08:05 +05:30
Mihir Kandoi
ba94d02cb4 Merge pull request #50834 from mihir-kandoi/pp-flaky-test 2025-12-02 13:37:11 +05:30
Mihir Kandoi
c404e3b093 fix: incorrect query/function logic 2025-12-02 13:19:26 +05:30
rohitwaghchaure
cd5b913750 Merge pull request #50856 from rohitwaghchaure/fixed-operation-read-only
fix: not able to set operation in work order
2025-12-02 12:22:46 +05:30
Khushi Rawat
dcdafc79ee Merge pull request #50794 from aerele/fix-capitalized-asset-repair-gl
fix: use asset in against_voucher while posting gl entries for capitalised asset repairs
2025-12-02 12:07:04 +05:30
Diptanil Saha
91e285efd7 Merge pull request #50149 from Dharanidharan2813/fix/payment-terms-template-fetching 2025-12-02 12:05:12 +05:30
Khushi Rawat
e9e498cbd0 Merge pull request #50793 from ljain112/fix-asset-repair-accounting-dimensions
fix: include accounting dimensions in stock entries created during asset repair.
2025-12-02 11:56:35 +05:30
Rohit Waghchaure
b24c38f332 fix: not able to set operation in work order 2025-12-02 11:18:07 +05:30
Mihir Kandoi
b4fbda4da3 Merge pull request #50854 from mihir-kandoi/employee-filter 2025-12-02 11:17:26 +05:30
Mihir Kandoi
21ec4ed911 fix: show only active employees when starting job card 2025-12-02 11:16:01 +05:30
Mihir Kandoi
7deb407206 fix: incorrect putaway rule validation on stock reco 2025-12-02 10:42:28 +05:30
Navin-S-R
8c35a6ecdd chore: reload asset doc before assertEqual 2025-12-02 00:43:15 +05:30
Pugazhendhi Velu
92ec633a5c fix(barcode_scanner): set serial and batch before item to prevent FIFO override 2025-12-01 19:11:57 +00:00
Navin-S-R
bcf6deec9a test: add unit test to validate capitalized asset repair gl entries being booked against the asset 2025-12-01 23:48:14 +05:30
MochaMind
35379294c3 fix: sync translations from crowdin (#50723) 2025-12-01 16:58:29 +01:00
rohitwaghchaure
1252fed642 Merge pull request #50844 from rohitwaghchaure/fixed-label-for-warehouse
fix: label for warehouse based on material request type
2025-12-01 21:28:21 +05:30
Rohit Waghchaure
699e9b4452 fix: label for warehouse based on material request type 2025-12-01 20:31:14 +05:30
Sudharsanan11
38b4536300 fix(pos): add negative stock validation for product bundle 2025-12-01 19:23:35 +05:30
Jatin3128
cfdbeb6a1a feat(accounting-period): add role-based bypass for accounting period restrictions 2025-12-01 17:33:49 +05:30
ljain112
e1fd90f731 chore: remove unused import for depreciation schedule 2025-12-01 17:06:42 +05:30
ljain112
8ee2cbf259 chore: remove unwanted strings 2025-12-01 17:05:00 +05:30
Mihir Kandoi
25458d6ba6 fix: flaky production plan test 2025-12-01 16:04:05 +05:30
diptanilsaha
1966584804 chore: trigger GitHub actions 2025-12-01 15:27:30 +05:30
ljain112
2a0ba84f69 refactor: linters 2025-12-01 13:17:47 +05:30
ljain112
0c1df30771 fix: add permission check 2025-12-01 13:13:55 +05:30
Diptanil Saha
b2ddef8340 Merge pull request #50797 from aerele/dr-cr-outstanding 2025-12-01 13:11:02 +05:30
Diptanil Saha
150c764205 Merge pull request #50814 from diptanilsaha/st54148 2025-12-01 11:45:50 +05:30
rohitwaghchaure
b855eb54b3 Merge pull request #50799 from rohitwaghchaure/fixed-negative-batch-qty-in-SCR
fix: negative batch in subcontracting receipt
2025-12-01 11:44:41 +05:30
diptanilsaha
7e8d19b0c8 fix(email campaign): send emails using bcc 2025-11-30 23:30:15 +05:30
Khushi Rawat
48783d136f Merge pull request #50749 from khushi8112/replace-use-of-publish-realtime-before-print
refactor: company details popup
2025-11-30 22:12:07 +05:30
Khushi Rawat
8b8f569da2 Merge pull request #50811 from khushi8112/extend-print-format-to-other-docs
feat: Standard Print Format for Purchase Order, Delivery Note and POS Invoice
2025-11-30 21:51:52 +05:30
khushi8112
d050cd221d fix: minor change 2025-11-30 21:29:26 +05:30
khushi8112
5cfd7ec32a refactor: generalize popup for multiple doctypes 2025-11-30 18:30:47 +05:30
khushi8112
b808a51d8f refactor: Make labels translatable 2025-11-30 17:38:50 +05:30
khushi8112
1125f96316 feat: print format with images for PO, Delivery Note and POS Invoice 2025-11-30 17:25:02 +05:30
khushi8112
725a4fcf2d feat: standard print format for POS Invoice 2025-11-30 17:00:55 +05:30
MochaMind
32cf6148aa chore: update POT file (#50810) 2025-11-30 11:24:24 +01:00
Pugazhendhi Velu
ba2411b4ee test: add test for fg item expense account in direct manufacturing 2025-11-30 06:32:35 +00:00
Pugazhendhi Velu
ce1312764f fix(stock entry): use fg item expense account for direct manufacturing entry 2025-11-30 06:32:27 +00:00
khushi8112
3a4c1a9f9a refactor: Replace use publish_realtime with msgprint for cleaner flow 2025-11-30 01:26:02 +05:30
khushi8112
945390502e feat: standard print format for Purchase Order and Delivery Note 2025-11-30 01:25:11 +05:30
ruthra kumar
ae7db7ea5a Merge pull request #50802 from Jatin3128/gh_48028
fix(accounts-payable-summary): add Show GL Balance check similar to A…
2025-11-29 11:34:05 +05:30
Jatin3128
8a7e5d0626 fix(accounts-payable-summary): add Show GL Balance check similar to Accounts Receivable Summary 2025-11-28 21:41:32 +05:30
ljain112
ff9b392024 fix: add duplicate purchase invoice validation in asset repair 2025-11-28 19:13:31 +05:30
ljain112
0b84d11600 perf: enhance validation for purchase invoices to check submission status for all invoices 2025-11-28 19:09:54 +05:30
ljain112
c2810ea799 perf: replace get_doc with get_lazy_doc for asset retrieval and optimize stock entry fetching 2025-11-28 18:54:37 +05:30
ljain112
00ffdee928 fix: update repair cost logic to set value only for positive amounts 2025-11-28 18:45:07 +05:30
ljain112
b9aaae6343 fix: remove unnecessary filtering by search text in get_expense_accounts 2025-11-28 18:36:13 +05:30
ljain112
e6160d1b63 fix: correct logic for repair cost in asset repair 2025-11-28 18:30:51 +05:30
Khushi Rawat
82b6326e0b Merge pull request #50792 from ljain112/fix-asset-repair-connection
fix: add Stock Entry link to Asset Repair doctype.
2025-11-28 17:34:38 +05:30
Khushi Rawat
e42b751dce Merge pull request #50772 from aerele/fix-asset-purchase-date
fix: use posting_date instead of bill_date from purchase invoice
2025-11-28 17:18:13 +05:30
Rohit Waghchaure
71e46b3ef5 fix: negative batch in subcontracting receipt 2025-11-28 16:26:55 +05:30
l0gesh29
765f9a9bbf fix(payment-recon): add validation for outstanding of dr_cr 2025-11-28 15:01:50 +05:30
ljain112
cdbe8b909b refactor: show_general ledger for consistency with other doctyoes 2025-11-28 14:13:24 +05:30
ruthra kumar
956e5b1b68 fix: incorrect positional param for get_field_precision util (#50764)
fix: incorrect positional param for get_field_precision util
2025-11-28 14:01:36 +05:30
Smit Vora
92fdec9b92 test: add test for projected quantity cascading across multiple sales orders 2025-11-28 13:45:20 +05:30
ljain112
147a5ee953 fix: include accounting dimensions in stock entries created during asset repair. 2025-11-28 13:35:47 +05:30
Smit Vora
a2fadd9347 fix: use ValueWrapper consistently 2025-11-28 13:33:24 +05:30
ljain112
da7f28a3c3 fix: add Stock Entry link to Asset Repair doctype. 2025-11-28 13:05:24 +05:30
Navin S R
a7e43eddad fix: use asset in against_voucher while posting gl entries for capitalized asset repairs 2025-11-28 12:54:27 +05:30
Diptanil Saha
0520ab3c66 Merge pull request #50642 from Jatin3128/gh_48202 2025-11-28 11:50:34 +05:30
Smit Vora
d344be32a0 fix: cascade projected quantity across multiple items in material requests 2025-11-28 11:37:25 +05:30
Aadhil
9145bf5563 fix: restore missing account number for Indirect Expenses in standard COA with Numbers (#50767) 2025-11-27 19:23:02 +05:30
Smit Vora
b7c7e0746e fix: only show net gl balance as opening in general ledger 2025-11-27 19:15:46 +05:30
Aadhil
355aa52cb8 feat: add Account Category field to Account (Chart of Accounts) (#50766) 2025-11-27 18:40:20 +05:30
Mihir Kandoi
cf449d8dcb Merge pull request #50777 from mihir-kandoi/sr-better-uiux 2025-11-27 17:10:45 +05:30
Diptanil Saha
98e864bea0 Merge pull request #50775 from frappe/mergify/bp/develop/pr-50558 2025-11-27 16:58:42 +05:30
Mihir Kandoi
aab7cd1ae6 chore: make unnecessary field read only and show only when required 2025-11-27 16:51:35 +05:30
Diptanil Saha
31142b2f47 chore: resolve conflict 2025-11-27 16:40:55 +05:30
Sherin KR
c5d92d7999 fix: item price not considering based on valid_upto
(cherry picked from commit dfda8e6241)

# Conflicts:
#	erpnext/selling/page/point_of_sale/point_of_sale.py
2025-11-27 11:04:59 +00:00
l0gesh29
d8fc369e38 fix: add validation for cancelled reposting entries 2025-11-27 14:19:32 +05:30
Navin S R
145d40dec8 fix: use posting_date instead of bill_date from purchase invoice 2025-11-27 14:06:43 +05:30
ljain112
6079bee3a3 fix: remove redundant party variable assignments 2025-11-27 13:44:28 +05:30
ljain112
6a66ce5a97 fix: add is_tax_withholding_account field to JournalEntryAccount to avoid recursive tds 2025-11-27 13:40:23 +05:30
rohitwaghchaure
8a5fd5fe89 Merge pull request #50769 from rohitwaghchaure/fixed-two-primary-buttons
fix: two primary buttons
2025-11-27 11:56:00 +05:30
Rohit Waghchaure
f68515210b fix: two primary buttons 2025-11-27 11:43:21 +05:30
Hussain Nagaria
c2358c6b3f fix: incorrect positional param for get_field_precision util 2025-11-26 22:19:50 +05:30
rohitwaghchaure
8ed9ee9213 Merge pull request #50742 from rohitwaghchaure/fix-serial-batch-disassembly
fix: inward same serial / batches in disassembly which were used
2025-11-26 20:57:13 +05:30
Rohit Waghchaure
95e6c72539 fix: inward same serial / batches in disassembly which were used 2025-11-26 18:01:55 +05:30
Mihir Kandoi
2b3bdfe387 Merge pull request #50759 from mihir-kandoi/fix-bad-test 2025-11-26 17:59:55 +05:30
Mihir Kandoi
5391ca2a55 test: fix flaky test case 2025-11-26 17:40:05 +05:30
Jatin3128
0e7f75f5c0 fix(journal-entry): auto-populate bank account when user selects account (#50744)
* fix(journal-entry): auto-populate bank account when user selects account

* refactor(journal-entry): simplify get_value call and return None by default

---------

Co-authored-by: Jatin3128 <jatinsarna8@gmail.com>
2025-11-26 17:26:33 +05:30
Mihir Kandoi
d17120909c Merge pull request #50736 from mihir-kandoi/refactor-so-to-po 2025-11-26 16:55:12 +05:30
Soham Kulkarni
74a5325a95 Merge pull request #50732 from sokumon/export-all-sidebars 2025-11-26 16:22:55 +05:30
Diptanil Saha
0ca6e19a85 Merge pull request #50752 from ljain112/fix-round-off-so 2025-11-26 14:31:53 +05:30
Diptanil Saha
383c33b02a Merge pull request #50753 from diptanilsaha/gh-50083 2025-11-26 14:27:30 +05:30
diptanilsaha
079218ffbf fix: exchange_rate field visibility on invoice currency change 2025-11-26 14:20:05 +05:30
ljain112
563c2998ca fix: enhance SalesOrderController setup method to call super.setup 2025-11-26 12:51:14 +05:30
SowmyaArunachalam
d52d98666f chore: update description 2025-11-25 23:05:59 +05:30
SowmyaArunachalam
e830cca886 feat(asset): make asset depreciation failure notification role configurable 2025-11-25 22:28:26 +05:30
Mihir Kandoi
7b592d8737 feat: add provision to mass select supplier 2025-11-25 20:54:24 +05:30
Mihir Kandoi
88b262abc7 fix: more coderabbit issues 2025-11-25 16:07:35 +05:30
rohitwaghchaure
a8d3e9bacc Merge pull request #50735 from rohitwaghchaure/fixed-validation-for-batch
fix: stock reservation validation
2025-11-25 15:14:55 +05:30
ruthra kumar
264dcf8539 Merge pull request #50734 from diptanilsaha/frankfurter-api
chore: switched frankfurter domain from frankfurter.app to frankfurter.dev
2025-11-25 14:58:12 +05:30
diptanilsaha
f1f68ead7d chore: switched frankfurter api domain from api.frankfurter.app to api.frankfurter.dev 2025-11-25 13:10:48 +05:30
Mihir Kandoi
5a17dd8d6d fix: addresses not being carried forward 2025-11-25 12:58:52 +05:30
Mihir Kandoi
c93dba2895 fix: coderabbit suggestions 2025-11-25 12:33:51 +05:30
Mihir Kandoi
a436c6a503 refactor: creation of purchase order from sales order 2025-11-25 12:16:48 +05:30
Smit Vora
8235a551f0 refactor: further changes to adapt to query builder changes 2025-11-25 12:08:31 +05:30
Rohit Waghchaure
ca47ae6fd8 fix: stock reservation validation 2025-11-25 12:01:51 +05:30
sokumon
3d0b28a198 fix: re-export all sidebars 2025-11-25 11:17:29 +05:30
ruthra kumar
58e217be6a Merge pull request #50561 from aerele/hidden-fields-ledger-summary
fix(ledger-summary-report): show party group and territory
2025-11-25 11:07:23 +05:30
Logesh Periyasamy
5e58e344b2 feat(accounting-dimension): add dynamic triggers for custom accounting dimensions (#50621)
* feat: add dynamic triggers for custom accounting dimensions

* feat: add accounting dimension trigger call in setup event

* chore: ignore cur_frm semgrep rules

* chore: move function to transaction.js
2025-11-25 10:21:17 +05:30
Mihir Kandoi
c2b8b97d7d fix: incorrect query filter when selecting primary customer adr (#50727) 2025-11-25 04:48:04 +00:00
MochaMind
fa8007f949 fix: sync translations from crowdin (#50699) 2025-11-24 19:27:59 +01:00
ljain112
40b787827a fix: use alias for get_exchange_rate function in JournalEntry 2025-11-24 18:04:56 +05:30
ruthra kumar
33135899ab Merge pull request #50706 from frappe/pot_develop_2025-11-23
chore: update POT file
2025-11-24 17:20:57 +05:30
ljain112
50cf814b43 Merge branch 'develop' into tds-jv 2025-11-24 16:47:30 +05:30
Khushi Rawat
5806bcbb17 Merge pull request #50716 from elshafei-developer/add-missing-translate-function
fix: add missing translate function
2025-11-24 13:07:40 +05:30
El-Shafei H.
56def01240 fix: add missing translate function 2025-11-24 09:51:42 +03:00
Kavin
d01c4b68fe fix: add validation for FG Items as per BOM qty (#50579)
Co-authored-by: Kavin <78342682+kavin0411@users.noreply.github.com>
Co-authored-by: Mihir Kandoi <kandoimihir@gmail.com>
2025-11-24 06:17:14 +00:00
Mihir Kandoi
aeece36d93 Merge pull request #50712 from mihir-kandoi/gh50703 2025-11-24 11:30:50 +05:30
Mihir Kandoi
49c866db74 chore: change manufacturing course link 2025-11-24 11:12:06 +05:30
Mihir Kandoi
e2a01773a5 Merge pull request #50661 from aerele/support-53364 2025-11-24 10:38:17 +05:30
Mihir Kandoi
903e97af5f Merge pull request #50710 from mihir-kandoi/fix-phantom-subassembly 2025-11-23 21:52:09 +05:30
Mihir Kandoi
7b1d860c33 fix: subassembly inside phantom item not being fetched in production plan 2025-11-23 21:33:38 +05:30
Mihir Kandoi
5659538e67 Merge pull request #50707 from mihir-kandoi/pricing-rule-error 2025-11-23 19:37:44 +05:30
Mihir Kandoi
3b7d7aed4c fix: unknown column error 2025-11-23 19:16:39 +05:30
frappe-pr-bot
3404419a1f chore: update POT file 2025-11-23 09:36:01 +00:00
Diptanil Saha
47a6d34224 Merge pull request #50476 from aerele/support-53067 2025-11-21 22:10:37 +05:30
Lakshit Jain
d3c33d16ad Merge pull request #50609 from karm1000/patch/handle-empty-item-tax-rate
fix: handle empty item_tax_rate in ItemTax class
2025-11-21 18:27:02 +05:30
Karm Soni
fc098a732b fix: handle empty item_tax_rate in ItemTax class 2025-11-21 16:47:23 +05:30
Smit Vora
e92c46ba19 Merge pull request #50658 from ljain112/fix-taxes-validation 2025-11-21 16:43:59 +05:30
rohitwaghchaure
5ded5e54f1 Merge pull request #50660 from rohitwaghchaure/fixed-repost-gl-only
feat: repost GL Entries only
2025-11-21 16:06:31 +05:30
Rohit Waghchaure
b01f872f7d feat: repost GL Entries only 2025-11-21 15:21:38 +05:30
Sagar Vora
d5120efa25 Merge pull request #50675 from sagarvora/fix-item-wise-tax-detail-patch 2025-11-21 14:23:09 +05:30
Sagar Vora
f644c19760 fix: ignore chunk if no valid invoices found 2025-11-21 14:04:15 +05:30
Akhil Narang
42f4e7ebde Merge pull request #50659 from akhilnarang/qb-compat
fix: adjust a few more queries
2025-11-21 13:43:14 +05:30
Mihir Kandoi
d5025b2af8 Merge pull request #50667 from mihir-kandoi/gh50122 2025-11-21 12:50:48 +05:30
Mihir Kandoi
5fe3fcf174 Merge pull request #50655 from mihir-kandoi/gh49528 2025-11-21 12:43:27 +05:30
Diptanil Saha
47bb2544b9 Merge pull request #50669 from diptanilsaha/gh-50435 2025-11-21 12:25:32 +05:30
diptanilsaha
cd145f4141 fix(lead): made the create and action menu visible for lead doctype 2025-11-21 12:22:00 +05:30
Pugazhendhi Velu
9194e6350a fix: apply precision for scrap items amount 2025-11-21 06:43:20 +00:00
Mihir Kandoi
ffae7c4175 fix: pricing rule was ignoring time validity 2025-11-21 11:58:33 +05:30
Mihir Kandoi
d26f8aa629 fix: tests 2025-11-21 11:23:06 +05:30
Pugazhendhi Velu
5fd7d46986 Merge branch 'develop' of https://github.com/aerele/erpnext into support-53364 2025-11-21 05:44:52 +00:00
Diptanil Saha
866f1e695b Merge pull request #50665 from diptanilsaha/st-53822 2025-11-21 06:47:39 +05:30
diptanilsaha
310099f4cd fix(customer): link contact and addresses if created from lead/opportunity/prospect 2025-11-21 06:18:43 +05:30
MochaMind
7422464e75 fix: sync translations from crowdin (#50664) 2025-11-21 00:44:07 +01:00
Pugazhendhi Velu
02941afd6a Merge branch 'develop' of https://github.com/frappe/erpnext into support-53364 2025-11-20 13:31:25 +00:00
Akhil Narang
13f8bcd289 fix: adjust a few more queries
Signed-off-by: Akhil Narang <me@akhilnarang.dev>
2025-11-20 18:14:34 +05:30
ljain112
ef37e6aa16 fix: handle zero rate actual taxes in calculate_taxes_and_totals 2025-11-20 18:13:30 +05:30
Mihir Kandoi
f7b3253683 fix: pick list status doesn't update when DN created from it and PL was created from SO 2025-11-20 17:40:28 +05:30
rohitwaghchaure
8f01e89d76 Merge pull request #50639 from mihir-kandoi/st47854
fix(product bundle): fields reset if doc is new
2025-11-20 16:12:00 +05:30
rohitwaghchaure
8a40eac45a Merge pull request #50649 from mihir-kandoi/zero-val-stock-reco
fix: unhide zero val checkbox in stock reco
2025-11-20 16:11:34 +05:30
Mihir Kandoi
7172f30455 Merge pull request #50385 from NihalRoshanCK/disable-warehouse 2025-11-20 16:02:09 +05:30
Mihir Kandoi
ff2d9bf4cb fix: remove disabled warehouse in get_warehouses_based_on_account 2025-11-20 15:42:27 +05:30
Mihir Kandoi
20e0313a8c fix: unhide zero val checkbox 2025-11-20 15:34:39 +05:30
Mihir Kandoi
7faee7edc2 fix(product bundle): fields reset if doc is new 2025-11-20 15:32:55 +05:30
rohitwaghchaure
21361ebb2f Merge pull request #50646 from mihir-kandoi/gh49446
fix: serial batch selector shown only once
2025-11-20 15:07:44 +05:30
Mihir Kandoi
aa6f09e9a9 fix: serial batch selector shown only once 2025-11-20 14:57:33 +05:30
rohitwaghchaure
5e47b0dadb Merge pull request #50644 from rohitwaghchaure/fixed-delete-sabb-validation
fix: validation for SABB deletion
2025-11-20 13:45:36 +05:30
Khushi Rawat
8a57090aa2 Merge pull request #50286 from khushi8112/budget-feature-enhancements
feat: Budget feature enhancements
2025-11-20 13:07:03 +05:30
Rohit Waghchaure
dd4bef0706 fix: validation for SABB deletion 2025-11-20 13:00:24 +05:30
Jatin3128
4b612c64a8 fix(payment reconciliation): added a hint that posting date can be changed on exchange gain/loss reconcile dialog 2025-11-20 12:53:29 +05:30
Mihir Kandoi
c3e735ae96 Merge pull request #50502 from aerele/add-purchase-invoice-link-field 2025-11-20 12:33:11 +05:30
khushi8112
c3ff5e3748 fix: multiple minor fixes 2025-11-20 12:18:03 +05:30
ruthra kumar
ee69a6b8ab Merge pull request #50636 from frappe/l10n_develop
fix: sync translations from crowdin
2025-11-20 10:57:12 +05:30
Mihir Kandoi
4e6d288056 Merge pull request #50635 from aerele/negative-conversion-factor 2025-11-20 10:55:00 +05:30
MochaMind
cb737f31fc fix: Bosnian translations 2025-11-19 14:23:42 -08:00
MochaMind
1d850bf3be fix: Croatian translations 2025-11-19 14:23:39 -08:00
MochaMind
fdb790b00f fix: Persian translations 2025-11-19 14:23:35 -08:00
MochaMind
29f9e423b2 fix: Swedish translations 2025-11-19 14:23:29 -08:00
SowmyaArunachalam
6141071a18 fix(uom): validate negative conversion factor 2025-11-19 22:05:19 +05:30
Akhil Narang
0cb734d6a0 Merge pull request #50550 from akhilnarang/qb-compat
refactor: adapt for query builder changes
2025-11-19 21:55:25 +05:30
Akhil Narang
1cf9f903e5 fix: adapt to query builder
Signed-off-by: Akhil Narang <me@akhilnarang.dev>
2025-11-19 21:36:37 +05:30
Rohit Waghchaure
d40e660a52 fix: use qb for functions 2025-11-19 21:36:37 +05:30
Pugazhendhi Velu
57f9353d90 fix(manufacturing): apply precision for bom amount and rm_cost_per_qty 2025-11-19 14:19:26 +00:00
khushi8112
acec1a7a9d fix: permission based revision of budget 2025-11-19 17:05:26 +05:30
rohitwaghchaure
ec4d4a0d6c Merge pull request #50624 from rohitwaghchaure/fixed-desktop-icons-accounts
fix: desktop icons
2025-11-19 16:38:16 +05:30
Mihir Kandoi
1ee700fff3 fix: process loss % can be negative (#50629) 2025-11-19 11:07:23 +00:00
ruthra kumar
197f00f211 Merge pull request #50623 from vorasmit/fix-custom-fs-js
fix: replace `this` with function path
2025-11-19 16:19:12 +05:30
Mihir Kandoi
5fdf8058df Merge pull request #48634 from mihir-kandoi/46788 2025-11-19 16:17:47 +05:30
Rohit Waghchaure
124293bd63 fix: desktop icons 2025-11-19 16:16:21 +05:30
Mihir Kandoi
38cf0d9b5f Merge pull request #50627 from mihir-kandoi/gh48474 2025-11-19 16:16:19 +05:30
Mihir Kandoi
3271eaaf0e fix: show current company warehouse only in get material from bom MR 2025-11-19 16:13:56 +05:30
Mihir Kandoi
5ba4c1ea22 Merge pull request #50625 from mihir-kandoi/gh48301 2025-11-19 16:11:32 +05:30
Mihir Kandoi
3ca3a6d9bb fix: add filter company and status to job card employee 2025-11-19 16:07:50 +05:30
Mihir Kandoi
3327799524 test: add test case 2025-11-19 15:57:15 +05:30
Mihir Kandoi
0973dbac65 fix: create job card button 2025-11-19 15:56:38 +05:30
khushi8112
8fd5d7187a refactor: replace args with params 2025-11-19 15:56:32 +05:30
khushi8112
9ebf546e1f refactor: patch for migration 2025-11-19 15:56:32 +05:30
khushi8112
4a03462890 refactor: use params instead of args 2025-11-19 15:56:32 +05:30
khushi8112
4576ccbbdc fix: use new naming series 2025-11-19 15:56:32 +05:30
khushi8112
22ec48159e fix(minor): use corrct field name in patch 2025-11-19 15:56:32 +05:30
khushi8112
e08793cb8f fix(patch): update naming series for budget 2025-11-19 15:56:32 +05:30
khushi8112
4abe2e82a0 fix(patch): migrate old Budget data to new structure 2025-11-19 15:56:32 +05:30
khushi8112
57f9faa15a fix: validate existing expenses when revising or modifying budget amounts 2025-11-19 15:56:32 +05:30
khushi8112
09ed3066d8 fix: test cases and fiscal year validation 2025-11-19 15:56:32 +05:30
khushi8112
04a44e7e14 refactor: budget controller 2025-11-19 15:56:32 +05:30
khushi8112
e4bae76580 refactor: add budget start and end date field on the parent 2025-11-19 15:56:32 +05:30
khushi8112
e40fe9919c refactor: better manual budget distribution ux 2025-11-19 15:56:32 +05:30
khushi8112
1cb03db43b test: test cases to validate budget distribution and revision 2025-11-19 15:56:32 +05:30
khushi8112
bd88356a8a feat: budget for multiple fiscal year 2025-11-19 15:56:32 +05:30
khushi8112
b5d892c802 fix: default company currency for amount 2025-11-19 15:56:32 +05:30
khushi8112
1f832ca23e fix: test cases of budget 2025-11-19 15:56:32 +05:30
khushi8112
64456af654 refactor: update budget expense validation to align with new structure 2025-11-19 15:56:32 +05:30
khushi8112
af9dc8e406 test: budget revision test cases 2025-11-19 15:56:32 +05:30
khushi8112
077692b57b feat: Budget Revision 2025-11-19 15:56:32 +05:30
khushi8112
882b6c2950 feat: add budget amount field on parent 2025-11-19 15:56:32 +05:30
khushi8112
d8deb33c8c feat: auto-generate budget distribution rows based on start and end date 2025-11-19 15:56:32 +05:30
khushi8112
8857037971 feat: flexible budget allocation frequency 2025-11-19 15:56:31 +05:30
khushi8112
ccb89fee75 feat: add fields for new budget flow 2025-11-19 15:56:31 +05:30
khushi8112
e23d229e7b feat: introduce budget distribution child table 2025-11-19 15:56:31 +05:30
khushi8112
906a4bd398 feat(patch): set total budget amount on budget doctype 2025-11-19 15:56:31 +05:30
khushi8112
b6e452a695 feat: show budget total 2025-11-19 15:56:31 +05:30
Mihir Kandoi
37b120bf69 fix: modify for new changes 2025-11-19 15:56:13 +05:30
rohitwaghchaure
be40b5bbff Merge pull request #50622 from rohitwaghchaure/fixed-validate-reserved-batch
fix: validate reserved batches
2025-11-19 15:51:30 +05:30
Smit Vora
2a1eb08b08 fix: replace this with function path 2025-11-19 15:50:42 +05:30
Rohit Waghchaure
ae0d9d1134 fix: validate reserved batches 2025-11-19 15:12:12 +05:30
Mihir Kandoi
59c3eef7db fix: stock entry manufacture - fix operating cost calculation 2025-11-19 13:00:47 +05:30
Mihir Kandoi
4efe681a5c Merge pull request #50617 from mihir-kandoi/mergify-16-beta-label 2025-11-19 12:49:08 +05:30
Mihir Kandoi
83dab5db60 feat: backport v16 beta label 2025-11-19 12:46:45 +05:30
Mihir Kandoi
d1595a2549 Merge pull request #50614 from mihir-kandoi/fix-duplicate-message 2025-11-19 12:35:11 +05:30
Mihir Kandoi
074f07694f fix: redundant message on bom save 2025-11-19 12:11:56 +05:30
MochaMind
dea734cd4c fix: sync translations from crowdin (#50613) 2025-11-19 01:11:26 +01:00
MochaMind
cf73de9533 chore: update POT file (#50547) 2025-11-18 15:39:39 +01:00
rohitwaghchaure
f13e540e74 Merge pull request #50512 from aerele/support-53201
fix: add return status for purchase receipt
2025-11-18 18:02:27 +05:30
rohitwaghchaure
1512c94e79 Merge pull request #50486 from aerele/support-52693
fix: validate sabb autocreation when disabled
2025-11-18 17:58:22 +05:30
ruthra kumar
d2c19007cc Merge pull request #50524 from aerele/financial-ratio-calculation-fix
fix: use dynamic account type to get average ratio balance
2025-11-18 16:52:17 +05:30
Khushi Rawat
9b374d605a Merge pull request #50591 from khushi8112/validate-depreciation-account-type
fix: validate account type of depreciation account
2025-11-18 16:48:18 +05:30
Logesh Periyasamy
113ff17c71 fix(general_ledger): add translation for accounting dimension 2025-11-18 16:45:15 +05:30
Logesh Periyasamy
9670edb521 fix: add condition for allow negative stock in pos (#50369) 2025-11-18 16:37:24 +05:30
Raffael Meyer
4d9473f844 feat(Company): allow setting default sales contact, fetch into sales transaction (#50159) 2025-11-18 16:33:21 +05:30
khushi8112
68d6fc142b fix: check root type instead of account type 2025-11-18 16:26:35 +05:30
khushi8112
ca37f0371b fix: validate root type as well 2025-11-18 15:26:02 +05:30
ruthra kumar
73eaddcd67 fix: unintended backported depends_on expression (backport #50529) (#50587)
fix: unintended backported depends_on expression (#50529)


(cherry picked from commit 81a16286a1)

Co-authored-by: Kavin <78342682+kavin-114@users.noreply.github.com>
Co-authored-by: Kavin <78342682+kavin0411@users.noreply.github.com>
2025-11-18 15:05:27 +05:30
khushi8112
592ec1c5a5 fix: validate account type of depreciation account 2025-11-18 14:51:46 +05:30
rohitwaghchaure
b1be525032 Merge pull request #50585 from rohitwaghchaure/fixed-desktop-icons-erpnext
fix: icons for workspace sidebar in ERPNext modules
2025-11-18 14:10:56 +05:30
Rohit Waghchaure
842546d917 fix: icons for workspace sidebar in ERPNext modules 2025-11-18 13:49:33 +05:30
l0gesh29
8f91919933 test: add party_group, territory in json 2025-11-18 13:42:45 +05:30
Kavin
67d471598d fix: unintended backported depends_on expression (#50529)
Co-authored-by: Kavin <78342682+kavin0411@users.noreply.github.com>
(cherry picked from commit 81a16286a1)
2025-11-18 08:08:07 +00:00
Ejaaz Khan
154350b733 Merge pull request #50583 from iamejaaz/fix-item-patch
fix: NoneType issue on item tax rate
2025-11-18 12:00:44 +05:30
Ejaaz Khan
9ea3e1e848 fix: NoneType issue on item tax rate 2025-11-18 11:40:20 +05:30
rohitwaghchaure
b672744543 Merge pull request #50578 from rohitwaghchaure/fixed-hide-home-icon
fix: hide home icon
2025-11-17 21:16:43 +05:30
Rohit Waghchaure
4e1e2ee756 fix: hide home icon 2025-11-17 20:58:23 +05:30
rohitwaghchaure
6277dac209 Merge pull request #50577 from rohitwaghchaure/fixed-desktop-icons
fix: desktop icons
2025-11-17 19:58:55 +05:30
Rohit Waghchaure
9349dcc907 fix: desktop icons 2025-11-17 19:40:51 +05:30
rohitwaghchaure
2ea6921e20 Merge pull request #50575 from sokumon/desktop-icons
fix: add more icons
2025-11-17 19:37:41 +05:30
sokumon
12a2e14dae fix: add more icons 2025-11-17 19:12:31 +05:30
Smit Vora
12008b775f Merge pull request #50439 from ljain112/fix-lead-quotation 2025-11-17 19:08:31 +05:30
Smit Vora
5662801a9c Merge pull request #50496 from ljain112/correct-grand-total 2025-11-17 19:05:45 +05:30
Lakshit Jain
91f3c82bdf feat!: Item Wise Tax Details Table (#48692)
* fix: Add `Item Wise Tax Detail` Table and update related doctypes

* fix: remove setting item_wise_tax_details in client side

* fix: Remove redundant code for updating item_wise_tax_details after rename

* fix: Add 'dont_recompute_tax' field to Item Wise Tax Detail

* fix: update item_wise_tax_details after validations

* chore: remove redundant code from payment_entry.js

* fix: changes in POS for item_wise_tax_details

* fix: handle merge taxes

* fix: update test case and fix precision issue

* chore: remove debugging statement

* chore: remove redundant import

* chore: linters

* chore: remove redundant code and minor refactor

* fix: correct function args

* fix: fix test cases

* fix: item wise sales register report

* fix: remove dont recompute from item wise tax details and calculation for deduct

* fix: do not retain old rows

* fix: added validation for item wise tax details

* fix: tax merging for pos

* fix: vat audit report(regional report)

* fix: query issue in item-wise sales register

* fix: set other_charges using temp object

* fix: precision issue in validation

* fix: changes as per failing test cases

* fix: tax merging

* fix: set no_copy for item wise tax detail

* fix: correct select field in query and other charged in item_wise_purchase_register

* fix: do not include rows with missing item or tax in merge_taxes

* fix: respect row wise rounding

* chore: remove unused import

* chore: incorrect tuple creation

* fix: handle rounding adjustment

* fix: currency option in item wise tax detail doctype

* fix: patch to migrate item_wise tax_details to table

* chore: remove item_wise_tax_detail from taxes table

* fix: use base_tax_withholding_net_total instead of tax_withholding_net_total

* fix: implemet item_wise_tax_detail for e-invoice (italy)

* fix: fetch document by doctypes in migration patch

* fix: fix multiple syntax errors and inconsistent variable usage

* fix: remove deprecated settings and update item wise tax details flag

* fix: enhance validation for item wise tax details and handle discrepancies

* fix: increase chunk size for migration and improve item-wise tax detail calculations

* fix: delete existing item-wise tax details to prevent duplicates during migration

* fix: remove unnecessary docstatus filter from tax details query

* fix: streamline validation checks in item wise tax details adjustment

* fix: update additional fields to reference item and invoice attributes in tax detail queries

* fix: Restrict tax query to the selected invoices in vat audit report

* fix: use `base_tax_withholding_net_total` for calculation in patch

* fix: set tax row_id and idx to None instead of empty strings

* fix: remove unused precision parameter from rounding differences handler

* fix: update docstatus in item_wise_tax_details as per doc

* fix: remove empty on_update method from SalesOrder class

* fix: remove empty on_update method from PurchaseOrder class

* fix: incorporate zero cutoff in tax calculation logic

* fix: increase threshold for rounding diff
2025-11-17 19:02:31 +05:30
rohitwaghchaure
47b7214580 Merge pull request #50567 from sokumon/desktop-icons
feat: add newly created desktop icons
2025-11-17 17:33:32 +05:30
sokumon
768afd7968 feat: add newly created desktop icons 2025-11-17 17:10:00 +05:30
rohitwaghchaure
ec5849d8d2 Merge pull request #50492 from nabinhait/erpnext-workspace-sidebars
refactor: Workspace sidebars and desktop icons for erpnext modules
2025-11-17 16:55:23 +05:30
Rohit Waghchaure
fdbe7bc988 fix: desktop icon placing 2025-11-17 16:35:03 +05:30
Rohit Waghchaure
8ea5170fb8 fix: sidebars of erpnext modules 2025-11-17 15:25:50 +05:30
Mihir Kandoi
350539f5e6 Merge pull request #50562 from mihir-kandoi/gh50536 2025-11-17 14:53:29 +05:30
Mihir Kandoi
4cde0bfddd fix: incorrect connection to delivery note on pick list 2025-11-17 14:34:16 +05:30
ruthra kumar
05ee4c0b0c Merge pull request #50560 from frappe/mergify/copy/develop/pr-49788
feat: (Multi-Currency in Employee Advance, Expense Claim)  update exchange rate of payment entry in gl entry & added exchange rate, base amount field in Advance Payment Ledger Entry (copy #49788)
2025-11-17 14:07:35 +05:30
Rohit Waghchaure
56e44cfccb fix: sidebar for selling and accounting modules 2025-11-17 13:55:01 +05:30
l0gesh29
231479a6e2 fix(ledger-summary-report): show party group and territory 2025-11-17 13:42:43 +05:30
iamkhanraheel
054e7adeac fix: conflicts 2025-11-17 13:37:25 +05:30
iamkhanraheel
9c2525a8f4 feat: add exchange rate & base field in advance payment ledger, set exchange rate in journal entry on every refresh
(cherry picked from commit 287cb621cd)

# Conflicts:
#	erpnext/accounts/doctype/advance_payment_ledger_entry/advance_payment_ledger_entry.json
2025-11-17 08:04:55 +00:00
iamkhanraheel
bacef2f135 fix: remove hrms dependent func which are moved to hrms module
(cherry picked from commit 038536e1cd)
2025-11-17 08:04:54 +00:00
iamkhanraheel
78da4c38fa feat: multiCurrency in epxense claim, set excahnge rate in advance & update it in gl entry
(cherry picked from commit a9ecf7c319)
2025-11-17 08:04:54 +00:00
Rohit Waghchaure
334deccd2d feat: workspace sidebars and desktop icons for erpnext modules 2025-11-17 13:20:57 +05:30
rohitwaghchaure
b5df39f47d Merge pull request #50388 from rohitwaghchaure/feat-subcontracting-workspace
feat: subcontracting workspace and sidebar
2025-11-17 13:08:50 +05:30
Asmita Hase
8ca02e7fbb Merge pull request #50538 from asmitahase/holiday-list-assignment 2025-11-17 12:11:49 +05:30
Asmita Hase
7362d783b1 Merge branch 'develop' into holiday-list-assignment 2025-11-17 11:53:56 +05:30
rohitwaghchaure
60f8654ad6 Merge pull request #50506 from mihir-kandoi/company-wise-valuation-method
feat: company wise valuation method
2025-11-17 11:49:09 +05:30
ruthra kumar
b2a0cdf4bc Merge pull request #50552 from frappe/l10n_develop
fix: sync translations from crowdin
2025-11-17 11:27:49 +05:30
Khushi Rawat
c4b9268f9d Merge pull request #50404 from khushi8112/company-details-popup-trigger
fix: show company-details popup only for the targeted print format/le…
2025-11-17 11:15:59 +05:30
Mihir Kandoi
316b6d6867 feat: company wise valuation method 2025-11-17 10:37:11 +05:30
Mihir Kandoi
5dcb766b9f Merge pull request #50540 from aerele/support-52430 2025-11-17 10:10:48 +05:30
MochaMind
03bfbeb1cb fix: Persian translations 2025-11-16 14:14:08 -08:00
MochaMind
14c5245037 fix: sync translations from crowdin (#50503)
* fix: Persian translations

* fix: Bosnian translations

* fix: Hungarian translations

* fix: French translations

* fix: Arabic translations

* fix: Polish translations

* fix: Turkish translations

* fix: Indonesian translations

* fix: Persian translations

* fix: Spanish translations
2025-11-16 15:08:37 +01:00
Mihir Kandoi
42002d0aa1 Merge pull request #50507 from mihir-kandoi/company-wise-default-warehouses 2025-11-16 17:10:11 +05:30
Mihir Kandoi
84af60da7f feat: company wise default warehouses 2025-11-16 16:51:51 +05:30
rohitwaghchaure
c4882f6f26 fix: validation to check company in Sales Forecast and MPS (#50545) 2025-11-16 15:08:31 +05:30
Mihir Kandoi
e5e26cd92a feat: phantom bom (#50351)
* feat: add phantom bom settings in bom doctype

* feat: new explosion logic for production plan, subcontracting and work order/manufacturing

* feat: modify explosion logic in reports and bom creator

* fix: failing test

* feat: add convert to phantom item support in bom creator

* test: added test cases

* fix: always fetch rm rate if phantom bom

* refactor: PP phantom explosion logic

* fix: report test cases

* feat: add phantom item in description of item if phantom item in bom tree

* fix: hide create button if bom is phantom

* fix: bugs found by coderabbit
2025-11-16 15:08:08 +05:30
Mihir Kandoi
9b303a2272 Merge pull request #50235 from mihir-kandoi/sre-sco
feat: stock reservation for subcontracting order
2025-11-16 13:06:21 +05:30
Rohit Waghchaure
80b6c226b2 fix: validation to check company in Sales Forecast and MPS 2025-11-16 12:58:29 +05:30
Pugazhendhi Velu
8b38578914 fix(stock-entry): prevent default warehouse from overriding parent warehouse 2025-11-16 06:07:55 +00:00
Raffael Meyer
4bd3b00e5f refactor: remove unused import (#50543) 2025-11-15 19:34:44 +00:00
Raffael Meyer
38287afc05 fix: mark role profile names as translatable (#50542) 2025-11-15 19:26:12 +00:00
Raffael Meyer
f57d7f39bc fix: mark navbar item as translatable (#50541) 2025-11-15 19:11:39 +00:00
Raffael Meyer
9a989a84fb fix: use dummy translations for custom field labels (#49875) 2025-11-15 19:34:13 +01:00
Asmita Hase
3ce6da3b71 feat: half day in holiday list 2025-11-15 18:35:14 +05:30
Asmita Hase
0af4515afd feat: specify half day in holiday list 2025-11-15 18:35:12 +05:30
Smit Vora
68cdadf11a feat: support custom financial statements (#49098)
Co-authored-by: Abdeali Chharchhoda <abdealiking786@gmail.com>
2025-11-15 09:59:01 +05:30
Navin-S-R
f420371a7e fix: correct profit after tax calculation by reducing expenses from income 2025-11-14 14:12:29 +05:30
Navin-S-R
9118f08e7b fix: use dynamic account type to get average ratio balance 2025-11-14 14:05:47 +05:30
Mihir Kandoi
b98f4611e6 fix: wrong currency in Subcontracting Order Service Item (#50517) 2025-11-14 05:21:06 +00:00
PUGAZHENDHI V
4f720b3969 fix(period closing voucher): add title to error log (#50498) 2025-11-13 21:25:44 +05:30
Pugazhendhi Velu
3a0e1e8ef9 fix: add return status for purchase receipt 2025-11-13 15:29:27 +00:00
rohitwaghchaure
75533ea7d8 Merge pull request #50515 from rohitwaghchaure/fixed-sales-forecast-manual
fix: do not allow to add rows manually
2025-11-13 18:16:34 +05:30
Rohit Waghchaure
019f8103f3 fix: do not allow to add rows manually 2025-11-13 16:34:31 +05:30
rohitwaghchaure
b79f88a0a6 Merge pull request #50513 from rohitwaghchaure/fixed-seasonal-method
fix: change seasonal method
2025-11-13 15:47:41 +05:30
Diptanil Saha
ef7a3419fa Merge pull request #50510 from ljain112/fix-supplier-quick-entry 2025-11-13 15:26:48 +05:30
Rohit Waghchaure
58c92ea10d fix: change seasonal method 2025-11-13 15:11:31 +05:30
ljain112
510f50077b fix: first and last name in supplier quick entry 2025-11-13 14:24:35 +05:30
Mihir Kandoi
eafd2d4b5f Merge pull request #50509 from mihir-kandoi/gh49650 2025-11-13 14:07:04 +05:30
Mihir Kandoi
2ea9ffea3c fix(stock): format numeric values in variant dialog helper text 2025-11-13 14:03:38 +05:30
Diptanil Saha
37aa24141b Merge pull request #50495 from ljain112/chore-description-not-mandatory 2025-11-13 12:21:28 +05:30
rohitwaghchaure
926c670c91 Merge pull request #50501 from rohitwaghchaure/fixed-schedule-validation
fix: validation for delivery schedule
2025-11-13 10:49:39 +05:30
Karuppasamy B
6c1620ab8c fix(purchase_receipt): add internal_and_external_links field to show purchase invoice connection count 2025-11-13 01:16:48 +05:30
Rohit Waghchaure
31ae91f313 fix: validation for delivery schedule 2025-11-12 23:53:11 +05:30
ljain112
e056c0327d chore: typo in comment 2025-11-12 19:28:38 +05:30
ljain112
7c5f5405cc fix: improve precision in tax amount calculations in tax withholding details report 2025-11-12 18:59:45 +05:30
ljain112
d3751d9bb4 fix: back calcalute total amount from rate and tax_amount in tax withholding details report 2025-11-12 18:41:20 +05:30
ljain112
5cfa71fa47 fix: update description field to be optional in POS and Landed Cost Item 2025-11-12 18:15:32 +05:30
rohitwaghchaure
4ba4aef151 Merge pull request #50487 from rohitwaghchaure/fixed-current-qty-in-stock-reco
fix: current qty in stock reconciliation
2025-11-12 13:54:47 +05:30
Rohit Waghchaure
58315bc963 fix: current qty in stock reco 2025-11-12 12:20:41 +05:30
Kavin
3ca1940881 fix: validate sabb autocreation when disabled 2025-11-12 11:32:41 +05:30
Diptanil Saha
b9affe0cd8 Merge pull request #50409 from diptanilsaha/gh_34023 2025-11-12 11:13:25 +05:30
Diptanil Saha
51d583b6a7 Merge pull request #50323 from Abdeali099/set-company-bank-account 2025-11-12 11:07:29 +05:30
rohitwaghchaure
42751fec6d Merge pull request #50217 from aerele/sales-item-uom
fix(sales): update uom based on the selected item
2025-11-12 11:06:47 +05:30
ruthra kumar
385229b81a Merge pull request #50482 from frappe/l10n_develop
fix: sync translations from crowdin
2025-11-12 09:18:31 +05:30
MochaMind
1fe7ef5f1a fix: Bosnian translations 2025-11-11 13:15:14 -08:00
MochaMind
a211db592d fix: Croatian translations 2025-11-11 13:15:10 -08:00
MochaMind
80d13d6629 fix: Swedish translations 2025-11-11 13:15:04 -08:00
Pugazhendhi Velu
e64b6db2eb test: add minimal test case 2025-11-11 13:18:05 +00:00
Pugazhendhi Velu
7fddbb6dc4 Merge branch 'develop' of https://github.com/frappe/erpnext into validate-company-linked-address-field 2025-11-11 11:44:41 +00:00
Pugazhendhi Velu
5a3fcbedb5 fix: use current_tax_amount value for base_total_taxes_and_charges 2025-11-11 10:26:31 +00:00
Diptanil Saha
be826dba3b Merge pull request #50469 from ljain112/auto-taxes 2025-11-11 15:02:43 +05:30
Sagar Vora
7fb4d67662 Merge pull request #50155 from sagarvora/discount-mapping 2025-11-11 15:01:58 +05:30
rohitwaghchaure
6f20ceba81 Merge pull request #50187 from aerele/support-50973
fix: Update pick list locations quantity
2025-11-11 14:53:15 +05:30
ljain112
3d0a668c50 test: add automatic tax addition for buying controller 2025-11-11 14:00:55 +05:30
Kavin
827f9cc6ef fix: pass UOM null to update when item changes 2025-11-11 13:52:23 +05:30
ljain112
d171dc7328 fix: automatically append taxes if taxes_and_charges is set in Buying controller 2025-11-11 13:41:13 +05:30
ruthra kumar
6474435ede Merge pull request #50366 from aerele/enque-err-per-company
refactor: enqueue exchange rate revaluation per company
2025-11-11 13:04:01 +05:30
Mihir Kandoi
da04225c7d Merge pull request #50461 from mihir-kandoi/mat-transfer-wh-validation 2025-11-11 11:57:39 +05:30
Mihir Kandoi
c7b8461d43 feat: make material transfer warehouse validation optional 2025-11-11 11:39:04 +05:30
Kavin
3f7a60d56c test: add test for pending qty calculation in Pick List 2025-11-11 11:02:34 +05:30
Kavin
6db605c443 fix: Pass stock_qty and picked_qty in transfer entry 2025-11-11 11:00:39 +05:30
Kavin
bd9e240ca5 fix: Update pick list locations quantity 2025-11-11 11:00:38 +05:30
Mihir Kandoi
2b051ebb87 Merge pull request #50446 from aerele/company-warehouse-filter-sales-return 2025-11-11 10:47:24 +05:30
Mihir Kandoi
d0ebe5d675 Merge pull request #50418 from aerele/non_billed_report-filter-stock-items 2025-11-11 10:41:57 +05:30
mahsem
e148a38353 fix: state_to_state_province for translation (#50244)
Co-authored-by: Mihir Kandoi <kandoimihir@gmail.com>
2025-11-11 05:07:34 +00:00
Mihir Kandoi
f7585f40ac Merge pull request #50320 from aerele/task-is-group-filter 2025-11-11 10:27:37 +05:30
Mihir Kandoi
584d81cfbb chore: fix typo "show_disables_items" to "show_disabled_items" (#50322) 2025-11-11 10:26:09 +05:30
maasanto
722581cf05 Merge pull request #48912 from maasanto/dont-set-description 2025-11-11 10:15:15 +05:30
Mihir Kandoi
f7c9dc20a8 Merge pull request #50452 from frappe/mergify/bp/develop/pr-49831 2025-11-11 10:11:35 +05:30
Mihir Kandoi
834221b297 Merge pull request #50443 from aerele/support-51054 2025-11-11 10:10:25 +05:30
Mihir Kandoi
1d0cd68d2c Merge pull request #50399 from aerele/support-52332 2025-11-11 10:09:57 +05:30
Rehan Ansari
7baf6ec3d6 fix: add missing stock entry UOM filtering based on item master (#50135)
Co-authored-by: rehansari26 <rehan.ansari@cloverinfotech.com>
2025-11-11 09:58:33 +05:30
Assem Bahnasy
2374cf8bfd Fix: Product Bundle Purchase Order Creation Logic (#49831)
Co-authored-by: Mihir Kandoi <kandoimihir@gmail.com>
(cherry picked from commit 5b643433e5)
2025-11-11 04:23:59 +00:00
MochaMind
607cf47312 fix: sync translations from crowdin (#50425) 2025-11-10 21:54:29 +00:00
Diptanil Saha
b03cbdb83a Merge pull request #50339 from aerele/acc-dim-difference-entry 2025-11-10 23:15:55 +05:30
Pugazhendhi Velu
0b614007bb fix: add company filter for default warehouse for sales return 2025-11-10 15:19:55 +00:00
rohitwaghchaure
4bd476293b Merge pull request #50436 from rohitwaghchaure/fixed-serial-no-creation
perf: serial no creation
2025-11-10 20:40:21 +05:30
Diptanil Saha
cad5cbb5ed Merge pull request #50361 from aerele/fix/support-52293 2025-11-10 20:37:19 +05:30
Pugazhendhi Velu
462deb3755 fix: change fieldtype from link to data for document_type in production plan summary 2025-11-10 13:59:27 +00:00
MochaMind
bc351feb3e chore: update POT file (#50440) 2025-11-10 12:28:20 +00:00
Raffael Meyer
87b4f872f8 fix: ignore translations from frappe (#50438) 2025-11-10 13:09:14 +01:00
ljain112
0b91338771 fix: add doctype parameter to lead details for correct company details 2025-11-10 17:34:19 +05:30
Rohit Waghchaure
19a9497273 perf: serial no creation 2025-11-10 16:35:54 +05:30
rohitwaghchaure
80219724f0 Merge pull request #50432 from rohitwaghchaure/fixed-patch-for-sabe
fix: patch for existing data
2025-11-10 16:07:05 +05:30
rohitwaghchaure
46ed52a329 Merge pull request #50416 from rohitwaghchaure/fixed-github-46684
fix: work order status
2025-11-10 15:03:22 +05:30
Rohit Waghchaure
91fcac5785 fix: patch for existing data 2025-11-10 15:02:10 +05:30
rohitwaghchaure
a66d643638 Merge pull request #50424 from rohitwaghchaure/perf-serial-batch-dn
perf: DN submission with SABB
2025-11-10 14:43:08 +05:30
Rohit Waghchaure
f2ad27eb06 perf: DN submission with SABB 2025-11-10 14:01:02 +05:30
ruthra kumar
88823e51c7 Merge pull request #50423 from barredterra/fetch-cc-from-project
fix(buying): fetch Cost Center from Project
2025-11-10 12:32:15 +05:30
rohitwaghchaure
ab9241bc11 Merge pull request #50374 from aerele/support-52577
fix: add validation to reject empty readings
2025-11-10 11:07:36 +05:30
barredterra
bdabcb081a fix(buying): fetch Cost Center from Project 2025-11-09 17:56:24 +01:00
MochaMind
dbfb77f768 chore: update POT file (#50421) 2025-11-09 13:17:36 +01:00
Rohit Waghchaure
ba29f5b858 fix: work order status 2025-11-08 22:55:23 +05:30
diptanilsaha
e35e8968f0 fix: prevent pos opening entry creation for disabled pos profile 2025-11-08 15:29:26 +05:30
diptanilsaha
69016a284f test: added test to validate disabled pos profile 2025-11-08 15:29:18 +05:30
ravibharathi656
1b2e5c9706 fix: show only stock items in delivered items to be billed and received items to be billed reports 2025-11-08 15:09:43 +05:30
rohitwaghchaure
a8f3864905 Merge pull request #50406 from rohitwaghchaure/fixed-github-48153
fix: set operating cost based on bom qty causing incorrect operating …
2025-11-07 23:13:43 +05:30
Rohit Waghchaure
4c5ddf03e2 fix: set operating cost based on bom qty causing incorrect operating costing 2025-11-07 22:48:48 +05:30
rohitwaghchaure
2c4654ab30 Merge pull request #50411 from rohitwaghchaure/fixed-github-47250
fix: removed the validation
2025-11-07 18:01:54 +05:30
diptanilsaha
c5219278fb feat(pos): prevent disabling POS Profile when open POS sessions exist 2025-11-07 17:25:54 +05:30
Rohit Waghchaure
10131333b2 fix: removed the validation 2025-11-07 16:39:13 +05:30
rohitwaghchaure
07f3f420af Merge pull request #50407 from rohitwaghchaure/feat-allow_editing_of_items_and_quantities_in_work_order
feat: Allow Editing of Items and Quantities in Work Order
2025-11-07 16:24:41 +05:30
Rohit Waghchaure
b5e6c3e703 feat: Allow Editing of Items and Quantities in Work Order 2025-11-07 15:46:48 +05:30
Patrick Eißler
4846dfd3ca fix(Timesheet): don't use billing_hours for costing amount calculation (#50392) 2025-11-07 13:26:16 +05:30
Diptanil Saha
6d4afc85e6 Merge pull request #50326 from aerele/support-52064 2025-11-07 12:57:29 +05:30
khushi8112
4c8226eb18 fix: show company-details popup only for the targeted print format/letterhead 2025-11-07 12:55:14 +05:30
Diptanil Saha
9eabaf02c6 Merge pull request #50402 from diptanilsaha/gh_33287 2025-11-07 12:32:44 +05:30
diptanilsaha
f7d09f8760 fix: trends report total mismatch with group filters 2025-11-07 12:08:22 +05:30
Pugazhendhi Velu
55f531bad6 test: add test for validate mr item qty against so with over-receipt allowance 2025-11-06 20:39:42 +00:00
Pugazhendhi Velu
8d7e31e3f2 fix: material request item quantity validation against sales order with over-receipt allowance 2025-11-06 20:39:36 +00:00
Pugazhendhi Velu
4cf02b4d78 refactor(task): use get_link_to_form for validation error messages 2025-11-06 11:22:58 +00:00
Diptanil Saha
a5830c8247 Merge pull request #50340 from aerele/transaction_deletion_record 2025-11-06 16:44:33 +05:30
Pugazhendhi Velu
ed40b3232e Merge branch 'develop' of https://github.com/frappe/erpnext into support-52064 2025-11-06 11:06:45 +00:00
Rohit Waghchaure
8ef18754a0 feat: subcontracting workspace and sidebar 2025-11-06 15:48:10 +05:30
Diptanil Saha
70483cffa3 Merge pull request #50364 from aerele/support-52595 2025-11-06 15:39:42 +05:30
Pugazhendhi Velu
63fb9f55e7 refactor: add default reading value when creating a quality inspection 2025-11-06 06:32:04 +00:00
Pugazhendhi Velu
67e7a09e08 Merge branch 'develop' of https://github.com/frappe/erpnext into support-52577 2025-11-06 06:17:24 +00:00
Khushi Rawat
5cc2cf530a Merge pull request #50367 from rehanrehman389/asset-mov-fix
fix: set company before creating asset movement to avoid permission error
2025-11-06 03:19:29 +05:30
Khushi Rawat
a0b9b5cd71 Merge pull request #50342 from rehanrehman389/asset-name
feat: add asset name column
2025-11-06 00:21:42 +05:30
Khushi Rawat
3820be8a64 Merge pull request #50343 from rehanrehman389/asset-fix
fix: validate purchase invoice status and resolve related issues
2025-11-06 00:18:59 +05:30
Pugazhendhi Velu
405d901514 fix: add validation to reject empty readings 2025-11-05 17:34:55 +00:00
Pugazhendhi Velu
e10007c646 test: add test for company linked address fields 2025-11-05 15:02:57 +00:00
Pugazhendhi Velu
800a44a65f fix: add validation for company linked address fields 2025-11-05 15:02:02 +00:00
MochaMind
cc7810998c fix: sync translations from crowdin (#50281) 2025-11-05 15:25:10 +01:00
ruthra kumar
ad42eae2d6 Merge pull request #50144 from ruthra-kumar/stable_period_closing_voucher
refactor: period closing voucher to handle large data volumes
2025-11-05 16:53:31 +05:30
rehansari26
8c49c9e500 fix: set company before creating asset movement to avoid permission error 2025-11-05 16:46:00 +05:30
ravibharathi656
b10e7bf7b5 refactor: enqueue exchange rate revaluation per company 2025-11-05 16:40:14 +05:30
rohitwaghchaure
e213c64f9e Merge pull request #50363 from rohitwaghchaure/fixed-prevent-sn-reuse
fix: prevent reuse of serial no in manufacture and repack entry
2025-11-05 16:05:05 +05:30
Pugazhendhi Velu
ef38b26a73 fix: hide total row in general ledger report 2025-11-05 10:26:18 +00:00
ruthra kumar
fca7abf4d6 refactor: add paused to select option 2025-11-05 15:51:25 +05:30
ruthra kumar
9c13edc0b9 refactor: minor changes on status
1. set to 'In Progress' on start of both legacy and new controller
2. force delete to avoid permission issues
3. default to 1hr timeout
2025-11-05 15:51:25 +05:30
ruthra kumar
fe39ce03bb refactor: enable legacy controller by default for pcv 2025-11-05 15:51:25 +05:30
ruthra kumar
0b88f98a86 chore: progress bar 2025-11-05 15:51:25 +05:30
ruthra kumar
191c0e65a1 chore: remove scaffolding 2025-11-05 15:51:25 +05:30
ruthra kumar
090e155fd0 refactor: abort processing of all tasks upon cancellation 2025-11-05 15:51:25 +05:30
ruthra kumar
cae1237859 refactor: more changes
1. 'Accounts Manager' has access to submit, cancel and delete
2. cancel and delete operation of PCV is linked with Proces PCV
2025-11-05 15:51:25 +05:30
ruthra kumar
fa3bd6f5a7 refactor: smaller methods 2025-11-05 15:51:25 +05:30
ruthra kumar
7406d83260 refactor: utility to consolidate results from all dates 2025-11-05 15:51:25 +05:30
ruthra kumar
5b464ae4c1 refactor: utility to convert tuple key to str 2025-11-05 15:51:25 +05:30
ruthra kumar
653ae84b3e refactor: cleanup and for better readability 2025-11-05 15:51:25 +05:30
ruthra kumar
6e32769e37 refactor: make Accounts Closing Balance as well 2025-11-05 15:51:25 +05:30
ruthra kumar
09e37bc98c refactor: store closing balance for Balnace sheet accounts 2025-11-05 15:51:25 +05:30
ruthra kumar
643e1fdce8 refactor: calculate both balances from single queue 2025-11-05 15:51:25 +05:30
ruthra kumar
86edacb781 refactor: populate opening balances calculation table 2025-11-05 15:51:25 +05:30
ruthra kumar
cef879bb3b chore: rename closing balance field 2025-11-05 15:51:25 +05:30
ruthra kumar
324bebfd44 refactor: balances for both P&L and Balance sheet accounts 2025-11-05 15:51:25 +05:30
ruthra kumar
186d540502 refactor: maintain report type on each date 2025-11-05 15:51:25 +05:30
ruthra kumar
9e93298f12 refactor: more stable pause and resume 2025-11-05 15:51:25 +05:30
ruthra kumar
c738b6d356 refactor: process on submit 2025-11-05 15:51:25 +05:30
ruthra kumar
8ba199016a refactor: for better readability 2025-11-05 15:51:25 +05:30
ruthra kumar
f25ee3c53f refactor: store results as is and convert at the end 2025-11-05 15:51:25 +05:30
ruthra kumar
e88074ddec refactor: build and post gl entries 2025-11-05 15:51:25 +05:30
ruthra kumar
1846de0d49 refactor: store daily balances based on dimensions key
dimensions key is manually converted to string
2025-11-05 15:51:25 +05:30
ruthra kumar
1a31825409 refactor: store closing balance as JSON 2025-11-05 15:51:25 +05:30
ruthra kumar
c839ebf593 refactor: stable start, pause, resume and completion stages 2025-11-05 15:51:25 +05:30
ruthra kumar
1c92b01542 refactor: barebones functions 2025-11-05 15:51:25 +05:30
ruthra kumar
f44c908a8d refactor: temporarily save balances in JSON 2025-11-05 15:51:25 +05:30
ruthra kumar
0d09d21d2e refactor: child table in process pcv 2025-11-05 15:51:25 +05:30
ruthra kumar
a15578f8f4 refactor: more data structure changes 2025-11-05 15:51:25 +05:30
ruthra kumar
4888461be2 refactor: checkbox for pcv controller 2025-11-05 15:51:25 +05:30
ruthra kumar
7a93630629 feat: process period closing voucher 2025-11-05 15:51:25 +05:30
Rohit Waghchaure
48b537dc8c fix: prevent reuse of serial no in manufacture and repack entry 2025-11-05 15:09:50 +05:30
rohitwaghchaure
fb23719b62 Merge pull request #50335 from aerele/material-request-default-buying-price-list
fix(material request): set default buying price list if not exists
2025-11-05 14:10:59 +05:30
Pugazhendhi Velu
0510f7e13f fix: reset billing and shipping address when company changes 2025-11-05 08:26:34 +00:00
rohitwaghchaure
4d26a796ef Merge pull request #50325 from rohitwaghchaure/fixed-support-51819
fix: negative stock validation
2025-11-05 12:59:07 +05:30
Rohit Waghchaure
eca71dce54 fix: negative stock validation 2025-11-05 11:48:02 +05:30
Rehan Ansari
1928a394c9 fix: validate purchase invoice status and resolve related issues 2025-11-04 23:34:27 +05:30
Rehan Ansari
f3eda02972 feat: add asset name column 2025-11-04 22:08:03 +05:30
rethik
fff6f1fb23 fix: ignore Department doctype 2025-11-04 19:53:44 +05:30
l0gesh29
dcdc1c6a89 fix: apply company,is_group filter for cost center 2025-11-04 18:31:47 +05:30
l0gesh29
4680295303 fix: include cost_center and project upon accounting dimension fetch 2025-11-04 18:30:53 +05:30
Pugazhendhi Velu
60537eeb48 Merge branch 'develop' of https://github.com/frappe/erpnext into support-52064 2025-11-04 11:41:03 +00:00
rohitwaghchaure
7285eaf633 Merge pull request #50332 from rohitwaghchaure/fixed-support-51208
feat: option to exclude stand-alone returned sales invoices from the Gross Profit report
2025-11-04 16:59:39 +05:30
Abdeali Chharchhoda
4901dc2531 fix: on changes of paid from/to account fetch company bank account 2025-11-04 16:28:25 +05:30
ravibharathi656
9c0ff14060 fix(material request): set default buying price list if not exists 2025-11-04 15:52:55 +05:30
Rohit Waghchaure
52cf9d4950 feat: option to exclude stand-alone returned sales invoices from the Gross Profit report 2025-11-04 15:43:15 +05:30
Diptanil Saha
eaf37c606e Merge pull request #50289 from aerele/acc-dim-report
preserve accounting dimension filters while navigating between reports
2025-11-04 15:20:47 +05:30
Mihir Kandoi
dd68578252 chore: add docstring to function (#50329) 2025-11-04 14:17:22 +05:30
Saad Chaudhary
8854db51dd Merge pull request #50299 from saadchaudharry/feature-subcontract-return-rejected
Add support for subcontract return from rejected warehouse
2025-11-04 14:14:34 +05:30
Pugazhendhi Velu
291f0c7161 test: add test for parent task is_group validation 2025-11-04 08:31:41 +00:00
Pugazhendhi Velu
ed1a1099cb fix: validate is_group for parent task 2025-11-04 08:30:54 +00:00
Mihir Kandoi
34c190a76e chore: add docstring to function 2025-11-04 13:57:12 +05:30
Mihir Kandoi
7b8bb4f959 fix: disallow material transfer if source and target warehouse are same (#48697)
* fix: disallow material transfer if source and target warehouse are same

* fix: check on child row level instead of parent level
2025-11-04 13:50:52 +05:30
rethik
d26c598daa chore: fix typo "show_disables_items" to "show_disabled_items" 2025-11-04 11:10:27 +05:30
Pugazhendhi Velu
5bac896329 fix: add is_group filter in task for timesheet 2025-11-03 15:54:00 +00:00
Mihir Kandoi
689eee767d Merge pull request #50319 from mihir-kandoi/misc-sci-fixes
fix: minor issues in subcontracting inward
2025-11-03 18:14:47 +05:30
Mihir Kandoi
553ec40d4a fix: minor issues in subcontracting inward 2025-11-03 17:56:15 +05:30
rohitwaghchaure
34e13ee745 Merge pull request #50318 from rohitwaghchaure/fixed-mrp-issues
fix: multiple MRP issues
2025-11-03 17:35:17 +05:30
Rohit Waghchaure
f43444dd28 fix: multiple MRP issues 2025-11-03 17:13:40 +05:30
rohitwaghchaure
807d344ee1 Merge pull request #50314 from rohitwaghchaure/fixed-stock-reservation-transfer-cancel
fix: stock reservation cancellation for transfer case
2025-11-03 16:54:15 +05:30
Mihir Kandoi
4e9732ab96 Merge pull request #50316 from mihir-kandoi/fix-buying-transporter-filter
revert: remove transporter filter from buying doctypes
2025-11-03 16:31:56 +05:30
Mihir Kandoi
b0cd4bc9e7 revert: remove transporter filter from buying doctypes 2025-11-03 16:28:18 +05:30
Rohit Waghchaure
10094829e8 fix: stock reservation cancellation for transfer case 2025-11-03 15:19:24 +05:30
Kerolles Fathy
44363c069e fix: Respect allowed zero qty in SO and PO based on Buying/Selling settings when update items (#49673)
* fix: respect allowed zero qty in SO and PO based on buying/selling settings

* refactor: remove parent_doctype param due to it's already avaliable

* refactor: rename is_allowed_zero_qty_for to is_allowed_zero_qty

* fix: prevent rate change for unit price items

* fix: unboundlocal variable rate_unchanged

* refactor: only throw on 'zero' qty items

---------

Co-authored-by: ruthra kumar <ruthra@erpnext.com>
2025-11-03 15:16:50 +05:30
Khushi Rawat
5b11710a28 Merge pull request #50260 from khushi8112/gl-entry-only-for-submitted-assets
fix: create GL entries via hooks only for submitted assets
2025-11-03 14:50:38 +05:30
ruthra kumar
d464c731bb Merge pull request #50035 from aerele/fix/accounts-receivable-in-party-currency
fix(accounts-receivable): ensure report data with party account currency
2025-11-03 14:41:07 +05:30
Nihal Roshan
f1682ea90e refactor: remove company filter
'Bank' doctype has no 'company' field.
2025-11-03 14:00:36 +05:30
Diptanil Saha
3e80e99fa6 Merge pull request #50305 from diptanilsaha/st_50933
fix(accounts): populate correct fields on GL Entry during discount accounting
2025-11-03 13:18:52 +05:30
diptanilsaha
e41a7b8cd7 fix(accounts): populate correct fields on GL Entry during discount accounting 2025-11-03 12:58:16 +05:30
ruthra kumar
edf8f83a2a Merge pull request #50258 from barredterra/budget-msg
refactor: error message in budget
2025-11-03 10:15:05 +05:30
MochaMind
fdd0e39c91 chore: update POT file (#50304) 2025-11-02 09:55:28 +00:00
rohitwaghchaure
4d4086854a Merge pull request #50300 from aerele/support-52253
fix: handle None in last_valuation_rate check
2025-11-02 12:54:10 +05:30
Kavin
a3058bf8cc fix: handle None in last_valuation_rate check 2025-11-01 18:16:20 +05:30
rohitwaghchaure
ff8b701f13 Merge pull request #50298 from rohitwaghchaure/fixed-github-40130
fix: job card timer for mobile view
2025-10-31 20:18:10 +05:30
Rohit Waghchaure
921bb02eb5 fix: job card timer for mobile view 2025-10-31 20:11:11 +05:30
l0gesh29
fcfcaa76c6 feat(reports): preserve accounting dimension filters while navigating between reports 2025-10-31 19:16:35 +05:30
rohitwaghchaure
2b6723c3d8 Merge pull request #50296 from rohitwaghchaure/fixed-github-48129
fix: hourly rate not fetched on selection of workstation type
2025-10-31 17:02:55 +05:30
Rohit Waghchaure
0aec896ebb fix: hourly rate not fetched on selction of workstation type 2025-10-31 16:59:21 +05:30
rohitwaghchaure
acafc9c2de Merge pull request #50294 from rohitwaghchaure/fixedd-github-48221
fix: pause button not working for sub-operation
2025-10-31 16:57:18 +05:30
rohitwaghchaure
50cceaca6a Merge pull request #50293 from rohitwaghchaure/fixed-github-49402
fix: stock reservation validation for stock reconciliation
2025-10-31 16:37:32 +05:30
Rohit Waghchaure
1f183a7e06 fix: pause button not working for sub-operation 2025-10-31 16:36:14 +05:30
Rohit Waghchaure
859dc3b458 fix: stock reservation validation for stock reconciliation 2025-10-31 16:07:43 +05:30
Mihir Kandoi
65de8b4915 Merge pull request #50288 from frappe/revert-50013-refactor/transporter-filter-buying
Revert "refactor: add supplier filter in buying"
2025-10-31 15:46:38 +05:30
Diptanil Saha
a378d8bcc9 Merge pull request #50291 from diptanilsaha/gh_50256
fix: added validation for default accounts on company
2025-10-31 15:36:04 +05:30
diptanilsaha
4af1ae1470 fix: added validation for default accounts on company 2025-10-31 15:04:10 +05:30
l0gesh29
3fcd8d84ac feat: modify accounting dimension as multiselect field 2025-10-31 14:00:37 +05:30
Mihir Kandoi
7f7dd8d0ba Revert "refactor: add supplier filter in buying" 2025-10-31 14:00:19 +05:30
rohitwaghchaure
c4b46344be Merge pull request #50285 from rohitwaghchaure/fixed-github-50279
fix: Serial No and Batch Traceability report
2025-10-31 13:18:00 +05:30
Rohit Waghchaure
1908858cd5 fix: Serial No and Batch Traceability report 2025-10-31 12:38:39 +05:30
rohitwaghchaure
b5a78b5daf Merge pull request #50276 from rohitwaghchaure/fixed-setup-query-default-inv-acct
fix: only show inventory accounts in the dropdown
2025-10-30 15:56:03 +05:30
Rohit Waghchaure
c5fbebecb8 fix: only show inventory accounts in the dropdown 2025-10-30 15:51:52 +05:30
rohitwaghchaure
f2e721de71 Merge pull request #50273 from rohitwaghchaure/fixed-mps-workspace
fix: added MPS, MRP report in the manufacturing workspace
2025-10-30 12:17:48 +05:30
Rohit Waghchaure
b46fa8510d fix: added MPS, MRP report in the manufacturing workspace 2025-10-30 11:50:03 +05:30
rohitwaghchaure
87346dbf17 Merge pull request #50270 from aerele/support-51237
fix: set valuation rate for rejected serial/batch item
2025-10-30 09:00:14 +05:30
MochaMind
6d9d1ea593 fix: sync translations from crowdin (#50269) 2025-10-29 20:07:42 +00:00
venkat102
d002959d35 test: add unit test for valuation rate on rejected serial/batch item 2025-10-30 00:18:23 +05:30
venkat102
614402cf6c fix: set valuation rate for rejected serial/batch item 2025-10-30 00:16:37 +05:30
MochaMind
b7eb01bd7e fix: sync translations from crowdin (#50242) 2025-10-29 15:33:26 +01:00
rohitwaghchaure
1e54b8ec4c Merge pull request #50264 from rohitwaghchaure/fixed-bulk-edit-bom
fix: allow bulk edit for bill of material items
2025-10-29 18:21:02 +05:30
Rohit Waghchaure
1f74e06791 fix: allow bulk edit for bill of material items 2025-10-29 17:43:58 +05:30
khushi8112
33690975f6 fix: create GL entries via hooks only for submitted assets 2025-10-29 13:06:58 +05:30
barredterra
71db348330 fix: placeholder number 2025-10-29 01:50:07 +01:00
barredterra
72fff5d9ee refactor: error message in budget
improve translatability
2025-10-29 01:34:59 +01:00
dharanidharan2813
cf1d892d60 fix: Payment Terms auto-fetched in Sales Invoice even when automatically_fetch_payment_terms is disabled 2025-10-28 17:57:09 +05:30
rohitwaghchaure
76d7fe452f Merge pull request #50247 from rohitwaghchaure/fixed-incorrect-sabb-report
fix: provision to find and fix incorrect serial and batch bundles
2025-10-28 17:44:00 +05:30
Diptanil Saha
05d4152e43 Merge pull request #50137 from aerele/payment-reco-edit-allocated-amount
fix(payment-reco): recalculate amount based on allocated amount
2025-10-28 17:26:48 +05:30
Rohit Waghchaure
10ad56060c fix: provision to find and fix incorrect serial and batch bundles 2025-10-28 16:47:10 +05:30
Diptanil Saha
5d62908ba9 Merge pull request #50220 from aerele/gross-profit-columns
fix(gross profit): remove customer name from columns
2025-10-28 15:20:27 +05:30
rohitwaghchaure
b1cc11cc38 Merge pull request #50248 from mihir-kandoi/fix-sabb-posting-datetime
fix: missed refactoring code
2025-10-28 14:31:42 +05:30
rohitwaghchaure
9ab70d0a6a Merge pull request #50193 from rohitwaghchaure/feat-item-wise-inventory-account
feat: enable item wise inventory account
2025-10-28 13:49:15 +05:30
Mihir Kandoi
941e924d4d fix: missed refactoring code 2025-10-28 13:44:35 +05:30
Diptanil Saha
d932a67407 Merge pull request #50213 from barredterra/transaction-id-unique
fix(Bank Transaction)!: make transaction ID non-unique
2025-10-28 08:14:08 +05:30
Diptanil Saha
e16c6dc0bb Merge pull request #49599 from KerollesFathy/fix-get-payment-mode-account
fix(accounts): reference get_payment_mode_account correctly in Sales Invoice
2025-10-27 22:19:27 +05:30
ravibharathi656
7ce81127d2 fix: avoid group columns mutation 2025-10-27 17:44:12 +05:30
Mihir Kandoi
80fd9a5b0d Merge pull request #50221 from aerele/fix/stock-recon-barcode-scanner
fix: Pass uom field name to update existing item qty
2025-10-27 17:17:35 +05:30
rohitwaghchaure
55e06a49a1 Merge pull request #50233 from rohitwaghchaure/fixed-performance-issue
fix: optimized the slow query to get the batch-wise available qty
2025-10-27 16:48:31 +05:30
Khushi Rawat
7f714d3262 Merge pull request #50222 from aerele/asset-dep-bal-opening-entries
fix(asset depreciations and balances): showing opening entries
2025-10-27 16:17:19 +05:30
Diptanil Saha
f73db0219a Merge pull request #50039 from aerele/fix/jv-account-currency-no-copy
fix(journal-entry): allow copy account currency when duplicating JV
2025-10-27 14:14:08 +05:30
Bhavan23
76748e4573 fix(journal-entry): allow copy account currency when duplicating JV 2025-10-27 08:21:42 +00:00
Rohit Waghchaure
9c21567309 fix: optimized the slow query to get the batchwise available qty 2025-10-27 13:17:52 +05:30
Diptanil Saha
06d28fed09 Merge pull request #50232 from diptanilsaha/gh_50085
fix(consolidated trial balance): index out of range error
2025-10-27 12:52:15 +05:30
diptanilsaha
67c9fe6532 fix(consolidated trial balance): index out of range error 2025-10-27 12:30:16 +05:30
Diptanil Saha
d868f7706e Merge pull request #50103 from rehanrehman389/fix-overlap-validation
fix: fiscal year overlap validation for company-specific years
2025-10-27 10:37:42 +05:30
MochaMind
2f68235442 fix: sync translations from crowdin (#50228) 2025-10-26 16:59:30 +01:00
MochaMind
e3f44c35b7 chore: update POT file (#50225) 2025-10-26 13:14:55 +01:00
MochaMind
b0fef75bfa fix: sync translations from crowdin (#50201) 2025-10-24 17:41:58 +02:00
ravibharathi656
d3afa67be3 fix(asset depreciations and balances): showing opening entries 2025-10-24 18:32:40 +05:30
Kavin
23d69389ec fix: Pass uom field name to update existing item qty 2025-10-24 18:07:02 +05:30
ravibharathi656
0009925af0 fix(gross profit): remove customer name from columns 2025-10-24 14:09:30 +05:30
Rohit Waghchaure
076407ad70 test: test cases for item wise inventory account 2025-10-24 10:08:44 +05:30
rohitwaghchaure
08941bf742 Merge pull request #50215 from rohitwaghchaure/fixed-valuation-rate
fix: get valuation rate based of previous SLEs for material receipt
2025-10-23 23:59:35 +05:30
Rohit Waghchaure
fa9ef6708f fix: get valuation rate based of previous SLEs for material receipt 2025-10-23 23:49:50 +05:30
Rohit Waghchaure
74192547ce feat: enable item wise inventory account 2025-10-23 22:41:04 +05:30
barredterra
a2a41a0eaa fix(Bank Transaction): make transaction ID non-unique 2025-10-23 17:38:34 +02:00
Khushi Rawat
5b6979c700 Merge pull request #50209 from khushi8112/asset-status-in-list-view
fix: set status to Draft for auto-created assets from Purchase Receipt
2025-10-23 18:31:58 +05:30
khushi8112
20c2cb40d1 fix: set status to Draft for auto-created assets from Purchase Receipt 2025-10-23 17:41:51 +05:30
Deepesh Garg
cbccb67bfb Merge pull request #50204 from deepeshgarg007/add_posting_date_param_for_rev
feat: Add posting date param for reverse GL entries
2025-10-23 13:41:22 +05:30
Deepesh Garg
05e1a737f1 chore: Linting issues 2025-10-23 13:06:48 +05:30
Deepesh Garg
38988bf797 feat: Add posting date param for reverse GL entries 2025-10-23 13:00:15 +05:30
rohitwaghchaure
7f63d100b5 Merge pull request #50200 from rohitwaghchaure/fixed-support-50958-1
fix: stock difference value for adjustment entry
2025-10-22 22:31:44 +05:30
Rohit Waghchaure
fb4c7de86c fix: stock difference value for adjustment entry 2025-10-22 19:17:43 +05:30
Mihir Kandoi
abf81e5217 Merge pull request #50130 from PatrickDEissler/task-no-copy-fix
fix(Task): make Timesheet-dependent fields no_copy
2025-10-22 13:46:10 +05:30
Mihir Kandoi
6de258b4c8 chore: remove print statement (#50151) 2025-10-22 13:43:53 +05:30
Kerolles Fathy
8efcf6cb38 Merge pull request #50153 from KerollesFathy/fix-address-error-when-create-transporter
fix: Address title error when create new transporter on driver
2025-10-22 13:43:13 +05:30
rohitwaghchaure
92891c7e72 Merge pull request #50191 from rohitwaghchaure/fixed-support-51420
fix: sabb missed in the incorrect serial no valuation report
2025-10-22 11:55:20 +05:30
Rohit Waghchaure
b50bac6788 fix: sabb missed in the incorrect serial no valuation report 2025-10-22 11:23:51 +05:30
Mihir Kandoi
e3fcae1c0c Merge pull request #50189 from mihir-kandoi/inward-fix
fix: feat: multiple changes related to subcontracting inward
2025-10-22 00:22:34 +05:30
Mihir Kandoi
9f3cb4b783 fix: feat: multiple changes related to subcontracting inward 2025-10-21 23:51:07 +05:30
MochaMind
d9fa9c6b3d fix: sync translations from crowdin (#50185) 2025-10-21 19:35:13 +02:00
Ahmed AbuKhatwa
f51ed30c23 fix: correct monthly sales history (#50056)
* fix: correct monthly sales history

* fix: correct monthly sales history calculation

* chore: remove unrelated file accidentally committed

---------

Co-authored-by: AhmedAbukhatwa <Ahmedabukhatwa1@gmail.com>
2025-10-21 10:46:53 +05:30
Deepesh Garg
7a91ec3e33 perf: Add index for faster queries (#50175) 2025-10-20 20:42:19 +02:00
MochaMind
de93d266a6 fix: sync translations from crowdin (#50176) 2025-10-20 20:40:41 +02:00
MochaMind
53efd2d718 fix: sync translations from crowdin (#50049) 2025-10-20 01:38:15 +02:00
MochaMind
d854c6cc81 chore: update POT file (#50172) 2025-10-19 23:58:40 +02:00
Sagar Vora
e43c2ac5c1 Merge pull request #50168 from barredterra/account-currency
refactor: simplify expression
2025-10-18 23:48:31 +05:30
barredterra
2de88dadd3 refactor: simplify expression
This expression always evaluates to avalue that is equal to account_currency.
2025-10-18 19:55:57 +02:00
Sagar Vora
81ab15351e chore: remove unused import 2025-10-18 00:08:44 +05:30
Sagar Vora
95f604457d refactor: simplify logic 2025-10-18 00:00:36 +05:30
rohitwaghchaure
63a65838d3 Merge pull request #50156 from rohitwaghchaure/fixed-internal-transfer-issue
fix: internal transfer entry with serial/batch
2025-10-17 21:03:08 +05:30
Rohit Waghchaure
9b4e62a758 fix: internal transfer entry with serial/batch 2025-10-17 20:32:36 +05:30
Sagar Vora
0e026b9ccd fix: handle returns as well 2025-10-17 19:21:24 +05:30
Sagar Vora
0968f435d2 test: some tests to ensure correct discount mapping 2025-10-17 17:32:16 +05:30
Sagar Vora
f4f79d99e4 fix: validate that discount amount cannot exceed total before discount 2025-10-17 17:06:03 +05:30
Sagar Vora
feb62102d9 fix: ensure that additional discount amount is not mapped repeatedly 2025-10-17 17:06:03 +05:30
Abdeali Chharchhoda
1ad4dc9066 chore: remove print statement 2025-10-17 15:56:13 +05:30
rohitwaghchaure
36d422fbb5 Merge pull request #50123 from rohitwaghchaure/fixed-better-validation-message
fix: validation for negative batch
2025-10-17 11:36:31 +05:30
Rohit Waghchaure
f9c8f27586 fix: validation for negative batch 2025-10-17 08:52:41 +05:30
Diptanil Saha
7bd5461704 Merge pull request #50141 from diptanilsaha/fix_st_51018
fix(point-of-sale): render payment methods only when payment component is visible
2025-10-17 01:42:22 +05:30
diptanilsaha
7dc4306640 fix(point-of-sale): render payment methods only payment component is visible 2025-10-17 01:26:31 +05:30
l0gesh29
5a7a6a9bd5 fix: recalculate amount based on allocated amount 2025-10-16 17:03:37 +05:30
Patrick Eissler
2a2e4b5423 fix(Task): make Timesheet-dependent fields no_copy 2025-10-16 08:40:54 +02:00
rehansari26
d59e55fb08 test: replace get_doc with new_doc in fiscal year tests 2025-10-16 11:04:48 +05:30
Rehan Ansari
94ae098854 test: fiscal year overlap validation for company-specific years 2025-10-15 23:33:02 +05:30
Diptanil Saha
182c9fd966 fix: added exception handling on service level agreement apply hook (#50096)
* fix: added exception handling on service level agreement apply hook

* Revert "fix: added exception handling on service level agreement apply hook"

This reverts commit dae93aa96f.

* fix: Ignore missing SLA table during install/uninstall

---------

Co-authored-by: Ankush Menat <ankush@frappe.io>
2025-10-15 13:27:07 +00:00
rohitwaghchaure
afcd1d68f0 Merge pull request #50113 from rohitwaghchaure/fixed-support-50958
fix: adjustment entry
2025-10-15 15:57:55 +05:30
Rohit Waghchaure
c0851abaee fix: adjustment entry 2025-10-15 15:17:59 +05:30
Yash Chaubey
4ede97ae2b perf: optimize company monthly sales query using date range (#48942)
* perf: optimize company monthly sales query using date range instead of DATE_FORMAT

* perf: optimize company monthly sales query using date range
2025-10-15 12:46:02 +05:30
rohitwaghchaure
1fc5af67be Merge pull request #50095 from aerele/support-50163
fix: preview stock ledger for manual serial and batch values
2025-10-15 11:17:15 +05:30
Mihir Kandoi
3af5a83301 fix(stock): remove filter from query (#50104) 2025-10-14 23:55:43 +05:30
Mihir Kandoi
fa8a988454 Merge pull request #50013 from aerele/refactor/transporter-filter-buying
refactor: add supplier filter in buying
2025-10-14 23:40:52 +05:30
Mihir Kandoi
e0adbb2c01 fix: handle flt conversion for prev_ordered_qty (#50078)
Co-authored-by: Kavin <78342682+kavin0411@users.noreply.github.com>
2025-10-14 23:39:14 +05:30
Rehan Ansari
57aaf34d3e fix: fiscal year overlap validation for company-specific years 2025-10-14 23:38:17 +05:30
Mihir Kandoi
e9538f6d64 fix(stock): remove filter from query 2025-10-14 23:37:45 +05:30
Mihir Kandoi
270520a9fc fix: source warehouse validation in manufacturing entry during subcon… (#50101)
fix: source warehouse validation in manufacturing entry during subcontracting inward
2025-10-14 20:30:31 +05:30
Mihir Kandoi
3fd5aace0a fix: source warehouse validation in manufacturing entry during subcontracting inward 2025-10-14 20:08:22 +05:30
ljain112
0f89e750a7 Merge branch 'develop' into tds-jv 2025-10-14 18:40:58 +05:30
Akhil Narang
f8b50d3ffa fix: sanitize projects field in tasks webform (#50089)
Signed-off-by: Akhil Narang <me@akhilnarang.dev>
2025-10-14 13:07:59 +00:00
ljain112
2de9f8f2e2 test: add TDS and TCS calculations for journal entries in Debit and Credit Notes 2025-10-14 17:30:22 +05:30
Kavin
c5f68d0b27 fix: preview stock ledger for manual serial and batch values 2025-10-14 17:14:22 +05:30
rohitwaghchaure
2a7e4c68e5 Merge pull request #50080 from rohitwaghchaure/fixed-stock-query
perf: optimize sql query
2025-10-14 17:13:07 +05:30
Khushi Rawat
cc3660635f Merge pull request #50033 from rehanrehman389/filter-sales-team
fix: filter sales team to show only active individual salespersons
2025-10-14 17:08:56 +05:30
rohitwaghchaure
df1e49ffb4 fix: negative error not throw for backdated entry (#50091) 2025-10-14 17:08:43 +05:30
Rohit Waghchaure
88a947ff4e fix: negative error not throw for backdated entry 2025-10-14 16:48:38 +05:30
Mihir Kandoi
ab0ee8809d Merge pull request #50090 from mihir-kandoi/restore_customer_field
fix: restore customer field
2025-10-14 16:27:41 +05:30
Mihir Kandoi
cf97c1db38 fix: add delivery warehouse filter 2025-10-14 16:08:50 +05:30
Mihir Kandoi
ae816d0c1d fix: restore customer field 2025-10-14 16:02:58 +05:30
Rohit Waghchaure
e7b64175fd perf: optimize sql query 2025-10-14 15:03:42 +05:30
Mihir Kandoi
f2b948a483 feat: subcontracting inward (#47728)
* feat: subcontracting inward

* feat: stock reservation

* feat: subcontracting delivery

* feat: all remaining stuff

* fix: linter errors

* fix: patch

* fix: modify stock entry type validation

* fix: customer provided item cost field mandatory validation

* fix: failing tests

* fix: failing tests

* fix: subcontracting controlller

* refactor: semi final

* refactor: final

* chore: resolve conflicts

* refactor: changes requested

* fix: reservation transfer of extra qty

* fix: consider add cost for customer provided rate field

* test: create test data

* test: subcontracted sales order (partial)

* test: fin

* fix: do not add self RM in DN created from SI

* fix: failing test case

* fix: conflicting function name

* refactor: final changes

* fix: more bugs

* perf: various and major performance improvements

* fix: consider warehouse as well in all queries

* fix: same item code with diff warehouse in manufacture entry

* refactor: readability

* fix: frontend validations

* perf: replace query inside loop with single query

* fix: set additional item flag to true when extra customer provided item is received

* fix: bugs found by coderabbit

* fix: more coderabbit bugs

* fix: add validation to disallow cancellation of manufacturing entry

* perf: use cached values wherever it makes sense

* test: fix redundant insert to child tables

* fix: consider SI return of billed self RM

* fix: bug found by coderabbit

---------

Co-authored-by: Mihir Kandoi <mihirkandoi@Mihirs-MacBook-Air.local>
2025-10-14 15:00:49 +05:30
Mihir Kandoi
9772ca75c4 Merge pull request #50004 from aerele/delivery-note-return 2025-10-14 14:49:04 +05:30
Mihir Kandoi
b452724c1a Merge pull request #50079 from mihir-kandoi/gh-50066
chore: replace broken links with correct ones
2025-10-14 14:26:53 +05:30
Mihir Kandoi
224317d1c9 Merge pull request #49960 from aerele/support-50220
Fix/Support 50220
2025-10-14 14:18:36 +05:30
Kavin
1c586697c7 fix: handle multi uom in reserved qty for production plan 2025-10-14 14:00:59 +05:30
Mihir Kandoi
11be07086f chore: replace broken links with correct ones 2025-10-14 13:55:14 +05:30
rohitwaghchaure
9c014c7ba4 Merge pull request #50072 from aerele/support-50647
fix: swap warehouse labels for return entry
2025-10-14 13:35:33 +05:30
Kavin
77c35ef47f fix: handle flt conversion for prev_ordered_qty 2025-10-14 13:35:06 +05:30
rohitwaghchaure
5cd62ad236 Merge pull request #50073 from aerele/support-50395
fix(stock-entry): fetch empty batch for finished item
2025-10-14 13:34:33 +05:30
rohitwaghchaure
10014b9b79 Merge pull request #50065 from rohitwaghchaure/aerele-support-48884
fix(stock-reconciliation): include inventory dimensions in duplicate validation
2025-10-14 13:32:15 +05:30
rohitwaghchaure
08bd3b348f Merge pull request #50070 from rohitwaghchaure/fixed-support-50227
fix: performance issue by adding index
2025-10-14 13:31:30 +05:30
venkat102
74a7ddf66d fix(stock-entry): fetch empty batch for finished item 2025-10-14 13:19:37 +05:30
Kavin
f0c3f0d0be fix: swap warehouse labels for return entry 2025-10-14 13:14:39 +05:30
Rohit Waghchaure
1afc75b15a fix: performance issue by adding index 2025-10-14 13:02:56 +05:30
rohitwaghchaure
9ccc55decc Merge pull request #50027 from rohitwaghchaure/fixed-reset-raw-materials
fix: reset raw materials considering not available batches
2025-10-14 12:48:43 +05:30
rohitwaghchaure
70c6461cad Merge pull request #50061 from rohitwaghchaure/fixed-support-50717
fix: do reposting of first transfer entry based on item-wh combination
2025-10-14 12:47:55 +05:30
Mihir Kandoi
3d7ac166b7 Merge pull request #49445 from aerele/production-plan-item-filter
fix(production plan): filter sales orders by item
2025-10-14 12:02:05 +05:30
Rohit Waghchaure
c95465cba1 fix: duplicate serial nos 2025-10-14 12:01:46 +05:30
Mihir Kandoi
9b3b2102f8 Merge pull request #49891 from rehanrehman389/fix/empty-create-button
fix: prevent empty Create dropdown when In Process
2025-10-14 11:58:04 +05:30
Mihir Kandoi
ff94438563 Merge pull request #50058 from matteoarosti/fix/warehouse-source-reference
fix: warehouse source reference in production report
2025-10-14 11:52:08 +05:30
Rohit Waghchaure
2f25b445ab fix: do reposting of first transfer entry based on item-wh combination 2025-10-14 11:48:42 +05:30
ruthra kumar
d3014447b6 Merge pull request #50003 from frappe/cache_deletion_check
perf: Only check transaction deletion record once during req/job
2025-10-14 10:05:23 +05:30
matteo.arosti
451651e350 fix: warehouse source reference in production report 2025-10-14 00:27:27 +02: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
Rohit Waghchaure
ec1636db12 fix: reset raw materials considering not available batches 2025-10-13 17:29:52 +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
Kavin
af8aa153bf fix: sum quantity instead of requried BOM quantity 2025-10-13 15:13:37 +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
l0gesh29
fd9167f2af fix: add GROUP BY for dn_detail and convert SQL query to QB 2025-10-13 11:22:29 +05:30
diptanilsaha
12c1b8a910 fix: set default roles on role_profile during reinstallation 2025-10-13 02:20:48 +05:30
Bhavan23
3e4846ea3d test(accounts-receivable): add test case to validate report data with party account currency 2025-10-12 20:23:25 +00:00
Bhavan23
752ea7ee7d fix(accounts-receivable): ensure report data with party account currency 2025-10-12 20:23:19 +00:00
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
Rehan Ansari
2fcd406b18 fix: filter sales team to show only active individual salespersons 2025-10-12 19:01:54 +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
venkat102
4b21c2cc46 fix(stock-reconciliation): include inventory dimensions in duplicate validation 2025-10-10 18:47:15 +05:30
manikandan-s-18
108b108d64 refactor: add supplier filter in buying 2025-10-10 17:04:49 +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
l0gesh29
1f831d8783 fix: hide sales invoice creation for fully returned delivery notes 2025-10-10 13:31:57 +05:30
Rohit Waghchaure
98f186b0e0 fix: posting date in serial no 2025-10-10 12:46:33 +05:30
Ankush Menat
8d723d3da6 perf: Only check transaction deletion record once during req/job 2025-10-10 12:44: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
ljain112
88f6d783b4 fix: include grand_total in journal entry and handle taxes correctly in invoice total calculation 2025-10-09 13:44:32 +05:30
ljain112
2112f36577 fix: add cost center to tds row in journal entry 2025-10-09 13:32:45 +05:30
ljain112
610877fb17 refactor: update exchange rate import to avoid redundancy 2025-10-09 13:11:10 +05:30
ljain112
004bd59245 fix: calculate net_total excluding taxes 2025-10-09 13:08:55 +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
ljain112
84e6d278c3 chore: remove redundant code 2025-10-09 12:54:55 +05:30
ljain112
2b4f621c8e refactor: proper variable naming 2025-10-09 12:24:54 +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
ljain112
31434630b5 fix: handle multicurrency in tds jv 2025-10-08 19:29:39 +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
ljain112
47aa006ea9 fix: recalculate totals after applying tds 2025-10-08 18:02:19 +05:30
ljain112
1319b28b1f fix: tds for customer and supplier in Journal Entry 2025-10-08 17:27:58 +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
0948358bb3 fix: prevent empty Create dropdown when In Process 2025-10-06 01:29:54 +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
KerollesFathy
0af74aef00 fix(accounts): update payment mode account retrieval to use namespaced function 2025-09-17 13:14:35 +00:00
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
ravibharathi656
bfff945fb1 fix(production plan): filter sales orders by item 2025-09-03 16:54:13 +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
Anjali Patel
cbfb14a654 fix: add missing query key in 'Reports To' field filter 2025-08-13 13:37:48 +00:00
Anjali Patel
608d38a172 fix: prevent self in "Reports To" dropdown (UI-level check)
Ensures employee cannot select themselves in the "Reports To" field via UI.
This complements server-side validation by improving UX.
2025-08-13 12:25:22 +00:00
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
943 changed files with 520083 additions and 313622 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

@@ -45,3 +45,9 @@ d827ed21adc7b36047e247cbb0dc6388d048a7f9
# `frappe.flags.in_test` => `frappe.in_test`
7a482a69985c952de0e8193c9d4e086aee65ee6d
# these commits actually changed something valuable
# but they have a lot of whitespace changes that make blame noisy
# PR: https://github.com/frappe/erpnext/pull/49816
3ffd50c772735877b330d010c1058f623da8721d
0e8f8677b8eb31e7834f72d1c6314d3c3f392ca6

View File

@@ -6,7 +6,7 @@ Feature requests are also a great way to take the product forward. New ideas can
When you are raising an Issue, you should keep a few things in mind. Remember that the developer does not have access to your machine so you must give all the information you can while raising an Issue. If you are suggesting a feature, you should be very clear about what you want.
The Issue list is not the right place to ask a question or start a general discussion. If you want to do that , then the right place is the forum [https://discuss.erpnext.com](https://discuss.erpnext.com).
The Issue list is not the right place to ask a question or start a general discussion. If you want to do that , then the right place is the forum [https://discuss.frappe.io](https://discuss.frappe.io/c/erpnext/6).
### Reply and Closing Policy

View File

@@ -9,7 +9,7 @@ body:
Welcome to ERPNext issue tracker! Before creating an issue, please heed the following:
1. This tracker should only be used to report bugs and request features / enhancements to ERPNext
- For questions and general support, checkout the [user manual](https://docs.erpnext.com/) or use [forum](https://discuss.erpnext.com)
- For questions and general support, checkout the [user manual](https://docs.erpnext.com/) or use [forum](https://discuss.frappe.io/c/erpnext/6)
- For documentation issues, propose edit on [documentation site](https://docs.erpnext.com/) directly.
2. When making a bug report, make sure you provide all required information. The easier it is for
maintainers to reproduce, the faster it'll be fixed.

View File

@@ -1,5 +1,5 @@
blank_issues_enabled: false
contact_links:
- name: Community Forum
url: https://discuss.erpnext.com/
url: https://discuss.frappe.io/c/erpnext/6
about: For general QnA, discussions and community help.

View File

@@ -11,7 +11,7 @@ assignees: ''
Welcome to ERPNext issue tracker! Before creating an issue, please heed the following:
1. This tracker should only be used to report bugs and request features / enhancements to ERPNext
- For questions and general support, checkout the manual https://erpnext.com/docs/user/manual/en or use https://discuss.erpnext.com
- For questions and general support, checkout the manual https://docs.erpnext.com or use https://discuss.frappe.io/c/erpnext/6
2. Use the search function before creating a new issue. Duplicates will be closed and directed to
the original discussion.
3. When making a feature request, make sure to be as verbose as possible. The better you convey your message, the greater the drive to make it happen.
@@ -21,7 +21,7 @@ Please keep in mind that we get many many requests and we can't possibly work on
If you're in urgent need to a feature, please try the following channels to get paid developments done quickly:
1. Certified ERPNext partners: https://erpnext.com/partners
2. Developer community on ERPNext forums: https://discuss.erpnext.com/c/developers/5
2. Developer community on ERPNext forums: https://discuss.frappe.io/c/framework/5
3. Telegram group for ERPNext/Frappe development work: https://t.me/erpnext_opps
-->

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
@@ -125,10 +128,9 @@ jobs:
FRAPPE_BRANCH: ${{ github.event.client_payload.sha || github.event.inputs.branch }}
- name: Run Tests
run: 'cd ~/frappe-bench/ && bench --site test_site run-parallel-tests --app erpnext --total-builds ${{ strategy.job-total }} --build-number ${{ matrix.container }}'
run: 'cd ~/frappe-bench/ && bench --site test_site run-parallel-tests --app erpnext --total-builds ${{ strategy.job-total }} --build-number ${{ matrix.container }} --with-coverage'
env:
TYPE: server
CAPTURE_COVERAGE: ${{ github.event_name != 'pull_request' }}
- name: Show bench output
@@ -137,7 +139,6 @@ jobs:
- name: Upload coverage data
uses: actions/upload-artifact@v4
if: github.event_name != 'pull_request'
with:
name: coverage-${{ matrix.container }}
path: /home/runner/frappe-bench/sites/coverage.xml
@@ -146,7 +147,6 @@ jobs:
name: Coverage Wrap Up
needs: test
runs-on: ubuntu-latest
if: ${{ github.event_name != 'pull_request' }}
steps:
- name: Clone
uses: actions/checkout@v4

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

@@ -50,6 +50,15 @@ pull_request_rules:
- version-15-hotfix
assignees:
- "{{ author }}"
- name: backport to version-16-beta
conditions:
- label="backport version-16-beta"
actions:
backport:
branches:
- version-16-beta
assignees:
- "{{ author }}"
- name: Automatic merge on CI success and review
conditions:
- status-success=linters

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

@@ -133,7 +133,7 @@ To setup the repository locally follow the steps mentioned below:
1. [Frappe School](https://school.frappe.io) - Learn Frappe Framework and ERPNext from the various courses by the maintainers or from the community.
2. [Official documentation](https://docs.erpnext.com/) - Extensive documentation for ERPNext.
3. [Discussion Forum](https://discuss.erpnext.com/) - Engage with community of ERPNext users and service providers.
3. [Discussion Forum](https://discuss.frappe.io/c/erpnext/6) - Engage with community of ERPNext users and service providers.
4. [Telegram Group](https://erpnext_public.t.me) - Get instant help from huge community of users.

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

@@ -7,6 +7,7 @@ from frappe.utils import (
cint,
date_diff,
flt,
formatdate,
get_first_day,
get_last_day,
get_link_to_form,
@@ -46,7 +47,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))
@@ -317,7 +319,7 @@ def get_already_booked_amount(doc, item):
def book_deferred_income_or_expense(doc, deferred_process, posting_date=None):
enable_check = "enable_deferred_revenue" if doc.doctype == "Sales Invoice" else "enable_deferred_expense"
accounts_frozen_upto = frappe.get_single_value("Accounts Settings", "acc_frozen_upto")
accounts_frozen_upto = frappe.db.get_value("Company", doc.company, "accounts_frozen_till_date")
def _book_deferred_revenue_or_expense(
item,

View File

@@ -21,6 +21,7 @@
"account_currency",
"column_break1",
"parent_account",
"account_category",
"account_type",
"tax_rate",
"freeze_account",
@@ -189,13 +190,20 @@
"fieldname": "disabled",
"fieldtype": "Check",
"label": "Disable"
},
{
"description": "Used with Financial Report Template",
"fieldname": "account_category",
"fieldtype": "Link",
"label": "Account Category",
"options": "Account Category"
}
],
"icon": "fa fa-money",
"idx": 1,
"is_tree": 1,
"links": [],
"modified": "2025-01-22 10:40:35.766017",
"modified": "2025-08-02 06:26:44.657146",
"modified_by": "Administrator",
"module": "Accounts",
"name": "Account",
@@ -250,6 +258,7 @@
"write": 1
}
],
"row_format": "Dynamic",
"search_fields": "account_number",
"show_name_in_global_search": 1,
"show_preview_popup": 1,
@@ -257,4 +266,4 @@
"sort_order": "ASC",
"states": [],
"track_changes": 1
}
}

View File

@@ -31,6 +31,7 @@ class Account(NestedSet):
if TYPE_CHECKING:
from frappe.types import DF
account_category: DF.Link | None
account_currency: DF.Link | None
account_name: DF.Data
account_number: DF.Data | None
@@ -92,8 +93,10 @@ class Account(NestedSet):
super().on_update()
def onload(self):
frozen_accounts_modifier = frappe.get_single_value("Accounts Settings", "frozen_accounts_modifier")
if not frozen_accounts_modifier or frozen_accounts_modifier in frappe.get_roles():
role_allowed_for_frozen_entries = frappe.db.get_value(
"Company", self.company, "role_allowed_for_frozen_entries"
)
if not role_allowed_for_frozen_entries or role_allowed_for_frozen_entries in frappe.get_roles():
self.set_onload("can_freeze_account", True)
def autoname(self):
@@ -108,6 +111,7 @@ class Account(NestedSet):
self.validate_parent_child_account_type()
self.validate_root_details()
self.validate_account_number()
self.validate_disabled()
self.validate_group_or_ledger()
self.set_root_and_report_type()
self.validate_mandatory()
@@ -167,7 +171,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 +214,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):
@@ -252,6 +256,14 @@ class Account(NestedSet):
self.create_account_for_child_company(parent_acc_name_map, descendants, parent_acc_name)
def validate_disabled(self):
doc_before_save = self.get_doc_before_save()
if not doc_before_save or cint(doc_before_save.disabled) == cint(self.disabled):
return
if cint(self.disabled):
self.validate_default_accounts_in_company()
def validate_group_or_ledger(self):
doc_before_save = self.get_doc_before_save()
if not doc_before_save or cint(doc_before_save.is_group) == cint(self.is_group):
@@ -259,21 +271,44 @@ 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."))
self.validate_default_accounts_in_company()
elif self.check_if_child_exists():
throw(_("Account with child nodes cannot be set as ledger"))
def validate_default_accounts_in_company(self):
default_account_fields = get_company_default_account_fields()
company_default_accounts = frappe.db.get_value(
"Company", self.company, list(default_account_fields.keys()), as_dict=1
)
msg = _("Account {0} cannot be disabled as it is already set as {1} for {2}.")
if not self.disabled:
msg = _("Account {0} cannot be converted to Group as it is already set as {1} for {2}.")
for d in default_account_fields:
if company_default_accounts.get(d) == self.name:
throw(
msg.format(
frappe.bold(self.name),
frappe.bold(default_account_fields.get(d)),
frappe.bold(self.company),
)
)
def validate_frozen_accounts_modifier(self):
doc_before_save = self.get_doc_before_save()
if not doc_before_save or doc_before_save.freeze_account == self.freeze_account:
return
frozen_accounts_modifier = frappe.get_cached_value(
"Accounts Settings", "Accounts Settings", "frozen_accounts_modifier"
role_allowed_for_frozen_entries = frappe.get_cached_value(
"Company", self.company, "role_allowed_for_frozen_entries"
)
if not frozen_accounts_modifier or frozen_accounts_modifier not in frappe.get_roles():
if not role_allowed_for_frozen_entries or role_allowed_for_frozen_entries not in frappe.get_roles():
throw(_("You are not authorized to set Frozen value"))
def validate_balance_must_be_debit_or_credit(self):
@@ -302,7 +337,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}):
@@ -623,3 +660,27 @@ def _ensure_idle_system():
).format(pretty_date(last_gl_update)),
title=_("System In Use"),
)
def get_company_default_account_fields():
return {
"default_bank_account": "Default Bank Account",
"default_cash_account": "Default Cash Account",
"default_receivable_account": "Default Receivable Account",
"default_payable_account": "Default Payable Account",
"default_expense_account": "Default Expense Account",
"default_income_account": "Default Income Account",
"stock_received_but_not_billed": "Stock Received But Not Billed Account",
"stock_adjustment_account": "Stock Adjustment Account",
"write_off_account": "Write Off Account",
"default_discount_account": "Default Payment Discount Account",
"unrealized_profit_loss_account": "Unrealized Profit / Loss Account",
"exchange_gain_loss_account": "Exchange Gain / Loss Account",
"unrealized_exchange_gain_loss_account": "Unrealized Exchange Gain / Loss Account",
"round_off_account": "Round Off Account",
"default_deferred_revenue_account": "Default Deferred Revenue Account",
"default_deferred_expense_account": "Default Deferred Expense Account",
"accumulated_depreciation_account": "Accumulated Depreciation Account",
"depreciation_expense_account": "Depreciation Expense Account",
"disposal_account": "Gain/Loss Account on Asset Disposal",
}

View File

@@ -70,6 +70,7 @@ frappe.treeview_settings["Account"] = {
args: {
accounts: accounts,
company: cur_tree.args.company,
include_default_fb_balances: true,
},
});
@@ -160,6 +161,14 @@ frappe.treeview_settings["Account"] = {
.options,
description: __("Optional. This setting will be used to filter in various transactions."),
},
{
fieldtype: "Link",
fieldname: "account_category",
label: __("Account Category"),
options: frappe.get_meta("Account").fields.filter((d) => d.fieldname == "account_category")[0]
.options,
description: __("Optional. Used with Financial Report Template"),
},
{
fieldtype: "Float",
fieldname: "tax_rate",
@@ -236,10 +245,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 +263,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,19 +18,12 @@ 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")
if account_name not in [
"account_name",
"account_number",
"account_type",
"root_type",
"is_group",
"tax_rate",
"account_currency",
]:
if account_name not in get_chart_metadata_fields():
account_number = cstr(child.get("account_number")).strip()
account_name, account_name_in_db = add_suffix_if_duplicate(
account_name, account_number, accounts
@@ -54,8 +47,10 @@ def create_charts(
"report_type": report_type,
"account_number": account_number,
"account_type": child.get("account_type"),
"account_category": child.get("account_category"),
"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"),
}
)
@@ -95,20 +90,7 @@ def add_suffix_if_duplicate(account_name, account_number, accounts):
def identify_is_group(child):
if child.get("is_group"):
is_group = child.get("is_group")
elif len(
set(child.keys())
- set(
[
"account_name",
"account_type",
"root_type",
"is_group",
"tax_rate",
"account_number",
"account_currency",
]
)
):
elif len(set(child.keys()) - set(get_chart_metadata_fields())):
is_group = 1
else:
is_group = 0
@@ -251,13 +233,7 @@ def validate_bank_account(coa, bank_account):
def _get_account_names(account_master):
for account_name, child in account_master.items():
if account_name not in [
"account_number",
"account_type",
"root_type",
"is_group",
"tax_rate",
]:
if account_name not in get_chart_metadata_fields():
accounts.append(account_name)
_get_account_names(child)
@@ -282,15 +258,7 @@ def build_tree_from_json(chart_template, chart_data=None, from_coa_importer=Fals
"""recursively called to form a parent-child based list of dict from chart template"""
for account_name, child in children.items():
account = {}
if account_name in [
"account_name",
"account_number",
"account_type",
"root_type",
"is_group",
"tax_rate",
"account_currency",
]:
if account_name in get_chart_metadata_fields():
continue
if from_coa_importer:
@@ -308,3 +276,16 @@ def build_tree_from_json(chart_template, chart_data=None, from_coa_importer=Fals
_import_accounts(chart, None)
return accounts
def get_chart_metadata_fields():
return [
"account_name",
"account_number",
"account_type",
"account_category",
"root_type",
"is_group",
"tax_rate",
"account_currency",
]

View File

@@ -9,103 +9,192 @@ def get():
return {
_("Application of Funds (Assets)"): {
_("Current Assets"): {
_("Accounts Receivable"): {_("Debtors"): {"account_type": "Receivable"}},
_("Bank Accounts"): {"account_type": "Bank", "is_group": 1},
_("Cash In Hand"): {_("Cash"): {"account_type": "Cash"}, "account_type": "Cash"},
_("Accounts Receivable"): {
_("Debtors"): {"account_type": "Receivable", "account_category": "Trade Receivables"}
},
_("Bank Accounts"): {
"account_type": "Bank",
"is_group": 1,
"account_category": "Cash and Cash Equivalents",
},
_("Cash In Hand"): {
_("Cash"): {"account_type": "Cash", "account_category": "Cash and Cash Equivalents"},
"account_type": "Cash",
"account_category": "Cash and Cash Equivalents",
},
_("Loans and Advances (Assets)"): {
_("Employee Advances"): {},
_("Employee Advances"): {
"account_type": "Payable",
"account_category": "Other Receivables",
},
},
_("Securities and Deposits"): {_("Earnest Money"): {}},
_("Securities and Deposits"): {
_("Earnest Money"): {"account_category": "Other Current Assets"}
},
_("Prepaid Expenses"): {"account_category": "Other Current Assets"},
_("Short-term Investments"): {"account_category": "Short-term Investments"},
_("Stock Assets"): {
_("Stock In Hand"): {"account_type": "Stock"},
_("Stock In Hand"): {"account_type": "Stock", "account_category": "Stock Assets"},
"account_type": "Stock",
"account_category": "Stock Assets",
},
_("Tax Assets"): {"is_group": 1},
_("Tax Assets"): {"is_group": 1, "account_category": "Other Current Assets"},
},
_("Fixed Assets"): {
_("Capital Equipment"): {"account_type": "Fixed Asset"},
_("Electronic Equipment"): {"account_type": "Fixed Asset"},
_("Furniture and Fixtures"): {"account_type": "Fixed Asset"},
_("Office Equipment"): {"account_type": "Fixed Asset"},
_("Plants and Machineries"): {"account_type": "Fixed Asset"},
_("Buildings"): {"account_type": "Fixed Asset"},
_("Software"): {"account_type": "Fixed Asset"},
_("Accumulated Depreciation"): {"account_type": "Accumulated Depreciation"},
_("Capital Equipment"): {
"account_type": "Fixed Asset",
"account_category": "Tangible Assets",
},
_("Electronic Equipment"): {
"account_type": "Fixed Asset",
"account_category": "Tangible Assets",
},
_("Furniture and Fixtures"): {
"account_type": "Fixed Asset",
"account_category": "Tangible Assets",
},
_("Office Equipment"): {"account_type": "Fixed Asset", "account_category": "Tangible Assets"},
_("Plants and Machineries"): {
"account_type": "Fixed Asset",
"account_category": "Tangible Assets",
},
_("Buildings"): {"account_type": "Fixed Asset", "account_category": "Tangible Assets"},
_("Software"): {"account_type": "Fixed Asset", "account_category": "Intangible Assets"},
_("Accumulated Depreciation"): {
"account_type": "Accumulated Depreciation",
"account_category": "Tangible Assets",
},
_("CWIP Account"): {
"account_type": "Capital Work in Progress",
"account_category": "Tangible Assets",
},
},
_("Investments"): {"is_group": 1},
_("Temporary Accounts"): {_("Temporary Opening"): {"account_type": "Temporary"}},
_("Investments"): {"is_group": 1, "account_category": "Long-term Investments"},
_("Temporary Accounts"): {
_("Temporary Opening"): {
"account_type": "Temporary",
"account_category": "Other Non-current Assets",
}
},
"root_type": "Asset",
},
_("Expenses"): {
_("Direct Expenses"): {
_("Stock Expenses"): {
_("Cost of Goods Sold"): {"account_type": "Cost of Goods Sold"},
_("Expenses Included In Asset Valuation"): {
"account_type": "Expenses Included In Asset Valuation"
_("Cost of Goods Sold"): {
"account_type": "Cost of Goods Sold",
"account_category": "Cost of Goods Sold",
},
_("Expenses Included In Asset Valuation"): {
"account_type": "Expenses Included In Asset Valuation",
"account_category": "Other Direct Costs",
},
_("Expenses Included In Valuation"): {
"account_type": "Expenses Included In Valuation",
"account_category": "Other Direct Costs",
},
_("Stock Adjustment"): {
"account_type": "Stock Adjustment",
"account_category": "Other Direct Costs",
},
_("Expenses Included In Valuation"): {"account_type": "Expenses Included In Valuation"},
_("Stock Adjustment"): {"account_type": "Stock Adjustment"},
},
},
_("Indirect Expenses"): {
_("Administrative Expenses"): {},
_("Commission on Sales"): {},
_("Depreciation"): {"account_type": "Depreciation"},
_("Entertainment Expenses"): {},
_("Freight and Forwarding Charges"): {"account_type": "Chargeable"},
_("Legal Expenses"): {},
_("Marketing Expenses"): {"account_type": "Chargeable"},
_("Miscellaneous Expenses"): {"account_type": "Chargeable"},
_("Office Maintenance Expenses"): {},
_("Office Rent"): {},
_("Postal Expenses"): {},
_("Print and Stationery"): {},
_("Round Off"): {"account_type": "Round Off"},
_("Salary"): {},
_("Sales Expenses"): {},
_("Telephone Expenses"): {},
_("Travel Expenses"): {},
_("Utility Expenses"): {},
_("Write Off"): {},
_("Exchange Gain/Loss"): {},
_("Gain/Loss on Asset Disposal"): {},
_("Impairment"): {},
_("Administrative Expenses"): {"account_category": "Operating Expenses"},
_("Commission on Sales"): {"account_category": "Operating Expenses"},
_("Depreciation"): {"account_type": "Depreciation", "account_category": "Operating Expenses"},
_("Entertainment Expenses"): {"account_category": "Operating Expenses"},
_("Freight and Forwarding Charges"): {
"account_type": "Chargeable",
"account_category": "Operating Expenses",
},
_("Legal Expenses"): {"account_category": "Operating Expenses"},
_("Marketing Expenses"): {
"account_type": "Chargeable",
"account_category": "Operating Expenses",
},
_("Miscellaneous Expenses"): {
"account_type": "Chargeable",
"account_category": "Operating Expenses",
},
_("Office Maintenance Expenses"): {"account_category": "Operating Expenses"},
_("Office Rent"): {"account_category": "Operating Expenses"},
_("Postal Expenses"): {"account_category": "Operating Expenses"},
_("Print and Stationery"): {"account_category": "Operating Expenses"},
_("Round Off"): {"account_type": "Round Off", "account_category": "Operating Expenses"},
_("Salary"): {"account_category": "Operating Expenses"},
_("Sales Expenses"): {"account_category": "Operating Expenses"},
_("Telephone Expenses"): {"account_category": "Operating Expenses"},
_("Travel Expenses"): {"account_category": "Operating Expenses"},
_("Utility Expenses"): {"account_category": "Operating Expenses"},
_("Write Off"): {"account_category": "Operating Expenses"},
_("Exchange Gain/Loss"): {"account_category": "Operating Expenses"},
_("Interest Expense"): {"account_category": "Finance Costs"},
_("Bank Charges"): {"account_category": "Finance Costs"},
_("Gain/Loss on Asset Disposal"): {"account_category": "Other Operating Income"},
_("Impairment"): {"account_category": "Operating Expenses"},
_("Tax Expense"): {"account_category": "Tax Expense"},
},
"root_type": "Expense",
},
_("Income"): {
_("Direct Income"): {_("Sales"): {}, _("Service"): {}},
_("Indirect Income"): {"is_group": 1},
_("Direct Income"): {
_("Sales"): {"account_category": "Revenue from Operations"},
_("Service"): {"account_category": "Revenue from Operations"},
},
_("Indirect Income"): {
_("Interest Income"): {"account_category": "Investment Income"},
_("Interest on Fixed Deposits"): {"account_category": "Investment Income"},
"is_group": 1,
},
"root_type": "Income",
},
_("Source of Funds (Liabilities)"): {
_("Current Liabilities"): {
_("Accounts Payable"): {
_("Creditors"): {"account_type": "Payable"},
_("Payroll Payable"): {},
_("Creditors"): {"account_type": "Payable", "account_category": "Trade Payables"},
_("Payroll Payable"): {"account_category": "Other Payables"},
},
_("Accrued Expenses"): {"account_category": "Other Current Liabilities"},
_("Customer Advances"): {"account_category": "Other Current Liabilities"},
_("Stock Liabilities"): {
_("Stock Received But Not Billed"): {"account_type": "Stock Received But Not Billed"},
_("Asset Received But Not Billed"): {"account_type": "Asset Received But Not Billed"},
_("Stock Received But Not Billed"): {
"account_type": "Stock Received But Not Billed",
"account_category": "Trade Payables",
},
_("Asset Received But Not Billed"): {
"account_type": "Asset Received But Not Billed",
"account_category": "Trade Payables",
},
},
_("Duties and Taxes"): {"account_type": "Tax", "is_group": 1},
_("Duties and Taxes"): {
"account_type": "Tax",
"is_group": 1,
"account_category": "Current Tax Liabilities",
},
_("Short-term Provisions"): {"account_category": "Short-term Provisions"},
_("Loans (Liabilities)"): {
_("Secured Loans"): {},
_("Unsecured Loans"): {},
_("Bank Overdraft Account"): {},
_("Secured Loans"): {"account_category": "Long-term Borrowings"},
_("Unsecured Loans"): {"account_category": "Long-term Borrowings"},
_("Bank Overdraft Account"): {"account_category": "Short-term Borrowings"},
},
},
_("Non-Current Liabilities"): {
_("Long-term Provisions"): {"account_category": "Long-term Provisions"},
_("Employee Benefits Obligation"): {"account_category": "Other Non-current Liabilities"},
"is_group": 1,
},
"root_type": "Liability",
},
_("Equity"): {
_("Capital Stock"): {"account_type": "Equity"},
_("Dividends Paid"): {"account_type": "Equity"},
_("Opening Balance Equity"): {"account_type": "Equity"},
_("Retained Earnings"): {"account_type": "Equity"},
_("Revaluation Surplus"): {"account_type": "Equity"},
_("Capital Stock"): {"account_type": "Equity", "account_category": "Share Capital"},
_("Dividends Paid"): {"account_type": "Equity", "account_category": "Reserves and Surplus"},
_("Opening Balance Equity"): {
"account_type": "Equity",
"account_category": "Reserves and Surplus",
},
_("Retained Earnings"): {"account_type": "Equity", "account_category": "Reserves and Surplus"},
_("Revaluation Surplus"): {"account_type": "Equity", "account_category": "Reserves and Surplus"},
"root_type": "Equity",
},
}

View File

@@ -10,49 +10,128 @@ def get():
_("Application of Funds (Assets)"): {
_("Current Assets"): {
_("Accounts Receivable"): {
_("Debtors"): {"account_type": "Receivable", "account_number": "1310"},
_("Debtors"): {
"account_type": "Receivable",
"account_number": "1310",
"account_category": "Trade Receivables",
},
"account_number": "1300",
},
_("Bank Accounts"): {"account_type": "Bank", "is_group": 1, "account_number": "1200"},
_("Bank Accounts"): {
"account_type": "Bank",
"is_group": 1,
"account_number": "1200",
"account_category": "Cash and Cash Equivalents",
},
_("Cash In Hand"): {
_("Cash"): {"account_type": "Cash", "account_number": "1110"},
_("Cash"): {
"account_type": "Cash",
"account_number": "1110",
"account_category": "Cash and Cash Equivalents",
},
"account_type": "Cash",
"account_number": "1100",
"account_category": "Cash and Cash Equivalents",
},
_("Loans and Advances (Assets)"): {
_("Employee Advances"): {"account_number": "1610"},
_("Employee Advances"): {
"account_number": "1610",
"account_type": "Payable",
"account_category": "Other Receivables",
},
"account_number": "1600",
},
_("Securities and Deposits"): {
_("Earnest Money"): {"account_number": "1651"},
_("Earnest Money"): {
"account_number": "1651",
"account_category": "Other Current Assets",
},
"account_number": "1650",
},
_("Prepaid Expenses"): {
"account_number": "1660",
"account_category": "Other Current Assets",
},
_("Short-term Investments"): {
"account_number": "1670",
"account_category": "Short-term Investments",
},
_("Stock Assets"): {
_("Stock In Hand"): {"account_type": "Stock", "account_number": "1410"},
_("Stock In Hand"): {
"account_type": "Stock",
"account_number": "1410",
"account_category": "Stock Assets",
},
"account_type": "Stock",
"account_number": "1400",
"account_category": "Stock Assets",
},
_("Tax Assets"): {
"is_group": 1,
"account_number": "1500",
"account_category": "Other Current Assets",
},
_("Tax Assets"): {"is_group": 1, "account_number": "1500"},
"account_number": "1100-1600",
},
_("Fixed Assets"): {
_("Capital Equipment"): {"account_type": "Fixed Asset", "account_number": "1710"},
_("Electronic Equipment"): {"account_type": "Fixed Asset", "account_number": "1720"},
_("Furniture and Fixtures"): {"account_type": "Fixed Asset", "account_number": "1730"},
_("Office Equipment"): {"account_type": "Fixed Asset", "account_number": "1740"},
_("Plants and Machineries"): {"account_type": "Fixed Asset", "account_number": "1750"},
_("Buildings"): {"account_type": "Fixed Asset", "account_number": "1760"},
_("Software"): {"account_type": "Fixed Asset", "account_number": "1770"},
_("Capital Equipment"): {
"account_type": "Fixed Asset",
"account_number": "1710",
"account_category": "Tangible Assets",
},
_("Electronic Equipment"): {
"account_type": "Fixed Asset",
"account_number": "1720",
"account_category": "Tangible Assets",
},
_("Furniture and Fixtures"): {
"account_type": "Fixed Asset",
"account_number": "1730",
"account_category": "Tangible Assets",
},
_("Office Equipment"): {
"account_type": "Fixed Asset",
"account_number": "1740",
"account_category": "Tangible Assets",
},
_("Plants and Machineries"): {
"account_type": "Fixed Asset",
"account_number": "1750",
"account_category": "Tangible Assets",
},
_("Buildings"): {
"account_type": "Fixed Asset",
"account_number": "1760",
"account_category": "Tangible Assets",
},
_("Software"): {
"account_type": "Fixed Asset",
"account_number": "1770",
"account_category": "Intangible Assets",
},
_("Accumulated Depreciation"): {
"account_type": "Accumulated Depreciation",
"account_number": "1780",
"account_category": "Tangible Assets",
},
_("CWIP Account"): {
"account_type": "Capital Work in Progress",
"account_number": "1790",
"account_category": "Tangible Assets",
},
_("CWIP Account"): {"account_type": "Capital Work in Progress", "account_number": "1790"},
"account_number": "1700",
},
_("Investments"): {"is_group": 1, "account_number": "1800"},
_("Investments"): {
"is_group": 1,
"account_number": "1800",
"account_category": "Long-term Investments",
},
_("Temporary Accounts"): {
_("Temporary Opening"): {"account_type": "Temporary", "account_number": "1910"},
_("Temporary Opening"): {
"account_type": "Temporary",
"account_number": "1910",
"account_category": "Other Non-current Assets",
},
"account_number": "1900",
},
"root_type": "Asset",
@@ -61,42 +140,94 @@ def get():
_("Expenses"): {
_("Direct Expenses"): {
_("Stock Expenses"): {
_("Cost of Goods Sold"): {"account_type": "Cost of Goods Sold", "account_number": "5111"},
_("Cost of Goods Sold"): {
"account_type": "Cost of Goods Sold",
"account_number": "5111",
"account_category": "Cost of Goods Sold",
},
_("Expenses Included In Asset Valuation"): {
"account_type": "Expenses Included In Asset Valuation",
"account_number": "5112",
"account_category": "Other Direct Costs",
},
_("Expenses Included In Valuation"): {
"account_type": "Expenses Included In Valuation",
"account_number": "5118",
"account_category": "Other Direct Costs",
},
_("Stock Adjustment"): {
"account_type": "Stock Adjustment",
"account_number": "5119",
"account_category": "Other Direct Costs",
},
_("Stock Adjustment"): {"account_type": "Stock Adjustment", "account_number": "5119"},
"account_number": "5110",
},
"account_number": "5100",
},
_("Indirect Expenses"): {
_("Administrative Expenses"): {"account_number": "5201"},
_("Commission on Sales"): {"account_number": "5202"},
_("Depreciation"): {"account_type": "Depreciation", "account_number": "5203"},
_("Entertainment Expenses"): {"account_number": "5204"},
_("Freight and Forwarding Charges"): {"account_type": "Chargeable", "account_number": "5205"},
_("Legal Expenses"): {"account_number": "5206"},
_("Marketing Expenses"): {"account_type": "Chargeable", "account_number": "5207"},
_("Office Maintenance Expenses"): {"account_number": "5208"},
_("Office Rent"): {"account_number": "5209"},
_("Postal Expenses"): {"account_number": "5210"},
_("Print and Stationery"): {"account_number": "5211"},
_("Round Off"): {"account_type": "Round Off", "account_number": "5212"},
_("Salary"): {"account_number": "5213"},
_("Sales Expenses"): {"account_number": "5214"},
_("Telephone Expenses"): {"account_number": "5215"},
_("Travel Expenses"): {"account_number": "5216"},
_("Utility Expenses"): {"account_number": "5217"},
_("Write Off"): {"account_number": "5218"},
_("Exchange Gain/Loss"): {"account_number": "5219"},
_("Gain/Loss on Asset Disposal"): {"account_number": "5220"},
_("Miscellaneous Expenses"): {"account_type": "Chargeable", "account_number": "5221"},
_("Administrative Expenses"): {
"account_number": "5201",
"account_category": "Operating Expenses",
},
_("Commission on Sales"): {
"account_number": "5202",
"account_category": "Operating Expenses",
},
_("Depreciation"): {
"account_type": "Depreciation",
"account_number": "5203",
"account_category": "Operating Expenses",
},
_("Entertainment Expenses"): {
"account_number": "5204",
"account_category": "Operating Expenses",
},
_("Freight and Forwarding Charges"): {
"account_type": "Chargeable",
"account_number": "5205",
"account_category": "Operating Expenses",
},
_("Legal Expenses"): {"account_number": "5206", "account_category": "Operating Expenses"},
_("Marketing Expenses"): {
"account_type": "Chargeable",
"account_number": "5207",
"account_category": "Operating Expenses",
},
_("Office Maintenance Expenses"): {
"account_number": "5208",
"account_category": "Operating Expenses",
},
_("Office Rent"): {"account_number": "5209", "account_category": "Operating Expenses"},
_("Postal Expenses"): {"account_number": "5210", "account_category": "Operating Expenses"},
_("Print and Stationery"): {
"account_number": "5211",
"account_category": "Operating Expenses",
},
_("Round Off"): {
"account_type": "Round Off",
"account_number": "5212",
"account_category": "Operating Expenses",
},
_("Salary"): {"account_number": "5213", "account_category": "Operating Expenses"},
_("Sales Expenses"): {"account_number": "5214", "account_category": "Operating Expenses"},
_("Telephone Expenses"): {"account_number": "5215", "account_category": "Operating Expenses"},
_("Travel Expenses"): {"account_number": "5216", "account_category": "Operating Expenses"},
_("Utility Expenses"): {"account_number": "5217", "account_category": "Operating Expenses"},
_("Write Off"): {"account_number": "5218", "account_category": "Operating Expenses"},
_("Exchange Gain/Loss"): {"account_number": "5219", "account_category": "Operating Expenses"},
_("Interest Expense"): {"account_number": "5220", "account_category": "Finance Costs"},
_("Bank Charges"): {"account_number": "5221", "account_category": "Finance Costs"},
_("Gain/Loss on Asset Disposal"): {
"account_number": "5222",
"account_category": "Other Operating Income",
},
_("Miscellaneous Expenses"): {
"account_type": "Chargeable",
"account_number": "5223",
"account_category": "Operating Expenses",
},
_("Impairment"): {"account_number": "5224", "account_category": "Operating Expenses"},
_("Tax Expense"): {"account_number": "5225", "account_category": "Tax Expense"},
"account_number": "5200",
},
"root_type": "Expense",
@@ -104,54 +235,126 @@ def get():
},
_("Income"): {
_("Direct Income"): {
_("Sales"): {"account_number": "4110"},
_("Service"): {"account_number": "4120"},
_("Sales"): {"account_number": "4110", "account_category": "Revenue from Operations"},
_("Service"): {"account_number": "4120", "account_category": "Revenue from Operations"},
"account_number": "4100",
},
_("Indirect Income"): {"is_group": 1, "account_number": "4200"},
_("Indirect Income"): {
_("Interest Income"): {"account_number": "4210", "account_category": "Investment Income"},
_("Interest on Fixed Deposits"): {
"account_number": "4220",
"account_category": "Investment Income",
},
"is_group": 1,
"account_number": "4200",
},
"root_type": "Income",
"account_number": "4000",
},
_("Source of Funds (Liabilities)"): {
_("Current Liabilities"): {
_("Accounts Payable"): {
_("Creditors"): {"account_type": "Payable", "account_number": "2110"},
_("Payroll Payable"): {"account_number": "2120"},
_("Creditors"): {
"account_type": "Payable",
"account_number": "2110",
"account_category": "Trade Payables",
},
_("Payroll Payable"): {"account_number": "2120", "account_category": "Other Payables"},
"account_number": "2100",
},
_("Accrued Expenses"): {
"account_number": "2150",
"account_category": "Other Current Liabilities",
},
_("Customer Advances"): {
"account_number": "2160",
"account_category": "Other Current Liabilities",
},
_("Stock Liabilities"): {
_("Stock Received But Not Billed"): {
"account_type": "Stock Received But Not Billed",
"account_number": "2210",
"account_category": "Trade Payables",
},
_("Asset Received But Not Billed"): {
"account_type": "Asset Received But Not Billed",
"account_number": "2211",
"account_category": "Trade Payables",
},
"account_number": "2200",
},
_("Duties and Taxes"): {
_("TDS Payable"): {"account_number": "2310"},
_("TDS Payable"): {
"account_number": "2310",
"account_category": "Current Tax Liabilities",
},
"account_type": "Tax",
"is_group": 1,
"account_number": "2300",
"account_category": "Current Tax Liabilities",
},
_("Short-term Provisions"): {
"account_number": "2350",
"account_category": "Short-term Provisions",
},
_("Loans (Liabilities)"): {
_("Secured Loans"): {"account_number": "2410"},
_("Unsecured Loans"): {"account_number": "2420"},
_("Bank Overdraft Account"): {"account_number": "2430"},
_("Secured Loans"): {
"account_number": "2410",
"account_category": "Long-term Borrowings",
},
_("Unsecured Loans"): {
"account_number": "2420",
"account_category": "Long-term Borrowings",
},
_("Bank Overdraft Account"): {
"account_number": "2430",
"account_category": "Short-term Borrowings",
},
"account_number": "2400",
},
"account_number": "2100-2400",
},
_("Non-Current Liabilities"): {
_("Long-term Provisions"): {
"account_number": "2510",
"account_category": "Long-term Provisions",
},
_("Employee Benefits Obligation"): {
"account_number": "2520",
"account_category": "Other Non-current Liabilities",
},
"is_group": 1,
"account_number": "2500",
},
"root_type": "Liability",
"account_number": "2000",
},
_("Equity"): {
_("Capital Stock"): {"account_type": "Equity", "account_number": "3100"},
_("Dividends Paid"): {"account_type": "Equity", "account_number": "3200"},
_("Opening Balance Equity"): {"account_type": "Equity", "account_number": "3300"},
_("Retained Earnings"): {"account_type": "Equity", "account_number": "3400"},
_("Capital Stock"): {
"account_type": "Equity",
"account_number": "3100",
"account_category": "Share Capital",
},
_("Dividends Paid"): {
"account_type": "Equity",
"account_number": "3200",
"account_category": "Reserves and Surplus",
},
_("Opening Balance Equity"): {
"account_type": "Equity",
"account_number": "3300",
"account_category": "Reserves and Surplus",
},
_("Retained Earnings"): {
"account_type": "Equity",
"account_number": "3400",
"account_category": "Reserves and Surplus",
},
_("Revaluation Surplus"): {
"account_type": "Equity",
"account_number": "3500",
"account_category": "Reserves and Surplus",
},
"root_type": "Equity",
"account_number": "3000",
},

View File

@@ -0,0 +1,8 @@
// Copyright (c) 2025, Frappe Technologies Pvt. Ltd. and contributors
// For license information, please see license.txt
// frappe.ui.form.on("Account Category", {
// refresh(frm) {
// },
// });

View File

@@ -0,0 +1,71 @@
{
"actions": [],
"allow_rename": 1,
"autoname": "field:account_category_name",
"creation": "2025-08-02 06:22:31.835063",
"doctype": "DocType",
"engine": "InnoDB",
"field_order": [
"account_category_name",
"description"
],
"fields": [
{
"fieldname": "account_category_name",
"fieldtype": "Data",
"in_list_view": 1,
"label": "Account Category Name",
"reqd": 1,
"unique": 1
},
{
"fieldname": "description",
"fieldtype": "Small Text",
"label": "Description"
}
],
"grid_page_length": 50,
"index_web_pages_for_search": 1,
"links": [],
"modified": "2025-10-15 03:19:47.171349",
"modified_by": "Administrator",
"module": "Accounts",
"name": "Account Category",
"naming_rule": "By fieldname",
"owner": "Administrator",
"permissions": [
{
"create": 1,
"delete": 1,
"email": 1,
"export": 1,
"print": 1,
"read": 1,
"report": 1,
"role": "Accounts User",
"share": 1,
"write": 1
},
{
"create": 1,
"delete": 1,
"email": 1,
"export": 1,
"print": 1,
"read": 1,
"report": 1,
"role": "Accounts Manager",
"share": 1,
"write": 1
},
{
"read": 1,
"role": "Auditor"
}
],
"row_format": "Dynamic",
"search_fields": "account_category_name, description",
"sort_field": "creation",
"sort_order": "DESC",
"states": []
}

View File

@@ -0,0 +1,94 @@
# Copyright (c) 2025, Frappe Technologies Pvt. Ltd. and contributors
# For license information, please see license.txt
import json
import os
import frappe
from frappe import _
from frappe.model.document import Document, bulk_insert
DOCTYPE = "Account Category"
class AccountCategory(Document):
# begin: auto-generated types
# This code is auto-generated. Do not modify anything in this block.
from typing import TYPE_CHECKING
if TYPE_CHECKING:
from frappe.types import DF
account_category_name: DF.Data
description: DF.SmallText | None
# end: auto-generated types
def after_rename(self, old_name, new_name, merge):
from erpnext.accounts.doctype.financial_report_template.financial_report_engine import (
FormulaFieldUpdater,
)
# get all template rows with this account category being used
row = frappe.qb.DocType("Financial Report Row")
rows = frappe._dict(
frappe.qb.from_(row)
.select(row.name, row.calculation_formula)
.where(row.calculation_formula.like(f"%{old_name}%"))
.run()
)
if not rows:
return
# Update formulas with new name
updater = FormulaFieldUpdater(
field_name="account_category",
value_mapping={old_name: new_name},
exclude_operators=["like", "not like"],
)
updated_formulas = updater.update_in_rows(rows)
if updated_formulas:
frappe.msgprint(
_("Updated {0} Financial Report Row(s) with new category name").format(len(updated_formulas))
)
def import_account_categories(template_path: str):
categories_file = os.path.join(template_path, "account_categories.json")
if not os.path.exists(categories_file):
return
with open(categories_file) as f:
categories = json.load(f, object_hook=frappe._dict)
create_account_categories(categories)
def create_account_categories(categories: list[dict]):
if not categories:
return
existing_categories = set(frappe.get_all(DOCTYPE, pluck="name"))
new_categories = []
for category_data in categories:
category_name = category_data.get("account_category_name")
if not category_name or category_name in existing_categories:
continue
doc = frappe.get_doc(
{
**category_data,
"doctype": DOCTYPE,
"name": category_name,
}
)
new_categories.append(doc)
existing_categories.add(category_name)
if new_categories:
bulk_insert(DOCTYPE, new_categories)

View File

@@ -0,0 +1,20 @@
# Copyright (c) 2025, Frappe Technologies Pvt. Ltd. and Contributors
# See license.txt
# import frappe
from frappe.tests import IntegrationTestCase
# On IntegrationTestCase, the doctype test records and all
# link-field test record dependencies are recursively loaded
# Use these module variables to add/remove to/from that list
EXTRA_TEST_RECORD_DEPENDENCIES = [] # eg. ["User"]
IGNORE_TEST_RECORD_DEPENDENCIES = [] # eg. ["User"]
class IntegrationTestAccountCategory(IntegrationTestCase):
"""
Integration tests for AccountCategory.
Use this class for testing interactions between multiple components.
"""
pass

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,
@@ -311,8 +309,8 @@ def get_dimensions(with_cost_center_and_project=False):
if with_cost_center_and_project:
dimension_filters.extend(
[
{"fieldname": "cost_center", "document_type": "Cost Center"},
{"fieldname": "project", "document_type": "Project"},
frappe._dict({"fieldname": "cost_center", "document_type": "Cost Center"}),
frappe._dict({"fieldname": "project", "document_type": "Project"}),
]
)

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,8 @@
"end_date",
"column_break_4",
"company",
"disabled",
"exempted_role",
"section_break_7",
"closed_documents"
],
@@ -49,6 +51,13 @@
"options": "Company",
"reqd": 1
},
{
"default": "0",
"fieldname": "disabled",
"fieldtype": "Check",
"in_list_view": 1,
"label": "Disabled"
},
{
"fieldname": "section_break_7",
"fieldtype": "Section Break"
@@ -59,13 +68,22 @@
"label": "Closed Documents",
"options": "Closed Document",
"reqd": 1
},
{
"description": "Role allowed to bypass period restrictions.",
"fieldname": "exempted_role",
"fieldtype": "Link",
"label": "Exempted Role",
"link_filters": "[[\"Role\",\"disabled\",\"=\",0]]",
"options": "Role"
}
],
"links": [],
"modified": "2024-03-27 13:05:57.388109",
"modified": "2025-12-01 16:53:44.631299",
"modified_by": "Administrator",
"module": "Accounts",
"name": "Accounting Period",
"naming_rule": "By fieldname",
"owner": "Administrator",
"permissions": [
{
@@ -105,8 +123,9 @@
"write": 1
}
],
"row_format": "Dynamic",
"sort_field": "creation",
"sort_order": "DESC",
"states": [],
"track_changes": 1
}
}

View File

@@ -28,7 +28,9 @@ class AccountingPeriod(Document):
closed_documents: DF.Table[ClosedDocument]
company: DF.Link
disabled: DF.Check
end_date: DF.Date
exempted_role: DF.Link | None
period_name: DF.Data
start_date: DF.Date
# end: auto-generated types
@@ -112,10 +114,11 @@ def validate_accounting_period_on_doc_save(doc, method=None):
accounting_period = (
frappe.qb.from_(ap)
.from_(cd)
.select(ap.name)
.select(ap.name, ap.exempted_role)
.where(
(ap.name == cd.parent)
& (ap.company == doc.company)
& (ap.disabled == 0)
& (cd.closed == 1)
& (cd.document_type == doc.doctype)
& (date >= ap.start_date)
@@ -124,6 +127,11 @@ def validate_accounting_period_on_doc_save(doc, method=None):
).run(as_dict=1)
if accounting_period:
if (
accounting_period[0].get("exempted_role")
and accounting_period[0].get("exempted_role") in frappe.get_roles()
):
return
frappe.throw(
_("You cannot create a {0} within the closed Accounting Period {1}").format(
doc.doctype, frappe.bold(accounting_period[0]["name"])

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",
@@ -72,12 +73,12 @@
"calculate_depr_using_total_days",
"column_break_gjcc",
"book_asset_depreciation_entry_automatically",
"role_to_notify_on_depreciation_failure",
"closing_settings_tab",
"period_closing_settings_section",
"acc_frozen_upto",
"ignore_account_closing_balance",
"use_legacy_controller_for_pcv",
"column_break_25",
"frozen_accounts_modifier",
"tab_break_dpet",
"show_balance_in_coa",
"banking_tab",
@@ -97,24 +98,9 @@
"payment_request_settings",
"create_pr_in_draft_status",
"budget_settings",
"use_new_budget_controller"
"use_legacy_budget_controller"
],
"fields": [
{
"description": "Accounting entries are frozen up to this date. Nobody can create or modify entries except users with the role specified below",
"fieldname": "acc_frozen_upto",
"fieldtype": "Date",
"in_list_view": 1,
"label": "Accounts Frozen Till Date"
},
{
"description": "Users with this role are allowed to set frozen accounts and create / modify accounting entries against frozen accounts",
"fieldname": "frozen_accounts_modifier",
"fieldtype": "Link",
"in_list_view": 1,
"label": "Role Allowed to Set Frozen Accounts and Edit Frozen Entries",
"options": "Role"
},
{
"default": "Billing Address",
"description": "Address used to determine Tax Category in transactions",
@@ -597,12 +583,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 +624,31 @@
"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"
},
{
"default": "1",
"fieldname": "use_legacy_controller_for_pcv",
"fieldtype": "Check",
"label": "Use Legacy Controller For Period Closing Voucher"
},
{
"description": "Users with this role will be notified if the asset depreciation gets failed",
"fieldname": "role_to_notify_on_depreciation_failure",
"fieldtype": "Link",
"label": "Role to Notify on Depreciation Failure",
"options": "Role"
}
],
"grid_page_length": 50,
@@ -652,7 +657,7 @@
"index_web_pages_for_search": 1,
"issingle": 1,
"links": [],
"modified": "2025-06-23 15:55:33.346398",
"modified": "2025-12-03 20:42:13.238050",
"modified_by": "Administrator",
"module": "Accounts",
"name": "Accounts Settings",

View File

@@ -11,7 +11,6 @@ from frappe.model.document import Document
from frappe.utils import cint
from erpnext.accounts.utils import sync_auto_reconcile_config
from erpnext.stock.utils import check_pending_reposting
class AccountsSettings(Document):
@@ -23,7 +22,6 @@ class AccountsSettings(Document):
if TYPE_CHECKING:
from frappe.types import DF
acc_frozen_upto: DF.Date | None
add_taxes_from_item_tax_template: DF.Check
add_taxes_from_taxes_and_charges_template: DF.Check
allow_multi_currency_invoices_against_single_party_account: DF.Check
@@ -49,7 +47,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"]
frozen_accounts_modifier: DF.Link | None
fetch_valuation_rate_for_internal_transaction: DF.Check
general_ledger_remarks_length: DF.Int
ignore_account_closing_balance: DF.Check
ignore_is_opening_check_for_reporting: DF.Check
@@ -63,6 +61,7 @@ class AccountsSettings(Document):
receivable_payable_remarks_length: DF.Int
reconciliation_queue_size: DF.Int
role_allowed_to_over_bill: DF.Link | None
role_to_notify_on_depreciation_failure: DF.Link | None
role_to_override_stop_action: DF.Link | None
round_row_wise_tax: DF.Check
show_balance_in_coa: DF.Check
@@ -73,7 +72,8 @@ 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
use_legacy_controller_for_pcv: DF.Check
# end: auto-generated types
def validate(self):
@@ -98,9 +98,6 @@ class AccountsSettings(Document):
if old_doc.show_payment_schedule_in_print != self.show_payment_schedule_in_print:
self.enable_payment_schedule_in_print()
if old_doc.acc_frozen_upto != self.acc_frozen_upto:
self.validate_pending_reposts()
if clear_cache:
frappe.clear_cache()
@@ -127,10 +124,6 @@ class AccountsSettings(Document):
validate_fields_for_doctype=False,
)
def validate_pending_reposts(self):
if self.acc_frozen_upto:
check_pending_reposting(self.acc_frozen_upto)
def validate_and_sync_auto_reconcile_config(self):
if self.has_value_changed("auto_reconciliation_job_trigger"):
if (
@@ -159,6 +152,5 @@ class AccountsSettings(Document):
def drop_ar_sql_procedures(self):
from erpnext.accounts.report.accounts_receivable.accounts_receivable import InitSQLProceduresForAR
frappe.db.sql(f"drop function if exists {InitSQLProceduresForAR.genkey_function_name}")
frappe.db.sql(f"drop procedure if exists {InitSQLProceduresForAR.init_procedure_name}")
frappe.db.sql(f"drop procedure if exists {InitSQLProceduresForAR.allocate_procedure_name}")

View File

@@ -1,11 +1,16 @@
frappe.ui.form.on("Accounts Settings", {
refresh: function (frm) {
frm.set_df_property("acc_frozen_upto", "label", "Books Closed Through");
frm.set_df_property(
"frozen_accounts_modifier",
"label",
"Role Allowed to Close Books & Make Changes to Closed Periods"
);
frm.set_df_property("credit_controller", "label", "Credit Manager");
},
});
frappe.ui.form.on("Company", {
refresh: function (frm) {
frm.set_df_property("accounts_frozen_till_date", "label", "Books Closed Through");
frm.set_df_property(
"role_allowed_for_frozen_entries",
"label",
"Role Allowed to Close Books & Make Changes to Closed Periods"
);
},
});

View File

@@ -1,8 +1,9 @@
// Copyright (c) 2024, Frappe Technologies Pvt. Ltd. and contributors
// For license information, please see license.txt
// frappe.ui.form.on("Advance Payment Ledger Entry", {
// refresh(frm) {
// },
// });
frappe.ui.form.on("Advance Payment Ledger Entry", {
refresh(frm) {
frm.set_currency_labels(["amount"], frm.doc.currency);
frm.set_currency_labels(["base_amount"], erpnext.get_currency(frm.doc.company));
},
});

View File

@@ -10,9 +10,12 @@
"voucher_no",
"against_voucher_type",
"against_voucher_no",
"amount",
"currency",
"event"
"exchange_rate",
"amount",
"base_amount",
"event",
"delinked"
],
"fields": [
{
@@ -68,12 +71,36 @@
"label": "Company",
"options": "Company",
"read_only": 1
},
{
"default": "0",
"fieldname": "delinked",
"fieldtype": "Check",
"label": "DeLinked",
"read_only": 1
},
{
"depends_on": "base_amount",
"fieldname": "base_amount",
"fieldtype": "Currency",
"label": "Amount (Company Currency)",
"options": "Company:company:default_currency",
"read_only": 1
},
{
"depends_on": "exchange_rate",
"fieldname": "exchange_rate",
"fieldtype": "Float",
"label": "Exchange Rate",
"precision": "9",
"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-11-13 12:45:03.014555",
"modified_by": "Administrator",
"module": "Accounts",
"name": "Advance Payment Ledger Entry",
@@ -107,7 +134,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
@@ -17,11 +19,32 @@ class AdvancePaymentLedgerEntry(Document):
against_voucher_no: DF.DynamicLink | None
against_voucher_type: DF.Link | None
amount: DF.Currency
base_amount: DF.Currency
company: DF.Link | None
currency: DF.Link | None
delinked: DF.Check
event: DF.Data | None
exchange_rate: DF.Float
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

@@ -9,13 +9,6 @@ cur_frm.add_fetch("bank", "swift_number", "swift_number");
frappe.ui.form.on("Bank Guarantee", {
setup: function (frm) {
frm.set_query("bank", function () {
return {
filters: {
company: frm.doc.company,
},
};
});
frm.set_query("bank_account", function () {
return {
filters: {

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

@@ -14,6 +14,7 @@ import openpyxl
from frappe import _
from frappe.core.doctype.data_import.data_import import DataImport
from frappe.core.doctype.data_import.importer import Importer, ImportFile
from frappe.query_builder.functions import Count
from frappe.utils.background_jobs import enqueue
from frappe.utils.file_manager import get_file, save_file
from frappe.utils.xlsxutils import ILLEGAL_CHARACTERS_RE, handle_html
@@ -111,20 +112,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 +284,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 +296,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 +313,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 +323,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:
@@ -333,7 +372,7 @@ def get_import_status(docname):
logs = frappe.get_all(
"Data Import Log",
fields=["count(*) as count", "success"],
fields=[{"COUNT": "*", "as": "count"}, "success"],
filters={"data_import": docname},
group_by="success",
)

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

@@ -38,7 +38,10 @@
"column_break_3czf",
"bank_party_name",
"bank_party_account_number",
"bank_party_iban"
"bank_party_iban",
"extended_bank_statement_section",
"included_fee",
"excluded_fee"
],
"fields": [
{
@@ -116,15 +119,14 @@
{
"allow_on_submit": 1,
"fieldname": "reference_number",
"fieldtype": "Data",
"fieldtype": "Small Text",
"label": "Reference Number"
},
{
"fieldname": "transaction_id",
"fieldtype": "Data",
"label": "Transaction ID",
"read_only": 1,
"unique": 1
"read_only": 1
},
{
"allow_on_submit": 1,
@@ -223,7 +225,8 @@
{
"fieldname": "bank_party_iban",
"fieldtype": "Data",
"label": "Party IBAN (Bank Statement)"
"label": "Party IBAN (Bank Statement)",
"options": "IBAN"
},
{
"fieldname": "bank_party_account_number",
@@ -233,12 +236,32 @@
{
"fieldname": "column_break_oufv",
"fieldtype": "Column Break"
},
{
"fieldname": "extended_bank_statement_section",
"fieldtype": "Section Break",
"label": "Extended Bank Statement"
},
{
"fieldname": "included_fee",
"fieldtype": "Currency",
"label": "Included Fee",
"non_negative": 1,
"options": "currency"
},
{
"description": "On save, the Excluded Fee will be converted to an Included Fee.",
"fieldname": "excluded_fee",
"fieldtype": "Currency",
"label": "Excluded Fee",
"non_negative": 1,
"options": "currency"
}
],
"grid_page_length": 50,
"is_submittable": 1,
"links": [],
"modified": "2025-06-18 17:24:57.044666",
"modified": "2025-12-07 20:49:18.600757",
"modified_by": "Administrator",
"module": "Accounts",
"name": "Bank Transaction",

View File

@@ -32,11 +32,13 @@ class BankTransaction(Document):
date: DF.Date | None
deposit: DF.Currency
description: DF.SmallText | None
excluded_fee: DF.Currency
included_fee: DF.Currency
naming_series: DF.Literal["ACC-BTN-.YYYY.-"]
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
@@ -45,9 +47,11 @@ class BankTransaction(Document):
# end: auto-generated types
def before_validate(self):
self.handle_excluded_fee()
self.update_allocated_amount()
def validate(self):
self.validate_included_fee()
self.validate_duplicate_references()
self.validate_currency()
@@ -307,6 +311,40 @@ class BankTransaction(Document):
self.party_type, self.party = result
def validate_included_fee(self):
"""
The included_fee is only handled for withdrawals. An included_fee for a deposit, is not credited to the account and is
therefore outside of the deposit value and can be larger than the deposit itself.
"""
if self.included_fee and self.withdrawal:
if self.included_fee > self.withdrawal:
frappe.throw(_("Included fee is bigger than the withdrawal itself."))
def handle_excluded_fee(self):
# Include the excluded fee on validate to handle all further processing the same
excluded_fee = flt(self.excluded_fee)
if excluded_fee <= 0:
return
# Suppress a negative deposit (aka withdrawal), likely not intendend
if flt(self.deposit) > 0 and (flt(self.deposit) - excluded_fee) < 0:
frappe.throw(_("The Excluded Fee is bigger than the Deposit it is deducted from."))
# Enforce directionality
if flt(self.deposit) > 0 and flt(self.withdrawal) > 0:
frappe.throw(
_("Only one of Deposit or Withdrawal should be non-zero when applying an Excluded Fee.")
)
if flt(self.deposit) > 0:
self.deposit = flt(self.deposit) - excluded_fee
# A fee applied to deposit and withdrawal equal 0 become a withdrawal
elif flt(self.withdrawal) >= 0:
self.withdrawal = flt(self.withdrawal) + excluded_fee
self.included_fee = flt(self.included_fee) + excluded_fee
self.excluded_fee = 0
@frappe.whitelist()
def get_doctypes_for_bank_reconciliation():

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

@@ -0,0 +1,133 @@
# Copyright (c) 2025, Frappe Technologies Pvt. Ltd. and Contributors
# See license.txt
import frappe
from frappe.tests import UnitTestCase
class TestBankTransactionFees(UnitTestCase):
def test_included_fee_throws(self):
"""A fee that's part of a withdrawal cannot be bigger than the
withdrawal itself."""
bt = frappe.new_doc("Bank Transaction")
bt.withdrawal = 100
bt.included_fee = 101
self.assertRaises(frappe.ValidationError, bt.validate_included_fee)
def test_included_fee_allows_equal(self):
"""A fee that's part of a withdrawal may be equal to the withdrawal
amount (only the fee was deducted from the account)."""
bt = frappe.new_doc("Bank Transaction")
bt.withdrawal = 100
bt.included_fee = 100
bt.validate_included_fee()
def test_included_fee_allows_for_deposit(self):
"""For deposits, a fee may be recorded separately without limiting the
received amount."""
bt = frappe.new_doc("Bank Transaction")
bt.deposit = 10
bt.included_fee = 999
bt.validate_included_fee()
def test_excluded_fee_noop_when_zero(self):
"""When there is no excluded fee to apply, the amounts should remain
unchanged."""
bt = frappe.new_doc("Bank Transaction")
bt.deposit = 100
bt.withdrawal = 0
bt.included_fee = 5
bt.excluded_fee = 0
bt.handle_excluded_fee()
self.assertEqual(bt.deposit, 100)
self.assertEqual(bt.withdrawal, 0)
self.assertEqual(bt.included_fee, 5)
self.assertEqual(bt.excluded_fee, 0)
def test_excluded_fee_throws_when_exceeds_deposit(self):
"""A fee deducted from an incoming payment must not exceed the incoming
amount (else it would be a withdrawal, a conversion we don't support)."""
bt = frappe.new_doc("Bank Transaction")
bt.deposit = 10
bt.excluded_fee = 11
self.assertRaises(frappe.ValidationError, bt.handle_excluded_fee)
def test_excluded_fee_throws_when_both_deposit_and_withdrawal_are_set(self):
"""A transaction must be either incoming or outgoing when applying a
fee, not both."""
bt = frappe.new_doc("Bank Transaction")
bt.deposit = 10
bt.withdrawal = 10
bt.excluded_fee = 1
self.assertRaises(frappe.ValidationError, bt.handle_excluded_fee)
def test_excluded_fee_deducts_from_deposit(self):
"""When a fee is deducted from an incoming payment, the net received
amount decreases and the fee is tracked as included."""
bt = frappe.new_doc("Bank Transaction")
bt.deposit = 100
bt.withdrawal = 0
bt.included_fee = 2
bt.excluded_fee = 5
bt.handle_excluded_fee()
self.assertEqual(bt.deposit, 95)
self.assertEqual(bt.withdrawal, 0)
self.assertEqual(bt.included_fee, 7)
self.assertEqual(bt.excluded_fee, 0)
def test_excluded_fee_can_reduce_an_incoming_payment_to_zero(self):
"""A separately-deducted fee may reduce an incoming payment to zero,
while still tracking the fee."""
bt = frappe.new_doc("Bank Transaction")
bt.deposit = 5
bt.withdrawal = 0
bt.included_fee = 0
bt.excluded_fee = 5
bt.handle_excluded_fee()
self.assertEqual(bt.deposit, 0)
self.assertEqual(bt.withdrawal, 0)
self.assertEqual(bt.included_fee, 5)
self.assertEqual(bt.excluded_fee, 0)
def test_excluded_fee_increases_outgoing_payment(self):
"""When a separately-deducted fee is provided for an outgoing payment,
the total money leaving increases and the fee is tracked."""
bt = frappe.new_doc("Bank Transaction")
bt.deposit = 0
bt.withdrawal = 100
bt.included_fee = 2
bt.excluded_fee = 5
bt.handle_excluded_fee()
self.assertEqual(bt.deposit, 0)
self.assertEqual(bt.withdrawal, 105)
self.assertEqual(bt.included_fee, 7)
self.assertEqual(bt.excluded_fee, 0)
def test_excluded_fee_turns_zero_amount_into_withdrawal(self):
"""If only an excluded fee is provided, it should be treated as an
outgoing payment and the fee is then tracked as included."""
bt = frappe.new_doc("Bank Transaction")
bt.deposit = 0
bt.withdrawal = 0
bt.included_fee = 0
bt.excluded_fee = 5
bt.handle_excluded_fee()
self.assertEqual(bt.deposit, 0)
self.assertEqual(bt.withdrawal, 5)
self.assertEqual(bt.included_fee, 5)
self.assertEqual(bt.excluded_fee, 0)

View File

@@ -4,16 +4,6 @@ frappe.provide("erpnext.accounts.dimensions");
frappe.ui.form.on("Budget", {
onload: function (frm) {
frm.set_query("account", "accounts", function () {
return {
filters: {
company: frm.doc.company,
report_type: "Profit and Loss",
is_group: 0,
},
};
});
frm.set_query("monthly_distribution", function () {
return {
filters: {
@@ -22,16 +12,37 @@ frappe.ui.form.on("Budget", {
};
});
frm.set_query("account", function () {
return {
filters: {
is_group: 0,
company: frm.doc.company,
},
};
});
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();
}
});
},
refresh: function (frm) {
refresh: async function (frm) {
frm.trigger("toggle_reqd_fields");
if (!frm.doc.__islocal && frm.doc.docstatus == 1) {
frm.add_custom_button(
__("Revise Budget"),
function () {
frm.events.revise_budget_action(frm);
},
__("Actions")
);
}
toggle_distribution_fields(frm);
},
budget_against: function (frm) {
@@ -39,6 +50,20 @@ frappe.ui.form.on("Budget", {
frm.trigger("toggle_reqd_fields");
},
budget_amount(frm) {
if (frm.doc.budget_distribution?.length) {
frm.doc.budget_distribution.forEach((row) => {
row.amount = flt((row.percent / 100) * frm.doc.budget_amount, 2);
});
set_total_budget_amount(frm);
frm.refresh_field("budget_distribution");
}
},
distribute_equally: function (frm) {
toggle_distribution_fields(frm);
},
set_null_value: function (frm) {
if (frm.doc.budget_against == "Cost Center") {
frm.set_value("project", null);
@@ -51,4 +76,68 @@ frappe.ui.form.on("Budget", {
frm.toggle_reqd("cost_center", frm.doc.budget_against == "Cost Center");
frm.toggle_reqd("project", frm.doc.budget_against == "Project");
},
revise_budget_action: function (frm) {
frappe.confirm(
__(
"Are you sure you want to revise this budget? The current budget will be cancelled and a new draft will be created."
),
function () {
frappe.call({
method: "erpnext.accounts.doctype.budget.budget.revise_budget",
args: { budget_name: frm.doc.name },
callback: function (r) {
if (r.message) {
frappe.msgprint(__("New revised budget created successfully"));
frappe.set_route("Form", "Budget", r.message);
}
},
});
},
function () {
frappe.msgprint(__("Revision cancelled"));
}
);
},
});
frappe.ui.form.on("Budget Distribution", {
amount(frm, cdt, cdn) {
let row = frappe.get_doc(cdt, cdn);
if (frm.doc.budget_amount) {
row.percent = flt((row.amount / frm.doc.budget_amount) * 100, 2);
set_total_budget_amount(frm);
frm.refresh_field("budget_distribution");
}
},
percent(frm, cdt, cdn) {
let row = frappe.get_doc(cdt, cdn);
if (frm.doc.budget_amount) {
row.amount = flt((row.percent / 100) * frm.doc.budget_amount, 2);
set_total_budget_amount(frm);
frm.refresh_field("budget_distribution");
}
},
});
function set_total_budget_amount(frm) {
let total = 0;
(frm.doc.budget_distribution || []).forEach((row) => {
total += flt(row.amount);
});
frm.set_value("budget_distribution_total", total);
}
function toggle_distribution_fields(frm) {
const grid = frm.fields_dict.budget_distribution.grid;
["amount", "percent"].forEach((field) => {
grid.update_docfield_property(field, "read_only", frm.doc.distribute_equally);
});
grid.refresh();
}

View File

@@ -12,10 +12,23 @@
"company",
"cost_center",
"project",
"fiscal_year",
"account",
"column_break_3",
"monthly_distribution",
"amended_from",
"from_fiscal_year",
"to_fiscal_year",
"budget_start_date",
"budget_end_date",
"distribution_frequency",
"budget_amount",
"section_break_nwug",
"distribute_equally",
"section_break_fpdt",
"budget_distribution",
"section_break_wkqb",
"column_break_paum",
"column_break_nwor",
"budget_distribution_total",
"section_break_6",
"applicable_on_material_request",
"action_if_annual_budget_exceeded_on_mr",
@@ -32,8 +45,8 @@
"applicable_on_cumulative_expense",
"action_if_annual_exceeded_on_cumulative_expense",
"action_if_accumulated_monthly_exceeded_on_cumulative_expense",
"section_break_21",
"accounts"
"section_break_kkan",
"revision_of"
],
"fields": [
{
@@ -44,6 +57,7 @@
"in_standard_filter": 1,
"label": "Budget Against",
"options": "\nCost Center\nProject",
"read_only_depends_on": "eval: doc.revision_of",
"reqd": 1
},
{
@@ -53,6 +67,7 @@
"in_standard_filter": 1,
"label": "Company",
"options": "Company",
"read_only_depends_on": "eval: doc.revision_of",
"reqd": 1
},
{
@@ -62,7 +77,8 @@
"in_global_search": 1,
"in_standard_filter": 1,
"label": "Cost Center",
"options": "Cost Center"
"options": "Cost Center",
"read_only_depends_on": "eval: doc.revision_of"
},
{
"depends_on": "eval:doc.budget_against == 'Project'",
@@ -70,28 +86,13 @@
"fieldtype": "Link",
"in_standard_filter": 1,
"label": "Project",
"options": "Project"
},
{
"fieldname": "fiscal_year",
"fieldtype": "Link",
"in_list_view": 1,
"in_standard_filter": 1,
"label": "Fiscal Year",
"options": "Fiscal Year",
"reqd": 1
"options": "Project",
"read_only_depends_on": "eval: doc.revision_of"
},
{
"fieldname": "column_break_3",
"fieldtype": "Column Break"
},
{
"depends_on": "eval:in_list([\"Stop\", \"Warn\"], doc.action_if_accumulated_monthly_budget_exceeded_on_po || doc.action_if_accumulated_monthly_budget_exceeded_on_mr || doc.action_if_accumulated_monthly_budget_exceeded_on_actual)",
"fieldname": "monthly_distribution",
"fieldtype": "Link",
"label": "Monthly Distribution",
"options": "Monthly Distribution"
},
{
"fieldname": "amended_from",
"fieldtype": "Link",
@@ -187,22 +188,12 @@
"options": "\nStop\nWarn\nIgnore"
},
{
"fieldname": "section_break_21",
"fieldtype": "Section Break"
},
{
"fieldname": "accounts",
"fieldtype": "Table",
"label": "Budget Accounts",
"options": "Budget Account",
"reqd": 1
},
{
"default": "BUDGET-.########",
"fieldname": "naming_series",
"fieldtype": "Select",
"label": "Series",
"no_copy": 1,
"options": "BUDGET-.YYYY.-",
"options": "BUDGET-.########",
"print_hide": 1,
"reqd": 1,
"set_only_once": 1
@@ -232,13 +223,117 @@
"fieldtype": "Select",
"label": "Action if Accumulative Monthly Budget Exceeded on Cumulative Expense",
"options": "\nStop\nWarn\nIgnore"
},
{
"fieldname": "section_break_fpdt",
"fieldtype": "Section Break",
"hide_border": 1
},
{
"fieldname": "budget_distribution",
"fieldtype": "Table",
"label": "Budget Distribution",
"options": "Budget Distribution"
},
{
"fieldname": "account",
"fieldtype": "Link",
"in_list_view": 1,
"label": "Account",
"options": "Account",
"read_only_depends_on": "eval: doc.revision_of",
"reqd": 1
},
{
"fieldname": "budget_amount",
"fieldtype": "Currency",
"label": "Budget Amount",
"reqd": 1
},
{
"fieldname": "section_break_kkan",
"fieldtype": "Section Break"
},
{
"fieldname": "revision_of",
"fieldtype": "Data",
"label": "Revision Of",
"no_copy": 1,
"read_only": 1
},
{
"default": "1",
"fieldname": "distribute_equally",
"fieldtype": "Check",
"label": "Distribute Equally"
},
{
"fieldname": "section_break_nwug",
"fieldtype": "Section Break",
"hide_border": 1
},
{
"fieldname": "from_fiscal_year",
"fieldtype": "Link",
"label": "From Fiscal Year",
"options": "Fiscal Year",
"read_only_depends_on": "eval: doc.revision_of",
"reqd": 1
},
{
"fieldname": "to_fiscal_year",
"fieldtype": "Link",
"label": "To Fiscal Year",
"options": "Fiscal Year",
"read_only_depends_on": "eval: doc.revision_of",
"reqd": 1
},
{
"fieldname": "budget_start_date",
"fieldtype": "Date",
"hidden": 1,
"label": "Budget Start Date"
},
{
"fieldname": "budget_end_date",
"fieldtype": "Date",
"hidden": 1,
"label": "Budget End Date"
},
{
"default": "Monthly",
"fieldname": "distribution_frequency",
"fieldtype": "Select",
"label": "Distribution Frequency",
"options": "Monthly\nQuarterly\nHalf-Yearly\nYearly",
"read_only_depends_on": "eval: doc.revision_of",
"reqd": 1
},
{
"fieldname": "section_break_wkqb",
"fieldtype": "Section Break"
},
{
"fieldname": "column_break_paum",
"fieldtype": "Column Break"
},
{
"fieldname": "column_break_nwor",
"fieldtype": "Column Break"
},
{
"fieldname": "budget_distribution_total",
"fieldtype": "Currency",
"label": "Budget Distribution Total",
"no_copy": 1,
"read_only": 1
}
],
"grid_page_length": 50,
"index_web_pages_for_search": 1,
"is_submittable": 1,
"links": [],
"modified": "2025-06-16 15:57:13.114981",
"modified": "2025-12-10 02:35:01.197613",
"modified_by": "Administrator",
"module": "Accounts",
"name": "Budget",

File diff suppressed because it is too large Load Diff

View File

@@ -3,12 +3,14 @@
import unittest
import frappe
from frappe.utils import now_datetime, nowdate
from frappe.client import submit
from frappe.utils import add_days, flt, get_first_day, get_last_day, getdate, now_datetime, nowdate
from erpnext.accounts.doctype.budget.budget import (
BudgetError,
get_accumulated_monthly_budget,
get_actual_expense,
revise_budget,
)
from erpnext.accounts.doctype.journal_entry.test_journal_entry import make_journal_entry
from erpnext.accounts.utils import get_fiscal_year
@@ -24,12 +26,16 @@ 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)
self.company = "_Test Company"
self.fiscal_year = frappe.db.get_value("Fiscal Year", {}, "name")
self.account = "_Test Account Cost for Goods Sold - _TC"
self.cost_center = "_Test Cost Center - _TC"
def test_monthly_budget_crossed_ignore(self):
set_total_expense_zero(nowdate(), "cost_center")
budget = make_budget(budget_against="Cost Center")
budget = make_budget(budget_against="Cost Center", do_not_save=False, submit_budget=True)
jv = make_journal_entry(
"_Test Account Cost for Goods Sold - _TC",
@@ -50,12 +56,13 @@ class TestBudget(ERPNextTestSuite):
def test_monthly_budget_crossed_stop1(self):
set_total_expense_zero(nowdate(), "cost_center")
budget = make_budget(budget_against="Cost Center")
budget = make_budget(budget_against="Cost Center", do_not_save=False, submit_budget=True)
frappe.db.set_value("Budget", budget.name, "action_if_accumulated_monthly_budget_exceeded", "Stop")
accumulated_limit = get_accumulated_monthly_budget(
budget.monthly_distribution, nowdate(), budget.fiscal_year, budget.accounts[0].budget_amount
budget.name,
nowdate(),
)
jv = make_journal_entry(
"_Test Account Cost for Goods Sold - _TC",
@@ -73,13 +80,11 @@ class TestBudget(ERPNextTestSuite):
def test_exception_approver_role(self):
set_total_expense_zero(nowdate(), "cost_center")
budget = make_budget(budget_against="Cost Center")
budget = make_budget(budget_against="Cost Center", do_not_save=False, submit_budget=True)
frappe.db.set_value("Budget", budget.name, "action_if_accumulated_monthly_budget_exceeded", "Stop")
accumulated_limit = get_accumulated_monthly_budget(
budget.monthly_distribution, nowdate(), budget.fiscal_year, budget.accounts[0].budget_amount
)
accumulated_limit = get_accumulated_monthly_budget(budget.name, nowdate())
jv = make_journal_entry(
"_Test Account Cost for Goods Sold - _TC",
"_Test Bank - _TC",
@@ -107,16 +112,16 @@ class TestBudget(ERPNextTestSuite):
applicable_on_purchase_order=1,
action_if_accumulated_monthly_budget_exceeded_on_mr="Stop",
budget_against="Cost Center",
do_not_save=False,
submit_budget=True,
)
fiscal_year = get_fiscal_year(nowdate())[0]
frappe.db.set_value("Budget", budget.name, "action_if_accumulated_monthly_budget_exceeded", "Stop")
frappe.db.set_value("Budget", budget.name, "fiscal_year", fiscal_year)
accumulated_limit = get_accumulated_monthly_budget(
budget.monthly_distribution, nowdate(), budget.fiscal_year, budget.accounts[0].budget_amount
budget.name,
nowdate(),
)
mr = frappe.get_doc(
{
"doctype": "Material Request",
@@ -151,14 +156,15 @@ class TestBudget(ERPNextTestSuite):
applicable_on_purchase_order=1,
action_if_accumulated_monthly_budget_exceeded_on_po="Stop",
budget_against="Cost Center",
do_not_save=False,
submit_budget=True,
)
fiscal_year = get_fiscal_year(nowdate())[0]
frappe.db.set_value("Budget", budget.name, "action_if_accumulated_monthly_budget_exceeded", "Stop")
frappe.db.set_value("Budget", budget.name, "fiscal_year", fiscal_year)
accumulated_limit = get_accumulated_monthly_budget(
budget.monthly_distribution, nowdate(), budget.fiscal_year, budget.accounts[0].budget_amount
budget.name,
nowdate(),
)
po = create_purchase_order(
transaction_date=nowdate(), qty=1, rate=accumulated_limit + 1, do_not_submit=True
@@ -175,13 +181,14 @@ class TestBudget(ERPNextTestSuite):
def test_monthly_budget_crossed_stop2(self):
set_total_expense_zero(nowdate(), "project")
budget = make_budget(budget_against="Project")
budget = make_budget(budget_against="Project", do_not_save=False, submit_budget=True)
frappe.db.set_value("Budget", budget.name, "action_if_accumulated_monthly_budget_exceeded", "Stop")
project = frappe.get_value("Project", {"project_name": "_Test Project"})
accumulated_limit = get_accumulated_monthly_budget(
budget.monthly_distribution, nowdate(), budget.fiscal_year, budget.accounts[0].budget_amount
budget.name,
nowdate(),
)
jv = make_journal_entry(
"_Test Account Cost for Goods Sold - _TC",
@@ -200,7 +207,7 @@ class TestBudget(ERPNextTestSuite):
def test_yearly_budget_crossed_stop1(self):
set_total_expense_zero(nowdate(), "cost_center")
budget = make_budget(budget_against="Cost Center")
budget = make_budget(budget_against="Cost Center", do_not_save=False, submit_budget=True)
jv = make_journal_entry(
"_Test Account Cost for Goods Sold - _TC",
@@ -217,7 +224,7 @@ class TestBudget(ERPNextTestSuite):
def test_yearly_budget_crossed_stop2(self):
set_total_expense_zero(nowdate(), "project")
budget = make_budget(budget_against="Project")
budget = make_budget(budget_against="Project", do_not_save=False, submit_budget=True)
project = frappe.get_value("Project", {"project_name": "_Test Project"})
@@ -237,7 +244,7 @@ class TestBudget(ERPNextTestSuite):
def test_monthly_budget_on_cancellation1(self):
set_total_expense_zero(nowdate(), "cost_center")
budget = make_budget(budget_against="Cost Center")
budget = make_budget(budget_against="Cost Center", do_not_save=False, submit_budget=True)
month = now_datetime().month
if month > 9:
month = 9
@@ -266,7 +273,7 @@ class TestBudget(ERPNextTestSuite):
def test_monthly_budget_on_cancellation2(self):
set_total_expense_zero(nowdate(), "project")
budget = make_budget(budget_against="Project")
budget = make_budget(budget_against="Project", do_not_save=False, submit_budget=True)
month = now_datetime().month
if month > 9:
month = 9
@@ -298,11 +305,17 @@ class TestBudget(ERPNextTestSuite):
set_total_expense_zero(nowdate(), "cost_center")
set_total_expense_zero(nowdate(), "cost_center", "_Test Cost Center 2 - _TC")
budget = make_budget(budget_against="Cost Center", cost_center="_Test Company - _TC")
budget = make_budget(
budget_against="Cost Center",
cost_center="_Test Company - _TC",
do_not_save=False,
submit_budget=True,
)
frappe.db.set_value("Budget", budget.name, "action_if_accumulated_monthly_budget_exceeded", "Stop")
accumulated_limit = get_accumulated_monthly_budget(
budget.monthly_distribution, nowdate(), budget.fiscal_year, budget.accounts[0].budget_amount
budget.name,
nowdate(),
)
jv = make_journal_entry(
"_Test Account Cost for Goods Sold - _TC",
@@ -331,11 +344,14 @@ class TestBudget(ERPNextTestSuite):
}
).insert(ignore_permissions=True)
budget = make_budget(budget_against="Cost Center", cost_center=cost_center)
budget = make_budget(
budget_against="Cost Center", cost_center=cost_center, do_not_save=False, submit_budget=True
)
frappe.db.set_value("Budget", budget.name, "action_if_accumulated_monthly_budget_exceeded", "Stop")
accumulated_limit = get_accumulated_monthly_budget(
budget.monthly_distribution, nowdate(), budget.fiscal_year, budget.accounts[0].budget_amount
budget.name,
nowdate(),
)
jv = make_journal_entry(
"_Test Account Cost for Goods Sold - _TC",
@@ -372,7 +388,12 @@ class TestBudget(ERPNextTestSuite):
{"Sub Budget Cost Center 1 - _TC": 60, "Sub Budget Cost Center 2 - _TC": 40},
)
make_budget(budget_against="Cost Center", cost_center="Main Budget Cost Center 1 - _TC")
make_budget(
budget_against="Cost Center",
cost_center="Main Budget Cost Center 1 - _TC",
do_not_save=False,
submit_budget=True,
)
jv = make_journal_entry(
"_Test Account Cost for Goods Sold - _TC",
@@ -387,12 +408,15 @@ class TestBudget(ERPNextTestSuite):
def test_action_for_cumulative_limit(self):
set_total_expense_zero(nowdate(), "cost_center")
budget = make_budget(budget_against="Cost Center", applicable_on_cumulative_expense=True)
accumulated_limit = get_accumulated_monthly_budget(
budget.monthly_distribution, nowdate(), budget.fiscal_year, budget.accounts[0].budget_amount
budget = make_budget(
budget_against="Cost Center",
applicable_on_cumulative_expense=True,
do_not_save=False,
submit_budget=True,
)
accumulated_limit = get_accumulated_monthly_budget(budget.name, nowdate())
jv = make_journal_entry(
"_Test Account Cost for Goods Sold - _TC",
"_Test Bank - _TC",
@@ -422,6 +446,165 @@ class TestBudget(ERPNextTestSuite):
po.cancel()
jv.cancel()
def test_fiscal_year_validation(self):
frappe.get_doc(
{
"doctype": "Fiscal Year",
"year": "2100",
"year_start_date": "2100-04-01",
"year_end_date": "2101-03-31",
"companies": [{"company": "_Test Company"}],
}
).insert(ignore_permissions=True)
budget = make_budget(
budget_against="Cost Center",
from_fiscal_year="2100",
to_fiscal_year="2099",
do_not_save=True,
submit_budget=False,
)
with self.assertRaises(frappe.ValidationError):
budget.save()
def test_total_distribution_equals_budget(self):
budget = make_budget(
budget_against="Cost Center",
applicable_on_cumulative_expense=True,
distribute_equally=0,
budget_amount=12000,
do_not_save=False,
submit_budget=False,
)
for row in budget.budget_distribution:
row.amount = 2000
with self.assertRaises(frappe.ValidationError):
budget.save()
def test_evenly_distribute_budget(self):
budget = make_budget(
budget_against="Cost Center", budget_amount=120000, do_not_save=False, submit_budget=True
)
total = sum([d.amount for d in budget.budget_distribution])
self.assertEqual(flt(total), 120000)
self.assertTrue(all(d.amount == 10000 for d in budget.budget_distribution))
def test_create_revised_budget(self):
budget = make_budget(
budget_against="Cost Center", budget_amount=120000, do_not_save=False, submit_budget=True
)
revised_name = revise_budget(budget.name)
revised_budget = frappe.get_doc("Budget", revised_name)
self.assertNotEqual(budget.name, revised_budget.name)
self.assertEqual(revised_budget.budget_against, budget.budget_against)
self.assertEqual(revised_budget.budget_amount, budget.budget_amount)
old_budget = frappe.get_doc("Budget", budget.name)
self.assertEqual(old_budget.docstatus, 2)
def test_revision_preserves_distribution(self):
set_total_expense_zero(nowdate(), "cost_center", "_Test Cost Center - _TC")
budget = make_budget(
budget_against="Cost Center", budget_amount=120000, do_not_save=False, submit_budget=True
)
revised_name = revise_budget(budget.name)
revised_budget = frappe.get_doc("Budget", revised_name)
self.assertGreater(len(revised_budget.budget_distribution), 0)
total = sum(row.amount for row in revised_budget.budget_distribution)
self.assertEqual(total, revised_budget.budget_amount)
def test_manual_budget_amount_total(self):
budget = make_budget(
budget_against="Cost Center",
distribute_equally=0,
budget_amount=30000,
budget_start_date="2025-04-01",
budget_end_date="2025-06-30",
do_not_save=False,
submit_budget=False,
)
budget.budget_distribution = []
for row in [
{"start_date": "2025-04-01", "end_date": "2025-04-30", "amount": 10000, "percent": 33.33},
{"start_date": "2025-05-01", "end_date": "2025-05-31", "amount": 15000, "percent": 50.00},
{"start_date": "2025-06-01", "end_date": "2025-06-30", "amount": 5000, "percent": 16.67},
]:
budget.append("budget_distribution", row)
budget.save()
total_child_amount = sum(row.amount for row in budget.budget_distribution)
self.assertEqual(total_child_amount, budget.budget_amount)
def test_fiscal_year_company_mismatch(self):
budget = make_budget(budget_against="Cost Center", do_not_save=True, submit_budget=False)
fy = frappe.get_doc(
{
"doctype": "Fiscal Year",
"year": "2099",
"year_start_date": "2099-04-01",
"year_end_date": "2100-03-31",
"companies": [{"company": "_Test Company 2"}],
}
).insert(ignore_permissions=True)
budget.from_fiscal_year = fy.name
budget.to_fiscal_year = fy.name
budget.company = "_Test Company"
with self.assertRaises(frappe.ValidationError):
budget.save()
def test_manual_distribution_total_equals_budget_amount(self):
budget = make_budget(
budget_against="Cost Center",
cost_center="_Test Cost Center - _TC",
distribute_equally=0,
budget_amount=12000,
do_not_save=False,
submit_budget=False,
)
for d in budget.budget_distribution:
d.amount = 2000
with self.assertRaises(frappe.ValidationError):
budget.save()
def test_duplicate_budget_validation(self):
budget = make_budget(
budget_against="Cost Center",
distribute_equally=1,
budget_amount=15000,
do_not_save=False,
submit_budget=True,
)
new_budget = frappe.new_doc("Budget")
new_budget.company = "_Test Company"
new_budget.from_fiscal_year = budget.from_fiscal_year
new_budget.to_fiscal_year = new_budget.from_fiscal_year
new_budget.budget_against = "Cost Center"
new_budget.cost_center = "_Test Cost Center - _TC"
new_budget.account = "_Test Account Cost for Goods Sold - _TC"
new_budget.budget_amount = 10000
with self.assertRaises(frappe.ValidationError):
new_budget.insert()
def set_total_expense_zero(posting_date, budget_against_field=None, budget_against_CC=None):
if budget_against_field == "project":
@@ -430,21 +613,32 @@ def set_total_expense_zero(posting_date, budget_against_field=None, budget_again
budget_against = budget_against_CC or "_Test Cost Center - _TC"
fiscal_year = get_fiscal_year(nowdate())[0]
fiscal_year_start_date, fiscal_year_end_date = get_fiscal_year(nowdate())[1:3]
args = frappe._dict(
{
"account": "_Test Account Cost for Goods Sold - _TC",
"cost_center": "_Test Cost Center - _TC",
"monthly_end_date": posting_date,
"month_end_date": posting_date,
"company": "_Test Company",
"fiscal_year": fiscal_year,
"from_fiscal_year": fiscal_year,
"to_fiscal_year": fiscal_year,
"budget_against_field": budget_against_field,
"budget_start_date": fiscal_year_start_date,
"budget_end_date": fiscal_year_end_date,
}
)
if not args.get(budget_against_field):
args[budget_against_field] = budget_against
args.budget_against_doctype = frappe.unscrub(budget_against_field)
if frappe.get_cached_value("DocType", args.budget_against_doctype, "is_tree"):
args.is_tree = True
else:
args.is_tree = False
existing_expense = get_actual_expense(args)
if existing_expense:
@@ -474,18 +668,33 @@ def make_budget(**args):
budget_against = args.budget_against
cost_center = args.cost_center
fiscal_year = get_fiscal_year(nowdate())[0]
if budget_against == "Project":
project_name = "{}%".format("_Test Project/" + fiscal_year)
budget_list = frappe.get_all("Budget", fields=["name"], filters={"name": ("like", project_name)})
project = frappe.get_value("Project", {"project_name": "_Test Project"})
budget_list = frappe.get_all(
"Budget",
filters={
"project": project,
"account": "_Test Account Cost for Goods Sold - _TC",
},
pluck="name",
)
else:
cost_center_name = "{}%".format(cost_center or "_Test Cost Center - _TC/" + fiscal_year)
budget_list = frappe.get_all("Budget", fields=["name"], filters={"name": ("like", cost_center_name)})
for d in budget_list:
frappe.db.sql("delete from `tabBudget` where name = %(name)s", d)
frappe.db.sql("delete from `tabBudget Account` where parent = %(name)s", d)
budget_list = frappe.get_all(
"Budget",
filters={
"cost_center": cost_center or "_Test Cost Center - _TC",
"account": "_Test Account Cost for Goods Sold - _TC",
},
pluck="name",
)
for name in budget_list:
doc = frappe.get_doc("Budget", name)
if doc.docstatus == 1:
doc.cancel()
frappe.delete_doc("Budget", name, force=True, ignore_missing=True)
budget = frappe.new_doc("Budget")
@@ -494,18 +703,18 @@ def make_budget(**args):
else:
budget.cost_center = cost_center or "_Test Cost Center - _TC"
monthly_distribution = frappe.get_doc("Monthly Distribution", "_Test Distribution")
monthly_distribution.fiscal_year = fiscal_year
monthly_distribution.save()
budget.fiscal_year = fiscal_year
budget.monthly_distribution = "_Test Distribution"
budget.from_fiscal_year = args.from_fiscal_year or fiscal_year
budget.to_fiscal_year = args.to_fiscal_year or fiscal_year
budget.company = "_Test Company"
budget.account = "_Test Account Cost for Goods Sold - _TC"
budget.budget_amount = args.budget_amount or 200000
budget.applicable_on_booking_actual_expenses = 1
budget.action_if_annual_budget_exceeded = "Stop"
budget.action_if_accumulated_monthly_budget_exceeded = "Ignore"
budget.budget_against = budget_against
budget.append("accounts", {"account": "_Test Account Cost for Goods Sold - _TC", "budget_amount": 200000})
budget.distribution_frequency = "Monthly"
budget.distribute_equally = args.get("distribute_equally", 1)
if args.applicable_on_material_request:
budget.applicable_on_material_request = 1
@@ -530,7 +739,13 @@ def make_budget(**args):
args.action_if_accumulated_monthly_exceeded_on_cumulative_expense or "Warn"
)
budget.insert()
budget.submit()
if not args.do_not_save:
try:
budget.insert(ignore_if_duplicate=True)
except frappe.DuplicateEntryError:
pass
if args.submit_budget:
budget.submit()
return budget

View File

@@ -0,0 +1,58 @@
{
"actions": [],
"allow_rename": 1,
"creation": "2025-10-12 23:31:03.841996",
"doctype": "DocType",
"editable_grid": 1,
"engine": "InnoDB",
"field_order": [
"start_date",
"end_date",
"amount",
"percent"
],
"fields": [
{
"fieldname": "start_date",
"fieldtype": "Date",
"in_list_view": 1,
"label": "Start Date",
"read_only": 1,
"search_index": 1
},
{
"fieldname": "end_date",
"fieldtype": "Date",
"in_list_view": 1,
"label": "End Date",
"read_only": 1
},
{
"fieldname": "amount",
"fieldtype": "Currency",
"in_list_view": 1,
"label": "Amount"
},
{
"fieldname": "percent",
"fieldtype": "Percent",
"in_list_view": 1,
"label": "Percent"
}
],
"grid_page_length": 50,
"index_web_pages_for_search": 1,
"istable": 1,
"links": [],
"modified": "2025-11-03 13:18:28.398198",
"modified_by": "Administrator",
"module": "Accounts",
"name": "Budget Distribution",
"owner": "Administrator",
"permissions": [],
"row_format": "Dynamic",
"rows_threshold_for_grid_search": 20,
"sort_field": "creation",
"sort_order": "DESC",
"states": []
}

View File

@@ -0,0 +1,26 @@
# Copyright (c) 2025, Frappe Technologies Pvt. Ltd. and contributors
# For license information, please see license.txt
# import frappe
from frappe.model.document import Document
class BudgetDistribution(Document):
# begin: auto-generated types
# This code is auto-generated. Do not modify anything in this block.
from typing import TYPE_CHECKING
if TYPE_CHECKING:
from frappe.types import DF
amount: DF.Currency
end_date: DF.Date | None
parent: DF.Data
parentfield: DF.Data
parenttype: DF.Data
percent: DF.Percent
start_date: DF.Date | None
# end: auto-generated types
pass

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

@@ -19,7 +19,7 @@ frappe.ui.form.on("Currency Exchange Settings", {
to: "{to_currency}",
};
add_param(frm, r.message, params, result);
} else if (frm.doc.service_provider == "frankfurter.app") {
} else if (["frankfurter.app", "frankfurter.dev"].includes(frm.doc.service_provider)) {
let result = ["rates", "{to_currency}"];
let params = {
base: "{from_currency}",

View File

@@ -78,7 +78,7 @@
"fieldname": "service_provider",
"fieldtype": "Select",
"label": "Service Provider",
"options": "frankfurter.app\nexchangerate.host\nCustom",
"options": "frankfurter.dev\nexchangerate.host\nCustom",
"reqd": 1
},
{
@@ -104,7 +104,7 @@
"index_web_pages_for_search": 1,
"issingle": 1,
"links": [],
"modified": "2024-03-27 13:06:47.653110",
"modified": "2025-11-25 13:03:41.896424",
"modified_by": "Administrator",
"module": "Accounts",
"name": "Currency Exchange Settings",
@@ -141,8 +141,9 @@
"write": 1
}
],
"row_format": "Dynamic",
"sort_field": "creation",
"sort_order": "DESC",
"states": [],
"track_changes": 1
}
}

View File

@@ -29,7 +29,7 @@ class CurrencyExchangeSettings(Document):
disabled: DF.Check
req_params: DF.Table[CurrencyExchangeSettingsDetails]
result_key: DF.Table[CurrencyExchangeSettingsResult]
service_provider: DF.Literal["frankfurter.app", "exchangerate.host", "Custom"]
service_provider: DF.Literal["frankfurter.dev", "exchangerate.host", "Custom"]
url: DF.Data | None
use_http: DF.Check
# end: auto-generated types
@@ -60,7 +60,7 @@ class CurrencyExchangeSettings(Document):
self.append("req_params", {"key": "date", "value": "{transaction_date}"})
self.append("req_params", {"key": "from", "value": "{from_currency}"})
self.append("req_params", {"key": "to", "value": "{to_currency}"})
elif self.service_provider == "frankfurter.app":
elif self.service_provider in ("frankfurter.dev", "frankfurter.app"):
self.set("result_key", [])
self.set("req_params", [])
@@ -105,11 +105,13 @@ class CurrencyExchangeSettings(Document):
@frappe.whitelist()
def get_api_endpoint(service_provider: str | None = None, use_http: bool = False):
if service_provider and service_provider in ["exchangerate.host", "frankfurter.app"]:
if service_provider and service_provider in ["exchangerate.host", "frankfurter.dev", "frankfurter.app"]:
if service_provider == "exchangerate.host":
api = "api.exchangerate.host/convert"
elif service_provider == "frankfurter.app":
api = "api.frankfurter.app/{transaction_date}"
elif service_provider == "frankfurter.dev":
api = "api.frankfurter.dev/v1/{transaction_date}"
protocol = "https://"
if use_http:

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):
@@ -251,7 +252,7 @@ class ExchangeRateRevaluation(Document):
company_currency = erpnext.get_company_currency(company)
precision = get_field_precision(
frappe.get_meta("Exchange Rate Revaluation Account").get_field("new_balance_in_base_currency"),
company_currency,
currency=company_currency,
)
if account_details:

View File

@@ -3,6 +3,8 @@
import frappe
from frappe.query_builder import functions
from frappe.query_builder.utils import DocType
from frappe.tests import IntegrationTestCase
from frappe.utils import add_days, flt, today
@@ -81,10 +83,11 @@ class TestExchangeRateRevaluation(AccountsTestMixin, IntegrationTestCase):
self.assertEqual(je.total_debit, 8500.0)
self.assertEqual(je.total_credit, 8500.0)
gl = DocType("GL Entry")
acc_balance = frappe.db.get_all(
"GL Entry",
filters={"account": self.debtors_usd, "is_cancelled": 0},
fields=["sum(debit)-sum(credit) as balance"],
fields=[(functions.Sum(gl.debit) - functions.Sum(gl.credit)).as_("balance")],
)[0]
self.assertEqual(acc_balance.balance, 8500.0)
@@ -146,12 +149,15 @@ class TestExchangeRateRevaluation(AccountsTestMixin, IntegrationTestCase):
self.assertEqual(je.total_debit, 500.0)
self.assertEqual(je.total_credit, 500.0)
gl = DocType("GL Entry")
acc_balance = frappe.db.get_all(
"GL Entry",
filters={"account": self.debtors_usd, "is_cancelled": 0},
fields=[
"sum(debit)-sum(credit) as balance",
"sum(debit_in_account_currency)-sum(credit_in_account_currency) as balance_in_account_currency",
(functions.Sum(gl.debit) - functions.Sum(gl.credit)).as_("balance"),
(
functions.Sum(gl.debit_in_account_currency) - functions.Sum(gl.credit_in_account_currency)
).as_("balance_in_account_currency"),
],
)[0]
# account shouldn't have balance in base and account currency
@@ -193,12 +199,15 @@ class TestExchangeRateRevaluation(AccountsTestMixin, IntegrationTestCase):
pe.references = []
pe.save().submit()
gl = DocType("GL Entry")
acc_balance = frappe.db.get_all(
"GL Entry",
filters={"account": self.debtors_usd, "is_cancelled": 0},
fields=[
"sum(debit)-sum(credit) as balance",
"sum(debit_in_account_currency)-sum(credit_in_account_currency) as balance_in_account_currency",
(functions.Sum(gl.debit) - functions.Sum(gl.credit)).as_("balance"),
(
functions.Sum(gl.debit_in_account_currency) - functions.Sum(gl.credit_in_account_currency)
).as_("balance_in_account_currency"),
],
)[0]
# account should have balance only in account currency
@@ -235,12 +244,15 @@ class TestExchangeRateRevaluation(AccountsTestMixin, IntegrationTestCase):
self.assertEqual(flt(je.total_debit, precision), 0.0)
self.assertEqual(flt(je.total_credit, precision), 0.0)
gl = DocType("GL Entry")
acc_balance = frappe.db.get_all(
"GL Entry",
filters={"account": self.debtors_usd, "is_cancelled": 0},
fields=[
"sum(debit)-sum(credit) as balance",
"sum(debit_in_account_currency)-sum(credit_in_account_currency) as balance_in_account_currency",
(functions.Sum(gl.debit) - functions.Sum(gl.credit)).as_("balance"),
(
functions.Sum(gl.debit_in_account_currency) - functions.Sum(gl.credit_in_account_currency)
).as_("balance_in_account_currency"),
],
)[0]
# account shouldn't have balance in base and account currency post revaluation

View File

@@ -0,0 +1,187 @@
{
"actions": [],
"allow_rename": 1,
"creation": "2025-09-06 09:39:46.503678",
"doctype": "DocType",
"editable_grid": 1,
"engine": "InnoDB",
"field_order": [
"reference_code",
"display_name",
"indentation_level",
"data_source",
"balance_type",
"column_break_hxqu",
"fieldtype",
"color",
"bold_text",
"italic_text",
"hidden_calculation",
"hide_when_empty",
"reverse_sign",
"include_in_charts",
"section_break_ornw",
"column_break_asfe",
"advanced_filtering",
"filters_editor",
"calculation_formula",
"section_break_pvro",
"formula_description"
],
"fields": [
{
"columns": 1,
"description": "Code to reference this line in formulas (e.g., REV100, EXP200, ASSET100)",
"fieldname": "reference_code",
"fieldtype": "Data",
"in_list_view": 1,
"label": "Line Reference"
},
{
"description": "Text displayed on the financial statement (e.g., 'Total Revenue', 'Cash and Cash Equivalents')",
"fieldname": "display_name",
"fieldtype": "Data",
"in_list_view": 1,
"label": "Display Name"
},
{
"columns": 1,
"description": "Indentation level: 0 = Main heading, 1 = Sub-category, 2 = Individual accounts, etc.",
"fieldname": "indentation_level",
"fieldtype": "Int",
"in_list_view": 1,
"label": "Indent Level"
},
{
"description": "How this line gets its data",
"fieldname": "data_source",
"fieldtype": "Select",
"in_list_view": 1,
"label": "Data Source",
"options": "\nAccount Data\nCalculated Amount\nCustom API\nBlank Line\nColumn Break\nSection Break"
},
{
"depends_on": "eval:doc.data_source == 'Account Data'",
"description": "Opening Balance = Start of period, Closing Balance = End of period, Period Movement = Net change during period",
"fieldname": "balance_type",
"fieldtype": "Select",
"in_list_view": 1,
"label": "Balance Type",
"mandatory_depends_on": "eval:doc.data_source == 'Account Data'",
"options": "\nOpening Balance\nClosing Balance\nPeriod Movement (Debits - Credits)"
},
{
"fieldname": "column_break_hxqu",
"fieldtype": "Column Break"
},
{
"default": "0",
"description": "Bold text for emphasis (totals, major headings)",
"fieldname": "bold_text",
"fieldtype": "Check",
"label": "Bold Text"
},
{
"default": "0",
"description": "Italic text for subtotals or notes",
"fieldname": "italic_text",
"fieldtype": "Check",
"label": "Italic Text"
},
{
"default": "0",
"description": "Calculate but don't show on final report",
"fieldname": "hidden_calculation",
"fieldtype": "Check",
"label": "Hidden Line (Internal Use Only)"
},
{
"default": "0",
"description": "Hide this line if amount is zero",
"fieldname": "hide_when_empty",
"fieldtype": "Check",
"label": "Hide If Zero"
},
{
"columns": 1,
"default": "0",
"description": "Show negative values as positive (for expenses in P&L)",
"fieldname": "reverse_sign",
"fieldtype": "Check",
"in_list_view": 1,
"label": "Reverse Sign"
},
{
"fieldname": "section_break_ornw",
"fieldtype": "Section Break"
},
{
"depends_on": "eval: (doc.data_source === \"Account Data\" && doc.advanced_filtering) || [\"Calculated Amount\", \"Custom API\"].includes(doc.data_source);\n",
"fieldname": "calculation_formula",
"fieldtype": "Code",
"label": "Formula or Account Filter",
"mandatory_depends_on": "eval:doc.data_source != 'Blank Line' && doc.data_source != 'Column Break' && doc.data_source != 'Section Break'"
},
{
"fieldname": "formula_description",
"fieldtype": "HTML"
},
{
"default": "0",
"description": "If enabled, this row's values will be displayed on financial charts",
"fieldname": "include_in_charts",
"fieldtype": "Check",
"label": "Include in Charts"
},
{
"description": "Color to highlight values (e.g., red for exceptions)",
"fieldname": "color",
"fieldtype": "Color",
"label": "Color"
},
{
"description": "How to format and present values in the financial report (only if different from column fieldtype)",
"fieldname": "fieldtype",
"fieldtype": "Select",
"label": "Value Type",
"options": "\nCurrency\nFloat\nInt\nPercent"
},
{
"depends_on": "eval: doc.data_source === \"Account Data\" && !doc.advanced_filtering",
"fieldname": "filters_editor",
"fieldtype": "HTML"
},
{
"depends_on": "eval: ![\"Blank Line\", \"Column Break\", \"Section Break\"].includes(doc.data_source);",
"fieldname": "column_break_asfe",
"fieldtype": "Column Break"
},
{
"default": "0",
"depends_on": "eval: doc.data_source === \"Account Data\"",
"description": "Use <strong>Python</strong> filters to get Accounts",
"fieldname": "advanced_filtering",
"fieldtype": "Check",
"label": "Advanced Filtering",
"print_hide": 1
},
{
"fieldname": "section_break_pvro",
"fieldtype": "Section Break"
}
],
"grid_page_length": 50,
"index_web_pages_for_search": 1,
"istable": 1,
"links": [],
"modified": "2025-10-14 09:23:27.208072",
"modified_by": "Administrator",
"module": "Accounts",
"name": "Financial Report Row",
"owner": "Administrator",
"permissions": [],
"row_format": "Dynamic",
"sort_field": "creation",
"sort_order": "DESC",
"states": []
}

View File

@@ -0,0 +1,47 @@
# Copyright (c) 2025, Frappe Technologies Pvt. Ltd. and contributors
# For license information, please see license.txt
# import frappe
from frappe.model.document import Document
class FinancialReportRow(Document):
# begin: auto-generated types
# This code is auto-generated. Do not modify anything in this block.
from typing import TYPE_CHECKING
if TYPE_CHECKING:
from frappe.types import DF
advanced_filtering: DF.Check
balance_type: DF.Literal[
"", "Opening Balance", "Closing Balance", "Period Movement (Debits - Credits)"
]
bold_text: DF.Check
calculation_formula: DF.Code | None
color: DF.Color | None
data_source: DF.Literal[
"",
"Account Data",
"Calculated Amount",
"Custom API",
"Blank Line",
"Column Break",
"Section Break",
]
display_name: DF.Data | None
fieldtype: DF.Literal["", "Currency", "Float", "Int", "Percent"]
hidden_calculation: DF.Check
hide_when_empty: DF.Check
include_in_charts: DF.Check
indentation_level: DF.Int
italic_text: DF.Check
parent: DF.Data
parentfield: DF.Data
parenttype: DF.Data
reference_code: DF.Data | None
reverse_sign: DF.Check
# end: auto-generated types
pass

File diff suppressed because it is too large Load Diff

View File

@@ -0,0 +1,433 @@
// Copyright (c) 2025, Frappe Technologies Pvt. Ltd. and contributors
// For license information, please see license.txt
frappe.ui.form.on("Financial Report Template", {
refresh(frm) {
// add custom button to view missed accounts
frm.add_custom_button(__("View Account Coverage"), function () {
let selected_rows = frm.get_field("rows").grid.get_selected_children();
const has_selection = selected_rows.length > 0;
if (selected_rows.length === 0) selected_rows = frm.doc.rows;
show_accounts_tree(selected_rows, has_selection);
});
// add custom button to open the financial report
frm.add_custom_button(__("View Report"), function () {
frappe.set_route("query-report", frm.doc.report_type, {
report_template: frm.doc.name,
});
});
},
validate(frm) {
if (!frm.doc.rows || frm.doc.rows.length === 0) {
frappe.msgprint(__("At least one row is required for a financial report template"));
}
},
});
frappe.ui.form.on("Financial Report Row", {
data_source(frm, cdt, cdn) {
const row = locals[cdt][cdn];
update_formula_label(frm, row.data_source);
update_formula_description(frm, row.data_source);
if (row.data_source !== "Account Data") {
frappe.model.set_value(cdt, cdn, "balance_type", "");
}
if (["Blank Line", "Column Break", "Section Break"].includes(row.data_source)) {
frappe.model.set_value(cdt, cdn, "calculation_formula", "");
}
set_up_filters_editor(frm, cdt, cdn);
},
form_render(frm, cdt, cdn) {
const row = locals[cdt][cdn];
update_formula_label(frm, row.data_source);
update_advanced_formula_property(frm, cdt, cdn);
set_up_filters_editor(frm, cdt, cdn);
update_formula_description(frm, row.data_source);
},
calculation_formula(frm, cdt, cdn) {
update_advanced_formula_property(frm, cdt, cdn);
},
advanced_filtering(frm, cdt, cdn) {
set_up_filters_editor(frm, cdt, cdn);
},
});
// FILTERS EDITOR
function set_up_filters_editor(frm, cdt, cdn) {
const row = locals[cdt][cdn];
if (row.data_source !== "Account Data" || row.advanced_filtering) return;
const grid_row = frm.fields_dict["rows"].grid.get_row(cdn);
const wrapper = grid_row.get_field("filters_editor").$wrapper;
wrapper.empty();
const ACCOUNT = "Account";
const FIELD_IDX = 1;
const OPERATOR_IDX = 2;
const VALUE_IDX = 3;
// Parse saved filters
let saved_filters = [];
if (row.calculation_formula) {
try {
const parsed = JSON.parse(row.calculation_formula);
if (Array.isArray(parsed)) saved_filters = [parsed];
else if (parsed.and) saved_filters = parsed.and;
} catch (e) {
frappe.show_alert({
message: __("Invalid filter formula. Please check the syntax."),
indicator: "red",
});
}
}
if (saved_filters.length)
// Ensure every filter starts with "Account"
saved_filters = saved_filters.map((f) => [ACCOUNT, ...f]);
frappe.model.with_doctype(ACCOUNT, () => {
const filter_group = new frappe.ui.FilterGroup({
parent: wrapper,
doctype: ACCOUNT,
on_change: () => {
// only need [[field, operator, value]]
const filters = filter_group
.get_filters()
.map((f) => [f[FIELD_IDX], f[OPERATOR_IDX], f[VALUE_IDX]]);
const current = filters.length > 1 ? { and: filters } : filters[0];
frappe.model.set_value(cdt, cdn, "calculation_formula", JSON.stringify(current));
},
});
filter_group.add_filters_to_filter_group(saved_filters);
});
}
function update_advanced_formula_property(frm, cdt, cdn) {
const row = locals[cdt][cdn];
const is_advanced = is_advanced_formula(row);
frm.set_df_property("rows", "read_only", is_advanced, frm.doc.name, "advanced_filtering", cdn);
if (is_advanced && !row.advanced_filtering) {
row.advanced_filtering = 1;
frm.refresh_field("rows");
}
}
function is_advanced_formula(row) {
if (!row || row.data_source !== "Account Data") return false;
let parsed = null;
if (row.calculation_formula) {
try {
parsed = JSON.parse(row.calculation_formula);
} catch (e) {
console.warn("Invalid JSON in calculation_formula:", e);
return false;
}
}
if (Array.isArray(parsed)) return false;
if (parsed?.or) return true;
if (parsed?.and) return parsed.and.some((cond) => !Array.isArray(cond));
return false;
}
// ACCOUNTS TREE VIEW
function show_accounts_tree(template_rows, has_selection) {
// filtered rows
const account_rows = template_rows.filter((row) => row.data_source === "Account Data");
if (account_rows.length === 0) {
frappe.show_alert(__("No <strong>Account Data</strong> row found"));
return;
}
const dialog = new frappe.ui.Dialog({
title: __("Accounts Missing from Report"),
fields: [
{
fieldname: "company",
fieldtype: "Link",
options: "Company",
label: "Company",
reqd: 1,
default: frappe.defaults.get_user_default("Company"),
onchange: () => {
const company_field = dialog.get_field("company");
if (!company_field.value || company_field.value === company_field.last_value) return;
refresh_tree_view(dialog, account_rows);
},
},
{
fieldname: "view_type",
fieldtype: "Select",
options: ["Missing Accounts", "Filtered Accounts"],
label: "View",
default: has_selection ? "Filtered Accounts" : "Missing Accounts",
reqd: 1,
onchange: () => {
dialog.set_title(
dialog.get_value("view_type") === "Missing Accounts"
? __("Accounts Missing from Report")
: __("Accounts Included in Report")
);
refresh_tree_view(dialog, account_rows);
},
},
{
fieldname: "tip",
fieldtype: "HTML",
label: "Tip",
options: `
<div class="alert alert-success" role="alert">
Tip: Select report lines to view their accounts
</div>
`,
depends_on: has_selection ? "eval: false" : "eval: true",
},
{
fieldname: "tree_area",
fieldtype: "HTML",
label: "Chart of Accounts",
read_only: 1,
depends_on: "eval: doc.company",
},
],
primary_action_label: __("Done"),
primary_action() {
dialog.hide();
},
});
dialog.show();
refresh_tree_view(dialog, account_rows);
}
async function refresh_tree_view(dialog, account_rows) {
const missed = dialog.get_value("view_type") === "Missing Accounts";
const company = dialog.get_value("company");
const wrapper = dialog.get_field("tree_area").$wrapper;
wrapper.empty();
// get filtered accounts
const { message: filtered_accounts } = await frappe.call({
method: "erpnext.accounts.doctype.financial_report_template.financial_report_engine.get_filtered_accounts",
args: { company: company, account_rows: account_rows },
});
// render tree
const tree = new FilteredTree({
parent: wrapper,
label: company,
root_value: company,
method: "erpnext.accounts.doctype.financial_report_template.financial_report_engine.get_children_accounts",
args: { doctype: "Account", company: company, filtered_accounts: filtered_accounts, missed: missed },
toolbar: [],
});
tree.load_children(tree.root_node, true);
}
class FilteredTree extends frappe.ui.Tree {
render_children_of_all_nodes(data_list) {
data_list = this.get_filtered_data_list(data_list);
super.render_children_of_all_nodes(data_list);
}
get_filtered_data_list(data_list) {
let removed_nodes = new Set();
// Filter nodes with no data
data_list = data_list.filter((d) => {
if (d.data.length === 0) {
removed_nodes.add(d.parent);
return false;
}
return true;
});
// Remove references to removed nodes and iteratively remove empty parents
while (removed_nodes.size > 0) {
const current_removed = [...removed_nodes];
removed_nodes.clear();
data_list = data_list.filter((d) => {
d.data = d.data.filter((a) => !current_removed.includes(a.value));
if (d.data.length === 0) {
removed_nodes.add(d.parent);
return false;
}
return true;
});
}
return data_list;
}
}
function update_formula_label(frm, data_source) {
const grid = frm.fields_dict.rows.grid;
const field = grid.fields_map.calculation_formula;
if (!field) return;
const labels = {
"Account Data": "Account Filter",
"Custom API": "API Method Path",
};
grid.update_docfield_property(
"calculation_formula",
"label",
labels[data_source] || "Calculation Formula"
);
}
// FORMULA DESCRIPTION
function update_formula_description(frm, data_source) {
if (!data_source) return;
let grid = frm.fields_dict.rows.grid;
let field = grid.fields_map.formula_description;
if (!field) return;
// Common CSS styles and elements
const container_style = `style="padding: var(--padding-md); border: 1px solid var(--border-color); border-radius: var(--border-radius); margin-top: var(--margin-sm);"`;
const title_style = `style="margin-top: 0; color: var(--text-color);"`;
const subtitle_style = `style="color: var(--text-color); margin-bottom: var(--margin-xs);"`;
const text_style = `style="margin-bottom: var(--margin-sm); color: var(--text-muted);"`;
const list_style = `style="margin-bottom: var(--margin-sm); color: var(--text-muted); font-size: 0.9em;"`;
const note_style = `style="margin-bottom: 0; color: var(--text-muted); font-size: 0.9em;"`;
const tip_style = `style="margin-bottom: 0; color: var(--text-color); font-size: 0.85em;"`;
let description_html = "";
if (data_source === "Account Data") {
description_html = `
<div ${container_style}>
<h5 ${title_style}>Account Filter Guide</h5>
<p ${text_style}>Specify which accounts to include in this line.</p>
<h6 ${subtitle_style}>Basic Examples:</h6>
<ul ${list_style}>
<li><code>["account_type", "=", "Cash"]</code> - All Cash accounts</li>
<li><code>["root_type", "in", ["Asset", "Liability"]]</code> - All Asset and Liability accounts</li>
<li><code>["account_category", "like", "Revenue"]</code> - Revenue accounts</li>
</ul>
<h6 ${subtitle_style}>Multiple Conditions (AND/OR):</h6>
<ul ${list_style}>
<li><code>{"and": [["root_type", "=", "Asset"], ["account_type", "=", "Cash"]]}</code></li>
<li><code>{"or": [["account_category", "like", "Revenue"], ["account_category", "like", "Income"]]}</code></li>
</ul>
<p ${note_style}><strong>Available operators:</strong> <code>=, !=, in, not in, like, not like, is</code></p>
<p ${tip_style}><strong>Multi-Company Tip:</strong> Use fields like <code>account_type</code>, <code>root_type</code>, and <code>account_category</code> for templates that work across multiple companies.</p>
</div>`;
} else if (data_source === "Calculated Amount") {
description_html = `
<div ${container_style}>
<h5 ${title_style}>Formula Guide</h5>
<p ${text_style}>Create calculations using reference codes from other lines.</p>
<h6 ${subtitle_style}>Basic Examples:</h6>
<ul ${list_style}>
<li><code>REV100 + REV200</code> - Add two revenue lines</li>
<li><code>ASSETS - LIABILITIES</code> - Calculate equity</li>
<li><code>REVENUE * 0.1</code> - 10% of revenue</li>
</ul>
<h6 ${subtitle_style}>Common Functions:</h6>
<ul ${list_style}>
<li><code>abs(value)</code> - Remove negative sign</li>
<li><code>round(value)</code> - Round to whole number</li>
<li><code>max(val1, val2)</code> - Larger of two values</li>
<li><code>min(val1, val2)</code> - Smaller of two values</li>
</ul>
<p ${note_style}><strong>Required:</strong> Use "Reference Code" from other rows in your formulas.</p>
</div>`;
} else if (data_source === "Custom API") {
description_html = `
<div ${container_style}>
<h5 ${title_style}>Custom API Setup</h5>
<p ${text_style}>Path to your custom method that returns financial data.</p>
<h6 ${subtitle_style}>Format:</h6>
<ul ${list_style}>
<li><code>erpnext.custom.financial_apis.get_custom_revenue</code></li>
<li><code>my_app.financial_reports.get_kpi_data</code></li>
</ul>
<h6 ${subtitle_style}>Return Format:</h6>
<p ${text_style}>Numbers for each period: <code>[1000.0, 1200.0, 1150.0]</code></p>
</div>`;
} else if (data_source === "Blank Line") {
description_html = `
<div ${container_style}>
<h5 ${title_style}>Blank Line</h5>
<p ${text_style}>Adds empty space for better visual separation.</p>
<h6 ${subtitle_style}>Use For:</h6>
<ul ${list_style}>
<li>Separating major sections</li>
<li>Adding space before totals</li>
</ul>
<p ${note_style}><strong>Note:</strong> No formula needed - creates visual spacing only.</p>
</div>`;
} else if (data_source === "Column Break") {
description_html = `
<div ${container_style}>
<h5 ${title_style}>Column Break</h5>
<p ${text_style}>Creates a visual break for side-by-side layout.</p>
<h6 ${subtitle_style}>Use For:</h6>
<ul ${list_style}>
<li>Horizontal P&L statements</li>
<li>Side-by-side Balance Sheet sections</li>
</ul>
<p ${note_style}><strong>Note:</strong> No formula needed - this is for formatting only.</p>
</div>`;
} else if (data_source === "Section Break") {
description_html = `
<div ${container_style}>
<h5 ${title_style}>Section Break</h5>
<p ${text_style}>Creates a visual break for separating different sections.</p>
<h6 ${subtitle_style}>Use For:</h6>
<ul ${list_style}>
<li>Separating major sections in a report - say trading & profit and loss</li>
<li>Improving readability by adding space</li>
</ul>
<p ${note_style}><strong>Note:</strong> No formula needed - this is for formatting only.</p>
</div>`;
}
grid.update_docfield_property("formula_description", "options", description_html);
}

View File

@@ -0,0 +1,102 @@
{
"actions": [],
"allow_rename": 1,
"autoname": "field:template_name",
"creation": "2025-08-02 04:44:15.184541",
"doctype": "DocType",
"engine": "InnoDB",
"field_order": [
"template_name",
"report_type",
"module",
"column_break_lvnq",
"disabled",
"section_break_fvlw",
"rows"
],
"fields": [
{
"description": "Descriptive name for your template (e.g., 'Standard P&L', 'Detailed Balance Sheet')",
"fieldname": "template_name",
"fieldtype": "Data",
"in_list_view": 1,
"label": "Template Name",
"reqd": 1,
"unique": 1
},
{
"description": "Type of financial statement this template generates",
"fieldname": "report_type",
"fieldtype": "Select",
"in_list_view": 1,
"in_standard_filter": 1,
"label": "Report Type",
"options": "\nProfit and Loss Statement\nBalance Sheet\nCash Flow\nCustom Financial Statement"
},
{
"depends_on": "eval:frappe.boot.developer_mode",
"fieldname": "module",
"fieldtype": "Link",
"label": "Module (for Export)",
"options": "Module Def"
},
{
"fieldname": "column_break_lvnq",
"fieldtype": "Column Break"
},
{
"fieldname": "section_break_fvlw",
"fieldtype": "Section Break"
},
{
"allow_bulk_edit": 1,
"fieldname": "rows",
"fieldtype": "Table",
"label": "Report Line Items",
"options": "Financial Report Row"
},
{
"default": "0",
"description": "Disable template to prevent use in reports",
"fieldname": "disabled",
"fieldtype": "Check",
"label": "Disabled"
}
],
"grid_page_length": 50,
"index_web_pages_for_search": 1,
"links": [],
"modified": "2025-11-14 00:11:03.508139",
"modified_by": "Administrator",
"module": "Accounts",
"name": "Financial Report Template",
"naming_rule": "By fieldname",
"owner": "Administrator",
"permissions": [
{
"create": 1,
"delete": 1,
"email": 1,
"export": 1,
"print": 1,
"read": 1,
"report": 1,
"role": "Accounts Manager",
"share": 1,
"write": 1
},
{
"read": 1,
"role": "Accounts User"
},
{
"read": 1,
"role": "Auditor"
}
],
"row_format": "Dynamic",
"sort_field": "creation",
"sort_order": "DESC",
"states": [],
"title_field": "template_name"
}

View File

@@ -0,0 +1,179 @@
# Copyright (c) 2025, Frappe Technologies Pvt. Ltd. and contributors
# For license information, please see license.txt
import os
import shutil
import frappe
from frappe import _
from frappe.model.document import Document
from erpnext.accounts.doctype.account_category.account_category import import_account_categories
from erpnext.accounts.doctype.financial_report_template.financial_report_validation import TemplateValidator
class FinancialReportTemplate(Document):
# begin: auto-generated types
# This code is auto-generated. Do not modify anything in this block.
from typing import TYPE_CHECKING
if TYPE_CHECKING:
from frappe.types import DF
from erpnext.accounts.doctype.financial_report_row.financial_report_row import FinancialReportRow
disabled: DF.Check
module: DF.Link | None
report_type: DF.Literal[
"", "Profit and Loss Statement", "Balance Sheet", "Cash Flow", "Custom Financial Statement"
]
rows: DF.Table[FinancialReportRow]
template_name: DF.Data
# end: auto-generated types
def validate(self):
validator = TemplateValidator(self)
result = validator.validate()
result.notify_user()
def on_update(self):
self._export_template()
def on_trash(self):
self._delete_template()
def _export_template(self):
from frappe.modules.utils import export_module_json
if not self.module:
return
export_module_json(self, True, self.module)
self._export_account_categories()
def _delete_template(self):
if not self.module or not frappe.conf.developer_mode:
return
module_path = frappe.get_module_path(self.module)
dir_path = os.path.join(module_path, "financial_report_template", frappe.scrub(self.name))
shutil.rmtree(dir_path, ignore_errors=True)
def _export_account_categories(self):
import json
from erpnext.accounts.doctype.financial_report_template.financial_report_engine import (
FormulaFieldExtractor,
)
if not self.module or not frappe.conf.developer_mode or frappe.flags.in_import:
return
# Extract category from rows
extractor = FormulaFieldExtractor(
field_name="account_category", exclude_operators=["like", "not like"]
)
account_data_rows = [row for row in self.rows if row.data_source == "Account Data"]
category_names = extractor.extract_from_rows(account_data_rows)
if not category_names:
return
# Get path
module_path = frappe.get_module_path(self.module)
categories_file = os.path.join(module_path, "financial_report_template", "account_categories.json")
# Load existing categories
existing_categories = {}
if os.path.exists(categories_file):
try:
with open(categories_file) as f:
existing_data = json.load(f)
existing_categories = {cat["account_category_name"]: cat for cat in existing_data}
except (json.JSONDecodeError, KeyError):
pass # Create new file
# Fetch categories from database
if category_names:
db_categories = frappe.get_all(
"Account Category",
filters={"account_category_name": ["in", list(category_names)]},
fields=["account_category_name", "description"],
)
for cat in db_categories:
existing_categories[cat["account_category_name"]] = cat
# Sort by category name
sorted_categories = sorted(existing_categories.values(), key=lambda x: x["account_category_name"])
# Write to file
os.makedirs(os.path.dirname(categories_file), exist_ok=True)
with open(categories_file, "w") as f:
json.dump(sorted_categories, f, indent=2)
def sync_financial_report_templates(chart_of_accounts=None, existing_company=None):
from erpnext.accounts.doctype.account.chart_of_accounts.chart_of_accounts import get_chart
# If COA is being created for an existing company,
# skip syncing templates as they are likely already present
if existing_company:
return
# Allow regional templates to completely override ERPNext
# templates based on the chart of accounts selected
disable_default_financial_report_template = False
if chart_of_accounts:
coa = get_chart(chart_of_accounts)
if coa.get("disable_default_financial_report_template", False):
disable_default_financial_report_template = True
installed_apps = frappe.get_installed_apps()
for app in installed_apps:
if disable_default_financial_report_template and app == "erpnext":
continue
_sync_templates_for(app)
def _sync_templates_for(app_name):
templates = []
for module_name in frappe.local.app_modules.get(app_name) or []:
module_path = frappe.get_module_path(module_name)
template_path = os.path.join(module_path, "financial_report_template")
if not os.path.isdir(template_path):
continue
import_account_categories(template_path)
for template_dir in os.listdir(template_path):
json_file = os.path.join(template_path, template_dir, f"{template_dir}.json")
if os.path.isfile(json_file):
templates.append(json_file)
if not templates:
return
# ensure files are not exported
frappe.flags.in_import = True
for template_path in templates:
with open(template_path) as f:
template_data = frappe._dict(frappe.parse_json(f.read()))
template_name = template_data.get("name")
if not frappe.db.exists("Financial Report Template", template_name):
doc = frappe.get_doc(template_data)
doc.flags.ignore_mandatory = True
doc.flags.ignore_permissions = True
doc.flags.ignore_validate = True
doc.insert()
frappe.flags.in_import = False

View File

@@ -0,0 +1,545 @@
# Copyright (c) 2025, Frappe Technologies Pvt. Ltd. and contributors
# For license information, please see license.txt
import ast
import json
import re
from abc import ABC, abstractmethod
from dataclasses import dataclass, field
from enum import Enum
from typing import Any, ClassVar
import frappe
from frappe import _
from frappe.database.operator_map import OPERATOR_MAP
from frappe.database.query import SQLFunctionParser
@dataclass
class ValidationIssue:
"""Represents a single validation issue"""
message: str
row_idx: int | None = None
field: str | None = None
details: dict[str, Any] = None
def __post_init__(self):
if self.details is None:
self.details = {}
def __str__(self) -> str:
prefix = f"Row {self.row_idx}: " if self.row_idx else ""
field_info = f"[{self.field}] " if self.field else ""
message = f"{prefix}{field_info}{self.message}"
return _(message)
@dataclass
class ValidationResult:
issues: list[ValidationIssue] = field(default_factory=list)
warnings: list[ValidationIssue] = field(default_factory=list)
@property
def is_valid(self) -> bool:
return len(self.issues) == 0
@property
def has_warnings(self) -> bool:
return len(self.warnings) > 0
@property
def error_count(self) -> int:
return len(self.issues)
@property
def warning_count(self) -> int:
return len(self.warnings)
def merge(self, other: "ValidationResult") -> "ValidationResult":
self.issues.extend(other.issues)
self.warnings.extend(other.warnings)
return self
def add_error(self, issue: ValidationIssue) -> None:
"""Add a critical error that prevents functionality"""
self.issues.append(issue)
def add_warning(self, issue: ValidationIssue) -> None:
"""Add a warning for recommendatory validation"""
self.warnings.append(issue)
def notify_user(self) -> None:
warnings = "<br><br>".join(str(w) for w in self.warnings)
errors = "<br><br>".join(str(e) for e in self.issues)
if warnings:
frappe.msgprint(warnings, title=_("Warnings"), indicator="orange")
if errors:
frappe.throw(errors, title=_("Errors"))
class TemplateValidator:
"""Main validator that orchestrates all validations"""
def __init__(self, template):
self.template = template
self.validators = [
TemplateStructureValidator(),
DependencyValidator(template),
]
self.formula_validator = FormulaValidator(template)
def validate(self) -> ValidationResult:
result = ValidationResult([])
# Run template-level validators
for validator in self.validators:
result.merge(validator.validate(self.template))
# Run row-level validations
account_fields = {field.fieldname for field in frappe.get_meta("Account").fields}
for row in self.template.rows:
result.merge(self.formula_validator.validate(row, account_fields))
return result
class Validator(ABC):
@abstractmethod
def validate(self, context: Any) -> ValidationResult:
pass
class TemplateStructureValidator(Validator):
def validate(self, template) -> ValidationResult:
result = ValidationResult()
result.merge(self._validate_reference_codes(template))
result.merge(self._validate_required_fields(template))
return result
def _validate_reference_codes(self, template) -> ValidationResult:
result = ValidationResult()
used_codes = set()
for row in template.rows:
if not row.reference_code:
continue
ref_code = row.reference_code.strip()
# Check format
if not re.match(r"^[A-Za-z][A-Za-z0-9_-]*$", ref_code):
result.add_error(
ValidationIssue(
message=f"Invalid line reference format: '{ref_code}'. Must start with letter and contain only letters, numbers, underscores, and hyphens",
row_idx=row.idx,
)
)
# Check uniqueness
if ref_code in used_codes:
result.add_error(
ValidationIssue(
message=f"Duplicate line reference: '{ref_code}'",
row_idx=row.idx,
)
)
used_codes.add(ref_code)
return result
def _validate_required_fields(self, template) -> ValidationResult:
result = ValidationResult()
for row in template.rows:
# Balance type required
if row.data_source == "Account Data" and not row.balance_type:
result.add_error(
ValidationIssue(
message="Balance Type is required for Account Data",
row_idx=row.idx,
)
)
# Calculation formula required
if row.data_source in ["Account Data", "Calculated Amount", "Custom API"]:
if not row.calculation_formula:
result.add_error(
ValidationIssue(
message=f"Formula is required for {row.data_source}",
row_idx=row.idx,
)
)
return result
class DependencyValidator(Validator):
def __init__(self, template):
self.template = template
self.dependencies = self._build_dependency_graph()
def validate(self, context=None) -> ValidationResult:
result = ValidationResult()
result.merge(self._validate_circular_dependencies())
result.merge(self._validate_missing_dependencies())
return result
def _build_dependency_graph(self) -> dict[str, list[str]]:
graph = {}
available_codes = {row.reference_code for row in self.template.rows if row.reference_code}
for row in self.template.rows:
if row.reference_code and row.data_source == "Calculated Amount" and row.calculation_formula:
deps = extract_reference_codes_from_formula(row.calculation_formula, list(available_codes))
if deps:
graph[row.reference_code] = deps
return graph
def _validate_circular_dependencies(self) -> ValidationResult:
"""
Efficient cycle detection using DFS (Depth-First Search) with three-color algorithm:
- WHITE (0): unvisited node
- GRAY (1): currently being processed (on recursion stack)
- BLACK (2): fully processed
Example cycle detection:
A → B → C → A (cycle detected when A is GRAY and visited again)
"""
result = ValidationResult()
WHITE, GRAY, BLACK = 0, 1, 2
colors = {node: WHITE for node in self.dependencies}
def dfs(node, path):
if node not in colors:
return # External dependency
if colors[node] == GRAY:
# Found cycle
cycle_start = path.index(node)
cycle = [*path[cycle_start:], node]
result.add_error(
ValidationIssue(
message=f"Circular dependency detected: {''.join(cycle)}",
)
)
return
if colors[node] == BLACK:
return # Already processed
colors[node] = GRAY
path.append(node)
for neighbor in self.dependencies.get(node, []):
dfs(neighbor, path.copy())
colors[node] = BLACK
for node in self.dependencies:
if colors[node] == WHITE:
dfs(node, [])
return result
def _validate_missing_dependencies(self) -> ValidationResult:
available = {row.reference_code for row in self.template.rows if row.reference_code}
result = ValidationResult()
for ref_code, deps in self.dependencies.items():
undefined = [d for d in deps if d not in available]
if undefined:
row_idx = self._get_row_idx(ref_code)
result.add_error(
ValidationIssue(
message=f"Line References undefined in Formula: {', '.join(undefined)}",
row_idx=row_idx,
)
)
return result
def _get_row_idx(self, reference_code: str) -> int | None:
for row in self.template.rows:
if row.reference_code == reference_code:
return row.idx
return None
class CalculationFormulaValidator(Validator):
"""Validates calculation formulas used in Calculated Amount rows"""
def __init__(self, reference_codes: set[str]):
self.reference_codes = reference_codes
def validate(self, row) -> ValidationResult:
"""Validate calculation formula for a single row"""
result = ValidationResult()
if row.data_source != "Calculated Amount":
return result
if not row.calculation_formula:
result.add_error(
ValidationIssue(
message="Formula is required for Calculated Amount",
row_idx=row.idx,
field="Formula",
)
)
return result
formula = self._preprocess_formula(row.calculation_formula)
row.calculation_formula = formula
# Check parentheses
if not self._are_parentheses_balanced(formula):
result.add_error(
ValidationIssue(
message="Formula has unbalanced parentheses",
row_idx=row.idx,
)
)
return result
# Check self-reference
available_codes = list(self.reference_codes)
refs = extract_reference_codes_from_formula(formula, available_codes)
if row.reference_code and row.reference_code in refs:
result.add_error(
ValidationIssue(
message=f"Formula references itself ('{row.reference_code}')",
row_idx=row.idx,
)
)
# Check undefined references
undefined = set(refs) - set(available_codes)
if undefined:
result.add_error(
ValidationIssue(
message=f"Formula references undefined codes: {', '.join(undefined)}",
row_idx=row.idx,
)
)
# Try to evaluate with dummy values
eval_error = self._test_formula_evaluation(formula, available_codes)
if eval_error:
result.add_error(
ValidationIssue(
message=f"Formula evaluation error: {eval_error}",
row_idx=row.idx,
)
)
return result
def _preprocess_formula(self, formula: str) -> str:
if not formula or not isinstance(formula, str):
return ""
return formula.strip()
@staticmethod
def _are_parentheses_balanced(formula: str) -> bool:
return formula.count("(") == formula.count(")")
def _test_formula_evaluation(self, formula: str, available_codes: list[str]) -> str | None:
try:
context = {code: 1.0 for code in available_codes}
context.update(
{
"abs": abs,
"round": round,
"min": min,
"max": max,
"sum": sum,
"sqrt": lambda x: x**0.5,
"pow": pow,
"ceil": lambda x: int(x) + (1 if x % 1 else 0),
"floor": lambda x: int(x),
}
)
result = frappe.safe_eval(formula, eval_globals=None, eval_locals=context)
if not isinstance(result, (int, float)): # noqa: UP038
return f"Formula must return a numeric value, got {type(result).__name__}"
return None
except Exception as e:
return str(e)
class AccountFilterValidator(Validator):
"""Validates account filter expressions used in Account Data rows"""
def __init__(self, account_fields: set | None = None):
self.account_fields = account_fields or set(frappe.get_meta("Account")._valid_columns)
def validate(self, row) -> ValidationResult:
result = ValidationResult()
if row.data_source != "Account Data":
return result
if not row.calculation_formula:
result.add_error(
ValidationIssue(
message="Account filter is required for Account Data",
row_idx=row.idx,
field="Formula",
)
)
return result
try:
filter_config = json.loads(row.calculation_formula)
error = self._validate_filter_structure(filter_config, self.account_fields)
if error:
result.add_error(
ValidationIssue(
message=error,
row_idx=row.idx,
field="Account Filter",
)
)
except json.JSONDecodeError as e:
result.add_error(
ValidationIssue(
message=f"Invalid JSON format: {e!s}",
row_idx=row.idx,
field="Account Filter",
)
)
return result
def _validate_filter_structure(self, filter_config, account_fields: set) -> str | None:
# simple condition: [field, operator, value]
if isinstance(filter_config, list):
if len(filter_config) != 3:
return "Filter must be [field, operator, value]"
field, operator, value = filter_config
if not isinstance(field, str) or not isinstance(operator, str):
return "Field and operator must be strings"
if field not in account_fields:
return f"Field '{field}' is not a valid account field"
if operator.casefold() not in OPERATOR_MAP:
return f"Invalid operator '{operator}'"
if operator in ["in", "not in"] and not isinstance(value, list):
return f"Operator '{operator}' requires a list value"
# logical condition: {"and": [condition1, condition2]}
elif isinstance(filter_config, dict):
if len(filter_config) != 1:
return "Logical condition must have exactly one operator"
op = next(iter(filter_config.keys())).lower()
if op not in ["and", "or"]:
return "Logical operators must be 'and' or 'or'"
conditions = filter_config[next(iter(filter_config.keys()))]
if not isinstance(conditions, list) or len(conditions) < 1:
return "Logical conditions need at least 1 sub-condition"
# recursive
for condition in conditions:
error = self._validate_filter_structure(condition, account_fields)
if error:
return error
else:
return "Filter must be a list or dict"
return None
class FormulaValidator(Validator):
def __init__(self, template):
self.template = template
reference_codes = {row.reference_code for row in template.rows if row.reference_code}
self.calculation_validator = CalculationFormulaValidator(reference_codes)
self.account_filter_validator = AccountFilterValidator()
def validate(self, row, account_fields: set) -> ValidationResult:
result = ValidationResult()
if not row.calculation_formula:
return result
if row.data_source == "Calculated Amount":
return self.calculation_validator.validate(row)
elif row.data_source == "Account Data":
# Update account fields if provided
if account_fields:
self.account_filter_validator.account_fields = account_fields
return self.account_filter_validator.validate(row)
elif row.data_source == "Custom API":
result.merge(self._validate_custom_api(row))
return result
def _validate_custom_api(self, row) -> ValidationResult:
result = ValidationResult()
api_path = row.calculation_formula
if "." not in api_path:
result.add_error(
ValidationIssue(
message="Custom API path should be in format: app.module.method",
row_idx=row.idx,
field="Formula",
)
)
return result
# Method exists?
try:
module_path, method_name = api_path.rsplit(".", 1)
module = frappe.get_module(module_path)
if not hasattr(module, method_name):
result.add_error(
ValidationIssue(
message=f"Method '{method_name}' not found in module '{module_path}' (might be environment-specific)",
row_idx=row.idx,
field="Formula",
)
)
except Exception as e:
result.add_error(
ValidationIssue(
message=f"Could not validate API path: {e!s}",
row_idx=row.idx,
field="Formula",
)
)
return result
def extract_reference_codes_from_formula(formula: str, available_codes: list[str]) -> list[str]:
found_codes = []
for code in available_codes:
# Match complete words only to avoid partial matches
pattern = r"\b" + re.escape(code) + r"\b"
if re.search(pattern, formula):
found_codes.append(code)
return found_codes

View File

@@ -0,0 +1,79 @@
# Copyright (c) 2025, Frappe Technologies Pvt. Ltd. and contributors
# For license information, please see license.txt
import frappe
from frappe.tests import IntegrationTestCase
from frappe.tests.utils import make_test_records
# On IntegrationTestCase, the doctype test records and all
# link-field test record dependencies are recursively loaded
# Use these module variables to add/remove to/from that list
EXTRA_TEST_RECORD_DEPENDENCIES = [] # eg. ["User"]
IGNORE_TEST_RECORD_DEPENDENCIES = [] # eg. ["User"]
class TestFinancialReportTemplate(IntegrationTestCase):
pass
class FinancialReportTemplateTestCase(IntegrationTestCase):
"""Utility class with common setup and helper methods for all test classes"""
@classmethod
def setUpClass(cls):
"""Set up test data"""
make_test_records("Company")
make_test_records("Fiscal Year")
cls.create_test_template()
@classmethod
def create_test_template(cls):
"""Create a test financial report template"""
if not frappe.db.exists("Financial Report Template", "Test P&L Template"):
template = frappe.get_doc(
{
"doctype": "Financial Report Template",
"template_name": "Test P&L Template",
"report_type": "Profit and Loss Statement",
"rows": [
{
"reference_code": "INC001",
"display_name": "Income",
"indentation_level": 0,
"data_source": "Account Data",
"balance_type": "Closing Balance",
"bold_text": 1,
"calculation_formula": '["root_type", "=", "Income"]',
},
{
"reference_code": "EXP001",
"display_name": "Expenses",
"indentation_level": 0,
"data_source": "Account Data",
"balance_type": "Closing Balance",
"bold_text": 1,
"calculation_formula": '["root_type", "=", "Expense"]',
},
{
"reference_code": "NET001",
"display_name": "Net Profit/Loss",
"indentation_level": 0,
"data_source": "Calculated Amount",
"bold_text": 1,
"calculation_formula": "INC001 - EXP001",
},
],
}
)
template.insert()
cls.test_template = frappe.get_doc("Financial Report Template", "Test P&L Template")
@staticmethod
def create_test_template_with_rows(rows_data):
"""Helper method to create test template with specific rows"""
template_name = f"Test Template {frappe.generate_hash()[:8]}"
template = frappe.get_doc(
{"doctype": "Financial Report Template", "template_name": template_name, "rows": rows_data}
)
return template

View File

@@ -99,7 +99,7 @@ class FiscalYear(Document):
)
overlap = False
if not self.get("companies") or not company_for_existing:
if not self.get("companies") and not company_for_existing:
overlap = True
for d in self.get("companies"):

View File

@@ -25,6 +25,27 @@ class TestFiscalYear(IntegrationTestCase):
self.assertRaises(frappe.exceptions.InvalidDates, fy.insert)
def test_company_fiscal_year_overlap(self):
for name in ["_Test Global FY 2001", "_Test Company FY 2001"]:
if frappe.db.exists("Fiscal Year", name):
frappe.delete_doc("Fiscal Year", name)
global_fy = frappe.new_doc("Fiscal Year")
global_fy.year = "_Test Global FY 2001"
global_fy.year_start_date = "2001-04-01"
global_fy.year_end_date = "2002-03-31"
global_fy.insert()
company_fy = frappe.new_doc("Fiscal Year")
company_fy.year = "_Test Company FY 2001"
company_fy.year_start_date = "2001-01-01"
company_fy.year_end_date = "2001-12-31"
company_fy.append("companies", {"company": "_Test Company"})
company_fy.insert()
self.assertTrue(frappe.db.exists("Fiscal Year", global_fy.name))
self.assertTrue(frappe.db.exists("Fiscal Year", company_fy.name))
def test_record_generator():
test_records = [

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,13 +92,15 @@ 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":
self.validate_account_details(adv_adj)
self.validate_dimensions_for_pl_and_bs()
validate_balance_type(self.account, adv_adj)
validate_frozen_account(self.account, adv_adj)
validate_frozen_account(self.company, self.account, adv_adj)
if (
self.voucher_type == "Journal Entry"
@@ -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"])
@@ -271,7 +276,7 @@ class GLEntry(Document):
)
def validate_party(self):
validate_party_frozen_disabled(self.party_type, self.party)
validate_party_frozen_disabled(self.company, self.party_type, self.party)
validate_account_party_type(self)
def validate_currency(self):
@@ -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
@@ -395,16 +419,16 @@ def update_outstanding_amt(
ref_doc.set_status(update=True)
def validate_frozen_account(account, adv_adj=None):
def validate_frozen_account(company, account, adv_adj=None):
frozen_account = frappe.get_cached_value("Account", account, "freeze_account")
if frozen_account == "Yes" and not adv_adj:
frozen_accounts_modifier = frappe.get_cached_value(
"Accounts Settings", None, "frozen_accounts_modifier"
role_allowed_for_frozen_entries = frappe.get_cached_value(
"Company", company, "role_allowed_for_frozen_entries"
)
if not frozen_accounts_modifier:
if not role_allowed_for_frozen_entries:
frappe.throw(_("Account {0} is frozen").format(account))
elif frozen_accounts_modifier not in frappe.get_roles():
elif role_allowed_for_frozen_entries not in frappe.get_roles():
frappe.throw(_("Not authorized to edit frozen Account {0}").format(account))
@@ -418,7 +442,7 @@ def update_against_account(voucher_type, voucher_no):
if not entries:
return
company_currency = erpnext.get_company_currency(entries[0].company)
precision = get_field_precision(frappe.get_meta("GL Entry").get_field("debit"), company_currency)
precision = get_field_precision(frappe.get_meta("GL Entry").get_field("debit"), currency=company_currency)
accounts_debited, accounts_credited = [], []
for d in entries:

View File

@@ -0,0 +1,63 @@
{
"actions": [],
"creation": "2025-07-17 12:24:05.609186",
"doctype": "DocType",
"engine": "InnoDB",
"field_order": [
"item_row",
"tax_row",
"rate",
"amount",
"taxable_amount"
],
"fields": [
{
"fieldname": "item_row",
"fieldtype": "Data",
"in_list_view": 1,
"label": "Item Row",
"reqd": 1
},
{
"fieldname": "tax_row",
"fieldtype": "Data",
"in_list_view": 1,
"label": "Tax Row",
"reqd": 1
},
{
"fieldname": "rate",
"fieldtype": "Float",
"in_list_view": 1,
"label": "Tax Rate"
},
{
"fieldname": "amount",
"fieldtype": "Currency",
"in_list_view": 1,
"label": "Tax Amount",
"options": "Company:company:default_currency"
},
{
"fieldname": "taxable_amount",
"fieldtype": "Currency",
"in_list_view": 1,
"label": "Taxable Amount",
"options": "Company:company:default_currency"
}
],
"grid_page_length": 50,
"index_web_pages_for_search": 1,
"istable": 1,
"links": [],
"modified": "2025-09-26 15:54:19.750714",
"modified_by": "Administrator",
"module": "Accounts",
"name": "Item Wise Tax Detail",
"owner": "Administrator",
"permissions": [],
"row_format": "Dynamic",
"sort_field": "creation",
"sort_order": "DESC",
"states": []
}

View File

@@ -0,0 +1,27 @@
# Copyright (c) 2025, Frappe Technologies Pvt. Ltd. and contributors
# For license information, please see license.txt
# import frappe
from frappe.model.document import Document
class ItemWiseTaxDetail(Document):
# begin: auto-generated types
# This code is auto-generated. Do not modify anything in this block.
from typing import TYPE_CHECKING
if TYPE_CHECKING:
from frappe.types import DF
amount: DF.Currency
item_row: DF.Data
parent: DF.Data
parentfield: DF.Data
parenttype: DF.Data
rate: DF.Float
tax_row: DF.Data
taxable_amount: DF.Currency
# end: auto-generated types
pass

View File

@@ -111,6 +111,10 @@ frappe.ui.form.on("Journal Entry", {
}
erpnext.accounts.unreconcile_payment.add_unreconcile_btn(frm);
$.each(frm.doc.accounts || [], function (i, row) {
erpnext.journal_entry.set_exchange_rate(frm, row.doctype, row.name);
});
},
before_save: function (frm) {
if (frm.doc.docstatus == 0 && !frm.doc.is_system_generated) {
@@ -196,6 +200,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) {
@@ -715,6 +720,8 @@ $.extend(erpnext.journal_entry, {
}
},
});
} else {
erpnext.journal_entry.clear_fields(frm, dt, dn);
}
},
set_amount_on_last_row: function (frm, dt, dn) {
@@ -739,4 +746,13 @@ $.extend(erpnext.journal_entry, {
}
refresh_field("accounts");
},
clear_fields: function (frm, dt, dn) {
let row = locals[dt][dn];
row.party_type = null;
row.party = null;
row.bank_account = null;
frm.refresh_field("accounts");
},
});

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

@@ -33,6 +33,7 @@ from erpnext.assets.doctype.asset_depreciation_schedule.asset_depreciation_sched
get_depr_schedule,
)
from erpnext.controllers.accounts_controller import AccountsController
from erpnext.setup.utils import get_exchange_rate as _get_exchange_rate
class StockAccountInvalidTransaction(frappe.ValidationError):
@@ -72,6 +73,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 +195,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 +298,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 +307,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(
@@ -368,93 +354,7 @@ class JournalEntry(AccountsController):
)
def apply_tax_withholding(self):
from erpnext.accounts.report.general_ledger.general_ledger import get_account_type_map
if not self.apply_tds or self.voucher_type not in ("Debit Note", "Credit Note"):
return
parties = [d.party for d in self.get("accounts") if d.party]
parties = list(set(parties))
if len(parties) > 1:
frappe.throw(_("Cannot apply TDS against multiple parties in one entry"))
account_type_map = get_account_type_map(self.company)
party_type = "supplier" if self.voucher_type == "Credit Note" else "customer"
doctype = "Purchase Invoice" if self.voucher_type == "Credit Note" else "Sales Invoice"
debit_or_credit = (
"debit_in_account_currency"
if self.voucher_type == "Credit Note"
else "credit_in_account_currency"
)
rev_debit_or_credit = (
"credit_in_account_currency"
if debit_or_credit == "debit_in_account_currency"
else "debit_in_account_currency"
)
party_account = get_party_account(party_type.title(), parties[0], self.company)
net_total = sum(
d.get(debit_or_credit)
for d in self.get("accounts")
if account_type_map.get(d.account) not in ("Tax", "Chargeable")
)
party_amount = sum(
d.get(rev_debit_or_credit) for d in self.get("accounts") if d.account == party_account
)
inv = frappe._dict(
{
party_type: parties[0],
"doctype": doctype,
"company": self.company,
"posting_date": self.posting_date,
"net_total": net_total,
}
)
tax_withholding_details, advance_taxes, voucher_wise_amount = get_party_tax_withholding_details(
inv, self.tax_withholding_category
)
if not tax_withholding_details:
return
accounts = []
for d in self.get("accounts"):
if d.get("account") == tax_withholding_details.get("account_head"):
d.update(
{
"account": tax_withholding_details.get("account_head"),
debit_or_credit: tax_withholding_details.get("tax_amount"),
}
)
accounts.append(d.get("account"))
if d.get("account") == party_account:
d.update({rev_debit_or_credit: party_amount - tax_withholding_details.get("tax_amount")})
if not accounts or tax_withholding_details.get("account_head") not in accounts:
self.append(
"accounts",
{
"account": tax_withholding_details.get("account_head"),
rev_debit_or_credit: tax_withholding_details.get("tax_amount"),
"against_account": parties[0],
},
)
to_remove = [
d
for d in self.get("accounts")
if not d.get(rev_debit_or_credit) and d.account == tax_withholding_details.get("account_head")
]
for d in to_remove:
self.remove(d)
JournalEntryTaxWithholding(self).apply()
def update_asset_value(self):
self.update_asset_on_depreciation()
@@ -468,7 +368,7 @@ class JournalEntry(AccountsController):
if (
d.reference_type == "Asset"
and d.reference_name
and d.account_type == "Depreciation"
and frappe.get_cached_value("Account", d.account, "root_type") == "Expense"
and d.debit
):
asset = frappe.get_cached_doc("Asset", d.reference_name)
@@ -660,8 +560,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 +573,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 +1100,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 +1188,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))
@@ -1370,6 +1297,230 @@ class JournalEntry(AccountsController):
frappe.throw(_("Accounts table cannot be blank."))
class JournalEntryTaxWithholding:
def __init__(self, journal_entry):
self.doc: JournalEntry = journal_entry
self.party = None
self.party_type = None
self.party_account = None
self.party_row = None
self.existing_tds_rows = []
self.precision = None
self.has_multiple_parties = False
# Direction fields based on party type
self.party_field = None # "credit" for Supplier, "debit" for Customer
self.reverse_field = None # opposite of party_field
def apply(self):
if not self._set_party_info():
return
self._setup_direction_fields()
self._reset_existing_tds()
if not self._should_apply_tds():
self._cleanup_duplicate_tds_rows(None)
return
if self.has_multiple_parties:
frappe.throw(_("Cannot apply TDS against multiple parties in one entry"))
net_total = self._calculate_net_total()
if net_total <= 0:
return
tds_details = self._get_tds_details(net_total)
if not tds_details or not tds_details.get("tax_amount"):
return
self._create_or_update_tds_row(tds_details)
self._update_party_amount(tds_details.get("tax_amount"), is_reversal=False)
self._recalculate_totals()
def _should_apply_tds(self):
return self.doc.apply_tds and self.doc.voucher_type in ("Debit Note", "Credit Note")
def _set_party_info(self):
for row in self.doc.get("accounts"):
if row.party_type in ("Customer", "Supplier") and row.party:
if self.party and row.party != self.party:
self.has_multiple_parties = True
if not self.party:
self.party = row.party
self.party_type = row.party_type
self.party_account = row.account
self.party_row = row
if row.get("is_tax_withholding_account"):
self.existing_tds_rows.append(row)
return bool(self.party)
def _setup_direction_fields(self):
"""
For Supplier (TDS): party has credit, TDS reduces credit
For Customer (TCS): party has debit, TCS increases debit
"""
if self.party_type == "Supplier":
self.party_field = "credit"
self.reverse_field = "debit"
else: # Customer
self.party_field = "debit"
self.reverse_field = "credit"
self.precision = self.doc.precision(self.party_field, self.party_row)
def _reset_existing_tds(self):
for row in self.existing_tds_rows:
# TDS amount is always in credit (liability to government)
tds_amount = flt(row.get("credit") - row.get("debit"), self.precision)
if not tds_amount:
continue
self._update_party_amount(tds_amount, is_reversal=True)
# zero_out_tds_row
row.update(
{
"credit": 0,
"credit_in_account_currency": 0,
"debit": 0,
"debit_in_account_currency": 0,
}
)
def _update_party_amount(self, amount, is_reversal=False):
amount = flt(amount, self.precision)
amount_in_party_currency = flt(amount / self.party_row.get("exchange_rate", 1), self.precision)
# Determine which field the party amount is in
active_field = self.party_field if self.party_row.get(self.party_field) else self.reverse_field
# If amount is in reverse field, flip the signs
if active_field == self.reverse_field:
amount = -amount
amount_in_party_currency = -amount_in_party_currency
# Direction multiplier based on party type:
# Customer (TCS): +1 (add to debit)
# Supplier (TDS): -1 (subtract from credit)
direction = 1 if self.party_type == "Customer" else -1
# Reversal inverts the direction
if is_reversal:
direction = -direction
adjustment = amount * direction
adjustment_in_party_currency = amount_in_party_currency * direction
active_field_account_currency = f"{active_field}_in_account_currency"
self.party_row.update(
{
active_field: flt(self.party_row.get(active_field) + adjustment, self.precision),
active_field_account_currency: flt(
self.party_row.get(active_field_account_currency) + adjustment_in_party_currency,
self.precision,
),
}
)
def _calculate_net_total(self):
from erpnext.accounts.report.general_ledger.general_ledger import get_account_type_map
account_type_map = get_account_type_map(self.doc.company)
return flt(
sum(
d.get(self.reverse_field) - d.get(self.party_field)
for d in self.doc.get("accounts")
if account_type_map.get(d.account) not in ("Tax", "Chargeable")
and d.account != self.party_account
and not d.get("is_tax_withholding_account")
),
self.precision,
)
def _get_tds_details(self, net_total):
return get_party_tax_withholding_details(
frappe._dict(
{
"party_type": self.party_type,
"party": self.party,
"doctype": self.doc.doctype,
"company": self.doc.company,
"posting_date": self.doc.posting_date,
"tax_withholding_net_total": net_total,
"base_tax_withholding_net_total": net_total,
"grand_total": net_total,
}
),
self.doc.tax_withholding_category,
)
def _create_or_update_tds_row(self, tds_details):
tax_account = tds_details.get("account_head")
account_currency = get_account_currency(tax_account)
company_currency = frappe.get_cached_value("Company", self.doc.company, "default_currency")
exchange_rate = _get_exchange_rate(account_currency, company_currency, self.doc.posting_date)
tax_amount = flt(tds_details.get("tax_amount"), self.precision)
tax_amount_in_account_currency = flt(tax_amount / exchange_rate, self.precision)
# Find existing TDS row for this account
tax_row = None
for row in self.doc.get("accounts"):
if row.account == tax_account and row.get("is_tax_withholding_account"):
tax_row = row
break
if not tax_row:
tax_row = self.doc.append(
"accounts",
{
"account": tax_account,
"account_currency": account_currency,
"exchange_rate": exchange_rate,
"cost_center": tds_details.get("cost_center"),
"credit": 0,
"credit_in_account_currency": 0,
"debit": 0,
"debit_in_account_currency": 0,
"is_tax_withholding_account": 1,
},
)
# TDS/TCS is always credited (liability to government)
tax_row.update(
{
"credit": tax_amount,
"credit_in_account_currency": tax_amount_in_account_currency,
"debit": 0,
"debit_in_account_currency": 0,
}
)
self._cleanup_duplicate_tds_rows(tax_row)
def _cleanup_duplicate_tds_rows(self, current_tax_row):
rows_to_remove = [
row
for row in self.doc.get("accounts")
if row.get("is_tax_withholding_account") and row != current_tax_row
]
for row in rows_to_remove:
self.doc.remove(row)
def _recalculate_totals(self):
self.doc.set_amounts_in_company_currency()
self.doc.set_total_debit_credit()
self.doc.set_against_account()
@frappe.whitelist()
def get_default_bank_cash_account(
company, account_type=None, mode_of_payment=None, account=None, *, fetch_balance=True
@@ -1707,6 +1858,9 @@ def get_account_details_and_party_type(account, date, company, debit=None, credi
"party_type": party_type,
"account_type": account_details.account_type,
"account_currency": account_details.account_currency or company_currency,
"bank_account": (
frappe.db.get_value("Bank Account", {"account": account, "company": company}) or None
),
# The date used to retreive the exchange rate here is the date passed in
# as an argument to this function. It is assumed to be the date on which the balance is sought
"exchange_rate": get_exchange_rate(
@@ -1739,8 +1893,6 @@ def get_exchange_rate(
credit=None,
exchange_rate=None,
):
from erpnext.setup.utils import get_exchange_rate
account_details = frappe.get_cached_value(
"Account", account, ["account_type", "root_type", "account_currency", "company"], as_dict=1
)
@@ -1762,8 +1914,8 @@ def get_exchange_rate(
# The date used to retreive the exchange rate here is the date passed
# in as an argument to this function.
elif (not exchange_rate or flt(exchange_rate) == 1) and account_currency and posting_date:
exchange_rate = get_exchange_rate(account_currency, company_currency, posting_date)
elif (not flt(exchange_rate) or flt(exchange_rate) == 1) and account_currency and posting_date:
exchange_rate = _get_exchange_rate(account_currency, company_currency, posting_date)
else:
exchange_rate = 1
@@ -1794,6 +1946,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,9 @@
"reference_name",
"reference_due_date",
"reference_detail_no",
"advance_voucher_type",
"advance_voucher_no",
"is_tax_withholding_account",
"col_break3",
"is_advance",
"user_remark",
@@ -104,7 +107,6 @@
"fieldname": "account_currency",
"fieldtype": "Link",
"label": "Account Currency",
"no_copy": 1,
"options": "Currency",
"print_hide": 1,
"read_only": 1
@@ -262,20 +264,46 @@
"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,
"search_index": 1
},
{
"fieldname": "advance_voucher_no",
"fieldtype": "Dynamic Link",
"label": "Advance Voucher No",
"no_copy": 1,
"options": "advance_voucher_type",
"read_only": 1,
"search_index": 1
},
{
"default": "0",
"fieldname": "is_tax_withholding_account",
"fieldtype": "Check",
"label": "Is Tax Withholding Account",
"read_only": 1
}
],
"idx": 1,
"istable": 1,
"links": [],
"modified": "2024-03-27 13:09:58.647732",
"modified": "2025-11-27 12:23:33.157655",
"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
@@ -27,11 +28,11 @@ class JournalEntryAccount(Document):
debit_in_account_currency: DF.Currency
exchange_rate: DF.Float
is_advance: DF.Literal["No", "Yes"]
is_tax_withholding_account: DF.Check
parent: DF.Data
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",

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