Skip to content

[Settings]: Invoices — Default Terms & Notes #258

Closed

Description

@nielsdrost7

SMART Plan — Set default invoice terms/notes (Invoices tab > Other, per company)

Specific

A Textarea field labelled "Default Invoice Terms" in the Invoices > Other sub-section of the Company Settings page. Stores a multi-line string under the key invoice_default_terms, scoped to the current company. The stored text is pre-filled in the Terms field whenever a new invoice is created for this company.

Measurable

  • The textarea appears in the Invoices > Other section of the Company Settings page
  • Saving the form persists the value to the settings table with key invoice_default_terms and company_id scope
  • The value is read back correctly on page reload
  • New invoices are pre-populated with the stored terms text

Achievable

  1. Create/extend Modules/Core/Filament/Company/Pages/CompanySettings.php (Filament page with tabs)
  2. Add a Textarea::make('invoice_default_terms')->label('Default Invoice Terms')->rows(4) field inside an Other section within the Invoices tab
  3. Add const INVOICE_DEFAULT_TERMS = 'invoice_default_terms'; to Modules/Core/Models/Setting.php constants
  4. Register the page in CompanyPanelProvider

Relevant

Standard terms and conditions (e.g. payment deadlines, late fee policies) must appear on every invoice for legal and contractual reasons. Storing them as a company default eliminates repetitive manual entry and ensures compliance across all invoices.

Time-bound

Sprint 6.


Arrange · Act · Assert

// Modules/Core/Tests/Feature/CompanySettingsTest.php

#[Test]
public function it_saves_invoice_default_terms_setting(): void
{
    /* Arrange */
    $page = Livewire::actingAs($this->user)
        ->test(\Modules\Core\Filament\Company\Pages\CompanySettings::class);

    /* Act */
    $page->set('data.invoice_default_terms', 'Payment due within 30 days.')
         ->call('save');

    /* Assert */
    $page->assertSuccessful();
    $this->assertDatabaseHas('settings', [
        'company_id' => $this->company->id,
        'key'        => 'invoice_default_terms',
        'value'      => 'Payment due within 30 days.',
    ]);
}

Activity

  1. coderabbitai commented on Dec 28, 2025

    @coderabbitai
    Contributor

    📝 CodeRabbit Plan Mode

    Generate an implementation plan and prompts that you can use with your favorite coding agent.

    • Create Plan
    Examples

    🔗 Similar Issues

    Related Issues

    👤 Suggested Assignees

    🧪 Issue enrichment is currently in open beta.

    You can configure auto-planning by selecting labels in the issue_enrichment configuration.

    To disable automatic issue enrichment, add the following to your .coderabbit.yaml:

    issue_enrichment:
      auto_enrich:
        enabled: false

    💬 Have feedback or questions? Drop into our discord!

  2. added this to the v2.0.0-alpha milestone on Dec 28, 2025
  3. changed the title [-]As an admin in the Company Panel, in the Other Settings (Invoices Tab, Per Company!), I want to be able to set a setting for "Set the Invoice to read-only on"[/-] [+][Settings]: Invoices — Late Fees & Overdue Reminders[/+] on Jun 13, 2026
  4. nielsdrost7 commented on Jul 24, 2026

    @nielsdrost7
    CollaboratorAuthor

    SMART Plan — Default Invoice Terms Company Setting

    Scope

    Add a Textarea field to the Invoices → Other tab of Company Settings page (Modules/Core/Filament/Company/Pages/CompanySettings.php).

    Implementation

    1. Setting constant: Add to Modules/Core/Models/Setting.php:

      const INVOICE_DEFAULT_TERMS = 'invoice_default_terms';
    2. Form field: In CompanySettings schema, add to the Invoices tab:

      Textarea::make('invoice_default_terms')
          ->label('Default Invoice Terms')
          ->rows(4)
    3. Apply to new invoices: In the invoice creation schema (Modules/Invoices/Filament/Company/Resources/Invoices/Schemas/InvoiceSchema.php), set default:

      Textarea::make('terms')
          ->default(fn () => $company->setting('invoice_default_terms'))

    Test

    • Save terms via CompanySettings → stored in settings table with key = 'invoice_default_terms'
    • New invoice form loads with terms pre-filled
    • User can override before saving

    Processed by IP2 batch refine workflow

  5. changed the title [-][Settings]: Invoices — Late Fees & Overdue Reminders[/-] [+][Settings]: Invoices — Default Terms & Notes[/+] on Sep 18, 2026
  6. added a commit that references this issue on Oct 9, 2026
    db62984
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    refinedRefined with SMART plan / test suggestions

    Type

    No type

    Projects

    No projects

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions