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