mirror of
https://github.com/invoiceninja/invoiceninja.git
synced 2025-05-31 00:54:32 -04:00
Minor fixes for currency in expenses
This commit is contained in:
parent
98130f2105
commit
141f45f402
@ -14,6 +14,7 @@ namespace App\Http\Controllers;
|
|||||||
use App\Http\Controllers\Controller;
|
use App\Http\Controllers\Controller;
|
||||||
use App\Http\Requests\Import\PreImportRequest;
|
use App\Http\Requests\Import\PreImportRequest;
|
||||||
use App\Import\Definitions\Import\ImportMap;
|
use App\Import\Definitions\Import\ImportMap;
|
||||||
|
use App\Import\Definitions\InvoiceMap;
|
||||||
use Illuminate\Http\Request;
|
use Illuminate\Http\Request;
|
||||||
use Illuminate\Support\Facades\Cache;
|
use Illuminate\Support\Facades\Cache;
|
||||||
use Illuminate\Support\Str;
|
use Illuminate\Support\Str;
|
||||||
|
@ -66,6 +66,10 @@ class UpdateExpenseRequest extends Request
|
|||||||
$input['category_id'] = $this->decodePrimaryKey($input['category_id']);
|
$input['category_id'] = $this->decodePrimaryKey($input['category_id']);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (! array_key_exists('currency_id', $input) || strlen($input['currency_id']) == 0) {
|
||||||
|
$input['currency_id'] = (string)auth()->user()->company()->settings->currency_id;
|
||||||
|
}
|
||||||
|
|
||||||
$this->replace($input);
|
$this->replace($input);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -17,41 +17,43 @@ class InvoiceMap
|
|||||||
public static function importable()
|
public static function importable()
|
||||||
{
|
{
|
||||||
return [
|
return [
|
||||||
0 => 'number',
|
0 => 'invoice.number',
|
||||||
1 => 'user_id',
|
1 => 'invoice.user_id',
|
||||||
2 => 'amount',
|
2 => 'invoice.amount',
|
||||||
3 => 'balance',
|
3 => 'invoice.balance',
|
||||||
4 => 'client_id',
|
4 => 'invoice.client_id',
|
||||||
5 => 'status_id',
|
5 => 'invoice.status_id',
|
||||||
6 => 'is_deleted',
|
6 => 'invoice.is_deleted',
|
||||||
7 => 'discount',
|
7 => 'invoice.discount',
|
||||||
8 => 'po_number',
|
8 => 'invoice.po_number',
|
||||||
9 => 'date',
|
9 => 'invoice.date',
|
||||||
10 => 'due_date',
|
10 => 'invoice.due_date',
|
||||||
11 => 'terms',
|
11 => 'invoice.terms',
|
||||||
12 => 'public_notes',
|
12 => 'invoice.public_notes',
|
||||||
13 => 'private_notes',
|
13 => 'invoice.private_notes',
|
||||||
14 => 'uses_inclusive_taxes',
|
14 => 'invoice.uses_inclusive_taxes',
|
||||||
15 => 'tax_name1',
|
15 => 'invoice.tax_name1',
|
||||||
16 => 'tax_rate1',
|
16 => 'invoice.tax_rate1',
|
||||||
17 => 'tax_name2',
|
17 => 'invoice.tax_name2',
|
||||||
18 => 'tax_rate2',
|
18 => 'invoice.tax_rate2',
|
||||||
19 => 'tax_name3',
|
19 => 'invoice.tax_name3',
|
||||||
20 => 'tax_rate3',
|
20 => 'invoice.tax_rate3',
|
||||||
21 => 'is_amount_discount',
|
21 => 'invoice.is_amount_discount',
|
||||||
22 => 'footer',
|
22 => 'invoice.footer',
|
||||||
23 => 'partial',
|
23 => 'invoice.partial',
|
||||||
24 => 'partial_due_date',
|
24 => 'invoice.partial_due_date',
|
||||||
25 => 'custom_value1',
|
25 => 'invoice.custom_value1',
|
||||||
26 => 'custom_value2',
|
26 => 'invoice.custom_value2',
|
||||||
27 => 'custom_value3',
|
27 => 'invoice.custom_value3',
|
||||||
28 => 'custom_value4',
|
28 => 'invoice.custom_value4',
|
||||||
29 => 'custom_surcharge1',
|
29 => 'invoice.custom_surcharge1',
|
||||||
30 => 'custom_surcharge2',
|
30 => 'invoice.custom_surcharge2',
|
||||||
31 => 'custom_surcharge3',
|
31 => 'invoice.custom_surcharge3',
|
||||||
32 => 'custom_surcharge4',
|
32 => 'invoice.custom_surcharge4',
|
||||||
33 => 'exchange_rate',
|
33 => 'invoice.exchange_rate',
|
||||||
34 => 'line_items',
|
34 => 'invoice.line_items',
|
||||||
|
35 => 'client.name',
|
||||||
|
36 => 'client.email',
|
||||||
];
|
];
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user