How to subract from ITEMS (i.e consume stocked parts) within a custom doctype?

Imagine we have a custom doctype called “REPAIR TICKET” and within the repair ticket entry we want to be able to select some “Items” (from core ‘Item’ doctype) that were consumed during the repair ticket.

Is this easily possible?

Any references or examples of how to accomplish this?


Why don’t you write script to create relevant Stock Entry (Material Issue or Material Transfer), on submission of your Custom Doctype Repair Ticket and store the Voucher/Stock Entry ID on your doctype

This way you will not have to reinvent the wheel