Compare commits

...

883 Commits

Author SHA1 Message Date
Ankush Menat
0255642deb Merge branch 'develop' into fix-get_single_value 2024-01-10 10:42:12 +05:30
Ankush Menat
2178fdc65a fix: get_single_value doesn't support multiple fields 2024-01-10 10:39:45 +05:30
0xD0M1M0
eabf706f37 fix: projects website list visible for guests and all logged in customers (#39164)
* fix: projects website list visible for guests

fix: projects website list visible for guests and all logged in customers

see the issue for details

fixes issue #39009

* fix: remove user = frappe.session.user
2024-01-10 10:29:38 +05:30
barredterra
d4d9e6c6fa test: fix wrong fieldname 2024-01-10 01:25:24 +01:00
barredterra
2eb318a5ce fix: wrong usage of get_single_value 2024-01-10 00:53:05 +01:00
Ankush Menat
b897225136 fix: Remove reference to non-existing doctype 2024-01-09 22:04:24 +05:30
Ankush Menat
bb18ae82cf refactor: use db.get_single_value 2024-01-09 21:57:50 +05:30
s-aga-r
74ceb6da5e Merge pull request #39242 from s-aga-r/FIX-8184
fix: skip rate validation for return `DN Items` with `Moving Average` valuation
2024-01-09 21:45:45 +05:30
s-aga-r
e0ad52b500 fix: skip rate validation for return DN Items with Moving Average valuation 2024-01-09 21:18:19 +05:30
s-aga-r
8252d92e6a Merge pull request #39262 from s-aga-r/FIX-8208
fix: Duplicate Closing Stock Balance
2024-01-09 19:31:53 +05:30
s-aga-r
b15795392b fix: Duplicate Closing Stock Balance 2024-01-09 19:03:06 +05:30
rohitwaghchaure
274c65c451 fix: TypeError is pricing rules (#39252) 2024-01-09 16:20:42 +05:30
s-aga-r
1b4fbbb115 Merge pull request #39158 from s-aga-r/FIX-8011
fix: add read permission to Buying Settings
2024-01-09 16:13:04 +05:30
ruthra kumar
f95403d1dc Merge pull request #39251 from ruthra-kumar/continues_pr_39196
fix: update status on manual allocation
2024-01-09 15:59:03 +05:30
rohitwaghchaure
2d2ff7cf52 fix: incorrect indicator title for portal sales order (#39247) 2024-01-09 15:37:46 +05:30
ruthra kumar
d32a407e08 fix: update status on manual allocation 2024-01-09 15:35:42 +05:30
rohitwaghchaure
5e0d017497 fix: BOM replace tool does not update exploded items of root (#39244) 2024-01-09 15:32:45 +05:30
Nabin Hait
ec07b42ea2 Merge pull request #38530 from bosue/duplicate_zero_quantity_check2
refactor: Consolidate duplicate zero-quantity Items checks for transactions.
2024-01-09 13:12:25 +05:30
ruthra kumar
3b861798e6 Merge pull request #39237 from ruthra-kumar/github_issue_38868
fix: sales team commission overallocation on fetching items from multiple quotations to Sales Order
2024-01-09 13:06:28 +05:30
ruthra kumar
b498094a97 fix: total allocated percentage for sales team issue 2024-01-09 12:40:41 +05:30
Nabin Hait
62bbcbc7ef Merge pull request #39202 from GursheenK/fiscal-year-naming-keyerror
fix: parse naming series with FY name
2024-01-08 21:48:39 +05:30
Nabin Hait
96530b9c0b Merge pull request #39193 from GursheenK/coa-from-existing-company
fix: account currency from existing company COA
2024-01-08 21:46:52 +05:30
Nabin Hait
0cbcc55d9a Merge pull request #39195 from GursheenK/no-copy-party-balance
fix: avoid copying party balance on duplication of PE
2024-01-08 21:38:53 +05:30
Nabin Hait
6b5c54bcbc Merge pull request #39209 from nabinhait/asset-depreciation-currency
fix: Introduced company field to show amounts in company currency
2024-01-08 21:37:57 +05:30
Nabin Hait
c2dde04aa2 Merge pull request #39214 from nabinhait/item-quick-entry
fix: Show maintain-stock and is-fixed-asset checkbox in item quick entry dialog
2024-01-08 21:35:55 +05:30
Nabin Hait
c14986f9e6 fix: Show maintain-stock and is-fixed-asset checkbox in item quick entry dialog 2024-01-08 18:15:55 +05:30
ruthra kumar
62a6945bd2 Merge pull request #39196 from ruthra-kumar/incorrect_status_in_bank_transaction
fix: bank transaction status upon reconciliation
2024-01-08 18:06:30 +05:30
Shariq Ansari
be8bb235dc chore: linter fix 2024-01-08 18:00:02 +05:30
Shariq Ansari
498bf15ecd chore: linter fix 2024-01-08 17:58:59 +05:30
ruthra kumar
210d7711b4 Merge pull request #39212 from ruthra-kumar/make_use_of_doc_level_proj_filter
fix: project filters on Delivery Note and Sales Order
2024-01-08 17:37:57 +05:30
ruthra kumar
cf988434e9 refactor: remove 'Bank Trasaction' logic from status_update 2024-01-08 17:32:22 +05:30
rohitwaghchaure
466625213b fix: FG Item incorrect qty in the work order (#39200) 2024-01-08 17:18:29 +05:30
ruthra kumar
9ba6ff67d5 fix: project filters on Delivery Note and Sales Order 2024-01-08 17:11:26 +05:30
Nabin Hait
eab22eb282 fix: Introduced company field to show amounts in company currency 2024-01-08 16:35:45 +05:30
Shariq Ansari
7e198ccb21 Merge pull request #39204 from shariquerik/add-expected-start-date-in-sort
fix: add expected_start_date in sort by
2024-01-08 16:09:13 +05:30
Shariq Ansari
3d54fd8389 fix: add expected_start_date in sort by 2024-01-08 16:04:40 +05:30
Gursheen Anand
d0ea598cdf fix: fetch name for fy 2024-01-08 15:50:50 +05:30
ruthra kumar
6de8c18f98 fix: bank transction status upon reconciliation 2024-01-08 15:38:43 +05:30
Gursheen Anand
5923b48ede fix: avoid copying party balance 2024-01-08 13:18:01 +05:30
Gursheen Anand
7d264696f3 fix: account currency from existing company coa 2024-01-08 13:07:42 +05:30
rohitwaghchaure
b96c063c93 fix: duplicate entry for serial / batch creation (#39188) 2024-01-08 12:51:14 +05:30
Nabin Hait
2bad706dcf Merge pull request #39163 from nabinhait/asset-fix1
fix: Purchase information is not required for creating a composite asset
2024-01-08 12:21:35 +05:30
s-aga-r
7fa3e82ac7 Merge pull request #39167 from s-aga-r/FIX-7864
fix: update Maintenance Schedule status on Maintenance Visit submit
2024-01-08 11:49:36 +05:30
ruthra kumar
7ddbfa10c9 Merge pull request #39161 from ruthra-kumar/allow_sales_invoice_in_bank_reconciliation
refactor: allow sales invoice in Bank Reconciliation tool
2024-01-08 10:31:31 +05:30
ruthra kumar
4bd437b59d Merge pull request #39165 from ruthra-kumar/bug_in_payment_entry_outstanding_reference
fix: incorrect outstanding amt validation on advance as liability
2024-01-08 10:14:15 +05:30
ruthra kumar
fca8028e3c Merge pull request #39159 from ruthra-kumar/testing_bulk_transaction_permissions
refactor: prevent permission error by always processing bulk transaction in background
2024-01-08 10:11:47 +05:30
s-aga-r
cd293a5173 fix: update Maintenance Schedule status on Maintenance Visit submit 2024-01-06 11:36:22 +05:30
Raffael Meyer
07b605a287 fix: make Dr/Cr in CoA translatable (#39033)
* fix: make Dr/Cr in CoA translatable

* fix: german translations
2024-01-05 23:33:42 +05:30
s-aga-r
54383cfb55 Merge pull request #39140 from s-aga-r/FIX-8018
fix: don't set rate for non-stock item in Internal Transfer
2024-01-05 22:51:47 +05:30
ruthra kumar
4cc3c1b765 fix: incorrect outstanding amt validation on advance as liability 2024-01-05 20:42:38 +05:30
s-aga-r
4d56f725fe fix: make Sales Person non-mandatory 2024-01-05 18:44:06 +05:30
Nabin Hait
c34f09c503 fix: Purchase date and amount is not mandatory for composite asset creation 2024-01-05 17:38:51 +05:30
Nabin Hait
fe43dab4d7 fix: improved validation message 2024-01-05 17:12:08 +05:30
ruthra kumar
b69cdeb4a6 refactor: allow sales invoice in Bank Reconciliation tool 2024-01-05 16:13:49 +05:30
ruthra kumar
15dc5c7e99 refactor: prevent permissions by always processing in background 2024-01-05 15:47:02 +05:30
s-aga-r
e05bf9d32a fix: add read permission to Buying Settings 2024-01-05 15:35:14 +05:30
mergify[bot]
3fb7886418 fix: Creating Asset Activity while Importing Asset (backport #39113) (#39156)
fix: Creating Asset Activity while Importing Asset (#39113)

* fix: import asset not working on activity

* chore: fix linting issue in asset_activity.py

---------

Co-authored-by: Anand Baburajan <anandbaburajan@gmail.com>
(cherry picked from commit 5e4693763a)

Co-authored-by: Aulia Bismar <auliabismar@yahoo.com>
2024-01-05 10:50:49 +05:30
rohitwaghchaure
bae7c64964 fix: inventory dimension negative stock validation (#39149) 2024-01-04 18:47:06 +05:30
Raffael Meyer
68c0e188e8 fix: remove parent_field parameter from calls to rebuild_tree (#39146)
fix: remove parent_field parameter from calls to rebuild_tree

The parent_field parameter became redundant with https://github.com/frappe/frappe/pull/24107
2024-01-04 18:12:41 +05:30
Raffael Meyer
e912e9597d fix(Employee): treeview (#39126) 2024-01-04 18:03:28 +05:30
s-aga-r
610d4f5cb6 Merge pull request #39127 from s-aga-r/FIX-38702
feat: provision to close SCO
2024-01-04 16:38:21 +05:30
s-aga-r
cdd5441435 fix(text): test_update_status 2024-01-04 15:52:11 +05:30
rohitwaghchaure
f09e2130a1 fix: serial / batch barcode scanner (#39114) 2024-01-04 14:58:02 +05:30
s-aga-r
0819675fce fix: auto close and reopen SCO based on PO status 2024-01-04 13:44:53 +05:30
s-aga-r
784b6dcfea fix: don't allow to reopen SCO if PO is closed 2024-01-04 13:05:17 +05:30
s-aga-r
245effcccd fix: update qty on SCO status change 2024-01-04 12:56:57 +05:30
s-aga-r
0d01bd8a5a fix: don't close PO on SCO close 2024-01-04 12:34:25 +05:30
s-aga-r
57b6a98703 test: internal transfer for non-stock item 2024-01-04 12:20:53 +05:30
s-aga-r
e1b0fffd0c fix: don't set rate for non-stock item in Internal Transfer 2024-01-04 11:43:02 +05:30
Deepesh Garg
c2f88f29dc Merge pull request #39138 from deepeshgarg007/subscription_patch_fix
fix: Subscription update patch
2024-01-04 11:23:33 +05:30
Deepesh Garg
277dade9f9 fix: Subscription update patch 2024-01-04 11:22:42 +05:30
Deepesh Garg
e2cf1ea73e Merge pull request #39125 from ruthra-kumar/ignore_cancelled_payment_in_sales_register
fix: ignore cancelled payments in Sales/Purchase Register
2024-01-04 11:14:25 +05:30
Deepesh Garg
df409d80e0 Merge pull request #39135 from deepeshgarg007/demo_test_case
fix: flaky demo test case
2024-01-04 11:14:08 +05:30
Deepesh Garg
5b1571879c fix: flaky demo test case 2024-01-04 10:48:01 +05:30
s-aga-r
bb839b2924 fix(ux): filter closed SCO in Get Items From dialog 2024-01-03 22:37:01 +05:30
s-aga-r
5bc2035bd0 fix: don't allow to submit/cancel SE against a closed SCO 2024-01-03 22:20:06 +05:30
s-aga-r
9e973476b2 fix: don't allow to submit/cancel SCR against a closed SCO 2024-01-03 22:13:37 +05:30
s-aga-r
5e2669f4b6 feat: provision to close SCO 2024-01-03 21:43:38 +05:30
ruthra kumar
0f1be03faf fix: ignore cancelled payments in Sales/Purchase Register 2024-01-03 20:57:01 +05:30
ruthra kumar
351ee5b8fe Merge pull request #39116 from ruthra-kumar/fix_multi_select_dialog_for_invoices
fix: typerror on multi select dialog
2024-01-03 20:53:46 +05:30
Ankush Menat
e84c9f7c51 fix(UX): dont override framework's permission check messages (#39118) 2024-01-03 20:10:19 +05:30
ruthra kumar
7da9ffa3bd fix: typerror on multi select dialog 2024-01-03 17:59:15 +05:30
Ankush Menat
4415212a2d chore: use diff secret 2024-01-03 12:50:25 +05:30
Ankush Menat
6401908f41 fix: Ignore UP on "allowed to transact with" (#39103)
If a customer is allowed to transact with some company it usually
doesn't imply that customer is somehow "linked with" that company.
2024-01-03 11:15:34 +05:30
Deepesh Garg
beee98da6d feat: Against voucher filter in General Ledger (#39100) 2024-01-03 10:03:27 +05:30
ruthra kumar
60c33ac3e6 Merge pull request #39097 from ruthra-kumar/make_loyalty_program_editable
refactor: flag to control loyalty point creation at invoice level
2024-01-03 09:46:43 +05:30
ruthra kumar
1bc74bde29 refactor: flag to control loyalty point creation at invoice level 2024-01-02 17:26:39 +05:30
Rushabh Mehta
12c40ef2e4 Merge pull request #39093 from rmehta/rename-workspace
fix(minor): Rename "ERPNext Settings" to "Settings" and remove "ERPNe…
2024-01-02 15:52:45 +05:30
Rushabh Mehta
b250a21a2b fix(minor): remove "hide_workspaces" from erpnext/install.py 2024-01-02 15:50:54 +05:30
Rushabh Mehta
4e28b5a199 fix(minor): Rename "ERPNext Settings" to "Settings" and remove "ERPNext Integrations" workspace 2024-01-02 15:27:41 +05:30
Ankush Menat
739434b727 perf: index item_code in bom explosion item (#39085) 2024-01-02 14:31:41 +05:30
Parameshwari Palanisamy
9ea963bfe9 fix: Variant Items, List View Enabled to Variant Status Change (#38468)
* feat: Purchase Register Report Supplier Group filter Adding

* fix: Variant Items, List View Enabled to Variant Status Change

* Update purchase_register.js

* Update purchase_register.py
2024-01-02 14:04:56 +05:30
rohitwaghchaure
6e5484ea03 fix: on cancellation of document cancel the serial and batch bundle (#39076) 2024-01-02 12:54:18 +05:30
ruthra kumar
d048644327 Merge pull request #39067 from ruthra-kumar/fix_undefined_error_in_budget_variance_report
fix: undefined error in Budget Variance and Profitability report
2024-01-01 17:37:07 +05:30
ruthra kumar
1a9e091d12 fix: select options should dynamically load dimensions 2024-01-01 17:32:33 +05:30
ruthra kumar
1b0d9643cd Merge pull request #39023 from ruthra-kumar/refactor_customer_ledger_summary
refactor(perf): replace account subquery with 'in' condition
2024-01-01 15:42:24 +05:30
ruthra kumar
92bc962f60 fix: undefined error in Budget Variance and Profitability report
'Budget' and 'Budget Account' doesn't have support for dynamic
dimension. It only supports hard-coded ones -  Project and Cost Center
2024-01-01 15:30:35 +05:30
Anand Baburajan
a9576f0cf6 feat: group by Asset in Asset Depreciations and Balances report (#38923)
feat: group by asset in asset depreciations and balances report
2024-01-01 15:03:21 +05:30
David Arnold
4f8a16848f chore: default_roles hook doesn't exist anymore (#39032) 2024-01-01 13:34:36 +05:30
Deepesh Garg
bacf2b7431 fix: Unable to save Sales Invoice (#39059) 2024-01-01 13:23:26 +05:30
Ankush Menat
34d8bc4701 chore: disable v13 auto releases 2024-01-01 13:13:25 +05:30
Ankush Menat
510fdf7bf6 fix(DX): capture tracebacks with context (#39060) 2024-01-01 13:10:03 +05:30
Anand Baburajan
0346f47c1d fix: take quantity into account when setting asset's gross purchase amt (#39056)
fix: take quantity into account when setting asset's gross purchase amount
2024-01-01 11:24:42 +05:30
Deepesh Garg
3f9693b31f fix: GL values in transaction currency via JV (#38914) 2023-12-31 20:00:03 +05:30
Smit Vora
877cc7255d fix: enqueue demo data setup on setup complete (#39043) 2023-12-31 10:54:07 +05:30
rohitwaghchaure
70abedc57a fix: work order with multi level, fetch operting cost from sub-assembly (#38992) 2023-12-29 16:50:31 +05:30
rohitwaghchaure
0c6de4ecb2 fix: non stock uom validation for serial and batch (#39018)
* fix: non stock uom validation for serial and batch

* test: delivery note for batch with non stock uom
2023-12-29 16:50:01 +05:30
ruthra kumar
a517125d64 refactor(perf): replace account subquery with 'in' condition 2023-12-29 14:57:16 +05:30
Gursheen Kaur Anand
b7f283b2f0 feat: skip disabled accounts in COA (#38551)
* feat: skip disabled accounts in coa

* fix: add parameter to other tree doctype utils
2023-12-29 12:55:37 +05:30
Deepesh Garg
cd37fd790b fix: Validate account in Sales/Purchase Taxes and Charges Template (#39013) 2023-12-29 12:52:22 +05:30
rohitwaghchaure
f983e09f92 fix: purchase return without item code not working (#39014) 2023-12-29 12:06:04 +05:30
Deepesh Garg
3b4b2275de fix: Multiple subscription fixes (#39005) 2023-12-29 08:25:38 +05:30
rohitwaghchaure
b5340c5ec0 fix: auto fetch not working if bundle exists (#39002) 2023-12-28 18:32:27 +05:30
rohitwaghchaure
10074e9980 fix: serial and batch bundle company mandatory error (#38994) 2023-12-28 17:56:24 +05:30
Deepesh Garg
bbee9b5637 fix: Opening balance in bank reconciliation tool (#38977) 2023-12-28 17:50:16 +05:30
ruthra kumar
915d864166 Merge pull request #38969 from ruthra-kumar/bug_in_p_l_report
fix: incorrect net profit in Profit and Loss Statement
2023-12-28 16:23:21 +05:30
ruthra kumar
8555617295 test: profit and loss report output 2023-12-28 15:56:35 +05:30
Ankush Menat
b71b0d5997 fix: remove bad defaults (#38986)
Child tables can't have a default.
2023-12-28 08:45:40 +00:00
rohitwaghchaure
a117ef3cb8 fix: not able to cancel sales invoice (#38979) 2023-12-28 11:14:27 +05:30
Raffael Meyer
33b631e395 Merge pull request #38805 from barredterra/remove-unused-coa 2023-12-28 00:06:50 +01:00
Deepesh Garg
9b1c22250f feat: Merge taxes from mapped docs (#38346)
* feat: Merge taxes from mapped docs

* chore: ci failures
2023-12-27 22:37:01 +05:30
Ankush Menat
4feecb69d8 ci: lock old resolved issue/PRs 2023-12-27 19:31:45 +05:30
ruthra kumar
12560e2407 Merge pull request #38496 from ruthra-kumar/bisect_accounting_reports
feat: utility to debug financial reports
2023-12-27 17:54:36 +05:30
ruthra kumar
0890b414b1 chore: resolve linter issues 2023-12-27 17:31:34 +05:30
ruthra kumar
d54f8318fb fix: incorrect total when Accumulating values 2023-12-27 16:50:07 +05:30
VihangT
fe77b9d633 fix : correct logic for overlap error (#38967)
fixing overlap error logic with taking care of sequential time job cards in overlap job card list
2023-12-27 16:11:29 +05:30
rohitwaghchaure
47ee801d37 fix: incorrect qty in serial batch bundle against pick list (#38964) 2023-12-27 13:09:23 +05:30
s-aga-r
705ae7da14 Merge pull request #38962 from s-aga-r/FIX-38781
fix: use `Stock Qty` while getting `POS Reserved Qty`
2023-12-27 12:50:37 +05:30
s-aga-r
7223106417 fix: use Stock Qty while getting POS Reserved Qty 2023-12-27 10:32:13 +05:30
barredterra
5a5758423e Merge remote-tracking branch 'upstream/develop' into remove-unused-coa 2023-12-26 16:06:43 +01:00
rohitwaghchaure
b09c9354fb fix: min order qty optional in production plan (#38956)
* fix: min order qty optional in production plan

* fix: test cases
2023-12-26 20:11:58 +05:30
rohitwaghchaure
d00f6672a8 fix: not able to import serial batch bundle using csv (#38950) 2023-12-26 15:24:04 +05:30
rohitwaghchaure
06d6220a2a fix: do not make serial batch bundle for zero qty (#38949) 2023-12-26 15:23:32 +05:30
ruthra kumar
3011322b22 Merge pull request #38891 from ruthra-kumar/customer_wise_report_price_issue
fix: incorrect price list in customer-wise item price report
2023-12-26 11:27:20 +05:30
s-aga-r
e560029736 Merge pull request #38942 from s-aga-r/FIX-38151-2
fix(ux): make PR and PI Item rate field readonly based on `Maintain Same Rate`
2023-12-26 10:20:34 +05:30
s-aga-r
b1ba210332 fix(ux): make PR Item rate field readonly based on Maintain Same Rate 2023-12-25 22:41:18 +05:30
s-aga-r
cb9114442b fix(ux): make PI Item rate field readonly based on Maintain Same Rate 2023-12-25 22:29:17 +05:30
s-aga-r
eb5bb9f9a9 fix(ux): make PI Item rate field editable 2023-12-25 22:05:02 +05:30
Wolfram Schmidt
87ba3b64f7 chore: german translation for actual time (#38837)
chore: german translation for actual time
2023-12-24 16:22:26 +05:30
Gursheen Kaur Anand
47f7b65058 feat: voucher subtype for general ledger (#38822)
* feat: add voucher subtype column to gle

* feat: add logic to set voucher subtypes

* feat: fetch voucher subtype in ledger report

* fix: order of conditions
2023-12-24 16:13:31 +05:30
rohitwaghchaure
161ae1edd1 fix: reset the incoming rate on changing of the warehouse (#38925) 2023-12-22 17:37:17 +05:30
s-aga-r
d097ad6c19 Merge pull request #38922 from s-aga-r/FIX-38558
fix: `Reserved Stock` report
2023-12-22 16:27:27 +05:30
s-aga-r
a5d5223c0e fix: Reserved Stock report 2023-12-22 15:46:06 +05:30
s-aga-r
1a1629196d chore: improve Allowed Qty error msg 2023-12-22 15:29:56 +05:30
s-aga-r
d0ed8ef83b Merge pull request #38558 from s-aga-r/ADD-ITEMS-STOCK-RESERVATION-DIALOG
feat: provision to add items in Stock Reservation dialog
2023-12-22 12:15:07 +05:30
hyaray
0773f66feb chore: Update company.py (#38660)
chore: Update company.py
2023-12-22 08:41:51 +05:30
Ankush Menat
2dc49c834a chore: fixup broken JSON files (#38915) 2023-12-22 07:36:27 +05:30
Ankush Menat
787333896c perf: Drop unused/duplicate/sub-optimal indexes (#38884)
* ci: enable more checks

* perf: Drop unused/duplicate indexes
2023-12-21 20:09:10 +05:30
Anand Baburajan
283763dfb2 chore: additional_asset_cost field (#38904) 2023-12-21 16:52:25 +05:30
mergify[bot]
07175367d8 fix: reposting not fixing valuation rate for sales return using movin… (backport #38895) (#38897)
* fix: reposting not fixing valuation rate for sales return using movin… (#38895)

fix: reposting not fixing valuation rate for sales return using moving average method
(cherry picked from commit 3a668bbe96)

# Conflicts:
#	erpnext/stock/stock_ledger.py

* chore: fix conflicts

---------

Co-authored-by: rohitwaghchaure <rohitw1991@gmail.com>
2023-12-21 14:40:52 +05:30
mergify[bot]
61219ca4ce fix: do not reset the basic rate for the material receipt stock entry (backport #38896) (#38898)
fix: do not reset the basic rate for the material receipt stock entry (#38896)

(cherry picked from commit 98bfcc4c75)

Co-authored-by: rohitwaghchaure <rohitw1991@gmail.com>
2023-12-21 14:23:08 +05:30
ruthra kumar
c20995ec2f Merge pull request #38893 from ruthra-kumar/typeerror_in_pos
fix: typeerror on pos order summary to new order screen
2023-12-21 12:21:59 +05:30
ruthra kumar
6a0a08b59c fix: typeerror on pos order summary to new order screen 2023-12-21 12:13:33 +05:30
Anand Baburajan
d370c60a6c feat: total_asset_cost field (#38879) 2023-12-20 19:02:32 +05:30
mergify[bot]
a6ab53236e fix: allow to set rate manually for service item in BOM (backport #38880) (#38882)
fix: allow to set rate manually for service item in BOM (#38880)

(cherry picked from commit c2f692a4e4)

Co-authored-by: rohitwaghchaure <rohitw1991@gmail.com>
2023-12-20 18:33:26 +05:30
ruthra kumar
9a00edb031 fix: incorrect price list in customer-wise item price report 2023-12-20 17:47:31 +05:30
NIYAZ RAZAK
ae353398d9 fix: local reference error in BOM (#38850)
fix: local reference error
2023-12-20 14:34:38 +05:30
Ankush Menat
9983283f95 perf: use estimated rows instead of actual rows (#38830) 2023-12-20 13:16:09 +05:30
ruthra kumar
6d5bdc6c68 fix: typerror on tree doctypes - Item Group, Customer Group, Supplier Group and Territory (#38870)
* refactor: typerror on set_root_readonly

* refactor: remove 'cur_frm' usage in supplier_group

* refactor: remove 'cur_frm' usage in territory.js

* refactor: remove 'cur_frm' from sales_person.js
2023-12-20 12:30:10 +05:30
ruthra kumar
80e69210db Merge pull request #38838 from pps190/fix-use-party-account-currency
fix: use party account currency when party account is specified
2023-12-20 12:29:04 +05:30
mergify[bot]
793e3ad78e fix: if not budget then don't validate (backport #38861) (#38864)
fix: if not budget then don't validate (#38861)

(cherry picked from commit d375164100)

Co-authored-by: rohitwaghchaure <rohitw1991@gmail.com>
2023-12-19 18:31:18 +05:30
mergify[bot]
4057682c87 fix: incoming rate for sales return with Moving Average valuation method (backport #38849) (#38863)
* fix: incoming rate for sales return with Moving Average valuation method (#38849)

(cherry picked from commit 7fdac62393)

# Conflicts:
#	erpnext/stock/doctype/delivery_note/test_delivery_note.py

* chore: fix conflicts

---------

Co-authored-by: rohitwaghchaure <rohitw1991@gmail.com>
2023-12-19 18:29:56 +05:30
mergify[bot]
5e68b7e3a6 fix: on closed unreserved the production plan qty (backport #38848) (#38859)
fix: on closed unreserved the production plan qty (#38848)

(cherry picked from commit 2184e8ef58)

Co-authored-by: rohitwaghchaure <rohitw1991@gmail.com>
2023-12-19 18:01:37 +05:30
s-aga-r
495b47db16 Merge pull request #38842 from SvbZ3r0/po-get-fg-item-qty
fix: set `fg-itm-qty` based on `qty` instead of the other way round in Subcontracting POs
2023-12-19 15:23:30 +05:30
mergify[bot]
4aa960b744 fix: item variant with manufacturer (backport #38845) (#38847)
* fix: item variant with manufacturer (#38845)

(cherry picked from commit e0c8ff10da)

* chore: fix test case

---------

Co-authored-by: rohitwaghchaure <rohitw1991@gmail.com>
2023-12-19 14:59:33 +05:30
ruthra kumar
dd6c192695 Merge pull request #38797 from rtdany10/ar-credit-note-fix
fix: wrong paid and cn amount on pos invoice
2023-12-19 11:02:01 +05:30
Dany Robert
8772628912 test: partial payment for pos invoice 2023-12-19 10:00:51 +05:30
Gughan Ravikumar
a99d0a65b0 fix: set fg-itm-qty based on qty instead of the other way round 2023-12-19 07:56:02 +05:30
Devin Slauenwhite
a09241e3c7 fix(test): expect account currency when party account is specified. 2023-12-18 19:09:25 +00:00
Devin Slauenwhite
c7b961ffa2 fix: use party account currency when party account is specified 2023-12-18 18:03:53 +00:00
mergify[bot]
32a608f948 fix: not able to make inter-company po from so (backport #38826) (#38828)
fix: not able to make inter-company po from so (#38826)

(cherry picked from commit 23042dfc3c)

Co-authored-by: rohitwaghchaure <rohitw1991@gmail.com>
2023-12-18 18:13:47 +05:30
Ankush Menat
8d79365e0d perf: index return_against on delivery note (#38827)
There's a multi-column index but that's useful IFF all parts of column
are part of query.

return against on it's own is VERY unique because it's a primary key, we
don't need a multi-column index here.
2023-12-18 18:06:44 +05:30
mergify[bot]
71e833c3f2 fix: not able to cancel SCR with Batch (backport #38817) (#38821)
* fix: not able to cancel SCR with Batch (#38817)

(cherry picked from commit fb5090fd3f)

# Conflicts:
#	erpnext/subcontracting/doctype/subcontracting_receipt/test_subcontracting_receipt.py

* chore: fix test case

* chore: fix test case

* chore: fix test case

* chore: fix test case

---------

Co-authored-by: rohitwaghchaure <rohitw1991@gmail.com>
2023-12-18 17:56:05 +05:30
ruthra kumar
b5f3013005 Merge pull request #38820 from ruthra-kumar/ignore_err_in_statements
refactor: ignore ERR journals in Statment of Accounts
2023-12-18 15:55:11 +05:30
ruthra kumar
39ef75e2d0 refactor: ignore ERR journals in Statment of Accounts 2023-12-18 13:39:26 +05:30
Raffael Meyer
42813d38c3 Merge pull request #38803 from barredterra/group-current-accounts 2023-12-17 19:23:01 +01:00
Deepesh Garg
55147781f3 Merge pull request #38807 from deepeshgarg007/canada_demo
fix(demo): Demo setup for Canadian COA
2023-12-17 14:05:07 +05:30
Deepesh Garg
c9fd182268 fix(demo): Demo setup for canadian COA 2023-12-17 13:36:58 +05:30
rohitwaghchaure
0743289925 fix: serial and batch bundle return not working (#38754)
* fix: serial and batch bundle return not working

* test: added test case for delivery note return against denormalized serial no
2023-12-17 12:42:07 +05:30
barredterra
4d75159247 chore: consistent naming for German CoA files 2023-12-16 21:27:38 +01:00
barredterra
baa1978128 feat: remove german CoA "SKR04 ohne Kontonummern"
To the best of my knwoledge, this is outdated, unused and not maintained.
2023-12-16 21:27:09 +01:00
barredterra
259f313af7 fix: groups for current accounts in German CoAs 2023-12-16 21:11:54 +01:00
Deepesh Garg
863116f1cd Merge pull request #37232 from GursheenK/make-against-field-dynamic
fix: make GL and JV against fields dynamic links
2023-12-16 22:27:50 +05:30
Dany Robert
5cb5e09dbb fix: wrong paid and cn amount on pos invoice 2023-12-16 04:35:43 +00:00
Ankush Menat
fa1c7b663c fix: Reset SLA on issue doesn't work (#38789)
This was broken since last refactor where it was spun off to work with
all types of doctypes but client side code was never adapted.
2023-12-15 22:00:01 +05:30
Raffael Meyer
a9a84cc7d4 Merge pull request #38742 from ljain112/fix-pur-reg 2023-12-15 15:22:19 +01:00
Deepesh Garg
ff967c45f7 Merge pull request #38691 from deepeshgarg007/init_values
fix: Init internal child table values
2023-12-15 18:14:45 +05:30
s-aga-r
9a5c422074 Merge pull request #38778 from s-aga-r/FIX-7327
fix: wrong currency in Stock Balance report
2023-12-15 15:28:52 +05:30
s-aga-r
5a83a16e60 fix: wrong currency in Stock Balance report 2023-12-15 14:45:09 +05:30
Anand Baburajan
1704180f38 fix: asset patch failure due to missing shift_based column (#38776)
* fix: add missing daily_prorata_based in get_asset_finance_books_map

* fix: reload Asset Finance Book doctype
2023-12-15 14:43:33 +05:30
ruthra kumar
0cf9ff0a04 Merge pull request #38766 from ruthra-kumar/7101_only_treat_none
fix: validation error on reconciling PE to Journals as Invoice
2023-12-15 13:09:06 +05:30
Gursheen Kaur Anand
41ae2a2dc5 Merge pull request #38767 from GursheenK/skip-bank-jvs-in-tax-report
fix: skip JVs against bank accounts in tax report
2023-12-15 12:57:40 +05:30
Gursheen Anand
f7b2380ec1 fix: skip jvs against bank accounts 2023-12-15 12:30:15 +05:30
ruthra kumar
5eeb650dfd fix: validation error on reconciling PE to Journals as Invoice
With the same exchange rate on Journal Entry and Payment Entry,
reconcilition should not post exc gain/loss journal and should not
throw validation error
2023-12-15 11:46:12 +05:30
s-aga-r
a1b95606b1 Merge pull request #38720 from s-aga-r/FIX-6545
fix(ux): don't override Item Name and Description in MR
2023-12-15 10:57:24 +05:30
s-aga-r
726ac6bda1 fix(ux): don't override Item Name and Description in MR 2023-12-15 10:56:54 +05:30
rohitwaghchaure
d6201ce5c7 fix: homepage not working (#38755) 2023-12-14 22:47:32 +05:30
Raffael Meyer
e7e23fbc96 Merge pull request #38533 from barredterra/date-format-system-settings 2023-12-14 16:38:00 +01:00
Raffael Meyer
e7544e9fc1 Merge pull request #38505 from barredterra/lead_name_from_email 2023-12-14 13:48:19 +01:00
Ankush Menat
eaf86a6461 fix: timezone aware SLA banner (#38745) 2023-12-14 15:53:57 +05:30
ljain112
f53ba178a8 fix: show bill_date and bill_no in Purchase Register 2023-12-14 12:28:32 +05:30
ruthra kumar
c68ad73c6e Merge pull request #38717 from ruthra-kumar/7101_payment_reconciiation_bug
fix: fetch exc rate of multi currency journals on reconciliation
2023-12-14 09:35:12 +05:30
Ankush Menat
6851c5042f Revert "fix(ux): don't update qty blindly" (#38728) 2023-12-13 23:14:20 +05:30
Raffael Meyer
da96578afb Merge pull request #38725 from barredterra/preview-rfq 2023-12-13 17:31:08 +01:00
barredterra
27f05145ae feat: RFQ print preview 2023-12-13 17:00:58 +01:00
ruthra kumar
1b3ba25220 fix: fetch exc rate of multi currency journals 2023-12-13 16:39:42 +05:30
rohitwaghchaure
13cba5068b fix: barcode scanning for the stock entry (#38716) 2023-12-13 15:08:16 +05:30
rohitwaghchaure
db24e24882 fix: supplier removed on selection of item (#38712) 2023-12-13 14:06:45 +05:30
Anand Baburajan
e7984b3ef9 fix: 1st row depr. sch. value of asset put to less than 180 days acc. to I.T. S. 32 (#38696)
fix: 1st row value of asset put to less than 180 days acc. to IT S. 32
2023-12-12 20:53:37 +05:30
rohitwaghchaure
b562b4cf99 fix: show stock qty in popup (#38698) 2023-12-12 16:41:10 +05:30
rohitwaghchaure
69d7a640ee fix: negative batch issue (#38688) 2023-12-12 16:18:32 +05:30
ruthra kumar
fa2d33cb50 fix: typeerror on new sites (#38692) 2023-12-12 15:43:39 +05:30
Deepesh Garg
2588970d55 fix: Init internal child table values 2023-12-12 15:18:54 +05:30
ruthra kumar
d4ac57704c Merge pull request #38685 from ruthra-kumar/get_list_for_virtual_child_doctypes
refactor: add `get_list` for virtual child doctypes
2023-12-12 14:40:43 +05:30
ruthra kumar
15c90551b6 refactor: add get_list for virtual child doctypes 2023-12-12 13:36:03 +05:30
ruthra kumar
0acd0f50c5 Merge pull request #38679 from ruthra-kumar/refactor_repost_test
refactor(test): repost utility deletion flag test
2023-12-12 12:43:58 +05:30
ruthra kumar
acb6e8e120 refactor(test): update repost settings before test case 2023-12-12 11:39:55 +05:30
ruthra kumar
ccff588563 refactor: increase limit and remove explicit call to start_repost 2023-12-12 11:30:33 +05:30
rohitwaghchaure
780c4278e6 fix: serial no filter in the Serial No Ledger report (#38669) 2023-12-12 11:24:07 +05:30
s-aga-r
2d6506ecec Merge pull request #38667 from s-aga-r/FIX-38658
fix: close PO on SCO close
2023-12-12 10:54:46 +05:30
ruthra kumar
a97b3db749 refactor: remove explicit commit on repost 2023-12-12 10:34:51 +05:30
ruthra kumar
cc15f695b4 refactor(test): repost utility deletion flag test 2023-12-12 10:24:24 +05:30
s-aga-r
c41cbb3e29 Merge pull request #38644 from barredterra/fix-attribute-error
fix: attribute error
2023-12-12 10:02:16 +05:30
Raffael Meyer
6ad298adfc fix: typo in unittest (#38673) 2023-12-12 09:55:15 +05:30
Ankush Menat
db9829e83f Merge pull request #38672 from barredterra/fix-leaderboard
fix: get data for leaderboard
2023-12-12 09:53:23 +05:30
barredterra
956c3c50a0 chore: deprecate unused method 2023-12-11 19:46:37 +01:00
barredterra
40c1acc961 fix: get sales partner for leaderboard 2023-12-11 19:45:32 +01:00
barredterra
7babfd4ac4 fix: get sales person for leaderboard 2023-12-11 19:44:24 +01:00
barredterra
65df4b6aa8 fix: get suppliers for leaderboard 2023-12-11 19:34:54 +01:00
barredterra
2721ee3a8d fix: get items for leaderboard 2023-12-11 19:34:24 +01:00
barredterra
137b5a6108 fix: get customers for leaderboard 2023-12-11 18:32:49 +01:00
s-aga-r
b023e5d6b3 fix: close PO on SCO close 2023-12-11 12:36:08 +05:30
rohitwaghchaure
89a0e9c245 fix: not able to make serial and batch using csv import (#38659) 2023-12-11 10:35:31 +05:30
rohitwaghchaure
89326bd657 fix: auto delete draft serial and batch bundle (#38637) 2023-12-10 11:05:58 +05:30
s-aga-r
8ddc26eb2e Merge pull request #38634 from creative-paramu/shipping_address_link
fix: Shipping Address Link Showing in Buying
2023-12-08 18:59:26 +05:30
creative-paramu
ca0c3eb184 fix(ux): Shipping Address Link 2023-12-08 18:57:31 +05:30
barredterra
0465c9aabb fix: attribute error 2023-12-08 14:15:26 +01:00
s-aga-r
a045916aca Merge pull request #38608 from s-aga-r/FIX-6766
fix(ux): don't update qty blindly
2023-12-08 16:30:42 +05:30
Shariq Ansari
be312cea4c Merge pull request #38623 from shariquerik/bypass-unnessary-formatting 2023-12-07 20:46:26 +05:30
Ankush Menat
9611e9bd7f fix: ignore non-existing regional customizations (#38621) 2023-12-07 14:12:40 +00:00
Shariq Ansari
08ed3cd313 fix: format only if searched text contain link value text 2023-12-07 19:39:24 +05:30
rohitwaghchaure
231ab83562 fix: serial and batch bundle permission (#38618) 2023-12-07 18:00:07 +05:30
rohitwaghchaure
f45dd740c5 chore: minor code cleanup (#38615) 2023-12-07 15:29:50 +05:30
s-aga-r
0156339f34 fix(ux): don't update qty blindly 2023-12-07 10:16:46 +05:30
Raffael Meyer
f99bb61181 Merge pull request #38591 from barredterra/de-morgan 2023-12-06 22:30:03 +01:00
Ankush Menat
6a47a2ceaf chore: remove unused cache=True 2023-12-06 20:53:55 +05:30
Richard Case
525f656cc1 feat: add employee number to client user bootinfo (#38477) 2023-12-06 20:48:13 +05:30
sandratridz
d34787cf6d fix: only highest eligible coupon applied (#38416)
* fix: application of pricing rule when coupon is used
2023-12-06 14:41:02 +05:30
s-aga-r
9424bbc01c Merge pull request #38592 from s-aga-r/FIX-STOCK-VARIANCE
fix: consider the `Valuation Method` while picking incorrect SLE
2023-12-05 18:08:01 +05:30
s-aga-r
16c297c2ec feat: add Valuation Method column in Stock Ledger Variance report 2023-12-05 18:06:14 +05:30
s-aga-r
8beec58670 fix: incorrect SLE for Moving Average valuation method 2023-12-05 17:51:01 +05:30
barredterra
bac811bd5e chore: git blame ignore rev 2023-12-05 11:23:58 +01:00
barredterra
eb9ee3f79b refactor: simplify conditional logic
Command: `sourcery review --fix --enable de-morgan .`
2023-12-05 11:22:55 +01:00
ruthra kumar
5da3e532c9 Merge pull request #38580 from ruthra-kumar/finance_book_filter_bug_in_general_ledger
fix: sql error while filtering on finance book in GL
2023-12-05 14:40:34 +05:30
ruthra kumar
b1d9f3132d fix: sql error while filtering on finance book in GL 2023-12-05 14:06:15 +05:30
rohitwaghchaure
aaa9036eca fix: incorrect material request quantity in Production Plan (#38566) 2023-12-05 13:34:54 +05:30
Gursheen Anand
005c5a587f chore: orderby in gle 2023-12-05 13:16:54 +05:30
Gursheen Anand
47c78a5a73 fix: check for unmerged gle in purchase receipt test 2023-12-05 12:48:25 +05:30
Gursheen Anand
24ccb3eb78 fix: subcontracting receipt gle test 2023-12-05 12:47:06 +05:30
Gursheen Anand
a56b79cc72 fix: check for split entries in stock entry test 2023-12-05 12:46:22 +05:30
ruthra kumar
84ee50e492 Merge pull request #38570 from ruthra-kumar/ignore_unreconcile_on_pi_cancel
refactor: ignore unreconcile doc on PI cancel/delete
2023-12-05 12:02:44 +05:30
s-aga-r
16b7401d4c Merge pull request #38553 from s-aga-r/STOCK-VARIANCE-COMPANY
feat: `Company` filter in `Stock Ledger Variance` report
2023-12-05 11:56:17 +05:30
ruthra kumar
1a5d56977e refactor: ingore on JE cancel as well 2023-12-05 11:34:25 +05:30
Gursheen Kaur Anand
6812e91893 Merge pull request #38556 from GursheenK/period-end-date-for-financial-statements
fix(minor): financial statements period end date
2023-12-05 11:22:08 +05:30
ruthra kumar
4ca84eadb6 refactor: ignore unreconcile doc on PI cancel/delete 2023-12-05 10:14:44 +05:30
Shariq Ansari
27aba02d16 Merge pull request #38562 from shariquerik/existing-customer-issue-in-lead 2023-12-04 19:20:29 +05:30
Shariq Ansari
3d7ad71b22 fix: get dynamic link with parenttype contact 2023-12-04 19:19:09 +05:30
s-aga-r
8d5045ef4c feat: provision to add items in Stock Reservation dialog 2023-12-04 18:03:22 +05:30
s-aga-r
00261094c8 fix(ux): show row index and field label while selecting the Sales Order Item 2023-12-04 18:00:06 +05:30
s-aga-r
9471d8fff9 feat: provision to update items in Stock Reservation dialog 2023-12-04 17:56:32 +05:30
Gursheen Anand
ab6e92aae1 fix: limit end date to current date 2023-12-04 16:47:28 +05:30
s-aga-r
fb3421fcce feat: Company filter in Stock Ledger Variance report 2023-12-04 15:39:25 +05:30
rohitwaghchaure
c8693cdf37 fix: scan for serial or batch in bundle (#38534) 2023-12-04 15:02:47 +05:30
NIYAZ RAZAK
3df1d75bdd fix: incorrect customer outstanding amount (#38475)
* fix: incorrect customer outstanding amount

* chore: resolve linting error

Co-authored-by: Raffael Meyer <14891507+barredterra@users.noreply.github.com>

---------

Co-authored-by: Raffael Meyer <14891507+barredterra@users.noreply.github.com>
2023-12-04 13:39:49 +05:30
s-aga-r
fc12238fcc Merge pull request #38543 from s-aga-r/FIX-6734
fix: don't show non-stock items in Stock Analytics report
2023-12-04 12:08:07 +05:30
s-aga-r
15fff84bb5 fix: linter 2023-12-04 12:05:27 +05:30
s-aga-r
01aadbef85 fix: don't show non-stock items in Stock Analytics report 2023-12-04 12:00:36 +05:30
s-aga-r
ccdcb7dfcc fix(ux): stock-item filter for Item Code field 2023-12-04 11:58:44 +05:30
ruthra kumar
94fabe0321 Merge pull request #38220 from rtdany10/wrong-advance
fix: exclude `invoice_doctypes` from party advance
2023-12-04 10:57:15 +05:30
ruthra kumar
dd39da0b77 fix: incorrectly treating normal payment as advance (#38437)
fix: treating normal payment as advance
2023-12-04 10:08:37 +05:30
Bernd Oliver Sünderhauf
3688d9412e chore: Adapt translations to reworded message. 2023-12-03 22:55:58 +01:00
Bernd Oliver Sünderhauf
4918aeb4c6 refactor: Consolidate duplicate zero-quantity transaction Items checks. 2023-12-03 19:57:32 +01:00
Nihantra C. Patel
d659d407a0 fix: Group By in Item-wise Purchase Register (#38503) 2023-12-03 23:22:04 +05:30
Gursheen Anand
262cafc430 fix: query for against types 2023-12-03 22:36:54 +05:30
Gursheen Anand
11190aac4c fix: unhide against type field 2023-12-03 22:35:01 +05:30
Gursheen Anand
6d31563920 feat: auto set against accounts for value pairs 2023-12-03 22:33:21 +05:30
barredterra
b6957ddac2 fix: set date format from system settings 2023-12-03 17:21:48 +01:00
Bernd Oliver Sünderhauf
b2d8a44199 test: Add, expand and refine test-cases for zero-quantity transactions. 2023-12-03 16:33:29 +01:00
ruthra kumar
2815d196de Merge pull request #38525 from ruthra-kumar/multiple_minor_fixes
fix: multiple minor fixes in report and Exchange Rate Revaluation
2023-12-03 16:43:01 +05:30
ruthra kumar
64266c4d38 fix: remove hardcoded, implicit rounding loss allowance 2023-12-03 10:58:14 +05:30
ruthra kumar
f4d418ea6d fix: item group filter in sales person wise report 2023-12-03 10:58:10 +05:30
s-aga-r
a008f5f611 Merge pull request #38493 from s-aga-r/FIX-6325
fix: don't update previous doc on rate change
2023-12-03 10:08:44 +05:30
rohitwaghchaure
74eab91042 fix: better overlap logic for job card (#38432) 2023-12-02 23:12:12 +05:30
Gursheen Anand
9aeb3932d0 fix: fetch against link value in gl report 2023-12-02 20:30:38 +05:30
Sagar Vora
b6a7549407 fix: use predefined onload property load_after_mapping (#38209) 2023-12-02 20:06:19 +05:30
Gursheen Kaur Anand
9087e1443e fix: SO ordered qty on PO item removal (#38378)
* fix: update ordered_qty for SO when PO items removed

* refactor: use cached value

---------

Co-authored-by: Deepesh Garg <deepeshgarg6@gmail.com>
2023-12-02 19:53:00 +05:30
Raffael Meyer
5952cfa673 fix: german translations for Lost Quotations (#38435) 2023-12-02 19:52:11 +05:30
noec764
a1e0197a8b fix: Add missing french translations (#38368)
fix: Add missing french translation

Co-authored-by: barredterra <14891507+barredterra@users.noreply.github.com>
2023-12-02 19:49:13 +05:30
Deepesh Garg
af7bc4f178 Merge pull request #38401 from pps190/fix-pe-jv-outstanding
fix: don't consider cancelled entries
2023-12-02 19:44:10 +05:30
Corin Wenger
023bc36592 fix: Move SMS Log module from ERPNext to Frappe (#38506)
Move SMS Log module from ERPNext to Frappe

SMS Log module moved to Frappe Core from ERPNext Utilities so that Frappe send_sms() works sans-ERPNext.
2023-12-02 19:24:46 +05:30
barredterra
ceeb724acc feat: set lead name from email 2023-12-01 20:10:51 +01:00
rohitwaghchaure
5e9016ffab fix: validation error has not throw for the batch (#38494)
* fix: validation error has not throw for the batch

* chore: fix test cases
2023-12-01 21:42:22 +05:30
Sherin KR
6bc40373f2 chore: changed sort_order to DESC for customer (#38498) 2023-12-01 19:07:28 +05:30
ruthra kumar
14c8c8c33d refactor: cache results 2023-12-01 18:01:58 +05:30
ruthra kumar
0925706d5e refactor: flag to differentiate generated and default values 2023-12-01 17:46:28 +05:30
ruthra kumar
ca14ae8f1b refactor: save results in node 2023-12-01 17:07:39 +05:30
ruthra kumar
90c6d4dc85 chore: restrict only to administrator and type info 2023-12-01 16:50:17 +05:30
ruthra kumar
228aa1a244 chore: change data type for summary fields 2023-12-01 16:42:15 +05:30
ruthra kumar
993e2bfbf9 refactor: adding labels to important section 2023-12-01 16:42:15 +05:30
ruthra kumar
ea3071db66 chore: UI cleanup 2023-12-01 16:42:15 +05:30
ruthra kumar
395299803f chore: add screen freeze on wait 2023-12-01 16:42:15 +05:30
ruthra kumar
5e2d21c033 chore: code cleanup 2023-12-01 16:42:15 +05:30
ruthra kumar
c4c3090f46 chore: hide internal variables section 2023-12-01 16:42:15 +05:30
ruthra kumar
6492019383 chore: rename btree and remove debugging statements 2023-12-01 16:42:15 +05:30
ruthra kumar
f6831fba13 chore: hide internal fields and better painting logic for heatmap 2023-12-01 16:42:15 +05:30
ruthra kumar
16db6c2f47 refactor: working heatmap 2023-12-01 16:42:15 +05:30
ruthra kumar
bd3dc6482e chore: hide some internal fields 2023-12-01 16:42:15 +05:30
ruthra kumar
f7b7b2b438 refactor: calculate summary on tree navigation 2023-12-01 16:42:15 +05:30
ruthra kumar
99fbd8ad18 refactor: use DB to store tree and state 2023-12-01 16:42:15 +05:30
ruthra kumar
9d20256366 chore: use doctype as btree 2023-12-01 16:42:15 +05:30
ruthra kumar
85f2a6dd54 feat: nodes doctype 2023-12-01 16:42:15 +05:30
ruthra kumar
de2eba0d98 chore: remove unwanted code 2023-12-01 16:42:15 +05:30
ruthra kumar
705ef4f5a3 refactor: add basic navigation
1. remove unnecessary columns
2. added basic tree navigation
2023-12-01 16:42:15 +05:30
ruthra kumar
b2dde55f2c refactor: ability to build and load tree from DB 2023-12-01 16:42:15 +05:30
ruthra kumar
d53b34c0ce refactor: introduce node class 2023-12-01 16:42:15 +05:30
ruthra kumar
a427029151 refactor: more buttons 2023-12-01 16:42:15 +05:30
ruthra kumar
2de3e6ce6d refactor: date validation 2023-12-01 16:42:15 +05:30
ruthra kumar
03a38ed025 refactor: support for BFS and DFS 2023-12-01 16:42:15 +05:30
ruthra kumar
26503a205f refactor: simplify DFS 2023-12-01 16:42:15 +05:30
ruthra kumar
5a25c80f2e refactor: Depth First Search(DFS) 2023-12-01 16:42:15 +05:30
ruthra kumar
4c8a8c3bcd refactor: some logic 2023-12-01 16:42:15 +05:30
ruthra kumar
decdbd2782 feat: bisect doctype 2023-12-01 16:42:15 +05:30
ruthra kumar
eb4c476490 refactor: primitive summary for p&l and balance sheet 2023-12-01 16:42:15 +05:30
s-aga-r
68f5dd3e7b fix: don't update previous doc on rate change 2023-12-01 14:45:01 +05:30
s-aga-r
68aee8c144 Merge pull request #38482 from s-aga-r/FIX-38476
fix: `AttributeError` while saving Purchase Invoice
2023-12-01 13:54:42 +05:30
Ernesto Ruiz
b24e28953b chore: add translate function to email subject in digest frecuency (#38474)
chore: add translate function to email subject in digest frecuency
2023-12-01 12:41:14 +05:30
ruthra kumar
9656412bba Merge pull request #38440 from rtdany10/pe-split-message
fix(pe): show split alert only on splitting
2023-12-01 12:39:39 +05:30
ruthra kumar
61280117eb Merge pull request #38393 from ruthra-kumar/refactor_advance_as_liability
refactor: GL entries build logic for `Advance in Separate Party Account` option.
2023-12-01 12:36:59 +05:30
ruthra kumar
961bdf0d24 refactor: handle forex payment advance entries 2023-12-01 12:13:00 +05:30
ruthra kumar
080aa30407 refactor(test): filter on document names 2023-12-01 12:09:37 +05:30
ruthra kumar
eecf9cd1d8 fix(test): use correct account type for testing 2023-12-01 11:43:57 +05:30
NandhiniDevi
e2a519464b add supplier group filter in purchase register (#38421)
* add supplier group field in purchase register

* Update purchase_register.js
2023-12-01 11:34:38 +05:30
s-aga-r
60a81a563e fix: AttributeError while saving Purchase Invoice 2023-12-01 11:27:54 +05:30
Gughan Ravikumar
3a66aefd2c fix: show item name as title instead of item group in BOM (#38478)
Item fields in BOM used to show Item Group when Items were set to show title as link fields. Now they show Item Name instead
2023-12-01 11:07:17 +05:30
Ankush Menat
54f7cf59fd chore: version bump 2023-12-01 10:37:35 +05:30
rohitwaghchaure
ba10f7d04c Merge pull request #38455 from rohitwaghchaure/fixed-incorrect-requested-qty-in-mr-for-sco
fix: incorrect requested quantity for the subcontracting order
2023-11-30 19:07:55 +05:30
Rohit Waghchaure
691e3bb24f fix: incorrect requested quantity for the subcontracting order 2023-11-30 17:32:55 +05:30
s-aga-r
832734ff4c Merge pull request #38450 from s-aga-r/FIX-38151
fix(ux): make valuation field read only when it can't be modified
2023-11-30 17:22:54 +05:30
s-aga-r
3d4156cc7d fix(ux): make PI rate field read-only having PR ref 2023-11-30 16:28:03 +05:30
ruthra kumar
cc053ad894 Merge pull request #38457 from ruthra-kumar/use_flt_on_outstanding_on_ar_ap_summary
refactor: use flt on outstanding on AR/AP summary report
2023-11-30 16:23:28 +05:30
s-aga-r
ae294ee470 fix(ux): make PR rate field read-only having PO ref 2023-11-30 16:16:12 +05:30
ruthra kumar
e4bdd3a28d refactor: use flt on outstanding on AR/AP summary report 2023-11-30 15:57:57 +05:30
Ankush Menat
63313eef6f feat: enable automatic type annotations (#38452) 2023-11-30 08:23:48 +00:00
Ankush Menat
1da9087cc4 refactor: Simpler log settings setup (#38449)
Depends on https://github.com/frappe/frappe/pull/23507
2023-11-30 07:58:55 +00:00
ruthra kumar
de3795a7d4 Merge pull request #38446 from ruthra-kumar/filter_bug_on_payment_reconciliation
refactor: pass on filter to up front outstanding query as well
2023-11-30 12:54:46 +05:30
ruthra kumar
cfd3230c75 refactor: pass on filter to upfront outstanding query as well 2023-11-30 12:22:55 +05:30
s-aga-r
e38b06bf2d Merge pull request #38441 from s-aga-r/FIX-38434
fix: exploded items in Subcontracting Receipt
2023-11-30 12:10:18 +05:30
s-aga-r
7cb0b1b7c3 Merge pull request #38439 from s-aga-r/FIX-38433
fix: use `docstatus` instead of `status`
2023-11-30 12:09:43 +05:30
s-aga-r
62b4a263f8 fix: exploded items in Subcontracting Receipt 2023-11-30 12:07:52 +05:30
Dany Robert
96b13c59c1 fix(pe): show split alert only on splitting 2023-11-30 06:20:15 +00:00
s-aga-r
1423b38d50 fix: use docstatus instead of status 2023-11-30 11:43:28 +05:30
Devin Slauenwhite
ff27cccff4 refactor: get outstanding journal entry using query builder 2023-11-29 21:44:56 +00:00
s-aga-r
abc7d30024 fix(ux): make basic_rate field read-only based on purpose 2023-11-29 19:49:58 +05:30
Deepesh Garg
591f4ebdca Merge pull request #38429 from GursheenK/set-cwip-account-for-asset-tests
fix(minor): set capital WIP account before asset tests
2023-11-29 18:50:05 +05:30
Gursheen Anand
ef8e4191cd fix: set cwip account before asset tests 2023-11-29 18:25:52 +05:30
rohitwaghchaure
cf97e3c21f Merge pull request #38427 from Nandhinidevi123/stock_entry
Update Serial No issue
2023-11-29 18:11:22 +05:30
s-aga-r
2e8739fff7 Merge pull request #38290 from s-aga-r/FIX-36704
feat: auto create PR on SCR submission
2023-11-29 17:57:11 +05:30
s-aga-r
3da0aa6a0b fix(test): test_auto_create_purchase_receipt 2023-11-29 17:35:21 +05:30
Nandhinidevi123
97be527ee9 fix:change default qty 2023-11-29 17:21:51 +05:30
Nandhinidevi123
cac3b4a0d8 Merge branch 'develop' of https://github.com/Nandhinidevi123/erpnext into develop 2023-11-29 17:20:38 +05:30
Gursheen Anand
96f31847b2 fix: set cwip account for company before tests 2023-11-29 16:04:36 +05:30
Deepesh Garg
85f9f8d176 Merge pull request #38250 from GursheenK/unset-discount-amount-based-on-coupon-code
fix: unset discount amount based on coupon code
2023-11-29 15:53:46 +05:30
s-aga-r
7b0cd03f88 test: auto create PR on SCR submit 2023-11-29 14:10:48 +05:30
s-aga-r
68585f6f2b test: auto create SCO on PO submit 2023-11-29 13:58:36 +05:30
s-aga-r
857f2b5a01 chore: linter 2023-11-29 13:39:14 +05:30
rohitwaghchaure
258148b615 Merge pull request #38365 from Nandhinidevi123/sales_register
feat:add customer group filter in sales register
2023-11-29 13:37:22 +05:30
s-aga-r
7145b040f1 fix(ux): hide Create Purchase Receipt button for Subcontract Return 2023-11-29 13:21:24 +05:30
s-aga-r
874766a82f fix: map warehouses in return SCR 2023-11-29 13:07:39 +05:30
s-aga-r
096a2c8cd0 chore: PR ref in SCR connections 2023-11-29 12:46:31 +05:30
Gursheen Kaur Anand
4a047fefb8 Merge branch 'develop' into make-against-field-dynamic 2023-11-29 12:30:20 +05:30
rohitwaghchaure
fddf341f44 fix: incorrect ordered qty for Subcontracting Order (#38415) 2023-11-29 12:21:11 +05:30
Anand Baburajan
fe5fc5bd3a feat: shift depreciation for assets (#38327)
* feat: shift depreciation for assets

* chore: create new asset depr schedule on shift change

* refactor: move create_depr_schedule to after_insert

* fix: args in get_depreciation_amount test

* refactor: rename shift adjustment to shift allocation

* chore: asset shift factor doctype and auto allocate shift diff

* chore: use check instead of depr type, and add tests

* chore: make linter happy

* chore: give permissions to accounts users
2023-11-29 12:14:12 +05:30
ruthra kumar
0255e09285 test: ledger pre and post reconciliation on advance as liability 2023-11-29 10:57:28 +05:30
s-aga-r
2b0b15f4d1 Merge pull request #38394 from s-aga-r/FIX-38330
fix: `OperationalError` while selecting Serial No in `Warranty Claim`
2023-11-29 10:37:07 +05:30
Patrick Eissler
8e4b591ea2 fix: make create button translatable (#38165)
* fix: make all create buttons translatable

* style: use double quotes

---------

Co-authored-by: PatrickDenis-stack <77415730+PatrickDenis-stack@users.noreply.github.com>
Co-authored-by: Raffael Meyer <14891507+barredterra@users.noreply.github.com>
2023-11-29 10:22:47 +05:30
Dany Robert
663bb8726c fix(regional): use net figures for sales calc (#38260) 2023-11-29 09:03:47 +05:30
ruthra kumar
2add802d0d refactor(test): advance allocation on purchase invoice 2023-11-29 08:59:14 +05:30
Devin Slauenwhite
adfcdb3b65 fix: don't consider cancelled entries 2023-11-28 13:19:49 -05:00
s-aga-r
9fadf5f426 refactor: don't use cur_frm 2023-11-28 21:34:07 +05:30
ruthra kumar
3e6306348a refactor: redefine dr_or_cr for unallocated amount 2023-11-28 20:04:47 +05:30
Shariq Ansari
458dd51af7 Merge pull request #38398 from shariquerik/create-contact-only-if-not-exist 2023-11-28 19:49:22 +05:30
Shariq Ansari
23b0b8ba36 fix: create contact if existing customer doesn't have contact 2023-11-28 19:24:15 +05:30
rohitwaghchaure
592fc81260 fix: serial no status (#38391) 2023-11-28 18:28:48 +05:30
Gursheen Kaur Anand
c232acbe9b Merge pull request #38392 from GursheenK/report-rename-import
fix: imports for renamed report
2023-11-28 18:22:59 +05:30
s-aga-r
640dfab827 refactor: use frm.set_query to add filters 2023-11-28 17:45:17 +05:30
s-aga-r
01044ca8e9 refactor: use DocType Fetch From instead of frm.add_fetch 2023-11-28 17:33:27 +05:30
ruthra kumar
2633d7dca3 refactor: 'partial' flag to only cancel unlinked ledger entries 2023-11-28 17:28:31 +05:30
ruthra kumar
ecb533c4d1 refactor: return the newly added reference upon reconciliation 2023-11-28 17:27:49 +05:30
ruthra kumar
5fc19dab54 refactor: 'make_advance_gl_entries' method
make_advance_gl_entries -> add_advance_gl_entries -> add_advance_gl_for_reference

'make_advance_gl_entries' - main method thats builds and post GL
entries for all or one specific reference based on parameters

'add_advance_gl_entries' - build GL map for all or one specific
reference. Return an array of dict.

'add_advance_gl_for_reference' - utility function to build gl
entries. returns dict.
2023-11-28 17:26:06 +05:30
ruthra kumar
58114e7b24 refactor: use different GL build logic for advance as liability 2023-11-28 17:25:28 +05:30
s-aga-r
1763824e5f refactor: use arrow function 2023-11-28 17:20:05 +05:30
Gursheen Anand
aee2e12f39 chore: fix imports for renamed report 2023-11-28 17:11:35 +05:30
s-aga-r
500573067a Merge branch 'develop' into FIX-36704 2023-11-28 17:01:48 +05:30
s-aga-r
8052103197 feat: provision to create PR from SCR 2023-11-28 16:28:54 +05:30
ruthra kumar
78ab11f991 refactor: post to GL and Payment Ledger on advance as liability 2023-11-28 16:25:55 +05:30
ruthra kumar
3263f2023c test: assert ledger entries on partial reconciliation
with `Advance as Liability`, partial reconciliation should not post
duplicate ledger entries for same reference
2023-11-28 16:16:24 +05:30
Raffael Meyer
8f00481c5f fix: no fstring in translation (#38381) 2023-11-28 09:35:28 +00:00
s-aga-r
9872e371a2 Merge pull request #38377 from s-aga-r/FIX-PB-SEARCH-INPUT
fix: Product Bundle Parent Item input
2023-11-28 14:34:26 +05:30
s-aga-r
37b3ac7952 feat: SCR Item ref in PR Item 2023-11-28 13:39:15 +05:30
s-aga-r
d891bd7fac feat: Subcontracting Receipt ref in Purchase Receipt 2023-11-28 13:27:27 +05:30
s-aga-r
d366a91d9e fix: use checkbox instead of select field 2023-11-28 13:06:52 +05:30
s-aga-r
8c3713b649 fix: don't select all fields 2023-11-28 11:12:55 +05:30
s-aga-r
729fc738af fix: product bundle search input 2023-11-28 11:08:52 +05:30
Deepesh Garg
add238c892 fix: debit credit mismatch in multi-currecy asset purchase receipt (#38342)
* fix: Debit credit mimatch in multicurrecy asset purchase receipt

* test: multi currency purchase receipt

* chore: update init files

* test: roolback
2023-11-28 08:21:45 +05:30
rohitwaghchaure
ad3634be7c chore: fix flaky test case (#38369) 2023-11-28 06:24:21 +05:30
Sagar Vora
5a53a4b044 fix: make parameters of create_subscription_process optional (and other minor fixes) (#38360) 2023-11-27 20:21:19 +05:30
Nandhinidevi123
5a97fa6336 feat:add customer group filter in sales register 2023-11-27 19:51:05 +05:30
ruthra kumar
657bb9d682 Merge pull request #38354 from ruthra-kumar/handle_rounding_loss_on_ar_ap
refactor: handle rounding loss on AR/AP reports
2023-11-27 11:51:46 +05:30
Marica
b9f5a1c85d fix: Negative Qty and Rates in SO/PO (#38252)
* fix: Don't allow negative qty in SO/PO

* fix: Type casting for safe comparisons

* fix: Grammar in error message

* fix: Negative rates should be allowed via Update Items in SO/PO

* fix: Use `non_negative` property in docfield & emove code validation
2023-11-27 09:05:22 +05:30
ruthra kumar
592ce45da7 refactor: handle rounding loss on AR/AP reports 2023-11-27 08:51:22 +05:30
NandhiniDevi
d9b3b95854 fix : Payment Reco Issue and chart of account importer (#38321)
fix : Payment Reco Issue and chart of account importer
2023-11-26 18:40:31 +05:30
Raffael Meyer
5426b93387 refactor: bank transaction (#38182) 2023-11-26 18:37:55 +05:30
Monolithon Administrator
284a40aa63 fix: Add name to Hungary - Chart of Accounts for Microenterprises json (#38278)
Co-authored-by: Deepesh Garg <deepeshgarg6@gmail.com>
2023-11-26 18:17:10 +05:30
Deepesh Garg
2989e36b1d Merge pull request #38284 from vorasmit/fetch-item-tax-values
fix: fetch item_tax_template values if fields with fetch_from exisit
2023-11-26 17:54:35 +05:30
rohitwaghchaure
d8245cef72 fix: job card overlap validation (#38345) 2023-11-26 16:13:39 +05:30
s-aga-r
edf4514d8b Merge pull request #38261 from s-aga-r/FIX-STOCK-RESERVATION-DIALOG-BOX
fix(ux): Sales Order Stock Reservation Dialog
2023-11-26 11:02:02 +05:30
Raffael Meyer
477d9fa87e feat: new Report "Lost Quotations" (#38309) 2023-11-24 22:27:01 +01:00
Gursheen Kaur Anand
01f133f8c8 Merge branch 'develop' into make-against-field-dynamic 2023-11-24 15:23:44 +05:30
Gursheen Kaur Anand
d32147f8fe Merge pull request #38273 from GursheenK/email-digest-annual-income-expense
fix: annual income and expenses in email digest
2023-11-24 15:19:09 +05:30
NandhiniDevi
86aeacf393 add condition 2023-11-24 14:18:44 +05:30
s-aga-r
dd80d3b9b9 fix: dont show View button on cancelled SCR 2023-11-24 12:17:05 +05:30
s-aga-r
98cba5ed30 feat: add Subcontracting Receipt link in PO connections 2023-11-24 12:14:38 +05:30
s-aga-r
ca8a5b45ba feat: add Purchase Order link in SCR connections 2023-11-24 12:09:21 +05:30
ruthra kumar
9d6a06aec5 Merge pull request #38298 from ruthra-kumar/simplied_purchase_cost_update
perf: optimize update_purchase_cost method
2023-11-24 11:48:36 +05:30
ruthra kumar
dd016e6ced refactor: update project costing based on frequency 2023-11-24 11:18:51 +05:30
ruthra kumar
0fe6dcd742 refactor: make update_project_cost optional through Buying Settings 2023-11-24 11:18:51 +05:30
ruthra kumar
bcbe6c4a53 refactor: provide UI button to recalculate when needed 2023-11-24 11:18:48 +05:30
NandhiniDevi
f09c5f32cf add flt() for None type error 2023-11-24 11:17:35 +05:30
ruthra kumar
3ca7e442bc Merge pull request #38283 from ruthra-kumar/move_patch_to_pre_model
chore: move reconciliation cleanup patch to pre-model
2023-11-24 10:06:46 +05:30
Deepesh Garg
8ac647ece7 Merge pull request #38269 from GursheenK/skip-fixed-assets-in-product-bundle
fix: skip fixed assets in product bundle
2023-11-24 09:59:35 +05:30
ruthra kumar
4307d3b5c9 Merge pull request #38296 from ruthra-kumar/indexes_on_journal_entry_child_tables
chore: index to speed up basic submit/cancel functions on purchase invoice
2023-11-24 09:45:14 +05:30
ruthra kumar
aa17110bde perf: optimize total_purchase_cost update 2023-11-24 09:41:38 +05:30
Devin Slauenwhite
3f6d805033 fix: display all item rate stop messages (#38289) 2023-11-23 22:42:12 +05:30
NandhiniDevi
64b44a360a add flt() for None type error (#38299) 2023-11-23 22:40:17 +05:30
s-aga-r
040cc8d22f feat: auto create PR on SCR submission 2023-11-23 22:16:27 +05:30
Raffael Meyer
3be345e605 feat: add Bank Transaction to connections in Journal and Payment Entry (#38297)
* feat(Payment Entry): Bank Transaction connection

* feat(Journal Entry): Bank Transaction connection
2023-11-23 14:02:27 +01:00
s-aga-r
e1cea25781 fix: maintain PO and PO Item ref in SCR Item 2023-11-23 17:48:34 +05:30
s-aga-r
a2ede7d6d5 feat: add field Purchase Order Item in SCO Item 2023-11-23 17:06:13 +05:30
s-aga-r
7e4dd33ab0 fix: hold PO item ref in SCO Service Item 2023-11-23 17:06:13 +05:30
s-aga-r
45d5cff47d feat: add field Purchase Order Item in SCO Service Item 2023-11-23 17:06:09 +05:30
s-aga-r
745e3bfb73 chore: notify user on SCO creation 2023-11-23 17:04:19 +05:30
s-aga-r
762906f240 feat: add field Action on Subcontracting Receipt Submission 2023-11-23 17:04:13 +05:30
s-aga-r
9ec6f1e1d6 feat: auto create SCO on PO submission 2023-11-23 17:04:07 +05:30
s-aga-r
628ea42b63 feat: add field Action on Purchase Order Submission 2023-11-23 17:03:59 +05:30
ruthra kumar
1efff268b0 chore: speed up Purchase Invoice cancellation 2023-11-23 16:56:35 +05:30
Smit Vora
b206b0583b fix: fetch item_tax_template values if fields with fetch_from exisit 2023-11-23 15:10:47 +05:30
Anand Baburajan
816b1b6bd5 fix: don't depreciate assets with no schedule on scrapping (#38276)
fix: don't depreciate non-depreciable assets on scrapping
2023-11-23 13:48:46 +05:30
ruthra kumar
24fcd67f8b chore: index to speed up queries on JE child table reference 2023-11-23 11:44:34 +05:30
s-aga-r
c99c805743 Merge pull request #38268 from s-aga-r/FIX-38222
fix: Supplier `Primary Contact`
2023-11-23 11:07:30 +05:30
ruthra kumar
f258ab5e98 chore: move reconciliation cleanup patch to pre-model 2023-11-23 10:39:41 +05:30
ruthra kumar
880a85d2af Merge pull request #38148 from ruthra-kumar/prevent_lock_on_reconciliation
refactor: convert Payment Reconciliation to virtual doctype
2023-11-23 10:16:55 +05:30
ruthra kumar
efd31a429c Merge pull request #38257 from ruthra-kumar/optimize_ple_outstanding_query
refactor: optmize outstanding amount query
2023-11-23 09:41:21 +05:30
Gursheen Anand
728cc9f725 fix: fiscal year using future date 2023-11-22 19:28:57 +05:30
Gursheen Anand
52305e3000 fix: annual income and expenses in digest 2023-11-22 18:38:33 +05:30
Gursheen Anand
1657337887 chore: linting issues 2023-11-22 16:45:14 +05:30
Gursheen Anand
362f377f61 fix: skip disabled bundles for non-report utils 2023-11-22 16:26:09 +05:30
Gursheen Anand
8bdb61cb87 fix: condition in other bundle utils 2023-11-22 16:17:23 +05:30
Gursheen Anand
67f43d37df fix: validation for existing bundles 2023-11-22 16:10:49 +05:30
Gursheen Anand
3543f86c63 fix: has_product_bundle util to only check for enabled bundles 2023-11-22 16:04:05 +05:30
s-aga-r
627165dc7c fix: Supplier Primary Contact 2023-11-22 15:27:07 +05:30
Gursheen Anand
874774fe6c fix: filter bundle items based on disabled check 2023-11-22 15:24:56 +05:30
Gursheen Anand
ee76af7681 feat: add disabled field in product bundle 2023-11-22 15:23:17 +05:30
Gursheen Anand
f9713eeb56 fix: skip fixed assets in parent 2023-11-22 15:22:42 +05:30
rohitwaghchaure
0ca7527f7a fix: patch - Duplicate entry quality inspection parameter (#38262) 2023-11-22 14:02:01 +05:30
s-aga-r
2a41da94d4 fix(ux): no need to select rows to unreserve the stock 2023-11-22 11:38:08 +05:30
s-aga-r
73586fd9b2 fix: use field sales_order_item instead name 2023-11-22 11:37:14 +05:30
s-aga-r
9c889b37fb fix(ux): no need to select rows to reserve the stock 2023-11-22 11:27:58 +05:30
Ankush Menat
b11ae4b54c chore: remove dead link 2023-11-22 10:26:50 +05:30
ruthra kumar
e3af1dc864 Merge pull request #38258 from ruthra-kumar/rename_unreconcile
refactor: rename 'Unreconcile Payments' doctype to singular 'Unreconcile Payment'
2023-11-22 10:03:13 +05:30
ruthra kumar
8b04c1d4f6 refactor: optimize outstanding vouchers query 2023-11-22 10:00:12 +05:30
ruthra kumar
74f9e34182 chore: update new unreconcile doctype name in JS and PY files 2023-11-22 05:59:20 +05:30
ruthra kumar
1fddc30350 Merge pull request #38081 from GursheenK/validate-repost-ledger-settings-for-editable-invoices
fix: check reposting ledger settings before setting repost flag
2023-11-22 05:22:59 +05:30
Anand Baburajan
e2bb4e2baa fix: set asset's valuation_rate according to asset quantity (#38254) 2023-11-21 22:32:43 +05:30
ruthra kumar
9006c9b747 chore: rename 'unreconcile payments' to 'unreconcile payment' 2023-11-21 16:44:01 +05:30
Gursheen Anand
6518582ed3 fix: unset discount amount based on coupon code 2023-11-21 15:14:55 +05:30
rohitwaghchaure
5c308a4f9a fix: valuation rate for FG item for subcontracting receipt (#38244) 2023-11-21 14:42:26 +05:30
Rucha Mahabal
ac91030b31 fix(Timesheet): warn user if billing hours > actual hours instead of resetting (#38239)
* revert: "fix(Timesheet): reset billing hours equal to hours if they exceed actual hours"

This reverts commit 0ec8034507.

* fix: warn user if billing hours > actual hours
2023-11-21 13:18:34 +05:30
ruthra kumar
9680edfcc3 Merge pull request #38234 from ruthra-kumar/test_case_for_rounding_issue
test: prevent rounding loss based validation error
2023-11-21 12:09:54 +05:30
ruthra kumar
56e991b7f4 test: prevent rounding loss based validation error 2023-11-21 11:46:45 +05:30
Anand Baburajan
9903049c7a fix: set default asset quantity as 1 [dev] (#38223)
* fix: make default asset quantity as 1

* fix: get rate_of_depreciation from asset category for asset auto-creation

* chore: create asset depr schedules on PR submit, not asset submit

* fix: set default asset quantity as 1

* chore: move patch from v15 to v14
2023-11-20 22:27:16 +05:30
Dany Robert
f34ffc2062 fix: exclude invoice_doctypes from party advance 2023-11-20 11:10:56 +00:00
ruthra kumar
f50d933a25 Merge pull request #38212 from ruthra-kumar/update_hook
refactor: update scheduled job for bulk transaction
2023-11-20 14:16:11 +05:30
ruthra kumar
ce092bf23b Merge pull request #38210 from ruthra-kumar/set_default_on_billed_amt_update
refactor: extend billed amount update flag to POS Invoice as well
2023-11-20 14:05:45 +05:30
ruthra kumar
fb06ad7330 refactor: update scheduled job for bulk transaction 2023-11-20 13:28:55 +05:30
s-aga-r
80ab4eea8c Merge pull request #38207 from s-aga-r/FIX-37809
fix(ux): `Task` creation from `Timesheet`
2023-11-20 12:39:30 +05:30
ruthra kumar
83a13e22b7 refactor: add flag to POS Invoice 2023-11-20 12:29:37 +05:30
ruthra kumar
ee0c64215d refactor: set default for 'update_billed_amount_in_delivery_note' 2023-11-20 12:29:35 +05:30
s-aga-r
5ac8bd7f08 Merge pull request #38200 from s-aga-r/FIX-38188
fix: TypeError in Subcontracting Receipt
2023-11-20 12:14:23 +05:30
s-aga-r
2f3fc12c08 fix: add route options for new Task 2023-11-20 12:05:25 +05:30
s-aga-r
331ad62f3c fix(ux): enable Quick Entry for Task 2023-11-20 12:04:03 +05:30
s-aga-r
f6e93f084a fix: TypeError in Subcontracting Receipt 2023-11-20 10:23:57 +05:30
ruthra kumar
7b2eacd4d8 Merge pull request #38159 from ruthra-kumar/provision_to_truncate_remarks
refactor: provision to truncate `remarks` in General Ledger and Accounts Receivable/Payable reports
2023-11-20 10:07:10 +05:30
ruthra kumar
a9bf906545 refactor: add substring logic in ar/ap report 2023-11-20 09:38:26 +05:30
ruthra kumar
97090ff367 refactor: provision to set remarks length in accounts settings 2023-11-20 09:38:23 +05:30
Deepesh Garg
6c8b6de4c9 Merge pull request #38171 from rtdany10/rounded-total
fix: wrong round off and rounded total
2023-11-19 19:18:38 +05:30
Deepesh Garg
f91752cad2 Merge pull request #38177 from pps190/fix-pe-precision
fix: payment entry rounding error
2023-11-19 18:46:00 +05:30
Dany Robert
cc60c328fe fix: test case for rounded total with cash disc 2023-11-19 02:53:09 +00:00
Raffael Meyer
ff5b1b7ded style: remove trailing whitespace (#38183) 2023-11-18 17:45:14 +00:00
Raffael Meyer
a1ff7cab7e Merge pull request #38178 from barredterra/item-modified-timestamp 2023-11-18 18:07:11 +01:00
Patrick Eissler
32f622ef80 fix: valuation rate in report Item Prices (#38161)
Co-authored-by: PatrickDenis-stack <77415730+PatrickDenis-stack@users.noreply.github.com>
2023-11-18 15:54:34 +01:00
barredterra
969616ed09 fix: update modified timestamp
Was missing in 434c2a1815
2023-11-18 15:43:23 +01:00
Raffael Meyer
ca62cde9aa Merge pull request #38163 from PatrickDEissler/fix/table-was-mandatory-for-manufacturer 2023-11-18 15:37:51 +01:00
Devin Slauenwhite
3d1e3a9cde fix: payment entry rounding error 2023-11-18 14:36:20 +00:00
Deepesh Garg
184848edf9 Merge pull request #38147 from kunhimohamed/develop
fix: issue occured when creating supplier with contact details
2023-11-18 19:47:38 +05:30
Deepesh Garg
65ba5b3000 Merge pull request #38142 from deepeshgarg007/supplier_quotation_ad
feat: Add accounting dimensions to Supplier Quotation
2023-11-18 19:40:42 +05:30
Dany Robert
3a487bd33a fix: wrong round off and rounded total 2023-11-18 13:32:04 +00:00
Sagar Vora
56e92b702c Merge pull request #38167 from vishakhdesai/perm-check-fix 2023-11-18 17:37:34 +05:30
Vishakh Desai
45299fe4b3 fix: pass check permission in render_address 2023-11-18 17:10:01 +05:30
PatrickDenis-stack
434c2a1815 fix: attributes were mandatory for manufacturers 2023-11-18 11:16:06 +01:00
ruthra kumar
f31002636b chore: clear singles table and reconciliation related tables 2023-11-18 09:28:02 +05:30
ruthra kumar
b5dd0c8630 chore: remove reconciliation defaults from patch 2023-11-18 09:28:02 +05:30
ruthra kumar
9c7b19e0b7 refactor: virtual doctype methods 2023-11-18 09:27:59 +05:30
ruthra kumar
3a51a3f37e refactor: convert payment reconciliation tool to virtual doctype 2023-11-18 08:06:44 +05:30
s-aga-r
a5a5341643 Merge pull request #38127 from s-aga-r/FIX-37162
feat: add `Supplier Delivery Note` field in SCR
2023-11-17 18:46:58 +05:30
Rucha Mahabal
20c6e9fca2 fix(Timesheet): reset billing hours equal to hours if they exceed actual hours (#38134) 2023-11-17 18:08:55 +05:30
Gursheen Kaur Anand
5b3eba7bee Merge branch 'develop' into validate-repost-ledger-settings-for-editable-invoices 2023-11-17 14:21:02 +05:30
Gursheen Kaur Anand
8c6e341a71 Merge pull request #38144 from GursheenK/tax-report-party-without-naming-series
fix(minor): show party instead of party name where naming series not set
2023-11-17 14:18:16 +05:30
Kunhi
545ef3c234 fix: Suppier name was not taken when creating address from supplier 2023-11-17 11:43:36 +04:00
kunhi
7842c9fba8 fix: issue occured when creating supplier with contact details 2023-11-17 11:22:08 +04:00
Smit Vora
7e43d7b131 fix: allow regional gl in payment entry for gl preview (#38136) 2023-11-17 12:38:08 +05:30
Deepesh Garg
089da459f7 feat: Add accounting dimensions to Supplier Quotation 2023-11-17 12:37:14 +05:30
Gursheen Anand
b27af6b5c8 fix: show party instead of party name where naming series not set 2023-11-17 12:36:57 +05:30
ruthra kumar
c69fb80222 Merge pull request #38119 from ruthra-kumar/missing_filter_in_payable_report
fix: add revaluation journal filter in Payable report
2023-11-17 09:56:51 +05:30
ruthra kumar
134201794a fix: add revaluation journal filter in Payable report 2023-11-17 09:48:17 +05:30
rohitwaghchaure
2df767f596 fix: bom creator not able to amend / duplicate (#38128)
fix: bom creator not able to amend
2023-11-16 16:01:35 +05:30
s-aga-r
da80e4dbce feat: add Supplier Delivery Note field in SCR 2023-11-16 13:05:49 +05:30
s-aga-r
5cc8603cff Merge pull request #38090 from blaggacao/fix/dn-mapper
fix(dn): regression from bulk transaction fix
2023-11-16 12:42:25 +05:30
David Arnold
426c245032 fix(dn): regression from bulk transaction fix 2023-11-16 12:21:23 +05:30
Deepesh Garg
9731b74ad3 Merge pull request #38071 from GursheenK/unequal-dr-cr-for-payments-with-partial-credit-note
fix: handle partial return against invoices in payment entries
2023-11-16 10:35:55 +05:30
ruthra kumar
ee29526bbe Merge pull request #38038 from ruthra-kumar/refactor_bulk_transaction
refactor: supercharge Bulk actions
2023-11-16 09:51:34 +05:30
ruthra kumar
3e884d347a Merge pull request #38082 from ruthra-kumar/fix_fy_exception
refactor: use 'boolean' parameter while fetching FY year
2023-11-16 09:47:30 +05:30
Anand Baburajan
6e0362dee8 chore: change read only condition of asset quantity field (#38111)
chore: change read only condition of asset quantity
2023-11-15 17:58:37 +05:30
Gursheen Anand
2499675ad1 fix: test total unallocated amount in payment 2023-11-15 13:32:23 +05:30
Arjun
908b21f7fd fix: duplicate field in Closing Stock Balance (#38105) 2023-11-15 12:34:38 +05:30
Anand Baburajan
e93a19ffb5 chore: refetch item images on transaction save (#38095)
chore: re fetch item images on transaction save
2023-11-14 19:38:15 +05:30
rohitwaghchaure
3e77c0b564 fix: valuation rate for the subcontracting receipt supplied items with Serial and Batch Bundle (#38094)
fix: valuation rate for the subcontracting receipt supplied items with batch
2023-11-14 19:27:41 +05:30
rohitwaghchaure
e769e750ec fix: Not able to save subcontracting receipt (#38085) 2023-11-14 15:08:37 +05:30
ruthra kumar
c31ee8ea33 refactor: use 'boolean' parameter while fetching FY year 2023-11-14 07:25:10 +05:30
Gursheen Anand
894ae1fe0f fix: check reposting settings before allowing editable si 2023-11-13 20:28:44 +05:30
Gursheen Anand
5fae2f6d57 fix: allow on submit for child table fields 2023-11-13 20:27:09 +05:30
Gursheen Anand
ad5edbb1de fix: do not set repost flag without validating voucher 2023-11-13 20:25:26 +05:30
Gursheen Anand
780b827adc refactor: validate reposting settings for editables inv 2023-11-13 20:24:32 +05:30
Anand Baburajan
8e010ef063 Merge pull request #38077 from anandbaburajan/trans_delete_att_comm
chore: delete comments and unlink attachments on company transactions deletion
2023-11-13 18:55:44 +05:30
Gursheen Anand
09f9764bbd test: payment against partial return invoices 2023-11-13 18:11:00 +05:30
Gursheen Anand
a59c942cd4 fix: reset dr_or_cr for every reference 2023-11-13 18:09:49 +05:30
anandbaburajan
b097bb20d9 fix: unrelated transation date typo 2023-11-13 18:09:09 +05:30
anandbaburajan
2f9e96e324 chore: delete comments and unlink attachments on company transactions deletion 2023-11-13 18:03:33 +05:30
Dany Robert
56b8d1b927 fix: remove ESS role when not mapped to employee (#37867)
* fix: remove ESS role when not mapped to employee

* fix: emp role removal on unlinking

* fix: test case for user employee role mapping

* fix: mapped employee and user on creation
2023-11-13 17:00:02 +05:30
Gursheen Anand
5b446d4575 fix: handle partial return against invoices 2023-11-13 15:05:34 +05:30
mergify[bot]
9ae5c979e8 fix: Identical items are added line by line instead of grouped together in POS (#37986)
fix: Identical items are added line by line instead of grouped together in POS (#37986)

fix: Identical items are added line by line instead of grouped together in POS (#37986)
(cherry picked from commit 011cf3d73e)

Co-authored-by: bVisible <info@bvisible.ch>
2023-11-13 14:43:46 +05:30
David Arnold
ea7565889f feat(customer): add button to quick-create sales order and quotation (#37320)
* feat(customer): add button to quick-create sales order and quotation

* fix: create buttons in customer

* refactor: don't repeat yourself

---------

Co-authored-by: barredterra <14891507+barredterra@users.noreply.github.com>
2023-11-13 14:19:22 +05:30
rohitwaghchaure
4a111f7362 fix: indentation issue in the Production Plan Summary report (#38019)
fix: Production Plan Summary report
2023-11-13 13:26:55 +05:30
ruthra kumar
ffd171a26b Merge pull request #38064 from ruthra-kumar/revaluation_checkbox_for_ar_summary
refactor: add revaluation journal checkbox in AR/AP summary reports
2023-11-13 12:07:33 +05:30
ruthra kumar
95edd82638 refactor: add revaluation journal checkbox in AR/AP summary reports 2023-11-13 11:56:43 +05:30
Raffael Meyer
e07c3aad6b Merge pull request #38063 from barredterra/remove-create-contact 2023-11-13 06:25:30 +01:00
ruthra kumar
a393a6b76c refactor: raise exception on invalid date 2023-11-13 10:39:40 +05:30
barredterra
d380bf8179 feat: remove unused method create_contact 2023-11-12 20:04:38 +01:00
Raffael Meyer
8062d2be3b Merge pull request #38060 from barredterra/refactor-fullname-parsing
refactor: parse full name
2023-11-12 16:16:15 +01:00
barredterra
d17e37c581 test: parse full name 2023-11-12 14:51:40 +01:00
barredterra
6f432b8e45 refactor: parse full name 2023-11-12 14:48:18 +01:00
Arjun
94faa44697 fix: close Credit Limit Crossed dialog (#38052) 2023-11-12 18:02:13 +05:30
David Arnold
9fde782403 fix(customer): contact creation for companies (#38055) 2023-11-12 17:51:18 +05:30
ViralKansodiya
ecc305dd59 fix: add customer name and supplier name columns (#37557)
fix: add customer name and supplier name columns
2023-11-12 17:48:37 +05:30
Niraj Gautam
6f6d5cb4cf fix(POS): 100 % Discount on Point of Sales (#37411)
fix: Allow 100% discount in POS
2023-11-12 11:52:35 +05:30
Deepesh Garg
8634abc021 fix: COA Importer app related issues (#37238)
* fix: COA Importer app related issues

* fix: Clear all account links fields befor import

* fix: Attribute error
2023-11-12 11:42:26 +05:30
David Arnold
a74e1f1600 fix(crm): ensure primary address and contact follows customer setting (#37710)
Co-authored-by: Deepesh Garg <deepeshgarg6@gmail.com>
2023-11-11 20:20:21 +05:30
hyaray
59438ee8d4 chore: Add missing translations (#38043)
chore: Add missing translations
2023-11-11 19:38:24 +05:30
David Arnold
4ed9927a30 fix(patch): to migrate properly in post section (#38045) 2023-11-11 19:37:23 +05:30
David Arnold
ae508144cd fix(customer): quick form and integration fixes (#37386) 2023-11-11 19:35:07 +05:30
ruthra kumar
a52a1b49af refactor: update traceback on retry 2023-11-11 05:20:27 +05:30
ruthra kumar
93295bf25b refactor: support list view filters 2023-11-11 05:10:16 +05:30
ruthra kumar
73639db910 chore: resolve linting issue 2023-11-10 15:27:28 +05:30
ruthra kumar
c320288690 refactor: rollback for retries and UI alerts 2023-11-10 13:45:52 +05:30
ruthra kumar
0aa1636d04 refactor: barebones retry functionality 2023-11-10 13:18:41 +05:30
ruthra kumar
194d70f8a0 chore: show retried in list view 2023-11-10 13:18:41 +05:30
ruthra kumar
af35590549 refactor: add basic functionalities 2023-11-10 13:18:41 +05:30
ruthra kumar
a248b13cc3 feat: virtual parent doctype 2023-11-10 13:18:41 +05:30
ruthra kumar
b0dfc936a1 chore: make from_doctype readonly 2023-11-10 13:18:41 +05:30
ruthra kumar
73090fa130 chore: add indexes 2023-11-10 13:18:41 +05:30
ruthra kumar
ade09bc709 chore: add list view filters 2023-11-10 13:18:33 +05:30
ruthra kumar
8d9f391309 Merge pull request #38004 from ruthra-kumar/ar_report_refactor_in_handling_gain_loss
fix: handling of exchange rate journals in AR/AP
2023-11-10 11:06:03 +05:30
ruthra kumar
ebd74a4e5b refactor: simplify logging logic bulk_transaction 2023-11-10 10:33:32 +05:30
ruthra kumar
c4f8f3613f chore: rearrange fields 2023-11-10 10:33:31 +05:30
ruthra kumar
e5a8ad54e2 chore: convert child to normal table 2023-11-10 10:33:31 +05:30
ruthra kumar
815c616f18 chore: remove 'Bulk Transaction Log' doctype 2023-11-10 10:33:31 +05:30
ruthra kumar
1d8fcd66e6 fix: new logic for handling revaluation journals 2023-11-10 10:31:39 +05:30
ruthra kumar
6ca3b26820 Merge pull request #37859 from marination/split-invoice-refactor
fix: `split_invoices_based_on_payment_terms`
2023-11-10 10:22:37 +05:30
s-aga-r
18a2e6ecb2 Merge pull request #38010 from s-aga-r/FIX-ITEM-READ-ONLY
fix: make item field read-only in batch
2023-11-10 10:21:20 +05:30
David Arnold
922fffda1f fix(payments): incoming payment requests aren't supposed to be in 'initiated' state (only outgoing are) (#37447)
* fix(payments): incoming payment requests aren't supposed to be in 'initiated' state (only outgoing are)

* fixup! fix(payments): incoming payment requests aren't supposed to be in 'initiated' state (only outgoing are)
2023-11-09 22:04:27 +05:30
marination
1fc5844025 fix: Re-add no.of rows split in alert message 2023-11-09 15:01:58 +01:00
jabir-elat
45b4bfc947 fix: sales order not assigned to territory orders (#37905)
filtered sales order are not assigned to 'territory_orders' which results in 0 order amount and 0 billing amount in the output
2023-11-09 18:30:00 +05:30
Sympatron GmbH
92f6d2c87c chore: Update de.csv (#37810)
chore: chore: Update de.csv
2023-11-09 18:27:11 +05:30
Vishakh Desai
c2bda2c705 fix: Supplier Quotation fields (#37963) 2023-11-09 18:26:34 +05:30
marination
4b4b176fcf style: Remove spaces introduced via merge conflict 2023-11-09 13:03:52 +01:00
Marica
a27374fd8f Merge branch 'develop' into split-invoice-refactor 2023-11-09 17:28:01 +05:30
marination
56ac3424d2 fix: Alert message and make sure invoice due dates are different for effective test
- Make invoice due dates are different so that the invoice with the earliest due date is allocated first in the test
- Translate voucher type, simplify alert message. The invoice could be "split" into 1 row, no. of rows in the message seems unnecessary.
2023-11-09 12:50:44 +01:00
ruthra kumar
696e2108ac Merge pull request #37746 from casesolved-co-uk/ar_billed_cur
feat: in_party_currency option for AR/AP reports
2023-11-09 13:04:47 +05:30
ruthra kumar
89612f2605 Merge pull request #37716 from vishdha/ar_report
feat: multi-select customer group in AR Report
2023-11-09 13:04:01 +05:30
rohitwaghchaure
a8216b9727 fix: make adjustment entry using stock reconciliation (#37995)
fix: do adjustment entry using stock reconciliation
2023-11-09 12:22:26 +05:30
s-aga-r
779260fb49 fix: make item field read-only in batch 2023-11-09 12:19:45 +05:30
Deepesh Garg
860b67e9c0 Merge pull request #37828 from GursheenK/payments-irrespective-of-party-types
fix: payments irrespective of party types
2023-11-09 12:14:58 +05:30
Deepesh Garg
47ba357bea Merge pull request #38000 from bosue/payment_entry_status
fix: Mark Status field in Payment Entry 'no_copy'.
2023-11-09 12:14:02 +05:30
ruthra kumar
3502c01aa4 Merge pull request #37860 from ruthra-kumar/filter_disable_accounts
refactor: ignore disabled account while selecting Income Accounts
2023-11-09 10:14:10 +05:30
ruthra kumar
6e3e094c95 refactor: ignore disabled account while selecting Income Accounts 2023-11-09 09:39:39 +05:30
Bernd Oliver Sünderhauf
a89afb65d7 fix: Mark Status field in Payment Entry 'no_copy'. 2023-11-08 21:52:32 +01:00
Anand Baburajan
9a171db97f fix: asset depreciation ledger (#37991)
* fix: include opening acc depr while calculating asset depr ledger report

* chore: include opening acc depr properly in acc depr amt

* chore: add cost_center in asset depr ledger report

* fix: handle finance books properly in asset depr ledger report

* chore: rename 'include default book entries' to 'include default FB entries'
2023-11-08 22:02:09 +05:30
s-aga-r
48567ef755 Merge pull request #37979 from s-aga-r/FIX-STOCK-RESERVATION
fix: ignore Stock Reservation for future dated PR
2023-11-08 19:45:15 +05:30
Deepesh Garg
b57eba6eaf Merge pull request #37987 from frappe/revert-37496-reset-tax-template-in-item-details
Revert "fix: set empty value for tax template in item details"
2023-11-08 19:13:30 +05:30
Deepesh Garg
70d99eebc0 Revert "fix: set empty value for tax template in item details (#37496)"
This reverts commit b0d440c34b.
2023-11-08 18:38:39 +05:30
Wolfram Schmidt
4783e4beee Update de.csv (#37981)
added translation for DocType Competitor https://www.duden.de/rechtschreibung/Konkurrent
2023-11-08 15:12:47 +05:30
Gursheen Anand
450c2470e9 refactor: set against account link for jv 2023-11-08 14:08:57 +05:30
Gursheen Anand
09439334ca refactor: use both fields to store against values 2023-11-08 12:57:00 +05:30
Gursheen Anand
f9c88ea7bc refactor: keep old against fields intact 2023-11-08 12:55:41 +05:30
s-aga-r
33eedb97dc fix: ignore Stock Reservation for future dated PR 2023-11-08 12:38:09 +05:30
Gursheen Anand
2984a86f37 fix: use get_all instead of get_list 2023-11-08 12:30:24 +05:30
Gursheen Anand
5f5d75a0bb chore: linting issues 2023-11-08 11:19:45 +05:30
ruthra kumar
6f231e4c83 Merge branch 'develop' into ar_billed_cur 2023-11-08 10:30:15 +05:30
ruthra kumar
c750e4d7ef Merge pull request #37971 from ruthra-kumar/performance_optimization_on_bulk_transaction_processing
refactor: optimize bulk transaction for speed
2023-11-08 06:32:23 +05:30
Gursheen Anand
291a499124 fix: split expected jv entries for scrap asset 2023-11-08 00:46:52 +05:30
s-aga-r
67b36a0823 Merge pull request #37970 from s-aga-r/FIX-5528
chore: typo in `Stock Entry` enqueue msg
2023-11-07 20:57:45 +05:30
marination
162c0497d1 test: get_outstanding_reference_documents (triggered via UI) 2023-11-07 14:44:04 +01:00
ruthra kumar
416bd400bb refactor: optimize for speed 2023-11-07 17:57:20 +05:30
s-aga-r
ee60fa940c chore: typo in Stock Entry enqueue msg 2023-11-07 17:33:29 +05:30
ruthra kumar
6210b24c64 Merge pull request #37954 from ruthra-kumar/expense_claim_repost
refactor: expand repost to `Expense Claim` and make it configurable
2023-11-07 15:40:55 +05:30
Gursheen Anand
68c6ad6036 fix: test for balance in forex account after revaluation 2023-11-07 15:31:52 +05:30
ruthra kumar
10b9570429 refactor: update permissions for repost settings 2023-11-07 14:30:06 +05:30
ruthra kumar
11c8d9fcf1 refactor(test): repost test case for purchase invoice 2023-11-07 14:18:07 +05:30
ruthra kumar
61705047b0 refactor: select distinct types 2023-11-07 13:42:09 +05:30
Gursheen Anand
ea4b6ff27b fix: remove string from against field in loyalty point entry 2023-11-07 13:05:38 +05:30
Gursheen Anand
5ce395a60a fix: purchase receipt test 2023-11-07 12:52:49 +05:30
ruthra kumar
ac79b8483f refactor(test): update repost settings for test cases 2023-11-07 12:46:06 +05:30
ruthra kumar
0135293127 Merge pull request #37956 from ruthra-kumar/type_error_on_payment_entry
fix: type error on new payment entry
2023-11-07 12:21:29 +05:30
ruthra kumar
adff287160 fix: type error on new payment entry 2023-11-07 12:15:25 +05:30
ruthra kumar
b651b36fff refactor: support for expense claim repost 2023-11-07 11:59:33 +05:30
ruthra kumar
5a068410c6 refactor: configurable repost settings 2023-11-07 11:59:33 +05:30
ruthra kumar
ebb186c8df chore: patch to update default repost settings value 2023-11-07 11:59:30 +05:30
ruthra kumar
d582a73795 feat: settings page for repost 2023-11-07 10:12:12 +05:30
Gursheen Anand
e845b63228 fix: single dr cr entries 2023-11-06 20:37:05 +05:30
ruthra kumar
cfe0479dfb Merge pull request #37948 from ruthra-kumar/typo_in_ar_report
fix: typo in AR report
2023-11-06 20:25:10 +05:30
ruthra kumar
67e74d03ed fix: typo in AR report 2023-11-06 20:23:26 +05:30
hyaray
8722318081 fix: add translation wrapper 2023-11-06 19:49:45 +05:30
s-aga-r
2d272fa51c Merge pull request #37903 from s-aga-r/FIX-5333
fix: link between parent and child procedure
2023-11-06 19:26:05 +05:30
s-aga-r
15840d408b Merge pull request #37935 from s-aga-r/FIX-5365
fix: don't reset rate if greater than zero in standalone debit note
2023-11-06 19:25:42 +05:30
s-aga-r
f9fc6c9c9d fix(test): test_gl_entries_for_standalone_debit_note 2023-11-06 19:02:01 +05:30
s-aga-r
30c6b83a10 test: add test case for Quality Procedure` 2023-11-06 18:55:06 +05:30
s-aga-r
1754d027b3 Merge pull request #37928 from s-aga-r/FIX-5227
fix: make `Material Request Item` required if `Material Request` is set in PO
2023-11-06 17:22:27 +05:30
Gursheen Anand
a1f8595a6a chore: linting issue 2023-11-06 17:20:11 +05:30
s-aga-r
5cce522ecd fix: don't reset rate if greater than zero in standalone debit note 2023-11-06 17:18:33 +05:30
Gursheen Anand
758ec720de fix: remove join for against in purchase receipt 2023-11-06 17:14:55 +05:30
Gursheen Kaur Anand
6280031722 Merge branch 'develop' into make-against-field-dynamic 2023-11-06 17:06:03 +05:30
Gursheen Anand
ff0343d2cc fix: auto separate against accounts 2023-11-06 16:46:43 +05:30
Gursheen Anand
3d00d74fed fix: combine jv entries for rate revaluation 2023-11-06 16:45:56 +05:30
vishal
30402033bc fix: minor change added to test_case 2023-11-06 13:02:04 +05:30
vishal
de445b32f5 feat(accounts_receivable): test_case added for multi-select customer group 2023-11-06 12:39:11 +05:30
rohitwaghchaure
34d3eb88b3 feat: reserved production plan sub assembly items (#37884) 2023-11-06 11:07:09 +05:30
s-aga-r
a9d91189b0 fix: make Material Request Item required if Material Request is set in PO 2023-11-06 11:05:04 +05:30
Gursheen Anand
84f0d1ff1f chore: linting issues 2023-11-06 10:30:49 +05:30
Gursheen Anand
98a8288da2 fix: handle gle for standalone credit and debit notes 2023-11-06 09:53:11 +05:30
Gursheen Anand
0e100cd451 fix: skip check for removed validation 2023-11-06 09:51:26 +05:30
ruthra kumar
e5a018f84c Merge pull request #37879 from ruthra-kumar/flag_to_toggle_dn_update_on_cr_note
refactor: flag to toggle billed amy update in DN for Credit Note
2023-11-06 08:40:27 +05:30
Deepesh Garg
2b02ef0066 fix: POS change amount gl entry with no amount (#37799) 2023-11-05 17:25:05 +05:30
viralkansodiya15
e5bc8fccb1 fix: list index out of range (#37890)
* fix: list index out of range

* fix: solve linter test failing
2023-11-05 11:54:35 +05:30
ruthra kumar
0c5bdbdcf3 refactor(test): enable billed amt update on Sales Return(Cr Note) 2023-11-05 08:32:27 +05:30
ruthra kumar
a3191f1c8c refactor: flag to toggle billed amy update in DN for Credit Note 2023-11-05 08:16:13 +05:30
ruthra kumar
787784e937 Merge pull request #37886 from ruthra-kumar/add_rounding_effect_in_reconciliation_tool
refactor: avoid precision based validation error while reconciling
2023-11-05 05:16:31 +05:30
Raffael Meyer
539ff03a7e Merge pull request #37299 from marination/party-name-match 2023-11-04 16:47:26 +01:00
s-aga-r
e42a3e0084 Merge pull request #37754 from s-aga-r/VALIDATE-RESERVED-STOCK
fix: consider reserved stock while cancelling a stock transaction
2023-11-04 15:36:49 +05:30
s-aga-r
8fbd4cea5b chore: add missing filters for Parent Procedure 2023-11-04 14:17:26 +05:30
s-aga-r
05f24ede96 fix: link between parent and child procedure 2023-11-04 14:17:24 +05:30
s-aga-r
54b323e557 test: add test case for stock stock reservation 2023-11-04 14:15:21 +05:30
s-aga-r
9231706227 fix: qty based check for stock reservation of serial-batch items based on qty 2023-11-04 14:15:21 +05:30
s-aga-r
1f88b1ef84 chore: patch to set reserved stock in Bin 2023-11-04 14:15:19 +05:30
s-aga-r
10242235bc fix(test): test_stock_reservation_against_sales_order 2023-11-04 14:14:58 +05:30
s-aga-r
73b65ac82e fix: consider reserved stock while cancelling a stock transaction 2023-11-04 14:14:58 +05:30
s-aga-r
f52916a2c3 feat: maintain Reserved Stock in Bin 2023-11-04 14:14:58 +05:30
s-aga-r
98d6cdd53c feat: add field reserved_stock in Bin 2023-11-04 14:14:58 +05:30
s-aga-r
e1a87a802d fix: consider reserved batches while cancelling a stock transaction 2023-11-04 14:14:58 +05:30
s-aga-r
d9e284366d fix: consider reserved serial nos while cancelling a stock transaction 2023-11-04 14:14:58 +05:30
ruthra kumar
56e9a46c17 Merge pull request #37887 from ruthra-kumar/add_index_to_payment_ledger
chore: performance optimization on payment ledger entry doctype
2023-11-04 08:56:52 +05:30
Anand Baburajan
2ce6bbf291 chore: rename depreciation_amount_based_on_num_days_in_month to daily_prorata_based [dev] (#37897)
chore: rename depreciation_amount_based_on_num_days_in_month to daily_prorata_based
2023-11-03 20:11:46 +00:00
Anand Baburajan
568d5bfbe8 chore: rename daily_depreciation in asset to depreciation_amount_based_on_num_days_in_month [dev] (#37893)
* chore: rename daily_depreciation to depreciation_based_on_num_days_in_month

* chore: add patch

* chore: remove unnecessary files

* chore: add amount in field name

* chore: add amount in label
2023-11-03 22:35:08 +05:30
ruthra kumar
60435daba3 refactor: avoid precision based validation error while reconciling 2023-11-03 17:58:19 +05:30
ruthra kumar
f14d1eb871 chore: performance optimization on payment ledger entry doctype 2023-11-03 17:56:40 +05:30
rohitwaghchaure
d4c0dbfacc fix: incorrect available qty for backdated stock reco with batch (#37858)
* fix: incorrect available qty for backdated stock reco with batch

* test: added test case
2023-11-03 17:19:06 +05:30
Ankush Menat
469ae2c7f1 perf: index return against for purchase invoice (#37881) 2023-11-03 15:57:52 +05:30
ruthra kumar
a9372c42cd Merge pull request #37869 from ruthra-kumar/reconcile_only_on_voucher
refactor: 'group only by voucher' flag in AR/AP report
2023-11-03 12:29:33 +05:30
ruthra kumar
edf67444ea Merge pull request #37852 from ruthra-kumar/better_gl_and_pl_comparision_report
refactor: better ledger comparision report
2023-11-03 12:29:18 +05:30
Gursheen Anand
4867ca353c refactor: move common util for fetching party types using account type 2023-11-03 12:00:56 +05:30
Gursheen Anand
4015723591 fix: credit note receive payment entry 2023-11-03 11:58:25 +05:30
s-aga-r
f70d779034 Merge pull request #37864 from s-aga-r/FIX-5139
fix: permission error while creating Supplier Quotation from Portal
2023-11-03 11:57:06 +05:30
ruthra kumar
23beb46d15 refactor: group only by voucher flag in AR/AP report 2023-11-03 11:47:02 +05:30
s-aga-r
e019d43d0b fix: permission error while creating Supplier Quotation from Portal 2023-11-03 00:53:30 +05:30
Deepesh Garg
c37e374fdd fix: Add index to supplier invoice field (#37861)
* fix: Add index to supplier invoice field

* chore: remove unintetional changes
2023-11-02 21:00:45 +05:30
Gursheen Anand
cd1e016163 test: receive payments from payable party 2023-11-02 17:39:27 +05:30
Gursheen Anand
1f4b381748 fix: test for invoice returns 2023-11-02 17:38:43 +05:30
rohitwaghchaure
fb9a80923b Merge pull request #37856 from rohitwaghchaure/fixed-test-cases-reposting-valuation
chore: fix test cases related repost item valuation
2023-11-02 14:52:15 +05:30
Rohit Waghchaure
ed1c198897 chore: fix test cases 2023-11-02 14:21:16 +05:30
Gursheen Kaur Anand
1b808e1d7c fix: standard submit perm in repost ledger for editable invoices (#37826)
* fix: ignore perm while reposting ledger

* fix: use flag in save

* fix: remove unnecessary save
2023-11-02 14:01:26 +05:30
ruthra kumar
639f427d6d refactor(test): for ledger comparision report 2023-11-02 13:40:40 +05:30
ruthra kumar
539f0251d9 refactor: better output on gl and pl comparison report 2023-11-02 13:37:25 +05:30
rohitwaghchaure
d91d9b02d4 Merge pull request #37849 from rohitwaghchaure/fixed-remove-voucher_type_no
fix: remove voucher type and no for Item and Warehouse based reposting
2023-11-02 13:26:44 +05:30
Rohit Waghchaure
0104897d69 fix: remove voucher type and no for Item and Warehouse based reposting 2023-11-02 13:24:56 +05:30
ruthra kumar
5530a5b303 Merge pull request #37845 from ruthra-kumar/std_permissions_for_process_payment_reconciliation_log
chore: add std permissions for Process Payment Reconciilation log
2023-11-02 12:10:19 +05:30
ruthra kumar
a9fceeb00f chore: std permissions for Process Payment Reconciilation log 2023-11-02 11:32:24 +05:30
ruthra kumar
34e3538b55 Merge pull request #37838 from ruthra-kumar/pass_limits_to_je_and_pe_queries
refactor: pass limits to JE and PE queries in reconciliation tool
2023-11-02 10:42:11 +05:30
s-aga-r
851a234988 Merge pull request #37819 from s-aga-r/FIX-5274
fix: `TypeError` in PR for non-stock item
2023-11-02 10:39:35 +05:30
s-aga-r
17893eff59 Merge pull request #37836 from barredterra/filters-from-route-in-stock-balance
feat(Stock Balance): add filters from route
2023-11-02 10:12:48 +05:30
ruthra kumar
54e8ce1ac5 refactor: pass limits to JE and PE queries in reconciliation tool 2023-11-02 09:16:26 +05:30
barredterra
38e5e4a893 feat(Stock Balance): add filters from route 2023-11-01 18:05:50 +01:00
ruthra kumar
65cc804186 Merge pull request #37832 from ruthra-kumar/checkbox_to_toggle_remarks_in_general_ledger
refactor: checkbox to toggle remarks in General Ledger
2023-11-01 21:15:47 +05:30
ruthra kumar
8fa677b8e8 refactor: checkbox to toggle remarks in General Ledger 2023-11-01 20:30:16 +05:30
marination
6bd56d2d5f refactor: split_invoices_based_on_payment_terms
- Invoices were in the wrong order due to the logic. The invoices with payment terms were added first and the rest after.
- Overly long function with unnecessary loops (reduced to one main loop) and complexity
- The split row as per payment terms was not ordered. So the second installment was allocated first
2023-11-01 20:11:00 +05:30
s-aga-r
204face50d Merge pull request #37827 from s-aga-r/REFACTOR-BIN
refactor: update fields label and remove unused fields from BIN
2023-11-01 16:25:40 +05:30
Raffael Meyer
c5f5aa8208 feat: report Timesheet Billing Summary (#37451) 2023-11-01 15:49:21 +05:30
Gursheen Anand
3d9938221a fix: remove validation for negative outstanding invoices 2023-11-01 15:40:54 +05:30
s-aga-r
f0a1f4ac7c refactor: remove unused fields fcfs_rate and ma_rate from Bin 2023-11-01 15:36:41 +05:30
s-aga-r
ec1a7869f8 refactor: rearrange fields and update label 2023-11-01 15:35:18 +05:30
mrchenxxx
7e67d42d1d chore: Update translations
chore: Update translations
2023-11-01 15:25:36 +05:30
Deepesh Garg
da9a7ff63d Merge pull request #37278 from barredterra/translate-accounts-settings-de
fix: german translations of Accounts Settings
2023-11-01 15:11:52 +05:30
Deepesh Garg
47f913abcb Merge pull request #37694 from viralpatel15/develop
fix: set docstatus filter to ignore cancel document
2023-11-01 14:16:31 +05:30
Deepesh Garg
fc4199504f Merge pull request #37590 from GursheenK/gov-compliance-for-tax-withholding-report
fix: gov compliance for tax withholding report
2023-11-01 14:09:29 +05:30
Deepesh Garg
0fc14b72ca Merge pull request #37635 from GursheenK/validation-for-order-item-from-qtn
fix: validate sales order item with quotation
2023-11-01 14:03:41 +05:30
Deepesh Garg
804ed0d26a Merge pull request #37680 from GursheenK/workaround-for-SO-status-updater
fix: status when over delivery or billing in SO
2023-11-01 12:29:28 +05:30
s-aga-r
028b3e2fbf fix: TypeError in PR for non-stock item 2023-11-01 11:48:27 +05:30
marination
e0a03789ae fix: Use process.extract to get the corresponding party doc name of the result
- rapidfuzz accepts an iterable or a dict. dict input gives the dict key and value in the result
2023-10-31 16:53:08 +01:00
s-aga-r
7a3e4a8a05 Merge pull request #37742 from aadhilpm/patch-1
fix: remove GoCardless Settings and Mpesa Settings from Workspace
2023-10-31 20:02:39 +05:30
Aadhil
e16cc38b70 fix: remove GoCardless Settings and Mpesa Settings from Workspace 2023-10-31 19:59:52 +05:30
ruthra kumar
c43b30cf36 Merge pull request #37795 from ruthra-kumar/patch_for_reconciliation_limits
chore: update default limit values in reconciliation tool
2023-10-31 19:51:13 +05:30
ruthra kumar
07a8024b45 Merge pull request #37793 from ruthra-kumar/refactor_ar_remarks_fetching
refactor: pull remarks only if needed on AR/AP report
2023-10-31 19:50:38 +05:30
s-aga-r
b64147cce9 Merge pull request #37644 from bosue/fix_typo_overrridden
chore: Fix typo followup to #37636
2023-10-31 19:45:37 +05:30
s-aga-r
058bb95171 Merge pull request #37743 from barredterra/translate-project-page
fix: make project page translatable
2023-10-31 19:41:02 +05:30
hyaray
daf2ec063c fix: In-Transit Warehouse company filter (#37796) 2023-10-31 18:51:27 +05:30
rohitwaghchaure
77af247450 chore: fixed test cases (#37792) 2023-10-31 18:02:24 +05:30
ruthra kumar
1fd888175f chore: update default limit values in reconciliation tool 2023-10-31 17:47:55 +05:30
David Arnold
fb0ec74d08 fix(packed_item): ensure proper names for ref integrity (#37597) 2023-10-31 17:41:44 +05:30
ruthra kumar
eb73017798 refactor: pull remarks only if needed on AR/AP report 2023-10-31 17:31:28 +05:30
David Arnold
139a68fd0f test: fix bad test data (#37773)
* test(stock): fix bad test data

* test(asset): fix bad test data

* test(stock): fix bad test data

* test(manufacturing): fix bad test data
2023-10-31 16:50:09 +05:30
mergify[bot]
d758fc1b89 fix: incorrect material request quantity in production plan (backport #37785) (#37789)
fix: incorrect material request quantity in production plan (#37785)

(cherry picked from commit 25718d9f1b)

Co-authored-by: rohitwaghchaure <rohitw1991@gmail.com>
2023-10-31 16:28:27 +05:30
rohitwaghchaure
056b74b162 fix: indexing on Delivery Note Item (#37766)
fix: added indexing on Delivery Note Item
2023-10-31 12:32:52 +05:30
s-aga-r
e752f8f0ef Merge pull request #37758 from s-aga-r/FIX-37566
fix: `PermissionError` while creating DN from SO
2023-10-30 18:08:27 +05:30
ruthra kumar
54a32adef3 Merge pull request #37761 from ruthra-kumar/add_index_to_posting_date_in_ple
chore: add index to posting_date in PLE
2023-10-30 16:48:46 +05:30
ruthra kumar
ca69845238 chore: add index to posting_date in PLE 2023-10-30 16:15:05 +05:30
ruthra kumar
d2fdda8bcd Merge pull request #37720 from ruthra-kumar/ignore_cancelled_entries_while_looking_for_currency
refactor: ignore cancelled GLE's while looking for currency of existing entries
2023-10-30 16:11:05 +05:30
s-aga-r
afc64ed9ee fix: ignore permissions while mapping DN Item 2023-10-30 15:39:11 +05:30
Didiman1998
500435b856 fix: make changes that enable gantt view for job cards (#37661)
* fix: make changes that enable gantt view for job cards

* fix: add fields on listview and remove from json file

* fix: undo modified date

---------

Co-authored-by: Dietmar Fischer <fischer@kk-software.de>
2023-10-30 15:18:41 +05:30
viralkansodiya15
a15484fe3d fix: solve linter test and update 2023-10-30 13:01:25 +05:30
viralkansodiya15
76c61c1b04 Merge branch 'frappe:develop' into develop 2023-10-30 12:12:47 +05:30
viralkansodiya15
de58c67991 fix: linter test solve 2023-10-30 10:44:17 +05:30
s-aga-r
8a34a4ba68 Merge pull request #37732 from bosue/remove_extraneous_disabled_filters
refactor: remove extraneous disabled filters
2023-10-30 09:54:05 +05:30
Richard Case
208d5042ee chore: update tests 2023-10-30 00:48:17 +00:00
Richard Case
ece7049390 feat: in_party_currency option for AR/AP reports 2023-10-30 00:15:05 +00:00
barredterra
e72afd0bd6 fix: make project page translatable 2023-10-29 17:48:48 +01:00
Deepesh Garg
83db7c6a65 Merge pull request #37737 from deepeshgarg007/arbnb_account_fetch
fix: fetch asset received but not billed account only when needed
2023-10-29 13:55:24 +05:30
s-aga-r
62384e9321 Merge pull request #37722 from s-aga-r/FIX-TYPO
fix: typo in function name and msg
2023-10-29 12:17:27 +05:30
Deepesh Garg
1081df3d7e Merge pull request #37674 from GursheenK/item-variant-tax-template
fix(minor): set tax values for item variants
2023-10-29 10:33:03 +05:30
Deepesh Garg
3a8736374c fix: fetch asset received but not billed account only when needed 2023-10-29 10:18:47 +05:30
Bernd Oliver Sünderhauf
f276fbba4f refactor: remove extraneous disabled filters 2023-10-28 02:10:28 +02:00
rohitwaghchaure
fd78f868e1 fix: unsupported operand type(s) for serial and batch bundle in POS Invoice (#37721) 2023-10-27 23:33:04 +05:30
Anand Baburajan
d99a56bc27 chore: allow wip_composite_asset in the MR PO PR PI flow (#37723) 2023-10-27 18:54:36 +05:30
s-aga-r
48c66b68ab fix: typo in function name and msg 2023-10-27 17:07:16 +05:30
ruthra kumar
8d9b90f3f5 refactor: ignore cancelled GLE's while looking for currency 2023-10-27 13:58:44 +05:30
Deepesh Garg
4a86375e89 Merge pull request #37690 from deepeshgarg007/plaid_fixes
fix(plaid): Do not sync pending transactions
2023-10-27 11:37:33 +05:30
vishal
b60c57a97d fix: minor issue 2023-10-27 11:22:55 +05:30
vishal
8903c1bc6f feat: multi-select customer group in AR Report 2023-10-27 11:12:55 +05:30
ruthra kumar
e33fd450fd Merge pull request #37707 from ruthra-kumar/typeerror_on_tds_payable_monthly
fix: typeerror on TDS payable monthly report
2023-10-27 07:36:19 +05:30
ruthra kumar
dc5d2c7406 fix: typerror on TDS payable monthly report 2023-10-26 20:36:52 +05:30
David Arnold
1612d7ba3f fix(defaults): apply discount and provisonal defaults from item group and brand if available (#37466) 2023-10-26 12:03:22 +00:00
David Arnold
681782121c fix: avoid name clash in delivery stop (#37306)
* fix(stock): avoid name clash in delivery stop with Document.lock()

* chore(stock): format delivery stop json according to doctype builder
2023-10-26 11:46:50 +00:00
s-aga-r
35cf944cb7 Merge pull request #37604 from blaggacao/feat/link-dn-list-from-dt-form
feat(delivery): link to delivery notes list view from delivery trip
2023-10-26 13:01:55 +05:30
viralkansodiya15
4bbad7f448 fix: set docstatus filter to ignore cancel document 2023-10-26 11:45:47 +05:30
s-aga-r
74b6bfb9eb Merge pull request #37686 from s-aga-r/FIX-37423
feat: allow return of components for SCO that don't have SCR created
2023-10-26 11:15:36 +05:30
Deepesh Garg
46ea868559 fix(plaid): Do not sync pending transactions 2023-10-25 22:58:24 +05:30
s-aga-r
3290df5593 fix: consider returned qty while calculating unsupplied qty 2023-10-25 19:08:51 +05:30
s-aga-r
8e3b9ec879 feat: allow return of components for SCO that don't have SCR created 2023-10-25 18:06:23 +05:30
s-aga-r
787fc8737f Merge pull request #37669 from s-aga-r/FIX-37664
refactor: rename field `Over Order Allowance` to `Blanket Order Allowance`
2023-10-25 14:53:25 +05:30
s-aga-r
fcfcf6957e chore: patch to rename field over_order_allowance 2023-10-25 14:03:53 +05:30
s-aga-r
8ffa2bfe25 refactor: rename field Over Order Allowance to Blanket Order Allowance 2023-10-25 14:03:51 +05:30
Gursheen Anand
d69b0d76dd fix: status for over delivery or billing 2023-10-25 13:59:37 +05:30
rohitwaghchaure
2bcff4c7f2 chore: fixed test case non_internal_transfer_delivery_note (#37671) 2023-10-25 13:24:34 +05:30
Gursheen Anand
d436a40739 fix: only update if variant table empty 2023-10-25 13:06:03 +05:30
Gursheen Anand
5deba1b6f9 fix: copy all child fields to item variant 2023-10-25 12:50:16 +05:30
mergify[bot]
886102d462 chore: fixed test cases related to Internal Transfer (backport #37659) (#37662)
* chore: fixed test cases related to Internal Transfer (#37659)

(cherry picked from commit 72d32a4901)

# Conflicts:
#	erpnext/accounts/doctype/sales_invoice/test_sales_invoice.py
#	erpnext/stock/doctype/purchase_receipt/test_purchase_receipt.py

* chore: fix conflicts

* chore: fix conflicts

* chore: fix test cases

---------

Co-authored-by: rohitwaghchaure <rohitw1991@gmail.com>
2023-10-25 12:46:39 +05:30
Ankush Menat
7be578485e fix: force delete removed report (#37668) 2023-10-25 07:12:35 +00:00
ruthra kumar
7c1b990c55 Merge pull request #37625 from ruthra-kumar/set_multi_currency_fields_for_je_in_bank_reconciliation
refactor: set exchange rate on foreign currency JE from Bank Reconciliation
2023-10-25 11:08:55 +05:30
ruthra kumar
74a0d6408a refactor: handle bank transaction in foreign currency 2023-10-25 09:45:05 +05:30
rohitwaghchaure
92cbe580e6 fix: incorrect process loss validation for multiple finished items (#37576) 2023-10-24 15:28:55 +05:30
Ankush Menat
d92eb0c603 Update initiate_release.yml 2023-10-24 15:25:03 +05:30
Deepesh Garg
11d956fa18 fix: Purchase Receipt GL Entries (#37642)
* fix: Purchase Receipt GL Entries

* chore: cleanup

* test: set cwip account
2023-10-24 14:28:19 +05:30
s-aga-r
8e523961dc fix(patch): update_sre_from_voucher_details (#37649) 2023-10-24 14:13:26 +05:30
s-aga-r
cdbe1c87d4 Merge pull request #37603 from s-aga-r/AUTO-RESERVATION
feat: auto reserve stock for Sales Order on purchase
2023-10-24 10:14:18 +05:30
ruthra kumar
3f42128fff Merge pull request #37586 from ruthra-kumar/overallocation_on_po_to_multiple_invoices
fix: overallocation on purchase order to multiple invoices
2023-10-24 08:44:00 +05:30
ruthra kumar
4dff2c7a0d chore: fix flakiness test_sales_order_partial_advance_payment 2023-10-24 08:09:22 +05:30
ruthra kumar
547993f801 refactor(test): make use of utility methods 2023-10-24 06:40:14 +05:30
ruthra kumar
946228d783 test: overalloction on reconciliation when PO is involved 2023-10-24 06:40:14 +05:30
ruthra kumar
23df4205f8 fix: overallocation on Payment with PO/SO 2023-10-24 06:40:14 +05:30
ruthra kumar
89f484282a refactor: exc rate on foreign currency JE from Bank Reconciliation 2023-10-24 06:39:37 +05:30
Bernd Oliver Sünderhauf
9ef26e1df0 chore: Fix typo followup to #37636 2023-10-23 19:41:55 +02:00
ruthra kumar
025acc0e48 Merge pull request #37630 from ruthra-kumar/provision_to_set_for_gain_loss_journal
refactor: configurable exchange gain or loss posting date
2023-10-23 21:25:48 +05:30
s-aga-r
6942ab1012 chore: patch to update From Voucher details 2023-10-23 19:12:55 +05:30
Deepesh Garg
3bfb7b79f2 refactor: Remove expense included in valuation accounts (#37632)
* refactor: Remove expense included in valuation accounts

* test: Deprecate tests

* test: Depricate tests

* test: Depricate tests
2023-10-23 18:23:45 +05:30
s-aga-r
24788ddcc0 chore: add SRE link in PR Connections 2023-10-23 18:00:58 +05:30
s-aga-r
adf313a6d3 test: add test case for auto-reservation from PR 2023-10-23 17:52:59 +05:30
Raffael Meyer
7f39318340 Merge branch 'develop' into translate-accounts-settings-de 2023-10-23 13:24:27 +02:00
s-aga-r
a432290a82 fix: ignore qty msg if From Voucher is set 2023-10-23 16:26:00 +05:30
Imesha Sudasingha
2b64e1ca8b chore: typo in description (#37636)
chore: typo in description
2023-10-23 15:28:52 +05:30
ruthra kumar
514d5434a3 test: varying posting date for gain loss journal 2023-10-23 12:32:10 +05:30
ruthra kumar
7e600a6494 refactor: pass gain loss posting date to controller 2023-10-23 12:12:59 +05:30
Gursheen Anand
17ebc1ea80 fix: validate so item with qtn 2023-10-23 11:56:28 +05:30
Richard Case
b099590b2c fix: Quality Inspection Parameter migration - DuplicateEntryError due to case sensitivity (#37499)
* fix: account for case-insensitive database primary key for parameter names

* chore: linting
2023-10-23 11:40:07 +05:30
ruthra kumar
5323bb7bee refactor: introduce fields in popup 2023-10-23 10:45:21 +05:30
ruthra kumar
55dbcee36a refactor: gain_loss posting date fields in the allocation table 2023-10-23 10:45:17 +05:30
HENRY Florian
ec9434aae3 refactor: remove fr translation duplicate in frappe app (#37288) 2023-10-23 10:15:23 +05:30
Deepesh Garg
d1ec0a6093 chore: Add missing commits back (#37618)
* chore: Add missing commits back

* test: cwip accounting unit tests

* chore: Attribute error

* chore: Purchase Invoice tests

* chore: Missing asset account

* chore: Missing asset account

* chore: update tests

* fix: Internal transfer GL Entries
2023-10-23 00:16:40 +05:30
rohitwaghchaure
5136fe196b fix: remove from or target warehouse for non internal transfer entries (#37612) 2023-10-22 20:03:02 +05:30
Niraj Gautam
4aa841786f fix: Update user profile picture, if employee profile pic is changed (#37483)
* fix: Update user pic if employee pic is changed.

* fix: Update condition
2023-10-21 18:13:53 +05:30
Vishnu VS
98cc7434d2 feat(Supplier Scorecard): added method for invoiced quantity in supplier scorecard (#37580)
feat(Supplier Scorecard): added method for invoiced quantity in supplier scorecard

Co-authored-by: vishnu <vishnuviswambara2002@gmail.com>
2023-10-21 18:04:54 +05:30
Vishnu VS
35020a9423 fix: error while loading Financial Ratios report (#37613) 2023-10-21 18:02:32 +05:30
William Moreno
1cc1c9aa38 fix: Typo in Nicaraguan chart of accounts (#37620)
fix: Typo in Nicaraguan chart of accounts
2023-10-21 18:02:02 +05:30
Gursheen Kaur Anand
9d392970f0 fix(minor): filter bank accounts in bank statement import (#37525)
fix: filter by company in bank account
2023-10-21 17:59:12 +05:30
Gursheen Kaur Anand
b0d440c34b fix: set empty value for tax template in item details (#37496)
* fix: empty tax template for items with invalid templates

* fix: test for empty tax template

* fix: test for item tax template calculation

* fix: test for pos inv tax template calculation
2023-10-21 17:58:43 +05:30
Akhil Narang
21c3d9c371 refactor: use gzip library's compress() and decompress() methods directly (#37611)
The util methods in framework were added for python2.7 compat, so can be removed

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

[skip ci]
2023-10-21 11:19:45 +05:30
Deepesh Garg
dae66eab36 Merge branch 'develop' of https://github.com/frappe/erpnext into asset_purchase_receipt_gl 2023-10-20 20:12:43 +05:30
Deepesh Garg
9474908449 fix: Purchase Invoice GL entires for assets 2023-10-20 19:49:41 +05:30
Deepesh Garg
eec4057e8d fix: Purchase Invoice GL entires for assets 2023-10-20 19:42:14 +05:30
Ankush Menat
08bc77fb95 Merge pull request #37614 from maharshivpatel/fix-new-logo
chore: new erpnext logo as per espresso
2023-10-20 17:53:41 +05:30
Maharshi Patel
fff97b1cd2 chore: new erpnext logo as per espresso 2023-10-20 17:34:57 +05:30
Deepesh Garg
2a7d1c4c8d Merge pull request #37595 from vorasmit/purchase-gl
fix: add regional support to extend purchase gl entries
2023-10-20 16:51:58 +05:30
Deepesh Garg
0b674b608b Merge branch 'develop' of https://github.com/frappe/erpnext into asset_purchase_receipt_gl 2023-10-20 16:50:52 +05:30
rohitwaghchaure
14b009b093 fix: incorrect cost center in the purchase invoice (#37591) 2023-10-20 16:22:29 +05:30
s-aga-r
530922848f Merge pull request #37605 from blaggacao/fix/rename-dt-fetch-stop-link-action
fix(delivery): rename dt fetch stop action
2023-10-20 16:08:44 +05:30
David Arnold
79d51a0a0b fix(delivery): rename dt fetch stop action 2023-10-20 12:31:46 +02:00
David Arnold
85488cd0dc feat(delivery): link to delivery notes list view from delivery trip 2023-10-20 12:25:19 +02:00
Ankush Menat
ce7ac29d06 fix: Correctly extract last message (#37602)
frappe.message_log now contains plain dictionary and not JSON strings,
so no need to load them.
2023-10-20 10:20:40 +00:00
s-aga-r
4f363f5bf3 fix: partial reservation against SBB 2023-10-20 15:46:06 +05:30
Smit Vora
ff7108a3b1 fix: update existing doc if possible 2023-10-20 09:33:37 +05:30
Smit Vora
77cc91d06b fix: add regional support to extend purchase gl entries 2023-10-19 22:35:55 +05:30
s-aga-r
45395027d3 fix: incorrect serial and batch get reserved 2023-10-19 19:57:50 +05:30
Gursheen Anand
6d5ccde864 feat: add cols for supplier inv details 2023-10-19 17:55:24 +05:30
s-aga-r
961d2d9926 refactor: rename field against_pick_list 2023-10-19 17:51:34 +05:30
Gursheen Anand
75441017c6 chore: linting issues 2023-10-19 17:13:58 +05:30
Gursheen Anand
ed2457bddf feat: proprietorship & partnership options in entity type 2023-10-19 16:59:49 +05:30
Gursheen Anand
4471ad581e fix: sort by section code 2023-10-19 16:54:10 +05:30
Gursheen Anand
7ecc0d5a04 chore: change column order 2023-10-19 16:44:08 +05:30
s-aga-r
78fe567419 refactor: rename field against_pick_list_item 2023-10-19 16:38:43 +05:30
s-aga-r
5ae9c2f62b feat: add field From Voucher Type in SRE 2023-10-19 16:21:32 +05:30
Gursheen Anand
705dadae8e refactor: avoid relying only on against in tds docs query 2023-10-19 16:21:15 +05:30
Ankush Menat
40cdde8820 ci: seutp v15 config
https://github.com/frappe/frappe/issues/22817
2023-10-19 15:55:02 +05:30
s-aga-r
64497c9228 feat: reserve stock for SO on PR submission 2023-10-19 15:53:38 +05:30
s-aga-r
188175be84 feat: add fields to hold SO and SO Item ref in PR Item 2023-10-19 14:50:38 +05:30
s-aga-r
2b4fa98941 refactor: rename field Auto Reserve Stock for Sales Order 2023-10-19 14:50:35 +05:30
s-aga-r
36a996d704 chore: make Reserve Stock checkbox visible in SO 2023-10-18 12:42:25 +05:30
Deepesh Garg
7f1d916f04 chore: rearrange functions 2023-10-18 08:59:28 +05:30
Deepesh Garg
e15546b42f chore: rearrange functions 2023-10-17 21:28:59 +05:30
Deepesh Garg
8c61fe2ca5 fix: rearrange functions 2023-10-17 20:36:09 +05:30
Deepesh Garg
7f865492d0 chore: pass stock value diff 2023-10-17 17:14:37 +05:30
Deepesh Garg
726fba61f3 Merge branch 'develop' of https://github.com/frappe/erpnext into asset_purchase_receipt_gl 2023-10-17 15:59:16 +05:30
Deepesh Garg
0b85a525fb fix: GL Entries for receiving non CWIP assets using Purchase Receipt 2023-10-17 13:28:56 +05:30
Gursheen Anand
35d92abe73 fix: remove multiple against account values from gle 2023-10-11 15:56:59 +05:30
Gursheen Anand
28445058ef fix: split exchange gain loss account entries 2023-10-11 15:56:13 +05:30
Gursheen Anand
aab5737ff3 fix: make JV account against field a dynamic link 2023-10-11 15:55:02 +05:30
barredterra
115f024260 fix(translations): suggestions from review 2023-10-03 23:06:48 +02:00
Gursheen Anand
952e8cf60c fix: asset capitalization tests 2023-10-03 15:55:34 +05:30
Gursheen Anand
fcfdb9b566 fix: purchase receipt tests 2023-10-03 15:19:33 +05:30
marination
ff1dc72d74 fix: Set right party name in bank transaction
- If party name and docname are different, set the docname in Bank Transaction
2023-09-29 15:19:09 +05:30
barredterra
b3486b43c4 fix: german translations of Accounts Settings 2023-09-27 18:51:09 +02:00
Gursheen Anand
f705bf2efe fix: remove multiple accounts from against in capitalization 2023-09-25 20:10:01 +05:30
Gursheen Anand
6e1565c32c fix: set against type in asset 2023-09-25 20:08:42 +05:30
Gursheen Anand
4ea43ebc5d fix: set against type in stock controller 2023-09-25 20:01:13 +05:30
Gursheen Anand
f292a0cc4c fix: set against type in utils 2023-09-25 19:58:12 +05:30
Gursheen Anand
4c5a83d6cf fix: set against type in controllers 2023-09-25 19:55:40 +05:30
Gursheen Anand
82774f89b1 fix: set against type in deferred revenue 2023-09-25 19:50:47 +05:30
Gursheen Anand
19b220f39c fix: set against type in inv gl dict 2023-09-25 19:49:17 +05:30
Gursheen Anand
725a7f90e9 fix: use dynamic link for against field 2023-09-25 19:45:19 +05:30
971 changed files with 32326 additions and 13585 deletions

View File

@@ -28,4 +28,7 @@ b147b85e6ac19a9220cd1e2958a6ebd99373283a
494bd9ef78313436f0424b918f200dab8fc7c20b
# bulk format python code with black
baec607ff5905b1c67531096a9cf50ec7ff00a5d
baec607ff5905b1c67531096a9cf50ec7ff00a5d
# bulk refactor with sourcery
eb9ee3f79b94e594fc6dfa4f6514580e125eee8c

View File

@@ -21,6 +21,6 @@ jobs:
- name: Run backport
uses: ./actions/backport
with:
token: ${{secrets.BACKPORT_BOT_TOKEN}}
token: ${{secrets.RELEASE_TOKEN}}
labelsToAdd: "backport"
title: "{{originalTitle}}"

View File

@@ -15,7 +15,7 @@ jobs:
strategy:
fail-fast: false
matrix:
version: ["13", "14"]
version: ["14", "15"]
steps:
- uses: octokit/request-action@v2.x

21
.github/workflows/lock.yml vendored Normal file
View File

@@ -0,0 +1,21 @@
name: 'Lock threads'
on:
schedule:
- cron: '0 0 * * *'
workflow_dispatch:
permissions:
issues: write
pull-requests: write
jobs:
lock:
runs-on: ubuntu-latest
steps:
- uses: dessant/lock-threads@v5
with:
github-token: ${{ github.token }}
issue-inactive-days: 14
pr-inactive-days: 14

View File

@@ -134,6 +134,7 @@ jobs:
}
update_to_version 14
update_to_version 15
echo "Updating to latest version"
git -C "apps/frappe" checkout -q -f "${GITHUB_BASE_REF:-${GITHUB_REF##*/}}"

View File

@@ -17,6 +17,7 @@ pull_request_rules:
- base=version-12
- base=version-14
- base=version-15
- base=version-16
actions:
close:
comment:
@@ -24,16 +25,6 @@ pull_request_rules:
@{{author}}, thanks for the contribution, but we do not accept pull requests on a stable branch. Please raise PR on an appropriate hotfix branch.
https://github.com/frappe/erpnext/wiki/Pull-Request-Checklist#which-branch
- name: Auto-close PRs on pre-release branch
conditions:
- base=version-13-pre-release
actions:
close:
comment:
message: |
@{{author}}, pre-release branch is not maintained anymore. Releases are directly done by merging hotfix branch to stable branches.
- name: backport to develop
conditions:
- label="backport develop"
@@ -54,13 +45,13 @@ pull_request_rules:
assignees:
- "{{ author }}"
- name: backport to version-14-pre-release
- name: backport to version-15-hotfix
conditions:
- label="backport version-14-pre-release"
- label="backport version-15-hotfix"
actions:
backport:
branches:
- version-14-pre-release
- version-15-hotfix
assignees:
- "{{ author }}"
@@ -74,35 +65,6 @@ pull_request_rules:
assignees:
- "{{ author }}"
- name: backport to version-13-pre-release
conditions:
- label="backport version-13-pre-release"
actions:
backport:
branches:
- version-13-pre-release
assignees:
- "{{ author }}"
- name: backport to version-12-hotfix
conditions:
- label="backport version-12-hotfix"
actions:
backport:
branches:
- version-12-hotfix
assignees:
- "{{ author }}"
- name: backport to version-12-pre-release
conditions:
- label="backport version-12-pre-release"
actions:
backport:
branches:
- version-12-pre-release
assignees:
- "{{ author }}"
- name: Automatic merge on CI success and review
conditions:

View File

@@ -5,7 +5,7 @@ fail_fast: false
repos:
- repo: https://github.com/pre-commit/pre-commit-hooks
rev: v4.0.1
rev: v4.3.0
hooks:
- id: trailing-whitespace
files: "erpnext.*"
@@ -15,6 +15,10 @@ repos:
args: ['--branch', 'develop']
- id: check-merge-conflict
- id: check-ast
- id: check-json
- id: check-toml
- id: check-yaml
- id: debug-statements
- repo: https://github.com/pre-commit/mirrors-eslint
rev: v8.44.0

View File

@@ -73,8 +73,6 @@ New passwords will be created for the ERPNext "Administrator" user, the MariaDB
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)
1. [Translations](https://translate.erpnext.com)
## License

View File

@@ -3,7 +3,7 @@ import inspect
import frappe
__version__ = "15.0.0-dev"
__version__ = "16.0.0-dev"
def get_default_company(user=None):
@@ -36,7 +36,7 @@ def get_default_cost_center(company):
if not frappe.flags.company_cost_center:
frappe.flags.company_cost_center = {}
if not company in frappe.flags.company_cost_center:
if company not in frappe.flags.company_cost_center:
frappe.flags.company_cost_center[company] = frappe.get_cached_value(
"Company", company, "cost_center"
)
@@ -47,7 +47,7 @@ def get_company_currency(company):
"""Returns the default company currency"""
if not frappe.flags.company_currency:
frappe.flags.company_currency = {}
if not company in frappe.flags.company_currency:
if company not in frappe.flags.company_currency:
frappe.flags.company_currency[company] = frappe.db.get_value(
"Company", company, "default_currency", cache=True
)
@@ -81,7 +81,7 @@ def is_perpetual_inventory_enabled(company):
if not hasattr(frappe.local, "enable_perpetual_inventory"):
frappe.local.enable_perpetual_inventory = {}
if not company in frappe.local.enable_perpetual_inventory:
if company not in frappe.local.enable_perpetual_inventory:
frappe.local.enable_perpetual_inventory[company] = (
frappe.get_cached_value("Company", company, "enable_perpetual_inventory") or 0
)
@@ -96,7 +96,7 @@ def get_default_finance_book(company=None):
if not hasattr(frappe.local, "default_finance_book"):
frappe.local.default_finance_book = {}
if not company in frappe.local.default_finance_book:
if company not in frappe.local.default_finance_book:
frappe.local.default_finance_book[company] = frappe.get_cached_value(
"Company", company, "default_finance_book"
)
@@ -108,7 +108,7 @@ def get_party_account_type(party_type):
if not hasattr(frappe.local, "party_account_types"):
frappe.local.party_account_types = {}
if not party_type in frappe.local.party_account_types:
if party_type not in frappe.local.party_account_types:
frappe.local.party_account_types[party_type] = (
frappe.db.get_value("Party Type", party_type, "account_type") or ""
)

View File

@@ -232,7 +232,7 @@ def calculate_monthly_amount(
if amount + already_booked_amount_in_account_currency > item.net_amount:
amount = item.net_amount - already_booked_amount_in_account_currency
if not (get_first_day(start_date) == start_date and get_last_day(end_date) == end_date):
if get_first_day(start_date) != start_date or get_last_day(end_date) != end_date:
partial_month = flt(date_diff(end_date, start_date)) / flt(
date_diff(get_last_day(end_date), get_first_day(start_date))
)
@@ -358,9 +358,11 @@ def book_deferred_income_or_expense(doc, deferred_process, posting_date=None):
account_currency = get_account_currency(item.expense_account or item.income_account)
if doc.doctype == "Sales Invoice":
against_type = "Customer"
against, project = doc.customer, doc.project
credit_account, debit_account = item.income_account, item.deferred_revenue_account
else:
against_type = "Supplier"
against, project = doc.supplier, item.project
credit_account, debit_account = item.deferred_expense_account, item.expense_account
@@ -413,6 +415,7 @@ def book_deferred_income_or_expense(doc, deferred_process, posting_date=None):
doc,
credit_account,
debit_account,
against_type,
against,
amount,
base_amount,
@@ -494,6 +497,7 @@ def make_gl_entries(
doc,
credit_account,
debit_account,
against_type,
against,
amount,
base_amount,
@@ -515,7 +519,9 @@ def make_gl_entries(
doc.get_gl_dict(
{
"account": credit_account,
"against_type": against_type,
"against": against,
"against_link": against,
"credit": base_amount,
"credit_in_account_currency": amount,
"cost_center": cost_center,
@@ -534,7 +540,9 @@ def make_gl_entries(
doc.get_gl_dict(
{
"account": debit_account,
"against_type": against_type,
"against": against,
"against_link": against,
"debit": base_amount,
"debit_in_account_currency": amount,
"cost_center": cost_center,

View File

@@ -23,6 +23,65 @@ class InvalidAccountMergeError(frappe.ValidationError):
class Account(NestedSet):
# begin: auto-generated types
# This code is auto-generated. Do not modify anything in this block.
from typing import TYPE_CHECKING
if TYPE_CHECKING:
from frappe.types import DF
account_currency: DF.Link | None
account_name: DF.Data
account_number: DF.Data | None
account_type: DF.Literal[
"",
"Accumulated Depreciation",
"Asset Received But Not Billed",
"Bank",
"Cash",
"Chargeable",
"Capital Work in Progress",
"Cost of Goods Sold",
"Current Asset",
"Current Liability",
"Depreciation",
"Direct Expense",
"Direct Income",
"Equity",
"Expense Account",
"Expenses Included In Asset Valuation",
"Expenses Included In Valuation",
"Fixed Asset",
"Income Account",
"Indirect Expense",
"Indirect Income",
"Liability",
"Payable",
"Receivable",
"Round Off",
"Stock",
"Stock Adjustment",
"Stock Received But Not Billed",
"Service Received But Not Billed",
"Tax",
"Temporary",
]
balance_must_be: DF.Literal["", "Debit", "Credit"]
company: DF.Link
disabled: DF.Check
freeze_account: DF.Literal["No", "Yes"]
include_in_gross: DF.Check
is_group: DF.Check
lft: DF.Int
old_parent: DF.Data | None
parent_account: DF.Link
report_type: DF.Literal["", "Balance Sheet", "Profit and Loss"]
rgt: DF.Int
root_type: DF.Literal["", "Asset", "Liability", "Income", "Expense", "Equity"]
tax_rate: DF.Float
# end: auto-generated types
nsm_parent_field = "parent_account"
def on_update(self):
@@ -32,8 +91,8 @@ class Account(NestedSet):
super(Account, self).on_update()
def onload(self):
frozen_accounts_modifier = frappe.db.get_value(
"Accounts Settings", "Accounts Settings", "frozen_accounts_modifier"
frozen_accounts_modifier = frappe.db.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)

View File

@@ -77,7 +77,7 @@ frappe.treeview_settings["Account"] = {
// show Dr if positive since balance is calculated as debit - credit else show Cr
const balance = account.balance_in_account_currency || account.balance;
const dr_or_cr = balance > 0 ? "Dr": "Cr";
const dr_or_cr = balance > 0 ? __("Dr"): __("Cr");
const format = (value, currency) => format_currency(Math.abs(value), currency);
if (account.balance!==undefined) {

View File

@@ -74,7 +74,7 @@ def create_charts(
# after all accounts are already inserted.
frappe.local.flags.ignore_update_nsm = True
_import_accounts(chart, None, None, root_account=True)
rebuild_tree("Account", "parent_account")
rebuild_tree("Account")
frappe.local.flags.ignore_update_nsm = False
@@ -231,6 +231,8 @@ def build_account_tree(tree, parent, all_accounts):
tree[child.account_name]["account_type"] = child.account_type
if child.tax_rate:
tree[child.account_name]["tax_rate"] = child.tax_rate
if child.account_currency:
tree[child.account_name]["account_currency"] = child.account_currency
if not parent:
tree[child.account_name]["root_type"] = child.root_type

View File

@@ -26,7 +26,7 @@
"0360 Bauliche Investitionen in fremden (gepachteten) Betriebs- und Geschäftsgebäuden": {"account_type": "Fixed Asset"},
"0370 Bauliche Investitionen in fremden (gepachteten) Wohn- und Sozialgebäuden": {"account_type": "Fixed Asset"},
"0390 Kumulierte Abschreibungen zu Grundstücken ": {"account_type": "Fixed Asset"},
"0400 Maschinen und Geräte ": {"account_type": "Fixed Asset"},
"0400 Maschinen und Geräte ": {"account_type": "Fixed Asset"},
"0500 Maschinenwerkzeuge ": {"account_type": "Fixed Asset"},
"0510 Allgemeine Werkzeuge und Handwerkzeuge ": {"account_type": "Fixed Asset"},
"0520 Prototypen, Formen, Modelle ": {"account_type": "Fixed Asset"},
@@ -65,42 +65,41 @@
"0980 Geleistete Anzahlungen auf Finanzanlagen ": {"account_type": "Fixed Asset"},
"0990 Kumulierte Abschreibungen zu Finanzanlagen ": {"account_type": "Fixed Asset"},
"root_type": "Asset"
},
},
"Klasse 1 Aktiva: Vorr\u00e4te": {
"1000 Bezugsverrechnung": {"account_type": "Stock"},
"1100 Rohstoffe": {"account_type": "Stock"},
"1200 Bezogene Teile": {"account_type": "Stock"},
"1300 Hilfsstoffe": {"account_type": "Stock"},
"1350 Betriebsstoffe": {"account_type": "Stock"},
"1360 Vorrat Energietraeger": {"account_type": "Stock"},
"1360 Vorrat Energietraeger": {"account_type": "Stock"},
"1400 Unfertige Erzeugnisse": {"account_type": "Stock"},
"1500 Fertige Erzeugnisse": {"account_type": "Stock"},
"1600 Handelswarenvorrat": {"account_type": "Stock Received But Not Billed"},
"1700 Noch nicht abrechenbare Leistungen": {"account_type": "Stock"},
"1900 Wertberichtigungen": {"account_type": "Stock"},
"1800 Geleistete Anzahlungen": {"account_type": "Stock"},
"1900 Wertberichtigungen": {"account_type": "Stock"},
"root_type": "Asset"
},
},
"Klasse 3 Passiva: Verbindlichkeiten": {
"3000 Allgemeine Verbindlichkeiten (Schuld)": {"account_type": "Payable"},
"3010 R\u00fcckstellungen f\u00fcr Pensionen": {"account_type": "Payable"},
"3020 Steuerr\u00fcckstellungen": {"account_type": "Tax"},
"3041 Sonstige R\u00fcckstellungen": {"account_type": "Payable"},
"3041 Sonstige R\u00fcckstellungen": {"account_type": "Payable"},
"3110 Verbindlichkeiten gegen\u00fcber Bank": {"account_type": "Payable"},
"3150 Verbindlichkeiten Darlehen": {"account_type": "Payable"},
"3185 Verbindlichkeiten Kreditkarte": {"account_type": "Payable"},
"3185 Verbindlichkeiten Kreditkarte": {"account_type": "Payable"},
"3380 Verbindlichkeiten aus der Annahme gezogener Wechsel u. d. Ausstellungen eigener Wechsel": {
"account_type": "Payable"
},
"3400 Verbindlichkeiten gegen\u00fc. verb. Untern., Verbindl. gegen\u00fc. Untern., mit denen eine Beteiligungsverh\u00e4lnis besteht": {},
"3460 Verbindlichkeiten gegenueber Gesellschaftern": {"account_type": "Payable"},
"3470 Einlagen stiller Gesellschafter": {"account_type": "Payable"},
"3585 Verbindlichkeiten Lohnsteuer": {"account_type": "Tax"},
"3590 Verbindlichkeiten Kommunalabgaben": {"account_type": "Tax"},
"3595 Verbindlichkeiten Dienstgeberbeitrag": {"account_type": "Tax"},
"3585 Verbindlichkeiten Lohnsteuer": {"account_type": "Tax"},
"3590 Verbindlichkeiten Kommunalabgaben": {"account_type": "Tax"},
"3595 Verbindlichkeiten Dienstgeberbeitrag": {"account_type": "Tax"},
"3600 Verbindlichkeiten Sozialversicherung": {"account_type": "Payable"},
"3640 Verbindlichkeiten Loehne und Gehaelter": {"account_type": "Payable"},
"3640 Verbindlichkeiten Loehne und Gehaelter": {"account_type": "Payable"},
"3700 Sonstige Verbindlichkeiten": {"account_type": "Payable"},
"3900 Passive Rechnungsabgrenzungsposten": {"account_type": "Payable"},
"3100 Anleihen (einschlie\u00dflich konvertibler)": {"account_type": "Payable"},
@@ -119,13 +118,13 @@
},
"3515 Umsatzsteuer Inland 10%": {
"account_type": "Tax"
},
},
"3520 Umsatzsteuer aus i.g. Erwerb 20%": {
"account_type": "Tax"
},
"3525 Umsatzsteuer aus i.g. Erwerb 10%": {
"account_type": "Tax"
},
},
"3560 Umsatzsteuer-Evidenzkonto f\u00fcr erhaltene Anzahlungen auf Bestellungen": {},
"3360 Verbindlichkeiten aus Lieferungen u. Leistungen EU": {
"account_type": "Payable"
@@ -141,7 +140,7 @@
"account_type": "Tax"
},
"root_type": "Liability"
},
},
"Klasse 2 Aktiva: Umlaufverm\u00f6gen, Rechnungsabgrenzungen": {
"2030 Forderungen aus Lieferungen und Leistungen Inland (0% USt, umsatzsteuerfrei)": {
"account_type": "Receivable"
@@ -154,7 +153,7 @@
},
"2040 Forderungen aus Lieferungen und Leistungen Inland (sonstiger USt-Satz)": {
"account_type": "Receivable"
},
},
"2100 Forderungen aus Lieferungen und Leistungen EU": {
"account_type": "Receivable"
},
@@ -192,7 +191,7 @@
"account_type": "Receivable"
},
"2570 Einfuhrumsatzsteuer (bezahlt)": {"account_type": "Tax"},
"2460 Eingeforderte aber noch nicht eingezahlte Einlagen": {
"account_type": "Receivable"
},
@@ -243,10 +242,10 @@
},
"2800 Guthaben bei Bank": {
"account_type": "Bank"
},
},
"2801 Guthaben bei Bank - Sparkonto": {
"account_type": "Bank"
},
},
"2810 Guthaben bei Paypal": {
"account_type": "Bank"
},
@@ -264,19 +263,19 @@
},
"2895 Schwebende Geldbewegugen": {
"account_type": "Bank"
},
},
"2513 Vorsteuer Inland 5%": {
"account_type": "Tax"
},
"2515 Vorsteuer Inland 20%": {
"account_type": "Tax"
},
},
"2520 Vorsteuer aus innergemeinschaftlichem Erwerb 10%": {
"account_type": "Tax"
},
"2525 Vorsteuer aus innergemeinschaftlichem Erwerb 20%": {
"account_type": "Tax"
},
},
"2530 Vorsteuer \u00a719/Art 19 ( reverse charge ) ": {
"account_type": "Tax"
},
@@ -286,16 +285,16 @@
"root_type": "Asset"
},
"Klasse 4: Betriebliche Erträge": {
"4000 Erlöse 20 %": {"account_type": "Income Account"},
"4020 Erl\u00f6se 0 % steuerbefreit": {"account_type": "Income Account"},
"4000 Erlöse 20 %": {"account_type": "Income Account"},
"4020 Erl\u00f6se 0 % steuerbefreit": {"account_type": "Income Account"},
"4010 Erl\u00f6se 10 %": {"account_type": "Income Account"},
"4030 Erl\u00f6se 13 %": {"account_type": "Income Account"},
"4040 Erl\u00f6se 0 % innergemeinschaftliche Lieferungen": {"account_type": "Income Account"},
"4400 Erl\u00f6sreduktion 0 % steuerbefreit": {"account_type": "Expense Account"},
"4030 Erl\u00f6se 13 %": {"account_type": "Income Account"},
"4040 Erl\u00f6se 0 % innergemeinschaftliche Lieferungen": {"account_type": "Income Account"},
"4400 Erl\u00f6sreduktion 0 % steuerbefreit": {"account_type": "Expense Account"},
"4410 Erl\u00f6sreduktion 10 %": {"account_type": "Expense Account"},
"4420 Erl\u00f6sreduktion 20 %": {"account_type": "Expense Account"},
"4430 Erl\u00f6sreduktion 13 %": {"account_type": "Expense Account"},
"4440 Erl\u00f6sreduktion 0 % innergemeinschaftliche Lieferungen": {"account_type": "Expense Account"},
"4430 Erl\u00f6sreduktion 13 %": {"account_type": "Expense Account"},
"4440 Erl\u00f6sreduktion 0 % innergemeinschaftliche Lieferungen": {"account_type": "Expense Account"},
"4500 Ver\u00e4nderungen des Bestandes an fertigen und unfertigen Erzeugn. sowie an noch nicht abrechenbaren Leistungen": {"account_type": "Income Account"},
"4580 Aktivierte Eigenleistungen": {"account_type": "Income Account"},
"4600 Erl\u00f6se aus dem Abgang vom Anlageverm\u00f6gen, ausgen. Finanzanlagen": {"account_type": "Income Account"},
@@ -304,15 +303,15 @@
"4700 Ertr\u00e4ge aus der Aufl\u00f6sung von R\u00fcckstellungen": {"account_type": "Income Account"},
"4800 \u00dcbrige betriebliche Ertr\u00e4ge": {"account_type": "Income Account"},
"root_type": "Income"
},
},
"Klasse 5: Aufwand f\u00fcr Material und Leistungen": {
"5000 Einkauf Partnerleistungen": {"account_type": "Cost of Goods Sold"},
"5000 Einkauf Partnerleistungen": {"account_type": "Cost of Goods Sold"},
"5100 Verbrauch an Rohstoffen": {"account_type": "Cost of Goods Sold"},
"5200 Verbrauch von bezogenen Fertig- und Einzelteilen": {"account_type": "Cost of Goods Sold"},
"5300 Verbrauch von Hilfsstoffen": {"account_type": "Cost of Goods Sold"},
"5340 Verbrauch Verpackungsmaterial": {"account_type": "Cost of Goods Sold"},
"5470 Verbrauch von Kleinmaterial": {"account_type": "Cost of Goods Sold"},
"5450 Verbrauch von Reinigungsmaterial": {"account_type": "Cost of Goods Sold"},
"5450 Verbrauch von Reinigungsmaterial": {"account_type": "Cost of Goods Sold"},
"5400 Verbrauch von Betriebsstoffen": {"account_type": "Cost of Goods Sold"},
"5500 Verbrauch von Werkzeugen und anderen Erzeugungshilfsmittel": {"account_type": "Cost of Goods Sold"},
"5600 Verbrauch von Brenn- und Treibstoffen, Energie und Wasser": {"account_type": "Cost of Goods Sold"},
@@ -340,7 +339,7 @@
"6700 Sonstige Sozialaufwendungen": {"account_type": "Payable"},
"6900 Aufwandsstellenrechnung Personal": {"account_type": "Payable"},
"root_type": "Expense"
},
},
"Klasse 7: Abschreibungen und sonstige betriebliche Aufwendungen": {
"7010 Abschreibungen auf das Anlageverm\u00f6gen (ausgenommen Finanzanlagen)": {"account_type": "Depreciation"},
"7100 Sonstige Steuern und Geb\u00fchren": {"account_type": "Tax"},
@@ -349,7 +348,7 @@
"7310 Fahrrad - Aufwand": {"account_type": "Expense Account"},
"7320 Kfz - Aufwand": {"account_type": "Expense Account"},
"7330 LKW - Aufwand": {"account_type": "Expense Account"},
"7340 Lastenrad - Aufwand": {"account_type": "Expense Account"},
"7340 Lastenrad - Aufwand": {"account_type": "Expense Account"},
"7350 Reise- und Fahraufwand": {"account_type": "Expense Account"},
"7360 Tag- und N\u00e4chtigungsgelder": {"account_type": "Expense Account"},
"7380 Nachrichtenaufwand": {"account_type": "Expense Account"},
@@ -409,7 +408,7 @@
"8990 Gewinnabfuhr bzw. Verlust\u00fcberrechnung aus Ergebnisabf\u00fchrungsvertr\u00e4gen": {"account_type": "Expense Account"},
"8350 nicht ausgenutzte Lieferantenskonti": {"account_type": "Expense Account"},
"root_type": "Income"
},
},
"Klasse 9 Passiva: Eigenkapital, R\u00fccklagen, stille Einlagen, Abschlusskonten": {
"9000 Gezeichnetes bzw. gewidmetes Kapital": {
"account_type": "Equity"
@@ -435,5 +434,5 @@
},
"root_type": "Equity"
}
}
}
}

View File

@@ -33,7 +33,9 @@
},
"Stocks": {
"Mati\u00e8res premi\u00e8res": {},
"Stock de produits fini": {},
"Stock de produits fini": {
"account_type": "Stock"
},
"Stock exp\u00e9di\u00e9 non-factur\u00e9": {},
"Travaux en cours": {},
"account_type": "Stock"
@@ -395,9 +397,11 @@
},
"Produits": {
"Revenus de ventes": {
" Escomptes de volume sur ventes": {},
"Escomptes de volume sur ventes": {},
"Autres produits d'exploitation": {},
"Ventes": {},
"Ventes": {
"account_type": "Income Account"
},
"Ventes avec des provinces harmonis\u00e9es": {},
"Ventes avec des provinces non-harmonis\u00e9es": {},
"Ventes \u00e0 l'\u00e9tranger": {}

View File

@@ -53,8 +53,13 @@
},
"II. Forderungen und sonstige Vermögensgegenstände": {
"is_group": 1,
"Ford. a. Lieferungen und Leistungen": {
"Forderungen aus Lieferungen und Leistungen mit Kontokorrent": {
"account_number": "1400",
"account_type": "Receivable",
"is_group": 1
},
"Forderungen aus Lieferungen und Leistungen ohne Kontokorrent": {
"account_number": "1410",
"account_type": "Receivable"
},
"Durchlaufende Posten": {
@@ -180,8 +185,13 @@
},
"IV. Verbindlichkeiten aus Lieferungen und Leistungen": {
"is_group": 1,
"Verbindlichkeiten aus Lieferungen u. Leistungen": {
"Verbindlichkeiten aus Lieferungen und Leistungen mit Kontokorrent": {
"account_number": "1600",
"account_type": "Payable",
"is_group": 1
},
"Verbindlichkeiten aus Lieferungen und Leistungen ohne Kontokorrent": {
"account_number": "1610",
"account_type": "Payable"
}
},

View File

@@ -1,4 +1,6 @@
{
"country_code": "hu",
"name": "Hungary - Chart of Accounts for Microenterprises",
"tree": {
"SZ\u00c1MLAOSZT\u00c1LY BEFEKTETETT ESZK\u00d6Z\u00d6K": {
"account_number": 1,
@@ -1651,4 +1653,4 @@
}
}
}
}
}

View File

@@ -1,6 +1,6 @@
{
"country_code": "ni",
"name": "Nicaragua - Catalogo de Cuentas",
"name": "Nicaragua - Catálogo de Cuentas",
"tree": {
"Activo": {
"Activo Corriente": {
@@ -491,4 +491,4 @@
"root_type": "Liability"
}
}
}
}

View File

@@ -11,6 +11,29 @@ from erpnext.accounts.doctype.accounting_dimension.accounting_dimension import (
class AccountClosingBalance(Document):
# begin: auto-generated types
# This code is auto-generated. Do not modify anything in this block.
from typing import TYPE_CHECKING
if TYPE_CHECKING:
from frappe.types import DF
account: DF.Link | None
account_currency: DF.Link | None
closing_date: DF.Date | None
company: DF.Link | None
cost_center: DF.Link | None
credit: DF.Currency
credit_in_account_currency: DF.Currency
debit: DF.Currency
debit_in_account_currency: DF.Currency
finance_book: DF.Link | None
is_period_closing_voucher_entry: DF.Check
period_closing_voucher: DF.Link | None
project: DF.Link | None
# end: auto-generated types
pass

View File

@@ -13,6 +13,25 @@ from frappe.utils import cstr
class AccountingDimension(Document):
# begin: auto-generated types
# This code is auto-generated. Do not modify anything in this block.
from typing import TYPE_CHECKING
if TYPE_CHECKING:
from frappe.types import DF
from erpnext.accounts.doctype.accounting_dimension_detail.accounting_dimension_detail import (
AccountingDimensionDetail,
)
dimension_defaults: DF.Table[AccountingDimensionDetail]
disabled: DF.Check
document_type: DF.Link
fieldname: DF.Data | None
label: DF.Data | None
# end: auto-generated types
def before_insert(self):
self.set_fieldname_and_label()

View File

@@ -7,4 +7,24 @@ from frappe.model.document import Document
class AccountingDimensionDetail(Document):
# begin: auto-generated types
# This code is auto-generated. Do not modify anything in this block.
from typing import TYPE_CHECKING
if TYPE_CHECKING:
from frappe.types import DF
automatically_post_balancing_accounting_entry: DF.Check
company: DF.Link | None
default_dimension: DF.DynamicLink | None
mandatory_for_bs: DF.Check
mandatory_for_pl: DF.Check
offsetting_account: DF.Link | None
parent: DF.Data
parentfield: DF.Data
parenttype: DF.Data
reference_document: DF.Link | None
# end: auto-generated types
pass

View File

@@ -8,6 +8,28 @@ from frappe.model.document import Document
class AccountingDimensionFilter(Document):
# begin: auto-generated types
# This code is auto-generated. Do not modify anything in this block.
from typing import TYPE_CHECKING
if TYPE_CHECKING:
from frappe.types import DF
from erpnext.accounts.doctype.allowed_dimension.allowed_dimension import AllowedDimension
from erpnext.accounts.doctype.applicable_on_account.applicable_on_account import (
ApplicableOnAccount,
)
accounting_dimension: DF.Literal
accounts: DF.Table[ApplicableOnAccount]
allow_or_restrict: DF.Literal["Allow", "Restrict"]
apply_restriction_on_values: DF.Check
company: DF.Link
dimensions: DF.Table[AllowedDimension]
disabled: DF.Check
# end: auto-generated types
def before_save(self):
# If restriction is not applied on values, then remove all the dimensions and set allow_or_restrict to Restrict
if not self.apply_restriction_on_values:

View File

@@ -16,6 +16,23 @@ class ClosedAccountingPeriod(frappe.ValidationError):
class AccountingPeriod(Document):
# begin: auto-generated types
# This code is auto-generated. Do not modify anything in this block.
from typing import TYPE_CHECKING
if TYPE_CHECKING:
from frappe.types import DF
from erpnext.accounts.doctype.closed_document.closed_document import ClosedDocument
closed_documents: DF.Table[ClosedDocument]
company: DF.Link
end_date: DF.Date
period_name: DF.Data
start_date: DF.Date
# end: auto-generated types
def validate(self):
self.validate_overlap()

View File

@@ -66,7 +66,12 @@
"show_balance_in_coa",
"banking_tab",
"enable_party_matching",
"enable_fuzzy_matching"
"enable_fuzzy_matching",
"reports_tab",
"remarks_section",
"general_ledger_remarks_length",
"column_break_lvjk",
"receivable_payable_remarks_length"
],
"fields": [
{
@@ -422,6 +427,34 @@
"fieldname": "round_row_wise_tax",
"fieldtype": "Check",
"label": "Round Tax Amount Row-wise"
},
{
"fieldname": "reports_tab",
"fieldtype": "Tab Break",
"label": "Reports"
},
{
"default": "0",
"description": "Truncates 'Remarks' column to set character length",
"fieldname": "general_ledger_remarks_length",
"fieldtype": "Int",
"label": "General Ledger"
},
{
"default": "0",
"description": "Truncates 'Remarks' column to set character length",
"fieldname": "receivable_payable_remarks_length",
"fieldtype": "Int",
"label": "Accounts Receivable/Payable"
},
{
"fieldname": "column_break_lvjk",
"fieldtype": "Column Break"
},
{
"fieldname": "remarks_section",
"fieldtype": "Section Break",
"label": "Remarks Column Length"
}
],
"icon": "icon-cog",
@@ -429,7 +462,7 @@
"index_web_pages_for_search": 1,
"issingle": 1,
"links": [],
"modified": "2023-08-28 00:12:02.740633",
"modified": "2023-11-20 09:37:47.650347",
"modified_by": "Administrator",
"module": "Accounts",
"name": "Accounts Settings",

View File

@@ -14,6 +14,52 @@ from erpnext.stock.utils import check_pending_reposting
class AccountsSettings(Document):
# begin: auto-generated types
# This code is auto-generated. Do not modify anything in this block.
from typing import TYPE_CHECKING
if TYPE_CHECKING:
from frappe.types import DF
acc_frozen_upto: DF.Date | None
add_taxes_from_item_tax_template: DF.Check
allow_multi_currency_invoices_against_single_party_account: DF.Check
allow_stale: DF.Check
auto_reconcile_payments: DF.Check
automatically_fetch_payment_terms: DF.Check
automatically_process_deferred_accounting_entry: DF.Check
book_asset_depreciation_entry_automatically: DF.Check
book_deferred_entries_based_on: DF.Literal["Days", "Months"]
book_deferred_entries_via_journal_entry: DF.Check
book_tax_discount_loss: DF.Check
check_supplier_invoice_uniqueness: DF.Check
credit_controller: DF.Link | None
delete_linked_ledger_entries: DF.Check
determine_address_tax_category_from: DF.Literal["Billing Address", "Shipping Address"]
enable_common_party_accounting: DF.Check
enable_fuzzy_matching: DF.Check
enable_party_matching: DF.Check
frozen_accounts_modifier: DF.Link | None
general_ledger_remarks_length: DF.Int
ignore_account_closing_balance: DF.Check
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_remarks_length: DF.Int
role_allowed_to_over_bill: DF.Link | None
round_row_wise_tax: DF.Check
show_balance_in_coa: DF.Check
show_inclusive_tax_in_print: DF.Check
show_payment_schedule_in_print: DF.Check
show_taxes_as_table_in_print: DF.Check
stale_days: DF.Int
submit_journal_entries: DF.Check
unlink_advance_payment_on_cancelation_of_order: DF.Check
unlink_payment_on_cancellation_of_invoice: DF.Check
# end: auto-generated types
def validate(self):
old_doc = self.get_doc_before_save()
clear_cache = False

View File

@@ -6,4 +6,22 @@ from frappe.model.document import Document
class AdvanceTax(Document):
# begin: auto-generated types
# This code is auto-generated. Do not modify anything in this block.
from typing import TYPE_CHECKING
if TYPE_CHECKING:
from frappe.types import DF
account_head: DF.Link | None
allocated_amount: DF.Currency
parent: DF.Data
parentfield: DF.Data
parenttype: DF.Data
reference_detail: DF.Data | None
reference_name: DF.DynamicLink | None
reference_type: DF.Link | None
# end: auto-generated types
pass

View File

@@ -7,4 +7,33 @@ from frappe.model.document import Document
class AdvanceTaxesandCharges(Document):
# begin: auto-generated types
# This code is auto-generated. Do not modify anything in this block.
from typing import TYPE_CHECKING
if TYPE_CHECKING:
from frappe.types import DF
account_head: DF.Link
add_deduct_tax: DF.Literal["Add", "Deduct"]
allocated_amount: DF.Currency
base_tax_amount: DF.Currency
base_total: DF.Currency
charge_type: DF.Literal[
"", "Actual", "On Paid Amount", "On Previous Row Amount", "On Previous Row Total"
]
cost_center: DF.Link | None
currency: DF.Link | None
description: DF.SmallText
included_in_paid_amount: DF.Check
parent: DF.Data
parentfield: DF.Data
parenttype: DF.Data
rate: DF.Float
row_id: DF.Data | None
tax_amount: DF.Currency
total: DF.Currency
# end: auto-generated types
pass

View File

@@ -7,4 +7,19 @@ from frappe.model.document import Document
class AllowedDimension(Document):
# begin: auto-generated types
# This code is auto-generated. Do not modify anything in this block.
from typing import TYPE_CHECKING
if TYPE_CHECKING:
from frappe.types import DF
accounting_dimension: DF.Link | None
dimension_value: DF.DynamicLink | None
parent: DF.Data
parentfield: DF.Data
parenttype: DF.Data
# end: auto-generated types
pass

View File

@@ -11,6 +11,7 @@
{
"fieldname": "company",
"fieldtype": "Link",
"ignore_user_permissions": 1,
"in_list_view": 1,
"label": "Company",
"options": "Company",
@@ -19,7 +20,7 @@
],
"istable": 1,
"links": [],
"modified": "2020-05-01 12:32:34.044911",
"modified": "2024-01-03 11:13:02.669632",
"modified_by": "Administrator",
"module": "Accounts",
"name": "Allowed To Transact With",
@@ -28,5 +29,6 @@
"quick_entry": 1,
"sort_field": "modified",
"sort_order": "DESC",
"states": [],
"track_changes": 1
}

View File

@@ -6,4 +6,18 @@ from frappe.model.document import Document
class AllowedToTransactWith(Document):
# begin: auto-generated types
# This code is auto-generated. Do not modify anything in this block.
from typing import TYPE_CHECKING
if TYPE_CHECKING:
from frappe.types import DF
company: DF.Link
parent: DF.Data
parentfield: DF.Data
parenttype: DF.Data
# end: auto-generated types
pass

View File

@@ -7,4 +7,19 @@ from frappe.model.document import Document
class ApplicableOnAccount(Document):
# begin: auto-generated types
# This code is auto-generated. Do not modify anything in this block.
from typing import TYPE_CHECKING
if TYPE_CHECKING:
from frappe.types import DF
applicable_on_account: DF.Link
is_mandatory: DF.Check
parent: DF.Data
parentfield: DF.Data
parenttype: DF.Data
# end: auto-generated types
pass

View File

@@ -10,6 +10,25 @@ from frappe.model.document import Document
class Bank(Document):
# begin: auto-generated types
# This code is auto-generated. Do not modify anything in this block.
from typing import TYPE_CHECKING
if TYPE_CHECKING:
from frappe.types import DF
from erpnext.accounts.doctype.bank_transaction_mapping.bank_transaction_mapping import (
BankTransactionMapping,
)
bank_name: DF.Data
bank_transaction_mapping: DF.Table[BankTransactionMapping]
plaid_access_token: DF.Data | None
swift_number: DF.Data | None
website: DF.Data | None
# end: auto-generated types
def onload(self):
"""Load address and contacts in `__onload`"""
load_address_and_contact(self)

View File

@@ -12,6 +12,33 @@ from frappe.model.document import Document
class BankAccount(Document):
# begin: auto-generated types
# This code is auto-generated. Do not modify anything in this block.
from typing import TYPE_CHECKING
if TYPE_CHECKING:
from frappe.types import DF
account: DF.Link | None
account_name: DF.Data
account_subtype: DF.Link | None
account_type: DF.Link | None
bank: DF.Link
bank_account_no: DF.Data | None
branch_code: DF.Data | None
company: DF.Link | None
disabled: DF.Check
iban: DF.Data | None
integration_id: DF.Data | None
is_company_account: DF.Check
is_default: DF.Check
last_integration_date: DF.Date | None
mask: DF.Data | None
party: DF.DynamicLink | None
party_type: DF.Link | None
# end: auto-generated types
def onload(self):
"""Load address and contacts in `__onload`"""
load_address_and_contact(self)

View File

@@ -6,4 +6,15 @@ from frappe.model.document import Document
class BankAccountSubtype(Document):
# begin: auto-generated types
# This code is auto-generated. Do not modify anything in this block.
from typing import TYPE_CHECKING
if TYPE_CHECKING:
from frappe.types import DF
account_subtype: DF.Data | None
# end: auto-generated types
pass

View File

@@ -7,4 +7,15 @@ from frappe.model.document import Document
class BankAccountType(Document):
# begin: auto-generated types
# This code is auto-generated. Do not modify anything in this block.
from typing import TYPE_CHECKING
if TYPE_CHECKING:
from frappe.types import DF
account_type: DF.Data | None
# end: auto-generated types
pass

View File

@@ -13,6 +13,28 @@ form_grid_templates = {"journal_entries": "templates/form_grid/bank_reconciliati
class BankClearance(Document):
# begin: auto-generated types
# This code is auto-generated. Do not modify anything in this block.
from typing import TYPE_CHECKING
if TYPE_CHECKING:
from frappe.types import DF
from erpnext.accounts.doctype.bank_clearance_detail.bank_clearance_detail import (
BankClearanceDetail,
)
account: DF.Link
account_currency: DF.Link | None
bank_account: DF.Link | None
from_date: DF.Date
include_pos_transactions: DF.Check
include_reconciled_entries: DF.Check
payment_entries: DF.Table[BankClearanceDetail]
to_date: DF.Date
# end: auto-generated types
@frappe.whitelist()
def get_payment_entries(self):
if not (self.from_date and self.to_date):

View File

@@ -6,4 +6,25 @@ from frappe.model.document import Document
class BankClearanceDetail(Document):
# begin: auto-generated types
# This code is auto-generated. Do not modify anything in this block.
from typing import TYPE_CHECKING
if TYPE_CHECKING:
from frappe.types import DF
against_account: DF.Data | None
amount: DF.Data | None
cheque_date: DF.Date | None
cheque_number: DF.Data | None
clearance_date: DF.Date | None
parent: DF.Data
parentfield: DF.Data
parenttype: DF.Data
payment_document: DF.Link | None
payment_entry: DF.DynamicLink | None
posting_date: DF.Date | None
# end: auto-generated types
pass

View File

@@ -8,6 +8,40 @@ from frappe.model.document import Document
class BankGuarantee(Document):
# begin: auto-generated types
# This code is auto-generated. Do not modify anything in this block.
from typing import TYPE_CHECKING
if TYPE_CHECKING:
from frappe.types import DF
account: DF.Link | None
amended_from: DF.Link | None
amount: DF.Currency
bank: DF.Link | None
bank_account: DF.Link | None
bank_account_no: DF.Data | None
bank_guarantee_number: DF.Data | None
bg_type: DF.Literal["", "Receiving", "Providing"]
branch_code: DF.Data | None
charges: DF.Currency
customer: DF.Link | None
end_date: DF.Date | None
fixed_deposit_number: DF.Data | None
iban: DF.Data | None
margin_money: DF.Currency
more_information: DF.TextEditor | None
name_of_beneficiary: DF.Data | None
project: DF.Link | None
reference_docname: DF.DynamicLink | None
reference_doctype: DF.Link | None
start_date: DF.Date
supplier: DF.Link | None
swift_number: DF.Data | None
validity: DF.Int
# end: auto-generated types
def validate(self):
if not (self.customer or self.supplier):
frappe.throw(_("Select the customer or supplier."))

View File

@@ -137,7 +137,7 @@ frappe.ui.form.on("Bank Reconciliation Tool", {
"erpnext.accounts.doctype.bank_reconciliation_tool.bank_reconciliation_tool.get_account_balance",
args: {
bank_account: frm.doc.bank_account,
till_date: frm.doc.bank_statement_from_date,
till_date: frappe.datetime.add_days(frm.doc.bank_statement_from_date, -1)
},
callback: (response) => {
frm.set_value("account_opening_balance", response.message);

View File

@@ -18,9 +18,30 @@ from erpnext.accounts.report.bank_reconciliation_statement.bank_reconciliation_s
get_entries,
)
from erpnext.accounts.utils import get_account_currency, get_balance_on
from erpnext.setup.utils import get_exchange_rate
class BankReconciliationTool(Document):
# begin: auto-generated types
# This code is auto-generated. Do not modify anything in this block.
from typing import TYPE_CHECKING
if TYPE_CHECKING:
from frappe.types import DF
account_currency: DF.Link | None
account_opening_balance: DF.Currency
bank_account: DF.Link | None
bank_statement_closing_balance: DF.Currency
bank_statement_from_date: DF.Date | None
bank_statement_to_date: DF.Date | None
company: DF.Link | None
filter_by_reference_date: DF.Check
from_reference_date: DF.Date | None
to_reference_date: DF.Date | None
# end: auto-generated types
pass
@@ -130,7 +151,7 @@ def create_journal_entry_bts(
bank_transaction = frappe.db.get_values(
"Bank Transaction",
bank_transaction_name,
fieldname=["name", "deposit", "withdrawal", "bank_account"],
fieldname=["name", "deposit", "withdrawal", "bank_account", "currency"],
as_dict=True,
)[0]
company_account = frappe.get_value("Bank Account", bank_transaction.bank_account, "account")
@@ -144,29 +165,94 @@ def create_journal_entry_bts(
)
company = frappe.get_value("Account", company_account, "company")
company_default_currency = frappe.get_cached_value("Company", company, "default_currency")
company_account_currency = frappe.get_cached_value("Account", company_account, "account_currency")
second_account_currency = frappe.get_cached_value("Account", second_account, "account_currency")
# determine if multi-currency Journal or not
is_multi_currency = (
True
if company_default_currency != company_account_currency
or company_default_currency != second_account_currency
or company_default_currency != bank_transaction.currency
else False
)
accounts = []
# Multi Currency?
accounts.append(
{
"account": second_account,
"credit_in_account_currency": bank_transaction.deposit,
"debit_in_account_currency": bank_transaction.withdrawal,
"party_type": party_type,
"party": party,
"cost_center": get_default_cost_center(company),
}
)
second_account_dict = {
"account": second_account,
"account_currency": second_account_currency,
"credit_in_account_currency": bank_transaction.deposit,
"debit_in_account_currency": bank_transaction.withdrawal,
"party_type": party_type,
"party": party,
"cost_center": get_default_cost_center(company),
}
accounts.append(
{
"account": company_account,
"bank_account": bank_transaction.bank_account,
"credit_in_account_currency": bank_transaction.withdrawal,
"debit_in_account_currency": bank_transaction.deposit,
"cost_center": get_default_cost_center(company),
}
)
company_account_dict = {
"account": company_account,
"account_currency": company_account_currency,
"bank_account": bank_transaction.bank_account,
"credit_in_account_currency": bank_transaction.withdrawal,
"debit_in_account_currency": bank_transaction.deposit,
"cost_center": get_default_cost_center(company),
}
# convert transaction amount to company currency
if is_multi_currency:
exc_rate = get_exchange_rate(bank_transaction.currency, company_default_currency, posting_date)
withdrawal_in_company_currency = flt(exc_rate * abs(bank_transaction.withdrawal))
deposit_in_company_currency = flt(exc_rate * abs(bank_transaction.deposit))
else:
withdrawal_in_company_currency = bank_transaction.withdrawal
deposit_in_company_currency = bank_transaction.deposit
# if second account is of foreign currency, convert and set debit and credit fields.
if second_account_currency != company_default_currency:
exc_rate = get_exchange_rate(second_account_currency, company_default_currency, posting_date)
second_account_dict.update(
{
"exchange_rate": exc_rate,
"credit": deposit_in_company_currency,
"debit": withdrawal_in_company_currency,
"credit_in_account_currency": flt(deposit_in_company_currency / exc_rate) or 0,
"debit_in_account_currency": flt(withdrawal_in_company_currency / exc_rate) or 0,
}
)
else:
second_account_dict.update(
{
"exchange_rate": 1,
"credit": deposit_in_company_currency,
"debit": withdrawal_in_company_currency,
"credit_in_account_currency": deposit_in_company_currency,
"debit_in_account_currency": withdrawal_in_company_currency,
}
)
# if company account is of foreign currency, convert and set debit and credit fields.
if company_account_currency != company_default_currency:
exc_rate = get_exchange_rate(company_account_currency, company_default_currency, posting_date)
company_account_dict.update(
{
"exchange_rate": exc_rate,
"credit": withdrawal_in_company_currency,
"debit": deposit_in_company_currency,
}
)
else:
company_account_dict.update(
{
"exchange_rate": 1,
"credit": withdrawal_in_company_currency,
"debit": deposit_in_company_currency,
"credit_in_account_currency": withdrawal_in_company_currency,
"debit_in_account_currency": deposit_in_company_currency,
}
)
accounts.append(second_account_dict)
accounts.append(company_account_dict)
journal_entry_dict = {
"voucher_type": entry_type,
@@ -176,6 +262,9 @@ def create_journal_entry_bts(
"cheque_no": reference_number,
"mode_of_payment": mode_of_payment,
}
if is_multi_currency:
journal_entry_dict.update({"multi_currency": True})
journal_entry = frappe.new_doc("Journal Entry")
journal_entry.update(journal_entry_dict)
journal_entry.set("accounts", accounts)
@@ -355,7 +444,13 @@ def reconcile_vouchers(bank_transaction_name, vouchers):
vouchers = json.loads(vouchers)
transaction = frappe.get_doc("Bank Transaction", bank_transaction_name)
transaction.add_payment_entries(vouchers)
return frappe.get_doc("Bank Transaction", bank_transaction_name)
transaction.validate_duplicate_references()
transaction.allocate_payment_entries()
transaction.update_allocated_amount()
transaction.set_status()
transaction.save()
return transaction
@frappe.whitelist()

View File

@@ -2,6 +2,16 @@
// For license information, please see license.txt
frappe.ui.form.on("Bank Statement Import", {
onload(frm) {
frm.set_query("bank_account", function (doc) {
return {
filters: {
company: doc.company,
},
};
});
},
setup(frm) {
frappe.realtime.on("data_import_refresh", ({ data_import }) => {
frm.import_in_progress = false;

View File

@@ -20,6 +20,30 @@ INVALID_VALUES = ("", None)
class BankStatementImport(DataImport):
# begin: auto-generated types
# This code is auto-generated. Do not modify anything in this block.
from typing import TYPE_CHECKING
if TYPE_CHECKING:
from frappe.types import DF
bank: DF.Link | None
bank_account: DF.Link
company: DF.Link
google_sheets_url: DF.Data | None
import_file: DF.Attach | None
import_type: DF.Literal["", "Insert New Records", "Update Existing Records"]
mute_emails: DF.Check
reference_doctype: DF.Link
show_failed_logs: DF.Check
statement_import_log: DF.Code | None
status: DF.Literal["Pending", "Success", "Partial Success", "Error"]
submit_after_import: DF.Check
template_options: DF.Code | None
template_warnings: DF.Code | None
# end: auto-generated types
def __init__(self, *args, **kwargs):
super(BankStatementImport, self).__init__(*args, **kwargs)

View File

@@ -112,7 +112,8 @@ class AutoMatchbyPartyNameDescription:
for party in parties:
filters = {"status": "Active"} if party == "Employee" else {"disabled": 0}
names = frappe.get_all(party, filters=filters, pluck=party.lower() + "_name")
field = party.lower() + "_name"
names = frappe.get_all(party, filters=filters, fields=[f"{field} as party_name", "name"])
for field in ["bank_party_name", "description"]:
if not self.get(field):
@@ -131,7 +132,11 @@ class AutoMatchbyPartyNameDescription:
def fuzzy_search_and_return_result(self, party, names, field) -> Union[Tuple, None]:
skip = False
result = process.extract(query=self.get(field), choices=names, scorer=fuzz.token_set_ratio)
result = process.extract(
query=self.get(field),
choices={row.get("name"): row.get("party_name") for row in names},
scorer=fuzz.token_set_ratio,
)
party_name, skip = self.process_fuzzy_result(result)
if not party_name:
@@ -149,14 +154,14 @@ class AutoMatchbyPartyNameDescription:
Returns: Result, Skip (whether or not to discontinue matching)
"""
PARTY, SCORE, CUTOFF = 0, 1, 80
SCORE, PARTY_ID, CUTOFF = 1, 2, 80
if not result or not len(result):
return None, False
first_result = result[0]
if len(result) == 1:
return (first_result[PARTY] if first_result[SCORE] > CUTOFF else None), True
return (first_result[PARTY_ID] if first_result[SCORE] > CUTOFF else None), True
second_result = result[1]
if first_result[SCORE] > CUTOFF:
@@ -165,7 +170,7 @@ class AutoMatchbyPartyNameDescription:
if first_result[SCORE] == second_result[SCORE]:
return None, True
return first_result[PARTY], True
return first_result[PARTY_ID], True
else:
return None, False

View File

@@ -13,6 +13,7 @@
"status",
"bank_account",
"company",
"amended_from",
"section_break_4",
"deposit",
"withdrawal",
@@ -25,10 +26,10 @@
"transaction_id",
"transaction_type",
"section_break_14",
"column_break_oufv",
"payment_entries",
"section_break_18",
"allocated_amount",
"amended_from",
"column_break_17",
"unallocated_amount",
"party_section",
@@ -138,10 +139,12 @@
"fieldtype": "Section Break"
},
{
"allow_on_submit": 1,
"fieldname": "allocated_amount",
"fieldtype": "Currency",
"label": "Allocated Amount",
"options": "currency"
"options": "currency",
"read_only": 1
},
{
"fieldname": "amended_from",
@@ -157,10 +160,12 @@
"fieldtype": "Column Break"
},
{
"allow_on_submit": 1,
"fieldname": "unallocated_amount",
"fieldtype": "Currency",
"label": "Unallocated Amount",
"options": "currency"
"options": "currency",
"read_only": 1
},
{
"fieldname": "party_section",
@@ -225,11 +230,15 @@
"fieldname": "bank_party_account_number",
"fieldtype": "Data",
"label": "Party Account No. (Bank Statement)"
},
{
"fieldname": "column_break_oufv",
"fieldtype": "Column Break"
}
],
"is_submittable": 1,
"links": [],
"modified": "2023-06-06 13:58:12.821411",
"modified": "2023-11-18 18:32:47.203694",
"modified_by": "Administrator",
"module": "Accounts",
"name": "Bank Transaction",

View File

@@ -2,78 +2,117 @@
# For license information, please see license.txt
import frappe
from frappe import _
from frappe.model.document import Document
from frappe.utils import flt
from erpnext.controllers.status_updater import StatusUpdater
class BankTransaction(Document):
# begin: auto-generated types
# This code is auto-generated. Do not modify anything in this block.
class BankTransaction(StatusUpdater):
def after_insert(self):
self.unallocated_amount = abs(flt(self.withdrawal) - flt(self.deposit))
from typing import TYPE_CHECKING
def on_submit(self):
self.clear_linked_payment_entries()
if TYPE_CHECKING:
from frappe.types import DF
from erpnext.accounts.doctype.bank_transaction_payments.bank_transaction_payments import (
BankTransactionPayments,
)
allocated_amount: DF.Currency
amended_from: DF.Link | None
bank_account: DF.Link | None
bank_party_account_number: DF.Data | None
bank_party_iban: DF.Data | None
bank_party_name: DF.Data | None
company: DF.Link | None
currency: DF.Link | None
date: DF.Date | None
deposit: DF.Currency
description: DF.SmallText | None
naming_series: DF.Literal["ACC-BTN-.YYYY.-"]
party: DF.DynamicLink | None
party_type: DF.Link | None
payment_entries: DF.Table[BankTransactionPayments]
reference_number: DF.Data | None
status: DF.Literal["", "Pending", "Settled", "Unreconciled", "Reconciled", "Cancelled"]
transaction_id: DF.Data | None
transaction_type: DF.Data | None
unallocated_amount: DF.Currency
withdrawal: DF.Currency
# end: auto-generated types
def before_validate(self):
self.update_allocated_amount()
def validate(self):
self.validate_duplicate_references()
def set_status(self):
if self.docstatus == 2:
self.db_set("status", "Cancelled")
elif self.docstatus == 1:
if self.unallocated_amount > 0:
self.db_set("status", "Unreconciled")
elif self.unallocated_amount <= 0:
self.db_set("status", "Reconciled")
def validate_duplicate_references(self):
"""Make sure the same voucher is not allocated twice within the same Bank Transaction"""
if not self.payment_entries:
return
pe = []
for row in self.payment_entries:
reference = (row.payment_document, row.payment_entry)
if reference in pe:
frappe.throw(
_("{0} {1} is allocated twice in this Bank Transaction").format(
row.payment_document, row.payment_entry
)
)
pe.append(reference)
def update_allocated_amount(self):
self.allocated_amount = (
sum(p.allocated_amount for p in self.payment_entries) if self.payment_entries else 0.0
)
self.unallocated_amount = abs(flt(self.withdrawal) - flt(self.deposit)) - self.allocated_amount
def before_submit(self):
self.allocate_payment_entries()
self.set_status()
if frappe.db.get_single_value("Accounts Settings", "enable_party_matching"):
self.auto_set_party()
_saving_flag = False
# nosemgrep: frappe-semgrep-rules.rules.frappe-modifying-but-not-comitting
def on_update_after_submit(self):
"Run on save(). Avoid recursion caused by multiple saves"
if not self._saving_flag:
self._saving_flag = True
self.clear_linked_payment_entries()
self.update_allocations()
self._saving_flag = False
def before_update_after_submit(self):
self.validate_duplicate_references()
self.allocate_payment_entries()
self.update_allocated_amount()
self.set_status()
def on_cancel(self):
self.clear_linked_payment_entries(for_cancel=True)
self.set_status(update=True)
for payment_entry in self.payment_entries:
self.clear_linked_payment_entry(payment_entry, for_cancel=True)
def update_allocations(self):
"The doctype does not allow modifications after submission, so write to the db direct"
if self.payment_entries:
allocated_amount = sum(p.allocated_amount for p in self.payment_entries)
else:
allocated_amount = 0.0
amount = abs(flt(self.withdrawal) - flt(self.deposit))
self.db_set("allocated_amount", flt(allocated_amount))
self.db_set("unallocated_amount", amount - flt(allocated_amount))
self.reload()
self.set_status(update=True)
self.set_status()
def add_payment_entries(self, vouchers):
"Add the vouchers with zero allocation. Save() will perform the allocations and clearance"
if 0.0 >= self.unallocated_amount:
frappe.throw(frappe._("Bank Transaction {0} is already fully reconciled").format(self.name))
frappe.throw(_("Bank Transaction {0} is already fully reconciled").format(self.name))
added = False
for voucher in vouchers:
# Can't add same voucher twice
found = False
for pe in self.payment_entries:
if (
pe.payment_document == voucher["payment_doctype"]
and pe.payment_entry == voucher["payment_name"]
):
found = True
if not found:
pe = {
self.append(
"payment_entries",
{
"payment_document": voucher["payment_doctype"],
"payment_entry": voucher["payment_name"],
"allocated_amount": 0.0, # Temporary
}
child = self.append("payment_entries", pe)
added = True
# runs on_update_after_submit
if added:
self.save()
},
)
def allocate_payment_entries(self):
"""Refactored from bank reconciliation tool.
@@ -89,8 +128,8 @@ class BankTransaction(StatusUpdater):
- 0 > a: Error: already over-allocated
- clear means: set the latest transaction date as clearance date
"""
gl_bank_account = frappe.db.get_value("Bank Account", self.bank_account, "account")
remaining_amount = self.unallocated_amount
to_remove = []
for payment_entry in self.payment_entries:
if payment_entry.allocated_amount == 0.0:
unallocated_amount, should_clear, latest_transaction = get_clearance_details(
@@ -100,49 +139,39 @@ class BankTransaction(StatusUpdater):
if 0.0 == unallocated_amount:
if should_clear:
latest_transaction.clear_linked_payment_entry(payment_entry)
self.db_delete_payment_entry(payment_entry)
to_remove.append(payment_entry)
elif remaining_amount <= 0.0:
self.db_delete_payment_entry(payment_entry)
to_remove.append(payment_entry)
elif 0.0 < unallocated_amount and unallocated_amount <= remaining_amount:
payment_entry.db_set("allocated_amount", unallocated_amount)
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 and unallocated_amount > remaining_amount:
payment_entry.db_set("allocated_amount", remaining_amount)
elif 0.0 < unallocated_amount:
payment_entry.allocated_amount = remaining_amount
remaining_amount = 0.0
elif 0.0 > unallocated_amount:
self.db_delete_payment_entry(payment_entry)
frappe.throw(frappe._("Voucher {0} is over-allocated by {1}").format(unallocated_amount))
frappe.throw(_("Voucher {0} is over-allocated by {1}").format(unallocated_amount))
self.reload()
def db_delete_payment_entry(self, payment_entry):
frappe.db.delete("Bank Transaction Payments", {"name": payment_entry.name})
for payment_entry in to_remove:
self.remove(to_remove)
@frappe.whitelist()
def remove_payment_entries(self):
for payment_entry in self.payment_entries:
self.remove_payment_entry(payment_entry)
# runs on_update_after_submit
self.save()
self.save() # runs before_update_after_submit
def remove_payment_entry(self, payment_entry):
"Clear payment entry and clearance"
self.clear_linked_payment_entry(payment_entry, for_cancel=True)
self.remove(payment_entry)
def clear_linked_payment_entries(self, for_cancel=False):
if for_cancel:
for payment_entry in self.payment_entries:
self.clear_linked_payment_entry(payment_entry, for_cancel)
else:
self.allocate_payment_entries()
def clear_linked_payment_entry(self, payment_entry, for_cancel=False):
clearance_date = None if for_cancel else self.date
set_voucher_clearance(
@@ -163,11 +192,10 @@ class BankTransaction(StatusUpdater):
deposit=self.deposit,
).match()
if result:
party_type, party = result
frappe.db.set_value(
"Bank Transaction", self.name, field={"party_type": party_type, "party": party}
)
if not result:
return
self.party_type, self.party = result
@frappe.whitelist()
@@ -199,9 +227,7 @@ def get_clearance_details(transaction, payment_entry):
if gle["gl_account"] == gl_bank_account:
if gle["amount"] <= 0.0:
frappe.throw(
frappe._("Voucher {0} value is broken: {1}").format(
payment_entry.payment_entry, gle["amount"]
)
_("Voucher {0} value is broken: {1}").format(payment_entry.payment_entry, gle["amount"])
)
unmatched_gles -= 1
@@ -222,7 +248,7 @@ def get_clearance_details(transaction, payment_entry):
def get_related_bank_gl_entries(doctype, docname):
# nosemgrep: frappe-semgrep-rules.rules.frappe-using-db-sql
result = frappe.db.sql(
return frappe.db.sql(
"""
SELECT
ABS(gle.credit_in_account_currency - gle.debit_in_account_currency) AS amount,
@@ -240,7 +266,6 @@ def get_related_bank_gl_entries(doctype, docname):
dict(doctype=doctype, docname=docname),
as_dict=True,
)
return result
def get_total_allocated_amount(doctype, docname):
@@ -350,15 +375,17 @@ def set_voucher_clearance(doctype, docname, clearance_date, self):
and len(get_reconciled_bank_transactions(doctype, docname)) < 2
):
return
frappe.db.set_value(doctype, docname, "clearance_date", clearance_date)
elif doctype == "Sales Invoice":
frappe.db.set_value(
"Sales Invoice Payment",
dict(parenttype=doctype, parent=docname),
"clearance_date",
clearance_date,
)
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
@@ -366,6 +393,7 @@ def set_voucher_clearance(doctype, docname, clearance_date, self):
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:

View File

@@ -6,4 +6,19 @@ from frappe.model.document import Document
class BankTransactionMapping(Document):
# begin: auto-generated types
# This code is auto-generated. Do not modify anything in this block.
from typing import TYPE_CHECKING
if TYPE_CHECKING:
from frappe.types import DF
bank_transaction_field: DF.Literal
file_field: DF.Data
parent: DF.Data
parentfield: DF.Data
parenttype: DF.Data
# end: auto-generated types
pass

View File

@@ -6,4 +6,21 @@ from frappe.model.document import Document
class BankTransactionPayments(Document):
# begin: auto-generated types
# This code is auto-generated. Do not modify anything in this block.
from typing import TYPE_CHECKING
if TYPE_CHECKING:
from frappe.types import DF
allocated_amount: DF.Currency
clearance_date: DF.Date | None
parent: DF.Data
parentfield: DF.Data
parenttype: DF.Data
payment_document: DF.Link
payment_entry: DF.DynamicLink
# end: auto-generated types
pass

View File

@@ -0,0 +1,100 @@
// Copyright (c) 2023, Frappe Technologies Pvt. Ltd. and contributors
// For license information, please see license.txt
frappe.ui.form.on("Bisect Accounting Statements", {
onload(frm) {
frm.trigger("render_heatmap");
},
refresh(frm) {
frm.add_custom_button(__('Bisect Left'), () => {
frm.trigger("bisect_left");
});
frm.add_custom_button(__('Bisect Right'), () => {
frm.trigger("bisect_right");
});
frm.add_custom_button(__('Up'), () => {
frm.trigger("move_up");
});
frm.add_custom_button(__('Build Tree'), () => {
frm.trigger("build_tree");
});
},
render_heatmap(frm) {
let bisect_heatmap = frm.get_field("bisect_heatmap").$wrapper;
bisect_heatmap.addClass("bisect_heatmap_location");
// milliseconds in a day
let msiad=24*60*60*1000;
let datapoints = {};
let fr_dt = new Date(frm.doc.from_date).getTime();
let to_dt = new Date(frm.doc.to_date).getTime();
let bisect_start = new Date(frm.doc.current_from_date).getTime();
let bisect_end = new Date(frm.doc.current_to_date).getTime();
for(let x=fr_dt; x <= to_dt; x+=msiad){
let epoch_in_seconds = x/1000;
if ((bisect_start <= x) && (x <= bisect_end )) {
datapoints[epoch_in_seconds] = 1.0;
} else {
datapoints[epoch_in_seconds] = 0.0;
}
}
new frappe.Chart(".bisect_heatmap_location", {
type: "heatmap",
data: {
dataPoints: datapoints,
start: new Date(frm.doc.from_date),
end: new Date(frm.doc.to_date),
},
countLabel: 'Bisecting',
discreteDomains: 1,
});
},
bisect_left(frm) {
frm.call({
doc: frm.doc,
method: 'bisect_left',
freeze: true,
freeze_message: __("Bisecting Left ..."),
callback: (r) => {
frm.trigger("render_heatmap");
}
});
},
bisect_right(frm) {
frm.call({
doc: frm.doc,
freeze: true,
freeze_message: __("Bisecting Right ..."),
method: 'bisect_right',
callback: (r) => {
frm.trigger("render_heatmap");
}
});
},
move_up(frm) {
frm.call({
doc: frm.doc,
freeze: true,
freeze_message: __("Moving up in tree ..."),
method: 'move_up',
callback: (r) => {
frm.trigger("render_heatmap");
}
});
},
build_tree(frm) {
frm.call({
doc: frm.doc,
freeze: true,
freeze_message: __("Rebuilding BTree for period ..."),
method: 'build_tree',
callback: (r) => {
frm.trigger("render_heatmap");
}
});
},
});

View File

@@ -0,0 +1,194 @@
{
"actions": [],
"allow_rename": 1,
"creation": "2023-09-15 21:28:28.054773",
"default_view": "List",
"doctype": "DocType",
"editable_grid": 1,
"engine": "InnoDB",
"field_order": [
"section_break_cvfg",
"company",
"column_break_hcam",
"from_date",
"column_break_qxbi",
"to_date",
"column_break_iwny",
"algorithm",
"section_break_8ph9",
"current_node",
"section_break_ngid",
"bisect_heatmap",
"section_break_hmsy",
"bisecting_from",
"current_from_date",
"column_break_uqyd",
"bisecting_to",
"current_to_date",
"section_break_hbyo",
"heading_cppb",
"p_l_summary",
"column_break_aivo",
"balance_sheet_summary",
"b_s_summary",
"column_break_gvwx",
"difference_heading",
"difference"
],
"fields": [
{
"fieldname": "column_break_qxbi",
"fieldtype": "Column Break"
},
{
"fieldname": "from_date",
"fieldtype": "Datetime",
"label": "From Date"
},
{
"fieldname": "to_date",
"fieldtype": "Datetime",
"label": "To Date"
},
{
"default": "BFS",
"fieldname": "algorithm",
"fieldtype": "Select",
"label": "Algorithm",
"options": "BFS\nDFS"
},
{
"fieldname": "column_break_iwny",
"fieldtype": "Column Break"
},
{
"fieldname": "current_node",
"fieldtype": "Link",
"label": "Current Node",
"options": "Bisect Nodes"
},
{
"fieldname": "section_break_hmsy",
"fieldtype": "Section Break"
},
{
"fieldname": "current_from_date",
"fieldtype": "Datetime",
"read_only": 1
},
{
"fieldname": "current_to_date",
"fieldtype": "Datetime",
"read_only": 1
},
{
"fieldname": "column_break_uqyd",
"fieldtype": "Column Break"
},
{
"fieldname": "section_break_hbyo",
"fieldtype": "Section Break"
},
{
"fieldname": "p_l_summary",
"fieldtype": "Float",
"read_only": 1
},
{
"fieldname": "b_s_summary",
"fieldtype": "Float",
"read_only": 1
},
{
"fieldname": "difference",
"fieldtype": "Float",
"read_only": 1
},
{
"fieldname": "column_break_aivo",
"fieldtype": "Column Break"
},
{
"fieldname": "column_break_gvwx",
"fieldtype": "Column Break"
},
{
"fieldname": "company",
"fieldtype": "Link",
"label": "Company",
"options": "Company"
},
{
"fieldname": "column_break_hcam",
"fieldtype": "Column Break"
},
{
"fieldname": "section_break_ngid",
"fieldtype": "Section Break"
},
{
"fieldname": "section_break_8ph9",
"fieldtype": "Section Break",
"hidden": 1
},
{
"fieldname": "bisect_heatmap",
"fieldtype": "HTML",
"label": "Heatmap"
},
{
"fieldname": "heading_cppb",
"fieldtype": "Heading",
"label": "Profit and Loss Summary"
},
{
"fieldname": "balance_sheet_summary",
"fieldtype": "Heading",
"label": "Balance Sheet Summary"
},
{
"fieldname": "difference_heading",
"fieldtype": "Heading",
"label": "Difference"
},
{
"fieldname": "bisecting_from",
"fieldtype": "Heading",
"label": "Bisecting From"
},
{
"fieldname": "bisecting_to",
"fieldtype": "Heading",
"label": "Bisecting To"
},
{
"fieldname": "section_break_cvfg",
"fieldtype": "Section Break"
}
],
"hide_toolbar": 1,
"index_web_pages_for_search": 1,
"issingle": 1,
"links": [],
"modified": "2023-12-01 16:49:54.073890",
"modified_by": "Administrator",
"module": "Accounts",
"name": "Bisect Accounting Statements",
"owner": "Administrator",
"permissions": [
{
"create": 1,
"delete": 1,
"email": 1,
"print": 1,
"read": 1,
"role": "Administrator",
"share": 1,
"write": 1
}
],
"read_only": 1,
"sort_field": "modified",
"sort_order": "DESC",
"states": []
}

View File

@@ -0,0 +1,226 @@
# Copyright (c) 2023, Frappe Technologies Pvt. Ltd. and contributors
# For license information, please see license.txt
import datetime
from collections import deque
from math import floor
import frappe
from dateutil.relativedelta import relativedelta
from frappe import _
from frappe.model.document import Document
from frappe.utils import getdate
from frappe.utils.data import guess_date_format
class BisectAccountingStatements(Document):
# begin: auto-generated types
# This code is auto-generated. Do not modify anything in this block.
from typing import TYPE_CHECKING
if TYPE_CHECKING:
from frappe.types import DF
algorithm: DF.Literal["BFS", "DFS"]
b_s_summary: DF.Float
company: DF.Link | None
current_from_date: DF.Datetime | None
current_node: DF.Link | None
current_to_date: DF.Datetime | None
difference: DF.Float
from_date: DF.Datetime | None
p_l_summary: DF.Float
to_date: DF.Datetime | None
# end: auto-generated types
def validate(self):
self.validate_dates()
def validate_dates(self):
if getdate(self.from_date) > getdate(self.to_date):
frappe.throw(
_("From Date: {0} cannot be greater than To date: {1}").format(
frappe.bold(self.from_date), frappe.bold(self.to_date)
)
)
def bfs(self, from_date: datetime, to_date: datetime):
# Make Root node
node = frappe.new_doc("Bisect Nodes")
node.root = None
node.period_from_date = from_date
node.period_to_date = to_date
node.insert()
period_queue = deque([node])
while period_queue:
cur_node = period_queue.popleft()
delta = cur_node.period_to_date - cur_node.period_from_date
if delta.days == 0:
continue
else:
cur_floor = floor(delta.days / 2)
next_to_date = cur_node.period_from_date + relativedelta(days=+cur_floor)
left_node = frappe.new_doc("Bisect Nodes")
left_node.period_from_date = cur_node.period_from_date
left_node.period_to_date = next_to_date
left_node.root = cur_node.name
left_node.generated = False
left_node.insert()
cur_node.left_child = left_node.name
period_queue.append(left_node)
next_from_date = cur_node.period_from_date + relativedelta(days=+(cur_floor + 1))
right_node = frappe.new_doc("Bisect Nodes")
right_node.period_from_date = next_from_date
right_node.period_to_date = cur_node.period_to_date
right_node.root = cur_node.name
right_node.generated = False
right_node.insert()
cur_node.right_child = right_node.name
period_queue.append(right_node)
cur_node.save()
def dfs(self, from_date: datetime, to_date: datetime):
# Make Root node
node = frappe.new_doc("Bisect Nodes")
node.root = None
node.period_from_date = from_date
node.period_to_date = to_date
node.insert()
period_stack = [node]
while period_stack:
cur_node = period_stack.pop()
delta = cur_node.period_to_date - cur_node.period_from_date
if delta.days == 0:
continue
else:
cur_floor = floor(delta.days / 2)
next_to_date = cur_node.period_from_date + relativedelta(days=+cur_floor)
left_node = frappe.new_doc("Bisect Nodes")
left_node.period_from_date = cur_node.period_from_date
left_node.period_to_date = next_to_date
left_node.root = cur_node.name
left_node.generated = False
left_node.insert()
cur_node.left_child = left_node.name
period_stack.append(left_node)
next_from_date = cur_node.period_from_date + relativedelta(days=+(cur_floor + 1))
right_node = frappe.new_doc("Bisect Nodes")
right_node.period_from_date = next_from_date
right_node.period_to_date = cur_node.period_to_date
right_node.root = cur_node.name
right_node.generated = False
right_node.insert()
cur_node.right_child = right_node.name
period_stack.append(right_node)
cur_node.save()
@frappe.whitelist()
def build_tree(self):
frappe.db.delete("Bisect Nodes")
# Convert str to datetime format
dt_format = guess_date_format(self.from_date)
from_date = datetime.datetime.strptime(self.from_date, dt_format)
to_date = datetime.datetime.strptime(self.to_date, dt_format)
if self.algorithm == "BFS":
self.bfs(from_date, to_date)
if self.algorithm == "DFS":
self.dfs(from_date, to_date)
# set root as current node
root = frappe.db.get_all("Bisect Nodes", filters={"root": ["is", "not set"]})[0]
self.get_report_summary()
self.current_node = root.name
self.current_from_date = self.from_date
self.current_to_date = self.to_date
self.save()
def get_report_summary(self):
filters = {
"company": self.company,
"filter_based_on": "Date Range",
"period_start_date": self.current_from_date,
"period_end_date": self.current_to_date,
"periodicity": "Yearly",
}
pl_summary = frappe.get_doc("Report", "Profit and Loss Statement")
self.p_l_summary = pl_summary.execute_script_report(filters=filters)[5]
bs_summary = frappe.get_doc("Report", "Balance Sheet")
self.b_s_summary = bs_summary.execute_script_report(filters=filters)[5]
self.difference = abs(self.p_l_summary - self.b_s_summary)
def update_node(self):
current_node = frappe.get_doc("Bisect Nodes", self.current_node)
current_node.balance_sheet_summary = self.b_s_summary
current_node.profit_loss_summary = self.p_l_summary
current_node.difference = self.difference
current_node.generated = True
current_node.save()
def current_node_has_summary_info(self):
"Assertion method"
return frappe.db.get_value("Bisect Nodes", self.current_node, "generated")
def fetch_summary_info_from_current_node(self):
current_node = frappe.get_doc("Bisect Nodes", self.current_node)
self.p_l_summary = current_node.balance_sheet_summary
self.b_s_summary = current_node.profit_loss_summary
self.difference = abs(self.p_l_summary - self.b_s_summary)
def fetch_or_calculate(self):
if self.current_node_has_summary_info():
self.fetch_summary_info_from_current_node()
else:
self.get_report_summary()
self.update_node()
@frappe.whitelist()
def bisect_left(self):
if self.current_node is not None:
cur_node = frappe.get_doc("Bisect Nodes", self.current_node)
if cur_node.left_child is not None:
lft_node = frappe.get_doc("Bisect Nodes", cur_node.left_child)
self.current_node = cur_node.left_child
self.current_from_date = lft_node.period_from_date
self.current_to_date = lft_node.period_to_date
self.fetch_or_calculate()
self.save()
else:
frappe.msgprint(_("No more children on Left"))
@frappe.whitelist()
def bisect_right(self):
if self.current_node is not None:
cur_node = frappe.get_doc("Bisect Nodes", self.current_node)
if cur_node.right_child is not None:
rgt_node = frappe.get_doc("Bisect Nodes", cur_node.right_child)
self.current_node = cur_node.right_child
self.current_from_date = rgt_node.period_from_date
self.current_to_date = rgt_node.period_to_date
self.fetch_or_calculate()
self.save()
else:
frappe.msgprint(_("No more children on Right"))
@frappe.whitelist()
def move_up(self):
if self.current_node is not None:
cur_node = frappe.get_doc("Bisect Nodes", self.current_node)
if cur_node.root is not None:
root = frappe.get_doc("Bisect Nodes", cur_node.root)
self.current_node = cur_node.root
self.current_from_date = root.period_from_date
self.current_to_date = root.period_to_date
self.fetch_or_calculate()
self.save()
else:
frappe.msgprint(_("Reached Root"))

View File

@@ -0,0 +1,9 @@
# Copyright (c) 2023, Frappe Technologies Pvt. Ltd. and Contributors
# See license.txt
# import frappe
from frappe.tests.utils import FrappeTestCase
class TestBisectAccountingStatements(FrappeTestCase):
pass

View File

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

View File

@@ -0,0 +1,97 @@
{
"actions": [],
"autoname": "autoincrement",
"creation": "2023-09-27 14:56:38.112462",
"default_view": "List",
"doctype": "DocType",
"editable_grid": 1,
"engine": "InnoDB",
"field_order": [
"root",
"left_child",
"right_child",
"period_from_date",
"period_to_date",
"difference",
"balance_sheet_summary",
"profit_loss_summary",
"generated"
],
"fields": [
{
"fieldname": "root",
"fieldtype": "Link",
"label": "Root",
"options": "Bisect Nodes"
},
{
"fieldname": "left_child",
"fieldtype": "Link",
"label": "Left Child",
"options": "Bisect Nodes"
},
{
"fieldname": "right_child",
"fieldtype": "Link",
"label": "Right Child",
"options": "Bisect Nodes"
},
{
"fieldname": "period_from_date",
"fieldtype": "Datetime",
"label": "Period_from_date"
},
{
"fieldname": "period_to_date",
"fieldtype": "Datetime",
"label": "Period To Date"
},
{
"fieldname": "difference",
"fieldtype": "Float",
"label": "Difference"
},
{
"fieldname": "balance_sheet_summary",
"fieldtype": "Float",
"label": "Balance Sheet Summary"
},
{
"fieldname": "profit_loss_summary",
"fieldtype": "Float",
"label": "Profit and Loss Summary"
},
{
"default": "0",
"fieldname": "generated",
"fieldtype": "Check",
"label": "Generated"
}
],
"index_web_pages_for_search": 1,
"links": [],
"modified": "2023-12-01 17:46:12.437996",
"modified_by": "Administrator",
"module": "Accounts",
"name": "Bisect Nodes",
"naming_rule": "Autoincrement",
"owner": "Administrator",
"permissions": [
{
"create": 1,
"delete": 1,
"email": 1,
"export": 1,
"print": 1,
"read": 1,
"report": 1,
"role": "Administrator",
"share": 1,
"write": 1
}
],
"read_only": 1,
"sort_field": "modified",
"sort_order": "DESC",
"states": []
}

View File

@@ -0,0 +1,29 @@
# Copyright (c) 2023, Frappe Technologies Pvt. Ltd. and contributors
# For license information, please see license.txt
# import frappe
from frappe.model.document import Document
class BisectNodes(Document):
# begin: auto-generated types
# This code is auto-generated. Do not modify anything in this block.
from typing import TYPE_CHECKING
if TYPE_CHECKING:
from frappe.types import DF
balance_sheet_summary: DF.Float
difference: DF.Float
generated: DF.Check
left_child: DF.Link | None
name: DF.Int | None
period_from_date: DF.Datetime | None
period_to_date: DF.Datetime | None
profit_loss_summary: DF.Float
right_child: DF.Link | None
root: DF.Link | None
# end: auto-generated types
pass

View File

@@ -0,0 +1,9 @@
# Copyright (c) 2023, Frappe Technologies Pvt. Ltd. and Contributors
# See license.txt
# import frappe
from frappe.tests.utils import FrappeTestCase
class TestBisectNodes(FrappeTestCase):
pass

View File

@@ -22,6 +22,36 @@ class DuplicateBudgetError(frappe.ValidationError):
class Budget(Document):
# begin: auto-generated types
# This code is auto-generated. Do not modify anything in this block.
from typing import TYPE_CHECKING
if TYPE_CHECKING:
from frappe.types import DF
from erpnext.accounts.doctype.budget_account.budget_account import BudgetAccount
accounts: DF.Table[BudgetAccount]
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_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"]
amended_from: DF.Link | None
applicable_on_booking_actual_expenses: DF.Check
applicable_on_material_request: DF.Check
applicable_on_purchase_order: DF.Check
budget_against: DF.Literal["", "Cost Center", "Project"]
company: DF.Link
cost_center: DF.Link | None
fiscal_year: DF.Link
monthly_distribution: DF.Link | None
naming_series: DF.Data | None
project: DF.Link | None
# end: auto-generated types
def validate(self):
if not self.get(frappe.scrub(self.budget_against)):
frappe.throw(_("{0} is mandatory").format(self.budget_against))

View File

@@ -6,4 +6,19 @@ from frappe.model.document import Document
class BudgetAccount(Document):
# begin: auto-generated types
# This code is auto-generated. Do not modify anything in this block.
from typing import TYPE_CHECKING
if TYPE_CHECKING:
from frappe.types import DF
account: DF.Link
budget_amount: DF.Currency
parent: DF.Data
parentfield: DF.Data
parenttype: DF.Data
# end: auto-generated types
pass

View File

@@ -6,4 +6,18 @@ from frappe.model.document import Document
class CampaignItem(Document):
# begin: auto-generated types
# This code is auto-generated. Do not modify anything in this block.
from typing import TYPE_CHECKING
if TYPE_CHECKING:
from frappe.types import DF
campaign: DF.Link | None
parent: DF.Data
parentfield: DF.Data
parenttype: DF.Data
# end: auto-generated types
pass

View File

@@ -1,457 +1,152 @@
{
"allow_copy": 0,
"allow_events_in_timeline": 0,
"allow_guest_to_view": 0,
"allow_import": 0,
"allow_rename": 0,
"actions": [],
"autoname": "naming_series:",
"beta": 0,
"creation": "2018-06-18 16:51:49.994750",
"custom": 0,
"docstatus": 0,
"doctype": "DocType",
"document_type": "",
"editable_grid": 1,
"engine": "InnoDB",
"field_order": [
"naming_series",
"user",
"date",
"from_time",
"time",
"expense",
"custody",
"returns",
"outstanding_amount",
"payments",
"net_amount",
"amended_from"
],
"fields": [
{
"allow_bulk_edit": 0,
"allow_in_quick_entry": 0,
"allow_on_submit": 0,
"bold": 0,
"collapsible": 0,
"columns": 0,
"default": "POS-CLO-",
"fieldname": "naming_series",
"fieldtype": "Select",
"hidden": 0,
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 1,
"in_global_search": 1,
"in_list_view": 0,
"in_standard_filter": 1,
"label": "Series",
"length": 0,
"no_copy": 0,
"options": "POS-CLO-",
"permlevel": 0,
"precision": "",
"print_hide": 0,
"print_hide_if_no_value": 0,
"read_only": 1,
"remember_last_selected_value": 0,
"report_hide": 0,
"reqd": 0,
"search_index": 0,
"set_only_once": 0,
"translatable": 0,
"unique": 0
"read_only": 1
},
{
"allow_bulk_edit": 0,
"allow_in_quick_entry": 0,
"allow_on_submit": 0,
"bold": 0,
"collapsible": 0,
"columns": 0,
"fieldname": "user",
"fieldtype": "Link",
"hidden": 0,
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 1,
"in_global_search": 0,
"in_list_view": 1,
"in_standard_filter": 1,
"label": "User",
"length": 0,
"no_copy": 0,
"options": "User",
"permlevel": 0,
"precision": "",
"print_hide": 0,
"print_hide_if_no_value": 0,
"read_only": 1,
"remember_last_selected_value": 0,
"report_hide": 0,
"reqd": 1,
"search_index": 0,
"set_only_once": 0,
"translatable": 0,
"unique": 0
"reqd": 1
},
{
"allow_bulk_edit": 0,
"allow_in_quick_entry": 0,
"allow_on_submit": 0,
"bold": 0,
"collapsible": 0,
"columns": 0,
"default": "Today",
"fieldname": "date",
"fieldtype": "Date",
"hidden": 0,
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 1,
"in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 1,
"label": "Date",
"length": 0,
"no_copy": 0,
"permlevel": 0,
"precision": "",
"print_hide": 0,
"print_hide_if_no_value": 0,
"read_only": 1,
"remember_last_selected_value": 0,
"report_hide": 0,
"reqd": 0,
"search_index": 0,
"set_only_once": 0,
"translatable": 0,
"unique": 0
"read_only": 1
},
{
"allow_bulk_edit": 0,
"allow_in_quick_entry": 0,
"allow_on_submit": 0,
"bold": 0,
"collapsible": 0,
"columns": 0,
"fieldname": "from_time",
"fieldtype": "Time",
"hidden": 0,
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 1,
"in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 1,
"label": "From Time",
"length": 0,
"no_copy": 0,
"permlevel": 0,
"precision": "",
"print_hide": 0,
"print_hide_if_no_value": 0,
"read_only": 0,
"remember_last_selected_value": 0,
"report_hide": 0,
"reqd": 1,
"search_index": 0,
"set_only_once": 0,
"translatable": 0,
"unique": 0
"reqd": 1
},
{
"allow_bulk_edit": 0,
"allow_in_quick_entry": 0,
"allow_on_submit": 0,
"bold": 0,
"collapsible": 0,
"columns": 0,
"default": "",
"fieldname": "time",
"fieldtype": "Time",
"hidden": 0,
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 1,
"in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 1,
"label": "To Time",
"length": 0,
"no_copy": 0,
"permlevel": 0,
"precision": "",
"print_hide": 0,
"print_hide_if_no_value": 0,
"read_only": 0,
"remember_last_selected_value": 0,
"report_hide": 0,
"reqd": 1,
"search_index": 0,
"set_only_once": 0,
"translatable": 0,
"unique": 0
"reqd": 1
},
{
"allow_bulk_edit": 0,
"allow_in_quick_entry": 0,
"allow_on_submit": 0,
"bold": 0,
"collapsible": 0,
"columns": 0,
"default": "0.00",
"fieldname": "expense",
"fieldtype": "Float",
"hidden": 0,
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 1,
"in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"label": "Expense",
"length": 0,
"no_copy": 0,
"permlevel": 0,
"precision": "",
"print_hide": 0,
"print_hide_if_no_value": 0,
"read_only": 0,
"remember_last_selected_value": 0,
"report_hide": 0,
"reqd": 0,
"search_index": 0,
"set_only_once": 0,
"translatable": 0,
"unique": 0
"label": "Expense"
},
{
"allow_bulk_edit": 0,
"allow_in_quick_entry": 0,
"allow_on_submit": 0,
"bold": 0,
"collapsible": 0,
"columns": 0,
"default": "0.00",
"fieldname": "custody",
"fieldtype": "Float",
"hidden": 0,
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 1,
"in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"label": "Custody",
"length": 0,
"no_copy": 0,
"permlevel": 0,
"precision": "",
"print_hide": 0,
"print_hide_if_no_value": 0,
"read_only": 0,
"remember_last_selected_value": 0,
"report_hide": 0,
"reqd": 0,
"search_index": 0,
"set_only_once": 0,
"translatable": 0,
"unique": 0
"label": "Custody"
},
{
"allow_bulk_edit": 0,
"allow_in_quick_entry": 0,
"allow_on_submit": 0,
"bold": 0,
"collapsible": 0,
"columns": 0,
"default": "0.00",
"fieldname": "returns",
"fieldtype": "Float",
"hidden": 0,
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 1,
"in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"label": "Returns",
"length": 0,
"no_copy": 0,
"permlevel": 0,
"precision": "2",
"print_hide": 0,
"print_hide_if_no_value": 0,
"read_only": 0,
"remember_last_selected_value": 0,
"report_hide": 0,
"reqd": 0,
"search_index": 0,
"set_only_once": 0,
"unique": 0
"precision": "2"
},
{
"allow_bulk_edit": 0,
"allow_on_submit": 0,
"bold": 0,
"collapsible": 0,
"columns": 0,
"default": "0.00",
"fieldname": "outstanding_amount",
"fieldtype": "Float",
"hidden": 0,
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
"in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"label": "Outstanding Amount",
"length": 0,
"no_copy": 0,
"permlevel": 0,
"precision": "",
"print_hide": 0,
"print_hide_if_no_value": 0,
"read_only": 1,
"remember_last_selected_value": 0,
"report_hide": 0,
"reqd": 0,
"search_index": 0,
"set_only_once": 0,
"translatable": 0,
"unique": 0
"read_only": 1
},
{
"allow_bulk_edit": 0,
"allow_in_quick_entry": 0,
"allow_on_submit": 0,
"bold": 0,
"collapsible": 0,
"columns": 0,
"default": "0.0",
"fieldname": "payments",
"fieldtype": "Table",
"hidden": 0,
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 1,
"in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"label": "Payments",
"length": 0,
"no_copy": 0,
"options": "Cashier Closing Payments",
"permlevel": 0,
"precision": "",
"print_hide": 0,
"print_hide_if_no_value": 0,
"read_only": 0,
"remember_last_selected_value": 0,
"report_hide": 0,
"reqd": 0,
"search_index": 0,
"set_only_once": 0,
"translatable": 0,
"unique": 0
"options": "Cashier Closing Payments"
},
{
"allow_bulk_edit": 0,
"allow_in_quick_entry": 0,
"allow_on_submit": 0,
"bold": 0,
"collapsible": 0,
"columns": 0,
"fieldname": "net_amount",
"fieldtype": "Float",
"hidden": 0,
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 1,
"in_global_search": 0,
"in_list_view": 1,
"in_standard_filter": 1,
"label": "Net Amount",
"length": 0,
"no_copy": 0,
"permlevel": 0,
"precision": "",
"print_hide": 0,
"print_hide_if_no_value": 0,
"read_only": 1,
"remember_last_selected_value": 0,
"report_hide": 0,
"reqd": 0,
"search_index": 0,
"set_only_once": 0,
"translatable": 0,
"unique": 0
"read_only": 1
},
{
"allow_bulk_edit": 0,
"allow_in_quick_entry": 0,
"allow_on_submit": 0,
"bold": 0,
"collapsible": 0,
"columns": 0,
"fieldname": "amended_from",
"fieldtype": "Link",
"hidden": 0,
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
"in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"label": "Amended From",
"length": 0,
"no_copy": 1,
"options": "Cashier Closing",
"permlevel": 0,
"print_hide": 1,
"print_hide_if_no_value": 0,
"read_only": 1,
"remember_last_selected_value": 0,
"report_hide": 0,
"reqd": 0,
"search_index": 0,
"set_only_once": 0,
"translatable": 0,
"unique": 0
"read_only": 1
}
],
"has_web_view": 0,
"hide_heading": 0,
"hide_toolbar": 0,
"idx": 0,
"image_view": 0,
"in_create": 0,
"is_submittable": 1,
"issingle": 0,
"istable": 0,
"max_attachments": 0,
"modified": "2019-02-19 08:35:24.157327",
"links": [],
"modified": "2023-12-28 13:15:46.858427",
"modified_by": "Administrator",
"module": "Accounts",
"name": "Cashier Closing",
"name_case": "",
"naming_rule": "By \"Naming Series\" field",
"owner": "Administrator",
"permissions": [
{
"amend": 0,
"cancel": 0,
"create": 1,
"delete": 1,
"email": 1,
"export": 1,
"if_owner": 0,
"import": 0,
"permlevel": 0,
"print": 1,
"read": 1,
"report": 1,
"role": "System Manager",
"set_user_permissions": 0,
"share": 1,
"submit": 1,
"write": 1
}
],
"quick_entry": 0,
"read_only": 0,
"read_only_onload": 0,
"show_name_in_global_search": 0,
"sort_field": "modified",
"sort_order": "DESC",
"track_changes": 1,
"track_seen": 0,
"track_views": 0
}
"states": [],
"track_changes": 1
}

View File

@@ -9,6 +9,32 @@ from frappe.utils import flt
class CashierClosing(Document):
# begin: auto-generated types
# This code is auto-generated. Do not modify anything in this block.
from typing import TYPE_CHECKING
if TYPE_CHECKING:
from frappe.types import DF
from erpnext.accounts.doctype.cashier_closing_payments.cashier_closing_payments import (
CashierClosingPayments,
)
amended_from: DF.Link | None
custody: DF.Float
date: DF.Date | None
expense: DF.Float
from_time: DF.Time
naming_series: DF.Literal["POS-CLO-"]
net_amount: DF.Float
outstanding_amount: DF.Float
payments: DF.Table[CashierClosingPayments]
returns: DF.Float
time: DF.Time
user: DF.Link
# end: auto-generated types
def validate(self):
self.validate_time()

View File

@@ -6,4 +6,19 @@ from frappe.model.document import Document
class CashierClosingPayments(Document):
# begin: auto-generated types
# This code is auto-generated. Do not modify anything in this block.
from typing import TYPE_CHECKING
if TYPE_CHECKING:
from frappe.types import DF
amount: DF.Float
mode_of_payment: DF.Link
parent: DF.Data
parentfield: DF.Data
parenttype: DF.Data
# end: auto-generated types
pass

View File

@@ -53,10 +53,18 @@ frappe.ui.form.on('Chart of Accounts Importer', {
of Accounts. Please enter the account names and add more rows as per your requirement.`);
}
}
}
},
{
label : "Company",
fieldname: "company",
fieldtype: "Link",
reqd: 1,
hidden: 1,
default: frm.doc.company,
},
],
primary_action: function() {
var data = d.get_values();
let data = d.get_values();
if (!data.template_type) {
frappe.throw(__('Please select <b>Template Type</b> to download template'));
@@ -66,7 +74,8 @@ frappe.ui.form.on('Chart of Accounts Importer', {
'/api/method/erpnext.accounts.doctype.chart_of_accounts_importer.chart_of_accounts_importer.download_template',
{
file_type: data.file_type,
template_type: data.template_type
template_type: data.template_type,
company: data.company
}
);

View File

@@ -8,6 +8,7 @@ from functools import reduce
import frappe
from frappe import _
from frappe.desk.form.linked_with import get_linked_fields
from frappe.model.document import Document
from frappe.utils import cint, cstr
from frappe.utils.csvutils import UnicodeWriter
@@ -23,6 +24,18 @@ from erpnext.accounts.doctype.account.chart_of_accounts.chart_of_accounts import
class ChartofAccountsImporter(Document):
# begin: auto-generated types
# This code is auto-generated. Do not modify anything in this block.
from typing import TYPE_CHECKING
if TYPE_CHECKING:
from frappe.types import DF
company: DF.Link | None
import_file: DF.Attach | None
# end: auto-generated types
def validate(self):
if self.import_file:
get_coa(
@@ -112,7 +125,7 @@ def generate_data_from_csv(file_doc, as_dict=False):
if as_dict:
data.append({frappe.scrub(header): row[index] for index, header in enumerate(headers)})
else:
if not row[1]:
if not row[1] and len(row) > 1:
row[1] = row[0]
row[3] = row[2]
data.append(row)
@@ -294,10 +307,8 @@ def build_response_as_excel(writer):
@frappe.whitelist()
def download_template(file_type, template_type):
data = frappe._dict(frappe.local.form_dict)
writer = get_template(template_type)
def download_template(file_type, template_type, company):
writer = get_template(template_type, company)
if file_type == "CSV":
# download csv file
@@ -308,8 +319,7 @@ def download_template(file_type, template_type):
build_response_as_excel(writer)
def get_template(template_type):
def get_template(template_type, company):
fields = [
"Account Name",
"Parent Account",
@@ -335,34 +345,17 @@ def get_template(template_type):
["", "", "", "", 0, account_type.get("account_type"), account_type.get("root_type")]
)
else:
writer = get_sample_template(writer)
writer = get_sample_template(writer, company)
return writer
def get_sample_template(writer):
template = [
["Application Of Funds(Assets)", "", "", "", 1, "", "Asset"],
["Sources Of Funds(Liabilities)", "", "", "", 1, "", "Liability"],
["Equity", "", "", "", 1, "", "Equity"],
["Expenses", "", "", "", 1, "", "Expense"],
["Income", "", "", "", 1, "", "Income"],
["Bank Accounts", "Application Of Funds(Assets)", "", "", 1, "Bank", "Asset"],
["Cash In Hand", "Application Of Funds(Assets)", "", "", 1, "Cash", "Asset"],
["Stock Assets", "Application Of Funds(Assets)", "", "", 1, "Stock", "Asset"],
["Cost Of Goods Sold", "Expenses", "", "", 0, "Cost of Goods Sold", "Expense"],
["Asset Depreciation", "Expenses", "", "", 0, "Depreciation", "Expense"],
["Fixed Assets", "Application Of Funds(Assets)", "", "", 0, "Fixed Asset", "Asset"],
["Accounts Payable", "Sources Of Funds(Liabilities)", "", "", 0, "Payable", "Liability"],
["Accounts Receivable", "Application Of Funds(Assets)", "", "", 1, "Receivable", "Asset"],
["Stock Expenses", "Expenses", "", "", 0, "Stock Adjustment", "Expense"],
["Sample Bank", "Bank Accounts", "", "", 0, "Bank", "Asset"],
["Cash", "Cash In Hand", "", "", 0, "Cash", "Asset"],
["Stores", "Stock Assets", "", "", 0, "Stock", "Asset"],
]
for row in template:
writer.writerow(row)
def get_sample_template(writer, company):
currency = frappe.db.get_value("Company", company, "default_currency")
with open(os.path.join(os.path.dirname(__file__), "coa_sample_template.csv"), "r") as f:
for row in f:
row = row.strip().split(",") + [currency]
writer.writerow(row)
return writer
@@ -453,14 +446,11 @@ def get_mandatory_account_types():
def unset_existing_data(company):
linked = frappe.db.sql(
'''select fieldname from tabDocField
where fieldtype="Link" and options="Account" and parent="Company"''',
as_dict=True,
)
# remove accounts data from company
update_values = {d.fieldname: "" for d in linked}
fieldnames = get_linked_fields("Account").get("Company", {}).get("fieldname", [])
linked = [{"fieldname": name} for name in fieldnames]
update_values = {d.get("fieldname"): "" for d in linked}
frappe.db.set_value("Company", company, update_values, update_values)
# remove accounts data from various doctypes

View File

@@ -0,0 +1,17 @@
Application Of Funds(Assets),,,,1,,Asset
Sources Of Funds(Liabilities),,,,1,,Liability
Equity,,,,1,,Equity
Expenses,,,,1,Expense Account,Expense
Income,,,,1,Income Account,Income
Bank Accounts,Application Of Funds(Assets),,,1,Bank,Asset
Cash In Hand,Application Of Funds(Assets),,,1,Cash,Asset
Stock Assets,Application Of Funds(Assets),,,1,Stock,Asset
Cost Of Goods Sold,Expenses,,,0,Cost of Goods Sold,Expense
Asset Depreciation,Expenses,,,0,Depreciation,Expense
Fixed Assets,Application Of Funds(Assets),,,0,Fixed Asset,Asset
Accounts Payable,Sources Of Funds(Liabilities),,,0,Payable,Liability
Accounts Receivable,Application Of Funds(Assets),,,1,Receivable,Asset
Stock Expenses,Expenses,,,0,Stock Adjustment,Expense
Sample Bank,Bank Accounts,,,0,Bank,Asset
Cash,Cash In Hand,,,0,Cash,Asset
Stores,Stock Assets,,,0,Stock,Asset
1 Application Of Funds(Assets) 1 Asset
2 Sources Of Funds(Liabilities) 1 Liability
3 Equity 1 Equity
4 Expenses 1 Expense Account Expense
5 Income 1 Income Account Income
6 Bank Accounts Application Of Funds(Assets) 1 Bank Asset
7 Cash In Hand Application Of Funds(Assets) 1 Cash Asset
8 Stock Assets Application Of Funds(Assets) 1 Stock Asset
9 Cost Of Goods Sold Expenses 0 Cost of Goods Sold Expense
10 Asset Depreciation Expenses 0 Depreciation Expense
11 Fixed Assets Application Of Funds(Assets) 0 Fixed Asset Asset
12 Accounts Payable Sources Of Funds(Liabilities) 0 Payable Liability
13 Accounts Receivable Application Of Funds(Assets) 1 Receivable Asset
14 Stock Expenses Expenses 0 Stock Adjustment Expense
15 Sample Bank Bank Accounts 0 Bank Asset
16 Cash Cash In Hand 0 Cash Asset
17 Stores Stock Assets 0 Stock Asset

View File

@@ -8,6 +8,41 @@ from frappe.model.document import Document
class ChequePrintTemplate(Document):
# begin: auto-generated types
# This code is auto-generated. Do not modify anything in this block.
from typing import TYPE_CHECKING
if TYPE_CHECKING:
from frappe.types import DF
acc_no_dist_from_left_edge: DF.Float
acc_no_dist_from_top_edge: DF.Float
acc_pay_dist_from_left_edge: DF.Float
acc_pay_dist_from_top_edge: DF.Float
amt_in_figures_from_left_edge: DF.Float
amt_in_figures_from_top_edge: DF.Float
amt_in_word_width: DF.Float
amt_in_words_from_left_edge: DF.Float
amt_in_words_from_top_edge: DF.Float
amt_in_words_line_spacing: DF.Float
bank_name: DF.Data
cheque_height: DF.Float
cheque_size: DF.Literal["", "Regular", "A4"]
cheque_width: DF.Float
date_dist_from_left_edge: DF.Float
date_dist_from_top_edge: DF.Float
has_print_format: DF.Check
is_account_payable: DF.Check
message_to_show: DF.Data | None
payer_name_from_left_edge: DF.Float
payer_name_from_top_edge: DF.Float
scanned_cheque: DF.Attach | None
signatory_from_left_edge: DF.Float
signatory_from_top_edge: DF.Float
starting_position_from_top_edge: DF.Float
# end: auto-generated types
pass

View File

@@ -6,4 +6,19 @@ from frappe.model.document import Document
class ClosedDocument(Document):
# begin: auto-generated types
# This code is auto-generated. Do not modify anything in this block.
from typing import TYPE_CHECKING
if TYPE_CHECKING:
from frappe.types import DF
closed: DF.Check
document_type: DF.Link
parent: DF.Data
parentfield: DF.Data
parenttype: DF.Data
# end: auto-generated types
pass

View File

@@ -10,6 +10,25 @@ from erpnext.accounts.utils import validate_field_number
class CostCenter(NestedSet):
# begin: auto-generated types
# This code is auto-generated. Do not modify anything in this block.
from typing import TYPE_CHECKING
if TYPE_CHECKING:
from frappe.types import DF
company: DF.Link
cost_center_name: DF.Data
cost_center_number: DF.Data | None
disabled: DF.Check
is_group: DF.Check
lft: DF.Int
old_parent: DF.Link | None
parent_cost_center: DF.Link
rgt: DF.Int
# end: auto-generated types
nsm_parent_field = "parent_cost_center"
def autoname(self):

View File

@@ -28,6 +28,25 @@ class InvalidDateError(frappe.ValidationError):
class CostCenterAllocation(Document):
# begin: auto-generated types
# This code is auto-generated. Do not modify anything in this block.
from typing import TYPE_CHECKING
if TYPE_CHECKING:
from frappe.types import DF
from erpnext.accounts.doctype.cost_center_allocation_percentage.cost_center_allocation_percentage import (
CostCenterAllocationPercentage,
)
allocation_percentages: DF.Table[CostCenterAllocationPercentage]
amended_from: DF.Link | None
company: DF.Link
main_cost_center: DF.Link
valid_from: DF.Date
# end: auto-generated types
def __init__(self, *args, **kwargs):
super(CostCenterAllocation, self).__init__(*args, **kwargs)
self._skip_from_date_validation = False

View File

@@ -6,4 +6,19 @@ from frappe.model.document import Document
class CostCenterAllocationPercentage(Document):
# begin: auto-generated types
# This code is auto-generated. Do not modify anything in this block.
from typing import TYPE_CHECKING
if TYPE_CHECKING:
from frappe.types import DF
cost_center: DF.Link
parent: DF.Data
parentfield: DF.Data
parenttype: DF.Data
percentage: DF.Percent
# end: auto-generated types
pass

View File

@@ -9,6 +9,27 @@ from frappe.utils import strip
class CouponCode(Document):
# begin: auto-generated types
# This code is auto-generated. Do not modify anything in this block.
from typing import TYPE_CHECKING
if TYPE_CHECKING:
from frappe.types import DF
amended_from: DF.Link | None
coupon_code: DF.Data | None
coupon_name: DF.Data
coupon_type: DF.Literal["Promotional", "Gift Card"]
customer: DF.Link | None
description: DF.TextEditor | None
maximum_use: DF.Int
pricing_rule: DF.Link
used: DF.Int
valid_from: DF.Date | None
valid_upto: DF.Date | None
# end: auto-generated types
def autoname(self):
self.coupon_name = strip(self.coupon_name)
self.name = self.coupon_name

View File

@@ -9,6 +9,30 @@ from frappe.utils import nowdate
class CurrencyExchangeSettings(Document):
# begin: auto-generated types
# This code is auto-generated. Do not modify anything in this block.
from typing import TYPE_CHECKING
if TYPE_CHECKING:
from frappe.types import DF
from erpnext.accounts.doctype.currency_exchange_settings_details.currency_exchange_settings_details import (
CurrencyExchangeSettingsDetails,
)
from erpnext.accounts.doctype.currency_exchange_settings_result.currency_exchange_settings_result import (
CurrencyExchangeSettingsResult,
)
access_key: DF.Data | None
api_endpoint: DF.Data
disabled: DF.Check
req_params: DF.Table[CurrencyExchangeSettingsDetails]
result_key: DF.Table[CurrencyExchangeSettingsResult]
service_provider: DF.Literal["frankfurter.app", "exchangerate.host", "Custom"]
url: DF.Data | None
# end: auto-generated types
def validate(self):
self.set_parameters_and_result()
if frappe.flags.in_test or frappe.flags.in_install or frappe.flags.in_setup_wizard:

View File

@@ -6,4 +6,19 @@ from frappe.model.document import Document
class CurrencyExchangeSettingsDetails(Document):
# begin: auto-generated types
# This code is auto-generated. Do not modify anything in this block.
from typing import TYPE_CHECKING
if TYPE_CHECKING:
from frappe.types import DF
key: DF.Data
parent: DF.Data
parentfield: DF.Data
parenttype: DF.Data
value: DF.Data
# end: auto-generated types
pass

View File

@@ -6,4 +6,18 @@ from frappe.model.document import Document
class CurrencyExchangeSettingsResult(Document):
# begin: auto-generated types
# This code is auto-generated. Do not modify anything in this block.
from typing import TYPE_CHECKING
if TYPE_CHECKING:
from frappe.types import DF
key: DF.Data
parent: DF.Data
parentfield: DF.Data
parenttype: DF.Data
# end: auto-generated types
pass

View File

@@ -6,4 +6,18 @@ from frappe.model.document import Document
class CustomerGroupItem(Document):
# begin: auto-generated types
# This code is auto-generated. Do not modify anything in this block.
from typing import TYPE_CHECKING
if TYPE_CHECKING:
from frappe.types import DF
customer_group: DF.Link | None
parent: DF.Data
parentfield: DF.Data
parenttype: DF.Data
# end: auto-generated types
pass

View File

@@ -6,4 +6,18 @@ from frappe.model.document import Document
class CustomerItem(Document):
# begin: auto-generated types
# This code is auto-generated. Do not modify anything in this block.
from typing import TYPE_CHECKING
if TYPE_CHECKING:
from frappe.types import DF
customer: DF.Link | None
parent: DF.Data
parentfield: DF.Data
parenttype: DF.Data
# end: auto-generated types
pass

View File

@@ -7,4 +7,22 @@ from frappe.model.document import Document
class DiscountedInvoice(Document):
# begin: auto-generated types
# This code is auto-generated. Do not modify anything in this block.
from typing import TYPE_CHECKING
if TYPE_CHECKING:
from frappe.types import DF
customer: DF.Link | None
debit_to: DF.Link | None
outstanding_amount: DF.Currency
parent: DF.Data
parentfield: DF.Data
parenttype: DF.Data
posting_date: DF.Date | None
sales_invoice: DF.Link
# end: auto-generated types
pass

View File

@@ -22,6 +22,52 @@ from erpnext.controllers.accounts_controller import AccountsController
class Dunning(AccountsController):
# begin: auto-generated types
# This code is auto-generated. Do not modify anything in this block.
from typing import TYPE_CHECKING
if TYPE_CHECKING:
from frappe.types import DF
from erpnext.accounts.doctype.overdue_payment.overdue_payment import OverduePayment
address_display: DF.SmallText | None
amended_from: DF.Link | None
base_dunning_amount: DF.Currency
body_text: DF.TextEditor | None
closing_text: DF.TextEditor | None
company: DF.Link
company_address: DF.Link | None
company_address_display: DF.SmallText | None
contact_display: DF.SmallText | None
contact_email: DF.Data | None
contact_mobile: DF.SmallText | None
contact_person: DF.Link | None
conversion_rate: DF.Float
cost_center: DF.Link | None
currency: DF.Link | None
customer: DF.Link
customer_address: DF.Link | None
customer_name: DF.Data | None
dunning_amount: DF.Currency
dunning_fee: DF.Currency
dunning_type: DF.Link | None
grand_total: DF.Currency
income_account: DF.Link | None
language: DF.Link | None
letter_head: DF.Link | None
naming_series: DF.Literal["DUNN-.MM.-.YY.-"]
overdue_payments: DF.Table[OverduePayment]
posting_date: DF.Date
posting_time: DF.Time | None
rate_of_interest: DF.Float
spacer: DF.Data | None
status: DF.Literal["Draft", "Resolved", "Unresolved", "Cancelled"]
total_interest: DF.Currency
total_outstanding: DF.Currency
# end: auto-generated types
def validate(self):
self.validate_same_currency()
self.validate_overdue_payments()

View File

@@ -7,4 +7,21 @@ from frappe.model.document import Document
class DunningLetterText(Document):
# begin: auto-generated types
# This code is auto-generated. Do not modify anything in this block.
from typing import TYPE_CHECKING
if TYPE_CHECKING:
from frappe.types import DF
body_text: DF.TextEditor | None
closing_text: DF.TextEditor | None
is_default_language: DF.Check
language: DF.Link | None
parent: DF.Data
parentfield: DF.Data
parenttype: DF.Data
# end: auto-generated types
pass

View File

@@ -7,6 +7,26 @@ from frappe.model.document import Document
class DunningType(Document):
# begin: auto-generated types
# This code is auto-generated. Do not modify anything in this block.
from typing import TYPE_CHECKING
if TYPE_CHECKING:
from frappe.types import DF
from erpnext.accounts.doctype.dunning_letter_text.dunning_letter_text import DunningLetterText
company: DF.Link
cost_center: DF.Link | None
dunning_fee: DF.Currency
dunning_letter_text: DF.Table[DunningLetterText]
dunning_type: DF.Data
income_account: DF.Link | None
is_default: DF.Check
rate_of_interest: DF.Float
# end: auto-generated types
def autoname(self):
company_abbr = frappe.get_value("Company", self.company, "abbr")
self.name = f"{self.dunning_type} - {company_abbr}"

View File

@@ -17,12 +17,34 @@ from erpnext.setup.utils import get_exchange_rate
class ExchangeRateRevaluation(Document):
# begin: auto-generated types
# This code is auto-generated. Do not modify anything in this block.
from typing import TYPE_CHECKING
if TYPE_CHECKING:
from frappe.types import DF
from erpnext.accounts.doctype.exchange_rate_revaluation_account.exchange_rate_revaluation_account import (
ExchangeRateRevaluationAccount,
)
accounts: DF.Table[ExchangeRateRevaluationAccount]
amended_from: DF.Link | None
company: DF.Link
gain_loss_booked: DF.Currency
gain_loss_unbooked: DF.Currency
posting_date: DF.Date
rounding_loss_allowance: DF.Float
total_gain_loss: DF.Currency
# end: auto-generated types
def validate(self):
self.validate_rounding_loss_allowance()
self.set_total_gain_loss()
def validate_rounding_loss_allowance(self):
if not (self.rounding_loss_allowance >= 0 and self.rounding_loss_allowance < 1):
if self.rounding_loss_allowance < 0 or self.rounding_loss_allowance >= 1:
frappe.throw(_("Rounding Loss Allowance should be between 0 and 1"))
def set_total_gain_loss(self):
@@ -192,7 +214,7 @@ class ExchangeRateRevaluation(Document):
# round off balance based on currency precision
# and consider debit-credit difference allowance
currency_precision = get_currency_precision()
rounding_loss_allowance = float(rounding_loss_allowance) or 0.05
rounding_loss_allowance = float(rounding_loss_allowance)
for acc in account_details:
acc.balance_in_account_currency = flt(acc.balance_in_account_currency, currency_precision)
if abs(acc.balance_in_account_currency) <= rounding_loss_allowance:

View File

@@ -6,4 +6,29 @@ from frappe.model.document import Document
class ExchangeRateRevaluationAccount(Document):
# begin: auto-generated types
# This code is auto-generated. Do not modify anything in this block.
from typing import TYPE_CHECKING
if TYPE_CHECKING:
from frappe.types import DF
account: DF.Link
account_currency: DF.Link | None
balance_in_account_currency: DF.Currency
balance_in_base_currency: DF.Currency
current_exchange_rate: DF.Float
gain_loss: DF.Currency
new_balance_in_account_currency: DF.Currency
new_balance_in_base_currency: DF.Currency
new_exchange_rate: DF.Float
parent: DF.Data
parentfield: DF.Data
parenttype: DF.Data
party: DF.DynamicLink | None
party_type: DF.Link | None
zero_balance: DF.Check
# end: auto-generated types
pass

View File

@@ -6,4 +6,15 @@ from frappe.model.document import Document
class FinanceBook(Document):
# begin: auto-generated types
# This code is auto-generated. Do not modify anything in this block.
from typing import TYPE_CHECKING
if TYPE_CHECKING:
from frappe.types import DF
finance_book_name: DF.Data | None
# end: auto-generated types
pass

View File

@@ -10,6 +10,25 @@ from frappe.utils import add_days, add_years, cstr, getdate
class FiscalYear(Document):
# begin: auto-generated types
# This code is auto-generated. Do not modify anything in this block.
from typing import TYPE_CHECKING
if TYPE_CHECKING:
from frappe.types import DF
from erpnext.accounts.doctype.fiscal_year_company.fiscal_year_company import FiscalYearCompany
auto_created: DF.Check
companies: DF.Table[FiscalYearCompany]
disabled: DF.Check
is_short_year: DF.Check
year: DF.Data
year_end_date: DF.Date
year_start_date: DF.Date
# end: auto-generated types
def validate(self):
self.validate_dates()
self.validate_overlap()

View File

@@ -6,4 +6,18 @@ from frappe.model.document import Document
class FiscalYearCompany(Document):
# begin: auto-generated types
# This code is auto-generated. Do not modify anything in this block.
from typing import TYPE_CHECKING
if TYPE_CHECKING:
from frappe.types import DF
company: DF.Link | None
parent: DF.Data
parentfield: DF.Data
parenttype: DF.Data
# end: auto-generated types
pass

View File

@@ -17,10 +17,13 @@
"account_currency",
"debit_in_account_currency",
"credit_in_account_currency",
"against_type",
"against",
"against_link",
"against_voucher_type",
"against_voucher",
"voucher_type",
"voucher_subtype",
"voucher_no",
"voucher_detail_no",
"project",
@@ -128,6 +131,13 @@
"label": "Credit Amount in Account Currency",
"options": "account_currency"
},
{
"fieldname": "against_type",
"fieldtype": "Link",
"in_filter": 1,
"label": "Against Type",
"options": "DocType"
},
{
"fieldname": "against",
"fieldtype": "Text",
@@ -136,14 +146,20 @@
"oldfieldname": "against",
"oldfieldtype": "Text"
},
{
"fieldname": "against_link",
"fieldtype": "Dynamic Link",
"in_filter": 1,
"label": "Against",
"options": "against_type"
},
{
"fieldname": "against_voucher_type",
"fieldtype": "Link",
"label": "Against Voucher Type",
"oldfieldname": "against_voucher_type",
"oldfieldtype": "Data",
"options": "DocType",
"search_index": 1
"options": "DocType"
},
{
"fieldname": "against_voucher",
@@ -162,8 +178,7 @@
"label": "Voucher Type",
"oldfieldname": "voucher_type",
"oldfieldtype": "Select",
"options": "DocType",
"search_index": 1
"options": "DocType"
},
{
"fieldname": "voucher_no",
@@ -280,13 +295,18 @@
"fieldtype": "Currency",
"label": "Credit Amount in Transaction Currency",
"options": "transaction_currency"
},
{
"fieldname": "voucher_subtype",
"fieldtype": "Small Text",
"label": "Voucher Subtype"
}
],
"icon": "fa fa-list",
"idx": 1,
"in_create": 1,
"links": [],
"modified": "2023-08-16 21:38:44.072267",
"modified": "2023-12-18 15:38:14.006208",
"modified_by": "Administrator",
"module": "Accounts",
"name": "GL Entry",
@@ -321,4 +341,4 @@
"sort_field": "modified",
"sort_order": "DESC",
"states": []
}
}

View File

@@ -28,6 +28,50 @@ exclude_from_linked_with = True
class GLEntry(Document):
# begin: auto-generated types
# This code is auto-generated. Do not modify anything in this block.
from typing import TYPE_CHECKING
if TYPE_CHECKING:
from frappe.types import DF
account: DF.Link | None
account_currency: DF.Link | None
against: DF.Text | None
against_link: DF.DynamicLink | None
against_type: DF.Link | None
against_voucher: DF.DynamicLink | None
against_voucher_type: DF.Link | None
company: DF.Link | None
cost_center: DF.Link | None
credit: DF.Currency
credit_in_account_currency: DF.Currency
credit_in_transaction_currency: DF.Currency
debit: DF.Currency
debit_in_account_currency: DF.Currency
debit_in_transaction_currency: DF.Currency
due_date: DF.Date | None
finance_book: DF.Link | None
fiscal_year: DF.Link | None
is_advance: DF.Literal["No", "Yes"]
is_cancelled: DF.Check
is_opening: DF.Literal["No", "Yes"]
party: DF.DynamicLink | None
party_type: DF.Link | None
posting_date: DF.Date | None
project: DF.Link | None
remarks: DF.Text | None
to_rename: DF.Check
transaction_currency: DF.Link | None
transaction_date: DF.Date | None
transaction_exchange_rate: DF.Float
voucher_detail_no: DF.Data | None
voucher_no: DF.DynamicLink | None
voucher_subtype: DF.SmallText | None
voucher_type: DF.Link | None
# end: auto-generated types
def autoname(self):
"""
Temporarily name doc for fast insertion
@@ -391,8 +435,8 @@ def update_outstanding_amt(
def validate_frozen_account(account, adv_adj=None):
frozen_account = frappe.get_cached_value("Account", account, "freeze_account")
if frozen_account == "Yes" and not adv_adj:
frozen_accounts_modifier = frappe.db.get_value(
"Accounts Settings", None, "frozen_accounts_modifier"
frozen_accounts_modifier = frappe.db.get_single_value(
"Accounts Settings", "frozen_accounts_modifier"
)
if not frozen_accounts_modifier:

View File

@@ -17,6 +17,34 @@ from erpnext.controllers.accounts_controller import AccountsController
class InvoiceDiscounting(AccountsController):
# begin: auto-generated types
# This code is auto-generated. Do not modify anything in this block.
from typing import TYPE_CHECKING
if TYPE_CHECKING:
from frappe.types import DF
from erpnext.accounts.doctype.discounted_invoice.discounted_invoice import DiscountedInvoice
accounts_receivable_credit: DF.Link
accounts_receivable_discounted: DF.Link
accounts_receivable_unpaid: DF.Link
amended_from: DF.Link | None
bank_account: DF.Link
bank_charges: DF.Currency
bank_charges_account: DF.Link
company: DF.Link
invoices: DF.Table[DiscountedInvoice]
loan_end_date: DF.Date | None
loan_period: DF.Int
loan_start_date: DF.Date | None
posting_date: DF.Date
short_term_loan: DF.Link
status: DF.Literal["Draft", "Sanctioned", "Disbursed", "Settled", "Cancelled"]
total_amount: DF.Currency
# end: auto-generated types
def validate(self):
self.validate_mandatory()
self.validate_invoices()
@@ -125,7 +153,9 @@ class InvoiceDiscounting(AccountsController):
"account": inv.debit_to,
"party_type": "Customer",
"party": d.customer,
"against_type": "Account",
"against": self.accounts_receivable_credit,
"against_link": self.accounts_receivable_credit,
"credit": outstanding_in_company_currency,
"credit_in_account_currency": outstanding_in_company_currency
if inv.party_account_currency == company_currency
@@ -145,7 +175,9 @@ class InvoiceDiscounting(AccountsController):
"account": self.accounts_receivable_credit,
"party_type": "Customer",
"party": d.customer,
"against_type": "Account",
"against": inv.debit_to,
"against_link": inv.debit_to,
"debit": outstanding_in_company_currency,
"debit_in_account_currency": outstanding_in_company_currency
if ar_credit_account_currency == company_currency

View File

@@ -8,6 +8,24 @@ from frappe.model.document import Document
class ItemTaxTemplate(Document):
# begin: auto-generated types
# This code is auto-generated. Do not modify anything in this block.
from typing import TYPE_CHECKING
if TYPE_CHECKING:
from frappe.types import DF
from erpnext.accounts.doctype.item_tax_template_detail.item_tax_template_detail import (
ItemTaxTemplateDetail,
)
company: DF.Link
disabled: DF.Check
taxes: DF.Table[ItemTaxTemplateDetail]
title: DF.Data
# end: auto-generated types
def validate(self):
self.validate_tax_accounts()

View File

@@ -6,4 +6,19 @@ from frappe.model.document import Document
class ItemTaxTemplateDetail(Document):
# begin: auto-generated types
# This code is auto-generated. Do not modify anything in this block.
from typing import TYPE_CHECKING
if TYPE_CHECKING:
from frappe.types import DF
parent: DF.Data
parentfield: DF.Data
parenttype: DF.Data
tax_rate: DF.Float
tax_type: DF.Link
# end: auto-generated types
pass

View File

@@ -8,7 +8,7 @@ frappe.provide("erpnext.journal_entry");
frappe.ui.form.on("Journal Entry", {
setup: function(frm) {
frm.add_fetch("bank_account", "account", "account");
frm.ignore_doctypes_on_cancel_all = ['Sales Invoice', 'Purchase Invoice', 'Journal Entry', "Repost Payment Ledger", 'Asset', 'Asset Movement', 'Asset Depreciation Schedule', "Repost Accounting Ledger"];
frm.ignore_doctypes_on_cancel_all = ['Sales Invoice', 'Purchase Invoice', 'Journal Entry', "Repost Payment Ledger", 'Asset', 'Asset Movement', 'Asset Depreciation Schedule', "Repost Accounting Ledger", "Unreconcile Payment", "Unreconcile Payment Entries"];
},
refresh: function(frm) {
@@ -51,7 +51,7 @@ frappe.ui.form.on("Journal Entry", {
}, __('Make'));
}
erpnext.accounts.unreconcile_payments.add_unreconcile_btn(frm);
erpnext.accounts.unreconcile_payment.add_unreconcile_btn(frm);
},
before_save: function(frm) {
if ((frm.doc.docstatus == 0) && (!frm.doc.is_system_generated)) {
@@ -220,6 +220,16 @@ erpnext.accounts.JournalEntry = class JournalEntry extends frappe.ui.form.Contro
return erpnext.journal_entry.account_query(me.frm);
});
me.frm.set_query("against_account_link", "accounts", function(doc, cdt, cdn) {
return erpnext.journal_entry.against_account_query(me.frm);
});
me.frm.set_query("against_type", "accounts", function(){
return {
query: "erpnext.accounts.doctype.journal_entry.journal_entry.get_against_type",
}
})
me.frm.set_query("party_type", "accounts", function(doc, cdt, cdn) {
const row = locals[cdt][cdn];
@@ -591,6 +601,21 @@ $.extend(erpnext.journal_entry, {
return { filters: filters };
},
against_account_query: function(frm) {
if (frm.doc.against_type != "Account"){
return { filters: {} };
}
else {
let filters = { company: frm.doc.company, is_group: 0 };
if(!frm.doc.multi_currency) {
$.extend(filters, {
account_currency: ['in', [frappe.get_doc(":Company", frm.doc.company).default_currency, null]]
});
}
return { filters: filters };
}
},
reverse_journal_entry: function() {
frappe.model.open_mapped_doc({
method: "erpnext.accounts.doctype.journal_entry.journal_entry.make_reverse_journal_entry",

View File

@@ -548,8 +548,16 @@
"icon": "fa fa-file-text",
"idx": 176,
"is_submittable": 1,
"links": [],
"modified": "2023-08-10 14:32:22.366895",
"links": [
{
"is_child_table": 1,
"link_doctype": "Bank Transaction Payments",
"link_fieldname": "payment_entry",
"parent_doctype": "Bank Transaction",
"table_fieldname": "payment_entries"
}
],
"modified": "2023-11-23 12:11:04.128015",
"modified_by": "Administrator",
"module": "Accounts",
"name": "Journal Entry",

View File

@@ -35,6 +35,78 @@ class StockAccountInvalidTransaction(frappe.ValidationError):
class JournalEntry(AccountsController):
# begin: auto-generated types
# This code is auto-generated. Do not modify anything in this block.
from typing import TYPE_CHECKING
if TYPE_CHECKING:
from frappe.types import DF
from erpnext.accounts.doctype.journal_entry_account.journal_entry_account import (
JournalEntryAccount,
)
accounts: DF.Table[JournalEntryAccount]
amended_from: DF.Link | None
apply_tds: DF.Check
auto_repeat: DF.Link | None
bill_date: DF.Date | None
bill_no: DF.Data | None
cheque_date: DF.Date | None
cheque_no: DF.Data | None
clearance_date: DF.Date | None
company: DF.Link
difference: DF.Currency
due_date: DF.Date | None
finance_book: DF.Link | None
from_template: DF.Link | None
inter_company_journal_entry_reference: DF.Link | None
is_opening: DF.Literal["No", "Yes"]
is_system_generated: DF.Check
letter_head: DF.Link | None
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
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_entry: DF.Link | None
tax_withholding_category: DF.Link | None
title: DF.Data | None
total_amount: DF.Currency
total_amount_currency: DF.Link | None
total_amount_in_words: DF.Data | None
total_credit: DF.Currency
total_debit: DF.Currency
user_remark: DF.SmallText | None
voucher_type: DF.Literal[
"Journal Entry",
"Inter Company Journal Entry",
"Bank Entry",
"Cash Entry",
"Credit Card Entry",
"Debit Note",
"Credit Note",
"Contra Entry",
"Excise Entry",
"Write Off Entry",
"Opening Entry",
"Depreciation Entry",
"Exchange Rate Revaluation",
"Exchange Gain Or Loss",
"Deferred Revenue",
"Deferred Expense",
]
write_off_amount: DF.Currency
write_off_based_on: DF.Literal["Accounts Receivable", "Accounts Payable"]
# end: auto-generated types
def __init__(self, *args, **kwargs):
super(JournalEntry, self).__init__(*args, **kwargs)
@@ -98,6 +170,8 @@ class JournalEntry(AccountsController):
"Repost Payment Ledger Items",
"Repost Accounting Ledger",
"Repost Accounting Ledger Items",
"Unreconcile Payment",
"Unreconcile Payment Entries",
)
self.make_gl_entries(1)
self.update_advance_paid()
@@ -230,6 +304,7 @@ class JournalEntry(AccountsController):
"account": tax_withholding_details.get("account_head"),
rev_debit_or_credit: tax_withholding_details.get("tax_amount"),
"against_account": parties[0],
"against_account_link": parties[0],
},
)
@@ -508,7 +583,7 @@ class JournalEntry(AccountsController):
).format(d.reference_name, d.account)
)
else:
dr_or_cr = "debit" if d.credit > 0 else "credit"
dr_or_cr = "debit" if flt(d.credit) > 0 else "credit"
valid = False
for jvd in against_entries:
if flt(jvd[dr_or_cr]) > 0:
@@ -557,7 +632,7 @@ class JournalEntry(AccountsController):
)
# set totals
if not d.reference_name in self.reference_totals:
if d.reference_name not in self.reference_totals:
self.reference_totals[d.reference_name] = 0.0
if self.voucher_type not in ("Deferred Revenue", "Deferred Expense"):
@@ -676,27 +751,90 @@ class JournalEntry(AccountsController):
)
def set_against_account(self):
accounts_debited, accounts_credited = [], []
if self.voucher_type in ("Deferred Revenue", "Deferred Expense"):
for d in self.get("accounts"):
if d.reference_type == "Sales Invoice":
field = "customer"
against_type = "Customer"
else:
field = "supplier"
against_type = "Supplier"
d.against_account = frappe.db.get_value(d.reference_type, d.reference_name, field)
against_account = frappe.db.get_value(d.reference_type, d.reference_name, against_type.lower())
d.against_type = against_type
d.against_account_link = against_account
else:
for d in self.get("accounts"):
if flt(d.debit) > 0:
accounts_debited.append(d.party or d.account)
if flt(d.credit) > 0:
accounts_credited.append(d.party or d.account)
self.get_debited_credited_accounts()
if len(self.accounts_credited) > 1 and len(self.accounts_debited) > 1:
self.auto_set_against_accounts()
return
self.get_against_accounts()
for d in self.get("accounts"):
if flt(d.debit) > 0:
d.against_account = ", ".join(list(set(accounts_credited)))
if flt(d.credit) > 0:
d.against_account = ", ".join(list(set(accounts_debited)))
def auto_set_against_accounts(self):
for i in range(0, len(self.accounts), 2):
acc = self.accounts[i]
against_acc = self.accounts[i + 1]
if acc.debit_in_account_currency > 0:
current_val = acc.debit_in_account_currency * flt(acc.exchange_rate)
against_val = against_acc.credit_in_account_currency * flt(against_acc.exchange_rate)
else:
current_val = acc.credit_in_account_currency * flt(acc.exchange_rate)
against_val = against_acc.debit_in_account_currency * flt(against_acc.exchange_rate)
if current_val == against_val:
acc.against_type = against_acc.party_type or "Account"
against_acc.against_type = acc.party_type or "Account"
acc.against_account_link = against_acc.party or against_acc.account
against_acc.against_account_link = acc.party or acc.account
else:
frappe.msgprint(
_(
"Unable to automatically determine {0} accounts. Set them up in the {1} table if needed."
).format(frappe.bold("against"), frappe.bold("Accounting Entries")),
alert=True,
)
break
def get_against_accounts(self):
self.against_accounts = []
self.split_account = {}
self.get_debited_credited_accounts()
if self.separate_against_account_entries:
no_of_credited_acc, no_of_debited_acc = len(self.accounts_credited), len(self.accounts_debited)
if no_of_credited_acc <= 1 and no_of_debited_acc <= 1:
self.set_against_accounts_for_single_dr_cr()
self.separate_against_account_entries = 0
elif no_of_credited_acc == 1:
self.against_accounts = self.accounts_debited
self.split_account = self.accounts_credited[0]
elif no_of_debited_acc == 1:
self.against_accounts = self.accounts_credited
self.split_account = self.accounts_debited[0]
def get_debited_credited_accounts(self):
self.accounts_debited, self.accounts_credited = [], []
self.separate_against_account_entries = 1
for d in self.get("accounts"):
if flt(d.debit) > 0:
self.accounts_debited.append(d)
elif flt(d.credit) > 0:
self.accounts_credited.append(d)
if d.against_account_link:
self.separate_against_account_entries = 0
break
def set_against_accounts_for_single_dr_cr(self):
against_account = None
for d in self.accounts:
if flt(d.debit) > 0:
against_account = self.accounts_credited[0]
elif flt(d.credit) > 0:
against_account = self.accounts_debited[0]
if against_account:
d.against_type = against_account.party_type or "Account"
d.against_account = against_account.party or against_account.account
d.against_account_link = against_account.party or against_account.account
def validate_debit_credit_amount(self):
if not (self.voucher_type == "Exchange Gain Or Loss" and self.multi_currency):
@@ -868,7 +1006,7 @@ class JournalEntry(AccountsController):
party_account_currency = d.account_currency
elif frappe.get_cached_value("Account", d.account, "account_type") in ["Bank", "Cash"]:
bank_amount += d.debit_in_account_currency or d.credit_in_account_currency
bank_amount += flt(d.debit_in_account_currency) or flt(d.credit_in_account_currency)
bank_account_currency = d.account_currency
if party_type and pay_to_recd_from:
@@ -893,42 +1031,108 @@ class JournalEntry(AccountsController):
def build_gl_map(self):
gl_map = []
conversion_rate_map = self.get_conversion_rate_map()
transaction_currency_map = self.get_transaction_currency_map()
company_currency = erpnext.get_company_currency(self.company)
self.get_against_accounts()
for d in self.get("accounts"):
if d.debit or d.credit or (self.voucher_type == "Exchange Gain Or Loss"):
r = [d.user_remark, self.remark]
r = [x for x in r if x]
remarks = "\n".join(r)
gl_map.append(
self.get_gl_dict(
{
"account": d.account,
"party_type": d.party_type,
"due_date": self.due_date,
"party": d.party,
"against": d.against_account,
"debit": flt(d.debit, d.precision("debit")),
"credit": flt(d.credit, d.precision("credit")),
"account_currency": d.account_currency,
"debit_in_account_currency": flt(
d.debit_in_account_currency, d.precision("debit_in_account_currency")
),
"credit_in_account_currency": flt(
d.credit_in_account_currency, d.precision("credit_in_account_currency")
),
"against_voucher_type": d.reference_type,
"against_voucher": d.reference_name,
"remarks": remarks,
"voucher_detail_no": d.reference_detail_no,
"cost_center": d.cost_center,
"project": d.project,
"finance_book": self.finance_book,
},
item=d,
)
gl_dict = self.get_gl_dict(
{
"account": d.account,
"party_type": d.party_type,
"due_date": self.due_date,
"party": d.party,
"debit": flt(d.debit, d.precision("debit")),
"credit": flt(d.credit, d.precision("credit")),
"account_currency": d.account_currency,
"debit_in_account_currency": flt(
d.debit_in_account_currency, d.precision("debit_in_account_currency")
),
"credit_in_account_currency": flt(
d.credit_in_account_currency, d.precision("credit_in_account_currency")
),
"against_voucher_type": d.reference_type,
"against_voucher": d.reference_name,
"remarks": remarks,
"voucher_detail_no": d.reference_detail_no,
"cost_center": d.cost_center,
"project": d.project,
"finance_book": self.finance_book,
"conversion_rate": conversion_rate_map.get(d.against_account_link, 1)
if d.account_currency == company_currency
else 1,
"currency": transaction_currency_map.get(d.against_account_link, d.account_currency)
if d.account_currency == company_currency
else d.account_currency,
},
item=d,
)
if not self.separate_against_account_entries:
gl_dict.update(
{
"against_type": d.against_type,
"against_link": d.against_account_link,
}
)
gl_map.append(gl_dict)
elif d in self.against_accounts:
gl_dict.update(
{
"against_type": self.split_account.get("party_type") or "Account",
"against": self.split_account.get("party") or self.split_account.get("account"),
"against_link": self.split_account.get("party") or self.split_account.get("account"),
}
)
gl_map.append(gl_dict)
else:
for against_account in self.against_accounts:
against_account = against_account.as_dict()
debit = against_account.credit or against_account.credit_in_account_currency
credit = against_account.debit or against_account.debit_in_account_currency
gl_dict = gl_dict.copy()
gl_dict.update(
{
"against_type": against_account.party_type or "Account",
"against": against_account.party or against_account.account,
"against_link": against_account.party or against_account.account,
"debit": flt(debit, d.precision("debit")),
"credit": flt(credit, d.precision("credit")),
"account_currency": d.account_currency,
"debit_in_account_currency": flt(
debit / d.exchange_rate, d.precision("debit_in_account_currency")
),
"credit_in_account_currency": flt(
credit / d.exchange_rate, d.precision("credit_in_account_currency")
),
}
)
gl_map.append(gl_dict)
return gl_map
def get_transaction_currency_map(self):
transaction_currency_map = {}
for account in self.get("accounts"):
transaction_currency_map.setdefault(account.party or account.account, account.account_currency)
return transaction_currency_map
def get_conversion_rate_map(self):
conversion_rate_map = {}
for account in self.get("accounts"):
conversion_rate_map.setdefault(account.party or account.account, account.exchange_rate)
return conversion_rate_map
def make_gl_entries(self, cancel=0, adv_adj=0):
from erpnext.accounts.general_ledger import make_gl_entries
@@ -1551,3 +1755,10 @@ def make_reverse_journal_entry(source_name, target_doc=None):
)
return doclist
@frappe.whitelist()
def get_against_type(doctype, txt, searchfield, start, page_len, filters):
against_types = frappe.db.get_list("Party Type", pluck="name") + ["Account"]
doctype = frappe.qb.DocType("DocType")
return frappe.qb.from_(doctype).select(doctype.name).where(doctype.name.isin(against_types)).run()

View File

@@ -1,97 +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",
"cost_center": "_Test Cost Center - _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-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

@@ -37,7 +37,9 @@
"col_break3",
"is_advance",
"user_remark",
"against_account"
"against_type",
"against_account",
"against_account_link"
],
"fields": [
{
@@ -203,7 +205,8 @@
"fieldtype": "Select",
"label": "Reference Type",
"no_copy": 1,
"options": "\nSales Invoice\nPurchase Invoice\nJournal Entry\nSales Order\nPurchase Order\nExpense Claim\nAsset\nLoan\nPayroll Entry\nEmployee Advance\nExchange Rate Revaluation\nInvoice Discounting\nFees\nFull and Final Statement\nPayment Entry"
"options": "\nSales Invoice\nPurchase Invoice\nJournal Entry\nSales Order\nPurchase Order\nExpense Claim\nAsset\nLoan\nPayroll Entry\nEmployee Advance\nExchange Rate Revaluation\nInvoice Discounting\nFees\nFull and Final Statement\nPayment Entry",
"search_index": 1
},
{
"fieldname": "reference_name",
@@ -211,7 +214,8 @@
"in_list_view": 1,
"label": "Reference Name",
"no_copy": 1,
"options": "reference_type"
"options": "reference_type",
"search_index": 1
},
{
"depends_on": "eval:doc.reference_type&&!in_list(doc.reference_type, ['Expense Claim', 'Asset', 'Employee Loan', 'Employee Advance'])",
@@ -248,14 +252,21 @@
"print_hide": 1
},
{
"fieldname": "against_account",
"fieldtype": "Text",
"hidden": 1,
"fieldname": "against_account",
"fieldtype": "Text",
"hidden": 1,
"label": "Against Account",
"no_copy": 1,
"oldfieldname": "against_account",
"oldfieldtype": "Text",
"print_hide": 1
},
{
"fieldname": "against_account_link",
"fieldtype": "Dynamic Link",
"label": "Against Account",
"no_copy": 1,
"oldfieldname": "against_account",
"oldfieldtype": "Text",
"print_hide": 1
"options": "against_type"
},
{
"collapsible": 1,
@@ -279,12 +290,18 @@
"hidden": 1,
"label": "Reference Detail No",
"no_copy": 1
},
{
"fieldname": "against_type",
"fieldtype": "Link",
"label": "Against Type",
"options": "DocType"
}
],
"idx": 1,
"istable": 1,
"links": [],
"modified": "2023-06-16 14:11:13.507807",
"modified": "2023-12-02 23:21:22.205409",
"modified_by": "Administrator",
"module": "Accounts",
"name": "Journal Entry Account",

View File

@@ -6,4 +6,56 @@ from frappe.model.document import Document
class JournalEntryAccount(Document):
# begin: auto-generated types
# This code is auto-generated. Do not modify anything in this block.
from typing import TYPE_CHECKING
if TYPE_CHECKING:
from frappe.types import DF
account: DF.Link
account_currency: DF.Link | None
account_type: DF.Data | None
against_account: DF.Text | None
balance: DF.Currency
bank_account: DF.Link | None
cost_center: DF.Link | None
credit: DF.Currency
credit_in_account_currency: DF.Currency
debit: DF.Currency
debit_in_account_currency: DF.Currency
exchange_rate: DF.Float
is_advance: DF.Literal["No", "Yes"]
parent: DF.Data
parentfield: DF.Data
parenttype: DF.Data
party: DF.DynamicLink | None
party_balance: DF.Currency
party_type: DF.Link | None
project: DF.Link | None
reference_detail_no: DF.Data | None
reference_due_date: DF.Date | None
reference_name: DF.DynamicLink | None
reference_type: DF.Literal[
"",
"Sales Invoice",
"Purchase Invoice",
"Journal Entry",
"Sales Order",
"Purchase Order",
"Expense Claim",
"Asset",
"Loan",
"Payroll Entry",
"Employee Advance",
"Exchange Rate Revaluation",
"Invoice Discounting",
"Fees",
"Full and Final Statement",
"Payment Entry",
]
user_remark: DF.SmallText | None
# end: auto-generated types
pass

View File

@@ -7,6 +7,41 @@ from frappe.model.document import Document
class JournalEntryTemplate(Document):
# begin: auto-generated types
# This code is auto-generated. Do not modify anything in this block.
from typing import TYPE_CHECKING
if TYPE_CHECKING:
from frappe.types import DF
from erpnext.accounts.doctype.journal_entry_template_account.journal_entry_template_account import (
JournalEntryTemplateAccount,
)
accounts: DF.Table[JournalEntryTemplateAccount]
company: DF.Link
is_opening: DF.Literal["No", "Yes"]
multi_currency: DF.Check
naming_series: DF.Literal
template_title: DF.Data
voucher_type: DF.Literal[
"Journal Entry",
"Inter Company Journal Entry",
"Bank Entry",
"Cash Entry",
"Credit Card Entry",
"Debit Note",
"Credit Note",
"Contra Entry",
"Excise Entry",
"Write Off Entry",
"Opening Entry",
"Depreciation Entry",
"Exchange Rate Revaluation",
]
# end: auto-generated types
pass

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