mirror of
https://github.com/invoiceninja/invoiceninja.git
synced 2025-05-24 02:14:21 -04:00
fixes for factories
This commit is contained in:
parent
3826ac519f
commit
f9347fc652
@ -37,10 +37,10 @@ class CreditFactory
|
||||
$credit->tax_rate1 = 0;
|
||||
$credit->tax_name2 = '';
|
||||
$credit->tax_rate2 = 0;
|
||||
$credit->custom_value1 = 0;
|
||||
$credit->custom_value2 = 0;
|
||||
$credit->custom_value3 = 0;
|
||||
$credit->custom_value4 = 0;
|
||||
$credit->custom_value1 = '';
|
||||
$credit->custom_value2 = '';
|
||||
$credit->custom_value3 = '';
|
||||
$credit->custom_value4 = '';
|
||||
$credit->amount = 0;
|
||||
$credit->balance = 0;
|
||||
$credit->partial = 0;
|
||||
|
@ -38,10 +38,10 @@ class InvoiceFactory
|
||||
$invoice->tax_rate2 = 0;
|
||||
$invoice->tax_name3 = '';
|
||||
$invoice->tax_rate3 = 0;
|
||||
$invoice->custom_value1 = 0;
|
||||
$invoice->custom_value2 = 0;
|
||||
$invoice->custom_value3 = 0;
|
||||
$invoice->custom_value4 = 0;
|
||||
$invoice->custom_value1 = '';
|
||||
$invoice->custom_value2 = '';
|
||||
$invoice->custom_value3 = '';
|
||||
$invoice->custom_value4 = '';
|
||||
$invoice->amount = 0;
|
||||
$invoice->balance = 0;
|
||||
$invoice->paid_to_date = 0;
|
||||
|
@ -36,10 +36,10 @@ class RecurringInvoiceFactory
|
||||
$invoice->tax_rate1 = 0;
|
||||
$invoice->tax_name2 = '';
|
||||
$invoice->tax_rate2 = 0;
|
||||
$invoice->custom_value1 = 0;
|
||||
$invoice->custom_value2 = 0;
|
||||
$invoice->custom_value3 = 0;
|
||||
$invoice->custom_value4 = 0;
|
||||
$invoice->custom_value1 = '';
|
||||
$invoice->custom_value2 = '';
|
||||
$invoice->custom_value3 = '';
|
||||
$invoice->custom_value4 = '';
|
||||
$invoice->amount = 0;
|
||||
$invoice->balance = 0;
|
||||
$invoice->partial = 0;
|
||||
|
@ -35,10 +35,10 @@ class RecurringQuoteFactory
|
||||
$quote->tax_rate1 = 0;
|
||||
$quote->tax_name2 = '';
|
||||
$quote->tax_rate2 = 0;
|
||||
$quote->custom_value1 = 0;
|
||||
$quote->custom_value2 = 0;
|
||||
$quote->custom_value3 = 0;
|
||||
$quote->custom_value4 = 0;
|
||||
$quote->custom_value1 = '';
|
||||
$quote->custom_value2 = '';
|
||||
$quote->custom_value3 = '';
|
||||
$quote->custom_value4 = '';
|
||||
$quote->amount = 0;
|
||||
$quote->balance = 0;
|
||||
$quote->partial = 0;
|
||||
|
@ -52,7 +52,9 @@ class SetDomainNameDb
|
||||
if ($request->json) {
|
||||
return response()->json($error, 403);
|
||||
} else {
|
||||
abort(400, 'Domain not found');
|
||||
MultiDB::setDb('db-ninja-01');
|
||||
nlog("I could not set the DB - defaulting to DB1");
|
||||
//abort(400, 'Domain not found');
|
||||
}
|
||||
}
|
||||
|
||||
@ -68,7 +70,9 @@ class SetDomainNameDb
|
||||
if ($request->json) {
|
||||
return response()->json($error, 403);
|
||||
} else {
|
||||
abort(400, 'Domain not found');
|
||||
MultiDB::setDb('db-ninja-01');
|
||||
nlog("I could not set the DB - defaulting to DB1");
|
||||
//abort(400, 'Domain not found');
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -28,7 +28,7 @@ class SetInviteDb
|
||||
public function handle($request, Closure $next)
|
||||
{
|
||||
$error = [
|
||||
'message' => 'Invalid URL',
|
||||
'message' => 'I could not find the database for this object.',
|
||||
'errors' => new stdClass,
|
||||
];
|
||||
/*
|
||||
@ -46,7 +46,7 @@ class SetInviteDb
|
||||
if (request()->json) {
|
||||
return response()->json($error, 403);
|
||||
} else {
|
||||
abort(404);
|
||||
abort(404,'I could not find the database for this object.');
|
||||
}
|
||||
}
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user