Commit Graph

40619 Commits

Author SHA1 Message Date
Deepesh Garg
384ce92b4b Merge pull request #31307 from frappe/mergify/bp/version-13-hotfix/pr-31216
fix: Trial Balance failing to ignore Finance Book (backport #31216)
2022-06-10 00:10:23 +05:30
Sun Howwrongbum
894f945be7 fix: typo in sql condition
(cherry picked from commit ee2949aa3f)
2022-06-09 15:05:15 +00:00
Deepesh Garg
44642dba39 chore: Linting Issues
(cherry picked from commit b9dbb36d0e)
2022-06-09 15:05:14 +00:00
Sun Howwrongbum
00371f4a22 fix: Trial Balance failing to ignore Finance Book
(cherry picked from commit 48bde2de2a)
2022-06-09 15:05:14 +00:00
mergify[bot]
fb9b302ecf fix: Reset represents company on disabling internal customer and supplier (backport #31302) (#31306)
fix: Reset represents company on disabling internal customer and supplier (#31302)

(cherry picked from commit c13e5ad741)

Co-authored-by: Deepesh Garg <deepeshgarg6@gmail.com>
2022-06-09 19:20:53 +05:30
mergify[bot]
77e4755c1f fix: update ru translate (backport #31200) (#31304)
* fix: update ru translate (#31200)

* Update ru.csv

* Update ru.csv

* Update ru.csv

* Update ru.csv

* Update ru.csv

* Update ru.csv

* Update ru.csv

* Update ru.csv

fix logic

* Update ru.csv

* Update ru.csv

* Update ru.csv

(cherry picked from commit 2675751d6c)

# Conflicts:
#	erpnext/translations/ru.csv

* fix: Merge conflicts

Co-authored-by: Vladislav <integration.into.society@gmail.com>
Co-authored-by: Marica <maricadsouza221197@gmail.com>
2022-06-09 19:16:48 +05:30
Marica
bb431bb21f Merge pull request #31299 from frappe/mergify/bp/version-13-hotfix/pr-31296
fix: misaligned columns in print format of AR/AP report (backport #31296)
2022-06-09 18:31:20 +05:30
Marica
48de5ab62a Merge branch 'version-13-hotfix' into mergify/bp/version-13-hotfix/pr-31296 2022-06-09 18:09:09 +05:30
Marica
3816ae21bb Merge pull request #31078 from marination/v13-perf-bom-update-tool
perf: BOM Update Tool (backport)
2022-06-09 17:51:28 +05:30
meaziz
9347cbbc9f chore: Asset Arabic translation Fix (#31221)
Update ar.csv

Fix Translation arabic translation that caused an error when submitting an asset if user language was arabic
2022-06-09 17:43:31 +05:30
ruthra kumar
81e32e2855 fix: misaligned columns in print format of AR/AP report
(cherry picked from commit bbaa14af16)
2022-06-09 12:06:11 +00:00
mergify[bot]
9f6b32af12 fix(ux): hide new version btn on unsaved BOM (backport #31297) (#31298)
fix(ux): hide new version btn on unsaved BOM (#31297)

(cherry picked from commit d9a5213952)

Co-authored-by: Ankush Menat <me@ankush.dev>
2022-06-09 17:22:50 +05:30
marination
5a08850aa1 chore: Less hacky tests, versioning (replace bom) and clearing log data (update cost)
- Remove `auto_commit_on_many_writes` in `update_cost_in_level()` as commits happen every N BOMs
- Auto commit every 50 BOMs
- test: Remove hacky `frappe.flags.in_test` returns
- test: Enqueue `now` if in tests (for update cost and replace bom)
- Replace BOM: Copy bom object to `_doc_before_save` so that version.py finds a difference between the two
- Replace BOM: Add reference to version
- Update Cost: Unset `processed_boms` if Log is completed (useless after completion)
- test: `update_cost_in_all_boms_in_test` works close to actual prod implementation (only call Cron job manually)
- Test: use `enqueue_replace_bom`  so that test works closest to production behaviour

Co-authored-by: Ankush Menat <ankushmenat@gmail.com>
2022-06-09 16:56:19 +05:30
Marica
7a868a46d5 Merge branch 'version-13-hotfix' into v13-perf-bom-update-tool 2022-06-09 13:33:52 +05:30
mergify[bot]
633a4521e4 fix: Use frappe.as_unicode to decode output of redis module list (backport #31282) (#31283)
fix: Use `frappe.as_unicode` to decode output of redis module list (#31282)

- As of redis 7, a list is added to the result of fetching the module list
- This list cannot be "decoded",so use `frappe.as_unicode` that handles bytes as well as other types

(cherry picked from commit 2832731601)

Co-authored-by: Marica <maricadsouza221197@gmail.com>
2022-06-08 18:12:02 +05:30
Saqib Ansari
8a4c9d1238 fix(asset): failing test case (#31277) 2022-06-08 14:12:59 +05:30
Marica
8656020c00 Merge branch 'version-13-hotfix' into v13-perf-bom-update-tool 2022-06-08 14:09:51 +05:30
marination
289d65a4ed chore: get_valuation_rate sider fixes
- Use qb instead of db.sql
- Don't use `args` as argument for function
- Cleaner variable names
2022-06-08 14:08:45 +05:30
marination
b529a610fb test: Fix test_update_bom_cost_in_all_boms
- Use base_rate for assertions as rate is subject to change due to conversion factor (USD)
2022-06-08 14:08:12 +05:30
marination
c7accb9c33 test: Util to update cost in all BOMs
- Utility to update cost in all BOMs without cron jobs or background jobs (run immediately)
- Re-use util wherever all bom costs are to be updated
- Skip explicit commits if in test
- Specify company in test records (dirty data sometimes, company wh mismatch)
- Skip background jobs queueing if in test
2022-06-08 14:07:34 +05:30
Ganga Manoj
dfbfe403e9 fix: Depreciate Asset before generating GL Entries on sale (#30759) 2022-06-08 09:35:43 +05:30
mergify[bot]
e69bff0caa fix: Auto Insert Item Price If Missing when discount & blank UOM (backport #31168) (#31267)
fix: Auto Insert Item Price If Missing when discount & blank UOM (#31168)

* fix: Auto Insert Item Price If Missing when discount and blank UOM

fixes wrong item price insert when discount is used and adds uom=stock_uom instead of blank as price is converted to stock uom

* unit tests added for item with discount

I have added test  for auto_insert_price where discount is used.

* unit test issue fixed

fixed make_sales_order as some of the test that depended on it were failing due to passing of incorrect parameters.

Co-authored-by: Ankush Menat <me@ankush.dev>
(cherry picked from commit b3ccc4bfb9)

Co-authored-by: maharshivpatel <39730881+maharshivpatel@users.noreply.github.com>
2022-06-07 16:04:00 +05:30
Ankush Menat
0e53edfd49 test: sales register report with conditions (#31266) 2022-06-07 16:03:29 +05:30
mergify[bot]
6d99b5a95a fix: purchase invoice standalone return GLEs (backport #31209) (#31263)
* test: create stock test mixin for assertion/utils

(cherry picked from commit 293eb8d722)

# Conflicts:
#	erpnext/stock/doctype/stock_ledger_entry/test_stock_ledger_entry.py
#	erpnext/stock/tests/test_utils.py

* fix: purchase invoice return GLe

voucher_wise_stock_value contains tuples and the condition was looking
for string, so it's never triggered.

Caused by https://github.com/frappe/erpnext/pull/24200

(cherry picked from commit 7726271e2a)

* chore: conflicts

Co-authored-by: Ankush Menat <me@ankush.dev>
Co-authored-by: Ankush Menat <ankush@frappe.io>
2022-06-07 15:43:37 +05:30
Deepesh Garg
f087246e38 Merge pull request #31261 from frappe/mergify/bp/version-13-hotfix/pr-31258
fix: Close unsecured terms loans (backport #31258)
2022-06-07 14:52:47 +05:30
Deepesh Garg
ef8483d2ea chore: Resolve conflicts 2022-06-07 14:10:44 +05:30
Deepesh Garg
8cb85fa90b Merge pull request #31260 from frappe/mergify/bp/version-13-hotfix/pr-31233
fix: Reverse provisional entries on Purchase Invoice cancel (backport #31233)
2022-06-07 14:03:44 +05:30
Rucha Mahabal
d433784171 fix: only fetch membership expiry if not already set in member.js (#31259) 2022-06-07 14:01:12 +05:30
Deepesh Garg
d6d1d79ba0 fix: Close unsecured terms loans
(cherry picked from commit 815141bf57)

# Conflicts:
#	erpnext/loan_management/doctype/loan/loan.py
2022-06-07 08:24:23 +00:00
Deepesh Garg
42a0b82c71 test: Add test coverage for cancellation
(cherry picked from commit dc8e80ea81)
2022-06-07 08:01:46 +00:00
Deepesh Garg
100b8d9b96 fix: Simply cancel reverse entries
(cherry picked from commit 86a24f3d22)
2022-06-07 08:01:45 +00:00
Deepesh Garg
1fba432786 fix: Reverse provisional entries on Purchase Invoice cancel
(cherry picked from commit 61fa4eb6c9)
2022-06-07 08:01:45 +00:00
Rucha Mahabal
149c6031a1 chore: add missing import 2022-06-07 11:08:29 +05:30
Rucha Mahabal
ad1b419368 test: Employee Benefit Application
- make `get_no_of_days` a function for reusability
2022-06-07 11:08:29 +05:30
Rucha Mahabal
10f0c935fe fix: incorrect LWP calculation for half days in employee benefit application 2022-06-07 11:08:29 +05:30
Rucha Mahabal
8b48d45286 fix(Leave Application): 'Cancelled' status shown as 'Open' in list view 2022-06-07 11:08:29 +05:30
Rucha Mahabal
144d71c6af refactor: rewrite lwp queries using query builder 2022-06-07 11:08:29 +05:30
Rucha Mahabal
7f84c86d43 fix: Consider only Approved leave applications in LWP, Employee Benefit calculations
- do not allow submitting leave applications with 'Cancelled' status
2022-06-07 11:08:29 +05:30
mergify[bot]
a22d92f946 fix: leave balance for earned leaves in backdated Leave Application dashboard (backport #31253) (#31256)
fix: leave balance for earned leaves in backdated Leave Application dashboard

Co-authored-by: Rucha Mahabal <ruchamahabal2@gmail.com>
2022-06-07 10:22:27 +05:30
Deepesh Garg
86856491b7 Merge pull request #31235 from frappe/mergify/bp/version-13-hotfix/pr-31219
fix: Parent dimension filters in orders (backport #31219)
2022-06-06 20:53:33 +05:30
Deepesh Garg
60d378aed2 chore: Resolve conflicts 2022-06-06 20:36:40 +05:30
mergify[bot]
3b1f6da741 fix: incorrect billed_qty in sales order analysis report when multiple delivery notes for item (backport #31194) (#31250)
* fix: incorrect billed_qty when item has multiple Delivery note

sales order analysis report returns incorrect billed_qty value for
an SO item has multiple delivery notes

(cherry picked from commit 0331e37982)

* test: multiple delivery notes and billed quantity

(cherry picked from commit 4f1bfbb93d)

Co-authored-by: ruthra kumar <ruthra@erpnext.com>
2022-06-06 19:55:18 +05:30
mergify[bot]
a7fc278b60 fix(job card): only hold during draft state (backport #31243) (#31249)
* fix(job card): only hold during draft state (#31243)

(cherry picked from commit ee5bc58e9b)

# Conflicts:
#	erpnext/patches.txt

* chore: conflicts

Co-authored-by: Ankush Menat <me@ankush.dev>
2022-06-06 19:54:56 +05:30
mergify[bot]
0badfc8748 fix(Sales Register): incorrect query with dimensions (backport #31242) (#31251)
fix(Sales Register): incorrect query with dimensions

If accounting dimension is also part of the default filters then same
query is repeated with incorrect syntax.

e.g. `item_group = (child1, child2)` instead of `in` query.

fix: don't add default filter if they are part of dimensions to be
added.

(cherry picked from commit c3219ebad1)

Co-authored-by: Ankush Menat <ankush@frappe.io>
2022-06-06 19:54:41 +05:30
marination
d3b06a682c chore: get_valuation_rate in bom.py must always return float & goto Item master if no bins 2022-06-06 18:15:07 +05:30
marination
7bd5558c31 chore: Miscellanous fixes/enhancements
- `get_valuation_rate`: if no bins are found return 0, SLEs do not exist either
- `get_valuation_rate`: Compute average valuation rate via query
- `get_rm_rate_map`: set order_by as None to avoid creating sort index (modified) each time query runs (seen in process list)
- BOM Update Batch: add status field and hide `boms_updated` so that  users can see progress without loading all updated boms (too much data)
- BOM Update Batch: set batch row status to completed after job runs
- BOM Update Log: remove `parent_boms` field (just pass parent boms to processing function) & remove Paused state (not used)
- Move job to long queue to avoid choking default queue
- `update_cost_in_boms`: use `get_doc` as each BOM is accessed only once. Use `for_update` to lock BOM row
- Commit after every 100 BOMs
2022-06-06 17:04:06 +05:30
Deepesh Garg
b58c7750c6 Merge pull request #31237 from frappe/mergify/bp/version-13-hotfix/pr-31223
fix: display currencies in validation message. (backport #31223)
2022-06-06 14:48:21 +05:30
Deepesh Garg
aaaacf9a8f Merge pull request #31241 from frappe/mergify/bp/version-13-hotfix/pr-31230
fix: Remove redundant query (backport #31230)
2022-06-06 14:48:00 +05:30
Deepesh Garg
3c4cf5929f fix: Remove redundant query
(cherry picked from commit a200e7e1fb)
2022-06-06 06:54:41 +00:00
Deepesh Garg
ed89963d65 Merge branch 'version-13-hotfix' into mergify/bp/version-13-hotfix/pr-31223 2022-06-06 12:24:34 +05:30