optimistdigital / nova-currency-vat-field

A Laravel Nova Currency field extension with VAT toggle.

Stars
2

Nova Currency VAT Field

Latest Version on Packagist
Total Downloads

This Laravel Nova package allows you to create and manage menus and menu items.

Requirements

  • php: >=7.2
  • laravel/nova: ^3.0

Features

An extension of Nova's default Currency field that provides a checkbox for toggling between VAT and non-VAT prices on the Form view.

Renders the default Currency field on Index and Detail views.

Screenshots

Form page

Installation

Install the package in to a Laravel app that uses Nova via composer:

composer require optimistdigital/nova-currency-vat-field

Usage

use OptimistDigital\NovaCurrencyVatField\CurrencyVAT;

public function fields(Request $request) {
    CurrencyVAT::make('Price', 'price')
      ->VAT(20), // Required, otherwise VAT checkbox isn't rendered
      ->storedWithVAT(), // By default with VAT
      ->storedWithoutVAT()
}

Credits

License

Nova Currency VAT Field is open-sourced software licensed under the MIT license.