driesvints / vat-calculator

Handle all the hard stuff related to EU MOSS tax/vat regulations, the way it should be.
MIT License
1.2k stars 88 forks source link

Support for Spark Teams? #57

Closed scottybo closed 6 years ago

scottybo commented 6 years ago

Trying to get this to play nicely with Laravel Spark Teams - have modified the Team Model as follows:

use Illuminate\Database\Eloquent\Model;
use Illuminate\Notifications\Notifiable;
use Mpociot\VatCalculator\Traits\BillableWithinTheEU;

class Team extends Model
{
    use Notifiable, Billable, BillableWithinTheEU {
        BillableWithinTheEU::getTaxPercent insteadof Billable;
    }

But get the following error:

(1/1) FatalErrorExceptionTrait method taxPercentage has not been applied, because there are collisions with other trait methods on Laravel\Spark\Team

Its been a long day so I'm probably missing something obvious, but do you have any ideas?

scottybo commented 6 years ago

Ah yes, I'm missing something obvious :-1:

Needed to add: BillableWithinTheEU::taxPercentage insteadof Billable;

Leaving this here incase anyone else needs to this!