Sfoglia il codice sorgente

feat(financial): cliente de API de contas a receber da unidade

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
ebagabee 1 mese fa
parent
commit
f528ed2409
1 ha cambiato i file con 16 aggiunte e 0 eliminazioni
  1. 16 0
      src/api/unit_receivable.js

+ 16 - 0
src/api/unit_receivable.js

@@ -0,0 +1,16 @@
+import api from "src/api";
+
+export const getReceivablesMe = async (params = {}) => {
+  const { data } = await api.get("/unit-receivable/me", { params });
+  return data.payload;
+};
+
+export const settleReceivableMe = async (id, payload = {}) => {
+  const { data } = await api.post(`/unit-receivable/me/${id}/settle`, payload);
+  return data.payload;
+};
+
+export const reopenReceivableMe = async (id) => {
+  const { data } = await api.post(`/unit-receivable/me/${id}/reopen`);
+  return data.payload;
+};