mirror of
https://github.com/invoiceninja/invoiceninja.git
synced 2025-05-31 00:44:34 -04:00
Fixes for tests
This commit is contained in:
parent
40335c0d92
commit
b1e6325ef8
@ -34,7 +34,7 @@ class StoreSubscriptionRequest extends Request
|
|||||||
*/
|
*/
|
||||||
public function rules()
|
public function rules()
|
||||||
{
|
{
|
||||||
return [
|
$rules = [
|
||||||
'product_id' => ['sometimes'],
|
'product_id' => ['sometimes'],
|
||||||
'assigned_user_id' => ['sometimes'],
|
'assigned_user_id' => ['sometimes'],
|
||||||
'is_recurring' => ['sometimes'],
|
'is_recurring' => ['sometimes'],
|
||||||
@ -55,6 +55,9 @@ class StoreSubscriptionRequest extends Request
|
|||||||
'webhook_configuration' => ['array'],
|
'webhook_configuration' => ['array'],
|
||||||
'name' => ['required', Rule::unique('subscriptions')->where('company_id', auth()->user()->company()->id)]
|
'name' => ['required', Rule::unique('subscriptions')->where('company_id', auth()->user()->company()->id)]
|
||||||
];
|
];
|
||||||
|
|
||||||
|
return $this->globalRules($rules);
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
protected function prepareForValidation()
|
protected function prepareForValidation()
|
||||||
|
@ -35,8 +35,11 @@ class UpdateSubscriptionRequest extends Request
|
|||||||
*/
|
*/
|
||||||
public function rules()
|
public function rules()
|
||||||
{
|
{
|
||||||
return [
|
$rules = [
|
||||||
//
|
//
|
||||||
];
|
];
|
||||||
|
|
||||||
|
return $this->globalRules($rules);
|
||||||
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -227,6 +227,8 @@ class Import implements ShouldQueue
|
|||||||
CompanySizeCheck::dispatch();
|
CompanySizeCheck::dispatch();
|
||||||
|
|
||||||
info('Completed🚀🚀🚀🚀🚀 at '.now());
|
info('Completed🚀🚀🚀🚀🚀 at '.now());
|
||||||
|
|
||||||
|
unlink($this->file_path);
|
||||||
}
|
}
|
||||||
|
|
||||||
private function setInitialCompanyLedgerBalances()
|
private function setInitialCompanyLedgerBalances()
|
||||||
|
@ -41,6 +41,8 @@ class InvoiceArchivedActivity implements ShouldQueue
|
|||||||
{
|
{
|
||||||
MultiDB::setDb($event->company->db);
|
MultiDB::setDb($event->company->db);
|
||||||
|
|
||||||
|
$event->invoice->service()->deletePdf();
|
||||||
|
|
||||||
$fields = new stdClass;
|
$fields = new stdClass;
|
||||||
|
|
||||||
$fields->invoice_id = $event->invoice->id;
|
$fields->invoice_id = $event->invoice->id;
|
||||||
|
@ -63,6 +63,9 @@ class Webhook extends BaseModel
|
|||||||
|
|
||||||
protected $casts = [
|
protected $casts = [
|
||||||
'headers' => 'array',
|
'headers' => 'array',
|
||||||
|
'updated_at' => 'timestamp',
|
||||||
|
'created_at' => 'timestamp',
|
||||||
|
'deleted_at' => 'timestamp',
|
||||||
];
|
];
|
||||||
|
|
||||||
public function user()
|
public function user()
|
||||||
|
@ -82,6 +82,7 @@ class UpdateInvoicePayment
|
|||||||
->updateBalance($paid_amount * -1)
|
->updateBalance($paid_amount * -1)
|
||||||
->updatePaidToDate($paid_amount)
|
->updatePaidToDate($paid_amount)
|
||||||
->updateStatus()
|
->updateStatus()
|
||||||
|
->deletePdf()
|
||||||
->save();
|
->save();
|
||||||
|
|
||||||
InvoiceWorkflowSettings::dispatchNow($invoice);
|
InvoiceWorkflowSettings::dispatchNow($invoice);
|
||||||
|
@ -34,6 +34,8 @@ class WebhookTransformer extends EntityTransformer
|
|||||||
'target_url' => $webhook->target_url ? (string) $webhook->target_url : '',
|
'target_url' => $webhook->target_url ? (string) $webhook->target_url : '',
|
||||||
'event_id' => (string) $webhook->event_id,
|
'event_id' => (string) $webhook->event_id,
|
||||||
'format' => (string) $webhook->format,
|
'format' => (string) $webhook->format,
|
||||||
|
'rest_method' => (string) $webhook->rest_method ?: '',
|
||||||
|
'headers' => $webhook->headers ?: [],
|
||||||
];
|
];
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user