mirror of
https://github.com/bigcapitalhq/bigcapital.git
synced 2026-02-19 06:10:31 +00:00
feat: payment receive and made form.
This commit is contained in:
@@ -16,7 +16,8 @@ const initialState = {
|
||||
receivable: {
|
||||
byCustomerId: [],
|
||||
byPaymentReceiveId: [],
|
||||
}
|
||||
},
|
||||
byPaymentReceiveId: {},
|
||||
};
|
||||
|
||||
const defaultInvoice = {
|
||||
@@ -115,6 +116,13 @@ const reducer = createReducer(initialState, {
|
||||
|
||||
state.receivable.byCustomerId[customerId] = saleInvoiceIds
|
||||
},
|
||||
|
||||
[t.INVOICES_BY_PAYMENT_ID]: (state, action) => {
|
||||
const { paymentReceiveId, saleInvoices } = action.payload;
|
||||
const saleInvoiceIds = saleInvoices.map((saleInvoice) => saleInvoice.id);
|
||||
|
||||
state.byPaymentReceiveId[paymentReceiveId] = saleInvoiceIds;
|
||||
},
|
||||
});
|
||||
|
||||
export default createTableQueryReducers('sales_invoices', reducer);
|
||||
|
||||
Reference in New Issue
Block a user