Need Help Creating an Invoice System with Dynamic Line Items

Hello NocoBase Community,

I’m trying to create an invoice system in NocoBase and need some guidance. I want to build an invoice form where I can:

What I Want to Achieve:

  • Create invoices with multiple line items (products/services)
  • Each line item should have:
    • Product name
    • Description
    • Quantity
    • Unit price
    • Total price (auto-calculated: quantity × unit price)
  • Ability to add/remove multiple line items dynamically
  • Auto-calculate the invoice total from all line items

What I’ve Tried:

  1. Created two collections: Invoices and InvoiceItems
  2. Set up a “Has Many” relationship from Invoices to InvoiceItems
  3. Created a form with sub-table for the line items

Where I’m Stuck:

  • Not sure if I should use “Sub-table”, “Sub-form”, or regular “Table” block
  • Having trouble with the auto-calculation fields
  • The “Add new item” functionality isn’t working as expected

My Questions:

  1. What’s the best approach for dynamic line items in invoices?
  2. How do I set up auto-calculation for line totals and invoice total?
  3. Is there a specific block type I should use for this use case?
  4. Are there any examples or templates for invoice systems?

My Environment:

NocoBase Version: open source

Screenshot/Example of What I Want:

screenshot of your current setup or draw what you want to achieve]

I’d really appreciate any guidance, step-by-step instructions, or pointers to relevant documentation!