fix: carry item-level project to Purchase Receipt GL entries (#56568)
Purchase Receipt stock and asset GL lines used the item row's cost center
but always fell back to the document-level project, unlike Purchase Invoice
which uses the item-level project. add_gl_entry accepted a project argument
but never wrote it to the GL dict, so the inward, Stock Received But Not
Billed, landed cost, divisional loss, sub-contracting and exchange rate
lines dropped the row's project.
Write project into the GL dict and pass project=item.project on the entries
that were missing it, so project behaves like cost center and matches
Purchase Invoice.
Ticket: 72523
(cherry picked from commit 6f97c7199c)
Co-authored-by: Jatin3128 <140256508+Jatin3128@users.noreply.github.com>
* refactor: posting datetime for SABB (backport #49710 + #50248)
Backport of #49710 "refactor: posting datetime for SABB" to
version-15-hotfix, including the regression fix#50248
"fix: missed refactoring code".
Replaces Serial and Batch Bundle's `posting_date`/`posting_time` with a
single `posting_datetime` field and updates all readers/writers; adds a
patch to populate `posting_datetime` from the linked Stock Ledger Entry
and drop the now-unused single-column indexes.
Adapted to version-15-hotfix where the surrounding stock code had already
moved to `posting_datetime` (SLE) and diverged from develop.
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
* chore: fix conflicts
* chore: fixed formatting
---------
Co-authored-by: Claude Opus 4.8 <noreply@anthropic.com>
Backport of #55830 to version-15.
Allow creating a Quality Inspection from Stock Entries of any purpose
(not just Manufacture). check_item_quality_inspection now returns the
items for Stock Entry, and the inspection type is resolved as "Incoming"
for Manufacture / Material Receipt and "Outgoing" otherwise.
Ref: #70945
fix: incorrect inventory dimension for material transfer (#47592)
(cherry picked from commit 738cb6a0c1)
Co-authored-by: rohitwaghchaure <rohitw1991@gmail.com>
* feat: change sabb qty automatically incase of internal transfer PR if sabb only has 1 batch
* fix: prevent creation of SABB on every save
* perf: optimize code
* fix: remove unnecessary conditon
* refactor: change if to elif
* fix: remove dn_item_qty and set to item.qty
* test: added test
(cherry picked from commit 47927b38a9)
Some queries still use "timestamp" function instead of "posting_datetime". In my instance single stock entry cancel ends with request timeout. Using "posting_datetime" field directly improves the situation.
cont: https://github.com/frappe/erpnext/pull/46293
(cherry picked from commit ddbb44c6a2)
fix: valuation rate for sales / purchase return for serial / batch nos (#43925)
(cherry picked from commit 01bb1612da)
Co-authored-by: rohitwaghchaure <rohitw1991@gmail.com>
fix: auto serial and batch bundle not creating for Asset Capitalization (#42231)
(cherry picked from commit 5f53ad3117)
Co-authored-by: rohitwaghchaure <rohitw1991@gmail.com>