定制 teamzac/texas-comptroller-tools 二次开发

按需修改功能、优化性能、对接业务系统,提供一站式技术支持

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

teamzac/texas-comptroller-tools

Composer 安装命令:

composer create-project teamzac/texas-comptroller-tools

包简介

Tools to get data from the Texas Comptroller's web site

README 文档

README

Please see teamzac/texas-comptroller instead.

License

You're free to use this package (it's MIT-licensed) however you see fit.

Installation

You can install the package via composer:

composer require teamzac/texas-comptroller-tools

Local Sales Tax Reports

There are currently classes that support downloading two different local sales tax reports available on the Comptroller's site: the allocation payment detail report, and the allocation historical payments report. Both classes provide convenience methods for downloading reports for different entity types (cities, counties, transit authorities, and special districts).

Payment Detail Reports

Create a new report object

$report = new TeamZac\TexasComptroller\SalesTax\AllocationReports\PaymentDetail;

Request a report for a given entity type with the appropriate search string. There are four different entity types provided by the Comptroller:

$data = $report->forCity('Austin')->get();

$data = $report->forCounty('Parker')->get();

$data = $report->forTransitAuthority('Dallas MTA')->get();

$data = $report->forSpecialDistrict('Bexar Co ESD 3')->get();

The return value will be an associative array, keyed by the date of the allocation period. Each value will be an associative array of the different payment components and their respective amounts:

[
    'YYYY-MM-01' => [
        'total-collections' => 12345.67,
        'prior-period-collections' => 12345.67,
        'current-period-collections' => 12345.67,
        ...
        'net-payment' => 12345.67
    ],
    ...
]

This report provides data for the most recent 24 months.

Historical Payment Reports

Create a new report object

$report = new TeamZac\TexasComptroller\SalesTax\AllocationReports\HistoricalPayments;

Request a report for a given entity type with the appropriate search string. There are four different entity types provided by the Comptroller:

$data = $report->forCity('Austin')->get();

$data = $report->forCounty('Parker')->get();

$data = $report->forTransitAuthority('Dallas MTA')->get();

$data = $report->forSpecialDistrict('Bexar Co ESD 3')->get();

The return value will be an associative array, keyed by the date of the allocation period. Each value will be an associative array of the different payment components and their respective amounts:

[
    'YYYY-MM-01' => [
        'net-payment' => 12345.67
    ],
    ...
]

Although it's a bit overkill to nest the data so deeply, it was done to retain consistency with the results from the Payment Detail Report.

Comparison Summary Reports

Create a new report object

$report = new TeamZac\TexasComptroller\SalesTax\AllocationReports\ComparisonSummary;

Request a report for a given entity type with the appropriate search string. There are four different entity types provided by the Comptroller:

$data = $report->forCities()->get();

$data = $report->forCounties()->get();

$data = $report->forTransitAuthorities()->get();

$data = $report->forSpecialDistricts()->get();

The return value will be an associative array including the allocation period and an array of entities. Each entity will include the name, current amount, year-to-date amount, and the year-over-year change for each.

[
    'period' => 'YYYY-MM-01',
    'entities' => [
        [
            'entity' => 'Abbott',
            'amount' => 12345.67,
            'amount_delta' => 12345.67,
            'ytd' => 12345.67,
            'ytd_delta' => 12345.67
        ],
        ...
    ]
]

Exceptions

You should use the fluent report generator methods to create your request. If you fail to do so, you may receive an InvalidRequest exception, which you may catch.

Testing

$ composer test

Security

If you discover any security related issues, please email open@teamzac.com instead of using the issue tracker.

About TeamZac

TeamZac is the web app development arm of eight20 consulting, specializing in apps that serve local governments. You can view more about us on our website.

License

The MIT License (MIT). Please see License File for more information.

统计信息

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

GitHub 信息

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

其他信息

  • 授权协议: MIT
  • 更新时间: 2016-08-25

承接程序开发

PHP开发

VUE

Vue开发

前端开发

小程序开发

公众号开发

系统定制

数据库设计

云部署

网站建设

安全加固