View | Details | Raw Unified | Return to bug 26274
Collapse All | Expand All

(-)a/Koha/Cash/Register/Cashup.pm (+6 lines)
Lines 164-166 sub to_api_mapping { Link Here
164
}
164
}
165
165
166
1;
166
1;
167
168
=head1 AUTHORS
169
170
Martin Renvoize <martin.renvoize@ptfs-europe.com>
171
172
=cut
(-)a/Koha/REST/V1/CashRegisters/Cashups.pm (-1 / +5 lines)
Lines 65-71 sub get { Link Here
65
                            openapi => { error => "Cashup not found" } );
65
                            openapi => { error => "Cashup not found" } );
66
        }
66
        }
67
67
68
        return $c->render( status => 200, openapi => $cashup->to_api );
68
        my $embed = $c->stash('koha.embed');
69
        return $c->render(
70
            status  => 200,
71
            openapi => $cashup->to_api( { embed => $embed } )
72
        );
69
    }
73
    }
70
    catch {
74
    catch {
71
        $c->unhandled_exception($_);
75
        $c->unhandled_exception($_);
(-)a/api/v1/swagger/definitions/cashup.json (+4 lines)
Lines 21-26 Link Here
21
            "type": "string",
21
            "type": "string",
22
            "format": "date-time",
22
            "format": "date-time",
23
            "description": "Timestamp for the latest line update"
23
            "description": "Timestamp for the latest line update"
24
        },
25
        "summary": {
26
            "type": "object",
27
            "description": "A summary of the cashup action"
24
        }
28
        }
25
    }
29
    }
26
}
30
}
(-)a/api/v1/swagger/paths/cash_registers.json (-2 / +4 lines)
Lines 95-101 Link Here
95
                "permissions": {
95
                "permissions": {
96
                    "cash_management": "cashup"
96
                    "cash_management": "cashup"
97
                }
97
                }
98
            }
98
            },
99
            "x-koha-embed": [
100
                "summary"
101
            ]
99
        }
102
        }
100
    }
103
    }
101
}
104
}
102
- 

Return to bug 26274