Caculation among childtable in same doctype

Hi guys,
I want to put a caculatation in a child table which use data from another childtable in the doctype. Like that


And here my child table:


Who know how to solve this? Pls help me.
Thanks

Hi I’m new to frappe and facing kinda similar issue as yours, i want a calculation in the same childtable.
the information in the childtable is populated from some calculation, i want to calculate a value called working hours upon change in the populated values


This is my child table, I would appreciate if i could get some help from urside

@KhanhNguyenNgoc @sneha

Enable developer mode. When you enable developer mode files will be created.

Consider parent doctype is Master and child doctype is Status. Slave doctype contains two fields, status and issued on. Master doctype contains a field masterstatus. To update last updated status value of Slave(Child) in masterstatus of Master. Edit the Master.py

from frappe.model.document import Document

1. class Master(Document):
2.	def before_save(self):

3.       if(len(self.status_details)>0):
4.			self.masterstatus = f'{self.status_details[-1].status}'

masterstatus is a read only field and status_details (Line no 3) is table field with options Slave in Master doctype.

  1. before_save - This method is called before the document is saved.