Skip to content

Commit

Permalink
identificativo movimento in importazione csv. closes #292
Browse files Browse the repository at this point in the history
  • Loading branch information
madbob committed Oct 13, 2024
1 parent 1084232 commit 6d56d77
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 0 deletions.
5 changes: 5 additions & 0 deletions code/app/Importers/CSV/Movements.php
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,9 @@ public function fields()
'amount' => (object) [
'label' => _i('Valore'),
],
'identifier' => (object) [
'label' => _i('Identificativo'),
],
'notes' => (object) [
'label' => _i('Note'),
],
Expand Down Expand Up @@ -234,6 +237,7 @@ public function run($request)
$types = $request->input('mtype', []);
$methods = $request->input('method', []);
$amounts = $request->input('amount', []);
$identifiers = $request->input('identifier', []);
$currencies = $request->input('currency_id', []);

$errors = [];
Expand All @@ -249,6 +253,7 @@ public function run($request)
$m->date = $dates[$index];
$m->type = $types[$index];
$m->amount = $amounts[$index];
$m->identifier = $identifiers[$index];
$m->method = $methods[$index];
$m->currency_id = $currencies[$index];
$m->notes = $notes[$index];
Expand Down
1 change: 1 addition & 0 deletions code/resources/views/import/csvmovementsselect.blade.php
Original file line number Diff line number Diff line change
Expand Up @@ -91,6 +91,7 @@
<td>
{{ printablePriceCurrency($mov->amount) }}
<x-larastrap::hidden name="amount" npostfix="[]" />
<x-larastrap::hidden name="identifier" npostfix="[]" />
</td>
<td>
<x-larastrap::selectobj name="currency_id" npostfix="[]" squeeze :options="$currencies" classes="csv_movement_currency_select" />
Expand Down

0 comments on commit 6d56d77

Please sign in to comment.