Commit Graph

60403 Commits

Author SHA1 Message Date
Mihir Kandoi
bde118e7cf fix(manufacturing): exclude corrective job cards from semi-FG aggregate 2026-07-28 11:09:36 +05:30
Mihir Kandoi
5548f0726a fix(manufacturing): sum semi-FG qty across split job cards
update_semi_finished_good_details assigned the current job card's
manufactured_qty to Work Order.produced_qty instead of accumulating it,
so a second job card on the same operation overwrote the first. Nothing
corrected it afterwards because StatusService.update_work_order_qty
returns early for track_semi_finished_goods work orders, leaving the
work order stuck below its planned qty with no way to progress.

Aggregate manufactured_qty and completed_qty over the operation's
submitted job cards instead.
2026-07-28 11:04:17 +05:30
Shllokkk
14fd045555 Merge pull request #57471 from Shllokkk/routing-hour-rate-operating-cost
fix: update operating cost when propagating workstation hour rate to routing
2026-07-28 10:50:06 +05:30
Mihir Kandoi
43acbae5a1 Merge pull request #57493 from aerele/fix-subcontracting-title-template
fix: stop storing raw title template on subcontracting orders
2026-07-28 10:41:59 +05:30
Shllokkk
a5250d8e80 Merge branch 'develop' into routing-hour-rate-operating-cost 2026-07-28 01:33:50 +05:30
Sudharsanan Ashok
73224d3650 fix(stock): keep manufactured item rate at zero when inputs are free (#57334)
* fix(stock): keep manufactured item rate at zero when inputs are free

when a finished item is produced from raw materials consumed at zero
valuation, the incoming rate fell back to the item's own valuation
rate (or BOM cost), valuing free inputs as output and inflating the fg
value on every production run.

add has_consumption_basis() to detect when the consumed cost is known
even if it is zero (consumed rows present, or a consumption entry
exists for the work order). when it is, skip the get_valuation_rate and
BOM-cost fallbacks so a real cost of zero is preserved.

* test(stock): cover manufacture rate for zero-valued raw materials

- manufacture from a free input keeps fg basic_rate and sle
  incoming_rate/stock_value_difference at zero even when the fg already
  carries a valuation in the target warehouse
- material consumption on with no consumption entry does not fall back
  to bom/price-list rate for free inputs
- zero-valued consumption entry keeps the manufacture entry's fg rate
  at zero
2026-07-27 23:35:00 +05:30
Sudharsanan Ashok
d37e905322 fix(stock): value batched packed-item returns from the original bundle (#57327)
* fix(stock): value batched packed-item returns from the original bundle

when a return delivery note or sales invoice bundle is built via the
use_serial_batch_fields / sle-driven path, its voucher_detail_no keeps the
packed item instead of being remapped to the parent dn/si item. the return
valuation lookup then misses and the bundle values at zero, so the sle
stock_value_difference stays wrong even after a repost.

resolve the original dn/si item via the packed item's parent_detail_docname
when the direct lookup fails, so the return values from the original outward
bundle on both submit and repost.

* test(stock): cover batched packed-item return valuation on repost
2026-07-27 23:33:41 +05:30
Diptanil Saha
28c96999e2 fix(quotation): carry forward communications from opportunity (#57507) 2026-07-27 23:29:57 +05:30
Sudharsanan Ashok
425191e57e fix(stock): narrow legacy serial ledger lookup by item (#57499)
Filter legacy Stock Ledger Entry lookups by item code so the existing
item and warehouse index can reduce rows scanned during serial valuation.
2026-07-27 21:40:44 +05:30
ruthra kumar
05a15dff71 Merge pull request #57500 from frappe/mergify/bp/develop/pr-57484
fix(test): flaky test in exchange rate revaluation (backport #57484)
2026-07-27 17:21:41 +05:30
ruthra kumar
4e77c9d6e6 fix(test): flaky test in exchange rate revaluation
- remove redundant setup on system settings

(cherry picked from commit 484ff8e349)
2026-07-27 11:40:37 +00:00
Raffael Meyer
bdf586c670 fix: error message wording (#57495) 2026-07-27 11:15:18 +00:00
Mihir Kandoi
3f93887ec8 Merge pull request #57492 from frappe/production-plan-recalculate-bin
fix: recalculate whole bin in Production Plan reservation patch
2026-07-27 16:01:04 +05:30
Mihir Kandoi
88b02130e7 fix: recalculate whole bin for Production Plan raw material items
projected_qty is derived from every bin quantity, so refreshing only
reserved_qty_for_production_plan leaves it stale wherever another field
had drifted. Call Bin.recalculate_values() instead.

Renamed so the patch re-runs on sites that already applied
recompute_production_plan_reserved_qty.
2026-07-27 15:26:25 +05:30
Raffael Meyer
8b37c52187 fix(crm): align Opportunity status checks with Quotation statuses (#57489) 2026-07-27 09:20:22 +00:00
Mihir Kandoi
70fa8c0c2a Merge pull request #57485 from frappe/stock-ageing-batch-slot-pooling
fix: pool batch slot values on every run, not only when negative
2026-07-27 13:53:23 +05:30
Mihir Kandoi
545262c5d4 test: assert batch pooling preserves the group total on a repeating rate 2026-07-27 13:42:25 +05:30
Mihir Kandoi
cedaaa3a00 fix: pool batch slot values on every run, not only when negative
A batch is one valuation pool, so any per-slot value difference within a
batch is stale detail from the report's own age slots, not real valuation.
The rebalance only ran when consumption had already driven a slot negative,
so a batch whose receipts landed at different rates kept a skewed split
across age buckets (one bucket free, another double-priced) while the total
stayed correct.

Drop the negative-slot precondition and always spread a batch's pooled value
over its slots in proportion to qty. Redistribution preserves group totals,
so buckets still sum to Stock Balance; only the split across ages changes.
2026-07-27 13:37:08 +05:30
pandiyan
5008e6126f fix: stop storing raw title template on subcontracting orders
subcontracting order and subcontracting inward order carry a hidden
title field defaulting to "{supplier_name}" / "{customer_name}", while
their title_field points at supplier_name / customer_name. document.
set_title_field() substitutes the template only when title_field is
"title", so every record stores the placeholder verbatim.

drop the dead default and hidden flags, move title into the other info
tab to match purchase order, and add a patch to repair existing rows.
2026-07-27 13:18:31 +05:30
Mihir Kandoi
273e9f2431 Merge pull request #57463 from aerele/fix/sco-closed-reserved-qty
fix(subcontracting): release raw-material reservation when closing a subcontracting order
2026-07-27 12:08:37 +05:30
ruthra kumar
d3448ef9a2 Merge pull request #57476 from ruthra-kumar/date_configurable_err_reversal
refactor: configurable date in reverse ERR journals
2026-07-27 11:40:32 +05:30
ruthra kumar
1a558ce641 refactor(test): manually submit reverse err journal 2026-07-27 11:18:41 +05:30
Sudharsanan11
e4b8065a69 test(subcontracting): cover reservation release on closing a subcontracting order
close a partially-received sco with a reserve warehouse and assert the
raw-material reservation is released and projected qty recovers.
2026-07-27 11:13:17 +05:30
Sudharsanan11
db91a79d31 fix(subcontracting): release raw-material reservation when closing a subcontracting order
the bin reserved-qty recalc filtered out closed purchase orders but not
closed subcontracting orders, so closing a partially-received sco kept the
reservation for the unreceived qty and left projected qty understated.
apply the same closed-status filter to the subcontracting order path.
2026-07-27 11:13:17 +05:30
ruthra kumar
0be33e4132 refactor: configurable date in reverse ERR journals 2026-07-27 11:11:38 +05:30
rohitwaghchaure
f077d2edc0 fix: GL entries for purchase expense with LCV (#57475) 2026-07-26 23:08:35 +05:30
MochaMind
fd37bc3ff8 chore: update POT file (#57469) 2026-07-26 16:10:52 +02:00
Shllokkk
371ab1db61 Merge pull request #57443 from Shllokkk/rename-ar-ap-report-filters
fix: rename misleading filter labels in AR/AP reports
2026-07-26 17:16:42 +05:30
Shllokkk
be27a918e6 Merge pull request #57320 from Shllokkk/create-payment-entries-from-payable-report
fix: show create payment entries as an inner button on row selection
2026-07-26 17:14:35 +05:30
Shllokkk
e08e119739 test: assert operating cost is propagated to routing operations 2026-07-26 16:15:53 +05:30
Shllokkk
eb9afa40ea fix: update operating cost when propagating workstation hour rate to routing 2026-07-26 16:03:09 +05:30
Shllokkk
c6a16495c0 Merge pull request #57466 from Shllokkk/routing-hour-rate-operating-cost
fix: recalculate operating cost on hour rate change in routing
2026-07-26 14:06:28 +05:30
Shllokkk
598f6f0f4e fix: recalculate operating cost on hour rate change in routing 2026-07-26 13:11:11 +05:30
mergify[bot]
8c24c5bd68 fix: enable the 'Include Zero Stock Items' filter by default to show zero-stock items in the Stock Balance report (backport #57458) (#57459)
fix: enable the 'Include Zero Stock Items' filter by default to show zero-stock items in the Stock Balance report (#57458)

(cherry picked from commit 4e8f5de5cb)

Co-authored-by: rohitwaghchaure <rohitw1991@gmail.com>
2026-07-25 08:27:19 +05:30
Nabin Hait
208a07e19e Merge pull request #57452 from nabinhait/fix-child-qty-rate-type-hint
fix: accept list payload for trans_items in update_child_qty_rate
2026-07-24 21:54:18 +05:30
Shllokkk
f13cd00494 fix: migrate stored AR/AP ageing filter to renamed field 2026-07-24 18:45:07 +05:30
Nabin Hait
d73ff0a2bf fix: accept list payload for trans_items in update_child_qty_rate
The whitelisted endpoint declared trans_items as str, so Frappe's typing
validation raised FrappeTypeError when the client sent the items as a
JSON list. ChildItemUpdater.update already handles both via
frappe.parse_json, so widen the wrapper's hint to str | list.
2026-07-24 17:33:58 +05:30
Shllokkk
e99425b7c4 fix: rename misleading filter labels in AR/AP reports 2026-07-24 15:32:51 +05:30
Mihir Kandoi
3e15fe0dfd Merge pull request #57435 from aerele/fix-party-dashboard-user-permission
fix(accounts): respect user permissions in party dashboard company list
2026-07-24 15:00:00 +05:30
Deepesh Garg
a04725eb04 Merge pull request #57296 from deepeshgarg007/user_change
fix: Ignore permission while deleting user permission
2026-07-24 12:29:58 +05:30
pandiyan
903c87bcaa fix: respect user permissions in party dashboard company list
use frappe.get_list instead of frappe.get_all in get_dashboard_info so
the company list honors user permissions. previously, a party with
invoices across multiple companies would raise "User don't have
permissions to select/read this account" for users restricted to a
subset of companies, since get_party_account was called for companies
the user could not access.

fixes frappe/erpnext#57428
2026-07-24 12:22:08 +05:30
Deepesh Garg
314796633f Merge branch 'develop' into user_change 2026-07-24 12:14:34 +05:30
Khushi Rawat
5bf1c506a5 Merge pull request #57382 from khushi8112/fix/mt940-per-transaction-reference
fix: map MT940 per-transaction reference from :61: customer_reference
2026-07-24 10:36:35 +05:30
Mihir Kandoi
ba593f918a Merge pull request #57335 from aerele/fix/report-date-validation-dry
refactor: reuse shared date range validation across reports
2026-07-23 19:54:34 +05:30
Nabin Hait
50e361e10d Merge pull request #57263 from nabinhait/proforma-invoice
feat(selling): Proforma Invoice against Sales Order
2026-07-23 19:48:44 +05:30
Mihir Kandoi
e6ddb91ce5 Merge pull request #57410 from mihir-kandoi/revert-default-warehouse-names
revert: canonical default warehouse names (#57392, #57409)
2026-07-23 19:41:05 +05:30
Nabin Hait
0b71c943c1 fix(selling): don't email cancelled proformas or copy their PDF
Address review findings:
- send_proforma_email rejects non-issued proformas, and the tab suppresses the
  action for cancelled rows, so a voided document can't be sent to a customer
- mark proforma_pdf as no_copy and disable amendment (a proforma is created
  only from a Sales Order), so a copied proforma can't carry the original's PDF
  and number
2026-07-23 19:17:21 +05:30
Nabin Hait
e4fb5ed3c4 fix(selling): guard proforma against unsubmitted SO and missing PDF
Address review findings:
- make_proforma_invoice: reject a non-submitted Sales Order (the whitelisted
  endpoint was previously only JS-gated on docstatus)
- send_proforma_email: throw a clear error when the attached PDF File is missing
  instead of passing a null fid to sendmail
2026-07-23 18:59:08 +05:30
ervishnucs
170803b041 refactor: reuse shared date range validation across reports 2026-07-23 18:31:50 +05:30
Mihir Kandoi
e4561b1431 Merge pull request #57412 from aerele/customer-pick-list
fix: map pick list customer to delivery note when no sales order
2026-07-23 18:24:19 +05:30