diff --git a/frappe/models/doctype/File/File.js b/frappe/models/doctype/File/File.js deleted file mode 100644 index 3f41637d..00000000 --- a/frappe/models/doctype/File/File.js +++ /dev/null @@ -1,61 +0,0 @@ -const { t } = require('frappe'); - -module.exports = { - name: 'File', - doctype: 'DocType', - isSingle: 0, - keywordFields: ['name', 'filename'], - fields: [ - { - fieldname: 'name', - label: t`File Path`, - fieldtype: 'Data', - required: 1, - }, - { - fieldname: 'filename', - label: t`File Name`, - fieldtype: 'Data', - required: 1, - }, - { - fieldname: 'mimetype', - label: t`MIME Type`, - fieldtype: 'Data', - }, - { - fieldname: 'size', - label: t`File Size`, - fieldtype: 'Int', - }, - { - fieldname: 'referenceDoctype', - label: t`Reference DocType`, - fieldtype: 'Data', - }, - { - fieldname: 'referenceName', - label: t`Reference Name`, - fieldtype: 'Data', - }, - { - fieldname: 'referenceField', - label: t`Reference Field`, - fieldtype: 'Data', - }, - ], - layout: [ - { - columns: [{ fields: ['filename'] }], - }, - { - columns: [{ fields: ['mimetype'] }, { fields: ['size'] }], - }, - { - columns: [ - { fields: ['referenceDoctype'] }, - { fields: ['referenceName'] }, - ], - }, - ], -}; diff --git a/frappe/models/doctype/PrintFormat/PrintFormat.js b/frappe/models/doctype/PrintFormat/PrintFormat.js deleted file mode 100644 index 728c9f13..00000000 --- a/frappe/models/doctype/PrintFormat/PrintFormat.js +++ /dev/null @@ -1,33 +0,0 @@ -const { t } = require('frappe'); - -module.exports = { - 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', - }, - }, - ], -}; diff --git a/frappe/models/doctype/Role/Role.js b/frappe/models/doctype/Role/Role.js deleted file mode 100644 index fc228cef..00000000 --- a/frappe/models/doctype/Role/Role.js +++ /dev/null @@ -1,17 +0,0 @@ -const { t } = require('frappe'); - -module.exports = { - name: 'Role', - doctype: 'DocType', - isSingle: 0, - isChild: 0, - keywordFields: [], - fields: [ - { - fieldname: 'name', - label: t`Name`, - fieldtype: 'Data', - required: 1, - }, - ], -}; diff --git a/frappe/models/doctype/Session/Session.js b/frappe/models/doctype/Session/Session.js deleted file mode 100644 index c5835a19..00000000 --- a/frappe/models/doctype/Session/Session.js +++ /dev/null @@ -1,23 +0,0 @@ -const { t } = require('frappe'); - -module.exports = { - 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, - }, - ], -}; diff --git a/frappe/models/doctype/ToDo/ToDo.js b/frappe/models/doctype/ToDo/ToDo.js deleted file mode 100644 index 4ea3d7ce..00000000 --- a/frappe/models/doctype/ToDo/ToDo.js +++ /dev/null @@ -1,62 +0,0 @@ -const { indicators } = require('../../../../src/colors'); -const { BLUE, GREEN } = indicators; -const { t } = require('frappe'); - -module.exports = { - name: 'ToDo', - label: t`To Do`, - naming: 'autoincrement', - isSingle: 0, - keywordFields: ['subject', 'description'], - titleField: 'subject', - indicators: { - key: 'status', - colors: { - Open: BLUE, - Closed: GREEN, - }, - }, - fields: [ - { - fieldname: 'subject', - label: t`Subject`, - placeholder: t`Subject`, - fieldtype: 'Data', - required: 1, - }, - { - fieldname: 'status', - label: t`Status`, - fieldtype: 'Select', - options: ['Open', 'Closed'], - default: 'Open', - required: 1, - }, - { - fieldname: 'description', - label: t`Description`, - fieldtype: 'Text', - }, - ], - - quickEditFields: ['status', 'description'], - - actions: [ - { - label: t`Close`, - condition: (doc) => doc.status !== 'Closed', - action: async (doc) => { - await doc.set('status', 'Closed'); - await doc.update(); - }, - }, - { - label: t`Re-Open`, - condition: (doc) => doc.status !== 'Open', - action: async (doc) => { - await doc.set('status', 'Open'); - await doc.update(); - }, - }, - ], -}; diff --git a/frappe/models/doctype/ToDo/ToDoList.js b/frappe/models/doctype/ToDo/ToDoList.js deleted file mode 100644 index 893d6475..00000000 --- a/frappe/models/doctype/ToDo/ToDoList.js +++ /dev/null @@ -1,7 +0,0 @@ -const BaseList = require('frappe/client/view/list'); - -module.exports = class ToDoList extends BaseList { - getFields(list) { - return ['name', 'subject', 'status']; - } -}; diff --git a/frappe/models/doctype/User/User.js b/frappe/models/doctype/User/User.js deleted file mode 100644 index 9553e9e9..00000000 --- a/frappe/models/doctype/User/User.js +++ /dev/null @@ -1,42 +0,0 @@ -const { t } = require('frappe'); - -module.exports = { - 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, - }, - ], -}; diff --git a/frappe/models/doctype/UserRole/UserRole.js b/frappe/models/doctype/UserRole/UserRole.js deleted file mode 100644 index 54f4e37c..00000000 --- a/frappe/models/doctype/UserRole/UserRole.js +++ /dev/null @@ -1,17 +0,0 @@ -const { t } = require('frappe'); - -module.exports = { - name: 'UserRole', - doctype: 'DocType', - isSingle: 0, - isChild: 1, - keywordFields: [], - fields: [ - { - fieldname: 'role', - label: t`Role`, - fieldtype: 'Link', - target: 'Role', - }, - ], -}; diff --git a/frappe/models/index.js b/frappe/models/index.js index f4b69e46..49fa70a0 100644 --- a/frappe/models/index.js +++ b/frappe/models/index.js @@ -1,25 +1,13 @@ -import File from './doctype/File/File.js'; import NumberSeries from './doctype/NumberSeries/NumberSeries.js'; import PatchRun from './doctype/PatchRun/PatchRun.js'; import PrintFormat from './doctype/PrintFormat/PrintFormat.js'; -import Role from './doctype/Role/Role.js'; -import Session from './doctype/Session/Session.js'; import SingleValue from './doctype/SingleValue/SingleValue.js'; import SystemSettings from './doctype/SystemSettings/SystemSettings.js'; -import ToDo from './doctype/ToDo/ToDo.js'; -import User from './doctype/User/User.js'; -import UserRole from './doctype/UserRole/UserRole.js'; export default { NumberSeries, PrintFormat, - Role, - Session, SingleValue, SystemSettings, - ToDo, - User, - UserRole, - File, PatchRun, }; diff --git a/models/doctype/Email/Email.js b/models/doctype/Email/Email.js deleted file mode 100644 index eda52895..00000000 --- a/models/doctype/Email/Email.js +++ /dev/null @@ -1,73 +0,0 @@ -import frappe, { t } from 'frappe'; - -export default { - name: 'Email', - doctype: 'DocType', - pageSettings: { - hideTitle: true, - }, - isSingle: 0, - isChild: 0, - keywordFields: ['name'], - fields: [ - { - fieldname: 'name', - label: t`name`, - fieldtype: 'Data', - required: 0, - hidden: 1, - disabled: 0, - }, - { - fieldname: 'fromEmailAddress', - label: t`From`, - fieldtype: 'Data', - required: 1, - hidden: 0, - formula: async () => { - const accountingSettings = await frappe.getDoc('AccountingSettings'); - return accountingSettings.email; - }, - disabled: 1, - }, - { - fieldname: 'toEmailAddress', - label: t`To`, - fieldtype: 'Data', - required: 1, - hidden: 0, - disabled: 0, - }, - { - fieldname: 'date', - label: t`Date`, - fieldtype: 'Datetime', - required: 0, - hidden: 0, - disabled: 1, - }, - { - fieldname: 'subject', - label: t`Subject`, - fieldtype: 'Data', - required: 0, - hidden: 0, - disabled: 0, - }, - { - fieldname: 'bodyText', - label: t`Body`, - fieldtype: 'Text', - required: 0, - hidden: 0, - disabled: 0, - }, - { - fieldname: 'filePath', - label: t`File Path`, - fieldtype: 'Text', - required: 0, - hidden: 1, - }, - ], -}; diff --git a/models/doctype/EmailAccount/EmailAccount.js b/models/doctype/EmailAccount/EmailAccount.js deleted file mode 100644 index 19859567..00000000 --- a/models/doctype/EmailAccount/EmailAccount.js +++ /dev/null @@ -1,54 +0,0 @@ -import frappe, { t } from 'frappe'; - -export default { - name: 'EmailAccount', - label: t`Email Account`, - doctype: 'DocType', - isSingle: true, - isChild: false, - keywordFields: ['email'], - fields: [ - { - fieldname: 'email', - label: t`Email`, - fieldtype: 'Data', - required: 1, - formula: async () => { - const accountingSettings = await frappe.getDoc('AccountingSettings'); - return accountingSettings.email; - }, - }, - { - fieldname: 'password', - label: t`Password`, - fieldtype: 'Password', - required: 1, - }, - { - fieldname: 'confirmPassword', - label: t`Confirm Password`, - fieldtype: 'Password', - required: 1, - }, - { - fieldname: 'smtpHost', - label: t`SMTP Host`, - fieldtype: 'Select', - options: [ - 'smtp.gmail.com', - 'smtp.mail.yahoo.com', - 'smtp-mail.outlook.com', - 'smtp.mail.me.com', - 'smtp.aol.com', - ], - default: 'smtp.gmail.com', - }, - { - fieldname: 'smtpPort', - label: t`SMTP Port`, - fieldtype: 'Select', - options: ['465', '587'], - default: '465', - }, - ], -}; diff --git a/models/doctype/Event/Event.js b/models/doctype/Event/Event.js deleted file mode 100644 index b33b511d..00000000 --- a/models/doctype/Event/Event.js +++ /dev/null @@ -1,39 +0,0 @@ -import { t } from 'frappe'; -import EventDocument from './EventDocument'; - -export default { - name: 'Event', - doctype: 'DocType', - naming: 'random', - documentClass: EventDocument, - settings: 'EventSettings', - fields: [ - { - fieldname: 'title', - label: t`Title`, - fieldtype: 'Data', - }, - { - fieldname: 'date', - label: t`Date`, - fieldtype: 'Date', - }, - { - fieldname: 'schedule', - fieldtype: 'Table', - childtype: 'EventSchedule', - label: t`Schedule`, - }, - ], - titleField: 'title', - keywordFields: [], - isSingle: 0, - listSettings: { - getFields(list) { - return ['name', 'title', 'date']; - }, - getRowHTML(list, data) { - return `
${data.title} on ${data.date}
`; - }, - }, -}; diff --git a/models/doctype/Event/EventDocument.js b/models/doctype/Event/EventDocument.js deleted file mode 100644 index c6c06908..00000000 --- a/models/doctype/Event/EventDocument.js +++ /dev/null @@ -1,7 +0,0 @@ -import Document from 'frappe/model/document'; - -export default class Event extends Document { - alertEvent() { - alert(this.title); - } -} diff --git a/models/doctype/EventSchedule/EventSchedule.js b/models/doctype/EventSchedule/EventSchedule.js deleted file mode 100644 index 8b37acc8..00000000 --- a/models/doctype/EventSchedule/EventSchedule.js +++ /dev/null @@ -1,19 +0,0 @@ -import { t } from 'frappe'; - -export default { - name: 'EventSchedule', - doctype: 'DocType', - isChild: 1, - fields: [ - { - fieldname: 'startTime', - label: t`Start Time`, - fieldtype: 'Data', - }, - { - fieldname: 'title', - label: t`Title`, - fieldtype: 'Data', - }, - ], -}; diff --git a/models/doctype/EventSettings/EventSettings.js b/models/doctype/EventSettings/EventSettings.js deleted file mode 100644 index 86df3259..00000000 --- a/models/doctype/EventSettings/EventSettings.js +++ /dev/null @@ -1,17 +0,0 @@ -import { t } from 'frappe'; - -export default { - name: 'EventSettings', - label: t`Event Settings`, - doctype: 'DocType', - isSingle: 1, - isChild: 0, - keywordFields: [], - fields: [ - { - fieldname: 'enableNotifications', - label: t`Enable Notifications`, - fieldtype: 'Check', - }, - ], -}; diff --git a/models/doctype/Fulfillment/Fulfillment.js b/models/doctype/Fulfillment/Fulfillment.js deleted file mode 100644 index 7fbb7ec2..00000000 --- a/models/doctype/Fulfillment/Fulfillment.js +++ /dev/null @@ -1,27 +0,0 @@ -import { t } from 'frappe'; -import model from 'frappe/model'; -import { DEFAULT_NUMBER_SERIES } from '../../../frappe/utils/consts'; -import Quotation from '../Quotation/Quotation'; - -export default model.extend(Quotation, { - name: 'Fulfillment', - label: t`Fulfillment`, - settings: 'FulfillmentSettings', - fields: [ - { - fieldname: 'items', - childtype: 'FulfillmentItem', - }, - { - fieldname: 'numberSeries', - label: t`Number Series`, - fieldtype: 'Link', - target: 'NumberSeries', - required: 1, - getFilters: () => { - return { referenceType: 'Fulfillment' }; - }, - default: DEFAULT_NUMBER_SERIES['FulFillment'], - }, - ], -}); diff --git a/models/doctype/FulfillmentItem/FulfillmentItem.js b/models/doctype/FulfillmentItem/FulfillmentItem.js deleted file mode 100644 index 331e19ed..00000000 --- a/models/doctype/FulfillmentItem/FulfillmentItem.js +++ /dev/null @@ -1,6 +0,0 @@ -import model from 'frappe/model'; -import QuotationItem from '../QuotationItem/QuotationItem'; - -export default model.extend(QuotationItem, { - name: 'FulfillmentItem', -}); diff --git a/models/doctype/FulfillmentItem/RegionalChanges.js b/models/doctype/FulfillmentItem/RegionalChanges.js deleted file mode 100644 index 87b0f5e8..00000000 --- a/models/doctype/FulfillmentItem/RegionalChanges.js +++ /dev/null @@ -1,25 +0,0 @@ -import { t } from 'frappe'; -import { cloneDeep } from 'lodash'; -import FulfillmentItemOriginal from './FulfillmentItem'; - -export default function getAugmentedFulfillmentItem({ country }) { - const FulfillmentItem = cloneDeep(FulfillmentItemOriginal); - if (!country) { - return FulfillmentItem; - } - - if (country === 'India') { - FulfillmentItem.fields = [ - ...FulfillmentItem.fields, - { - fieldname: 'hsnCode', - label: t`HSN/SAC`, - fieldtype: 'Int', - formula: (row, doc) => doc.getFrom('Item', row.item, 'hsnCode'), - formulaDependsOn: ['item'], - }, - ]; - } - - return FulfillmentItem; -} diff --git a/models/doctype/FulfillmentSettings/FulfillmentSettings.js b/models/doctype/FulfillmentSettings/FulfillmentSettings.js deleted file mode 100644 index a752bb7c..00000000 --- a/models/doctype/FulfillmentSettings/FulfillmentSettings.js +++ /dev/null @@ -1,9 +0,0 @@ -import { t } from 'frappe'; -import model from 'frappe/model'; -import QuotationSettings from '../QuotationSettings/QuotationSettings'; - -export default model.extend(QuotationSettings, { - name: 'FulfillmentSettings', - label: t`Fulfillment Settings`, - fields: [], -}); diff --git a/models/doctype/GSTR3B/GSTR3B.js b/models/doctype/GSTR3B/GSTR3B.js deleted file mode 100644 index 2a310e63..00000000 --- a/models/doctype/GSTR3B/GSTR3B.js +++ /dev/null @@ -1,78 +0,0 @@ -import frappe, { t } from 'frappe'; -import GSTR3B from './GSTR3BDocument.js'; - -export default { - name: 'GSTR3B', - label: t`GSTR 3B`, - doctype: 'DocType', - documentClass: GSTR3B, - print: { - printFormat: 'GSTR3B Print Format', - }, - keywordFields: ['name', 'month', 'year'], - fields: [ - { - fieldname: 'year', - label: t`Year`, - fieldtype: 'Data', - required: 1, - }, - { - fieldname: 'month', - label: t`Month`, - placeholder: t`Month`, - fieldtype: 'Select', - options: [ - 'January', - 'February', - 'March', - 'April', - 'May', - 'June', - 'July', - 'August', - 'September', - 'October', - 'November', - 'December', - ], - required: 1, - }, - { - fieldname: 'jsonData', - label: t`JSON Data`, - fieldtype: 'Code', - formula: (doc) => doc.getJson(), - required: 1, - readOnly: 1, - rows: 15, - }, - ], - layout: [ - { - columns: [{ fields: ['year', 'month', 'jsonData'] }], - }, - ], - links: [ - { - label: t`Print PDF`, - condition: (form) => !form.doc._notInserted, - action: async (form) => { - form.$router.push({ - path: `/print/GSTR3B/${form.doc.name}`, - }); - }, - }, - { - label: t`Delete`, - condition: (form) => !form.doc._notInserted, - action: async (form) => { - const doc = await frappe.getDoc('GSTR3B', form.doc.name); - await doc.delete(); - form.$router.push({ - path: `/list/GSTR3B`, - }); - }, - }, - ], -}; diff --git a/models/doctype/GSTR3B/GSTR3BDocument.js b/models/doctype/GSTR3B/GSTR3BDocument.js deleted file mode 100644 index 88cfec2c..00000000 --- a/models/doctype/GSTR3B/GSTR3BDocument.js +++ /dev/null @@ -1,150 +0,0 @@ -import frappe from 'frappe'; -import Document from 'frappe/model/document'; -import format from './GSTR3BFormat'; - -export default class GSTR3B extends Document { - async getData() { - const monthIndex = [ - 'January', - 'February', - 'March', - 'April', - 'May', - 'June', - 'July', - 'August', - 'September', - 'October', - 'November', - 'December', - ].indexOf(this.month); - const month = monthIndex + 1 > 9 ? monthIndex + 1 : `0${monthIndex + 1}`; - const lastDate = new Date(this.year, monthIndex + 1, 0).getDate(); - const filters = { - date: [ - '>=', - `${this.year}-${month}-01`, - '<=', - `${this.year}-${month}-${lastDate}`, - ], - }; - const salesInvoices = frappe.db.getAll({ - doctype: 'SalesInvoice', - filters, - fields: ['*'], - }); - const purchaseInvoices = frappe.db.getAll({ - doctype: 'PurchaseInvoice', - filters, - fields: ['*'], - }); - const [gstr1Data, gstr2Data] = await Promise.all([ - salesInvoices, - purchaseInvoices, - ]); - let gstr3bData = [[], []]; - - for (let ledgerEntry of gstr1Data) { - ledgerEntry.doctype = 'SalesInvoice'; - gstr3bData[0].push(await this.makeGSTRow(ledgerEntry)); - } - for (let ledgerEntry of gstr2Data) { - ledgerEntry.doctype = 'PurchaseInvoice'; - gstr3bData[1].push(await this.makeGSTRow(ledgerEntry)); - } - - return gstr3bData; - } - - async makeGSTRow(ledgerEntry) { - let row = {}; - ledgerEntry = await frappe.getDoc(ledgerEntry.doctype, ledgerEntry.name); - let party = await frappe.getDoc( - 'Party', - ledgerEntry.customer || ledgerEntry.supplier - ); - if (party.address) { - let addressDetails = await frappe.getDoc('Address', party.address); - row.place = addressDetails.state || ''; - } - row.gstin = party.gstin; - row.partyName = ledgerEntry.customer || ledgerEntry.supplier; - row.invNo = ledgerEntry.name; - row.invDate = ledgerEntry.date; - row.rate = 0; - row.inState = true; - row.reverseCharge = !party.gstin ? 'Y' : 'N'; - ledgerEntry.taxes.forEach((tax) => { - row.rate += tax.rate; - const taxAmt = (tax.rate * ledgerEntry.netTotal) / 100; - if (tax.account === 'IGST') row.igstAmt = taxAmt; - if (tax.account === 'IGST') row.inState = false; - if (tax.account === 'CGST') row.cgstAmt = taxAmt; - if (tax.account === 'SGST') row.sgstAmt = taxAmt; - if (tax.account === 'Nil Rated') row.nilRated = true; - if (tax.account === 'Exempt') row.exempt = true; - if (tax.account === 'Non GST') row.nonGST = true; - }); - row.invAmt = ledgerEntry.grandTotal; - row.taxVal = ledgerEntry.netTotal; - return row; - } - - async createJson(data) { - let jsonData = JSON.parse(JSON.stringify(format)); - - for (let ledgerEntry of data[0]) { - if (ledgerEntry.rate > 0) { - jsonData['sup_details']['osup_det']['samt'] += ledgerEntry.sgstAmt || 0; - jsonData['sup_details']['osup_det']['camt'] += ledgerEntry.cgstAmt || 0; - jsonData['sup_details']['osup_det']['iamt'] += ledgerEntry.igstAmt || 0; - jsonData['sup_details']['osup_det']['txval'] += ledgerEntry.taxVal; - } - if (ledgerEntry.rate === 0) { - jsonData['sup_details']['osup_zero']['txval'] += ledgerEntry.taxVal; - } - if (ledgerEntry.nilRated || ledgerEntry.exempt) { - jsonData['sup_details']['osup_nil_exmp']['txval'] += ledgerEntry.taxVal; - } - if (ledgerEntry.nonGST) { - jsonData['sup_details']['osup_nongst']['txval'] += ledgerEntry.taxVal; - } - if (!ledgerEntry.inState && !ledgerEntry.gstin) { - jsonData['inter_sup']['unreg_details'].push({ - pos: ledgerEntry.place, - txval: ledgerEntry.taxVal, - iAmt: ledgerEntry.igstAmt || 0, - }); - } - } - - for (let ledgerEntry of data[1]) { - if (ledgerEntry.reverseCharge === 'Y') { - jsonData['sup_details']['isup_rev']['samt'] += ledgerEntry.sgstAmt || 0; - jsonData['sup_details']['isup_rev']['camt'] += ledgerEntry.cgstAmt || 0; - jsonData['sup_details']['isup_rev']['iamt'] += ledgerEntry.igstAmt || 0; - jsonData['sup_details']['isup_rev']['txval'] += ledgerEntry.taxVal; - } - if (ledgerEntry.nilRated || ledgerEntry.exempt) { - jsonData['inward_sup']['isup_details'][0][ - ledgerEntry.inState ? 'intra' : 'inter' - ] += ledgerEntry.taxVal; - } - if (ledgerEntry.nonGST) { - jsonData['inward_sup']['isup_details'][0][ - ledgerEntry.inState ? 'intra' : 'inter' - ] += ledgerEntry.taxVal; - } - } - - return jsonData; - } - - async getJson() { - if (this.year && this.month) { - const data = await this.getData(); - const json = await this.createJson(data); - return JSON.stringify(json, undefined, 2); - } - } -} diff --git a/models/doctype/GSTR3B/GSTR3BFormat.js b/models/doctype/GSTR3B/GSTR3BFormat.js deleted file mode 100644 index 5281be0a..00000000 --- a/models/doctype/GSTR3B/GSTR3BFormat.js +++ /dev/null @@ -1,386 +0,0 @@ -export default { - gstin: '', - ret_period: '', - inward_sup: { - isup_details: [ - { - ty: 'GST', - intra: 0, - inter: 0 - }, - { - ty: 'NONGST', - inter: 0, - intra: 0 - } - ] - }, - sup_details: { - osup_zero: { - csamt: 0, - txval: 0, - iamt: 0 - }, - osup_nil_exmp: { - txval: 0 - }, - osup_det: { - samt: 0, - csamt: 0, - txval: 0, - camt: 0, - iamt: 0 - }, - isup_rev: { - samt: 0, - csamt: 0, - txval: 0, - camt: 0, - iamt: 0 - }, - osup_nongst: { - txval: 0 - } - }, - inter_sup: { - unreg_details: [], - comp_details: [], - uin_details: [] - }, - itc_elg: { - itc_avl: [ - { - csamt: 0, - samt: 0, - ty: 'IMPG', - camt: 0, - iamt: 0 - }, - { - csamt: 0, - samt: 0, - ty: 'IMPS', - camt: 0, - iamt: 0 - }, - { - samt: 0, - csamt: 0, - ty: 'ISRC', - camt: 0, - iamt: 0 - }, - { - ty: 'ISD', - iamt: 0, - camt: 0, - samt: 0, - csamt: 0 - }, - { - samt: 0, - csamt: 0, - ty: 'OTH', - camt: 0, - iamt: 0 - } - ], - itc_rev: [ - { - ty: 'RUL', - iamt: 0, - camt: 0, - samt: 0, - csamt: 0 - }, - { - ty: 'OTH', - iamt: 0, - camt: 0, - samt: 0, - csamt: 0 - } - ], - itc_net: { - samt: 0, - csamt: 0, - camt: 0, - iamt: 0 - }, - itc_inelg: [ - { - ty: 'RUL', - iamt: 0, - camt: 0, - samt: 0, - csamt: 0 - }, - { - ty: 'OTH', - iamt: 0, - camt: 0, - samt: 0, - csamt: 0 - } - ] - } -}; - -function generateHTML(data) { - let template = ` -
-
-

GSTR3B-Form

-
GSTIN:   ${data.gstin}
-
Period:   ${data.ret_period}
-
- -
3.1  Details of Outward Supplies and inward supplies liable to reverse charge
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
Nature Of SuppliesTotal Taxable valueIntegrated TaxCentral TaxState/UT TaxCess
(a) Outward taxable supplies(other than zero rated, nil rated and exempted${data.sup_details.osup_det.txval}${data.sup_details.osup_det.iamt}${data.sup_details.osup_det.camt}${data.sup_details.osup_det.samt}${data.sup_details.osup_det.csamt}
(b) Outward taxable supplies(zero rated)${data.sup_details.osup_zero.txval}${data.sup_details.osup_zero.iamt}${data.sup_details.osup_zero.csamt}
(b) Other outward supplies(Nil rated,Exempted)${data.sup_details.osup_nil_exmp.txval}
(d) Inward Supplies(liable to reverse charge${data.sup_details.isup_rev.txval}${data.sup_details.isup_rev.iamt}${data.sup_details.isup_rev.camt}${data.sup_details.isup_rev.samt}${data.sup_details.isup_rev.csamt}
(e) Non-GST outward supplies${data.sup_details.osup_nongst.txval}
- -
- 3.2  Of the supplies shown in 3.1 (a) above, details of inter-State supplies made to unregisterd - persons, composition taxable persons and UIN holders -
- - - - - - - - - - - - - - - -
Place Of Supply (State/UT)Total Taxable ValueAmount of Integrated Tax
Supplies made to Unregistered Persons`; - for (let row of data.inter_sup.unreg_details) { - if (row) template += row.pos + '
'; - } - template += '
'; - for (let row of data.inter_sup.unreg_details) { - if (row) template += row.txval + '
'; - } - template += '
'; - for (let row of data.inter_sup.unreg_details) { - if (row) template += row.iamt + '
'; - } - - template += - '
Supplies made to Composition Taxable Persons'; - for (let row of data.inter_sup.comp_details) { - if (row) template += row.pos + '
'; - } - template += '
'; - for (let row of data.inter_sup.comp_details) { - if (row) template += row.txval + '
'; - } - template += '
'; - for (let row of data.inter_sup.comp_details) { - if (row) template += row.iamt + '
'; - } - - template += - '
Supplies made to UIN holders'; - for (let row of data.inter_sup.uin_details) { - if (row) template += row.pos + '
'; - } - template += '
'; - for (let row of data.inter_sup.uin_details) { - if (row) template += row.txval + '
'; - } - template += '
'; - for (let row of data.inter_sup.uin_details) { - if (row) template += row.iamt + '
'; - } - - template += `
- -
4.   Eligible ITC
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
DetailsIntegrated TaxCentral TaxState/UT taxCess
(A) ITC Available (whether in full op part)
  (1) Import of goods ${data.itc_elg.itc_avl[0].iamt}${data.itc_elg.itc_avl[0].camt}${data.itc_elg.itc_avl[0].samt}${data.itc_elg.itc_avl[0].csamt}
  (2) Import of services${data.itc_elg.itc_avl[1].iamt}${data.itc_elg.itc_avl[1].camt}${data.itc_elg.itc_avl[1].samt}${data.itc_elg.itc_avl[1].csamt}
  (3) Inward supplies liable to reverse charge (other than 1 & 2 above)${data.itc_elg.itc_avl[2].iamt}${data.itc_elg.itc_avl[2].camt}${data.itc_elg.itc_avl[2].samt}${data.itc_elg.itc_avl[2].csamt}
  (4) Inward supplies from ISD${data.itc_elg.itc_avl[3].iamt}${data.itc_elg.itc_avl[3].camt}${data.itc_elg.itc_avl[3].samt}${data.itc_elg.itc_avl[3].csamt}
  (5) All other ITC${data.itc_elg.itc_avl[4].iamt}${data.itc_elg.itc_avl[4].camt}${data.itc_elg.itc_avl[4].samt}${data.itc_elg.itc_avl[4].csamt}
(B) ITC Reversed
  (1) As per rules 42 & 43 of CGST Rules${data.itc_elg.itc_rev[0].iamt}${data.itc_elg.itc_rev[0].camt}${data.itc_elg.itc_rev[0].samt}${data.itc_elg.itc_rev[0].csamt}
  (2) Others${data.itc_elg.itc_rev[1].iamt}${data.itc_elg.itc_rev[1].camt}${data.itc_elg.itc_rev[1].samt}${data.itc_elg.itc_rev[1].csamt}
(C) Net ITC Available(A) - (B)${data.itc_elg.itc_net.iamt}${data.itc_elg.itc_net.camt}${data.itc_elg.itc_net.samt}${data.itc_elg.itc_net.csamt}
(D) Ineligible ITC
  (1) As per section 17(5)${data.itc_elg.itc_inelg[0].iamt}${data.itc_elg.itc_inelg[0].camt}${data.itc_elg.itc_inelg[0].samt}${data.itc_elg.itc_inelg[0].csamt}
  (2) Others${data.itc_elg.itc_inelg[1].iamt}${data.itc_elg.itc_inelg[1].camt}${data.itc_elg.itc_inelg[1].samt}${data.itc_elg.itc_inelg[1].csamt}
- -
5.    Values of exempt, nil rated and non-GST inward supplies
- - - - - - - - - - - - - - - - - - - - -
Nature of SuppliesInter-State SuppliesIntra-State Supplies
From a supplier under composition scheme, Exempt and Nil rated${data.inward_sup.isup_details[0].inter}${data.inward_sup.isup_details[0].intra}
Non GST Inward Supplies${data.inward_sup.isup_details[1].inter}${data.inward_sup.isup_details[1].intra}
-
`; - - return template; -} \ No newline at end of file diff --git a/models/doctype/GSTR3B/GSTR3BList.js b/models/doctype/GSTR3B/GSTR3BList.js deleted file mode 100644 index e6e9f297..00000000 --- a/models/doctype/GSTR3B/GSTR3BList.js +++ /dev/null @@ -1,7 +0,0 @@ -import { t } from 'frappe'; - -export default { - doctype: 'GSTR3B', - title: t`GSTR 3B Report`, - columns: ['year', 'month'], -}; diff --git a/models/doctype/GSTR3B/GSTR3BPrintView.vue b/models/doctype/GSTR3B/GSTR3BPrintView.vue deleted file mode 100644 index c0f94e76..00000000 --- a/models/doctype/GSTR3B/GSTR3BPrintView.vue +++ /dev/null @@ -1,367 +0,0 @@ - - - - - diff --git a/models/doctype/GSTR3B/GSTR3BServer.js b/models/doctype/GSTR3B/GSTR3BServer.js deleted file mode 100644 index fe7c006f..00000000 --- a/models/doctype/GSTR3B/GSTR3BServer.js +++ /dev/null @@ -1,12 +0,0 @@ -import GSTR3B from './GSTR3BDocument'; - -export default class GSTR3BServer extends GSTR3B { - async validate() { - if (this.month.length === 0 || this.year.length != 4) { - throw new Error('Month or Year is not valid'); - } - } - async beforeInsert() { - this.name = `${this.doctype} Report ${this.month} ${this.year}`; - } -}; diff --git a/models/doctype/PurchaseOrder/PurchaseOrder.js b/models/doctype/PurchaseOrder/PurchaseOrder.js deleted file mode 100644 index a47960d9..00000000 --- a/models/doctype/PurchaseOrder/PurchaseOrder.js +++ /dev/null @@ -1,33 +0,0 @@ -import { t } from 'frappe'; -import model from 'frappe/model'; -import { DEFAULT_NUMBER_SERIES } from '../../../frappe/utils/consts'; -import PurchaseInvoice from '../PurchaseInvoice/PurchaseInvoice'; - -export default model.extend( - PurchaseInvoice, - { - name: 'PurchaseOrder', - label: t`Purchase Order`, - settings: 'PurchaseOrderSettings', - fields: [ - { - fieldname: 'items', - childtype: 'PurchaseOrderItem', - }, - { - fieldname: 'numberSeries', - label: t`Number Series`, - fieldtype: 'Link', - target: 'NumberSeries', - required: 1, - getFilters: () => { - return { referenceType: 'PurchaseOrder' }; - }, - default: DEFAULT_NUMBER_SERIES['PurchaseOrder'], - }, - ], - }, - { - skipFields: ['account'], - } -); diff --git a/models/doctype/PurchaseOrderItem/PurchaseOrderItem.js b/models/doctype/PurchaseOrderItem/PurchaseOrderItem.js deleted file mode 100644 index 215580f7..00000000 --- a/models/doctype/PurchaseOrderItem/PurchaseOrderItem.js +++ /dev/null @@ -1,6 +0,0 @@ -import model from 'frappe/model'; -import PurchaseInvoiceItem from '../PurchaseInvoiceItem/PurchaseInvoiceItem'; - -export default model.extend(PurchaseInvoiceItem, { - name: 'PurchaseOrderItem', -}); diff --git a/models/doctype/PurchaseOrderSettings/PurchaseOrderSettings.js b/models/doctype/PurchaseOrderSettings/PurchaseOrderSettings.js deleted file mode 100644 index 4aab3f3d..00000000 --- a/models/doctype/PurchaseOrderSettings/PurchaseOrderSettings.js +++ /dev/null @@ -1,9 +0,0 @@ -import { t } from 'frappe'; -import model from 'frappe/model'; -import PurchaseInvoiceSettings from '../PurchaseInvoiceSettings/PurchaseInvoiceSettings'; - -export default model.extend(PurchaseInvoiceSettings, { - name: 'PurchaseOrderSettings', - label: t`Purchase Order Settings`, - fields: [], -}); diff --git a/models/doctype/PurchaseReceipt/PurchaseReceipt.js b/models/doctype/PurchaseReceipt/PurchaseReceipt.js deleted file mode 100644 index d3c31ee7..00000000 --- a/models/doctype/PurchaseReceipt/PurchaseReceipt.js +++ /dev/null @@ -1,27 +0,0 @@ -import { t } from 'frappe'; -import model from 'frappe/model'; -import { DEFAULT_NUMBER_SERIES } from '../../../frappe/utils/consts'; -import PurchaseOrder from '../PurchaseOrder/PurchaseOrder'; - -export default model.extend(PurchaseOrder, { - name: 'PurchaseReceipt', - label: t`Purchase Receipt`, - settings: 'PurchaseReceiptSettings', - fields: [ - { - fieldname: 'items', - childtype: 'PurchaseReceiptItem', - }, - { - fieldname: 'numberSeries', - label: t`Number Series`, - fieldtype: 'Link', - target: 'NumberSeries', - required: 1, - getFilters: () => { - return { referenceType: 'PurchaseReceipt' }; - }, - default: DEFAULT_NUMBER_SERIES['PurchaseReceipt'], - }, - ], -}); diff --git a/models/doctype/PurchaseReceiptItem/PurchaseReceiptItem.js b/models/doctype/PurchaseReceiptItem/PurchaseReceiptItem.js deleted file mode 100644 index 15eef59b..00000000 --- a/models/doctype/PurchaseReceiptItem/PurchaseReceiptItem.js +++ /dev/null @@ -1,21 +0,0 @@ -import { t } from 'frappe'; -import model from 'frappe/model'; -import PurchaseOrderItem from '../PurchaseOrderItem/PurchaseOrderItem'; - -export default model.extend( - PurchaseOrderItem, - { - name: 'PurchaseReceiptItem', - fields: [ - { - fieldname: 'acceptedQuantity', - label: t`Accepted Quantity`, - fieldtype: 'Float', - required: 1, - }, - ], - }, - { - skipFields: ['expenseAccount'], - } -); diff --git a/models/doctype/PurchaseReceiptSettings/PurchaseReceiptSettings.js b/models/doctype/PurchaseReceiptSettings/PurchaseReceiptSettings.js deleted file mode 100644 index b2c441c2..00000000 --- a/models/doctype/PurchaseReceiptSettings/PurchaseReceiptSettings.js +++ /dev/null @@ -1,9 +0,0 @@ -import { t } from 'frappe'; -import model from 'frappe/model'; -import PurchaseOrderSettings from '../PurchaseOrderSettings/PurchaseOrderSettings'; - -export default model.extend(PurchaseOrderSettings, { - name: 'PurchaseReceiptSettings', - label: t`Purchase Receipt Settings`, - fields: [], -}); diff --git a/models/doctype/Quotation/Quotation.js b/models/doctype/Quotation/Quotation.js deleted file mode 100644 index d2401a63..00000000 --- a/models/doctype/Quotation/Quotation.js +++ /dev/null @@ -1,37 +0,0 @@ -import { t } from 'frappe'; -import model from 'frappe/model'; -import { DEFAULT_NUMBER_SERIES } from '../../../frappe/utils/consts'; -import SalesInvoice from '../SalesInvoice/SalesInvoice'; - -const Quotation = model.extend( - SalesInvoice, - { - name: 'Quotation', - label: t`Quotation`, - settings: 'QuotationSettings', - fields: [ - { - fieldname: 'items', - childtype: 'QuotationItem', - }, - { - fieldname: 'numberSeries', - label: t`Number Series`, - fieldtype: 'Link', - target: 'NumberSeries', - required: 1, - getFilters: () => { - return { referenceType: 'Quotation' }; - }, - default: DEFAULT_NUMBER_SERIES['Quotation'], - }, - ], - links: [], - }, - { - skipFields: ['account'], - overrideProps: ['links'], - } -); - -export default Quotation; diff --git a/models/doctype/Quotation/QuotationDocument.js b/models/doctype/Quotation/QuotationDocument.js deleted file mode 100644 index 2e1f3484..00000000 --- a/models/doctype/Quotation/QuotationDocument.js +++ /dev/null @@ -1,3 +0,0 @@ -import SalesInvoiceDocument from '../SalesInvoice/SalesInvoiceDocument'; - -export default class Quotation extends SalesInvoiceDocument {}; diff --git a/models/doctype/QuotationItem/QuotationItem.js b/models/doctype/QuotationItem/QuotationItem.js deleted file mode 100644 index db71423d..00000000 --- a/models/doctype/QuotationItem/QuotationItem.js +++ /dev/null @@ -1,6 +0,0 @@ -import model from 'frappe/model'; -import SalesInvoiceItem from '../SalesInvoiceItem/SalesInvoiceItem'; - -export default model.extend(SalesInvoiceItem, { - name: 'QuotationItem', -}); diff --git a/models/doctype/QuotationItem/RegionalChanges.js b/models/doctype/QuotationItem/RegionalChanges.js deleted file mode 100644 index 8a163ee5..00000000 --- a/models/doctype/QuotationItem/RegionalChanges.js +++ /dev/null @@ -1,25 +0,0 @@ -import { t } from 'frappe'; -import { cloneDeep } from 'lodash'; -import QuotationItemOriginal from './QuotationItem'; - -export default function getAugmentedQuotationItem({ country }) { - const QuotationItem = cloneDeep(QuotationItemOriginal); - if (!country) { - return QuotationItem; - } - - if (country === 'India') { - QuotationItem.fields = [ - ...QuotationItem.fields, - { - fieldname: 'hsnCode', - label: t`HSN/SAC`, - fieldtype: 'Int', - formula: (row, doc) => doc.getFrom('Item', row.item, 'hsnCode'), - formulaDependsOn: ['item'], - }, - ]; - } - - return QuotationItem; -} diff --git a/models/doctype/QuotationSettings/QuotationSettings.js b/models/doctype/QuotationSettings/QuotationSettings.js deleted file mode 100644 index 2128dbf1..00000000 --- a/models/doctype/QuotationSettings/QuotationSettings.js +++ /dev/null @@ -1,9 +0,0 @@ -import { t } from 'frappe'; -import model from 'frappe/model'; -import SalesInvoiceSettings from '../SalesInvoiceSettings/SalesInvoiceSettings'; - -export default model.extend(SalesInvoiceSettings, { - name: 'QuotationSettings', - label: t`Quotation Settings`, - fields: [], -}); diff --git a/models/doctype/SalesOrder/SalesOrder.js b/models/doctype/SalesOrder/SalesOrder.js deleted file mode 100644 index b8ed2eb6..00000000 --- a/models/doctype/SalesOrder/SalesOrder.js +++ /dev/null @@ -1,27 +0,0 @@ -import { t } from 'frappe'; -import model from 'frappe/model'; -import { DEFAULT_NUMBER_SERIES } from '../../../frappe/utils/consts'; -import Quotation from '../Quotation/Quotation'; - -export default model.extend(Quotation, { - name: 'SalesOrder', - label: t`Sales Order`, - settings: 'SalesOrderSettings', - fields: [ - { - fieldname: 'items', - childtype: 'SalesOrderItem', - }, - { - fieldname: 'numberSeries', - label: t`Number Series`, - fieldtype: 'Link', - target: 'NumberSeries', - required: 1, - getFilters: () => { - return { referenceType: 'SalesOrder' }; - }, - default: DEFAULT_NUMBER_SERIES['SalesOrder'], - }, - ], -}); diff --git a/models/doctype/SalesOrderItem/RegionalChanges.js b/models/doctype/SalesOrderItem/RegionalChanges.js deleted file mode 100644 index 13e59fb0..00000000 --- a/models/doctype/SalesOrderItem/RegionalChanges.js +++ /dev/null @@ -1,25 +0,0 @@ -import { t } from 'frappe'; -import { cloneDeep } from 'lodash'; -import SalesOrderItemOriginal from './SalesOrderItem'; - -export default function getAugmentedSalesOrderItem({ country }) { - const SalesOrderItem = cloneDeep(SalesOrderItemOriginal); - if (!country) { - return SalesOrderItem; - } - - if (country === 'India') { - SalesOrderItem.fields = [ - ...SalesOrderItem.fields, - { - fieldname: 'hsnCode', - label: t`HSN/SAC`, - fieldtype: 'Int', - formula: (row, doc) => doc.getFrom('Item', row.item, 'hsnCode'), - formulaDependsOn: ['item'], - }, - ]; - } - - return SalesOrderItem; -} diff --git a/models/doctype/SalesOrderItem/SalesOrderItem.js b/models/doctype/SalesOrderItem/SalesOrderItem.js deleted file mode 100644 index 9a498fc5..00000000 --- a/models/doctype/SalesOrderItem/SalesOrderItem.js +++ /dev/null @@ -1,6 +0,0 @@ -import model from 'frappe/model'; -import QuotationItem from '../QuotationItem/QuotationItem'; - -export default model.extend(QuotationItem, { - name: 'SalesOrderItem', -}); diff --git a/models/doctype/SalesOrderSettings/SalesOrderSettings.js b/models/doctype/SalesOrderSettings/SalesOrderSettings.js deleted file mode 100644 index 755f2c91..00000000 --- a/models/doctype/SalesOrderSettings/SalesOrderSettings.js +++ /dev/null @@ -1,9 +0,0 @@ -import { t } from 'frappe'; -import model from 'frappe/model'; -import QuotationSettings from '../QuotationSettings/QuotationSettings'; - -export default model.extend(QuotationSettings, { - name: 'SalesOrderSettings', - label: t`Sales Order Settings`, - fields: [], -}); diff --git a/models/index.js b/models/index.js index 0288d118..3ddd0c4f 100644 --- a/models/index.js +++ b/models/index.js @@ -1,54 +1,33 @@ -import SetupWizard from './doctype/SetupWizard/SetupWizard.js'; -import Currency from './doctype/Currency/Currency.js'; -import Color from './doctype/Color/Color.js'; import Account from './doctype/Account/Account.js'; -import AccountingSettings from './doctype/AccountingSettings/AccountingSettings.js'; -import CompanySettings from './doctype/CompanySettings/CompanySettings.js'; import AccountingLedgerEntry from './doctype/AccountingLedgerEntry/AccountingLedgerEntry.js'; -import Party from './doctype/Party/Party.js'; +import AccountingSettings from './doctype/AccountingSettings/AccountingSettings.js'; +import Address from './doctype/Address/Address.js'; +import Color from './doctype/Color/Color.js'; +import CompanySettings from './doctype/CompanySettings/CompanySettings.js'; +import Contact from './doctype/Contact/Contact.js'; +import Currency from './doctype/Currency/Currency.js'; +import GetStarted from './doctype/GetStarted/GetStarted.js'; +import Item from './doctype/Item/Item.js'; +import JournalEntry from './doctype/JournalEntry/JournalEntry.js'; +import JournalEntryAccount from './doctype/JournalEntryAccount/JournalEntryAccount.js'; +import JournalEntrySettings from './doctype/JournalEntrySettings/JournalEntrySettings.js'; import Customer from './doctype/Party/Customer.js'; +import Party from './doctype/Party/Party.js'; import Supplier from './doctype/Party/Supplier.js'; import Payment from './doctype/Payment/Payment.js'; import PaymentFor from './doctype/PaymentFor/PaymentFor.js'; import PaymentSettings from './doctype/PaymentSettings/PaymentSettings.js'; -import Item from './doctype/Item/Item.js'; -import SalesInvoice from './doctype/SalesInvoice/SalesInvoice.js'; -import SalesInvoiceItem from './doctype/SalesInvoiceItem/SalesInvoiceItem.js'; -import SalesInvoiceSettings from './doctype/SalesInvoiceSettings/SalesInvoiceSettings.js'; +import PrintSettings from './doctype/PrintSettings/PrintSettings.js'; import PurchaseInvoice from './doctype/PurchaseInvoice/PurchaseInvoice.js'; import PurchaseInvoiceItem from './doctype/PurchaseInvoiceItem/PurchaseInvoiceItem.js'; import PurchaseInvoiceSettings from './doctype/PurchaseInvoiceSettings/PurchaseInvoiceSettings.js'; +import SalesInvoice from './doctype/SalesInvoice/SalesInvoice.js'; +import SalesInvoiceItem from './doctype/SalesInvoiceItem/SalesInvoiceItem.js'; +import SalesInvoiceSettings from './doctype/SalesInvoiceSettings/SalesInvoiceSettings.js'; +import SetupWizard from './doctype/SetupWizard/SetupWizard.js'; import Tax from './doctype/Tax/Tax.js'; import TaxDetail from './doctype/TaxDetail/TaxDetail.js'; import TaxSummary from './doctype/TaxSummary/TaxSummary.js'; -import GSTR3B from './doctype/GSTR3B/GSTR3B.js'; -import Address from './doctype/Address/Address.js'; -import Contact from './doctype/Contact/Contact.js'; -import JournalEntry from './doctype/JournalEntry/JournalEntry.js'; -import JournalEntryAccount from './doctype/JournalEntryAccount/JournalEntryAccount.js'; -import JournalEntrySettings from './doctype/JournalEntrySettings/JournalEntrySettings.js'; -import Quotation from './doctype/Quotation/Quotation.js'; -import QuotationItem from './doctype/QuotationItem/QuotationItem.js'; -import QuotationSettings from './doctype/QuotationSettings/QuotationSettings.js'; -import SalesOrder from './doctype/SalesOrder/SalesOrder.js'; -import SalesOrderItem from './doctype/SalesOrderItem/SalesOrderItem.js'; -import SalesOrderSettings from './doctype/SalesOrderSettings/SalesOrderSettings.js'; -import Fulfillment from './doctype/Fulfillment/Fulfillment.js'; -import FulfillmentItem from './doctype/FulfillmentItem/FulfillmentItem.js'; -import FulfillmentSettings from './doctype/FulfillmentSettings/FulfillmentSettings.js'; -import PurchaseOrder from './doctype/PurchaseOrder/PurchaseOrder.js'; -import PurchaseOrderItem from './doctype/PurchaseOrderItem/PurchaseOrderItem.js'; -import PurchaseOrderSettings from './doctype/PurchaseOrderSettings/PurchaseOrderSettings.js'; -import PurchaseReceipt from './doctype/PurchaseReceipt/PurchaseReceipt.js'; -import PurchaseReceiptItem from './doctype/PurchaseReceiptItem/PurchaseReceiptItem.js'; -import PurchaseReceiptSettings from './doctype/PurchaseReceiptSettings/PurchaseReceiptSettings.js'; -import Event from './doctype/Event/Event.js'; -import EventSchedule from './doctype/EventSchedule/EventSchedule.js'; -import EventSettings from './doctype/EventSettings/EventSettings.js'; -import Email from './doctype/Email/Email.js'; -import EmailAccount from './doctype/EmailAccount/EmailAccount.js'; -import PrintSettings from './doctype/PrintSettings/PrintSettings.js'; -import GetStarted from './doctype/GetStarted/GetStarted.js'; export default { SetupWizard, @@ -74,32 +53,11 @@ export default { Tax, TaxDetail, TaxSummary, - GSTR3B, Address, Contact, JournalEntry, JournalEntryAccount, JournalEntrySettings, - Quotation, - QuotationItem, - QuotationSettings, - SalesOrder, - SalesOrderItem, - SalesOrderSettings, - Fulfillment, - FulfillmentItem, - FulfillmentSettings, - PurchaseOrder, - PurchaseOrderItem, - PurchaseOrderSettings, - PurchaseReceipt, - PurchaseReceiptItem, - PurchaseReceiptSettings, - Event, - EventSchedule, - EventSettings, - Email, - EmailAccount, PrintSettings, GetStarted, }; diff --git a/models/types.ts b/models/types.ts index 72f59c63..296d171f 100644 --- a/models/types.ts +++ b/models/types.ts @@ -22,7 +22,6 @@ export enum DoctypeName { Tax = 'Tax', TaxDetail = 'TaxDetail', TaxSummary = 'TaxSummary', - GSTR3B = 'GSTR3B', Address = 'Address', Contact = 'Contact', JournalEntry = 'JournalEntry', diff --git a/reports/GoodsAndServiceTax/BaseViewConfig.js b/reports/GoodsAndServiceTax/BaseViewConfig.js index acc07c86..54e297e9 100644 --- a/reports/GoodsAndServiceTax/BaseViewConfig.js +++ b/reports/GoodsAndServiceTax/BaseViewConfig.js @@ -3,8 +3,6 @@ import { DateTime } from 'luxon'; import { stateCodeMap } from '../../accounting/gst'; import { titleCase } from '../../src/utils'; -const stateList = Object.keys(stateCodeMap).map(titleCase).sort(); - export default { filterFields: [ { @@ -13,7 +11,7 @@ export default { size: 'small', placeholder: t`Place`, fieldname: 'place', - getList: () => stateList, + getList: () => Object.keys(stateCodeMap).map(titleCase).sort(), }, { fieldtype: 'Date', diff --git a/reports/view.js b/reports/view.js index c4dade3d..d73df6e1 100644 --- a/reports/view.js +++ b/reports/view.js @@ -1,21 +1,19 @@ -import GeneralLedgerViewConfig from './GeneralLedger/viewConfig'; -import SalesRegisterViewConfig from './SalesRegister/viewConfig'; -import PurchaseRegisterViewConfig from './PurchaseRegister/viewConfig'; import BalanceSheetViewConfig from './BalanceSheet/viewConfig'; -import ProfitAndLossViewConfig from './ProfitAndLoss/viewConfig'; -import TrialBalanceViewConfig from './TrialBalance/viewConfig'; -// import BankReconciliationViewConfig from './BankReconciliation/viewConfig'; +import GeneralLedgerViewConfig from './GeneralLedger/viewConfig'; import GoodsAndServiceTaxGSTR1View from './GoodsAndServiceTax/GSTR1View'; import GoodsAndServiceTaxGSTR2View from './GoodsAndServiceTax/GSTR2View'; +import ProfitAndLossViewConfig from './ProfitAndLoss/viewConfig'; +import PurchaseRegisterViewConfig from './PurchaseRegister/viewConfig'; +import SalesRegisterViewConfig from './SalesRegister/viewConfig'; +import TrialBalanceViewConfig from './TrialBalance/viewConfig'; export default { - 'general-ledger' : GeneralLedgerViewConfig, - 'sales-register' : SalesRegisterViewConfig, - 'purchase-register' : PurchaseRegisterViewConfig, - 'balance-sheet' : BalanceSheetViewConfig, - 'profit-and-loss' : ProfitAndLossViewConfig, - 'trial-balance' : TrialBalanceViewConfig, - // 'bank-reconciliation' : BankReconciliationViewConfig, - 'gstr-1' : GoodsAndServiceTaxGSTR1View, - 'gstr-2' : GoodsAndServiceTaxGSTR2View, + 'general-ledger': GeneralLedgerViewConfig, + 'sales-register': SalesRegisterViewConfig, + 'purchase-register': PurchaseRegisterViewConfig, + 'balance-sheet': BalanceSheetViewConfig, + 'profit-and-loss': ProfitAndLossViewConfig, + 'trial-balance': TrialBalanceViewConfig, + 'gstr-1': GoodsAndServiceTaxGSTR1View, + 'gstr-2': GoodsAndServiceTaxGSTR2View, }; diff --git a/server/postStart.js b/server/postStart.js index c574e911..7383a004 100644 --- a/server/postStart.js +++ b/server/postStart.js @@ -1,6 +1,5 @@ import frappe from 'frappe'; import { createNumberSeries } from 'frappe/model/naming'; -import GSTR3BServer from '../models/doctype/GSTR3B/GSTR3BServer.js'; import JournalEntryServer from '../models/doctype/JournalEntry/JournalEntryServer.js'; import PartyServer from '../models/doctype/Party/PartyServer.js'; import PaymentServer from '../models/doctype/Payment/PaymentServer.js'; @@ -14,7 +13,6 @@ export default async function postStart() { frappe.models.Party.documentClass = PartyServer; frappe.models.PurchaseInvoice.documentClass = PurchaseInvoiceServer; frappe.models.JournalEntry.documentClass = JournalEntryServer; - frappe.models.GSTR3B.documentClass = GSTR3BServer; frappe.metaCache = {}; @@ -23,11 +21,6 @@ export default async function postStart() { await createNumberSeries('PINV-', 'PurchaseInvoice'); await createNumberSeries('PAY-', 'Payment'); await createNumberSeries('JV-', 'JournalEntry'); - // await naming.createNumberSeries('QTN-', 'QuotationSettings'); - // await naming.createNumberSeries('SO-', 'SalesOrderSettings'); - // await naming.createNumberSeries('OF-', 'FulfillmentSettings'); - // await naming.createNumberSeries('PO-', 'PurchaseOrderSettings'); - // await naming.createNumberSeries('PREC-', 'PurchaseReceiptSettings'); // fetch singles // so that they are available synchronously diff --git a/src/pages/ListView/listConfig.js b/src/pages/ListView/listConfig.js index 9d329468..97eba638 100644 --- a/src/pages/ListView/listConfig.js +++ b/src/pages/ListView/listConfig.js @@ -1,15 +1,14 @@ -import SalesInvoice from '../../../models/doctype/SalesInvoice/SalesInvoiceList'; -import PurchaseInvoice from '../../../models/doctype/PurchaseInvoice/PurchaseInvoiceList'; -import Customer from '../../../models/doctype/Party/CustomerList'; -import Supplier from '../../../models/doctype/Party/SupplierList'; -import Party from '../../../models/doctype/Party/PartyList'; -import Item from '../../../models/doctype/Item/ItemList'; -import Payment from '../../../models/doctype/Payment/PaymentList'; -import Tax from '../../../models/doctype/Tax/TaxList'; -import JournalEntry from '../../../models/doctype/JournalEntry/JournalEntryList'; -import AccountingLedgerEntry from '../../../models/doctype/AccountingLedgerEntry/AccountingLedgerEntryList'; import Account from '../../../models/doctype/Account/AccountList'; -import GSTR3B from '../../../models/doctype/GSTR3B/GSTR3BList'; +import AccountingLedgerEntry from '../../../models/doctype/AccountingLedgerEntry/AccountingLedgerEntryList'; +import Item from '../../../models/doctype/Item/ItemList'; +import JournalEntry from '../../../models/doctype/JournalEntry/JournalEntryList'; +import Customer from '../../../models/doctype/Party/CustomerList'; +import Party from '../../../models/doctype/Party/PartyList'; +import Supplier from '../../../models/doctype/Party/SupplierList'; +import Payment from '../../../models/doctype/Payment/PaymentList'; +import PurchaseInvoice from '../../../models/doctype/PurchaseInvoice/PurchaseInvoiceList'; +import SalesInvoice from '../../../models/doctype/SalesInvoice/SalesInvoiceList'; +import Tax from '../../../models/doctype/Tax/TaxList'; export default { SalesInvoice, @@ -22,6 +21,5 @@ export default { Tax, JournalEntry, Account, - GSTR3B, - AccountingLedgerEntry + AccountingLedgerEntry, };