Commit Graph

97 Commits

Author SHA1 Message Date
Deepesh Garg
13d2e7b198 fix: Deferred revenue entries post account freezing
(cherry picked from commit e2eb72eb5ba1aaadddf8278dd77bfe75a178ef01)
2021-09-30 03:06:00 +00:00
Chillar Anand
915b34391c
chore: Clean up imports (#27302)
* chore: Added isort to pre-commit config

* chore: Sort imports with isort

* chore: Clean up imports with pycln

* chore: Sort imports with isort

* chore: Fix import issues

* chore: Clean up sider issues

* chore: Remove import errors from flake8 ignore list

* chore: Clean up lint issues
2021-09-02 16:44:59 +05:30
Saqib
9198caa5e7
fix: incorrect gl entry on period closing involving finance books (#26921) 2021-08-24 17:26:23 +05:30
Ankush
9152715f90
perf: various minor perf fixes for ledger postings (#26775)
* perf: only validate if voucher is journal entry

* perf: optimize merge GLE

- Order fields such that comparison will fail faster
- Break out of loops if not matched

* perf: don't try to match SLE if count mismatch

* refactor: simplify initialize_previous_data

* perf: use cache for fetching valuation_method

These are set only once fields

* refactor: simplify get_future_stock_vouchers

* refactor: simplify get_voucherwise_gl_entries

* perf: fetch only required fields for GL comparison

`select *` fetches all fields, output of this function is only used for
comparing.

* perf: reorder conditions in PL cost center check

* perf: reduce query while validating new gle

* perf: use cache for validating warehouse props

These properties don't change often, no need to query everytime.

* perf: use cached stock settings to validate SLE

* docs: update misleading docstring

Co-authored-by: Marica <maricadsouza221197@gmail.com>
2021-08-11 11:17:50 +05:30
Saqib
cceabff6e1
Merge branch 'develop' into pr-item-gl-fix 2021-06-18 11:24:54 +05:30
Saqib Ansari
61675f1a43 fix: purchase receipt gl entries with same item code 2021-06-17 13:05:43 +05:30
Nabin Hait
0950481253 fix: merge conflict 2021-06-15 20:18:06 +05:30
Ankush Menat
9891780f5a
perf(minor): remove unnecessary comprehensions (port #25645) 2021-06-11 18:40:22 +05:30
Saqib
c6e016e545
fix: wrong round off gl entry posted in case of purchase invoice (#25775) 2021-06-04 10:08:22 +05:30
Saqib Ansari
aa4f750d8c fix: test 2021-04-28 14:42:49 +05:30
Saqib Ansari
3f53b87379 Merge branch 'develop' of https://github.com/frappe/erpnext into round-off-diff-allowance 2021-04-28 14:34:51 +05:30
Deepesh Garg
4c8d15b487
fix: Incorrect GL Entry validation (#25474)
* fix: Incorrect GL Entry validation

* fix: Add validation for party accounts

* fix: Scrub labels

* fix: Translation
2021-04-26 15:24:34 +05:30
Saqib Ansari
b0e160ff78 fix: ignore fraction difference while making round off gl entry 2021-04-22 13:23:50 +05:30
Ankush Menat
325a461c34
Merge branch 'develop' into opening_round_gl 2021-02-25 07:53:48 +05:30
Ankush Menat
23c30e43f0
fix: make round off GLE always non-opening
Opening GL entries can not be for profit and loss accounts. Round off
accounts are by default P&L account. Hence when making opening entry,
make round off entries as non-opening.

Related issue: ISS-20-21-09677
2021-02-24 11:03:24 +05:30
Nabin Hait
19f8fa59d3
fix: optimize reposting of sle and gle (#24694)
* fix: optimize update_gl_entries_after method

* fix: Optimized reposting patch

* fix: accounting dimensions

* added reload_doc in patch

* Update item_reposting_for_incorrect_sl_and_gl.py

Co-authored-by: Rohit Waghchaure <rohitw1991@gmail.com>
2021-02-22 22:27:22 +05:30
Nabin Hait
b99c77b753
Reposting fixes (#24202)
* fix: finished item validation and rate

* fix: Check if stock and account balance in sync after reposting

* fix: validate stock accounts in journal entry

* fix: validate expense against budget
2020-12-25 18:12:35 +05:30
Nabin Hait
a77b8c9fcc
Repost item valuation (#24031)
* feat: Reposting logic for future finished/transferred item

* feat: added fields to identify needs to recalculate rate while reposting

* refactor: Set rate for outgoing and finished items

* refactor: Arranged fields in Stock Entry item table and added fields to identify finished and scrap item

* refactor: Arranged fields in Stock Entry item table and added fields to identify finished and scrap item

* refactor: Get outgoing rate for purchase return

* refactor: Get incoming rate for sales return

* test: Added tests for reposting valuation of transferred/finished/returned items

* feat: added incoming rate field in DN, SI and Packed Item table

* feat: get incoming rate for returned item

* fix: no error while getting valuation rate in stock entry

* fix: update stock ledger for DN and SI

* feat: update item valuation rate in PR and PI based on supplied items cost

* feat: SLE reposting logic for sales return and subcontracted item with test cases

* feat: update qty in future sle

* feat: repost future sle and gle via Repost Item Valuation

* fix: Skip unwanted function calling while reposting

* fix: repost sle for specific item and warehouse

* test: Modified tests for backdated stock reco

* fix: ignore cancelled sle in few methods

* feat: role allowed to do backdated entry

* feat: Show reposting status on stock valuation related reports

* fix: minor fixes

* fix: fixed sider issues

* fix: serial no fix related to immutable ledger

* fix: Test cases fixes related to perpetual inventory

* fix: Test cases fixed

* fix: Fixed reposting on cancel and test cases

* feat: Restart reposting item valuation

* refactor: Code cleanup using small functions and test case fixes

* fix: minor fixes

* fix: Raise on error while reposting item valuation

* fix: minor fix

* fix: Tests fixed

* fix: skip some validation ig gle made from reposting

* fix: test fixes

* fix: debugging stock and account validation

* fix: debugging stock and account validation

* fix: debugging travis for stock and account sync validation

* fix: debugging travis

* fix: debugging travis

* fix: debugging travis
2020-12-21 14:45:50 +05:30
Saqib
577a7fe01d
fix: stock & account balance difference in fraction (#23635) 2020-10-14 15:44:30 +05:30
Deepesh Garg
cfc5e29127
fix: Post cancellation accounting entry on posting date instaed of current (#23361) 2020-09-23 17:19:11 +05:30
Deepesh Garg
069a54e5c3 fix: Cancellation of accounting transactions within closed accounting period 2020-08-10 16:01:01 +05:30
Deepesh Garg
9119b4c538
fix: Unable to submit backdated stock transactions for different items (#22648)
* fix: Unable to submit backdated stock transactions for different items

* fix: Test cases

* fix: Test Cases

* fix: Test Cases

* fix: Test for stock account JV

* fix: Journal Entry Test
2020-07-28 08:49:44 +05:30
Deepesh Garg
8230e41a42 fix: Insert instead of DB insert 2020-06-29 21:20:05 +05:30
Deepesh Garg
d1bf6e0277 fix: Do not ignore validate methods on GLL entry submit 2020-06-29 21:14:03 +05:30
Deepesh Garg
b821f22b7c fix(minor): Reverse GL fix 2020-05-06 18:12:23 +05:30
Deepesh Garg
2a9c5badc6
feat: Immutable ledger (#18740)
* fix: Reverse GL entry on cancellation of document

* fix: Removed set posting time field for multiple docs

* fix: Stop future reposting and reverse entry for purchase receipt and delivery note

* fix: Change is_cancelled field from select to check

* Revert "fix: Removed set posting time field for multiple docs"

This reverts commit 81fb808db7da69ab1e58ba226c0cd0b77e5b90c8.

* fix: Multiple fixes in GL Entry

* fix: Remove future reporting from doctypes

* fix: Canceled entry filters in Stock Ledger and General Ledger Report

* fix: Remove print statement

* fix: Validation for back dated entries

* fix: Codacy fixes

* fix: Add ignore links to multiple doctypes

* fix: Codacy Fixes

* fix: Ignore GL Entry and Stock Ledger entry while cancel

* fix: Test case fixes

* fix: Patch

* fix: Codacy

* fix: Budget Test Cases

* fix: Patch

* fix: Patch

* fix: Multiple test cases

* fix: changes in make_reverse_entry function

* fix: Update patch

* fix: Test Cases

* fix: Test Case fixes

* fix: Move patch upward in patches.txt

* fix: Budget Test Cases

* fix: Test Case and codacy

* fix: Patch

* fix: Minor label and UX fixes

* fix: Move freezing date check

* fix: Test Cases

* fix: Test cases

* fix: Test Cases

* fix: Test Case

* fix: Remove update_gl_entries_after function

* fix: Remove update_gl_entries_after function

* fix: Test Cases

* fix: Fiscal Year wise backdated entry

* fix: Update entries only for current SLE

* fix: Remove is_cancelled

* fix: Test Cases

* fix: Test cases

* fix: Test Cases

* fix: Uncomment account and stock balance sync logic

* fix: Stock balance and Account balance out of sync fixes

* fix: Test Cases

* fix: Test cases for POS, Stock Reco and Purchase Receipt

* fix: Stock Reco tests

* fix: Test stock reco precision

* fix: Test stock reco for fifo precision

* fix: Test stock reco for fifo precision

* fix: Stock Entry test case

Co-authored-by: Nabin Hait <nabinhait@gmail.com>
2020-04-30 10:38:58 +05:30
Nabin Hait
ddc3bb2251
fix: Multiple fixes for travis (#20924)
* fix: Multiple fixes for travis

* fix: Multiple fixes for travis

* fix: Run dashboard patch if table already exists

* fix: Multiple fixes for travis

* fix: deletion of auto-created batch
2020-03-17 17:04:18 +05:30
Saqib
fb35a54bee
perf: improve gl entry submission (#20676)
* perf: improve gl entry submission

* perf: add indexes

* fix: replace **kwargs with *args

* fix: syntax error

* fix: remove cypress

* fix: travis

* chore: remove purchase invoice from status updater

* fix: set_staus args

Co-Authored-By: Nabin Hait <nabinhait@gmail.com>

* fix: only update status for invoices & fees

Co-authored-by: Nabin Hait <nabinhait@gmail.com>
2020-02-27 18:32:19 +05:30
thefalconx33
bfc43d3b15 fix: gl entries doesn't filter based on debit precision 2019-12-13 15:41:19 +05:30
rohitwaghchaure
1511154aa8 fix: removed stock value and account balance out of sync validation (#19729)
* fix: revert value out of sync feature

* fix: removed stock value and account balance out of sync validation
2019-11-28 16:43:39 +05:30
Nabin Hait
35e8d1e1d7
Stock acc bal sync msg (#19676)
* fix: Prefilled JV via Account Balance and Stock Value mismatch error message

- Make JV button will route to Journal Entry and add rows in child table

* fix: make journal entry to sync stock and account balance

* fix: translated action label
2019-11-25 14:02:51 +05:30
Saqib
f37a46edea Fixed Asset Refactor Review fixes (#19665)
* fix: fixed asset item creation ux fixes

* fix: auto creation of asset ux fixes

* fix: [LCV] incorrect condition when checking assets linked with PR

* fix: bulk update assets

* refac: remove company level cwip enabling
* cwip can be enabled only on category level

* fix: #19649
2019-11-22 16:32:50 +05:30
Marica
c9e8a1bf96 fix: Account Balance and Stock Value out of sync error message (#19526)
* fix: Account Balance and Stock Value out of sync error message

Added 'Make Adjustment Entry' button and enhanced message

* fix: Split message and changed routing for translation
2019-11-14 16:13:43 +05:30
Marica
d00c59830e feat: Disable CWIP Accounting checkbox added in Company and Asset Category (#19262)
* feat: Disable CWIP Accounting checkbox added in Company and Asset Category

Asset Settings is removed completely
Disable CWIP Accounting checkbox will give priority to Asset Category

* fix: Changed checkbox name to 'Enable Capital Work in Progress Accounting'

- checkbox will be disabled by default
- Enabling it in Company will globally enable it
- When globally disabled , it's value on the asset category will be considered

* chore: Added patch to set pre-existing CWIP checkbox value into new checkbox

* fix(test): Asset

* fix: Asset Test and Patch

* fix(test): Opening Invoice Creation Tool

* Update asset.py

* fix: Patch and other fixes
2019-11-12 19:17:43 +05:30
Anurag Mishra
a11e738801 feat: Stock value and account balance sync. (#19233)
* feat: Allow user to sync stock_value and account_balance jv if perpetual inventory is checked

* fix(test): Sales Invoice

* fix(test): Purchase Invoice

* fix(test): Delivery Note

* fix: more test_case

* fix(test): Stock Entry

* fix(test): Purchase Receipt

* fix(more-test): Stock Entries

* fix(more-test): Sales Invoice and Delivery Note

* fix: tests for delivery note

* fix: tests for stock reconciliation

* refactor: stock and account balance function

* fix(more-test): Warehouse

* fix(test): Landed Cost Voucher

* fix: changes requested
2019-10-31 15:55:03 +05:30
Mangesh-Khairnar
e5c733bdb3 fix: Accounting period (#18630)
* fix: accounting period

* test: accounting period

* fix: account period creation

* fix: remove status field from accounting period
2019-08-08 15:44:11 +05:30
Anurag Mishra
7e1987ed48 feat: validate cwip accounts for journal Entry (#18518) 2019-08-05 10:18:57 +05:30
Nabin Hait
34c551d9a5
fix: Missing commits from hotfix branch (#17997)
* fix: merge conflict

* fix: restored missing set_gst_state_and_state_number function

* fix: style linting as per codacy

* fix: Fixes related to customer/lead merging

* fix: merge conflict

* fix: Fixes related to customer/lead merging

* fix: Assign isue/opportunity to user

* fix: Assign isue/opportunity to user

* fix: Replaced Invoice type by GST Category

* fix: merge conflict

* fix: merge conflict

* fix: test cases

* fix: test cases
2019-07-03 10:34:31 +05:30
deepeshgarg007
3d11ac0e75 fix: Accounting dimensions for child tables 2019-05-19 00:02:01 +05:30
Zarrar
3523b779aa rounding off fixes and conversion fix (#15140) 2018-08-14 16:28:14 +05:30
Rushabh Mehta
708e47aadf optimize(various) 2018-08-08 16:37:31 +05:30
Achilles Rasquinha
908289d40a [FIX] filter to list 2018-03-08 13:10:51 +05:30
Nabin Hait
1e1b2364ab
Optimization: don't update outstanding amount while cancelling payment entry for advance adjustment (#12689) 2018-01-29 16:45:43 +05:30
Manas Solanki
4e0559bc79 make payment entry for the fees 2017-09-19 17:23:03 +05:30
Manas Solanki
2b39d5d6d5 make gl_entry on submission of fees 2017-09-19 17:23:02 +05:30
Nabin Hait
2e4de83df6 Rounding Adjustment via a separate field, instead of last tax row (#10659)
* Rounding Adjust via a separate field, instead of last tax row

* Fixed test cases
2017-09-19 14:53:16 +05:30
Rohit Waghchaure
e9ff1914fc Added is_perpetual_inventory_enabled method 2017-06-20 11:26:37 +05:30
Rohit Waghchaure
a5f40941ae [Enhance] Companywise perpetual inventory setting 2017-06-20 10:21:33 +05:30
Nabin Hait
6d7b0ce794 Warehouse Account Linking (#9292)
* [enhance] Added account in the warehouse

* documentation

* patch to move account head from account to warehouse

* fixed test cases

* Fixes in warehouse-account linking

* minor fix in test case
2017-06-15 11:09:27 +05:30
Nabin Hait
d2a966eef3 Update general_ledger.py 2017-05-05 10:41:16 +05:30