Commit Graph

5237 Commits

Author SHA1 Message Date
marination
c007f84ade chore: Added .md file to explain stock ageing business logic 2021-12-28 01:27:24 +05:30
marination
878fd377c2 chore: Use frappe.qb for query 2021-12-27 21:09:05 +05:30
Deepesh Garg
ab09dc545e fix(UX): Optimize rate updation of changing price list
(cherry picked from commit 6087d5a6038d6e636ce1ba006ebd59e820b3cd8e)
2021-12-24 14:03:47 +00:00
Ankush Menat
7987a46509
chore: add running stock value difference in invariant report (#29012)
[skip ci]
2021-12-23 21:13:22 +05:30
Ankush Menat
db7aef2fef
style: better labels for SLE fields (#28988)
* style: better labels for SLE fields

* style: rename stock queue field

[skip ci]

Co-Authored-by: marination <maricadsouza221197@gmail.com>
2021-12-21 17:39:27 +05:30
Saqib
7f786e44a1
Merge branch 'develop' into pos-batch-no-stock-validation 2021-12-21 17:05:43 +05:30
Marica
d7c4b8a383
Merge branch 'develop' into independent-manu-entry 2021-12-21 12:55:12 +05:30
marination
24a35c69c0 fix: Sider and Server side test
- args passed to wrong function
- missing space around '='
2021-12-21 12:52:03 +05:30
Ankush Menat
d7148adee5
test: remove unnecessary creation of companies #28965
test: remove unnecessary creation of companies
2021-12-20 22:00:31 +05:30
Marica
d209e5d6c5
Merge branch 'develop' into independent-manu-entry 2021-12-20 21:55:38 +05:30
marination
8951a5c267 fix: Linter (imports) 2021-12-20 21:53:47 +05:30
marination
0f43792dbb fix: Stock Ageing Report - Negative Opening Stock
- Consider negative opening stock in logic and neutralise it with +ve stock
- minor code refactor: class for FIFOSlots to generate chronological FIFO queue
2021-12-20 21:33:59 +05:30
Ankush Menat
2bb7bca464 test: bin qty on backdated SR 2021-12-20 20:05:49 +05:30
Ankush Menat
ff9a6e8e89 fix: correct bin qty on backdated transactions
When making a backdated transactions current balance qty depends on
evaluation of whole ledger inbetween, instead of doing that just fetch
the last sle's qty_after_transaction when future transactions are
detected against SLE

fix: don't update bin's actual_qty

1. it's already updated by repost_current_voucher
2. update if future sle exists
2021-12-20 20:05:49 +05:30
Ankush Menat
f5d5281119 chore: drop deprecated qunit tests 2021-12-20 17:03:10 +05:30
Ankush Menat
107b404105 chore: rename FifoValuation to FIFOValuation 2021-12-20 13:20:03 +05:30
Ankush Menat
745caf911a perf: specify slots on FIFO queue 2021-12-20 13:20:03 +05:30
Ankush Menat
aa0e163b1f test: hypothesis tests for FIFO queue 2021-12-20 13:20:03 +05:30
Ankush Menat
9d177433cb fix: return consumed bin on collapsing queue 2021-12-20 13:20:03 +05:30
Ankush Menat
a00d8d02b2 refactor: outgoing rate and defaults for remove_stock 2021-12-20 13:20:03 +05:30
Ankush Menat
db1c0889d3 feat: get consumed bins from Fifo queue on pop 2021-12-20 13:20:03 +05:30
Ankush Menat
1833f7ab81 test: FifoValuation tests 2021-12-20 13:20:03 +05:30
Ankush Menat
e6e679cf7a fix: round off if near zero while popping from queue 2021-12-20 13:20:03 +05:30
Ankush Menat
a71b476652 feat: repr, eq and iter for fifo queue 2021-12-20 13:20:03 +05:30
Ankush Menat
4b29fb6d08 refactor: move Fifo Valuation to a new class 2021-12-20 13:20:03 +05:30
Ankush Menat
6ba8f7644d
chore: ledger invariant check report (#28921) 2021-12-16 22:31:31 +05:30
Subin Tom
68beee2a00 fix: replaced sql query with frappe.qb 2021-12-16 13:26:21 +05:30
Subin Tom
9f235526d4 fix: Validation in POS for item batch no stock quantity 2021-12-15 22:34:44 +05:30
DeeMysterio
2be62c279f
feat: provision to have limited parameters for in-process quality ins… (#28549)
* feat: provision to have limited parameters for in-process quality inspection

* chore: formatting
2021-12-15 19:41:30 +05:30
Ankush Menat
228e011819
perf: remove forcing of posting sort index on stock balance (#28902)
mysql is generally smart enough to figure out which index is better
based on cardinality of index. While posting sort index is better for
low item high # of SLE scenario it's bad for high item variety each with
lower count of SLEs.
2021-12-15 19:18:41 +05:30
Saqib
56bc8a52f4
Merge branch 'develop' into home-onboarding 2021-12-15 10:40:40 +05:30
Ankush Menat
66960cf050
fix: remove set only once from valuation method (#28876) 2021-12-14 17:12:46 +05:30
Ankush Menat
80f1a8c645
fix: incorrect logic for "Reserved Qty for Production" (#28880)
* fix: reservation for production incorrect

The query uses case to decide what fields to compute reservation on,
this case is outermost case hence the very first Work order's "Skip
transfer" is considered for ALL work orders.

Solution: move the case inside Sum.

Steps to reproduce:
1. Make work order for more than 1 qty (with | without skip transfer)
2. Create manufacture and transfer entries.
3. Keep checking reserved quantities during this process.

* test: use default warehouse for testing reservation
2021-12-14 17:02:42 +05:30
aaronmenezes
304aa44feb
fix: Nonstock item showing in Itemwise Recommended Reorder Level report (#28873) 2021-12-14 15:18:03 +05:30
Ankush Menat
534c64abcd
fix: packing slip incorrect item value (#28862) 2021-12-14 11:55:09 +05:30
Jannat Patel
74d086ffd1
Merge branch 'develop' into home-onboarding 2021-12-13 17:51:38 +05:30
Ankush Menat
75bc404cbe test: stock frozen validation 2021-12-10 12:39:38 +05:30
Ankush Menat
d37541d3fb fix: ensure that reposting is finished before freezing stock/account 2021-12-10 12:31:49 +05:30
Sagar Sharma
6485ac4e59
fix: misleading "Set Default X" fields after saving (#28798)
* fix: misleading "Set Default X" fields after saving

* refactor: remove unncessary code and minor formatting

* fix: extend to more doctypes and correct fieldnames

Co-authored-by: Ankush Menat <ankush@frappe.io>
2021-12-09 17:04:00 +05:30
Ankush Menat
c64d5028b4
fix: deduplicate after finishing the repost (#28803)
Not really a bug but avoids potential of prematurely skipping something
if failure occurs and failure isn't resolved.
2021-12-09 13:45:44 +05:30
Ankush Menat
96a019ec49 test: add multi-batch negative qty test 2021-12-08 15:52:40 +05:30
Ankush Menat
f0152d03a4 test: simplfy test and expect specific exception 2021-12-08 15:52:40 +05:30
Ankush Menat
9c90b7a40d refactor: remove redundant batch qty validation
This check was only checking total sum, which is problamatic when making
backdated entries that can cause intermediate values to go negative
while overall values stay positive.
2021-12-08 15:52:40 +05:30
Ankush Menat
5eba57528c fix: check future negative stock for batches
batch's ledger is only maintained in form of `actual_qty` on batch's
SLEs. To validate if batch has any negative qty in future, cumulative
total of `actual_qty` is required to ensure it never goes negative.
2021-12-08 15:52:40 +05:30
18alantom
1cbeba5f1d test: check execution of illegal stock entry seq 2021-12-08 15:52:40 +05:30
Ankush Menat
ca230e4267
test: index test should pass without calling function #28771
test: index test should pass without calling function

[skip ci]
2021-12-07 15:11:31 +05:30
rohitwaghchaure
fc4e6a2bed
Merge pull request #28710 from noahjacob/calc_outgoing_stock_entry
fix: incorrect outgoing rates when material_consumption enabled
2021-12-04 12:34:33 +05:30
Ankush Menat
ba5a7ffd60 fix: weird item sorting by idx 2021-12-03 19:08:06 +05:30
Ankush Menat
5caf411be3 fix: remove autocommit from item rename 2021-12-03 18:47:53 +05:30
Ankush Menat
72dbc3d6b8 fix!: dont allow renaming warehouse primary key 2021-12-03 18:47:53 +05:30
Noah Jacob
35346de162 test: added tests for manufacture stock entry when material_consumption is enabled 2021-12-03 17:21:49 +05:30
Noah Jacob
7f3e6d149a fix: incorrect outgoing rates when material_consumption enabled 2021-12-03 15:11:18 +05:30
Ankush Menat
cef84c25a7 refactor: simplify the way SLEs are submitted 2021-12-03 14:51:25 +05:30
Ankush Menat
97060c45e9 refactor: replace misleading variable name 2021-12-03 14:51:25 +05:30
Ankush Menat
a37c99a23d
fix: dont requeue repost immediately and clear progress (#28684) 2021-12-02 14:51:04 +05:30
Jannat Patel
427938f87b fix: new item form tour for home onboarding 2021-12-02 11:25:47 +05:30
Ganga Manoj
dc3449c304
Merge branch 'develop' into product-bundle-fixes 2021-12-01 23:27:40 +05:30
Sagar Vora
ab280f7142
fix: update modified timestamp for delivery note #28657
fix: update `modified` timestamp for delivery note
2021-12-01 11:01:49 +05:30
GangaManoj
a473e1dbe9 fix: Add item to packing list 2021-12-01 01:29:35 +05:30
Raffael Meyer
e10ab1626c
feat: Grant commission on certain items only (#27467)
Co-authored-by: Sagar Vora <sagar@resilient.tech>
2021-11-30 17:54:18 +05:30
Ankush Menat
aeb62af544 fix(ux): remove attachment limits 2021-11-30 12:46:53 +05:30
Saqib
c0cc72ec1d
fix: incorrect discount amount set when item is replaced (#28556) 2021-11-29 15:05:06 +05:30
Ankush Menat
c7701ace80 chore: correct docstrings 2021-11-29 13:04:29 +05:30
Ankush Menat
f862339024 fix: use get_all instead of get_list for child tables 2021-11-29 13:04:29 +05:30
Jannat Patel
8cc1dc8079
Merge branch 'develop' into home-onboarding 2021-11-29 10:24:06 +05:30
Ankush Menat
69a17b9e51
refactor: move Bin queries to qb/orm (#28522) 2021-11-27 20:07:02 +05:30
Noah Jacob
7ff30a4b2b
fix: incorrect balance for warehouses (#28583) 2021-11-26 17:33:57 +05:30
marination
dfff972a78 fix: Linter (imports) 2021-11-26 13:29:05 +05:30
Marica
26207d9517
Merge branch 'develop' into independent-manu-entry 2021-11-26 13:20:33 +05:30
marination
affb29194b test: Independent Manufacture Entry
- Check validations
- Check if FG basic rate is calculated correctly
2021-11-26 13:19:04 +05:30
Ganga Manoj
a1055d6bd3
Merge branch 'develop' into product-bundle-fixes 2021-11-25 20:00:30 +05:30
Ankush Menat
87f2dcfb59
fix: total stock summary UI glitch #28564
fix: total stock summary UI glitch
2021-11-25 19:38:44 +05:30
Ankush Menat
ed94f0f3f2 refactor: deduplicate during repost background job 2021-11-25 16:37:19 +05:30
Ankush Menat
55631dd0d6 test: item-wh deduplication in reposting 2021-11-25 16:37:19 +05:30
Ankush Menat
0d0e24a5f5 perf: skip unnecessary item-wh reposts
Using basic idea that repost with older posting date will also take care
of subsequent posting dates...

When Item-WH reposts are queued:

1. If another repost with same item-wh but older posting date exists
    then skip current one.
2. If another repost with same item-wh but newer posting date exists
    then skip another one.
2021-11-25 16:37:19 +05:30
Ankush Menat
1d3842f03a fix: dont erase voucher_type and voucher_no for item_wh repost
kept for tracability.
2021-11-25 16:37:19 +05:30
Ankush Menat
a5a8c9104f perf: index for item-sh on repost item valuation
Item-WH based reposting requires querying existing similar repost.
Assuming there is only 1 max extra entry with same params just indexing
item-WH is sufficient to speed up the query.
2021-11-25 16:37:19 +05:30
Ankush Menat
45dd46be3d feat: option to select reposting method
In current implementation selecting Item-Warehouse based reposting is
better for few users, who don't use depenent SLEs but have frequent
transactions involving same items.

This change lets them switch to item-warehouse based reposting if
required.

Only use this if you understand technicalities of stock reposting. This
is experimental but will become mainstream in coming days.
2021-11-25 16:37:19 +05:30
Ankush Menat
a36c249d3d test: item-wh repost creation 2021-11-25 16:37:19 +05:30
marination
8c9779d69d fix: Dont auto set is finished item or is scrap itm checkbox for independent entry
- System cant differentiate between scrap and FG when WO is absent, so dont auto set
- User must set it manually
- `validate_finished_goods` checks this
2021-11-25 13:23:10 +05:30
marination
d6bc121999 fix: Validate Finished Goods for Independent Manufacture entries as well
- Check if FG exists even if WO is absent
- Check if multiple FGs are there, block.
2021-11-25 13:18:58 +05:30
GangaManoj
8370042f82 fix: Reset indices in the Packed/Bundle Items table on deleting Product Bundles 2021-11-24 21:06:23 +05:30
Jannat Patel
5b2ba24563 fix: company tour 2021-11-24 19:19:45 +05:30
Saqib
136dd4f801
Merge branch 'develop' into product-bundle-fixes 2021-11-24 11:27:12 +05:30
GangaManoj
0803f87660 fix: Fix Product Bundle price calculation when there are multiple Product Bundles 2021-11-24 06:07:58 +05:30
Ankush Menat
0df9cf9526
chore: remove dead/irrelevant links from workspace (#28519)
* chore: remove dead link to shopify settings

* chore: unlink "debug" reports from stock dashboard
2021-11-23 15:08:51 +05:30
Ankush Menat
c436e30ee6 fix: don't use cached doc while reposting 2021-11-22 12:40:18 +05:30
Ankush Menat
aa024fc9da fix: ignore permissions while creating repost
If user reached this code then they already have permission to create
stock transaction, hence ignore permission checks while
creating/cancelling repost item valuation entries.
2021-11-22 12:40:18 +05:30
Ankush Menat
42f1dd98dd fix: restrict repost valuation to manager roles 2021-11-22 12:40:18 +05:30
marination
23486a929d fix: (style) Warehouse Capacity Dashboard UI
- Made refresh button icon visible
- Edit Capacity button size and alignment
- Medium font on dashboard
2021-11-17 14:21:37 +05:30
Marica
612bb5c749
Merge branch 'develop' into se-required-items-from-jc 2021-11-16 18:03:40 +05:30
marination
1bb135b2d3 fix: Sider and CI
- Incorrect path and Settings in price_list.py import due to merge
- Extra space removed in website_item.py
- Changed client side namespace to `erpnext.e_commerce.*`
2021-11-16 17:23:39 +05:30
marination
9aeb211142 chore: Remove Home Page is Products and Sider fixes
- Removed `Home Page is Products` checkbox in E Comm Settings. Can be manually set in Website Settings
- Removed hooks trigger to reset home page as products
- Sider: duplicate color attribute, shift `return` to next line, over-indentation
2021-11-16 17:21:46 +05:30
marination
80fbe16be8 test: Product Query & Filter Engine, Item Group Page
- Test for ProductQuery engine and ProductFilters engine
- Test for engine for Item Group too
- Renamed ‘product_configurator’ to ‘variant_selector’
- Cleaned up filters.py
- Modal freeze backdrop lighter only in cart, since there’s nothing over it
- Fixed unusual spacing in variant selector dialog
- Made `get_child_groups_for_website` more readable
- Replaced ‘Configure’ with ‘Select’ for variant selection
2021-11-16 17:21:17 +05:30
marination
4d254a7ad3 test: Website Item (Item full page)
- Tests for website item. Desk tests and portal tests
- Allow guests on method `get_offer_details`
- Fetch stock details only if `show_stock_availability` is enabled
- Validation for duplicate web items on item merge
- Separate method for `validate_properties_before_merge`
- Common error title and exception `DataValidationError` for merge validations on Item
2021-11-16 17:10:07 +05:30
marination
3fd929c4ee test: Website Item basic test & removed product configurator tests
- Sider fixes: missing semicolons
- Added two basic tests for Website Item
- Commented Product Configurator tests, needs to re-written fully
2021-11-16 17:09:34 +05:30
marination
64322199df fix: Remove Website Item from Item Dashboard
- Install breaks on CI, will add later
2021-11-16 17:03:58 +05:30
marination
16abfd4410 fix: Sync Website Items on Item Change, Short Website Description
- Added Short Description in Website Item for List View
- Update Website Item on Item info change
- Un-publish Web Item if Item is disabled
- Removed unnecessary dependency on Item from query engine
- Rearranged item detail fields in Website Item
- Added Link to Website Item on Item Dashboard
2021-11-16 16:55:12 +05:30
marination
f9929ed8a6 Merge branch 'develop' of https://github.com/frappe/erpnext into e-commerce-refactor-develop 2021-11-16 16:06:07 +05:30
Marica
4afcbfdc08
Merge branch 'develop' into pr-return-ux 2021-11-16 15:15:48 +05:30
marination
293f6cbafd fix: Sider, Linter and Server Side Test
- Fix Server side PR test
- linter: re-arrange imports
- sider: avoid single line multi statement
- Code cleanup: Improve code readability and avoid horizontal scroll in test_purchase_receipt
- Removed unused variables in test_purchase_receipt
2021-11-16 14:36:15 +05:30
Ahmed Shareef
952fc87c99
refactor: fix help section background in dark mode (#28406) 2021-11-16 14:30:13 +05:30
Ankush Menat
ed99aca36f test: basic test for serialize reco cancel 2021-11-16 10:00:18 +05:30
Ankush Menat
8c85012a70 fix: can not cancel stock reconciliation with sr no 2021-11-16 10:00:18 +05:30
Rohan
043e3255d6
fix: remove item-item group name validation (#28392) 2021-11-15 19:41:17 +05:30
Ankush Menat
7fcaeca403 fix: don't make naming series mandatory for items
Item variants are an exception, hence this needs to be checked
conditionally.
2021-11-15 18:18:22 +05:30
marination
05ec7cce82 test: Purchase Receipt Received Qty 2021-11-15 17:49:14 +05:30
marination
afe1c45f7f fix: Sider + Fields UX
- remove extra space (sider)
- PR: Bring rejected qty in grid view
- PI: Rename `Stock Qty` to `Accepted Qty in Stock UOM`
- PI: Move `Accepted Qty in Stock UOM` under Stock UOM
2021-11-15 17:17:29 +05:30
Marica
18f9e3558e
Merge branch 'develop' into se-required-items-from-jc 2021-11-11 11:14:37 +05:30
Ankush Menat
12e81df2b7 fix: default value for allow neg stock in repost_item_valuation
Negative stock can be toggled back after queuing transactions, this
causes failure when repost is executed.

Now allow_negative_stock stock is set at time of queuing the repost job.
This means setting changes done afterwards won't affect already
submitted reposts.
2021-11-10 13:05:14 +05:30
Ankush Menat
e498389b00 fix: ignore cancelled entries in incorrect balance qty report 2021-11-10 12:09:51 +05:30
Ankush Menat
fdfa39c231 fix: avoid mutating iterator while iterating over it 2021-11-09 18:04:50 +05:30
Marica
031178224f
Merge branch 'develop' into se-required-items-from-jc 2021-11-09 17:33:20 +05:30
marination
e8d0c25dff fix: Partial Trabsfers against JC
- Fixed transferred qty not back updating on JC if partial transfer
- Partial transfer not mapping pending qty from JC correctly in SE
- tests for above cases
- minor code cleanup
2021-11-09 17:29:29 +05:30
Anupam Kumar
092936d8ba
Merge branch 'develop' into manufacturing-work-order-stop 2021-11-09 10:51:09 +05:30
Anupam
663a7afe4d fix: get_planned_qty chnages 2021-11-09 10:50:38 +05:30
marination
5fb5a757cf refactor: (ux) Accepted/Rejected/Received Qty UX 2021-11-08 13:23:42 +05:30
mergify[bot]
c0b889b94d
fix: auto update price list rate (#28255) (#28256)
* fix: auto update price list rate

* fix: hide field when auto insert isn't enabled

(cherry picked from commit bb3957eba35a5204a1a01e412dee596532bd525e)

Co-authored-by: Sagar Sharma <63660334+s-aga-r@users.noreply.github.com>

[skip ci]
2021-11-07 17:42:51 +05:30
Ankush Menat
8fe5feb6a4 chore: remove all six compat code 2021-11-05 11:16:29 +05:30
Ankush Menat
6098e92ba9 chore: remove utf-8 compat code 2021-11-05 11:16:29 +05:30
mergify[bot]
25f647f067
fix: Bulk update of valid upto field wasn't working (bp #28242)
* fix: Bulk update of valid upto field wasn't working

Check in dates for the price list was failing because valid_upto field was string. Converting to date fixed the problem.

* chore: extend fix and cleanup whitespace

Co-authored-by: Ankush Menat <ankush@frappe.io>
(cherry picked from commit 95a5ef1d416d54ecf0f557586b341b0dce2a0b05)

Co-authored-by: fatihustaoglu <46131068+fatihustaoglu@users.noreply.github.com>
2021-11-04 21:46:48 +05:30
Marica
51fb543f67
Merge branch 'develop' into se-required-items-from-jc 2021-11-08 18:05:11 +05:30
Noah Jacob
cb064b06ad
fix: added job_card_item link in material request (#28222)
* fix: added job_card_item links in material request

* fix: add no copy to row references
2021-11-03 11:53:57 +00:00
marination
3da03028f3 fix: Pull Items that are in JC in Stock Entry against JC
- Check if items pulled in stock entry are present in Job Card
- Code cleanup and removed redundant checks

Co-authored-by: Gavin D'souza <gavin18d@gmail.com>
2021-11-03 17:05:57 +05:30
marination
48886ee705 chore: Add comment above fix for future reference 2021-11-02 15:57:41 +05:30
marination
048210a8f6 fix: Remove warehouse filter on Batch field for Material Receipt 2021-11-02 15:49:58 +05:30
Ankush Menat
1eab3a44f6 fix(ux): stock levels take time after item merge
Item merge creates a repost and depending on number of entries it can
take from 1 to n hours for it to finish. (depending upon queued up
reposts)

Added message so users don't feel confused till this operation is
finished.
2021-11-01 15:32:59 +05:30
Ankush Menat
f7ffe04a4b fix: use warehouse to find company 2021-11-01 14:13:56 +05:30
Ankush Menat
a0727b2e82 fix: pass company while fetching valuation rate
If company is not supplied and valuation rate is 0, then default
company is used for checking if perpetual inventory is enabled or not.
This makes little sense as different companies can have different
setting for perpetual inventory.
2021-11-01 14:13:56 +05:30
Ankush Menat
ff9cfe0d14 fix: sort by creation to break tie 2021-10-29 16:56:15 +05:30
Ankush Menat
f4b60a48f5 refactor: simplify sr no fetching 2021-10-29 16:56:15 +05:30
Ankush Menat
2aa019ae4c fix: fetch serial nos from ledger unconditionally 2021-10-29 16:56:15 +05:30
Noah Jacob
deb6b38fab refactor: replaced db.sql with qb 2021-10-29 16:56:15 +05:30
Noah Jacob
b44945380d fix: incorrect amount of serial_nos fetched 2021-10-29 16:56:15 +05:30
Ankush Menat
b01635e1da
refactor!: remove hub #28117
refactor!: remove hub
2021-10-28 14:07:15 +05:30
Ankush Menat
5902762ec8 fix(ux): alternative item two way validation 2021-10-27 19:46:06 +05:30
Saqib
879a1fca76
perf(minor): improve sales invoice submission (#27916)
* perf: skip get_pricing_rules if no pricing rule exists

* perf: fetch mode of payments data in single query

* perf: get total company stock only for purchase order

* perf: skip insertion of stock ledger entry

* fix: undo changes to allow negative stock flag

* fix: sider

Co-authored-by: Ankush Menat <ankushmenat@gmail.com>
Co-authored-by: Ankush Menat <ankush@iwebnotes.com>
2021-10-27 11:42:50 +05:30
Ankush Menat
479ecb8de0 test: picklist item grouping 2021-10-27 11:10:52 +05:30
Ankush Menat
6942900555 refactor: use defaultdict and enumeration 2021-10-27 11:10:52 +05:30
Diksha Jadhav
f2d136e574 feat(pick list): group items based on item code and warehouse before printing picklist 2021-10-27 11:10:52 +05:30
Noah Jacob
fdaf93f76c
refactor: shows opening balance from filtered from_date (#26877)
* refactor: shows opening balance from filtered from_date

* refactor: opening balance considered from filtered from_date in stock ledger

* fix: check if stock reco is opening and misc cleanups
2021-10-23 21:04:42 +05:30
Alan
2849297471
refactor: move process loss report to manufacturing (#28043)
* refactor: move process loss report to manufacturing

* test: fix process loss report test

Co-authored-by: Ankush Menat <ankush@iwebnotes.com>
2021-10-21 11:07:47 +05:30
Ankush Menat
da3635b94f test: execute manufacturing reports 2021-10-20 20:35:11 +05:30
Ankush Menat
126ba16740 fix: remove debug from query 2021-10-20 20:35:11 +05:30
marination
a9341672cf test: Include serial no with spaces in it in sanitation test 2021-10-14 19:49:13 +05:30
Shariq Ansari
790c1cda6f
fix: Removing unused fields from workspace JSON files #27612
fix: Removing unused fields from workspace JSON files
2021-10-13 16:18:20 +05:30
Ankush Menat
4ebae7c5dc
Merge branch 'develop' into optimize-get-item-details 2021-10-12 20:39:49 +05:30
Ankush Menat
7bafa11d57
fix: undo changes to allow negative stock flag 2021-10-12 20:39:10 +05:30
Deepesh Garg
6f107da165
perf: Add indexes in stock queries and speed up bin updation #27758
perf: Add indexes in stock queries and speed up bin updation
2021-10-12 20:15:55 +05:30
marination
fd6f3c6b88 Merge branch 'develop' of https://github.com/frappe/erpnext into e-commerce-refactor-develop 2021-10-12 18:24:21 +05:30
marination
71f4b98d0c chore: Sider and Semgrep 2021-10-12 17:52:54 +05:30
marination
3d5f029e51 fix: Sider and Tests 2021-10-12 17:33:22 +05:30
marination
22f41a17b7 chore: Removed Shopping Cart Module
- Moved all files and web templates from Shopping Cart to E-commerce module
- Made Shopping Cart module obsolete
- Moved select E-commerce related files from Portal to E-commerce module
- Minor cleanups
- Fixed Shopping Cart and Product Configurator tests
2021-10-12 16:54:11 +05:30
Ankush Menat
8d69ec72a6 fix: remove transaction commit from tests 2021-10-12 16:17:15 +05:30
Ankush Menat
acdb26a4bb refactor: rollback after full test 2021-10-12 16:17:15 +05:30
Ankush Menat
06fa35a9c1 test: add custom TestCase class and use in stock 2021-10-12 16:17:15 +05:30
marination
37a246e738 chore: Patches for Website Item
- Patch to make website item from item
- Patch to move Products and Shopping Cart Settings into E Commerce Settings
- Patch to move products in Homepage from Item to Website Item
- Minor cleanup, replacing/removing references to Item website fields (obsolete)
2021-10-12 16:16:17 +05:30
marination
f1ce418bdc fix: Hide Attribute filters if 'Hide Variants' is enabled in E Commerce Settings
- Hide Attribute filters if 'Hide Variants' is enabled in E Commerce Settings
- Consider 'Hide Variants' in ProductQuery Engine
- Added docstrings
- Remove `get_e_commerce_settings`, redundant
2021-10-12 16:09:50 +05:30
marination
b38339c979 fix: Sider and indexing (minor) 2021-10-12 16:06:13 +05:30
marination
025574d9b5 chore: Removing Item's Website section & references
- Removed old onboarding slide json and `create_onboarding_docs` methods
- Removed website sections from Item master
- Removed references to item website fields
- Shifted Item doctype website methods to Website Item
- Removed WebsiteGenerator from Item doctype
- Website Items in Homepage Products section
- Removed redundant code from item_group.py
- Fix: Item field filters won’t appear in website
2021-10-12 16:03:19 +05:30
marination
eef9cf152f chore: Drive E-commerce via Website Item
- Removed Shopping Cart Settings
- Portal fully driven via E Commerce Settings
- All Item listing querying will happen via ProductQuery engine only
- Product Listing via Website Items
- removed redundant code
- Moved all website logic from Item to Website Item
2021-10-12 15:48:06 +05:30
marination
939b0dd67d feat: E-commerce Refactor
- Created "Website Item" to handle website related information
- Publishing Item new flow
- Created "E Commerce Settings"
- Removed Products Settings
2021-10-12 15:16:21 +05:30
Saqib Ansari
c7fc609236 perf: skip insertion of stock ledger entry 2021-10-12 13:30:40 +05:30
Saqib Ansari
eb3aae870f perf: get total company stock only for purchase order 2021-10-12 13:29:32 +05:30
Noah Jacob
4bbe434d43
Merge pull request #27800 from noahjacob/buy_on
refactor: updated buying onboarding tours.
2021-10-11 15:33:58 +05:30
Ankush Menat
6019f60d0a
fix(perf): index creation on voucher_detail_no (#27866)
voucher_detail_no is supposed to have an index, it was added on
on_doctype_update function of table, however this function is only
called if DocType itself is updated and `on_update` is called on
DocType. Stock ledger Entry doctype hasn't changed since addition of
this index in function.

Before: Lack of this index was causing full table scan in
get_future_sle_to_fix function. (~50 seconds in a reposting job)

After: Single row is fetched (~0.5 second in full reposting job)

Learnings:
1. Add simple indexes via doctype only
2. For complex indexes always change doctype.json file for it to take
   effect.
2021-10-08 16:12:15 +05:30
Deepesh Garg
fabbf68e0e
Merge pull request #27872 from 18alantom/fix-make-billing-address-not-read-only
fix: remove readonly from billing address
2021-10-08 15:07:15 +05:30
18alantom
41fefa356f fix: remove readonly from billing address 2021-10-08 14:31:13 +05:30
Chillar Anand
772d4753e7
refactor: Clean up mutable defaults and add CI check (#27828)
* refactor: Clean up mutable defaults and add CI check
2021-10-06 16:58:48 +00:00
Alan
d4b2471cea
fix: use ceil in case of whole uoms for reorder qty (#27834)
* fix: use ceil in case of whole uoms for reorder qty

* fix: cache uom query
2021-10-06 18:16:33 +05:30
mergify[bot]
233bf5dd29
fix: using DN for transfer w/o internal customer (backport #27798) (backport #27805) (#27807)
* fix: using DN for transfer w/o internal customer (backport #27798) (#27805)

* fix: using DN for transfer w/o internal customer (#27798)

This used to be work before though not "advertised", since a lot of
users have started using it as feature, it can't be broken now.

(cherry picked from commit df1f8fddf6e2f4106c1a2778614ba9a1dc5ff67e)

* fix(ux): use toast instead of popup

Co-authored-by: Ankush Menat <ankush@iwebnotes.com>
(cherry picked from commit fa944382c53bdeeb92f2dcc876e2c11ed03e20cc)

# Conflicts:
#	erpnext/accounts/doctype/sales_invoice/test_sales_invoice.py

* fix: resolve conflict

* fix: resolve conflicts

Co-authored-by: mergify[bot] <37929162+mergify[bot]@users.noreply.github.com>
Co-authored-by: Ankush Menat <ankush@iwebnotes.com>
2021-10-05 16:16:21 +05:30
Noah Jacob
3132dcd94a
fix: batch_no not mapped from PR to Stock Entry (#27794) 2021-10-05 14:40:40 +05:30
Noah Jacob
f5e0cad6a1 refactor: updated onboarding cards and tours 2021-10-05 13:24:22 +05:30
Alan
7da777880b
fix: add (uom, brand) Item details in an Item Price (#27561)
* fix: add (uom, brand) and update (uom) Item details in an Item Price

* fix: order of query interpolation args

Co-authored-by: Marica <maricadsouza221197@gmail.com>

* fix: named interpolation, remove item price

* fix: sql error

Co-authored-by: Marica <maricadsouza221197@gmail.com>
Co-authored-by: Ankush Menat <ankush@iwebnotes.com>
2021-10-05 12:35:23 +05:30
Alan
5c372202d5
fix: set item uom as stock_uom if it isn't set (#27623)
* fix: set item uom as stock_uom if it isn't set
2021-10-04 22:38:04 +05:30
Ankush Menat
a04f9c904e
fix: option to limit reposting in certain timeslot (#27725) 2021-10-01 13:05:36 +05:30
Ankush Menat
4685ed5a8c
fix: distribution of additional costs in mfg stock entry (#27629)
* refactor: remove unnecessary list comprehensions

* fix: correct cost distribution logic

While apportioning costs same condition should be present on both sides
so total value is representative of all items to be apportioned.

Here while calculating incoming_items_cost only FG items are considered,
but while apportioning all items with to_warehouse are considered.

Solution: only apportion additional cost on FG items

* test: test cost distribution

* fix: patch for additional cost

fix(patch): consider PCV while patching

- consider Period closing voucher while patching
- recomute rates for SLE of affected stock entries

consider only FG/scrap item SLEs for recomputation of rates

* fix: remove client side logic for addn cost

All of this is done in python code hence removed client side code.
2021-09-30 09:58:59 +05:30
Deepesh Garg
b39f8a6215
fix: Ignore user permission for Represents Company field in Sales and Purchase docs (#27684)
* fix: Ignore user permission for Represents Company field in Sales and Purchase docs

* fix: Ignore user permission for fiscal year company
2021-09-29 15:54:35 +05:30
Alan
b91333afdd
fix: set item.qty as mandatory in picklist (#27680) 2021-09-28 06:41:37 +00:00
rohitwaghchaure
bf2a590332
fix: View Stock / Accounting Ledger button not showing in the stock entry (#27570) 2021-09-17 18:39:21 +05:30
Saqib
e03d9aa889
fix: unecessary keyword args were passed in mapper functions (#27563) 2021-09-17 13:03:27 +05:30
Marica
41f11eca72
fix: Remove duplicates from customer_code field (#27555) 2021-09-17 10:27:29 +05:30
Saqib
5eba1ccd51
fix: no validation on item defaults (#27393)
* fix: no validation on item defaults

* fix: cache value while validating

* test: item default company relation

* fix: reorder validations

* refactor: add guard conditions on update_defaults

* test: add default warehouse for item group

* fix: validate item defaults for item groups

Co-authored-by: Ankush Menat <ankush@iwebnotes.com>
2021-09-16 17:31:37 +05:30
Marica
9b388883d3
fix: Validate if item exists on uploading items in stock reco (#27538)
* fix: Validate if item exists on uploading items in stock reco

- Uploading non existent item in stock reco and then changing warehouse or batch gave an error
- Check for non existent item

* chore: translation

Co-authored-by: Ankush Menat <ankushmenat@gmail.com>
2021-09-16 15:47:17 +05:30
rohitwaghchaure
e6a1ad8016
fix: not able to submit stock entry with 350 items (#27523) 2021-09-15 20:42:47 +05:30
Ankush Menat
70c203d19e
test: automated test for running all stock reports (#27510)
* test: automated test for running all stock reports

These test do not assert correctness, they just check that "execute" function
is working with sane filters.

* test: make report execution test modular
2021-09-15 19:24:35 +05:30
Frappe PR Bot
d4d5e2786f
fix: Maintain same rate in Stock Ledger until stock become positive (#27227) (#27478)
* fix: Maintain same rate in Stock Ledger until stock become positive

* fix: Maintain same rate in Stock Ledger until stock become positive

(cherry picked from commit 10754831c33b3459d5a45c98f875afa48a444627)

Co-authored-by: Nabin Hait <nabinhait@gmail.com>
2021-09-15 17:07:58 +05:30
rohitwaghchaure
c5a77f60ed
feat: provision to add scrap item in job card (#27483) 2021-09-15 16:45:57 +05:30
Marica
de9f78350b
Merge branch 'develop' into job-card-excess-transfer 2021-09-14 16:50:06 +05:30
marination
9520215e2b feat: Handle Excess/Multiple Item Transfer against Job Card
- Hide MR/Material Transfer buttons in JC if cancelled
- Show MR/Material transfer buttons if pending to transfer or excess transfer allowed
- Renamed ‘Transferred Qty’ to ‘FG Qty from Transferred Raw Materials’ in JC
- Set status to Completed in JC in case of excess transfer too
- During excess transfer against JC, avoid negative ‘For Quantity’. Set to 0 instead
- Job card section and excess transfer allowance checkbox in Manufacturing Settings
- Renamed ’Allow Multiple Material Consumption’ to ‘Allow Continuous Material Consumption’ (fiedname is same)
- Secured denominator variables in `get_transfered_raw_materials` to avoid ZeroDivisionError
2021-09-14 12:33:21 +05:30
Saqib
7292f5476d
feat: (get_items_from) filter material request item in purchase order (#27449) 2021-09-13 12:13:43 +05:30
Ankush Menat
d743c41b54
fix(ux): apply proper filtering in stock reports (#27411)
* fix(ux): apply proper filtering in stock reports

Stock Balance: apply company filter to warehouse field
Stock Ageing: apply company filter to warehouse field

* fix: unnecessary parens

Co-authored-by: Alan <2.alan.tom@gmail.com>
2021-09-12 16:38:18 +05:30
Ankush Menat
6ef879fca2
fix(ux): clean invalid fields from variant setting (#27412) 2021-09-12 16:36:51 +05:30
Marica
61a1356109
fix: Check if Item is serialised before trying to fetch SN and set SO in it (#27358) 2021-09-07 14:42:17 +05:30
Marica
0f2a52078c
fix: Dont fetch Stopped/Cancelled MRs in Stock Entry Get Items dialog (#27326) 2021-09-06 13:14:09 +05:30
rohitwaghchaure
7b4a65484a
fix: manually added weight per unit reset to zero after save (#27330) 2021-09-03 22:00:14 +05:30
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
a158b825fc
Merge pull request #27124 from GangaManoj/gross-profit-product-bundle
feat: Improve Product Bundle handling
2021-09-02 11:12:56 +05:30
Ankush Menat
81eb6fde07
Merge pull request #27288 from ankush/strict_linting
chore: cleanup linting errors and introduce strict linting checks
2021-09-01 19:32:49 +05:30
Marica
9506c14d35
fix: Zero division error while fetching unconsumed materials (#27293)
`
2021-09-01 18:49:12 +05:30