mirror of
https://github.com/invoiceninja/invoiceninja.git
synced 2025-09-29 21:11:12 -04:00
* Remove unnecessary save() on invoice * Update copyright * Working on Credit Repository * Implement credits as a paymentable entity * Add credit_id to transformer * fix rules for update payment * Fix random deleted_at keys in transformers * Fix for password_protect check
26 lines
599 B
PHP
26 lines
599 B
PHP
<?php
|
|
|
|
namespace App\Transformers;
|
|
|
|
use App\Models\TaxRate;
|
|
use App\Utils\Traits\MakesHash;
|
|
|
|
/**
|
|
* @SWG\Definition(definition="TaxRate", @SWG\Xml(name="TaxRate"))
|
|
*/
|
|
class TaxRateTransformer extends EntityTransformer
|
|
{
|
|
use MakesHash;
|
|
|
|
public function transform(TaxRate $tax_rate)
|
|
{
|
|
return [
|
|
'id' => (string) $this->encodePrimaryKey($tax_rate->id),
|
|
'name' => (string) $tax_rate->name,
|
|
'rate' => (float) $tax_rate->rate,
|
|
'updated_at' => $tax_rate->updated_at,
|
|
'archived_at' => $tax_rate->deleted_at,
|
|
];
|
|
}
|
|
}
|