mirror of
https://github.com/invoiceninja/invoiceninja.git
synced 2024-11-05 18:52:44 +01:00
Fixes for task statuses and tests
This commit is contained in:
parent
2e499adea6
commit
b5606c1524
@ -22,6 +22,7 @@ class ExpenseCategoryFactory
|
||||
$expense->company_id = $company_id;
|
||||
$expense->name = '';
|
||||
$expense->is_deleted = false;
|
||||
$expense->color = '#fff';
|
||||
|
||||
return $expense;
|
||||
}
|
||||
|
@ -62,6 +62,9 @@ class StoreExpenseRequest extends Request
|
||||
$input['currency_id'] = (string)auth()->user()->company()->settings->currency_id;
|
||||
}
|
||||
|
||||
if(array_key_exists('color', $input) && is_null($input['color']))
|
||||
$input['color'] = '#fff';
|
||||
|
||||
$this->replace($input);
|
||||
}
|
||||
|
||||
|
@ -49,6 +49,10 @@ class StoreProjectRequest extends Request
|
||||
{
|
||||
$input = $this->decodePrimaryKeys($this->all());
|
||||
|
||||
|
||||
if(array_key_exists('color', $input) && is_null($input['color']))
|
||||
$input['color'] = '#fff';
|
||||
|
||||
$this->replace($input);
|
||||
}
|
||||
|
||||
|
@ -48,6 +48,9 @@ class UpdateProjectRequest extends Request
|
||||
unset($input['client_id']);
|
||||
}
|
||||
|
||||
if(array_key_exists('color', $input) && is_null($input['color']))
|
||||
$input['color'] = '#fff';
|
||||
|
||||
$this->replace($input);
|
||||
}
|
||||
}
|
||||
|
@ -50,6 +50,9 @@ class UpdateTaskRequest extends Request
|
||||
$input['status_id'] = $this->decodePrimaryKey($input['status_id']);
|
||||
}
|
||||
|
||||
if(array_key_exists('color', $input) && is_null($input['color']))
|
||||
$input['color'] = '#fff';
|
||||
|
||||
$this->replace($input);
|
||||
}
|
||||
}
|
||||
|
@ -104,8 +104,8 @@ class CompanyGatewayResolutionTest extends TestCase
|
||||
{
|
||||
$fee = $this->cg->calcGatewayFee(10, GatewayType::CREDIT_CARD, false);
|
||||
$this->assertEquals(0.2, $fee);
|
||||
$fee = $this->cg->calcGatewayFee(10, GatewayType::CREDIT_CARD, false);
|
||||
$this->assertEquals(0.1, $fee);
|
||||
// $fee = $this->cg->calcGatewayFee(10, GatewayType::CREDIT_CARD, false);
|
||||
// $this->assertEquals(0.1, $fee);
|
||||
}
|
||||
|
||||
/**
|
||||
|
Loading…
Reference in New Issue
Block a user