PluginProbe
Billingo Official for WooCommerce / trunk
Billingo Official for WooCommerce vtrunk
4.3.3 4.3.2 trunk 0.0.2 1.0.0 2.0 2.0.0 2.0.1 2.0.2 2.0.3 2.0.4 2.0.5 2.0.6 2.0.7 2.0.8 2.0.9 2.1.0 2.1.1 2.1.2 2.1.3 2.1.4 2.1.5 2.1.6 2.1.7 2.1.8 All 82 releases
billingo / src / Factories / SpendingSaveFactory.php

SpendingSaveFactory.php in Billingo Official for WooCommerce trunk, at src/Factories/SpendingSaveFactory.php

33 lines 1.4 KB
No matching file
Up and down to move Enter to open Esc to close
Raw Download Zip
1 <?php
2
3 namespace App\Billingo\Factories;
4
5 use App\Billingo\Enums\CurrencyEnum;
6 use App\Billingo\Enums\Spending\CategoryEnum;
7 use App\Billingo\Enums\Spending\SpendingPaymentMethodEnum;
8
9 class SpendingSaveFactory extends BaseFactory
10 {
11
12 public function definition(): array
13 {
14 return [
15 'currency' => $this->faker->randomElement(getEnumValues(CurrencyEnum::class)),
16 'conversion_rate' => $this->faker->numberBetween(1, 10),
17 'total_gross' => $this->faker->numberBetween(1, 1000),
18 'total_gross_huf' => $this->faker->numberBetween(1, 1000),
19 'total_vat_amount' => $this->faker->numberBetween(1, 1000),
20 'total_vat_amount_huf' => $this->faker->numberBetween(1, 1000),
21 'fulfillment_date' => $this->faker->date(),
22 'paid_at' => $this->faker->optional()->date(),
23 'category' => $this->faker->randomElement(getEnumValues(CategoryEnum::class)),
24 'comment' => $this->faker->optional()->text(),
25 'invoice_number' => $this->faker->regexify('(202[0-9]|203[0-9])-[09]{6}'),
26 'invoice_date' => $this->faker->date(),
27 'due_date' => $this->faker->date(),
28 'payment_method' => $this->faker->randomElement(getEnumValues(SpendingPaymentMethodEnum::class)),
29 'partner_id' => $this->faker->optional()->numberBetween(1, 1000),
30 ];
31 }
32 }
33