Welcome EInvoice email
This commit is contained in:
parent
bb85d1d21c
commit
61e71a43ca
|
|
@ -106,11 +106,11 @@ class EInvoiceController extends BaseController
|
|||
$pm->InstructionNote = $payment_means['information'];
|
||||
}
|
||||
|
||||
nlog($pm);
|
||||
// nlog($pm);
|
||||
$einvoice->PaymentMeans[] = $pm;
|
||||
}
|
||||
|
||||
nlog($einvoice);
|
||||
// nlog($einvoice);
|
||||
|
||||
$stub = new \stdClass();
|
||||
$stub->Invoice = $einvoice;
|
||||
|
|
|
|||
|
|
@ -165,6 +165,16 @@ class License extends StaticModel
|
|||
|
||||
}
|
||||
|
||||
public function countEntities(): int
|
||||
{
|
||||
|
||||
if (!is_array($this->entities)) {
|
||||
return 0;
|
||||
}
|
||||
|
||||
return count($this->entities);
|
||||
}
|
||||
|
||||
public function findEntity(string $key, mixed $value): ?TaxEntity
|
||||
{
|
||||
|
||||
|
|
|
|||
|
|
@ -67,6 +67,11 @@ class StorecoveProxy
|
|||
$response = $this->storecove->setupLegalEntity($data);
|
||||
|
||||
if (is_array($response)) {
|
||||
|
||||
if ($this->company->account->companies()->whereNotNull('legal_entity_id')->count() == 1) {
|
||||
\Modules\Admin\Jobs\Storecove\SendWelcomeEmail::dispatch($this->company);
|
||||
}
|
||||
|
||||
return $response;
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -88,6 +88,4 @@ Contact support: contact@invoiceninja.com
|
|||
|
||||
Thank you for choosing our e-invoicing service.
|
||||
"
|
||||
|
||||
|
||||
];
|
||||
|
|
|
|||
|
|
@ -191,6 +191,9 @@ class ReportCsvGenerationTest extends TestCase
|
|||
*/
|
||||
private function buildData()
|
||||
{
|
||||
if($this->account)
|
||||
$this->account->forceDelete();
|
||||
|
||||
/** @var \App\Models\Account $account */
|
||||
$this->account = Account::factory()->create([
|
||||
'hosted_client_count' => 1000,
|
||||
|
|
@ -301,7 +304,7 @@ class ReportCsvGenerationTest extends TestCase
|
|||
|
||||
$this->assertEquals('john@doe.com', $this->getFirstValueByColumn($csv, 'Contact Email'));
|
||||
|
||||
$this->account->forceDelete();
|
||||
$this->account->forceDelete();
|
||||
|
||||
}
|
||||
|
||||
|
|
@ -473,17 +476,6 @@ $this->account->forceDelete();
|
|||
|
||||
$this->assertEquals(1, $q->count());
|
||||
|
||||
// $q = Invoice::whereJsonContains('line_items', ['product_key' => 'Bob the builder']);
|
||||
// $this->assertEquals(0, $q->count());
|
||||
|
||||
// $q = Invoice::whereJsonContains('line_items', ['product_key' => 'bob']);
|
||||
// $this->assertEquals(0, $q->count());
|
||||
|
||||
// $q->forceDelete();
|
||||
|
||||
// Invoice::withTrashed()->cursor()->each(function ($i) { $i->forceDelete();});
|
||||
|
||||
|
||||
$this->account->forceDelete();
|
||||
|
||||
}
|
||||
|
|
|
|||
|
|
@ -363,7 +363,7 @@ class EInvoiceValidationTest extends TestCase
|
|||
'company_id' => $company->id,
|
||||
'classification' => 'individual',
|
||||
'vat_number' => '',
|
||||
'country_id' => 276,
|
||||
'country_id' => 2763,
|
||||
'address1' => '10 Wallaby Way',
|
||||
'address2' => '',
|
||||
'city' => 'Sydney',
|
||||
|
|
|
|||
Loading…
Reference in New Issue