* fix(Sales Invoice): Let invoice be created for Sold Assets if it's a return invoice
* fix(Sales Invoice): Print appropriate message if item.asset is missing when the Item is a Fixed Asset
* fix(Sales Invoice): Fix GL Entry creation for Return Invoices linked with Assets
* fix(Sales Invoice): Print appropriate message if Asset isn't specified when the Item is a Fixed Asset
* fix(Sales Invoice): Let invoice be created for Sold Assets if it's a return invoice
* fix(Sales Invoice): Reset disposal_date on returning the Asset
* fix: Rename get_gl_entries_on_asset_movement to get_gl_entries_on_asset_disposal_and_regain
* fix: Make functions more readable
* fix: Let create_item() make items that are fixed assets
* fix: Test GL Entries made when an Asset is returned
* fix: Create asset data
* fix: Test
Co-authored-by: Saqib <nextchamp.saqib@gmail.com>
* fix: cannot reconcile bank transactions against internal transfer payment entries (#26932)
* fix: Only set Clearance Date for Payment Entries of type Internal Transfer if both Transactions have been reconciled
* fix: Reset clearance_date for intra-company Payment Entries that have only been reconciled with one Bank Transaction
* fix: indentation and args
Co-authored-by: Saqib <nextchamp.saqib@gmail.com>
Co-authored-by: Nabin Hait <nabinhait@gmail.com>
(cherry picked from commit 842ceb1301)
# Conflicts:
# erpnext/patches.txt
* fix: merge conflict
* fixed patches
Co-authored-by: Ganga Manoj <ganga.manoj98@gmail.com>
Co-authored-by: Nabin Hait <nabinhait@gmail.com>
* refactor: bom recursion checking
* fix: dont allow bom recursion
if same item_code is added in child items at any level, it shouldn't be allowed.
* test: add test for bom recursion
* test: fix broken prodplan test using recursive bom
* test: fix recursive bom in tests
(cherry picked from commit c07dce940e)
Co-authored-by: Ankush Menat <ankush@iwebnotes.com>
* test: negative stock validation on SR cancel
* fix: negative stock setting ignored in stock reco
In stock reconcilation cancellation negative stock setting is ignored as
`db.get_value` is returning string `'0'` which is not casted to int/bool
for further logic. This causes negative qty, which evantually gets
caught by reposting but by design this should stop cancellation.
* test: typo and minor refactor
(cherry picked from commit e7109c18db)
Co-authored-by: Ankush Menat <ankush@iwebnotes.com>
* fix: Fee Validity fixes (#27156)
* chore: update Fee Validity form labels
* fix: first appointment should not be considered for Fee Validity
* fix: Fee Validity test cases
* fix: appointment test case
(cherry picked from commit 642b4c805c)
* fix: overlapping appointments
Co-authored-by: Rucha Mahabal <ruchamahabal2@gmail.com>
* fix: Dont create inward SLE against SI unless is internal customer enabled
- Check if is internal customer enabled apart from target warehouse
- Test to check if inward SLE is made if target warehouse is accidentally set but customer is not internal
* test: Use internal customer for delivery of bundle items to target warehouse
- created `create_internal_customer` util
- reused it in delivery note and sales invoice tests
- use internal customer for target warehouse test in delivery note
(cherry picked from commit f4dc9ee2aa)
# Conflicts:
# erpnext/accounts/doctype/sales_invoice/test_sales_invoice.py
* fix: Shopping cart Exchange rate validation
- Use `get_exchange_rate` to check for price list exchange rate in cart settings
- Move cart exchange rate validation for Price List from hooks to doc event
- Call cart exchange rate validation on PL update only if PL is in cart and currency is changed
* chore: Comment out obsolete test
- Modifying this test means considering extreme edge cases, which seems pointless now
* fix: Remove snippet that got in due to cherry-pick from `develop`
- This snippet is not present in v13-hotfix. Via https://github.com/frappe/erpnext/pull/26520
Co-authored-by: Nabin Hait <nabinhait@gmail.com>
Summary : unable to create manual / auto asset depreciation entry when cost_center is mandatory
Reason: Though we are calculating value for depreciation_cost_center, it is not passed in credit_entry(it is passed in debit_entry) and this prevents creation of manual / auto asset depreciation entry when cost_center is mandatory
Solution : pass already calculated depreciation_cost_center value in credit_entry (in line with, already done as in debit_entry)
(cherry picked from commit b99c011947)
Co-authored-by: Ashish Shah <mr.ashish.shah@gmail.com>
* fix: update test suite to accodomate new currency exchange function
* feat: Increase number of supported currency exchanges
* fix: don't make api call when testing
* remove condition for test(being fixed in another pull request)
Sales Invoice doctype is starting to hit row length limit as many
integrations add custom fields on this doctype. This is just a small
change to remove VARCHAR(140) fields and reduce row size wherever
possible.
(cherry picked from commit 8d116fb9ff)
Co-authored-by: Ankush Menat <ankush@iwebnotes.com>
* refactor: update stock onboarding
* refactor: add form tour for stock module onboarding
* refactor: move trailing whitespace out of translate func
* refactor: sider/semgrep
* refactor: remove DN, PR; change wording, add/remove steps in tour
* refactor: add watch video step for stock opening balance
* refactor: reorder steps according to stock settings refactor
* refactor: fix typo, remove target warehouse cause SE Type dependency
* fix: semgrep, remove trailing and leading whitespaces
* refactor: reduce steps, reword cards
* fix: minor changes
- remove Is Group from warehouse
- change stock entry type
- link to stock entry type
- add posting date to stock reco
- change report to Stock Projected Qty
- highlight quality inspection action
- remove allow neg highlight
* refactor: use Form Tour doc instead of controller form tour
note - keeping controller form tours as a fallback, new form tours
seem to work only for Stock Settings
* fix: rename form tours to doctype names, remove tours from js controllers
* fix: re-order tour to circumvent glitchy save highlight