thibaultvanc/facturation-regie 问题修复 & 功能扩展

解决BUG、新增功能、兼容多环境部署,快速响应你的开发需求

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

thibaultvanc/facturation-regie

Composer 安装命令:

composer require thibaultvanc/facturation-regie

包简介

This package allows you to manage your facturation

README 文档

README

Latest Version on Packagist Build Status Quality Score Total Downloads

This is where your description should go. Try and limit it to a paragraph or two, and maybe throw in a mention of what PSRs you support to avoid any confusion with users and contributors.

Installation

You can install the package via composer:

composer require thibaultvanc/facturation-regie

Usage

1-edit config

To use this package you Need

  • User model
  • Project Model
  • pointables Models (Task & Meeting)
  • Invoice (planified)

Need to associate your Models with traits

User => FacturationRegie\Traits\RegieInvoicable\RegieUser Invoice => FacturationRegie\Traits\RegieInvoicable\RegieInvoice

Pointage => FacturationRegie\Traits\RegieInvoicable\RegiePointage
Project => FacturationRegie\Traits\RegieInvoicable\RegieProject Task/Meeting => FacturationRegie\Traits\RegieInvoicable

exemple =>add RegieInvoicable trait on the table like Task / Meeting / Deplacement

class Task extends Model
{
    use \FacturationRegie\Traits\RegieInvoicable
}

Default forign key to determine the responsable is "responsable_id" Note : overwite the method to set a différent :

public function regie_responsable()
    {
        return $this->belongsTo(\App\User::class, 'user_id');
    }

##trasform a pointable (task / taskStatus / meeting)

#adjust the date

overwrite the getPointageDate() method. Return a Carbon Instance. if this method does not exists, it take the current time

public function getPointageDate() :Carbon
    {
        return $this->done_at
    }

#adjust the name

overwrite the getPointageName() method. Return a Carbon Instance. if this method does not exists, it take the current time

public function getPointageName() :Carbon
    {
        return $this->task_title
    }

#adjust the date

overwrite the getPointageDescription() method. Return a Carbon Instance. if this method does not exists, it take the current time

public function getPointageDescription() :Carbon
    {
        return $this->body
    }

pointage scopes

Pointage::between($date1, $date2); (carbon date or string)

Pointage::forDay($date); (carbon date or carbon)
Pointage::forMonth($date);  (prend le mois en cours)
Pointage::forYeay('2019');  (carbon)
Pointage::forUser($user); (user object or user_id)

Pointage::facturable();
Pointage::noFacturable();

You can combine like this :

    Pointage::forProject($project)
            ->forMonth(now())
            ->forUser($user)
            ->facturable();

Additional

You can scope by project

Pointage::forProject($project);

To do that, you need :

  • on the Project Model add method ... ----------WIP--------

统计信息

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

GitHub 信息

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

其他信息

  • 授权协议: MIT
  • 更新时间: 2019-04-15

承接程序开发

PHP开发

VUE

Vue开发

前端开发

小程序开发

公众号开发

系统定制

数据库设计

云部署

网站建设

安全加固