improved sample data creation
This commit is contained in:
parent
419f146d8d
commit
decd525e55
@ -26,9 +26,11 @@ class CreateInvoiceTransaction
|
||||
} catch (\Exception $e) {
|
||||
$message = $e->getMessage();
|
||||
|
||||
if (!$user = user()) {
|
||||
$user = user();
|
||||
|
||||
if (empty($user)) {
|
||||
flash($message)->error();
|
||||
|
||||
|
||||
redirect()->route('signed.invoices.show', $invoice->id)->send();
|
||||
}
|
||||
|
||||
|
@ -171,7 +171,7 @@ $factory->afterCreating(Bill::class, function ($bill, $faker) use ($company) {
|
||||
];
|
||||
|
||||
if ($init_status == 'partial') {
|
||||
$payment_request['amount'] = round($amount / 3, $bill->currency->precision);
|
||||
$payment_request['amount'] = (int) round($amount / 3, $bill->currency->precision);
|
||||
}
|
||||
|
||||
$transaction = dispatch_now(new CreateDocumentTransaction($updated_bill, $payment_request));
|
||||
|
@ -180,7 +180,7 @@ $factory->afterCreating(Invoice::class, function ($invoice, $faker) use ($compan
|
||||
];
|
||||
|
||||
if ($init_status == 'partial') {
|
||||
$payment_request['amount'] = round($amount / 3, $invoice->currency->precision);
|
||||
$payment_request['amount'] = (int) round($amount / 3, $invoice->currency->precision);
|
||||
}
|
||||
|
||||
event(new PaymentReceived($updated_invoice, $payment_request));
|
||||
|
@ -23,7 +23,7 @@ class SampleData extends Seeder
|
||||
{
|
||||
Model::reguard();
|
||||
|
||||
config(['mail.default' => 'log']);
|
||||
config(['mail.default' => 'array']);
|
||||
|
||||
$count = (int) $this->command->option('count');
|
||||
$small_count = ($count <= 10) ? $count : 10;
|
||||
|
Loading…
x
Reference in New Issue
Block a user