This commit is contained in:
elforjani3
2021-03-21 18:50:22 +02:00
5 changed files with 39 additions and 23 deletions

View File

@@ -31,7 +31,7 @@ export default function AccountantForm() {
return ( return (
<Form> <Form>
{/* ----------- accounts ----------- */} {/* ----------- Accounts ----------- */}
<FormGroup <FormGroup
label={ label={
<strong> <strong>
@@ -46,7 +46,7 @@ export default function AccountantForm() {
label={'Should account code be unique when create a new account.'} label={'Should account code be unique when create a new account.'}
/> />
</FormGroup> </FormGroup>
{/* ----------- accounting basis ----------- */} {/* ----------- Accounting basis ----------- */}
<FastField name={'accounting_basis'}> <FastField name={'accounting_basis'}>
{({ form, field: { value }, meta: { error, touched } }) => ( {({ form, field: { value }, meta: { error, touched } }) => (
<FormGroup <FormGroup
@@ -64,7 +64,8 @@ export default function AccountantForm() {
</FormGroup> </FormGroup>
)} )}
</FastField> </FastField>
{/* ----------- deposit customer account ----------- */}
{/* ----------- Deposit customer account ----------- */}
<FastField name={'deposit_customer_account'}> <FastField name={'deposit_customer_account'}>
{({ form, field: { value }, meta: { error, touched } }) => ( {({ form, field: { value }, meta: { error, touched } }) => (
<FormGroup <FormGroup
@@ -88,13 +89,13 @@ export default function AccountantForm() {
)} )}
</FastField> </FastField>
{/* ----------- withdrawal customer account ----------- */} {/* ----------- Withdrawal customer account ----------- */}
<FastField name={'withdrawal_customer_account'}> <FastField name={'withdrawal_customer_account'}>
{({ form, field: { value }, meta: { error, touched } }) => ( {({ form, field: { value }, meta: { error, touched } }) => (
<FormGroup <FormGroup
label={ label={
<strong> <strong>
<T id={'withdrawal_customer_account'} /> <T id={'withdrawal_vendor_account'} />
</strong> </strong>
} }
helperText={ helperText={
@@ -111,13 +112,13 @@ export default function AccountantForm() {
)} )}
</FastField> </FastField>
{/* ----------- withdrawal customer account ----------- */} {/* ----------- Withdrawal customer account ----------- */}
<FastField name={'vendor_advance_deposit'}> <FastField name={'vendor_advance_deposit'}>
{({ form, field: { value }, meta: { error, touched } }) => ( {({ form, field: { value }, meta: { error, touched } }) => (
<FormGroup <FormGroup
label={ label={
<strong> <strong>
<T id={'vendor_advance_deposit'} /> <T id={'customer_advance_deposit'} />
</strong> </strong>
} }
helperText={ helperText={

View File

@@ -9,10 +9,10 @@ const AccountantFormContext = React.createContext();
*/ */
function AccountantFormProvider({ ...props }) { function AccountantFormProvider({ ...props }) {
// Fetches the accounts list. // Fetches the accounts list.
const { isFetching: isAccountsLoading, data: accounts } = useAccounts(); const { isLoading: isAccountsLoading, data: accounts } = useAccounts();
//Fetches Organization Settings. //Fetches Organization Settings.
const { isFetching: isSettingsLoading } = useSettings(); const { isLoading: isSettingsLoading } = useSettings();
// Save Organization Settings. // Save Organization Settings.
const { mutateAsync: saveSettingMutate } = useSaveSettings(); const { mutateAsync: saveSettingMutate } = useSaveSettings();

View File

@@ -821,7 +821,7 @@ export default {
average_rate: 'Average rate', average_rate: 'Average rate',
the_name_used_before: 'The name is already used.', the_name_used_before: 'The name is already used.',
the_item_has_associated_transactions: 'The item has associated transactions.', the_item_has_associated_transactions: 'The item has associated transactions.',
customer_has_sales_invoices: 'Customer has sales invoices', customer_has_sales_invoices: 'Cannot delete customer has associated sales invoices.',
account_name_is_already_used: 'Account name is already used.', account_name_is_already_used: 'Account name is already used.',
vendors: 'Vendors', vendors: 'Vendors',
vendor_email: 'Vendor Email', vendor_email: 'Vendor Email',

View File

@@ -547,6 +547,5 @@ export default [
path: `/`, path: `/`,
component: lazy(() => import('containers/Homepage/Homepage')), component: lazy(() => import('containers/Homepage/Homepage')),
breadcrumb: 'Home', breadcrumb: 'Home',
pageTitle: 'Homepage',
}, },
]; ];

View File

@@ -35,13 +35,15 @@ export default {
{ {
key: "time_zone", key: "time_zone",
type: "string", type: "string",
// config: true,
}, },
{ {
key: "date_format", key: "date_format",
type: "string", type: "string",
// config: true,
}, },
{
key: 'accounting_basis',
type: 'string',
}
], ],
manual_journals: [ manual_journals: [
{ {
@@ -59,13 +61,9 @@ export default {
], ],
bill_payments: [ bill_payments: [
{ {
key: "next_number", key: 'withdrawal_account',
type: "number", type: 'string'
}, }
{
key: "number_prefix",
type: "string",
},
], ],
sales_estimates: [ sales_estimates: [
{ {
@@ -125,19 +123,27 @@ export default {
{ {
key: "auto_increment", key: "auto_increment",
type: "boolean", type: "boolean",
},
{
key: 'deposit_account',
type: 'string'
},
{
key: 'advance_deposit',
key: 'string'
} }
], ],
items: [ items: [
{ {
key: "preferred_sell_account", key: "sell_account",
type: "number", type: "number",
}, },
{ {
key: "preferred_cost_account", key: "cost_account",
type: "number", type: "number",
}, },
{ {
key: "preferred_inventory_account", key: "inventory_account",
type: "number", type: "number",
}, },
], ],
@@ -147,4 +153,14 @@ export default {
type: "number", type: "number",
}, },
], ],
accounts: [
{
key: 'account_code_required',
type: 'boolean',
},
{
key: 'account_code_unique',
type: 'boolean',
},
]
}; };