Commit Graph

5238 Commits

Author SHA1 Message Date
Ankush Menat
0bed592777 fix: open stock entry instead of submitting from item dashboard 2022-02-28 13:06:56 +05:30
Ankush Menat
88a21ca7d2 fix: only show child warehouses for transfer 2022-02-28 13:06:56 +05:30
Deepesh Garg
1b186682ea Merge branch 'develop' of https://github.com/frappe/erpnext into grant_commission_check 2022-02-28 12:42:21 +05:30
Sagar Sharma
77ffcd3aed
fix(ux): make "allow zero valuation rate" readonly if "s_warehouse" is set (#29681)
* chore: make allow zero valuation rate readonly if s_warehouse is set

* fix: setting the checkbox to zero whenever the source warehouse is set

* fix: remove allow_on_submit and refresh trigger

Co-authored-by: Ankush Menat <ankush@frappe.io>
2022-02-26 11:25:02 +05:30
Deepesh Garg
0373914704 fix: Commission not applied while making Sales Order from Quotation 2022-02-24 14:42:56 +05:30
Marica
4d8d4acec4
Merge pull request #29913 from marination/item-merge-bundles
fix: Block merging items if both have product bundles
2022-02-23 16:59:22 +05:30
marination
a33f04ea41 fix: Check if both old and new items have bundles before merging
- If only one has bundle against it, they can be merged
2022-02-23 16:26:20 +05:30
Marica
8b1ef7bcc6
Merge pull request #29964 from marination/fox-flaky-stock-reports-test
chore: Rollback after each test, due to premature commit via `remove_user_permission`
2022-02-23 15:18:39 +05:30
marination
5ff3705872 test: Make Variant if absent in test_variant_work_order, keep test atomic 2022-02-23 14:54:16 +05:30
Ankush Menat
9c7df2eec5 fix: ignore duplicates explicitly 2022-02-23 14:27:45 +05:30
marination
bf8743713d chore: Rollback after each test, due to premature commit via remove_user_permission
- `remove_user_permission` in `test_warehouse_user` calls delete_doc that enqueues dynamic link deletion
- Execution of background job eventually commits
- While in the test suite it runs sequentially in the same thread and commits whatever was done until then
- Which is why the rollback in `tearDownClass` is quite useless here
- This premature commit causes many illegal transactions caught by `assertRaises` to be committed in the db
- This creates faulty/dirty ledgers and breaks reports, as outiside the test suite this shouldn't/wouldn't happen
- Rollback after each test, and for `test_warehouse_user` in particular, manually cancel transaction
2022-02-23 14:03:48 +05:30
Marica
0fde2f522e
Merge branch 'develop' into item-merge-bundles 2022-02-23 00:28:51 +05:30
Ankush Menat
5d403449bd
test: move report tests to subttest (#29945)
Basically failfast=False but for sub-tests
2022-02-22 19:24:49 +05:30
Ankush Menat
745f7bc5f0
docs: add human readable specifications for stock ledger (#29308)
* docs: add human readable specifications for stock ledger

* docs: reposting technical implementation notes
2022-02-22 17:03:11 +05:30
Ankush Menat
7f55226a58
fix: remove customer field value when MR is not customer provided (#29938) 2022-02-22 16:55:43 +05:30
Ankush Menat
9661058cc7 fix: only set batchwise valuation flag if new batch 2022-02-21 19:04:10 +05:30
Ankush Menat
af9fa049c7 fix: batchwise valuation can only be used by FIFO/LIFO 2022-02-21 18:02:40 +05:30
Ankush Menat
75fb561698 test: force correct flag in test data 2022-02-21 18:02:40 +05:30
Ankush Menat
f38690f703 fix: check if Moving average item can use batchwise valuation 2022-02-21 18:02:40 +05:30
Ankush Menat
6b0bc35063 test: mixed moving average items 2022-02-21 18:02:40 +05:30
Ankush Menat
609d2fccad fix: reset stock value if no qty 2022-02-21 18:02:40 +05:30
Ankush Menat
35483242b3 fix: extend round_off_if_near_zero fix to other methods 2022-02-21 18:02:40 +05:30
Ankush Menat
76b395d62e test: old/new mix batches valuation consumption 2022-02-21 18:02:40 +05:30
Ankush Menat
b1555fd477 chore: batch flag and consumption rate in invariant report 2022-02-21 18:02:40 +05:30
Ankush Menat
b534fee2c7 refactor: use queue difference instead of actual values 2022-02-21 18:02:40 +05:30
Ankush Menat
aba7a7ce4e fix: handle negative inventory inside a batch 2022-02-21 18:02:40 +05:30
Ankush Menat
d7ca83ef0b refactor: code duplication for fallback rates 2022-02-21 18:02:40 +05:30
Ankush Menat
c5bd34d238 test: multi-batch stock entry 2022-02-21 18:02:40 +05:30
Ankush Menat
60b8bae85f test: batch wise valuation for transfer and intermediate 2022-02-21 18:02:40 +05:30
18alantom
683ef8a603 test: more tests for batchwise valuation
Co-Authored-By: Ankush Menat <ankush@frappe.io>
2022-02-21 18:02:40 +05:30
Ankush Menat
d130233ffc test: fix expected test failures 2022-02-21 18:02:40 +05:30
Ankush Menat
102fff24c8 refactor: convert query to QB and make creation optional 2022-02-21 18:02:40 +05:30
Ankush Menat
ab926521bd fix: correct incoming rate for batched items 2022-02-21 18:02:40 +05:30
Ankush Menat
342d09a671 feat: get_valuation_rate batch wise
This function is used to show valuation rate on frontend and also as
fallback in case values aren't available. Add "batch_no" param to get
batch specific valuation rates.

Co-Authored-By: Alan Tom <2.alan.tom@gmail.com>
2022-02-21 18:02:40 +05:30
Ankush Menat
ce0514c8db feat: batch wise valuation rates
start with most used case: negative inventory isn't enabled

- simple addition of qty and value when new batch qty is added
- fetch outgoing rate from stock movement of specific batch
2022-02-21 18:02:40 +05:30
18alantom
f4af75f60b feat: batchwise valuation flag
This is required to avoid breaking behaviour in valuation
of old batches
2022-02-21 18:02:40 +05:30
Ankush Menat
00e8565868 fix: round off increments in numeric item variant 2022-02-21 17:42:34 +05:30
marination
530f9f7029 test: Item Merging with Product Bundles 2022-02-21 16:48:04 +05:30
marination
28cc2dbb72 fix: Block merging items if both have product bundles 2022-02-21 16:14:40 +05:30
Marica
d1a283fd79
Merge branch 'develop' into repack-entry-stock-ageing 2022-02-18 18:54:23 +05:30
marination
d5be536740 test: Negative Stock, over consumption & over production with split rows, balance precision 2022-02-18 18:53:05 +05:30
marination
ed4a6c6cc6 fix: Range Qty precision 2022-02-18 18:52:42 +05:30
marination
d3fbbcfed3 fix: Precision of available qty and negative stock in transfer bucket
- Maintain only positive values in transfer bucket
- Use it to neutralize/add stock to fifo queue
2022-02-18 16:33:28 +05:30
Ankush Menat
d9fc3f3d90 test: putaway rule re-application shouldn't do anything 2022-02-17 12:26:51 +05:30
Ankush Menat
b000e93744 fix: avoid updating items table if no change due to putaway 2022-02-17 12:26:51 +05:30
Marica
c3c9a8d445
Merge branch 'develop' into so-mr-wo-back-update 2022-02-16 13:39:58 +05:30
Marica
201a38bfbf
Merge branch 'develop' into item-variants-perf 2022-02-16 13:03:32 +05:30
marination
f6233e77c6 chore: Add transfer bucket working to .md file 2022-02-15 20:30:16 +05:30
marination
ea3b7de867 test: Stock Ageing FIFO buckets for Repack entry with same item 2022-02-15 18:41:42 +05:30
marination
799671c748 fix: Transfer Bucket logic for Repack Entry with split batch rows 2022-02-15 18:41:08 +05:30