256 Commits

Author SHA1 Message Date
s-aga-r
2d8363a983
feat: Serial and Batch reservation (#35946)
* feat: add `Has Serial No` and `Has Batch No` fields in SRE

* chore: set `Has Serial No` and `Has Batch No` while creating SRE

* feat: add field `Reserved Serial and Batch` in SRE

* fix(ux): hide `Amend` button on cancelled SRE

* fix: add validation for SRE amended doc

* fix(ux): hide `Reserved Serial and Batch` Table for non-serial/batch item

* fix(ux): set `Display Depends On` for `Has Serial No` and `Has Batch No` in SRE

* fix(ux): make `serial_no` and `batch_no` fields read-only based on `has_serial_no` and `has_batch_no`

* chore: remove table `Serial and Batch Entry` fieldlabel

* fix(ux): set warehouse for new row

* fix(ux): make qty field read-only for serial item

* fix(ux): set rows qty to `1` before making the field read-only

* chore: add filters for serial no

* chore: add filters for batch no

* chore: don't show Serial NO if already selected

* chore: hide rate related fields

* feat: add field `Reservation Based On` in SRE

* chore: make `Reserved Qty` field editable in SCR

* chore: add method to get total reserved qty against a voucher

* fix: add validation for `Reserved Qty`

* fix: update SRE status and Voucher's Reserved Qty

* chore: enable `Track Changes` in SRE

* fix: add validation to prevent delivered SRE to get updated

* fix(ux): make fields `Reserved Qty` and `Reservation Based On` read-only for delivered SRE

* fix: consider voucher's delivered qty while calculating max reserved qty

* fix: add UOM validation for SRE Reserved Qty

* fix: SRE warehouse mismatch error in DN

* fix: auto cancel SRE on update if item is fully delivered for the SO

* fix: skip SRE creation for group warehouse

* feat: add `Set Warehouse` field in SO stock reservation dialog

* fix(ux): hide `Add Row` button in SO stock reservation dialog

* fix: group warehouse validation in SO

* fix(ux): don't show Batch No if already selected

* feat: add field `Auto Reserve Serial and Batch Nos` in `Stock Settings`

* refactor: SRE reserved qty validation

* feat: auto serial and batch reservation

* chore: add section for `Serial and Batch Reservation` in `Stock Settings`

* fix: make SRE sb_entries warehouse mandatory

* fix(ux): unreserved qty calculation

* fix: add validation for `Reserved Qty` against `Batch`

* refactor: combine `get_available_qty_to_reserve()` and `get_available_qty_to_reserve_batch()`

* fix: validate disabled batch

* fix: add validation to validate serial nos availability

* fix: update row qty if `Partial Reservation` is enabled

* fix: ignore reserved serial nos while getting available serial nos

* fix: add validation to prevent repeat batches

* fix(ux): add validation for duplicate Serial No

* fix: don't allow to update SRE with delivered stock

* fix: ignore reserved serial and batch if reservation based on is not Serial and Batch

* fix(ux): stock un-reservation confirmation before `Update Items`

* chore: return list instead os set

* feat: add field `Delivered Qty` in `Serial and Batch Entry`

* feat: option to get SO reserved stock in Delivery Note

* fix: ignore reserved batches while getting available batches

* chore: `conflicts`

* fix: incorrect available qty

* fix: 'str' object has no attribute 'nodes_'

* fix: `linter`

* fix(ux): hide `Get Items From > Stock Reservation` if Stock Reservation is disabled

* fix(ux): add `depends_on` for `Auto Reserve Serial and Batch Nos`

* fix(ux): hide Stock Reservation field description in submitted SO

* fix(ux): confirm before unreserve stock

* feat: option to create DN for reserved stock from SO

* fix: update delivered qty in SRE sb_entries

* fix: Delivery Note (Reserved Stock) based on Delivery Date

* fix(ux): SO `Update Items` confirmation on `Update` button click

* feat: add dialog box to select SRE to unreserve

* fix: `ZeroDivisionError` while saving the DN (Reserved Stock)

* fix: don't allow to create Pick List if stock is reserved against SO

* fix(ux): hide Create > Pick List button for SO with reserved stock

* refactor: map reserved stock by default in DN

* refactor: code cleanup and comments

* fix: don't allow Stock Reservation against SO having Pick List

* refactor: `create_stock_reservation_entries()`

* feat: add fields to hold Pick List ref in SRE

* feat: add field `Stock Reserved Qty` in Pick List Item

* feat: provision to reserve stock from Pick List against Sales Order

* fix: don't allow to update SRE if created against a Pick List

* fix(ux): confirm before unreserve stock in Pick List

* fix: don't allow to update Pick List having reserved stock

* fix: circular dependency while cancelling the DN created from Pick List with Reserved Stock

* chore: update `Max Reserve Qty` err msg to be more descriptive

* refactor: rename field `Reserve Stock on Sales Order Submission`

* fix: msg on partial reservation if disabled in stock settings

* chore: add field description for `Enable Stock Reservation`

* fix(test): `test_stock_reservation_against_sales_order`

* fix(test): `test_stock_reservation_against_sales_order`

* test: add test cases for serial and batch reservation

* fix: batch stock levels qty

* refactor: method `get_sre_reserved_qty_for_item_and_warehouse`

* feat: show `Reserved Stock` in item master stock levels

* feat: Reserved Stock Report

* fix(ux): SO stock reservation dialogs width

* refactor: get previous values from `_doc_before_save` instead of db

* fix(ux): make `Reservation Based On` read-only if created against Pick List

* feat: option to open `Reserved Stock` report from Sales Order

* fix(ux): Sales Order - Reserve and Unreserve dialog box

* fix: decrease SRE Delivered Qty on DN cancel

* fix(ux): hide `Unreserve` button once reserved stock is delivered

* chore: `linter`

* fix(test): `test_reserved_stock_report`

* test: add test case for DN cancellation

* chore: rename field `Auto Reserve Stock on Sales Order Submission`

* fix: `Insufficient Stock` error msg
2023-09-02 11:02:24 +05:30
mergify[bot]
87d02511a3
fix: timeout error coming during reposting (backport #36715) (#36717)
fix: timeout error coming during reposting (#36715)

(cherry picked from commit 620b21fec59e40178fde96085003d419804f21e0)

Co-authored-by: rohitwaghchaure <rohitw1991@gmail.com>
2023-08-19 15:37:33 +05:30
Ankush Menat
c0642cf528
fix: only publish repost progress to doc subscriber (#36400)
Huge size of string gets blasted to everyone on site. Due to some memory
leak (cause unknown) till sockets are open the strings are also in
process' memory.

related https://github.com/frappe/frappe/issues/21863
2023-07-29 09:32:11 +00:00
Rohit Waghchaure
c16a5814d4 fix: circular dependency during reposting causing timeout error 2023-07-11 17:51:44 +05:30
Rohit Waghchaure
b77a808921 fix: reposting has not changed valuation rate
(cherry picked from commit c0c693d8b0faf42089314cf43f4fc117f45de4b4)

# Conflicts:
#	erpnext/stock/doctype/purchase_receipt/test_purchase_receipt.py
2023-07-02 05:13:29 +00:00
s-aga-r
6a1b0a2fab fix: update Stock Reconciliation diff qty while reposting 2023-06-15 11:39:22 +05:30
s-aga-r
db159dd11f fix: Stock Reconciliation document update while reposting 2023-06-12 18:28:16 +05:30
Rohit Waghchaure
bb95451db6 feat: added jinja method get_serial_or_batch_nos for print format and new print format 'Purchase Receipt Serial and Batch Bundle Print for reference 2023-06-02 17:14:18 +05:30
Rohit Waghchaure
42b229435c fix: stock reco test case for serial and batch bundle 2023-06-02 17:14:18 +05:30
Rohit Waghchaure
48fbf99e6d fix: travis for sales and purchase invoice 2023-06-02 17:14:17 +05:30
Rohit Waghchaure
d3ceb07936 fix: travis 2023-06-02 17:14:17 +05:30
Rohit Waghchaure
c2d7461d3c fix: travis issue 2023-06-02 17:14:17 +05:30
Rohit Waghchaure
467046436b refactor: serial no ledger and batchwise balance history report 2023-06-02 17:14:16 +05:30
Rohit Waghchaure
5bb3173676 refactor: rename doctype serial and batch ledger to serial and batch entry 2023-06-02 17:14:15 +05:30
Rohit Waghchaure
e6143abb8a refactor: added new file serial batch bundle 2023-06-02 17:14:14 +05:30
Rohit Waghchaure
6c9b212dd1 fix: removed sales and purchase fields from serial nos 2023-06-02 17:14:14 +05:30
s-aga-r
88a3f65d3d fix: update Stock Reconciliation document while reposting
(cherry picked from commit cc95cedfee3c09037a97574ca1a04b2d98c72965)
2023-06-01 15:55:28 +00:00
rohitwaghchaure
fe6a0a6c30
Merge pull request #35498 from rohitwaghchaure/fixed-db-binlogs-getting-full
fix: old data reposting causing low server disk space
2023-06-01 19:28:03 +05:30
Rohit Waghchaure
fb1a40cada fix: old data reposting causing low server disk space 2023-05-31 18:20:56 +05:30
rohitwaghchaure
4099330bf4
Merge pull request #35426 from rohitwaghchaure/fixed-incorrect-actual-qty-bin
fix: incorrect available quantity in BIN
2023-05-26 22:47:42 +05:30
Rohit Waghchaure
718ad3f240 fix: travis 2023-05-26 11:29:22 +05:30
Rohit Waghchaure
9e5e2de5d5 fix: incorrect available quantity in BIN 2023-05-25 23:56:23 +05:30
rohitwaghchaure
565322daba
Merge branch 'develop' into stock-reservation 2023-05-24 14:32:04 +05:30
Sagar Sharma
b22f9a234b
Merge branch 'develop' into FIX-ISS-23-24-00368 2023-05-12 11:55:12 +05:30
Sagar Sharma
9c72c2a6cb refactor: use calculate_items_qty_and_amount() to update scr items rate 2023-05-12 11:50:27 +05:30
Sagar Sharma
12785101d9
Merge branch 'develop' into stock-reservation 2023-05-08 16:47:40 +05:30
Rohit Waghchaure
b5a2ccf21d fix: internal transfer condition 2023-05-04 15:38:35 +05:30
s-aga-r
7548bb3fbe Merge branch 'develop' into stock-reservation 2023-05-03 12:06:11 +05:30
s-aga-r
a6cb6c6f47 fix: recalculate costs in SCR while reposting 2023-05-03 11:33:52 +05:30
Rohit Waghchaure
2d5ccc07b1 fix: timeout error while submitting delivery note 2023-05-01 21:17:18 +05:30
Sagar Sharma
58dbf7fc24
Merge branch 'develop' into stock-reservation 2023-04-24 22:58:16 +05:30
rohitwaghchaure
291845e461
Merge pull request #35015 from rohitwaghchaure/incorrect-or-cond-delivery-note-issue
fix: incorrect OR condition causing timeout error (For more than 50 line items)
2023-04-24 18:06:59 +05:30
Rohit Waghchaure
379b215aea fix: incorrect OR condition causing timeout error 2023-04-24 17:32:32 +05:30
Rohit Waghchaure
f2253dd645 fix: duplicate reposting entries of same voucher 2023-04-22 11:16:12 +05:30
s-aga-r
0cd10a50d2 Merge branch 'develop' into stock-reservation 2023-04-22 10:04:46 +05:30
s-aga-r
7e8fd8f324 chore: update reserved stock SLE validation 2023-04-21 17:44:44 +05:30
Deepesh Garg
ea6eeace80
fix: filtering via batch no(#34950)
* fix: filtering via batch no
2023-04-20 12:48:44 +05:30
Rohit Waghchaure
fcfa8842a7 fix: limit stock reco issue 2023-04-20 09:48:15 +05:30
s-aga-r
73f16752a6 chore: conflicts 2023-04-17 15:33:55 +05:30
Rohit Waghchaure
6bccd8644e fix: stock reco test case 2023-04-17 14:22:35 +05:30
Rohit Waghchaure
d9dd64b4d2 fix: linters issues 2023-04-16 23:25:51 +05:30
Rohit Waghchaure
7bfc8f1236 fix: too many writes error while making backdated stock reconciliation 2023-04-14 15:12:58 +05:30
s-aga-r
f0acb2049b fix: don't allow to deliver/transfer reserved stock 2023-04-12 14:13:54 +05:30
Rohit Waghchaure
6851b5ba97 fix: reposting record not created for backdated stock reco 2023-04-11 14:35:33 +05:30
Rohit Waghchaure
ef4bd77196 fix: incorrect stock balance quantity for batch item 2023-04-05 00:02:45 +05:30
rohitwaghchaure
7d794bc70a
Merge branch 'develop' into fixed-negative-stock-error 2023-02-04 22:35:58 +05:30
Rohit Waghchaure
6d513e2519 fix: negative stock error 2023-02-02 18:40:15 +05:30
Rohit Waghchaure
f8c852c54c fix: incorrect actual qty in Bin 2023-02-01 17:49:11 +05:30
Rohit Waghchaure
ef2bf3c223 fix: don't check other warehouse ledgers to calculate valuation rate 2023-01-10 10:59:50 +05:30
Rohit Waghchaure
a05c47e499 fix: timeout error while submitting stock entry
Co-authored-by: Ankush Menat <ankush@frappe.io>
2022-12-23 13:27:32 +05:30