2
0
mirror of https://github.com/frappe/books.git synced 2025-01-23 07:08:36 +00:00
books/models/index.ts

Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

123 lines
4.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 14:05:18 +05:30
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 { LoyaltyProgram } from './baseModels/LoyaltyProgram/LoyaltyProgram';
import { LoyaltyPointEntry } from './baseModels/LoyaltyPointEntry/LoyaltyPointEntry';
import { CollectionRulesItems } from './baseModels/CollectionRulesItems/CollectionRulesItems';
2024-08-09 10:41:54 +05:30
import { Lead } from './baseModels/Lead/Lead';
2024-09-11 16:08:41 +05:30
import { AppliedCouponCodes } from './baseModels/AppliedCouponCodes/AppliedCouponCodes';
2024-08-21 11:11:43 +05:30
import { CouponCode } from './baseModels/CouponCode/CouponCode';
import { Payment } from './baseModels/Payment/Payment';
2024-12-26 15:20:01 +05:30
import { PaymentMethod } from './baseModels/PaymentMethod/PaymentMethod';
import { PaymentFor } from './baseModels/PaymentFor/PaymentFor';
2023-06-06 14:29:08 +05:30
import { PriceList } from './baseModels/PriceList/PriceList';
import { PriceListItem } from './baseModels/PriceList/PriceListItem';
2024-01-30 18:25:50 +05:30
import { PricingRule } from './baseModels/PricingRule/PricingRule';
import { PricingRuleItem } from './baseModels/PricingRuleItem/PricingRuleItem';
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 14:14:29 +05:30
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 12:18:51 +05:30
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 17:33:42 +05:30
import { POSSettings } from './inventory/Point of Sale/POSSettings';
2024-12-24 22:17:40 +05:30
import { POSOpeningShift } from './inventory/Point of Sale/POSOpeningShift';
import { POSClosingShift } from './inventory/Point of Sale/POSClosingShift';
export const models = {
Account,
AccountingLedgerEntry,
AccountingSettings,
Address,
2023-02-28 11:31:04 +05:30
Batch,
2022-10-12 14:05:18 +05:30
Defaults,
Item,
JournalEntry,
JournalEntryAccount,
Misc,
2024-08-09 10:41:54 +05:30
Lead,
Party,
LoyaltyProgram,
LoyaltyPointEntry,
CollectionRulesItems,
2024-08-21 11:11:43 +05:30
CouponCode,
Payment,
2024-12-26 15:20:01 +05:30
PaymentMethod,
PaymentFor,
PrintSettings,
2023-06-06 14:29:08 +05:30
PriceList,
PriceListItem,
2024-01-30 18:25:50 +05:30
PricingRule,
PricingRuleItem,
PurchaseInvoice,
PurchaseInvoiceItem,
SalesInvoice,
SalesInvoiceItem,
2024-09-11 16:08:41 +05:30
AppliedCouponCodes,
SalesQuote,
SalesQuoteItem,
2023-05-04 16:15:12 +05:30
SerialNumber,
SetupWizard,
2023-02-22 14:15:59 +05:30
PrintTemplate,
Tax,
TaxSummary,
// Inventory Models
2022-11-18 14:14:29 +05:30
InventorySettings,
StockMovement,
StockMovementItem,
StockLedgerEntry,
Location,
Shipment,
ShipmentItem,
PurchaseReceipt,
PurchaseReceiptItem,
2023-08-22 12:18:51 +05:30
// POS Models
ClosingAmounts,
ClosingCash,
OpeningAmounts,
OpeningCash,
2023-09-05 17:33:42 +05:30
POSSettings,
2024-12-24 22:17:40 +05:30
POSOpeningShift,
POSClosingShift,
} 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 };
}