承接 vgpastor/discounts-calculator 相关项目开发

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

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

vgpastor/discounts-calculator

最新稳定版本:1.0.0

Composer 安装命令:

composer require vgpastor/discounts-calculator

包简介

Helper library to manage different types of discounts and calculate the relational data

README 文档

README

Helper library for calculating discounts in a application.

Installation

This library are developed to PHP 8.1, use Enum so it's not possible using in previously versions, if you like you can put a PR to make compatible with previous versions.. composer install vgpastor/discounts-calculator

Usage

Yo can see how to use in example.php file.

Required parameter are

  • $type: Type of discount. Can be 'percentage' or 'amount' and based in base amount or in total amount (see DiscountTypeEnum)
  • $base (float) - Base price
  • $discount (float) - Discount percentage or amount

Optional parameters are

  • $tax (float) - Tax percentage By default is 0%
  • $precision (int) - Precision of the result. By default is 2
  • $roundingMode (int) - Rounding mode. By default is PHP_ROUND_HALF_UP

统计信息

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

GitHub 信息

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

其他信息

  • 授权协议: MIT
  • 更新时间: 2022-10-08

承接程序开发

PHP开发

VUE

Vue开发

前端开发

小程序开发

公众号开发

系统定制

数据库设计

云部署

网站建设

安全加固