Commit Graph

60439 Commits

Author SHA1 Message Date
Diptanil Saha
5835709402 fix: add permission check for get_item_details (#57515) 2026-07-28 10:38:40 +00:00
Mihir Kandoi
a051a12d9b Merge pull request #57540 from mihir-kandoi/fix-company-mfg-warehouse-filters
fix(setup): scope manufacturing warehouse filters to company
2026-07-28 14:16:44 +05:30
Mihir Kandoi
632113c309 fix(setup): scope manufacturing warehouse filters to company
Default WIP, Finished Goods and Scrap Warehouse fields on Company listed
warehouses of every company. Filter them by the current company and
exclude group warehouses, matching the other warehouse fields.
2026-07-28 14:10:50 +05:30
Mihir Kandoi
91e4a753b3 Merge pull request #57535 from frappe/fix/silently-swallowed-exceptions
fix: stop swallowing exceptions silently in six places
2026-07-28 13:06:46 +05:30
rohitwaghchaure
4a0a1db17e fix: skip stock expense GL entries for non-stock items (#57519)
* fix: skip stock expense gl entries for non stock items

* test: use a leaf expense account for the service item invoice
2026-07-28 13:00:32 +05:30
Mihir Kandoi
85a04772f6 fix: stop swallowing exceptions silently in six places
- Pricing Rule: log a broken condition instead of dropping the rule
- Payment Request: log gateway validation failures
- Supplier Quotation from RFQ portal: let errors surface instead of
  returning None to a dead submit button
- Bank Transaction Rule: drop the pointless try/except around the
  on_trash unlink; a failed write already aborts the delete
- Statement of Accounts: the CC handler was unreachable
  (frappe.get_value returns None, it does not raise); drop it and
  filter out users without an email
- Bank Statement Import: 'Bank Account' at column 0 is falsy, so the
  column was appended instead of filled
2026-07-28 12:49:08 +05:30
Mihir Kandoi
2f07dfc474 Merge pull request #57532 from mihir-kandoi/fix-update-cost-bom-creator-boms
fix(manufacturing): update cost of BOMs created via BOM Creator
2026-07-28 12:46:47 +05:30
Mihir Kandoi
d269c90838 fix(manufacturing): update cost of BOMs created via BOM Creator
`calculate_rm_cost` skipped rate refresh whenever `bom_creator` was set,
so neither the Update Cost button nor the BOM Update Tool could ever
refresh those BOMs. Every BOM in a multi-level tree carries the field, so
whole trees stayed frozen at their creation rates.

The guard replaced the removed `rm_cost_as_per == "Manual"` check in
0b63dbf, on the assumption that BOM Creator rows hold manual rates. They
do not: BOM Creator recomputes every row from `rm_cost_as_per` on save.
2026-07-28 12:33:12 +05:30
Mihir Kandoi
7d44bdbdc6 Merge pull request #57522 from mihir-kandoi/fix-subcontracting-receipt-title
fix(subcontracting): stop the Subcontracting Receipt title from going stale
2026-07-28 12:19:21 +05:30
Mihir Kandoi
8d7ac9f51d Merge pull request #57528 from mihir-kandoi/fix-bom-creator-dup-subassembly
fix(manufacturing): scope BOM Creator tree children to the parent row
2026-07-28 12:18:46 +05:30
Mihir Kandoi
15b7626eed Merge pull request #57521 from mihir-kandoi/fix-semi-fg-produced-qty
fix(manufacturing): sum semi-FG qty across split job cards
2026-07-28 12:14:09 +05:30
Mihir Kandoi
b37152752f fix(manufacturing): scope BOM Creator tree children to the parent row
The BOM Creator tree identified a node by the parent's item code
(fg_item) instead of the specific BOM Creator Item row, so every
occurrence of a repeated sub-assembly shared one child set: expanding
any one of them listed the raw materials of all of them, and deleting
one wiped the raw materials of its siblings.

Key the tree on fg_reference_id and make the node value the row name,
matching the framework convention that a tree node's value is its
docname. Item code now travels as its own field for the label and for
the fg_item argument sent back on add/convert.

Fixes #57311
2026-07-28 11:25:29 +05:30
Mihir Kandoi
bde118e7cf fix(manufacturing): exclude corrective job cards from semi-FG aggregate 2026-07-28 11:09:36 +05:30
Khushi Rawat
56a9ca334b Merge pull request #57451 from khushi8112/feature/request-for-quotation-print-formats
feat: add four Request for Quotation print formats built with the print format builder
2026-07-28 11:06:33 +05:30
Khushi Rawat
aacccfb958 Merge pull request #57450 from khushi8112/feature/quotation-print-formats
feat: add four Quotation print formats built with the print format builder
2026-07-28 11:06:20 +05:30
Khushi Rawat
bd5d6fb9d8 Merge pull request #57449 from khushi8112/feature/pos-invoice-print-formats
feat: add four POS Invoice print formats built with the print format builder
2026-07-28 11:06:06 +05:30
Khushi Rawat
22334def56 Merge pull request #57447 from khushi8112/feature/purchase-invoice-print-formats
feat: add four Purchase Invoice print formats built with the print format builder
2026-07-28 11:05:51 +05:30
Khushi Rawat
5631acc39b Merge pull request #57446 from khushi8112/feature/purchase-order-print-formats
feat: add four Purchase Order print formats built with the print format builder
2026-07-28 11:05:38 +05:30
Khushi Rawat
dd0f763613 Merge pull request #57445 from khushi8112/feature/delivery-note-print-formats
feat: add four Delivery Note print formats built with the print format builder
2026-07-28 11:05:25 +05:30
Khushi Rawat
b71a9b8273 Merge pull request #57437 from khushi8112/feature/sales-order-print-formats
feat: add four Sales Order print formats built with the print format builder
2026-07-28 11:05:12 +05:30
Khushi Rawat
7a76c5f268 Merge pull request #57430 from khushi8112/feature/sales-invoice-print-formats
feat: add four Sales Invoice print formats
2026-07-28 11:04:59 +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
Mihir Kandoi
543301701e fix(subcontracting): stop storing "{supplier_name}" as the Subcontracting Receipt title
Subcontracting Receipt was left out of #57493. Its title_field is "title",
so the template does get rendered on insert, but never again — the title
goes stale as soon as the supplier changes.

Point title_field at supplier_name like Purchase Receipt, and give the
title field the same shape as its subcontracting siblings. Existing rows
already hold a rendered name, so no data patch is needed.

Also guard the whole class of bug: a "{...}" default on a title field is
only ever rendered when title_field is "title".
2026-07-28 11:00:57 +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