1
0
mirror of https://github.com/invoiceninja/invoiceninja.git synced 2024-11-10 05:02:36 +01:00
invoiceninja/database/seeds/PaymentTermsSeeder.php

22 lines
461 B
PHP
Raw Normal View History

2016-02-27 21:12:38 +01:00
<?php
use App\Models\PaymentTerm;
class PaymentTermsSeeder extends Seeder
{
public function run()
{
Eloquent::unguard();
$paymentTerms = [
['num_days' => -1, 'name' => 'Net 0'],
];
foreach ($paymentTerms as $paymentTerm) {
2018-03-04 22:37:10 +01:00
if (! DB::table('payment_terms')->where('name', '=', $paymentTerm['name'])->first()) {
2016-02-27 21:12:38 +01:00
PaymentTerm::create($paymentTerm);
}
}
}
}