From 33f82f8eaebbbc8b3592dd3564981802df1685c0 Mon Sep 17 00:00:00 2001 From: akshayitzme Date: Tue, 30 Jan 2024 18:26:05 +0530 Subject: [PATCH] feat: update types for pricing rule --- models/baseModels/Invoice/types.ts | 6 ++++ models/baseModels/types.ts | 58 ++++++++++++++++++++++++++++++ models/types.ts | 1 + 3 files changed, 65 insertions(+) create mode 100644 models/baseModels/Invoice/types.ts create mode 100644 models/baseModels/types.ts diff --git a/models/baseModels/Invoice/types.ts b/models/baseModels/Invoice/types.ts new file mode 100644 index 00000000..50362b21 --- /dev/null +++ b/models/baseModels/Invoice/types.ts @@ -0,0 +1,6 @@ +import { PricingRule } from '../PricingRule/PricingRule'; + +export interface ApplicablePricingRules { + applyOnItem: string; + pricingRule: PricingRule; +} diff --git a/models/baseModels/types.ts b/models/baseModels/types.ts new file mode 100644 index 00000000..51807db0 --- /dev/null +++ b/models/baseModels/types.ts @@ -0,0 +1,58 @@ +export type InvoiceStatus = 'Draft' | 'Saved' | 'Unpaid' | 'Cancelled' | 'Paid' | 'Return' | 'ReturnIssued'; +export enum ModelNameEnum { + Account = 'Account', + AccountingLedgerEntry = 'AccountingLedgerEntry', + AccountingSettings = 'AccountingSettings', + Address = 'Address', + Batch= 'Batch', + Color = 'Color', + Currency = 'Currency', + GetStarted = 'GetStarted', + Defaults = 'Defaults', + Item = 'Item', + ItemPrice = 'ItemPrice', + UOM = 'UOM', + UOMConversionItem = 'UOMConversionItem', + JournalEntry = 'JournalEntry', + JournalEntryAccount = 'JournalEntryAccount', + Misc = 'Misc', + NumberSeries = 'NumberSeries', + Party = 'Party', + Payment = 'Payment', + PaymentFor = 'PaymentFor', + PriceList = 'PriceList', + PricingRule = 'PricingRule', + PricingRuleItem = 'PricingRuleItem', + PricingRuleDetail = 'PricingRuleDetail', + PrintSettings = 'PrintSettings', + PrintTemplate = 'PrintTemplate', + PurchaseInvoice = 'PurchaseInvoice', + PurchaseInvoiceItem = 'PurchaseInvoiceItem', + SalesInvoice = 'SalesInvoice', + SalesInvoiceItem = 'SalesInvoiceItem', + SalesQuote = 'SalesQuote', + SalesQuoteItem = 'SalesQuoteItem', + SerialNumber = 'SerialNumber', + SetupWizard = 'SetupWizard', + Tax = 'Tax', + TaxDetail = 'TaxDetail', + TaxSummary = 'TaxSummary', + PatchRun = 'PatchRun', + SingleValue = 'SingleValue', + InventorySettings = 'InventorySettings', + SystemSettings = 'SystemSettings', + StockMovement = 'StockMovement', + StockMovementItem = 'StockMovementItem', + StockLedgerEntry = 'StockLedgerEntry', + Shipment = 'Shipment', + ShipmentItem = 'ShipmentItem', + PurchaseReceipt = 'PurchaseReceipt', + PurchaseReceiptItem = 'PurchaseReceiptItem', + Location = 'Location', + CustomForm = 'CustomForm', + CustomField = 'CustomField', + POSSettings = 'POSSettings', + POSShift = 'POSShift' +} + +export type ModelName = keyof typeof ModelNameEnum; diff --git a/models/types.ts b/models/types.ts index 0199be15..04ba0c73 100644 --- a/models/types.ts +++ b/models/types.ts @@ -24,6 +24,7 @@ export enum ModelNameEnum { PriceList = 'PriceList', PricingRule = 'PricingRule', PricingRuleItem = 'PricingRuleItem', + PricingRuleDetail = 'PricingRuleDetail', PrintSettings = 'PrintSettings', PrintTemplate = 'PrintTemplate', PurchaseInvoice = 'PurchaseInvoice',