mirror of
https://github.com/frappe/books.git
synced 2024-11-09 23:30:56 +00:00
fix: translate all labels
This commit is contained in:
parent
f99de4cd86
commit
c52b7f54ad
@ -294,47 +294,47 @@ export async function generateGstr2Csv(getReportData) {
|
||||
async function generateB2bCsvGstr2(rows, columns) {
|
||||
const csvColumns = [
|
||||
{
|
||||
label: 'GSTIN of Supplier',
|
||||
label: t`GSTIN of Supplier`,
|
||||
fieldname: 'gstin',
|
||||
},
|
||||
{
|
||||
label: 'Invoice Number',
|
||||
label: t`Invoice Number`,
|
||||
fieldname: 'invNo',
|
||||
},
|
||||
{
|
||||
label: 'Invoice Date',
|
||||
label: t`Invoice Date`,
|
||||
fieldname: 'invDate',
|
||||
},
|
||||
{
|
||||
label: 'Invoice Value',
|
||||
label: t`Invoice Value`,
|
||||
fieldname: 'invAmt',
|
||||
},
|
||||
{
|
||||
label: 'Place of supply',
|
||||
label: t`Place of supply`,
|
||||
fieldname: 'place',
|
||||
},
|
||||
{
|
||||
label: 'Reverse Charge',
|
||||
label: t`Reverse Charge`,
|
||||
fieldname: 'reverseCharge',
|
||||
},
|
||||
{
|
||||
label: 'Rate',
|
||||
label: t`Rate`,
|
||||
fieldname: 'rate',
|
||||
},
|
||||
{
|
||||
label: 'Taxable Value',
|
||||
label: t`Taxable Value`,
|
||||
fieldname: 'taxVal',
|
||||
},
|
||||
{
|
||||
label: 'Intergrated Tax Paid',
|
||||
label: t`Intergrated Tax Paid`,
|
||||
fieldname: 'igstAmt',
|
||||
},
|
||||
{
|
||||
label: 'Central Tax Paid',
|
||||
label: t`Central Tax Paid`,
|
||||
fieldname: 'cgstAmt',
|
||||
},
|
||||
{
|
||||
label: 'State/UT Tax Paid',
|
||||
label: t`State/UT Tax Paid`,
|
||||
fieldname: 'sgstAmt',
|
||||
},
|
||||
];
|
||||
|
@ -1,5 +1,7 @@
|
||||
import { t } from 'frappe';
|
||||
|
||||
export const ledgerLink = {
|
||||
label: 'Ledger Entries',
|
||||
label: t`Ledger Entries`,
|
||||
condition: (doc) => doc.submitted,
|
||||
action: (doc, router) => {
|
||||
router.push({
|
||||
|
@ -1,67 +1,61 @@
|
||||
const { t } = require('frappe');
|
||||
|
||||
module.exports = {
|
||||
name: 'File',
|
||||
doctype: 'DocType',
|
||||
isSingle: 0,
|
||||
keywordFields: [
|
||||
'name',
|
||||
'filename'
|
||||
],
|
||||
keywordFields: ['name', 'filename'],
|
||||
fields: [
|
||||
{
|
||||
fieldname: 'name',
|
||||
label: 'File Path',
|
||||
label: t`File Path`,
|
||||
fieldtype: 'Data',
|
||||
required: 1,
|
||||
},
|
||||
{
|
||||
fieldname: 'filename',
|
||||
label: 'File Name',
|
||||
label: t`File Name`,
|
||||
fieldtype: 'Data',
|
||||
required: 1,
|
||||
},
|
||||
{
|
||||
fieldname: 'mimetype',
|
||||
label: 'MIME Type',
|
||||
label: t`MIME Type`,
|
||||
fieldtype: 'Data',
|
||||
},
|
||||
{
|
||||
fieldname: 'size',
|
||||
label: 'File Size',
|
||||
label: t`File Size`,
|
||||
fieldtype: 'Int',
|
||||
},
|
||||
{
|
||||
fieldname: 'referenceDoctype',
|
||||
label: 'Reference DocType',
|
||||
label: t`Reference DocType`,
|
||||
fieldtype: 'Data',
|
||||
},
|
||||
{
|
||||
fieldname: 'referenceName',
|
||||
label: 'Reference Name',
|
||||
label: t`Reference Name`,
|
||||
fieldtype: 'Data',
|
||||
},
|
||||
{
|
||||
fieldname: 'referenceField',
|
||||
label: 'Reference Field',
|
||||
label: t`Reference Field`,
|
||||
fieldtype: 'Data',
|
||||
},
|
||||
],
|
||||
layout: [
|
||||
{
|
||||
columns: [
|
||||
{ fields: ['filename'] },
|
||||
]
|
||||
columns: [{ fields: ['filename'] }],
|
||||
},
|
||||
{
|
||||
columns: [
|
||||
{ fields: ['mimetype'] },
|
||||
{ fields: ['size'] },
|
||||
]
|
||||
columns: [{ fields: ['mimetype'] }, { fields: ['size'] }],
|
||||
},
|
||||
{
|
||||
columns: [
|
||||
{ fields: ['referenceDoctype'] },
|
||||
{ fields: ['referenceName'] },
|
||||
]
|
||||
],
|
||||
},
|
||||
]
|
||||
}
|
||||
],
|
||||
};
|
||||
|
@ -1,22 +1,24 @@
|
||||
const { t } = require('frappe');
|
||||
|
||||
module.exports = {
|
||||
"name": "NumberSeries",
|
||||
"documentClass": require('./NumberSeriesDocument.js'),
|
||||
"doctype": "DocType",
|
||||
"isSingle": 0,
|
||||
"isChild": 0,
|
||||
"keywordFields": [],
|
||||
"fields": [
|
||||
{
|
||||
"fieldname": "name",
|
||||
"label": "Prefix",
|
||||
"fieldtype": "Data",
|
||||
"required": 1
|
||||
},
|
||||
{
|
||||
"fieldname": "current",
|
||||
"label": "Current",
|
||||
"fieldtype": "Int",
|
||||
"required": 1
|
||||
}
|
||||
]
|
||||
}
|
||||
name: 'NumberSeries',
|
||||
documentClass: require('./NumberSeriesDocument.js'),
|
||||
doctype: 'DocType',
|
||||
isSingle: 0,
|
||||
isChild: 0,
|
||||
keywordFields: [],
|
||||
fields: [
|
||||
{
|
||||
fieldname: 'name',
|
||||
label: t`Prefix`,
|
||||
fieldtype: 'Data',
|
||||
required: 1,
|
||||
},
|
||||
{
|
||||
fieldname: 'current',
|
||||
label: t`Current`,
|
||||
fieldtype: 'Int',
|
||||
required: 1,
|
||||
},
|
||||
],
|
||||
};
|
||||
|
@ -1,10 +1,12 @@
|
||||
const { t } = require('frappe');
|
||||
|
||||
module.exports = {
|
||||
name: 'PatchRun',
|
||||
fields: [
|
||||
{
|
||||
fieldname: 'name',
|
||||
fieldtype: 'Data',
|
||||
label: 'Name'
|
||||
}
|
||||
]
|
||||
label: t`Name`,
|
||||
},
|
||||
],
|
||||
};
|
||||
|
@ -1,31 +1,33 @@
|
||||
const { t } = require('frappe');
|
||||
|
||||
module.exports = {
|
||||
name: "PrintFormat",
|
||||
label: "Print Format",
|
||||
doctype: "DocType",
|
||||
isSingle: 0,
|
||||
isChild: 0,
|
||||
keywordFields: [],
|
||||
fields: [
|
||||
{
|
||||
fieldname: "name",
|
||||
label: "Name",
|
||||
fieldtype: "Data",
|
||||
required: 1
|
||||
},
|
||||
{
|
||||
fieldname: "for",
|
||||
label: "For",
|
||||
fieldtype: "Data",
|
||||
required: 1
|
||||
},
|
||||
{
|
||||
fieldname: "template",
|
||||
label: "Template",
|
||||
fieldtype: "Code",
|
||||
required: 1,
|
||||
options: {
|
||||
mode: 'text/html'
|
||||
}
|
||||
}
|
||||
]
|
||||
}
|
||||
name: 'PrintFormat',
|
||||
label: t`Print Format`,
|
||||
doctype: 'DocType',
|
||||
isSingle: 0,
|
||||
isChild: 0,
|
||||
keywordFields: [],
|
||||
fields: [
|
||||
{
|
||||
fieldname: 'name',
|
||||
label: t`Name`,
|
||||
fieldtype: 'Data',
|
||||
required: 1,
|
||||
},
|
||||
{
|
||||
fieldname: 'for',
|
||||
label: t`For`,
|
||||
fieldtype: 'Data',
|
||||
required: 1,
|
||||
},
|
||||
{
|
||||
fieldname: 'template',
|
||||
label: t`Template`,
|
||||
fieldtype: 'Code',
|
||||
required: 1,
|
||||
options: {
|
||||
mode: 'text/html',
|
||||
},
|
||||
},
|
||||
],
|
||||
};
|
||||
|
@ -1,15 +1,17 @@
|
||||
const { t } = require('frappe');
|
||||
|
||||
module.exports = {
|
||||
"name": "Role",
|
||||
"doctype": "DocType",
|
||||
"isSingle": 0,
|
||||
"isChild": 0,
|
||||
"keywordFields": [],
|
||||
"fields": [
|
||||
{
|
||||
"fieldname": "name",
|
||||
"label": "Name",
|
||||
"fieldtype": "Data",
|
||||
"required": 1
|
||||
}
|
||||
]
|
||||
}
|
||||
name: 'Role',
|
||||
doctype: 'DocType',
|
||||
isSingle: 0,
|
||||
isChild: 0,
|
||||
keywordFields: [],
|
||||
fields: [
|
||||
{
|
||||
fieldname: 'name',
|
||||
label: t`Name`,
|
||||
fieldtype: 'Data',
|
||||
required: 1,
|
||||
},
|
||||
],
|
||||
};
|
||||
|
@ -1,21 +1,23 @@
|
||||
const { t } = require('frappe');
|
||||
|
||||
module.exports = {
|
||||
"name": "Session",
|
||||
"doctype": "DocType",
|
||||
"isSingle": 0,
|
||||
"isChild": 0,
|
||||
"keywordFields": [],
|
||||
"fields": [
|
||||
{
|
||||
"fieldname": "username",
|
||||
"label": "Username",
|
||||
"fieldtype": "Data",
|
||||
"required": 1
|
||||
},
|
||||
{
|
||||
"fieldname": "password",
|
||||
"label": "Password",
|
||||
"fieldtype": "Password",
|
||||
"required": 1
|
||||
}
|
||||
]
|
||||
}
|
||||
name: 'Session',
|
||||
doctype: 'DocType',
|
||||
isSingle: 0,
|
||||
isChild: 0,
|
||||
keywordFields: [],
|
||||
fields: [
|
||||
{
|
||||
fieldname: 'username',
|
||||
label: t`Username`,
|
||||
fieldtype: 'Data',
|
||||
required: 1,
|
||||
},
|
||||
{
|
||||
fieldname: 'password',
|
||||
label: t`Password`,
|
||||
fieldtype: 'Password',
|
||||
required: 1,
|
||||
},
|
||||
],
|
||||
};
|
||||
|
@ -1,27 +1,29 @@
|
||||
const { t } = require('frappe');
|
||||
|
||||
module.exports = {
|
||||
"name": "SingleValue",
|
||||
"doctype": "DocType",
|
||||
"isSingle": 0,
|
||||
"isChild": 0,
|
||||
"keywordFields": [],
|
||||
"fields": [
|
||||
{
|
||||
"fieldname": "parent",
|
||||
"label": "Parent",
|
||||
"fieldtype": "Data",
|
||||
"required": 1
|
||||
},
|
||||
{
|
||||
"fieldname": "fieldname",
|
||||
"label": "Fieldname",
|
||||
"fieldtype": "Data",
|
||||
"required": 1
|
||||
},
|
||||
{
|
||||
"fieldname": "value",
|
||||
"label": "Value",
|
||||
"fieldtype": "Data",
|
||||
"required": 1
|
||||
}
|
||||
]
|
||||
}
|
||||
name: 'SingleValue',
|
||||
doctype: 'DocType',
|
||||
isSingle: 0,
|
||||
isChild: 0,
|
||||
keywordFields: [],
|
||||
fields: [
|
||||
{
|
||||
fieldname: 'parent',
|
||||
label: t`Parent`,
|
||||
fieldtype: 'Data',
|
||||
required: 1,
|
||||
},
|
||||
{
|
||||
fieldname: 'fieldname',
|
||||
label: t`Fieldname`,
|
||||
fieldtype: 'Data',
|
||||
required: 1,
|
||||
},
|
||||
{
|
||||
fieldname: 'value',
|
||||
label: t`Value`,
|
||||
fieldtype: 'Data',
|
||||
required: 1,
|
||||
},
|
||||
],
|
||||
};
|
||||
|
@ -29,7 +29,7 @@ let dateFormatOptions = (() => {
|
||||
|
||||
module.exports = {
|
||||
name: 'SystemSettings',
|
||||
label: 'System Settings',
|
||||
label: t`System Settings`,
|
||||
doctype: 'DocType',
|
||||
isSingle: 1,
|
||||
isChild: 0,
|
||||
@ -37,7 +37,7 @@ module.exports = {
|
||||
fields: [
|
||||
{
|
||||
fieldname: 'dateFormat',
|
||||
label: 'Date Format',
|
||||
label: t`Date Format`,
|
||||
fieldtype: 'Select',
|
||||
options: dateFormatOptions,
|
||||
default: 'MMM d, y',
|
||||
@ -46,14 +46,14 @@ module.exports = {
|
||||
},
|
||||
{
|
||||
fieldname: 'locale',
|
||||
label: 'Locale',
|
||||
label: t`Locale`,
|
||||
fieldtype: 'Data',
|
||||
default: DEFAULT_LOCALE,
|
||||
description: t`Set the local code, this is used for number formatting.`,
|
||||
},
|
||||
{
|
||||
fieldname: 'displayPrecision',
|
||||
label: 'Display Precision',
|
||||
label: t`Display Precision`,
|
||||
fieldtype: 'Int',
|
||||
default: DEFAULT_DISPLAY_PRECISION,
|
||||
required: 1,
|
||||
@ -71,7 +71,7 @@ module.exports = {
|
||||
},
|
||||
{
|
||||
fieldname: 'internalPrecision',
|
||||
label: 'Internal Precision',
|
||||
label: t`Internal Precision`,
|
||||
fieldtype: 'Int',
|
||||
minValue: 0,
|
||||
default: DEFAULT_INTERNAL_PRECISION,
|
||||
@ -79,14 +79,14 @@ module.exports = {
|
||||
},
|
||||
{
|
||||
fieldname: 'hideGetStarted',
|
||||
label: 'Hide Get Started',
|
||||
label: t`Hide Get Started`,
|
||||
fieldtype: 'Check',
|
||||
default: 0,
|
||||
description: t`Hides the Get Started section from the sidebar. Change will be visible on restart or refreshing the app.`,
|
||||
},
|
||||
{
|
||||
fieldname: 'autoReportErrors',
|
||||
label: 'Hide & Auto Report Errors',
|
||||
label: t`Hide & Auto Report Errors`,
|
||||
fieldtype: 'Check',
|
||||
default: 0,
|
||||
description: t`Prevent errors from showing and automatically report all errors.`,
|
||||
|
@ -1,9 +1,10 @@
|
||||
const { indicators } = require('../../../../src/colors');
|
||||
const { BLUE, GREEN } = indicators;
|
||||
const { t } = require('frappe');
|
||||
|
||||
module.exports = {
|
||||
name: 'ToDo',
|
||||
label: 'To Do',
|
||||
label: t`To Do`,
|
||||
naming: 'autoincrement',
|
||||
isSingle: 0,
|
||||
keywordFields: ['subject', 'description'],
|
||||
@ -18,14 +19,14 @@ module.exports = {
|
||||
fields: [
|
||||
{
|
||||
fieldname: 'subject',
|
||||
label: 'Subject',
|
||||
label: t`Subject`,
|
||||
placeholder: 'Subject',
|
||||
fieldtype: 'Data',
|
||||
required: 1,
|
||||
},
|
||||
{
|
||||
fieldname: 'status',
|
||||
label: 'Status',
|
||||
label: t`Status`,
|
||||
fieldtype: 'Select',
|
||||
options: ['Open', 'Closed'],
|
||||
default: 'Open',
|
||||
@ -33,7 +34,7 @@ module.exports = {
|
||||
},
|
||||
{
|
||||
fieldname: 'description',
|
||||
label: 'Description',
|
||||
label: t`Description`,
|
||||
fieldtype: 'Text',
|
||||
},
|
||||
],
|
||||
@ -42,7 +43,7 @@ module.exports = {
|
||||
|
||||
actions: [
|
||||
{
|
||||
label: 'Close',
|
||||
label: t`Close`,
|
||||
condition: (doc) => doc.status !== 'Closed',
|
||||
action: async (doc) => {
|
||||
await doc.set('status', 'Closed');
|
||||
@ -50,7 +51,7 @@ module.exports = {
|
||||
},
|
||||
},
|
||||
{
|
||||
label: 'Re-Open',
|
||||
label: t`Re-Open`,
|
||||
condition: (doc) => doc.status !== 'Open',
|
||||
action: async (doc) => {
|
||||
await doc.set('status', 'Open');
|
||||
|
@ -1,43 +1,42 @@
|
||||
const { t } = require('frappe');
|
||||
|
||||
module.exports = {
|
||||
"name": "User",
|
||||
"doctype": "DocType",
|
||||
"isSingle": 0,
|
||||
"isChild": 0,
|
||||
"keywordFields": [
|
||||
"name",
|
||||
"fullName"
|
||||
],
|
||||
"fields": [
|
||||
{
|
||||
"fieldname": "name",
|
||||
"label": "Email",
|
||||
"fieldtype": "Data",
|
||||
"required": 1
|
||||
},
|
||||
{
|
||||
"fieldname": "password",
|
||||
"label": "Password",
|
||||
"fieldtype": "Password",
|
||||
"required": 1,
|
||||
"hidden": 1,
|
||||
},
|
||||
{
|
||||
"fieldname": "fullName",
|
||||
"label": "Full Name",
|
||||
"fieldtype": "Data",
|
||||
"required": 1
|
||||
},
|
||||
{
|
||||
"fieldname": "roles",
|
||||
"label": "Roles",
|
||||
"fieldtype": "Table",
|
||||
"childtype": "UserRole"
|
||||
},
|
||||
{
|
||||
"fieldname": "userId",
|
||||
"label": "User ID",
|
||||
"fieldtype": "Data",
|
||||
"hidden": 1
|
||||
}
|
||||
]
|
||||
}
|
||||
name: 'User',
|
||||
doctype: 'DocType',
|
||||
isSingle: 0,
|
||||
isChild: 0,
|
||||
keywordFields: ['name', 'fullName'],
|
||||
fields: [
|
||||
{
|
||||
fieldname: 'name',
|
||||
label: t`Email`,
|
||||
fieldtype: 'Data',
|
||||
required: 1,
|
||||
},
|
||||
{
|
||||
fieldname: 'password',
|
||||
label: t`Password`,
|
||||
fieldtype: 'Password',
|
||||
required: 1,
|
||||
hidden: 1,
|
||||
},
|
||||
{
|
||||
fieldname: 'fullName',
|
||||
label: t`Full Name`,
|
||||
fieldtype: 'Data',
|
||||
required: 1,
|
||||
},
|
||||
{
|
||||
fieldname: 'roles',
|
||||
label: t`Roles`,
|
||||
fieldtype: 'Table',
|
||||
childtype: 'UserRole',
|
||||
},
|
||||
{
|
||||
fieldname: 'userId',
|
||||
label: t`User ID`,
|
||||
fieldtype: 'Data',
|
||||
hidden: 1,
|
||||
},
|
||||
],
|
||||
};
|
||||
|
@ -1,15 +1,17 @@
|
||||
const { t } = require('frappe');
|
||||
|
||||
module.exports = {
|
||||
"name": "UserRole",
|
||||
"doctype": "DocType",
|
||||
"isSingle": 0,
|
||||
"isChild": 1,
|
||||
"keywordFields": [],
|
||||
"fields": [
|
||||
{
|
||||
"fieldname": "role",
|
||||
"label": "Role",
|
||||
"fieldtype": "Link",
|
||||
"target": "Role"
|
||||
}
|
||||
]
|
||||
}
|
||||
name: 'UserRole',
|
||||
doctype: 'DocType',
|
||||
isSingle: 0,
|
||||
isChild: 1,
|
||||
keywordFields: [],
|
||||
fields: [
|
||||
{
|
||||
fieldname: 'role',
|
||||
label: t`Role`,
|
||||
fieldtype: 'Link',
|
||||
target: 'Role',
|
||||
},
|
||||
],
|
||||
};
|
||||
|
@ -1,9 +1,9 @@
|
||||
import frappe from 'frappe';
|
||||
import frappe, { t } from 'frappe';
|
||||
import Account from './AccountDocument';
|
||||
|
||||
export default {
|
||||
name: 'Account',
|
||||
label: 'Account',
|
||||
label: t`Account`,
|
||||
doctype: 'DocType',
|
||||
documentClass: Account,
|
||||
isSingle: 0,
|
||||
@ -12,13 +12,13 @@ export default {
|
||||
fields: [
|
||||
{
|
||||
fieldname: 'name',
|
||||
label: 'Account Name',
|
||||
label: t`Account Name`,
|
||||
fieldtype: 'Data',
|
||||
required: 1,
|
||||
},
|
||||
{
|
||||
fieldname: 'rootType',
|
||||
label: 'Root Type',
|
||||
label: t`Root Type`,
|
||||
fieldtype: 'Select',
|
||||
placeholder: 'Root Type',
|
||||
options: ['Asset', 'Liability', 'Equity', 'Income', 'Expense'],
|
||||
@ -26,7 +26,7 @@ export default {
|
||||
},
|
||||
{
|
||||
fieldname: 'parentAccount',
|
||||
label: 'Parent Account',
|
||||
label: t`Parent Account`,
|
||||
fieldtype: 'Link',
|
||||
target: 'Account',
|
||||
getFilters: (query, doc) => {
|
||||
@ -39,7 +39,7 @@ export default {
|
||||
},
|
||||
{
|
||||
fieldname: 'accountType',
|
||||
label: 'Account Type',
|
||||
label: t`Account Type`,
|
||||
placeholder: 'Account Type',
|
||||
fieldtype: 'Select',
|
||||
options: [
|
||||
@ -66,13 +66,13 @@ export default {
|
||||
},
|
||||
{
|
||||
fieldname: 'balance',
|
||||
label: 'Balance',
|
||||
label: t`Balance`,
|
||||
fieldtype: 'Currency',
|
||||
readOnly: 1,
|
||||
},
|
||||
{
|
||||
fieldname: 'isGroup',
|
||||
label: 'Is Group',
|
||||
label: t`Is Group`,
|
||||
fieldtype: 'Check',
|
||||
},
|
||||
],
|
||||
|
@ -1,6 +1,8 @@
|
||||
import { t } from 'frappe';
|
||||
|
||||
export default {
|
||||
name: 'AccountingLedgerEntry',
|
||||
label: 'Ledger Entry',
|
||||
label: t`Ledger Entry`,
|
||||
naming: 'autoincrement',
|
||||
doctype: 'DocType',
|
||||
isSingle: 0,
|
||||
@ -9,64 +11,64 @@ export default {
|
||||
fields: [
|
||||
{
|
||||
fieldname: 'date',
|
||||
label: 'Date',
|
||||
fieldtype: 'Date'
|
||||
label: t`Date`,
|
||||
fieldtype: 'Date',
|
||||
},
|
||||
{
|
||||
fieldname: 'account',
|
||||
label: 'Account',
|
||||
label: t`Account`,
|
||||
fieldtype: 'Link',
|
||||
target: 'Account',
|
||||
required: 1
|
||||
required: 1,
|
||||
},
|
||||
{
|
||||
fieldname: 'description',
|
||||
label: 'Description',
|
||||
fieldtype: 'Text'
|
||||
label: t`Description`,
|
||||
fieldtype: 'Text',
|
||||
},
|
||||
{
|
||||
fieldname: 'party',
|
||||
label: 'Party',
|
||||
label: t`Party`,
|
||||
fieldtype: 'Link',
|
||||
target: 'Party'
|
||||
target: 'Party',
|
||||
},
|
||||
{
|
||||
fieldname: 'debit',
|
||||
label: 'Debit',
|
||||
fieldtype: 'Currency'
|
||||
label: t`Debit`,
|
||||
fieldtype: 'Currency',
|
||||
},
|
||||
{
|
||||
fieldname: 'credit',
|
||||
label: 'Credit',
|
||||
fieldtype: 'Currency'
|
||||
label: t`Credit`,
|
||||
fieldtype: 'Currency',
|
||||
},
|
||||
{
|
||||
fieldname: 'againstAccount',
|
||||
label: 'Against Account',
|
||||
fieldtype: 'Text'
|
||||
label: t`Against Account`,
|
||||
fieldtype: 'Text',
|
||||
},
|
||||
{
|
||||
fieldname: 'referenceType',
|
||||
label: 'Ref. Type',
|
||||
fieldtype: 'Data'
|
||||
label: t`Ref. Type`,
|
||||
fieldtype: 'Data',
|
||||
},
|
||||
{
|
||||
fieldname: 'referenceName',
|
||||
label: 'Ref. Name',
|
||||
label: t`Ref. Name`,
|
||||
fieldtype: 'DynamicLink',
|
||||
references: 'referenceType'
|
||||
references: 'referenceType',
|
||||
},
|
||||
{
|
||||
fieldname: 'balance',
|
||||
label: 'Balance',
|
||||
fieldtype: 'Currency'
|
||||
label: t`Balance`,
|
||||
fieldtype: 'Currency',
|
||||
},
|
||||
{
|
||||
fieldname: 'reverted',
|
||||
label: 'Reverted',
|
||||
label: t`Reverted`,
|
||||
fieldtype: 'Check',
|
||||
default: 0
|
||||
}
|
||||
default: 0,
|
||||
},
|
||||
],
|
||||
quickEditFields: [
|
||||
'date',
|
||||
@ -78,6 +80,6 @@ export default {
|
||||
'againstAccount',
|
||||
'referenceType',
|
||||
'referenceName',
|
||||
'balance'
|
||||
]
|
||||
'balance',
|
||||
],
|
||||
};
|
||||
|
@ -1,9 +1,10 @@
|
||||
import { t } from 'frappe';
|
||||
import countryInfo from '~/fixtures/countryInfo.json';
|
||||
|
||||
const countryList = Object.keys(countryInfo).sort();
|
||||
export default {
|
||||
name: 'AccountingSettings',
|
||||
label: 'Accounting Settings',
|
||||
label: t`Accounting Settings`,
|
||||
naming: 'name', // {random|autoincrement}
|
||||
isSingle: 1,
|
||||
isChild: 0,
|
||||
@ -12,14 +13,14 @@ export default {
|
||||
keywordFields: [],
|
||||
fields: [
|
||||
{
|
||||
label: 'Company Name',
|
||||
label: t`Company Name`,
|
||||
fieldname: 'companyName',
|
||||
fieldtype: 'Data',
|
||||
required: 1,
|
||||
},
|
||||
|
||||
{
|
||||
label: 'Write Off Account',
|
||||
label: t`Write Off Account`,
|
||||
fieldname: 'writeOffAccount',
|
||||
fieldtype: 'Link',
|
||||
target: 'Account',
|
||||
@ -33,7 +34,7 @@ export default {
|
||||
},
|
||||
|
||||
{
|
||||
label: 'Round Off Account',
|
||||
label: t`Round Off Account`,
|
||||
fieldname: 'roundOffAccount',
|
||||
fieldtype: 'Link',
|
||||
target: 'Account',
|
||||
@ -48,7 +49,7 @@ export default {
|
||||
|
||||
{
|
||||
fieldname: 'country',
|
||||
label: 'Country',
|
||||
label: t`Country`,
|
||||
fieldtype: 'AutoComplete',
|
||||
placeholder: 'Select Country',
|
||||
readOnly: 1,
|
||||
@ -58,7 +59,7 @@ export default {
|
||||
|
||||
{
|
||||
fieldname: 'currency',
|
||||
label: 'Currency',
|
||||
label: t`Currency`,
|
||||
fieldtype: 'Data',
|
||||
readOnly: 1,
|
||||
required: 0,
|
||||
@ -66,14 +67,14 @@ export default {
|
||||
|
||||
{
|
||||
fieldname: 'fullname',
|
||||
label: 'Name',
|
||||
label: t`Name`,
|
||||
fieldtype: 'Data',
|
||||
required: 1,
|
||||
},
|
||||
|
||||
{
|
||||
fieldname: 'email',
|
||||
label: 'Email',
|
||||
label: t`Email`,
|
||||
fieldtype: 'Data',
|
||||
required: 1,
|
||||
validate: {
|
||||
@ -83,36 +84,36 @@ export default {
|
||||
|
||||
{
|
||||
fieldname: 'bankName',
|
||||
label: 'Bank Name',
|
||||
label: t`Bank Name`,
|
||||
fieldtype: 'Data',
|
||||
required: 1,
|
||||
},
|
||||
|
||||
{
|
||||
fieldname: 'fiscalYearStart',
|
||||
label: 'Fiscal Year Start Date',
|
||||
label: t`Fiscal Year Start Date`,
|
||||
fieldtype: 'Date',
|
||||
required: 1,
|
||||
},
|
||||
|
||||
{
|
||||
fieldname: 'fiscalYearEnd',
|
||||
label: 'Fiscal Year End Date',
|
||||
label: t`Fiscal Year End Date`,
|
||||
fieldtype: 'Date',
|
||||
required: 1,
|
||||
},
|
||||
|
||||
{
|
||||
fieldname: 'setupComplete',
|
||||
label: 'Setup Complete',
|
||||
label: t`Setup Complete`,
|
||||
fieldtype: 'Check',
|
||||
default: 0,
|
||||
},
|
||||
{
|
||||
fieldname: 'gstin',
|
||||
label: 'GSTIN',
|
||||
label: t`GSTIN`,
|
||||
fieldtype: 'Data',
|
||||
placeholder: '27AAAAA0000A1Z5'
|
||||
placeholder: '27AAAAA0000A1Z5',
|
||||
},
|
||||
],
|
||||
quickEditFields: [
|
||||
|
@ -1,3 +1,4 @@
|
||||
import { t } from 'frappe';
|
||||
import { stateCodeMap } from '../../../accounting/gst';
|
||||
import countryList from '../../../fixtures/countryInfo.json';
|
||||
import { titleCase } from '../../../src/utils';
|
||||
@ -27,27 +28,27 @@ export default {
|
||||
fields: [
|
||||
{
|
||||
fieldname: 'addressLine1',
|
||||
label: 'Address Line 1',
|
||||
label: t`Address Line 1`,
|
||||
placeholder: 'Address Line 1',
|
||||
fieldtype: 'Data',
|
||||
required: 1,
|
||||
},
|
||||
{
|
||||
fieldname: 'addressLine2',
|
||||
label: 'Address Line 2',
|
||||
label: t`Address Line 2`,
|
||||
placeholder: 'Address Line 2',
|
||||
fieldtype: 'Data',
|
||||
},
|
||||
{
|
||||
fieldname: 'city',
|
||||
label: 'City / Town',
|
||||
label: t`City / Town`,
|
||||
placeholder: 'City / Town',
|
||||
fieldtype: 'Data',
|
||||
required: 1,
|
||||
},
|
||||
{
|
||||
fieldname: 'state',
|
||||
label: 'State',
|
||||
label: t`State`,
|
||||
placeholder: 'State',
|
||||
fieldtype: 'AutoComplete',
|
||||
emptyMessage: (doc) => {
|
||||
@ -60,7 +61,7 @@ export default {
|
||||
},
|
||||
{
|
||||
fieldname: 'country',
|
||||
label: 'Country',
|
||||
label: t`Country`,
|
||||
placeholder: 'Country',
|
||||
fieldtype: 'AutoComplete',
|
||||
getList: () => Object.keys(countryList).sort(),
|
||||
@ -68,31 +69,31 @@ export default {
|
||||
},
|
||||
{
|
||||
fieldname: 'postalCode',
|
||||
label: 'Postal Code',
|
||||
label: t`Postal Code`,
|
||||
placeholder: 'Postal Code',
|
||||
fieldtype: 'Data',
|
||||
},
|
||||
{
|
||||
fieldname: 'emailAddress',
|
||||
label: 'Email Address',
|
||||
label: t`Email Address`,
|
||||
placeholder: 'Email Address',
|
||||
fieldtype: 'Data',
|
||||
},
|
||||
{
|
||||
fieldname: 'phone',
|
||||
label: 'Phone',
|
||||
label: t`Phone`,
|
||||
placeholder: 'Phone',
|
||||
fieldtype: 'Data',
|
||||
},
|
||||
{
|
||||
fieldname: 'fax',
|
||||
label: 'Fax',
|
||||
label: t`Fax`,
|
||||
fieldtype: 'Data',
|
||||
},
|
||||
{
|
||||
fieldname: 'addressDisplay',
|
||||
fieldtype: 'Text',
|
||||
label: 'Address Display',
|
||||
label: t`Address Display`,
|
||||
readOnly: true,
|
||||
formula: (doc) => {
|
||||
return [
|
||||
|
@ -1,3 +1,4 @@
|
||||
import { t } from 'frappe';
|
||||
import { cloneDeep } from 'lodash';
|
||||
import { stateCodeMap } from '../../../accounting/gst';
|
||||
import { titleCase } from '../../../src/utils';
|
||||
@ -15,7 +16,7 @@ export default function getAugmentedAddress({ country }) {
|
||||
...Address.fields,
|
||||
{
|
||||
fieldname: 'pos',
|
||||
label: 'Place of Supply',
|
||||
label: t`Place of Supply`,
|
||||
fieldtype: 'AutoComplete',
|
||||
placeholder: 'Place of Supply',
|
||||
formula: (doc) => (stateList.includes(doc.state) ? doc.state : ''),
|
||||
|
@ -1,3 +1,5 @@
|
||||
import { t } from 'frappe';
|
||||
|
||||
export default {
|
||||
name: 'Color',
|
||||
doctype: 'DocType',
|
||||
@ -5,12 +7,12 @@ export default {
|
||||
{
|
||||
fieldname: 'name',
|
||||
fieldtype: 'Data',
|
||||
label: 'Color'
|
||||
label: t`Color`,
|
||||
},
|
||||
{
|
||||
fieldname: 'hexvalue',
|
||||
fieldtype: 'Data',
|
||||
label: 'Hex Value'
|
||||
}
|
||||
]
|
||||
label: t`Hex Value`,
|
||||
},
|
||||
],
|
||||
};
|
||||
|
@ -1,27 +1,27 @@
|
||||
import { t } from 'frappe';
|
||||
|
||||
export default {
|
||||
"name": "CompanySettings",
|
||||
"label": "Company Settings",
|
||||
"naming": "autoincrement",
|
||||
"isSingle": true,
|
||||
"isChild": false,
|
||||
"keywordFields": [
|
||||
"companyName"
|
||||
],
|
||||
"fields": [
|
||||
{
|
||||
"fieldname": "companyName",
|
||||
"label": "Company Name",
|
||||
"fieldtype": "Data",
|
||||
"disabled": false,
|
||||
"required": true
|
||||
},
|
||||
{
|
||||
"fieldname": "companyAddress",
|
||||
"label": "Company Address",
|
||||
"fieldtype": "Link",
|
||||
"disabled": false,
|
||||
"required": true,
|
||||
"target": "Address"
|
||||
}
|
||||
]
|
||||
};
|
||||
name: 'CompanySettings',
|
||||
label: t`Company Settings`,
|
||||
naming: 'autoincrement',
|
||||
isSingle: true,
|
||||
isChild: false,
|
||||
keywordFields: ['companyName'],
|
||||
fields: [
|
||||
{
|
||||
fieldname: 'companyName',
|
||||
label: t`Company Name`,
|
||||
fieldtype: 'Data',
|
||||
disabled: false,
|
||||
required: true,
|
||||
},
|
||||
{
|
||||
fieldname: 'companyAddress',
|
||||
label: t`Company Address`,
|
||||
fieldtype: 'Link',
|
||||
disabled: false,
|
||||
required: true,
|
||||
target: 'Address',
|
||||
},
|
||||
],
|
||||
};
|
||||
|
@ -1,80 +1,78 @@
|
||||
import { t } from 'frappe';
|
||||
|
||||
export default {
|
||||
"name": "Contact",
|
||||
"doctype": "DocType",
|
||||
"isSingle": 0,
|
||||
"naming": "autoincrement",
|
||||
"pageSettings": {
|
||||
"hideTitle": true
|
||||
name: 'Contact',
|
||||
doctype: 'DocType',
|
||||
isSingle: 0,
|
||||
naming: 'autoincrement',
|
||||
pageSettings: {
|
||||
hideTitle: true,
|
||||
},
|
||||
titleField: 'fullName',
|
||||
keywordFields: ['fullName'],
|
||||
fields: [
|
||||
{
|
||||
fieldname: 'fullName',
|
||||
label: t`Full Name`,
|
||||
fieldtype: 'Data',
|
||||
required: 1,
|
||||
},
|
||||
"titleField": "fullName",
|
||||
"keywordFields": [
|
||||
"fullName"
|
||||
],
|
||||
"fields": [
|
||||
{
|
||||
"fieldname": "fullName",
|
||||
"label": "Full Name",
|
||||
"fieldtype": "Data",
|
||||
"required": 1
|
||||
},
|
||||
{
|
||||
"fieldname": "emailAddress",
|
||||
"label": "Email Address",
|
||||
"fieldtype": "Data"
|
||||
},
|
||||
{
|
||||
"fieldname": "userId",
|
||||
"label": "User ID",
|
||||
"fieldtype": "Link",
|
||||
"target": "User",
|
||||
"hidden": 1
|
||||
},
|
||||
{
|
||||
"fieldname": "status",
|
||||
"label": "Status",
|
||||
"fieldtype": "Select",
|
||||
"options": ["Passive", "Open", "Replied"]
|
||||
},
|
||||
{
|
||||
"fieldname": "gender",
|
||||
"label": "Gender",
|
||||
"fieldtype": "Select",
|
||||
"options": ["Male", "Female", "Gender"]
|
||||
},
|
||||
{
|
||||
"fieldname": "mobileNumber",
|
||||
"label": "Mobile Number",
|
||||
"fieldtype": "Data"
|
||||
},
|
||||
{
|
||||
"fieldname": "phone",
|
||||
"label": "Phone",
|
||||
"fieldtype": "Data"
|
||||
}
|
||||
],
|
||||
|
||||
events: {
|
||||
validate: (doc) => {
|
||||
|
||||
}
|
||||
{
|
||||
fieldname: 'emailAddress',
|
||||
label: t`Email Address`,
|
||||
fieldtype: 'Data',
|
||||
},
|
||||
|
||||
listSettings: {
|
||||
getFields(list) {
|
||||
return ['fullName'];
|
||||
},
|
||||
getRowHTML(list, data) {
|
||||
return `<div class="col-11">${list.getNameHTML(data)}</div>`;
|
||||
}
|
||||
{
|
||||
fieldname: 'userId',
|
||||
label: t`User ID`,
|
||||
fieldtype: 'Link',
|
||||
target: 'User',
|
||||
hidden: 1,
|
||||
},
|
||||
{
|
||||
fieldname: 'status',
|
||||
label: t`Status`,
|
||||
fieldtype: 'Select',
|
||||
options: ['Passive', 'Open', 'Replied'],
|
||||
},
|
||||
{
|
||||
fieldname: 'gender',
|
||||
label: t`Gender`,
|
||||
fieldtype: 'Select',
|
||||
options: ['Male', 'Female', 'Gender'],
|
||||
},
|
||||
{
|
||||
fieldname: 'mobileNumber',
|
||||
label: t`Mobile Number`,
|
||||
fieldtype: 'Data',
|
||||
},
|
||||
{
|
||||
fieldname: 'phone',
|
||||
label: t`Phone`,
|
||||
fieldtype: 'Data',
|
||||
},
|
||||
],
|
||||
|
||||
layout: [
|
||||
// section 1
|
||||
{
|
||||
columns: [
|
||||
{ fields: [ "fullName", "emailAddress", "userId", "status" ] },
|
||||
{ fields: [ "postalCode", "gender", "phone", "mobileNumber" ] }
|
||||
]
|
||||
}
|
||||
]
|
||||
events: {
|
||||
validate: (doc) => {},
|
||||
},
|
||||
|
||||
listSettings: {
|
||||
getFields(list) {
|
||||
return ['fullName'];
|
||||
},
|
||||
getRowHTML(list, data) {
|
||||
return `<div class="col-11">${list.getNameHTML(data)}</div>`;
|
||||
},
|
||||
},
|
||||
|
||||
layout: [
|
||||
// section 1
|
||||
{
|
||||
columns: [
|
||||
{ fields: ['fullName', 'emailAddress', 'userId', 'status'] },
|
||||
{ fields: ['postalCode', 'gender', 'phone', 'mobileNumber'] },
|
||||
],
|
||||
},
|
||||
],
|
||||
};
|
||||
|
@ -1,6 +1,8 @@
|
||||
import { t } from 'frappe';
|
||||
|
||||
export default {
|
||||
name: 'Currency',
|
||||
label: 'Currency',
|
||||
label: t`Currency`,
|
||||
doctype: 'DocType',
|
||||
isSingle: 0,
|
||||
keywordFields: ['name', 'symbol'],
|
||||
@ -8,27 +10,27 @@ export default {
|
||||
fields: [
|
||||
{
|
||||
fieldname: 'name',
|
||||
label: 'Currency Name',
|
||||
label: t`Currency Name`,
|
||||
fieldtype: 'Data',
|
||||
required: 1,
|
||||
},
|
||||
{
|
||||
fieldname: 'fraction',
|
||||
label: 'Fraction',
|
||||
label: t`Fraction`,
|
||||
fieldtype: 'Data',
|
||||
},
|
||||
{
|
||||
fieldname: 'fractionUnits',
|
||||
label: 'Fraction Units',
|
||||
label: t`Fraction Units`,
|
||||
fieldtype: 'Int',
|
||||
},
|
||||
{
|
||||
label: 'Smallest Currency Fraction Value',
|
||||
label: t`Smallest Currency Fraction Value`,
|
||||
fieldname: 'smallestValue',
|
||||
fieldtype: 'Currency',
|
||||
},
|
||||
{
|
||||
label: 'Symbol',
|
||||
label: t`Symbol`,
|
||||
fieldname: 'symbol',
|
||||
fieldtype: 'Data',
|
||||
},
|
||||
|
@ -1,4 +1,4 @@
|
||||
import frappe from 'frappe';
|
||||
import frappe, { t } from 'frappe';
|
||||
|
||||
export default {
|
||||
name: 'Email',
|
||||
@ -12,7 +12,7 @@ export default {
|
||||
fields: [
|
||||
{
|
||||
fieldname: 'name',
|
||||
label: 'name',
|
||||
label: t`name`,
|
||||
fieldtype: 'Data',
|
||||
required: 0,
|
||||
hidden: 1,
|
||||
@ -20,7 +20,7 @@ export default {
|
||||
},
|
||||
{
|
||||
fieldname: 'fromEmailAddress',
|
||||
label: 'From',
|
||||
label: t`From`,
|
||||
fieldtype: 'Data',
|
||||
required: 1,
|
||||
hidden: 0,
|
||||
@ -32,7 +32,7 @@ export default {
|
||||
},
|
||||
{
|
||||
fieldname: 'toEmailAddress',
|
||||
label: 'To',
|
||||
label: t`To`,
|
||||
fieldtype: 'Data',
|
||||
required: 1,
|
||||
hidden: 0,
|
||||
@ -40,7 +40,7 @@ export default {
|
||||
},
|
||||
{
|
||||
fieldname: 'date',
|
||||
label: 'Date',
|
||||
label: t`Date`,
|
||||
fieldtype: 'Datetime',
|
||||
required: 0,
|
||||
hidden: 0,
|
||||
@ -48,7 +48,7 @@ export default {
|
||||
},
|
||||
{
|
||||
fieldname: 'subject',
|
||||
label: 'Subject',
|
||||
label: t`Subject`,
|
||||
fieldtype: 'Data',
|
||||
required: 0,
|
||||
hidden: 0,
|
||||
@ -56,7 +56,7 @@ export default {
|
||||
},
|
||||
{
|
||||
fieldname: 'bodyText',
|
||||
label: 'Body',
|
||||
label: t`Body`,
|
||||
fieldtype: 'Text',
|
||||
required: 0,
|
||||
hidden: 0,
|
||||
@ -64,7 +64,7 @@ export default {
|
||||
},
|
||||
{
|
||||
fieldname: 'filePath',
|
||||
label: 'File Path',
|
||||
label: t`File Path`,
|
||||
fieldtype: 'Text',
|
||||
required: 0,
|
||||
hidden: 1,
|
||||
|
@ -1,8 +1,8 @@
|
||||
import frappe from 'frappe';
|
||||
import frappe, { t } from 'frappe';
|
||||
|
||||
export default {
|
||||
name: 'EmailAccount',
|
||||
label: 'Email Account',
|
||||
label: t`Email Account`,
|
||||
doctype: 'DocType',
|
||||
isSingle: true,
|
||||
isChild: false,
|
||||
@ -10,7 +10,7 @@ export default {
|
||||
fields: [
|
||||
{
|
||||
fieldname: 'email',
|
||||
label: 'Email',
|
||||
label: t`Email`,
|
||||
fieldtype: 'Data',
|
||||
required: 1,
|
||||
formula: async () => {
|
||||
@ -20,19 +20,19 @@ export default {
|
||||
},
|
||||
{
|
||||
fieldname: 'password',
|
||||
label: 'Password',
|
||||
label: t`Password`,
|
||||
fieldtype: 'Password',
|
||||
required: 1,
|
||||
},
|
||||
{
|
||||
fieldname: 'confirmPassword',
|
||||
label: 'Confirm Password',
|
||||
label: t`Confirm Password`,
|
||||
fieldtype: 'Password',
|
||||
required: 1,
|
||||
},
|
||||
{
|
||||
fieldname: 'smtpHost',
|
||||
label: 'SMTP Host',
|
||||
label: t`SMTP Host`,
|
||||
fieldtype: 'Select',
|
||||
options: [
|
||||
'smtp.gmail.com',
|
||||
@ -45,7 +45,7 @@ export default {
|
||||
},
|
||||
{
|
||||
fieldname: 'smtpPort',
|
||||
label: 'SMTP Port',
|
||||
label: t`SMTP Port`,
|
||||
fieldtype: 'Select',
|
||||
options: ['465', '587'],
|
||||
default: '465',
|
||||
|
@ -1,4 +1,4 @@
|
||||
import { DateTime } from 'luxon';
|
||||
import { t } from 'frappe';
|
||||
import EventDocument from './EventDocument';
|
||||
|
||||
export default {
|
||||
@ -10,20 +10,20 @@ export default {
|
||||
fields: [
|
||||
{
|
||||
fieldname: 'title',
|
||||
label: 'Title',
|
||||
fieldtype: 'Data'
|
||||
label: t`Title`,
|
||||
fieldtype: 'Data',
|
||||
},
|
||||
{
|
||||
fieldname: 'date',
|
||||
label: 'Date',
|
||||
fieldtype: 'Date'
|
||||
label: t`Date`,
|
||||
fieldtype: 'Date',
|
||||
},
|
||||
{
|
||||
fieldname: 'schedule',
|
||||
fieldtype: 'Table',
|
||||
childtype: 'EventSchedule',
|
||||
label: 'Schedule'
|
||||
}
|
||||
label: t`Schedule`,
|
||||
},
|
||||
],
|
||||
titleField: 'title',
|
||||
keywordFields: [],
|
||||
@ -34,6 +34,6 @@ export default {
|
||||
},
|
||||
getRowHTML(list, data) {
|
||||
return `<div class='col-11'>${data.title} on ${data.date}</div>`;
|
||||
}
|
||||
}
|
||||
},
|
||||
},
|
||||
};
|
||||
|
@ -1,17 +1,19 @@
|
||||
import { t } from 'frappe';
|
||||
|
||||
export default {
|
||||
name: 'EventSchedule',
|
||||
doctype: 'DocType',
|
||||
isChild: 1,
|
||||
fields: [
|
||||
{
|
||||
fieldname: 'startTime',
|
||||
label: 'Start Time',
|
||||
fieldtype: 'Data',
|
||||
},
|
||||
{
|
||||
fieldname: 'title',
|
||||
label: 'Title',
|
||||
fieldtype: 'Data',
|
||||
},
|
||||
]
|
||||
};
|
||||
name: 'EventSchedule',
|
||||
doctype: 'DocType',
|
||||
isChild: 1,
|
||||
fields: [
|
||||
{
|
||||
fieldname: 'startTime',
|
||||
label: t`Start Time`,
|
||||
fieldtype: 'Data',
|
||||
},
|
||||
{
|
||||
fieldname: 'title',
|
||||
label: t`Title`,
|
||||
fieldtype: 'Data',
|
||||
},
|
||||
],
|
||||
};
|
||||
|
@ -1,15 +1,17 @@
|
||||
import { t } from 'frappe';
|
||||
|
||||
export default {
|
||||
"name": "EventSettings",
|
||||
"label": "Event Settings",
|
||||
"doctype": "DocType",
|
||||
"isSingle": 1,
|
||||
"isChild": 0,
|
||||
"keywordFields": [],
|
||||
"fields": [
|
||||
{
|
||||
fieldname: "enableNotifications",
|
||||
label: "Enable Notifications",
|
||||
fieldtype: "Check"
|
||||
}
|
||||
]
|
||||
};
|
||||
name: 'EventSettings',
|
||||
label: t`Event Settings`,
|
||||
doctype: 'DocType',
|
||||
isSingle: 1,
|
||||
isChild: 0,
|
||||
keywordFields: [],
|
||||
fields: [
|
||||
{
|
||||
fieldname: 'enableNotifications',
|
||||
label: t`Enable Notifications`,
|
||||
fieldtype: 'Check',
|
||||
},
|
||||
],
|
||||
};
|
||||
|
@ -1,9 +1,10 @@
|
||||
import { t } from 'frappe';
|
||||
import model from 'frappe/model';
|
||||
import Quotation from '../Quotation/Quotation';
|
||||
|
||||
export default model.extend(Quotation, {
|
||||
name: 'Fulfillment',
|
||||
label: 'Fulfillment',
|
||||
label: t`Fulfillment`,
|
||||
settings: 'FulfillmentSettings',
|
||||
fields: [
|
||||
{
|
||||
|
@ -1,3 +1,4 @@
|
||||
import { t } from 'frappe';
|
||||
import { cloneDeep } from 'lodash';
|
||||
import FulfillmentItemOriginal from './FulfillmentItem';
|
||||
|
||||
@ -12,7 +13,7 @@ export default function getAugmentedFulfillmentItem({ country }) {
|
||||
...FulfillmentItem.fields,
|
||||
{
|
||||
fieldname: 'hsnCode',
|
||||
label: 'HSN/SAC',
|
||||
label: t`HSN/SAC`,
|
||||
fieldtype: 'Int',
|
||||
formula: (row, doc) => doc.getFrom('Item', row.item, 'hsnCode'),
|
||||
formulaDependsOn: ['item'],
|
||||
|
@ -1,9 +1,10 @@
|
||||
import { t } from 'frappe';
|
||||
import model from 'frappe/model';
|
||||
import QuotationSettings from '../QuotationSettings/QuotationSettings';
|
||||
|
||||
export default model.extend(QuotationSettings, {
|
||||
name: 'FulfillmentSettings',
|
||||
label: 'Fulfillment Settings',
|
||||
label: t`Fulfillment Settings`,
|
||||
fields: [
|
||||
{
|
||||
fieldname: 'numberSeries',
|
||||
|
@ -1,9 +1,9 @@
|
||||
import frappe from 'frappe';
|
||||
import frappe, { t } from 'frappe';
|
||||
import GSTR3B from './GSTR3BDocument.js';
|
||||
|
||||
export default {
|
||||
name: 'GSTR3B',
|
||||
label: 'GSTR 3B',
|
||||
label: t`GSTR 3B`,
|
||||
doctype: 'DocType',
|
||||
documentClass: GSTR3B,
|
||||
print: {
|
||||
@ -13,13 +13,13 @@ export default {
|
||||
fields: [
|
||||
{
|
||||
fieldname: 'year',
|
||||
label: 'Year',
|
||||
label: t`Year`,
|
||||
fieldtype: 'Data',
|
||||
required: 1,
|
||||
},
|
||||
{
|
||||
fieldname: 'month',
|
||||
label: 'Month',
|
||||
label: t`Month`,
|
||||
placeholder: 'Month',
|
||||
fieldtype: 'Select',
|
||||
options: [
|
||||
@ -40,7 +40,7 @@ export default {
|
||||
},
|
||||
{
|
||||
fieldname: 'jsonData',
|
||||
label: 'JSON Data',
|
||||
label: t`JSON Data`,
|
||||
fieldtype: 'Code',
|
||||
formula: (doc) => doc.getJson(),
|
||||
required: 1,
|
||||
@ -55,7 +55,7 @@ export default {
|
||||
],
|
||||
links: [
|
||||
{
|
||||
label: 'Print PDF',
|
||||
label: t`Print PDF`,
|
||||
condition: (form) => !form.doc._notInserted,
|
||||
action: async (form) => {
|
||||
form.$router.push({
|
||||
@ -64,7 +64,7 @@ export default {
|
||||
},
|
||||
},
|
||||
{
|
||||
label: 'Delete',
|
||||
label: t`Delete`,
|
||||
condition: (form) => !form.doc._notInserted,
|
||||
action: async (form) => {
|
||||
const doc = await frappe.getDoc('GSTR3B', form.doc.name);
|
||||
|
@ -1,65 +1,66 @@
|
||||
import { t } from 'frappe';
|
||||
export default {
|
||||
name: 'GetStarted',
|
||||
isSingle: 1,
|
||||
fields: [
|
||||
{
|
||||
fieldname: 'onboardingComplete',
|
||||
label: 'Onboarding Complete',
|
||||
label: t`Onboarding Complete`,
|
||||
fieldtype: 'Check',
|
||||
},
|
||||
{
|
||||
fieldname: 'companySetup',
|
||||
label: 'Company Setup',
|
||||
label: t`Company Setup`,
|
||||
fieldtype: 'Check',
|
||||
},
|
||||
{
|
||||
fieldname: 'systemSetup',
|
||||
label: 'System Setup',
|
||||
label: t`System Setup`,
|
||||
fieldtype: 'Check',
|
||||
},
|
||||
{
|
||||
fieldname: 'invoiceSetup',
|
||||
label: 'Invoice Setup',
|
||||
label: t`Invoice Setup`,
|
||||
fieldtype: 'Check',
|
||||
},
|
||||
{
|
||||
fieldname: 'itemCreated',
|
||||
label: 'Item Created',
|
||||
label: t`Item Created`,
|
||||
fieldtype: 'Check',
|
||||
},
|
||||
{
|
||||
fieldname: 'customerCreated',
|
||||
label: 'Customer Created',
|
||||
label: t`Customer Created`,
|
||||
fieldtype: 'Check',
|
||||
},
|
||||
{
|
||||
fieldname: 'supplierCreated',
|
||||
label: 'Supplier Created',
|
||||
label: t`Supplier Created`,
|
||||
fieldtype: 'Check',
|
||||
},
|
||||
{
|
||||
fieldname: 'invoiceCreated',
|
||||
label: 'Invoice Created',
|
||||
label: t`Invoice Created`,
|
||||
fieldtype: 'Check',
|
||||
},
|
||||
{
|
||||
fieldname: 'billCreated',
|
||||
label: 'Bill Created',
|
||||
label: t`Bill Created`,
|
||||
fieldtype: 'Check',
|
||||
},
|
||||
{
|
||||
fieldname: 'chartOfAccountsReviewed',
|
||||
label: 'Chart Of Accounts Reviewed',
|
||||
label: t`Chart Of Accounts Reviewed`,
|
||||
fieldtype: 'Check',
|
||||
},
|
||||
{
|
||||
fieldname: 'openingBalanceChecked',
|
||||
label: 'Opening Balances',
|
||||
label: t`Opening Balances`,
|
||||
fieldtype: 'Check',
|
||||
},
|
||||
{
|
||||
fieldname: 'taxesAdded',
|
||||
label: 'Add Taxes',
|
||||
label: t`Add Taxes`,
|
||||
fieldtype: 'Check',
|
||||
},
|
||||
],
|
||||
|
@ -9,25 +9,25 @@ export default {
|
||||
fields: [
|
||||
{
|
||||
fieldname: 'name',
|
||||
label: 'Item Name',
|
||||
label: t`Item Name`,
|
||||
fieldtype: 'Data',
|
||||
placeholder: 'Item Name',
|
||||
required: 1,
|
||||
},
|
||||
{
|
||||
fieldname: 'image',
|
||||
label: 'Image',
|
||||
label: t`Image`,
|
||||
fieldtype: 'AttachImage',
|
||||
},
|
||||
{
|
||||
fieldname: 'description',
|
||||
label: 'Description',
|
||||
label: t`Description`,
|
||||
placeholder: 'Item Description',
|
||||
fieldtype: 'Text',
|
||||
},
|
||||
{
|
||||
fieldname: 'unit',
|
||||
label: 'Unit Type',
|
||||
label: t`Unit Type`,
|
||||
fieldtype: 'Select',
|
||||
placeholder: 'Unit Type',
|
||||
default: 'Unit',
|
||||
@ -35,7 +35,7 @@ export default {
|
||||
},
|
||||
{
|
||||
fieldname: 'itemType',
|
||||
label: 'Type',
|
||||
label: t`Type`,
|
||||
placeholder: 'Type',
|
||||
fieldtype: 'Select',
|
||||
default: 'Product',
|
||||
@ -43,7 +43,7 @@ export default {
|
||||
},
|
||||
{
|
||||
fieldname: 'incomeAccount',
|
||||
label: 'Income',
|
||||
label: t`Income`,
|
||||
fieldtype: 'Link',
|
||||
target: 'Account',
|
||||
placeholder: 'Income',
|
||||
@ -68,7 +68,7 @@ export default {
|
||||
},
|
||||
{
|
||||
fieldname: 'expenseAccount',
|
||||
label: 'Expense',
|
||||
label: t`Expense`,
|
||||
fieldtype: 'Link',
|
||||
target: 'Account',
|
||||
placeholder: 'Expense',
|
||||
@ -94,14 +94,14 @@ export default {
|
||||
},
|
||||
{
|
||||
fieldname: 'tax',
|
||||
label: 'Tax',
|
||||
label: t`Tax`,
|
||||
fieldtype: 'Link',
|
||||
target: 'Tax',
|
||||
placeholder: 'Tax',
|
||||
},
|
||||
{
|
||||
fieldname: 'rate',
|
||||
label: 'Rate',
|
||||
label: t`Rate`,
|
||||
fieldtype: 'Currency',
|
||||
validate(value) {
|
||||
if (value.lte(0)) {
|
||||
|
@ -1,3 +1,4 @@
|
||||
import { t } from 'frappe';
|
||||
import { cloneDeep } from 'lodash';
|
||||
import ItemOriginal from './Item';
|
||||
|
||||
@ -8,13 +9,13 @@ export default function getAugmentedItem({ country }) {
|
||||
}
|
||||
|
||||
if (country === 'India') {
|
||||
const nameFieldIndex = Item.fields.findIndex(i => i.fieldname === 'name');
|
||||
const nameFieldIndex = Item.fields.findIndex((i) => i.fieldname === 'name');
|
||||
|
||||
Item.fields = [
|
||||
...Item.fields.slice(0, nameFieldIndex + 1),
|
||||
{
|
||||
fieldname: 'hsnCode',
|
||||
label: 'HSN/SAC',
|
||||
label: t`HSN/SAC`,
|
||||
fieldtype: 'Int',
|
||||
placeholder: 'HSN/SAC Code',
|
||||
},
|
||||
|
@ -1,8 +1,9 @@
|
||||
import { ledgerLink } from '../../../accounting/utils';
|
||||
import { t } from 'frappe';
|
||||
import { DateTime } from 'luxon';
|
||||
import { ledgerLink } from '../../../accounting/utils';
|
||||
|
||||
export default {
|
||||
label: 'Journal Entry',
|
||||
label: t`Journal Entry`,
|
||||
name: 'JournalEntry',
|
||||
doctype: 'DocType',
|
||||
isSubmittable: 1,
|
||||
@ -10,7 +11,7 @@ export default {
|
||||
fields: [
|
||||
{
|
||||
fieldname: 'entryType',
|
||||
label: 'Entry Type',
|
||||
label: t`Entry Type`,
|
||||
fieldtype: 'Select',
|
||||
placeholder: 'Entry Type',
|
||||
options: [
|
||||
@ -30,36 +31,36 @@ export default {
|
||||
},
|
||||
{
|
||||
fieldname: 'date',
|
||||
label: 'Date',
|
||||
label: t`Date`,
|
||||
fieldtype: 'Date',
|
||||
default: () => DateTime.local().toISODate(),
|
||||
},
|
||||
{
|
||||
fieldname: 'accounts',
|
||||
label: 'Account Entries',
|
||||
label: t`Account Entries`,
|
||||
fieldtype: 'Table',
|
||||
childtype: 'JournalEntryAccount',
|
||||
required: true,
|
||||
},
|
||||
{
|
||||
fieldname: 'referenceNumber',
|
||||
label: 'Reference Number',
|
||||
label: t`Reference Number`,
|
||||
fieldtype: 'Data',
|
||||
},
|
||||
{
|
||||
fieldname: 'referenceDate',
|
||||
label: 'Reference Date',
|
||||
label: t`Reference Date`,
|
||||
fieldtype: 'Date',
|
||||
},
|
||||
{
|
||||
fieldname: 'userRemark',
|
||||
label: 'User Remark',
|
||||
label: t`User Remark`,
|
||||
fieldtype: 'Text',
|
||||
placeholder: 'User Remark',
|
||||
},
|
||||
{
|
||||
fieldname: 'cancelled',
|
||||
label: 'Cancelled',
|
||||
label: t`Cancelled`,
|
||||
fieldtype: 'Check',
|
||||
default: 0,
|
||||
},
|
||||
|
@ -8,7 +8,7 @@ export default {
|
||||
columns: [
|
||||
'date',
|
||||
{
|
||||
label: 'Status',
|
||||
label: t`Status`,
|
||||
fieldtype: 'Select',
|
||||
size: 'small',
|
||||
render(doc) {
|
||||
@ -31,7 +31,7 @@ export default {
|
||||
},
|
||||
},
|
||||
{
|
||||
label: 'Entry ID',
|
||||
label: t`Entry ID`,
|
||||
fieldname: 'name',
|
||||
fieldtype: 'Data',
|
||||
getValue(doc) {
|
||||
|
@ -1,10 +1,11 @@
|
||||
import { t } from 'frappe';
|
||||
export default {
|
||||
name: 'JournalEntryAccount',
|
||||
isChild: 1,
|
||||
fields: [
|
||||
{
|
||||
fieldname: 'account',
|
||||
label: 'Account',
|
||||
label: t`Account`,
|
||||
placeholder: 'Account',
|
||||
fieldtype: 'Link',
|
||||
target: 'Account',
|
||||
@ -14,13 +15,13 @@ export default {
|
||||
},
|
||||
{
|
||||
fieldname: 'debit',
|
||||
label: 'Debit',
|
||||
label: t`Debit`,
|
||||
fieldtype: 'Currency',
|
||||
formula: autoDebitCredit('debit'),
|
||||
},
|
||||
{
|
||||
fieldname: 'credit',
|
||||
label: 'Credit',
|
||||
label: t`Credit`,
|
||||
fieldtype: 'Currency',
|
||||
formula: autoDebitCredit('credit'),
|
||||
},
|
||||
|
@ -1,6 +1,7 @@
|
||||
import { t } from 'frappe';
|
||||
export default {
|
||||
name: 'JournalEntrySettings',
|
||||
label: 'Journal Entry Setting',
|
||||
label: t`Journal Entry Setting`,
|
||||
doctype: 'DocType',
|
||||
isSingle: 1,
|
||||
isChild: 0,
|
||||
@ -8,11 +9,11 @@ export default {
|
||||
fields: [
|
||||
{
|
||||
fieldname: 'numberSeries',
|
||||
label: 'Number Series',
|
||||
label: t`Number Series`,
|
||||
fieldtype: 'Link',
|
||||
target: 'NumberSeries',
|
||||
required: 1,
|
||||
default: 'JV'
|
||||
}
|
||||
]
|
||||
default: 'JV',
|
||||
},
|
||||
],
|
||||
};
|
||||
|
@ -5,7 +5,7 @@ import PartyWidget from './PartyWidget.vue';
|
||||
|
||||
export default {
|
||||
name: 'Customer',
|
||||
label: 'Customer',
|
||||
label: t`Customer`,
|
||||
basedOn: 'Party',
|
||||
filters: {
|
||||
customer: 1,
|
||||
|
@ -2,35 +2,35 @@ import frappe, { t } from 'frappe';
|
||||
|
||||
export default {
|
||||
name: 'Party',
|
||||
label: 'Party',
|
||||
label: t`Party`,
|
||||
regional: 1,
|
||||
keywordFields: ['name'],
|
||||
fields: [
|
||||
{
|
||||
fieldname: 'name',
|
||||
label: 'Name',
|
||||
label: t`Name`,
|
||||
fieldtype: 'Data',
|
||||
required: 1,
|
||||
placeholder: 'Full Name',
|
||||
},
|
||||
{
|
||||
fieldname: 'image',
|
||||
label: 'Image',
|
||||
label: t`Image`,
|
||||
fieldtype: 'AttachImage',
|
||||
},
|
||||
{
|
||||
fieldname: 'customer',
|
||||
label: 'Is Customer',
|
||||
label: t`Is Customer`,
|
||||
fieldtype: 'Check',
|
||||
},
|
||||
{
|
||||
fieldname: 'supplier',
|
||||
label: 'Is Supplier',
|
||||
label: t`Is Supplier`,
|
||||
fieldtype: 'Check',
|
||||
},
|
||||
{
|
||||
fieldname: 'defaultAccount',
|
||||
label: 'Default Account',
|
||||
label: t`Default Account`,
|
||||
fieldtype: 'Link',
|
||||
target: 'Account',
|
||||
getFilters: (query, doc) => {
|
||||
@ -51,12 +51,12 @@ export default {
|
||||
},
|
||||
{
|
||||
fieldname: 'outstandingAmount',
|
||||
label: 'Outstanding Amount',
|
||||
label: t`Outstanding Amount`,
|
||||
fieldtype: 'Currency',
|
||||
},
|
||||
{
|
||||
fieldname: 'currency',
|
||||
label: 'Currency',
|
||||
label: t`Currency`,
|
||||
fieldtype: 'Link',
|
||||
target: 'Currency',
|
||||
placeholder: 'INR',
|
||||
@ -64,7 +64,7 @@ export default {
|
||||
},
|
||||
{
|
||||
fieldname: 'email',
|
||||
label: 'Email',
|
||||
label: t`Email`,
|
||||
fieldtype: 'Data',
|
||||
placeholder: 'john@doe.com',
|
||||
validate: {
|
||||
@ -73,7 +73,7 @@ export default {
|
||||
},
|
||||
{
|
||||
fieldname: 'phone',
|
||||
label: 'Phone',
|
||||
label: t`Phone`,
|
||||
fieldtype: 'Data',
|
||||
placeholder: 'Phone',
|
||||
validate: {
|
||||
@ -82,7 +82,7 @@ export default {
|
||||
},
|
||||
{
|
||||
fieldname: 'address',
|
||||
label: 'Address',
|
||||
label: t`Address`,
|
||||
fieldtype: 'Link',
|
||||
target: 'Address',
|
||||
placeholder: t`Click to create`,
|
||||
@ -90,7 +90,7 @@ export default {
|
||||
},
|
||||
{
|
||||
fieldname: 'addressDisplay',
|
||||
label: 'Address Display',
|
||||
label: t`Address Display`,
|
||||
fieldtype: 'Text',
|
||||
readOnly: true,
|
||||
formula: (doc) => {
|
||||
|
@ -1,3 +1,4 @@
|
||||
import { t } from 'frappe';
|
||||
import { cloneDeep } from 'lodash';
|
||||
import PartyOriginal from './Party';
|
||||
|
||||
@ -15,13 +16,13 @@ export default function getAugmentedParty({ country }) {
|
||||
0,
|
||||
{
|
||||
fieldname: 'gstin',
|
||||
label: 'GSTIN No.',
|
||||
label: t`GSTIN No.`,
|
||||
fieldtype: 'Data',
|
||||
hidden: (doc) => (doc.gstType === 'Registered Regular' ? 0 : 1),
|
||||
},
|
||||
{
|
||||
fieldname: 'gstType',
|
||||
label: 'GST Registration',
|
||||
label: t`GST Registration`,
|
||||
placeholder: 'GST Registration',
|
||||
fieldtype: 'Select',
|
||||
default: gstTypes[0],
|
||||
@ -33,7 +34,7 @@ export default function getAugmentedParty({ country }) {
|
||||
} else {
|
||||
Party.fields.splice(3, 0, {
|
||||
fieldname: 'taxId',
|
||||
label: 'Tax ID',
|
||||
label: t`Tax ID`,
|
||||
fieldtype: 'Data',
|
||||
});
|
||||
Party.quickEditFields.push('taxId');
|
||||
|
@ -5,7 +5,7 @@ import PartyWidget from './PartyWidget.vue';
|
||||
|
||||
export default {
|
||||
name: 'Supplier',
|
||||
label: 'Supplier',
|
||||
label: t`Supplier`,
|
||||
basedOn: 'Party',
|
||||
filters: {
|
||||
supplier: 1,
|
||||
|
@ -1,9 +1,9 @@
|
||||
import frappe from 'frappe';
|
||||
import frappe, { t } from 'frappe';
|
||||
import utils from '../../../accounting/utils';
|
||||
|
||||
export default {
|
||||
name: 'Payment',
|
||||
label: 'Payment',
|
||||
label: t`Payment`,
|
||||
isSingle: 0,
|
||||
isChild: 0,
|
||||
isSubmittable: 1,
|
||||
@ -12,20 +12,20 @@ export default {
|
||||
fields: [
|
||||
{
|
||||
fieldname: 'party',
|
||||
label: 'Party',
|
||||
label: t`Party`,
|
||||
fieldtype: 'Link',
|
||||
target: 'Party',
|
||||
required: 1,
|
||||
},
|
||||
{
|
||||
fieldname: 'date',
|
||||
label: 'Posting Date',
|
||||
label: t`Posting Date`,
|
||||
fieldtype: 'Date',
|
||||
default: () => new Date().toISOString(),
|
||||
},
|
||||
{
|
||||
fieldname: 'account',
|
||||
label: 'From Account',
|
||||
label: t`From Account`,
|
||||
fieldtype: 'Link',
|
||||
target: 'Account',
|
||||
required: 1,
|
||||
@ -46,7 +46,7 @@ export default {
|
||||
},
|
||||
{
|
||||
fieldname: 'paymentType',
|
||||
label: 'Payment Type',
|
||||
label: t`Payment Type`,
|
||||
fieldtype: 'Select',
|
||||
placeholder: 'Payment Type',
|
||||
options: ['Receive', 'Pay'],
|
||||
@ -54,7 +54,7 @@ export default {
|
||||
},
|
||||
{
|
||||
fieldname: 'paymentAccount',
|
||||
label: 'To Account',
|
||||
label: t`To Account`,
|
||||
placeholder: 'To Account',
|
||||
fieldtype: 'Link',
|
||||
target: 'Account',
|
||||
@ -76,7 +76,7 @@ export default {
|
||||
},
|
||||
{
|
||||
fieldname: 'paymentMethod',
|
||||
label: 'Payment Method',
|
||||
label: t`Payment Method`,
|
||||
placeholder: 'Payment Method',
|
||||
fieldtype: 'Select',
|
||||
options: ['Cash', 'Cheque', 'Transfer'],
|
||||
@ -85,7 +85,7 @@ export default {
|
||||
},
|
||||
{
|
||||
fieldname: 'referenceId',
|
||||
label: 'Ref. / Cheque No.',
|
||||
label: t`Ref. / Cheque No.`,
|
||||
placeholder: 'Ref. / Cheque No.',
|
||||
fieldtype: 'Data',
|
||||
required: (doc) => doc.paymentMethod !== 'Cash', // TODO: UNIQUE
|
||||
@ -93,20 +93,20 @@ export default {
|
||||
},
|
||||
{
|
||||
fieldname: 'referenceDate',
|
||||
label: 'Ref. Date',
|
||||
label: t`Ref. Date`,
|
||||
placeholder: 'Ref. Date',
|
||||
fieldtype: 'Date',
|
||||
},
|
||||
{
|
||||
fieldname: 'clearanceDate',
|
||||
label: 'Clearance Date',
|
||||
label: t`Clearance Date`,
|
||||
placeholder: 'Clearance Date',
|
||||
fieldtype: 'Date',
|
||||
hidden: (doc) => doc.paymentMethod === 'Cash',
|
||||
},
|
||||
{
|
||||
fieldname: 'amount',
|
||||
label: 'Amount',
|
||||
label: t`Amount`,
|
||||
fieldtype: 'Currency',
|
||||
required: 1,
|
||||
formula: (doc) => doc.getSum('for', 'amount', false),
|
||||
@ -135,19 +135,19 @@ export default {
|
||||
},
|
||||
{
|
||||
fieldname: 'writeoff',
|
||||
label: 'Write Off / Refund',
|
||||
label: t`Write Off / Refund`,
|
||||
fieldtype: 'Currency',
|
||||
},
|
||||
{
|
||||
fieldname: 'for',
|
||||
label: 'Payment Reference',
|
||||
label: t`Payment Reference`,
|
||||
fieldtype: 'Table',
|
||||
childtype: 'PaymentFor',
|
||||
required: 0,
|
||||
},
|
||||
{
|
||||
fieldname: 'cancelled',
|
||||
label: 'Cancelled',
|
||||
label: t`Cancelled`,
|
||||
fieldtype: 'Check',
|
||||
default: 0,
|
||||
},
|
||||
|
@ -7,7 +7,7 @@ export default {
|
||||
columns: [
|
||||
'party',
|
||||
{
|
||||
label: 'Status',
|
||||
label: t`Status`,
|
||||
fieldname: 'status',
|
||||
fieldtype: 'Select',
|
||||
size: 'small',
|
||||
|
@ -7,7 +7,7 @@ const referenceTypeMap = {
|
||||
|
||||
export default {
|
||||
name: 'PaymentFor',
|
||||
label: 'Payment For',
|
||||
label: t`Payment For`,
|
||||
isSingle: 0,
|
||||
isChild: 1,
|
||||
keywordFields: [],
|
||||
@ -15,7 +15,7 @@ export default {
|
||||
fields: [
|
||||
{
|
||||
fieldname: 'referenceType',
|
||||
label: 'Reference Type',
|
||||
label: t`Reference Type`,
|
||||
placeholder: 'Type',
|
||||
fieldtype: 'Select',
|
||||
options: Object.keys(referenceTypeMap),
|
||||
@ -24,7 +24,7 @@ export default {
|
||||
},
|
||||
{
|
||||
fieldname: 'referenceName',
|
||||
label: 'Reference Name',
|
||||
label: t`Reference Name`,
|
||||
fieldtype: 'DynamicLink',
|
||||
references: 'referenceType',
|
||||
placeholder: 'Name',
|
||||
@ -37,7 +37,7 @@ export default {
|
||||
},
|
||||
{
|
||||
fieldname: 'amount',
|
||||
label: 'Amount',
|
||||
label: t`Amount`,
|
||||
fieldtype: 'Currency',
|
||||
formula: (row, doc) => {
|
||||
return (
|
||||
|
@ -1,17 +1,19 @@
|
||||
import { t } from 'frappe';
|
||||
|
||||
export default {
|
||||
name: "PaymentSettings",
|
||||
label: "Payment Settings",
|
||||
isSingle: 1,
|
||||
isChild: 0,
|
||||
keywordFields: [],
|
||||
"fields": [
|
||||
{
|
||||
"fieldname": "numberSeries",
|
||||
"label": "Number Series",
|
||||
"fieldtype": "Link",
|
||||
"target": "NumberSeries",
|
||||
"required": 1,
|
||||
"default": "PAY"
|
||||
}
|
||||
]
|
||||
};
|
||||
name: 'PaymentSettings',
|
||||
label: t`Payment Settings`,
|
||||
isSingle: 1,
|
||||
isChild: 0,
|
||||
keywordFields: [],
|
||||
fields: [
|
||||
{
|
||||
fieldname: 'numberSeries',
|
||||
label: t`Number Series`,
|
||||
fieldtype: 'Link',
|
||||
target: 'NumberSeries',
|
||||
required: 1,
|
||||
default: 'PAY',
|
||||
},
|
||||
],
|
||||
};
|
||||
|
@ -1,23 +1,24 @@
|
||||
import theme from '@/theme';
|
||||
import { t } from 'frappe';
|
||||
|
||||
export default {
|
||||
name: 'PrintSettings',
|
||||
label: 'Print Settings',
|
||||
label: t`Print Settings`,
|
||||
isSingle: 1,
|
||||
fields: [
|
||||
{
|
||||
fieldname: 'logo',
|
||||
label: 'Logo',
|
||||
label: t`Logo`,
|
||||
fieldtype: 'AttachImage',
|
||||
},
|
||||
{
|
||||
fieldname: 'companyName',
|
||||
label: 'Company Name',
|
||||
label: t`Company Name`,
|
||||
fieldtype: 'Data',
|
||||
},
|
||||
{
|
||||
fieldname: 'email',
|
||||
label: 'Email',
|
||||
label: t`Email`,
|
||||
fieldtype: 'Data',
|
||||
placeholder: 'john@doe.com',
|
||||
validate: {
|
||||
@ -26,12 +27,12 @@ export default {
|
||||
},
|
||||
{
|
||||
fieldname: 'displayLogo',
|
||||
label: 'Display Logo in Invoice',
|
||||
label: t`Display Logo in Invoice`,
|
||||
fieldtype: 'Check',
|
||||
},
|
||||
{
|
||||
fieldname: 'phone',
|
||||
label: 'Phone',
|
||||
label: t`Phone`,
|
||||
fieldtype: 'Data',
|
||||
placeholder: '9888900000',
|
||||
validate: {
|
||||
@ -40,7 +41,7 @@ export default {
|
||||
},
|
||||
{
|
||||
fieldname: 'address',
|
||||
label: 'Address',
|
||||
label: t`Address`,
|
||||
fieldtype: 'Link',
|
||||
target: 'Address',
|
||||
placeholder: 'Click to create',
|
||||
@ -48,7 +49,7 @@ export default {
|
||||
},
|
||||
{
|
||||
fieldname: 'template',
|
||||
label: 'Template',
|
||||
label: t`Template`,
|
||||
placeholder: 'Template',
|
||||
fieldtype: 'Select',
|
||||
options: ['Basic', 'Minimal', 'Business'],
|
||||
@ -56,7 +57,7 @@ export default {
|
||||
},
|
||||
{
|
||||
fieldname: 'color',
|
||||
label: 'Color',
|
||||
label: t`Color`,
|
||||
placeholder: 'Select Color',
|
||||
fieldtype: 'Color',
|
||||
colors: [
|
||||
@ -78,13 +79,13 @@ export default {
|
||||
};
|
||||
})
|
||||
.concat({
|
||||
label: 'Black',
|
||||
label: t`Black`,
|
||||
value: theme.colors['black'],
|
||||
}),
|
||||
},
|
||||
{
|
||||
fieldname: 'font',
|
||||
label: 'Font',
|
||||
label: t`Font`,
|
||||
placeholder: 'Font',
|
||||
fieldtype: 'Select',
|
||||
options: ['Inter', 'Times New Roman', 'Arial', 'Courier'],
|
||||
|
@ -1,3 +1,4 @@
|
||||
import { t } from 'frappe';
|
||||
import InvoiceTemplate from '../SalesInvoice/InvoiceTemplate.vue';
|
||||
import { getActions } from '../Transaction/Transaction';
|
||||
import PurchaseInvoice from './PurchaseInvoiceDocument';
|
||||
@ -5,7 +6,7 @@ import PurchaseInvoice from './PurchaseInvoiceDocument';
|
||||
export default {
|
||||
name: 'PurchaseInvoice',
|
||||
doctype: 'DocType',
|
||||
label: 'Bill',
|
||||
label: t`Bill`,
|
||||
documentClass: PurchaseInvoice,
|
||||
printTemplate: InvoiceTemplate,
|
||||
isSingle: 0,
|
||||
@ -16,7 +17,7 @@ export default {
|
||||
showTitle: true,
|
||||
fields: [
|
||||
{
|
||||
label: 'Bill No',
|
||||
label: t`Bill No`,
|
||||
fieldname: 'name',
|
||||
fieldtype: 'Data',
|
||||
required: 1,
|
||||
@ -24,20 +25,20 @@ export default {
|
||||
},
|
||||
{
|
||||
fieldname: 'date',
|
||||
label: 'Date',
|
||||
label: t`Date`,
|
||||
fieldtype: 'Date',
|
||||
default: () => new Date().toISOString().slice(0, 10),
|
||||
},
|
||||
{
|
||||
fieldname: 'supplier',
|
||||
label: 'Supplier',
|
||||
label: t`Supplier`,
|
||||
fieldtype: 'Link',
|
||||
target: 'Supplier',
|
||||
required: 1,
|
||||
},
|
||||
{
|
||||
fieldname: 'account',
|
||||
label: 'Account',
|
||||
label: t`Account`,
|
||||
fieldtype: 'Link',
|
||||
target: 'Account',
|
||||
formula: (doc) => doc.getFrom('Party', doc.supplier, 'defaultAccount'),
|
||||
@ -50,7 +51,7 @@ export default {
|
||||
},
|
||||
{
|
||||
fieldname: 'currency',
|
||||
label: 'Supplier Currency',
|
||||
label: t`Supplier Currency`,
|
||||
fieldtype: 'Link',
|
||||
target: 'Currency',
|
||||
hidden: 1,
|
||||
@ -61,7 +62,7 @@ export default {
|
||||
},
|
||||
{
|
||||
fieldname: 'exchangeRate',
|
||||
label: 'Exchange Rate',
|
||||
label: t`Exchange Rate`,
|
||||
fieldtype: 'Float',
|
||||
default: 1,
|
||||
formula: async (doc) => await doc.getExchangeRate(),
|
||||
@ -69,14 +70,14 @@ export default {
|
||||
},
|
||||
{
|
||||
fieldname: 'items',
|
||||
label: 'Items',
|
||||
label: t`Items`,
|
||||
fieldtype: 'Table',
|
||||
childtype: 'PurchaseInvoiceItem',
|
||||
required: true,
|
||||
},
|
||||
{
|
||||
fieldname: 'netTotal',
|
||||
label: 'Net Total',
|
||||
label: t`Net Total`,
|
||||
fieldtype: 'Currency',
|
||||
formula: (doc) => doc.getSum('items', 'amount', false),
|
||||
readOnly: 1,
|
||||
@ -84,14 +85,14 @@ export default {
|
||||
},
|
||||
{
|
||||
fieldname: 'baseNetTotal',
|
||||
label: 'Net Total (Company Currency)',
|
||||
label: t`Net Total (Company Currency)`,
|
||||
fieldtype: 'Currency',
|
||||
formula: (doc) => doc.netTotal.mul(doc.exchangeRate),
|
||||
readOnly: 1,
|
||||
},
|
||||
{
|
||||
fieldname: 'taxes',
|
||||
label: 'Taxes',
|
||||
label: t`Taxes`,
|
||||
fieldtype: 'Table',
|
||||
childtype: 'TaxSummary',
|
||||
formula: (doc) => doc.getTaxSummary(),
|
||||
@ -99,7 +100,7 @@ export default {
|
||||
},
|
||||
{
|
||||
fieldname: 'grandTotal',
|
||||
label: 'Grand Total',
|
||||
label: t`Grand Total`,
|
||||
fieldtype: 'Currency',
|
||||
formula: (doc) => doc.getGrandTotal(),
|
||||
readOnly: 1,
|
||||
@ -107,14 +108,14 @@ export default {
|
||||
},
|
||||
{
|
||||
fieldname: 'baseGrandTotal',
|
||||
label: 'Grand Total (Company Currency)',
|
||||
label: t`Grand Total (Company Currency)`,
|
||||
fieldtype: 'Currency',
|
||||
formula: (doc) => doc.grandTotal.mul(doc.exchangeRate),
|
||||
readOnly: 1,
|
||||
},
|
||||
{
|
||||
fieldname: 'outstandingAmount',
|
||||
label: 'Outstanding Amount',
|
||||
label: t`Outstanding Amount`,
|
||||
fieldtype: 'Currency',
|
||||
formula: (doc) => {
|
||||
if (doc.submitted) return;
|
||||
@ -124,12 +125,12 @@ export default {
|
||||
},
|
||||
{
|
||||
fieldname: 'terms',
|
||||
label: 'Terms',
|
||||
label: t`Terms`,
|
||||
fieldtype: 'Text',
|
||||
},
|
||||
{
|
||||
fieldname: 'cancelled',
|
||||
label: 'Cancelled',
|
||||
label: t`Cancelled`,
|
||||
fieldtype: 'Check',
|
||||
default: 0,
|
||||
},
|
||||
|
@ -1,3 +1,4 @@
|
||||
import { t } from 'frappe';
|
||||
export default {
|
||||
name: 'PurchaseInvoiceItem',
|
||||
doctype: 'DocType',
|
||||
@ -7,7 +8,7 @@ export default {
|
||||
fields: [
|
||||
{
|
||||
fieldname: 'item',
|
||||
label: 'Item',
|
||||
label: t`Item`,
|
||||
fieldtype: 'Link',
|
||||
target: 'Item',
|
||||
required: 1,
|
||||
@ -22,21 +23,21 @@ export default {
|
||||
},
|
||||
{
|
||||
fieldname: 'description',
|
||||
label: 'Description',
|
||||
label: t`Description`,
|
||||
fieldtype: 'Text',
|
||||
formula: (row, doc) => doc.getFrom('Item', row.item, 'description'),
|
||||
hidden: 1,
|
||||
},
|
||||
{
|
||||
fieldname: 'quantity',
|
||||
label: 'Quantity',
|
||||
label: t`Quantity`,
|
||||
fieldtype: 'Float',
|
||||
required: 1,
|
||||
default: 1,
|
||||
},
|
||||
{
|
||||
fieldname: 'rate',
|
||||
label: 'Rate',
|
||||
label: t`Rate`,
|
||||
fieldtype: 'Currency',
|
||||
required: 1,
|
||||
formula: async (row, doc) => {
|
||||
@ -48,14 +49,14 @@ export default {
|
||||
},
|
||||
{
|
||||
fieldname: 'baseRate',
|
||||
label: 'Rate (Company Currency)',
|
||||
label: t`Rate (Company Currency)`,
|
||||
fieldtype: 'Currency',
|
||||
formula: (row, doc) => row.rate.mul(doc.exchangeRate),
|
||||
readOnly: 1,
|
||||
},
|
||||
{
|
||||
fieldname: 'account',
|
||||
label: 'Account',
|
||||
label: t`Account`,
|
||||
fieldtype: 'Link',
|
||||
target: 'Account',
|
||||
required: 1,
|
||||
@ -63,7 +64,7 @@ export default {
|
||||
},
|
||||
{
|
||||
fieldname: 'tax',
|
||||
label: 'Tax',
|
||||
label: t`Tax`,
|
||||
fieldtype: 'Link',
|
||||
target: 'Tax',
|
||||
formula: (row, doc) => {
|
||||
@ -73,7 +74,7 @@ export default {
|
||||
},
|
||||
{
|
||||
fieldname: 'amount',
|
||||
label: 'Amount',
|
||||
label: t`Amount`,
|
||||
fieldtype: 'Currency',
|
||||
readOnly: 1,
|
||||
formula: (row) => row.rate.mul(row.quantity),
|
||||
@ -81,7 +82,7 @@ export default {
|
||||
},
|
||||
{
|
||||
fieldname: 'baseAmount',
|
||||
label: 'Amount (Company Currency)',
|
||||
label: t`Amount (Company Currency)`,
|
||||
fieldtype: 'Currency',
|
||||
readOnly: 1,
|
||||
formula: (row, doc) => row.amount.mul(doc.exchangeRate),
|
||||
|
@ -1,3 +1,4 @@
|
||||
import { t } from 'frappe';
|
||||
import { cloneDeep } from 'lodash';
|
||||
import PurchaseInvoiceItemOriginal from './PurchaseInvoiceItem';
|
||||
|
||||
@ -12,7 +13,7 @@ export default function getAugmentedPurchaseInvoiceItem({ country }) {
|
||||
...PurchaseInvoiceItem.fields,
|
||||
{
|
||||
fieldname: 'hsnCode',
|
||||
label: 'HSN/SAC',
|
||||
label: t`HSN/SAC`,
|
||||
fieldtype: 'Int',
|
||||
formula: (row, doc) => doc.getFrom('Item', row.item, 'hsnCode'),
|
||||
formulaDependsOn: ['item'],
|
||||
|
@ -1,6 +1,7 @@
|
||||
import { t } from 'frappe';
|
||||
export default {
|
||||
name: 'PurchaseInvoiceSettings',
|
||||
label: 'Bills Settings',
|
||||
label: t`Bills Settings`,
|
||||
doctype: 'DocType',
|
||||
isSingle: 1,
|
||||
isChild: 0,
|
||||
@ -8,7 +9,7 @@ export default {
|
||||
fields: [
|
||||
{
|
||||
fieldname: 'numberSeries',
|
||||
label: 'Number Series',
|
||||
label: t`Number Series`,
|
||||
fieldtype: 'Link',
|
||||
target: 'NumberSeries',
|
||||
required: 1,
|
||||
|
@ -1,3 +1,4 @@
|
||||
import { t } from 'frappe';
|
||||
import model from 'frappe/model';
|
||||
import PurchaseInvoice from '../PurchaseInvoice/PurchaseInvoice';
|
||||
|
||||
@ -5,7 +6,7 @@ export default model.extend(
|
||||
PurchaseInvoice,
|
||||
{
|
||||
name: 'PurchaseOrder',
|
||||
label: 'Purchase Order',
|
||||
label: t`Purchase Order`,
|
||||
settings: 'PurchaseOrderSettings',
|
||||
fields: [
|
||||
{
|
||||
|
@ -1,9 +1,10 @@
|
||||
import { t } from 'frappe';
|
||||
import model from 'frappe/model';
|
||||
import PurchaseInvoiceSettings from '../PurchaseInvoiceSettings/PurchaseInvoiceSettings';
|
||||
|
||||
export default model.extend(PurchaseInvoiceSettings, {
|
||||
name: 'PurchaseOrderSettings',
|
||||
label: 'Purchase Order Settings',
|
||||
label: t`Purchase Order Settings`,
|
||||
fields: [
|
||||
{
|
||||
fieldname: 'numberSeries',
|
||||
|
@ -1,9 +1,10 @@
|
||||
import { t } from 'frappe';
|
||||
import model from 'frappe/model';
|
||||
import PurchaseOrder from '../PurchaseOrder/PurchaseOrder';
|
||||
|
||||
export default model.extend(PurchaseOrder, {
|
||||
name: 'PurchaseReceipt',
|
||||
label: 'Purchase Receipt',
|
||||
label: t`Purchase Receipt`,
|
||||
settings: 'PurchaseReceiptSettings',
|
||||
fields: [
|
||||
{
|
||||
|
@ -1,3 +1,4 @@
|
||||
import { t } from 'frappe';
|
||||
import model from 'frappe/model';
|
||||
import PurchaseOrderItem from '../PurchaseOrderItem/PurchaseOrderItem';
|
||||
|
||||
@ -8,7 +9,7 @@ export default model.extend(
|
||||
fields: [
|
||||
{
|
||||
fieldname: 'acceptedQuantity',
|
||||
label: 'Accepted Quantity',
|
||||
label: t`Accepted Quantity`,
|
||||
fieldtype: 'Float',
|
||||
required: 1,
|
||||
},
|
||||
|
@ -1,9 +1,10 @@
|
||||
import { t } from 'frappe';
|
||||
import model from 'frappe/model';
|
||||
import PurchaseOrderSettings from '../PurchaseOrderSettings/PurchaseOrderSettings';
|
||||
|
||||
export default model.extend(PurchaseOrderSettings, {
|
||||
name: 'PurchaseReceiptSettings',
|
||||
label: 'Purchase Receipt Settings',
|
||||
label: t`Purchase Receipt Settings`,
|
||||
fields: [
|
||||
{
|
||||
fieldname: 'numberSeries',
|
||||
|
@ -1,3 +1,4 @@
|
||||
import { t } from 'frappe';
|
||||
import model from 'frappe/model';
|
||||
import SalesInvoice from '../SalesInvoice/SalesInvoice';
|
||||
|
||||
@ -5,7 +6,7 @@ const Quotation = model.extend(
|
||||
SalesInvoice,
|
||||
{
|
||||
name: 'Quotation',
|
||||
label: 'Quotation',
|
||||
label: t`Quotation`,
|
||||
settings: 'QuotationSettings',
|
||||
fields: [
|
||||
{
|
||||
|
@ -1,3 +1,4 @@
|
||||
import { t } from 'frappe';
|
||||
import { cloneDeep } from 'lodash';
|
||||
import QuotationItemOriginal from './QuotationItem';
|
||||
|
||||
@ -12,7 +13,7 @@ export default function getAugmentedQuotationItem({ country }) {
|
||||
...QuotationItem.fields,
|
||||
{
|
||||
fieldname: 'hsnCode',
|
||||
label: 'HSN/SAC',
|
||||
label: t`HSN/SAC`,
|
||||
fieldtype: 'Int',
|
||||
formula: (row, doc) => doc.getFrom('Item', row.item, 'hsnCode'),
|
||||
formulaDependsOn: ['item'],
|
||||
|
@ -1,9 +1,10 @@
|
||||
import { t } from 'frappe';
|
||||
import model from 'frappe/model';
|
||||
import SalesInvoiceSettings from '../SalesInvoiceSettings/SalesInvoiceSettings';
|
||||
|
||||
export default model.extend(SalesInvoiceSettings, {
|
||||
name: 'QuotationSettings',
|
||||
label: 'Quotation Settings',
|
||||
label: t`Quotation Settings`,
|
||||
fields: [
|
||||
{
|
||||
fieldname: 'numberSeries',
|
||||
|
@ -1,10 +1,11 @@
|
||||
import { t } from 'frappe';
|
||||
import { getActions } from '../Transaction/Transaction';
|
||||
import InvoiceTemplate from './InvoiceTemplate.vue';
|
||||
import SalesInvoice from './SalesInvoiceDocument';
|
||||
|
||||
export default {
|
||||
name: 'SalesInvoice',
|
||||
label: 'Invoice',
|
||||
label: t`Invoice`,
|
||||
doctype: 'DocType',
|
||||
documentClass: SalesInvoice,
|
||||
printTemplate: InvoiceTemplate,
|
||||
@ -15,7 +16,7 @@ export default {
|
||||
settings: 'SalesInvoiceSettings',
|
||||
fields: [
|
||||
{
|
||||
label: 'Invoice No',
|
||||
label: t`Invoice No`,
|
||||
fieldname: 'name',
|
||||
fieldtype: 'Data',
|
||||
required: 1,
|
||||
@ -23,20 +24,20 @@ export default {
|
||||
},
|
||||
{
|
||||
fieldname: 'date',
|
||||
label: 'Date',
|
||||
label: t`Date`,
|
||||
fieldtype: 'Date',
|
||||
default: () => new Date().toISOString().slice(0, 10),
|
||||
},
|
||||
{
|
||||
fieldname: 'customer',
|
||||
label: 'Customer',
|
||||
label: t`Customer`,
|
||||
fieldtype: 'Link',
|
||||
target: 'Customer',
|
||||
required: 1,
|
||||
},
|
||||
{
|
||||
fieldname: 'account',
|
||||
label: 'Account',
|
||||
label: t`Account`,
|
||||
fieldtype: 'Link',
|
||||
target: 'Account',
|
||||
disableCreation: true,
|
||||
@ -50,7 +51,7 @@ export default {
|
||||
},
|
||||
{
|
||||
fieldname: 'currency',
|
||||
label: 'Customer Currency',
|
||||
label: t`Customer Currency`,
|
||||
fieldtype: 'Link',
|
||||
target: 'Currency',
|
||||
formula: (doc) =>
|
||||
@ -60,7 +61,7 @@ export default {
|
||||
},
|
||||
{
|
||||
fieldname: 'exchangeRate',
|
||||
label: 'Exchange Rate',
|
||||
label: t`Exchange Rate`,
|
||||
fieldtype: 'Float',
|
||||
default: 1,
|
||||
formula: (doc) => doc.getExchangeRate(),
|
||||
@ -68,14 +69,14 @@ export default {
|
||||
},
|
||||
{
|
||||
fieldname: 'items',
|
||||
label: 'Items',
|
||||
label: t`Items`,
|
||||
fieldtype: 'Table',
|
||||
childtype: 'SalesInvoiceItem',
|
||||
required: true,
|
||||
},
|
||||
{
|
||||
fieldname: 'netTotal',
|
||||
label: 'Net Total',
|
||||
label: t`Net Total`,
|
||||
fieldtype: 'Currency',
|
||||
formula: (doc) => doc.getSum('items', 'amount', false),
|
||||
readOnly: 1,
|
||||
@ -83,14 +84,14 @@ export default {
|
||||
},
|
||||
{
|
||||
fieldname: 'baseNetTotal',
|
||||
label: 'Net Total (Company Currency)',
|
||||
label: t`Net Total (Company Currency)`,
|
||||
fieldtype: 'Currency',
|
||||
formula: (doc) => doc.netTotal.mul(doc.exchangeRate),
|
||||
readOnly: 1,
|
||||
},
|
||||
{
|
||||
fieldname: 'taxes',
|
||||
label: 'Taxes',
|
||||
label: t`Taxes`,
|
||||
fieldtype: 'Table',
|
||||
childtype: 'TaxSummary',
|
||||
formula: (doc) => doc.getTaxSummary(),
|
||||
@ -98,7 +99,7 @@ export default {
|
||||
},
|
||||
{
|
||||
fieldname: 'grandTotal',
|
||||
label: 'Grand Total',
|
||||
label: t`Grand Total`,
|
||||
fieldtype: 'Currency',
|
||||
formula: (doc) => doc.getGrandTotal(),
|
||||
readOnly: 1,
|
||||
@ -106,14 +107,14 @@ export default {
|
||||
},
|
||||
{
|
||||
fieldname: 'baseGrandTotal',
|
||||
label: 'Grand Total (Company Currency)',
|
||||
label: t`Grand Total (Company Currency)`,
|
||||
fieldtype: 'Currency',
|
||||
formula: (doc) => doc.grandTotal.mul(doc.exchangeRate),
|
||||
readOnly: 1,
|
||||
},
|
||||
{
|
||||
fieldname: 'outstandingAmount',
|
||||
label: 'Outstanding Amount',
|
||||
label: t`Outstanding Amount`,
|
||||
fieldtype: 'Currency',
|
||||
formula: (doc) => {
|
||||
if (doc.submitted) return;
|
||||
@ -123,12 +124,12 @@ export default {
|
||||
},
|
||||
{
|
||||
fieldname: 'terms',
|
||||
label: 'Notes',
|
||||
label: t`Notes`,
|
||||
fieldtype: 'Text',
|
||||
},
|
||||
{
|
||||
fieldname: 'cancelled',
|
||||
label: 'Cancelled',
|
||||
label: t`Cancelled`,
|
||||
fieldtype: 'Check',
|
||||
default: 0,
|
||||
},
|
||||
|
@ -1,3 +1,4 @@
|
||||
import { t } from 'frappe';
|
||||
import { cloneDeep } from 'lodash';
|
||||
import SalesInvoiceItemOriginal from './SalesInvoiceItem';
|
||||
|
||||
@ -12,7 +13,7 @@ export default function getAugmentedSalesInvoiceItem({ country }) {
|
||||
...SalesInvoiceItem.fields,
|
||||
{
|
||||
fieldname: 'hsnCode',
|
||||
label: 'HSN/SAC',
|
||||
label: t`HSN/SAC`,
|
||||
fieldtype: 'Int',
|
||||
formula: (row, doc) => doc.getFrom('Item', row.item, 'hsnCode'),
|
||||
formulaDependsOn: ['item'],
|
||||
|
@ -1,3 +1,4 @@
|
||||
import { t } from 'frappe';
|
||||
export default {
|
||||
name: 'SalesInvoiceItem',
|
||||
doctype: 'DocType',
|
||||
@ -8,7 +9,7 @@ export default {
|
||||
fields: [
|
||||
{
|
||||
fieldname: 'item',
|
||||
label: 'Item',
|
||||
label: t`Item`,
|
||||
fieldtype: 'Link',
|
||||
target: 'Item',
|
||||
required: 1,
|
||||
@ -23,7 +24,7 @@ export default {
|
||||
},
|
||||
{
|
||||
fieldname: 'description',
|
||||
label: 'Description',
|
||||
label: t`Description`,
|
||||
fieldtype: 'Text',
|
||||
formula: (row, doc) => doc.getFrom('Item', row.item, 'description'),
|
||||
hidden: 1,
|
||||
@ -31,7 +32,7 @@ export default {
|
||||
},
|
||||
{
|
||||
fieldname: 'quantity',
|
||||
label: 'Quantity',
|
||||
label: t`Quantity`,
|
||||
fieldtype: 'Float',
|
||||
required: 1,
|
||||
default: 1,
|
||||
@ -47,7 +48,7 @@ export default {
|
||||
},
|
||||
{
|
||||
fieldname: 'rate',
|
||||
label: 'Rate',
|
||||
label: t`Rate`,
|
||||
fieldtype: 'Currency',
|
||||
required: 1,
|
||||
formula: async (row, doc) => {
|
||||
@ -72,14 +73,14 @@ export default {
|
||||
},
|
||||
{
|
||||
fieldname: 'baseRate',
|
||||
label: 'Rate (Company Currency)',
|
||||
label: t`Rate (Company Currency)`,
|
||||
fieldtype: 'Currency',
|
||||
formula: (row, doc) => row.rate.mul(doc.exchangeRate),
|
||||
readOnly: 1,
|
||||
},
|
||||
{
|
||||
fieldname: 'account',
|
||||
label: 'Account',
|
||||
label: t`Account`,
|
||||
hidden: 1,
|
||||
fieldtype: 'Link',
|
||||
target: 'Account',
|
||||
@ -88,7 +89,7 @@ export default {
|
||||
},
|
||||
{
|
||||
fieldname: 'tax',
|
||||
label: 'Tax',
|
||||
label: t`Tax`,
|
||||
fieldtype: 'Link',
|
||||
target: 'Tax',
|
||||
formula: (row, doc) => doc.getFrom('Item', row.item, 'tax'),
|
||||
@ -96,7 +97,7 @@ export default {
|
||||
},
|
||||
{
|
||||
fieldname: 'amount',
|
||||
label: 'Amount',
|
||||
label: t`Amount`,
|
||||
fieldtype: 'Currency',
|
||||
readOnly: 1,
|
||||
formula: (row) => row.rate.mul(row.quantity),
|
||||
@ -104,7 +105,7 @@ export default {
|
||||
},
|
||||
{
|
||||
fieldname: 'baseAmount',
|
||||
label: 'Amount (Company Currency)',
|
||||
label: t`Amount (Company Currency)`,
|
||||
fieldtype: 'Currency',
|
||||
readOnly: 1,
|
||||
formula: (row, doc) => row.amount.mul(doc.exchangeRate),
|
||||
|
@ -1,6 +1,7 @@
|
||||
import { t } from 'frappe';
|
||||
export default {
|
||||
name: 'SalesInvoiceSettings',
|
||||
label: 'SalesInvoice Settings',
|
||||
label: t`SalesInvoice Settings`,
|
||||
doctype: 'DocType',
|
||||
isSingle: 1,
|
||||
isChild: 0,
|
||||
@ -8,7 +9,7 @@ export default {
|
||||
fields: [
|
||||
{
|
||||
fieldname: 'numberSeries',
|
||||
label: 'Number Series',
|
||||
label: t`Number Series`,
|
||||
fieldtype: 'Link',
|
||||
target: 'NumberSeries',
|
||||
required: 1,
|
||||
@ -16,7 +17,7 @@ export default {
|
||||
},
|
||||
{
|
||||
fieldname: 'template',
|
||||
label: 'Template',
|
||||
label: t`Template`,
|
||||
placeholder: 'Template',
|
||||
fieldtype: 'Select',
|
||||
options: ['Basic I', 'Basic II', 'Modern'],
|
||||
@ -25,7 +26,7 @@ export default {
|
||||
},
|
||||
{
|
||||
fieldname: 'font',
|
||||
label: 'Font',
|
||||
label: t`Font`,
|
||||
placeholder: 'Font',
|
||||
fieldtype: 'Select',
|
||||
options: ['Montserrat', 'Open Sans', 'Oxygen', 'Merriweather'],
|
||||
@ -34,7 +35,7 @@ export default {
|
||||
},
|
||||
{
|
||||
fieldname: 'themeColor',
|
||||
label: 'Theme Color',
|
||||
label: t`Theme Color`,
|
||||
fieldtype: 'Data',
|
||||
required: 1,
|
||||
default: '#000000',
|
||||
|
@ -1,9 +1,10 @@
|
||||
import { t } from 'frappe';
|
||||
import model from 'frappe/model';
|
||||
import Quotation from '../Quotation/Quotation';
|
||||
|
||||
export default model.extend(Quotation, {
|
||||
name: 'SalesOrder',
|
||||
label: 'Sales Order',
|
||||
label: t`Sales Order`,
|
||||
settings: 'SalesOrderSettings',
|
||||
fields: [
|
||||
{
|
||||
|
@ -1,3 +1,4 @@
|
||||
import { t } from 'frappe';
|
||||
import { cloneDeep } from 'lodash';
|
||||
import SalesOrderItemOriginal from './SalesOrderItem';
|
||||
|
||||
@ -12,7 +13,7 @@ export default function getAugmentedSalesOrderItem({ country }) {
|
||||
...SalesOrderItem.fields,
|
||||
{
|
||||
fieldname: 'hsnCode',
|
||||
label: 'HSN/SAC',
|
||||
label: t`HSN/SAC`,
|
||||
fieldtype: 'Int',
|
||||
formula: (row, doc) => doc.getFrom('Item', row.item, 'hsnCode'),
|
||||
formulaDependsOn: ['item'],
|
||||
|
@ -1,9 +1,10 @@
|
||||
import { t } from 'frappe';
|
||||
import model from 'frappe/model';
|
||||
import QuotationSettings from '../QuotationSettings/QuotationSettings';
|
||||
|
||||
export default model.extend(QuotationSettings, {
|
||||
name: 'SalesOrderSettings',
|
||||
label: 'Sales Order Settings',
|
||||
label: t`Sales Order Settings`,
|
||||
fields: [
|
||||
{
|
||||
fieldname: 'numberSeries',
|
||||
|
@ -1,9 +1,10 @@
|
||||
import { t } from 'frappe';
|
||||
import { DateTime } from 'luxon';
|
||||
import countryList from '~/fixtures/countryInfo.json';
|
||||
|
||||
export default {
|
||||
name: 'SetupWizard',
|
||||
label: 'Setup Wizard',
|
||||
label: t`Setup Wizard`,
|
||||
naming: 'name',
|
||||
isSingle: 1,
|
||||
isChild: 0,
|
||||
@ -13,12 +14,12 @@ export default {
|
||||
fields: [
|
||||
{
|
||||
fieldname: 'companyLogo',
|
||||
label: 'Company Logo',
|
||||
label: t`Company Logo`,
|
||||
fieldtype: 'AttachImage',
|
||||
},
|
||||
{
|
||||
fieldname: 'country',
|
||||
label: 'Country',
|
||||
label: t`Country`,
|
||||
fieldtype: 'AutoComplete',
|
||||
placeholder: 'Select Country',
|
||||
required: 1,
|
||||
@ -27,7 +28,7 @@ export default {
|
||||
|
||||
{
|
||||
fieldname: 'fullname',
|
||||
label: 'Your Name',
|
||||
label: t`Your Name`,
|
||||
fieldtype: 'Data',
|
||||
placeholder: 'John Doe',
|
||||
required: 1,
|
||||
@ -35,7 +36,7 @@ export default {
|
||||
|
||||
{
|
||||
fieldname: 'email',
|
||||
label: 'Email',
|
||||
label: t`Email`,
|
||||
fieldtype: 'Data',
|
||||
placeholder: 'john@doe.com',
|
||||
required: 1,
|
||||
@ -46,7 +47,7 @@ export default {
|
||||
|
||||
{
|
||||
fieldname: 'companyName',
|
||||
label: 'Company Name',
|
||||
label: t`Company Name`,
|
||||
placeholder: 'Company Name',
|
||||
fieldtype: 'Data',
|
||||
required: 1,
|
||||
@ -54,7 +55,7 @@ export default {
|
||||
|
||||
{
|
||||
fieldname: 'bankName',
|
||||
label: 'Bank Name',
|
||||
label: t`Bank Name`,
|
||||
fieldtype: 'Data',
|
||||
placeholder: 'Prime Bank',
|
||||
required: 1,
|
||||
@ -62,7 +63,7 @@ export default {
|
||||
|
||||
{
|
||||
fieldname: 'fiscalYearStart',
|
||||
label: 'Fiscal Year Start Date',
|
||||
label: t`Fiscal Year Start Date`,
|
||||
placeholder: 'Fiscal Year Start Date',
|
||||
fieldtype: 'Date',
|
||||
formulaDependsOn: ['country'],
|
||||
@ -81,7 +82,7 @@ export default {
|
||||
|
||||
{
|
||||
fieldname: 'fiscalYearEnd',
|
||||
label: 'Fiscal Year End Date',
|
||||
label: t`Fiscal Year End Date`,
|
||||
placeholder: 'Fiscal Year End Date',
|
||||
fieldtype: 'Date',
|
||||
formulaDependsOn: ['country'],
|
||||
@ -99,7 +100,7 @@ export default {
|
||||
},
|
||||
{
|
||||
fieldname: 'currency',
|
||||
label: 'Currency',
|
||||
label: t`Currency`,
|
||||
fieldtype: 'Data',
|
||||
placeholder: 'Currency',
|
||||
formulaDependsOn: ['country'],
|
||||
@ -111,7 +112,7 @@ export default {
|
||||
},
|
||||
{
|
||||
fieldname: 'completed',
|
||||
label: 'Completed',
|
||||
label: t`Completed`,
|
||||
fieldtype: 'Check',
|
||||
readonly: 1,
|
||||
},
|
||||
|
@ -1,6 +1,7 @@
|
||||
import { t } from 'frappe';
|
||||
export default {
|
||||
name: 'Tax',
|
||||
label: 'Tax',
|
||||
label: t`Tax`,
|
||||
doctype: 'DocType',
|
||||
isSingle: 0,
|
||||
isChild: 0,
|
||||
@ -8,17 +9,17 @@ export default {
|
||||
fields: [
|
||||
{
|
||||
fieldname: 'name',
|
||||
label: 'Name',
|
||||
label: t`Name`,
|
||||
fieldtype: 'Data',
|
||||
required: 1
|
||||
required: 1,
|
||||
},
|
||||
{
|
||||
fieldname: 'details',
|
||||
label: 'Details',
|
||||
label: t`Details`,
|
||||
fieldtype: 'Table',
|
||||
childtype: 'TaxDetail',
|
||||
required: 1
|
||||
}
|
||||
required: 1,
|
||||
},
|
||||
],
|
||||
quickEditFields: ['details']
|
||||
quickEditFields: ['details'],
|
||||
};
|
||||
|
@ -1,6 +1,7 @@
|
||||
import { t } from 'frappe';
|
||||
export default {
|
||||
name: 'TaxDetail',
|
||||
label: 'Tax Detail',
|
||||
label: t`Tax Detail`,
|
||||
doctype: 'DocType',
|
||||
isSingle: 0,
|
||||
isChild: 1,
|
||||
@ -8,21 +9,18 @@ export default {
|
||||
fields: [
|
||||
{
|
||||
fieldname: 'account',
|
||||
label: 'Tax Account',
|
||||
label: t`Tax Account`,
|
||||
fieldtype: 'Link',
|
||||
target: 'Account',
|
||||
required: 1
|
||||
required: 1,
|
||||
},
|
||||
{
|
||||
fieldname: 'rate',
|
||||
label: 'Rate',
|
||||
label: t`Rate`,
|
||||
fieldtype: 'Float',
|
||||
required: 1,
|
||||
placeholder: '0%'
|
||||
}
|
||||
placeholder: '0%',
|
||||
},
|
||||
],
|
||||
tableFields: [
|
||||
'account',
|
||||
'rate'
|
||||
]
|
||||
tableFields: ['account', 'rate'],
|
||||
};
|
||||
|
@ -1,3 +1,4 @@
|
||||
import { t } from 'frappe';
|
||||
export default {
|
||||
name: 'TaxSummary',
|
||||
doctype: 'DocType',
|
||||
@ -5,26 +6,26 @@ export default {
|
||||
fields: [
|
||||
{
|
||||
fieldname: 'account',
|
||||
label: 'Tax Account',
|
||||
label: t`Tax Account`,
|
||||
fieldtype: 'Link',
|
||||
target: 'Account',
|
||||
required: 1,
|
||||
},
|
||||
{
|
||||
fieldname: 'rate',
|
||||
label: 'Rate',
|
||||
label: t`Rate`,
|
||||
fieldtype: 'Float',
|
||||
required: 1,
|
||||
},
|
||||
{
|
||||
fieldname: 'amount',
|
||||
label: 'Amount',
|
||||
label: t`Amount`,
|
||||
fieldtype: 'Currency',
|
||||
required: 1,
|
||||
},
|
||||
{
|
||||
fieldname: 'baseAmount',
|
||||
label: 'Amount (Company Currency)',
|
||||
label: t`Amount (Company Currency)`,
|
||||
fieldtype: 'Currency',
|
||||
formula: (row, doc) => row.amount.mul(doc.exchangeRate),
|
||||
readOnly: 1,
|
||||
|
@ -1,12 +1,12 @@
|
||||
import Badge from '@/components/Badge';
|
||||
import { getInvoiceStatus, openQuickEdit, routeTo } from '@/utils';
|
||||
import frappe from 'frappe';
|
||||
import frappe, { t } from 'frappe';
|
||||
import utils from '../../../accounting/utils';
|
||||
import { statusColor } from '../../../src/colors';
|
||||
|
||||
export function getStatusColumn() {
|
||||
return {
|
||||
label: 'Status',
|
||||
label: t`Status`,
|
||||
fieldname: 'status',
|
||||
fieldtype: 'Select',
|
||||
render(doc) {
|
||||
@ -23,7 +23,7 @@ export function getStatusColumn() {
|
||||
export function getActions(doctype) {
|
||||
return [
|
||||
{
|
||||
label: 'Make Payment',
|
||||
label: t`Make Payment`,
|
||||
condition: (doc) => doc.submitted && doc.outstandingAmount > 0,
|
||||
action: async function makePayment(doc) {
|
||||
let payment = await frappe.getNewDoc('Payment');
|
||||
@ -55,7 +55,7 @@ export function getActions(doctype) {
|
||||
},
|
||||
},
|
||||
{
|
||||
label: 'Print',
|
||||
label: t`Print`,
|
||||
condition: (doc) => doc.submitted,
|
||||
action(doc) {
|
||||
routeTo(`/print/${doc.doctype}/${doc.name}`);
|
||||
|
@ -1,4 +1,4 @@
|
||||
import frappe from 'frappe';
|
||||
import frappe, { t } from 'frappe';
|
||||
import getCommonExportActions from '../commonExporter';
|
||||
|
||||
export default {
|
||||
@ -10,7 +10,7 @@ export default {
|
||||
fieldname: 'toDate',
|
||||
size: 'small',
|
||||
placeholder: 'ToDate',
|
||||
label: 'To Date',
|
||||
label: t`To Date`,
|
||||
required: 1,
|
||||
default: async () => {
|
||||
return (await frappe.getSingle('AccountingSettings')).fiscalYearEnd;
|
||||
@ -21,7 +21,7 @@ export default {
|
||||
placeholder: 'Select Period',
|
||||
size: 'small',
|
||||
options: ['Monthly', 'Quarterly', 'Half Yearly', 'Yearly'],
|
||||
label: 'Periodicity',
|
||||
label: t`Periodicity`,
|
||||
fieldname: 'periodicity',
|
||||
default: 'Monthly',
|
||||
},
|
||||
@ -29,7 +29,7 @@ export default {
|
||||
actions: getCommonExportActions('balance-sheet'),
|
||||
getColumns({ data }) {
|
||||
const columns = [
|
||||
{ label: 'Account', fieldtype: 'Data', fieldname: 'account', width: 2 },
|
||||
{ label: t`Account`, fieldtype: 'Data', fieldname: 'account', width: 2 },
|
||||
];
|
||||
|
||||
if (data && data.columns) {
|
||||
|
@ -1,4 +1,5 @@
|
||||
const title = 'Bank Reconciliation';
|
||||
import { t } from 'frappe';
|
||||
import ImportWizard from '../../src/components/ImportWizart';
|
||||
import BankReconciliationImport from './BankReconciliationImport';
|
||||
|
||||
@ -11,7 +12,7 @@ export default {
|
||||
target: 'Account',
|
||||
size: 'small',
|
||||
placeholder: 'Payment Account',
|
||||
label: 'Payment Account',
|
||||
label: t`Payment Account`,
|
||||
fieldname: 'paymentAccount',
|
||||
getFilters: () => {
|
||||
return {
|
||||
@ -24,7 +25,7 @@ export default {
|
||||
fieldtype: 'Link',
|
||||
target: 'Party',
|
||||
size: 'small',
|
||||
label: 'Party',
|
||||
label: t`Party`,
|
||||
placeholder: 'Party',
|
||||
fieldname: 'party',
|
||||
},
|
||||
@ -32,20 +33,20 @@ export default {
|
||||
fieldtype: 'Date',
|
||||
size: 'small',
|
||||
placeholder: 'From Date',
|
||||
label: 'From Date',
|
||||
label: t`From Date`,
|
||||
fieldname: 'fromDate',
|
||||
},
|
||||
{
|
||||
fieldtype: 'Date',
|
||||
size: 'small',
|
||||
placeholder: 'To Date',
|
||||
label: 'To Date',
|
||||
label: t`To Date`,
|
||||
fieldname: 'toDate',
|
||||
},
|
||||
],
|
||||
actions: [
|
||||
{
|
||||
label: 'Reconcile',
|
||||
label: t`Reconcile`,
|
||||
type: 'secondary',
|
||||
condition: (report) => report.currentFilters.paymentAccount,
|
||||
action: async (report) => {
|
||||
@ -66,54 +67,54 @@ export default {
|
||||
getColumns() {
|
||||
return [
|
||||
{
|
||||
label: 'Posting Date',
|
||||
label: t`Posting Date`,
|
||||
fieldtype: 'Date',
|
||||
fieldname: 'date',
|
||||
},
|
||||
{
|
||||
label: 'Payment Account',
|
||||
label: t`Payment Account`,
|
||||
fieldtype: 'Link',
|
||||
},
|
||||
{
|
||||
label: 'Debit',
|
||||
label: t`Debit`,
|
||||
fieldtype: 'Currency',
|
||||
},
|
||||
{
|
||||
label: 'Credit',
|
||||
label: t`Credit`,
|
||||
fieldtype: 'Currency',
|
||||
},
|
||||
{
|
||||
label: 'Balance',
|
||||
label: t`Balance`,
|
||||
fieldtype: 'Currency',
|
||||
},
|
||||
{
|
||||
label: 'Ref/Cheque ID',
|
||||
label: t`Ref/Cheque ID`,
|
||||
fieldtype: 'Data',
|
||||
fieldname: 'referenceId',
|
||||
},
|
||||
{
|
||||
label: 'Clearance Date',
|
||||
label: t`Clearance Date`,
|
||||
fieldtype: 'Date',
|
||||
fieldname: 'clearanceDate',
|
||||
},
|
||||
{
|
||||
label: 'Ref. Type',
|
||||
label: t`Ref. Type`,
|
||||
fieldtype: 'Data',
|
||||
fieldname: 'referenceType',
|
||||
},
|
||||
{
|
||||
label: 'Ref. Name',
|
||||
label: t`Ref. Name`,
|
||||
fieldtype: 'Data',
|
||||
fieldname: 'referenceName',
|
||||
},
|
||||
{
|
||||
label: 'Ref. Date',
|
||||
label: t`Ref. Date`,
|
||||
fieldtype: 'Date',
|
||||
fieldname: 'referenceDate',
|
||||
},
|
||||
|
||||
{
|
||||
label: 'Party',
|
||||
label: t`Party`,
|
||||
fieldtype: 'Link',
|
||||
},
|
||||
];
|
||||
|
@ -9,14 +9,14 @@ const viewConfig = {
|
||||
{
|
||||
fieldtype: 'Select',
|
||||
options: [
|
||||
{ label: 'All References', value: 'All' },
|
||||
{ label: 'Invoices', value: 'SalesInvoice' },
|
||||
{ label: 'Bills', value: 'PurchaseInvoice' },
|
||||
{ label: 'Payment', value: 'Payment' },
|
||||
{ label: 'Journal Entry', value: 'JournalEntry' },
|
||||
{ label: t`All References`, value: 'All' },
|
||||
{ label: t`Invoices`, value: 'SalesInvoice' },
|
||||
{ label: t`Bills`, value: 'PurchaseInvoice' },
|
||||
{ label: t`Payment`, value: 'Payment' },
|
||||
{ label: t`Journal Entry`, value: 'JournalEntry' },
|
||||
],
|
||||
size: 'small',
|
||||
label: 'Reference Type',
|
||||
label: t`Reference Type`,
|
||||
fieldname: 'referenceType',
|
||||
placeholder: 'Reference Type',
|
||||
default: 'All',
|
||||
@ -26,7 +26,7 @@ const viewConfig = {
|
||||
size: 'small',
|
||||
placeholder: 'Reference Name',
|
||||
references: 'referenceType',
|
||||
label: 'Reference Name',
|
||||
label: t`Reference Name`,
|
||||
fieldname: 'referenceName',
|
||||
},
|
||||
{
|
||||
@ -34,13 +34,13 @@ const viewConfig = {
|
||||
target: 'Account',
|
||||
size: 'small',
|
||||
placeholder: 'Account',
|
||||
label: 'Account',
|
||||
label: t`Account`,
|
||||
fieldname: 'account',
|
||||
},
|
||||
{
|
||||
fieldtype: 'Link',
|
||||
target: 'Party',
|
||||
label: 'Party',
|
||||
label: t`Party`,
|
||||
size: 'small',
|
||||
placeholder: 'Party',
|
||||
fieldname: 'party',
|
||||
@ -49,21 +49,21 @@ const viewConfig = {
|
||||
fieldtype: 'Date',
|
||||
size: 'small',
|
||||
placeholder: 'From Date',
|
||||
label: 'From Date',
|
||||
label: t`From Date`,
|
||||
fieldname: 'fromDate',
|
||||
},
|
||||
{
|
||||
fieldtype: 'Date',
|
||||
size: 'small',
|
||||
placeholder: 'To Date',
|
||||
label: 'To Date',
|
||||
label: t`To Date`,
|
||||
fieldname: 'toDate',
|
||||
},
|
||||
{
|
||||
fieldtype: 'Check',
|
||||
size: 'small',
|
||||
default: 0,
|
||||
label: 'Cancelled',
|
||||
label: t`Cancelled`,
|
||||
fieldname: 'reverted',
|
||||
},
|
||||
],
|
||||
@ -72,47 +72,47 @@ const viewConfig = {
|
||||
getColumns() {
|
||||
return [
|
||||
{
|
||||
label: 'Account',
|
||||
label: t`Account`,
|
||||
fieldtype: 'Link',
|
||||
fieldname: 'account',
|
||||
width: 1.5,
|
||||
},
|
||||
{
|
||||
label: 'Date',
|
||||
label: t`Date`,
|
||||
fieldtype: 'Date',
|
||||
fieldname: 'date',
|
||||
width: 0.75,
|
||||
},
|
||||
{
|
||||
label: 'Debit',
|
||||
label: t`Debit`,
|
||||
fieldtype: 'Currency',
|
||||
fieldname: 'debit',
|
||||
width: 1.25,
|
||||
},
|
||||
{
|
||||
label: 'Credit',
|
||||
label: t`Credit`,
|
||||
fieldtype: 'Currency',
|
||||
fieldname: 'credit',
|
||||
width: 1.25,
|
||||
},
|
||||
{
|
||||
label: 'Balance',
|
||||
label: t`Balance`,
|
||||
fieldtype: 'Currency',
|
||||
fieldname: 'balance',
|
||||
width: 1.25,
|
||||
},
|
||||
{
|
||||
label: 'Reference Type',
|
||||
label: t`Reference Type`,
|
||||
fieldtype: 'Data',
|
||||
fieldname: 'referenceType',
|
||||
},
|
||||
{
|
||||
label: 'Reference Name',
|
||||
label: t`Reference Name`,
|
||||
fieldtype: 'Data',
|
||||
fieldname: 'referenceName',
|
||||
},
|
||||
{
|
||||
label: 'Party',
|
||||
label: t`Party`,
|
||||
fieldtype: 'Link',
|
||||
fieldname: 'party',
|
||||
component(cellValue) {
|
||||
|
@ -1,3 +1,4 @@
|
||||
import { t } from 'frappe';
|
||||
import { DateTime } from 'luxon';
|
||||
import { stateCodeMap } from '../../accounting/gst';
|
||||
import { titleCase } from '../../src/utils';
|
||||
@ -8,7 +9,7 @@ export default {
|
||||
filterFields: [
|
||||
{
|
||||
fieldtype: 'AutoComplete',
|
||||
label: 'Place',
|
||||
label: t`Place`,
|
||||
size: 'small',
|
||||
placeholder: 'Place',
|
||||
fieldname: 'place',
|
||||
@ -16,7 +17,7 @@ export default {
|
||||
},
|
||||
{
|
||||
fieldtype: 'Date',
|
||||
label: 'From Date',
|
||||
label: t`From Date`,
|
||||
size: 'small',
|
||||
placeholder: 'From Date',
|
||||
fieldname: 'fromDate',
|
||||
@ -24,7 +25,7 @@ export default {
|
||||
},
|
||||
{
|
||||
fieldtype: 'Date',
|
||||
label: 'To Date',
|
||||
label: t`To Date`,
|
||||
size: 'small',
|
||||
placeholder: 'To Date',
|
||||
fieldname: 'toDate',
|
||||
@ -34,59 +35,59 @@ export default {
|
||||
getColumns({ filters }) {
|
||||
const columns = [
|
||||
{
|
||||
label: 'Party',
|
||||
label: t`Party`,
|
||||
fieldtype: 'Data',
|
||||
fieldname: 'partyName',
|
||||
width: 1.5,
|
||||
},
|
||||
{
|
||||
label: 'Invoice No.',
|
||||
label: t`Invoice No.`,
|
||||
fieldname: 'invNo',
|
||||
fieldtype: 'Data',
|
||||
},
|
||||
{
|
||||
label: 'Invoice Value',
|
||||
label: t`Invoice Value`,
|
||||
fieldname: 'invAmt',
|
||||
fieldtype: 'Currency',
|
||||
},
|
||||
{
|
||||
label: 'Invoice Date',
|
||||
label: t`Invoice Date`,
|
||||
fieldname: 'invDate',
|
||||
fieldtype: 'Date',
|
||||
},
|
||||
{
|
||||
label: 'Place of supply',
|
||||
label: t`Place of supply`,
|
||||
fieldname: 'place',
|
||||
fieldtype: 'Data',
|
||||
},
|
||||
{
|
||||
label: 'Rate',
|
||||
label: t`Rate`,
|
||||
fieldname: 'rate',
|
||||
fieldtype: 'Data',
|
||||
width: 0.5,
|
||||
},
|
||||
{
|
||||
label: 'Taxable Value',
|
||||
label: t`Taxable Value`,
|
||||
fieldname: 'taxVal',
|
||||
fieldtype: 'Currency',
|
||||
},
|
||||
{
|
||||
label: 'Reverse Chrg.',
|
||||
label: t`Reverse Chrg.`,
|
||||
fieldname: 'reverseCharge',
|
||||
fieldtype: 'Data',
|
||||
},
|
||||
{
|
||||
label: 'Intergrated Tax',
|
||||
label: t`Intergrated Tax`,
|
||||
fieldname: 'igstAmt',
|
||||
fieldtype: 'Currency',
|
||||
},
|
||||
{
|
||||
label: 'Central Tax',
|
||||
label: t`Central Tax`,
|
||||
fieldname: 'cgstAmt',
|
||||
fieldtype: 'Currency',
|
||||
},
|
||||
{
|
||||
label: 'State Tax',
|
||||
label: t`State Tax`,
|
||||
fieldname: 'sgstAmt',
|
||||
fieldtype: 'Currency',
|
||||
},
|
||||
@ -95,7 +96,7 @@ export default {
|
||||
const transferType = filters.transferType || 'B2B';
|
||||
if (transferType === 'B2B') {
|
||||
columns.unshift({
|
||||
label: 'GSTIN No.',
|
||||
label: t`GSTIN No.`,
|
||||
fieldname: 'gstin',
|
||||
fieldtype: 'Data',
|
||||
width: 1.5,
|
||||
|
@ -1,6 +1,7 @@
|
||||
const title = 'GSTR 1';
|
||||
import { t } from 'frappe';
|
||||
import { generateGstr1Csv, generateGstr1Json } from '../../accounting/gst';
|
||||
import baseConfig from './BaseViewConfig';
|
||||
import { generateGstr1Json, generateGstr1Csv } from '../../accounting/gst';
|
||||
|
||||
const transferTypeMap = {
|
||||
B2B: 'B2B',
|
||||
@ -11,7 +12,7 @@ const transferTypeMap = {
|
||||
|
||||
const transferType = {
|
||||
fieldtype: 'Select',
|
||||
label: 'Transfer Type',
|
||||
label: t`Transfer Type`,
|
||||
placeholder: 'Transfer Type',
|
||||
fieldname: 'transferType',
|
||||
options: Object.keys(transferTypeMap),
|
||||
@ -23,7 +24,7 @@ const transferType = {
|
||||
const actions = [
|
||||
{
|
||||
group: 'Export',
|
||||
label: 'JSON',
|
||||
label: t`JSON`,
|
||||
type: 'primary',
|
||||
action: async (report, filters) => {
|
||||
generateGstr1Json(report, filters);
|
||||
@ -31,13 +32,13 @@ const actions = [
|
||||
},
|
||||
{
|
||||
group: 'Export',
|
||||
label: 'CSV',
|
||||
label: t`CSV`,
|
||||
type: 'primary',
|
||||
action: async (report, filters) => {
|
||||
generateGstr1Csv(report, filters);
|
||||
},
|
||||
},
|
||||
]
|
||||
];
|
||||
|
||||
export default {
|
||||
title: title,
|
||||
|
@ -1,6 +1,7 @@
|
||||
const title = 'GSTR 2';
|
||||
import baseConfig from './BaseViewConfig';
|
||||
import { t } from 'frappe';
|
||||
import { generateGstr2Csv } from '../../accounting/gst';
|
||||
import baseConfig from './BaseViewConfig';
|
||||
|
||||
const transferTypeMap = {
|
||||
B2B: 'B2B',
|
||||
@ -8,7 +9,7 @@ const transferTypeMap = {
|
||||
|
||||
const transferType = {
|
||||
fieldtype: 'Select',
|
||||
label: 'Transfer Type',
|
||||
label: t`Transfer Type`,
|
||||
placeholder: 'Transfer Type',
|
||||
fieldname: 'transferType',
|
||||
options: Object.keys(transferTypeMap),
|
||||
@ -20,13 +21,13 @@ const transferType = {
|
||||
const actions = [
|
||||
{
|
||||
group: 'Export',
|
||||
label: 'CSV',
|
||||
label: t`CSV`,
|
||||
type: 'primary',
|
||||
action: async (report, filters) => {
|
||||
generateGstr2Csv(report, filters);
|
||||
},
|
||||
},
|
||||
]
|
||||
];
|
||||
|
||||
export default {
|
||||
title: title,
|
||||
|
@ -1,4 +1,4 @@
|
||||
import frappe from 'frappe';
|
||||
import frappe, { t } from 'frappe';
|
||||
import getCommonExportActions from '../commonExporter';
|
||||
|
||||
const title = 'Profit and Loss';
|
||||
@ -13,7 +13,7 @@ export default {
|
||||
fieldname: 'fromDate',
|
||||
size: 'small',
|
||||
placeholder: 'From Date',
|
||||
label: 'From Date',
|
||||
label: t`From Date`,
|
||||
required: 1,
|
||||
default: async () => {
|
||||
return (await frappe.getSingle('AccountingSettings')).fiscalYearStart;
|
||||
@ -24,7 +24,7 @@ export default {
|
||||
fieldname: 'toDate',
|
||||
size: 'small',
|
||||
placeholder: 'To Date',
|
||||
label: 'To Date',
|
||||
label: t`To Date`,
|
||||
required: 1,
|
||||
default: async () => {
|
||||
return (await frappe.getSingle('AccountingSettings')).fiscalYearEnd;
|
||||
@ -35,7 +35,7 @@ export default {
|
||||
size: 'small',
|
||||
options: ['Monthly', 'Quarterly', 'Half Yearly', 'Yearly'],
|
||||
default: 'Monthly',
|
||||
label: 'Periodicity',
|
||||
label: t`Periodicity`,
|
||||
placeholder: 'Select Period...',
|
||||
fieldname: 'periodicity',
|
||||
},
|
||||
@ -43,7 +43,7 @@ export default {
|
||||
actions: getCommonExportActions('profit-and-loss'),
|
||||
getColumns({ data }) {
|
||||
const columns = [
|
||||
{ label: 'Account', fieldtype: 'Data', fieldname: 'account', width: 2 },
|
||||
{ label: t`Account`, fieldtype: 'Data', fieldname: 'account', width: 2 },
|
||||
];
|
||||
|
||||
if (data && data.columns) {
|
||||
|
@ -1,4 +1,5 @@
|
||||
const title = 'Purchase Register';
|
||||
import { t } from 'frappe';
|
||||
|
||||
export default {
|
||||
title: title,
|
||||
@ -7,7 +8,7 @@ export default {
|
||||
{
|
||||
fieldtype: 'Link',
|
||||
target: 'Party',
|
||||
label: 'Supplier Name',
|
||||
label: t`Supplier Name`,
|
||||
fieldname: 'supplier',
|
||||
size: 'small',
|
||||
placeholder: 'Supplier Name',
|
||||
@ -28,7 +29,7 @@ export default {
|
||||
fieldname: 'fromDate',
|
||||
size: 'small',
|
||||
placeholder: 'From Date',
|
||||
label: 'From Date',
|
||||
label: t`From Date`,
|
||||
required: 1,
|
||||
},
|
||||
{
|
||||
@ -36,20 +37,20 @@ export default {
|
||||
size: 'small',
|
||||
placeholder: 'To Date',
|
||||
fieldname: 'toDate',
|
||||
label: 'To Date',
|
||||
label: t`To Date`,
|
||||
required: 1,
|
||||
},
|
||||
],
|
||||
actions: [],
|
||||
getColumns() {
|
||||
return [
|
||||
{ label: 'PurchaseInvoice', fieldname: 'name' },
|
||||
{ label: 'Posting Date', fieldname: 'date' },
|
||||
{ label: 'Supplier', fieldname: 'supplier' },
|
||||
{ label: 'Payable Account', fieldname: 'account' },
|
||||
{ label: 'Net Total', fieldname: 'netTotal', fieldtype: 'Currency' },
|
||||
{ label: 'Total Tax', fieldname: 'totalTax', fieldtype: 'Currency' },
|
||||
{ label: 'Grand Total', fieldname: 'grandTotal', fieldtype: 'Currency' },
|
||||
{ label: t`PurchaseInvoice`, fieldname: 'name' },
|
||||
{ label: t`Posting Date`, fieldname: 'date' },
|
||||
{ label: t`Supplier`, fieldname: 'supplier' },
|
||||
{ label: t`Payable Account`, fieldname: 'account' },
|
||||
{ label: t`Net Total`, fieldname: 'netTotal', fieldtype: 'Currency' },
|
||||
{ label: t`Total Tax`, fieldname: 'totalTax', fieldtype: 'Currency' },
|
||||
{ label: t`Grand Total`, fieldname: 'grandTotal', fieldtype: 'Currency' },
|
||||
];
|
||||
},
|
||||
};
|
||||
|
@ -1,4 +1,5 @@
|
||||
const title = 'Sales Register';
|
||||
import { t } from 'frappe';
|
||||
|
||||
export default {
|
||||
title: title,
|
||||
@ -7,7 +8,7 @@ export default {
|
||||
{
|
||||
fieldtype: 'Link',
|
||||
target: 'Party',
|
||||
label: 'Customer Name',
|
||||
label: t`Customer Name`,
|
||||
size: 'small',
|
||||
placeholder: 'Customer Name',
|
||||
fieldname: 'customer',
|
||||
@ -28,7 +29,7 @@ export default {
|
||||
fieldname: 'fromDate',
|
||||
size: 'small',
|
||||
placeholder: 'From Date',
|
||||
label: 'From Date',
|
||||
label: t`From Date`,
|
||||
required: 1,
|
||||
},
|
||||
{
|
||||
@ -36,20 +37,20 @@ export default {
|
||||
size: 'small',
|
||||
placeholder: 'To Date',
|
||||
fieldname: 'toDate',
|
||||
label: 'To Date',
|
||||
label: t`To Date`,
|
||||
required: 1,
|
||||
},
|
||||
],
|
||||
actions: [],
|
||||
getColumns() {
|
||||
return [
|
||||
{ label: 'SalesInvoice', fieldname: 'name' },
|
||||
{ label: 'Posting Date', fieldname: 'date', fieldtype: 'Date' },
|
||||
{ label: 'Customer', fieldname: 'customer' },
|
||||
{ label: 'Receivable Account', fieldname: 'account' },
|
||||
{ label: 'Net Total', fieldname: 'netTotal', fieldtype: 'Currency' },
|
||||
{ label: 'Total Tax', fieldname: 'totalTax', fieldtype: 'Currency' },
|
||||
{ label: 'Grand Total', fieldname: 'grandTotal', fieldtype: 'Currency' },
|
||||
{ label: t`SalesInvoice`, fieldname: 'name' },
|
||||
{ label: t`Posting Date`, fieldname: 'date', fieldtype: 'Date' },
|
||||
{ label: t`Customer`, fieldname: 'customer' },
|
||||
{ label: t`Receivable Account`, fieldname: 'account' },
|
||||
{ label: t`Net Total`, fieldname: 'netTotal', fieldtype: 'Currency' },
|
||||
{ label: t`Total Tax`, fieldname: 'totalTax', fieldtype: 'Currency' },
|
||||
{ label: t`Grand Total`, fieldname: 'grandTotal', fieldtype: 'Currency' },
|
||||
];
|
||||
},
|
||||
};
|
||||
|
@ -1,4 +1,4 @@
|
||||
import frappe from 'frappe';
|
||||
import frappe, { t } from 'frappe';
|
||||
import getCommonExportActions from '../commonExporter';
|
||||
|
||||
const title = 'Trial Balance';
|
||||
@ -11,7 +11,7 @@ export default {
|
||||
{
|
||||
fieldtype: 'Date',
|
||||
fieldname: 'fromDate',
|
||||
label: 'From Date',
|
||||
label: t`From Date`,
|
||||
size: 'small',
|
||||
placeholder: 'From Date',
|
||||
required: 1,
|
||||
@ -24,7 +24,7 @@ export default {
|
||||
size: 'small',
|
||||
placeholder: 'To Date',
|
||||
fieldname: 'toDate',
|
||||
label: 'To Date',
|
||||
label: t`To Date`,
|
||||
required: 1,
|
||||
default: async () => {
|
||||
return (await frappe.getSingle('AccountingSettings')).fiscalYearEnd;
|
||||
@ -34,26 +34,26 @@ export default {
|
||||
actions: getCommonExportActions('trial-balance'),
|
||||
getColumns() {
|
||||
const columns = [
|
||||
{ label: 'Account', fieldtype: 'Data', fieldname: 'account', width: 2 },
|
||||
{ label: t`Account`, fieldtype: 'Data', fieldname: 'account', width: 2 },
|
||||
{
|
||||
label: 'Opening (Dr)',
|
||||
label: t`Opening (Dr)`,
|
||||
fieldtype: 'Currency',
|
||||
fieldname: 'openingDebit',
|
||||
},
|
||||
{
|
||||
label: 'Opening (Cr)',
|
||||
label: t`Opening (Cr)`,
|
||||
fieldtype: 'Currency',
|
||||
fieldname: 'openingCredit',
|
||||
},
|
||||
{ label: 'Debit', fieldtype: 'Currency', fieldname: 'debit' },
|
||||
{ label: 'Credit', fieldtype: 'Currency', fieldname: 'credit' },
|
||||
{ label: t`Debit`, fieldtype: 'Currency', fieldname: 'debit' },
|
||||
{ label: t`Credit`, fieldtype: 'Currency', fieldname: 'credit' },
|
||||
{
|
||||
label: 'Closing (Dr)',
|
||||
label: t`Closing (Dr)`,
|
||||
fieldtype: 'Currency',
|
||||
fieldname: 'closingDebit',
|
||||
},
|
||||
{
|
||||
label: 'Closing (Cr)',
|
||||
label: t`Closing (Cr)`,
|
||||
fieldtype: 'Currency',
|
||||
fieldname: 'closingCredit',
|
||||
},
|
||||
|
@ -4,6 +4,7 @@ import AutoComplete from './AutoComplete';
|
||||
import Badge from '@/components/Badge';
|
||||
import { openQuickEdit } from '@/utils';
|
||||
import { markRaw } from 'vue';
|
||||
import { t } from 'frappe';
|
||||
|
||||
export default {
|
||||
name: 'Link',
|
||||
@ -63,7 +64,7 @@ export default {
|
||||
},
|
||||
getCreateNewOption() {
|
||||
return {
|
||||
label: 'Create',
|
||||
label: t`Create`,
|
||||
value: 'Create',
|
||||
action: () => this.openNewDoc(),
|
||||
component: markRaw({
|
||||
|
@ -120,16 +120,17 @@ import Popover from './Popover';
|
||||
import Button from './Button';
|
||||
import Icon from './Icon';
|
||||
import FormControl from './Controls/FormControl';
|
||||
import { t } from 'frappe';
|
||||
|
||||
let conditions = [
|
||||
{ label: 'Is', value: '=' },
|
||||
{ label: 'Is Not', value: '!=' },
|
||||
{ label: 'Contains', value: 'like' },
|
||||
{ label: 'Does Not Contain', value: 'not like' },
|
||||
{ label: 'Greater Than', value: '>' },
|
||||
{ label: 'Less Than', value: '<' },
|
||||
{ label: 'Is Empty', value: 'is null' },
|
||||
{ label: 'Is Not Empty', value: 'is not null' },
|
||||
{ label: t`Is`, value: '=' },
|
||||
{ label: t`Is Not`, value: '!=' },
|
||||
{ label: t`Contains`, value: 'like' },
|
||||
{ label: t`Does Not Contain`, value: 'not like' },
|
||||
{ label: t`Greater Than`, value: '>' },
|
||||
{ label: t`Less Than`, value: '<' },
|
||||
{ label: t`Is Empty`, value: 'is null' },
|
||||
{ label: t`Is Not Empty`, value: 'is not null' },
|
||||
];
|
||||
|
||||
export default {
|
||||
|
@ -45,6 +45,7 @@ import frappe from 'frappe';
|
||||
import reports from '../../reports/view';
|
||||
import Dropdown from '@/components/Dropdown';
|
||||
import { routeTo } from '@/utils';
|
||||
import { t } from 'frappe';
|
||||
|
||||
export default {
|
||||
data() {
|
||||
@ -69,7 +70,7 @@ export default {
|
||||
});
|
||||
|
||||
if (this.suggestions.length === 0) {
|
||||
this.suggestions = [{ label: 'No results found.' }];
|
||||
this.suggestions = [{ label: t`No results found.` }];
|
||||
}
|
||||
},
|
||||
clearInput() {
|
||||
@ -116,7 +117,7 @@ export default {
|
||||
getViews() {
|
||||
return [
|
||||
{
|
||||
label: 'Chart of Accounts',
|
||||
label: t`Chart of Accounts`,
|
||||
route: '/chartOfAccounts',
|
||||
group: 'List',
|
||||
},
|
||||
|
Loading…
Reference in New Issue
Block a user