Compare commits

...

1880 Commits

Author SHA1 Message Date
coderabbitai[bot]
16f13c75de 📝 Add docstrings to fix-mt940-statement-number-parsing
Docstrings generation was requested by @srujan00123.

* https://github.com/frappe/erpnext/pull/49682#issuecomment-3322321445

The following files were modified:

* `erpnext/accounts/doctype/bank_statement_import/bank_statement_import.py`
* `erpnext/accounts/doctype/bank_statement_import/test_bank_statement_import.py`
2025-09-23 03:58:23 +00:00
MochaMind
609164fb9a fix: sync translations from crowdin (#49660) 2025-09-22 16:21:27 +02:00
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
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
Mihir Kandoi
7e63f1d220 Merge pull request #49615 from aerele/fixed-support-48949
fix(stock): NoneType object error on stock entry
2025-09-18 20:16:40 +05:30
MochaMind
3d8502f408 fix: sync translations from crowdin (#49607) 2025-09-18 15:44:21 +02:00
ruthra kumar
c3e869c701 Merge pull request #49467 from aerele/qb-user-perm
fix: add condition for name
2025-09-18 16:41:16 +05:30
Kavin
aee03417de fix(stock): NoneType object error on stock entry 2025-09-18 16:31:07 +05:30
Diptanil Saha
14d8b87c8e Merge pull request #49608 from diptanilsaha/psoa_ar_show_future_payments
fix(process statement of accounts): total row in accounts receivable with future payments
2025-09-18 15:31:16 +05:30
rohitwaghchaure
2a86a1fb98 Merge pull request #49609 from rohitwaghchaure/fixed-drop-indexes-from-sle
fix: drop index batch_no_item_code_warehouse_index
2025-09-18 13:26:19 +05:30
Rohit Waghchaure
28180ccaa4 fix: drop index batch_no_item_code_warehouse_index 2025-09-18 13:08:26 +05:30
diptanilsaha
7bf17372b0 fix(process statement of accounts): total row in accounts receivable with future payments 2025-09-18 11:30:53 +05:30
venkat102
a5b881ea74 test: add test to validate user permission in qb 2025-09-18 00:02:10 +05:30
rohitwaghchaure
ac40b46a6d Merge pull request #49589 from rohitwaghchaure/fixed-op-cost-for-sfg
fix: operation cost for Semi FG item
2025-09-17 22:18:51 +05:30
Rohit Waghchaure
69682cb064 fix: operation cost for Semi FG item 2025-09-17 21:57:34 +05:30
Raheel Khan
8b543e5503 fix: skip receivable/payable account validation in payroll entry if party is not available (#49585)
* fix: skip receivable/payable account validation if party is not available in creation of payroll entry

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

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

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

* fix: add project field for missing doctype

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

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

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

* fix: Arabic translations

* fix: Czech translations

* fix: Danish translations

* fix: German translations

* fix: Hungarian translations

* fix: Italian translations

* fix: Dutch translations

* fix: Polish translations

* fix: Portuguese translations

* fix: Russian translations

* fix: Serbian (Cyrillic) translations

* fix: Swedish translations

* fix: Turkish translations

* fix: Chinese Simplified translations

* fix: Vietnamese translations

* fix: Portuguese, Brazilian translations

* fix: Indonesian translations

* fix: Persian translations

* fix: Thai translations

* fix: Croatian translations

* fix: Bosnian translations

* fix: Norwegian Bokmal translations

* fix: Serbian (Latin) translations

* fix: French translations

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

* refactor: fixed formatting

---------

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

* fix: linters

* fix: select only outgoing account

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

* ci: disable high level summary

* ci: disable reviews on style PRs

* ci: fake tests on ignored paths

---------

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

* feat: add make methods for Bank Account

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

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

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

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

* fix: updated DocField via Desk UI as suggested

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

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

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

* fix: ignore period closing voucher

* chore: rename filter check box

* feat: add total for opening and closing balance

* fix: update section name

* fix: remove section rename

---------

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

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

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

* chore: removing backportrc line

* test: adding test_journal_voucher_against_return_invoice()

* fix: fixed test_journal_voucher_against_return_invoice function

* Revert .gitignore changes

---------

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

# Conflicts:
#	erpnext/accounts/report/customer_ledger_summary/test_customer_ledger_summary.py
2025-07-28 09:07:05 +00:00
l0gesh29
468e5e9b2e feat: add show_amount_in_company_currency in gl report 2025-07-28 13:54:02 +05:30
l0gesh29
048b87328b fix: remove alias for order by field 2025-07-28 12:57:06 +05:30
mithili
2c54f49cbc fix: avoid auto_repeat on duplicate 2025-07-28 12:30:14 +05:30
Diptanil Saha
fccfcd6b0e Merge pull request #48675 from aerele/item-price-internal-transaction
feat(internal-transaction): fetch valuation rate for internal transaction
2025-07-28 11:48:30 +05:30
Dany Robert
1170e4fb2c fix(regional-uae): restrict zero rated export to invoice 2025-07-28 05:32:04 +00:00
ruthra kumar
20c2af9cd4 Merge pull request #48788 from frappe/l10n_develop
fix: sync translations from crowdin
2025-07-28 10:36:46 +05:30
MochaMind
1d991af821 fix: Persian translations 2025-07-27 18:54:32 +05:30
Rohit Waghchaure
a186b1266d fix: prevent concurrency issues 2025-07-27 18:46:43 +05:30
ljain112
dc841fe661 fix: attribute error in payment entry 2025-07-26 12:56:10 +05:30
ruthra kumar
ac448988ca Merge pull request #48780 from frappe/l10n_develop
fix: sync translations from crowdin
2025-07-25 19:41:13 +05:30
MochaMind
cc48cfaa5d fix: Indonesian translations 2025-07-25 18:49:01 +05:30
ravibharathi656
5ed34d6ff9 fix: fetch payment term template from order 2025-07-25 13:30:05 +05:30
rohitwaghchaure
46e6e48495 Merge pull request #48773 from ShreyasTheNewbie/create_job_card
fix: create job card for selected operations only
2025-07-25 10:05:36 +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
Shreyas Sojitra
27e5344188 fix: create job card for selected operations only 2025-07-24 10:05:03 +00:00
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
Kitti U. @ Ecosoft
ed79adebc4 refactor: call hooks after gle & sle rename (#48706) 2025-07-23 11:18:06 +05:30
ravibharathi656
f5beda48dc fix(pick list): make warehouse editable 2025-07-23 08:34:52 +05:30
ruthra kumar
d45d20e4db Merge pull request #48650 from aerele/payment-entry-outstanding-amount
fix: update outstanding amount on payment reconcillation
2025-07-23 06:52:29 +05:30
ruthra kumar
f41c6c037b Merge pull request #48732 from aerele/dimension-wise-acc-balance-report
fix: resolve sql syntax on accounting dimension
2025-07-23 06:43:33 +05:30
MochaMind
313913b329 fix: sync translations from crowdin (#48724) 2025-07-22 23:22:26 +02:00
Dev Dusija
c9c45fe89f fix: account currency validation to exclude cancelled entries 2025-07-22 23:56:48 +05:30
ruthra kumar
56ddb16186 Merge pull request #48733 from aerele/item-wise-sales-purchase-register
fix: add alias for order by field
2025-07-22 17:53:41 +05:30
ruthra kumar
4f1acc9349 Merge pull request #48665 from aerele/exchange-gain-or-loss-account
fix: show amount for exchange gain or loss account
2025-07-22 12:13:02 +05:30
rohitwaghchaure
ecff9dfdd8 Merge pull request #48723 from aerele/company-filter-job-card
fix(job card): company filter
2025-07-22 09:48:10 +05:30
rohitwaghchaure
73d2878e08 Merge pull request #48720 from rohitwaghchaure/fixed-support-44556
fix: valuation for rejected materials
2025-07-22 09:47:26 +05:30
l0gesh29
feaf39a812 fix: add alias for order by field 2025-07-22 01:23:19 +05:30
l0gesh29
1662b7c311 fix: resolve sql syntax on accounting dimension 2025-07-21 23:58:19 +05:30
Dany Robert
dc72e6cf36 fix(regional-uae): split export determination 2025-07-21 14:47:14 +00:00
pugazhendhivelu
4edbe77f67 chore: rename function set company filters 2025-07-21 20:10:08 +05:30
rohitwaghchaure
fa228da29c Merge pull request #48382 from karm1000/feat/stock-balance-multiselect-items-warehouses
feat: stock balance and stock ledger report with multi-select items and warehouses
2025-07-21 20:02:25 +05:30
rohitwaghchaure
9aea4ba51a Merge pull request #48704 from aerele/production-plan-sub-assembly-warehouse
fix(production plan): add company filter to sub assembly warehouse
2025-07-21 19:56:35 +05:30
Rohit Waghchaure
b7039cc506 fix: valuation for rejected materials 2025-07-21 19:53:04 +05:30
Dany Robert
b8224693c4 fix(regional-uae): mark export items as zero rated 2025-07-21 14:22:05 +00:00
ruthra kumar
1e44e3c1f6 Merge pull request #48690 from aerele/sales-order-item-schedule-date
fix: set delivery date if missing
2025-07-21 19:43:04 +05:30
ruthra kumar
a8e2386daa Merge pull request #48671 from aerele/journal-entry-print-settings
revert: do not set pay_to_recd_from to None
2025-07-21 19:39:23 +05:30
ravibharathi656
7e12332ea5 test: add test for pay_to_recd_from 2025-07-21 18:45:31 +05:30
ravibharathi656
03d6550db3 revert: do not set pay_to_recd_from to None 2025-07-21 18:45:30 +05:30
pugazhendhivelu
b1311ceb30 fix(job card): company filter 2025-07-21 17:34:49 +05:30
MochaMind
5089cf2155 fix: sync translations from crowdin (#48685) 2025-07-21 12:57:24 +02:00
Khushi Rawat
204de4934a Merge pull request #48649 from khushi8112/post-gl-entry-on-completion-date-of-asset-repair
fix: post gl entry on completion date instead of current date
2025-07-21 15:14:14 +05:30
MochaMind
8f3ed909c3 chore: update POT file (#48712) 2025-07-20 11:59:11 +02:00
ravibharathi656
1728a95111 fix(production plan): add company filter to sub assembly warehouse 2025-07-19 08:18:22 +05:30
Vishist Singh Solanki
94ec76545c fix: prevent negative scrap quantity in Job Card (#48545) 2025-07-18 16:07:14 +00:00
Mihir Kandoi
4174269091 fix: job card linter error (#47561) 2025-07-18 14:51:41 +00:00
Corentin Forler
bc2cb1737a fix: Use correct Attachments folder in code list import 2025-07-18 16:17:42 +02:00
ravibharathi656
cf6913891a fix: set delivery date if missing 2025-07-18 18:37:29 +05:30
Corentin Forler
205037fd6b fix: Add title to payment schedule error message 2025-07-18 14:07:11 +02:00
Diptanil Saha
7591656491 feat: tabs in pos invoice doctype (#48683) 2025-07-18 17:12:13 +05:30
khushi8112
766c5bbe2b fix: make completion mandatory and fix test case 2025-07-18 17:10:58 +05:30
Mihir Kandoi
446264e496 fix: patch to set default buying price list in material request (#48680)
* fix: patch to set default buying price list in material request
2025-07-18 11:13:27 +00: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
e01ff50833 Merge pull request #48653 from mihir-kandoi/st43557-2
feat: button to recalculate costing and billing fields in project
2025-07-18 16:25:04 +05:30
Karm Soni
8a97b39028 fix: update get_data function to use item_query 2025-07-18 16:10:32 +05:30
Mihir Kandoi
f6e16c1180 chore: rename recalculating to updating 2025-07-18 16:08:04 +05:30
Mihir Kandoi
dd23d4c81b feat: option to recalculate costing and billing fields in project 2025-07-18 16:08:04 +05:30
Mihir Kandoi
dfd115cee5 Merge pull request #48631 from mihir-kandoi/st43869-2
feat: consider process less when calculating pending qty in work order
2025-07-18 15:53:00 +05:30
Diptanil Saha
37a964c300 Merge pull request #48677 from diptanilsaha/fix_coa_company_view_ledger_btn
fix: view ledger button of company on chart of accounts
2025-07-18 15:41:53 +05:30
Mihir Kandoi
b53723acad fix: include cost center in patch 2025-07-18 15:33:31 +05:30
diptanilsaha
98eb115746 fix: view ledger button of company on chart of accounts 2025-07-18 15:28:57 +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
Diptanil Saha
9dc583ffcb fix: remove incorrect report conditions and unset sales partner on consolidated sales invoice (#48669)
* fix: undo query changes for sales partner related reports

* fix: patch to remove sales partner from consolidated sales invoice
2025-07-18 00:30:04 +05:30
Diptanil Saha
971024ab99 Merge pull request #48667 from diptanilsaha/fix_pos_sales_partner
fix: sales partner on pos invoice
2025-07-17 20:33:01 +05:30
l0gesh29
b6da350c20 fix: add validation for account key 2025-07-17 18:52:41 +05:30
l0gesh29
4f90f50eb2 fix: show amount for exchange gain or loss account 2025-07-17 18:15:06 +05:30
diptanilsaha
84b9a2aefb fix: unset commission and sales partner on consolidated sales invoice 2025-07-17 18:09:11 +05:30
diptanilsaha
e70416c78c fix: fixed the query for sales invoice in sale partner related reports 2025-07-17 17:53:54 +05:30
diptanilsaha
4fb1202c30 fix: added POS Invoice option on sales partner related reports 2025-07-17 17:53:54 +05:30
diptanilsaha
2245731fc8 fix: prepare sales partner commission report from pos invoice and sales invoice 2025-07-17 17:53:54 +05:30
diptanilsaha
2b87de1000 fix: pos invoice fetch commission_rate from sales_partner doctype on empty 2025-07-17 17:53:14 +05:30
Karm Soni
063c4e9720 refactor: revert indentation 2025-07-17 15:39:12 +05:30
rohitwaghchaure
cc2ca58721 Merge pull request #48655 from rohitwaghchaure/fixed-support-44001
fix: precision issue for Sales Incoming Rate
2025-07-17 15:34:31 +05:30
Rohit Waghchaure
7b99275ceb fix: precision issue for Sales Incoming Rate 2025-07-17 15:10:06 +05:30
ravibharathi656
478766c600 fix: update outstanding amount on payment reconcillation 2025-07-17 14:48:56 +05:30
rohitwaghchaure
0ae080723c Merge pull request #48616 from rohitwaghchaure/fixed-support-44081
fix: stand-alone credit note gl entries
2025-07-17 13:57:52 +05:30
Rohit Waghchaure
f3d6a64156 fix: stand-alone credit note gl entries 2025-07-17 13:33:10 +05:30
khushi8112
da8f7b29c1 fix: post gl entry on completion date instead of current date 2025-07-17 13:10:50 +05:30
Mihir Kandoi
8900744fc4 Merge pull request #48645 from mihir-kandoi/st43688
fix: do not consider cancelled SLEs in report
2025-07-17 11:38:33 +05:30
Mihir Kandoi
71578cb2ef fix: do not consider cancelled SLEs in report 2025-07-17 11:20:05 +05:30
ruthra kumar
8d091f6821 Merge pull request #48637 from frappe/l10n_develop
fix: sync translations from crowdin
2025-07-16 20:28:46 +05:30
ruthra kumar
9c7c22ed20 Merge pull request #48612 from aerele/pcv-forex-accounts
fix(period closing voucher): closing account head debit and debit in account currency should be equal
2025-07-16 20:13:06 +05:30
MochaMind
f9a78e9b45 fix: Persian translations 2025-07-16 17:02:01 +05:30
MochaMind
13afd3301f fix: Portuguese translations 2025-07-16 17:01:57 +05:30
rohitwaghchaure
a27f3f737f Merge pull request #48633 from rohitwaghchaure/fixed-support-42610
fix: performance issue while submitting the purchase invoice
2025-07-16 16:45:36 +05:30
Karm Soni
bc46045cc7 refactor: remove unused imports in stock_balance.py 2025-07-16 16:12:43 +05:30
Rohit Waghchaure
47979871de fix: performance issue while submitting the purchase invoice 2025-07-16 15:55:21 +05:30
Diptanil Saha
c9675b3f7d feat: account name and number columns on financial statements report on export (#48630)
* feat: account name and number columns on trial balance report on export

* feat: account name and number columns on financial statement reports on export

* test: fixed test_profit_and_loss_output_and_summary for new columns
2025-07-16 15:24:43 +05:30
diptanilsaha
79f73ccca1 test: fixed test_profit_and_loss_output_and_summary for new columns 2025-07-16 15:06:28 +05:30
Mihir Kandoi
74c4ca68e5 feat: consider process less when calculating pending qty in work order 2025-07-16 14:46:37 +05:30
Mihir Kandoi
2a186ab8dd Merge pull request #48628 from mihir-kandoi/fix-get-reserved-serial-nos
fix: serial no reserved error when reservation is transferred
2025-07-16 13:22:42 +05:30
diptanilsaha
6b98323806 feat: account name and number columns on financial statement reports on export 2025-07-16 13:22:31 +05:30
Mihir Kandoi
52ac389661 fix: serial no reserved error when reservation is transferred 2025-07-16 12:57:58 +05:30
diptanilsaha
393c1d4bee feat: account name and number columns on trial balance report on export 2025-07-16 12:46:56 +05:30
Diptanil Saha
9b8e0eb5c5 revert: "feat: trial balance report account name and number in separate column" (#48624)
Revert "feat: trial balance report account name and number in separate column"
2025-07-16 11:43:36 +05:30
Diptanil Saha
33f2a23bd8 fix: pos customer selection on new order (#48622) 2025-07-16 11:04:56 +05:30
Mihir Kandoi
d40538968f Merge pull request #48621 from mihir-kandoi/fix-get-batch-against-sales-order-2
fix: possible issue in getting reserved batch against sales order
2025-07-16 10:21:25 +05:30
Mihir Kandoi
28ee5fbf2e fix: possible issue in getting reserved batch against sales order 2025-07-16 10:05:36 +05:30
Nikhil Kothari
982550b92c fix(accounts): allow default bank account per company 2025-07-15 21:32:07 -05:00
MochaMind
26f234fdbd fix: sync translations from crowdin (#48605)
* fix: French translations

* fix: Portuguese translations

* fix: Persian translations

* fix: Arabic translations

* fix: Turkish translations

* fix: Polish translations

* fix: Swedish translations

* fix: Vietnamese translations

* fix: Chinese Simplified translations

* fix: Spanish translations

* fix: Czech translations

* fix: German translations

* fix: Hungarian translations

* fix: Italian translations

* fix: Dutch translations

* fix: Russian translations

* fix: Serbian (Cyrillic) translations

* fix: Portuguese, Brazilian translations

* fix: Thai translations

* fix: Croatian translations

* fix: Bosnian translations

* fix: Serbian (Latin) translations

* fix: Esperanto translations
2025-07-15 17:44:34 +02:00
venkat102
d6fd613272 fix(period closing voucher): closing account head debit and debit in account currency should be equal 2025-07-15 18:16:23 +05:30
rohitwaghchaure
480e76d98e Merge pull request #48611 from rohitwaghchaure/fixed-job-card-stock-entry
fix: confirmation dialog for submitting the stock entry
2025-07-15 18:12:10 +05:30
rohitwaghchaure
8b06468490 Merge pull request #48610 from rohitwaghchaure/fixed-support-43674-1
fix: added serial no condition
2025-07-15 18:04:04 +05:30
Rohit Waghchaure
ea3d4ced5e fix: Confirmation dialog for submitting the stock entry 2025-07-15 17:52:08 +05:30
Rohit Waghchaure
bb7ddd11f1 fix: added serial no condition 2025-07-15 17:27:00 +05:30
Diptanil Saha
05e7db2362 Merge pull request #48565 from aerele/fix/qty-change
fix(transaction): recalculate tax and total when quantity changes
2025-07-15 17:01:12 +05:30
Sagar Vora
34e0a939e6 Merge pull request #48607 from ljain112/silly-fix 2025-07-15 11:23:48 +00:00
ljain112
0da8ed2daa fix: fix party account field access 2025-07-15 16:45:58 +05:30
Khushi Rawat
0caa0371dc Merge pull request #48360 from aerele/item-wise-sales-register-mode-of-payment
fix: fetch sales invoice based on mode_of_payment in item-wise sales register
2025-07-15 15:49:46 +05:30
Karm Soni
7a266113ed fix: warehouse filter query by chaining conditions 2025-07-15 15:15:31 +05:30
ruthra kumar
e725780c6d Merge pull request #48535 from ljain112/fix-dda
fix: handle cases where distributed discount amount is not set
2025-07-15 15:07:06 +05:30
rohitwaghchaure
0fb6b4eaf6 Merge pull request #48408 from aerele/make_purchase_order_for_default_supplier
fix: resolve bundle item into line item if againt default supplier ch…
2025-07-15 15:05:48 +05:30
rohitwaghchaure
403220c69a Merge pull request #48595 from rohitwaghchaure/fixed-support-43674
fix: system was allowing credit notes with serial numbers for any customer
2025-07-15 14:56:58 +05:30
rohitwaghchaure
6150106dee Merge pull request #48588 from mihir-kandoi/st43481
perf: optimize code for subcontracting
2025-07-15 14:14:24 +05:30
Rohit Waghchaure
e073075834 fix: system was allowing credit notes with serial numbers for any customer 2025-07-15 14:00:04 +05:30
Karm Soni
fca9843fc2 fix: handle empty warehouse condition in get_warehouse_condition function; typo; 2025-07-15 13:39:39 +05:30
Karm Soni
169caaf66f fix: use the item_query for get_data 2025-07-15 13:23:09 +05:30
ruthra kumar
dea3e326ba Merge pull request #48536 from frappe/l10n_develop
fix: sync translations from crowdin
2025-07-15 12:42:06 +05:30
MochaMind
26ecd7fd1b fix: Persian translations 2025-07-15 12:26:11 +05:30
MochaMind
f877f87b01 fix: Swedish translations 2025-07-15 12:26:11 +05:30
MochaMind
d33851367b fix: Persian translations 2025-07-15 12:26:11 +05:30
MochaMind
4c5d753ade fix: Turkish translations 2025-07-15 12:26:11 +05:30
Mihir Kandoi
bc6f69ad54 perf: optimize code for subcontracting 2025-07-15 11:55:03 +05:30
rohitwaghchaure
ee2ea11458 Merge pull request #48582 from barredterra/sabb-translatability
fix: make labels in serial_batch_prompt translatable
2025-07-15 11:53:59 +05:30
MochaMind
e1b2956cdb chore: update POT file (#48583) 2025-07-14 22:25:42 +02:00
barredterra
8757800888 fix: make labels in serial_batch_prompt translatable 2025-07-14 21:47:00 +02:00
Raffael Meyer
d99f258d61 fix(Employee): add context to status in List View (#48576) 2025-07-14 15:37:00 +02:00
Diptanil Saha
b8bf4319ac Merge pull request #48411 from thomasantony12/employee_query
fix: employee search based on the fields mentioned in the employee doctype search fields
2025-07-14 18:58:09 +05:30
mergify[bot]
7ae642e6fa Merge branch 'develop' into employee_query 2025-07-14 13:10:07 +00:00
Mihir Kandoi
70204b4464 Merge pull request #48526 from mihir-kandoi/st43470
fix: gross margin not set in project on submission of stock entry
2025-07-14 17:11:40 +05:30
rohitwaghchaure
e0895be7e9 Merge pull request #48568 from mihir-kandoi/st43465
fix: recalculate qty issue for stock reco
2025-07-14 17:07:15 +05:30
Mihir Kandoi
815220a3c6 Merge pull request #48542 from mihir-kandoi/st43593
fix: field name of price_list in material request
2025-07-14 16:43:31 +05:30
Mihir Kandoi
668574e4f0 fix: incorrect if condition 2025-07-14 16:36:29 +05:30
Mihir Kandoi
adb9a6bc15 fix: field name of price_list in material request 2025-07-14 16:27:14 +05:30
Mihir Kandoi
597d5aff02 fix: incorrect stock reco sle 2025-07-14 16:25:29 +05:30
ruthra kumar
896b21e78b Merge pull request #48321 from ljain112/fix-client-item-tax-template
fix: fetch item tax template after setting `base_net_rate`
2025-07-14 15:01:59 +05:30
ljain112
816b84be02 fix: handle cases where distributed discount amount is not set 2025-07-14 14:56:12 +05:30
ruthra kumar
290a9b7804 Merge pull request #48435 from ljain112/fix-ui-account
fix: prevent creation of root accounts in account tree view
2025-07-14 14:44:50 +05:30
Bhavan23
ac7b6c6a3d fix(transaction): recalculate tax and total when quantity changes 2025-07-14 13:23:56 +05:30
ruthra kumar
3ccb209bfd Merge pull request #48540 from aerele/payable/receivable-summary
feat: add calculate_ageing_with option in summary reports
2025-07-14 11:38:02 +05:30
Diptanil Saha
f2ce84c161 Merge pull request #48539 from diptanilsaha/feat_gh_37933
feat: trial balance report account name and number in separate column
2025-07-14 11:21:53 +05:30
diptanilsaha
52a6856f6c feat: trial balance report account name and number in separate column 2025-07-14 11:05:04 +05:30
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
rohitwaghchaure
a73c555574 Merge pull request #48550 from ljain112/fix-test-batch
chore: fix flacky test and remove redundant code
2025-07-13 17:20:39 +05:30
rohitwaghchaure
25838ba9b0 Merge pull request #48509 from mihir-kandoi/fix-reservation-on-manufacture-entry
fix: stock reservation on manufacture stock entry
2025-07-13 14:29:25 +05:30
ljain112
e6b9e82b2f chore: return doc if item already exists for test 2025-07-12 13:07:52 +05:30
ljain112
de8c3ba968 chore: fix flacky test and remove redundant code 2025-07-12 12:48:01 +05:30
Thomas antony
de56faf862 chore: add missing key value 2025-07-12 10:18:34 +05:30
Thomas antony
89233d2b87 Merge branch 'frappe:develop' into employee_query 2025-07-12 10:04:35 +05:30
Thomas antony
75a00928b5 chore: included value in "key" for search condition 2025-07-12 09:48:08 +05:30
l0gesh29
a3834eef46 feat: add calculate_ageing_with option in summary reports 2025-07-11 17:54:09 +05:30
Diptanil Saha
b38d472d7c Merge pull request #48495 from ljain112/refactor--acc-settings
perf: use `cached_doc` for Account Settings
2025-07-11 14:41:30 +05:30
Asmita Hase
96bfe7ccb7 Merge pull request #48395 from mahsem/eetr 2025-07-11 11:59:24 +05:30
ruthra kumar
146f98d026 Merge pull request #48508 from frappe/l10n_develop
fix: sync translations from crowdin
2025-07-11 11:49:49 +05:30
Mihir Kandoi
ec578ba231 fix: gross margin not set in project on submission of stock entry 2025-07-11 11:04:29 +05:30
rohitwaghchaure
29d94f71f3 Merge pull request #48512 from rohitwaghchaure/fixed-support-43409
fix: incorrect last sle for no batch wise valuation
2025-07-11 11:01:16 +05:30
Mihir Kandoi
a878dd3837 fix: stock reservation on manufacture stock entry 2025-07-11 10:31:17 +05:30
Rohit Waghchaure
93d3eb662f fix: incorrect last sle for no batch wise valuation 2025-07-11 09:03:04 +05:30
Ibrahim
d8371c41cf fix: add undefined check for cur_frm in lead doctype (#48522) 2025-07-10 23:24:08 +03:00
Diptanil Saha
73c08c1ecd Merge pull request #48517 from diptanilsaha/fix_pos_payment_keypress
fix: pos payment method amount using numpad and keyboard
2025-07-10 23:11:07 +05:30
Mihir Kandoi
ea05f81024 Merge pull request #48514 from mihir-kandoi/st43398
fix: no attribute error in old subcontracting flow
2025-07-10 23:02:18 +05:30
Mihir Kandoi
e16014e448 Merge pull request #48513 from mihir-kandoi/st42779
fix: error in available serial no report is no serial no present in company
2025-07-10 22:51:02 +05:30
diptanilsaha
15b1609d88 fix: pos payment method amount using numpad and keyboard 2025-07-10 22:47:10 +05:30
Mihir Kandoi
51751a7a05 fix: no attribute error in old subcontracting flow 2025-07-10 22:46:56 +05:30
Mihir Kandoi
0ae60b8b61 fix: error in available serial no report is no serial no present in company 2025-07-10 22:34:35 +05:30
Mihir Kandoi
7af9fa36d7 Merge pull request #48510 from mihir-kandoi/st42929
fix: missing parameter in precision function
2025-07-10 19:08:16 +05:30
Mihir Kandoi
3886641887 fix: missing parameter in precision function 2025-07-10 18:52:13 +05:30
MochaMind
b651d3f622 fix: Persian translations 2025-07-10 14:26:30 +05:30
MochaMind
d72825e279 fix: Portuguese translations 2025-07-10 14:26:24 +05:30
Diptanil Saha
6e73fbedb0 Merge pull request #48506 from diptanilsaha/fix_st_43111
fix: pos adding item multiple times on applying item group filter
2025-07-10 12:36:06 +05:30
diptanilsaha
e9f99e5a3f fix: pos adding item multiple times on item group filter 2025-07-10 12:31:15 +05:30
Mihir Kandoi
9f44de50eb Merge pull request #48503 from mihir-kandoi/convert-string-to-date
fix: invalid comparison error in sabb.py
2025-07-10 11:04:59 +05:30
Mihir Kandoi
ec1faf02ed fix: invalid comparison error in sabb.py 2025-07-10 10:48:33 +05:30
Mihir Kandoi
2397abaee5 Merge pull request #48499 from mihir-kandoi/st43376
fix: use planned_qty instead of pending_qty to check if WO should be created against PP
2025-07-09 21:03:30 +05:30
Mihir Kandoi
b11bf8eb79 fix: use planned_qty instead of pending_qty to check if WO should be created against PP 2025-07-09 20:59:11 +05:30
l0gesh29
f3460ec840 fix: carry forward the delivered_by_supplier check to PO 2025-07-09 19:26:41 +05:30
rohitwaghchaure
fbe14b79cc Merge pull request #48490 from rohitwaghchaure/fixed-support-39446
feat: update the modified date of the SLE after reposting
2025-07-09 19:20:45 +05:30
Patrick Eißler
ebd45878c3 feat(BOM): improve tree display with item_name and qty (#48176)
Co-authored-by: Raffael Meyer <14891507+barredterra@users.noreply.github.com>
2025-07-09 13:52:12 +02:00
rohitwaghchaure
91881fad6b Merge pull request #48488 from rohitwaghchaure/fixe-support-42043
feat: parent item group support in Stock Projected Qty report
2025-07-09 16:48:17 +05:30
Rohit Waghchaure
c2cd4934e7 feat: update the modified date of the SLE after reposting 2025-07-09 16:45:13 +05:30
rohitwaghchaure
48485c27ec Merge pull request #48487 from rohitwaghchaure/feat-batch-rate-report
feat: batch rate (valuation) in Batch-Wise Balance History report
2025-07-09 16:28:19 +05:30
Rohit Waghchaure
6e80d89d13 feat: parent item group support in Stock Projected Qty report 2025-07-09 16:18:21 +05:30
Rohit Waghchaure
8a2a845a16 feat: batch rate (valuation) in Batch-Wise Balance History report 2025-07-09 16:07:20 +05:30
Diptanil Saha
376dcf50ec feat: filter to display trial balance report without group account (#48486) 2025-07-09 15:44:46 +05:30
ljain112
751f3abd95 perf: use cached_doc for Account Settings 2025-07-09 13:28:37 +05:30
rohitwaghchaure
6e98adecdd Merge pull request #48481 from rohitwaghchaure/fixed-support-43199
fix: stock settings save issue
2025-07-09 12:02:46 +05:30
Rohit Waghchaure
64ae1ec367 fix: stock settings save issue 2025-07-09 11:43:09 +05:30
ruthra kumar
b937b18e3d Merge pull request #47892 from ruthra-kumar/ar_report_procedures_and_sql
refactor: use sql for building voucher balance in Receivable report
2025-07-09 11:02:41 +05:30
ruthra kumar
fc8ca7d82c chore: rename method 2025-07-09 10:45:58 +05:30
ruthra kumar
7efeed54de refactor: build and pass match conditions as qb criterion 2025-07-09 10:43:41 +05:30
ruthra kumar
52c0df24e3 chore: drop unused utility method 2025-07-09 10:42:46 +05:30
ruthra kumar
9d0ebe3427 refactor: dynamic DB field types 2025-07-09 10:42:46 +05:30
ruthra kumar
1a90c0d031 refactor: better variable name 2025-07-09 10:42:46 +05:30
ruthra kumar
c5e35cc330 refactor: prefix-ed names for easy distinction 2025-07-09 10:42:46 +05:30
ruthra kumar
da32bb5f51 refactor: utility to drop existing procedures and include cost center 2025-07-09 10:42:46 +05:30
ruthra kumar
7b7440d44a refactor: order by posting date 2025-07-09 10:42:46 +05:30
ruthra kumar
e90c6a33bd refactor: call procedures based on config 2025-07-09 10:42:46 +05:30
ruthra kumar
8cf8f6abad refactor: introduce sql option for data fetch 2025-07-09 10:42:46 +05:30
ruthra kumar
097e74979f refactor: better readability 2025-07-09 10:42:45 +05:30
ruthra kumar
e5920c57aa refactor: using sql procedures for AR report
- dynamic filters are passed
2025-07-09 10:42:45 +05:30
Diptanil Saha
c714b724da fix: resolve sql error on dimension-wise accounts balance report (#48477) 2025-07-08 23:41:39 +05:30
Soham Kulkarni
f0697d8f27 Merge pull request #48349 from sokumon/remove-leaderboard
fix: remove Leaderboard shortcut
2025-07-08 22:57:20 +05:30
sokumon
27309d6714 fix: remove Leaderboard shortcut 2025-07-08 22:40:19 +05:30
Mihir Kandoi
c0631468db Merge pull request #48475 from mihir-kandoi/st42934 2025-07-08 22:14:52 +05:30
Mihir Kandoi
d10647a592 fix: indicator in material_request_list.js 2025-07-08 21:58:31 +05:30
Mihir Kandoi
269ac78a98 Merge pull request #48471 from mihir-kandoi/st43209
fix: sort available batches based on expiry when merging SLEs with SABB and those without
2025-07-08 19:47:44 +05:30
Mihir Kandoi
5c665c562a fix: test case 2025-07-08 19:31:03 +05:30
Mihir Kandoi
4d784b8fc7 fix: sort available batches based on expiry 2025-07-08 17:52:19 +05:30
ruthra kumar
dd027f09ac Merge pull request #48469 from ruthra-kumar/better_label_for_ignore_err
chore: better label for checkbox
2025-07-08 17:08:34 +05:30
ruthra kumar
2a16353cf6 Merge pull request #47142 from prateekkaramchandani/feat/ledger-preview-stock-entry
feat: Ledger Preview for Stock Entry
2025-07-08 17:03:19 +05:30
ruthra kumar
8c2e40e291 chore: better label for checkbox 2025-07-08 16:52:24 +05:30
Prateek Karamchandani
5f1ca4113d feat: Ledger Preview for Stock Entry 2025-07-08 16:46:44 +05:30
ruthra kumar
846f0350d8 Merge pull request #48427 from ljain112/fix-psoa-validations
fix: Add company validation to company related fields in Process Statement Of Accounts
2025-07-08 16:05:51 +05:30
Khushi Rawat
95a235e239 Merge pull request #48259 from aerele/item-wise-sales-register
fix: add not specified key for None respresented customer_group and t…
2025-07-08 16:01:57 +05:30
rohitwaghchaure
b7bf2fad84 Merge pull request #48378 from aerele/refactor-quality-inspection
fix: update item reference in quality inspection
2025-07-08 16:01:38 +05:30
ruthra kumar
d0537f2ee4 Merge pull request #48359 from aerele/get_fiscal_year_data
fix: get fiscal year based on date
2025-07-08 15:55:50 +05:30
Khushi Rawat
495afae178 Merge pull request #48402 from aerele/journal-entry-title-rename
fix: rename journal entry title on update
2025-07-08 15:54:33 +05:30
ruthra kumar
83f279410c Merge pull request #48450 from frappe/l10n_develop
fix: sync translations from crowdin
2025-07-08 15:46:06 +05:30
Mihir Kandoi
34f51ae0b2 Merge pull request #48456 from mihir-kandoi/st43167
fix: duplicate items being created when fetching items from warehouse in stock reco
2025-07-08 14:30:22 +05:30
ruthra kumar
5b619c7832 Merge pull request #48328 from ljain112/fix-pricing-rule
fix: update condition for blank tree fields in pricing rule
2025-07-08 14:22:15 +05:30
ruthra kumar
376191b31f Merge pull request #48361 from aerele/revert-48162
revert: do not convert exchange gain/loss amount to foreign currency
2025-07-08 14:22:04 +05:30
ruthra kumar
2c507c891c Merge pull request #48418 from ljain112/jv-paid-loan
chore: remove redundant field "paid_loan" from Journal Entry Doctype
2025-07-08 14:09:11 +05:30
Mihir Kandoi
73f6c29559 fix: duplicate items being created when fetching items from warehouse in stock reco 2025-07-08 13:27:10 +05:30
ruthra kumar
6cac0347ae Merge pull request #48416 from ljain112/refactor-payment-entry
refactor: remove duplicate reconciliation date logic
2025-07-08 13:03:25 +05:30
Diptanil Saha
f5de1ea5c8 Merge pull request #48343 from aerele/validate_with_previous_doc
fix: consider empty string in previous doc validation
2025-07-08 12:39:49 +05:30
rohitwaghchaure
161e336d97 Merge pull request #48444 from mihir-kandoi/st42689
refactor: remove do_reposting_for_each_stock_transaction feature
2025-07-08 12:31:06 +05:30
MochaMind
d2a4cebe54 fix: Persian translations 2025-07-08 12:17:56 +05:30
Diptanil Saha
88255d3d3d Merge pull request #48403 from aerele/validate_selling_price
fix: add selling price validation on update item
2025-07-08 12:14:06 +05:30
ruthra kumar
1cd2266da1 Merge pull request #48326 from ljain112/cost-center-advance-pe
fix: cost center for payment entry against advance payment doctypes in accounts payable/rece
2025-07-08 12:05:25 +05:30
Mihir Kandoi
288c3ee9c2 Merge pull request #48332 from mihir-kandoi/st42096
fix: valuation rate of raw materials in subcontracting receipt
2025-07-08 11:57:45 +05:30
Mihir Kandoi
cae34096c7 Merge pull request #48445 from mihir-kandoi/fix-mr-default-price-list
fix: use default buying price list when price list is falsy
2025-07-08 11:55:00 +05:30
Mihir Kandoi
27c73cf9e9 fix: use default buying price list when price list is falsy 2025-07-08 11:50:43 +05:30
Mihir Kandoi
84ea6afd01 fix: valuation rate of raw materials in subcontracting receipt 2025-07-08 11:42:07 +05:30
Mihir Kandoi
e342b1f7bd refactor: remove do_reposting_for_each_stock_transaction feature 2025-07-08 11:35:45 +05:30
rohitwaghchaure
9f32021d07 Merge pull request #48441 from frappe/revert-47918-fixed-support-40162
Revert "fix: stock reco qty with inventory dimension"
2025-07-08 10:36:18 +05:30
rohitwaghchaure
8ba66c9833 Revert "fix: stock reco qty with inventory dimension (#47918)"
This reverts commit 342cebc778.
2025-07-08 09:56:56 +05:30
ruthra kumar
2012045798 Merge pull request #48324 from ljain112/fix-pr-unreconcile
fix: update payment request outstanding on unreconciliation
2025-07-08 09:45:52 +05:30
MochaMind
7ec4d16403 fix: sync translations from crowdin (#48406) 2025-07-07 17:46:49 +02:00
Raffael Meyer
8cc6853c34 fix: make labels in error message translatable (#48327) 2025-07-07 17:44:56 +02:00
ljain112
3600f2f91b fix: prevent creation of root accounts in account tree view 2025-07-07 19:00:42 +05:30
rohitwaghchaure
7ed05e7d2d Merge pull request #48432 from rohitwaghchaure/fixed-support-42759
fix: fetch from parent optional in inventory dimension
2025-07-07 18:51:01 +07:00
Rohit Waghchaure
8aac6a6b18 fix: fetch from parent optional in inventory dimension 2025-07-07 17:01:01 +05:30
Mihir Kandoi
5fc07842eb Merge pull request #48428 from mihir-kandoi/st42480
fix: address not found when creating internal PR from DN
2025-07-07 15:20:14 +05:30
Mihir Kandoi
aa2c56e117 Merge pull request #48425 from mihir-kandoi/st42648-2
feat: add price list field to material request
2025-07-07 15:03:47 +05:30
Mihir Kandoi
97c48ed6d2 fix: address not found when creating internal PR from DN 2025-07-07 15:01:31 +05:30
ljain112
4e45e69247 fix: Add company validation to company related fields in Process Statement Of Accounts 2025-07-07 14:43:04 +05:30
Mihir Kandoi
0e881f2999 Merge pull request #48424 from mihir-kandoi/st42959
fix: item list and project not being set in work order when created from material request
2025-07-07 14:17:39 +05:30
Mihir Kandoi
f4c6bdf204 feat: add price list field to material request 2025-07-07 14:14:16 +05:30
Mihir Kandoi
099a5fbad9 fix: item list and project not being set in work order when created from material request 2025-07-07 13:01:41 +05:30
Karm Soni
e60c711fdc fix: correct query filter assignment in stock ledger and balance reports 2025-07-07 11:06:46 +05:30
MochaMind
0a41fe2541 chore: update POT file (#48417) 2025-07-06 14:57:09 +02:00
ljain112
901a89ebcd fix: do not create delinked payment ledger entries on cancel 2025-07-06 17:15:12 +05:30
ljain112
2ee463fa33 chore: remove redundant field "paid_loan" from Journal Entry Doctype 2025-07-06 15:24:45 +05:30
ljain112
398406082a refactor: remove duplicate reconciliation date logic 2025-07-06 15:03:06 +05:30
Lakshit Jain
277c1101fc fix: multiple fixes related Deferred Accounting 2025-07-06 14:55:45 +05:30
Diptanil Saha
ee0dd462b8 Merge pull request #48357 from aerele/fix-pos-merge-log
fix: add company field on POS Invoice Merge Log
2025-07-06 14:26:50 +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
thomasantony12
09541c52e1 fix: employee search based on the fields mentioned in the doctype searchfields 2025-07-06 11:22:24 +05:30
Kavin
9548f341bf test: test company fetching from POS Closing Entry 2025-07-05 21:59:53 +05:30
Kavin
b4b473185f fix: pass company on create_merge_logs 2025-07-05 21:58:07 +05:30
Kavin
d46b68230c fix: patch for updating company name on existing pos merge log records 2025-07-05 13:34:52 +05:30
Kavin
109658731b fix: add company field on POS Invoice Merge Log 2025-07-05 13:34:11 +05:30
l0gesh29
ec07549d5e fix: resolve bundle item into line item if againt default supplier checked 2025-07-05 12:48:50 +05:30
Diptanil Saha
90be3cddf7 fix: pos payment numpad error on currency precision not set (#48407) 2025-07-05 06:53:29 +00:00
Karm Soni
0a71ca6739 fix(test): update tests 2025-07-05 10:04:34 +05:30
Raffael Meyer
2928d39d58 fix(Quotation): hide buttons if user cannot use them (#48115) 2025-07-04 18:03:39 +00:00
Mihir Kandoi
407fdab487 feat: add subject field to project (#48368)
* feat: add subject field to project
2025-07-04 16:09:34 +00:00
ravibharathi656
9e633bddef chore: add none value 2025-07-04 20:03:25 +05:30
l0gesh29
327d067305 fix: add selling price validation on update item 2025-07-04 19:57:22 +05:30
ravibharathi656
acb9829159 fix: rename journal entry title on update 2025-07-04 19:26:55 +05:30
Mihir Kandoi
b0535bff34 Merge pull request #48372 from mihir-kandoi/st42648
fix: rate not being fetched for product bundles in material request
2025-07-04 12:45:34 +05:30
Mihir Kandoi
0da90f8092 Merge pull request #48374 from mihir-kandoi/st42781-d
fix: LCV from PR order mismatch
2025-07-04 12:45:02 +05:30
l0gesh29
efb8e7c0e4 fix: get fiscal year based on date 2025-07-04 12:23:06 +05:30
mahsem
80d6779210 fix: employee_exit_translatability 2025-07-04 08:26:52 +02:00
Mihir Kandoi
32a45cf635 fix: LCV from PR order mismatch 2025-07-04 11:37:15 +05:30
Mihir Kandoi
45c7bac2d0 fix: rate not being fetched for product bundles in material request 2025-07-04 11:36:51 +05:30
MochaMind
59ae667cce fix: sync translations from crowdin (#48316)
Co-authored-by: Raffael Meyer <14891507+barredterra@users.noreply.github.com>
2025-07-04 05:50:27 +00:00
Diptanil Saha
50bf4017d6 fix: pos minor issues (#48384)
* fix: remove tax rate on pos

* fix: use toggle components to load invoices

* refactor: remove resize selector
2025-07-03 22:50:23 +05:30
Diptanil Saha
5f721f01d3 fix: pos recent order display customer code and name (#48379) 2025-07-03 22:49:09 +05:30
Karm Soni
f2afd98725 feat: update stock ledger report to support multi-select for warehouses and items 2025-07-03 18:04:05 +05:30
Karm Soni
2882576479 refactor: use existing functionality 2025-07-03 16:26:58 +05:30
Karm Soni
2ff1dcc391 feat: enhance apply_warehouse_filter to support multiple warehouses in filters 2025-07-03 16:24:27 +05:30
l0gesh29
dd43594ad6 fix: consider empty string in previous doc validation 2025-07-03 16:04:19 +05:30
venkat102
c17ae703c7 revert: do not convert exchange gain/loss amount to foreign currency 2025-07-03 16:03:21 +05:30
pugazhendhivelu
9da5010265 fix: update item reference in quality inspection 2025-07-03 15:44:00 +05:30
ravibharathi656
39cd7a29df fix: fetch sales invoice based on mode_of_payment in item-wise sales register 2025-07-03 15:38:05 +05:30
Diptanil Saha
86b37782fe fix: pos payment section (#48366) 2025-07-03 15:16:07 +05:30
ruthra kumar
1ee8a9f257 Merge pull request #48375 from ljain112/fix-flaky-test-tds
chore: fix flaky test in Tax Withholding Details
2025-07-03 14:21:06 +05:30
ruthra kumar
704223e5d0 fix(test): flaky budget test case 2025-07-03 14:06:09 +05:30
ljain112
7ee2418f60 fix: sort tax withhodling details report by section code and transaction date 2025-07-03 13:34:33 +05:30
ljain112
14a2f98521 chore: fix flaky test in Tax Withholding Details 2025-07-03 13:11:37 +05:30
Mihir Kandoi
7dbc821731 Merge pull request #48333 from mihir-kandoi/fix-job-card-buttons
fix: multiple buttons in job card showing in a single row
2025-07-03 13:07:58 +05:30
Karm Soni
0d2a88bafc feat: update stock balance report to support multi-select for items and warehouses 2025-07-03 12:59:00 +05:30
Akhil Narang
072518ed96 build: bump dependencies (#48122)
* build(deps): drop `pycountry`

Framework includes this

Signed-off-by: Akhil Narang <me@akhilnarang.dev>

* build(deps): bump unidecode

Signed-off-by: Akhil Narang <me@akhilnarang.dev>

* build(deps): bump holidays

Signed-off-by: Akhil Narang <me@akhilnarang.dev>

* build(deps): pin googlemaps

Signed-off-by: Akhil Narang <me@akhilnarang.dev>

* build(deps): bump python-youtube

Signed-off-by: Akhil Narang <me@akhilnarang.dev>

---------

Signed-off-by: Akhil Narang <me@akhilnarang.dev>
2025-07-02 11:44:49 +05:30
rohitwaghchaure
863507ea28 Merge pull request #48173 from mihir-kandoi/st41207
fix: incorrect pending qty when creating PI from PO and PI rates differ from PO
2025-07-01 17:48:12 +05:30
ruthra kumar
0b7f73fa8b Merge pull request #48325 from ljain112/refactor-po-validate
perf: use get_all instead of get_value for validating po dates
2025-07-01 16:23:44 +05:30
ruthra kumar
37727448f6 Merge pull request #48244 from aerele/reconcile-drcr-posting-date
fix: use gain_loss_posting_date instead of today
2025-07-01 15:41:43 +05:30
Mihir Kandoi
74df63a28a fix: multiple button in job card showing in a single row 2025-07-01 11:44:03 +05:30
Jeba Jebas
bb62a01c0d feat: added chart of accounts and tax template for australian localisation (#48208)
* Add Australian Localisation Setup

* feat: added chart of accounts and tax template for australian localisation

* chore: linter fix

---------

Co-authored-by: ruthra kumar <ruthra@erpnext.com>
2025-07-01 10:11:37 +05:30
ljain112
7e0e9db4d2 fix: update condition for blank tree fields in pricing rule 2025-06-30 19:12:49 +05:30
ljain112
48e8e85617 refactor: function to fetch advance payment doctypes 2025-06-30 17:49:56 +05:30
ljain112
8f19f14004 fix: cost center for payment entry against advance payment doctypes in accounts Payable/Receivable report 2025-06-30 17:35:08 +05:30
ljain112
aac4ac0fae perf: use get_all instead of get_value for validating po dates 2025-06-30 15:58:04 +05:30
ljain112
31d12517f0 chore: fix test case for payment request 2025-06-30 15:04:27 +05:30
ljain112
8098229b55 fix: update payment request outstanding on unreconciliation 2025-06-30 14:18:40 +05:30
Diptanil Saha
8ea9cb1d34 Merge pull request #48279 from aerele/pos-search-by-customer-name
fix(pos invoice): search using customer name
2025-06-30 14:13:25 +05:30
ravibharathi656
6a401bcfbb refactor: use or_filters for customer and customer_name 2025-06-30 12:51:14 +05:30
ravibharathi656
20fd071c4e fix(pos invoice): search using customer name 2025-06-30 12:51:14 +05:30
ljain112
db654d5e59 fix: fetch item tax template after setting base_net_rate 2025-06-30 12:31:39 +05:30
rohitwaghchaure
abfff79095 Merge pull request #48298 from FHenry/dev_fix_support_42326
fix: default UOMs by new Stock Entry created by Stock Level section button (when Item is batch or serial)
2025-06-30 11:02:05 +05:30
rohitwaghchaure
8aafd893ed Merge pull request #48240 from mihir-kandoi/st41963
refactor: bom stock report
2025-06-30 11:01:14 +05:30
rohitwaghchaure
21118d5373 Merge pull request #48184 from iamkhanraheel/update-disassembly-items
fix: Disassembly order items calculation in stock entry & track it in work order
2025-06-30 11:00:58 +05:30
ruthra kumar
2c7262b033 Merge pull request #48291 from ljain112/fix-bank-clearance
perf: use lazy doc for updating bank clearance_date
2025-06-30 10:34:09 +05:30
ruthra kumar
dc1be35dbb Merge pull request #48271 from aerele/company-default-currency-for-commission
fix: use company default currency in amount_eligible_for_commission
2025-06-30 10:08:51 +05:30
ruthra kumar
ee3f4c21be Merge pull request #48304 from zaqoutabed/translation-patch-1
chore: fix translation message
2025-06-30 10:02:58 +05:30
Abdallah A. Zaqout
bc002937ad chore: fix translation message 2025-06-30 09:47:30 +05:30
rohitwaghchaure
2af95d2339 Merge pull request #48310 from rohitwaghchaure/fixed-support-40224
fix: accounting entries for standalone credit notes
2025-06-30 09:38:37 +05:30
Khushi Rawat
d69d5b498d Merge pull request #48311 from khushi8112/validate-asset-status-for-repair
fix: validate asset status for repair
2025-06-30 00:55:29 +05:30
khushi8112
cfe04a2aaf test: asset status validation 2025-06-30 00:29:23 +05:30
khushi8112
c6baa34812 fix: validate asset before repair 2025-06-29 22:46:39 +05:30
Rohit Waghchaure
52177cffcd fix: accounting entries for standalone credit notes 2025-06-29 21:45:57 +05:30
MochaMind
344bcf1448 fix: sync translations from crowdin (#48302) 2025-06-29 16:01:36 +02:00
MochaMind
45292700d4 chore: update POT file (#48307) 2025-06-29 13:12:24 +02:00
Diptanil Saha
c742a1dbe9 feat: partly paid pos invoices (#48246)
* fix: partial payment in pos

* fix: show alerts for update failure

* fix: partial payment validation

* fix: remove setting clearance date

* fix: partly paid invoices in pos

* fix: throw error if user tries to make payment for consolidated invoice

* fix: include unpaid invoices in partly paid invoice filter

* refactor: function rename

* feat: button to open form view for partly paid invoices in pos order summary

* fix: payment menu item visible for unpaid invoices

* refactor: update_payments function

* fix: set outstanding amount for pos invoice

* test: partly paid pos invoices

* test: removed frappe.db.commit

* refactor: using before_submit to set outstanding amount
2025-06-28 00:48:23 +05:30
rohitwaghchaure
1cb7d5126c Merge pull request #48296 from rohitwaghchaure/fixed-support-42161
fix: not able to save material request
2025-06-27 16:24:31 +05:30
Florian HENRY
e7da4992f3 fix: default UOMs by new stock Entry created by Stock Level section button 2025-06-27 12:54:28 +02:00
Rohit Waghchaure
c5e36eb323 fix: not able to save material request 2025-06-27 16:07:08 +05:30
rohitwaghchaure
4dbf4a214d Merge pull request #48293 from rohitwaghchaure/fixed-support-42204
fix: option to pick serial / batch for asset repair
2025-06-27 15:28:01 +05:30
Rohit Waghchaure
ae77c609ff fix: option to pick serial / batch for asset repair 2025-06-27 14:53:11 +05:30
MochaMind
195911ce4e fix: sync translations from crowdin (#48268) 2025-06-27 10:45:05 +02:00
ljain112
d2983b977c perf: use lazy doc for updating clearance_date 2025-06-27 13:54:27 +05:30
ljain112
824a86c503 chore: validate all payment entries before updating the clearance_date 2025-06-27 13:53:16 +05:30
rohitwaghchaure
a0a8428483 Merge pull request #48243 from rohitwaghchaure/fixed-status-stock-reservation
fix: multiple fixes related to stock reservation
2025-06-27 13:51:07 +05:30
Rohit Waghchaure
87a472c2d7 fix: multiple fixes related to stock reservation 2025-06-27 12:46:02 +05:30
Soham Kulkarni
a926c7eafd Merge pull request #48288 from sokumon/remove-newsletter
fix: remove newsletter related code
2025-06-27 11:59:40 +05:30
sokumon
b630ccc8e6 fix: remove newsletter related code 2025-06-27 01:21:33 +05:30
Raffael Meyer
0426b37f32 fix: use label "State/Province" for translatability (#48273) 2025-06-26 20:20:17 +02:00
Diptanil Saha
e1d9f863c6 fix: customer section on pos item cart (#48284)
* fix: customer recent transactions

* fix: pos customer section display customer_name instead of customer name
2025-06-26 22:49:18 +05:30
l0gesh29
24cc711a70 fix: add not specified key for None respresented customer_group and territory 2025-06-26 18:32:54 +05:30
ravibharathi656
7c7b392789 fix: use company default currency in amount_eligible_for_commission 2025-06-26 18:09:23 +05:30
Priyansh Shah
fab0f4f337 fix: Multiple Issues in Pick List to Delivery Note Flow (#48206)
* fix: get items from Pick List to DN even if not linked to Sales Order

* refactor: consistently return dn; better place to convert json to doc

* fix: update DN if already created instead of creating new DN when SO is not present in pick list location

* fix: set correct warehouse,batch no and serial no in packed items and allow multiple customer in a pick list

* fix: return 0 for minimum possible bundles if none exist

* fix: test cases

* test: add tests for product bundle items in pick list and handling pick lists with and without sales orders

* fix: minor change to test case

* refactor: simplify pick list creation by using create_pick_list function

* fix: update delivery note creation logic and remove unused function

* test: update pick list test for packed items

* fix: add conditional check for sales_order before setting customer in delivery note

* test: add test case for packed item multiple times in so

---------

Co-authored-by: Smit Vora <smitvora203@gmail.com>
2025-06-26 17:55:48 +05:30
iamkhanraheel
aee26c3550 test: added test case for disassembly order 2025-06-26 17:21:34 +05:30
Diptanil Saha
1e929e2c6c fix: pos opening and closing validation (#48059)
* fix: pos opening and closing validation

* test: pos opening entry tests

* test: added test for pos opening entry

* fix: patch to set status cancelled on cancelled POS Opening Entry and POS Closing Entry

* fix: error messages
2025-06-26 16:26:53 +05:30
Sagar Vora
664872a07b Merge pull request #48274 from sagarvora/rm-print-heading 2025-06-26 10:45:55 +00:00
Sagar Vora
19a8303c1a fix: remove print heading doctype 2025-06-26 15:13:18 +05:30
0xD0M1M0
1b18105bce fix: customer_group import from lead to customer (#48266)
In case customization happens and the lead has the field "customer_group", the get_mapped_doc function would fail and be overwritten by the default value.
2025-06-25 23:25:32 +02:00
Khushi Rawat
7181e67ad4 Merge pull request #48242 from khushi8112/salvage-value-update-for-cancellation
fix: add missing cancellation handling for salvage value update
2025-06-25 00:21:11 +05:30
rohitwaghchaure
66eeda6410 fix: stock adjustment entry to make stock balance zero (#48245) 2025-06-24 21:58:33 +05:30
ravibharathi656
0585bc5aef fix: use gain_loss_posting_date instead of today 2025-06-24 18:48:22 +05:30
khushi8112
c13df330f3 fix: add missing cancellation handling for salvage value update 2025-06-24 18:31:54 +05:30
Mihir Kandoi
ee4e0c646d refactor: bom stock report 2025-06-24 18:13:38 +05:30
Sagar Vora
a571a5bf70 Merge pull request #48038 from ljain112/fix-test 2025-06-24 11:32:22 +00:00
Sagar Vora
01bfc25161 Merge branch 'develop' into fix-test 2025-06-24 11:30:42 +00:00
Khushi Rawat
48d3e0d0a2 Merge pull request #48228 from khushi8112/update-salvage-value-after-revaluation
fix: update salvage value after value adjustment
2025-06-24 17:00:00 +05:30
ruthra kumar
b99dd34a4b Merge pull request #48226 from aerele/trends_reports
Trends reports
2025-06-24 15:47:51 +05:30
Lakshit Jain
47c3c4808e fix: get already billed amount from current doc instead of database (#48079)
* fix: get already billed amount from current doc instead of database

* fix: throw overbilling validation for all items in single call

* refactor: minor fixes

---------

Co-authored-by: Sagar Vora <16315650+sagarvora@users.noreply.github.com>
2025-06-24 15:40:00 +05:30
ljain112
7bc88ffe0e chore: cache clears on custom field and property setter creation/delete 2025-06-24 15:19:40 +05:30
ruthra kumar
635ce0e94a Merge pull request #47627 from ljain112/fix-item--tax-template-taxes
fix: auto append_taxes_from_item_tax_template in backend
2025-06-24 15:16:37 +05:30
khushi8112
dc28fa79a0 test: change in expected value after useful after asset revaluation 2025-06-24 14:36:22 +05:30
Karuppasamy923
b08d66113c fix: Update indexing to populate correct values in trends report chart 2025-06-24 13:30:06 +05:30
Karuppasamy923
b0e201a332 fix: Update transaction currency to company currency to show correct currency symbol 2025-06-24 13:27:52 +05:30
khushi8112
5e672990b3 fix: salvage value after value adjustment 2025-06-24 12:42:34 +05:30
Mihir Kandoi
ea6ff2defe fix: test case 2025-06-24 12:24:58 +05:30
Mihir Kandoi
ab77ee7f5a fix: incorrect pending qty when creating PI from PO and PI rates differ from PO 2025-06-24 12:15:03 +05:30
Mihir Kandoi
c4cd4a660b Merge pull request #48150 from mihir-kandoi/st41475
fix: disallow posting date of purchase receipt and invoice before PO transaction date
2025-06-24 12:09:55 +05:30
Mihir Kandoi
77e82f4a80 fix: disallow posting date of purchase receipt and invoice before PO transaction date 2025-06-24 11:54:02 +05:30
Mihir Kandoi
f40c78f838 Merge pull request #48078 from mihir-kandoi/st41233
fix: fallback expense account and cost center in subcontracting receipt
2025-06-24 11:48:51 +05:30
Mihir Kandoi
d294afa46e Merge pull request #48123 from mihir-kandoi/fix-zero-rate-toast
fix: allow zero valuation rate toast showing even when rate is not 0
2025-06-24 11:45:20 +05:30
Akhil Narang
c8c1c96298 fix(open_opportunity): remove company=null filter (#48222)
Signed-off-by: Akhil Narang <me@akhilnarang.dev>
2025-06-24 05:57:54 +00:00
ruthra kumar
23e3883c13 Merge pull request #48180 from aerele/journal-entry-title-change
fix: update journal entry title on amend
2025-06-24 09:32:40 +05:30
ruthra kumar
7c2812b7f2 Merge pull request #48210 from iamkhanraheel/add-item_name
feat: Display Item Name in items table shown while creating Work order from Sales Order
2025-06-24 09:22:41 +05:30
ljain112
4cb1fa2b6b fix: auto append_taxes_from_item_tax_template in backend 2025-06-24 09:16:28 +05:30
MochaMind
5840645663 fix: sync translations from crowdin (#48085) 2025-06-23 18:56:24 +02:00
Diptanil Saha
919684a787 fix: pos item price in get_item and item search (#47925)
* fix: pos get item and item search

* refactor: resolved linter issue and renamed variables

* fix: uom on get_item

* fix: incorrect item quantity on pos selector

* refactor: remove unused import
2025-06-23 22:25:32 +05:30
rohitwaghchaure
ce2b98a38d Merge pull request #48195 from rohitwaghchaure/fixed-support-41648
fix: incoming rate for the stand-alone credit note
2025-06-23 21:09:52 +05:30
rohitwaghchaure
51429b3642 Merge pull request #48204 from rohitwaghchaure/fixed-stock-reservation-status
fix: stock reservation status
2025-06-23 20:57:08 +05:30
Rohit Waghchaure
b06eca8dcb fix: incoming rate for the stand-alone credit note 2025-06-23 20:47:25 +05:30
Rohit Waghchaure
62cf0504d8 fix: stock reservation status 2025-06-23 20:40:12 +05:30
ruthra kumar
7cabf85f74 Merge pull request #48053 from aerele/fetch-barcode-items
fix: add descendants item groups to fetch the barcode items
2025-06-23 19:30:27 +05:30
ruthra kumar
2d3c8dd4f6 Merge pull request #48162 from aerele/gl_entry_exchange_gain_or_loss
fix: add validation for exchange gain/loss entries
2025-06-23 19:29:18 +05:30
iamkhanraheel
ddeeb194cd feat: add item name in items listed while creating work order 2025-06-23 17:44:47 +05:30
ruthra kumar
2dc05a369b Merge pull request #48200 from ruthra-kumar/better_description
chore: better label and desciption for pegged currency flag
2025-06-23 17:43:27 +05:30
ruthra kumar
c5cd7d91c4 chore: better label and desciption for pegged currency flag 2025-06-23 17:27:57 +05:30
ruthra kumar
05fb3a1304 Merge pull request #47761 from frappe/new-sql-functions-syntax-qb-query
fix: update sql function usage syntax
2025-06-23 17:24:58 +05:30
ruthra kumar
289694ed4c chore: resolve linter 2025-06-23 17:09:29 +05:30
rohitwaghchaure
64a83195e9 Merge pull request #48194 from iamkhanraheel/fix-party-specific-exist-filter
fix: filter to validate existing item in Party Specific Item
2025-06-23 16:49:46 +05:30
mergify[bot]
eb4455cb3e Merge branch 'develop' into new-sql-functions-syntax-qb-query 2025-06-23 11:03:08 +00:00
ruthra kumar
08ef197906 Merge pull request #48013 from aerele/mt940-bank-statement-import
feat(bank-statement-import): add support for uploading MT940 format b…
2025-06-23 15:45:27 +05:30
ruthra kumar
d152ab9b88 Merge pull request #48096 from aerele/sales-trend-party-link
fix: add party and party_name columns to trend reports
2025-06-23 15:41:53 +05:30
ruthra kumar
727c5ce323 Merge pull request #48186 from aerele/sales_order_filter_update
fix: add is_group filter for warehouse
2025-06-23 15:35:57 +05:30
ruthra kumar
9ba61b54e3 Merge pull request #47219 from barredterra/find-row
fix: find table row
2025-06-23 15:20:42 +05:30
iamkhanraheel
99bc02d0e0 fix: update fieldname in filter 2025-06-23 14:20:27 +05:30
ruthra kumar
0b23e808c7 Merge pull request #48148 from ruthra-kumar/fix_dormant_test_in_payment_request
chore: activate dormant test case in payment request
2025-06-23 11:46:42 +05:30
ruthra kumar
8289dc6885 chore: activate dormant test case in payment request 2025-06-23 11:32:03 +05:30
iamkhanraheel
ce6ace4b8a fix: func parameters 2025-06-22 21:33:02 +05:30
MochaMind
0769174206 chore: update POT file (#48189) 2025-06-22 11:51:36 +00:00
rohitwaghchaure
9e8d35bf62 Merge pull request #48126 from rohitwaghchaure/feat-periodic-accounting
feat: periodic accounting
2025-06-22 13:10:18 +05:30
Rohit Waghchaure
938be22ae9 feat: periodic accounting 2025-06-22 12:48:57 +05:30
Faris Ansari
74bd07f10b fix: sql function syntax 2025-06-21 16:50:59 +05:30
Faris Ansari
a397c1dea8 fix: update sql function usage syntax 2025-06-21 16:50:59 +05:30
Faris Ansari
300530d35a fix: change sql function string to pypika
sql function string not supported anymore
2025-06-21 16:50:59 +05:30
Faris Ansari
20e2fda183 fix: field can't be a dict 2025-06-21 16:50:59 +05:30
Faris Ansari
6a3fc36979 fix: update sql function usage syntax 2025-06-21 16:50:59 +05:30
Faris Ansari
495bf4b765 chore: set correct payments app branch 2025-06-21 16:50:59 +05:30
Faris Ansari
6bc59d23ea fix: update sql function usage syntax
based on https://github.com/frappe/frappe/pull/32381
2025-06-21 16:50:59 +05:30
Karuppasamy923
a29ae9cf90 fix: add is_group filter for warehouse 2025-06-21 14:06:59 +05:30
iamkhanraheel
3e4d160626 fix: disassemble qty calculation & max calculation to be allowed to create it 2025-06-21 01:14:26 +05:30
rohitwaghchaure
9491f6f83f Merge pull request #48181 from rohitwaghchaure/fixed-support-41516
fix: SABB validation during the LCV
2025-06-20 21:23:44 +05:30
Rohit Waghchaure
e958f886d3 fix: SABB validation during the LCV 2025-06-20 21:06:43 +05:30
ravibharathi656
4a3ee4df29 fix: update journal entry title on amend 2025-06-20 17:47:09 +05:30
Diptanil Saha
4aa4942a17 fix: pos item details fetch uoms on stock settings allow_uom_with_conversion_rate_defined_in_item configuration (#48178) 2025-06-20 16:19:58 +05:30
Sagar Vora
7502a4aba3 Merge pull request #48111 from sagarvora/use-frappe.in_test 2025-06-20 08:24:27 +00:00
Sagar Vora
7e897c4a5d Merge branch 'develop' into use-frappe.in_test 2025-06-20 08:09:35 +00:00
Khushi Rawat
5c24fc3485 Merge pull request #48151 from khushi8112/duplicate-naming-issue-in-contract-doctype
fix: duplicate naming issue in contract doctype
2025-06-20 12:58:10 +05:30
rohitwaghchaure
ed9346a435 Merge pull request #48165 from rohitwaghchaure/fixed-support-40642-1
fix: target inventory dimension for stock entry
2025-06-19 19:52:59 +05:30
Rohit Waghchaure
d65cb56d66 fix: target inventory dimension for stock entry 2025-06-19 19:33:26 +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
khushi8112
a1c0727d7b chore: remove unused import 2025-06-19 18:40:37 +05:30
i-am-vimal
5c9eddd31e fix: add validation for exchange gain/loss entries 2025-06-19 18:14:32 +05:30
khushi8112
4a027125bc refactor: remove test case 2025-06-19 18:09:54 +05:30
rohitwaghchaure
9cd44833b3 Merge pull request #48050 from iamkhanraheel/rearrange-quotation-item-fields
feat: Move "Is Free Item", "Is Alternative Item", and "Has Alternative Item" Checkboxes to Item Section in Quotation Child Table
2025-06-19 18:09:42 +05:30
rohitwaghchaure
b11c72958e Merge pull request #48072 from iamkhanraheel/update-schedule-date
fix: update schedule date in items table in purchase order & disable selecting past date in schedule date
2025-06-19 18:09:18 +05:30
khushi8112
0665691b88 feat: add search field for contract doctype 2025-06-19 18:09:10 +05:30
rohitwaghchaure
b56337ecb9 Merge pull request #48089 from iamkhanraheel/add-margin-fields
fix: attribute error because of missing margin_type field in Supplier Quotation
2025-06-19 18:08:46 +05:30
rohitwaghchaure
44b51bdd02 Merge pull request #48137 from rohitwaghchaure/fixed-make-se-in-job-card
fix: make stock entry in job card
2025-06-19 17:55:45 +05:30
Diptanil Saha
2f8893439f fix: coa reset root_type on unchecking is_group on new_node (#48156) 2025-06-19 17:47:28 +05:30
khushi
bf56c73c6c feat: add naming series for Contract Doctype 2025-06-19 17:45:22 +05:30
rohitwaghchaure
f154c70289 Merge pull request #48131 from rohitwaghchaure/fixed-support-41105
fix: permission issue during reposting
2025-06-19 17:42:20 +05:30
rohitwaghchaure
a25356a99e Merge pull request #48130 from rohitwaghchaure/fixed-gl-entries-lcv-for-se-scr
fix: adjustment entries for SE and SCR after LCV
2025-06-19 17:42:07 +05:30
rohitwaghchaure
29ff258ccb Merge pull request #48127 from rohitwaghchaure/fixed-valuation-rate-stock-entry
fix: additional cost distribution
2025-06-19 17:38:24 +05:30
Rohit Waghchaure
abb05f59e2 fix: make stock entry in job card 2025-06-19 17:25:54 +05:30
Rohit Waghchaure
dcc9fc2fec fix: permission issue during reposting 2025-06-19 17:25:13 +05:30
Rohit Waghchaure
2f50ddae85 fix: adjustment entries for SE and SCR after LCV 2025-06-19 17:24:30 +05:30
Rohit Waghchaure
abbf2fac6d fix: additional cost distribution 2025-06-19 17:18:48 +05:30
rohitwaghchaure
d75bdd9f72 Merge pull request #48155 from rohitwaghchaure/fixed-test-case-for-sre-for-so
fix: test case
2025-06-19 17:18:14 +05:30
khushi
a4bb7c4e95 refactor: remove autoname 2025-06-19 17:13:01 +05:30
Rohit Waghchaure
2f0c0c2b59 fix: test case 2025-06-19 16:55:22 +05:30
Smit Vora
527cfe9c7d fix: better integration of Pick List with Delivery Note (#47831)
Co-authored-by: priyanshshah2442 <priyanshshah2442@gmail.com>
2025-06-19 15:42:37 +05:30
khushi
f7e63936a9 chore: linters check 2025-06-19 15:07:44 +05:30
khushi
b55d1e61c7 chore: test contract autoname 2025-06-19 15:04:24 +05:30
khushi
e13e2bffe2 fix: contract autoname 2025-06-19 15:04:24 +05:30
Khushi Rawat
1170c5c7d3 Merge pull request #48152 from khushi8112/fix-failing-test
chore: fix incorrect test
2025-06-19 14:50:17 +05:30
khushi
7e4db0f70e chore: fix incorrect test 2025-06-19 14:32:00 +05:30
Diptanil Saha
c94764ab52 fix: naming series field in bank transaction (#48121)
* fix: naming series field in bank transaction

* fix: default naming_series
2025-06-19 12:37:11 +05:30
Khushi Rawat
8c3ed5eccf Merge pull request #47789 from khushi8112/gl-entry-for-composite-component
fix: correct gl entry when capitalizing composite component
2025-06-18 19:16:24 +05:30
Diptanil Saha
80f992c87f test: purchase invoice provisional accounting entry (#48112)
* test: fixed purchase invoice provisional accounting entry

* test: added tests for multi currency
2025-06-18 18:26:49 +05:30
Diptanil Saha
14f0569a39 fix: setup wizard load chart of accounts and fiscal year on change of country (#48125) 2025-06-18 17:16:03 +05:30
Mihir Kandoi
41b876ff71 fix: allow zero valuation rate toast showing even when rate is not 0 2025-06-18 16:31:53 +05:30
rohitwaghchaure
e2c9e24f66 Merge pull request #47988 from rohitwaghchaure/fixed-support-40403
fix: stock reconciliation validation for serial nos
2025-06-17 23:00:07 +05:30
Rohit Waghchaure
69d54d2e0f fix: stock reconciliation validation for serial and batch 2025-06-17 22:31:40 +05:30
Sagar Vora
77f17c987d chore: ignore commit replacing flag usage 2025-06-17 21:31:14 +05:30
Sagar Vora
7a482a6998 chore: use frappe.in_test 2025-06-17 21:28:21 +05:30
rohitwaghchaure
5d4405c7f2 Merge pull request #48077 from mihir-kandoi/40957
fix: use set_query on sales_order link field in work order
2025-06-17 17:37:38 +05:30
Sagar Vora
d079db16d6 Merge pull request #48104 from ljain112/fix-conditions 2025-06-17 11:25:19 +00:00
ljain112
20565f5f19 fix: incorrect condition for setting party account on change of company 2025-06-17 16:30:56 +05:30
ruthra kumar
5683032434 Merge pull request #48103 from ruthra-kumar/restrictive_github_actions
ci: restrictive permission for GH actions
2025-06-17 16:08:50 +05:30
ruthra kumar
fa82d3fbb1 ci: restrictive permission for gh actions 2025-06-17 15:41:48 +05:30
ruthra kumar
10a83698eb Merge pull request #48098 from ljain112/fix-retunr-doc
fix: do not reset party account for return doc
2025-06-17 15:29:04 +05:30
Mihir Kandoi
6def182e1a fix: use set_query on sales_order link field in work order 2025-06-17 15:18:24 +05:30
Karuppasamy
cec0ffad06 Merge pull request #47898 from aerele/pegged-currency
Pegged currency
2025-06-17 15:08:31 +05:30
ljain112
7e758a9d5b fix: do not reset party account for return doc 2025-06-17 14:32:20 +05:30
Khushi Rawat
01cd3b6712 Merge pull request #47676 from khushi8112/better-ux-in-asset-capitalization
fix(UI): better ui/ux in asset capitalization
2025-06-17 14:10:03 +05:30
ruthra kumar
a69bfc2e78 Merge pull request #48082 from aerele/get-party-account
fix:add validation for party type
2025-06-17 13:54:59 +05:30
ruthra kumar
e4a35137b4 Merge pull request #47879 from aerele/gl_exchange_rate_entry
fix: add validation for exchange gain/loss entries
2025-06-17 13:33:55 +05:30
Karuppasamy923
d05204a960 fix: add party and party_name columns to trend reports 2025-06-17 13:29:08 +05:30
rohitwaghchaure
fa23f1a37e Merge pull request #48076 from iamkhanraheel/restrict-negative-qty-in-bom
fix: Prevent saving negative quantity in BOM
2025-06-17 13:18:41 +05:30
rohitwaghchaure
f4617d77a7 Merge pull request #48033 from rohitwaghchaure/fixed-reservation-entry-based-on
fix: Reservation Based On in the reservation entry
2025-06-17 12:54:05 +05:30
ruthra kumar
6a3e38e6ef Merge pull request #48087 from ruthra-kumar/restrictive_permissions_on_github_actions
ci: restrictive permission on github token
2025-06-17 12:22:13 +05:30
iamkhanraheel
67f96c66e4 fix: add missing margin related fields 2025-06-17 12:19:28 +05:30
l0gesh29
6ea32a8762 test: add test for debit/credit calculations in exchange gain/loss account filter in GL 2025-06-17 12:14:51 +05:30
l0gesh29
d992f67658 fix: add validation for exchange gain/loss entries 2025-06-17 12:13:23 +05:30
Khushi Rawat
7e5274f650 Merge pull request #48086 from khushi8112/update-asset-status-after-revaluation
fix: update asset status after making asset value adjustment record
2025-06-17 12:02:44 +05:30
ruthra kumar
237f9640d5 ci: restrictive permission on github token 2025-06-17 12:02:35 +05:30
Khushi Rawat
da2663b8dc fix: update asset status after making asset value adjustment record 2025-06-17 11:42:00 +05:30
Rohit Waghchaure
57429e5d90 fix: Reservation Based On in the reservation entry 2025-06-17 09:14:40 +05:30
rohitwaghchaure
28642dd9bd Merge pull request #47970 from rohitwaghchaure/feat-lcv-for-wo-scr
feat: LCV for Work Order and Subcontracting Receipt
2025-06-16 20:35:12 +05:30
Rohit Waghchaure
6be6eab6ff feat: LCV for Work Order and Subcontracting Receipt 2025-06-16 20:18:55 +05:30
AlcinSnowlina
7c9d6aaae2 fix: add validation for party type 2025-06-16 18:47:28 +05:30
ljain112
1e4fc043a8 chore: Refactor test cases to use context manager for user setting 2025-06-16 17:56:30 +05:30
Mihir Kandoi
cf1d4362e5 fix: fallback expense account and cost center in subcontracting receipt 2025-06-16 17:11:17 +05:30
Diptanil Saha
c4bdf2a721 fix: budget naming series (#48075) 2025-06-16 16:27:18 +05:30
iamkhanraheel
e52d83e756 fix: prevent saving negative quantity in BOM 2025-06-16 16:17:15 +05:30
iamkhanraheel
94b45d174a fix: code format 2025-06-16 16:07:52 +05:30
iamkhanraheel
f71a0fa9e1 fix: code format 2025-06-16 15:49:50 +05:30
iamkhanraheel
58565a9fb1 fix: add new line to pass pre commit 2025-06-16 15:28:11 +05:30
Sagar Vora
74af9e32f8 Merge pull request #48071 from sagarvora/test++ 2025-06-16 09:49:13 +00:00
Sagar Vora
b527bb771b test: use self.set_user instead of classname 2025-06-16 15:02:39 +05:30
iamkhanraheel
10825af531 fix: update schedule date in items child table, prevent selecting past dates in schedule date 2025-06-16 14:59:49 +05:30
rohitwaghchaure
43395f922f Merge pull request #48069 from rohitwaghchaure/fixed-fitures-perm-issue
fix: permission issue while completing setup wizard
2025-06-16 14:19:36 +05:30
Rohit Waghchaure
666bf65f48 fix: permission issue while completing setup wizard 2025-06-16 13:59:12 +05:30
MochaMind
36ab072072 fix: sync translations from crowdin (#48062)
* fix: Spanish translations

* fix: Arabic translations

* fix: German translations

* fix: Hungarian translations

* fix: Polish translations

* fix: Portuguese translations

* fix: Russian translations

* fix: Swedish translations

* fix: Turkish translations

* fix: Chinese Simplified translations

* fix: Portuguese, Brazilian translations

* fix: Persian translations

* fix: Thai translations

* fix: Croatian translations

* fix: Bosnian translations

* fix: Serbian (Latin) translations

* fix: French translations

* fix: Esperanto translations
2025-06-16 09:21:00 +02:00
rohitwaghchaure
cdcc692e01 Merge pull request #47903 from aerele/fix-return-qty
fix: modify query to fetch valid return qty
2025-06-16 10:23:42 +05:30
rohitwaghchaure
7211609725 Merge pull request #48061 from rohitwaghchaure/fixed-support-40585-1
fix: incorrect warehouse set from SO to MR
2025-06-16 10:11:11 +05:30
ruthra kumar
f1b8b7512e Merge pull request #48036 from aerele/accounts-receivable-summary-ageing
fix: add validation for calculate ageing with filter for summary and …
2025-06-16 08:38:38 +05:30
ruthra kumar
07805f17fc Merge pull request #48060 from frappe/pot_develop_2025-06-15
chore: update POT file
2025-06-16 08:12:45 +05:30
Rohit Waghchaure
0da8d9c869 fix: incorrect warehouse set from SO to MR 2025-06-15 19:17:01 +05:30
frappe-pr-bot
f5808f65c1 chore: update POT file 2025-06-15 09:36:44 +00:00
Sagar Vora
765fc27a9f Merge pull request #48048 from Abdeali099/fix-none-in-error-msg 2025-06-13 17:05:21 +00:00
Diptanil Saha
4178d9e2a1 fix: pos invoice consolidation row refer issue (#48057) 2025-06-13 19:52:15 +05:30
pugazhendhivelu
4b82fe2611 fix: add descendants item groups to fetch the barcode items 2025-06-13 18:16:25 +05:30
Akhil Narang
c275c55d6c build(deps): bump rapidfuzz (#47503)
Signed-off-by: Akhil Narang <me@akhilnarang.dev>
2025-06-13 15:57:25 +05:30
Diptanil Saha
f37d5f188e fix: company validation for accounts on item tax template (#47964)
* fix: company validation for accounts on item tax template

* fix: syntax error
2025-06-13 12:38:04 +05:30
Diptanil Saha
41509d37af fix: patch to update child table parentfield name in pos closing entry (#48008) 2025-06-13 12:32:51 +05:30
Abdeali Chharchhoda
0a8e42a358 fix: use flt value of bin qty 2025-06-13 12:24:50 +05:30
rohitwaghchaure
576e804dbf Merge pull request #48037 from rohitwaghchaure/fixed-support-40883
fix: float division by zero
2025-06-13 08:19:31 +05:30
iamkhanraheel
5d4d4f40a1 feat: move checkbox related to items in item section 2025-06-12 17:54:26 +05:30
Rohit Waghchaure
59cbe85817 fix: float division by zero 2025-06-12 17:20:22 +05:30
ljain112
e50467a593 chore: Refactor test to use clear_cache instead of reload_doc 2025-06-12 17:15:38 +05:30
l0gesh29
c630aa9fe8 fix: add validation for calculate ageing with filter for summary and other reports 2025-06-12 16:59:52 +05:30
Khushi Rawat
2c54933e3e Merge pull request #48031 from khushi8112/asset-capitalization-from-connection-tab
fix: do not allow capitalization from connection tab for submitted asset
2025-06-12 15:17:02 +05:30
Khushi Rawat
27bec4cde5 fix: do not allow capitalization from connection tab for submitted asset 2025-06-12 15:13:02 +05:30
ruthra kumar
46985e0f3c Merge pull request #48024 from frappe/l10n_develop
fix: sync translations from crowdin
2025-06-12 14:09:28 +05:30
MochaMind
37f9002b84 fix: Turkish translations 2025-06-12 05:58:06 +05:30
MochaMind
4d9d7b243d fix: Swedish translations 2025-06-12 05:58:02 +05:30
rohitwaghchaure
153a70cd70 Merge pull request #48018 from rohitwaghchaure/fixed-support-40869
fix: batch page length
2025-06-11 20:01:50 +05:30
Sagar Vora
66d1771b94 Merge pull request #48019 from priyanshshah2442/fix_unpack_non_iterable_error 2025-06-11 12:48:13 +00:00
priyanshshah2442
7d940faa4f fix: unpack non-iterable NoneType object error 2025-06-11 18:11:54 +05:30
Rohit Waghchaure
338256b799 fix: batch page length 2025-06-11 16:52:58 +05:30
Ankush Menat
d16a6d42a5 perf: Use lazy loaded documents (#48017)
* perf: Use lazy docs for status updaters and similar use cases

* perf: lazy load documents while reposting
2025-06-11 10:27:08 +00:00
Mihir Kandoi
76982fe133 Merge pull request #48015 from mihir-kandoi/zero_valuation_toast_2
feat: show warning toast if rate is 0 and allow zero valuation rate checkbox is not enabled
2025-06-11 15:06:31 +05:30
Mihir Kandoi
b23a2dd8e8 fix: if condition to validate doctype 2025-06-11 14:50:33 +05:30
Mihir Kandoi
7a1cebfa3e fix: show warning toast if rate is 0 and allow zero valuation rate checkbox is not enabled 2025-06-11 14:50:17 +05:30
Mihir Kandoi
5254057b11 Merge pull request #48014 from frappe/revert-47875-zero_valuation_toast
Revert "feat: show warning toast if rate is 0 and allow zero valuation rate c…"
2025-06-11 11:30:20 +05:30
Mihir Kandoi
1502515ed9 Revert "feat: show warning toast if rate is 0 and allow zero valuation rate c…" 2025-06-11 11:13:56 +05:30
Diptanil Saha
8f4a6d248f fix: fetch correct item tax template on item rate update (#47955) 2025-06-11 10:58:18 +05:30
ruthra kumar
a7974451fd Merge pull request #48012 from frappe/l10n_develop
fix: sync translations from crowdin
2025-06-11 09:41:57 +05:30
MochaMind
175200891c fix: Serbian (Latin) translations 2025-06-11 05:47:13 +05:30
MochaMind
ff868aeba8 fix: Swedish translations 2025-06-11 05:46:55 +05:30
Karuppasamy923
7987ba9b7c feat(bank-statement-import): add support for uploading MT940 format bank statements 2025-06-11 05:20:07 +05:30
Khushi Rawat
bd502c11cc Merge pull request #47901 from khushi8112/asset-transfer-and-movement-in-single-asset-movement-record
feat: Asset Transfer and Issue in single asset movement record
2025-06-11 01:16:51 +05:30
Diptanil Saha
3969a75635 fix: populate is_return and return_against fields in pos closing entry (#48009) 2025-06-11 00:00:47 +05:30
ravibharathi656
14646b1952 test: add test for validating sales invoice qty after return 2025-06-10 18:58:34 +05:30
ravibharathi656
161a186bcc fix: modify query to fetch valid return qty 2025-06-10 18:56:29 +05:30
rohitwaghchaure
37e97e1256 Merge pull request #47998 from rohitwaghchaure/fixed-support-40585
fix: incorrect warehouse in MR
2025-06-10 18:10:09 +05:30
Rahul Agrawal
bc87609264 feat: populate Timer dialog project field from Timesheet parent_project (#47971)
* feat: default parent project in timer dialog > project

* chore: fix formatting

* fix: remove unnecessary or condition

---------

Co-authored-by: Rahul Agrawal <deathstarconsole@Rahuls-MacBook-Air.local>
2025-06-10 18:02:05 +05:30
Diptanil Saha
4e537cdb74 refactor: sales invoice integration with pos (#47713)
* fix: invoice doctype selection in accounts settings

* test: change in accounts settings on sales invoice

* test: refactored pos_invoice_merge_log tests

* test: pos closing entry and pos invoice

* fix: closing voucher details style

* refactor: renamed fields and removed repeated methods

* fix: patch to rename pos closing entry fields

* refactor: replaced get_doc with sql query

* fix: restrict cancelling sales invoice on cancellation of pos closing entry

* fix: removed payment reconciliation summary field and rearranged total section fields

* refactor: set_posting_date_and_time

* test: create_sales_invoice added args for is_created_using_pos

* test: added test for sales invoice creation during pos invoice mode

* test: added test for pos invoice creation during sales invoice mode

* fix: moved invoice type selection in pos settings

* fix: pos additional fields label

* refactor: pos closing entry

rearranged fields, removed rate field from taxes field, fetching payments and taxes details

* test: moved invoice creation in functions

* refactor: using as_dict=1

* fix: wrong table chosen in query

* fix: variable rename

* test: fixed failing tests

* test: fixed pos_closing_entry tests
2025-06-10 17:51:11 +05:30
Rohit Waghchaure
2b9ca79291 fix: incorrect warehouse in MR 2025-06-10 17:36:54 +05:30
Debin Robert
6529b288c2 feat: confirm with user before resetting posting date (#47667)
* feat: confirm with user before resetting posting date

* chore: pre-commit

* changes made as per review

---------

Co-authored-by: ruthra kumar <ruthra@erpnext.com>
2025-06-10 15:20:18 +05:30
Debin Robert
751815745f fix: filter to ignore system generated cr / dr reconciliation journals on customer ledger summary 2025-06-10 15:15:50 +05:30
rohitwaghchaure
d38f3f4fae Merge pull request #47981 from barredterra/wo-query_sales_order
refactor(Work Order): query_sales_order
2025-06-10 14:31:12 +05:30
rohitwaghchaure
97923c3b2b Merge pull request #47969 from rohitwaghchaure/fixed-support-40445
fix: do not create repeat work orders
2025-06-10 14:29:29 +05:30
ruthra kumar
224c525b86 Merge pull request #47923 from aerele/currency_in_trends
fix: update currency based on transaction
2025-06-10 14:25:44 +05:30
Rohit Waghchaure
384f4e120a fix: do not create repeat work orders 2025-06-10 13:59:37 +05:30
Ankush Menat
a123de4884 Merge pull request #47984 from frappe/drop_empty_unit_tests
chore: Drop empty UnitTestCase
2025-06-10 12:59:02 +05:30
Ankush Menat
e8c8f6fb63 test: Use name instead of doc
Previous filters implicitly returned last document.
2025-06-10 12:44:05 +05:30
Sagar Vora
b3bfce56a8 Merge pull request #47989 from priyanshshah2442/fix_calculated_discount_mismatch_report 2025-06-10 07:10:21 +00:00
Ankush Menat
9f0df5ecf3 fix: Correct filter types 2025-06-10 12:40:07 +05:30
priyanshshah2442
4e1abc1814 fix: add draft transactions also in calculated mismatch report 2025-06-10 12:38:07 +05:30
rohitwaghchaure
c62fe1a8db Merge pull request #47942 from rohitwaghchaure/fixed-support-40499
fix: available qty in BOM Stock Report
2025-06-10 12:19:52 +05:30
Sagar Vora
964712301b Merge pull request #47946 from priyanshshah2442/fix_discount_mismatch 2025-06-10 06:00:38 +00:00
Ankush Menat
c222d5fa55 chore: Drop empty UnitTestCase 2025-06-10 10:55:43 +05:30
MochaMind
465ec357aa fix: sync translations from crowdin (#47953) 2025-06-10 05:13:55 +00:00
ruthra kumar
bf9d3eac6a Merge pull request #47983 from frappe/mergify/copy/develop/pr-47934
fix(sales order): error message on creation of work order from sales order (copy #47934)
2025-06-10 10:22:08 +05:30
thomasantony12
2a2af8d986 fix(sales order): error message on creation of work order from sales order
(cherry picked from commit 129cd7ae8a)
2025-06-10 04:51:00 +00:00
Ankush Menat
4861e6a1b8 Merge pull request #47972 from frappe/balance
perf: skip fetching balances in payment entry
2025-06-10 09:04:31 +05:30
Ankush Menat
1343d147bd perf: Skip fetching account balances unless required
This is very expensive operation and not requried when just finding
default account and account info.
2025-06-10 08:50:00 +05:30
Ankush Menat
0a043a4e0b perf: Avoid fetching account balance
This isn't shown anywhere in UI anymore since https://github.com/frappe/erpnext/pull/45630
2025-06-10 08:50:00 +05:30
l0gesh29
c8cec8cedf fix: add .length in list validation (#47974)
Co-authored-by: Raffael Meyer <14891507+barredterra@users.noreply.github.com>
2025-06-10 01:15:31 +02:00
barredterra
2dbdacf905 refactor(Work Order): query_sales_order
- Use `get_list` instead of `db.sql_list`

    The method is used for setting link options in the frontend and the Link field doesn't ignore permissions, so get_list should be fine here.

- Added type hints to enable argument validation
2025-06-09 22:15:41 +02:00
Khushi Rawat
ffa014ecdc Merge pull request #47979 from khushi8112/attribute-error-fix-in-asset-capitalization
fix: AttributeError due to incorrect object
2025-06-10 00:15:18 +05:30
Khushi Rawat
351796bce6 fix: AttributeError due to incorrect object 2025-06-09 23:58:40 +05:30
Aayush Dalal
8b6a8d0c4f fix: throw permission error (#47976)
Co-authored-by: Sagar Vora <16315650+sagarvora@users.noreply.github.com>
2025-06-09 17:28:46 +00:00
Sagar Vora
e91b4f759c Merge branch 'develop' into fix_discount_mismatch 2025-06-09 17:15:41 +00:00
Sagar Vora
54ca0dd004 Merge pull request #47975 from sagarvora/fix-test
test: improve logic for `test_employee_query_with_user_permissions`
2025-06-09 17:12:33 +00:00
Sagar Vora
5e4554d14e test: ensure employees are created before using 2025-06-09 22:27:21 +05:30
Sagar Vora
2a85c401b4 test: improve logic for test_employee_query_with_user_permissions 2025-06-09 22:12:36 +05:30
priyanshshah2442
f781a39dbe fix: fieldtype to Currency for discount amounts 2025-06-09 19:20:40 +05:30
Sagar Vora
9bf9b34ac4 fix: remove currency col 2025-06-09 19:13:53 +05:30
Sagar Vora
33e793354c fix: changes in report 2025-06-09 19:13:03 +05:30
Sagar Vora
e3356ebfb6 Merge branch 'develop' into fix_discount_mismatch 2025-06-09 13:16:02 +00:00
priyanshshah2442
3f0c5be5d9 fix: test case to verify correct setting of discount amount and percentage 2025-06-09 18:43:58 +05:30
priyanshshah2442
9120927a65 fix: add change log for bug fix in Additional Discount functionality 2025-06-09 18:06:16 +05:30
priyanshshah2442
3dcb801a37 fix: ensure proper float conversion for discount values 2025-06-09 17:49:40 +05:30
ruthra kumar
ea68e94665 Merge pull request #47865 from aerele/accounts-receivable/payable-user-permission
fix: consider user permission while populating the data
2025-06-09 15:22:15 +05:30
Sagar Vora
daad6137f8 fix: changes to report and patch 2025-06-09 14:11:19 +05:30
ruthra kumar
1e9c34d4f8 Merge pull request #47626 from debinnn/word-order-date
fix: no validation to compare 'actual start date' and 'actual end date' when creating work order.
2025-06-09 12:12:56 +05:30
ruthra kumar
d83bc7be41 Merge pull request #47963 from frappe/mergify/copy/develop/pr-47590
fix(report): include descendants when filtering by parent item group (copy #47590)
2025-06-09 12:10:49 +05:30
Debin Robert
e1ae650d45 refactor: ensure end date is after start date on work order 2025-06-09 11:57:12 +05:30
FATHIH MOHAMMED
d25021d488 fix(report): include descendants when filtering by parent item group
(cherry picked from commit d21bfa219d)
2025-06-09 06:25:30 +00:00
priyanshshah2442
62dd6df24f feat: report to verify discount amount mismatch 2025-06-09 11:13:59 +05:30
ruthra kumar
8adb5e7e66 Merge pull request #47863 from khushi8112/closing-balance-in-dr-cr
feat: show Dr/Cr in Supplier ledger summary & Customer ledger summary
2025-06-09 10:15:30 +05:30
Ankush Menat
765c7c2bcc refactor: rename get_settings -> get_single_value (#47961) 2025-06-09 04:40:02 +00:00
MochaMind
26abf9f13a chore: update POT file (#47956) 2025-06-08 14:56:06 +02:00
MochaMind
75872925a2 fix: sync translations from crowdin (#47881)
Co-authored-by: Raffael Meyer <14891507+barredterra@users.noreply.github.com>
2025-06-06 20:30:30 +00:00
Ankush Menat
bb693c0a4f perf: Batch GLE/SLE rename commits (#47950) 2025-06-06 14:51:59 +00:00
Ankush Menat
73746e2c71 perf: use cached selling settings (#47949)
* perf: Use cached stock repost settings

* perf: Use cached selling settings
2025-06-06 14:10:12 +00:00
Ankush Menat
7d88d9dd4d perf: use cached Authorization control doc (#47948) 2025-06-06 14:09:47 +00:00
Ankush Menat
45a4beb401 perf: Use cached accounts settings (#47947) 2025-06-06 13:59:18 +00:00
Ankush Menat
ea5c2c454b perf: use cached stock settings (#47945) 2025-06-06 18:54:49 +05:30
priyanshshah2442
f7eda8a156 fix: patch to set discount percentange in case of mismatch 2025-06-06 18:40:06 +05:30
Khushi Rawat
522b6ad49f Merge pull request #47547 from aerele/fix-empty-sequence
fix(asset): make purchase date mandatory
2025-06-06 17:39:10 +05:30
Ankush Menat
a38ed286bd perf: cache item metadata retrieval (#47929)
* perf(get_item_details): use cached doc, avoid full get_doc

* perf: short-circuit common usecase of same UOM

* perf: use cached doc for inspection

* perf: use cached valuation method and other item props

It rarely if ever changes after initial configuration
2025-06-06 11:39:27 +00:00
Rohit Waghchaure
ea689bbe3f fix: available qty in BOM Stock Report 2025-06-06 16:14:43 +05:30
rohitwaghchaure
534f90c33d Merge pull request #47888 from rohitwaghchaure/fixed-support-39929-1
fix: do not remove item which has zero qty and zero valuation
2025-06-06 15:32:03 +05:30
Rohit Waghchaure
86e4a658a5 fix: do not remove item which has zero qty and zero valuation 2025-06-06 13:15:25 +05:30
Khushi Rawat
7d3bec8ef8 fix: failing test case 2025-06-06 12:44:36 +05:30
Khushi Rawat
7e52cb2856 refactor: split set_latest_location_and_custodian_in_asset into smaller functions 2025-06-06 12:44:36 +05:30
Khushi Rawat
07d1a0ed9c fix: saperated validations for each purpose of validation 2025-06-06 12:44:36 +05:30
Khushi Rawat
f5e5146021 feat: added Transfer and Issue option in purpose 2025-06-06 12:44:36 +05:30
Ankush Menat
7bddd64771 perf: Skip fetching non-existing call log (#47930) 2025-06-06 07:13:44 +00:00
Sagar Vora
abad8050a3 Revert "fix: calculate discount percentage if discount amount is specified" (#47927) 2025-06-06 06:06:20 +00:00
Sagar Vora
27dc0f5b70 Revert "fix: calculate discount percentage if discount amount is specified (#…"
This reverts commit bb474f4f42.
2025-06-06 11:35:30 +05:30
Ankush Menat
c9413e0cbb Merge pull request #47899 from frappe/cruft
perf: remove misc random cruft
2025-06-05 22:48:07 +05:30
Ankush Menat
958cc6f8f8 perf: use estimated count on item table 2025-06-05 22:31:36 +05:30
Ankush Menat
8e17054b67 fix: invalid logic for cache hit
if there are no inventory dimensions then `[]` gets treated as a miss.
2025-06-05 22:31:36 +05:30
Ankush Menat
a36daec939 perf: cache pricing rule query 2025-06-05 22:31:36 +05:30
Ankush Menat
4dc2969fa6 perf: avoid duplicate fetching of stock qty 2025-06-05 22:31:35 +05:30
Ankush Menat
c06a361348 fix: get_value doesn't support named plucking 2025-06-05 22:31:35 +05:30
Ankush Menat
9870dd26f7 perf: avoid querying cost center allocation repeatedly 2025-06-05 22:31:33 +05:30
Ankush Menat
013011aa43 perf: cache existence of budgets while validating GL 2025-06-05 22:26:26 +05:30
DHINESH00
fc4f38eed1 fix: update currency based on transaction 2025-06-05 20:04:20 +05:30
rohitwaghchaure
342cebc778 fix: stock reco qty with inventory dimension (#47918) 2025-06-05 17:35:32 +05:30
rohitwaghchaure
8fa3473945 fix: consider expired batches in the stock reco (#47909) 2025-06-05 17:18:46 +05:30
Deepesh Garg
9167f1ff90 Merge pull request #47907 from deepeshgarg007/gl_dict_hook
feat: Add hook to update gl dict by apps
2025-06-05 16:32:51 +05:30
rohitwaghchaure
997ce4eaa7 fix: key-error for COGS By Item Group report (#47914)
fix: keyerror for COGS By Item Group report
2025-06-05 15:59:23 +05:30
Ankush Menat
7720163e4c test: remove manual cleanup of db.value_cache (#47904)
test: clear cache instead of replacing
2025-06-05 09:37:19 +00:00
Deepesh Garg
c4aecb15ce style: Linting issues 2025-06-05 12:48:28 +05:30
Deepesh Garg
10ff369ff2 feat: Add hook to update gl dict by apps 2025-06-05 12:42:16 +05:30
Diptanil Saha
bb903a4bef fix: pos permission error on strict permission (#47896) 2025-06-04 16:07:28 +05:30
Mihir Kandoi
bfff582fea Merge pull request #47875 from mihir-kandoi/zero_valuation_toast
feat: show warning toast if rate is 0 and allow zero valuation rate c…
2025-06-04 12:33:32 +05:30
rohitwaghchaure
dc4f701101 refactor: item tax amount calculation for valuation rate (#47532) 2025-06-04 10:37:54 +05:30
rohitwaghchaure
cbcd580daa fix: stock adjustment entry during reposting (#47878)
fix: stock adjustment entry
2025-06-04 10:37:08 +05:30
Mihir Kandoi
7c57f5a304 feat: show warning toast if rate is 0 and allow zero valuation rate checkbox is not enabled 2025-06-03 18:34:22 +05:30
Mihir Kandoi
67d82894c6 Merge pull request #47874 from mihir-kandoi/st40223
fix: zero division error in purchase receipt
2025-06-03 18:34:17 +05:30
Mihir Kandoi
32229fb646 fix: zero division error in purchase receipt 2025-06-03 18:18:55 +05:30
l0gesh29
1a4bb30923 fix: add user permission while fetching ple 2025-06-03 18:17:11 +05:30
ruthra kumar
3f6a132234 Merge pull request #47872 from nitefury7/fix-purchase-order-analysis-report
fix: typo
2025-06-03 17:38:19 +05:30
Ayush Marhatta
a243abb5fd fix: typo 2025-06-03 17:32:28 +05:45
Khushi Rawat
524ae1d368 fix: removed checkbox 2025-06-03 14:53:21 +05:30
ruthra kumar
b2ff5b4578 Merge pull request #47866 from ruthra-kumar/ci_suppress_compiled_files
ci: suppress compiled files in output
2025-06-03 14:01:57 +05:30
ruthra kumar
e70da0291e ci: suppress compiled files in output 2025-06-03 13:38:12 +05:30
l0gesh29
074dc6d7dd fix: consider user permission while populating the data 2025-06-03 13:28:01 +05:30
ruthra kumar
36f3bd473c Merge pull request #47854 from nitefury7/fix-purchase-order-analysis-report
fix: use user default for company instead of global default in purchase order analysis report
2025-06-03 13:17:13 +05:30
rohitwaghchaure
75b5ba6e67 refactor: track completed app setup wizards and re-run the setup wizard upon new app installation. (#47691) 2025-06-03 13:02:45 +05:30
Khushi Rawat
ff285307c6 chore: wrapped text in translate function 2025-06-03 12:33:46 +05:30
Khushi Rawat
0dbebe74c1 chore: update label 2025-06-03 12:23:56 +05:30
Khushi Rawat
22ea62e92f chore: hide currency column 2025-06-03 12:06:39 +05:30
Khushi Rawat
e7ba420687 feat: added column to show Dr/Cr 2025-06-03 12:05:43 +05:30
Khushi Rawat
d15e3bb52b feat: show Dr/Cr in Supplier ledger summary & Customer ledger summary 2025-06-03 12:04:27 +05:30
Mihir Kandoi
538e0d08e4 Merge pull request #47756 from mihir-kandoi/st38914
feat: specify expense account and cost center for raw materials in Su…
2025-06-03 12:04:04 +05:30
Marc Ramser
0670765baa fix(Timesheet): only update to_time if it's more than 1 second off (#47703)
* Only update to_time if it's more than 1 second off

Before, to_time was updated even when it was almost the same as the expected time (like 17:20 vs 17:19:59.998). This causes problems because of small rounding errors and caused valid times like 17:20 to be reset. Now, to_time is only updated if the difference is greater than 1 second.

To reproduce the current error:

From Time 09:00:00
To Time 17:20:00 Save
To Time is 17:19:59

* Change data to self in timesheet

* Update timesheet_detail.py
2025-06-03 11:58:00 +05:30
Mihir Kandoi
8b42582f3c test: added more assertions 2025-06-03 11:47:38 +05:30
Lakshit Jain
20b87512d1 fix: cash flow report fixes 2025-06-03 11:22:02 +05:30
Diptanil Saha
1c17419a9e fix: pos order summary new order action (#47856) 2025-06-02 18:40:51 +05:30
Diptanil Saha
0624556ef6 fix: pos settings invoice_fields not fetched at pos setup (#47855) 2025-06-02 18:24:06 +05:30
Ayush Marhatta
49f23513e0 fix: use user default for company instead of global default in purchase order analysis report 2025-06-02 18:21:07 +05:45
ruthra kumar
56fc76f180 Merge pull request #47780 from aerele/add-link-field
fix: add internal link field in Sales Order connections for internal …
2025-06-02 16:46:48 +05:30
ruthra kumar
ee8c0daf61 Merge pull request #47665 from mujeerhashmi/patch-3
fix: Project argument is not passed correctly for MR creation
2025-06-02 16:36:31 +05:30
Karuppasamy
3a2b863e7f refactor: add validation for inter company transactions rate
Add validation for inter company transactions rate
2025-06-02 16:34:45 +05:30
Abdeali Chharchhodawala
39f6d8ffb6 fix: Handle duplicate Items qty in Quotation
fix: Handle duplicate Items qty in Quotation
2025-06-02 14:49:15 +05:30
ruthra kumar
f7712c9dc0 Merge pull request #47781 from ljain112/fix-cc-psa
fix: add company filter to cost center and project in process statement of accounts
2025-06-02 13:37:54 +05:30
l0gesh29
c8e052f3c6 Accounts receivable show delivery note (#47821)
* fix: reorder function call

* fix: Add condition to fetch return entries for specific party types
2025-06-02 13:35:23 +05:30
rohitwaghchaure
0dbd9efc91 fix: decimal issue (#47839) 2025-06-02 13:24:41 +05:30
Ankush Menat
f86c3f7f8b perf: Use client cached configuration (#47838)
These are accessed on every document load, reaching to DB is excessive.
2025-06-02 06:14:51 +00:00
Ankush Menat
705b9e0181 perf: cache child warehouses during a single request (#47837)
Gets called for each row right now, warehouses often same on all
items in a document.
2025-06-02 05:36:17 +00:00
MochaMind
910c3cc5cf fix: sync translations from crowdin (#47802) 2025-06-01 21:55:53 +00:00
MochaMind
1c0f164670 chore: update POT file (#47835) 2025-06-01 12:33:11 +02:00
Mihir Kandoi
bb474f4f42 fix: calculate discount percentage if discount amount is specified (#47806) 2025-05-31 20:52:14 +05:30
rohitwaghchaure
e4c4ee79de fix: incorrect valuation for returned materials (#47824) 2025-05-31 18:43:21 +05:30
rohitwaghchaure
0557d4d180 fix: incorrect serial no status after delivery note cancel (#47825) 2025-05-31 18:42:40 +05:30
rohitwaghchaure
b49a835b4c fix: improved indexing for SLE queries. (#47194) 2025-05-30 13:41:14 +05:30
Ankush Menat
a61f065660 Merge pull request #47783 from frappe/perf/stock_reco
perf: speed up stock reconciliation
2025-05-29 18:09:51 +05:30
rohitwaghchaure
c544c3e018 fix: incorrect actual qty in product bundle balance report (#47791) 2025-05-29 18:09:33 +05:30
Ankush Menat
dc8d9dc7fa perf: fix incorrect usage of get_cached_value 2025-05-29 17:54:53 +05:30
Ankush Menat
e1d14d8ac2 perf: Ignore validating links
Framework does this anyway and does it faster.
2025-05-29 17:37:17 +05:30
Ankush Menat
0a1fc3e24f perf: use cached doc for validating item 2025-05-29 17:37:17 +05:30
Ankush Menat
e2920e2536 perf: Fix incorrect cache implementation
`if not {}` results to `True` so if someone doesn't have inventory dimensions, this gets called again and again.
2025-05-29 17:37:17 +05:30
Ankush Menat
076b765cb2 perf: Avoid Querying existence of item code
- This should be ensured by Framework.
- It's also there in validate hook.

So no need to do it again for each item.
2025-05-29 17:37:17 +05:30
Ramdani
4d98094783 Merge pull request #47784 from xhijack/fix_default_indonesia_vat
Fix default indonesia vat
2025-05-29 14:59:02 +05:30
ruthra kumar
45f7db6054 Merge pull request #47794 from ljain112/fix-ar-query
fix: use `query.walk() `for escaping special chars in receiable/payable report
2025-05-29 13:49:55 +05:30
Ankush Menat
6549047c3f fix: Drop duplicate index (#47799) 2025-05-29 12:18:39 +05:30
ljain112
a0a51b5074 fix: use query.walk() for escaping special chars in receiable/payable report 2025-05-29 11:18:08 +05:30
rohitwaghchaure
cb9e6f6655 chore: removed orphaned function (#47796) 2025-05-29 10:14:45 +05:30
Khushi Rawat
7d9379461a test: composite component 2025-05-29 00:15:36 +05:30
Mihir Kandoi
93ebd173cd Merge pull request #47792 from mihir-kandoi/st39718
feat: show item name for raw materials in BOM creator
2025-05-28 19:52:13 +05:30
Ankush Menat
2b4285374f fix: checkbox can't be mandatory (#47793)
fix: checkboxes can't be mandatory
2025-05-28 13:46:58 +00:00
Mihir Kandoi
90ba4ad1e1 feat: show item name for raw materials in BOM creator 2025-05-28 18:13:42 +05:30
Khushi Rawat
83b32f9646 fix: correct gl entry when capitalizing composite component 2025-05-28 17:48:04 +05:30
ljain112
14313b162a fix: add company filter to cost center and project in process statement of accounts 2025-05-28 13:56:42 +05:30
Karuppasamy923
e3e6503076 fix: add internal link field in Sales Order connections for internal transactions 2025-05-28 12:59:49 +05:30
ruthra kumar
82208f8513 Merge pull request #47778 from ruthra-kumar/ui_changes_for_budget_refactor
refactor: UI changes for budget refactor
2025-05-28 11:25:01 +05:30
ruthra kumar
5222e89250 refactor: more user friendly error message 2025-05-28 11:03:26 +05:30
ruthra kumar
5aaa866205 refactor: hide cumulative exp actions if new controller is disabled 2025-05-28 11:03:24 +05:30
ruthra kumar
776688d585 Merge pull request #47775 from frappe/l10n_develop
fix: sync translations from crowdin
2025-05-28 09:25:34 +05:30
MochaMind
aefa5308b7 fix: Serbian (Latin) translations 2025-05-28 02:11:54 +05:30
MochaMind
1026550051 fix: Persian translations 2025-05-28 02:11:44 +05:30
MochaMind
a10b8ecbe5 fix: Swedish translations 2025-05-28 02:11:32 +05:30
Raffael Meyer
3c0efcf7f1 Revert "fix: translate_pos_buttons" (#47773) 2025-05-27 19:08:49 +00:00
ruthra kumar
011084bdf9 Merge pull request #47766 from ljain112/fix-multiselect
fix: handle multiselect filters for tree doctypes in Customer Ledger Summary Report
2025-05-27 19:52:45 +05:30
Mihir Kandoi
4861856b8f test: add test 2025-05-27 18:23:44 +05:30
ruthra kumar
74fab3a539 Merge pull request #47767 from aerele/quotation-lost-reason
fix: add no_copy for lost reasons
2025-05-27 18:02:27 +05:30
ruthra kumar
f50b5b19fe Merge pull request #47765 from ljain112/fix-sls
fix: use pypika object `LiteralValue` for adding match conditions
2025-05-27 18:00:05 +05:30
ljain112
536f7d5ff8 fix: handle multiselect filters for tree doctypes in Customer Ledger Summary Report 2025-05-27 17:27:29 +05:30
l0gesh29
98e889a516 fix: add no_copy for lost reasons 2025-05-27 17:04:41 +05:30
ruthra kumar
d05132ab1d Merge pull request #47763 from aerele/item-tax-template-on-rate
feat: add validation for Item Tax Template on rate change
2025-05-27 16:59:07 +05:30
ljain112
9093e5e363 fix: use pypika object LiteralValue for adding match conditions 2025-05-27 16:51:52 +05:30
Mihir Kandoi
93b33faabf refactor: move logic to validate function 2025-05-27 16:23:42 +05:30
Karuppasamy923
a9a957edc7 feat: add validation for Item Tax Template on rate change 2025-05-27 16:19:43 +05:30
Mihir Kandoi
44bec1f981 feat: GL entries 2025-05-27 15:32:58 +05:30
Mihir Kandoi
0f53cc1922 feat: specify expense account and cost center for raw materials in Subcontracting Receipt for GL entries 2025-05-27 15:32:58 +05:30
Diptanil Saha
4d1d66e579 fix: patch to set status cancelled for already cancelled pos invoices (#47725) 2025-05-27 15:27:45 +05:30
Diptanil Saha
1523b38315 fix: patch to set grand total to default mop if old column exists (#47731)
* fix: patch to set grand total to default mop if old column exists

* chore: patches.txt
2025-05-27 14:48:25 +05:30
ruthra kumar
3bb44b5ef6 Merge pull request #47721 from xhijack/fix_default_indonesia_vat
fix indonesia tax
2025-05-27 14:11:43 +05:30
ruthra kumar
4fc7cc4c15 Merge pull request #47679 from ljain112/fix-pur-piad
fix: setting paid amount to 0 when is_paid is unchecked in purchase invoice
2025-05-27 13:57:20 +05:30
ljain112
e358a9e53f fix: setting paid amount to 0 when is_paid is unchecked in purchase invoice 2025-05-27 13:41:03 +05:30
Ramdani
e1b9f24b69 fix: indonesia tax 2025-05-27 13:18:31 +05:30
ruthra kumar
c3847e4300 Merge pull request #47736 from ljain112/fix-tcs-advance
fix: only include advances within the tcs period
2025-05-27 13:18:01 +05:30
ruthra kumar
bba2bb4561 Merge pull request #47737 from ljain112/fix-party-account
fix: party account based on party type's account type
2025-05-27 13:12:56 +05:30
rohitwaghchaure
d8cb073eaf fix: create Quality Inspection button not showing (#47746) 2025-05-27 12:18:39 +05:30
ruthra kumar
64cb693173 Merge pull request #47659 from mahsem/translate_pos_buttons
fix: translate_pos_buttons
2025-05-27 11:40:56 +05:30
ruthra kumar
114d42d26b Merge pull request #47654 from ljain112/fix-psa-currency
fix: show general ledger in doc currency in Process Statement Of Accounts
2025-05-27 11:39:27 +05:30
ruthra kumar
c40b4c4639 Merge pull request #47531 from Abdeali099/modern-check-for-array
refactor: simplify `source_name` assignment in `map_current_doc`
2025-05-27 11:17:18 +05:30
ruthra kumar
75ae131d81 Merge pull request #47697 from ruthra-kumar/fetch_party_name_for_contract
refactor: Fetch party name for contract
2025-05-26 17:40:32 +05:30
ruthra kumar
8e2221178b refactor: patch old contract with full party name 2025-05-26 17:17:31 +05:30
ruthra kumar
752024e222 refactor: fetch party name on selection 2025-05-26 17:17:11 +05:30
ruthra kumar
016924361a refactor: full name field in contract 2025-05-26 17:17:11 +05:30
maasanto
b7de5398a7 chore: Remove agriculture roles (#47335)
* feat: remove permissions of Agriculture Manager and Agriculture User

* feat: patch to remove agriculture roles

* chore: formatting issue

---------

Co-authored-by: ruthra kumar <ruthra@erpnext.com>
2025-05-26 17:15:46 +05:30
Ankush Menat
def9d8c9e0 perf: speed up customer import (#47738)
* perf: Avoid fetching customer from DB

This is likely code from bygone era where is_new and doc_before_save didn't exist?

I see no reason to do it in this weird manner. This code still appears
to be wrong but I'll leave it as is for now.

* fix: don't validate internal customer for non-internal customer

This was likely missed out while adding validations
2025-05-26 11:35:34 +00:00
ljain112
19b1650522 fix: party account based on party type's account type 2025-05-26 15:55:55 +05:30
Ankush Menat
ff59b89f3e Merge pull request #47734 from frappe/perf_item_import
perf: speedup item import
2025-05-26 15:43:26 +05:30
ljain112
477ec9fdcc fix: only include advances within the tcs period 2025-05-26 15:36:12 +05:30
Ankush Menat
7b811a93b4 perf: don't cleanup plaintext fallback 2025-05-26 15:27:49 +05:30
Ankush Menat
41d56c8e3a perf: fetch cached item group defaults, avoid query 2025-05-26 15:10:03 +05:30
Ankush Menat
31b8eb4922 perf: don't validate for change on new documents 2025-05-26 14:59:02 +05:30
Ankush Menat
a54d965d6d perf: validate variant change only if value changed 2025-05-26 14:57:11 +05:30
Ankush Menat
a52b2d8eb5 perf: don't update price of newly inserted item 2025-05-26 14:46:27 +05:30
ruthra kumar
4faab02e24 Merge pull request #47650 from frappe/l10n_develop
fix: sync translations from crowdin
2025-05-26 13:34:26 +05:30
Deepesh Garg
6174522028 Merge pull request #47709 from diptanilsaha/patch-custom-gl-report
fix: patch to rename group_by filter in custom reports
2025-05-26 12:41:24 +05:30
ruthra kumar
3b2e689957 Merge pull request #47253 from prateekkaramchandani/feat/currency-chart-warehouse-stock-value
fix: display stock value in currency format in chart warehouse wise stock value
2025-05-26 11:19:06 +05:30
MochaMind
7fc017d537 fix: Esperanto translations 2025-05-26 02:05:33 +05:30
MochaMind
a9440d5d43 fix: Portuguese translations 2025-05-26 02:05:29 +05:30
MochaMind
27a99d42df fix: Serbian (Latin) translations 2025-05-26 02:05:27 +05:30
MochaMind
4132e9a283 fix: Bosnian translations 2025-05-26 02:05:23 +05:30
MochaMind
d9c038cd43 fix: Croatian translations 2025-05-26 02:05:20 +05:30
MochaMind
4bc29a1c80 fix: Thai translations 2025-05-26 02:05:16 +05:30
MochaMind
8d00c2f6db fix: Persian translations 2025-05-26 02:05:14 +05:30
MochaMind
910e51005a fix: Portuguese, Brazilian translations 2025-05-26 02:05:10 +05:30
MochaMind
96d053edf7 fix: Chinese Simplified translations 2025-05-26 02:05:07 +05:30
MochaMind
5f9d42b7f5 fix: Turkish translations 2025-05-26 02:05:04 +05:30
MochaMind
6d9afe2bdb fix: Swedish translations 2025-05-26 02:05:01 +05:30
MochaMind
72b811bc6f fix: Russian translations 2025-05-26 02:04:58 +05:30
MochaMind
03e366999a fix: Polish translations 2025-05-26 02:04:55 +05:30
MochaMind
ca9cde986f fix: Hungarian translations 2025-05-26 02:04:52 +05:30
MochaMind
984037eea1 fix: German translations 2025-05-26 02:04:49 +05:30
MochaMind
82e41e79cf fix: Arabic translations 2025-05-26 02:04:46 +05:30
MochaMind
92ab31c54c fix: Spanish translations 2025-05-26 02:04:43 +05:30
MochaMind
1be24f948a fix: French translations 2025-05-26 02:04:40 +05:30
MochaMind
7755e77dfc chore: update POT file (#47720) 2025-05-25 12:45:56 +02:00
rohitwaghchaure
67c86ec028 fix: skip drop ship items (#47670) 2025-05-25 11:36:51 +05:30
rohitwaghchaure
874750f9ce fix: filter of item for manufacture type material request (#47712) 2025-05-25 11:36:02 +05:30
Frappe PR Bot
786963f0be fix: Serbian (Latin) translations 2025-05-25 00:57:00 +05:30
Frappe PR Bot
73b377a9b0 fix: Persian translations 2025-05-25 00:56:55 +05:30
Frappe PR Bot
6cf5e76685 fix: Chinese Simplified translations 2025-05-25 00:56:51 +05:30
rohitwaghchaure
1e8ed22421 fix: absence of rounding causing discrepancy in the valuation rate calculation (#47700) 2025-05-24 17:11:12 +05:30
diptanilsaha
48eccb1f73 fix: using python instead of sql query 2025-05-24 14:53:04 +05:30
diptanilsaha
0d19c18c06 fix: patch to rename group_by filter in custom reports 2025-05-24 12:55:05 +05:30
Diptanil Saha
89115688f7 fix: pos screen ui ux (#47680)
* fix: pos addl info dialog submit form on save

* feat: new invoice and recent order button on page action

* fix: item cart highlighted item scrolling

* fix: using icon instead of text in fullscreen button

* fix: search field clear button alignment

* fix: hide item selector on item details display

* fix: using add_action_icon

* fix: action of 'New Invoice' for unsaved changes

* fix: highlight numpad btns on hover

* fix: pos recent orders filter and list items

* chore: added icons for pos icon buttons

* fix: recent order toggle after invoice submission

* fix: capitalized text in select options
2025-05-23 12:36:21 +05:30
rohitwaghchaure
c3b17024bd fix: skip last purchase rate for free item (#47693) 2025-05-23 08:25:35 +05:30
Frappe PR Bot
70110be24b fix: Bosnian translations 2025-05-23 00:38:57 +05:30
Frappe PR Bot
b4aafd317e fix: Swedish translations 2025-05-23 00:38:47 +05:30
ruthra kumar
30e23a8c74 Merge pull request #47692 from ruthra-kumar/test_refactor_1
refactor(test): drop ignore test dependencies on some empty test modules
2025-05-22 20:29:14 +05:30
ruthra kumar
351f02cea0 refactor(test): project update drop ignore test record dependencies 2025-05-22 20:09:55 +05:30
ruthra kumar
9fa5bbae24 refactor(test): remove IGNORE_TEST_RECORD_DEPENDENCIES 2025-05-22 20:09:55 +05:30
ruthra kumar
10a5815805 chore: remove dead code 2025-05-22 20:09:55 +05:30
ruthra kumar
aae63afec9 Merge pull request #47690 from ruthra-kumar/deterministic_leaf_node_doctypes
refactor(test): remove dependency from sales partner and territory
2025-05-22 19:57:31 +05:30
ruthra kumar
b22efc0bb5 refactor(test): remove dependency from sales partner and territory 2025-05-22 16:59:11 +05:30
Khushi Rawat
6ed97b5fda fix: incorrect valuation rate due to positive qty (#47686) 2025-05-22 16:13:24 +05:30
ruthra kumar
6bd6e7d417 Merge pull request #47675 from ljain112/fix-terrirtory
fix: typo in TREE_DOCTYPES list "Terrirtory" should be "Territory"
2025-05-22 15:56:07 +05:30
ruthra kumar
07e11f94b6 Merge pull request #47656 from ruthra-kumar/new_budget_controller_cumulative_breach
fix: handle cumulative breach for monthly and annual
2025-05-22 15:28:01 +05:30
ruthra kumar
5a9b272f84 test: cumulative actions for budget 2025-05-22 15:04:17 +05:30
ruthra kumar
f077f60344 refactor(test): utlity method to set cumulative actions 2025-05-22 14:03:43 +05:30
ruthra kumar
3eb07fba2a refactor: use cumulative control action on new controller 2025-05-22 13:54:04 +05:30
ruthra kumar
45368f983b refactor: control actions for cumulative expense 2025-05-22 13:47:02 +05:30
Mihir Kandoi
483b572db0 Merge pull request #47658 from mihir-kandoi/st39010
fix: exchange rate not being fetched when creating supplier quotation…
2025-05-22 12:55:37 +05:30
Mihir Kandoi
8d9888b1b6 fix: include rejected amount in PI/PR overbilling validation logic (#47572)
* fix: include rejected amount in PI/PR overbilling validation logic

* fix: add check if amount is 0

* fix: unneccessary condition
2025-05-22 12:52:31 +05:30
Khushi Rawat
9d78485af8 chore: removed commented code 2025-05-22 12:42:08 +05:30
Khushi Rawat
92614cb446 fix: test cases 2025-05-22 12:42:08 +05:30
Khushi Rawat
2aecca50b9 refactor: updated related references 2025-05-22 12:42:08 +05:30
Khushi Rawat
17a5d5f561 refactor: removal of composite asset creation from asset capitalization 2025-05-22 12:42:01 +05:30
ljain112
51162cb1a3 fix: typo in TREE_DOCTYPES list "Terrirtory" should be "Territory" 2025-05-22 12:34:55 +05:30
Frappe PR Bot
0f89eb30ac fix: Serbian (Latin) translations 2025-05-22 00:34:38 +05:30
Frappe PR Bot
bf4350064a fix: Persian translations 2025-05-22 00:34:33 +05:30
Frappe PR Bot
26a1bdd0fe fix: Swedish translations 2025-05-22 00:34:29 +05:30
Frappe PR Bot
3f30404417 fix: French translations 2025-05-22 00:34:25 +05:30
Syed Mujeer Hashmi
9eab434ae8 fix: Project argument is passed correctly for MR creation 2025-05-21 18:56:46 +05:30
Diptanil Saha
b2696bf659 fix: pos additional information fields not updating on removal of data (#47663) 2025-05-21 18:36:26 +05:30
RAVIBHARATHI P C
e6f47be4b0 fix(asset): make purchase date mandatory 2025-05-21 17:57:34 +05:30
mahsem
2839fc9460 fix: prettier 2025-05-21 13:21:55 +02:00
mahsem
50a5b51909 fix: space 2025-05-21 13:04:08 +02:00
mahsem
a442ec4e80 fix: space 2025-05-21 13:01:11 +02:00
mahsem
1953c8489c fix: prettier 2025-05-21 12:59:07 +02:00
mahsem
4a6b5b9993 fix: linter 2025-05-21 12:54:25 +02:00
mahsem
ce45d1664d fix: translate_pos_buttons 2025-05-21 12:46:36 +02:00
Mihir Kandoi
9d12ae071a fix: exchange rate not being fetched when creating supplier quotation from MR 2025-05-21 15:42:51 +05:30
ljain112
22a94d6817 chore: update test case because currency is auto set to system currency 2025-05-21 14:37:47 +05:30
Diptanil Saha
8c86def018 fix: pos invoice status not updating on cancel (#47556) 2025-05-21 14:37:22 +05:30
ruthra kumar
4862ae42d5 fix: handle cumulative breach for monthly and annual
- better method names
2025-05-21 14:30:59 +05:30
ljain112
998f6a29a4 fix: show general ledger in doc currency in Process Statement Of Accounts 2025-05-21 13:18:09 +05:30
Frappe PR Bot
4e3652b1c1 fix: Serbian (Latin) translations 2025-05-21 00:28:48 +05:30
Frappe PR Bot
472c84ecdb fix: Bosnian translations 2025-05-21 00:28:45 +05:30
Frappe PR Bot
fe084d1953 fix: Persian translations 2025-05-21 00:28:38 +05:30
Frappe PR Bot
7196a4b603 fix: German translations 2025-05-21 00:28:34 +05:30
rohitwaghchaure
738cb6a0c1 fix: incorrect inventory dimension for material transfer (#47592) 2025-05-20 19:13:08 +05:30
Khushi Rawat
33ab64dec2 fix: asset cancellation issue (#47639) 2025-05-20 17:06:57 +05:30
Khushi Rawat
0f5be4b245 feat: is composite component checkbox (#47602)
* feat: composite component

* chore: update mandatory depends on according to the new checkbox

* chore: validate disposal date for composite component asset

* fix: updated modified time
2025-05-20 16:51:02 +05:30
ruthra kumar
ee27730b72 Merge pull request #47632 from akhilnarang/quotation-use-small-text
fix(quotation): use `Text Editor` field in alternative items dialog
2025-05-20 14:20:57 +05:30
Akhil Narang
c7ea91073e fix(quotation): use Text Editor field in alternative items dialog for item description
`Data` causes text to overflow - the field is originally a `Text Editor` field

Signed-off-by: Akhil Narang <me@akhilnarang.dev>
2025-05-20 14:03:47 +05:30
ruthra kumar
13dd6272d7 Merge pull request #47629 from ljain112/fix-psa-ar
fix: date formatting in process_statement_of_accounts accounts_receivable print format
2025-05-20 13:52:52 +05:30
ljain112
67c32ce3c9 fix: date formatting in process_statement_of_accounts accounts_receivable print format 2025-05-20 13:19:02 +05:30
ruthra kumar
6f85a74f30 Merge pull request #47580 from aerele/calculate-ageing-with
feat: add option to calculate ageing based on report date or today's date
2025-05-20 13:02:26 +05:30
ruthra kumar
9dc27141c7 Merge pull request #47551 from cogk/fix-escape-uom-in-get_pricing_rules
fix: Escape UOM in pricing rule query
2025-05-20 11:26:00 +05:30
ruthra kumar
15b3ce1beb Merge pull request #47559 from ljain112/fix-billed-amt
fix: include only invoices with update_stock = 0  for billed amt in delivery note.
2025-05-20 11:01:04 +05:30
ruthra kumar
83879715e9 Merge pull request #47486 from aerele/sales-analytics-opening-entry
fix(SalesAnalytics): Ignore opening entries
2025-05-20 10:50:19 +05:30
ruthra kumar
0f27e100b2 Merge pull request #47614 from barredterra/make-return-doc
fix: remove hardcoded doctype in `make_return_doc`
2025-05-20 09:59:12 +05:30
Frappe PR Bot
2206f492ac fix: sync translations from crowdin (#47554) 2025-05-20 03:39:18 +02:00
Khushi Rawat
ff2ccf9bce fix: asset image field updation issue (#47615) 2025-05-20 01:07:14 +05:30
rohitwaghchaure
3e098da01f fix: GL entries for rejected returned materials (#47612) 2025-05-19 22:53:03 +05:30
barredterra
45a5c19dd4 fix: remove hardcoded doctype in make_return_doc 2025-05-19 15:40:57 +02:00
Debin Robert
a912e5ddae fix: wrong source fieldname in lead details report 2025-05-19 15:02:00 +05:30
ruthra kumar
2eea8c9e79 Merge pull request #47505 from aerele/fix/address-link
fix: validate inter company transaction address links
2025-05-19 13:08:51 +05:30
rohitwaghchaure
ca0e53dd78 feat: allow to set valuation rate for Rejected Materials (#47582) 2025-05-19 12:51:32 +05:30
rohitwaghchaure
a058fe7319 fix: incorrect qty during reset (#47593) 2025-05-18 22:50:46 +05:30
Frappe PR Bot
0daeb26e96 chore: update POT file (#47594) 2025-05-18 17:51:30 +02:00
l0gesh29
c67ba2d49b feat: add option to calculate ageing based on report date or today date 2025-05-16 15:50:02 +05:30
Khushi Rawat
7bc974b65a Merge pull request #47573 from khushi8112/asset-capitalization-child-table-row-deletion
fix: alias 'name' and 'parent' to prevent child row mapping issues
2025-05-16 15:34:28 +05:30
Khushi Rawat
1ca51e4f14 fix: removed invalid child param to prevent callback failure 2025-05-16 15:08:16 +05:30
Khushi Rawat
a418e377f4 fix: alias name and parent to prevent child row mapping issues 2025-05-16 15:02:26 +05:30
ruthra kumar
7f9f3027cc Merge pull request #47274 from ruthra-kumar/budget_validation_refactor
refactor: Budget validation
2025-05-16 13:20:29 +05:30
ruthra kumar
3a8075198b chore: patch to force default new controller 2025-05-16 13:03:36 +05:30
ruthra kumar
e1f32df5b3 refactor: make use of frappe._dict 2025-05-16 12:45:13 +05:30
ruthra kumar
6fabedd0da refactor: cleaner code with less verbosity 2025-05-16 12:45:13 +05:30
ruthra kumar
ee3d7db29d refactor(test): tests should use new controller 2025-05-16 12:45:13 +05:30
ruthra kumar
d4ac042d85 chore: make new budget controller configurable 2025-05-16 12:45:13 +05:30
ruthra kumar
58556c82bb refactor: handle exception approver role for budget 2025-05-16 12:45:13 +05:30
ruthra kumar
a7202201f7 refactor: fetch monthly distribution as well 2025-05-16 12:45:13 +05:30
ruthra kumar
3fb5d835f2 refactor: validate budget on cancel as well 2025-05-16 12:45:13 +05:30
ruthra kumar
55cb91ce20 refactor: use meta to identify tree 2025-05-16 12:45:13 +05:30
ruthra kumar
f886b50e7a refactor: handle group nodes 2025-05-16 12:45:13 +05:30
ruthra kumar
11f7c1e49a refactor: validate on GL creation 2025-05-16 12:45:13 +05:30
ruthra kumar
d9d2020b46 refactor: allow for better translation 2025-05-16 12:45:13 +05:30
ruthra kumar
b7e70bb746 refactor: better error message 2025-05-16 12:45:13 +05:30
ruthra kumar
2ecb2fa4af refactor: stateful variables 2025-05-16 12:45:13 +05:30
ruthra kumar
49bb72bcd2 refactor: better query parameters for PO and MR 2025-05-16 12:45:13 +05:30
ruthra kumar
3064646a8f refactor: better error message 2025-05-16 12:45:13 +05:30
ruthra kumar
fcf572e641 refactor: always query booked expenses 2025-05-16 12:45:13 +05:30
ruthra kumar
fc24bbf5ad refactor: handle breach on total expense 2025-05-16 12:45:13 +05:30
ruthra kumar
3e80248cde refactor: PO validation happens after submission 2025-05-16 12:45:13 +05:30
ruthra kumar
0e016a9c47 refactor: replace duplicate validation with single method 2025-05-16 12:45:13 +05:30
ruthra kumar
593729ac2b refactor: code refactor 2025-05-16 12:45:13 +05:30
ruthra kumar
388d901668 refactor: handle monthly distribution limit 2025-05-16 12:45:13 +05:30
ruthra kumar
d52469c51e refactor: handle actual expense 2025-05-16 12:45:13 +05:30
ruthra kumar
791ad16883 refactor: cleaner initialization 2025-05-16 12:45:13 +05:30
ruthra kumar
ec466d024a refactor: minor readbility changes 2025-05-16 12:45:13 +05:30
ruthra kumar
d933d0b478 refactor: handle budget for material request 2025-05-16 12:45:13 +05:30
ruthra kumar
626b345caf refactor: better local variables and contextual error messages 2025-05-16 12:45:13 +05:30
ruthra kumar
7791777d1a refactor: barebones validation 2025-05-16 12:45:13 +05:30
ruthra kumar
1c574561eb refactor: fetch amount booked in material request 2025-05-16 12:45:12 +05:30
ruthra kumar
10c3bb4971 refactor: move validate trigger to controller 2025-05-16 12:45:12 +05:30
ruthra kumar
fb667f5e09 refactor: fetch billed PO amount 2025-05-16 12:45:12 +05:30
ruthra kumar
31ac9a5ea0 refactor: make code more pythonic 2025-05-16 12:45:12 +05:30
ruthra kumar
bd42d09592 refactor: replace get_doc with sql 2025-05-16 12:45:12 +05:30
ruthra kumar
63dae6bd42 refactor: validate only for overlapping keys 2025-05-16 12:45:12 +05:30
ruthra kumar
22150d8175 refactor: budgetvaldiation class 2025-05-16 12:45:12 +05:30
Mihir Kandoi
9fb7490c40 Merge pull request #47570 from mihir-kandoi/enforce_time_logs
feat: add checkbox for validating time logs in job card
2025-05-16 12:06:59 +05:30
Mihir Kandoi
2d9a6a4de8 feat: add checbox for validating time logs in job card 2025-05-16 11:32:22 +05:30
ruthra kumar
b846686971 Merge pull request #47569 from ruthra-kumar/budget_cleanup_test_records
fix(test): clean up data so subsequent test cases don't flake
2025-05-16 10:15:05 +05:30
ruthra kumar
5c15b96d7d fix(test): clean up data so subsequent test cases don't flake 2025-05-16 09:55:56 +05:30
ruthra kumar
9175d0dbbf Merge pull request #47562 from ruthra-kumar/fix_dormant_broken_budget_test_case
fix(test): dormant broken test in Budget
2025-05-15 20:05:28 +05:30
ruthra kumar
9ed69f96e8 fix(test): pass sufficient amount to breach accumulated limit 2025-05-15 16:47:30 +05:30
ruthra kumar
ca07ec79ee fix(test): dormant broken test in Budget 2025-05-15 16:12:55 +05:30
rohitwaghchaure
31c4c1ccf3 fix: sales order qty issue (#47560) 2025-05-15 14:53:32 +05:30
ljain112
6dc459db58 fix: include only invoices with update_stock = 0 for billed amt in delivery note. 2025-05-15 14:06:04 +05:30
rohitwaghchaure
fc554ba599 fix: stop additional item (#47548) 2025-05-15 10:30:46 +05:30
Mihir Kandoi
82161e9cb5 fix: mapping of dispatch address when creating PO from SO (#47552)
* fix: mapping of dispatch address when creating PO from SO

* fix: add to default supplier function as well
2025-05-14 20:35:45 +05:30
Corentin Forler
89f98b835c fix: Escape UOM in pricing rule query 2025-05-14 14:59:09 +02:00
rohitwaghchaure
4241bfd4bc fix: allow FG as RM by default (#47543) 2025-05-14 16:20:28 +05:30
rohitwaghchaure
a18e1cffa7 fix: validation message format (#47542) 2025-05-14 16:20:02 +05:30
Diptanil Saha
5c28e01590 fix: pos item group filter fetching wrong items (#47545) 2025-05-14 15:51:02 +05:30
Kitti U. @ Ecosoft
b541b536c3 fix: POS Invoice can't use Loyalty Points when Global Rounded Total is Disabled (#47491) 2025-05-14 10:54:59 +05:30
barredterra
61e96f3fb5 fix: find table row 2025-05-13 18:13:26 +02:00
rohitwaghchaure
dfc4aa9a57 fix: stock reservation validation in the stock entry (#47524) 2025-05-13 21:13:42 +05:30
Mihir Kandoi
f1159b6ea6 feat: add routing/sequencing to work order operations (#46975)
* feat: add routing/sequencing to work order operations

* fix: add validation and remove reorderin for non sequence id operations

* chore: readability

* fix: logical error

* fix: logical error

* chore: added row number in error message
2025-05-13 17:14:57 +05:30
Khushi Rawat
0b1a316ad9 feat: non depreciable asset category
feat: non depreciable asset category
2025-05-13 17:03:13 +05:30
Khushi Rawat
d715db1226 fix: only depreciable category assets are allowed for depreciation 2025-05-13 16:44:13 +05:30
Abdeali Chharchhoda
80320ffa25 refactor: simplify source_name assignment in map_current_doc function 2025-05-13 16:43:13 +05:30
Khushi Rawat
32cb7d6388 fix: do not mandate depreciation accounts for non depreciable asset category 2025-05-13 16:43:03 +05:30
Khushi Rawat
fbbfd6531b feat: add non depreciable category checkbox in asset category 2025-05-13 16:40:59 +05:30
ruthra kumar
f67559bb1e Merge pull request #47525 from ruthra-kumar/drop_patch_for_advance_reconciliation
refactor: remove redundant patch
2025-05-13 15:08:23 +05:30
Khushi Rawat
2e992f937a refactor: Asset module code for better readability
refactor: Asset module code for better readability
2025-05-13 14:55:54 +05:30
ruthra kumar
c1bfa9f056 Merge pull request #47520 from ljain112/fic-pcv-acb
fix: ignore "Account Closing Balance" doctype on Period Closing Voucher cancellation
2025-05-13 14:50:22 +05:30
ruthra kumar
6c65a15758 refactor: remove redundant patch 2025-05-13 14:46:35 +05:30
Khushi Rawat
5e5795cba2 fix: patch conflict 2025-05-13 14:34:26 +05:30
ruthra kumar
c924f93614 Merge pull request #47521 from ljain112/fix-pe-cond
fix: condition for advance_account assignment
2025-05-13 14:12:27 +05:30
ruthra kumar
1139eaf751 Merge pull request #47468 from aerele/fix/reconciliation-takes-effect-on
fix(payment-reconciliation): use reconciliation_takes_effect_on from company
2025-05-13 14:10:00 +05:30
ljain112
ded46ce3d8 fix: condition for advance_account assignment 2025-05-13 13:39:01 +05:30
ljain112
d6602d63fc fix: ignore "Account Closing Balance" doctype on Period Closing Voucher cancellation 2025-05-13 13:12:39 +05:30
ruthra kumar
e7e3244e72 Merge pull request #47513 from frappe/l10n_develop
fix: sync translations from crowdin
2025-05-13 11:26:52 +05:30
Abdeali Chharchhodawala
e4e0bb68ec Merge pull request #47367 from Abdeali099/gl-report-field-float-to-currency
fix: Use `Currency` instead of `Float` in GL report to show details
2025-05-13 11:26:21 +05:30
Frappe PR Bot
898b5595a1 fix: Persian translations 2025-05-12 23:29:19 +05:30
rohitwaghchaure
963d1e502e fix: not able to reserve extra items against the work order (#47511) 2025-05-12 23:21:57 +05:30
Ankush Menat
a50251401f perf: move all hourly/daily jobs to maintenance queue (#47504)
None of them need to strictly happen at 00:00 or *:00, so moving them all to maintenance queue which executes with same frequency but spaced out.
2025-05-12 17:58:56 +05:30
ruthra kumar
7269dbc754 Merge pull request #47243 from ljain112/fix-p&l
fix: accumulate values for all the fiscal years in Profit And Loss Statement
2025-05-12 16:46:30 +05:30
ruthra kumar
54e4e7918e refactor(test): don't default to accumulate 2025-05-12 16:30:24 +05:30
Diptanil Saha
62cce38a06 fix: pos for small screen and checkout page (#47092)
* feat: Prevent need for scrolling in lower screens (Point of Sale)

* fix: pos checkout page

* refactor: renaming variable in pos profile conf

* fix: change variable name according to pos conf

* fix: removing redundant api call

* refactor: adding function

* refactor: moving pos settings invoice fields to modal

* fix: label for change amount and remaining amount

* fix: always display numpad

* refactor: function rename

* fix: better information

* fix: auto scroll to highlighted cart item

* chore: added patch

---------

Co-authored-by: devdiogenes <diogenes.cruz2001@gmail.com>
2025-05-12 16:07:22 +05:30
ruthra kumar
afff6b84ce test: accumulate filter on P&L report 2025-05-12 15:48:39 +05:30
ruthra kumar
61d13ce232 fix: typo 2025-05-12 15:07:02 +05:30
ljain112
6851322361 fix: accumulate values for all the fiscal years in Profit And Loss Statement 2025-05-12 14:54:39 +05:30
ruthra kumar
5c9e591297 Merge pull request #47224 from sagarvora/perf-gl
perf: improve general ledger report for larger data
2025-05-12 14:49:04 +05:30
Sagar Vora
07c7ce2d6a Merge branch 'develop' into perf-gl 2025-05-12 14:26:43 +05:30
ruthra kumar
4db3c7fc81 Merge pull request #47041 from Sanket322/pos_payment
fix: Check `return_against` and Await API Call
2025-05-12 14:10:04 +05:30
Diptanil Saha
57f3489dfa fix: POS non-stock item mistakenly hidden as unavailable (#47493) 2025-05-12 14:08:24 +05:30
Diptanil Saha
3965e2f3de fix: fiscal year error on new setup and continuous request (#47431)
fix: fiscal year error on new setup
2025-05-12 14:06:03 +05:30
ruthra kumar
04ef4c2b16 Merge pull request #47463 from ruthra-kumar/deterministic_sales_invoice_test_suite
refactor(test): flaky test case in sales invoice
2025-05-12 14:03:04 +05:30
Bhavan23
0caa757dd6 test: add test case to validate inter-company transaction address links 2025-05-12 12:48:27 +05:30
Bhavan23
aed46ad5b9 fix: validate inter-company transaction address links 2025-05-12 12:44:18 +05:30
rohitwaghchaure
0bc3cfe29d feat: stock reservation for production plan (#47373)
* feat: reservation for production plan

* test: test case for serial/batch

* feat: reserve & un-reserve options in the production plan
2025-05-12 12:19:23 +05:30
rohitwaghchaure
2ad16673f0 Merge pull request #47333 from mihir-kandoi/refactor_available_serial_no_report
refactor: available serial no report
2025-05-11 14:31:23 +05:30
Mihir Kandoi
c5686af7e2 Merge pull request #47481 from mihir-kandoi/st38118
fix: timesheet portal showing total billing hours
2025-05-10 11:37:24 +05:30
rohitwaghchaure
49df9ed32d Merge pull request #47385 from mihir-kandoi/st37286-3
fix: added PR/PI overbilling validation
2025-05-09 23:43:18 +05:30
l0gesh29
6d269b4409 fix(SalesAnalytics): Ignore opening entries 2025-05-09 17:27:48 +05:30
Patrick Eißler
b6b4ac5b4a feat: add column "Item Name" to "BOM Stock Report" (#47116) 2025-05-09 11:46:05 +00:00
Mihir Kandoi
b04a07fda0 fix: timesheet portal showing total billing hours 2025-05-09 13:38:42 +05:30
rohitwaghchaure
c770113f7c Merge pull request #47472 from rohitwaghchaure/fixed-validation-msg-bom-recursion
fix: better validation message with solution for BOM recursion
2025-05-08 20:39:29 +05:30
Rohit Waghchaure
7103cdd84a fix: better validation message with solution for BOM recursion 2025-05-08 17:45:21 +05:30
Bhavan23
7bc62cedc6 chore: simplify repeated condition checks 2025-05-08 16:32:30 +05:30
Soham Kulkarni
462ad4b6b3 Merge pull request #47464 from sokumon/collapsible-filters
fix: add options in report settings to become collapsible
2025-05-08 15:40:02 +05:30
Mihir Kandoi
653e0a2e3a chore: further optimizations 2025-05-08 15:24:38 +05:30
Mihir Kandoi
74eb611563 refactor: available serial no report 2025-05-08 15:18:31 +05:30
Khushi Rawat
04e46ea787 fix: more changes in the test 2025-05-08 15:13:13 +05:30
Mihir Kandoi
27e842ba02 fix: linter error 2025-05-08 14:47:19 +05:30
Mihir Kandoi
b406ec724b test: added test 2025-05-08 14:44:01 +05:30
Yaiphalemba Mangshatabam
edee75c757 fix: typo in event.js
"Sales Partners" -> "Sales Partner"
2025-05-08 14:09:06 +05:30
ruthra kumar
a9041e0c9b Merge pull request #47443 from frappe/l10n_develop
fix: sync translations from crowdin
2025-05-08 14:00:54 +05:30
Bhavan23
19f1ffbdc2 fix(payment-reconciliation): use reconciliation_takes_effect_on from company 2025-05-08 13:59:25 +05:30
ruthra kumar
fb92183679 refactor(test): set mandatory dimension at invidual test cases 2025-05-08 13:17:21 +05:30
sokumon
24184c21f0 fix: add options in report settings to become collapsible 2025-05-08 12:27:05 +05:30
ruthra kumar
74f8d65021 refactor(test): deterministic test suite for sales invoice 2025-05-08 12:07:45 +05:30
Khushi Rawat
3465c21090 fix: failing test 2025-05-08 11:57:02 +05:30
Khushi Rawat
dc06116425 fix: pass instance explicitly in static method 2025-05-08 11:57:02 +05:30
Khushi Rawat
c9980c59e7 chore: adjust regional depreciation logic after refactor 2025-05-08 11:57:02 +05:30
Khushi Rawat
0e93c573a6 chore: uncomment previously disabled code 2025-05-08 11:57:02 +05:30
Khushi Rawat
89d10ad4e6 fix: fiscal year check in depreciation logic 2025-05-08 11:57:02 +05:30
Khushi Rawat
782d16c1a3 fix: linters related fix 2025-05-08 11:57:02 +05:30
Khushi Rawat
e2cfd01bb2 test: asset splitting test 2025-05-08 11:57:02 +05:30
Khushi Rawat
6fa316177b fix(test): updated test for journal entry 2025-05-08 11:57:01 +05:30
Khushi Rawat
99e8c984ad fix(test): sales invoice test cases fixes 2025-05-08 11:57:01 +05:30
Khushi Rawat
3e32c30298 test: added tests on sale of an asset 2025-05-08 11:57:01 +05:30
Khushi Rawat
5d16936b9e fix(test): sales invoice test cases 2025-05-08 11:57:01 +05:30
Khushi Rawat
42ccce1687 test: added tests for reschedule depreciation after asset revaluation cancellation 2025-05-08 11:57:01 +05:30
Khushi Rawat
f5fa757bc6 fix(test): failing test cases 2025-05-08 11:57:01 +05:30
Khushi Rawat
cf1af451b8 fix(test): more fixes for failig test cases 2025-05-08 11:57:01 +05:30
Khushi Rawat
881e5e3417 fix(test): asset value adjustment test cases 2025-05-08 11:57:01 +05:30
Khushi Rawat
4b0279329f test: added tests for rescheduled depreciation after asset repair cancellation 2025-05-08 11:57:01 +05:30
Khushi Rawat
0e7ae25f65 fix(test): difference amount after asset revaluation 2025-05-08 11:57:01 +05:30
Khushi Rawat
b3ffdb6517 fix(test): increase in asset life after asset repair 2025-05-08 11:57:01 +05:30
Khushi Rawat
6ac68ed1e7 fix(test): failing test and bug fixes for basic depreciation process 2025-05-08 11:57:01 +05:30
Khushi Rawat
229d3634b1 fix(test): calculate total pending days of depreciation correctly 2025-05-08 11:57:01 +05:30
Khushi Rawat
2391c859b2 fix: reset consumed asset's depreciation on capitalization cancel 2025-05-08 11:57:01 +05:30
Khushi Rawat
a121c30b56 fix: update values of target asset on cancel of capitalization 2025-05-08 11:57:01 +05:30
Khushi Rawat
3855536ef1 fix: update status for composite asset 2025-05-08 11:57:01 +05:30
Khushi Rawat
8f1044a065 refactor: cleanup Assset Splitting code 2025-05-08 11:57:01 +05:30
Khushi Rawat
c7cc7d61d1 fix(test): value after depreciation for asset doc 2025-05-08 11:57:01 +05:30
Khushi Rawat
223e8e1bdb fix(test): set root type to Expense 2025-05-08 11:57:01 +05:30
Khushi Rawat
48311ee5c5 fix: set depreciation rate before return 2025-05-08 11:57:01 +05:30
Khushi Rawat
fe52e802ce refactor: depreciation booking code 2025-05-08 11:57:01 +05:30
Khushi Rawat
813164c25b fix: remove duplicate patch 2025-05-08 11:57:01 +05:30
Khushi Rawat
5f21d7ea1d chore: rebase from develop 2025-05-08 11:56:57 +05:30
Nabin Hait
44e45b55d4 refactor: asset value adjustment 2025-05-08 11:56:31 +05:30
Nabin Hait
c567a08470 refactor: Straight line depreciation after asset repair 2025-05-08 11:56:31 +05:30
Khushi Rawat
0e4706b074 fix: conflict in asset repair 2025-05-08 11:56:31 +05:30
Nabin Hait
0eb83a4474 chore: reorganised asset repair fields 2025-05-08 11:56:31 +05:30
Nabin Hait
f99d02b71e fix: remaining days for last row 2025-05-08 11:56:31 +05:30
Nabin Hait
2a89bac11d fix: missing args 2025-05-08 11:56:31 +05:30
Nabin Hait
9f3a1faa5e fix: add asset activity after insert 2025-05-08 11:56:31 +05:30
Nabin Hait
b433b125ff fix: removed commented code 2025-05-08 11:56:31 +05:30
Nabin Hait
c9487e0427 fix: Removed conflict 2025-05-08 11:56:31 +05:30
Frappe PR Bot
96071ae891 fix: Persian translations 2025-05-07 22:59:04 +05:30
rohitwaghchaure
c1edbc7e4b Merge pull request #47457 from rohitwaghchaure/fixed-stock-reco
fix: error while making SABB for backdated stock reco
2025-05-07 21:18:15 +05:30
Rohit Waghchaure
ad25636afb fix: error while making SABB for backdated stock reco 2025-05-07 20:56:05 +05:30
ruthra kumar
82ccdcfddd Merge pull request #47309 from ruthra-kumar/fix_broken_local_test_suite
chore: first step in the journey to reliable test suite
2025-05-07 18:45:43 +05:30
ruthra kumar
afc46a77f6 refactor(test): Timesheet will use ERPNextTestSuite 2025-05-07 18:31:39 +05:30
ruthra kumar
bc7cc6eac0 refactor(test): Project will use ERPNextTestSuite 2025-05-07 18:31:39 +05:30
ruthra kumar
835d08ab00 refactor(test): Project will use ERPNextTestSuite 2025-05-07 18:31:39 +05:30
ruthra kumar
fbdbcdd8c0 refactor(test): Activity Cost to use ERPNextTestSuite 2025-05-07 18:31:39 +05:30
ruthra kumar
1271ba3672 refactor(test): Opportunity will use ERPNextTestSuite 2025-05-07 18:31:39 +05:30
ruthra kumar
b2fd354d41 refactor(test): Lead with use ERPNextTestSuite 2025-05-07 18:31:39 +05:30
ruthra kumar
a55a86f300 refactor(test): Queries test suite to use ERPNextTestSuite 2025-05-07 18:31:39 +05:30
ruthra kumar
26915c622f refactor(test): move SI test data creation to erpnext test suite 2025-05-07 18:31:39 +05:30
ruthra kumar
543ba51009 refactor(test): create ERPNext specific test suite
and move data initialization there
2025-05-07 18:31:39 +05:30
ruthra kumar
4a4e314899 chore: handle duplicate data on sales invoice setup 2025-05-07 18:31:39 +05:30
ruthra kumar
8a3a9b985b refactor(test): deterministic test suite for 'Maintenance Schedule' 2025-05-07 18:31:39 +05:30
ruthra kumar
50551c1069 refactor(test): deterministic test suite for Task 2025-05-07 18:31:39 +05:30
ruthra kumar
80f7c507ba refactor(test): make 'Timesheet' test suite deterministic 2025-05-07 18:31:39 +05:30
ruthra kumar
66381f52ed chore: drop empty test suite for 'Monthly Distribution'
data from test records are moved to 'Budget' test suite
2025-05-07 18:31:39 +05:30
ruthra kumar
78b026a4ca refactor(test): deterministic 'Budget' test suite 2025-05-07 18:31:39 +05:30
ruthra kumar
9526f9d835 refactor(test): deterministic 'Queries' test suite 2025-05-07 18:31:39 +05:30
ruthra kumar
eda7595179 refactor(test): make tests for queries and Project deterministic 2025-05-07 18:31:39 +05:30
ruthra kumar
3ecc39a51f refactor(test): make 'Activity Cost' idempotent 2025-05-07 18:31:39 +05:30
ruthra kumar
b77e608264 refactor(test): idempotent Opportunity test suite 2025-05-07 18:31:39 +05:30
ruthra kumar
f7f3269c68 refactor(test): "Lead" test suite working locally 2025-05-07 18:31:39 +05:30
ruthra kumar
8d089218b5 chore: drop test suite for 'Sales Person' - there are no tests
it is only used to trigger dependent data creation
2025-05-07 18:31:39 +05:30
ruthra kumar
fb4ca8c386 chore: remove sales team from SI test records 2025-05-07 18:31:39 +05:30
ruthra kumar
c585bdb316 chore: setup test data in class initialization 2025-05-07 18:31:39 +05:30
ruthra kumar
520a54db0c chore: drop test records for sales person 2025-05-07 18:31:39 +05:30
ruthra kumar
9b2c89f704 chore: drop redundant test_records.json 2025-05-07 18:31:39 +05:30
Mihir Kandoi
f4ffc57b51 fix: added PR/PI overbilling validation 2025-05-07 17:51:36 +05:30
rohitwaghchaure
46eb7a7aa1 Merge pull request #47452 from rohitwaghchaure/fixed-support-37892
fix: warning message for COGS account in the stock entry
2025-05-07 16:18:50 +05:30
Rohit Waghchaure
bba6b0ff45 fix: warning message for COGS account in the stock entry 2025-05-07 16:03:59 +05:30
ruthra kumar
786f28e642 Merge pull request #47447 from ruthra-kumar/dont_update_opportunity_onload
fix: dont auto-fetch latest exchange rate
2025-05-07 11:16:43 +05:30
ruthra kumar
4ccd0a7407 fix: dont auto-fetch latest exchange rate
- also use correct currency field for comparison
2025-05-07 11:10:23 +05:30
Frappe PR Bot
208ac19650 fix: Persian translations 2025-05-06 22:36:31 +05:30
Frappe PR Bot
0bd6ffaee6 fix: Turkish translations 2025-05-06 22:36:20 +05:30
Frappe PR Bot
68e4be2887 fix: Swedish translations 2025-05-06 22:36:16 +05:30
Marica
e17f54ade0 Merge pull request #47432 from marination/iss-47424
fix: Relabel unit price settings for more clarity
2025-05-06 20:03:49 +05:30
marination
fbef81bcf6 chore: Relabel according to review changes 2025-05-06 15:28:56 +02:00
Marica
fcf874906f Merge pull request #47438 from marination/iss-47422
fix(portal): User cannot create 0 qty SQ from RFQ
2025-05-06 18:47:03 +05:30
rohitwaghchaure
bd1fb7357c Merge pull request #47435 from rohitwaghchaure/fixed-support-37539
fix: stock reco recalculate qty not works for opening stock reco
2025-05-06 18:26:53 +05:30
marination
879b966bd4 fix(portal): User cannot create 0 qty SQ from RFQ
- The portal uses `create_supplier_quotation` for SQ creation which excludes 0 qty items
2025-05-06 14:55:03 +02:00
Rohit Waghchaure
97095c7d24 fix: stock reco recalculate qty not works for opening stock reco 2025-05-06 17:58:06 +05:30
rohitwaghchaure
25264df18f Merge pull request #47397 from rohitwaghchaure/fixed-support-37756
fix: precision issue
2025-05-06 17:28:32 +05:30
Sagar Vora
7616b2b8e4 Merge pull request #47417 from sagarvora/update-pl-based-on 2025-05-06 16:45:26 +05:30
marination
e2fc10d558 fix: Relabel unit price settings for more clarity 2025-05-06 12:33:03 +02:00
Khushi Rawat
51ea33e743 fix: do not mandate depreciation account for assets without depreciation (#47427) 2025-05-06 14:53:13 +05:30
ruthra kumar
dc9dc2ca42 Merge pull request #47337 from Abdeali099/fix-error-on-paid-amount-change
fix: do not allocate amount when ref's doctype or name are not set
2025-05-06 14:32:27 +05:30
Sagar Vora
3ebde4526a feat!: configure which rate is used to auto-update price list 2025-05-06 13:01:13 +05:30
ruthra kumar
d065904431 Merge pull request #47408 from Abdeali099/proper-due-date-exceeds-msg
fix: show party type in due date exceeding message
2025-05-06 11:57:46 +05:30
ruthra kumar
682e6ceb9d Merge pull request #47411 from frappe/l10n_develop
fix: sync translations from crowdin
2025-05-06 11:29:52 +05:30
Vimal
0b4add2f2b fix: change shipping address fetching condition 2025-05-06 10:57:49 +05:30
Frappe PR Bot
9e07a48201 fix: Turkish translations 2025-05-05 22:32:40 +05:30
Marica
80bd5ced46 Merge pull request #46214 from marination/unit-price-contract-2
feat: Unit Price Items
2025-05-05 22:26:39 +05:30
Frappe PR Bot
0bbd94d549 fix: sync translations from crowdin (#47398) 2025-05-05 15:59:40 +02:00
Rohit Waghchaure
69bee93bfd fix: precision issue 2025-05-05 18:42:25 +05:30
Abdeali Chharchhoda
b6d9134014 fix: show party type in due date exceeding message 2025-05-05 18:25:56 +05:30
Diptanil Saha
45393d51a2 fix: 'time to resolve: failed' on issue (#47406)
* fix: 'time to resolve: failed' on issue

* fix: sla_resolution_date
2025-05-05 17:43:29 +05:30
Diptanil Saha
d4ffa54136 fix: backward compatibility for renamed group_by filter on reports (#47362)
* fix: backward compatibility for renamed group_by filter in general ledger report

* fix: backward compatibility for renamed group_by filter in supplier quotation comparison report
2025-05-05 17:21:41 +05:30
Diptanil Saha
3de249dcba fix: rename unchanged group_by filter related to general ledger report (#47366) 2025-05-05 17:20:23 +05:30
ruthra kumar
c31845c55a Merge pull request #47278 from barredterra/customer_supplier_ids
feat: store Customer Number at Supplier / Supplier Number at Customer
2025-05-05 16:22:54 +05:30
half-ware
e68883f0f9 feat: Algeria chart of accounts (#47038)
* Algeria chart of accounts

Algeria chart of accounts

* Update Algeria Chart Of Account

* Algeria chart of account

* Algeria Chart of Account

Algeria Chart of Account
2025-05-05 16:18:18 +05:30
Diptanil Saha
8067799692 fix: update accounts on change of mode of payment in sales invoice payment (#47381)
* fix: update accounts on change of mode of payment in sales invoice payment

* test: fixed tests
2025-05-05 15:58:53 +05:30
Marica
60201a9683 Merge branch 'develop' into unit-price-contract-2 2025-05-05 15:52:39 +05:30
ruthra kumar
5990752416 Merge pull request #47145 from ruthra-kumar/refactor_ar_ap_for_memory_usage
refactor: make AR / AP report more memory efficient
2025-05-05 15:43:09 +05:30
ruthra kumar
ca1e81e1b5 refactor: set default for fetch methods 2025-05-05 14:19:45 +05:30
ruthra kumar
b5bb6f3508 refactor: use fetch method based on configuration 2025-05-05 14:19:41 +05:30
rohitwaghchaure
f370b36b62 Merge pull request #47395 from rohitwaghchaure/fixed-serial-no-reservation-validation
fix: reserved serial nos validation
2025-05-05 14:10:13 +05:30
Rohit Waghchaure
a20951e1cd fix: reserved serial nos validation 2025-05-05 13:53:06 +05:30
ruthra kumar
66fd639b52 refactor: configurable fetch method for AR / AP report 2025-05-05 12:29:58 +05:30
ruthra kumar
08903459c2 refactor: use unbuffered cursor for fetching 2025-05-05 12:20:05 +05:30
ruthra kumar
bd4d1cd0d3 Merge pull request #47349 from frappe/l10n_develop
fix: sync translations from crowdin
2025-05-05 11:36:56 +05:30
Frappe PR Bot
1c322965b4 chore: update POT file (#47393) 2025-05-04 12:30:29 +02:00
rohitwaghchaure
fa1b706147 Merge pull request #47382 from rohitwaghchaure/fixed-serial-batch-reservation-wo
fix: serial batch from work order for fg
2025-05-03 13:21:42 +05:30
rohitwaghchaure
16306d1352 Merge pull request #47377 from rohitwaghchaure/fixed-support-37608
fix: not able to submit the stock entry
2025-05-03 13:21:30 +05:30
rohitwaghchaure
8c3af7738c Merge pull request #47376 from rohitwaghchaure/fixed-support-37187
fix: validation for difference account
2025-05-03 13:21:16 +05:30
Rohit Waghchaure
fb819c558e fix: validation for difference account 2025-05-03 11:36:42 +05:30
Rohit Waghchaure
5225d4c318 fix: serial batch from work order for fg 2025-05-03 11:35:28 +05:30
Rohit Waghchaure
1d862c111f fix: not able to submit the stock entry 2025-05-03 11:34:48 +05:30
ruthra kumar
e9663a55a3 Merge pull request #47380 from ruthra-kumar/broken_uae_vat_test_case
fix: broken CI - uae vat 201 tests failing
2025-05-03 11:26:25 +05:30
ruthra kumar
37d74e387d fix: broken test suite due to incorrect OR filter 2025-05-03 11:13:32 +05:30
rohitwaghchaure
97db9da10e fix: completed transactions showing in the list (#47374) 2025-05-02 15:23:15 +05:30
Diptanil Saha
13a84e7f82 fix: renaming group by fieldname and value in reports (#47352)
* fix: renaming in general ledger report

* fix: renaming in supplier quotation comparison report

* fix: renaming group by to categorize by in process statement of accounts

* fix: added patch

* fix: patch update to all documents

* chore: added patches to patch.txt

* chore: removing patch from v14
2025-04-30 11:15:53 +00:00
Mihir Kandoi
4fc7a8b71d refactor: portal query in timesheet.py (#47336)
* refactor: portal query in timesheet.py

* fix: use criterion.any to fix query
2025-04-30 16:13:55 +05:30
Nihantra C. Patel
e02de12ecc Merge pull request #47351 from Nihantra-Patel/fix_ledger_summary
fix: party name in Ledger Summary
2025-04-30 13:42:05 +05:30
Nihantra Patel
70bc86a4c6 fix: party name in Ledger Summary 2025-04-30 13:12:02 +05:30
Frappe PR Bot
553dd38c8d fix: Persian translations 2025-04-30 12:42:34 +05:30
Frappe PR Bot
88ebdffc9a fix: Swedish translations 2025-04-30 12:42:30 +05:30
rohitwaghchaure
ffdc4347e8 fix: warning message before changing the valuation method (#47340) 2025-04-29 22:59:22 +05:30
Abdeali Chharchhoda
b9a02b466b fix: do not allocate amount when ref's doctype or name are not set 2025-04-29 18:44:39 +05:30
Mihir Kandoi
795c2d104d Merge pull request #47334 from mihir-kandoi/fix-rfq-v16-error-2
fix: rfq error on item_code
2025-04-29 18:36:26 +05:30
Mihir Kandoi
48e6fee6a1 fix: rfq error on item_code 2025-04-29 18:19:45 +05:30
Khushi Rawat
05afad78fc fix: allow selling asset at zero rate (#47326) 2025-04-29 16:53:57 +05:30
Mihir Kandoi
b89bbe36d7 feat: add stock uom read only field to stock reconciliation item doctype (#47299) 2025-04-29 16:25:45 +05:30
Mihir Kandoi
fc02a6510e fix: require email OR phone in shipment doctype not both (#47300) 2025-04-29 16:24:51 +05:30
Mihir Kandoi
7499c25a3c fix: validate if from and to time are present on submission of job card (#47325) 2025-04-29 16:21:41 +05:30
ruthra kumar
14ac65b64d Merge pull request #47320 from frappe/l10n_develop
fix: sync translations from crowdin
2025-04-29 12:17:54 +05:30
ruthra kumar
cf29c3758a Merge pull request #47241 from ljain112/fix-ic-jv
fix: compare total debit/credit with precision for Inter Company Journal Entry
2025-04-29 12:16:57 +05:30
Diptanil Saha
7423e4187f fix: remove invalid email account creation (#47318) 2025-04-29 12:13:12 +05:30
ruthra kumar
02a25bcfcd Merge pull request #47231 from aerele/multi-currency-advance
fix(payment request): get advance amount based on transaction currency
2025-04-29 12:06:41 +05:30
Frappe PR Bot
d93b0af07c fix: Persian translations 2025-04-29 12:01:05 +05:30
Frappe PR Bot
3bd149ec3a fix: Portuguese, Brazilian translations 2025-04-29 12:01:01 +05:30
Mihir Kandoi
47927b38a9 feat: change sabb qty automatically incase of internal transfer PR if sabb only has 1 batch (#47256)
* feat: change sabb qty automatically incase of internal transfer PR if sabb only has 1 batch

* fix: prevent creation of SABB on every save

* perf: optimize code

* fix: remove unnecessary conditon

* refactor: change if to elif

* fix: remove dn_item_qty and set to item.qty

* test: added test
2025-04-29 11:45:46 +05:30
Mihir Kandoi
26564819fe Merge pull request #47302 from mihir-kandoi/46928
fix: commas in rfq portal js
2025-04-29 11:37:02 +05:30
Mihir Kandoi
ce0693be95 Merge pull request #47301 from mihir-kandoi/fix-rfq-item_name-fetch-from
fix: add fetch from to item name in rfq item doctype
2025-04-29 11:36:33 +05:30
Mihir Kandoi
710a77a327 Merge pull request #47296 from mihir-kandoi/st35392-2
fix: fix sub assembly qty calculation in production plan when bom level >= 1
2025-04-29 11:36:10 +05:30
Mihir Kandoi
e98dcfc668 Merge pull request #47257 from mihir-kandoi/st37118
fix: add transaction_date in field_no_map when creating PO from SQ
2025-04-29 11:35:39 +05:30
Mihir Kandoi
583f251edf Merge pull request #47234 from mihir-kandoi/st37040
fix: price currency in supplier quotation comparison
2025-04-29 11:35:07 +05:30
Khushi Rawat
9dee4ac891 fix: prevent cancellation of last asset movement (#47291)
* fix: prevent cancellation of last asset movement

* test: movement cancellation

* fix: allow cancellation of asset movement when cancelling asset
2025-04-29 11:34:35 +05:30
ruthra kumar
6a59744d8e Merge pull request #47111 from sokumon/supplier-address
fix: convert to text before setting value
2025-04-29 11:24:29 +05:30
Mihir Kandoi
bd727e069b fix: commas in rfq portal js 2025-04-28 23:51:51 +05:30
Mihir Kandoi
ab7973231a fix: add fetch from to item name in rfq item doctype 2025-04-28 23:31:57 +05:30
Mihir Kandoi
ee10afc074 fix: logical error 2025-04-28 21:29:47 +05:30
Mihir Kandoi
bfc4ce1d5d fix: fix sub assembly qty calculation in production plan when bom level >= 1 2025-04-28 21:09:12 +05:30
RitvikSardana
07c263d453 Merge pull request #47262 from RitvikSardana/ignore-flag-removal
fix: dont pass ignore permissions param to whitelist methods
2025-04-28 19:50:04 +05:30
rohitwaghchaure
0701a8cf5a fix: QI reference not set if 'Action If Quality Inspection Is Not Sub… (#47294)
fix: qi reference not set if 'Action If Quality Inspection Is Not Submitted' is blank
2025-04-28 19:38:37 +05:30
rohitwaghchaure
3d36d0b1df fix: validation if no stock ledger entries against stock reco (#47292) 2025-04-28 18:16:52 +05:30
Mihir Kandoi
9e640341fd fix: remove unused import 2025-04-28 17:49:27 +05:30
Mihir Kandoi
acd1529780 fix: test case 2025-04-28 17:43:19 +05:30
Marica
72113dc485 Merge branch 'develop' into unit-price-contract-2 2025-04-28 16:15:41 +05:30
Frappe PR Bot
9a7bcfe395 fix: sync translations from crowdin (#47230) 2025-04-28 12:14:45 +02:00
rohitwaghchaure
70787eb5e0 Merge pull request #47285 from rohitwaghchaure/fixed-support-34140-1
fix: allow to make quality inspection after Purchase / Delivery
2025-04-28 14:28:56 +05:30
Rohit Waghchaure
fad1a32e63 fix: allow to make quality inspection after Purchase / Delivery 2025-04-28 13:28:35 +05:30
l0gesh29
eae08bc619 fix: update quantity validation using asset quantity field instead of… (#46731)
* fix: update quantity validation using asset quantity field instead of total records

* fix: update throw message
2025-04-28 12:25:24 +05:30
ruthra kumar
cf3237a252 Merge pull request #46993 from karm1000/dispatch-field
feat: add dispatch address fields to purchase doctypes
2025-04-28 10:56:20 +05:30
ruthra kumar
c060cdc06c Merge pull request #46979 from Sanket322/refactor_report
fix: Proper Postal Code Order and Add Party Name Properly
2025-04-28 10:18:58 +05:30
ruthra kumar
dd4739c1aa Merge pull request #46774 from cogk/feat-past-events-and-todos-in-crm-activities
feat: Show past events and todos in crm_activities
2025-04-28 09:36:57 +05:30
barredterra
edcc1d39ae feat(Supplier): add table Customer Numbers 2025-04-27 18:09:13 +02:00
barredterra
be72e64633 feat(Customer): add table Supplier Numbers 2025-04-27 18:04:53 +02:00
rohitwaghchaure
a4e20c59d6 Merge pull request #47259 from rohitwaghchaure/fixed-support-36911
fix: enable use serial / batch fields on batch selection
2025-04-27 18:35:17 +05:30
Frappe PR Bot
1ed9872db1 chore: update POT file (#47275) 2025-04-27 14:53:35 +02:00
rohitwaghchaure
df08c92b4f Merge pull request #47268 from rohitwaghchaure/fixed-valuation-method-change
fix: allow to change valuation method from FIFO to Moving Average
2025-04-27 17:45:37 +05:30
Rohit Waghchaure
b454ed4b8f fix: allow to change valuation method from FIFO to Moving Average 2025-04-26 16:31:37 +05:30
Corentin Forler
aa18753f57 fix(PE): Set account types in get_payment_entry (#47246) 2025-04-25 15:30:53 +02:00
Diptanil Saha
c85edc3346 fix: consolidating pos invoices on the basis of accounting dimensions (#46961)
* fix: consolidating pos invoices on the basis of accounting dimensions

* fix: project field
2025-04-25 17:38:23 +05:30
Diptanil Saha
1ad61fb572 feat: sales invoice integration with pos (#46485)
* feat: pos configuration to activate real time update of gl and stock ledger

* feat: sales invoice on pos order list

* fix: syntax

* feat: past order list with sales invoice

* feat: customer recent transaction with sales invoice

* fix: real_time_update validation

added a validation to restrict switching between sales invoice and pos invoice in case there's already a pos opening entry

* fix: use sales invoice on accounts settings

moved the check to use sales invoice instead of pos invoice from pos profile to accounts settings.

* fix: using accounts settings to get frm doctype

* fix: added support for sales invoice in  process return

* feat: event listeners for sales invoice on pos

* fix: create and load return invoice

* fix: edit order

* refactor: function rename

* fix: sales invoice generation using pos

added fields to distinguish sales invoice generated using pos

* feat: credit note in pos invoice during sales invoice mode

* feat: pos closing entry support for sales invoices

* refactor: resolving linter issues

* refactor: fix linter issue

* fix: filters for sales invoice in toggle recent orders

* feat: disable partial payments on sales invoice transactions made using pos

* fix: resolve import error

* fix: recent order list and pos invoice returns during sales invoice mode

* fix: reset pos_closing_entry on return sales invoice

* fix: filtering out consolidated return sales invoice for pos invoice return

* fix: pos delete order

* fix: added missing reference to consolidated sales invoice item

* fix: added check to restrict sales invoice creation

* refactor: variable name

* fix: integrating sales_invoice in make_closing_entry_from_opening method

* test: test for sales invoice integration in pos

* fix: issue with accounting dimension on sales invoice

* refactor: moved invoice switching mode validation in backend

* test: removed test case

Removed Test Case for Full Payment of Sales Invoice created using POS as planning to add feature to accept Partial Payment from POS.

* test: fixed the failing tests

* test: remove explicit use of frappe.db.commit()

* test: fixing pos invoice test

* test: removed test
2025-04-25 17:33:39 +05:30
RitvikSardana
c28596f69d fix: dont pass ignore permissions param to whitelist methods 2025-04-25 15:31:02 +05:30
Rohit Waghchaure
a4471865a9 fix: enable use serial / batch fields on batch selection 2025-04-25 15:13:18 +05:30
Marica
3193e1c1a2 Merge pull request #47232 from marination/sn-warranty-report-missing
fix: Re-insert missing "Serial No Warranty Expiry" Report
2025-04-25 14:57:35 +05:30
Mihir Kandoi
3790c6c551 fix: add transaction_date in field_no_map when creating PO from SQ 2025-04-25 14:06:31 +05:30
Prateek Karamchandani
7a5cbc759c fix: display stock value in currency format in chart warehouse wise stock value 2025-04-25 06:19:00 +00:00
Diptanil Saha
483c4a3271 fix: prohibit consolidated sales invoice return (#47251) 2025-04-25 11:09:22 +05:30
Diptanil Saha
c8ee5d9a4e fix: cancel pos closing entry failure for return pos invoices (#47248) 2025-04-24 22:29:21 +05:30
ljain112
5fe247557e fix: compare total debit/credit with precision for Inter Company Journal Entry 2025-04-24 18:54:03 +05:30
Khushi Rawat
ed8a8532e1 fix: update additional cost and total asset cost after asset repair (#47233)
* fix: add consumed stock's cost to the asset value after repair

* fix: do not copy additional cost and total asset cost
2025-04-24 16:14:42 +05:30
Mihir Kandoi
88926eb2a7 fix: price currency in supplier quotation comparison 2025-04-24 16:10:12 +05:30
marination
deefac0abf fix: Re-insert missing "Serial No Warranty Expiry" Report 2025-04-24 09:50:43 +02:00
venkat102
b570d97b4d fix(payment request): get advance amount based on transaction currency 2025-04-24 11:33:18 +05:30
Khushi Rawat
0d53e6ed7c fix: make asset quantity and amount editable (#47226) 2025-04-24 01:54:00 +05:30
Raffael Meyer
cb111c43d4 fix(Rename Tool): allow more than 500 rows (#47117)
Co-authored-by: Sagar Vora <16315650+sagarvora@users.noreply.github.com>
2025-04-23 19:32:03 +02:00
Sagar Vora
7131396ac0 perf: evaluate conditions outside loop 2025-04-23 21:34:18 +05:30
Sagar Vora
af283d0d9e perf: improved gle map init 2025-04-23 21:34:18 +05:30
Sagar Vora
593ecb3d68 Merge pull request #47011 from sokumon/remove-eps
fix: remove default energy points from erpnext
2025-04-23 21:21:28 +05:30
Frappe PR Bot
0bc8d28969 fix: sync translations from crowdin (#47192) 2025-04-23 17:11:29 +02:00
ruthra kumar
709a2fa553 Merge pull request #47155 from sagarvora/fix-dr-cr-mismatch
fix: get total without rounding off tax amounts for distributing discount
2025-04-22 17:19:00 +05:30
ruthra kumar
1b2bde4c82 Merge pull request #47178 from aerele/delivery-note-per-billed
fix: keep per_billed 100 for billed delivery note after return
2025-04-22 17:10:33 +05:30
Sagar Vora
551639da7b chore: remove previously added logger calls 2025-04-22 17:04:16 +05:30
rohitwaghchaure
6857700eff Merge pull request #47183 from mihir-kandoi/st36696
fix: backslash in url
2025-04-22 16:15:42 +05:30
Mihir Kandoi
c3d172fac3 fix: remove unused import 2025-04-22 15:50:51 +05:30
Mihir Kandoi
5d07beee61 fix: change get_url_to_form to get_link_to_form 2025-04-22 15:50:02 +05:30
ruthra kumar
7e0681c4a4 Merge pull request #46717 from ljain112/fix-search
fix: respect field "ignore_user_permissions" property in employee query
2025-04-22 15:41:34 +05:30
ruthra kumar
bd4e9370de Merge pull request #47171 from ljain112/paid-amount
fix: set correct paid/receive amount if doc currency is different from party account currency
2025-04-22 15:35:48 +05:30
Mihir Kandoi
eaaf34cda6 fix: revert unintended changes 2025-04-22 15:27:09 +05:30
Mihir Kandoi
7a82b37f76 fix: use get_url_to_form instead 2025-04-22 15:22:54 +05:30
rohitwaghchaure
b9e09aa34e Merge pull request #47184 from mihir-kandoi/st36742
feat: add button to view Supplier Quotation Comparison directly from RFQ
2025-04-22 15:12:15 +05:30
ruthra kumar
5a6997455b Merge pull request #47180 from ljain112/fix-quo
fix: set default company address in selling Doctype on change of company
2025-04-22 14:26:22 +05:30
Soham Kulkarni
68ca4a77c9 Merge pull request #47175 from sokumon/purchase-receipt-quick-list
fix: add grand_total to show correct status in quick list widget
2025-04-22 14:19:41 +05:30
ruthra kumar
f01a9069b1 Merge pull request #47138 from ljain112/fix-tds-report
fix: rate based on posting date in Tax Withholding Report
2025-04-22 13:28:42 +05:30
rohitwaghchaure
3c53d628d9 Merge pull request #47191 from rohitwaghchaure/fixed-github-47076
fix: expense account in stock entry
2025-04-22 13:15:33 +05:30
ljain112
4be975f87c chore: added test case for employee query with user permissions 2025-04-22 13:00:37 +05:30
ruthra kumar
5eb83f763f Merge pull request #47124 from ljain112/fix-supp-led
fix: `TypeError` in group field filter in supplier ledger summary
2025-04-22 12:21:02 +05:30
Rohit Waghchaure
75874b4986 fix: expense account in stock entry 2025-04-22 08:07:09 +05:30
Mihir Kandoi
ef57d2b328 fix: show button only when RFQ is submitted 2025-04-21 20:25:31 +05:30
Mihir Kandoi
b4aa88b59b feat: add button to show request for comparison report directly from RFQ 2025-04-21 20:23:14 +05:30
Mihir Kandoi
ecf15130ba fix: backslash in url 2025-04-21 19:05:16 +05:30
ljain112
a31075692c fix: set default company address in Sales Doctype on change of company 2025-04-21 17:38:34 +05:30
Sugesh393
02356029a8 refactor: update base_outstanding calculation 2025-04-21 16:24:08 +05:30
Sugesh393
fe5898a151 test: add new unit test to keep per_billed 100 for billed delivery note 2025-04-21 16:23:32 +05:30
Sugesh393
8290a83591 fix: keep per_billed 100 for billed delivery note after return 2025-04-21 16:22:14 +05:30
ljain112
91d7bc55be fix: respect field "ignore_user_permissions" property in employee query 2025-04-21 14:21:56 +05:30
Smit Vora
ceaba4220b fix: map dispatch address correctly for inter company transactions 2025-04-21 13:49:14 +05:30
Smit Vora
fb3b7d8c34 refactor: set address details for transactions 2025-04-21 13:46:59 +05:30
Smit Vora
8ccd7a3e61 refactor: address field position 2025-04-21 13:44:20 +05:30
ljain112
9612521894 fix: set correct paid/receive amount if doc currency is different from party account currency 2025-04-21 12:11:13 +05:30
Sagar Vora
5741458c94 fix: get total without rounding off tax amounts for distributing discount 2025-04-19 14:14:58 +05:30
ljain112
515fe340a8 chore: added test case for date period in multiple tax withholding rules 2025-04-18 13:25:42 +05:30
Karm Soni
999ffe86a7 fix: correct query for dispatch_address; remove unnecessary code; increase reusability; 2025-04-18 13:24:47 +05:30
ljain112
a32a79e90a fix: rate based on posting date in Tax Withholding Report 2025-04-17 20:23:48 +05:30
Karm Soni
d12998e524 feat: add display dispatch address when dispatch address is selected 2025-04-17 16:32:59 +05:30
Karm Soni
c4bd3123fb fix: remove use of cur_frm 2025-04-17 15:43:07 +05:30
Karm Soni
9a859e54b6 fix: enhance dispatch address query logic and add supplier address query 2025-04-17 15:43:07 +05:30
Karm Soni
53d0b7be23 feat: add dispatch address support in party details and controllers 2025-04-17 15:43:07 +05:30
ljain112
872e94a316 fix: TypeError in group field filter in supplier ledger summary 2025-04-17 15:39:50 +05:30
sokumon
8da5752059 fix: convert to text before setting value 2025-04-16 11:03:22 +05:30
Marica
bbe641fd77 Merge branch 'develop' into unit-price-contract-2 2025-04-15 16:11:14 +05:30
sokumon
6d93c3adad fix: remove energy points patch 2025-04-13 17:12:29 +05:30
Sanket322
c48db0b7c0 fix: ensure backend response is awaited before saving 2025-04-13 13:24:33 +05:30
Sanket322
00b6b97197 fix: check return_against exists before api call 2025-04-13 13:17:15 +05:30
sokumon
e3af7f639d fix: remove default energy points from erpnext 2025-04-11 14:03:53 +05:30
Sanket322
54385dde24 fix: changed postalcode order and correct the condition for party_name 2025-04-10 01:15:27 +05:30
Karm Soni
54b5205221 feat: add dispatch address fields to purchase doctypes 2025-04-09 19:19:47 +05:30
Corentin Forler
bb864c8345 feat: Show past events and todos in crm_activities 2025-03-28 14:07:45 +01:00
marination
bf62f9ad57 fix: Headline rendered twice on first save
- `refresh` gets triggered twice and that renders the note twice
- Remove any existing note before rendering
2025-03-17 19:26:45 +01:00
marination
0447c7be0a fix: Treat rows as Unit Price rows only until the qty is 0
- The unit price check should depend on the row qty being 0
- Once the row ceases to be 0, it is treated as an ordinary row
- test: PO, SO and Quotation
2025-03-17 19:17:14 +01:00
marination
55981c8358 test: Sales Order + fix: Mapping of Items from Quotation & SO 2025-03-14 18:54:11 +01:00
marination
eea758f5b2 test: Purchase Order with Unit Price Items
- chore: Fix error message in accounts controller
2025-03-14 18:00:40 +01:00
marination
8f96c0b546 test: Zero Qty in RFQ and Supplier Quotation 2025-03-12 18:42:12 +01:00
marination
e403d3f153 feat: Unit Price Items in Buying (RFQ, SQ, PO)
- chore: Extract `set_unit_price_items_note` into a util
2025-03-03 17:53:00 +01:00
marination
71f65bab5e fix: Linters 2025-03-03 16:24:22 +01:00
marination
c1e4e7af28 feat: Unit Price Contract 2025-02-28 23:04:29 +01:00
798 changed files with 584573 additions and 359317 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

@@ -42,3 +42,6 @@ a308792ee7fda18a681e9181f4fd00b36385bc23
# noisy typing refactoring of get_item_details
7b7211ac79c248a79ba8a999ff34e734d874c0ae
d827ed21adc7b36047e247cbb0dc6388d048a7f9
# `frappe.flags.in_test` => `frappe.in_test`
7a482a69985c952de0e8193c9d4e086aee65ee6d

View File

@@ -66,7 +66,7 @@ sed -i 's/schedule:/# schedule:/g' Procfile
sed -i 's/socketio:/# socketio:/g' Procfile
sed -i 's/redis_socketio:/# redis_socketio:/g' Procfile
bench get-app payments --branch ${githubbranch%"-hotfix"}
bench get-app payments --branch develop
bench get-app erpnext "${GITHUB_WORKSPACE}"
if [ "$TYPE" == "server" ]; then bench setup requirements --dev; fi

View File

@@ -5,6 +5,9 @@ on:
- closed
- labeled
permissions:
contents: read
jobs:
main:
runs-on: ubuntu-latest

View File

@@ -2,6 +2,10 @@ name: Trigger Docker build on release
on:
release:
types: [released]
permissions:
contents: read
jobs:
curl:
runs-on: ubuntu-latest

View File

@@ -3,6 +3,9 @@ on:
pull_request:
types: [ opened, synchronize, reopened, edited ]
permissions:
contents: read
jobs:
build:
runs-on: ubuntu-latest

View File

@@ -2,6 +2,10 @@
# To add/remove versions just modify the matrix.
name: Create weekly release pull requests
permissions:
contents: read
on:
schedule:
# 9:30 UTC => 3 PM IST Tuesday

View File

@@ -3,6 +3,10 @@ on:
pull_request_target:
types: [opened, reopened]
permissions:
issues: write
pull-requests: write
jobs:
triage:
runs-on: ubuntu-latest

View File

@@ -3,6 +3,9 @@ name: Linters
on:
pull_request: { }
permissions:
contents: read
jobs:
linters:

View File

@@ -8,8 +8,14 @@ on:
- '**.md'
- '**.html'
- '**.csv'
- 'crowdin.yml'
- '.coderabbit.yml'
- '.mergify.yml'
workflow_dispatch:
permissions:
contents: read
concurrency:
group: patch-develop-${{ github.event_name }}-${{ github.event.number || github.event_name == 'workflow_dispatch' && github.run_id || '' }}
cancel-in-progress: true
@@ -36,7 +42,7 @@ jobs:
- name: Check for valid Python & Merge Conflicts
run: |
python -m compileall -f "${GITHUB_WORKSPACE}"
python -m compileall -fq "${GITHUB_WORKSPACE}"
if grep -lr --exclude-dir=node_modules "^<<<<<<< " "${GITHUB_WORKSPACE}"
then echo "Found merge conflicts"
exit 1

View File

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

View File

@@ -3,6 +3,10 @@ on:
push:
branches:
- version-13
permissions:
contents: read
jobs:
release:
name: Release

View File

@@ -7,6 +7,9 @@ concurrency:
group: server-individual-tests-develop-${{ github.event_name }}-${{ github.event.number || github.event_name == 'workflow_dispatch' && github.run_id || '' }}
cancel-in-progress: false
permissions:
contents: read
jobs:
discover:
runs-on: ubuntu-latest

View File

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

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 * * *"
@@ -25,6 +28,9 @@ on:
required: false
type: string
permissions:
contents: read
concurrency:
group: server-mariadb-develop-${{ github.event_name }}-${{ github.event.number || github.event_name == 'workflow_dispatch' && github.run_id || '' }}
cancel-in-progress: true
@@ -65,7 +71,7 @@ jobs:
- name: Check for valid Python & Merge Conflicts
run: |
python -m compileall -f "${GITHUB_WORKSPACE}"
python -m compileall -fq "${GITHUB_WORKSPACE}"
if grep -lr --exclude-dir=node_modules "^<<<<<<< " "${GITHUB_WORKSPACE}"
then echo "Found merge conflicts"
exit 1

View File

@@ -6,12 +6,18 @@ on:
- '**.js'
- '**.md'
- '**.html'
- 'crowdin.yml'
- '.coderabbit.yml'
- '.mergify.yml'
types: [opened, labelled, synchronize, reopened]
concurrency:
group: server-postgres-develop-${{ github.event_name }}-${{ github.event.number || github.event_name == 'workflow_dispatch' && github.run_id || '' }}
cancel-in-progress: true
permissions:
contents: read
jobs:
test:
if: ${{ contains(github.event.pull_request.labels.*.name, 'postgres') }}
@@ -50,7 +56,7 @@ jobs:
- name: Check for valid Python & Merge Conflicts
run: |
python -m compileall -f "${GITHUB_WORKSPACE}"
python -m compileall -fq "${GITHUB_WORKSPACE}"
if grep -lr --exclude-dir=node_modules "^<<<<<<< " "${GITHUB_WORKSPACE}"
then echo "Found merge conflicts"
exit 1

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

@@ -57,7 +57,7 @@ def get_company_currency(company):
def set_perpetual_inventory(enable=1, company=None):
if not company:
company = "_Test Company" if frappe.flags.in_test else get_default_company()
company = "_Test Company" if frappe.in_test else get_default_company()
company = frappe.get_doc("Company", company)
company.enable_perpetual_inventory = enable
@@ -77,7 +77,7 @@ def encode_company_abbr(name, company=None, abbr=None):
def is_perpetual_inventory_enabled(company):
if not company:
company = "_Test Company" if frappe.flags.in_test else get_default_company()
company = "_Test Company" if frappe.in_test else get_default_company()
if not hasattr(frappe.local, "enable_perpetual_inventory"):
frappe.local.enable_perpetual_inventory = {}

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

@@ -317,7 +317,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.db.get_single_value("Accounts Settings", "acc_frozen_upto")
accounts_frozen_upto = frappe.get_single_value("Accounts Settings", "acc_frozen_upto")
def _book_deferred_revenue_or_expense(
item,
@@ -526,7 +526,7 @@ def make_gl_entries(
make_gl_entries(gl_entries, cancel=(doc.docstatus == 2), merge_entries=True)
frappe.db.commit()
except Exception as e:
if frappe.flags.in_test:
if frappe.in_test:
doc.log_error(f"Error while processing deferred accounting for Invoice {doc.name}")
raise e
else:

View File

@@ -92,7 +92,7 @@ class Account(NestedSet):
super().on_update()
def onload(self):
frozen_accounts_modifier = frappe.db.get_single_value("Accounts Settings", "frozen_accounts_modifier")
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():
self.set_onload("can_freeze_account", True)
@@ -167,7 +167,7 @@ class Account(NestedSet):
if par.root_type:
self.root_type = par.root_type
if self.is_group:
if cint(self.is_group):
db_value = self.get_doc_before_save()
if db_value:
if self.report_type != db_value.report_type:
@@ -210,7 +210,7 @@ class Account(NestedSet):
if doc_before_save and not doc_before_save.parent_account:
throw(_("Root cannot be edited."), RootNotEditable)
if not self.parent_account and not self.is_group:
if not self.parent_account and not cint(self.is_group):
throw(_("The root account {0} must be a group").format(frappe.bold(self.name)))
def validate_root_company_and_sync_account_to_children(self):
@@ -259,7 +259,7 @@ class Account(NestedSet):
if self.check_gle_exists():
throw(_("Account with existing transaction cannot be converted to ledger"))
elif self.is_group:
elif cint(self.is_group):
if self.account_type and not self.flags.exclude_account_type_check:
throw(_("Cannot covert to Group because Account Type is selected."))
elif self.check_if_child_exists():
@@ -302,7 +302,9 @@ class Account(NestedSet):
self.account_currency = frappe.get_cached_value("Company", self.company, "default_currency")
self.currency_explicitly_specified = False
gl_currency = frappe.db.get_value("GL Entry", {"account": self.name}, "account_currency")
gl_currency = frappe.db.get_value(
"GL Entry", {"account": self.name, "is_cancelled": 0}, "account_currency"
)
if gl_currency and self.account_currency != gl_currency:
if frappe.db.get_value("GL Entry", {"account": self.name}):
@@ -602,7 +604,7 @@ def _ensure_idle_system():
# 1. Correctness: It's next to impossible to ensure that renamed account is not being used *right now*.
# 2. Performance: Renaming requires locking out many tables entirely and severely degrades performance.
if frappe.flags.in_test:
if frappe.in_test:
return
last_gl_update = None

View File

@@ -139,6 +139,11 @@ frappe.treeview_settings["Account"] = {
description: __(
"Further accounts can be made under Groups, but entries can be made against non-Groups"
),
onchange: function () {
if (!this.value) {
this.layout.set_value("root_type", "");
}
},
},
{
fieldtype: "Select",
@@ -265,12 +270,14 @@ frappe.treeview_settings["Account"] = {
label: __("View Ledger"),
click: function (node, btn) {
frappe.route_options = {
account: node.label,
from_date: erpnext.utils.get_fiscal_year(frappe.datetime.get_today(), true)[1],
to_date: erpnext.utils.get_fiscal_year(frappe.datetime.get_today(), true)[2],
company:
frappe.treeview_settings["Account"].treeview.page.fields_dict.company.get_value(),
};
if (node.parent_label) {
frappe.route_options["account"] = node.label;
}
frappe.set_route("query-report", "General Ledger");
},
btnClass: "hidden-xs",

View File

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

View File

@@ -0,0 +1,817 @@
{
"country_code": "au",
"name": "Australia - Chart of Accounts with Account Numbers",
"tree": {
"Assets": {
"Current Assets": {
"Cash On Hand": {
"Cash On Hand": {
"account_number": "11010",
"account_type": "Cash"
},
"account_number": "110",
"is_group": 1
},
"Cash at Bank": {
"Every Day Bank Account": {
"account_number": "11510",
"account_type": "Bank"
},
"Business Savings Account": {
"account_number": "11520"
},
"Business Term Deposit": {
"account_number": "11530"
},
"account_number": "115",
"is_group": 1
},
"Trade Receivables": {
"Trade Debtors": {
"account_number": "12010",
"account_type": "Receivable"
},
"Provision for Doubtful Debts": {
"account_number": "12020"
},
"Sundry Debtors": {
"account_number": "12030"
},
"Debtor Refund": {
"account_number": "12040"
},
"account_number": "120",
"is_group": 1
},
"Inventory": {
"Stock On Hand": {
"account_number": "13010",
"account_type": "Stock"
},
"WIP - Work In Progress - Manufacturing": {
"account_number": "13020"
},
"account_number": "130",
"is_group": 1
},
"Prepayments": {
"Prepayments": {
"account_number": "14010"
},
"Provisional Tax Paid": {
"account_number": "14020"
},
"account_number": "140",
"is_group": 1
},
"account_number": "11",
"is_group": 1
},
"Non Current Assets": {
"Plant & Equipment": {
"Plant & Equipment": {
"account_number": "16010",
"account_type": "Fixed Asset"
},
"Accumulated Depreciation Plant & Equipment": {
"account_number": "16020",
"account_type": "Accumulated Depreciation"
},
"account_number": "160",
"is_group": 1
},
"Motor Vehicle": {
"Motor Vehicle": {
"account_number": "16110",
"account_type": "Fixed Asset"
},
"Accumulated Depreciation Motor Vehicle": {
"account_number": "16120",
"account_type": "Accumulated Depreciation"
},
"account_number": "161",
"is_group": 1
},
"Office Equipment": {
"Office Furniture & Equipment": {
"account_number": "16210",
"account_type": "Fixed Asset"
},
"Accumulated Depreciation Office Furniture & Equipment": {
"account_number": "16220",
"account_type": "Accumulated Depreciation"
},
"account_number": "162",
"is_group": 1
},
"Computer Equipment": {
"Computer Equipment": {
"account_number": "16310",
"account_type": "Fixed Asset"
},
"Accumulated Depreciation Computer Equipment": {
"account_number": "16320",
"account_type": "Accumulated Depreciation"
},
"account_number": "163",
"is_group": 1
},
"Building": {
"Buildings": {
"account_number": "16410",
"account_type": "Fixed Asset"
},
"Accumulated Depreciation Buildings": {
"account_number": "16420",
"account_type": "Accumulated Depreciation"
},
"CWIP - Construction Work In Progress": {
"account_number": "16430",
"account_type": "Capital Work in Progress"
},
"Accumulated Depreciation - Others": {
"account_number": "16440",
"account_type": "Accumulated Depreciation"
},
"account_number": "164",
"is_group": 1
},
"Related Party": {
"Loan to Party 1": {
"account_number": "17010"
},
"account_number": "170",
"is_group": 1
},
"Investments & Unlisted Entities": {
"Investment - Entity 1": {
"account_number": "17510"
},
"account_number": "175",
"is_group": 1
},
"Intagible Assets": {
"Goodwill": {
"account_number": "18010"
},
"Opening Balance Temporary ": {
"account_number": "18090",
"account_type": "Temporary"
},
"account_number": "180",
"is_group": 1
},
"account_number": "16",
"is_group": 1
},
"account_number": "1",
"root_type": "Asset"
},
"Liabilities": {
"Current Liabilities": {
"Trade Payables - Current": {
"Trade Creditors": {
"account_number": "21010",
"account_type": "Payable"
},
"Goods Received Not Invoiced": {
"account_number": "21050",
"account_type": "Stock Received But Not Billed"
},
"Service Received Not Invoiced": {
"account_number": "21060"
},
"Asset Received Not Invoiced": {
"account_number": "21070",
"account_type": "Asset Received But Not Billed"
},
"account_number": "210",
"is_group": 1
},
"Other Payables - Current": {
"Accrued Expenses": {
"account_number": "21510"
},
"Payroll - Wages Clearing": {
"account_number": "21550"
},
"Payroll - Superannuation Deductions": {
"account_number": "21555"
},
"Payroll - Misc Deductions": {
"account_number": "21560"
},
"Payroll - Withholding Tax Payable": {
"account_number": "21565"
},
"account_number": "215",
"is_group": 1
},
"GST": {
"GST Payments to ATO": {
"account_number": "22030"
},
"Provision for PAYG Tax": {
"account_number": "22040"
},
"account_number": "220",
"account_type": "Tax",
"is_group": 1
},
"Interest & Non Bearing Liabilities - Current": {
"Credit Card - VISA": {
"account_number": "22510"
},
"account_number": "225",
"is_group": 1
},
"Bank Overdraft": {
"Bank Overdraft Cash at Bank": {
"account_number": "23010"
},
"account_number": "230",
"is_group": 1
},
"Trade Finance": {
"Trade Finance": {
"account_number": "23510"
},
"account_number": "235",
"is_group": 1
},
"Lease Liabilities": {
"Finance Lease - Current": {
"account_number": "24010"
},
"account_number": "240",
"is_group": 1
},
"Provisions": {
"Provision for Long Service Leave": {
"account_number": "24510"
},
"Provision for Holiday Pay": {
"account_number": "24520"
},
"account_number": "245",
"is_group": 1
},
"account_number": "21",
"is_group": 1
},
"Non Current Liabilities": {
"Trade & Other Payables - Non Current": {
"Loan Account - Party 1": {
"account_number": "25010"
},
"account_number": "250",
"is_group": 1
},
"Interest & Non Bearing Liabilities - Non Current": {
"Non Current Liability - Director Loan": {
"account_number": "25510"
},
"account_number": "255",
"is_group": 1
},
"Bank Loans - Non Current": {
"Bank Loan 1 - Non Current": {
"account_number": "26010"
},
"account_number": "260",
"is_group": 1
},
"Lease Liabilities - Non Current": {
"Finance Lease - Non Current": {
"account_number": "27010"
},
"account_number": "270",
"is_group": 1
},
"Provisions - Non Current": {
"Provision for Long Service Leave": {
"account_number": "27510"
},
"Provision for Holiday Pay": {
"account_number": "27520"
},
"account_number": "275",
"is_group": 1
},
"account_number": "25",
"is_group": 1
},
"account_number": "2",
"root_type": "Liability"
},
"Equity": {
"Equity": {
"Owner's/Shareholder's Equity": {
"Owner's/Shareholders Capital": {
"account_number": "31010",
"account_type": "Equity"
},
"Owner's/Shareholders Drawings": {
"account_number": "31020",
"account_type": "Equity"
},
"account_number": "310",
"is_group": 1
},
"Earnings": {
"Current Year Earnings": {
"account_number": "35010",
"account_type": "Equity"
},
"Retained Earnings": {
"account_number": "35020",
"account_type": "Equity"
},
"account_number": "350",
"is_group": 1
},
"account_number": "31",
"is_group": 1
},
"account_number": "3",
"root_type": "Equity"
},
"Revenue": {
"Revenue": {
"Sales Revenue": {
"Sales Income": {
"account_number": "41010",
"account_type": "Income Account"
},
"Freight Income": {
"account_number": "41020",
"account_type": "Income Account"
},
"Other Income": {
"account_number": "41030",
"account_type": "Income Account"
},
"Service Income": {
"account_number": "41040",
"account_type": "Income Account"
},
"account_number": "410",
"is_group": 1
},
"Other Revenue": {
"Commission Received": {
"account_number": "42010"
},
"Discounts Received": {
"account_number": "42020"
},
"Interest received": {
"account_number": "42030"
},
"Profit/Loss on Sales of Assets": {
"account_number": "42040"
},
"Rent Received": {
"account_number": "42050"
},
"Sundry Income": {
"account_number": "42060"
},
"account_number": "420",
"is_group": 1
},
"account_number": "41",
"is_group": 1
},
"account_number": "4",
"root_type": "Income"
},
"Cost of Goods": {
"Cost of Goods": {
"Cost of Goods Sold": {
"Cost of Goods Sold": {
"account_number": "51010",
"account_type": "Cost of Goods Sold"
},
"Freight Expenses (sales related)": {
"account_number": "51020"
},
"Discounts Given": {
"account_number": "51030"
},
"Subcontracting Charges": {
"account_number": "51040"
},
"account_number": "510",
"is_group": 1
},
"Other COGS": {
"Purchases - Miscellaneous": {
"account_number": "52010"
},
"Duty & Customs Fees": {
"account_number": "52020",
"account_type": "Tax"
},
"Freight Inwards": {
"account_number": "52030",
"account_type": "Chargeable"
},
"Stock Adjustment": {
"account_number": "52040",
"account_type": "Stock Adjustment"
},
"Stock Wirte Off": {
"account_number": "52050",
"account_type": "Stock Adjustment"
},
"Stock Valuation Expenses": {
"account_number": "52060",
"account_type": "Expenses Included In Valuation"
},
"Asset Valuation Expenses": {
"account_number": "52070",
"account_type": "Expenses Included In Asset Valuation"
},
"account_number": "520",
"is_group": 1
},
"account_number": "51",
"is_group": 1
},
"account_number": "5",
"root_type": "Expense"
},
"Expenses": {
"Fixed Expenses": {
"Payroll & Related Expenses": {
"Salaries & Wages": {
"account_number": "61010"
},
"Superannuation": {
"account_number": "61015"
},
"Staff Amenities - GST Paid": {
"account_number": "61020"
},
"Staff Amenities - GST Free": {
"account_number": "61025"
},
"Staff Recruitment": {
"account_number": "61030"
},
"Staff Training": {
"account_number": "61035"
},
"Fringe Benefits Tax": {
"account_number": "61040"
},
"Payroll Tax": {
"account_number": "61045"
},
"Workers Compensation": {
"account_number": "61050"
},
"Long Service Leave": {
"account_number": "61060"
},
"Mileage Reimbursement": {
"account_number": "61070"
},
"Overtime": {
"account_number": "61080"
},
"Worksafe Insurance": {
"account_number": "61090"
},
"account_number": "610",
"is_group": 1
},
"Depreciation Expenses": {
"Depreciation - Plant & Equipment": {
"account_number": "62010",
"account_type": "Depreciation"
},
"Depreciation - Motor Vehicle": {
"account_number": "62020",
"account_type": "Depreciation"
},
"Depreciation - Office Equipment": {
"account_number": "62030",
"account_type": "Depreciation"
},
"Depreciation - Computer Equipment": {
"account_number": "62040",
"account_type": "Depreciation"
},
"Depreciation - Building": {
"account_number": "62050",
"account_type": "Depreciation"
},
"Depreciation - Others": {
"account_number": "62510",
"account_type": "Depreciation"
},
"account_number": "620",
"is_group": 1
},
"account_number": "61",
"is_group": 1
},
"Accrued Expenses": {
"Accrued Expenses": {
"Accrued Expenses - Salaries & Wages": {
"account_number": "63010"
},
"Accrued Expenses - Interest": {
"account_number": "63020"
},
"account_number": "630",
"is_group": 1
},
"account_number": "63",
"is_group": 1
},
"Operating Expenses": {
"General and Administrative Expenses": {
"Low Value Assets less than $300": {
"account_number": "64010"
},
"Office Supplies": {
"account_number": "64020"
},
"Postage & Courier": {
"account_number": "64025"
},
"Printing & Stationery": {
"account_number": "64030"
},
"Registration Fees / Filing Fees": {
"account_number": "64040"
},
"Travel & Accommodation - Local": {
"account_number": "64050"
},
"Travel & Accommodation - Overseas": {
"account_number": "64060"
},
"Relocation Costs": {
"account_number": "64070"
},
"Hire Charges": {
"account_number": "64080"
},
"Repairs & Maintenance": {
"account_number": "64210"
},
"Cleaning Expenses": {
"account_number": "64215"
},
"Uniforms": {
"account_number": "64220"
},
"Security": {
"account_number": "64225"
},
"Subscriptions & Licences": {
"account_number": "64510"
},
"Software Expenses": {
"account_number": "64515"
},
"Marketing Expenses": {
"account_number": "64520"
},
"Advertising Expenses": {
"account_number": "64525"
},
"Website Hosting & Domain Expenses": {
"account_number": "64530"
},
"Computer Repairs / Supplies": {
"account_number": "64540"
},
"Conferences": {
"account_number": "64550"
},
"Consultancy /Contract Services": {
"account_number": "64560"
},
"Training Services": {
"account_number": "64570"
},
"Workshop Supplies": {
"account_number": "64580"
},
"Consumables": {
"account_number": "64585"
},
"Entertainment Expenses - Deductible": {
"account_number": "64810"
},
"Entertainment Expenses - Non Deductible": {
"account_number": "64820"
},
"Amortisation Of Goodwill": {
"account_number": "64910"
},
"General / Miscellaneous Expenses": {
"account_number": "64915",
"account_type": "Chargeable"
},
"Donations": {
"account_number": "64920"
},
"Client Gifts": {
"account_number": "64930"
},
"Employee Gifts": {
"account_number": "64935"
},
"account_number": "640",
"is_group": 1
},
"Occupancy Expenses": {
"Rental Expenses": {
"account_number": "65010"
},
"Property Insurance": {
"account_number": "65020"
},
"Electricity Expenses": {
"account_number": "65030"
},
"Water Rates": {
"account_number": "65040"
},
"Gas Expenses": {
"account_number": "65050"
},
"Property Taxes": {
"account_number": "65060"
},
"Rates": {
"account_number": "65070"
},
"account_number": "650",
"is_group": 1
},
"Communication & Vehicle Expenses": {
"Internet Expenses": {
"account_number": "66010"
},
"Mobile Telephone": {
"account_number": "66020"
},
"Telephone Expenses": {
"account_number": "66030"
},
"Motor Vehicle - Fuel Expenses": {
"account_number": "66040"
},
"Motor Vehicle - Parking & Tolls": {
"account_number": "66050"
},
"Motor Vehicle - Registration & Insurance": {
"account_number": "66060"
},
"Motor Vehicle - Service & Repairs": {
"account_number": "66070"
},
"Taxi": {
"account_number": "66080"
},
"account_number": "660",
"is_group": 1
},
"account_number": "64",
"is_group": 1
},
"Non-Operating Expenses": {
"Finance Costs": {
"Interest - Bank Loans": {
"account_number": "67010"
},
"Interest - Finance Leases": {
"account_number": "67020"
},
"Interest - Other Loans": {
"account_number": "67025"
},
"Insurance": {
"account_number": "67030"
},
"Bank Charges": {
"account_number": "67050"
},
"Rounding off": {
"account_number": "67055",
"account_type": "Round Off"
},
"Audit Fees": {
"account_number": "67060"
},
"Accounting Fees": {
"account_number": "67070"
},
"Legal Fees": {
"account_number": "67080"
},
"Management Fees": {
"account_number": "67090"
},
"account_number": "670",
"is_group": 1
},
"Other Costs": {
"Doubtful Debts": {
"account_number": "67510"
},
"Fines": {
"account_number": "67520"
},
"Debt Collection": {
"account_number": "67530"
},
"Bad Debts": {
"account_number": "67540"
},
"account_number": "675",
"is_group": 1
},
"account_number": "67",
"is_group": 1
},
"Variable Expenses": {
"Variable Expenses": {
"Bonus & Commissions Paid": {
"account_number": "68010"
},
"Bonus & Commissions To be Paid": {
"account_number": "68020"
},
"Warranty Claims": {
"account_number": "68030"
},
"account_number": "680",
"is_group": 1
},
"account_number": "68",
"is_group": 1
},
"account_number": "6",
"root_type": "Expense"
},
"Other Income": {
"Other Income": {
"Interest Income": {
"Interest Income": {
"account_number": "71010"
},
"account_number": "710",
"is_group": 1
},
"Asset Disposal Income": {
"Gain on Asset Disposal": {
"account_number": "73010"
},
"account_number": "730",
"is_group": 1
},
"account_number": "71",
"is_group": 1
},
"account_number": "7",
"root_type": "Income"
},
"Other Expenses": {
"Other Expenses": {
"Income Tax Expenses": {
"Income Tax Expenses": {
"account_number": "81010"
},
"account_number": "810",
"is_group": 1
},
"Foreign Exchange Gain/Loss": {
"Exchange Loss/Gain - Realized": {
"account_number": "82010"
},
"account_number": "820",
"is_group": 1
},
"Asset Disposal Expenses": {
"Loss on Asset Disposal": {
"account_number": "83010"
},
"account_number": "830",
"is_group": 1
},
"account_number": "81",
"is_group": 1
},
"account_number": "8",
"root_type": "Expense"
}
}
}

View File

@@ -96,8 +96,20 @@
"account_number": "1132.000"
},
"account_number": "1130.000"
},
},
"Pajak Dibayar di Muka": {
"PPN Masukan": {
"account_number": "1151.001",
"account_type": "Tax"
},
"PPh 23 Dibayar di Muka": {
"account_number": "1152.001",
"account_type": "Tax"
},
"account_number": "1150.000"
},
"account_number": "1100.000"
},
"Aktiva Tetap": {
"Aktiva": {
@@ -557,6 +569,10 @@
"Hutang Pajak": {
"account_number": "2141.000",
"account_type": "Payable"
},
"PPN Keluaran": {
"account_number": "2142.000",
"account_type": "Tax"
},
"account_number": "2140.000"
},

View File

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

View File

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

View File

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

View File

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

View File

@@ -2,16 +2,7 @@
# See license.txt
# import frappe
from frappe.tests import IntegrationTestCase, UnitTestCase
class UnitTestAccountClosingBalance(UnitTestCase):
"""
Unit tests for AccountClosingBalance.
Use this class for testing individual functions and methods.
"""
pass
from frappe.tests import IntegrationTestCase
class TestAccountClosingBalance(IntegrationTestCase):

View File

@@ -83,7 +83,7 @@ class AccountingDimension(Document):
frappe.throw(_("Company {0} is added more than once").format(frappe.bold(default.company)))
def after_insert(self):
if frappe.flags.in_test:
if frappe.in_test:
make_dimension_in_accounting_doctypes(doc=self)
else:
frappe.enqueue(
@@ -91,7 +91,7 @@ class AccountingDimension(Document):
)
def on_trash(self):
if frappe.flags.in_test:
if frappe.in_test:
delete_accounting_dimension(doc=self)
else:
frappe.enqueue(delete_accounting_dimension, doc=self, queue="long", enqueue_after_commit=True)
@@ -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,
@@ -213,7 +211,7 @@ def delete_accounting_dimension(doc):
@frappe.whitelist()
def disable_dimension(doc):
if frappe.flags.in_test:
if frappe.in_test:
toggle_disabling(doc=doc)
else:
frappe.enqueue(toggle_disabling, doc=doc)

View File

@@ -58,6 +58,10 @@ class TestAccountingDimension(IntegrationTestCase):
self.assertEqual(gle1.get("department"), "_Test Department - _TC")
def test_mandatory(self):
location = frappe.get_doc("Accounting Dimension", "Location")
location.dimension_defaults[0].mandatory_for_bs = True
location.save()
si = create_sales_invoice(do_not_save=1)
si.append(
"items",
@@ -121,7 +125,6 @@ def create_dimension():
"company": "_Test Company",
"reference_document": "Location",
"default_dimension": "Block 1",
"mandatory_for_bs": 1,
},
)

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

@@ -22,4 +22,32 @@ frappe.ui.form.on("Accounts Settings", {
}
);
},
add_taxes_from_taxes_and_charges_template(frm) {
toggle_tax_settings(frm, "add_taxes_from_taxes_and_charges_template");
},
add_taxes_from_item_tax_template(frm) {
toggle_tax_settings(frm, "add_taxes_from_item_tax_template");
},
drop_ar_procedures: function (frm) {
frm.call({
doc: frm.doc,
method: "drop_ar_sql_procedures",
callback: function (r) {
frappe.show_alert(__("Procedures dropped"), 5);
},
});
},
});
function toggle_tax_settings(frm, field_name) {
if (frm.doc[field_name]) {
const other_field =
field_name === "add_taxes_from_item_tax_template"
? "add_taxes_from_taxes_and_charges_template"
: "add_taxes_from_item_tax_template";
frm.set_value(other_field, 0);
}
}

View File

@@ -19,6 +19,7 @@
"column_break_17",
"enable_common_party_accounting",
"allow_multi_currency_invoices_against_single_party_account",
"confirm_before_resetting_posting_date",
"journals_section",
"merge_similar_account_heads",
"deferred_accounting_settings_section",
@@ -31,6 +32,7 @@
"determine_address_tax_category_from",
"column_break_19",
"add_taxes_from_item_tax_template",
"add_taxes_from_taxes_and_charges_template",
"book_tax_discount_loss",
"round_row_wise_tax",
"print_settings",
@@ -38,8 +40,15 @@
"show_taxes_as_table_in_print",
"column_break_12",
"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",
"currency_exchange_section",
"allow_stale",
"allow_pegged_currencies_exchange_rates",
"column_break_yuug",
"stale_days",
"section_break_jpd0",
@@ -58,6 +67,7 @@
"pos_tab",
"pos_setting_section",
"post_change_gl_entries",
"column_break_xrnd",
"assets_tab",
"asset_settings_section",
"calculate_depr_using_total_days",
@@ -77,11 +87,18 @@
"reports_tab",
"remarks_section",
"general_ledger_remarks_length",
"ignore_is_opening_check_for_reporting",
"column_break_lvjk",
"receivable_payable_remarks_length",
"accounts_receivable_payable_tuning_section",
"receivable_payable_fetch_method",
"column_break_ntmi",
"drop_ar_procedures",
"legacy_section",
"ignore_is_opening_check_for_reporting",
"payment_request_settings",
"create_pr_in_draft_status"
"create_pr_in_draft_status",
"budget_settings",
"use_new_budget_controller"
],
"fields": [
{
@@ -532,14 +549,117 @@
"fieldtype": "Select",
"label": "Posting Date Inheritance for Exchange Gain / Loss",
"options": "Invoice\nPayment\nReconciliation Date"
},
{
"fieldname": "column_break_xrnd",
"fieldtype": "Column Break"
},
{
"default": "Buffered Cursor",
"fieldname": "receivable_payable_fetch_method",
"fieldtype": "Select",
"label": "Data Fetch Method",
"options": "Buffered Cursor\nUnBuffered Cursor\nRaw SQL"
},
{
"fieldname": "accounts_receivable_payable_tuning_section",
"fieldtype": "Section Break",
"label": "Accounts Receivable / Payable Tuning"
},
{
"fieldname": "legacy_section",
"fieldtype": "Section Break",
"label": "Legacy Fields"
},
{
"default": "0",
"fieldname": "maintain_same_internal_transaction_rate",
"fieldtype": "Check",
"label": "Maintain Same Rate Throughout Internal Transaction"
},
{
"default": "Stop",
"depends_on": "maintain_same_internal_transaction_rate",
"fieldname": "maintain_same_rate_action",
"fieldtype": "Select",
"label": "Action if Same Rate is Not Maintained Throughout Internal Transaction",
"mandatory_depends_on": "maintain_same_internal_transaction_rate",
"options": "Stop\nWarn"
},
{
"depends_on": "eval: doc.maintain_same_internal_transaction_rate && doc.maintain_same_rate_action == 'Stop'",
"fieldname": "role_to_override_stop_action",
"fieldtype": "Link",
"label": "Role Allowed to Override Stop Action",
"options": "Role"
},
{
"fieldname": "budget_settings",
"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",
"fieldname": "confirm_before_resetting_posting_date",
"fieldtype": "Check",
"label": "Confirm before resetting posting date"
},
{
"fieldname": "item_price_settings_section",
"fieldtype": "Section Break",
"label": "Item Price Settings"
},
{
"fieldname": "column_break_feyo",
"fieldtype": "Column Break"
},
{
"default": "0",
"description": "System will do an implicit conversion using the pegged currency. <br>\nEx: Instead of AED -&gt; INR, system will do AED -&gt; USD -&gt; INR using the pegged exchange rate of AED against USD.",
"documentation_url": "/app/pegged-currencies/Pegged Currencies",
"fieldname": "allow_pegged_currencies_exchange_rates",
"fieldtype": "Check",
"label": "Allow Implicit Pegged Currency Conversion"
},
{
"default": "0",
"description": "If no taxes are set, and Taxes and Charges Template is selected, the system will automatically apply the taxes from the chosen template.",
"fieldname": "add_taxes_from_taxes_and_charges_template",
"fieldtype": "Check",
"label": "Automatically Add Taxes from Taxes and Charges Template"
},
{
"fieldname": "column_break_ntmi",
"fieldtype": "Column Break"
},
{
"depends_on": "eval:doc.receivable_payable_fetch_method == \"Raw SQL\"",
"description": "Drops existing SQL Procedures and Function setup by Accounts Receivable report",
"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"
}
],
"grid_page_length": 50,
"icon": "icon-cog",
"idx": 1,
"index_web_pages_for_search": 1,
"issingle": 1,
"links": [],
"modified": "2025-01-23 13:15:44.077853",
"modified": "2025-07-18 13:56:47.192437",
"modified_by": "Administrator",
"module": "Accounts",
"name": "Accounts Settings",
@@ -564,8 +684,9 @@
}
],
"quick_entry": 1,
"row_format": "Dynamic",
"sort_field": "creation",
"sort_order": "ASC",
"states": [],
"track_changes": 1
}
}

View File

@@ -25,7 +25,9 @@ class AccountsSettings(Document):
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
allow_pegged_currencies_exchange_rates: DF.Check
allow_stale: DF.Check
auto_reconcile_payments: DF.Check
auto_reconciliation_job_trigger: DF.Int
@@ -37,6 +39,7 @@ class AccountsSettings(Document):
book_tax_discount_loss: DF.Check
calculate_depr_using_total_days: DF.Check
check_supplier_invoice_uniqueness: DF.Check
confirm_before_resetting_posting_date: DF.Check
create_pr_in_draft_status: DF.Check
credit_controller: DF.Link | None
delete_linked_ledger_entries: DF.Check
@@ -46,17 +49,22 @@ class AccountsSettings(Document):
enable_immutable_ledger: DF.Check
enable_party_matching: DF.Check
exchange_gain_loss_posting_date: DF.Literal["Invoice", "Payment", "Reconciliation Date"]
fetch_valuation_rate_for_internal_transaction: DF.Check
frozen_accounts_modifier: DF.Link | None
general_ledger_remarks_length: DF.Int
ignore_account_closing_balance: DF.Check
ignore_is_opening_check_for_reporting: DF.Check
maintain_same_internal_transaction_rate: DF.Check
maintain_same_rate_action: DF.Literal["Stop", "Warn"]
make_payment_via_journal_entry: DF.Check
merge_similar_account_heads: DF.Check
over_billing_allowance: DF.Currency
post_change_gl_entries: DF.Check
receivable_payable_fetch_method: DF.Literal["Buffered Cursor", "UnBuffered Cursor", "Raw SQL"]
receivable_payable_remarks_length: DF.Int
reconciliation_queue_size: DF.Int
role_allowed_to_over_bill: DF.Link | None
role_to_override_stop_action: DF.Link | None
round_row_wise_tax: DF.Check
show_balance_in_coa: DF.Check
show_inclusive_tax_in_print: DF.Check
@@ -66,9 +74,11 @@ 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
# end: auto-generated types
def validate(self):
self.validate_auto_tax_settings()
old_doc = self.get_doc_before_save()
clear_cache = False
@@ -135,3 +145,21 @@ class AccountsSettings(Document):
if self.has_value_changed("reconciliation_queue_size"):
if cint(self.reconciliation_queue_size) < 5 or cint(self.reconciliation_queue_size) > 100:
frappe.throw(_("Queue Size should be between 5 and 100"))
def validate_auto_tax_settings(self):
if self.add_taxes_from_item_tax_template and self.add_taxes_from_taxes_and_charges_template:
frappe.throw(
_("You cannot enable both the settings '{0}' and '{1}'.").format(
frappe.bold(_(self.meta.get_label("add_taxes_from_item_tax_template"))),
frappe.bold(_(self.meta.get_label("add_taxes_from_taxes_and_charges_template"))),
),
title=_("Auto Tax Settings Error"),
)
@frappe.whitelist()
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

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

View File

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

View File

@@ -2,7 +2,7 @@
# See license.txt
import frappe
from frappe.tests import IntegrationTestCase, UnitTestCase
from frappe.tests import IntegrationTestCase
from frappe.utils import nowdate, today
from erpnext.accounts.doctype.payment_entry.test_payment_entry import get_payment_entry

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

@@ -89,46 +89,64 @@ class BankClearance(Document):
@frappe.whitelist()
def update_clearance_date(self):
clearance_date_updated = False
invalid_document = []
invalid_cheque_date = []
entries_to_update = []
def validate_entry(d):
is_valid = True
if not d.payment_document:
invalid_document.append(str(d.idx))
is_valid = False
if d.clearance_date and d.cheque_date and getdate(d.clearance_date) < getdate(d.cheque_date):
invalid_cheque_date.append(str(d.idx))
is_valid = False
return is_valid
for d in self.get("payment_entries"):
if d.clearance_date:
if not d.payment_document:
frappe.throw(_("Row #{0}: Payment document is required to complete the transaction"))
if d.cheque_date and getdate(d.clearance_date) < getdate(d.cheque_date):
frappe.throw(
_("Row #{0}: For {1} Clearance date {2} cannot be before Cheque Date {3}").format(
d.idx,
get_link_to_form(d.payment_document, d.payment_entry),
d.clearance_date,
d.cheque_date,
)
)
if d.clearance_date or self.include_reconciled_entries:
if validate_entry(d) and (d.clearance_date or self.include_reconciled_entries):
if not d.clearance_date:
d.clearance_date = None
if d.payment_document == "Sales Invoice":
frappe.db.set_value(
"Sales Invoice Payment",
{"parent": d.payment_entry, "account": self.get("account"), "amount": [">", 0]},
"clearance_date",
d.clearance_date,
)
entries_to_update.append(d)
else:
# using db_set to trigger notification
payment_entry = frappe.get_doc(d.payment_document, d.payment_entry)
payment_entry.db_set("clearance_date", d.clearance_date)
if invalid_document or invalid_cheque_date:
msg = _("<p>Please correct the following row(s):</p><ul>")
if invalid_document:
msg += _("<li>Payment document required for row(s): {0}</li>").format(
", ".join(invalid_document)
)
clearance_date_updated = True
if invalid_cheque_date:
msg += _("<li>Clearance date must be after cheque date for row(s): {0}</li>").format(
", ".join(invalid_cheque_date)
)
if clearance_date_updated:
self.get_payment_entries()
msgprint(_("Clearance Date updated"))
else:
msg += "</ul>"
frappe.throw(_(msg))
return
if not entries_to_update:
msgprint(_("Clearance Date not mentioned"))
return
for d in entries_to_update:
if d.payment_document == "Sales Invoice":
frappe.db.set_value(
"Sales Invoice Payment",
{"parent": d.payment_entry, "account": self.get("account"), "amount": [">", 0]},
"clearance_date",
d.clearance_date,
)
else:
# using db_set to trigger notification
payment_entry = frappe.get_lazy_doc(d.payment_document, d.payment_entry)
payment_entry.db_set("clearance_date", d.clearance_date)
self.get_payment_entries()
msgprint(_("Clearance Date updated"))
def get_payment_entries_for_bank_clearance(
@@ -137,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"""
@@ -163,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

@@ -7,6 +7,9 @@ from frappe.tests import IntegrationTestCase
from frappe.utils import add_months, getdate
from erpnext.accounts.doctype.cost_center.test_cost_center import create_cost_center
from erpnext.accounts.doctype.mode_of_payment.test_mode_of_payment import (
set_default_account_for_mode_of_payment,
)
from erpnext.accounts.doctype.payment_entry.test_payment_entry import get_payment_entry
from erpnext.accounts.doctype.purchase_invoice.test_purchase_invoice import make_purchase_invoice
from erpnext.accounts.doctype.sales_invoice.test_sales_invoice import create_sales_invoice
@@ -143,7 +146,7 @@ def make_payment_entry():
supplier = create_supplier(supplier_name="_Test Supplier")
pi = make_purchase_invoice(
supplier=supplier,
supplier=supplier.name,
supplier_warehouse="_Test Warehouse - _TC",
expense_account="Cost of Goods Sold - _TC",
uom="Nos",
@@ -172,11 +175,13 @@ def make_pos_sales_invoice():
customer = make_customer(customer="_Test Customer")
mode_of_payment = frappe.get_doc("Mode of Payment", "Wire Transfer")
set_default_account_for_mode_of_payment(mode_of_payment, "_Test Company", "_Test Bank Clearance - _TC")
si = create_sales_invoice(customer=customer, item="_Test Item", is_pos=1, qty=1, rate=1000, do_not_save=1)
si.set("payments", [])
si.append(
"payments", {"mode_of_payment": "Cash", "account": "_Test Bank Clearance - _TC", "amount": 1000}
)
si.append("payments", {"mode_of_payment": "Wire Transfer", "amount": 1000})
si.insert()
si.submit()

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(

View File

@@ -40,7 +40,7 @@ class TestBankReconciliationTool(AccountsTestMixin, IntegrationTestCase):
{
"doctype": "Bank Account",
"account_name": "HDFC _current_",
"bank": bank,
"bank": bank.name,
"is_company_account": True,
"account": self.bank, # account from Chart of Accounts
}

View File

@@ -70,7 +70,7 @@ frappe.ui.form.on("Bank Statement Import", {
frm.get_field("import_file").df.options = {
restrictions: {
allowed_file_types: [".csv", ".xls", ".xlsx"],
allowed_file_types: [".csv", ".xls", ".xlsx", ".TXT", ".txt"],
},
};
@@ -81,6 +81,7 @@ frappe.ui.form.on("Bank Statement Import", {
refresh(frm) {
frm.page.hide_icon_group();
frm.trigger("toggle_mt940_note");
frm.trigger("update_indicators");
frm.trigger("import_file");
frm.trigger("show_import_log");
@@ -192,6 +193,24 @@ frappe.ui.form.on("Bank Statement Import", {
});
},
import_mt940_fromat(frm) {
frm.trigger("toggle_mt940_note");
frm.save();
},
toggle_mt940_note(frm) {
if (!frm.doc.import_mt940_fromat) {
frm.set_df_property("custom_delimiters", "hidden", 0);
frm.set_df_property("google_sheets_url", "hidden", 0);
frm.set_df_property("html_5", "hidden", 0);
} else {
frm.set_df_property("custom_delimiters", "hidden", 1);
frm.set_df_property("google_sheets_url", "hidden", 1);
frm.set_df_property("html_5", "hidden", 1);
}
frm.set_value("import_mt940_fromat", frm.doc.import_mt940_fromat);
},
show_report_error_button(frm) {
if (frm.doc.status === "Error") {
frappe.db
@@ -233,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",
@@ -290,23 +309,45 @@ frappe.ui.form.on("Bank Statement Import", {
.html(__("Loading import file..."))
.appendTo(frm.get_field("import_preview").$wrapper);
frm.call({
method: "get_preview_from_template",
args: {
data_import: frm.doc.name,
import_file: frm.doc.import_file,
google_sheets_url: frm.doc.google_sheets_url,
frappe.run_serially([
// Convert MT940 to CSV if .txt file
() => {
if (frm.doc.import_file && frm.doc.import_file.toLowerCase().endsWith(".txt")) {
return frm
.call({
method: "convert_mt940_to_csv",
args: {
data_import: frm.doc.name,
mt940_file_path: frm.doc.import_file,
},
})
.then((r) => {
const file_url = r.message;
frm.set_value("import_file", file_url);
frm.save();
});
}
},
error_handlers: {
TimestampMismatchError() {
// ignore this error
},
() => {
frm.call({
method: "get_preview_from_template",
args: {
data_import: frm.doc.name,
import_file: frm.doc.import_file,
google_sheets_url: frm.doc.google_sheets_url,
},
error_handlers: {
TimestampMismatchError() {
// ignore this error
},
},
}).then((r) => {
let preview_data = r.message;
frm.events.show_import_preview(frm, preview_data);
frm.events.show_import_warnings(frm, preview_data);
});
},
}).then((r) => {
let preview_data = r.message;
frm.events.show_import_preview(frm, preview_data);
frm.events.show_import_warnings(frm, preview_data);
});
]);
},
// method: 'frappe.core.doctype.data_import.data_import.get_preview_from_template',

View File

@@ -11,6 +11,7 @@
"bank_account",
"bank",
"column_break_4",
"import_mt940_fromat",
"custom_delimiters",
"delimiter_options",
"google_sheets_url",
@@ -20,6 +21,7 @@
"download_template",
"status",
"template_options",
"use_csv_sniffer",
"import_warnings_section",
"template_warnings",
"import_warnings",
@@ -207,14 +209,28 @@
"fieldname": "delimiter_options",
"fieldtype": "Data",
"label": "Delimiter options"
},
{
"default": "0",
"fieldname": "use_csv_sniffer",
"fieldtype": "Check",
"hidden": 1,
"label": "Use CSV Sniffer"
},
{
"default": "0",
"fieldname": "import_mt940_fromat",
"fieldtype": "Check",
"label": "Import MT940 Fromat"
}
],
"hide_toolbar": 1,
"links": [],
"modified": "2024-06-25 17:32:07.658250",
"modified": "2025-06-11 02:23:22.159961",
"modified_by": "Administrator",
"module": "Accounts",
"name": "Bank Statement Import",
"naming_rule": "Expression",
"owner": "Administrator",
"permissions": [
{
@@ -230,8 +246,9 @@
"write": 1
}
],
"row_format": "Dynamic",
"sort_field": "creation",
"sort_order": "DESC",
"states": [],
"track_changes": 1
}
}

View File

@@ -3,15 +3,19 @@
import csv
import io
import json
import re
from datetime import date, datetime
import frappe
import mt940
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.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
from openpyxl.styles import Font
from openpyxl.utils import get_column_letter
@@ -35,6 +39,7 @@ class BankStatementImport(DataImport):
delimiter_options: DF.Data | None
google_sheets_url: DF.Data | None
import_file: DF.Attach | None
import_mt940_fromat: DF.Check
import_type: DF.Literal["", "Insert New Records", "Update Existing Records"]
mute_emails: DF.Check
reference_doctype: DF.Link
@@ -43,6 +48,7 @@ class BankStatementImport(DataImport):
submit_after_import: DF.Check
template_options: DF.Code | None
template_warnings: DF.Code | None
use_csv_sniffer: DF.Check
# end: auto-generated types
def __init__(self, *args, **kwargs):
@@ -65,10 +71,23 @@ class BankStatementImport(DataImport):
self.template_warnings = ""
self.validate_import_file()
self.validate_google_sheets_url()
if self.import_file and not self.import_file.lower().endswith(".txt"):
self.validate_import_file()
self.validate_google_sheets_url()
def start_import(self):
"""
Start a background import job for this Bank Statement Import.
Validates that the preview contains a "Bank Account" column and that the scheduler is active (unless running in test or developer mode). If validation passes and there is not already an enqueued job for this document, enqueue a background worker to perform the import.
Returns:
str | None: The enqueued job_id when a new job was queued, otherwise None.
Raises:
frappe.ValidationError: If the preview is missing a "Bank Account" column.
frappe.ValidationError: If the scheduler is inactive and import is not allowed to run immediately.
"""
preview = frappe.get_doc("Bank Statement Import", self.name).get_preview_from_template(
self.import_file, self.google_sheets_url
)
@@ -79,7 +98,7 @@ class BankStatementImport(DataImport):
from frappe.utils.background_jobs import is_job_enqueued
from frappe.utils.scheduler import is_scheduler_inactive
run_now = frappe.flags.in_test or frappe.conf.developer_mode
run_now = frappe.in_test or frappe.conf.developer_mode
if is_scheduler_inactive() and not run_now:
frappe.throw(_("Scheduler is inactive. Cannot import data."), title=_("Scheduler Inactive"))
@@ -104,6 +123,142 @@ class BankStatementImport(DataImport):
return None
def preprocess_mt940_content(content: str) -> str:
"""
Truncate overly long MT940 statement numbers found in `:28C:` tags to the last 5 digits.
This function fixes MT940 files where banks supply statement numbers longer than the MT940-expected maximum (5 digits),
which can break parsers. It only processes lines that start with the `:28C:` tag and:
- leaves content unchanged if no `:28C:` tag is present,
- truncates numeric statement numbers longer than 5 digits to their last 5 digits,
- preserves any `/sequence` suffix and trailing whitespace on the same line.
Parameters:
content (str): Raw MT940 file content.
Returns:
str: The processed content with corrected `:28C:` statement numbers.
"""
# 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):
"""
Replace a matched MT940 :28C: statement number by truncating it to the last five digits if it is longer.
Parameters:
match (re.Match): A regex match with groups:
1: prefix (e.g., ':28C:')
2: numeric statement number
3: optional sequence part (e.g., '/1')
4: optional trailing whitespace
Returns:
str: Reconstructed replacement string preserving prefix, (possibly truncated) statement number, sequence part, and trailing whitespace.
"""
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):
"""
Convert an MT940 file to a CSV and save it to the Frappe File Manager, returning the saved file URL.
This function:
- Loads the specified MT940 file, verifies it is MT940 format, preprocesses content to fix statement number formatting, and parses transactions.
- Writes parsed transactions to an in-memory CSV with headers: Date, Deposit, Withdrawal, Description, Reference Number, Bank Account, Currency.
- Saves the CSV as a private attachment on the Bank Statement Import document and returns the file URL.
Parameters:
data_import (str): Name (docname) of the Bank Statement Import document to attach the converted CSV to.
mt940_file_path (str): File path or file identifier pointing to the uploaded MT940 file to convert.
Returns:
str: URL of the saved CSV file in the File Manager.
Raises:
frappe.ValidationError: If the file is not MT940, MT940 import is not enabled on the document, parsing fails, or no transactions are found.
"""
doc = frappe.get_doc("Bank Statement Import", data_import)
file_doc, content = get_file(mt940_file_path)
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 and not doc.import_mt940_fromat:
frappe.throw(_("MT940 file detected. Please enable 'Import MT940 Format' to proceed."))
try:
# 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)))
if not transactions:
frappe.throw(_("Parsed file is not in valid MT940 format or contains no transactions."))
# Use in-memory file buffer instead of writing to temp file
csv_buffer = io.StringIO()
writer = csv.writer(csv_buffer)
headers = ["Date", "Deposit", "Withdrawal", "Description", "Reference Number", "Bank Account", "Currency"]
writer.writerow(headers)
for txn in transactions:
txn_date = getattr(txn, "date", None)
raw_date = txn.data.get("date", "")
if txn_date:
date_str = txn_date.strftime("%Y-%m-%d")
elif isinstance(raw_date, date | datetime):
date_str = raw_date.strftime("%Y-%m-%d")
else:
date_str = str(raw_date)
raw_amount = str(txn.data.get("amount", ""))
parts = raw_amount.strip().split()
amount_value = float(parts[0]) if parts else 0.0
deposit = amount_value if amount_value > 0 else ""
withdrawal = abs(amount_value) if amount_value < 0 else ""
description = txn.data.get("extra_details") or ""
reference = txn.data.get("transaction_reference") or ""
currency = txn.data.get("currency", "")
writer.writerow([date_str, deposit, withdrawal, description, reference, doc.bank_account, currency])
# Prepare in-memory CSV for upload
csv_content = csv_buffer.getvalue().encode("utf-8")
csv_buffer.close()
filename = f"{frappe.utils.now_datetime().strftime('%Y%m%d%H%M%S')}_converted_mt940.csv"
# Save to File Manager
saved_file = save_file(filename, csv_content, doc.doctype, doc.name, is_private=True, df="import_file")
return saved_file.file_url
@frappe.whitelist()
def get_preview_from_template(data_import, import_file=None, google_sheets_url=None):
return frappe.get_doc("Bank Statement Import", data_import).get_preview_from_template(
@@ -128,6 +283,12 @@ def download_import_log(data_import_name):
return frappe.get_doc("Bank Statement Import", data_import_name).download_import_log()
def is_mt940_format(content: str) -> bool:
"""Check if the content has key MT940 tags"""
required_tags = [":20:", ":25:", ":28C:", ":61:"]
return all(tag in content for tag in required_tags)
def parse_data_from_template(raw_data):
data = []
@@ -174,6 +335,20 @@ def start_import(data_import, bank_account, import_file_path, google_sheets_url,
def update_mapping_db(bank, template_options):
"""
Update a Bank document's transaction field mappings to match the provided template options.
This replaces all existing entries in the Bank.bank_transaction_mapping child table with mappings from
the JSON-encoded template_options. The expected template_options JSON contains a "column_to_field_map"
object mapping file column names (keys) to bank transaction field names (values).
Parameters:
bank (str | frappe.model.document.Document): Bank name/docname or a Bank document.
template_options (str): JSON string containing a "column_to_field_map" mapping of file column -> bank field.
Side effects:
Overwrites the Bank.bank_transaction_mapping entries and saves the Bank document.
"""
bank = frappe.get_doc("Bank", bank)
for d in bank.bank_transaction_mapping:
d.delete()
@@ -185,6 +360,17 @@ def update_mapping_db(bank, template_options):
def add_bank_account(data, bank_account):
"""
Ensure every data row contains the given bank account value.
Assumes `data` is a list of rows where data[0] is the header row. If the header row does not contain "Bank Account",
this function appends that header and appends the `bank_account` value to each subsequent row. If the header exists,
it sets the `bank_account` value into the existing "Bank Account" column for every data row. Mutates `data` in place.
Parameters:
data (list[list]): Table-like data with the first row as headers.
bank_account (str): Bank account value to set for each data row.
"""
bank_account_loc = None
if "Bank Account" not in data[0]:
data[0].append("Bank Account")
@@ -201,6 +387,21 @@ def add_bank_account(data, bank_account):
def write_files(import_file, data):
"""
Write processed tabular data back to the original import file path (CSV or Excel).
This function overwrites the file referenced by import_file.file_doc.get_full_path().
- If the file extension is "csv", writes rows using the csv writer (expects `data` as an iterable of row iterables).
- If the extension is "xlsx" or "xls", writes to an Excel workbook using write_xlsx with sheet name "trans".
Parameters:
import_file: object
File wrapper whose `.file_doc.get_full_path()` and `.file_doc.get_extension()` are used to determine the target path and extension.
data: Iterable[Iterable]
Sequence of rows (each row is an iterable of cell values) to be written.
No return value.
"""
full_file_path = import_file.file_doc.get_full_path()
parts = import_file.file_doc.get_extension()
extension = parts[1]
@@ -210,11 +411,26 @@ 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 rows of data to an Excel worksheet and save the workbook.
Creates a sheet named `sheet_name` in the provided openpyxl workbook (or a new write-only workbook if `wb` is None), applies optional column widths, converts HTML in string cells (except for sheets named "Data Import Template" or "Data Export"), strips characters illegal in Excel, and saves the workbook to `file_path`.
Parameters:
data (Iterable[Sequence]): Iterable of rows, where each row is a sequence of cell values.
sheet_name (str): Name of the worksheet to create.
wb (openpyxl.Workbook, optional): Workbook to append the sheet to. If not provided, a new write-only Workbook is created.
column_widths (Sequence[Number], optional): Sequence of column widths; indexes correspond to columns starting at 1.
file_path (str): File path where the workbook will be saved.
Returns:
bool: True on successful save.
"""
# from xlsx utils with changes
column_widths = column_widths or []
if wb is None:
@@ -279,7 +495,7 @@ def get_import_status(docname):
@frappe.whitelist()
def get_import_logs(docname: str):
frappe.has_permission("Bank Statement Import")
frappe.has_permission("Bank Statement Import", throw=True)
return frappe.get_all(
"Data Import Log",

View File

@@ -1,10 +1,220 @@
# 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 (
preprocess_mt940_content,
is_mt940_format,
)
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):
"""
Verify preprocessing handles statement-number length boundaries in `:28C:` tags.
Checks that:
- A 6-digit statement number is truncated to its last 5 digits.
- A 5-digit statement number remains unchanged.
- A very long statement number is reduced to its last 5 digits.
"""
# 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):
"""
Verify preprocessing of a real-world MT940 document: truncate 6-digit `:28C:` statement numbers to their last 5 digits and preserve all other content.
Uses a sanitized, production-failing MT940 sample where `:28C:167619/1` must become `:28C:67619/1`. Asserts the entire document matches the expected transformed output, that the truncated tag is present and the original is absent, and that unrelated fields (e.g., `:20:` reference and UPI details) remain unchanged.
"""
# 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

@@ -1,6 +1,7 @@
import frappe
from frappe.utils import flt
from rapidfuzz import fuzz, process
from rapidfuzz.utils import default_process
class AutoMatchParty:
@@ -25,7 +26,7 @@ class AutoMatchParty:
deposit=self.deposit,
).match()
fuzzy_matching_enabled = frappe.db.get_single_value("Accounts Settings", "enable_fuzzy_matching")
fuzzy_matching_enabled = frappe.get_single_value("Accounts Settings", "enable_fuzzy_matching")
if not result and fuzzy_matching_enabled:
result = AutoMatchbyPartyNameDescription(
bank_party_name=self.bank_party_name, description=self.description, deposit=self.deposit
@@ -132,6 +133,7 @@ class AutoMatchbyPartyNameDescription:
query=self.get(field),
choices={row.get("name"): row.get("party_name") for row in names},
scorer=fuzz.token_set_ratio,
processor=default_process,
)
party_name, skip = self.process_fuzzy_result(result)

View File

@@ -45,7 +45,6 @@
"default": "ACC-BTN-.YYYY.-",
"fieldname": "naming_series",
"fieldtype": "Select",
"hidden": 1,
"label": "Series",
"no_copy": 1,
"options": "ACC-BTN-.YYYY.-",
@@ -224,7 +223,8 @@
{
"fieldname": "bank_party_iban",
"fieldtype": "Data",
"label": "Party IBAN (Bank Statement)"
"label": "Party IBAN (Bank Statement)",
"options": "IBAN"
},
{
"fieldname": "bank_party_account_number",
@@ -236,9 +236,10 @@
"fieldtype": "Column Break"
}
],
"grid_page_length": 50,
"is_submittable": 1,
"links": [],
"modified": "2023-11-18 18:32:47.203694",
"modified": "2025-08-29 11:53:45.908169",
"modified_by": "Administrator",
"module": "Accounts",
"name": "Bank Transaction",
@@ -287,9 +288,10 @@
"write": 1
}
],
"row_format": "Dynamic",
"sort_field": "date",
"sort_order": "DESC",
"states": [],
"title_field": "bank_account",
"track_changes": 1
}
}

View File

@@ -121,7 +121,7 @@ class BankTransaction(Document):
self.allocate_payment_entries()
self.set_status()
if frappe.db.get_single_value("Accounts Settings", "enable_party_matching"):
if frappe.get_single_value("Accounts Settings", "enable_party_matching"):
self.auto_set_party()
def before_update_after_submit(self):

View File

@@ -2,19 +2,13 @@
# License: GNU General Public License v3. See license.txt
import frappe
from frappe.tests import IntegrationTestCase, UnitTestCase
from frappe.tests import IntegrationTestCase
from frappe.utils import nowdate
from erpnext.accounts.doctype.bank_transaction.test_bank_transaction import create_bank_account
class UnitTestBankTransaction(UnitTestCase):
"""
Unit tests for BankTransaction.
Use this class for testing individual functions and methods.
"""
pass
IBAN_1 = "DE02000000003716541159"
IBAN_2 = "DE02500105170137075030"
class TestAutoMatchParty(IntegrationTestCase):
@@ -31,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")
@@ -60,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

@@ -6,12 +6,15 @@ import json
import frappe
from frappe import utils
from frappe.model.docstatus import DocStatus
from frappe.tests import IntegrationTestCase, UnitTestCase
from frappe.tests import IntegrationTestCase
from erpnext.accounts.doctype.bank_reconciliation_tool.bank_reconciliation_tool import (
get_linked_payments,
reconcile_vouchers,
)
from erpnext.accounts.doctype.mode_of_payment.test_mode_of_payment import (
set_default_account_for_mode_of_payment,
)
from erpnext.accounts.doctype.payment_entry.test_payment_entry import get_payment_entry
from erpnext.accounts.doctype.pos_profile.test_pos_profile import make_pos_profile
from erpnext.accounts.doctype.purchase_invoice.test_purchase_invoice import make_purchase_invoice
@@ -21,15 +24,6 @@ from erpnext.tests.utils import if_lending_app_installed
EXTRA_TEST_RECORD_DEPENDENCIES = ["Item", "Cost Center"]
class UnitTestBankTransaction(UnitTestCase):
"""
Unit tests for BankTransaction.
Use this class for testing individual functions and methods.
"""
pass
class TestBankTransaction(IntegrationTestCase):
def setUp(self):
make_pos_profile()
@@ -430,15 +424,13 @@ def add_vouchers(gl_account="_Test Bank - _TC"):
except frappe.DuplicateEntryError:
pass
mode_of_payment = frappe.get_doc({"doctype": "Mode of Payment", "name": "Cash"})
mode_of_payment = frappe.get_doc({"doctype": "Mode of Payment", "name": "Wire Transfer"})
if not frappe.db.get_value("Mode of Payment Account", {"company": "_Test Company", "parent": "Cash"}):
mode_of_payment.append("accounts", {"company": "_Test Company", "default_account": gl_account})
mode_of_payment.save()
set_default_account_for_mode_of_payment(mode_of_payment, "_Test Company", gl_account)
si = create_sales_invoice(customer="Fayva", qty=1, rate=109080, do_not_save=1)
si.is_pos = 1
si.append("payments", {"mode_of_payment": "Cash", "account": gl_account, "amount": 109080})
si.append("payments", {"mode_of_payment": "Wire Transfer", "amount": 109080})
si.insert()
si.submit()

View File

@@ -2,16 +2,7 @@
# See license.txt
# import frappe
from frappe.tests import IntegrationTestCase, UnitTestCase
class UnitTestBisectAccountingStatements(UnitTestCase):
"""
Unit tests for BisectAccountingStatements.
Use this class for testing individual functions and methods.
"""
pass
from frappe.tests import IntegrationTestCase
class TestBisectAccountingStatements(IntegrationTestCase):

View File

@@ -2,16 +2,7 @@
# See license.txt
# import frappe
from frappe.tests import IntegrationTestCase, UnitTestCase
class UnitTestBisectNodes(UnitTestCase):
"""
Unit tests for BisectNodes.
Use this class for testing individual functions and methods.
"""
pass
from frappe.tests import IntegrationTestCase
class TestBisectNodes(IntegrationTestCase):

View File

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

View File

@@ -7,10 +7,10 @@
"editable_grid": 1,
"engine": "InnoDB",
"field_order": [
"naming_series",
"budget_against",
"company",
"cost_center",
"naming_series",
"project",
"fiscal_year",
"column_break_3",
@@ -28,6 +28,10 @@
"applicable_on_booking_actual_expenses",
"action_if_annual_budget_exceeded",
"action_if_accumulated_monthly_budget_exceeded",
"control_action_for_cumulative_expense_section",
"applicable_on_cumulative_expense",
"action_if_annual_exceeded_on_cumulative_expense",
"action_if_accumulated_monthly_exceeded_on_cumulative_expense",
"section_break_21",
"accounts"
],
@@ -195,19 +199,46 @@
},
{
"fieldname": "naming_series",
"fieldtype": "Data",
"hidden": 1,
"fieldtype": "Select",
"label": "Series",
"no_copy": 1,
"options": "BUDGET-.YYYY.-",
"print_hide": 1,
"read_only": 1,
"reqd": 1,
"set_only_once": 1
},
{
"fieldname": "control_action_for_cumulative_expense_section",
"fieldtype": "Section Break",
"label": "Control Action for Cumulative Expense"
},
{
"default": "0",
"description": "(Purchase Order + Material Request + Actual Expense)",
"fieldname": "applicable_on_cumulative_expense",
"fieldtype": "Check",
"label": "Applicable on Cumulative Expense"
},
{
"depends_on": "eval:doc.applicable_on_cumulative_expense == 1",
"fieldname": "action_if_annual_exceeded_on_cumulative_expense",
"fieldtype": "Select",
"label": "Action if Anual Budget Exceeded on Cumulative Expense",
"options": "\nStop\nWarn\nIgnore"
},
{
"depends_on": "eval:doc.applicable_on_cumulative_expense == 1",
"fieldname": "action_if_accumulated_monthly_exceeded_on_cumulative_expense",
"fieldtype": "Select",
"label": "Action if Accumulative Monthly Budget Exceeded on Cumulative Expense",
"options": "\nStop\nWarn\nIgnore"
}
],
"grid_page_length": 50,
"index_web_pages_for_search": 1,
"is_submittable": 1,
"links": [],
"modified": "2024-03-27 13:06:42.675933",
"modified": "2025-06-16 15:57:13.114981",
"modified_by": "Administrator",
"module": "Accounts",
"name": "Budget",
@@ -231,8 +262,9 @@
"write": 1
}
],
"row_format": "Dynamic",
"sort_field": "creation",
"sort_order": "DESC",
"states": [],
"track_changes": 1
}
}

View File

@@ -36,11 +36,14 @@ class Budget(Document):
action_if_accumulated_monthly_budget_exceeded: DF.Literal["", "Stop", "Warn", "Ignore"]
action_if_accumulated_monthly_budget_exceeded_on_mr: DF.Literal["", "Stop", "Warn", "Ignore"]
action_if_accumulated_monthly_budget_exceeded_on_po: DF.Literal["", "Stop", "Warn", "Ignore"]
action_if_accumulated_monthly_exceeded_on_cumulative_expense: DF.Literal["", "Stop", "Warn", "Ignore"]
action_if_annual_budget_exceeded: DF.Literal["", "Stop", "Warn", "Ignore"]
action_if_annual_budget_exceeded_on_mr: DF.Literal["", "Stop", "Warn", "Ignore"]
action_if_annual_budget_exceeded_on_po: DF.Literal["", "Stop", "Warn", "Ignore"]
action_if_annual_exceeded_on_cumulative_expense: DF.Literal["", "Stop", "Warn", "Ignore"]
amended_from: DF.Link | None
applicable_on_booking_actual_expenses: DF.Check
applicable_on_cumulative_expense: DF.Check
applicable_on_material_request: DF.Check
applicable_on_purchase_order: DF.Check
budget_against: DF.Literal["", "Cost Center", "Project"]
@@ -48,7 +51,7 @@ class Budget(Document):
cost_center: DF.Link | None
fiscal_year: DF.Link
monthly_distribution: DF.Link | None
naming_series: DF.Data | None
naming_series: DF.Literal["BUDGET-.YYYY.-"]
project: DF.Link | None
# end: auto-generated types
@@ -136,22 +139,21 @@ class Budget(Document):
):
self.applicable_on_booking_actual_expenses = 1
def before_naming(self):
self.naming_series = f"{{{frappe.scrub(self.budget_against)}}}./.{self.fiscal_year}/.###"
def validate_expense_against_budget(args, expense_amount=0):
args = frappe._dict(args)
if not frappe.get_all("Budget", limit=1):
if not frappe.db.count("Budget", cache=True):
return
if args.get("company") and not args.fiscal_year:
if not args.fiscal_year:
args.fiscal_year = get_fiscal_year(args.get("posting_date"), company=args.get("company"))[0]
if args.get("company"):
frappe.flags.exception_approver_role = frappe.get_cached_value(
"Company", args.get("company"), "exception_budget_approver_role"
)
if not frappe.get_cached_value("Budget", {"fiscal_year": args.fiscal_year, "company": args.company}): # nosec
if not frappe.db.get_value("Budget", {"fiscal_year": args.fiscal_year, "company": args.company}):
return
if not args.account:
@@ -302,7 +304,7 @@ def compare_expense_with_budget(args, budget_amount, action_for, action, budget_
def get_expense_breakup(args, currency, budget_against):
msg = "<hr>Total Expenses booked through - <ul>"
msg = "<hr> {{ _('Total Expenses booked through') }} - <ul>"
common_filters = frappe._dict(
{
@@ -316,7 +318,7 @@ def get_expense_breakup(args, currency, budget_against):
"<li>"
+ frappe.utils.get_link_to_report(
"General Ledger",
label="Actual Expenses",
label=_("Actual Expenses"),
filters=common_filters.copy().update(
{
"from_date": frappe.get_cached_value("Fiscal Year", args.fiscal_year, "year_start_date"),
@@ -334,7 +336,7 @@ def get_expense_breakup(args, currency, budget_against):
"<li>"
+ frappe.utils.get_link_to_report(
"Material Request",
label="Material Requests",
label=_("Material Requests"),
report_type="Report Builder",
doctype="Material Request",
filters=common_filters.copy().update(
@@ -357,7 +359,7 @@ def get_expense_breakup(args, currency, budget_against):
"<li>"
+ frappe.utils.get_link_to_report(
"Purchase Order",
label="Unbilled Orders",
label=_("Unbilled Orders"),
report_type="Report Builder",
doctype="Purchase Order",
filters=common_filters.copy().update(
@@ -510,7 +512,7 @@ def get_accumulated_monthly_budget(monthly_distribution, posting_date, fiscal_ye
accumulated_percentage = 0.0
while dt <= getdate(posting_date):
if monthly_distribution:
if monthly_distribution and distribution:
accumulated_percentage += distribution.get(getdate(dt).strftime("%B"), 0)
else:
accumulated_percentage += 100.0 / 12

View File

@@ -3,18 +3,29 @@
import unittest
import frappe
from frappe.tests import IntegrationTestCase
from frappe.utils import now_datetime, nowdate
from erpnext.accounts.doctype.budget.budget import BudgetError, get_actual_expense
from erpnext.accounts.doctype.budget.budget import (
BudgetError,
get_accumulated_monthly_budget,
get_actual_expense,
)
from erpnext.accounts.doctype.journal_entry.test_journal_entry import make_journal_entry
from erpnext.accounts.utils import get_fiscal_year
from erpnext.buying.doctype.purchase_order.test_purchase_order import create_purchase_order
EXTRA_TEST_RECORD_DEPENDENCIES = ["Monthly Distribution"]
from erpnext.tests.utils import ERPNextTestSuite
class TestBudget(IntegrationTestCase):
class TestBudget(ERPNextTestSuite):
@classmethod
def setUpClass(cls):
super().setUpClass()
cls.make_monthly_distribution()
cls.make_projects()
def setUp(self):
frappe.db.set_single_value("Accounts Settings", "use_new_budget_controller", True)
def test_monthly_budget_crossed_ignore(self):
set_total_expense_zero(nowdate(), "cost_center")
@@ -43,10 +54,13 @@ class TestBudget(IntegrationTestCase):
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
)
jv = make_journal_entry(
"_Test Account Cost for Goods Sold - _TC",
"_Test Bank - _TC",
40000,
accumulated_limit + 1,
"_Test Cost Center - _TC",
posting_date=nowdate(),
)
@@ -63,10 +77,13 @@ class TestBudget(IntegrationTestCase):
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
)
jv = make_journal_entry(
"_Test Account Cost for Goods Sold - _TC",
"_Test Bank - _TC",
40000,
accumulated_limit + 1,
"_Test Cost Center - _TC",
posting_date=nowdate(),
)
@@ -96,6 +113,10 @@ class TestBudget(IntegrationTestCase):
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
)
mr = frappe.get_doc(
{
"doctype": "Material Request",
@@ -109,7 +130,7 @@ class TestBudget(IntegrationTestCase):
"uom": "_Test UOM",
"warehouse": "_Test Warehouse - _TC",
"schedule_date": nowdate(),
"rate": 100000,
"rate": accumulated_limit + 1,
"expense_account": "_Test Account Cost for Goods Sold - _TC",
"cost_center": "_Test Cost Center - _TC",
}
@@ -123,6 +144,7 @@ class TestBudget(IntegrationTestCase):
budget.load_from_db()
budget.cancel()
mr.cancel()
def test_monthly_budget_crossed_for_po(self):
budget = make_budget(
@@ -135,7 +157,12 @@ class TestBudget(IntegrationTestCase):
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)
po = create_purchase_order(transaction_date=nowdate(), do_not_submit=True)
accumulated_limit = get_accumulated_monthly_budget(
budget.monthly_distribution, nowdate(), budget.fiscal_year, budget.accounts[0].budget_amount
)
po = create_purchase_order(
transaction_date=nowdate(), qty=1, rate=accumulated_limit + 1, do_not_submit=True
)
po.set_missing_values()
@@ -153,11 +180,13 @@ class TestBudget(IntegrationTestCase):
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
)
jv = make_journal_entry(
"_Test Account Cost for Goods Sold - _TC",
"_Test Bank - _TC",
40000,
accumulated_limit + 1,
"_Test Cost Center - _TC",
project=project,
posting_date=nowdate(),
@@ -272,10 +301,13 @@ class TestBudget(IntegrationTestCase):
budget = make_budget(budget_against="Cost Center", cost_center="_Test Company - _TC")
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
)
jv = make_journal_entry(
"_Test Account Cost for Goods Sold - _TC",
"_Test Bank - _TC",
40000,
accumulated_limit + 1,
"_Test Cost Center 2 - _TC",
posting_date=nowdate(),
)
@@ -302,10 +334,13 @@ class TestBudget(IntegrationTestCase):
budget = make_budget(budget_against="Cost Center", cost_center=cost_center)
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
)
jv = make_journal_entry(
"_Test Account Cost for Goods Sold - _TC",
"_Test Bank - _TC",
40000,
accumulated_limit + 1,
cost_center,
posting_date=nowdate(),
)
@@ -349,6 +384,44 @@ class TestBudget(IntegrationTestCase):
self.assertRaises(BudgetError, jv.submit)
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
)
jv = make_journal_entry(
"_Test Account Cost for Goods Sold - _TC",
"_Test Bank - _TC",
accumulated_limit - 1,
"_Test Cost Center - _TC",
posting_date=nowdate(),
)
jv.submit()
frappe.db.set_value(
"Budget", budget.name, "action_if_accumulated_monthly_exceeded_on_cumulative_expense", "Stop"
)
po = create_purchase_order(
transaction_date=nowdate(), qty=1, rate=accumulated_limit + 1, do_not_submit=True
)
po.set_missing_values()
self.assertRaises(BudgetError, po.submit)
frappe.db.set_value(
"Budget", budget.name, "action_if_accumulated_monthly_exceeded_on_cumulative_expense", "Ignore"
)
po.submit()
budget.load_from_db()
budget.cancel()
po.cancel()
jv.cancel()
def set_total_expense_zero(posting_date, budget_against_field=None, budget_against_CC=None):
if budget_against_field == "project":
@@ -423,6 +496,7 @@ def make_budget(**args):
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"
@@ -447,6 +521,15 @@ def make_budget(**args):
args.action_if_accumulated_monthly_budget_exceeded_on_po or "Warn"
)
if args.applicable_on_cumulative_expense:
budget.applicable_on_cumulative_expense = 1
budget.action_if_annual_exceeded_on_cumulative_expense = (
args.action_if_annual_exceeded_on_cumulative_expense or "Warn"
)
budget.action_if_accumulated_monthly_exceeded_on_cumulative_expense = (
args.action_if_accumulated_monthly_exceeded_on_cumulative_expense or "Warn"
)
budget.insert()
budget.submit()

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

@@ -154,3 +154,7 @@ class CostCenterAllocation(Document):
).format(d.cost_center),
InvalidChildCostCenter,
)
def clear_cache(self):
frappe.clear_cache(doctype="Cost Center")
return super().clear_cache()

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

@@ -36,7 +36,7 @@ class CurrencyExchangeSettings(Document):
def validate(self):
self.set_parameters_and_result()
if frappe.flags.in_test or frappe.flags.in_install or frappe.flags.in_setup_wizard:
if frappe.in_test or frappe.flags.in_install or frappe.flags.in_setup_wizard:
return
response, value = self.validate_parameters()
self.validate_result(response, value)

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

@@ -4,7 +4,7 @@ import json
import frappe
from frappe.model import mapper
from frappe.tests import IntegrationTestCase, UnitTestCase
from frappe.tests import IntegrationTestCase
from frappe.utils import add_days, nowdate, today
from erpnext import get_default_cost_center
@@ -22,15 +22,6 @@ from erpnext.accounts.doctype.sales_invoice.test_sales_invoice import (
EXTRA_TEST_RECORD_DEPENDENCIES = ["Company", "Cost Center"]
class UnitTestDunning(UnitTestCase):
"""
Unit tests for Dunning.
Use this class for testing individual functions and methods.
"""
pass
class TestDunning(IntegrationTestCase):
@classmethod
def setUpClass(cls):
@@ -148,6 +139,64 @@ class TestDunning(IntegrationTestCase):
self.assertEqual(sales_invoice.status, "Overdue")
self.assertEqual(dunning.status, "Unresolved")
def test_dunning_resolution_from_credit_note(self):
"""
Test that dunning is resolved when a credit note is issued against the original invoice.
"""
sales_invoice = create_sales_invoice_against_cost_center(
posting_date=add_days(today(), -10), qty=1, rate=100
)
dunning = create_dunning_from_sales_invoice(sales_invoice.name)
dunning.submit()
self.assertEqual(dunning.status, "Unresolved")
credit_note = frappe.copy_doc(sales_invoice)
credit_note.is_return = 1
credit_note.return_against = sales_invoice.name
credit_note.update_outstanding_for_self = 0
for item in credit_note.items:
item.qty = -item.qty
credit_note.save()
credit_note.submit()
dunning.reload()
self.assertEqual(dunning.status, "Resolved")
credit_note.cancel()
dunning.reload()
self.assertEqual(dunning.status, "Unresolved")
def test_dunning_not_affected_by_standalone_credit_note(self):
"""
Test that dunning is NOT resolved when a credit note has update_outstanding_for_self checked.
"""
sales_invoice = create_sales_invoice_against_cost_center(
posting_date=add_days(today(), -10), qty=1, rate=100
)
dunning = create_dunning_from_sales_invoice(sales_invoice.name)
dunning.submit()
self.assertEqual(dunning.status, "Unresolved")
credit_note = frappe.copy_doc(sales_invoice)
credit_note.is_return = 1
credit_note.return_against = sales_invoice.name
credit_note.update_outstanding_for_self = 1
for item in credit_note.items:
item.qty = -item.qty
credit_note.save()
credit_note = frappe.get_doc("Sales Invoice", credit_note.name)
credit_note.submit()
dunning.reload()
self.assertEqual(dunning.status, "Unresolved")
def create_dunning(overdue_days, dunning_type_name=None):
posting_date = add_days(today(), -1 * overdue_days)

View File

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

View File

@@ -123,7 +123,7 @@ def check_duplicate_fiscal_year(doc):
)
for fiscal_year, ysd, yed in year_start_end_dates:
if (getdate(doc.year_start_date) == ysd and getdate(doc.year_end_date) == yed) and (
not frappe.flags.in_test
not frappe.in_test
):
frappe.throw(
_(

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

@@ -7,7 +7,7 @@ from frappe import _
from frappe.model.document import Document
from frappe.model.meta import get_field_precision
from frappe.model.naming import set_name_from_naming_options
from frappe.utils import flt, fmt_money, now
from frappe.utils import create_batch, flt, fmt_money, now
import erpnext
from erpnext.accounts.doctype.accounting_dimension.accounting_dimension import (
@@ -18,8 +18,9 @@ from erpnext.accounts.party import (
validate_party_frozen_disabled,
validate_party_gle_currency,
)
from erpnext.accounts.utils import get_account_currency, get_fiscal_year
from erpnext.exceptions import InvalidAccountCurrency
from erpnext.accounts.utils import OUTSTANDING_DOCTYPES, get_account_currency, get_fiscal_year
from erpnext.exceptions import InvalidAccountCurrency, ReportingCurrencyExchangeNotFoundError
from erpnext.setup.utils import get_exchange_rate
exclude_from_linked_with = True
@@ -42,9 +43,11 @@ class GLEntry(Document):
cost_center: DF.Link | None
credit: DF.Currency
credit_in_account_currency: DF.Currency
credit_in_reporting_currency: DF.Currency
credit_in_transaction_currency: DF.Currency
debit: DF.Currency
debit_in_account_currency: DF.Currency
debit_in_reporting_currency: DF.Currency
debit_in_transaction_currency: DF.Currency
due_date: DF.Date | None
finance_book: DF.Link | None
@@ -57,6 +60,7 @@ class GLEntry(Document):
posting_date: DF.Date | None
project: DF.Link | None
remarks: DF.Text | None
reporting_currency_exchange_rate: DF.Float
to_rename: DF.Check
transaction_currency: DF.Link | None
transaction_date: DF.Date | None
@@ -88,6 +92,8 @@ class GLEntry(Document):
self.validate_party()
self.validate_currency()
self.set_amount_in_reporting_currency()
def on_update(self):
adv_adj = self.flags.adv_adj
if not self.flags.from_repost and self.voucher_type != "Period Closing Voucher":
@@ -131,18 +137,20 @@ class GLEntry(Document):
if not self.is_cancelled and not (self.party_type and self.party):
account_type = frappe.get_cached_value("Account", self.account, "account_type")
if account_type == "Receivable":
frappe.throw(
_("{0} {1}: Customer is required against Receivable account {2}").format(
self.voucher_type, self.voucher_no, self.account
# skipping validation for payroll entry creation in case party is not required
if not frappe.flags.party_not_required_for_receivable_payable:
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
@@ -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
@@ -451,12 +475,20 @@ def rename_gle_sle_docs():
def rename_temporarily_named_docs(doctype):
"""Rename temporarily named docs using autoname options"""
docs_to_rename = frappe.get_all(doctype, {"to_rename": "1"}, order_by="creation", limit=50000)
for doc in docs_to_rename:
oldname = doc.name
set_name_from_naming_options(frappe.get_meta(doctype).autoname, doc)
newname = doc.name
frappe.db.sql(
f"UPDATE `tab{doctype}` SET name = %s, to_rename = 0, modified = %s where name = %s",
(newname, now(), oldname),
auto_commit=True,
)
autoname = frappe.get_meta(doctype).autoname
for batch in create_batch(docs_to_rename, 100):
for doc in batch:
oldname = doc.name
set_name_from_naming_options(autoname, doc)
newname = doc.name
frappe.db.sql(
f"UPDATE `tab{doctype}` SET name = %s, to_rename = 0, modified = %s where name = %s",
(newname, now(), oldname),
)
for hook_type in ("on_gle_rename", "on_sle_rename"):
for hook in frappe.get_hooks(hook_type):
frappe.call(hook, newname=newname, oldname=oldname)
frappe.db.commit()

View File

@@ -197,7 +197,7 @@ frappe.ui.form.on("Invoice Discounting", {
from_date: frm.doc.posting_date,
to_date: moment(frm.doc.modified).format("YYYY-MM-DD"),
company: frm.doc.company,
group_by: "Group by Voucher (Consolidated)",
categorize_by: "Categorize by Voucher (Consolidated)",
show_cancelled_entries: frm.doc.docstatus === 2,
};
frappe.set_route("query-report", "General Ledger");

View File

@@ -39,7 +39,16 @@ class ItemTaxTemplate(Document):
check_list = []
for d in self.get("taxes"):
if d.tax_type:
account_type = frappe.get_cached_value("Account", d.tax_type, "account_type")
account_type, account_company = frappe.get_cached_value(
"Account", d.tax_type, ["account_type", "company"]
)
if account_company != self.company:
frappe.throw(
_("Item Tax Row {0}: Account must belong to Company - {1}").format(
d.idx, frappe.bold(self.company)
)
)
if account_type not in [
"Tax",

View File

@@ -20,6 +20,39 @@ frappe.ui.form.on("Journal Entry", {
"Unreconcile Payment Entries",
"Bank Transaction",
];
frm.trigger("set_queries");
},
set_queries(frm) {
frm.set_query("periodic_entry_difference_account", function () {
return {
filters: {
is_group: 0,
company: frm.doc.company,
},
};
});
frm.set_query("stock_asset_account", function () {
return {
filters: {
is_group: 0,
account_type: "Stock",
company: frm.doc.company,
},
};
});
},
get_balance_for_periodic_accounting(frm) {
frm.call({
method: "get_balance_for_periodic_accounting",
doc: frm.doc,
callback: function (r) {
refresh_field("accounts");
},
});
},
refresh: function (frm) {
@@ -35,7 +68,7 @@ frappe.ui.form.on("Journal Entry", {
to_date: moment(frm.doc.modified).format("YYYY-MM-DD"),
company: frm.doc.company,
finance_book: frm.doc.finance_book,
group_by: "",
categorize_by: "",
show_cancelled_entries: frm.doc.docstatus === 2,
};
frappe.set_route("query-report", "General Ledger");
@@ -163,6 +196,7 @@ frappe.ui.form.on("Journal Entry", {
});
erpnext.accounts.dimensions.update_dimension(frm, frm.doctype);
erpnext.utils.set_letter_head(frm);
},
voucher_type: function (frm) {

View File

@@ -13,15 +13,21 @@
"title",
"voucher_type",
"naming_series",
"finance_book",
"process_deferred_accounting",
"reversal_of",
"tax_withholding_category",
"column_break1",
"from_template",
"company",
"posting_date",
"finance_book",
"apply_tds",
"tax_withholding_category",
"section_break_tcvw",
"for_all_stock_asset_accounts",
"column_break_wpau",
"stock_asset_account",
"periodic_entry_difference_account",
"get_balance_for_periodic_accounting",
"2_add_edit_gl_entries",
"accounts",
"section_break99",
@@ -40,7 +46,6 @@
"reference",
"clearance_date",
"remark",
"paid_loan",
"inter_company_journal_entry_reference",
"column_break98",
"bill_no",
@@ -89,7 +94,7 @@
"label": "Entry Type",
"oldfieldname": "voucher_type",
"oldfieldtype": "Select",
"options": "Journal Entry\nInter Company Journal Entry\nBank Entry\nCash Entry\nCredit Card Entry\nDebit Note\nCredit Note\nContra Entry\nExcise Entry\nWrite Off Entry\nOpening Entry\nDepreciation Entry\nExchange Rate Revaluation\nExchange Gain Or Loss\nDeferred Revenue\nDeferred Expense",
"options": "Journal Entry\nInter Company Journal Entry\nBank Entry\nCash Entry\nCredit Card Entry\nDebit Note\nCredit Note\nContra Entry\nExcise Entry\nWrite Off Entry\nOpening Entry\nDepreciation Entry\nAsset Disposal\nPeriodic Accounting Entry\nExchange Rate Revaluation\nExchange Gain Or Loss\nDeferred Revenue\nDeferred Expense",
"reqd": 1,
"search_index": 1
},
@@ -304,13 +309,6 @@
"oldfieldtype": "Small Text",
"read_only": 1
},
{
"fieldname": "paid_loan",
"fieldtype": "Data",
"hidden": 1,
"label": "Paid Loan",
"print_hide": 1
},
{
"depends_on": "eval:doc.voucher_type== \"Inter Company Journal Entry\"",
"fieldname": "inter_company_journal_entry_reference",
@@ -543,6 +541,42 @@
"label": "Is System Generated",
"no_copy": 1,
"read_only": 1
},
{
"depends_on": "eval:doc.voucher_type === \"Periodic Accounting Entry\"",
"fieldname": "periodic_entry_difference_account",
"fieldtype": "Link",
"label": "Periodic Entry Difference Account",
"mandatory_depends_on": "eval:doc.voucher_type === \"Periodic Accounting Entry\"",
"options": "Account"
},
{
"depends_on": "eval:doc.voucher_type === \"Periodic Accounting Entry\"",
"fieldname": "section_break_tcvw",
"fieldtype": "Section Break",
"label": "Periodic Accounting"
},
{
"default": "1",
"fieldname": "for_all_stock_asset_accounts",
"fieldtype": "Check",
"label": "For All Stock Asset Accounts"
},
{
"depends_on": "eval:doc.for_all_stock_asset_accounts === 0",
"fieldname": "stock_asset_account",
"fieldtype": "Link",
"label": "Stock Asset Account",
"options": "Account"
},
{
"fieldname": "column_break_wpau",
"fieldtype": "Column Break"
},
{
"fieldname": "get_balance_for_periodic_accounting",
"fieldtype": "Button",
"label": "Get Balance"
}
],
"icon": "fa fa-file-text",
@@ -557,7 +591,7 @@
"table_fieldname": "payment_entries"
}
],
"modified": "2024-07-18 15:32:29.413598",
"modified": "2025-07-06 15:22:58.465131",
"modified_by": "Administrator",
"module": "Accounts",
"name": "Journal Entry",
@@ -602,10 +636,11 @@
"role": "Auditor"
}
],
"row_format": "Dynamic",
"search_fields": "voucher_type,posting_date, due_date, cheque_no",
"sort_field": "creation",
"sort_order": "DESC",
"states": [],
"title_field": "title",
"track_changes": 1
}
}

View File

@@ -24,6 +24,7 @@ from erpnext.accounts.party import get_party_account
from erpnext.accounts.utils import (
cancel_exchange_gain_loss_journal,
get_account_currency,
get_advance_payment_doctypes,
get_balance_on,
get_stock_accounts,
get_stock_and_account_balance,
@@ -62,6 +63,7 @@ class JournalEntry(AccountsController):
difference: DF.Currency
due_date: DF.Date | None
finance_book: DF.Link | None
for_all_stock_asset_accounts: DF.Check
from_template: DF.Link | None
inter_company_journal_entry_reference: DF.Link | None
is_opening: DF.Literal["No", "Yes"]
@@ -70,14 +72,15 @@ class JournalEntry(AccountsController):
mode_of_payment: DF.Link | None
multi_currency: DF.Check
naming_series: DF.Literal["ACC-JV-.YYYY.-"]
paid_loan: DF.Data | None
pay_to_recd_from: DF.Data | None
payment_order: DF.Link | None
periodic_entry_difference_account: DF.Link | None
posting_date: DF.Date
process_deferred_accounting: DF.Link | None
remark: DF.SmallText | None
reversal_of: DF.Link | None
select_print_heading: DF.Link | None
stock_asset_account: DF.Link | None
stock_entry: DF.Link | None
tax_withholding_category: DF.Link | None
title: DF.Data | None
@@ -100,6 +103,8 @@ class JournalEntry(AccountsController):
"Write Off Entry",
"Opening Entry",
"Depreciation Entry",
"Asset Disposal",
"Periodic Accounting Entry",
"Exchange Rate Revaluation",
"Exchange Gain Or Loss",
"Deferred Revenue",
@@ -140,14 +145,13 @@ class JournalEntry(AccountsController):
self.validate_credit_debit_note()
self.validate_empty_accounts_table()
self.validate_inter_company_accounts()
self.validate_depr_entry_voucher_type()
self.validate_depr_account_and_depr_entry_voucher_type()
self.validate_company_in_accounting_dimension()
self.validate_advance_accounts()
if self.docstatus == 0:
self.apply_tax_withholding()
if not self.title:
if self.is_new() or not self.title:
self.title = self.get_title()
def validate_advance_accounts(self):
@@ -191,12 +195,79 @@ class JournalEntry(AccountsController):
self.validate_cheque_info()
self.check_credit_limit()
self.make_gl_entries()
self.make_advance_payment_ledger_entries()
self.update_advance_paid()
self.update_asset_value()
self.update_inter_company_jv()
self.update_invoice_discounting()
self.update_booked_depreciation()
@frappe.whitelist()
def get_balance_for_periodic_accounting(self):
self.validate_company_for_periodic_accounting()
stock_accounts = self.get_stock_accounts_for_periodic_accounting()
self.set("accounts", [])
for account in stock_accounts:
account_bal, stock_bal, warehouse_list = get_stock_and_account_balance(
account, self.posting_date, self.company
)
difference_value = flt(stock_bal - account_bal, self.precision("difference"))
if difference_value == 0:
frappe.msgprint(
_("No difference found for stock account {0}").format(frappe.bold(account)),
alert=True,
)
continue
self.append(
"accounts",
{
"account": account,
"debit_in_account_currency": difference_value if difference_value > 0 else 0,
"credit_in_account_currency": abs(difference_value) if difference_value < 0 else 0,
},
)
self.append(
"accounts",
{
"account": self.periodic_entry_difference_account,
"credit_in_account_currency": difference_value if difference_value > 0 else 0,
"debit_in_account_currency": abs(difference_value) if difference_value < 0 else 0,
},
)
def validate_company_for_periodic_accounting(self):
if erpnext.is_perpetual_inventory_enabled(self.company):
frappe.throw(
_(
"Periodic Accounting Entry is not allowed for company {0} with perpetual inventory enabled"
).format(self.company)
)
if not self.periodic_entry_difference_account:
frappe.throw(_("Please select Periodic Accounting Entry Difference Account"))
def get_stock_accounts_for_periodic_accounting(self):
if self.voucher_type != "Periodic Accounting Entry":
return []
if self.for_all_stock_asset_accounts:
return frappe.get_all(
"Account",
filters={
"company": self.company,
"account_type": "Stock",
"root_type": "Asset",
"is_group": 0,
},
pluck="name",
)
if not self.stock_asset_account:
frappe.throw(_("Please select Stock Asset Account"))
return [self.stock_asset_account]
def on_update_after_submit(self):
# Flag will be set on Reconciliation
@@ -225,49 +296,49 @@ 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()
self.unlink_asset_adjustment_entry()
self.update_invoice_discounting()
self.update_booked_depreciation(1)
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 = frappe.get_hooks("advance_payment_receivable_doctypes") + frappe.get_hooks(
"advance_payment_payable_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.get_doc("Journal Entry", self.inter_company_journal_entry_reference)
doc = frappe.db.get_value(
"Journal Entry",
self.inter_company_journal_entry_reference,
["company", "total_debit", "total_credit"],
as_dict=True,
)
account_currency = frappe.get_cached_value("Company", self.company, "default_currency")
previous_account_currency = frappe.get_cached_value("Company", doc.company, "default_currency")
if account_currency == previous_account_currency:
if self.total_credit != doc.total_debit or self.total_debit != doc.total_credit:
credit_precision = self.precision("total_credit")
debit_precision = self.precision("total_debit")
if (flt(self.total_credit, credit_precision) != flt(doc.total_debit, debit_precision)) or (
flt(self.total_debit, debit_precision) != flt(doc.total_credit, credit_precision)
):
frappe.throw(_("Total Credit/ Debit Amount should be same as linked Journal Entry"))
def validate_depr_entry_voucher_type(self):
if (
any(d.account_type == "Depreciation" for d in self.get("accounts"))
and self.voucher_type != "Depreciation Entry"
):
frappe.throw(_("Journal Entry type should be set as Depreciation Entry for asset depreciation"))
def validate_depr_account_and_depr_entry_voucher_type(self):
for d in self.get("accounts"):
if d.account_type == "Depreciation":
if self.voucher_type != "Depreciation Entry":
frappe.throw(
_("Journal Entry type should be set as Depreciation Entry for asset depreciation")
)
if frappe.get_cached_value("Account", d.account, "root_type") != "Expense":
frappe.throw(_("Account {0} should be of type Expense").format(d.account))
def validate_stock_accounts(self):
if self.voucher_type == "Periodic Accounting Entry":
# Skip validation for periodic accounting entry
return
stock_accounts = get_stock_accounts(self.company, accounts=self.accounts)
for account in stock_accounts:
account_bal, stock_bal, warehouse_list = get_stock_and_account_balance(
@@ -370,7 +441,11 @@ class JournalEntry(AccountsController):
self.remove(d)
def update_asset_value(self):
if self.flags.planned_depr_entry or self.voucher_type != "Depreciation Entry":
self.update_asset_on_depreciation()
self.update_asset_on_disposal()
def update_asset_on_depreciation(self):
if self.voucher_type != "Depreciation Entry":
return
for d in self.get("accounts"):
@@ -380,22 +455,59 @@ class JournalEntry(AccountsController):
and d.account_type == "Depreciation"
and d.debit
):
asset = frappe.get_doc("Asset", d.reference_name)
asset = frappe.get_cached_doc("Asset", d.reference_name)
if asset.calculate_depreciation:
fb_idx = 1
if self.finance_book:
for fb_row in asset.get("finance_books"):
if fb_row.finance_book == self.finance_book:
fb_idx = fb_row.idx
break
fb_row = asset.get("finance_books")[fb_idx - 1]
fb_row.value_after_depreciation -= d.debit
fb_row.db_update()
else:
asset.db_set("value_after_depreciation", asset.value_after_depreciation - d.debit)
self.update_journal_entry_link_on_depr_schedule(asset, d)
self.update_value_after_depreciation(asset, d.debit)
asset.db_set("value_after_depreciation", asset.value_after_depreciation - d.debit)
asset.set_status()
asset.set_total_booked_depreciations()
def update_value_after_depreciation(self, asset, depr_amount):
fb_idx = 1
if self.finance_book:
for fb_row in asset.get("finance_books"):
if fb_row.finance_book == self.finance_book:
fb_idx = fb_row.idx
break
fb_row = asset.get("finance_books")[fb_idx - 1]
fb_row.value_after_depreciation -= depr_amount
frappe.db.set_value(
"Asset Finance Book", fb_row.name, "value_after_depreciation", fb_row.value_after_depreciation
)
def update_journal_entry_link_on_depr_schedule(self, asset, je_row):
depr_schedule = get_depr_schedule(asset.name, "Active", self.finance_book)
for d in depr_schedule or []:
if (
d.schedule_date == self.posting_date
and not d.journal_entry
and d.depreciation_amount == flt(je_row.debit)
):
frappe.db.set_value("Depreciation Schedule", d.name, "journal_entry", self.name)
def update_asset_on_disposal(self):
if self.voucher_type == "Asset Disposal":
disposed_assets = []
for d in self.get("accounts"):
if (
d.reference_type == "Asset"
and d.reference_name
and d.reference_name not in disposed_assets
):
frappe.db.set_value(
"Asset",
d.reference_name,
{
"disposal_date": self.posting_date,
"journal_entry_for_scrap": self.name,
},
)
asset_doc = frappe.get_doc("Asset", d.reference_name)
asset_doc.set_status()
disposed_assets.append(d.reference_name)
def update_inter_company_jv(self):
if self.voucher_type == "Inter Company Journal Entry" and self.inter_company_journal_entry_reference:
@@ -450,25 +562,6 @@ class JournalEntry(AccountsController):
if status:
inv_disc_doc.set_status(status=status)
def update_booked_depreciation(self, cancel=0):
for d in self.get("accounts"):
if (
self.voucher_type == "Depreciation Entry"
and d.reference_type == "Asset"
and d.reference_name
and frappe.get_cached_value("Account", d.account, "root_type") == "Expense"
and d.debit
):
asset = frappe.get_doc("Asset", d.reference_name)
for fb_row in asset.get("finance_books"):
if fb_row.finance_book == self.finance_book:
if cancel:
fb_row.total_number_of_booked_depreciations -= 1
else:
fb_row.total_number_of_booked_depreciations += 1
fb_row.db_update()
break
def unlink_advance_entry_reference(self):
for d in self.get("accounts"):
if d.is_advance == "Yes" and d.reference_type in ("Sales Invoice", "Purchase Invoice"):
@@ -518,9 +611,9 @@ class JournalEntry(AccountsController):
fb_row = asset.get("finance_books")[fb_idx - 1]
fb_row.value_after_depreciation += d.debit
fb_row.db_update()
else:
asset.db_set("value_after_depreciation", asset.value_after_depreciation + d.debit)
asset.db_set("value_after_depreciation", asset.value_after_depreciation + d.debit)
asset.set_status()
asset.set_total_booked_depreciations()
elif self.voucher_type == "Journal Entry" and d.reference_type == "Asset" and d.reference_name:
journal_entry_for_scrap = frappe.db.get_value(
"Asset", d.reference_name, "journal_entry_for_scrap"
@@ -551,8 +644,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")
# skipping validation for payroll entry creation
skip_validation = frappe.flags.party_not_required_for_receivable_payable
if account_type in ["Receivable", "Payable"]:
if not (d.party_type and d.party):
if not (d.party_type and d.party) and not skip_validation:
frappe.throw(
_(
"Row {0}: Party Type and Party is required for Receivable / Payable account {1}"
@@ -561,6 +657,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(
@@ -1086,49 +1184,65 @@ 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,
}
)
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,
)
)
@@ -1137,7 +1251,7 @@ class JournalEntry(AccountsController):
def make_gl_entries(self, cancel=0, adv_adj=0):
from erpnext.accounts.general_ledger import make_gl_entries
merge_entries = frappe.db.get_single_value("Accounts Settings", "merge_similar_account_heads")
merge_entries = frappe.get_single_value("Accounts Settings", "merge_similar_account_heads")
gl_map = self.build_gl_map()
if self.voucher_type in ("Deferred Revenue", "Deferred Expense"):
@@ -1263,7 +1377,7 @@ class JournalEntry(AccountsController):
@frappe.whitelist()
def get_default_bank_cash_account(
company, account_type=None, mode_of_payment=None, account=None, ignore_permissions=False
company, account_type=None, mode_of_payment=None, account=None, *, fetch_balance=True
):
from erpnext.accounts.doctype.sales_invoice.sales_invoice import get_bank_cash_account
@@ -1298,15 +1412,14 @@ def get_default_bank_cash_account(
account_details = frappe.get_cached_value(
"Account", account, ["account_currency", "account_type"], as_dict=1
)
return frappe._dict(
{
"account": account,
"balance": get_balance_on(account, ignore_account_permission=ignore_permissions),
"account_currency": account_details.account_currency,
"account_type": account_details.account_type,
}
)
result = {
"account": account,
"account_currency": account_details.account_currency,
"account_type": account_details.account_type,
}
if fetch_balance:
result["balance"] = get_balance_on(account)
return frappe._dict(result)
else:
return frappe._dict()
@@ -1686,6 +1799,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

@@ -2,7 +2,7 @@
# License: GNU General Public License v3. See license.txt
import frappe
from frappe.tests import IntegrationTestCase, UnitTestCase
from frappe.tests import IntegrationTestCase
from frappe.utils import flt, nowdate
from erpnext.accounts.doctype.account.test_account import get_inventory_account
@@ -10,15 +10,6 @@ from erpnext.accounts.doctype.journal_entry.journal_entry import StockAccountInv
from erpnext.exceptions import InvalidAccountCurrency
class UnitTestJournalEntry(UnitTestCase):
"""
Unit tests for JournalEntry.
Use this class for testing individual functions and methods.
"""
pass
class TestJournalEntry(IntegrationTestCase):
@IntegrationTestCase.change_settings(
"Accounts Settings", {"unlink_payment_on_cancellation_of_invoice": 1}
@@ -588,6 +579,18 @@ class TestJournalEntry(IntegrationTestCase):
]
self.assertEqual(expected, actual)
def test_pay_to_recd_from(self):
jv = make_journal_entry("_Test Cash - _TC", "_Test Bank - _TC", 100, save=False)
jv.pay_to_recd_from = "_Test Receiver"
jv.save()
self.assertEqual(jv.pay_to_recd_from, "_Test Receiver")
jv.pay_to_recd_from = "_Test Receiver 2"
jv.save()
jv.submit()
self.assertEqual(jv.pay_to_recd_from, "_Test Receiver 2")
def make_journal_entry(
account1,

View File

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

View File

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

View File

@@ -2,16 +2,7 @@
# See license.txt
# import frappe
from frappe.tests import IntegrationTestCase, UnitTestCase
class UnitTestLedgerHealthMonitor(UnitTestCase):
"""
Unit tests for LedgerHealthMonitor.
Use this class for testing individual functions and methods.
"""
pass
from frappe.tests import IntegrationTestCase
class TestLedgerHealthMonitor(IntegrationTestCase):

View File

@@ -35,7 +35,7 @@ class LedgerMerge(Document):
from frappe.utils.background_jobs import enqueue
from frappe.utils.scheduler import is_scheduler_inactive
if is_scheduler_inactive() and not frappe.flags.in_test:
if is_scheduler_inactive() and not frappe.in_test:
frappe.throw(_("Scheduler is inactive. Cannot merge accounts."), title=_("Scheduler Inactive"))
job_id = f"ledger_merge::{self.name}"
@@ -47,7 +47,7 @@ class LedgerMerge(Document):
event="ledger_merge",
job_id=job_id,
docname=self.name,
now=frappe.conf.developer_mode or frappe.flags.in_test,
now=frappe.conf.developer_mode or frappe.in_test,
)
return True

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:
@@ -178,8 +187,9 @@ def validate_loyalty_points(ref_doc, points_to_redeem):
loyalty_amount = flt(points_to_redeem * loyalty_program_details.conversion_factor)
if loyalty_amount > ref_doc.rounded_total:
frappe.throw(_("You can't redeem Loyalty Points having more value than the Rounded Total."))
total_amount = ref_doc.grand_total if ref_doc.is_rounded_total_disabled() else ref_doc.rounded_total
if loyalty_amount > total_amount:
frappe.throw(_("You can't redeem Loyalty Points having more value than the Total Amount."))
if not ref_doc.loyalty_amount and ref_doc.loyalty_amount != loyalty_amount:
ref_doc.loyalty_amount = loyalty_amount

View File

@@ -2,8 +2,26 @@
# See license.txt
import unittest
import frappe
from frappe.tests import IntegrationTestCase
class TestModeofPayment(IntegrationTestCase):
pass
def set_default_account_for_mode_of_payment(mode_of_payment, company, account):
mode_of_payment.reload()
if frappe.db.exists(
"Mode of Payment Account", {"parent": mode_of_payment.mode_of_payment, "company": company}
):
frappe.db.set_value(
"Mode of Payment Account",
{"parent": mode_of_payment.mode_of_payment, "company": company},
"default_account",
account,
)
return
mode_of_payment.append("accounts", {"company": company, "default_account": account})
mode_of_payment.save()

View File

@@ -1,44 +0,0 @@
[{
"doctype": "Monthly Distribution",
"distribution_id": "_Test Distribution",
"fiscal_year": "_Test Fiscal Year 2013",
"percentages": [
{
"month": "January",
"percentage_allocation": "8"
}, {
"month": "February",
"percentage_allocation": "8"
}, {
"month": "March",
"percentage_allocation": "8"
}, {
"month": "April",
"percentage_allocation": "8"
}, {
"month": "May",
"percentage_allocation": "8"
}, {
"month": "June",
"percentage_allocation": "8"
}, {
"month": "July",
"percentage_allocation": "8"
}, {
"month": "August",
"percentage_allocation": "8"
}, {
"month": "September",
"percentage_allocation": "8"
}, {
"month": "October",
"percentage_allocation": "8"
}, {
"month": "November",
"percentage_allocation": "10"
}, {
"month": "December",
"percentage_allocation": "10"
}
]
}]

View File

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

View File

@@ -229,7 +229,7 @@ class OpeningInvoiceCreationTool(Document):
else:
from frappe.utils.scheduler import is_scheduler_inactive
if is_scheduler_inactive() and not frappe.flags.in_test:
if is_scheduler_inactive() and not frappe.in_test:
frappe.throw(_("Scheduler is inactive. Cannot import data."), title=_("Scheduler Inactive"))
job_id = f"opening_invoice::{self.name}"
@@ -242,7 +242,7 @@ class OpeningInvoiceCreationTool(Document):
event="opening_invoice_creation",
job_id=job_id,
invoices=invoices,
now=frappe.conf.developer_mode or frappe.flags.in_test,
now=frappe.conf.developer_mode or frappe.in_test,
)

View File

@@ -2,7 +2,7 @@
# See license.txt
import frappe
from frappe.tests import IntegrationTestCase, UnitTestCase
from frappe.tests import IntegrationTestCase
from erpnext.accounts.doctype.accounting_dimension.test_accounting_dimension import (
create_dimension,
@@ -15,15 +15,6 @@ from erpnext.accounts.doctype.opening_invoice_creation_tool.opening_invoice_crea
EXTRA_TEST_RECORD_DEPENDENCIES = ["Customer", "Supplier", "Accounting Dimension"]
class UnitTestOpeningInvoiceCreationTool(UnitTestCase):
"""
Unit tests for OpeningInvoiceCreationTool.
Use this class for testing individual functions and methods.
"""
pass
class TestOpeningInvoiceCreationTool(IntegrationTestCase):
@classmethod
def setUpClass(cls):

View File

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

View File

@@ -273,6 +273,7 @@ frappe.ui.form.on("Payment Entry", {
frm.events.hide_unhide_fields(frm);
frm.events.set_dynamic_labels(frm);
erpnext.accounts.dimensions.update_dimension(frm, frm.doctype);
erpnext.utils.set_letter_head(frm);
},
contact_person: function (frm) {
@@ -410,7 +411,7 @@ frappe.ui.form.on("Payment Entry", {
from_date: frm.doc.posting_date,
to_date: moment(frm.doc.modified).format("YYYY-MM-DD"),
company: frm.doc.company,
group_by: "",
categorize_by: "",
show_cancelled_entries: frm.doc.docstatus === 2,
};
frappe.set_route("query-report", "General Ledger");

View File

@@ -21,7 +21,6 @@
"party_name",
"book_advance_payments_in_separate_party_account",
"reconcile_on_advance_payment_date",
"advance_reconciliation_takes_effect_on",
"column_break_11",
"bank_account",
"party_bank_account",
@@ -754,18 +753,9 @@
"options": "No\nYes",
"print_hide": 1,
"search_index": 1
},
{
"default": "Oldest Of Invoice Or Advance",
"fetch_from": "company.reconciliation_takes_effect_on",
"fieldname": "advance_reconciliation_takes_effect_on",
"fieldtype": "Select",
"hidden": 1,
"label": "Advance Reconciliation Takes Effect On",
"no_copy": 1,
"options": "Advance Payment Date\nOldest Of Invoice Or Advance\nReconciliation Date"
}
],
"grid_page_length": 50,
"index_web_pages_for_search": 1,
"is_submittable": 1,
"links": [
@@ -777,7 +767,7 @@
"table_fieldname": "payment_entries"
}
],
"modified": "2025-03-24 16:18:19.920701",
"modified": "2025-05-08 11:18:10.238085",
"modified_by": "Administrator",
"module": "Accounts",
"name": "Payment Entry",
@@ -817,6 +807,7 @@
"write": 1
}
],
"row_format": "Dynamic",
"show_name_in_global_search": 1,
"sort_field": "creation",
"sort_order": "DESC",

View File

@@ -46,8 +46,9 @@ from erpnext.accounts.party import (
from erpnext.accounts.utils import (
cancel_exchange_gain_loss_journal,
get_account_currency,
get_balance_on,
get_advance_payment_doctypes,
get_outstanding_invoices,
get_reconciliation_effect_date,
)
from erpnext.controllers.accounts_controller import (
AccountsController,
@@ -80,9 +81,6 @@ class PaymentEntry(AccountsController):
PaymentEntryReference,
)
advance_reconciliation_takes_effect_on: DF.Literal[
"Advance Payment Date", "Oldest Of Invoice Or Advance", "Reconciliation Date"
]
amended_from: DF.Link | None
apply_tax_withholding_amount: DF.Check
auto_repeat: DF.Link | None
@@ -201,12 +199,10 @@ class PaymentEntry(AccountsController):
def on_submit(self):
if self.difference_amount:
frappe.throw(_("Difference Amount must be zero"))
self.update_payment_requests()
self.update_payment_schedule()
self.make_gl_entries()
self.update_outstanding_amounts()
self.update_payment_schedule()
self.update_payment_requests()
self.make_advance_payment_ledger_entries()
self.update_advance_paid() # advance_paid_status depends on the payment request amount
self.set_status()
def validate_for_repost(self):
@@ -306,13 +302,11 @@ class PaymentEntry(AccountsController):
"Advance Payment Ledger Entry",
)
super().on_cancel()
self.update_payment_requests(cancel=True)
self.update_payment_schedule(cancel=1)
self.make_gl_entries(cancel=1)
self.update_outstanding_amounts()
self.delink_advance_entry_references()
self.update_payment_schedule(cancel=1)
self.update_payment_requests(cancel=True)
self.make_advance_payment_ledger_entries()
self.update_advance_paid() # advance_paid_status depends on the payment request amount
self.set_status()
def update_payment_requests(self, cancel=False):
@@ -502,7 +496,7 @@ class PaymentEntry(AccountsController):
def delink_advance_entry_references(self):
for reference in self.references:
if reference.reference_doctype in ("Sales Invoice", "Purchase Invoice"):
doc = frappe.get_doc(reference.reference_doctype, reference.reference_name)
doc = frappe.get_lazy_doc(reference.reference_doctype, reference.reference_name)
doc.delink_advance_entries(self.name)
def set_missing_values(self):
@@ -643,7 +637,7 @@ class PaymentEntry(AccountsController):
def validate_mandatory(self):
for field in ("paid_amount", "received_amount", "source_exchange_rate", "target_exchange_rate"):
if not self.get(field):
frappe.throw(_("{0} is mandatory").format(self.meta.get_label(field)))
frappe.throw(_("{0} is mandatory").format(_(self.meta.get_label(field))))
def validate_reference_documents(self):
valid_reference_doctypes = self.get_valid_reference_doctypes()
@@ -665,7 +659,7 @@ class PaymentEntry(AccountsController):
if not frappe.db.exists(d.reference_doctype, d.reference_name):
frappe.throw(_("{0} {1} does not exist").format(d.reference_doctype, d.reference_name))
ref_doc = frappe.get_doc(d.reference_doctype, d.reference_name)
ref_doc = frappe.get_lazy_doc(d.reference_doctype, d.reference_name)
if d.reference_doctype != "Journal Entry":
if self.party != ref_doc.get(scrub(self.party_type)):
@@ -1103,10 +1097,7 @@ class PaymentEntry(AccountsController):
def calculate_base_allocated_amount_for_reference(self, d) -> float:
base_allocated_amount = 0
advance_payment_doctypes = frappe.get_hooks("advance_payment_receivable_doctypes") + frappe.get_hooks(
"advance_payment_payable_doctypes"
)
if d.reference_doctype in advance_payment_doctypes:
if d.reference_doctype in get_advance_payment_doctypes():
# When referencing Sales/Purchase Order, use the source/target exchange rate depending on payment type.
# This is so there are no Exchange Gain/Loss generated for such doctypes
@@ -1388,10 +1379,7 @@ class PaymentEntry(AccountsController):
if not self.party_account:
return
advance_payment_doctypes = frappe.get_hooks("advance_payment_receivable_doctypes") + frappe.get_hooks(
"advance_payment_payable_doctypes"
)
advance_payment_doctypes = get_advance_payment_doctypes()
if self.payment_type == "Receive":
against_account = self.paid_to
else:
@@ -1447,23 +1435,27 @@ class PaymentEntry(AccountsController):
dr_or_cr + "_in_transaction_currency": d.allocated_amount
if self.transaction_currency == self.party_account_currency
else allocated_amount_in_company_currency / self.transaction_exchange_rate,
"advance_voucher_type": d.advance_voucher_type,
"advance_voucher_no": d.advance_voucher_no,
},
item=self,
)
)
if self.book_advance_payments_in_separate_party_account:
if d.reference_doctype in advance_payment_doctypes:
# Upon reconciliation, whole ledger will be reposted. So, reference to SO/PO is fine
gle.update(
{
"against_voucher_type": d.reference_doctype,
"against_voucher": d.reference_name,
}
)
else:
# Do not reference Invoices while Advance is in separate party account
gle.update({"against_voucher_type": self.doctype, "against_voucher": self.name})
if d.reference_doctype in advance_payment_doctypes:
# advance reference
gle.update(
{
"against_voucher_type": self.doctype,
"against_voucher": self.name,
"advance_voucher_type": d.reference_doctype,
"advance_voucher_no": d.reference_name,
}
)
elif self.book_advance_payments_in_separate_party_account:
# Do not reference Invoices while Advance is in separate party account
gle.update({"against_voucher_type": self.doctype, "against_voucher": self.name})
else:
gle.update(
{
@@ -1568,26 +1560,14 @@ class PaymentEntry(AccountsController):
"voucher_no": self.name,
"voucher_detail_no": invoice.name,
}
if invoice.reconcile_effect_on:
posting_date = invoice.reconcile_effect_on
else:
# For backwards compatibility
# Supporting reposting on payment entries reconciled before select field introduction
if self.advance_reconciliation_takes_effect_on == "Advance Payment Date":
posting_date = self.posting_date
elif self.advance_reconciliation_takes_effect_on == "Oldest Of Invoice Or Advance":
date_field = "posting_date"
if invoice.reference_doctype in ["Sales Order", "Purchase Order"]:
date_field = "transaction_date"
posting_date = frappe.db.get_value(
invoice.reference_doctype, invoice.reference_name, date_field
)
if getdate(posting_date) < getdate(self.posting_date):
posting_date = self.posting_date
elif self.advance_reconciliation_takes_effect_on == "Reconciliation Date":
posting_date = nowdate()
posting_date = get_reconciliation_effect_date(
invoice.reference_doctype, invoice.reference_name, self.company, self.posting_date
)
frappe.db.set_value("Payment Entry Reference", invoice.name, "reconcile_effect_on", posting_date)
dr_or_cr, account = self.get_dr_and_account_for_advances(invoice)
@@ -1605,6 +1585,8 @@ class PaymentEntry(AccountsController):
{
"against_voucher_type": invoice.reference_doctype,
"against_voucher": invoice.reference_name,
"advance_voucher_type": invoice.advance_voucher_type,
"advance_voucher_no": invoice.advance_voucher_no,
"posting_date": posting_date,
}
)
@@ -1629,6 +1611,8 @@ class PaymentEntry(AccountsController):
{
"against_voucher_type": "Payment Entry",
"against_voucher": self.name,
"advance_voucher_type": invoice.advance_voucher_type,
"advance_voucher_no": invoice.advance_voucher_no,
}
)
gle = self.get_gl_dict(
@@ -1777,19 +1761,6 @@ class PaymentEntry(AccountsController):
return flt(gl_dict.get(field, 0) / (conversion_rate or 1))
def update_advance_paid(self):
if self.payment_type not in ("Receive", "Pay") or not self.party:
return
advance_payment_doctypes = frappe.get_hooks("advance_payment_receivable_doctypes") + frappe.get_hooks(
"advance_payment_payable_doctypes"
)
for d in self.get("references"):
if d.allocated_amount and d.reference_doctype in advance_payment_doctypes:
frappe.get_doc(
d.reference_doctype, d.reference_name, for_update=True
).set_total_advance_paid()
def on_recurring(self, reference_doc, auto_repeat_doc):
self.reference_no = reference_doc.name
self.reference_date = nowdate()
@@ -2081,7 +2052,7 @@ class PaymentEntry(AccountsController):
# Re allocate amount to those references which have PR set (Higher priority)
for ref in self.references:
if not ref.payment_request:
if not (ref.reference_doctype and ref.reference_name and ref.payment_request):
continue
# fetch outstanding_amount of `Reference` (Payment Term) and `Payment Request` to allocate new amount
@@ -2132,7 +2103,7 @@ class PaymentEntry(AccountsController):
)
# Re allocate amount to those references which have no PR (Lower priority)
for ref in self.references:
if ref.payment_request:
if ref.payment_request or not (ref.reference_doctype and ref.reference_name):
continue
key = (ref.reference_doctype, ref.reference_name, ref.get("payment_term"))
@@ -2448,7 +2419,7 @@ def get_outstanding_reference_documents(args, validate=False):
accounts = get_party_account(
args.get("party_type"), args.get("party"), args.get("company"), include_advance=True
)
advance_account = accounts[1] if len(accounts) >= 1 else None
advance_account = accounts[1] if len(accounts) > 1 else None
if party_account == advance_account:
party_account = accounts[0]
@@ -2786,7 +2757,6 @@ def get_party_details(company, party_type, party, date, cost_center=None):
party_account = get_party_account(party_type, party, company)
account_currency = get_account_currency(party_account)
account_balance = get_balance_on(party_account, date, cost_center=cost_center)
_party_name = "title" if party_type == "Shareholder" else party_type.lower() + "_name"
party_name = frappe.db.get_value(party_type, party, _party_name)
@@ -2798,7 +2768,6 @@ def get_party_details(company, party_type, party, date, cost_center=None):
"party_account": party_account,
"party_name": party_name,
"party_account_currency": account_currency,
"account_balance": account_balance,
"party_bank_account": party_bank_account,
"bank_account": bank_account,
}
@@ -2816,12 +2785,9 @@ def get_account_details(account, date, cost_center=None):
if not account_list:
frappe.throw(_("Account: {0} is not permitted under Payment Entry").format(account))
account_balance = get_balance_on(account, date, cost_center=cost_center, ignore_account_permission=True)
return frappe._dict(
{
"account_currency": get_account_currency(account),
"account_balance": account_balance,
"account_type": frappe.get_cached_value("Account", account, "account_type"),
}
)
@@ -2871,7 +2837,7 @@ def get_reference_details(
):
total_amount = outstanding_amount = exchange_rate = account = None
ref_doc = frappe.get_doc(reference_doctype, reference_name)
ref_doc = frappe.get_lazy_doc(reference_doctype, reference_name)
company_currency = ref_doc.get("company_currency") or erpnext.get_company_currency(ref_doc.company)
# Only applies for Reverse Payment Entries
@@ -2966,11 +2932,10 @@ def get_payment_entry(
party_type=None,
payment_type=None,
reference_date=None,
ignore_permissions=False,
created_from_payment_request=False,
):
doc = frappe.get_doc(dt, dn)
over_billing_allowance = frappe.db.get_single_value("Accounts Settings", "over_billing_allowance")
over_billing_allowance = frappe.get_single_value("Accounts Settings", "over_billing_allowance")
if dt in ("Sales Order", "Purchase Order") and flt(doc.per_billed, 2) >= (100.0 + over_billing_allowance):
frappe.throw(_("Can only make payment against unbilled {0}").format(_(dt)))
@@ -2988,14 +2953,14 @@ def get_payment_entry(
)
# bank or cash
bank = get_bank_cash_account(doc, bank_account, ignore_permissions=ignore_permissions)
bank = get_bank_cash_account(doc, bank_account)
# if default bank or cash account is not set in company master and party has default company bank account, fetch it
if party_type in ["Customer", "Supplier"] and not bank:
party_bank_account = get_party_bank_account(party_type, doc.get(scrub(party_type)))
if party_bank_account:
account = frappe.db.get_value("Bank Account", party_bank_account, "account")
bank = get_bank_cash_account(doc, account, ignore_permissions=ignore_permissions)
bank = get_bank_cash_account(doc, account)
paid_amount, received_amount = set_paid_amount_and_received_amount(
dt, party_account_currency, bank, outstanding_amount, payment_type, bank_amount, doc
@@ -3025,6 +2990,8 @@ def get_payment_entry(
party_account_currency if payment_type == "Receive" else bank.account_currency
)
pe.paid_to_account_currency = party_account_currency if payment_type == "Pay" else bank.account_currency
pe.paid_from_account_type = frappe.db.get_value("Account", pe.paid_from, "account_type")
pe.paid_to_account_type = frappe.db.get_value("Account", pe.paid_to, "account_type")
pe.paid_amount = paid_amount
pe.received_amount = received_amount
pe.letter_head = doc.get("letter_head")
@@ -3108,7 +3075,7 @@ def get_payment_entry(
if party_account and bank:
if discount_amount:
base_total_discount_loss = 0
if frappe.db.get_single_value("Accounts Settings", "book_tax_discount_loss"):
if frappe.get_single_value("Accounts Settings", "book_tax_discount_loss"):
base_total_discount_loss = split_early_payment_discount_loss(pe, doc, valid_discounts)
set_pending_discount_loss(
@@ -3304,18 +3271,22 @@ def update_accounting_dimensions(pe, doc):
pe.set(dimension, doc.get(dimension))
def get_bank_cash_account(doc, bank_account, ignore_permissions=False):
def get_bank_cash_account(doc, bank_account):
bank = get_default_bank_cash_account(
doc.company,
"Bank",
mode_of_payment=doc.get("mode_of_payment"),
account=bank_account,
ignore_permissions=ignore_permissions,
fetch_balance=False,
)
if not bank:
bank = get_default_bank_cash_account(
doc.company, "Cash", mode_of_payment=doc.get("mode_of_payment"), account=bank_account
doc.company,
"Cash",
mode_of_payment=doc.get("mode_of_payment"),
account=bank_account,
fetch_balance=False,
)
return bank
@@ -3388,26 +3359,25 @@ def set_paid_amount_and_received_amount(
if party_account_currency == bank.account_currency:
paid_amount = received_amount = abs(outstanding_amount)
else:
company_currency = frappe.get_cached_value("Company", doc.get("company"), "default_currency")
if payment_type == "Receive":
paid_amount = abs(outstanding_amount)
if bank_amount:
received_amount = bank_amount
else:
if bank and company_currency != bank.account_currency:
received_amount = paid_amount / doc.get("conversion_rate", 1)
else:
received_amount = paid_amount * doc.get("conversion_rate", 1)
# settings if it is for receive
paid_amount = abs(outstanding_amount)
if bank_amount:
received_amount = bank_amount
else:
received_amount = abs(outstanding_amount)
if bank_amount:
paid_amount = bank_amount
company_currency = frappe.get_cached_value("Company", doc.get("company"), "default_currency")
if bank and company_currency != bank.account_currency:
# doc currency can be different from bank currency
posting_date = doc.get("posting_date") or doc.get("transaction_date")
conversion_rate = get_exchange_rate(
bank.account_currency, party_account_currency, posting_date
)
received_amount = paid_amount / conversion_rate
else:
if bank and company_currency != bank.account_currency:
paid_amount = received_amount / doc.get("conversion_rate", 1)
else:
# if party account currency and bank currency is different then populate paid amount as well
paid_amount = received_amount * doc.get("conversion_rate", 1)
received_amount = paid_amount * doc.get("conversion_rate", 1)
# if payment type is pay, then paid amount and received amount are swapped
if payment_type == "Pay":
paid_amount, received_amount = received_amount, paid_amount
return paid_amount, received_amount
@@ -3464,7 +3434,7 @@ def set_pending_discount_loss(pe, doc, discount_amount, base_total_discount_loss
# If tax loss booking is enabled, pending loss will be rounding loss.
# Otherwise it will be the total discount loss.
book_tax_loss = frappe.db.get_single_value("Accounts Settings", "book_tax_discount_loss")
book_tax_loss = frappe.get_single_value("Accounts Settings", "book_tax_discount_loss")
account_type = "round_off_account" if book_tax_loss else "default_discount_account"
pe.append(

View File

@@ -4,7 +4,7 @@
import frappe
from frappe import qb
from frappe.tests import IntegrationTestCase, UnitTestCase
from frappe.tests import IntegrationTestCase
from frappe.utils import add_days, flt, nowdate
from erpnext.accounts.doctype.account.test_account import create_account
@@ -28,15 +28,6 @@ from erpnext.setup.doctype.employee.test_employee import make_employee
EXTRA_TEST_RECORD_DEPENDENCIES = ["Item", "Currency Exchange"]
class UnitTestPaymentEntry(UnitTestCase):
"""
Unit tests for PaymentEntry.
Use this class for testing individual functions and methods.
"""
pass
class TestPaymentEntry(IntegrationTestCase):
def tearDown(self):
frappe.db.rollback()
@@ -61,7 +52,7 @@ class TestPaymentEntry(IntegrationTestCase):
self.assertEqual(pe.paid_to_account_type, "Cash")
expected_gle = dict(
(d[0], d) for d in [["Debtors - _TC", 0, 1000, so.name], ["_Test Cash - _TC", 1000.0, 0, None]]
(d[0], d) for d in [["Debtors - _TC", 0, 1000, pe.name], ["_Test Cash - _TC", 1000.0, 0, None]]
)
self.validate_gl_entries(pe.name, expected_gle)
@@ -93,7 +84,7 @@ class TestPaymentEntry(IntegrationTestCase):
expected_gle = dict(
(d[0], d)
for d in [["_Test Receivable USD - _TC", 0, 5500, so.name], [pe.paid_to, 5500.0, 0, None]]
for d in [["_Test Receivable USD - _TC", 0, 5500, pe.name], [pe.paid_to, 5500.0, 0, None]]
)
self.validate_gl_entries(pe.name, expected_gle)

View File

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

View File

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

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