Fixes identified by CI testing
This commit is contained in:
@@ -42,15 +42,19 @@ class InvoiceTest extends TestCase
|
||||
$this->site_setup();
|
||||
$this->account_setup();
|
||||
|
||||
dump($this->setup['site']);
|
||||
// Create two services for the same account
|
||||
// First service was billed a month ago, so this invoice will have 1 service charge
|
||||
$po = Product::factory()->notStrict()->create([
|
||||
'site_id'=>Arr::get($this->setup,'site.a')->site_id,
|
||||
]);
|
||||
dump($po);
|
||||
$o = Service::factory()->create([
|
||||
'site_id'=>Arr::get($this->setup,'site.a')->site_id,
|
||||
'account_id'=>Arr::get($this->setup,'account.a')->id,
|
||||
'product_id'=>$po->id,
|
||||
]);
|
||||
$po = Product::factory()->notStrict()->make();
|
||||
|
||||
$o->product_id = $po->id;
|
||||
$o->setRelation('product',$po);
|
||||
|
||||
$this->assertEquals(110,$o->next_invoice_items(FALSE)->sum('total'),'Invoice Equals 110');
|
||||
|
Reference in New Issue
Block a user