mirror of
https://github.com/invoiceninja/invoiceninja.git
synced 2025-05-24 02:14:21 -04:00
Expense categories
This commit is contained in:
parent
05caec8aef
commit
28f140ee37
@ -31,7 +31,7 @@ class ExpenseFactory
|
||||
$expense->tax_rate2 = 0;
|
||||
$expense->tax_name3 = '';
|
||||
$expense->tax_rate3 = 0;
|
||||
$expense->expense_date = null;
|
||||
$expense->date = null;
|
||||
$expense->payment_date = null;
|
||||
|
||||
return $expense;
|
||||
|
@ -32,7 +32,7 @@
|
||||
* @OA\Property(property="amount", type="number", format="float", example="10.00", description="_________"),
|
||||
* @OA\Property(property="foreign_amount", type="number", format="float", example="10.00", description="_________"),
|
||||
* @OA\Property(property="exchange_rate", type="number", format="float", example="0.80", description="_________"),
|
||||
* @OA\Property(property="expense_date", type="string", example="", description="________"),
|
||||
* @OA\Property(property="date", type="string", example="", description="________"),
|
||||
* @OA\Property(property="payment_date", type="string", example="", description="________"),
|
||||
* @OA\Property(property="should_be_invoiced", type="boolean", example=true, description="_________"),
|
||||
* @OA\Property(property="is_deleted", type="boolean", example=true, description="_________"),
|
||||
|
@ -25,7 +25,7 @@ class Expense extends BaseModel
|
||||
'client_id',
|
||||
'vendor_id',
|
||||
'expense_currency_id',
|
||||
'expense_date',
|
||||
'date',
|
||||
'invoice_currency_id',
|
||||
'amount',
|
||||
'foreign_amount',
|
||||
|
@ -77,7 +77,7 @@ class ExpenseTransformer extends EntityTransformer
|
||||
'public_notes' => (string) $expense->public_notes ?: '',
|
||||
'transaction_reference' => (string) $expense->transaction_reference ?: '',
|
||||
'transaction_id' => (string) $expense->transaction_id ?: '',
|
||||
'expense_date' => $expense->expense_date ?: '',
|
||||
'date' => $expense->date ?: '',
|
||||
'payment_date' => $expense->payment_date ?: '',
|
||||
'custom_value1' => $expense->custom_value1 ?: '',
|
||||
'custom_value2' => $expense->custom_value2 ?: '',
|
||||
|
@ -37,7 +37,7 @@ class ExpenseFactory extends Factory
|
||||
'custom_value3' => $this->faker->text(10),
|
||||
'custom_value4' => $this->faker->text(10),
|
||||
'exchange_rate' => $this->faker->randomFloat(2, 0, 1),
|
||||
'expense_date' => $this->faker->date(),
|
||||
'date' => $this->faker->date(),
|
||||
'is_deleted' => false,
|
||||
'public_notes' => $this->faker->text(50),
|
||||
'private_notes' => $this->faker->text(50),
|
||||
|
@ -20,6 +20,10 @@ class ProjectNumberColumn extends Migration
|
||||
Schema::table('expenses', function ($t){
|
||||
$t->renameColumn('expense_date', 'date');
|
||||
});
|
||||
|
||||
Schema::table('expense_categories', function ($t){
|
||||
$t->boolean('is_deleted')->default(false);
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
|
@ -54,7 +54,7 @@ class ExpenseCategoryApiTest extends TestCase
|
||||
public function testExpenseCategoryPost()
|
||||
{
|
||||
$data = [
|
||||
'public_notes' => $this->faker->firstName,
|
||||
'name' => $this->faker->firstName,
|
||||
];
|
||||
|
||||
$response = $this->withHeaders([
|
||||
@ -68,8 +68,7 @@ class ExpenseCategoryApiTest extends TestCase
|
||||
public function testExpenseCategoryPut()
|
||||
{
|
||||
$data = [
|
||||
'public_notes' => $this->faker->firstName,
|
||||
'id_number' => 'Coolio',
|
||||
'name' => $this->faker->firstName,
|
||||
];
|
||||
|
||||
$response = $this->withHeaders([
|
||||
|
Loading…
x
Reference in New Issue
Block a user