2
0
mirror of https://github.com/frappe/books.git synced 2024-05-30 07:10:48 +00:00

chore: format files using prettier

This commit is contained in:
18alantom 2023-06-27 13:10:04 +05:30
parent 711b4d9b20
commit 8c9d81d298
28 changed files with 3985 additions and 4851 deletions

View File

@ -51,5 +51,5 @@ jobs:
- name: Build Source Files
run: yarn build --nosign --nopackage
- name: Run UI Tests
run: yarn uitest
- name: Run UI Tests
run: yarn uitest

View File

@ -1,4 +1,3 @@
**/types.ts
**/dist_electron
**/dummy/*.json
**/fixtures/countryInfo.json
**/dummy/*.json

View File

@ -97,7 +97,6 @@ couple of seconds to render this because of how dev mode works. Each file is
individually served by the dev server. And there are many files that have to be
sent.
**Note: Debug Electron Main Process**
When in dev mode electron runs with the `--inspect` flag which allows an

View File

@ -8,7 +8,7 @@ import {
assertDoesNotThrow,
assertThrows,
BaseMetaKey,
getBuiltTestSchemaMap
getBuiltTestSchemaMap,
} from './helpers';
/**

View File

@ -8,4 +8,4 @@ these are not to be edited.
The generated data has some randomness, there is a `baseCount` arg to the
exported `setupDummyInstance` function, the number of transactions generated are
always more than this.
always more than this.

File diff suppressed because it is too large Load Diff

View File

@ -1,4 +1,3 @@
{
"countryCode": "ae",
"name": "U.A.E - Chart of Accounts",
@ -464,4 +463,4 @@
"rootType": "Equity"
}
}
}
}

View File

@ -409,4 +409,4 @@
"rootType": "Income"
}
}
}
}

File diff suppressed because it is too large Load Diff

View File

@ -420,4 +420,4 @@
"rootType": "Asset"
}
}
}
}

View File

@ -832,4 +832,4 @@
"rootType": "Income"
}
}
}
}

View File

@ -684,4 +684,4 @@
"rootType": "Income"
}
}
}
}

View File

@ -173,4 +173,4 @@
"rootType": "Liability"
}
}
}
}

View File

@ -599,4 +599,4 @@
"rootType": "Liability"
}
}
}
}

View File

@ -491,4 +491,4 @@
"rootType": "Liability"
}
}
}
}

View File

@ -690,4 +690,4 @@
"rootType": "Asset"
}
}
}
}

View File

@ -308,4 +308,4 @@
"rootType": "Liability"
}
}
}
}

View File

@ -1,170 +1,170 @@
{
"Application of Funds (Assets)": {
"Current Assets": {
"Accounts Receivable": {
"Debtors": {
"accountType": "Receivable"
}
},
"Bank Accounts": {
"accountType": "Bank",
"isGroup": true
},
"Cash In Hand": {
"Cash": {
"accountType": "Cash"
},
"accountType": "Cash"
},
"Loans and Advances (Assets)": {
"isGroup": true
},
"Securities and Deposits": {
"Earnest Money": {}
},
"Stock Assets": {
"Stock In Hand": {
"accountType": "Stock"
},
"accountType": "Stock"
},
"Tax Assets": {
"isGroup": true
}
"Current Assets": {
"Accounts Receivable": {
"Debtors": {
"accountType": "Receivable"
}
},
"Fixed Assets": {
"Capital Equipments": {
"accountType": "Fixed Asset"
},
"Electronic Equipments": {
"accountType": "Fixed Asset"
},
"Furnitures and Fixtures": {
"accountType": "Fixed Asset"
},
"Office Equipments": {
"accountType": "Fixed Asset"
},
"Plants and Machineries": {
"accountType": "Fixed Asset"
},
"Buildings": {
"accountType": "Fixed Asset"
},
"Softwares": {
"accountType": "Fixed Asset"
},
"Accumulated Depreciation": {
"accountType": "Accumulated Depreciation"
}
},
"Investments": {
"Bank Accounts": {
"accountType": "Bank",
"isGroup": true
},
"Temporary Accounts": {
"Temporary Opening": {
"accountType": "Temporary"
}
"Cash In Hand": {
"Cash": {
"accountType": "Cash"
},
"accountType": "Cash"
},
"rootType": "Asset"
"Loans and Advances (Assets)": {
"isGroup": true
},
"Securities and Deposits": {
"Earnest Money": {}
},
"Stock Assets": {
"Stock In Hand": {
"accountType": "Stock"
},
"accountType": "Stock"
},
"Tax Assets": {
"isGroup": true
}
},
"Fixed Assets": {
"Capital Equipments": {
"accountType": "Fixed Asset"
},
"Electronic Equipments": {
"accountType": "Fixed Asset"
},
"Furnitures and Fixtures": {
"accountType": "Fixed Asset"
},
"Office Equipments": {
"accountType": "Fixed Asset"
},
"Plants and Machineries": {
"accountType": "Fixed Asset"
},
"Buildings": {
"accountType": "Fixed Asset"
},
"Softwares": {
"accountType": "Fixed Asset"
},
"Accumulated Depreciation": {
"accountType": "Accumulated Depreciation"
}
},
"Investments": {
"isGroup": true
},
"Temporary Accounts": {
"Temporary Opening": {
"accountType": "Temporary"
}
},
"rootType": "Asset"
},
"Expenses": {
"Direct Expenses": {
"Stock Expenses": {
"Cost of Goods Sold": {
"accountType": "Cost of Goods Sold"
},
"Expenses Included In Valuation": {
"accountType": "Expenses Included In Valuation"
},
"Stock Adjustment": {
"accountType": "Stock Adjustment"
}
}
"Direct Expenses": {
"Stock Expenses": {
"Cost of Goods Sold": {
"accountType": "Cost of Goods Sold"
},
"Expenses Included In Valuation": {
"accountType": "Expenses Included In Valuation"
},
"Stock Adjustment": {
"accountType": "Stock Adjustment"
}
}
},
"Indirect Expenses": {
"Administrative Expenses": {},
"Commission on Sales": {},
"Depreciation": {
"accountType": "Depreciation"
},
"Indirect Expenses": {
"Administrative Expenses": {},
"Commission on Sales": {},
"Depreciation": {
"accountType": "Depreciation"
},
"Entertainment Expenses": {},
"Freight and Forwarding Charges": {
"accountType": "Chargeable"
},
"Legal Expenses": {},
"Marketing Expenses": {
"accountType": "Chargeable"
},
"Miscellaneous Expenses": {
"accountType": "Chargeable"
},
"Office Maintenance Expenses": {},
"Office Rent": {},
"Postal Expenses": {},
"Print and Stationery": {},
"Round Off": {
"accountType": "Round Off"
},
"Salary": {},
"Sales Expenses": {},
"Telephone Expenses": {},
"Travel Expenses": {},
"Utility Expenses": {},
"Write Off": {},
"Exchange Gain/Loss": {},
"Gain/Loss on Asset Disposal": {}
"Entertainment Expenses": {},
"Freight and Forwarding Charges": {
"accountType": "Chargeable"
},
"rootType": "Expense"
"Legal Expenses": {},
"Marketing Expenses": {
"accountType": "Chargeable"
},
"Miscellaneous Expenses": {
"accountType": "Chargeable"
},
"Office Maintenance Expenses": {},
"Office Rent": {},
"Postal Expenses": {},
"Print and Stationery": {},
"Round Off": {
"accountType": "Round Off"
},
"Salary": {},
"Sales Expenses": {},
"Telephone Expenses": {},
"Travel Expenses": {},
"Utility Expenses": {},
"Write Off": {},
"Exchange Gain/Loss": {},
"Gain/Loss on Asset Disposal": {}
},
"rootType": "Expense"
},
"Income": {
"Direct Income": {
"Sales": {},
"Service": {}
},
"Indirect Income": {
"isGroup": true
},
"rootType": "Income"
"Direct Income": {
"Sales": {},
"Service": {}
},
"Indirect Income": {
"isGroup": true
},
"rootType": "Income"
},
"Source of Funds (Liabilities)": {
"Current Liabilities": {
"Accounts Payable": {
"Creditors": {
"accountType": "Payable"
},
"Payroll Payable": {}
},
"Stock Liabilities": {
"Stock Received But Not Billed": {
"accountType": "Stock Received But Not Billed"
}
},
"Duties and Taxes": {
"accountType": "Tax",
"isGroup": true
},
"Loans (Liabilities)": {
"Secured Loans": {},
"Unsecured Loans": {},
"Bank Overdraft Account": {}
}
"Current Liabilities": {
"Accounts Payable": {
"Creditors": {
"accountType": "Payable"
},
"Payroll Payable": {}
},
"rootType": "Liability"
"Stock Liabilities": {
"Stock Received But Not Billed": {
"accountType": "Stock Received But Not Billed"
}
},
"Duties and Taxes": {
"accountType": "Tax",
"isGroup": true
},
"Loans (Liabilities)": {
"Secured Loans": {},
"Unsecured Loans": {},
"Bank Overdraft Account": {}
}
},
"rootType": "Liability"
},
"Equity": {
"Capital Stock": {
"accountType": "Equity"
},
"Dividends Paid": {
"accountType": "Equity"
},
"Opening Balance Equity": {
"accountType": "Equity"
},
"Retained Earnings": {
"accountType": "Equity"
},
"rootType": "Equity"
"Capital Stock": {
"accountType": "Equity"
},
"Dividends Paid": {
"accountType": "Equity"
},
"Opening Balance Equity": {
"accountType": "Equity"
},
"Retained Earnings": {
"accountType": "Equity"
},
"rootType": "Equity"
}
}
}

View File

@ -29,7 +29,7 @@ located in `model/doc.ts`, all classes exported from `books/models` extend this.
- **Model**: the controller class that extends the `Doc` class, or the `Doc`
class itself (if a specific controller doesn't exist).
- **doc** (not `Doc`): instance of a Model, i.e. what has the data.
If you are confused, I understand.
## Initialization
@ -102,6 +102,7 @@ strings globally since this will be evaluated before the map is loaded.
The doc and db handlers have observers (instances of `Observable`) as
properties, these can be accessed using
- `fyo.db.observer`
- `fyo.doc.observer`
@ -109,4 +110,4 @@ The purpose of the observer is to trigger registered callbacks when some `doc`
operation or `db` operation takes place.
These are schema level observers i.e. they are registered like so:
`method:schemaName`. The callbacks receive args passed to the functions.
`method:schemaName`. The callbacks receive args passed to the functions.

View File

@ -1,3 +1,3 @@
module.exports = {
plugins: [require('tailwindcss'), require('autoprefixer')]
plugins: [require('tailwindcss'), require('autoprefixer')],
};

View File

@ -17,7 +17,7 @@ There are a few types of schemas:
- **Subclass**: Schemas that have an `"extends"` field on them, the value of which
points to an Abstract schema.
- **Complete**: Schemas which are neither abstract nor stub.
For more detail on the meta structure of the schema check `books/schemas/types.ts`.
## Final Schema
@ -40,4 +40,4 @@ In all the schemas, the `"name"` field/column is the primary key. If it isn't
explicitly added, the schema builder will add it in.
The following schema fields will be implicitly translated by the frontend:
`"label"`, `"description"`, and `"placeholder"`, irrespective of nesting.
`"label"`, `"description"`, and `"placeholder"`, irrespective of nesting.

View File

@ -21,4 +21,4 @@
],
"keywordFields": ["name"],
"quickEditFields": ["details"]
}
}

View File

@ -21,4 +21,4 @@
}
],
"tableFields": ["account", "rate"]
}
}

View File

@ -2,4 +2,4 @@
"name": "Customer",
"label": "Customer",
"extends": "Party"
}
}

View File

@ -6,14 +6,14 @@ import {
cleanSchemas,
getAbstractCombinedSchemas,
getRegionalCombinedSchemas,
setSchemaNameOnFields
setSchemaNameOnFields,
} from '../index';
import { metaSchemas } from '../schemas';
import {
everyFieldExists,
getTestSchemaMap,
someFieldExists,
subtract
subtract,
} from './helpers';
const { appSchemaMap, regionalSchemaMap } = getTestSchemaMap();

View File

@ -64,4 +64,4 @@ test('import SalesInvoices', async (t) => {
);
});
closeTestFyo(fyo, __filename);
closeTestFyo(fyo, __filename);

View File

@ -6,7 +6,7 @@ import { getValueMapFromList } from 'utils';
import {
getTestDbPath,
getTestFyo,
getTestSetupWizardOptions
getTestSetupWizardOptions,
} from './helpers';
const dbPath = getTestDbPath();

View File

@ -2,12 +2,11 @@ import vue from '@vitejs/plugin-vue';
import path from 'path';
import { defineConfig } from 'vite';
/**
* This vite config file is used only for dev mode, i.e.
* to create a serve build modules of the source code
* which will be rendered by electron.
*
*
* For building the project, vite is used programmatically
* see build/scripts/build.mjs for this.
*/