This project illustrates the use of Repeater fields combined with live/reactive methods to build an invoice form featuring parent-child record relationships and real-time subtotal and total calculations.
The main logic lives in our InvoiceResource
and is mainly contained within the form()
method:
Repeater
field to allow adding multiple itemslive()
method to calculate the subtotal and total in real timeitems
list change, quantity changeHere's how it looks in the code: