Skip to content

Commit

Permalink
identificativo dei movimenti incluso in export csv e sempre visualizz…
Browse files Browse the repository at this point in the history
…ato in fase di creazione/modifica. closes #278
  • Loading branch information
madbob committed May 24, 2024
1 parent 0253f1f commit b97289a
Show file tree
Hide file tree
Showing 6 changed files with 16 additions and 30 deletions.
23 changes: 12 additions & 11 deletions code/app/Http/Controllers/MovementsController.php
Original file line number Diff line number Diff line change
Expand Up @@ -94,19 +94,20 @@ private function exportMain($format, $movements)
$filename = sanitizeFilename(_i('Esportazione movimenti GAS %s.%s', [date('d/m/Y'), $format]));

if ($format == 'csv') {
$headers = [_i('Data Registrazione'), _i('Data Movimento'), _i('Tipo'), _i('Pagamento'), _i('Pagante'), _i('Pagato'), _i('Valore'), _i('Note')];
$headers = [_i('Data Registrazione'), _i('Data Movimento'), _i('Tipo'), _i('Pagamento'), _i('Identificativo'), _i('Pagante'), _i('Pagato'), _i('Valore'), _i('Note')];

return output_csv($filename, $headers, $movements, function($mov) {
$row = [];
$row[] = $mov->registration_date;
$row[] = $mov->date;
$row[] = $mov->printableType();
$row[] = $mov->printablePayment();
$row[] = $mov->sender ? $mov->sender->printableName() : '';
$row[] = $mov->target ? $mov->target->printableName() : '';
$row[] = printablePrice($mov->amount);
$row[] = $mov->notes;
return $row;
$row = [];
$row[] = $mov->registration_date;
$row[] = $mov->date;
$row[] = $mov->printableType();
$row[] = $mov->printablePayment();
$row[] = $mov->identifier;
$row[] = $mov->sender ? $mov->sender->printableName() : '';
$row[] = $mov->target ? $mov->target->printableName() : '';
$row[] = printablePrice($mov->amount);
$row[] = $mov->notes;
return $row;
});
}
else if ($format == 'pdf') {
Expand Down
2 changes: 1 addition & 1 deletion code/public/js/gasdotto.js

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion code/public/js/gasdotto.js.map

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion code/public/mix-manifest.json
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
{
"/js/gasdotto.js": "/js/gasdotto.js?id=8cecf642fcbb1fa75121ccab0939d838",
"/js/gasdotto.js": "/js/gasdotto.js?id=984c70fc3722a1d3deb0b60b236b2662",
"/css/gasdotto.css": "/css/gasdotto.css?id=9f62fdf8e27345aa16d289be04885ed2"
}
11 changes: 0 additions & 11 deletions code/resources/assets/js/movements.js
Original file line number Diff line number Diff line change
Expand Up @@ -32,17 +32,6 @@ class Movements {

static initModals(container)
{
$('input[name=method]', container).change(function() {
if ($(this).prop('checked') == false) {
return;
}

var method_string = 'when-method-' + $(this).val();
$(this).closest('.movement-modal').find('[class*="when-method-"]').each(function() {
$(this).toggleClass('hidden', ($(this).hasClass(method_string) == false));
});
});

$('input[name=amount]', container).change(function() {
var status = $(this).closest('.movement-modal').find('.sender-credit-status');
if (status.length) {
Expand Down
6 changes: 1 addition & 5 deletions code/resources/views/movement/modal.blade.php
Original file line number Diff line number Diff line change
Expand Up @@ -81,11 +81,7 @@
@endif

<x-larastrap::datepicker name="date" :label="_i('Data')" defaults_now="true" />

<div class="when-method-bank when-method-satispay {{ in_array($obj->method, ['bank', 'satispay']) ? ' hidden' : '' }}">
<x-larastrap::text name="identifier" :label="_i('Identificativo')" />
</div>

<x-larastrap::text name="identifier" :label="_i('Identificativo')" />
<x-larastrap::textarea name="notes" :label="_i('Note')" />
</x-larastrap::iform>
</x-larastrap::modal>

0 comments on commit b97289a

Please sign in to comment.