2022-04-19 05:59:36 +00:00
|
|
|
import { ModelMap } from 'fyo/model/types';
|
2022-04-14 09:22:45 +00:00
|
|
|
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';
|
2022-04-14 09:22:45 +00:00
|
|
|
import { Item } from './baseModels/Item/Item';
|
|
|
|
import { JournalEntry } from './baseModels/JournalEntry/JournalEntry';
|
|
|
|
import { JournalEntryAccount } from './baseModels/JournalEntryAccount/JournalEntryAccount';
|
2023-06-30 06:27:43 +00:00
|
|
|
import { Misc } from './baseModels/Misc';
|
2022-04-14 09:22:45 +00:00
|
|
|
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';
|
2023-06-07 04:04:56 +00:00
|
|
|
import { PriceListItem } from './baseModels/PriceList/PriceListItem';
|
2023-03-01 08:13:04 +00:00
|
|
|
import { PrintSettings } from './baseModels/PrintSettings/PrintSettings';
|
2023-06-30 06:27:43 +00:00
|
|
|
import { PrintTemplate } from './baseModels/PrintTemplate';
|
2022-04-14 09:22:45 +00:00
|
|
|
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 { SetupWizard } from './baseModels/SetupWizard/SetupWizard';
|
|
|
|
import { Tax } from './baseModels/Tax/Tax';
|
|
|
|
import { TaxSummary } from './baseModels/TaxSummary/TaxSummary';
|
2023-03-01 08:13:04 +00:00
|
|
|
import { Batch } from './inventory/Batch';
|
2022-11-18 08:44:29 +00:00
|
|
|
import { InventorySettings } from './inventory/InventorySettings';
|
2022-10-05 14:37:17 +00:00
|
|
|
import { Location } from './inventory/Location';
|
2022-11-14 08:30:11 +00:00
|
|
|
import { PurchaseReceipt } from './inventory/PurchaseReceipt';
|
|
|
|
import { PurchaseReceiptItem } from './inventory/PurchaseReceiptItem';
|
2023-06-07 04:04:56 +00:00
|
|
|
import { SerialNumber } from './inventory/SerialNumber';
|
2022-11-14 08:30:11 +00:00
|
|
|
import { Shipment } from './inventory/Shipment';
|
|
|
|
import { ShipmentItem } from './inventory/ShipmentItem';
|
2022-10-05 14:37:17 +00:00
|
|
|
import { StockLedgerEntry } from './inventory/StockLedgerEntry';
|
|
|
|
import { StockMovement } from './inventory/StockMovement';
|
|
|
|
import { StockMovementItem } from './inventory/StockMovementItem';
|
2022-04-14 09:22:45 +00:00
|
|
|
|
2022-04-21 13:08:36 +00:00
|
|
|
export const models = {
|
2022-04-14 09:22:45 +00:00
|
|
|
Account,
|
|
|
|
AccountingLedgerEntry,
|
|
|
|
AccountingSettings,
|
|
|
|
Address,
|
2023-02-28 06:01:04 +00:00
|
|
|
Batch,
|
2022-10-12 08:35:18 +00:00
|
|
|
Defaults,
|
2022-04-14 09:22:45 +00:00
|
|
|
Item,
|
|
|
|
JournalEntry,
|
|
|
|
JournalEntryAccount,
|
2023-06-30 06:27:43 +00:00
|
|
|
Misc,
|
2022-04-14 09:22:45 +00:00
|
|
|
Party,
|
|
|
|
Payment,
|
|
|
|
PaymentFor,
|
2023-03-01 08:13:04 +00:00
|
|
|
PrintSettings,
|
2023-06-06 08:59:08 +00:00
|
|
|
PriceList,
|
2023-06-07 04:04:56 +00:00
|
|
|
PriceListItem,
|
2022-04-14 09:22:45 +00:00
|
|
|
PurchaseInvoice,
|
|
|
|
PurchaseInvoiceItem,
|
|
|
|
SalesInvoice,
|
|
|
|
SalesInvoiceItem,
|
2023-05-04 10:45:12 +00:00
|
|
|
SerialNumber,
|
2022-04-14 09:22:45 +00:00
|
|
|
SetupWizard,
|
2023-02-22 08:45:59 +00:00
|
|
|
PrintTemplate,
|
2022-04-14 09:22:45 +00:00
|
|
|
Tax,
|
|
|
|
TaxSummary,
|
2022-10-05 14:37:17 +00:00
|
|
|
// Inventory Models
|
2022-11-18 08:44:29 +00:00
|
|
|
InventorySettings,
|
2022-10-05 14:37:17 +00:00
|
|
|
StockMovement,
|
|
|
|
StockMovementItem,
|
|
|
|
StockLedgerEntry,
|
|
|
|
Location,
|
2022-11-14 08:30:11 +00:00
|
|
|
Shipment,
|
|
|
|
ShipmentItem,
|
|
|
|
PurchaseReceipt,
|
|
|
|
PurchaseReceiptItem,
|
2022-04-18 11:29:20 +00:00
|
|
|
} as ModelMap;
|
2022-04-14 09:22:45 +00:00
|
|
|
|
2022-04-18 11:29:20 +00:00
|
|
|
export async function getRegionalModels(
|
|
|
|
countryCode: string
|
|
|
|
): Promise<ModelMap> {
|
2022-04-14 09:22:45 +00:00
|
|
|
if (countryCode !== 'in') {
|
|
|
|
return {};
|
|
|
|
}
|
|
|
|
|
|
|
|
const { Address } = await import('./regionalModels/in/Address');
|
|
|
|
const { Party } = await import('./regionalModels/in/Party');
|
|
|
|
return { Address, Party };
|
|
|
|
}
|