2020-10-01 13:34:05 +02:00
|
|
|
<?php
|
|
|
|
/**
|
|
|
|
* Invoice Ninja (https://invoiceninja.com).
|
|
|
|
*
|
|
|
|
* @link https://github.com/invoiceninja/invoiceninja source repository
|
|
|
|
*
|
2021-01-03 22:54:54 +01:00
|
|
|
* @copyright Copyright (c) 2021. Invoice Ninja LLC (https://invoiceninja.com)
|
2020-10-01 13:34:05 +02:00
|
|
|
*
|
2022-06-08 06:25:44 +02:00
|
|
|
* @license https://www.elastic.co/licensing/elastic-license
|
2020-10-01 13:34:05 +02:00
|
|
|
*/
|
|
|
|
namespace Database\Seeders;
|
|
|
|
|
|
|
|
use App\Models\PaymentTerm;
|
|
|
|
use Illuminate\Database\Eloquent\Model;
|
|
|
|
use Illuminate\Database\Seeder;
|
|
|
|
|
|
|
|
class PaymentTermsSeeder extends Seeder
|
|
|
|
{
|
|
|
|
public function run()
|
|
|
|
{
|
|
|
|
Model::unguard();
|
|
|
|
|
|
|
|
$paymentTerms = [
|
|
|
|
['num_days' => 0, 'name' => 'Net 0'],
|
|
|
|
['num_days' => 7, 'name' => ''],
|
|
|
|
['num_days' => 10, 'name' => ''],
|
|
|
|
['num_days' => 14, 'name' => ''],
|
|
|
|
['num_days' => 15, 'name' => ''],
|
|
|
|
['num_days' => 30, 'name' => ''],
|
|
|
|
['num_days' => 60, 'name' => ''],
|
|
|
|
['num_days' => 90, 'name' => ''],
|
|
|
|
];
|
|
|
|
|
|
|
|
foreach ($paymentTerms as $paymentTerm) {
|
|
|
|
PaymentTerm::create($paymentTerm);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|