removed invoice/bill status tables

This commit is contained in:
denisdulici
2020-01-11 16:57:32 +03:00
parent b5519004a0
commit 08eb8e75fc
69 changed files with 250 additions and 470 deletions

View File

@@ -1,56 +0,0 @@
<?php
namespace Database\Seeds;
use App\Abstracts\Model;
use App\Models\Purchase\BillStatus;
use Illuminate\Database\Seeder;
class BillStatuses extends Seeder
{
/**
* Run the database seeds.
*
* @return void
*/
public function run()
{
Model::unguard();
$this->create();
Model::reguard();
}
private function create()
{
$company_id = $this->command->argument('company');
$rows = [
[
'company_id' => $company_id,
'name' => trans('bills.status.draft'),
'code' => 'draft',
],
[
'company_id' => $company_id,
'name' => trans('bills.status.received'),
'code' => 'received',
],
[
'company_id' => $company_id,
'name' => trans('bills.status.partial'),
'code' => 'partial',
],
[
'company_id' => $company_id,
'name' => trans('bills.status.paid'),
'code' => 'paid',
],
];
foreach ($rows as $row) {
BillStatus::create($row);
}
}
}

View File

@@ -12,11 +12,9 @@ class CompanySeeder extends Seeder
public function run()
{
$this->call(Database\Seeds\Accounts::class);
$this->call(Database\Seeds\BillStatuses::class);
$this->call(Database\Seeds\Categories::class);
$this->call(Database\Seeds\Currencies::class);
$this->call(Database\Seeds\EmailTemplates::class);
$this->call(Database\Seeds\InvoiceStatuses::class);
$this->call(Database\Seeds\Modules::class);
$this->call(Database\Seeds\Reports::class);
$this->call(Database\Seeds\Settings::class);

View File

@@ -1,66 +0,0 @@
<?php
namespace Database\Seeds;
use App\Abstracts\Model;
use App\Models\Sale\InvoiceStatus;
use Illuminate\Database\Seeder;
class InvoiceStatuses extends Seeder
{
/**
* Run the database seeds.
*
* @return void
*/
public function run()
{
Model::unguard();
$this->create();
Model::reguard();
}
private function create()
{
$company_id = $this->command->argument('company');
$rows = [
[
'company_id' => $company_id,
'name' => trans('invoices.status.draft'),
'code' => 'draft',
],
[
'company_id' => $company_id,
'name' => trans('invoices.status.sent'),
'code' => 'sent',
],
[
'company_id' => $company_id,
'name' => trans('invoices.status.viewed'),
'code' => 'viewed',
],
[
'company_id' => $company_id,
'name' => trans('invoices.status.approved'),
'code' => 'approved',
],
[
'company_id' => $company_id,
'name' => trans('invoices.status.partial'),
'code' => 'partial',
],
[
'company_id' => $company_id,
'name' => trans('invoices.status.paid'),
'code' => 'paid',
],
];
foreach ($rows as $row) {
InvoiceStatus::create($row);
}
}
}