fix: customer/vendor opening balance .

This commit is contained in:
elforjani13
2022-03-23 00:09:08 +02:00
parent bac6812d36
commit 5a508dd789
4 changed files with 28 additions and 22 deletions

View File

@@ -7,7 +7,7 @@ import {
} from 'hooks/query';
import { useFeatureCan } from 'hooks/state';
import { Features } from 'common';
import { pick, defaultTo } from 'lodash';
import { transfromVendorToForm } from './utils';
const VendorOpeningBalanceContext = React.createContext();
@@ -43,15 +43,7 @@ function VendorOpeningBalanceFormProvider({
// State provider.
const provider = {
branches,
vendor: {
...pick(vendor, [
'id',
'opening_balance',
'opening_balance_exchange_rate',
'currency_code',
]),
},
vendor: transfromVendorToForm(vendor),
isBranchesSuccess,
isBranchesLoading,
dialogName,