承接 wamesk/laravel-nova-price-tax-field 相关项目开发

从需求分析到上线部署,全程专人跟进,保证项目质量与交付效率

邮箱:yvsm@zunyunkeji.com | QQ:316430983 | 微信:yvsm316

wamesk/laravel-nova-price-tax-field

最新稳定版本:1.2.1

Composer 安装命令:

composer require wamesk/laravel-nova-price-tax-field

包简介

A Laravel Nova Price Tax Fields.

README 文档

README

preview

Installation

composer require wamesk/laravel-nova-price-tax-field
php artisan vendor:publish --provider="Wame\PriceTaxField\FieldServiceProvider"

Usage

Add to your nova model
(You can change sort field but not in one column and getPriceTaxField must be last, in migration use decimal or double)

Add to your models

use Wame\PriceTaxField\PriceField;

PriceField::getPriceWithoutTax( config('price-fields'), $this),
PriceField::getPriceTax(config('price-fields'))->rules('required'),
PriceField::getPriceWithTax(config('price-fields'))->rules('required'),
PriceField::getPriceTaxField(config('price-fields'))->rules('required'),

preview

Config

rconfig/price-fields.php

Translate

resource/lang/sk/price-fields.php

Customization

Edit options in config.price-fields.php OR you can add options in your model

// Price tax field options
use Wame\PriceTaxField\PriceField;

$price_tax_options = [
    'db_names'          => ['base_price', 'tax', 'price_with_tax'],
    'names'             => ['bez DPH', 'daň', 's DPH'],
    'base_field_name'   => 'Cena',
    'default_tax'       => 20,
    'one_col'           => true,  // display all fields in one column
    'tax_in_one_col'    => true,  // not show tax value in one column
    'col_classes'       => ['strong', 'small', 'small'],  // classes for rows in column
];
        
PriceField::getPriceWithoutTax( $price_tax_options, $this),
PriceField::getPriceTax($price_tax_options)->rules('required'),
PriceField::getPriceWithTax($price_tax_options)->rules('required'),
PriceField::getPriceTaxField($price_tax_options)->rules('required'),

统计信息

  • 总下载量: 91
  • 月度下载量: 0
  • 日度下载量: 0
  • 收藏数: 0
  • 点击次数: 0
  • 依赖项目数: 0
  • 推荐数: 0

GitHub 信息

  • Stars: 0
  • Watchers: 3
  • Forks: 1
  • 开发语言: PHP

其他信息

  • 授权协议: MIT
  • 更新时间: 2023-03-15