Compare commits

..

1731 Commits

Author SHA1 Message Date
frappe-pr-bot
945b390d25 chore: update POT file 2025-07-27 09:38:10 +00:00
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
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
Shreyas Sojitra
27e5344188 fix: create job card for selected operations only 2025-07-24 10:05:03 +00:00
Kitti U. @ Ecosoft
ed79adebc4 refactor: call hooks after gle & sle rename (#48706) 2025-07-23 11:18:06 +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
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
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
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
Mihir Kandoi
4174269091 fix: job card linter error (#47561) 2025-07-18 14:51:41 +00:00
ravibharathi656
cf6913891a fix: set delivery date if missing 2025-07-18 18:37:29 +05:30
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
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
diptanilsaha
98eb115746 fix: view ledger button of company on chart of accounts 2025-07-18 15:28:57 +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
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
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
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
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
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
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
rohitwaghchaure
a599632f8a Merge pull request #47186 from rohitwaghchaure/fixed-github-47112
fix: disabled UOM showing in the list
2025-04-21 22:12:26 +05:30
Rohit Waghchaure
3745825052 fix: disbaled UOM showing in the list 2025-04-21 21:24:58 +05:30
rohitwaghchaure
5835502937 Merge pull request #47144 from rohitwaghchaure/fixed-bin-recalculate-qty
fix: provision to recalculate the qty in the Bin
2025-04-21 21:18:07 +05:30
Frappe PR Bot
c7e5442565 fix: sync translations from crowdin (#47163) 2025-04-21 17:26:25 +02:00
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
Diptanil Saha
f3838c0b61 Merge pull request #47182 from diptanilsaha/fix-pos-item-selector-cart-ui
fix: pos item selector cart ui
2025-04-21 18:30:35 +05:30
diptanilsaha
83cf17f07c fix: row gap in item details form 2025-04-21 18:16:45 +05:30
diptanilsaha
52d73de6b6 fix: cart item toggle highlight 2025-04-21 17:57:40 +05:30
ljain112
a31075692c fix: set default company address in Sales Doctype on change of company 2025-04-21 17:38:34 +05:30
ruthra kumar
c5db4ca43a Merge pull request #47179 from frappe/broken_markdown
chore: broken markdown
2025-04-21 17:01:15 +05:30
ruthra kumar
9244ecdaff chore: broken markdown 2025-04-21 16:59:33 +05:30
ruthra kumar
21df80b750 Merge pull request #47106 from yashhhYB/yashhhYB-patch-1
docs(readme): add Frappe School badge for learning ERPNext
2025-04-21 16:41:25 +05:30
Yash Bodade
911c7b969c docs(readme): add Frappe School badge for learning ERPNext
This PR adds a badge linking to [Frappe School](https://frappe.school) to promote learning resources directly from the README. It helps newcomers discover structured tutorials and improves onboarding.

### Changes Made

- Added a Frappe School badge below the title in `README.md`

### Screenshot

[![Learn on Frappe School](https://img.shields.io/badge/Frappe%20School-Learn%20ERPNext-blue?style=flat-square)](https://frappe.school)

---
2025-04-21 16:39:55 +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
diptanilsaha
e035120f41 fix: item with no image 2025-04-21 16:17:24 +05:30
ruthra kumar
a7bf999a4f Merge pull request #47019 from Z4nzu/fix_italy_localization
fix(italy): Add tax-related custom fields to POS Invoice Item
2025-04-21 16:08:47 +05:30
ruthra kumar
b9fc173a98 Merge pull request #47067 from ljain112/fix-error-message
fix: correct error message in validate_internal_transfer_qty
2025-04-21 15:57:56 +05:30
diptanilsaha
374da68829 fix: added gap in item details form 2025-04-21 15:53:29 +05:30
diptanilsaha
3e9fc558a8 fix: item images on pos 2025-04-21 15:43:15 +05:30
ljain112
91d7bc55be fix: respect field "ignore_user_permissions" property in employee query 2025-04-21 14:21:56 +05:30
Diptanil Saha
cb2ad4acdb fix: update country wise fiscal year (#47141) 2025-04-21 14:19:24 +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
Diptanil Saha
f52cbf6165 fix: pos disable customer selection at payment (#47169) 2025-04-21 11:53:03 +05:30
Ankush Menat
8b602c4608 chore: translations link (#47168) 2025-04-21 05:54:34 +00:00
Frappe PR Bot
32d5597d23 chore: update POT file (#47165) 2025-04-20 13:45:26 +02:00
Frappe PR Bot
d19b197524 fix: sync translations from crowdin (#47139)
* fix: Chinese Simplified translations

* fix: Thai translations

* fix: Portuguese translations
2025-04-19 21:42:26 +02:00
Rohit Waghchaure
36081413d8 fix: provision to recalculate the qty in the Bin 2025-04-19 16:26:57 +05:30
Sagar Vora
5741458c94 fix: get total without rounding off tax amounts for distributing discount 2025-04-19 14:14:58 +05:30
Sagar Vora
eac96cb186 Merge pull request #47154 from sagarvora/fix-dimension-copying 2025-04-19 12:51:08 +05:30
Sagar Vora
7dbe27da19 fix: respect mapped accounting dimensions 2025-04-19 11:16:48 +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
Raffael Meyer
baa0c8bd5f chore: migrate pre-commit config (#47132) 2025-04-17 11:59:48 +00:00
Raffael Meyer
e945b4cc06 fix: create default warehouse (#47125) 2025-04-17 13:17:02 +02:00
Karm Soni
d12998e524 feat: add display dispatch address when dispatch address is selected 2025-04-17 16:32:59 +05:30
ruthra kumar
048997f809 Merge pull request #47118 from aerele/tb-group-by-account
fix: add group by after user permission condition
2025-04-17 16:05:19 +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
Frappe PR Bot
e5eafc49ee fix: sync translations from crowdin (#47035) 2025-04-17 11:41:55 +02:00
venkat102
756d496235 fix: add group by after user permission condition 2025-04-17 00:12:43 +05:30
rohitwaghchaure
5d35e31281 Merge pull request #46944 from rohitwaghchaure/fixed-production=plan-lables
fix: production plan label description
2025-04-16 23:17:55 +05:30
Rohit Waghchaure
2de61e955a fix: production plan label description 2025-04-16 23:03:58 +05:30
rohitwaghchaure
659119adc2 Merge pull request #47050 from mihir-kandoi/st35798
fix: consider per_ordered instead of per_billed when creating PO from MR
2025-04-16 16:28:00 +05:30
sokumon
8da5752059 fix: convert to text before setting value 2025-04-16 11:03:22 +05:30
Shariq Ansari
f4c4a0cc0f Merge pull request #47108 from shariquerik/revert-disable-customer 2025-04-16 10:21:06 +05:30
Shariq Ansari
fc16199a49 revert: disable customer if creating from opportunity 2025-04-16 10:18:29 +05:30
ruthra kumar
0b22f87db9 Merge pull request #46770 from ljain112/fix-dunnig
fix: correct outstanding amount for invoice in dunning
2025-04-15 17:50:25 +05:30
ruthra kumar
7728126b1f Merge pull request #46996 from Sanket322/contact_adress_in_add_column
fix: Allow adding Address/Contact fields to `Address And Contacts` report
2025-04-15 17:45:27 +05:30
rohitwaghchaure
88b5d40202 Merge pull request #46973 from rtdany10/reservation-precision
fix: precision issue on qty_to_be_reserved
2025-04-15 17:36:39 +05:30
ruthra kumar
67600b76e8 Merge pull request #47001 from aerele/inter-company-order-echange-rate
fix: fetch exchange rate while creating inter-company order and invoice
2025-04-15 17:35:58 +05:30
ruthra kumar
39174f9dc0 chore: translatable labels 2025-04-15 17:32:46 +05:30
Marica
445263bb85 Merge pull request #47007 from HUMENTH/patch-2
chore: Fix typo "Item Wise Tax Detail "
2025-04-15 17:01:04 +05:30
Khushi Rawat
e41720f1a3 fix: enabled allow on submit for asset name field (#47093) 2025-04-15 16:59:16 +05:30
marination
be556167b1 fix: Modify .json from desk to change modified 2025-04-15 13:15:50 +02:00
Marica
bbe641fd77 Merge branch 'develop' into unit-price-contract-2 2025-04-15 16:11:14 +05:30
ruthra kumar
573809cece Merge pull request #46951 from cogk/fix-use-party_name-instead-of-customer-in-set_query-of-quotation-items
fix: Use `party_name` instead of `customer` in `set_query` of Quotation items
2025-04-15 15:45:27 +05:30
ruthra kumar
a2b326a988 Merge pull request #46640 from ljain112/fix-ledger-summary
perf: refactored customer ledger summary for performance
2025-04-15 11:52:15 +05:30
ruthra kumar
eb1b401653 Merge pull request #46789 from aerele/order-tax-table
fix: map tax table while creating purchase order from sales order
2025-04-15 11:41:15 +05:30
ruthra kumar
71f0f7a0b5 test: basic supplier ledger summary 2025-04-15 11:37:59 +05:30
ruthra kumar
9a3a80dfd3 test: basic output of customer ledger summary report 2025-04-15 11:37:57 +05:30
ljain112
3b613c44a6 chore: added test for Fetch Overdue Payments in dunning 2025-04-15 11:36:19 +05:30
ruthra kumar
9bae57e2b4 Merge pull request #46754 from muruthigitau/create-payment-gateway-account
feat: add optional company parameter to create_payment_gateway_account
2025-04-15 11:07:49 +05:30
muruthigitau
6608735006 refactor: optional company param to create_payment_gateway_account 2025-04-15 10:55:26 +05:30
Raffael Meyer
fb9cb779f4 test(Payment Entry): account type is set (#47071) 2025-04-14 19:06:25 +02:00
Raffael Meyer
a854beeb40 fix(Payment Entry): set account type if missing (#47069) 2025-04-14 18:32:19 +02:00
ljain112
5063f1174e fix: correct error message in validate_internal_transfer_qty 2025-04-14 19:06:22 +05:30
rohitwaghchaure
e3f1677786 Merge pull request #47057 from rohitwaghchaure/fixed-github-46675
fix: not able to complete work order with reserved qty
2025-04-14 18:08:52 +05:30
rohitwaghchaure
083a666188 Merge pull request #47058 from rohitwaghchaure/fixed-support-36030
fix: consider negative stock qty in stock reconciliation
2025-04-14 18:08:30 +05:30
ruthra kumar
95686fc255 Merge pull request #46782 from iamkhanraheel/fix-customer-payment-autofetch
fix: fetch customer related data in making payment entry from customer
2025-04-14 17:32:49 +05:30
Rohit Waghchaure
15272d0e56 fix: consider negative stock qty in stock reco 2025-04-14 14:37:04 +05:30
Rohit Waghchaure
27d674d54a fix: not able to complete work order with reserved qty 2025-04-14 14:33:51 +05:30
ruthra kumar
46783c1377 Merge pull request #47049 from frappe/revert-46900-fix-against-voucher
Revert "fix: remove against_voucher and against_voucher_type column from General Ledger Report"
2025-04-14 13:18:36 +05:30
ruthra kumar
adb331ef71 fix: revert #46900 - against_voucher filter in general ledger 2025-04-14 13:01:40 +05:30
Mihir Kandoi
5a524854de fix: consider per_ordered instead of per_billed when creating PO from MR 2025-04-14 12:36:59 +05:30
rohitwaghchaure
61a3e01bd3 Merge pull request #46620 from mihir-kandoi/46618
fix: add fetch from to currency and set default to empty in item price
2025-04-14 12:13:07 +05:30
rohitwaghchaure
ea917f946c Merge pull request #46938 from mihir-kandoi/st35392
fix: group sub assemblies in production plan
2025-04-14 12:10:36 +05:30
Mihir Kandoi
8df18762a9 fix: test cases error 2025-04-14 11:09:45 +05:30
Sagar Vora
205443a9e0 Merge pull request #47016 from barredterra/employee-user-perms 2025-04-14 10:27:19 +05:30
Deepesh Garg
acfa2465df Merge pull request #47043 from deepeshgarg007/trial_balance_memory
fix: Group GLs by account for TB generation
2025-04-13 19:26:29 +05:30
barredterra
08f21c7905 fix: remove hook that does nothing 2025-04-13 15:29:38 +02:00
Deepesh Garg
f894c6d275 fix: Group GLs by account for TB generation 2025-04-13 18:53:11 +05:30
sokumon
6d93c3adad fix: remove energy points patch 2025-04-13 17:12:29 +05:30
Frappe PR Bot
eff2f34048 chore: update POT file (#47042) 2025-04-13 12:35:01 +02:00
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
ruthra kumar
8ef31c8fc0 Merge pull request #47012 from ljain112/fix-pur-resigister-item
fix: correct doctype in item_wise_purchase register
2025-04-12 07:10:32 +05:30
rohitwaghchaure
b4be1503e3 Merge pull request #47026 from rohitwaghchaure/fixed-removed-unused-code
fix: batchwise valuation for MA item
2025-04-11 21:56:30 +05:30
Rohit Waghchaure
504b8c0a68 fix: batchwise valuation for MA item 2025-04-11 21:20:05 +05:30
Frappe PR Bot
78583ac632 fix: sync translations from crowdin (#47009) 2025-04-11 16:41:50 +02:00
rohitwaghchaure
dc8616d2ab Merge pull request #47022 from rohitwaghchaure/fixed-condition-for-use_batchwise_valuation
fix: condition for use_batchwise_valuation
2025-04-11 19:34:45 +05:30
Mihir Kandoi
a7394329ca fix: test cases 2025-04-11 19:30:35 +05:30
Rohit Waghchaure
cc171d9706 fix: condition for use_batchwise_valuation 2025-04-11 19:17:47 +05:30
rohitwaghchaure
e2a7856a44 Merge pull request #47020 from rohitwaghchaure/fixed-display-depends-on
fix: removed display depends on
2025-04-11 19:14:57 +05:30
Rohit Waghchaure
e0bf45e03b fix: removed display depends on 2025-04-11 18:58:09 +05:30
Hardik Zinzuvadiya
02bb63a5f7 fix(italy): Add missing tax fields to POS Invoice Item 2025-04-11 12:57:25 +00:00
rohitwaghchaure
890040db86 Merge pull request #47015 from rohitwaghchaure/fixed-support-35994-1
fix: allow to use batch-wise valuation for moving average items
2025-04-11 17:07:20 +05:30
Rohit Waghchaure
65ba79bb85 fix: allow to use batchwise valuation for moving average items 2025-04-11 16:48:41 +05:30
barredterra
046bcfa606 fix(Employee): add/delete user permission 2025-04-11 13:14:52 +02:00
Mihir Kandoi
f071255340 fix: logic and added test case 2025-04-11 16:22:28 +05:30
ljain112
b8b8dce733 fix: correct doctype in item_wise_purchase register 2025-04-11 15:06:03 +05:30
sokumon
e3af7f639d fix: remove default energy points from erpnext 2025-04-11 14:03:53 +05:30
Himanshu Shivhare
9624d56abd chore: Fix typo "Item Wise Tax Detail " 2025-04-10 23:18:43 +05:30
rohitwaghchaure
4abc39ef62 Merge pull request #46997 from rohitwaghchaure/fixed-support-35003
fix: update the modified date in for SLEs and GLs after rename
2025-04-10 17:39:35 +05:30
rohitwaghchaure
8b0fd7b00f Merge pull request #47002 from rohitwaghchaure/fixed-support-34140
feat: Allow to Make Quality Inspection after Purchase / Delivery
2025-04-10 17:39:04 +05:30
Rohit Waghchaure
8eaa2afeb7 feat: Allow to Make Quality Inspection after Purchase / Delivery 2025-04-10 16:28:23 +05:30
venkat102
145a6c5e2a fix: fetch exchange rate while creating inter-company order and invoice 2025-04-10 16:07:20 +05:30
Rohit Waghchaure
dc5a5ef258 fix: update the modified date in for SLEs and GLs after rename 2025-04-10 15:53:06 +05:30
Sanket322
d9ca7e755f fix: add Address and Contact in Add Column 2025-04-10 13:03:11 +05:30
rohitwaghchaure
511a01c26c Merge pull request #46965 from rohitwaghchaure/fixed-reposting-error-recreate-ledgers
fix: Recreate Stock Ledgers issue
2025-04-10 11:42:51 +05:30
rohitwaghchaure
2ef8b581cd Merge pull request #46978 from rohitwaghchaure/fixed-support-32497
fix: bypass validation during reposting
2025-04-10 11:42:20 +05:30
Rohit Waghchaure
3697b9fd9b fix: bypass validation during reposting 2025-04-10 11:26:44 +05:30
Sanket322
54385dde24 fix: changed postalcode order and correct the condition for party_name 2025-04-10 01:15:27 +05:30
Frappe PR Bot
8383c826c3 Merge pull request #46963 from frappe/l10n_develop
fix: sync translations from crowdin
2025-04-09 16:47:24 +02:00
Karm Soni
54b5205221 feat: add dispatch address fields to purchase doctypes 2025-04-09 19:19:47 +05:30
Dany Robert
860699ee7b fix: precision issue on qty_to_be_reserved 2025-04-09 18:39:36 +05:30
rohitwaghchaure
358e3581c2 Merge pull request #46972 from rtdany10/reservation-precision
fix: precision loss causing reservation error
2025-04-09 18:09:37 +05:30
Dany Robert
e3c0dbe79f fix: precision loss causing reservation error 2025-04-09 17:38:00 +05:30
Diptanil Saha
67fcc172d7 Merge pull request #46964 from diptanilsaha/pos-profile-add-project-field
fix: added missing project field on pos profile
2025-04-09 15:34:26 +05:30
Marica
2fee4958d7 Merge pull request #46933 from rohitwaghchaure/fixed-support-32029
fix: item code not showing in the error message
2025-04-09 15:32:21 +05:30
Rohit Waghchaure
229a4cef45 fix: Recreate Stock Ledgers issue 2025-04-09 12:37:02 +05:30
diptanilsaha
821d64241a fix: added missing project field on pos profile 2025-04-09 11:37:51 +05:30
Raffael Meyer
147852a5af Merge pull request #46959 from barredterra/refactor-due-date
fix: interaction with due date / payment terms / payment schedule
2025-04-08 21:00:41 +02:00
barredterra
c00f62d54a chore: add context 2025-04-08 20:54:52 +02:00
barredterra
57be8a85d6 fix: clarify confirmation message 2025-04-08 20:53:29 +02:00
barredterra
8a4db69581 fix: use the actual field label 2025-04-08 20:53:04 +02:00
barredterra
c55c77f4e9 fix: recognize trigger from child table 2025-04-08 20:40:50 +02:00
barredterra
87c21a89fe refactor: use doc parameter instead of this.frm.doc 2025-04-08 20:39:14 +02:00
Corentin Forler
a16fd451ee fix: Use party_name instead of customer in Quotation set_query 2025-04-08 15:33:22 +02:00
Raffael Meyer
fa719d8695 fix: make report's "printed on" translatable (#46913)
* fix: make report's "printed on" translatable

* fix: go for lower case "on" because we already have translations for that

* fix: remove redundant letter head

* fix(General Ledger): make table header translatable
2025-04-08 15:22:13 +02:00
barredterra
6dc65f1a19 fix(General Ledger): make table header translatable 2025-04-08 15:19:46 +02:00
barredterra
5837f257bc fix: remove redundant letter head 2025-04-08 15:08:40 +02:00
barredterra
b0d5642785 fix: go for lower case "on" because we already have translations for that 2025-04-08 15:01:21 +02:00
rohitwaghchaure
495428ba4e Merge pull request #46383 from mihir-kandoi/st29657-2
feat: available serial no report
2025-04-08 17:46:12 +05:30
rohitwaghchaure
984bb7c7ea Merge pull request #46942 from mihir-kandoi/st35203
fix: ignore backflush setting on subcontracting return
2025-04-08 17:44:21 +05:30
ruthra kumar
6f89f7e945 Merge pull request #46892 from mihir-kandoi/st35406
fix: use get instead of dot operator to access dict value to prevent no attribute error
2025-04-08 17:03:22 +05:30
Mihir Kandoi
7479e1ec32 fix: ignore backflush setting on subcontracting return 2025-04-08 15:10:42 +05:30
Mihir Kandoi
f58abed935 fix: group sub assemblies in production plan 2025-04-08 15:02:12 +05:30
ruthra kumar
c8d6968a66 Merge pull request #46631 from aerele/fix/update_outstanding_for_self
fix: update outstanding for self
2025-04-08 14:27:13 +05:30
rohitwaghchaure
72846dc64f Merge pull request #46171 from JK-1117/fix-reconciliation-inventory-dimension
Fix validation mismatch in inventory dimension fields
2025-04-08 14:26:25 +05:30
Rohit Waghchaure
86dee69c2f fix: item code not showing in the error message 2025-04-08 13:30:12 +05:30
ruthra kumar
ea8ab256ad Merge pull request #46626 from ljain112/fix-pr-amount
fix: correct payment request amount
2025-04-08 13:18:35 +05:30
ruthra kumar
673e3c7849 Merge pull request #46821 from ljain112/cust-query
fix: removed customer_group query in customer.js
2025-04-08 12:57:02 +05:30
Shariq Ansari
5dfc0d32d6 Merge pull request #46903 from shariquerik/restrict-customer-change
fix: restrict customer change if creating from opportunity
2025-04-08 12:06:10 +05:30
ruthra kumar
c58e7c22f5 Merge pull request #46819 from cogk/fix-fieldtype-unreconcile-dialog
fix: Fix fieldtype in UnReconcile dialog
2025-04-08 11:25:35 +05:30
ruthra kumar
b1051dadd5 Merge pull request #46709 from ljain112/user-permission
fix: user permissions in sales and purchase report
2025-04-08 11:09:54 +05:30
ruthra kumar
49822c553a Merge pull request #46804 from ljain112/fix-os-precision
fix: update outstanding with precision
2025-04-08 09:58:44 +05:30
ruthra kumar
4f758701fe Merge pull request #46917 from frappe/l10n_develop
fix: sync translations from crowdin
2025-04-08 09:55:42 +05:30
Frappe PR Bot
b5d7fe6734 fix: Persian translations 2025-04-08 08:51:17 +05:30
rohitwaghchaure
6ee6d3508a Merge pull request #46893 from rohitwaghchaure/fixed-support-35192
fix: inventory dimensions columns visibility depends on filter
2025-04-08 08:49:33 +05:30
rohitwaghchaure
903ff67a22 Merge pull request #46898 from rohitwaghchaure/fixed-support-33798-1
fix: removed hardcoded search fields to fix performance issue
2025-04-08 08:49:10 +05:30
barredterra
186d7abf0a fix: make report's "printed on" translatable 2025-04-08 02:28:46 +02:00
Diptanil Saha
6fae98afda fix: pos opening entry's status not getting updated on cancel (#46909) 2025-04-07 20:44:47 +05:30
Diptanil Saha
3de1b22480 fix: validate if pos is opened before pos invoice creation (#46907)
* fix: validate if pos is opened before pos invoice creation

* fix: added title on throw dialog

* test: fixed failing test
2025-04-07 20:33:27 +05:30
ruthra kumar
79bd731188 Merge pull request #46895 from ljain112/fix-filter-gl
fix: empty party filter on change of party type in General Ledger Report
2025-04-07 17:42:02 +05:30
Shariq Ansari
dc4819e897 fix: restrict customer change if creating from opportunity 2025-04-07 17:17:42 +05:30
ruthra kumar
274cb898ea Merge pull request #46900 from ljain112/fix-against-voucher
fix: remove against_voucher and against_voucher_type column from General Ledger Report
2025-04-07 17:10:50 +05:30
ljain112
6d1f119a0f fix: remove against_voucher from General Ledger Report 2025-04-07 16:28:52 +05:30
Frappe PR Bot
56eaa504ec fix: sync translations from crowdin (#46872)
* fix: Persian translations

* fix: French translations

* fix: Spanish translations

* fix: Arabic translations

* fix: Hungarian translations

* fix: Polish translations

* fix: Russian translations

* fix: Swedish translations

* fix: Turkish translations

* fix: Chinese Simplified translations

* fix: Persian translations

* fix: Bosnian translations

* fix: German translations

* fix: Esperanto translations

* fix: Portuguese, Brazilian translations

* fix: Thai translations

* fix: Croatian translations
2025-04-07 12:13:55 +02:00
Rohit Waghchaure
216bf2456e fix: removed hardcoded search fields to fix performance issue 2025-04-07 14:46:16 +05:30
ruthra kumar
15d632f8de Merge pull request #46728 from rtdany10/inv_date_issue
fix: update posting date before running validations
2025-04-07 14:30:39 +05:30
ljain112
9c68bc22fa fix: empty party filter on change of party type in General Ledger Report. 2025-04-07 14:09:52 +05:30
Rohit Waghchaure
2b411fb7f5 fix: inventory dimensions columns visibility depends on filter 2025-04-07 11:47:27 +05:30
Mihir Kandoi
7fb75f0482 fix: use get instead of dot operator to access dict value 2025-04-07 11:06:19 +05:30
ruthra kumar
7f0af3c667 Merge pull request #46637 from aerele/allocate-payment-term
fix(payment term): allocate payment amount when payment term is fetched from order
2025-04-07 11:03:24 +05:30
ruthra kumar
8759824aa7 Merge pull request #46784 from mohsinalimat/develop
fix: correct mapping(schedule_date) sales order to material request
2025-04-07 10:43:26 +05:30
ruthra kumar
0d72d58860 Merge pull request #46743 from aerele/auto-bank-reconcile
fix: include auto_reconcile_vouchers flag in background job
2025-04-07 10:19:59 +05:30
rohitwaghchaure
9c685c5af0 Merge pull request #46836 from mihir-kandoi/st35124
fix: remove all serial/batch fields when use button is unselected
2025-04-07 10:19:16 +05:30
ruthra kumar
82bf88635c Merge pull request #46727 from aerele/apply_docstatus
fix: use docstatus for status filter
2025-04-07 10:13:00 +05:30
Diptanil Saha
21954b9f9c fix: pos closed dialog on pos closing entry (#46881) 2025-04-06 21:26:14 +05:30
Frappe PR Bot
b4430a14a6 chore: update POT file (#46876) 2025-04-06 13:50:52 +02:00
rohitwaghchaure
5786596fc0 Merge pull request #46845 from rohitwaghchaure/fixed-support-35337
fix: slow query
2025-04-06 16:10:28 +05:30
rohitwaghchaure
c9cc5122dd Merge pull request #46875 from TurkerTunali/patch-13
perf: Stock entry cancel is slow
2025-04-06 16:09:08 +05:30
ruthra kumar
2948a33f40 Merge pull request #46716 from barredterra/dunning-customer-dashboard
feat(Customer): add Dunning to dashboard
2025-04-06 15:50:45 +05:30
ruthra kumar
a55a4efb22 Merge pull request #46658 from SruthysCode/fix_accounts_payable
chore: adjusted dimension placement in Accounts Payable
2025-04-06 15:39:22 +05:30
Türker Tunalı
ddbb44c6a2 perf: Stock entry cancel is slow
Some queries still use "timestamp" function instead of "posting_datetime". In my instance single stock entry cancel ends with request timeout. Using "posting_datetime" field directly improves the situation.

cont: https://github.com/frappe/erpnext/pull/46293
2025-04-06 12:25:42 +03:00
Rohit Waghchaure
f82c8ea5eb fix: slow query 2025-04-06 13:41:14 +05:30
rohitwaghchaure
6fd15abd15 Merge pull request #46853 from rohitwaghchaure/fixed-support-35243
fix: stock entry repack amount calculation
2025-04-06 09:44:59 +05:30
Sagar Vora
4ef5f6a392 Merge pull request #46870 from sagarvora/perf-validate
perf: reduce query when validating any doc
2025-04-05 23:38:30 +05:30
Sagar Vora
b863296e53 perf: reduce query when validating any doc 2025-04-05 23:06:52 +05:30
Raffael Meyer
04df09cfca fix(Dunning): undefined variable (#46868) 2025-04-05 15:19:23 +00:00
Raffael Meyer
e25517a3ce refactor(Payment Entry): reduce indentation (#46864) 2025-04-05 16:41:23 +02:00
Raffael Meyer
7d12e9afd4 fix: make message translatable (#46863) 2025-04-05 15:56:33 +02:00
Frappe PR Bot
27deed6d94 fix: sync translations from crowdin (#46858)
* fix: Arabic translations

* fix: Hungarian translations

* fix: Polish translations

* fix: Russian translations

* fix: Swedish translations

* fix: Chinese Simplified translations

* fix: Bosnian translations

* fix: Esperanto translations

* fix: Portuguese, Brazilian translations

* fix: Thai translations

* fix: Croatian translations
2025-04-05 12:33:37 +02:00
ruthra kumar
ae1f6912f8 Merge pull request #46625 from Abdeali099/bank-transaction-entries
refactor: Update Bank Transaction `set_query` implemetation
2025-04-05 07:04:26 +05:30
Rohit Waghchaure
544ceb93cd fix: stock entry repack amount calculation 2025-04-04 13:38:45 +05:30
Frappe PR Bot
89f58f7822 fix: sync translations from crowdin (#46849)
* fix: Spanish translations

* fix: French translations

* fix: Swedish translations

* fix: Turkish translations

* fix: Persian translations

* fix: Bosnian translations

* fix: German translations

* fix: Croatian translations
2025-04-04 00:45:09 +02:00
ruthra kumar
4cb6b70048 Merge pull request #46818 from cogk/fix-translate-unreconcile-dialog
fix: Translate UnReconcile dialog title
2025-04-03 06:51:59 +05:30
Md Hussain Nagaria
ef4f662c31 chore: update links to Frappe School (#46823) 2025-04-02 12:15:10 +05:30
rohitwaghchaure
7b5406b940 Merge pull request #46832 from rohitwaghchaure/fixed-support-33851-3
fix: set draft QC in purchase document on creation of qc
2025-04-01 19:46:36 +05:30
ljain112
038355f87b fix: correct function name 2025-04-01 17:43:11 +05:30
ljain112
fca46e0b2d fix: child values for tree doctypes and query refactor 2025-04-01 17:18:01 +05:30
Rohit Waghchaure
2553dea78e fix: set draft QC in purchase document on creation of qc 2025-04-01 15:11:03 +05:30
Mihir Kandoi
22ffdb9e77 fix: remove all serial/batch fields when use button is unselected 2025-04-01 14:15:47 +05:30
rohitwaghchaure
8dae5047c2 Merge pull request #46831 from rohitwaghchaure/fixed-support-35187
fix: current batch qty showing zero in the stock reconciliation
2025-04-01 14:08:54 +05:30
Sagar Vora
db0c5ae48d Merge pull request #46829 from vishakhdesai/gt-diff
fix: use `grand_total_diff` instead of `rounding_adjustment` in `taxes_and_totals`
2025-04-01 13:30:48 +05:30
Rohit Waghchaure
a5c62f8623 fix: current batch qty showing zero in the stock reconciliation 2025-04-01 13:15:06 +05:30
vishakhdesai
fd252da6b1 fix: use grand_total_diff instead of rounding_adjustment in taxes_and_totals 2025-04-01 12:43:34 +05:30
Diptanil Saha
5d5b6acc79 fix: pos checking opened entry closed or not (#46726)
* fix: pos checking opened entry closed or not

* fix: linter issue

* fix: linter issue
2025-04-01 12:40:47 +05:30
Abdeali Chharchhoda
4ae11d4384 chore: formatting 2025-04-01 12:12:37 +05:30
Abdeali Chharchhoda
fb054d4904 Merge branch 'develop' into bank-transaction-entries 2025-04-01 12:12:07 +05:30
rohitwaghchaure
63ef0a5a99 Merge pull request #46808 from rohitwaghchaure/fixed-support-34914
fix: condition to update the last purchase rate
2025-03-31 20:44:28 +05:30
ljain112
f49adfdd98 fix: removed customer_group query in customer.js 2025-03-31 18:06:33 +05:30
Corentin Forler
665645721b fix: Fix fieldtype in UnReconcile dialog 2025-03-31 13:54:51 +02:00
Corentin Forler
f2cfb03c2c fix: Translate UnReconcile dialog title 2025-03-31 13:51:47 +02:00
rohitwaghchaure
c7db13c275 Merge pull request #46815 from rohitwaghchaure/fixed-support-35177
feat: allow UOMs to select for which conversion rate defined in item
2025-03-31 16:22:17 +05:30
Rohit Waghchaure
b1dfbbe85e feat: allow UOMs to select for which converstion rate defined in item master 2025-03-31 15:53:55 +05:30
Vishakh Desai
3a9dca0563 Merge pull request #46812 from vishakhdesai/fix-taxes-and-totals
fix: revert resetting `rounding_adjustment`
2025-03-31 10:23:13 +00:00
Vishakh Desai
f25bf6dbd2 fix: improved rounding adjustment when applying discount (#46720)
* fix: rounding adjustment in apply_discount_amount taxes_and_totals

* refactor: minor changes

* fix: set the rounding difference while calculating tax total in the last tax row and add test case

* fix: failing test case

* fix: made changes in get_total_for_discount_amount in taxes_and_totals

* fix: failing test cases

* fix: changes as per review

* refactor: remove unnecessary use of flt

* refactor: improve logic

* refactor: minor change

* refactor: minor changes

* fix: add a test case for applying discount with previous row total in taxes

* fix: failing test case

* refactor: flatter code, remove `flt` usage for accuracy

---------

Co-authored-by: Sagar Vora <sagar@resilient.tech>
2025-03-31 09:25:09 +00:00
Rohit Waghchaure
bad901e7da fix: condition to update the last puurchase rate 2025-03-31 14:23:47 +05:30
rohitwaghchaure
1e780945e8 Merge pull request #46806 from rohitwaghchaure/fixed-suupport-35020
feat: option to recreate Stock Ledger Entries against stock transactions
2025-03-31 14:13:35 +05:30
Marc Ramser
21b8ad6aa5 feat(regional): Address Template for Germany & Add Switzerland Template (#46737)
* Add Address template for Switzerland

* Fix address template for germany

If an ERPNext instance is set to German and used by a business outside Germany (e.g., in Switzerland or Austria), customer addresses in Germany are displayed in their national format. However, for postal services, the international format (including the country) is required.".

This is just a workaround. IMHO the correct fix would be to check where the company is located and based on that use the national or the international template.
2025-03-31 10:32:36 +02:00
Rohit Waghchaure
218dbd6911 feat: option to recreate Stock Ledger Entries against stock transactions 2025-03-31 13:48:21 +05:30
ljain112
aadda9f606 fix: update outstanding with precision 2025-03-31 12:37:28 +05:30
Vishakh Desai
646cf54679 fix: multiple Bank Reconciliation Tool issues (#46644)
* fix: bank reconciliation tool issue

* refactor: separate Bank Transaction linking from other logic

* fix: delink old pe on update_after_submit in bank transaction

* fix: failing test case fixed

* fix: changes as per review

* refactor: rename `gles` to `gl_entries`

---------

Co-authored-by: Sagar Vora <sagar@resilient.tech>
2025-03-31 05:55:41 +00:00
rohitwaghchaure
9aff191bb1 Merge pull request #46801 from rohitwaghchaure/fixed-ux-for-job-card
fix: UX for partial job card completion
2025-03-30 22:51:30 +05:30
Rohit Waghchaure
8e8a724d82 fix: UX for partial job card completion 2025-03-30 19:01:15 +05:30
Frappe PR Bot
6df932f789 chore: update POT file (#46798) 2025-03-30 13:25:09 +02:00
iamkhanraheel
19279dffea fix: change cur_frm to frm 2025-03-29 16:41:28 +05:30
Sugesh393
a393195866 test: add unit test to validate tax values in Purchase Order from Sales Order 2025-03-29 15:35:01 +05:30
Sugesh393
1e18569be7 fix: map tax table while creating purchase order from sales order 2025-03-29 15:34:22 +05:30
MohsinAli
732e950265 fix: correct mapping(schedule_date) sales order to material request 2025-03-29 11:03:24 +05:30
iamkhanraheel
4284701442 refactor: remove print func 2025-03-29 06:15:22 +05:30
iamkhanraheel
3a4ba0c790 fix: fetch customer related data in making payment entry from customer 2025-03-29 03:59:57 +05:30
rohitwaghchaure
f55e8d1f4a Merge pull request #46777 from rohitwaghchaure/fixed-support-33851-1
fix: incorrect condition
2025-03-28 23:48:07 +05:30
rohitwaghchaure
b93957197e Merge pull request #46775 from rohitwaghchaure/fixed-support-34440
fix: for deadlock issue keep status as In Progress
2025-03-28 23:45:25 +05:30
rohitwaghchaure
dc75a385b7 Merge pull request #46760 from rohitwaghchaure/fixed-support-29324
fix: valuation rate not updating for raw materials
2025-03-28 23:44:42 +05:30
Rohit Waghchaure
0c1a8e9c58 fix: incorrect condition 2025-03-28 23:43:25 +05:30
Corentin Forler
bb864c8345 feat: Show past events and todos in crm_activities 2025-03-28 14:07:45 +01:00
Abdeali Chharchhodawala
8c9d630ee4 Merge pull request #46683 from Abdeali099/set-employee-contact-details
fix: Set complete contact details for `Employee` in PE
2025-03-28 18:17:47 +05:30
ljain112
c2bdd30e6d fix: correct outstanding amount for invoice in dunning 2025-03-28 13:26:28 +05:30
Rohit Waghchaure
e6ff7f0e9f fix: for deadlock issue keep status as In Progress 2025-03-28 13:10:12 +05:30
Diptanil Saha
45b45efee5 fix: pos button and on hover color (#46762)
* fix: pos button and on hover color

Changed the POS 'New Order' button color to frappe's color scheme and fixed the on hover text color on 'Toggle Recent Orders'

* fix: on hover text unreadable in dark mode
2025-03-28 08:54:51 +05:30
venkat102
7bf1a39861 fix: update payment amount if automatically_fetch_payment_terms is enabled 2025-03-27 22:28:20 +05:30
Rohit Waghchaure
5af8378471 fix: valuation rate not updating for raw materials 2025-03-27 21:32:38 +05:30
Mihir Kandoi
036af54d54 refactor: split and clean execute function to be more readable 2025-03-27 21:10:03 +05:30
Mihir Kandoi
668fdc8f92 fix: remove incorrect default field 2025-03-27 20:56:05 +05:30
ruthra kumar
11800e3cd8 Merge pull request #46719 from ljain112/fix-val-contact
fix: do not use self object for setting party and party type
2025-03-27 11:07:41 +05:30
venkat102
35fbbc2057 fix: include auto_reconcile_vouchers flag in background job 2025-03-27 01:04:38 +05:30
rohitwaghchaure
6275b236ee Merge pull request #46739 from rohitwaghchaure/fixed-support-34851
fix: slow query
2025-03-26 22:08:53 +05:30
Rohit Waghchaure
5ddb36af87 fix: slow query 2025-03-26 21:50:18 +05:30
Frappe PR Bot
d35ae3ef5e fix: sync translations from crowdin (#46738)
* fix: French translations

* fix: Chinese Simplified translations
2025-03-26 16:43:53 +01:00
rohitwaghchaure
b9d70e2ea4 Merge pull request #46732 from rohitwaghchaure/fixed-job-card-hours-issue
fix: not able to set hours manually in job card
2025-03-26 15:54:31 +05:30
rohitwaghchaure
cf2d67f145 Merge pull request #46733 from rohitwaghchaure/fixed-support-34788
fix: decimal values causing incorrect batch picking
2025-03-26 15:42:47 +05:30
Rohit Waghchaure
338b09debb fix: not able to set hours manually in job card 2025-03-26 15:38:44 +05:30
Rohit Waghchaure
7bfe703b04 fix: decimal values causing incorrect batch picking 2025-03-26 15:20:21 +05:30
Mihir Kandoi
26de902496 perf: take query out of loop 2025-03-26 14:39:45 +05:30
rohitwaghchaure
1d8c252ee7 Merge pull request #46710 from rohitwaghchaure/fixed-support-34516
fix: expense account in the stock entry
2025-03-26 11:59:14 +05:30
Dany Robert
d04dbd8ed9 fix: update posting date before running validations 2025-03-26 11:37:35 +05:30
rethik
31e59354c9 fix: use docstatus for status filter 2025-03-26 11:10:08 +05:30
Frappe PR Bot
9d2f9ad4c0 fix: sync translations from crowdin (#46724)
* fix: Swedish translations

* fix: Chinese Simplified translations
2025-03-25 18:21:18 +01:00
ljain112
80b746d4dd fix: do not use self object for setting party and party type 2025-03-25 17:51:41 +05:30
rohitwaghchaure
e2412072d9 Merge pull request #46718 from rohitwaghchaure/fixed-github-46708
fix: disable use multi level BOM for track Semi Finished Goods
2025-03-25 17:29:08 +05:30
Rohit Waghchaure
bf3b0d607f fix: disable use multi level BOM for track Semi Finished Goods 2025-03-25 17:24:48 +05:30
barredterra
638d825d8c feat(Customer): add Dunning to dashboard 2025-03-25 11:12:35 +01:00
ljain112
f4bc1dfd00 fix: user permissions in sales and purchase report 2025-03-25 14:15:24 +05:30
ruthra kumar
435bb1c7b0 Merge pull request #46616 from ljain112/conversion-rate
fix: do not validate if conversion rate is 1 for different currency
2025-03-25 14:11:21 +05:30
Rohit Waghchaure
89569d4b32 fix: expense account in the stock entry 2025-03-25 13:41:27 +05:30
ruthra kumar
a88259591b Merge pull request #46617 from ljain112/fix-ui-sales
refactor: removed redundant message display for each item row cost center update
2025-03-25 12:15:43 +05:30
ruthra kumar
a8ed8b26f1 Merge pull request #46622 from ljain112/feat-pr-acc-repost
feat: repost accounting ledger for purchase receipt
2025-03-25 11:48:33 +05:30
Frappe PR Bot
9af130598a fix: sync translations from crowdin (#46698)
* fix: French translations

* fix: Spanish translations

* fix: Arabic translations

* fix: Hungarian translations

* fix: Polish translations

* fix: Russian translations

* fix: Swedish translations

* fix: Turkish translations

* fix: Chinese Simplified translations

* fix: Persian translations

* fix: Bosnian translations

* fix: German translations

* fix: Esperanto translations

* fix: Portuguese, Brazilian translations

* fix: Thai translations

* fix: Croatian translations
2025-03-24 16:54:40 +01:00
Raffael Meyer
eb350012b0 ci: apply label "skip-release-notes" based on PR title (#46694)
Workflow copied from frappe/frappe
2025-03-24 15:22:17 +00:00
Raffael Meyer
70d9db7557 ci: invert language mapping (#46693)
* ci: invert language mapping

* ci: add skip-release-notes on crowdin PRs
2025-03-24 16:17:51 +01:00
barredterra
56a0c4642f ci: add skip-release-notes on crowdin PRs 2025-03-24 16:05:13 +01:00
barredterra
41f2b136d5 ci: invert language mapping 2025-03-24 16:04:17 +01:00
Raffael Meyer
9a8f0f3aef ci: fix language code mapping (#46692)
* ci: fix language code mapping

Keys are expected to be not the locale_with_underscore but the codes according to https://support.crowdin.com/developer/language-codes/

* chore: remove redundant translation files
2025-03-24 13:35:35 +00:00
Sagar Vora
d35a533d8b Merge pull request #46669 from vishakhdesai/bank-clearance-fix
fix: don't filter payment entries on Bank Account in Payment Clearance
2025-03-24 17:49:02 +05:30
ruthra kumar
ea224e131c Merge pull request #46577 from ljain112/jv-ccl
fix: customer credit limit check based on `bypass_credit_limit_check` in Journal Entry
2025-03-24 13:30:42 +05:30
ruthra kumar
8f647b4172 Merge pull request #46574 from ljain112/fix-order-payment-reco
fix: correct invoice order in payment reconcillaiton
2025-03-24 12:23:22 +05:30
ruthra kumar
9c82f4bb0f Merge pull request #46440 from aerele/payable-receivable-report
fix: add base_outstanding and base_paid_amount in payment schedule table
2025-03-24 11:43:57 +05:30
vishakhdesai
fa2fd5bf88 fix: don't filter payment entries on Bank Account in Payment Clearance 2025-03-24 11:23:53 +05:30
ruthra kumar
eda0e2152d Merge pull request #46569 from barredterra/language_map
ci: configure language mapping for crowdin
2025-03-24 10:39:34 +05:30
ruthra kumar
becb53ba5d Merge pull request #46518 from barredterra/so-set-deliver_date
fix(Sales Order): make `set_missing_values` set delivery date in item rows
2025-03-24 10:09:40 +05:30
ruthra kumar
03fde2c039 Merge pull request #46386 from FHenry/dev_whitelist_getchart
feat(accounting/regional): allow chart_of_account.get_chart to be whilelist
2025-03-24 09:59:07 +05:30
Khushi Rawat
eec2e7e833 fix: correct accumulated depreciation calculation for disposed assets (#46660) 2025-03-23 18:38:06 +05:30
Frappe PR Bot
93bd9a40cd chore: update POT file (#46659) 2025-03-23 11:05:00 +01:00
Sruthy
361a55a703 chore: adjusted dimension placement in Accounts Payable 2025-03-23 05:50:03 +00:00
HarryPaulo
b0dccadd26 fix: decimal garbage on variable total (#46621)
* fix: decimal dirty on variable total

* fix: linters

* fix: decimal garbage, code improvement
2025-03-21 14:14:16 +01:00
rohitwaghchaure
d3f8263890 Merge pull request #46642 from rohitwaghchaure/fixed-patch-table-issue
fix: patch
2025-03-21 18:08:17 +05:30
rohitwaghchaure
91c899f3f9 Merge pull request #46641 from rohitwaghchaure/fixed-rename-costing-timeout
perf: timeout while renaming cost center
2025-03-21 18:07:36 +05:30
Md Hussain Nagaria
e0f8e72c4d Merge pull request #46636 from frappe/fix-arg-usage
fix: unwired order_by argument in get_transaction_list
2025-03-21 15:47:25 +05:30
Rohit Waghchaure
e73570910c fix: patch 2025-03-21 15:31:20 +05:30
Rohit Waghchaure
92be7cbbbf perf: timeout while renaming cost center 2025-03-21 15:30:23 +05:30
ljain112
e84e49345a perf: refactored customer ledger summary for performance 2025-03-21 15:18:18 +05:30
venkat102
7785296573 test: validate payment schedule based on invoice amount 2025-03-21 13:18:19 +05:30
venkat102
5618859bd8 fix(payment term): allocate payment amount when payment term is fetched from order 2025-03-21 13:17:32 +05:30
Hussain Nagaria
2c1077d332 fix: unwired order_by argument
* lol on how it was updated from modified in both the places (version 15), but wasn't fixed
2025-03-21 11:38:41 +05:30
Raffael Meyer
2fd1d4d3ab Merge pull request #46627 from mihir-kandoi/date_added_to_wrong_patch
fix: date added to wrong patch
2025-03-20 19:25:05 +01:00
Bhavan23
7b0882600a test: add unit test to validate outstanding amount for update_outstanding_for_self checkbox enabled 2025-03-20 19:20:41 +05:30
Bhavan23
222f1834f1 fix(accounting): update outstanding amount based on update_outstanding_for_self
fix(accounting): against voucher has been already paid show proper message and update update_outstanding_for_self as 1
2025-03-20 19:19:47 +05:30
ljain112
913c60d77b fix: correct payment request amount 2025-03-20 19:10:36 +05:30
Mihir Kandoi
dc45c3b39c fix: date added to wrong patch 2025-03-20 15:55:33 +05:30
Abdeali Chharchhoda
85dd1dd4c7 fix: add Not Cancelled filter for payment_entry in Bank Transaction 2025-03-20 15:19:01 +05:30
Mihir Kandoi
80c17cc005 fix: remove get_items query.run outside of if condition 2025-03-20 15:17:59 +05:30
Abdeali Chharchhoda
257802aeda refactor: move payment_document query to setup 2025-03-20 15:12:06 +05:30
ljain112
b36e356469 feat: repost accounting ledger for purchase receipt 2025-03-20 13:25:53 +05:30
Mihir Kandoi
393434dfd9 fix: add fetch from to currency and set default to empty in item price 2025-03-19 20:32:27 +05:30
ljain112
4376ca5f1d refactor: removed redundant message display for each item row cost center update 2025-03-19 17:20:25 +05:30
ljain112
e8a66d03bc fix: do not validate if conversion rate is 1 for different currency 2025-03-19 16:52:13 +05:30
ruthra kumar
21e22b577a Merge pull request #46591 from ruthra-kumar/revert_to_json_for_test_records
Revert "chore(tests): move to compact, human readable, commentable to…
2025-03-19 16:50:14 +05:30
rohitwaghchaure
f2da369a07 Merge pull request #46608 from mihir-kandoi/st34183
fix: fetch bom_no when updating items in sales order
2025-03-19 15:44:22 +05:30
Mihir Kandoi
386df968c2 fix: remove duplicate 2025-03-19 15:25:50 +05:30
rohitwaghchaure
97debcb27b Merge pull request #46573 from mihir-kandoi/fix_set_landed_cost_based_on_pi
Fix set landed cost based on pi
2025-03-19 15:20:45 +05:30
Marc Ramser
f4aba561ce feat(projects): add option to hide timesheets for project users (#46173)
* feat: add option to hide timesheets for project users

* Added a new "Hide timesheets" checkbox field to Project User doctype that allows to control timesheet visibility for specific users. When enabled, the timesheets section will not be displayed on the project page for that user.

* Update projects.html
2025-03-19 13:34:15 +05:30
rohitwaghchaure
eb7cf2608c Merge pull request #46595 from rohitwaghchaure/fixed-support-34185
fix: not able to make PR against stand alone Debit Note
2025-03-19 13:34:01 +05:30
ruthra kumar
c2cf1d14e6 Merge pull request #46605 from yatridholakia/fix-broken-links
fix: broken Frappe School links
2025-03-19 13:12:43 +05:30
Mihir Kandoi
b3c400f998 fix: take function call outside loop 2025-03-19 13:04:08 +05:30
Mihir Kandoi
508727a57a fix: fetch bom_no when updating items in sales order 2025-03-19 12:52:34 +05:30
ruthra kumar
b1f15358dd Merge pull request #46596 from rohitwaghchaure/fixed-support-32083-2
fix: debit in transaction currency
2025-03-19 11:55:52 +05:30
Yatri Dholakia
343940a9f3 fix: broken Frappe School links 2025-03-19 04:20:20 +00:00
Rohit Waghchaure
e4acf20a62 fix: debit in transaction currency 2025-03-18 21:26:25 +05:30
Rohit Waghchaure
6a52c30591 fix: not able to make PR against stand alone Debit Note 2025-03-18 21:20:40 +05:30
rohitwaghchaure
0985441fc3 Merge pull request #46593 from rohitwaghchaure/fixed-batch-valuation-test-case
test: test case for FIFO batch valuation
2025-03-18 19:19:38 +05:30
Rohit Waghchaure
ad9ac1f058 test: test case for FIFO batch valuation 2025-03-18 18:41:57 +05:30
ruthra kumar
4683e03353 chore: include company in test record 2025-03-18 17:50:44 +05:30
rohitwaghchaure
57d7ac4954 Merge pull request #46588 from rohitwaghchaure/fixed-support-34111
fix: SABB validation for packed items
2025-03-18 17:31:39 +05:30
ruthra kumar
54d96f34f2 Revert "chore(tests): move to compact, human readable, commentable toml layout for test records"
This reverts commit bb917207c2.
2025-03-18 17:27:01 +05:30
rohitwaghchaure
327af0ceac Merge pull request #46579 from rohitwaghchaure/fixed-valuation-for-batch-ma
fix: valuation for moving average with batches
2025-03-18 16:33:36 +05:30
Rohit Waghchaure
3756bf231b fix: SABB validation for packed items 2025-03-18 16:28:31 +05:30
Khushi Rawat
29d77aa19f fix: repost future sle and gle after capitalization (#46576) 2025-03-18 15:59:58 +05:30
rohitwaghchaure
182b4ef266 Merge pull request #46554 from mihir-kandoi/fix_rename_sc_fields
fix: add validation to rename_subcontracting_fields patch
2025-03-18 15:59:09 +05:30
rohitwaghchaure
59f2302b77 Merge pull request #46575 from mihir-kandoi/st34161
fix: fetch quality inspection parameter group
2025-03-18 15:56:18 +05:30
Rohit Waghchaure
cdfbc73f4c fix: valuation for moving average with batches 2025-03-18 15:54:23 +05:30
Smit Vora
1e2f5940fd Merge pull request #46515 from vorasmit/fix-qty-conversion
fix: ensure qty conversion when creating production plan from SO
2025-03-18 14:24:49 +05:30
ljain112
8a84faebed fix: customer credit limit check based on bypass_credit_limit_check in Journal Entry 2025-03-18 14:16:35 +05:30
Mihir Kandoi
0a482c7ea8 fix: fetch quality inspection parameter group 2025-03-18 13:08:48 +05:30
ljain112
5c34a5aaed fix: correct invoice order in payment reconcillaiton 2025-03-18 12:49:29 +05:30
Mihir Kandoi
7e669c0728 fix: patch 2025-03-18 11:43:16 +05:30
Mihir Kandoi
75ab5f2bd0 fix: set landed cost based on purchase invoice rate 2025-03-18 11:22:46 +05:30
ruthra kumar
e1ba08a28d Merge pull request #46566 from ruthra-kumar/correct_account_currency_in_offset_account
fix: set correct currency for offset account gl entries
2025-03-18 11:14:04 +05:30
ruthra kumar
3eaa9bfca4 Merge pull request #46508 from ruthra-kumar/use_base_total_for_uae_report
fix: use base currency total for UAE VAT 201 report
2025-03-18 10:58:58 +05:30
barredterra
c6cfbd7a65 chore: remove redundant translation files 2025-03-17 23:52:34 +01:00
barredterra
efeab38199 ci: configure language mapping for crowdin 2025-03-17 23:42:47 +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
ruthra kumar
c32e11e69d fix: set correct currency for offset account gl entries 2025-03-17 20:28:34 +05:30
Ejaaz Khan
dd214fedd8 Merge pull request #46564 from iamejaaz/remove-default-print
refactor: remove default print format from sales invoice
2025-03-17 20:07:07 +05:30
Ejaaz Khan
f10d1f2b1f refactor: remove default print format from sales invoice 2025-03-17 19:34:04 +05:30
ruthra kumar
a70354a0a4 Merge pull request #46563 from frappe/l10n_develop
fix: sync translations from crowdin
2025-03-17 17:08:42 +05:30
Frappe PR Bot
c7ad7eecbb fix: Croatian translations 2025-03-17 16:56:17 +05:30
Frappe PR Bot
4687ba22d4 fix: Bosnian translations 2025-03-17 16:56:04 +05:30
Frappe PR Bot
b25e0bd2b0 fix: Persian translations 2025-03-17 16:55:59 +05:30
Frappe PR Bot
ca1eec355c fix: Swedish translations 2025-03-17 16:55:50 +05:30
Frappe PR Bot
addc26fb2b fix: French translations 2025-03-17 16:55:33 +05:30
ruthra kumar
88ec083e4c Merge pull request #46557 from aerele/transaction-deletion-record
fix(Transaction Deletion Record): sql syntax error while deleting lead address
2025-03-17 16:37:41 +05:30
rohitwaghchaure
798664dfbf Merge pull request #46555 from rohitwaghchaure/fixed-support-33798
fix: performance issue for item list view
2025-03-17 16:36:53 +05:30
rohitwaghchaure
368892a82f Merge pull request #46553 from rohitwaghchaure/fixed-bom-uom
fix: not able to select the item in the BOM
2025-03-17 16:35:19 +05:30
rohitwaghchaure
173a954d8c Merge pull request #46552 from rohitwaghchaure/fixed-support-32083-1
fix: Debit and Credit not equal for Purchase Invoice
2025-03-17 16:34:51 +05:30
venkat102
af0d6eeae8 fix(Transaction Deletion Record): sql syntax error while fetching lead address 2025-03-17 16:13:42 +05:30
ruthra kumar
b666b8bbd4 Merge pull request #46539 from frappe/l10n_develop
fix: sync translations from crowdin
2025-03-17 15:13:45 +05:30
Rohit Waghchaure
d758fde881 fix: performance issue for item list view 2025-03-17 13:48:14 +05:30
Mihir Kandoi
6c3117dc0d fix: add validation to rename_subcontracting_fields patch 2025-03-17 13:11:46 +05:30
Rohit Waghchaure
96d0cd23f1 fix: not able to select the item in the BOM 2025-03-17 13:00:32 +05:30
Rohit Waghchaure
ecb31b7c9f fix: Debit and Credit not equal for Purchase Invoice 2025-03-17 12:57:44 +05:30
Ankush Menat
e47a87839b perf: faster count estimation (#46550)
These count queries themselves take quite a long time. `estimate_count`
uses info_schema stats to guess the time.

Co-authored-by: Nabin Hait <nabinhait@gmail.com>
2025-03-17 07:09:21 +00:00
rohitwaghchaure
90b6e00237 Merge pull request #46504 from rohitwaghchaure/fixed-support-33851
fix: dashboard link for QC from PR
2025-03-17 10:06:09 +05:30
Frappe PR Bot
ba50d01f6b fix: Croatian translations 2025-03-16 16:37:39 +05:30
Frappe PR Bot
5c5b29745b fix: Thai translations 2025-03-16 16:37:36 +05:30
Frappe PR Bot
350c4e5d9f fix: Portuguese, Brazilian translations 2025-03-16 16:37:33 +05:30
Frappe PR Bot
b68627240c fix: Esperanto translations 2025-03-16 16:37:31 +05:30
Frappe PR Bot
06732da687 fix: German translations 2025-03-16 16:37:28 +05:30
Frappe PR Bot
3fbbf5a609 fix: Bosnian translations 2025-03-16 16:37:24 +05:30
Frappe PR Bot
0e593fddf4 fix: Persian translations 2025-03-16 16:37:21 +05:30
Frappe PR Bot
a0d50e146e fix: Chinese Simplified translations 2025-03-16 16:37:17 +05:30
Frappe PR Bot
a3f3724fc6 fix: Turkish translations 2025-03-16 16:37:15 +05:30
Frappe PR Bot
0c58b2cf7e fix: Swedish translations 2025-03-16 16:37:12 +05:30
Frappe PR Bot
a536400a0c fix: Russian translations 2025-03-16 16:37:09 +05:30
Frappe PR Bot
825e8325eb fix: Polish translations 2025-03-16 16:37:06 +05:30
Frappe PR Bot
84889718ca fix: Hungarian translations 2025-03-16 16:37:03 +05:30
Frappe PR Bot
a30a5ce645 fix: Arabic translations 2025-03-16 16:37:00 +05:30
Frappe PR Bot
eaa386da2f fix: Spanish translations 2025-03-16 16:36:57 +05:30
Frappe PR Bot
63129cecf3 fix: French translations 2025-03-16 16:36:54 +05:30
Raffael Meyer
43791abdd3 Merge pull request #46545 from frappe/pot_develop_2025-03-16
chore: update POT file
2025-03-16 11:49:00 +01:00
frappe-pr-bot
40a84a3dfb chore: update POT file 2025-03-16 09:34:53 +00:00
Frappe PR Bot
0821a46302 fix: Bosnian translations 2025-03-15 16:33:06 +05:30
Frappe PR Bot
b21a823cc4 fix: Persian translations 2025-03-15 16:33:02 +05:30
Sagar Vora
e5fdbeefc3 Merge pull request #46536 from sagarvora/remove-init
chore: remove unnecessary init method
2025-03-15 11:55:36 +05:30
Sagar Vora
52ef4f38fe chore: remove unnecessary init method 2025-03-15 11:41:40 +05:30
Sagar Vora
dd8956a3cf Merge pull request #46531 from sagarvora/perf/mariadb-2
ci: use `mysqlclient` in tests
2025-03-15 10:01:22 +05:30
Sagar Vora
25623325ce ci: use mysqlclient in tests 2025-03-15 09:48:40 +05:30
Sagar Vora
70aa9e5f50 Merge pull request #46533 from sagarvora/fix-dupl-se
fix: exclude current doc when checking for duplicate
2025-03-15 00:06:33 +05:30
Sagar Vora
d8ef5e4d58 fix: exclude current doc when checking for duplicate 2025-03-14 23:51:30 +05:30
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
Raffael Meyer
3be570b44a Merge pull request #45924 from PatrickDEissler/develop
fix(Employee): remove User Permissions if create_user_permission is unchecked
2025-03-14 13:57:42 +01:00
Shariq Ansari
3c7583495e Merge pull request #46529 from shariquerik/handle-party-type-erpenxt-crm-integration
fix: also consider CRM Deal as party type for ERPNext CRM Integration
2025-03-14 16:03:03 +05:30
Shariq Ansari
f59620fd55 Merge branch 'develop' into handle-party-type-erpenxt-crm-integration 2025-03-14 16:00:42 +05:30
Shariq Ansari
04edbf7efe fix: also consider CRM Deal as party type for ERPNext CRM Integration 2025-03-14 15:54:03 +05:30
Mihir Kandoi
c7e7da6500 Merge pull request #46513 from mihir-kandoi/46043
fix: get bom_no from sales order item and material request item
2025-03-14 13:05:36 +05:30
Mihir Kandoi
1b560ce949 Merge pull request #46514 from mihir-kandoi/46060
fix: UOM conversion error when creating pick list from material trans…
2025-03-14 12:42:17 +05:30
Mihir Kandoi
8bb2a15732 Merge pull request #46512 from mihir-kandoi/hide_subcontracted_qty_field
fix: hide subcontracted qty field if PO is not subcontracted
2025-03-14 12:41:22 +05:30
ruthra kumar
e80129627a test: report ouput on foreign currency PI 2025-03-14 11:50:16 +05:30
ruthra kumar
229147a434 Merge pull request #46497 from Sanket322/use_party_explicitly
fix: use `party` explicitly instead of party_field
2025-03-14 10:21:35 +05:30
ruthra kumar
784e61e3e9 Merge pull request #46488 from aerele/validate-address-contact-permission
refactor: replace get_list with get_all for dynamic link child access
2025-03-14 09:51:03 +05:30
ruthra kumar
e6a3a19641 Merge pull request #46519 from frappe/l10n_develop
fix: sync translations from crowdin
2025-03-14 09:28:15 +05:30
Frappe PR Bot
3adb9eefd7 fix: Persian translations 2025-03-14 07:17:18 +05:30
barredterra
fc279c85bd fix(Sales Order): make set_missing_values set delivery date in item rows 2025-03-13 18:56:59 +01:00
Mihir Kandoi
8411e2e01f fix: wrong field mapping 2025-03-13 20:19:47 +05:30
Mihir Kandoi
840ea070a9 fix: UOM conversion error when creating pick list from material transfer request 2025-03-13 18:33:39 +05:30
Smit Vora
75882cc81c fix: ensure qty conversion when creating production plan from SO 2025-03-13 18:33:22 +05:30
Mihir Kandoi
ac354505ef fix: get bom_no from sales order item and material request item 2025-03-13 18:11:20 +05:30
Mihir Kandoi
6e8521d761 fix: hide subcontracted qty field if PO is not subcontracted 2025-03-13 17:28:48 +05:30
ruthra kumar
46f4babcd0 fix: use base currency total 2025-03-13 14:23:51 +05:30
Diptanil Saha
0552209310 refactor: print receipt on order complete on pos (#46501) 2025-03-13 14:22:05 +05:30
Rohit Waghchaure
551f89f14b fix: dashboard link for QC from PR 2025-03-13 13:50:25 +05:30
mergify[bot]
378a554ea2 fix: add parenttype condition to payment schedule query in accounts receivable report (backport #46370) 2025-03-13 12:00:29 +05:30
Sanket322
5057e3fe30 fix: use party explicitly 2025-03-13 11:29:20 +05:30
ruthra kumar
6572fba435 Merge pull request #46494 from frappe/l10n_develop
fix: sync translations from crowdin
2025-03-13 08:42:29 +05:30
ruthra kumar
f2a709f953 Merge pull request #46491 from cogk/fix-disable-and-rename-project-template
feat: Allow disabling and renaming Project Template
2025-03-13 08:42:19 +05:30
Frappe PR Bot
0ba9712935 fix: Croatian translations 2025-03-13 06:56:54 +05:30
Frappe PR Bot
cc2ce30bd4 fix: Bosnian translations 2025-03-13 06:56:48 +05:30
Frappe PR Bot
d9662959d2 fix: Persian translations 2025-03-13 06:56:44 +05:30
marination
8f96c0b546 test: Zero Qty in RFQ and Supplier Quotation 2025-03-12 18:42:12 +01:00
Sanket Shah
38955af802 fix: using in for lookup in list instead of directly assigning (#46492)
fix: using in for lookup in list instead of assigning

Co-authored-by: Sanket322 <shahsanket322003.com>
2025-03-12 22:37:08 +05:30
Corentin Forler
43303f2cf6 feat: Allow disabling and renaming Project Template 2025-03-12 14:27:44 +01:00
Sugesh393
8f7f0b81f6 refactor: replace get_list with get_all for dynamic link child access 2025-03-12 17:54:39 +05:30
ruthra kumar
95b8355cff Merge pull request #46251 from aerele/fix/bank-reconciliation-timeout
fix(bank-reconciliation): run bank reconciliation as a background job
2025-03-12 17:20:06 +05:30
Sugesh G
f8c659d8d5 fix: pricing rule not ignored in Sales Order (#46248)
* fix: pricing rule not ignored in Sales Order

* test: update parameter do_not_submit to do_not_save
2025-03-12 16:27:48 +05:30
Mihir Kandoi
08c7e8a602 feat: add is_transporter filter to supplier field in purchase invoice… (#46430)
* feat: add is_transporter filter to supplier field in purchase invoice and receipt

* fix: add filter to purchase order as well
2025-03-12 16:24:57 +05:30
Priyansh Shah
d371236684 fix: validations and account type filter for Tax Withholding Category (#46207)
fix: validations and account type filter for tax withholding category
2025-03-12 16:21:12 +05:30
Bhavansathru
ba96c86576 fix(invoice):validate return invoice qty (#46451)
* fix(invoice): validate return quantity when update stock is unchecked

* test: add unit test for validating fully returned invoice quantity
2025-03-12 16:19:24 +05:30
Sugesh G
0bdb81db53 fix: use shipping_address_name for address validation in sales invoice (#46473)
* fix: validate address and contact related to party

* fix: solve unboundlocal error

* refactor: improve variable scope

* refactor: translatable strings

* fix: use shipping_address_name for address validation in sales invoice

* test: add new unit test for address and contact validation

* chore: to avoid keyerror

---------

Co-authored-by: ruthra kumar <ruthra@erpnext.com>
2025-03-12 16:13:35 +05:30
Sudharsanan Ashok
9e808c832f fix: calculate due date based on payment term (#46416) 2025-03-12 16:10:14 +05:30
Mihir Kandoi
41c93c8832 fix: return None if document does not have status field in get_status… (#46415)
* fix: return None if document does not have status field in get_status function

* chore: add comment
2025-03-12 16:05:08 +05:30
Mihir Kandoi
67e9389a02 fix: error when creating delivery note from pick list (#46417) 2025-03-12 15:27:47 +05:30
Mihir Kandoi
5a72edcb82 fix: enable no copy for serial no field (#46381)
* fix: enable no copy for serial no field

* fix: remove no copy from serial no field of purchase receipt item

* fix: remove no copy from serial no field of delivery note item

* Revert "fix: remove no copy from serial no field of purchase receipt item"

This reverts commit 5d1752030b.

---------

Co-authored-by: Nabin Hait <nabinhait@gmail.com>
2025-03-12 15:11:55 +05:30
rohitwaghchaure
b6c0448075 Merge pull request #46470 from rohitwaghchaure/fixed-support-33560
fix: do not recalculate qty for batch items during reposting
2025-03-12 12:17:07 +05:30
Frappe PR Bot
b270140e61 fix: sync translations from crowdin (#46435)
* fix: French translations

* fix: Spanish translations

* fix: Arabic translations

* fix: Hungarian translations

* fix: Polish translations

* fix: Russian translations

* fix: Swedish translations

* fix: Turkish translations

* fix: Chinese Simplified translations

* fix: Persian translations

* fix: Bosnian translations

* fix: German translations

* fix: Esperanto translations

* fix: Portuguese, Brazilian translations

* fix: Thai translations

* fix: Croatian translations

* fix: Chinese Simplified translations

* fix: Bosnian translations
2025-03-12 10:49:50 +05:30
Rohit Waghchaure
0753c018d2 fix: do not recalculate qty for batch items during reposting 2025-03-12 10:49:21 +05:30
Venkatesh
b72f6f5a3d fix(payment entry): fetch default bank account based on company (#46379) 2025-03-12 10:49:13 +05:30
Diptanil Saha
8ba4ac3b86 fix: credit note creation during pos invoice consolidation (#46277)
* fix: credit note creation during pos invoice consolidation

* fix: added check to skip merging empty list of return pos invoices

* fix: sql query

* fix: using return invoice name instead of return invoice object

* fix: added pos invoice field in sales invoice item
2025-03-12 10:44:21 +05:30
Dany Robert
0a5ca0c35f fix: validate last_gl_update exists before comparing (#46464) 2025-03-12 10:36:50 +05:30
Mihir Kandoi
8bce42e633 fix: rename sla fields patch (#46465)
* fix: rename sla fields patch

* fix: rerun patch
2025-03-12 10:34:20 +05:30
Mihir Kandoi
6f010915fe Merge pull request #46424 from mihir-kandoi/45440
fix: show remaining qty on 'Complete Job' button instead of full qty
2025-03-12 00:30:55 +05:30
Mihir Kandoi
52b76736d3 Merge pull request #46455 from mihir-kandoi/fix_production_analytics
fix: error in production analytics report
2025-03-12 00:29:41 +05:30
Mihir Kandoi
f5d5508035 Merge pull request #46460 from mihir-kandoi/fix_rename_sle_fields_2
fix: rename sla fields patch
2025-03-12 00:26:35 +05:30
Mihir Kandoi
b6c18849c5 fix: rename sla fields patch 2025-03-12 00:03:08 +05:30
rohitwaghchaure
c1a8de9fcd Merge pull request #46452 from mihir-kandoi/fix_sla_fields_patch
fix: sla fields patch
2025-03-11 23:37:10 +05:30
Raffael Meyer
f1398a50e7 Merge pull request #46453 from barredterra/ignore-release-label
ci: ignore PRs labeled with "skip-release-notes" when generating release notes
2025-03-11 17:34:09 +01:00
Mihir Kandoi
03e66468f6 fix: error in production analytics report 2025-03-11 22:02:23 +05:30
barredterra
57007bf937 ci: ignore PRs labeled with "skip-release-notes" when generating release notes 2025-03-11 17:11:35 +01:00
Mihir Kandoi
d653899372 fix: sla fields patch 2025-03-11 21:18:18 +05:30
ruthra kumar
74208a3e06 Merge pull request #46448 from frappe/revert-45958-validate-party-address
Revert "fix: validate address and contact related to party"
2025-03-11 18:12:42 +05:30
ruthra kumar
b81ad55acd Merge pull request #46398 from aerele/coa-name-fix
chore: rename print and stationery account
2025-03-11 17:32:20 +05:30
ruthra kumar
24e4d92202 Revert "Merge pull request #45958 from aerele/validate-party-address"
This reverts commit 18fdd17e94.
2025-03-11 17:30:52 +05:30
ruthra kumar
44835126db Merge pull request #46344 from aerele/e-invoicing-regional-validation
fix: make 'company_tax_id' and 'company_fiscal_code' as mandatory
2025-03-11 17:11:26 +05:30
ruthra kumar
121798ba85 chore: translatable strings 2025-03-11 16:55:04 +05:30
ruthra kumar
a2881b5be0 Merge pull request #45818 from vishakhdesai/set-correct-account-currency-deferred-expense
fix: set correct account currency for deferred expense account
2025-03-11 16:35:19 +05:30
vishakhdesai
398083853c fix: set correct account currency for deferred expence account in PI 2025-03-11 15:33:36 +05:30
Sugesh G
18fdd17e94 Merge pull request #45958 from aerele/validate-party-address
fix: validate address and contact related to party
2025-03-11 14:28:23 +05:30
rohitwaghchaure
9b7e936169 Merge pull request #46436 from rohitwaghchaure/fixed-support-32871-1
fix: filter batches that going to be zero
2025-03-11 13:31:40 +05:30
Sugesh393
7e92e4967a fix: add patch to update base_outstanding and base_paid_amount 2025-03-11 11:52:42 +05:30
Sugesh393
6c2f9a563e fix: add base_outstanding and base_paid_amount in payment schedule table 2025-03-11 11:49:35 +05:30
ruthra kumar
66d5aab8ac Merge pull request #46372 from aerele/update-account-number
fix(account): update account number from parent company
2025-03-11 11:01:08 +05:30
ruthra kumar
9dd801ff3b Merge pull request #46426 from asmitahase/employee-tree
fix: clear cashe on employee hierarchy change
2025-03-11 10:41:46 +05:30
Rohit Waghchaure
aba512c1c6 fix: filter batches that going to be zero 2025-03-11 10:13:34 +05:30
Raffael Meyer
c962b2e97b Merge pull request #45955 from barredterra/buying-translatability
refactor: improve translatability in buying controller
2025-03-11 02:07:12 +01:00
Raffael Meyer
5caef24335 chore: fix file naming for Crowdin integration (#46434) 2025-03-11 01:03:56 +00:00
rohitwaghchaure
7a584d3228 Merge pull request #46427 from frappe/mergify/bp/develop/pr-46414
fix: not able to save work order with alternative item (backport #46414)
2025-03-10 23:14:05 +05:30
Frappe PR Bot
04e9134016 fix: sync translations from crowdin (#46394)
* fix: Croatian translations

* fix: Bosnian translations

* fix: Croatian translations

* fix: French translations

* fix: Spanish translations

* fix: Arabic translations

* fix: Hungarian translations

* fix: Polish translations

* fix: Russian translations

* fix: Swedish translations

* fix: Turkish translations

* fix: Chinese Simplified translations

* fix: Persian translations

* fix: Bosnian translations

* fix: German translations

* fix: Esperanto translations

* fix: Portuguese, Brazilian translations

* fix: Thai translations

* fix: Croatian translations
2025-03-10 13:43:58 +01:00
Rohit Waghchaure
ac7fc608aa fix: not able to save work order with alternative item
(cherry picked from commit 6ca1f9bc73)
2025-03-10 12:10:54 +00:00
Asmita Hase
6789578b27 fix: clear cashe on employee hierarchy change to reflect updated permissions 2025-03-10 17:06:03 +05:30
ruthra kumar
3376f37012 Merge pull request #46423 from frappe/revert-46172-credit_note_column
Revert "fix: Show Credit Note amount in credit note column"
2025-03-10 16:56:31 +05:30
ruthra kumar
9aacd90633 Merge pull request #46407 from mahsem/typo_sales_invoice_print
fix: typo in sales_invoice_print
2025-03-10 16:47:27 +05:30
Mihir Kandoi
db93302a53 fix: show remaining qty on 'Complete Job' button instead of full qty 2025-03-10 16:44:16 +05:30
Akhil Narang
f9cac1c186 fix(README): recommend using .localhost instead of .dev (#46422)
All `.dev` domains have HSTS enforced by default and so require SSL to access.

`.localhost` hosts automatically resolve without requiring edits to hosts files

Signed-off-by: Akhil Narang <me@akhilnarang.dev>
2025-03-10 16:27:01 +05:30
ruthra kumar
5a9767ca67 Revert "fix: Show Credit Note amount in credit note column" 2025-03-10 16:24:43 +05:30
rohitwaghchaure
9026b67333 Merge pull request #46418 from rohitwaghchaure/fixed-support-33273
fix: stock balance in and out value
2025-03-10 15:34:45 +05:30
Rohit Waghchaure
e917bd5334 fix: stock balance in and out value 2025-03-10 14:44:29 +05:30
ruthra kumar
98690c42b0 Merge pull request #46412 from ruthra-kumar/revert_mergify_and_lock_thread_changes
ci: re-enable label backports and decrease lock frequency
2025-03-10 08:47:05 +05:30
ruthra kumar
97733c8974 ci: re-enable label backports and decrease lock frequency 2025-03-10 08:31:22 +05:30
Frappe PR Bot
0afcf59ba1 chore: update POT file (#46406) 2025-03-09 11:50:11 +01:00
mahsem
f7bcae83e4 fix: typo in sales_invoice_print 2025-03-09 11:11:54 +01:00
rohitwaghchaure
0bd80f98a8 Merge pull request #46395 from mihir-kandoi/st33499
fix: consider account freeze date in recalculate_amount_difference_fi…
2025-03-08 20:20:52 +05:30
ruthra kumar
262798e319 Merge pull request #46401 from ruthra-kumar/fix_typo
chore: fix typo
2025-03-08 15:11:00 +05:30
ruthra kumar
a4c913a794 chore: fix typo 2025-03-08 14:54:11 +05:30
ruthra kumar
60379241d8 Merge pull request #46400 from ruthra-kumar/lock_frequently
ci: increase conversion lock frequency
2025-03-08 14:40:02 +05:30
ruthra kumar
ab8134aec6 ci: lock frequently 2025-03-08 14:21:11 +05:30
ruthra kumar
eca5a8e6ab Merge pull request #46399 from ruthra-kumar/temp_disable_label_backports
ci: temporarily disable label based backports
2025-03-08 13:37:06 +05:30
ruthra kumar
d2732e376c ci: temporarily disable label based backports 2025-03-08 13:20:44 +05:30
chethank1407
615997b774 chore: rename print and stationery account 2025-03-08 13:04:50 +05:30
ruthra kumar
f5d061d2dd Merge pull request #46064 from ruthra-kumar/transaction_currency_from_parent_document
fix: Debit and Credit mismatch on transaction currency debit and credit values
2025-03-08 12:05:13 +05:30
ruthra kumar
f1d8feec15 refactor: internal transfer gl 2025-03-08 11:45:12 +05:30
Mihir Kandoi
cd72532789 fix: consider stock freeze date in recalculate_amount_difference_field patch 2025-03-08 11:38:28 +05:30
Mihir Kandoi
696f931678 fix: consider account freeze date in recalculate_amount_difference_field patch 2025-03-08 11:31:33 +05:30
ruthra kumar
55d0636123 test: assert total debit and credit for trx currency 2025-03-08 09:35:08 +05:30
ruthra kumar
455a55b2ce refactor: handle rounding diff for trx currency dr and cr 2025-03-08 09:35:08 +05:30
ruthra kumar
4cd3f3531c refactor: trx currency dr and cr for tax rows and item rows 2025-03-08 09:35:08 +05:30
ruthra kumar
7528ef147a refactor: convert tax amount using exchange rate 2025-03-08 09:35:08 +05:30
ruthra kumar
6545467aec fix: incorrect category in list 2025-03-08 09:35:08 +05:30
ruthra kumar
bc792c61e9 chore: typo 2025-03-08 09:35:08 +05:30
ruthra kumar
b348aa3b37 refactor: isolate to specific doctypes 2025-03-08 09:35:08 +05:30
ruthra kumar
23d465805b refactor(test): save first to let the tax table populate 2025-03-08 09:35:08 +05:30
ruthra kumar
a31770d122 fix(test): incorrect transaction exchange rate in test case 2025-03-08 09:35:08 +05:30
ruthra kumar
ceca5b4c72 refactor: set transaction currency and rate before gl map 2025-03-08 09:35:08 +05:30
ruthra kumar
5c86e3ce85 refactor: handle payment entry 2025-03-08 09:35:08 +05:30
ruthra kumar
9f3847c0f8 refactor: handle Journal entries 2025-03-08 09:35:08 +05:30
ruthra kumar
d1d06885dc refactor: move utility method to controller 2025-03-08 09:35:08 +05:30
ruthra kumar
3e292ef2cb refactor: set transaction currency dr/cr in sales invoice 2025-03-08 09:35:08 +05:30
ruthra kumar
ee93ed8c97 refactor: handle stocked items 2025-03-08 09:35:08 +05:30
ruthra kumar
7ff3977394 refactor: handle stocked items 2025-03-08 09:35:08 +05:30
ruthra kumar
e9af567033 refactor: set tr currency dr & cr directly on parent document 2025-03-08 09:35:08 +05:30
ruthra kumar
b115bf2e2a refactor: use highest precision for storing exc rate 2025-03-08 09:35:08 +05:30
ruthra kumar
f5f138ef9d Merge pull request #46393 from ruthra-kumar/fix_error_on_internal_transfer_po_so
fix: attribute error on internal so and po
2025-03-08 09:30:14 +05:30
ruthra kumar
f585fd6b88 fix: attribute error on internal so and po 2025-03-08 09:14:36 +05:30
Florian HENRY
49dcd96909 feat(accounting): allow chart_of_account.get_chart to be whilelist 2025-03-07 12:29:51 +01:00
Mihir Kandoi
501f07803e refactor: import functions in new report instead of redundant code 2025-03-07 12:05:31 +05:30
Mihir Kandoi
5592d8e87f feat: available serial no report 2025-03-07 11:54:15 +05:30
maasanto
faa340c8b5 feat: Add first and last name fields to quick entry customer creation (#46281)
* feat: Add First and Last Name Fields to Quick Entry Customer Creation Form

* fix: added first and last_name fields to customer dt

* chore: linter issues

* chore: linter issue

* chore: linter issue

---------

Co-authored-by: Nabin Hait <nabinhait@gmail.com>
2025-03-07 10:31:45 +05:30
Mihir Kandoi
98111dac17 Merge pull request #46374 from mihir-kandoi/33265
fix: rare precision issue preventing submission of subcontracting order
2025-03-06 22:15:18 +05:30
Mihir Kandoi
33b71544db fix: rare precision issue preventing submission of subcontracting order 2025-03-06 20:58:08 +05:30
venkat102
4a4894bc01 fix(account): update account number from parent company 2025-03-06 18:33:53 +05:30
mergify[bot]
18832c057c fix: auto email report creation (backport #46343) (#46364)
fix: auto email report creation (#46343)

* fix(financial_statements): mandatory based on filter_based_on value

* fix(financial_statements.js): include options for multiselect

(cherry picked from commit 5cc251a172)

Co-authored-by: Justine Jay <jjaycaneza@gmail.com>
2025-03-06 18:12:42 +05:30
Bhavansathru
7b6ebad9e6 fix: validate accounting dimension company in Journal Entry & Stock Entry (#46204)
* fix: validate accounting dimension company in journal entry and stock entry

* test: update test cases to validate company-based accounting dimension

* fix(test): ensure 'Pick List' company matches 'Delivery Note' to prevent test failures

* chore: remove redundant lines of code
2025-03-06 17:51:20 +05:30
Ninad Parikh
d01367eefe fix: base_net_rate Required to Check Valid Range (#46332)
fix: base_net_rate required to check valid range
2025-03-06 17:34:25 +05:30
ruthra kumar
ba2f887be9 Merge pull request #46363 from ruthra-kumar/incorrect_yaml_format
ci: fix incorrect yaml format
2025-03-06 17:33:09 +05:30
Sanket Shah
606dcb0ad1 fix: change fieldname for cash_flow to export (#46353)
fix: change fieldname for cash_flow

Co-authored-by: Sanket322 <shahsanket322003.com>
2025-03-06 17:20:12 +05:30
Shariq Ansari
884709deb8 fix: Allow rename prospect doctype (#46352)
fix: allow rename prospect doctype
2025-03-06 17:19:14 +05:30
ruthra kumar
81d460e4bd ci: fix incorrect yaml format 2025-03-06 17:17:37 +05:30
ruthra kumar
87e7f0f4d7 Merge pull request #46349 from frappe/l10n_develop
fix: sync translations from crowdin
2025-03-06 17:04:28 +05:30
rohitwaghchaure
2e207d651d Merge pull request #46354 from mihir-kandoi/46351
fix: recalculate_amount_difference_field patch
2025-03-06 13:27:43 +05:30
rohitwaghchaure
93779c88d2 Merge pull request #46355 from mihir-kandoi/46348
fix: rename_sla_fields patch
2025-03-06 13:18:01 +05:30
Mihir Kandoi
95d1976931 fix: check if set_landed_cost_based_on_purchase_invoice_rate is enabled before running patch 2025-03-06 13:11:31 +05:30
Mihir Kandoi
0492b941ff fix: recalculate_amount_difference_field patch 2025-03-06 12:58:53 +05:30
Mihir Kandoi
e8d4a487c6 fix: rename_sla_fields patch 2025-03-06 12:57:27 +05:30
Frappe PR Bot
40c92b0988 fix: Bosnian translations 2025-03-06 09:53:15 +05:30
rohitwaghchaure
137090ca77 Merge pull request #46339 from rohitwaghchaure/fixed-report-incorrect-sabb
fix: doctype name
2025-03-05 21:16:49 +05:30
Bhavan23
abd044eb0d fix: make 'company_tax_id' and 'company_fiscal_code' as mandatory 2025-03-05 20:09:21 +05:30
Rohit Waghchaure
d039310d80 fix: doctype name 2025-03-05 18:07:17 +05:30
Ejaaz Khan
38aa7cab8a feat: create sales invoice print format (#45403)
* feat: create sales invoice print format

* fix: linter issue

* style: remove border from table

* refactor: change label to uppercase and show taxes

* refactor: format date and add translation on label

* refactor: remove default header and format labels

* refactor: change label style and small fix

* chore: Qty in title case

---------

Co-authored-by: Nabin Hait <nabinhait@gmail.com>
2025-03-05 12:36:59 +00:00
Sugesh G
8caf7f275e fix(pos): get parent item group without user permission (#46020)
* fix(pos): get parent item group without user permission

* feat: add item group filter based on user permission

---------

Co-authored-by: venkat102 <venkatesharunachalam659@gmail.com>
2025-03-05 18:06:42 +05:30
Diptanil Saha
35512d40bb fix: replacing serial and batch bundle on pos with auto fetch serial nos (#46236)
* fix: replacing serial and batch bundle on pos with auto fetch serial nos

* fix: reserved serial no

added a check to look for serial no in reserved serial nos list before removing it as there might be a situation where an item is returned which was already consolidated.
2025-03-05 17:41:43 +05:30
Khushi Rawat
f50d479bfd fix: exclude already consumed purchase receipt items from asset capitalization (#46329)
* feat: link purchase receipt row item to capitalization

* fix: avoid fetching already consumed stock and asset items during capitalization

* fix(patch): added patch to link purchase receipt item to stock item child table

* fix: added nosemgrep

* refactor: rename  to
2025-03-05 17:39:24 +05:30
rohitwaghchaure
cb004709ff Merge pull request #46330 from rohitwaghchaure/fixed-support-33209
fix: Accounting Period validation throwing for different companies
2025-03-05 16:40:07 +05:30
Prateek Karamchandani
4f559b6df2 fix: allow variant uom to differ from template uom (#45850) 2025-03-05 16:37:42 +05:30
Mihir Kandoi
58ed697ba5 fix: uom reverts to default upon selecting do not explode (#45693)
* fix: uom reverts to default upon selecting do not explode

* fix: logical error failing tests
2025-03-05 16:33:57 +05:30
Venkatesh
4ef7e6424a fix: set stock adjustment account in difference account (#45606)
* fix: set stock adjustment account in difference account

* fix(stock entry): fetch stock difference account for manufacture entry
2025-03-05 16:32:03 +05:30
rohitwaghchaure
6c0b18b19f Merge pull request #46313 from mihir-kandoi/st33100
fix: production analytics report
2025-03-05 16:23:13 +05:30
Rohit Waghchaure
b1508efca2 fix: Accounting Period validation throwing for different companies 2025-03-05 16:19:47 +05:30
mergify[bot]
82c0995f2e fix: Close and Reopen buttons dissapear after saving changes (backport #46048) (#46325)
fix: Close and Reopen buttons dissapear after saving changes (#46048)

* fix: Close and Reopen buttons dissapear after saving changes

* style: linter issue

---------

Co-authored-by: Nabin Hait <nabinhait@gmail.com>
(cherry picked from commit 506dd3c6b9)

Co-authored-by: Ben Kebdani <benkebdani@users.noreply.github.com>
2025-03-05 16:18:56 +05:30
Diptanil Saha
c4eb577a76 chore: erpnext demo url update (#46327) 2025-03-05 15:47:20 +05:30
Corentin Forler
a700345cee refactor: Remove duplicate inherited method (#46030)
The method add_taxes_from_item_tax_template is defined identically in the erpnext.taxes_and_totals class, that erpnext.TransactionController extends.
2025-03-05 15:38:05 +05:30
0xD0M1M0
104f60cc57 fix: Naming of Purchase Amount (#46051)
* fix: Naming of Purchase Amount

* fix: linters
2025-03-05 15:24:23 +05:30
Mihir Kandoi
6cc3d67835 feat: add new Closed and Stopped rows 2025-03-05 15:14:54 +05:30
Diptanil Saha
926e4ecc4f fix: adding cost center on pos invoice items while applying product discount (#46082) 2025-03-05 15:14:31 +05:30
Lakshit Jain
1f685efcaf fix: consolidate gl entries by project in General Ledger Report (#46314) 2025-03-05 15:08:52 +05:30
Sugesh G
425fb12e91 fix: consider journal entry and return invoice in paid_amount calculation (#46129)
* fix: consider journal entry and return invoice in paid_amount calculation

* test: add new unit test to consider journal entry and return invoice in paid_amount calculation
2025-03-05 14:47:22 +05:30
Fab
c5f90c823d Merge pull request #45840 from gms-electronics/40254-italian-einvoice
fix:[regional] Italian einvoice xml generated with wrong prices (#40254)
2025-03-05 14:45:54 +05:30
rohitwaghchaure
70128881a8 Merge pull request #45947 from mihir-kandoi/st31369
fix: set landed cost based on purchase invoice rate
2025-03-05 14:31:31 +05:30
rohitwaghchaure
694098a578 Merge pull request #45761 from rohitwaghchaure/fixed-support-31024
fix: incorrect batch picked in the pick list
2025-03-05 14:19:53 +05:30
Mihir Kandoi
961258a4ce fix: use else instead of unnecessary elif 2025-03-05 13:56:10 +05:30
Mihir Kandoi
772e9ecfaa fix: production analytics report 2025-03-05 13:48:34 +05:30
Raffael Meyer
94547188bf feat(Sales Invoice): add items row via "Fetch Timesheet" (#46071) 2025-03-05 13:21:40 +05:30
Diógenes Souza
89bcdd6fa5 fix: Wrong Overdue Status in Sales Invoices (Floating-point arithmetic) (#46146)
* fix: Wrong Overdue Status in Sales Invoices (Floating-point arithmetic)

* style: after run pre-commit
2025-03-05 13:16:45 +05:30
Venkatesh
2d26bff870 fix: use value from currency exchange when exchange api is disabled (#46137) 2025-03-05 13:15:20 +05:30
Mihir Kandoi
3bb6a311de Merge branch 'develop' into st31369 2025-03-05 12:48:19 +05:30
rohitwaghchaure
27446a68b7 Merge pull request #45987 from mihir-kandoi/st31052-3
fix: rename some sla fields
2025-03-05 12:45:53 +05:30
Nabin Hait
5513e24b00 fix(workspace): enable is_query_report on purchase reports (#46249)
* fix(workspace): enable is_query_report on purchase reports

* fix: resolved conflict

---------

Co-authored-by: venkat102 <venkatesharunachalam659@gmail.com>
2025-03-05 12:30:09 +05:30
Khushi Rawat
4a542b22a4 fix: depreciation and balances report correction (#46259) 2025-03-05 12:29:23 +05:30
Lakshit Jain
88fcdbb81e fix: only include submitted docs for internal received quantity validation (#46262) 2025-03-05 12:27:47 +05:30
ruthra kumar
0f6062efee Merge pull request #46294 from ruthra-kumar/temporary_exclude_old_prs
ci: dont lock really old pull requests
2025-03-05 12:26:22 +05:30
Sudharsanan Ashok
6117706ab5 feat(received items to be billed): add company and date filters (#46271)
* feat(received items to be billed): add company and date filters

* feat(delivered to be billed): add company and date filters

* feat: add company and date conditions

* chore: remove debugger
2025-03-05 12:25:43 +05:30
rohitwaghchaure
65a229abb1 Merge pull request #46226 from mihir-kandoi/refactor_sc_feilds
refactor: rename subcontracting fields
2025-03-05 12:25:08 +05:30
rohitwaghchaure
93fe9203da Merge pull request #46258 from mihir-kandoi/46196
fix: delivery note from sales order uom conversion mistake
2025-03-05 12:20:59 +05:30
Frappe PR Bot
4c810a878c fix: sync translations from crowdin (#46287)
* fix: French translations

* fix: Arabic translations

* fix: Persian translations

* fix: Bosnian translations

* fix: Portuguese, Brazilian translations

* fix: Thai translations

* fix: Croatian translations
2025-03-05 12:19:53 +05:30
Kunhi
a8d1cbc1c3 fix: Add company filter at get_invoice method (#46238) 2025-03-05 12:18:17 +05:30
Mihir Kandoi
01b5fb2f91 Merge branch 'develop' into st31052-3 2025-03-05 12:14:01 +05:30
Mihir Kandoi
ceaf217341 Merge branch 'develop' into st31369 2025-03-05 12:13:13 +05:30
rohitwaghchaure
62837099fc Merge pull request #46046 from mihir-kandoi/st32237-2
perf: optimize query in project.py
2025-03-05 12:10:16 +05:30
rohitwaghchaure
2b703c233b Merge pull request #46068 from mihir-kandoi/st32081
fix: use valuation method from settings in stock ageing report
2025-03-05 12:07:46 +05:30
Priyansh Shah
59e99f167d fix: Include additional account types for Expense Account in LCV (#46206)
fix: additional account types in filters for the Expense account selection
2025-03-05 12:07:25 +05:30
ruthra kumar
bb12551599 ci: dont lock really old pull requests
temporary change. mergify incorrectly triggers backport for really old
pull requests
2025-03-05 12:01:43 +05:30
Mihir Kandoi
49a43d355d fix: delivery note from sales order uom conversion mistake 2025-03-04 11:48:28 +05:30
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
Bhavan23
a29c6a5aea fix: run bank reconciliation as a background job to prevent request timeout 2025-03-03 18:10:59 +05:30
barredterra
8db1fcd19c refactor: improve translatability in buying controller (2)
Added full stops and support for custom fieldnames. Improved wording.
2025-03-03 13:22:46 +01:00
Mihir Kandoi
b4f65154f5 refactor: rename subcontracting fields 2025-03-02 17:16:17 +05:30
marination
c1e4e7af28 feat: Unit Price Contract 2025-02-28 23:04:29 +01:00
JK1117
daa5bebdd0 fix: use source_fieldname to validate inventory dimension 2025-02-27 15:17:39 +08:00
JK1117
4e63ee1a70 feat: fetch source_fieldname for inventory dimension 2025-02-27 15:17:10 +08:00
Patrick Eissler
3876cf0c2b refactor: make linter happy 2025-02-24 08:51:36 +01:00
Patrick Eissler
85f46d6e32 fix: only update User Permissions if a relevant field has changed 2025-02-24 08:47:17 +01:00
Mihir Kandoi
6073f5a6f9 test: added test 2025-02-23 22:26:52 +05:30
Mihir Kandoi
da09c278c8 fix: use valuation method from settings in stock ageing report 2025-02-21 19:08:12 +05:30
Mihir Kandoi
f7594e2ff9 fix: revamp logic (split parent and child) 2025-02-21 11:04:14 +05:30
Mihir Kandoi
2f1e253e19 fix: syntax error 2025-02-20 15:28:13 +05:30
Mihir Kandoi
5e66231ca4 perf: replace if function in query 2025-02-20 15:03:19 +05:30
Mihir Kandoi
0c465b0f32 Merge branch 'develop' into st31369 2025-02-19 16:04:26 +05:30
Mihir Kandoi
dcec446e55 fix: patch path 2025-02-19 13:10:13 +05:30
Mihir Kandoi
1230127d24 fix: patch 2025-02-19 13:03:45 +05:30
Mihir Kandoi
019303dd12 fix: tests 2025-02-18 22:02:13 +05:30
Mihir Kandoi
1b831e9abd fix: tests 2025-02-18 21:30:24 +05:30
Mihir Kandoi
baa0dd1235 fix: rename some sla fields 2025-02-18 21:30:21 +05:30
Mihir Kandoi
154e9813c4 fix: revert last commit 2025-02-17 21:52:49 +05:30
Mihir Kandoi
7cf8e498c4 fix: fiscal year error 2025-02-17 18:44:33 +05:30
Mihir Kandoi
a41024813b perf: patch 2025-02-17 18:08:31 +05:30
barredterra
b9450288f5 refactor: improve translatability in buying controller 2025-02-17 12:16:39 +01:00
Mihir Kandoi
17d415b105 fix: set landed cost based on purchase invoice rate 2025-02-17 14:36:15 +05:30
Patrick Eissler
92f63a026b chore: use existing utility function 2025-02-14 16:28:40 +01:00
Patrick Eissler
dee46c6954 fix(Employee): remove User Permissions if create_user_permission is unchecked 2025-02-14 15:14:03 +01:00
Rohit Waghchaure
e1b7688a17 fix: incorrect batch picked in the pick list 2025-02-11 15:13:13 +05:30
843 changed files with 666880 additions and 436905 deletions

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

@@ -6,7 +6,7 @@ cd ~ || exit
sudo apt update
sudo apt remove mysql-server mysql-client
sudo apt install libcups2-dev redis-server mariadb-client
sudo apt install libcups2-dev redis-server mariadb-client libmariadb-dev
pip install frappe-bench
@@ -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

@@ -8,6 +8,7 @@
"mail_login": "test@example.com",
"mail_password": "test",
"admin_password": "admin",
"use_mysqlclient": 1,
"root_login": "root",
"root_password": "root",
"host_name": "http://test_site:8000",

4
.github/release.yml vendored Normal file
View File

@@ -0,0 +1,4 @@
changelog:
exclude:
labels:
- skip-release-notes

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

@@ -0,0 +1,30 @@
name: "Auto-label PRs based on title"
on:
pull_request_target:
types: [opened, reopened]
jobs:
add-label-if-prefix-matches:
permissions:
contents: read
pull-requests: write
runs-on: ubuntu-latest
steps:
- name: Check PR title and add label if it matches prefixes
uses: actions/github-script@v7
continue-on-error: true
with:
script: |
const title = context.payload.pull_request.title.toLowerCase();
const prefixes = ['chore', 'ci', 'style', 'test', 'refactor'];
// Check if the PR title starts with any of the prefixes
if (prefixes.some(prefix => title.startsWith(prefix))) {
await github.rest.issues.addLabels({
owner: context.repo.owner,
repo: context.repo.repo,
issue_number: context.payload.pull_request.number,
labels: ['skip-release-notes']
});
}

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

@@ -10,6 +10,9 @@ on:
- '**.csv'
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 +39,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

@@ -11,6 +11,9 @@ on:
- "**.html"
- "**.csv"
permissions:
contents: read
jobs:
test:
runs-on: ubuntu-latest

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

@@ -10,6 +10,9 @@ on:
- "**.md"
- "**.html"
permissions:
contents: read
jobs:
test:
runs-on: ubuntu-latest

View File

@@ -25,6 +25,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 +68,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

@@ -12,6 +12,9 @@ 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 +53,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

@@ -1,5 +1,5 @@
exclude: 'node_modules|.git'
default_stages: [commit]
default_stages: [pre-commit]
fail_fast: false

View File

@@ -7,6 +7,7 @@
<p>Powerful, Intuitive and Open-Source ERP</p>
</p>
[![Learn on Frappe School](https://img.shields.io/badge/Frappe%20School-Learn%20ERPNext-blue?style=flat-square)](https://frappe.school)<br><br>
[![CI](https://github.com/frappe/erpnext/actions/workflows/server-tests-mariadb.yml/badge.svg?event=schedule)](https://github.com/frappe/erpnext/actions/workflows/server-tests-mariadb.yml)
[![docker pulls](https://img.shields.io/docker/pulls/frappe/erpnext-worker.svg)](https://hub.docker.com/r/frappe/erpnext-worker)
@@ -17,7 +18,7 @@
</div>
<div align="center">
<a href="https://erpnext-demo.frappe.cloud/app/home">Live Demo</a>
<a href="https://erpnext-demo.frappe.cloud/api/method/erpnext_demo.erpnext_demo.auth.login_demo">Live Demo</a>
-
<a href="https://frappe.io/erpnext">Website</a>
-
@@ -114,10 +115,7 @@ To setup the repository locally follow the steps mentioned below:
2. In a separate terminal window, run the following commands:
```
# Create a new site
bench new-site erpnext.dev
# Map your site to localhost
bench --site erpnext.dev add-to-hosts
bench new-site erpnext.localhost
```
3. Get the ERPNext app and install it
@@ -126,14 +124,14 @@ To setup the repository locally follow the steps mentioned below:
bench get-app https://github.com/frappe/erpnext
# Install the app
bench --site erpnext.dev install-app erpnext
bench --site erpnext.localhost install-app erpnext
```
4. Open the URL `http://erpnext.dev:8000/app` in your browser, you should see the app running
4. Open the URL `http://erpnext.localhost:8000/app` in your browser, you should see the app running
## Learning and community
1. [Frappe School](https://frappe.school) - Learn Frappe Framework and ERPNext from the various courses by the maintainers or from the community.
1. [Frappe School](https://school.frappe.io) - Learn Frappe Framework and ERPNext from the various courses by the maintainers or from the community.
2. [Official documentation](https://docs.erpnext.com/) - Extensive documentation for ERPNext.
3. [Discussion Forum](https://discuss.erpnext.com/) - Engage with community of ERPNext users and service providers.
4. [Telegram Group](https://erpnext_public.t.me) - Get instant help from huge community of users.
@@ -144,6 +142,7 @@ To setup the repository locally follow the steps mentioned below:
1. [Issue Guidelines](https://github.com/frappe/erpnext/wiki/Issue-Guidelines)
1. [Report Security Vulnerabilities](https://erpnext.com/security)
1. [Pull Request Requirements](https://github.com/frappe/erpnext/wiki/Contribution-Guidelines)
2. [Translations](https://crowdin.com/project/frappe)
## Logo and Trademark Policy

View File

@@ -4,7 +4,11 @@ files:
pull_request_title: "fix: sync translations from crowdin"
pull_request_labels:
- translation
- skip-release-notes
pull_request_reviewers:
- barredterra # change to your GitHub username if you copied this file
commit_message: "fix: %language% translations"
append_commit_message: false
languages_mapping:
two_letters_code:
pt-BR: pt_BR

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

@@ -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)
@@ -500,7 +500,7 @@ def update_account_number(name, account_name, account_number=None, from_descenda
"name",
)
if old_name:
if old_name and not from_descendant:
# same account in parent company exists
allow_child_account_creation = _("Allow Account Creation Against Child Company")
@@ -602,9 +602,10 @@ 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
try:
# We also lock inserts to GL entry table with for_update here.
last_gl_update = frappe.db.get_value("GL Entry", {}, "modified", for_update=True, wait=False)
@@ -612,6 +613,9 @@ def _ensure_idle_system():
# wait=False fails immediately if there's an active transaction.
last_gl_update = add_to_date(None, seconds=-1)
if not last_gl_update:
return
if last_gl_update > add_to_date(None, minutes=-5):
frappe.throw(
_(

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

@@ -116,6 +116,7 @@ def identify_is_group(child):
return is_group
@frappe.whitelist()
def get_chart(chart_template, existing_company=None):
chart = {}
if existing_company:

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

@@ -98,7 +98,7 @@
"Office Maintenance Expenses": {},
"Office Rent": {},
"Postal Expenses": {},
"Print and Stationary": {},
"Print and Stationery": {},
"Rounded Off": {
"account_type": "Round Off"
},

View File

@@ -0,0 +1,6 @@
[
{
"doctype": "Account",
"name": "_Test Account 1"
}
]

View File

@@ -1,3 +0,0 @@
[[Account]]
name = "_Test Account 1"

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)
@@ -213,7 +213,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

@@ -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,14 @@
"show_taxes_as_table_in_print",
"column_break_12",
"show_payment_schedule_in_print",
"item_price_settings_section",
"maintain_same_internal_transaction_rate",
"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 +66,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 +86,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 +548,111 @@
"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"
}
],
"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-06-23 15:55:33.346398",
"modified_by": "Administrator",
"module": "Accounts",
"name": "Accounts Settings",
@@ -564,8 +677,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
@@ -50,13 +53,17 @@ class AccountsSettings(Document):
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 +73,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 +144,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

@@ -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

@@ -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(
@@ -160,9 +178,6 @@ def get_payment_entries_for_bank_clearance(
as_dict=1,
)
if bank_account:
condition += "and bank_account = %(bank_account)s"
payment_entries = frappe.db.sql(
f"""
select
@@ -184,7 +199,6 @@ def get_payment_entries_for_bank_clearance(
"account": account,
"from": from_date,
"to": to_date,
"bank_account": bank_account,
},
as_dict=1,
)

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

@@ -8,6 +8,7 @@ import frappe
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 erpnext import get_default_cost_center
@@ -373,10 +374,37 @@ def auto_reconcile_vouchers(
from_reference_date=None,
to_reference_date=None,
):
frappe.flags.auto_reconcile_vouchers = True
reconciled, partially_reconciled = set(), set()
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,
)
frappe.msgprint(_("Auto Reconciliation has started in the background"))
else:
start_auto_reconcile(
bank_transactions,
from_date,
to_date,
filter_by_reference_date,
from_reference_date,
to_reference_date,
)
def start_auto_reconcile(
bank_transactions, from_date, to_date, filter_by_reference_date, from_reference_date, to_reference_date
):
frappe.flags.auto_reconcile_vouchers = True
reconciled, partially_reconciled = set(), set()
for transaction in bank_transactions:
linked_payments = get_linked_payments(
transaction.name,
@@ -414,7 +442,6 @@ def auto_reconcile_vouchers(
frappe.msgprint(title=_("Auto Reconciliation"), msg=alert_message, indicator=indicator)
frappe.flags.auto_reconcile_vouchers = False
return reconciled, partially_reconciled
def get_auto_reconcile_message(partially_reconciled, reconciled):
@@ -491,16 +518,23 @@ def subtract_allocations(gl_account, vouchers):
voucher_allocated_amounts = get_total_allocated_amount(voucher_docs)
for voucher in vouchers:
rows = voucher_allocated_amounts.get((voucher.get("doctype"), voucher.get("name"))) or []
filtered_row = list(filter(lambda row: row.get("gl_account") == gl_account, rows))
if amount := None if not filtered_row else filtered_row[0]["total"]:
if amount := get_allocated_amount(voucher_allocated_amounts, voucher, gl_account):
voucher["paid_amount"] -= amount
copied.append(voucher)
return copied
def get_allocated_amount(voucher_allocated_amounts, voucher, gl_account):
if not (voucher_details := voucher_allocated_amounts.get((voucher.get("doctype"), voucher.get("name")))):
return
if not (row := voucher_details.get(gl_account)):
return
return row.get("total")
def check_matching(
bank_account,
company,
@@ -770,26 +804,20 @@ def get_je_matching_query(
je = frappe.qb.DocType("Journal Entry")
jea = frappe.qb.DocType("Journal Entry Account")
ref_condition = je.cheque_no == transaction.reference_number
ref_rank = frappe.qb.terms.Case().when(ref_condition, 1).else_(0)
amount_field = f"{cr_or_dr}_in_account_currency"
amount_equality = getattr(jea, amount_field) == transaction.unallocated_amount
amount_rank = frappe.qb.terms.Case().when(amount_equality, 1).else_(0)
filter_by_date = je.posting_date.between(from_date, to_date)
if cint(filter_by_reference_date):
filter_by_date = je.cheque_date.between(from_reference_date, to_reference_date)
query = (
subquery = (
frappe.qb.from_(jea)
.join(je)
.on(jea.parent == je.name)
.select(
(ref_rank + amount_rank + 1).as_("rank"),
Sum(getattr(jea, amount_field)).as_("paid_amount"),
ConstantColumn("Journal Entry").as_("doctype"),
je.name,
getattr(jea, amount_field).as_("paid_amount"),
je.cheque_no.as_("reference_no"),
je.cheque_date.as_("reference_date"),
je.pay_to_recd_from.as_("party"),
@@ -801,13 +829,26 @@ def get_je_matching_query(
.where(je.voucher_type != "Opening Entry")
.where(je.clearance_date.isnull())
.where(jea.account == common_filters.bank_account)
.where(amount_equality if exact_match else getattr(jea, amount_field) > 0.0)
.where(filter_by_date)
.groupby(je.name)
.orderby(je.cheque_date if cint(filter_by_reference_date) else je.posting_date)
)
if frappe.flags.auto_reconcile_vouchers is True:
query = query.where(ref_condition)
subquery = subquery.where(je.cheque_no == transaction.reference_number)
ref_rank = frappe.qb.terms.Case().when(subquery.reference_no == transaction.reference_number, 1).else_(0)
amount_equality = subquery.paid_amount == transaction.unallocated_amount
amount_rank = frappe.qb.terms.Case().when(amount_equality, 1).else_(0)
query = (
frappe.qb.from_(subquery)
.select(
"*",
(ref_rank + amount_rank + 1).as_("rank"),
)
.where(amount_equality if exact_match else subquery.paid_amount > 0.0)
)
return query

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
@@ -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,8 +71,9 @@ 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):
preview = frappe.get_doc("Bank Statement Import", self.name).get_preview_from_template(
@@ -79,7 +86,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 +111,68 @@ class BankStatementImport(DataImport):
return None
@frappe.whitelist()
def convert_mt940_to_csv(data_import, mt940_file_path):
doc = frappe.get_doc("Bank Statement Import", data_import)
file_doc, content = get_file(mt940_file_path)
if not is_mt940_format(content):
frappe.throw(_("The uploaded file does not appear to be in valid MT940 format."))
if is_mt940_format(content) and not doc.import_mt940_fromat:
frappe.throw(_("MT940 file detected. Please enable 'Import MT940 Format' to proceed."))
try:
transactions = mt940.parse(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 +197,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 = []
@@ -279,7 +354,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,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

@@ -2,27 +2,6 @@
// For license information, please see license.txt
frappe.ui.form.on("Bank Transaction", {
onload(frm) {
frm.set_query("payment_document", "payment_entries", function () {
const payment_doctypes = frm.events.get_payment_doctypes(frm);
return {
filters: {
name: ["in", payment_doctypes],
},
};
});
},
refresh(frm) {
if (!frm.is_dirty() && frm.doc.payment_entries.length > 0) {
frm.add_custom_button(__("Unreconcile Transaction"), () => {
frm.call("remove_payment_entries").then(() => frm.refresh());
});
}
},
bank_account: function (frm) {
set_bank_statement_filter(frm);
},
setup: function (frm) {
frm.set_query("party_type", function () {
return {
@@ -31,6 +10,41 @@ frappe.ui.form.on("Bank Transaction", {
},
};
});
frm.set_query("bank_account", function () {
return {
filters: { is_company_account: 1 },
};
});
frm.set_query("payment_document", "payment_entries", function () {
const payment_doctypes = frm.events.get_payment_doctypes(frm);
return {
filters: {
name: ["in", payment_doctypes],
},
};
});
frm.set_query("payment_entry", "payment_entries", function () {
return {
filters: {
docstatus: ["!=", 2],
},
};
});
},
refresh(frm) {
if (!frm.is_dirty() && frm.doc.payment_entries.length > 0) {
frm.add_custom_button(__("Unreconcile Transaction"), () => {
frm.call("remove_payment_entries").then(() => frm.refresh());
});
}
},
bank_account: function (frm) {
set_bank_statement_filter(frm);
},
get_payment_doctypes: function () {
@@ -39,31 +53,6 @@ frappe.ui.form.on("Bank Transaction", {
},
});
frappe.ui.form.on("Bank Transaction Payments", {
payment_entries_remove: function (frm, cdt, cdn) {
update_clearance_date(frm, cdt, cdn);
},
});
const update_clearance_date = (frm, cdt, cdn) => {
if (frm.doc.docstatus === 1) {
frappe
.xcall("erpnext.accounts.doctype.bank_transaction.bank_transaction.unclear_reference_payment", {
doctype: cdt,
docname: cdn,
bt_name: frm.doc.name,
})
.then((e) => {
if (e == "success") {
frappe.show_alert({
message: __("Document {0} successfully uncleared", [e]),
indicator: "green",
});
}
});
}
};
function set_bank_statement_filter(frm) {
frm.set_query("bank_statement", function () {
return {

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.-",
@@ -236,9 +235,10 @@
"fieldtype": "Column Break"
}
],
"grid_page_length": 50,
"is_submittable": 1,
"links": [],
"modified": "2023-11-18 18:32:47.203694",
"modified": "2025-06-18 17:24:57.044666",
"modified_by": "Administrator",
"module": "Accounts",
"name": "Bank Transaction",
@@ -287,9 +287,10 @@
"write": 1
}
],
"row_format": "Dynamic",
"sort_field": "date",
"sort_order": "DESC",
"states": [],
"title_field": "bank_account",
"track_changes": 1
}
}

View File

@@ -5,7 +5,7 @@ import frappe
from frappe import _
from frappe.model.docstatus import DocStatus
from frappe.model.document import Document
from frappe.utils import flt
from frappe.utils import flt, getdate
class BankTransaction(Document):
@@ -84,16 +84,16 @@ class BankTransaction(Document):
if not self.payment_entries:
return
pe = []
references = set()
for row in self.payment_entries:
reference = (row.payment_document, row.payment_entry)
if reference in pe:
if reference in references:
frappe.throw(
_("{0} {1} is allocated twice in this Bank Transaction").format(
row.payment_document, row.payment_entry
)
)
pe.append(reference)
references.add(reference)
def update_allocated_amount(self):
allocated_amount = (
@@ -104,22 +104,36 @@ class BankTransaction(Document):
self.allocated_amount = flt(allocated_amount, self.precision("allocated_amount"))
self.unallocated_amount = flt(unallocated_amount, self.precision("unallocated_amount"))
def delink_old_payment_entries(self):
if self.flags.updating_linked_bank_transaction:
return
old_doc = self.get_doc_before_save()
payment_entry_names = set(pe.name for pe in self.payment_entries)
for old_pe in old_doc.payment_entries:
if old_pe.name in payment_entry_names:
continue
self.delink_payment_entry(old_pe)
def before_submit(self):
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):
self.validate_duplicate_references()
self.allocate_payment_entries()
self.update_allocated_amount()
self.delink_old_payment_entries()
self.allocate_payment_entries()
self.set_status()
def on_cancel(self):
for payment_entry in self.payment_entries:
self.clear_linked_payment_entry(payment_entry, for_cancel=True)
self.delink_payment_entry(payment_entry)
self.set_status()
@@ -152,43 +166,55 @@ class BankTransaction(Document):
- 0 > a: Error: already over-allocated
- clear means: set the latest transaction date as clearance date
"""
if self.flags.updating_linked_bank_transaction or not self.payment_entries:
return
remaining_amount = self.unallocated_amount
to_remove = []
payment_entry_docs = [(pe.payment_document, pe.payment_entry) for pe in self.payment_entries]
pe_bt_allocations = get_total_allocated_amount(payment_entry_docs)
gl_entries = get_related_bank_gl_entries(payment_entry_docs)
gl_bank_account = frappe.db.get_value("Bank Account", self.bank_account, "account")
for payment_entry in self.payment_entries:
if payment_entry.allocated_amount == 0.0:
unallocated_amount, should_clear, latest_transaction = get_clearance_details(
self,
payment_entry,
pe_bt_allocations.get((payment_entry.payment_document, payment_entry.payment_entry))
or [],
for payment_entry in list(self.payment_entries):
if payment_entry.allocated_amount != 0:
continue
allocable_amount, should_clear, clearance_date = get_clearance_details(
self,
payment_entry,
pe_bt_allocations.get((payment_entry.payment_document, payment_entry.payment_entry)) or {},
gl_entries.get((payment_entry.payment_document, payment_entry.payment_entry)) or {},
gl_bank_account,
)
if allocable_amount < 0:
frappe.throw(_("Voucher {0} is over-allocated by {1}").format(allocable_amount))
if remaining_amount <= 0:
self.remove(payment_entry)
continue
if allocable_amount == 0:
if should_clear:
self.clear_linked_payment_entry(payment_entry, clearance_date=clearance_date)
self.remove(payment_entry)
continue
should_clear = should_clear and allocable_amount <= remaining_amount
payment_entry.allocated_amount = min(allocable_amount, remaining_amount)
remaining_amount = flt(
remaining_amount - payment_entry.allocated_amount,
self.precision("unallocated_amount"),
)
if payment_entry.payment_document == "Bank Transaction":
self.update_linked_bank_transaction(
payment_entry.payment_entry, payment_entry.allocated_amount
)
elif should_clear:
self.clear_linked_payment_entry(payment_entry, clearance_date=clearance_date)
if 0.0 == unallocated_amount:
if should_clear:
latest_transaction.clear_linked_payment_entry(payment_entry)
to_remove.append(payment_entry)
elif remaining_amount <= 0.0:
to_remove.append(payment_entry)
elif 0.0 < unallocated_amount <= remaining_amount:
payment_entry.allocated_amount = unallocated_amount
remaining_amount -= unallocated_amount
if should_clear:
latest_transaction.clear_linked_payment_entry(payment_entry)
elif 0.0 < unallocated_amount:
payment_entry.allocated_amount = remaining_amount
remaining_amount = 0.0
elif 0.0 > unallocated_amount:
frappe.throw(_("Voucher {0} is over-allocated by {1}").format(unallocated_amount))
for payment_entry in to_remove:
self.remove(payment_entry)
self.update_allocated_amount()
@frappe.whitelist()
def remove_payment_entries(self):
@@ -199,14 +225,64 @@ class BankTransaction(Document):
def remove_payment_entry(self, payment_entry):
"Clear payment entry and clearance"
self.clear_linked_payment_entry(payment_entry, for_cancel=True)
self.delink_payment_entry(payment_entry)
self.remove(payment_entry)
def clear_linked_payment_entry(self, payment_entry, for_cancel=False):
clearance_date = None if for_cancel else self.date
set_voucher_clearance(
payment_entry.payment_document, payment_entry.payment_entry, clearance_date, self
)
def delink_payment_entry(self, payment_entry):
if payment_entry.payment_document == "Bank Transaction":
self.update_linked_bank_transaction(payment_entry.payment_entry, allocated_amount=None)
else:
self.clear_linked_payment_entry(payment_entry, clearance_date=None)
def clear_linked_payment_entry(self, payment_entry, clearance_date=None):
doctype = payment_entry.payment_document
docname = payment_entry.payment_entry
# might be a bank transaction
if doctype not in get_doctypes_for_bank_reconciliation():
return
if doctype == "Sales Invoice":
frappe.db.set_value(
"Sales Invoice Payment",
dict(parenttype=doctype, parent=docname),
"clearance_date",
clearance_date,
)
return
frappe.db.set_value(doctype, docname, "clearance_date", clearance_date)
def update_linked_bank_transaction(self, bank_transaction_name, allocated_amount=None):
"""For when a second bank transaction has fixed another, e.g. refund"""
bt = frappe.get_doc(self.doctype, bank_transaction_name)
if allocated_amount:
bt.append(
"payment_entries",
{
"payment_document": self.doctype,
"payment_entry": self.name,
"allocated_amount": allocated_amount,
},
)
else:
pe = next(
(
pe
for pe in bt.payment_entries
if pe.payment_document == self.doctype and pe.payment_entry == self.name
),
None,
)
if not pe:
return
bt.flags.updating_linked_bank_transaction = True
bt.remove(pe)
bt.save()
def auto_set_party(self):
from erpnext.accounts.doctype.bank_transaction.auto_match_party import AutoMatchParty
@@ -238,71 +314,107 @@ def get_doctypes_for_bank_reconciliation():
return frappe.get_hooks("bank_reconciliation_doctypes")
def get_clearance_details(transaction, payment_entry, bt_allocations):
def get_clearance_details(transaction, payment_entry, bt_allocations, gl_entries, gl_bank_account):
"""
There should only be one bank gle for a voucher.
Could be none for a Bank Transaction.
But if a JE, could affect two banks.
Should only clear the voucher if all bank gles are allocated.
There should only be one bank gl entry for a voucher, except for JE.
For JE, there can be multiple bank gl entries for the same account.
In this case, the allocable_amount will be the sum of amounts of all gl entries of the account.
There will be no gl entry for a Bank Transaction so return the unallocated amount.
Should only clear the voucher if all bank gl entries are allocated.
"""
gl_bank_account = frappe.db.get_value("Bank Account", transaction.bank_account, "account")
gles = get_related_bank_gl_entries(payment_entry.payment_document, payment_entry.payment_entry)
unallocated_amount = min(
transaction.unallocated_amount,
get_paid_amount(payment_entry, transaction.currency, gl_bank_account),
)
unmatched_gles = len(gles)
latest_transaction = transaction
for gle in gles:
if gle["gl_account"] == gl_bank_account:
if gle["amount"] <= 0.0:
frappe.throw(
_("Voucher {0} value is broken: {1}").format(payment_entry.payment_entry, gle["amount"])
transaction_date = getdate(transaction.date)
if payment_entry.payment_document == "Bank Transaction":
bt = frappe.db.get_value(
"Bank Transaction",
payment_entry.payment_entry,
("unallocated_amount", "bank_account"),
as_dict=True,
)
if bt.bank_account != gl_bank_account:
frappe.throw(
_("Bank Account {} in Bank Transaction {} is not matching with Bank Account {}").format(
bt.bank_account, payment_entry.payment_entry, gl_bank_account
)
)
unmatched_gles -= 1
unallocated_amount = gle["amount"]
for a in bt_allocations:
if a["gl_account"] == gle["gl_account"]:
unallocated_amount = gle["amount"] - a["total"]
if frappe.utils.getdate(transaction.date) < a["latest_date"]:
latest_transaction = frappe.get_doc("Bank Transaction", a["latest_name"])
else:
# Must be a Journal Entry affecting more than one bank
for a in bt_allocations:
if a["gl_account"] == gle["gl_account"] and a["total"] == gle["amount"]:
unmatched_gles -= 1
return abs(bt.unallocated_amount), True, transaction_date
return unallocated_amount, unmatched_gles == 0, latest_transaction
if gl_bank_account not in gl_entries:
frappe.throw(
_("{} {} is not affecting bank account {}").format(
payment_entry.payment_document, payment_entry.payment_entry, gl_bank_account
)
)
allocable_amount = gl_entries.pop(gl_bank_account) or 0
if allocable_amount <= 0.0:
frappe.throw(
_("Invalid amount in accounting entries of {} {} for Account {}: {}").format(
payment_entry.payment_document, payment_entry.payment_entry, gl_bank_account, allocable_amount
)
)
matching_bt_allocaion = bt_allocations.pop(gl_bank_account, {})
allocable_amount = flt(
allocable_amount - matching_bt_allocaion.get("total", 0), transaction.precision("unallocated_amount")
)
should_clear = all(
gl_entries[gle_account] == bt_allocations.get(gle_account, {}).get("total", 0)
for gle_account in gl_entries
)
bt_allocation_date = matching_bt_allocaion.get("latest_date", None)
clearance_date = transaction_date if not bt_allocation_date else max(transaction_date, bt_allocation_date)
return allocable_amount, should_clear, clearance_date
def get_related_bank_gl_entries(doctype, docname):
def get_related_bank_gl_entries(docs):
# nosemgrep: frappe-semgrep-rules.rules.frappe-using-db-sql
return frappe.db.sql(
if not docs:
return {}
result = frappe.db.sql(
"""
SELECT
ABS(gle.credit_in_account_currency - gle.debit_in_account_currency) AS amount,
gle.account AS gl_account
FROM
`tabGL Entry` gle
LEFT JOIN
`tabAccount` ac ON ac.name=gle.account
WHERE
ac.account_type = 'Bank'
AND gle.voucher_type = %(doctype)s
AND gle.voucher_no = %(docname)s
AND is_cancelled = 0
""",
dict(doctype=doctype, docname=docname),
SELECT
gle.voucher_type AS doctype,
gle.voucher_no AS docname,
gle.account AS gl_account,
SUM(ABS(gle.credit_in_account_currency - gle.debit_in_account_currency)) AS amount
FROM
`tabGL Entry` gle
LEFT JOIN
`tabAccount` ac ON ac.name = gle.account
WHERE
ac.account_type = 'Bank'
AND (gle.voucher_type, gle.voucher_no) IN %(docs)s
AND gle.is_cancelled = 0
GROUP BY
gle.voucher_type, gle.voucher_no, gle.account
""",
{"docs": docs},
as_dict=True,
)
entries = {}
for row in result:
key = (row["doctype"], row["docname"])
if key not in entries:
entries[key] = {}
entries[key][row["gl_account"]] = row["amount"]
return entries
def get_total_allocated_amount(docs):
"""
Gets the sum of allocations for a voucher on each bank GL account
along with the latest bank transaction name & date
along with the latest bank transaction date
NOTE: query may also include just saved vouchers/payments but with zero allocated_amount
"""
if not docs:
@@ -311,11 +423,10 @@ def get_total_allocated_amount(docs):
# nosemgrep: frappe-semgrep-rules.rules.frappe-using-db-sql
result = frappe.db.sql(
"""
SELECT total, latest_name, latest_date, gl_account, payment_document, payment_entry FROM (
SELECT total, latest_date, gl_account, payment_document, payment_entry FROM (
SELECT
ROW_NUMBER() OVER w AS rownum,
SUM(btp.allocated_amount) OVER(PARTITION BY ba.account, btp.payment_document, btp.payment_entry) AS total,
FIRST_VALUE(bt.name) OVER w AS latest_name,
FIRST_VALUE(bt.date) OVER w AS latest_date,
ba.account AS gl_account,
btp.payment_document,
@@ -338,104 +449,14 @@ def get_total_allocated_amount(docs):
payment_allocation_details = {}
for row in result:
# Why is this *sometimes* a byte string?
if isinstance(row["latest_name"], bytes):
row["latest_name"] = row["latest_name"].decode()
row["latest_date"] = frappe.utils.getdate(row["latest_date"])
payment_allocation_details.setdefault((row["payment_document"], row["payment_entry"]), []).append(row)
row["latest_date"] = getdate(row["latest_date"])
payment_allocation_details.setdefault((row["payment_document"], row["payment_entry"]), {})[
row["gl_account"]
] = row
return payment_allocation_details
def get_paid_amount(payment_entry, currency, gl_bank_account):
if payment_entry.payment_document in ["Payment Entry", "Sales Invoice", "Purchase Invoice"]:
paid_amount_field = "paid_amount"
if payment_entry.payment_document == "Payment Entry":
doc = frappe.get_doc("Payment Entry", payment_entry.payment_entry)
if doc.payment_type == "Receive":
paid_amount_field = (
"received_amount" if doc.paid_to_account_currency == currency else "base_received_amount"
)
elif doc.payment_type == "Pay":
paid_amount_field = (
"paid_amount" if doc.paid_from_account_currency == currency else "base_paid_amount"
)
return frappe.db.get_value(
payment_entry.payment_document, payment_entry.payment_entry, paid_amount_field
)
elif payment_entry.payment_document == "Journal Entry":
return abs(
frappe.db.get_value(
"Journal Entry Account",
{"parent": payment_entry.payment_entry, "account": gl_bank_account},
"sum(debit_in_account_currency-credit_in_account_currency)",
)
or 0
)
elif payment_entry.payment_document == "Expense Claim":
return frappe.db.get_value(
payment_entry.payment_document, payment_entry.payment_entry, "total_amount_reimbursed"
)
elif payment_entry.payment_document == "Loan Disbursement":
return frappe.db.get_value(
payment_entry.payment_document, payment_entry.payment_entry, "disbursed_amount"
)
elif payment_entry.payment_document == "Loan Repayment":
return frappe.db.get_value(payment_entry.payment_document, payment_entry.payment_entry, "amount_paid")
elif payment_entry.payment_document == "Bank Transaction":
dep, wth = frappe.db.get_value(
"Bank Transaction", payment_entry.payment_entry, ("deposit", "withdrawal")
)
return abs(flt(wth) - flt(dep))
else:
frappe.throw(
f"Please reconcile {payment_entry.payment_document}: {payment_entry.payment_entry} manually"
)
def set_voucher_clearance(doctype, docname, clearance_date, self):
if doctype in get_doctypes_for_bank_reconciliation():
if (
doctype == "Payment Entry"
and frappe.db.get_value("Payment Entry", docname, "payment_type") == "Internal Transfer"
and len(get_reconciled_bank_transactions(doctype, docname)) < 2
):
return
if doctype == "Sales Invoice":
frappe.db.set_value(
"Sales Invoice Payment",
dict(parenttype=doctype, parent=docname),
"clearance_date",
clearance_date,
)
return
frappe.db.set_value(doctype, docname, "clearance_date", clearance_date)
elif doctype == "Bank Transaction":
# For when a second bank transaction has fixed another, e.g. refund
bt = frappe.get_doc(doctype, docname)
if clearance_date:
vouchers = [{"payment_doctype": "Bank Transaction", "payment_name": self.name}]
bt.add_payment_entries(vouchers)
bt.save()
else:
for pe in bt.payment_entries:
if pe.payment_document == self.doctype and pe.payment_entry == self.name:
bt.remove(pe)
bt.save()
break
def get_reconciled_bank_transactions(doctype, docname):
return frappe.get_all(
"Bank Transaction Payments",
@@ -444,13 +465,6 @@ def get_reconciled_bank_transactions(doctype, docname):
)
@frappe.whitelist()
def unclear_reference_payment(doctype, docname, bt_name):
bt = frappe.get_doc("Bank Transaction", bt_name)
set_voucher_clearance(doctype, docname, None, bt)
return docname
def remove_from_bank_transaction(doctype, docname):
"""Remove a (cancelled) voucher from all Bank Transactions."""
for bt_name in get_reconciled_bank_transactions(doctype, docname):

View File

@@ -2,21 +2,12 @@
# 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
class TestAutoMatchParty(IntegrationTestCase):
@classmethod
def setUpClass(cls):

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,13 +139,10 @@ 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:
@@ -151,7 +151,7 @@ def validate_expense_against_budget(args, expense_amount=0):
"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:
@@ -510,7 +510,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

@@ -0,0 +1,23 @@
[
{
"company": "_Test Company",
"cost_center_name": "_Test Cost Center",
"doctype": "Cost Center",
"is_group": 0,
"parent_cost_center": "_Test Company - _TC"
},
{
"company": "_Test Company",
"cost_center_name": "_Test Cost Center 2",
"doctype": "Cost Center",
"is_group": 0,
"parent_cost_center": "_Test Company - _TC"
},
{
"company": "_Test Company",
"cost_center_name": "_Test Write Off Cost Center",
"doctype": "Cost Center",
"is_group": 0,
"parent_cost_center": "_Test Company - _TC"
}
]

View File

@@ -1,18 +0,0 @@
[["Cost Center"]]
company = "_Test Company"
cost_center_name = "_Test Cost Center"
is_group = 0
parent_cost_center = "_Test Company - _TC"
[["Cost Center"]]
company = "_Test Company"
cost_center_name = "_Test Cost Center 2"
is_group = 0
parent_cost_center = "_Test Company - _TC"
[["Cost Center"]]
company = "_Test Company"
cost_center_name = "_Test Write Off Cost Center"
is_group = 0
parent_cost_center = "_Test Company - _TC"

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

@@ -128,7 +128,7 @@ class TestCouponCode(IntegrationTestCase):
item_code="_Test Tesla Car",
rate=5000,
qty=1,
do_not_submit=True,
do_not_save=True,
)
self.assertEqual(so.items[0].rate, 5000)

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

@@ -230,6 +230,7 @@ def get_dunning_letter_text(dunning_type: str, doc: str | dict, language: str |
if not language:
language = doc.get("language")
letter_text = None
if language:
letter_text = frappe.db.get_value(
DOCTYPE, {"parent": dunning_type, "language": language}, FIELDS, as_dict=1

View File

@@ -1,7 +1,10 @@
# Copyright (c) 2023, Frappe Technologies Pvt. Ltd. and Contributors
# See license.txt
import json
import frappe
from frappe.tests import IntegrationTestCase, UnitTestCase
from frappe.model import mapper
from frappe.tests import IntegrationTestCase
from frappe.utils import add_days, nowdate, today
from erpnext import get_default_cost_center
@@ -19,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):
@@ -77,6 +71,36 @@ class TestDunning(IntegrationTestCase):
dunning.reload()
self.assertEqual(dunning.status, "Resolved")
def test_fetch_overdue_payments(self):
"""
Create SI with overdue payment. Check if overdue payment is fetched in Dunning.
"""
si1 = create_sales_invoice_against_cost_center(
posting_date=add_days(today(), -1 * 6),
qty=1,
rate=100,
)
si2 = create_sales_invoice_against_cost_center(
posting_date=add_days(today(), -1 * 6),
qty=1,
rate=300,
)
dunning = create_dunning_from_sales_invoice(si1.name)
dunning.overdue_payments = []
method = "erpnext.accounts.doctype.sales_invoice.sales_invoice.create_dunning"
updated_dunning = mapper.map_docs(method, json.dumps([si1.name, si2.name]), dunning)
self.assertEqual(len(updated_dunning.overdue_payments), 2)
self.assertEqual(updated_dunning.overdue_payments[0].sales_invoice, si1.name)
self.assertEqual(updated_dunning.overdue_payments[0].outstanding, si1.outstanding_amount)
self.assertEqual(updated_dunning.overdue_payments[1].sales_invoice, si2.name)
self.assertEqual(updated_dunning.overdue_payments[1].outstanding, si2.outstanding_amount)
def test_dunning_and_payment_against_partially_due_invoice(self):
"""
Create SI with first installment overdue. Check impact of Dunning and Payment Entry.

View File

@@ -0,0 +1,36 @@
[
{
"doctype": "Dunning Type",
"dunning_type": "_Test First Notice",
"company": "_Test Company",
"is_default": 1,
"dunning_fee": 0.0,
"rate_of_interest": 0.0,
"dunning_letter_text": [
{
"language": "en",
"body_text": "We have still not received payment for our invoice",
"closing_text": "We kindly request that you pay the outstanding amount immediately, including interest and late fees."
}
],
"income_account": "Sales - _TC",
"cost_center": "_Test Cost Center - _TC"
},
{
"doctype": "Dunning Type",
"dunning_type": "_Test Second Notice",
"company": "_Test Company",
"is_default": 0,
"dunning_fee": 10.0,
"rate_of_interest": 10.0,
"dunning_letter_text": [
{
"language": "en",
"body_text": "We have still not received payment for our invoice",
"closing_text": "We kindly request that you pay the outstanding amount immediately, including interest and late fees."
}
],
"income_account": "Sales - _TC",
"cost_center": "_Test Cost Center - _TC"
}
]

View File

@@ -1,28 +0,0 @@
[["Dunning Type"]]
dunning_type = "_Test First Notice"
company = "_Test Company"
is_default = 1
dunning_fee = 0.0
rate_of_interest = 0.0
income_account = "Sales - _TC"
cost_center = "_Test Cost Center - _TC"
[["Dunning Type".dunning_letter_text]]
language = "en"
body_text = "We have still not received payment for our invoice"
closing_text = "We kindly request that you pay the outstanding amount immediately, including interest and late fees."
[["Dunning Type"]]
dunning_type = "_Test Second Notice"
company = "_Test Company"
is_default = 0
dunning_fee = 10.0
rate_of_interest = 10.0
income_account = "Sales - _TC"
cost_center = "_Test Cost Center - _TC"
[["Dunning Type".dunning_letter_text]]
language = "en"
body_text = "We have still not received payment for our invoice"
closing_text = "We kindly request that you pay the outstanding amount immediately, including interest and late fees."

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

@@ -105,7 +105,8 @@
"label": "Cost Center",
"oldfieldname": "cost_center",
"oldfieldtype": "Link",
"options": "Cost Center"
"options": "Cost Center",
"search_index": 1
},
{
"fieldname": "debit",
@@ -279,7 +280,8 @@
{
"fieldname": "transaction_exchange_rate",
"fieldtype": "Float",
"label": "Transaction Exchange Rate"
"label": "Transaction Exchange Rate",
"precision": "9"
},
{
"fieldname": "debit_in_transaction_currency",
@@ -357,7 +359,7 @@
"idx": 1,
"in_create": 1,
"links": [],
"modified": "2024-08-22 13:03:39.997475",
"modified": "2025-03-21 15:29:11.221890",
"modified_by": "Administrator",
"module": "Accounts",
"name": "GL Entry",

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
from frappe.utils import create_batch, flt, fmt_money, now
import erpnext
from erpnext.accounts.doctype.accounting_dimension.accounting_dimension import (
@@ -451,12 +451,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 where name = %s",
(newname, 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

@@ -0,0 +1,79 @@
[
{
"doctype": "Item Tax Template",
"title": "_Test Account Excise Duty @ 10",
"company": "_Test Company",
"taxes": [
{
"doctype": "Item Tax Template Detail",
"parentfield": "taxes",
"tax_rate": 10,
"tax_type": "_Test Account Excise Duty - _TC"
}
]
},
{
"doctype": "Item Tax Template",
"title": "_Test Account Excise Duty @ 12",
"company": "_Test Company",
"taxes": [
{
"doctype": "Item Tax Template Detail",
"parentfield": "taxes",
"tax_rate": 12,
"tax_type": "_Test Account Excise Duty - _TC"
}
]
},
{
"doctype": "Item Tax Template",
"title": "_Test Account Excise Duty @ 15",
"company": "_Test Company",
"taxes": [
{
"doctype": "Item Tax Template Detail",
"parentfield": "taxes",
"tax_rate": 15,
"tax_type": "_Test Account Excise Duty - _TC"
}
]
},
{
"doctype": "Item Tax Template",
"title": "_Test Account Excise Duty @ 20",
"company": "_Test Company",
"taxes": [
{
"doctype": "Item Tax Template Detail",
"parentfield": "taxes",
"tax_rate": 20,
"tax_type": "_Test Account Excise Duty - _TC"
}
]
},
{
"doctype": "Item Tax Template",
"title": "_Test Item Tax Template 1",
"company": "_Test Company",
"taxes": [
{
"doctype": "Item Tax Template Detail",
"parentfield": "taxes",
"tax_rate": 5,
"tax_type": "_Test Account Excise Duty - _TC"
},
{
"doctype": "Item Tax Template Detail",
"parentfield": "taxes",
"tax_rate": 10,
"tax_type": "_Test Account Education Cess - _TC"
},
{
"doctype": "Item Tax Template Detail",
"parentfield": "taxes",
"tax_rate": 15,
"tax_type": "_Test Account S&H Education Cess - _TC"
}
]
}
]

View File

@@ -1,62 +0,0 @@
[["Item Tax Template"]]
title = "_Test Account Excise Duty @ 10"
company = "_Test Company"
[["Item Tax Template".taxes]]
doctype = "Item Tax Template Detail"
parentfield = "taxes"
tax_rate = 10
tax_type = "_Test Account Excise Duty - _TC"
[["Item Tax Template"]]
title = "_Test Account Excise Duty @ 12"
company = "_Test Company"
[["Item Tax Template".taxes]]
doctype = "Item Tax Template Detail"
parentfield = "taxes"
tax_rate = 12
tax_type = "_Test Account Excise Duty - _TC"
[["Item Tax Template"]]
title = "_Test Account Excise Duty @ 15"
company = "_Test Company"
[["Item Tax Template".taxes]]
doctype = "Item Tax Template Detail"
parentfield = "taxes"
tax_rate = 15
tax_type = "_Test Account Excise Duty - _TC"
[["Item Tax Template"]]
title = "_Test Account Excise Duty @ 20"
company = "_Test Company"
[["Item Tax Template".taxes]]
doctype = "Item Tax Template Detail"
parentfield = "taxes"
tax_rate = 20
tax_type = "_Test Account Excise Duty - _TC"
[["Item Tax Template"]]
title = "_Test Item Tax Template 1"
company = "_Test Company"
[["Item Tax Template".taxes]]
doctype = "Item Tax Template Detail"
parentfield = "taxes"
tax_rate = 5
tax_type = "_Test Account Excise Duty - _TC"
[["Item Tax Template".taxes]]
doctype = "Item Tax Template Detail"
parentfield = "taxes"
tax_rate = 10
tax_type = "_Test Account Education Cess - _TC"
[["Item Tax Template".taxes]]
doctype = "Item Tax Template Detail"
parentfield = "taxes"
tax_rate = 15
tax_type = "_Test Account S&H Education Cess - _TC"

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");

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,13 +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):
@@ -195,7 +200,76 @@ class JournalEntry(AccountsController):
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
@@ -231,16 +305,13 @@ class JournalEntry(AccountsController):
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"
)
advance_payment_doctypes = get_advance_payment_doctypes()
for d in self.get("accounts"):
if d.is_advance:
if d.reference_type in advance_payment_doctypes:
@@ -252,21 +323,38 @@ class JournalEntry(AccountsController):
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(
@@ -369,7 +457,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"):
@@ -379,22 +471,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:
@@ -449,25 +578,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"):
@@ -517,9 +627,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"
@@ -578,8 +688,22 @@ class JournalEntry(AccountsController):
if customers:
from erpnext.selling.doctype.customer.customer import check_credit_limit
customer_details = frappe._dict(
frappe.db.get_all(
"Customer Credit Limit",
filters={
"parent": ["in", customers],
"parenttype": ["=", "Customer"],
"company": ["=", self.company],
},
fields=["parent", "bypass_credit_limit_check"],
as_list=True,
)
)
for customer in customers:
check_credit_limit(customer, self.company)
ignore_outstanding_sales_order = bool(customer_details.get(customer))
check_credit_limit(customer, self.company, ignore_outstanding_sales_order)
def validate_cheque_info(self):
if self.voucher_type in ["Bank Entry"]:
@@ -827,14 +951,13 @@ class JournalEntry(AccountsController):
"Debit Note",
"Credit Note",
]:
invoice = frappe.db.get_value(
reference_type, reference_name, ["docstatus", "outstanding_amount"], as_dict=1
)
invoice = frappe.get_doc(reference_type, reference_name)
if invoice.docstatus != 1:
frappe.throw(_("{0} {1} is not submitted").format(reference_type, reference_name))
if total and flt(invoice.outstanding_amount) < total:
precision = invoice.precision("outstanding_amount")
if total and flt(invoice.outstanding_amount, precision) < flt(total, precision):
frappe.throw(
_("Payment against {0} {1} cannot be greater than Outstanding Amount {2}").format(
reference_type, reference_name, invoice.outstanding_amount
@@ -1062,14 +1185,15 @@ class JournalEntry(AccountsController):
gl_map = []
company_currency = erpnext.get_company_currency(self.company)
self.transaction_currency = company_currency
self.transaction_exchange_rate = 1
if self.multi_currency:
for row in self.get("accounts"):
if row.account_currency != company_currency:
self.currency = row.account_currency
self.conversion_rate = row.exchange_rate
# Journal assumes the first foreign currency as transaction currency
self.transaction_currency = row.account_currency
self.transaction_exchange_rate = row.exchange_rate
break
else:
self.currency = company_currency
for d in self.get("accounts"):
if d.debit or d.credit or (self.voucher_type == "Exchange Gain Or Loss"):
@@ -1094,6 +1218,18 @@ class JournalEntry(AccountsController):
"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,
@@ -1110,7 +1246,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"):
@@ -1236,7 +1372,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
@@ -1271,15 +1407,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()

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}
@@ -583,11 +574,23 @@ class TestJournalEntry(IntegrationTestCase):
order_by="account",
)
expected = [
{"account": "_Test Bank - _TC", "transaction_exchange_rate": 1.0},
{"account": "_Test Bank - _TC", "transaction_exchange_rate": 85.0},
{"account": "_Test Receivable USD - _TC", "transaction_exchange_rate": 85.0},
]
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,
@@ -599,13 +602,14 @@ def make_journal_entry(
save=True,
submit=False,
project=None,
company=None,
):
if not cost_center:
cost_center = "_Test Cost Center - _TC"
jv = frappe.new_doc("Journal Entry")
jv.posting_date = posting_date or nowdate()
jv.company = "_Test Company"
jv.company = company or "_Test Company"
jv.user_remark = "test"
jv.multi_currency = 1
jv.set(

View File

@@ -0,0 +1,94 @@
[
{
"cheque_date": "2013-03-14",
"cheque_no": "33",
"company": "_Test Company",
"doctype": "Journal Entry",
"accounts": [
{
"account": "Debtors - _TC",
"party_type": "Customer",
"party": "_Test Customer",
"credit_in_account_currency": 400.0,
"debit_in_account_currency": 0.0,
"doctype": "Journal Entry Account",
"parentfield": "accounts",
"cost_center": "_Test Cost Center - _TC"
},
{
"account": "_Test Bank - _TC",
"credit_in_account_currency": 0.0,
"debit_in_account_currency": 400.0,
"doctype": "Journal Entry Account",
"parentfield": "accounts",
"cost_center": "_Test Cost Center - _TC"
}
],
"naming_series": "_T-Journal Entry-",
"posting_date": "2013-02-14",
"user_remark": "test",
"voucher_type": "Bank Entry"
},
{
"cheque_date": "2013-02-14",
"cheque_no": "33",
"company": "_Test Company",
"doctype": "Journal Entry",
"accounts": [
{
"account": "_Test Payable - _TC",
"party_type": "Supplier",
"party": "_Test Supplier",
"credit_in_account_currency": 0.0,
"debit_in_account_currency": 400.0,
"doctype": "Journal Entry Account",
"parentfield": "accounts",
"cost_center": "_Test Cost Center - _TC"
},
{
"account": "_Test Bank - _TC",
"credit_in_account_currency": 400.0,
"debit_in_account_currency": 0.0,
"doctype": "Journal Entry Account",
"parentfield": "accounts",
"cost_center": "_Test Cost Center - _TC"
}
],
"naming_series": "_T-Journal Entry-",
"posting_date": "2013-02-14",
"user_remark": "test",
"voucher_type": "Bank Entry"
},
{
"cheque_date": "2013-02-14",
"cheque_no": "33",
"company": "_Test Company",
"doctype": "Journal Entry",
"accounts": [
{
"account": "Debtors - _TC",
"party_type": "Customer",
"party": "_Test Customer",
"credit_in_account_currency": 0.0,
"debit_in_account_currency": 400.0,
"doctype": "Journal Entry Account",
"parentfield": "accounts",
"cost_center": "_Test Cost Center - _TC"
},
{
"account": "Sales - _TC",
"credit_in_account_currency": 400.0,
"debit_in_account_currency": 0.0,
"doctype": "Journal Entry Account",
"parentfield": "accounts",
"cost_center": "_Test Cost Center - _TC"
}
],
"naming_series": "_T-Journal Entry-",
"posting_date": "2013-02-14",
"user_remark": "test",
"voucher_type": "Bank Entry"
}
]

View File

@@ -1,81 +0,0 @@
[["Journal Entry"]]
cheque_date = "2013-03-14"
cheque_no = "33"
company = "_Test Company"
naming_series = "_T-Journal Entry-"
posting_date = "2013-02-14"
user_remark = "test"
voucher_type = "Bank Entry"
[["Journal Entry".accounts]]
account = "Debtors - _TC"
party_type = "Customer"
party = "_Test Customer"
credit_in_account_currency = 400.0
debit_in_account_currency = 0.0
doctype = "Journal Entry Account"
parentfield = "accounts"
cost_center = "_Test Cost Center - _TC"
[["Journal Entry".accounts]]
account = "_Test Bank - _TC"
credit_in_account_currency = 0.0
debit_in_account_currency = 400.0
doctype = "Journal Entry Account"
parentfield = "accounts"
cost_center = "_Test Cost Center - _TC"
[["Journal Entry"]]
cheque_date = "2013-02-14"
cheque_no = "33"
company = "_Test Company"
naming_series = "_T-Journal Entry-"
posting_date = "2013-02-14"
user_remark = "test"
voucher_type = "Bank Entry"
[["Journal Entry".accounts]]
account = "_Test Payable - _TC"
party_type = "Supplier"
party = "_Test Supplier"
credit_in_account_currency = 0.0
debit_in_account_currency = 400.0
doctype = "Journal Entry Account"
parentfield = "accounts"
cost_center = "_Test Cost Center - _TC"
[["Journal Entry".accounts]]
account = "_Test Bank - _TC"
credit_in_account_currency = 400.0
debit_in_account_currency = 0.0
doctype = "Journal Entry Account"
parentfield = "accounts"
cost_center = "_Test Cost Center - _TC"
[["Journal Entry"]]
cheque_date = "2013-02-14"
cheque_no = "33"
company = "_Test Company"
naming_series = "_T-Journal Entry-"
posting_date = "2013-02-14"
user_remark = "test"
voucher_type = "Bank Entry"
[["Journal Entry".accounts]]
account = "Debtors - _TC"
party_type = "Customer"
party = "_Test Customer"
credit_in_account_currency = 0.0
debit_in_account_currency = 400.0
doctype = "Journal Entry Account"
parentfield = "accounts"
cost_center = "_Test Cost Center - _TC"
[["Journal Entry".accounts]]
account = "Sales - _TC"
credit_in_account_currency = 400.0
debit_in_account_currency = 0.0
doctype = "Journal Entry Account"
parentfield = "accounts"
cost_center = "_Test Cost Center - _TC"

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

@@ -178,8 +178,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,52 +0,0 @@
[["Monthly Distribution"]]
distribution_id = "_Test Distribution"
fiscal_year = "_Test Fiscal Year 2013"
[["Monthly Distribution".percentages]]
month = "January"
percentage_allocation = "8"
[["Monthly Distribution".percentages]]
month = "February"
percentage_allocation = "8"
[["Monthly Distribution".percentages]]
month = "March"
percentage_allocation = "8"
[["Monthly Distribution".percentages]]
month = "April"
percentage_allocation = "8"
[["Monthly Distribution".percentages]]
month = "May"
percentage_allocation = "8"
[["Monthly Distribution".percentages]]
month = "June"
percentage_allocation = "8"
[["Monthly Distribution".percentages]]
month = "July"
percentage_allocation = "8"
[["Monthly Distribution".percentages]]
month = "August"
percentage_allocation = "8"
[["Monthly Distribution".percentages]]
month = "September"
percentage_allocation = "8"
[["Monthly Distribution".percentages]]
month = "October"
percentage_allocation = "8"
[["Monthly Distribution".percentages]]
month = "November"
percentage_allocation = "10"
[["Monthly Distribution".percentages]]
month = "December"
percentage_allocation = "10"

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

@@ -410,7 +410,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",
@@ -200,14 +199,14 @@
"fieldtype": "Column Break"
},
{
"depends_on": "party",
"depends_on": "eval: doc.party && doc.party_type !== \"Employee\"",
"fieldname": "contact_person",
"fieldtype": "Link",
"label": "Contact",
"options": "Contact"
},
{
"depends_on": "contact_person",
"depends_on": "eval: (doc.contact_person || doc.party_type === \"Employee\") && doc.contact_email",
"fieldname": "contact_email",
"fieldtype": "Data",
"label": "Email",
@@ -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-01-31 11:24:58.076393",
"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",

File diff suppressed because it is too large Load Diff

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()
@@ -58,6 +49,8 @@ class TestPaymentEntry(IntegrationTestCase):
pe.insert()
pe.submit()
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]]
)
@@ -569,6 +562,8 @@ class TestPaymentEntry(IntegrationTestCase):
pe.insert()
pe.submit()
self.assertEqual(pe.paid_from_account_type, "Bank")
outstanding_amount, status = frappe.db.get_value(
"Purchase Invoice", pi.name, ["outstanding_amount", "status"]
)

View File

@@ -3,7 +3,7 @@
import frappe
from frappe import qb
from frappe.tests import IntegrationTestCase, UnitTestCase
from frappe.tests import IntegrationTestCase
from frappe.utils import nowdate
from erpnext.accounts.doctype.payment_entry.payment_entry import get_payment_entry
@@ -13,15 +13,6 @@ from erpnext.selling.doctype.sales_order.test_sales_order import make_sales_orde
from erpnext.stock.doctype.item.test_item import create_item
class UnitTestPaymentLedgerEntry(UnitTestCase):
"""
Unit tests for PaymentLedgerEntry.
Use this class for testing individual functions and methods.
"""
pass
class TestPaymentLedgerEntry(IntegrationTestCase):
def setUp(self):
self.ple = qb.DocType("Payment Ledger Entry")

View File

@@ -3,7 +3,7 @@
import frappe
from frappe.tests import IntegrationTestCase, UnitTestCase
from frappe.tests import IntegrationTestCase
from frappe.utils import getdate
from erpnext.accounts.doctype.bank_transaction.test_bank_transaction import (
@@ -17,15 +17,6 @@ from erpnext.accounts.doctype.payment_entry.payment_entry import (
from erpnext.accounts.doctype.purchase_invoice.test_purchase_invoice import make_purchase_invoice
class UnitTestPaymentOrder(UnitTestCase):
"""
Unit tests for PaymentOrder.
Use this class for testing individual functions and methods.
"""
pass
class TestPaymentOrder(IntegrationTestCase):
def setUp(self):
# generate and use a uniq hash identifier for 'Bank Account' and it's linked GL 'Account' to avoid validation error

View File

@@ -407,7 +407,7 @@ class PaymentReconciliation(Document):
@frappe.whitelist()
def is_auto_process_enabled(self):
return frappe.db.get_single_value("Accounts Settings", "auto_reconcile_payments")
return frappe.get_single_value("Accounts Settings", "auto_reconcile_payments")
@frappe.whitelist()
def calculate_difference_on_allocation_change(self, payment_entry, invoice, allocated_amount):
@@ -532,7 +532,7 @@ class PaymentReconciliation(Document):
@frappe.whitelist()
def reconcile(self):
if frappe.db.get_single_value("Accounts Settings", "auto_reconcile_payments"):
if frappe.get_single_value("Accounts Settings", "auto_reconcile_payments"):
running_doc = is_any_doc_running(
dict(
company=self.company,
@@ -589,7 +589,7 @@ class PaymentReconciliation(Document):
def check_mandatory_to_fetch(self):
for fieldname in ["company", "party_type", "party", "receivable_payable_account"]:
if not self.get(fieldname):
frappe.throw(_("Please select {0} first").format(self.meta.get_label(fieldname)))
frappe.throw(_("Please select {0} first").format(_(self.meta.get_label(fieldname))))
def validate_entries(self):
if not self.get("invoices"):
@@ -826,7 +826,7 @@ def reconcile_dr_cr_note(dr_cr_notes, company, active_dimensions=None):
create_gain_loss_journal(
company,
today(),
inv.difference_posting_date,
inv.party_type,
inv.party,
inv.account,

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, add_years, flt, getdate, nowdate, today
from frappe.utils.data import getdate as convert_to_date
@@ -21,15 +21,6 @@ from erpnext.stock.doctype.item.test_item import create_item
EXTRA_TEST_RECORD_DEPENDENCIES = ["Item"]
class UnitTestPaymentReconciliation(UnitTestCase):
"""
Unit tests for PaymentReconciliation.
Use this class for testing individual functions and methods.
"""
pass
class TestPaymentReconciliation(IntegrationTestCase):
def setUp(self):
self.create_company()
@@ -1988,7 +1979,9 @@ class TestPaymentReconciliation(IntegrationTestCase):
def test_reconciliation_on_closed_period_payment(self):
# create backdated fiscal year
first_fy_start_date = frappe.db.get_value("Fiscal Year", {"disabled": 0}, "min(year_start_date)")
first_fy_start_date = frappe.db.get_value(
"Fiscal Year", {"disabled": 0}, [{"MIN": "year_start_date"}]
)
prev_fy_start_date = add_years(first_fy_start_date, -1)
prev_fy_end_date = add_days(first_fy_start_date, -1)
create_fiscal_year(

View File

@@ -1,9 +1,9 @@
import json
import frappe
from frappe import _, qb
from frappe import _
from frappe.model.document import Document
from frappe.query_builder.functions import Abs, Sum
from frappe.query_builder.functions import Sum
from frappe.utils import flt, nowdate
from frappe.utils.background_jobs import enqueue
@@ -12,12 +12,11 @@ from erpnext.accounts.doctype.accounting_dimension.accounting_dimension import (
get_accounting_dimensions,
)
from erpnext.accounts.doctype.payment_entry.payment_entry import (
get_company_defaults,
get_payment_entry,
)
from erpnext.accounts.doctype.subscription_plan.subscription_plan import get_plan_rate
from erpnext.accounts.party import get_party_account, get_party_bank_account
from erpnext.accounts.utils import get_account_currency, get_currency_precision
from erpnext.accounts.utils import get_account_currency, get_advance_payment_doctypes, get_currency_precision
from erpnext.utilities import payment_app_import_guard
ALLOWED_DOCTYPES_FOR_PAYMENT_REQUEST = [
@@ -122,16 +121,14 @@ class PaymentRequest(Document):
title=_("Invalid Amount"),
)
existing_payment_request_amount = flt(
get_existing_payment_request_amount(self.reference_doctype, self.reference_name)
)
ref_doc = frappe.get_doc(self.reference_doctype, self.reference_name)
if not hasattr(ref_doc, "order_type") or ref_doc.order_type != "Shopping Cart":
ref_amount = get_amount(ref_doc, self.payment_account)
if not ref_amount:
frappe.throw(_("Payment Entry is already created"))
existing_payment_request_amount = flt(get_existing_payment_request_amount(ref_doc))
if existing_payment_request_amount + flt(self.grand_total) > ref_amount:
frappe.throw(
_("Total Payment Request amount cannot be greater than {0} amount").format(
@@ -467,10 +464,7 @@ class PaymentRequest(Document):
return create_stripe_subscription(gateway_controller, data)
def update_reference_advance_payment_status(self):
advance_payment_doctypes = frappe.get_hooks("advance_payment_receivable_doctypes") + frappe.get_hooks(
"advance_payment_payable_doctypes"
)
if self.reference_doctype in advance_payment_doctypes:
if self.reference_doctype in get_advance_payment_doctypes():
ref_doc = frappe.get_doc(self.reference_doctype, self.reference_name)
ref_doc.set_advance_payment_status()
@@ -554,19 +548,8 @@ def make_payment_request(**args):
ref_doc.db_update()
grand_total = grand_total - loyalty_amount
bank_account = (
get_party_bank_account(args.get("party_type"), args.get("party")) if args.get("party_type") else ""
)
draft_payment_request = frappe.db.get_value(
"Payment Request",
{"reference_doctype": ref_doc.doctype, "reference_name": ref_doc.name, "docstatus": 0},
)
# fetches existing payment request `grand_total` amount
existing_payment_request_amount = get_existing_payment_request_amount(ref_doc.doctype, ref_doc.name)
existing_paid_amount = get_existing_paid_amount(ref_doc.doctype, ref_doc.name)
existing_payment_request_amount = get_existing_payment_request_amount(ref_doc)
def validate_and_calculate_grand_total(grand_total, existing_payment_request_amount):
grand_total -= existing_payment_request_amount
@@ -578,7 +561,7 @@ def make_payment_request(**args):
if args.order_type == "Shopping Cart":
# If Payment Request is in an advanced stage, then create for remaining amount.
if get_existing_payment_request_amount(
ref_doc.doctype, ref_doc.name, ["Initiated", "Partially Paid", "Payment Ordered", "Paid"]
ref_doc, ["Initiated", "Partially Paid", "Payment Ordered", "Paid"]
):
grand_total = validate_and_calculate_grand_total(grand_total, existing_payment_request_amount)
else:
@@ -587,14 +570,10 @@ def make_payment_request(**args):
else:
grand_total = validate_and_calculate_grand_total(grand_total, existing_payment_request_amount)
if existing_paid_amount:
if ref_doc.party_account_currency == ref_doc.currency:
if ref_doc.conversion_rate:
grand_total -= flt(existing_paid_amount / ref_doc.conversion_rate)
else:
grand_total -= flt(existing_paid_amount)
else:
grand_total -= flt(existing_paid_amount / ref_doc.conversion_rate)
draft_payment_request = frappe.db.get_value(
"Payment Request",
{"reference_doctype": ref_doc.doctype, "reference_name": ref_doc.name, "docstatus": 0},
)
if draft_payment_request:
frappe.db.set_value(
@@ -602,6 +581,11 @@ def make_payment_request(**args):
)
pr = frappe.get_doc("Payment Request", draft_payment_request)
else:
bank_account = (
get_party_bank_account(args.get("party_type"), args.get("party"))
if args.get("party_type")
else ""
)
pr = frappe.new_doc("Payment Request")
if not args.get("payment_request_type"):
@@ -681,22 +665,40 @@ def make_payment_request(**args):
def get_amount(ref_doc, payment_account=None):
"""get amount based on doctype"""
grand_total = 0
dt = ref_doc.doctype
if dt in ["Sales Order", "Purchase Order"]:
grand_total = flt(ref_doc.rounded_total) or flt(ref_doc.grand_total)
advance_amount = flt(ref_doc.advance_paid)
if ref_doc.party_account_currency != ref_doc.currency:
advance_amount = flt(flt(ref_doc.advance_paid) / ref_doc.conversion_rate)
grand_total = (flt(ref_doc.rounded_total) or flt(ref_doc.grand_total)) - advance_amount
elif dt in ["Sales Invoice", "Purchase Invoice"]:
if not ref_doc.get("is_pos"):
if (
dt == "Sales Invoice"
and ref_doc.is_pos
and ref_doc.payments
and any(
[
payment.type == "Phone" and payment.account == payment_account
for payment in ref_doc.payments
]
)
):
grand_total = sum(
[
payment.amount
for payment in ref_doc.payments
if payment.type == "Phone" and payment.account == payment_account
]
)
else:
if ref_doc.party_account_currency == ref_doc.currency:
grand_total = flt(ref_doc.rounded_total or ref_doc.grand_total)
grand_total = flt(ref_doc.outstanding_amount)
else:
grand_total = flt(
flt(ref_doc.base_rounded_total or ref_doc.base_grand_total) / ref_doc.conversion_rate
)
elif dt == "Sales Invoice":
for pay in ref_doc.payments:
if pay.type == "Phone" and pay.account == payment_account:
grand_total = pay.amount
break
grand_total = flt(flt(ref_doc.outstanding_amount) / ref_doc.conversion_rate)
elif dt == "POS Invoice":
for pay in ref_doc.payments:
if pay.type == "Phone" and pay.account == payment_account:
@@ -705,10 +707,7 @@ def get_amount(ref_doc, payment_account=None):
elif dt == "Fees":
grand_total = ref_doc.outstanding_amount
if grand_total > 0:
return flt(grand_total, get_currency_precision())
else:
frappe.throw(_("Payment Entry is already created"))
return flt(grand_total, get_currency_precision()) if grand_total > 0 else 0
def get_irequest_status(payment_requests: None | list = None) -> list:
@@ -751,7 +750,7 @@ def cancel_old_payment_requests(ref_dt, ref_dn):
frappe.db.set_value("Integration Request", ireq.name, "status", "Cancelled")
def get_existing_payment_request_amount(ref_dt, ref_dn, statuses: list | None = None) -> list:
def get_existing_payment_request_amount(ref_doc, statuses: list | None = None) -> list:
"""
Return the total amount of Payment Requests against a reference document.
"""
@@ -759,9 +758,9 @@ def get_existing_payment_request_amount(ref_dt, ref_dn, statuses: list | None =
query = (
frappe.qb.from_(PR)
.select(Sum(PR.grand_total))
.where(PR.reference_doctype == ref_dt)
.where(PR.reference_name == ref_dn)
.select(Sum(PR.outstanding_amount))
.where(PR.reference_doctype == ref_doc.doctype)
.where(PR.reference_name == ref_doc.name)
.where(PR.docstatus == 1)
)
@@ -770,33 +769,12 @@ def get_existing_payment_request_amount(ref_dt, ref_dn, statuses: list | None =
response = query.run()
return response[0][0] if response[0] else 0
os_amount_in_transaction_currency = flt(response[0][0] if response[0] else 0)
if ref_doc.currency != ref_doc.party_account_currency:
os_amount_in_transaction_currency = flt(os_amount_in_transaction_currency / ref_doc.conversion_rate)
def get_existing_paid_amount(doctype, name):
PL = frappe.qb.DocType("Payment Ledger Entry")
PER = frappe.qb.DocType("Payment Entry Reference")
query = (
frappe.qb.from_(PL)
.left_join(PER)
.on(
(PL.against_voucher_type == PER.reference_doctype)
& (PL.against_voucher_no == PER.reference_name)
& (PL.voucher_type == PER.parenttype)
& (PL.voucher_no == PER.parent)
)
.select(Abs(Sum(PL.amount)).as_("total_paid_amount"))
.where(PL.against_voucher_type.eq(doctype))
.where(PL.against_voucher_no.eq(name))
.where(PL.amount < 0)
.where(PL.delinked == 0)
.where(PER.docstatus == 1)
.where(PER.payment_request.isnull())
)
response = query.run()
return response[0][0] if response[0] else 0
return os_amount_in_transaction_currency
def get_gateway_details(args): # nosemgrep
@@ -845,8 +823,7 @@ def update_payment_requests_as_per_pe_references(references=None, cancel=False):
if not references:
return
precision = references[0].precision("allocated_amount")
precision = frappe.get_precision("Payment Entry Reference", "allocated_amount")
referenced_payment_requests = frappe.get_all(
"Payment Request",
filters={"name": ["in", {row.payment_request for row in references if row.payment_request}]},

View File

@@ -6,7 +6,7 @@ import unittest
from unittest.mock import patch
import frappe
from frappe.tests import IntegrationTestCase, UnitTestCase
from frappe.tests import IntegrationTestCase
from erpnext.accounts.doctype.payment_entry.payment_entry import get_payment_entry
from erpnext.accounts.doctype.payment_entry.test_payment_entry import create_payment_terms_template
@@ -58,15 +58,6 @@ payment_method = [
]
class UnitTestPaymentRequest(UnitTestCase):
"""
Unit tests for PaymentRequest.
Use this class for testing individual functions and methods.
"""
pass
class TestPaymentRequest(IntegrationTestCase):
def setUp(self):
for payment_gateway in payment_gateways:
@@ -465,6 +456,16 @@ class TestPaymentRequest(IntegrationTestCase):
self.assertEqual(pr.outstanding_amount, 800)
self.assertEqual(pr.grand_total, 1000)
self.assertRaisesRegex(
frappe.exceptions.ValidationError,
re.compile(r"Payment Request is already created"),
make_payment_request,
dt="Sales Order",
dn=so.name,
mute_email=1,
submit_doc=1,
return_doc=1,
)
# complete payment
pe = pr.create_payment_entry()
@@ -484,7 +485,7 @@ class TestPaymentRequest(IntegrationTestCase):
# creating a more payment Request must not allowed
self.assertRaisesRegex(
frappe.exceptions.ValidationError,
re.compile(r"Payment Request is already created"),
re.compile(r"Payment Entry is already created"),
make_payment_request,
dt="Sales Order",
dn=so.name,
@@ -516,6 +517,17 @@ class TestPaymentRequest(IntegrationTestCase):
self.assertEqual(pr.party_account_currency, "INR")
self.assertEqual(pr.status, "Initiated")
self.assertRaisesRegex(
frappe.exceptions.ValidationError,
re.compile(r"Payment Request is already created"),
make_payment_request,
dt="Purchase Invoice",
dn=pi.name,
mute_email=1,
submit_doc=1,
return_doc=1,
)
# to make partial payment
pe = pr.create_payment_entry(submit=False)
pe.paid_amount = 2000
@@ -544,7 +556,7 @@ class TestPaymentRequest(IntegrationTestCase):
# creating a more payment Request must not allowed
self.assertRaisesRegex(
frappe.exceptions.ValidationError,
re.compile(r"Payment Request is already created"),
re.compile(r"Payment Entry is already created"),
make_payment_request,
dt="Purchase Invoice",
dn=pi.name,
@@ -748,29 +760,86 @@ class TestPaymentRequest(IntegrationTestCase):
pi.load_from_db()
self.assertEqual(pr_2.grand_total, pi.outstanding_amount)
def test_consider_journal_entry_and_return_invoice(self):
from erpnext.accounts.doctype.journal_entry.test_journal_entry import make_journal_entry
def test_partial_paid_invoice_with_submitted_payment_entry(self):
pi = make_purchase_invoice(currency="INR", qty=1, rate=5000)
pi.save()
pi.submit()
si = create_sales_invoice(currency="INR", qty=5, rate=500)
pe = get_payment_entry("Purchase Invoice", pi.name, bank_account="_Test Bank - _TC")
pe.reference_no = "PURINV0001"
pe.reference_date = frappe.utils.nowdate()
pe.paid_amount = 2500
pe.references[0].allocated_amount = 2500
pe.save()
pe.submit()
pe.cancel()
je = make_journal_entry("_Test Cash - _TC", "Debtors - _TC", 500, save=False)
je.accounts[1].party_type = "Customer"
je.accounts[1].party = si.customer
je.accounts[1].reference_type = "Sales Invoice"
je.accounts[1].reference_name = si.name
je.accounts[1].credit_in_account_currency = 500
je.submit()
pe = get_payment_entry("Purchase Invoice", pi.name, bank_account="_Test Bank - _TC")
pe.reference_no = "PURINV0002"
pe.reference_date = frappe.utils.nowdate()
pe.paid_amount = 2500
pe.references[0].allocated_amount = 2500
pe.save()
pe.submit()
pe = get_payment_entry("Sales Invoice", si.name)
pe.paid_amount = 500
pe.references[0].allocated_amount = 500
pe.save()
pe.submit()
pi.load_from_db()
pr = make_payment_request(dt="Purchase Invoice", dn=pi.name, mute_email=1)
self.assertEqual(pr.grand_total, pi.outstanding_amount)
cr_note = create_sales_invoice(qty=-1, rate=500, is_return=1, return_against=si.name, do_not_save=1)
cr_note.update_outstanding_for_self = 0
cr_note.save()
cr_note.submit()
si.load_from_db()
pr = make_payment_request(dt="Sales Invoice", dn=si.name, mute_email=1)
self.assertEqual(pr.grand_total, si.outstanding_amount)
def test_partial_paid_invoice_with_submitted_payment_entry(self):
pi = make_purchase_invoice(currency="INR", qty=1, rate=5000)
pi.save()
pi.submit()
pe = get_payment_entry("Purchase Invoice", pi.name, bank_account="_Test Bank - _TC")
pe.reference_no = "PURINV0001"
pe.reference_date = frappe.utils.nowdate()
pe.paid_amount = 2500
pe.references[0].allocated_amount = 2500
pe.save()
pe.submit()
pe.cancel()
pe = get_payment_entry("Purchase Invoice", pi.name, bank_account="_Test Bank - _TC")
pe.reference_no = "PURINV0002"
pe.reference_date = frappe.utils.nowdate()
pe.paid_amount = 2500
pe.references[0].allocated_amount = 2500
pe.save()
pe.submit()
pi.load_from_db()
pr = make_payment_request(dt="Purchase Invoice", dn=pi.name, mute_email=1)
self.assertEqual(pr.grand_total, pi.outstanding_amount)
def test_payment_request_on_unreconcile(self):
pi = make_purchase_invoice(currency="INR", qty=1, rate=500)
pi.submit()
pr = make_payment_request(
dt=pi.doctype,
dn=pi.name,
mute_email=1,
submit_doc=True,
return_doc=True,
)
self.assertEqual(pr.grand_total, pi.outstanding_amount)
pe = pr.create_payment_entry()
unreconcile = frappe.get_doc(
{
"doctype": "Unreconcile Payment",
"company": pe.company,
"voucher_type": pe.doctype,
"voucher_no": pe.name,
}
)
unreconcile.add_references()
unreconcile.submit()
pi.load_from_db()
pr.load_from_db()
self.assertEqual(pr.grand_total, pi.outstanding_amount)

View File

@@ -24,7 +24,9 @@
"paid_amount",
"discounted_amount",
"column_break_3",
"base_payment_amount"
"base_payment_amount",
"base_outstanding",
"base_paid_amount"
],
"fields": [
{
@@ -155,18 +157,34 @@
"fieldtype": "Currency",
"label": "Payment Amount (Company Currency)",
"options": "Company:company:default_currency"
},
{
"fieldname": "base_outstanding",
"fieldtype": "Currency",
"label": "Outstanding (Company Currency)",
"options": "Company:company:default_currency",
"read_only": 1
},
{
"depends_on": "base_paid_amount",
"fieldname": "base_paid_amount",
"fieldtype": "Currency",
"label": "Paid Amount (Company Currency)",
"options": "Company:company:default_currency",
"read_only": 1
}
],
"index_web_pages_for_search": 1,
"istable": 1,
"links": [],
"modified": "2024-03-27 13:10:11.356171",
"modified": "2025-03-11 11:06:51.792982",
"modified_by": "Administrator",
"module": "Accounts",
"name": "Payment Schedule",
"owner": "Administrator",
"permissions": [],
"quick_entry": 1,
"row_format": "Dynamic",
"sort_field": "creation",
"sort_order": "DESC",
"states": [],

View File

@@ -14,6 +14,8 @@ class PaymentSchedule(Document):
if TYPE_CHECKING:
from frappe.types import DF
base_outstanding: DF.Currency
base_paid_amount: DF.Currency
base_payment_amount: DF.Currency
description: DF.SmallText | None
discount: DF.Float

View File

@@ -0,0 +1,34 @@
[
{
"doctype":"Payment Term",
"due_date_based_on":"Day(s) after invoice date",
"payment_term_name":"_Test N30",
"description":"_Test Net 30 Days",
"invoice_portion":50,
"credit_days":30
},
{
"doctype":"Payment Term",
"due_date_based_on":"Day(s) after invoice date",
"payment_term_name":"_Test COD",
"description":"_Test Cash on Delivery",
"invoice_portion":50,
"credit_days":0
},
{
"doctype":"Payment Term",
"due_date_based_on":"Month(s) after the end of the invoice month",
"payment_term_name":"_Test EONM",
"description":"_Test End of Next Month",
"invoice_portion":100,
"credit_months":1
},
{
"doctype":"Payment Term",
"due_date_based_on":"Day(s) after invoice date",
"payment_term_name":"_Test N30 1",
"description":"_Test Net 30 Days",
"invoice_portion":100,
"credit_days":30
}
]

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