![]() Server : Apache System : Linux server2.corals.io 4.18.0-348.2.1.el8_5.x86_64 #1 SMP Mon Nov 15 09:17:08 EST 2021 x86_64 User : corals ( 1002) PHP Version : 7.4.33 Disable Function : exec,passthru,shell_exec,system Directory : /home/corals/mcoil.corals.io/database/factories/ |
<?php use Carbon\Carbon; use Faker\Generator as Faker; use App\Shop\Customers\Customer; use App\Shop\Businesses\Business; use App\Shop\Quotations\Quotation; $factory->define(Quotation::class, function (Faker $faker) { $price = $faker->randomFloat(2, 300, 500); $cost = $faker->randomFloat(2, 100, 300); $profit = $price - $cost; return [ 'customer_id' => 1, 'business_id' => 1, 'title' => $faker->word, 'availability' => $faker->randomElement([0, 1]), 'availabledate' => Carbon::now(), 'rrp' => 'IRL RRP List 1 EUR', 'currency' => 'EUR', 'quantity' => 1, 'sell_price_delivery' => 0, 'cost_delivery' => 0, 'profit_delivery' => 0, 'gp_delivery' => 0, 'sell_price_installation' => 0, 'cost_installation'=> 0, 'profit_installation' => 0, 'gp_installation' => 0, 'sell_price_quotation' => 0, 'cost_quotation' => 0, 'profit_quotation' => 0, 'gp_quotation' => 0, 'final_discount' => 0, 'price' => $price, 'sellprice' => $price, 'cost' => $cost, 'profit' => $profit, 'contacts'=> [ [ 'id' => 1 ] ], 'groups' => [ [ 'id' => 0, 'name' => 'Products' ] ], 'final_notes' => $faker->text(), 'code' => $faker->sha256(), 'quotation_status_id' => $faker->randomElement([1, 2, 3, 4, 5]), 'status' => $faker->randomElement(['publish','draft']), ]; });