Skip to content

seven-io/InvoiceNinja

Repository files navigation

seven logo

seven SMS for InvoiceNinja

Send transactional SMS to clients and vendors of InvoiceNinja via the seven gateway. Auto-fires on creation events.

MIT License InvoiceNinja 5.x PHP 8.1+ Work in Progress

Heads up: Core SMS dispatch is implemented; the settings UI is still being built out.


Features

  • Client Creation SMS - Auto-fire on ClientWasCreated
  • Vendor Creation SMS - Auto-fire on VendorWasCreated
  • Template Variables - Reference any field on the client/vendor object via {{field}}
  • Robust Error Handling - Failures are logged without breaking InvoiceNinja core flows
  • Modular - Self-contained Laravel module, no patches to core

Prerequisites

Installation

1. Enable module autoloading

Add Modules\\ to PSR-4 in InvoiceNinja's composer.json:

{
  "autoload": {
    "psr-4": {
      "App\\": "app/",
      "Modules\\": "Modules/"
    }
  }
}

2. Install the module

composer require seven.io/invoiceninja
composer dump-autoload

3. Configure the API key

SEVEN_API_KEY=your-seven-api-key

The module is auto-discovered. Configure events and templates from the InvoiceNinja modules UI.

Configuration

Setting Description
apiKey seven API key (defaults to SEVEN_API_KEY env)
sms.from Default sender ID
events.clientCreated.enabled Toggle client-creation SMS
events.clientCreated.text Template for the SMS body
events.vendorCreated.enabled Toggle vendor-creation SMS
events.vendorCreated.text Template for the SMS body

Template variables

Any field on the client/vendor object can be referenced:

Hello {{name}}, welcome! Your email {{email}} is now registered.

Development

npm run dev    # Vite dev server with HMR
npm run build  # Production assets to ../../public/build-seven/

The Vite output is intentionally placed outside the module so it doesn't collide with InvoiceNinja's main asset pipeline.

Support

Need help? Feel free to contact us or open an issue.

License

MIT

About

No description or website provided.

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Contributors