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:
- Created two collections:
InvoicesandInvoiceItems - Set up a “Has Many” relationship from Invoices to InvoiceItems
- 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:
- What’s the best approach for dynamic line items in invoices?
- How do I set up auto-calculation for line totals and invoice total?
- Is there a specific block type I should use for this use case?
- 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!
