fix: dohvat mjesecnih racuna za troskove
Uklanja ovisnost o workOrders.invoices i dohvaća račune direktno kroz API filtriran po mjesecu. Dodaje i display code putnog naloga u serializer kako bi prikaz u izvještaju ostao potpun. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
This commit is contained in:
@@ -920,6 +920,13 @@ export async function fetchMonthlyServicerEntries(year, month) {
|
||||
return Array.isArray(payload) ? payload : (payload?.results ?? []);
|
||||
}
|
||||
|
||||
export async function fetchMonthlyCostInvoices(year, month) {
|
||||
const payload = await api.get(
|
||||
`fleet/work-order-invoices/?year=${year}&month=${month}`
|
||||
);
|
||||
return Array.isArray(payload) ? payload : (payload?.results ?? []);
|
||||
}
|
||||
|
||||
export async function upsertMonthlyServicerEntry(data = {}) {
|
||||
if (!data.entry_date) {
|
||||
throw new Error('Datum dnevnog unosa je obavezan.');
|
||||
|
||||
Reference in New Issue
Block a user