2
0
mirror of https://github.com/frappe/books.git synced 2024-11-10 07:40:55 +00:00
books/models/index.ts

103 lines
3.7 KiB
TypeScript
Raw Normal View History

import { ModelMap } from 'fyo/model/types';
import { Account } from './baseModels/Account/Account';
import { AccountingLedgerEntry } from './baseModels/AccountingLedgerEntry/AccountingLedgerEntry';
import { AccountingSettings } from './baseModels/AccountingSettings/AccountingSettings';
import { Address } from './baseModels/Address/Address';
2022-10-12 08:35:18 +00:00
import { Defaults } from './baseModels/Defaults/Defaults';
import { Item } from './baseModels/Item/Item';
import { JournalEntry } from './baseModels/JournalEntry/JournalEntry';
import { JournalEntryAccount } from './baseModels/JournalEntryAccount/JournalEntryAccount';
import { Misc } from './baseModels/Misc';
import { Party } from './baseModels/Party/Party';
import { Payment } from './baseModels/Payment/Payment';
import { PaymentFor } from './baseModels/PaymentFor/PaymentFor';
2023-06-06 08:59:08 +00:00
import { PriceList } from './baseModels/PriceList/PriceList';
import { PriceListItem } from './baseModels/PriceList/PriceListItem';
import { PrintSettings } from './baseModels/PrintSettings/PrintSettings';
import { PrintTemplate } from './baseModels/PrintTemplate';
import { PurchaseInvoice } from './baseModels/PurchaseInvoice/PurchaseInvoice';
import { PurchaseInvoiceItem } from './baseModels/PurchaseInvoiceItem/PurchaseInvoiceItem';
import { SalesInvoice } from './baseModels/SalesInvoice/SalesInvoice';
import { SalesInvoiceItem } from './baseModels/SalesInvoiceItem/SalesInvoiceItem';
import { SalesQuote } from './baseModels/SalesQuote/SalesQuote';
import { SalesQuoteItem } from './baseModels/SalesQuoteItem/SalesQuoteItem';
import { SetupWizard } from './baseModels/SetupWizard/SetupWizard';
import { Tax } from './baseModels/Tax/Tax';
import { TaxSummary } from './baseModels/TaxSummary/TaxSummary';
import { Batch } from './inventory/Batch';
2022-11-18 08:44:29 +00:00
import { InventorySettings } from './inventory/InventorySettings';
import { Location } from './inventory/Location';
import { PurchaseReceipt } from './inventory/PurchaseReceipt';
import { PurchaseReceiptItem } from './inventory/PurchaseReceiptItem';
import { SerialNumber } from './inventory/SerialNumber';
import { Shipment } from './inventory/Shipment';
import { ShipmentItem } from './inventory/ShipmentItem';
import { StockLedgerEntry } from './inventory/StockLedgerEntry';
import { StockMovement } from './inventory/StockMovement';
import { StockMovementItem } from './inventory/StockMovementItem';
2023-08-22 06:48:51 +00:00
import { ClosingAmounts } from './inventory/Point of Sale/ClosingAmounts';
import { ClosingCash } from './inventory/Point of Sale/ClosingCash';
import { OpeningAmounts } from './inventory/Point of Sale/OpeningAmounts';
import { OpeningCash } from './inventory/Point of Sale/OpeningCash';
2023-09-05 12:03:42 +00:00
import { POSSettings } from './inventory/Point of Sale/POSSettings';
2023-08-22 06:48:51 +00:00
import { POSShift } from './inventory/Point of Sale/POSShift';
export const models = {
Account,
AccountingLedgerEntry,
AccountingSettings,
Address,
2023-02-28 06:01:04 +00:00
Batch,
2022-10-12 08:35:18 +00:00
Defaults,
Item,
JournalEntry,
JournalEntryAccount,
Misc,
Party,
Payment,
PaymentFor,
PrintSettings,
2023-06-06 08:59:08 +00:00
PriceList,
PriceListItem,
PurchaseInvoice,
PurchaseInvoiceItem,
SalesInvoice,
SalesInvoiceItem,
SalesQuote,
SalesQuoteItem,
2023-05-04 10:45:12 +00:00
SerialNumber,
SetupWizard,
2023-02-22 08:45:59 +00:00
PrintTemplate,
Tax,
TaxSummary,
// Inventory Models
2022-11-18 08:44:29 +00:00
InventorySettings,
StockMovement,
StockMovementItem,
StockLedgerEntry,
Location,
Shipment,
ShipmentItem,
PurchaseReceipt,
PurchaseReceiptItem,
2023-08-22 06:48:51 +00:00
// POS Models
ClosingAmounts,
ClosingCash,
OpeningAmounts,
OpeningCash,
2023-09-05 12:03:42 +00:00
POSSettings,
2023-08-22 06:48:51 +00:00
POSShift,
} as ModelMap;
export async function getRegionalModels(
countryCode: string
): Promise<ModelMap> {
if (countryCode !== 'in') {
return {};
}
const { Address } = await import('./regionalModels/in/Address');
const { Party } = await import('./regionalModels/in/Party');
return { Address, Party };
}