Skip to content

Open-source manufacturing ERP, MES and QMS. Quoting, MRP, inventory, shop floor, quality and lot/serial traceability on one Postgres schema, with a REST API and MCP server. Self-host or use Carbon Cloud.

feat: allow for manually scheduled operations that don't get rescheduled (#819)

Brad Barbin6a0ba82d46a6
diff --git a/apps/erp/app/modules/production/production.service.ts b/apps/erp/app/modules/production/production.service.ts
index 10b23c2dd0..d7abda17e5 100644
--- a/apps/erp/app/modules/production/production.service.ts
+++ b/apps/erp/app/modules/production/production.service.ts
@@ -2039,6 +2039,7 @@ export async function updateJobOperationDueDate(
.from("jobOperation")
.update({
dueDate,
+ manuallyScheduled: dueDate !== null,
updatedBy,
updatedAt: new Date().toISOString()
})
diff --git a/apps/erp/app/modules/production/ui/Jobs/JobBillOfProcess.tsx b/apps/erp/app/modules/production/ui/Jobs/JobBillOfProcess.tsx
index 255ae5899a..a98978f2ee 100644
--- a/apps/erp/app/modules/production/ui/Jobs/JobBillOfProcess.tsx
+++ b/apps/erp/app/modules/production/ui/Jobs/JobBillOfProcess.tsx
@@ -161,6 +161,7 @@ import { OperationDueDatePicker } from "./OperationDueDatePicker";
export type Operation = z.infer<typeof jobOperationValidator> & {
assignee: string | null;
dueDate?: string | null;
+ manuallyScheduled?: boolean;
status: JobOperation["status"];
tags: string[] | null;
workInstruction: JSONContent | null;
@@ -275,6 +276,7 @@ function makeItem(
<OperationDueDatePicker
operationId={operation.id!}
dueDate={operation.dueDate ?? null}
+ manuallyScheduled={operation.manuallyScheduled}
/>
<JobOperationTags operation={operation} availableTags={tags} />
<Tooltip>
diff --git a/apps/erp/app/modules/production/ui/Jobs/OperationDueDatePicker.tsx b/apps/erp/app/modules/production/ui/Jobs/OperationDueDatePicker.tsx
index 36220ea9c5..1a39fb32f4 100644
--- a/apps/erp/app/modules/production/ui/Jobs/OperationDueDatePicker.tsx
+++ b/apps/erp/app/modules/production/ui/Jobs/OperationDueDatePicker.tsx
@@ -1,6 +1,7 @@
"use client";
import { DatePicker as DatePickerInput } from "@carbon/react";
import { parseDate } from "@internationalized/date";
+import { LuPin } from "react-icons/lu";
import { useSubmit } from "react-router";
import { useDateFormatter } from "~/hooks";
import { path } from "~/utils/path";
@@ -8,12 +9,14 @@ import { path } from "~/utils/path";
type OperationDueDatePickerProps = {
operationId: string;
dueDate: string | null;
+ manuallyScheduled?: boolean;
onChange?: (dueDate: string | null) => void;
};
export function OperationDueDatePicker({
operationId,
dueDate,
+ manuallyScheduled,
onChange
}: OperationDueDatePickerProps) {
const submit = useSubmit();
@@ -25,7 +28,8 @@ export function OperationDueDatePicker({
isPreviewInline
inline={
dueDate ? (
- <span className="flex flex-grow line-clamp-1 items-center text-xs text-muted-foreground">
+ <span className="flex flex-grow line-clamp-1 items-center gap-1 text-xs text-muted-foreground">
+ {manuallyScheduled && <LuPin className="h-3 w-3 shrink-0" />}
{formatDate(dueDate)}
</span>
) : (
diff --git a/apps/erp/app/routes/api+/mcp+/lib/tool-metadata.json b/apps/erp/app/routes/api+/mcp+/lib/tool-metadata.json
index 1cbb39c2d6..190bc31763 100644
--- a/apps/erp/app/routes/api+/mcp+/lib/tool-metadata.json
+++ b/apps/erp/app/routes/api+/mcp+/lib/tool-metadata.json
@@ -1,5 +1,5 @@
{
- "generated": "2026-05-25T18:45:20.690Z",
+ "generated": "2026-05-25T23:18:39.043Z",
"totalTools": 1075,
"modules": 15,
"tools": [
diff --git a/packages/database/src/types.ts b/packages/database/src/types.ts
index e42609ed29..d5addce2bf 100644
--- a/packages/database/src/types.ts
+++ b/packages/database/src/types.ts
@@ -342,6 +342,8 @@ export type Database = {
costOfGoodsSoldAccount: string
currencyTranslationAccount: string
customerPaymentDiscountAccount: string
+ deferredTaxExpenseAccountId: string | null
+ deferredTaxLiabilityAccountId: string | null
goodsReceivedNotInvoicedAccount: string
indirectCostAccount: string
interestAccount: string
@@ -385,6 +387,8 @@ export type Database = {
costOfGoodsSoldAccount: string
currencyTranslationAccount: string
customerPaymentDiscountAccount: string
+ deferredTaxExpenseAccountId?: string | null
+ deferredTaxLiabilityAccountId?: string | null
goodsReceivedNotInvoicedAccount: string
indirectCostAccount: string
interestAccount: string
@@ -428,6 +432,8 @@ export type Database = {
costOfGoodsSoldAccount?: string
currencyTranslationAccount?: string
customerPaymentDiscountAccount?: string
+ deferredTaxExpenseAccountId?: string | null
+ deferredTaxLiabilityAccountId?: string | null
goodsReceivedNotInvoicedAccount?: string
indirectCostAccount?: string
interestAccount?: string
@@ -626,6 +632,34 @@ export type Database = {
referencedRelation: "accounts"
referencedColumns: ["id"]
},
+ {
+ foreignKeyName: "accountDefault_deferredTaxExpenseAccountId_fkey"
+ columns: ["deferredTaxExpenseAccountId"]
+ isOneToOne: false
+ referencedRelation: "account"
+ referencedColumns: ["id"]
+ },
+ {
+ foreignKeyName: "accountDefault_deferredTaxExpenseAccountId_fkey"
+ columns: ["deferredTaxExpenseAccountId"]
+ isOneToOne: false
+ referencedRelation: "accounts"
+ referencedColumns: ["id"]
+ },
+ {
+ foreignKeyName: "accountDefault_deferredTaxLiabilityAccountId_fkey"
+ columns: ["deferredTaxLiabilityAccountId"]
+ isOneToOne: false
+ referencedRelation: "account"
+ referencedColumns: ["id"]
+ },
+ {
+ foreignKeyName: "accountDefault_deferredTaxLiabilityAccountId_fkey"
+ columns: ["deferredTaxLiabilityAccountId"]
+ isOneToOne: false
+ referencedRelation: "accounts"
+ referencedColumns: ["id"]
+ },
{
foreignKeyName: "accountDefault_fkey"
columns: ["companyId"]
@@ -2832,6 +2866,8 @@ export type Database = {
accountsPayableEmail: string | null
accountsReceivableAddress: boolean | null
accountsReceivableEmail: string | null
+ assetTaxDepreciationEnabled: boolean
+ assetTaxRate: number | null
consoleEnabled: boolean
defaultCustomerCc: string[] | null
defaultSupplierCc: string[] | null
@@ -2873,6 +2909,8 @@ export type Database = {
accountsPayableEmail?: string | null
accountsReceivableAddress?: boolean | null
accountsReceivableEmail?: string | null
+ assetTaxDepreciationEnabled?: boolean
+ assetTaxRate?: number | null
consoleEnabled?: boolean
defaultCustomerCc?: string[] | null
defaultSupplierCc?: string[] | null
@@ -2914,6 +2952,8 @@ export type Database = {
accountsPayableEmail?: string | null
accountsReceivableAddress?: boolean | null
accountsReceivableEmail?: string | null
+ assetTaxDepreciationEnabled?: boolean
+ assetTaxRate?: number | null
consoleEnabled?: boolean
defaultCustomerCc?: string[] | null
defaultSupplierCc?: string[] | null
@@ -7582,6 +7622,228 @@ export type Database = {
},
]
}
+ depreciationRun: {
+ Row: {
+ companyId: string
+ createdAt: string
+ createdBy: string
+ depreciationRunId: string
+ id: string
+ periodEnd: string
+ postedAt: string | null
+ postedBy: string | null
+ status: string
+ }
+ Insert: {
+ companyId: string
+ createdAt?: string
+ createdBy: string
+ depreciationRunId: string
+ id?: string
+ periodEnd: string
+ postedAt?: string | null
+ postedBy?: string | null
+ status?: string
+ }
+ Update: {
+ companyId?: string
+ createdAt?: string
+ createdBy?: string
+ depreciationRunId?: string
+ id?: string
+ periodEnd?: string
+ postedAt?: string | null
+ postedBy?: string | null
+ status?: string
+ }
+ Relationships: [
+ {
+ foreignKeyName: "depreciationRun_companyId_fkey"
+ columns: ["companyId"]
+ isOneToOne: false
+ referencedRelation: "companies"
+ referencedColumns: ["id"]
+ },
+ {
+ foreignKeyName: "depreciationRun_companyId_fkey"
+ columns: ["companyId"]
+ isOneToOne: false
+ referencedRelation: "company"
+ referencedColumns: ["id"]
+ },
+ {
+ foreignKeyName: "depreciationRun_companyId_fkey"
+ columns: ["companyId"]
+ isOneToOne: false
+ referencedRelation: "customFieldTables"
+ referencedColumns: ["companyId"]
+ },
+ {
+ foreignKeyName: "depreciationRun_companyId_fkey"
+ columns: ["companyId"]
+ isOneToOne: false
+ referencedRelation: "integrations"
+ referencedColumns: ["companyId"]
+ },
+ {
+ foreignKeyName: "depreciationRun_createdBy_fkey"
+ columns: ["createdBy"]
+ isOneToOne: false
+ referencedRelation: "employees"
+ referencedColumns: ["id"]
+ },
+ {
+ foreignKeyName: "depreciationRun_createdBy_fkey"
+ columns: ["createdBy"]
+ isOneToOne: false
+ referencedRelation: "employeesAcrossCompanies"
+ referencedColumns: ["id"]
+ },
+ {
+ foreignKeyName: "depreciationRun_createdBy_fkey"
+ columns: ["createdBy"]
+ isOneToOne: false
+ referencedRelation: "employeeSummary"
+ referencedColumns: ["id"]
+ },
+ {
+ foreignKeyName: "depreciationRun_createdBy_fkey"
+ columns: ["createdBy"]
+ isOneToOne: false
+ referencedRelation: "user"
+ referencedColumns: ["id"]
+ },
+ {
+ foreignKeyName: "depreciationRun_createdBy_fkey"
+ columns: ["createdBy"]
+ isOneToOne: false
+ referencedRelation: "userDefaults"
+ referencedColumns: ["userId"]
+ },
+ {
+ foreignKeyName: "depreciationRun_postedBy_fkey"
+ columns: ["postedBy"]
+ isOneToOne: false
+ referencedRelation: "employees"
+ referencedColumns: ["id"]
+ },
+ {
+ foreignKeyName: "depreciationRun_postedBy_fkey"
+ columns: ["postedBy"]
+ isOneToOne: false
+ referencedRelation: "employeesAcrossCompanies"
+ referencedColumns: ["id"]
+ },
+ {
+ foreignKeyName: "depreciationRun_postedBy_fkey"
+ columns: ["postedBy"]
+ isOneToOne: false
+ referencedRelation: "employeeSummary"
+ referencedColumns: ["id"]
+ },
+ {
+ foreignKeyName: "depreciationRun_postedBy_fkey"
+ columns: ["postedBy"]
+ isOneToOne: false
+ referencedRelation: "user"
+ referencedColumns: ["id"]
+ },
+ {
+ foreignKeyName: "depreciationRun_postedBy_fkey"
+ columns: ["postedBy"]
+ isOneToOne: false
+ referencedRelation: "userDefaults"
+ referencedColumns: ["userId"]
+ },
+ ]
+ }
+ depreciationRunLine: {
+ Row: {
+ amount: number
+ companyId: string
+ depreciationRunId: string
+ fixedAssetId: string
+ id: string
+ journalId: string | null
+ taxAmount: number | null
+ }
+ Insert: {
+ amount: number
+ companyId: string
+ depreciationRunId: string
+ fixedAssetId: string
+ id?: string
+ journalId?: string | null
+ taxAmount?: number | null
+ }
+ Update: {
+ amount?: number
+ companyId?: string
+ depreciationRunId?: string
+ fixedAssetId?: string
+ id?: string
+ journalId?: string | null
+ taxAmount?: number | null
+ }
+ Relationships: [
+ {
+ foreignKeyName: "depreciationRunLine_companyId_fkey"
+ columns: ["companyId"]
+ isOneToOne: false
+ referencedRelation: "companies"
+ referencedColumns: ["id"]
+ },
+ {
+ foreignKeyName: "depreciationRunLine_companyId_fkey"
+ columns: ["companyId"]
+ isOneToOne: false
+ referencedRelation: "company"
+ referencedColumns: ["id"]
+ },
+ {
+ foreignKeyName: "depreciationRunLine_companyId_fkey"
+ columns: ["companyId"]
+ isOneToOne: false
+ referencedRelation: "customFieldTables"
+ referencedColumns: ["companyId"]
+ },
+ {
+ foreignKeyName: "depreciationRunLine_companyId_fkey"
+ columns: ["companyId"]
+ isOneToOne: false
+ referencedRelation: "integrations"
+ referencedColumns: ["companyId"]
+ },
+ {
+ foreignKeyName: "depreciationRunLine_depreciationRunId_fkey"
+ columns: ["depreciationRunId"]
+ isOneToOne: false
+ referencedRelation: "depreciationRun"
+ referencedColumns: ["id"]
+ },
+ {
+ foreignKeyName: "depreciationRunLine_fixedAssetId_fkey"
+ columns: ["fixedAssetId"]
+ isOneToOne: false
+ referencedRelation: "fixedAsset"
+ referencedColumns: ["id"]
+ },
+ {
+ foreignKeyName: "depreciationRunLine_journalId_fkey"
+ columns: ["journalId"]
+ isOneToOne: false
+ referencedRelation: "journal"
+ referencedColumns: ["id"]
+ },
+ {
+ foreignKeyName: "depreciationRunLine_journalId_fkey"
+ columns: ["journalId"]
+ isOneToOne: false
+ referencedRelation: "journalEntries"
+ referencedColumns: ["id"]
+ },
+ ]
+ }
dimension: {
Row: {
active: boolean
@@ -9207,6 +9469,754 @@ export type Database = {
},
]
}
+ fixedAsset: {
+ Row: {
+ accumulatedDepreciation: number
+ accumulatedTaxDepreciation: number
+ acquisitionCost: number
+ acquisitionDate: string | null
+ assetLifetimeUsage: number | null
+ bonusDepreciationPercent: number | null
+ companyId: string
+ createdAt: string
+ createdBy: string
+ customFields: Json | null
+ depreciationMethod: Database["public"]["Enums"]["depreciationMethod"]
+ depreciationStartDate: string | null
+ description: string | null
+ disposalDate: string | null
+ disposalMethod: Database["public"]["Enums"]["disposalMethod"] | null
+ fixedAssetClassId: string
+ fixedAssetId: string
+ id: string
+ locationId: string | null
+ macrsConvention: Database["public"]["Enums"]["macrsConvention"] | null
+ macrsPropertyClass:
+ | Database["public"]["Enums"]["macrsPropertyClass"]
+ | null
+ name: string
+ notes: Json | null
+ residualValuePercent: number
+ saleProceeds: number | null
+ serialNumber: string | null
+ status: Database["public"]["Enums"]["fixedAssetStatus"]
+ taxDepreciationMethod:
+ | Database["public"]["Enums"]["taxDepreciationMethod"]
+ | null
+ taxResidualValuePercent: number | null
+ taxUsefulLifeMonths: number | null
+ updatedAt: string | null
+ updatedBy: string | null
+ usefulLifeMonths: number
+ }
+ Insert: {
+ accumulatedDepreciation?: number
+ accumulatedTaxDepreciation?: number
+ acquisitionCost?: number
+ acquisitionDate?: string | null
+ assetLifetimeUsage?: number | null
+ bonusDepreciationPercent?: number | null
+ companyId: string
+ createdAt?: string
+ createdBy: string
+ customFields?: Json | null
+ depreciationMethod?: Database["public"]["Enums"]["depreciationMethod"]
+ depreciationStartDate?: string | null
+ description?: string | null
+ disposalDate?: string | null
+ disposalMethod?: Database["public"]["Enums"]["disposalMethod"] | null
+ fixedAssetClassId: string
+ fixedAssetId: string
+ id?: string
+ locationId?: string | null
+ macrsConvention?:
+ | Database["public"]["Enums"]["macrsConvention"]
+ | null
+ macrsPropertyClass?:
+ | Database["public"]["Enums"]["macrsPropertyClass"]
+ | null
+ name: string
+ notes?: Json | null
+ residualValuePercent?: number
+ saleProceeds?: number | null
+ serialNumber?: string | null
+ status?: Database["public"]["Enums"]["fixedAssetStatus"]
+ taxDepreciationMethod?:
+ | Database["public"]["Enums"]["taxDepreciationMethod"]
+ | null
+ taxResidualValuePercent?: number | null
+ taxUsefulLifeMonths?: number | null
+ updatedAt?: string | null
+ updatedBy?: string | null
+ usefulLifeMonths?: number
+ }
+ Update: {
+ accumulatedDepreciation?: number
+ accumulatedTaxDepreciation?: number
+ acquisitionCost?: number
+ acquisitionDate?: string | null
+ assetLifetimeUsage?: number | null
+ bonusDepreciationPercent?: number | null
+ companyId?: string
+ createdAt?: string
+ createdBy?: string
+ customFields?: Json | null
+ depreciationMethod?: Database["public"]["Enums"]["depreciationMethod"]
+ depreciationStartDate?: string | null
+ description?: string | null
+ disposalDate?: string | null
+ disposalMethod?: Database["public"]["Enums"]["disposalMethod"] | null
+ fixedAssetClassId?: string
+ fixedAssetId?: string
+ id?: string
+ locationId?: string | null
+ macrsConvention?:
+ | Database["public"]["Enums"]["macrsConvention"]
+ | null
+ macrsPropertyClass?:
+ | Database["public"]["Enums"]["macrsPropertyClass"]
+ | null
+ name?: string
+ notes?: Json | null
+ residualValuePercent?: number
+ saleProceeds?: number | null
+ serialNumber?: string | null
+ status?: Database["public"]["Enums"]["fixedAssetStatus"]
+ taxDepreciationMethod?:
+ | Database["public"]["Enums"]["taxDepreciationMethod"]
+ | null
+ taxResidualValuePercent?: number | null
+ taxUsefulLifeMonths?: number | null
+ updatedAt?: string | null
+ updatedBy?: string | null
+ usefulLifeMonths?: number
+ }
+ Relationships: [
+ {
+ foreignKeyName: "fixedAsset_companyId_fkey"
+ columns: ["companyId"]
+ isOneToOne: false
+ referencedRelation: "companies"
+ referencedColumns: ["id"]
+ },
+ {
+ foreignKeyName: "fixedAsset_companyId_fkey"
+ columns: ["companyId"]
+ isOneToOne: false
+ referencedRelation: "company"
+ referencedColumns: ["id"]
+ },
+ {
+ foreignKeyName: "fixedAsset_companyId_fkey"
+ columns: ["companyId"]
+ isOneToOne: false
+ referencedRelation: "customFieldTables"
+ referencedColumns: ["companyId"]
+ },
+ {
+ foreignKeyName: "fixedAsset_companyId_fkey"
+ columns: ["companyId"]
+ isOneToOne: false
+ referencedRelation: "integrations"
+ referencedColumns: ["companyId"]
+ },
+ {
+ foreignKeyName: "fixedAsset_createdBy_fkey"
+ columns: ["createdBy"]
+ isOneToOne: false
+ referencedRelation: "employees"
+ referencedColumns: ["id"]
+ },
+ {
+ foreignKeyName: "fixedAsset_createdBy_fkey"
+ columns: ["createdBy"]
+ isOneToOne: false
+ referencedRelation: "employeesAcrossCompanies"
+ referencedColumns: ["id"]
+ },
+ {
+ foreignKeyName: "fixedAsset_createdBy_fkey"
+ columns: ["createdBy"]
+ isOneToOne: false
+ referencedRelation: "employeeSummary"
+ referencedColumns: ["id"]
+ },
+ {
+ foreignKeyName: "fixedAsset_createdBy_fkey"
+ columns: ["createdBy"]
+ isOneToOne: false
+ referencedRelation: "user"
+ referencedColumns: ["id"]
+ },
+ {
+ foreignKeyName: "fixedAsset_createdBy_fkey"
+ columns: ["createdBy"]
+ isOneToOne: false
+ referencedRelation: "userDefaults"
+ referencedColumns: ["userId"]
+ },
+ {
+ foreignKeyName: "fixedAsset_fixedAssetClassId_fkey"
+ columns: ["fixedAssetClassId"]
+ isOneToOne: false
+ referencedRelation: "fixedAssetClass"
+ referencedColumns: ["id"]
+ },
+ {
+ foreignKeyName: "fixedAsset_locationId_fkey"
+ columns: ["locationId"]
+ isOneToOne: false
+ referencedRelation: "location"
+ referencedColumns: ["id"]
+ },
+ {
+ foreignKeyName: "fixedAsset_updatedBy_fkey"
+ columns: ["updatedBy"]
+ isOneToOne: false
+ referencedRelation: "employees"
+ referencedColumns: ["id"]
+ },
+ {
+ foreignKeyName: "fixedAsset_updatedBy_fkey"
+ columns: ["updatedBy"]
+ isOneToOne: false
+ referencedRelation: "employeesAcrossCompanies"
+ referencedColumns: ["id"]
+ },
+ {
+ foreignKeyName: "fixedAsset_updatedBy_fkey"
+ columns: ["updatedBy"]
+ isOneToOne: false
+ referencedRelation: "employeeSummary"
+ referencedColumns: ["id"]
+ },
+ {
+ foreignKeyName: "fixedAsset_updatedBy_fkey"
+ columns: ["updatedBy"]
+ isOneToOne: false
+ referencedRelation: "user"
+ referencedColumns: ["id"]
+ },
+ {
+ foreignKeyName: "fixedAsset_updatedBy_fkey"
+ columns: ["updatedBy"]
+ isOneToOne: false
+ referencedRelation: "userDefaults"
+ referencedColumns: ["userId"]
+ },
+ ]
+ }
+ fixedAssetClass: {
+ Row: {
+ accumulatedDepreciationAccountId: string
+ assetAccountId: string
+ bonusDepreciationPercent: number | null
+ companyId: string
+ createdAt: string
+ createdBy: string
+ customFields: Json | null
+ depreciationExpenseAccountId: string
+ depreciationMethod: Database["public"]["Enums"]["depreciationMethod"]
+ description: string | null
+ disposalAccountId: string
+ id: string
+ macrsConvention: Database["public"]["Enums"]["macrsConvention"] | null
+ macrsPropertyClass:
+ | Database["public"]["Enums"]["macrsPropertyClass"]
+ | null
+ name: string
+ residualValuePercent: number
+ taxDepreciationMethod:
+ | Database["public"]["Enums"]["taxDepreciationMethod"]
+ | null
+ taxResidualValuePercent: number | null
+ taxUsefulLifeMonths: number | null
+ updatedAt: string | null
+ updatedBy: string | null
+ usefulLifeMonths: number
+ writeDownAccountId: string
+ writeOffAccountId: string
+ }
+ Insert: {
+ accumulatedDepreciationAccountId: string
+ assetAccountId: string
+ bonusDepreciationPercent?: number | null
+ companyId: string
+ createdAt?: string
+ createdBy: string
+ customFields?: Json | null
+ depreciationExpenseAccountId: string
+ depreciationMethod?: Database["public"]["Enums"]["depreciationMethod"]
+ description?: string | null
+ disposalAccountId: string
+ id?: string
+ macrsConvention?:
+ | Database["public"]["Enums"]["macrsConvention"]
+ | null
+ macrsPropertyClass?:
+ | Database["public"]["Enums"]["macrsPropertyClass"]
+ | null
+ name: string
+ residualValuePercent?: number
+ taxDepreciationMethod?:
+ | Database["public"]["Enums"]["taxDepreciationMethod"]
+ | null
+ taxResidualValuePercent?: number | null
+ taxUsefulLifeMonths?: number | null
+ updatedAt?: string | null
+ updatedBy?: string | null
+ usefulLifeMonths?: number
+ writeDownAccountId: string
+ writeOffAccountId: string
+ }
+ Update: {
+ accumulatedDepreciationAccountId?: string
+ assetAccountId?: string
+ bonusDepreciationPercent?: number | null
+ companyId?: string
+ createdAt?: string
+ createdBy?: string
+ customFields?: Json | null
+ depreciationExpenseAccountId?: string
+ depreciationMethod?: Database["public"]["Enums"]["depreciationMethod"]
+ description?: string | null
+ disposalAccountId?: string
+ id?: string
+ macrsConvention?:
+ | Database["public"]["Enums"]["macrsConvention"]
+ | null
+ macrsPropertyClass?:
+ | Database["public"]["Enums"]["macrsPropertyClass"]
+ | null
+ name?: string
+ residualValuePercent?: number
+ taxDepreciationMethod?:
+ | Database["public"]["Enums"]["taxDepreciationMethod"]
+ | null
+ taxResidualValuePercent?: number | null
+ taxUsefulLifeMonths?: number | null
+ updatedAt?: string | null
+ updatedBy?: string | null
+ usefulLifeMonths?: number
+ writeDownAccountId?: string
+ writeOffAccountId?: string
+ }
+ Relationships: [
+ {
+ foreignKeyName: "fixedAssetClass_accumulatedDepreciationAccountId_fkey"
+ columns: ["accumulatedDepreciationAccountId"]
+ isOneToOne: false
+ referencedRelation: "account"
+ referencedColumns: ["id"]
+ },
+ {
+ foreignKeyName: "fixedAssetClass_accumulatedDepreciationAccountId_fkey"
+ columns: ["accumulatedDepreciationAccountId"]
+ isOneToOne: false
+ referencedRelation: "accounts"
+ referencedColumns: ["id"]
+ },
+ {
+ foreignKeyName: "fixedAssetClass_assetAccountId_fkey"
+ columns: ["assetAccountId"]
+ isOneToOne: false
+ referencedRelation: "account"
+ referencedColumns: ["id"]
+ },
+ {
+ foreignKeyName: "fixedAssetClass_assetAccountId_fkey"
+ columns: ["assetAccountId"]
+ isOneToOne: false
+ referencedRelation: "accounts"
+ referencedColumns: ["id"]
+ },
+ {
+ foreignKeyName: "fixedAssetClass_companyId_fkey"
+ columns: ["companyId"]
+ isOneToOne: false
+ referencedRelation: "companies"
+ referencedColumns: ["id"]
+ },
+ {
+ foreignKeyName: "fixedAssetClass_companyId_fkey"
+ columns: ["companyId"]
+ isOneToOne: false
+ referencedRelation: "company"
+ referencedColumns: ["id"]
+ },
+ {
+ foreignKeyName: "fixedAssetClass_companyId_fkey"
+ columns: ["companyId"]
+ isOneToOne: false
+ referencedRelation: "customFieldTables"
+ referencedColumns: ["companyId"]
+ },
+ {
+ foreignKeyName: "fixedAssetClass_companyId_fkey"
+ columns: ["companyId"]
+ isOneToOne: false
+ referencedRelation: "integrations"
+ referencedColumns: ["companyId"]
+ },
+ {
+ foreignKeyName: "fixedAssetClass_createdBy_fkey"
+ columns: ["createdBy"]
+ isOneToOne: false
+ referencedRelation: "employees"
+ referencedColumns: ["id"]
+ },
+ {
+ foreignKeyName: "fixedAssetClass_createdBy_fkey"
+ columns: ["createdBy"]
+ isOneToOne: false
+ referencedRelation: "employeesAcrossCompanies"
+ referencedColumns: ["id"]
+ },
+ {
+ foreignKeyName: "fixedAssetClass_createdBy_fkey"
+ columns: ["createdBy"]
+ isOneToOne: false
+ referencedRelation: "employeeSummary"
+ referencedColumns: ["id"]
+ },
+ {
+ foreignKeyName: "fixedAssetClass_createdBy_fkey"
+ columns: ["createdBy"]
+ isOneToOne: false
+ referencedRelation: "user"
+ referencedColumns: ["id"]
+ },
+ {
+ foreignKeyName: "fixedAssetClass_createdBy_fkey"
+ columns: ["createdBy"]
+ isOneToOne: false
+ referencedRelation: "userDefaults"
+ referencedColumns: ["userId"]
+ },
+ {
+ foreignKeyName: "fixedAssetClass_depreciationExpenseAccountId_fkey"
+ columns: ["depreciationExpenseAccountId"]
+ isOneToOne: false
+ referencedRelation: "account"
+ referencedColumns: ["id"]
+ },
+ {
+ foreignKeyName: "fixedAssetClass_depreciationExpenseAccountId_fkey"
+ columns: ["depreciationExpenseAccountId"]
+ isOneToOne: false
+ referencedRelation: "accounts"
+ referencedColumns: ["id"]
+ },
+ {
+ foreignKeyName: "fixedAssetClass_disposalAccountId_fkey"
+ columns: ["disposalAccountId"]
+ isOneToOne: false
+ referencedRelation: "account"
+ referencedColumns: ["id"]
+ },
+ {
+ foreignKeyName: "fixedAssetClass_disposalAccountId_fkey"
+ columns: ["disposalAccountId"]
+ isOneToOne: false
+ referencedRelation: "accounts"
+ referencedColumns: ["id"]
+ },
+ {
+ foreignKeyName: "fixedAssetClass_updatedBy_fkey"
+ columns: ["updatedBy"]
+ isOneToOne: false
+ referencedRelation: "employees"
+ referencedColumns: ["id"]
+ },
+ {
+ foreignKeyName: "fixedAssetClass_updatedBy_fkey"
+ columns: ["updatedBy"]
+ isOneToOne: false
+ referencedRelation: "employeesAcrossCompanies"
+ referencedColumns: ["id"]
+ },
+ {
+ foreignKeyName: "fixedAssetClass_updatedBy_fkey"
+ columns: ["updatedBy"]
+ isOneToOne: false
+ referencedRelation: "employeeSummary"
+ referencedColumns: ["id"]
+ },
+ {
+ foreignKeyName: "fixedAssetClass_updatedBy_fkey"
+ columns: ["updatedBy"]
+ isOneToOne: false
+ referencedRelation: "user"
+ referencedColumns: ["id"]
+ },
+ {
+ foreignKeyName: "fixedAssetClass_updatedBy_fkey"
+ columns: ["updatedBy"]
+ isOneToOne: false
+ referencedRelation: "userDefaults"
+ referencedColumns: ["userId"]
+ },
+ {
+ foreignKeyName: "fixedAssetClass_writeDownAccountId_fkey"
+ columns: ["writeDownAccountId"]
+ isOneToOne: false
+ referencedRelation: "account"
+ referencedColumns: ["id"]
+ },
+ {
+ foreignKeyName: "fixedAssetClass_writeDownAccountId_fkey"
+ columns: ["writeDownAccountId"]
+ isOneToOne: false
+ referencedRelation: "accounts"
+ referencedColumns: ["id"]
+ },
+ {
+ foreignKeyName: "fixedAssetClass_writeOffAccountId_fkey"
+ columns: ["writeOffAccountId"]
+ isOneToOne: false
+ referencedRelation: "account"
+ referencedColumns: ["id"]
+ },
+ {
+ foreignKeyName: "fixedAssetClass_writeOffAccountId_fkey"
+ columns: ["writeOffAccountId"]
+ isOneToOne: false
+ referencedRelation: "accounts"
+ referencedColumns: ["id"]
+ },
+ ]
+ }
+ fixedAssetDisposal: {
+ Row: {
+ companyId: string
+ createdAt: string
+ createdBy: string
+ disposalDate: string
+ disposalMethod: Database["public"]["Enums"]["disposalMethod"]
+ fixedAssetId: string
+ gainLoss: number
+ id: string
+ journalId: string | null
+ netBookValueAtDisposal: number
+ saleProceeds: number
+ }
+ Insert: {
+ companyId: string
+ createdAt?: string
+ createdBy: string
+ disposalDate: string
+ disposalMethod: Database["public"]["Enums"]["disposalMethod"]
+ fixedAssetId: string
+ gainLoss: number
+ id?: string
+ journalId?: string | null
+ netBookValueAtDisposal: number
+ saleProceeds?: number
+ }
+ Update: {
+ companyId?: string
+ createdAt?: string
+ createdBy?: string
+ disposalDate?: string
+ disposalMethod?: Database["public"]["Enums"]["disposalMethod"]
+ fixedAssetId?: string
+ gainLoss?: number
+ id?: string
+ journalId?: string | null
+ netBookValueAtDisposal?: number
+ saleProceeds?: number
+ }
+ Relationships: [
+ {
+ foreignKeyName: "fixedAssetDisposal_companyId_fkey"
+ columns: ["companyId"]
+ isOneToOne: false
+ referencedRelation: "companies"
+ referencedColumns: ["id"]
+ },
+ {
+ foreignKeyName: "fixedAssetDisposal_companyId_fkey"
+ columns: ["companyId"]
+ isOneToOne: false
+ referencedRelation: "company"
+ referencedColumns: ["id"]
+ },
+ {
+ foreignKeyName: "fixedAssetDisposal_companyId_fkey"
+ columns: ["companyId"]
+ isOneToOne: false
+ referencedRelation: "customFieldTables"
+ referencedColumns: ["companyId"]
+ },
+ {
+ foreignKeyName: "fixedAssetDisposal_companyId_fkey"
+ columns: ["companyId"]
+ isOneToOne: false
+ referencedRelation: "integrations"
+ referencedColumns: ["companyId"]
+ },
+ {
+ foreignKeyName: "fixedAssetDisposal_createdBy_fkey"
+ columns: ["createdBy"]
+ isOneToOne: false
+ referencedRelation: "employees"
+ referencedColumns: ["id"]
+ },
+ {
+ foreignKeyName: "fixedAssetDisposal_createdBy_fkey"
+ columns: ["createdBy"]
+ isOneToOne: false
+ referencedRelation: "employeesAcrossCompanies"
+ referencedColumns: ["id"]
+ },
+ {
+ foreignKeyName: "fixedAssetDisposal_createdBy_fkey"
+ columns: ["createdBy"]
+ isOneToOne: false
+ referencedRelation: "employeeSummary"
+ referencedColumns: ["id"]
+ },
+ {
+ foreignKeyName: "fixedAssetDisposal_createdBy_fkey"
+ columns: ["createdBy"]
+ isOneToOne: false
+ referencedRelation: "user"
+ referencedColumns: ["id"]
+ },
+ {
+ foreignKeyName: "fixedAssetDisposal_createdBy_fkey"
+ columns: ["createdBy"]
+ isOneToOne: false
+ referencedRelation: "userDefaults"
+ referencedColumns: ["userId"]
+ },
+ {
+ foreignKeyName: "fixedAssetDisposal_fixedAssetId_fkey"
+ columns: ["fixedAssetId"]
+ isOneToOne: false
+ referencedRelation: "fixedAsset"
+ referencedColumns: ["id"]
+ },
+ {
+ foreignKeyName: "fixedAssetDisposal_journalId_fkey"
+ columns: ["journalId"]
+ isOneToOne: false
+ referencedRelation: "journal"
+ referencedColumns: ["id"]
+ },
+ {
+ foreignKeyName: "fixedAssetDisposal_journalId_fkey"
+ columns: ["journalId"]
+ isOneToOne: false
+ referencedRelation: "journalEntries"
+ referencedColumns: ["id"]
+ },
+ ]
+ }
+ fixedAssetUsageLog: {
+ Row: {
+ companyId: string
+ createdAt: string
+ createdBy: string
+ fixedAssetId: string
+ id: string
+ periodEnd: string
+ periodStart: string
+ unitsProduced: number
+ }
+ Insert: {
+ companyId: string
+ createdAt?: string
+ createdBy: string
+ fixedAssetId: string
+ id?: string
+ periodEnd: string
+ periodStart: string
+ unitsProduced: number
+ }
+ Update: {
+ companyId?: string
+ createdAt?: string
+ createdBy?: string
+ fixedAssetId?: string
+ id?: string
+ periodEnd?: string
+ periodStart?: string
+ unitsProduced?: number
+ }
+ Relationships: [
+ {
+ foreignKeyName: "fixedAssetUsageLog_companyId_fkey"
+ columns: ["companyId"]
+ isOneToOne: false
+ referencedRelation: "companies"
+ referencedColumns: ["id"]
+ },
+ {
+ foreignKeyName: "fixedAssetUsageLog_companyId_fkey"
+ columns: ["companyId"]
+ isOneToOne: false
+ referencedRelation: "company"
+ referencedColumns: ["id"]
+ },
+ {
+ foreignKeyName: "fixedAssetUsageLog_companyId_fkey"
+ columns: ["companyId"]
+ isOneToOne: false
+ referencedRelation: "customFieldTables"
+ referencedColumns: ["companyId"]
+ },
+ {
+ foreignKeyName: "fixedAssetUsageLog_companyId_fkey"
+ columns: ["companyId"]
+ isOneToOne: false
+ referencedRelation: "integrations"
+ referencedColumns: ["companyId"]
+ },
+ {
+ foreignKeyName: "fixedAssetUsageLog_createdBy_fkey"
+ columns: ["createdBy"]
+ isOneToOne: false
+ referencedRelation: "employees"
+ referencedColumns: ["id"]
+ },
+ {
+ foreignKeyName: "fixedAssetUsageLog_createdBy_fkey"
+ columns: ["createdBy"]
+ isOneToOne: false
+ referencedRelation: "employeesAcrossCompanies"
+ referencedColumns: ["id"]
+ },
+ {
+ foreignKeyName: "fixedAssetUsageLog_createdBy_fkey"
+ columns: ["createdBy"]
+ isOneToOne: false
+ referencedRelation: "employeeSummary"
+ referencedColumns: ["id"]
+ },
+ {
+ foreignKeyName: "fixedAssetUsageLog_createdBy_fkey"
+ columns: ["createdBy"]
+ isOneToOne: false
+ referencedRelation: "user"
+ referencedColumns: ["id"]
+ },
+ {
+ foreignKeyName: "fixedAssetUsageLog_createdBy_fkey"
+ columns: ["createdBy"]
+ isOneToOne: false
+ referencedRelation: "userDefaults"
+ referencedColumns: ["userId"]
+ },
+ {
+ foreignKeyName: "fixedAssetUsageLog_fixedAssetId_fkey"
+ columns: ["fixedAssetId"]
+ isOneToOne: false
+ referencedRelation: "fixedAsset"
+ referencedColumns: ["id"]
+ },
+ ]
+ }
fixture: {
Row: {
approved: boolean
@@ -14304,6 +15314,7 @@ export type Database = {
machineRate: number | null
machineTime: number
machineUnit: Database["public"]["Enums"]["factor"]
+ manuallyScheduled: boolean
operationLeadTime: number
operationMinimumCost: number
operationOrder: Database["public"]["Enums"]["methodOperationOrder"]
@@ -14349,6 +15360,7 @@ export type Database = {
machineRate?: number | null
machineTime?: number
machineUnit?: Database["public"]["Enums"]["factor"]
+ manuallyScheduled?: boolean
operationLeadTime?: number
operationMinimumCost?: number
operationOrder?: Database["public"]["Enums"]["methodOperationOrder"]
@@ -14394,6 +15406,7 @@ export type Database = {
machineRate?: number | null
machineTime?: number
machineUnit?: Database["public"]["Enums"]["factor"]
+ manuallyScheduled?: boolean
operationLeadTime?: number
operationMinimumCost?: number
operationOrder?: Database["public"]["Enums"]["methodOperationOrder"]
@@ -28423,6 +29436,13 @@ export type Database = {
referencedRelation: "accounts"
referencedColumns: ["id"]
},
+ {
+ foreignKeyName: "purchaseOrderLine_assetId_fkey"
+ columns: ["assetId"]
+ isOneToOne: false
+ referencedRelation: "fixedAsset"
+ referencedColumns: ["id"]
+ },
{
foreignKeyName: "purchaseOrderLine_costCenterId_fkey"
columns: ["costCenterId"]
@@ -33237,6 +34257,144 @@ export type Database = {
},
]
}
+ receiptFixedAssetLine: {
+ Row: {
+ companyId: string
+ createdAt: string
+ createdBy: string
+ id: string
+ purchaseOrderLineId: string
+ receiptId: string
+ received: boolean
+ serialNumber: string | null
+ updatedAt: string | null
+ updatedBy: string | null
+ }
+ Insert: {
+ companyId: string
+ createdAt?: string
+ createdBy: string
+ id?: string
+ purchaseOrderLineId: string
+ receiptId: string
+ received?: boolean
+ serialNumber?: string | null
+ updatedAt?: string | null
+ updatedBy?: string | null
+ }
+ Update: {
+ companyId?: string
+ createdAt?: string
+ createdBy?: string
+ id?: string
+ purchaseOrderLineId?: string
+ receiptId?: string
+ received?: boolean
+ serialNumber?: string | null
+ updatedAt?: string | null
+ updatedBy?: string | null
+ }
+ Relationships: [
+ {
+ foreignKeyName: "receiptFixedAssetLine_companyId_fkey"
+ columns: ["companyId"]
+ isOneToOne: false
+ referencedRelation: "companies"
+ referencedColumns: ["id"]
+ },
+ {
+ foreignKeyName: "receiptFixedAssetLine_companyId_fkey"
+ columns: ["companyId"]
+ isOneToOne: false
+ referencedRelation: "company"
+ referencedColumns: ["id"]
+ },
+ {
+ foreignKeyName: "receiptFixedAssetLine_companyId_fkey"
+ columns: ["companyId"]
+ isOneToOne: false
+ referencedRelation: "customFieldTables"
+ referencedColumns: ["companyId"]
+ },
+ {
+ foreignKeyName: "receiptFixedAssetLine_companyId_fkey"
+ columns: ["companyId"]
+ isOneToOne: false
+ referencedRelation: "integrations"
+ referencedColumns: ["companyId"]
+ },
+ {
+ foreignKeyName: "receiptFixedAssetLine_createdBy_fkey"
+ columns: ["createdBy"]
+ isOneToOne: false
+ referencedRelation: "employees"
+ referencedColumns: ["id"]
+ },
+ {
+ foreignKeyName: "receiptFixedAssetLine_createdBy_fkey"
+ columns: ["createdBy"]
+ isOneToOne: false
+ referencedRelation: "employeesAcrossCompanies"
+ referencedColumns: ["id"]
+ },
+ {
+ foreignKeyName: "receiptFixedAssetLine_createdBy_fkey"
+ columns: ["createdBy"]
+ isOneToOne: false
+ referencedRelation: "employeeSummary"
+ referencedColumns: ["id"]
+ },
+ {
+ foreignKeyName: "receiptFixedAssetLine_createdBy_fkey"
+ columns: ["createdBy"]
+ isOneToOne: false
+ referencedRelation: "user"
+ referencedColumns: ["id"]
+ },
+ {
+ foreignKeyName: "receiptFixedAssetLine_createdBy_fkey"
+ columns: ["createdBy"]
+ isOneToOne: false
+ referencedRelation: "userDefaults"
+ referencedColumns: ["userId"]
+ },
+ {
+ foreignKeyName: "receiptFixedAssetLine_purchaseOrderLineId_fkey"
+ columns: ["purchaseOrderLineId"]
+ isOneToOne: false
+ referencedRelation: "openPurchaseOrderLines"
+ referencedColumns: ["id"]
+ },
+ {
+ foreignKeyName: "receiptFixedAssetLine_purchaseOrderLineId_fkey"
+ columns: ["purchaseOrderLineId"]
+ isOneToOne: false
+ referencedRelation: "purchaseOrderLine"
+ referencedColumns: ["id"]
+ },
+ {
+ foreignKeyName: "receiptFixedAssetLine_purchaseOrderLineId_fkey"
+ columns: ["purchaseOrderLineId"]
+ isOneToOne: false
+ referencedRelation: "purchaseOrderLines"
+ referencedColumns: ["id"]
+ },
+ {
+ foreignKeyName: "receiptFixedAssetLine_receiptId_fkey"
+ columns: ["receiptId"]
+ isOneToOne: false
+ referencedRelation: "receipt"
+ referencedColumns: ["id"]
+ },
+ {
+ foreignKeyName: "receiptFixedAssetLine_receiptId_fkey"
+ columns: ["receiptId"]
+ isOneToOne: false
+ referencedRelation: "receipts"
+ referencedColumns: ["id"]
+ },
+ ]
+ }
receiptLine: {
Row: {
companyId: string
@@ -34114,6 +35272,13 @@ export type Database = {
referencedRelation: "accounts"
referencedColumns: ["id"]
},
+ {
+ foreignKeyName: "salesInvoiceLine_assetId_fkey"
+ columns: ["assetId"]
+ isOneToOne: false
+ referencedRelation: "fixedAsset"
+ referencedColumns: ["id"]
+ },
{
foreignKeyName: "salesInvoiceLine_companyId_fkey"
columns: ["companyId"]
@@ -35086,6 +36251,13 @@ export type Database = {
referencedRelation: "accounts"
referencedColumns: ["id"]
},
+ {
+ foreignKeyName: "salesOrderLine_assetId_fkey"
+ columns: ["assetId"]
+ isOneToOne: false
+ referencedRelation: "fixedAsset"
+ referencedColumns: ["id"]
+ },
{
foreignKeyName: "salesOrderLine_createdBy_fkey"
columns: ["createdBy"]
@@ -36547,7 +37719,7 @@ export type Database = {
},
]
}
- searchIndex_PjY5r4hY5NXa8db3oSSoQs: {
+ searchIndex_G3AKJj1orZNDa3fwn8a6Uy: {
Row: {
createdAt: string
description: string | null
@@ -37493,6 +38665,137 @@ export type Database = {
},
]
}
+ shipmentFixedAssetLine: {
+ Row: {
+ companyId: string
+ createdAt: string
+ createdBy: string
+ id: string
+ salesOrderLineId: string
+ serialNumber: string | null
+ shipmentId: string
+ shipped: boolean
+ updatedAt: string | null
+ updatedBy: string | null
+ }
+ Insert: {
+ companyId: string
+ createdAt?: string
+ createdBy: string
+ id?: string
+ salesOrderLineId: string
+ serialNumber?: string | null
+ shipmentId: string
+ shipped?: boolean
+ updatedAt?: string | null
+ updatedBy?: string | null
+ }
+ Update: {
+ companyId?: string
+ createdAt?: string
+ createdBy?: string
+ id?: string
+ salesOrderLineId?: string
+ serialNumber?: string | null
+ shipmentId?: string
+ shipped?: boolean
+ updatedAt?: string | null
+ updatedBy?: string | null
+ }
+ Relationships: [
+ {
+ foreignKeyName: "shipmentFixedAssetLine_companyId_fkey"
+ columns: ["companyId"]
+ isOneToOne: false
+ referencedRelation: "companies"
+ referencedColumns: ["id"]
+ },
+ {
+ foreignKeyName: "shipmentFixedAssetLine_companyId_fkey"
+ columns: ["companyId"]
+ isOneToOne: false
+ referencedRelation: "company"
+ referencedColumns: ["id"]
+ },
+ {
+ foreignKeyName: "shipmentFixedAssetLine_companyId_fkey"
+ columns: ["companyId"]
+ isOneToOne: false
+ referencedRelation: "customFieldTables"
+ referencedColumns: ["companyId"]
+ },
+ {
+ foreignKeyName: "shipmentFixedAssetLine_companyId_fkey"
+ columns: ["companyId"]
+ isOneToOne: false
+ referencedRelation: "integrations"
+ referencedColumns: ["companyId"]
+ },
+ {
+ foreignKeyName: "shipmentFixedAssetLine_createdBy_fkey"
+ columns: ["createdBy"]
+ isOneToOne: false
+ referencedRelation: "employees"
+ referencedColumns: ["id"]
+ },
+ {
+ foreignKeyName: "shipmentFixedAssetLine_createdBy_fkey"
+ columns: ["createdBy"]
+ isOneToOne: false
+ referencedRelation: "employeesAcrossCompanies"
+ referencedColumns: ["id"]
+ },
+ {
+ foreignKeyName: "shipmentFixedAssetLine_createdBy_fkey"
+ columns: ["createdBy"]
+ isOneToOne: false
+ referencedRelation: "employeeSummary"
+ referencedColumns: ["id"]
+ },
+ {
+ foreignKeyName: "shipmentFixedAssetLine_createdBy_fkey"
+ columns: ["createdBy"]
+ isOneToOne: false
+ referencedRelation: "user"
+ referencedColumns: ["id"]
+ },
+ {
+ foreignKeyName: "shipmentFixedAssetLine_createdBy_fkey"
+ columns: ["createdBy"]
+ isOneToOne: false
+ referencedRelation: "userDefaults"
+ referencedColumns: ["userId"]
+ },
+ {
+ foreignKeyName: "shipmentFixedAssetLine_salesOrderLineId_fkey"
+ columns: ["salesOrderLineId"]
+ isOneToOne: false
+ referencedRelation: "openSalesOrderLines"
+ referencedColumns: ["id"]
+ },
+ {
+ foreignKeyName: "shipmentFixedAssetLine_salesOrderLineId_fkey"
+ columns: ["salesOrderLineId"]
+ isOneToOne: false
+ referencedRelation: "salesOrderLine"
+ referencedColumns: ["id"]
+ },
+ {
+ foreignKeyName: "shipmentFixedAssetLine_salesOrderLineId_fkey"
+ columns: ["salesOrderLineId"]
+ isOneToOne: false
+ referencedRelation: "salesOrderLines"
+ referencedColumns: ["id"]
+ },
+ {
+ foreignKeyName: "shipmentFixedAssetLine_shipmentId_fkey"
+ columns: ["shipmentId"]
+ isOneToOne: false
+ referencedRelation: "shipment"
+ referencedColumns: ["id"]
+ },
+ ]
+ }
shipmentLine: {
Row: {
companyId: string
@@ -45744,6 +47047,7 @@ export type Database = {
createdBy: string
customFields: Json | null
defaultStandardFactor: Database["public"]["Enums"]["factor"]
+ departmentId: string | null
description: string | null
id: string
laborRate: number
@@ -45763,6 +47067,7 @@ export type Database = {
createdBy: string
customFields?: Json | null
defaultStandardFactor?: Database["public"]["Enums"]["factor"]
+ departmentId?: string | null
description?: string | null
id?: string
laborRate?: number
@@ -45782,6 +47087,7 @@ export type Database = {
createdBy?: string
customFields?: Json | null
defaultStandardFactor?: Database["public"]["Enums"]["factor"]
+ departmentId?: string | null
description?: string | null
id?: string
laborRate?: number
@@ -45858,6 +47164,13 @@ export type Database = {
referencedRelation: "userDefaults"
referencedColumns: ["userId"]
},
+ {
+ foreignKeyName: "workCenter_departmentId_fkey"
+ columns: ["departmentId"]
+ isOneToOne: false
+ referencedRelation: "department"
+ referencedColumns: ["id"]
+ },
{
foreignKeyName: "workCenter_locationId_fkey"
columns: ["locationId"]
@@ -51822,14 +53135,14 @@ export type Database = {
},
{
foreignKeyName: "partner_id_fkey"
- columns: ["supplierLocationId"]
+ columns: ["id"]
isOneToOne: false
referencedRelation: "supplierLocation"
referencedColumns: ["id"]
},
{
foreignKeyName: "partner_id_fkey"
- columns: ["id"]
+ columns: ["supplierLocationId"]
isOneToOne: false
referencedRelation: "supplierLocation"
referencedColumns: ["id"]
@@ -52273,6 +53586,8 @@ export type Database = {
accountId: string | null
accountName: string | null
assetId: string | null
+ assetName: string | null
+ assetReadableId: string | null
companyId: string | null
conversionFactor: number | null
costCenterId: string | null
@@ -52935,6 +54250,8 @@ export type Database = {
accountId: string | null
accountName: string | null
assetId: string | null
+ assetName: string | null
+ assetReadableId: string | null
autodeskUrn: string | null
companyId: string | null
conversionFactor: number | null
@@ -53013,6 +54330,13 @@ export type Database = {
referencedRelation: "accounts"
referencedColumns: ["id"]
},
+ {
+ foreignKeyName: "purchaseOrderLine_assetId_fkey"
+ columns: ["assetId"]
+ isOneToOne: false
+ referencedRelation: "fixedAsset"
+ referencedColumns: ["id"]
+ },
{
foreignKeyName: "purchaseOrderLine_costCenterId_fkey"
columns: ["costCenterId"]
@@ -53313,14 +54637,14 @@ export type Database = {
Relationships: [
{
foreignKeyName: "address_countryCode_fkey"
- columns: ["supplierCountryCode"]
+ columns: ["customerCountryCode"]
isOneToOne: false
referencedRelation: "country"
referencedColumns: ["alpha2"]
},
{
foreignKeyName: "address_countryCode_fkey"
- columns: ["customerCountryCode"]
+ columns: ["supplierCountryCode"]
isOneToOne: false
referencedRelation: "country"
referencedColumns: ["alpha2"]
@@ -56392,6 +57716,8 @@ export type Database = {
accountId: string | null
addOnCost: number | null
assetId: string | null
+ assetName: string | null
+ assetReadableId: string | null
companyId: string | null
convertedAddOnCost: number | null
convertedNonTaxableAddOnCost: number | null
@@ -56450,6 +57776,13 @@ export type Database = {
referencedRelation: "accounts"
referencedColumns: ["id"]
},
+ {
+ foreignKeyName: "salesInvoiceLine_assetId_fkey"
+ columns: ["assetId"]
+ isOneToOne: false
+ referencedRelation: "fixedAsset"
+ referencedColumns: ["id"]
+ },
{
foreignKeyName: "salesInvoiceLine_companyId_fkey"
columns: ["companyId"]
@@ -57027,6 +58360,8 @@ export type Database = {
accountId: string | null
addOnCost: number | null
assetId: string | null
+ assetName: string | null
+ assetReadableId: string | null
autodeskUrn: string | null
companyId: string | null
convertedAddOnCost: number | null
@@ -57121,6 +58456,13 @@ export type Database = {
referencedRelation: "accounts"
referencedColumns: ["id"]
},
+ {
+ foreignKeyName: "salesOrderLine_assetId_fkey"
+ columns: ["assetId"]
+ isOneToOne: false
+ referencedRelation: "fixedAsset"
+ referencedColumns: ["id"]
+ },
{
foreignKeyName: "salesOrderLine_createdBy_fkey"
columns: ["createdBy"]
@@ -57303,14 +58645,14 @@ export type Database = {
Relationships: [
{
foreignKeyName: "address_countryCode_fkey"
- columns: ["paymentCountryCode"]
+ columns: ["customerCountryCode"]
isOneToOne: false
referencedRelation: "country"
referencedColumns: ["alpha2"]
},
{
foreignKeyName: "address_countryCode_fkey"
- columns: ["customerCountryCode"]
+ columns: ["paymentCountryCode"]
isOneToOne: false
referencedRelation: "country"
referencedColumns: ["alpha2"]
@@ -60312,6 +61654,8 @@ export type Database = {
createdBy: string | null
customFields: Json | null
defaultStandardFactor: Database["public"]["Enums"]["factor"] | null
+ departmentId: string | null
+ departmentName: string | null
description: string | null
id: string | null
laborRate: number | null
@@ -60390,6 +61734,13 @@ export type Database = {
referencedRelation: "userDefaults"
referencedColumns: ["userId"]
},
+ {
+ foreignKeyName: "workCenter_departmentId_fkey"
+ columns: ["departmentId"]
+ isOneToOne: false
+ referencedRelation: "department"
+ referencedColumns: ["id"]
+ },
{
foreignKeyName: "workCenter_locationId_fkey"
columns: ["locationId"]
@@ -60451,6 +61802,7 @@ export type Database = {
createdBy: string | null
customFields: Json | null
defaultStandardFactor: Database["public"]["Enums"]["factor"] | null
+ departmentId: string | null
description: string | null
id: string | null
isBlocked: boolean | null
@@ -60529,6 +61881,13 @@ export type Database = {
referencedRelation: "userDefaults"
referencedColumns: ["userId"]
},
+ {
+ foreignKeyName: "workCenter_departmentId_fkey"
+ columns: ["departmentId"]
+ isOneToOne: false
+ referencedRelation: "department"
+ referencedColumns: ["id"]
+ },
{
foreignKeyName: "workCenter_locationId_fkey"
columns: ["locationId"]
@@ -62778,6 +64137,10 @@ export type Database = {
customRuleTargetType: "item" | "storageUnit" | "workCenter"
deadlineType: "No Deadline" | "ASAP" | "Soft Deadline" | "Hard Deadline"
demandSourceType: "Sales Order" | "Job Material"
+ depreciationMethod:
+ | "Straight Line"
+ | "Declining Balance"
+ | "Units of Production"
dimensionEntityType:
| "Custom"
| "Location"
@@ -62787,6 +64150,10 @@ export type Database = {
| "Department"
| "Employee"
| "CostCenter"
+ | "WorkCenter"
+ | "Process"
+ | "FixedAssetClass"
+ disposalMethod: "Sale" | "Scrapping"
disposition:
| "Conditional Acceptance"
| "Deviation Accepted"
@@ -62867,6 +64234,7 @@ export type Database = {
| "Seconds/Piece"
| "Total Hours"
| "Total Minutes"
+ fixedAssetStatus: "Draft" | "Active" | "Fully Depreciated" | "Disposed"
fulfillmentType: "Inventory" | "Job"
gaugeCalibrationStatus:
| "Pending"
@@ -62987,6 +64355,8 @@ export type Database = {
| "Job Receipt"
| "Production Event"
| "Job Close"
+ | "Asset Depreciation"
+ | "Asset Disposal"
journalEntryStatus: "Draft" | "Posted" | "Reversed"
journalLineDocumentType:
| "Receipt"
@@ -63005,6 +64375,8 @@ export type Database = {
| "Production Event"
| "Job Close"
kanbanOutput: "label" | "qrcode" | "url"
+ macrsConvention: "Half-Year" | "Mid-Quarter"
+ macrsPropertyClass: "3" | "5" | "7" | "10" | "15" | "20" | "27.5" | "39"
maintenanceDispatchPriority: "Low" | "Medium" | "High" | "Critical"
maintenanceDispatchStatus:
| "Open"
@@ -63266,6 +64638,7 @@ export type Database = {
supplierStatusType: "Active" | "Inactive" | "Pending" | "Rejected"
supplySourceType: "Purchase Order" | "Production Order"
tableViewType: "Public" | "Private"
+ taxDepreciationMethod: "Straight Line" | "Declining Balance" | "MACRS"
taxExemptionReason:
| "Resale"
| "Government"
@@ -64032,6 +65405,11 @@ export const Constants = {
customRuleTargetType: ["item", "storageUnit", "workCenter"],
deadlineType: ["No Deadline", "ASAP", "Soft Deadline", "Hard Deadline"],
demandSourceType: ["Sales Order", "Job Material"],
+ depreciationMethod: [
+ "Straight Line",
+ "Declining Balance",
+ "Units of Production",
+ ],
dimensionEntityType: [
"Custom",
"Location",
@@ -64041,7 +65419,11 @@ export const Constants = {
"Department",
"Employee",
"CostCenter",
+ "WorkCenter",
+ "Process",
+ "FixedAssetClass",
],
+ disposalMethod: ["Sale", "Scrapping"],
disposition: [
"Conditional Acceptance",
"Deviation Accepted",
@@ -64129,6 +65511,7 @@ export const Constants = {
"Total Hours",
"Total Minutes",
],
+ fixedAssetStatus: ["Draft", "Active", "Fully Depreciated", "Disposed"],
fulfillmentType: ["Inventory", "Job"],
gaugeCalibrationStatus: [
"Pending",
@@ -64259,6 +65642,8 @@ export const Constants = {
"Job Receipt",
"Production Event",
"Job Close",
+ "Asset Depreciation",
+ "Asset Disposal",
],
journalEntryStatus: ["Draft", "Posted", "Reversed"],
journalLineDocumentType: [
@@ -64279,6 +65664,8 @@ export const Constants = {
"Job Close",
],
kanbanOutput: ["label", "qrcode", "url"],
+ macrsConvention: ["Half-Year", "Mid-Quarter"],
+ macrsPropertyClass: ["3", "5", "7", "10", "15", "20", "27.5", "39"],
maintenanceDispatchPriority: ["Low", "Medium", "High", "Critical"],
maintenanceDispatchStatus: [
"Open",
@@ -64566,6 +65953,7 @@ export const Constants = {
supplierStatusType: ["Active", "Inactive", "Pending", "Rejected"],
supplySourceType: ["Purchase Order", "Production Order"],
tableViewType: ["Public", "Private"],
+ taxDepreciationMethod: ["Straight Line", "Declining Balance", "MACRS"],
taxExemptionReason: [
"Resale",
"Government",
diff --git a/packages/database/supabase/functions/lib/scheduling/date-calculator.ts b/packages/database/supabase/functions/lib/scheduling/date-calculator.ts
index 8687f3a372..1e31e06b13 100644
--- a/packages/database/supabase/functions/lib/scheduling/date-calculator.ts
+++ b/packages/database/supabase/functions/lib/scheduling/date-calculator.ts
@@ -97,6 +97,32 @@ export class BackwardSchedulingStrategy implements SchedulingStrategy {
const durationDays = calculateDurationDays(op);
const durationHours = calculateDurationHours(op);
+ // If manually scheduled, preserve the existing dueDate and derive startDate
+ if (op.manuallyScheduled && op.dueDate) {
+ const dueDateObj = new Date(op.dueDate);
+ const startDateObj = subtractBusinessDays(dueDateObj, durationDays);
+ const startDate = formatDate(startDateObj);
+
+ const hasConflict = startDate < today;
+ const conflictReason = hasConflict
+ ? `Operation must start on ${startDate} but current date is ${today}`
+ : null;
+
+ const scheduledOp: ScheduledOperation = {
+ ...op,
+ id: op.id,
+ startDate,
+ dueDate: op.dueDate,
+ priority: op.priority ?? 99,
+ durationHours,
+ durationDays,
+ hasConflict,
+ conflictReason,
+ };
+ scheduled.set(opId, scheduledOp);
+ continue;
+ }
+
// Calculate due date
let dueDate: string;
const dependents = graph.getDependents(opId);
@@ -214,6 +240,27 @@ export class ForwardSchedulingStrategy implements SchedulingStrategy {
const durationDays = calculateDurationDays(op);
const durationHours = calculateDurationHours(op);
+ // If manually scheduled, preserve the existing dueDate and derive startDate
+ if (op.manuallyScheduled && op.dueDate) {
+ const dueDateObj = new Date(op.dueDate);
+ const startDateObj = subtractBusinessDays(dueDateObj, durationDays);
+ const opStartDate = formatDate(startDateObj);
+
+ const scheduledOp: ScheduledOperation = {
+ ...op,
+ id: op.id,
+ startDate: opStartDate,
+ dueDate: op.dueDate,
+ priority: op.priority ?? 1,
+ durationHours,
+ durationDays,
+ hasConflict: false,
+ conflictReason: null,
+ };
+ scheduled.set(opId, scheduledOp);
+ continue;
+ }
+
// Calculate start date
let opStartDate: string;
const dependencies = graph.getDependencies(opId);
diff --git a/packages/database/supabase/functions/lib/scheduling/scheduling-engine.ts b/packages/database/supabase/functions/lib/scheduling/scheduling-engine.ts
index c0a89210b2..ea5915ffd6 100644
--- a/packages/database/supabase/functions/lib/scheduling/scheduling-engine.ts
+++ b/packages/database/supabase/functions/lib/scheduling/scheduling-engine.ts
@@ -524,20 +524,39 @@ export class SchedulingEngine {
*/
async persistChanges(): Promise<void> {
for (const op of this.scheduledOperations.values()) {
- await this.db
- .updateTable("jobOperation")
- .set({
- startDate: op.startDate,
- dueDate: op.dueDate,
- priority: op.priority ?? undefined,
- workCenterId: op.workCenterId,
- hasConflict: op.hasConflict,
- conflictReason: op.conflictReason,
- updatedAt: new Date().toISOString(),
- updatedBy: this.userId,
- })
- .where("id", "=", op.id)
- .execute();
+ const originalOp = this.operations.find((o) => o.id === op.id);
+ const isManuallyScheduled = originalOp?.manuallyScheduled ?? false;
+
+ if (isManuallyScheduled) {
+ await this.db
+ .updateTable("jobOperation")
+ .set({
+ startDate: op.startDate,
+ priority: op.priority ?? undefined,
+ workCenterId: op.workCenterId,
+ hasConflict: op.hasConflict,
+ conflictReason: op.conflictReason,
+ updatedAt: new Date().toISOString(),
+ updatedBy: this.userId,
+ })
+ .where("id", "=", op.id)
+ .execute();
+ } else {
+ await this.db
+ .updateTable("jobOperation")
+ .set({
+ startDate: op.startDate,
+ dueDate: op.dueDate,
+ priority: op.priority ?? undefined,
+ workCenterId: op.workCenterId,
+ hasConflict: op.hasConflict,
+ conflictReason: op.conflictReason,
+ updatedAt: new Date().toISOString(),
+ updatedBy: this.userId,
+ })
+ .where("id", "=", op.id)
+ .execute();
+ }
}
// Update job status if initial scheduling
diff --git a/packages/database/supabase/functions/lib/scheduling/types.ts b/packages/database/supabase/functions/lib/scheduling/types.ts
index d048250fe8..07dfa3c8bb 100644
--- a/packages/database/supabase/functions/lib/scheduling/types.ts
+++ b/packages/database/supabase/functions/lib/scheduling/types.ts
@@ -26,6 +26,7 @@ export type BaseOperation = {
deadlineType?: DeadlineType;
description?: string | null;
dueDate?: string | null;
+ manuallyScheduled?: boolean;
startDate?: string | null;
laborTime?: number;
laborUnit?: FactorUnit;
diff --git a/packages/database/supabase/functions/lib/types.ts b/packages/database/supabase/functions/lib/types.ts
index e42609ed29..d5addce2bf 100644
--- a/packages/database/supabase/functions/lib/types.ts
+++ b/packages/database/supabase/functions/lib/types.ts
@@ -342,6 +342,8 @@ export type Database = {
costOfGoodsSoldAccount: string
currencyTranslationAccount: string
customerPaymentDiscountAccount: string
+ deferredTaxExpenseAccountId: string | null
+ deferredTaxLiabilityAccountId: string | null
goodsReceivedNotInvoicedAccount: string
indirectCostAccount: string
interestAccount: string
@@ -385,6 +387,8 @@ export type Database = {
costOfGoodsSoldAccount: string
currencyTranslationAccount: string
customerPaymentDiscountAccount: string
+ deferredTaxExpenseAccountId?: string | null
+ deferredTaxLiabilityAccountId?: string | null
goodsReceivedNotInvoicedAccount: string
indirectCostAccount: string
interestAccount: string
@@ -428,6 +432,8 @@ export type Database = {
costOfGoodsSoldAccount?: string
currencyTranslationAccount?: string
customerPaymentDiscountAccount?: string
+ deferredTaxExpenseAccountId?: string | null
+ deferredTaxLiabilityAccountId?: string | null
goodsReceivedNotInvoicedAccount?: string
indirectCostAccount?: string
interestAccount?: string
@@ -626,6 +632,34 @@ export type Database = {
referencedRelation: "accounts"
referencedColumns: ["id"]
},
+ {
+ foreignKeyName: "accountDefault_deferredTaxExpenseAccountId_fkey"
+ columns: ["deferredTaxExpenseAccountId"]
+ isOneToOne: false
+ referencedRelation: "account"
+ referencedColumns: ["id"]
+ },
+ {
+ foreignKeyName: "accountDefault_deferredTaxExpenseAccountId_fkey"
+ columns: ["deferredTaxExpenseAccountId"]
+ isOneToOne: false
+ referencedRelation: "accounts"
+ referencedColumns: ["id"]
+ },
+ {
+ foreignKeyName: "accountDefault_deferredTaxLiabilityAccountId_fkey"
+ columns: ["deferredTaxLiabilityAccountId"]
+ isOneToOne: false
+ referencedRelation: "account"
+ referencedColumns: ["id"]
+ },
+ {
+ foreignKeyName: "accountDefault_deferredTaxLiabilityAccountId_fkey"
+ columns: ["deferredTaxLiabilityAccountId"]
+ isOneToOne: false
+ referencedRelation: "accounts"
+ referencedColumns: ["id"]
+ },
{
foreignKeyName: "accountDefault_fkey"
columns: ["companyId"]
@@ -2832,6 +2866,8 @@ export type Database = {
accountsPayableEmail: string | null
accountsReceivableAddress: boolean | null
accountsReceivableEmail: string | null
+ assetTaxDepreciationEnabled: boolean
+ assetTaxRate: number | null
consoleEnabled: boolean
defaultCustomerCc: string[] | null
defaultSupplierCc: string[] | null
@@ -2873,6 +2909,8 @@ export type Database = {
accountsPayableEmail?: string | null
accountsReceivableAddress?: boolean | null
accountsReceivableEmail?: string | null
+ assetTaxDepreciationEnabled?: boolean
+ assetTaxRate?: number | null
consoleEnabled?: boolean
defaultCustomerCc?: string[] | null
defaultSupplierCc?: string[] | null
@@ -2914,6 +2952,8 @@ export type Database = {
accountsPayableEmail?: string | null
accountsReceivableAddress?: boolean | null
accountsReceivableEmail?: string | null
+ assetTaxDepreciationEnabled?: boolean
+ assetTaxRate?: number | null
consoleEnabled?: boolean
defaultCustomerCc?: string[] | null
defaultSupplierCc?: string[] | null
@@ -7582,6 +7622,228 @@ export type Database = {
},
]
}
+ depreciationRun: {
+ Row: {
+ companyId: string
+ createdAt: string
+ createdBy: string
+ depreciationRunId: string
+ id: string
+ periodEnd: string
+ postedAt: string | null
+ postedBy: string | null
+ status: string
+ }
+ Insert: {
+ companyId: string
+ createdAt?: string
+ createdBy: string
+ depreciationRunId: string
+ id?: string
+ periodEnd: string
+ postedAt?: string | null
+ postedBy?: string | null
+ status?: string
+ }
+ Update: {
+ companyId?: string
+ createdAt?: string
+ createdBy?: string
+ depreciationRunId?: string
+ id?: string
+ periodEnd?: string
+ postedAt?: string | null
+ postedBy?: string | null
+ status?: string
+ }
+ Relationships: [
+ {
+ foreignKeyName: "depreciationRun_companyId_fkey"
+ columns: ["companyId"]
+ isOneToOne: false
+ referencedRelation: "companies"
+ referencedColumns: ["id"]
+ },
+ {
+ foreignKeyName: "depreciationRun_companyId_fkey"
+ columns: ["companyId"]
+ isOneToOne: false
+ referencedRelation: "company"
+ referencedColumns: ["id"]
+ },
+ {
+ foreignKeyName: "depreciationRun_companyId_fkey"
+ columns: ["companyId"]
+ isOneToOne: false
+ referencedRelation: "customFieldTables"
+ referencedColumns: ["companyId"]
+ },
+ {
+ foreignKeyName: "depreciationRun_companyId_fkey"
+ columns: ["companyId"]
+ isOneToOne: false
+ referencedRelation: "integrations"
+ referencedColumns: ["companyId"]
+ },
+ {
+ foreignKeyName: "depreciationRun_createdBy_fkey"
+ columns: ["createdBy"]
+ isOneToOne: false
+ referencedRelation: "employees"
+ referencedColumns: ["id"]
+ },
+ {
+ foreignKeyName: "depreciationRun_createdBy_fkey"
+ columns: ["createdBy"]
+ isOneToOne: false
+ referencedRelation: "employeesAcrossCompanies"
+ referencedColumns: ["id"]
+ },
+ {
+ foreignKeyName: "depreciationRun_createdBy_fkey"
+ columns: ["createdBy"]
+ isOneToOne: false
+ referencedRelation: "employeeSummary"
+ referencedColumns: ["id"]
+ },
+ {
+ foreignKeyName: "depreciationRun_createdBy_fkey"
+ columns: ["createdBy"]
+ isOneToOne: false
+ referencedRelation: "user"
+ referencedColumns: ["id"]
+ },
+ {
+ foreignKeyName: "depreciationRun_createdBy_fkey"
+ columns: ["createdBy"]
+ isOneToOne: false
+ referencedRelation: "userDefaults"
+ referencedColumns: ["userId"]
+ },
+ {
+ foreignKeyName: "depreciationRun_postedBy_fkey"
+ columns: ["postedBy"]
+ isOneToOne: false
+ referencedRelation: "employees"
+ referencedColumns: ["id"]
+ },
+ {
+ foreignKeyName: "depreciationRun_postedBy_fkey"
+ columns: ["postedBy"]
+ isOneToOne: false
+ referencedRelation: "employeesAcrossCompanies"
+ referencedColumns: ["id"]
+ },
+ {
+ foreignKeyName: "depreciationRun_postedBy_fkey"
+ columns: ["postedBy"]
+ isOneToOne: false
+ referencedRelation: "employeeSummary"
+ referencedColumns: ["id"]
+ },
+ {
+ foreignKeyName: "depreciationRun_postedBy_fkey"
+ columns: ["postedBy"]
+ isOneToOne: false
+ referencedRelation: "user"
+ referencedColumns: ["id"]
+ },
+ {
+ foreignKeyName: "depreciationRun_postedBy_fkey"
+ columns: ["postedBy"]
+ isOneToOne: false
+ referencedRelation: "userDefaults"
+ referencedColumns: ["userId"]
+ },
+ ]
+ }
+ depreciationRunLine: {
+ Row: {
+ amount: number
+ companyId: string
+ depreciationRunId: string
+ fixedAssetId: string
+ id: string
+ journalId: string | null
+ taxAmount: number | null
+ }
+ Insert: {
+ amount: number
+ companyId: string
+ depreciationRunId: string
+ fixedAssetId: string
+ id?: string
+ journalId?: string | null
+ taxAmount?: number | null
+ }
+ Update: {
+ amount?: number
+ companyId?: string
+ depreciationRunId?: string
+ fixedAssetId?: string
+ id?: string
+ journalId?: string | null
+ taxAmount?: number | null
+ }
+ Relationships: [
+ {
+ foreignKeyName: "depreciationRunLine_companyId_fkey"
+ columns: ["companyId"]
+ isOneToOne: false
+ referencedRelation: "companies"
+ referencedColumns: ["id"]
+ },
+ {
+ foreignKeyName: "depreciationRunLine_companyId_fkey"
+ columns: ["companyId"]
+ isOneToOne: false
+ referencedRelation: "company"
+ referencedColumns: ["id"]
+ },
+ {
+ foreignKeyName: "depreciationRunLine_companyId_fkey"
+ columns: ["companyId"]
+ isOneToOne: false
+ referencedRelation: "customFieldTables"
+ referencedColumns: ["companyId"]
+ },
+ {
+ foreignKeyName: "depreciationRunLine_companyId_fkey"
+ columns: ["companyId"]
+ isOneToOne: false
+ referencedRelation: "integrations"
+ referencedColumns: ["companyId"]
+ },
+ {
+ foreignKeyName: "depreciationRunLine_depreciationRunId_fkey"
+ columns: ["depreciationRunId"]
+ isOneToOne: false
+ referencedRelation: "depreciationRun"
+ referencedColumns: ["id"]
+ },
+ {
+ foreignKeyName: "depreciationRunLine_fixedAssetId_fkey"
+ columns: ["fixedAssetId"]
+ isOneToOne: false
+ referencedRelation: "fixedAsset"
+ referencedColumns: ["id"]
+ },
+ {
+ foreignKeyName: "depreciationRunLine_journalId_fkey"
+ columns: ["journalId"]
+ isOneToOne: false
+ referencedRelation: "journal"
+ referencedColumns: ["id"]
+ },
+ {
+ foreignKeyName: "depreciationRunLine_journalId_fkey"
+ columns: ["journalId"]
+ isOneToOne: false
+ referencedRelation: "journalEntries"
+ referencedColumns: ["id"]
+ },
+ ]
+ }
dimension: {
Row: {
active: boolean
@@ -9207,6 +9469,754 @@ export type Database = {
},
]
}
+ fixedAsset: {
+ Row: {
+ accumulatedDepreciation: number
+ accumulatedTaxDepreciation: number
+ acquisitionCost: number
+ acquisitionDate: string | null
+ assetLifetimeUsage: number | null
+ bonusDepreciationPercent: number | null
+ companyId: string
+ createdAt: string
+ createdBy: string
+ customFields: Json | null
+ depreciationMethod: Database["public"]["Enums"]["depreciationMethod"]
+ depreciationStartDate: string | null
+ description: string | null
+ disposalDate: string | null
+ disposalMethod: Database["public"]["Enums"]["disposalMethod"] | null
+ fixedAssetClassId: string
+ fixedAssetId: string
+ id: string
+ locationId: string | null
+ macrsConvention: Database["public"]["Enums"]["macrsConvention"] | null
+ macrsPropertyClass:
+ | Database["public"]["Enums"]["macrsPropertyClass"]
+ | null
+ name: string
+ notes: Json | null
+ residualValuePercent: number
+ saleProceeds: number | null
+ serialNumber: string | null
+ status: Database["public"]["Enums"]["fixedAssetStatus"]
+ taxDepreciationMethod:
+ | Database["public"]["Enums"]["taxDepreciationMethod"]
+ | null
+ taxResidualValuePercent: number | null
+ taxUsefulLifeMonths: number | null
+ updatedAt: string | null
+ updatedBy: string | null
+ usefulLifeMonths: number
+ }
+ Insert: {
+ accumulatedDepreciation?: number
+ accumulatedTaxDepreciation?: number
+ acquisitionCost?: number
+ acquisitionDate?: string | null
+ assetLifetimeUsage?: number | null
+ bonusDepreciationPercent?: number | null
+ companyId: string
+ createdAt?: string
+ createdBy: string
+ customFields?: Json | null
+ depreciationMethod?: Database["public"]["Enums"]["depreciationMethod"]
+ depreciationStartDate?: string | null
+ description?: string | null
+ disposalDate?: string | null
+ disposalMethod?: Database["public"]["Enums"]["disposalMethod"] | null
+ fixedAssetClassId: string
+ fixedAssetId: string
+ id?: string
+ locationId?: string | null
+ macrsConvention?:
+ | Database["public"]["Enums"]["macrsConvention"]
+ | null
+ macrsPropertyClass?:
+ | Database["public"]["Enums"]["macrsPropertyClass"]
+ | null
+ name: string
+ notes?: Json | null
+ residualValuePercent?: number
+ saleProceeds?: number | null
+ serialNumber?: string | null
+ status?: Database["public"]["Enums"]["fixedAssetStatus"]
+ taxDepreciationMethod?:
+ | Database["public"]["Enums"]["taxDepreciationMethod"]
+ | null
+ taxResidualValuePercent?: number | null
+ taxUsefulLifeMonths?: number | null
+ updatedAt?: string | null
+ updatedBy?: string | null
+ usefulLifeMonths?: number
+ }
+ Update: {
+ accumulatedDepreciation?: number
+ accumulatedTaxDepreciation?: number
+ acquisitionCost?: number
+ acquisitionDate?: string | null
+ assetLifetimeUsage?: number | null
+ bonusDepreciationPercent?: number | null
+ companyId?: string
+ createdAt?: string
+ createdBy?: string
+ customFields?: Json | null
+ depreciationMethod?: Database["public"]["Enums"]["depreciationMethod"]
+ depreciationStartDate?: string | null
+ description?: string | null
+ disposalDate?: string | null
+ disposalMethod?: Database["public"]["Enums"]["disposalMethod"] | null
+ fixedAssetClassId?: string
+ fixedAssetId?: string
+ id?: string
+ locationId?: string | null
+ macrsConvention?:
+ | Database["public"]["Enums"]["macrsConvention"]
+ | null
+ macrsPropertyClass?:
+ | Database["public"]["Enums"]["macrsPropertyClass"]
+ | null
+ name?: string
+ notes?: Json | null
+ residualValuePercent?: number
+ saleProceeds?: number | null
+ serialNumber?: string | null
+ status?: Database["public"]["Enums"]["fixedAssetStatus"]
+ taxDepreciationMethod?:
+ | Database["public"]["Enums"]["taxDepreciationMethod"]
+ | null
+ taxResidualValuePercent?: number | null
+ taxUsefulLifeMonths?: number | null
+ updatedAt?: string | null
+ updatedBy?: string | null
+ usefulLifeMonths?: number
+ }
+ Relationships: [
+ {
+ foreignKeyName: "fixedAsset_companyId_fkey"
+ columns: ["companyId"]
+ isOneToOne: false
+ referencedRelation: "companies"
+ referencedColumns: ["id"]
+ },
+ {
+ foreignKeyName: "fixedAsset_companyId_fkey"
+ columns: ["companyId"]
+ isOneToOne: false
+ referencedRelation: "company"
+ referencedColumns: ["id"]
+ },
+ {
+ foreignKeyName: "fixedAsset_companyId_fkey"
+ columns: ["companyId"]
+ isOneToOne: false
+ referencedRelation: "customFieldTables"
+ referencedColumns: ["companyId"]
+ },
+ {
+ foreignKeyName: "fixedAsset_companyId_fkey"
+ columns: ["companyId"]
+ isOneToOne: false
+ referencedRelation: "integrations"
+ referencedColumns: ["companyId"]
+ },
+ {
+ foreignKeyName: "fixedAsset_createdBy_fkey"
+ columns: ["createdBy"]
+ isOneToOne: false
+ referencedRelation: "employees"
+ referencedColumns: ["id"]
+ },
+ {
+ foreignKeyName: "fixedAsset_createdBy_fkey"
+ columns: ["createdBy"]
+ isOneToOne: false
+ referencedRelation: "employeesAcrossCompanies"
+ referencedColumns: ["id"]
+ },
+ {
+ foreignKeyName: "fixedAsset_createdBy_fkey"
+ columns: ["createdBy"]
+ isOneToOne: false
+ referencedRelation: "employeeSummary"
+ referencedColumns: ["id"]
+ },
+ {
+ foreignKeyName: "fixedAsset_createdBy_fkey"
+ columns: ["createdBy"]
+ isOneToOne: false
+ referencedRelation: "user"
+ referencedColumns: ["id"]
+ },
+ {
+ foreignKeyName: "fixedAsset_createdBy_fkey"
+ columns: ["createdBy"]
+ isOneToOne: false
+ referencedRelation: "userDefaults"
+ referencedColumns: ["userId"]
+ },
+ {
+ foreignKeyName: "fixedAsset_fixedAssetClassId_fkey"
+ columns: ["fixedAssetClassId"]
+ isOneToOne: false
+ referencedRelation: "fixedAssetClass"
+ referencedColumns: ["id"]
+ },
+ {
+ foreignKeyName: "fixedAsset_locationId_fkey"
+ columns: ["locationId"]
+ isOneToOne: false
+ referencedRelation: "location"
+ referencedColumns: ["id"]
+ },
+ {
+ foreignKeyName: "fixedAsset_updatedBy_fkey"
+ columns: ["updatedBy"]
+ isOneToOne: false
+ referencedRelation: "employees"
+ referencedColumns: ["id"]
+ },
+ {
+ foreignKeyName: "fixedAsset_updatedBy_fkey"
+ columns: ["updatedBy"]
+ isOneToOne: false
+ referencedRelation: "employeesAcrossCompanies"
+ referencedColumns: ["id"]
+ },
+ {
+ foreignKeyName: "fixedAsset_updatedBy_fkey"
+ columns: ["updatedBy"]
+ isOneToOne: false
+ referencedRelation: "employeeSummary"
+ referencedColumns: ["id"]
+ },
+ {
+ foreignKeyName: "fixedAsset_updatedBy_fkey"
+ columns: ["updatedBy"]
+ isOneToOne: false
+ referencedRelation: "user"
+ referencedColumns: ["id"]
+ },
+ {
+ foreignKeyName: "fixedAsset_updatedBy_fkey"
+ columns: ["updatedBy"]
+ isOneToOne: false
+ referencedRelation: "userDefaults"
+ referencedColumns: ["userId"]
+ },
+ ]
+ }
+ fixedAssetClass: {
+ Row: {
+ accumulatedDepreciationAccountId: string
+ assetAccountId: string
+ bonusDepreciationPercent: number | null
+ companyId: string
+ createdAt: string
+ createdBy: string
+ customFields: Json | null
+ depreciationExpenseAccountId: string
+ depreciationMethod: Database["public"]["Enums"]["depreciationMethod"]
+ description: string | null
+ disposalAccountId: string
+ id: string
+ macrsConvention: Database["public"]["Enums"]["macrsConvention"] | null
+ macrsPropertyClass:
+ | Database["public"]["Enums"]["macrsPropertyClass"]
+ | null
+ name: string
+ residualValuePercent: number
+ taxDepreciationMethod:
+ | Database["public"]["Enums"]["taxDepreciationMethod"]
+ | null
+ taxResidualValuePercent: number | null
+ taxUsefulLifeMonths: number | null
+ updatedAt: string | null
+ updatedBy: string | null
+ usefulLifeMonths: number
+ writeDownAccountId: string
+ writeOffAccountId: string
+ }
+ Insert: {
+ accumulatedDepreciationAccountId: string
+ assetAccountId: string
+ bonusDepreciationPercent?: number | null
+ companyId: string
+ createdAt?: string
+ createdBy: string
+ customFields?: Json | null
+ depreciationExpenseAccountId: string
+ depreciationMethod?: Database["public"]["Enums"]["depreciationMethod"]
+ description?: string | null
+ disposalAccountId: string
+ id?: string
+ macrsConvention?:
+ | Database["public"]["Enums"]["macrsConvention"]
+ | null
+ macrsPropertyClass?:
+ | Database["public"]["Enums"]["macrsPropertyClass"]
+ | null
+ name: string
+ residualValuePercent?: number
+ taxDepreciationMethod?:
+ | Database["public"]["Enums"]["taxDepreciationMethod"]
+ | null
+ taxResidualValuePercent?: number | null
+ taxUsefulLifeMonths?: number | null
+ updatedAt?: string | null
+ updatedBy?: string | null
+ usefulLifeMonths?: number
+ writeDownAccountId: string
+ writeOffAccountId: string
+ }
+ Update: {
+ accumulatedDepreciationAccountId?: string
+ assetAccountId?: string
+ bonusDepreciationPercent?: number | null
+ companyId?: string
+ createdAt?: string
+ createdBy?: string
+ customFields?: Json | null
+ depreciationExpenseAccountId?: string
+ depreciationMethod?: Database["public"]["Enums"]["depreciationMethod"]
+ description?: string | null
+ disposalAccountId?: string
+ id?: string
+ macrsConvention?:
+ | Database["public"]["Enums"]["macrsConvention"]
+ | null
+ macrsPropertyClass?:
+ | Database["public"]["Enums"]["macrsPropertyClass"]
+ | null
+ name?: string
+ residualValuePercent?: number
+ taxDepreciationMethod?:
+ | Database["public"]["Enums"]["taxDepreciationMethod"]
+ | null
+ taxResidualValuePercent?: number | null
+ taxUsefulLifeMonths?: number | null
+ updatedAt?: string | null
+ updatedBy?: string | null
+ usefulLifeMonths?: number
+ writeDownAccountId?: string
+ writeOffAccountId?: string
+ }
+ Relationships: [
+ {
+ foreignKeyName: "fixedAssetClass_accumulatedDepreciationAccountId_fkey"
+ columns: ["accumulatedDepreciationAccountId"]
+ isOneToOne: false
+ referencedRelation: "account"
+ referencedColumns: ["id"]
+ },
+ {
+ foreignKeyName: "fixedAssetClass_accumulatedDepreciationAccountId_fkey"
+ columns: ["accumulatedDepreciationAccountId"]
+ isOneToOne: false
+ referencedRelation: "accounts"
+ referencedColumns: ["id"]
+ },
+ {
+ foreignKeyName: "fixedAssetClass_assetAccountId_fkey"
+ columns: ["assetAccountId"]
+ isOneToOne: false
+ referencedRelation: "account"
+ referencedColumns: ["id"]
+ },
+ {
+ foreignKeyName: "fixedAssetClass_assetAccountId_fkey"
+ columns: ["assetAccountId"]
+ isOneToOne: false
+ referencedRelation: "accounts"
+ referencedColumns: ["id"]
+ },
+ {
+ foreignKeyName: "fixedAssetClass_companyId_fkey"
+ columns: ["companyId"]
+ isOneToOne: false
+ referencedRelation: "companies"
+ referencedColumns: ["id"]
+ },
+ {
+ foreignKeyName: "fixedAssetClass_companyId_fkey"
+ columns: ["companyId"]
+ isOneToOne: false
+ referencedRelation: "company"
+ referencedColumns: ["id"]
+ },
+ {
+ foreignKeyName: "fixedAssetClass_companyId_fkey"
+ columns: ["companyId"]
+ isOneToOne: false
+ referencedRelation: "customFieldTables"
+ referencedColumns: ["companyId"]
+ },
+ {
+ foreignKeyName: "fixedAssetClass_companyId_fkey"
+ columns: ["companyId"]
+ isOneToOne: false
+ referencedRelation: "integrations"
+ referencedColumns: ["companyId"]
+ },
+ {
+ foreignKeyName: "fixedAssetClass_createdBy_fkey"
+ columns: ["createdBy"]
+ isOneToOne: false
+ referencedRelation: "employees"
+ referencedColumns: ["id"]
+ },
+ {
+ foreignKeyName: "fixedAssetClass_createdBy_fkey"
+ columns: ["createdBy"]
+ isOneToOne: false
+ referencedRelation: "employeesAcrossCompanies"
+ referencedColumns: ["id"]
+ },
+ {
+ foreignKeyName: "fixedAssetClass_createdBy_fkey"
+ columns: ["createdBy"]
+ isOneToOne: false
+ referencedRelation: "employeeSummary"
+ referencedColumns: ["id"]
+ },
+ {
+ foreignKeyName: "fixedAssetClass_createdBy_fkey"
+ columns: ["createdBy"]
+ isOneToOne: false
+ referencedRelation: "user"
+ referencedColumns: ["id"]
+ },
+ {
+ foreignKeyName: "fixedAssetClass_createdBy_fkey"
+ columns: ["createdBy"]
+ isOneToOne: false
+ referencedRelation: "userDefaults"
+ referencedColumns: ["userId"]
+ },
+ {
+ foreignKeyName: "fixedAssetClass_depreciationExpenseAccountId_fkey"
+ columns: ["depreciationExpenseAccountId"]
+ isOneToOne: false
+ referencedRelation: "account"
+ referencedColumns: ["id"]
+ },
+ {
+ foreignKeyName: "fixedAssetClass_depreciationExpenseAccountId_fkey"
+ columns: ["depreciationExpenseAccountId"]
+ isOneToOne: false
+ referencedRelation: "accounts"
+ referencedColumns: ["id"]
+ },
+ {
+ foreignKeyName: "fixedAssetClass_disposalAccountId_fkey"
+ columns: ["disposalAccountId"]
+ isOneToOne: false
+ referencedRelation: "account"
+ referencedColumns: ["id"]
+ },
+ {
+ foreignKeyName: "fixedAssetClass_disposalAccountId_fkey"
+ columns: ["disposalAccountId"]
+ isOneToOne: false
+ referencedRelation: "accounts"
+ referencedColumns: ["id"]
+ },
+ {
+ foreignKeyName: "fixedAssetClass_updatedBy_fkey"
+ columns: ["updatedBy"]
+ isOneToOne: false
+ referencedRelation: "employees"
+ referencedColumns: ["id"]
+ },
+ {
+ foreignKeyName: "fixedAssetClass_updatedBy_fkey"
+ columns: ["updatedBy"]
+ isOneToOne: false
+ referencedRelation: "employeesAcrossCompanies"
+ referencedColumns: ["id"]
+ },
+ {
+ foreignKeyName: "fixedAssetClass_updatedBy_fkey"
+ columns: ["updatedBy"]
+ isOneToOne: false
+ referencedRelation: "employeeSummary"
+ referencedColumns: ["id"]
+ },
+ {
+ foreignKeyName: "fixedAssetClass_updatedBy_fkey"
+ columns: ["updatedBy"]
+ isOneToOne: false
+ referencedRelation: "user"
+ referencedColumns: ["id"]
+ },
+ {
+ foreignKeyName: "fixedAssetClass_updatedBy_fkey"
+ columns: ["updatedBy"]
+ isOneToOne: false
+ referencedRelation: "userDefaults"
+ referencedColumns: ["userId"]
+ },
+ {
+ foreignKeyName: "fixedAssetClass_writeDownAccountId_fkey"
+ columns: ["writeDownAccountId"]
+ isOneToOne: false
+ referencedRelation: "account"
+ referencedColumns: ["id"]
+ },
+ {
+ foreignKeyName: "fixedAssetClass_writeDownAccountId_fkey"
+ columns: ["writeDownAccountId"]
+ isOneToOne: false
+ referencedRelation: "accounts"
+ referencedColumns: ["id"]
+ },
+ {
+ foreignKeyName: "fixedAssetClass_writeOffAccountId_fkey"
+ columns: ["writeOffAccountId"]
+ isOneToOne: false
+ referencedRelation: "account"
+ referencedColumns: ["id"]
+ },
+ {
+ foreignKeyName: "fixedAssetClass_writeOffAccountId_fkey"
+ columns: ["writeOffAccountId"]
+ isOneToOne: false
+ referencedRelation: "accounts"
+ referencedColumns: ["id"]
+ },
+ ]
+ }
+ fixedAssetDisposal: {
+ Row: {
+ companyId: string
+ createdAt: string
+ createdBy: string
+ disposalDate: string
+ disposalMethod: Database["public"]["Enums"]["disposalMethod"]
+ fixedAssetId: string
+ gainLoss: number
+ id: string
+ journalId: string | null
+ netBookValueAtDisposal: number
+ saleProceeds: number
+ }
+ Insert: {
+ companyId: string
+ createdAt?: string
+ createdBy: string
+ disposalDate: string
+ disposalMethod: Database["public"]["Enums"]["disposalMethod"]
+ fixedAssetId: string
+ gainLoss: number
+ id?: string
+ journalId?: string | null
+ netBookValueAtDisposal: number
+ saleProceeds?: number
+ }
+ Update: {
+ companyId?: string
+ createdAt?: string
+ createdBy?: string
+ disposalDate?: string
+ disposalMethod?: Database["public"]["Enums"]["disposalMethod"]
+ fixedAssetId?: string
+ gainLoss?: number
+ id?: string
+ journalId?: string | null
+ netBookValueAtDisposal?: number
+ saleProceeds?: number
+ }
+ Relationships: [
+ {
+ foreignKeyName: "fixedAssetDisposal_companyId_fkey"
+ columns: ["companyId"]
+ isOneToOne: false
+ referencedRelation: "companies"
+ referencedColumns: ["id"]
+ },
+ {
+ foreignKeyName: "fixedAssetDisposal_companyId_fkey"
+ columns: ["companyId"]
+ isOneToOne: false
+ referencedRelation: "company"
+ referencedColumns: ["id"]
+ },
+ {
+ foreignKeyName: "fixedAssetDisposal_companyId_fkey"
+ columns: ["companyId"]
+ isOneToOne: false
+ referencedRelation: "customFieldTables"
+ referencedColumns: ["companyId"]
+ },
+ {
+ foreignKeyName: "fixedAssetDisposal_companyId_fkey"
+ columns: ["companyId"]
+ isOneToOne: false
+ referencedRelation: "integrations"
+ referencedColumns: ["companyId"]
+ },
+ {
+ foreignKeyName: "fixedAssetDisposal_createdBy_fkey"
+ columns: ["createdBy"]
+ isOneToOne: false
+ referencedRelation: "employees"
+ referencedColumns: ["id"]
+ },
+ {
+ foreignKeyName: "fixedAssetDisposal_createdBy_fkey"
+ columns: ["createdBy"]
+ isOneToOne: false
+ referencedRelation: "employeesAcrossCompanies"
+ referencedColumns: ["id"]
+ },
+ {
+ foreignKeyName: "fixedAssetDisposal_createdBy_fkey"
+ columns: ["createdBy"]
+ isOneToOne: false
+ referencedRelation: "employeeSummary"
+ referencedColumns: ["id"]
+ },
+ {
+ foreignKeyName: "fixedAssetDisposal_createdBy_fkey"
+ columns: ["createdBy"]
+ isOneToOne: false
+ referencedRelation: "user"
+ referencedColumns: ["id"]
+ },
+ {
+ foreignKeyName: "fixedAssetDisposal_createdBy_fkey"
+ columns: ["createdBy"]
+ isOneToOne: false
+ referencedRelation: "userDefaults"
+ referencedColumns: ["userId"]
+ },
+ {
+ foreignKeyName: "fixedAssetDisposal_fixedAssetId_fkey"
+ columns: ["fixedAssetId"]
+ isOneToOne: false
+ referencedRelation: "fixedAsset"
+ referencedColumns: ["id"]
+ },
+ {
+ foreignKeyName: "fixedAssetDisposal_journalId_fkey"
+ columns: ["journalId"]
+ isOneToOne: false
+ referencedRelation: "journal"
+ referencedColumns: ["id"]
+ },
+ {
+ foreignKeyName: "fixedAssetDisposal_journalId_fkey"
+ columns: ["journalId"]
+ isOneToOne: false
+ referencedRelation: "journalEntries"
+ referencedColumns: ["id"]
+ },
+ ]
+ }
+ fixedAssetUsageLog: {
+ Row: {
+ companyId: string
+ createdAt: string
+ createdBy: string
+ fixedAssetId: string
+ id: string
+ periodEnd: string
+ periodStart: string
+ unitsProduced: number
+ }
+ Insert: {
+ companyId: string
+ createdAt?: string
+ createdBy: string
+ fixedAssetId: string
+ id?: string
+ periodEnd: string
+ periodStart: string
+ unitsProduced: number
+ }
+ Update: {
+ companyId?: string
+ createdAt?: string
+ createdBy?: string
+ fixedAssetId?: string
+ id?: string
+ periodEnd?: string
+ periodStart?: string
+ unitsProduced?: number
+ }
+ Relationships: [
+ {
+ foreignKeyName: "fixedAssetUsageLog_companyId_fkey"
+ columns: ["companyId"]
+ isOneToOne: false
+ referencedRelation: "companies"
+ referencedColumns: ["id"]
+ },
+ {
+ foreignKeyName: "fixedAssetUsageLog_companyId_fkey"
+ columns: ["companyId"]
+ isOneToOne: false
+ referencedRelation: "company"
+ referencedColumns: ["id"]
+ },
+ {
+ foreignKeyName: "fixedAssetUsageLog_companyId_fkey"
+ columns: ["companyId"]
+ isOneToOne: false
+ referencedRelation: "customFieldTables"
+ referencedColumns: ["companyId"]
+ },
+ {
+ foreignKeyName: "fixedAssetUsageLog_companyId_fkey"
+ columns: ["companyId"]
+ isOneToOne: false
+ referencedRelation: "integrations"
+ referencedColumns: ["companyId"]
+ },
+ {
+ foreignKeyName: "fixedAssetUsageLog_createdBy_fkey"
+ columns: ["createdBy"]
+ isOneToOne: false
+ referencedRelation: "employees"
+ referencedColumns: ["id"]
+ },
+ {
+ foreignKeyName: "fixedAssetUsageLog_createdBy_fkey"
+ columns: ["createdBy"]
+ isOneToOne: false
+ referencedRelation: "employeesAcrossCompanies"
+ referencedColumns: ["id"]
+ },
+ {
+ foreignKeyName: "fixedAssetUsageLog_createdBy_fkey"
+ columns: ["createdBy"]
+ isOneToOne: false
+ referencedRelation: "employeeSummary"
+ referencedColumns: ["id"]
+ },
+ {
+ foreignKeyName: "fixedAssetUsageLog_createdBy_fkey"
+ columns: ["createdBy"]
+ isOneToOne: false
+ referencedRelation: "user"
+ referencedColumns: ["id"]
+ },
+ {
+ foreignKeyName: "fixedAssetUsageLog_createdBy_fkey"
+ columns: ["createdBy"]
+ isOneToOne: false
+ referencedRelation: "userDefaults"
+ referencedColumns: ["userId"]
+ },
+ {
+ foreignKeyName: "fixedAssetUsageLog_fixedAssetId_fkey"
+ columns: ["fixedAssetId"]
+ isOneToOne: false
+ referencedRelation: "fixedAsset"
+ referencedColumns: ["id"]
+ },
+ ]
+ }
fixture: {
Row: {
approved: boolean
@@ -14304,6 +15314,7 @@ export type Database = {
machineRate: number | null
machineTime: number
machineUnit: Database["public"]["Enums"]["factor"]
+ manuallyScheduled: boolean
operationLeadTime: number
operationMinimumCost: number
operationOrder: Database["public"]["Enums"]["methodOperationOrder"]
@@ -14349,6 +15360,7 @@ export type Database = {
machineRate?: number | null
machineTime?: number
machineUnit?: Database["public"]["Enums"]["factor"]
+ manuallyScheduled?: boolean
operationLeadTime?: number
operationMinimumCost?: number
operationOrder?: Database["public"]["Enums"]["methodOperationOrder"]
@@ -14394,6 +15406,7 @@ export type Database = {
machineRate?: number | null
machineTime?: number
machineUnit?: Database["public"]["Enums"]["factor"]
+ manuallyScheduled?: boolean
operationLeadTime?: number
operationMinimumCost?: number
operationOrder?: Database["public"]["Enums"]["methodOperationOrder"]
@@ -28423,6 +29436,13 @@ export type Database = {
referencedRelation: "accounts"
referencedColumns: ["id"]
},
+ {
+ foreignKeyName: "purchaseOrderLine_assetId_fkey"
+ columns: ["assetId"]
+ isOneToOne: false
+ referencedRelation: "fixedAsset"
+ referencedColumns: ["id"]
+ },
{
foreignKeyName: "purchaseOrderLine_costCenterId_fkey"
columns: ["costCenterId"]
@@ -33237,6 +34257,144 @@ export type Database = {
},
]
}
+ receiptFixedAssetLine: {
+ Row: {
+ companyId: string
+ createdAt: string
+ createdBy: string
+ id: string
+ purchaseOrderLineId: string
+ receiptId: string
+ received: boolean
+ serialNumber: string | null
+ updatedAt: string | null
+ updatedBy: string | null
+ }
+ Insert: {
+ companyId: string
+ createdAt?: string
+ createdBy: string
+ id?: string
+ purchaseOrderLineId: string
+ receiptId: string
+ received?: boolean
+ serialNumber?: string | null
+ updatedAt?: string | null
+ updatedBy?: string | null
+ }
+ Update: {
+ companyId?: string
+ createdAt?: string
+ createdBy?: string
+ id?: string
+ purchaseOrderLineId?: string
+ receiptId?: string
+ received?: boolean
+ serialNumber?: string | null
+ updatedAt?: string | null
+ updatedBy?: string | null
+ }
+ Relationships: [
+ {
+ foreignKeyName: "receiptFixedAssetLine_companyId_fkey"
+ columns: ["companyId"]
+ isOneToOne: false
+ referencedRelation: "companies"
+ referencedColumns: ["id"]
+ },
+ {
+ foreignKeyName: "receiptFixedAssetLine_companyId_fkey"
+ columns: ["companyId"]
+ isOneToOne: false
+ referencedRelation: "company"
+ referencedColumns: ["id"]
+ },
+ {
+ foreignKeyName: "receiptFixedAssetLine_companyId_fkey"
+ columns: ["companyId"]
+ isOneToOne: false
+ referencedRelation: "customFieldTables"
+ referencedColumns: ["companyId"]
+ },
+ {
+ foreignKeyName: "receiptFixedAssetLine_companyId_fkey"
+ columns: ["companyId"]
+ isOneToOne: false
+ referencedRelation: "integrations"
+ referencedColumns: ["companyId"]
+ },
+ {
+ foreignKeyName: "receiptFixedAssetLine_createdBy_fkey"
+ columns: ["createdBy"]
+ isOneToOne: false
+ referencedRelation: "employees"
+ referencedColumns: ["id"]
+ },
+ {
+ foreignKeyName: "receiptFixedAssetLine_createdBy_fkey"
+ columns: ["createdBy"]
+ isOneToOne: false
+ referencedRelation: "employeesAcrossCompanies"
+ referencedColumns: ["id"]
+ },
+ {
+ foreignKeyName: "receiptFixedAssetLine_createdBy_fkey"
+ columns: ["createdBy"]
+ isOneToOne: false
+ referencedRelation: "employeeSummary"
+ referencedColumns: ["id"]
+ },
+ {
+ foreignKeyName: "receiptFixedAssetLine_createdBy_fkey"
+ columns: ["createdBy"]
+ isOneToOne: false
+ referencedRelation: "user"
+ referencedColumns: ["id"]
+ },
+ {
+ foreignKeyName: "receiptFixedAssetLine_createdBy_fkey"
+ columns: ["createdBy"]
+ isOneToOne: false
+ referencedRelation: "userDefaults"
+ referencedColumns: ["userId"]
+ },
+ {
+ foreignKeyName: "receiptFixedAssetLine_purchaseOrderLineId_fkey"
+ columns: ["purchaseOrderLineId"]
+ isOneToOne: false
+ referencedRelation: "openPurchaseOrderLines"
+ referencedColumns: ["id"]
+ },
+ {
+ foreignKeyName: "receiptFixedAssetLine_purchaseOrderLineId_fkey"
+ columns: ["purchaseOrderLineId"]
+ isOneToOne: false
+ referencedRelation: "purchaseOrderLine"
+ referencedColumns: ["id"]
+ },
+ {
+ foreignKeyName: "receiptFixedAssetLine_purchaseOrderLineId_fkey"
+ columns: ["purchaseOrderLineId"]
+ isOneToOne: false
+ referencedRelation: "purchaseOrderLines"
+ referencedColumns: ["id"]
+ },
+ {
+ foreignKeyName: "receiptFixedAssetLine_receiptId_fkey"
+ columns: ["receiptId"]
+ isOneToOne: false
+ referencedRelation: "receipt"
+ referencedColumns: ["id"]
+ },
+ {
+ foreignKeyName: "receiptFixedAssetLine_receiptId_fkey"
+ columns: ["receiptId"]
+ isOneToOne: false
+ referencedRelation: "receipts"
+ referencedColumns: ["id"]
+ },
+ ]
+ }
receiptLine: {
Row: {
companyId: string
@@ -34114,6 +35272,13 @@ export type Database = {
referencedRelation: "accounts"
referencedColumns: ["id"]
},
+ {
+ foreignKeyName: "salesInvoiceLine_assetId_fkey"
+ columns: ["assetId"]
+ isOneToOne: false
+ referencedRelation: "fixedAsset"
+ referencedColumns: ["id"]
+ },
{
foreignKeyName: "salesInvoiceLine_companyId_fkey"
columns: ["companyId"]
@@ -35086,6 +36251,13 @@ export type Database = {
referencedRelation: "accounts"
referencedColumns: ["id"]
},
+ {
+ foreignKeyName: "salesOrderLine_assetId_fkey"
+ columns: ["assetId"]
+ isOneToOne: false
+ referencedRelation: "fixedAsset"
+ referencedColumns: ["id"]
+ },
{
foreignKeyName: "salesOrderLine_createdBy_fkey"
columns: ["createdBy"]
@@ -36547,7 +37719,7 @@ export type Database = {
},
]
}
- searchIndex_PjY5r4hY5NXa8db3oSSoQs: {
+ searchIndex_G3AKJj1orZNDa3fwn8a6Uy: {
Row: {
createdAt: string
description: string | null
@@ -37493,6 +38665,137 @@ export type Database = {
},
]
}
+ shipmentFixedAssetLine: {
+ Row: {
+ companyId: string
+ createdAt: string
+ createdBy: string
+ id: string
+ salesOrderLineId: string
+ serialNumber: string | null
+ shipmentId: string
+ shipped: boolean
+ updatedAt: string | null
+ updatedBy: string | null
+ }
+ Insert: {
+ companyId: string
+ createdAt?: string
+ createdBy: string
+ id?: string
+ salesOrderLineId: string
+ serialNumber?: string | null
+ shipmentId: string
+ shipped?: boolean
+ updatedAt?: string | null
+ updatedBy?: string | null
+ }
+ Update: {
+ companyId?: string
+ createdAt?: string
+ createdBy?: string
+ id?: string
+ salesOrderLineId?: string
+ serialNumber?: string | null
+ shipmentId?: string
+ shipped?: boolean
+ updatedAt?: string | null
+ updatedBy?: string | null
+ }
+ Relationships: [
+ {
+ foreignKeyName: "shipmentFixedAssetLine_companyId_fkey"
+ columns: ["companyId"]
+ isOneToOne: false
+ referencedRelation: "companies"
+ referencedColumns: ["id"]
+ },
+ {
+ foreignKeyName: "shipmentFixedAssetLine_companyId_fkey"
+ columns: ["companyId"]
+ isOneToOne: false
+ referencedRelation: "company"
+ referencedColumns: ["id"]
+ },
+ {
+ foreignKeyName: "shipmentFixedAssetLine_companyId_fkey"
+ columns: ["companyId"]
+ isOneToOne: false
+ referencedRelation: "customFieldTables"
+ referencedColumns: ["companyId"]
+ },
+ {
+ foreignKeyName: "shipmentFixedAssetLine_companyId_fkey"
+ columns: ["companyId"]
+ isOneToOne: false
+ referencedRelation: "integrations"
+ referencedColumns: ["companyId"]
+ },
+ {
+ foreignKeyName: "shipmentFixedAssetLine_createdBy_fkey"
+ columns: ["createdBy"]
+ isOneToOne: false
+ referencedRelation: "employees"
+ referencedColumns: ["id"]
+ },
+ {
+ foreignKeyName: "shipmentFixedAssetLine_createdBy_fkey"
+ columns: ["createdBy"]
+ isOneToOne: false
+ referencedRelation: "employeesAcrossCompanies"
+ referencedColumns: ["id"]
+ },
+ {
+ foreignKeyName: "shipmentFixedAssetLine_createdBy_fkey"
+ columns: ["createdBy"]
+ isOneToOne: false
+ referencedRelation: "employeeSummary"
+ referencedColumns: ["id"]
+ },
+ {
+ foreignKeyName: "shipmentFixedAssetLine_createdBy_fkey"
+ columns: ["createdBy"]
+ isOneToOne: false
+ referencedRelation: "user"
+ referencedColumns: ["id"]
+ },
+ {
+ foreignKeyName: "shipmentFixedAssetLine_createdBy_fkey"
+ columns: ["createdBy"]
+ isOneToOne: false
+ referencedRelation: "userDefaults"
+ referencedColumns: ["userId"]
+ },
+ {
+ foreignKeyName: "shipmentFixedAssetLine_salesOrderLineId_fkey"
+ columns: ["salesOrderLineId"]
+ isOneToOne: false
+ referencedRelation: "openSalesOrderLines"
+ referencedColumns: ["id"]
+ },
+ {
+ foreignKeyName: "shipmentFixedAssetLine_salesOrderLineId_fkey"
+ columns: ["salesOrderLineId"]
+ isOneToOne: false
+ referencedRelation: "salesOrderLine"
+ referencedColumns: ["id"]
+ },
+ {
+ foreignKeyName: "shipmentFixedAssetLine_salesOrderLineId_fkey"
+ columns: ["salesOrderLineId"]
+ isOneToOne: false
+ referencedRelation: "salesOrderLines"
+ referencedColumns: ["id"]
+ },
+ {
+ foreignKeyName: "shipmentFixedAssetLine_shipmentId_fkey"
+ columns: ["shipmentId"]
+ isOneToOne: false
+ referencedRelation: "shipment"
+ referencedColumns: ["id"]
+ },
+ ]
+ }
shipmentLine: {
Row: {
companyId: string
@@ -45744,6 +47047,7 @@ export type Database = {
createdBy: string
customFields: Json | null
defaultStandardFactor: Database["public"]["Enums"]["factor"]
+ departmentId: string | null
description: string | null
id: string
laborRate: number
@@ -45763,6 +47067,7 @@ export type Database = {
createdBy: string
customFields?: Json | null
defaultStandardFactor?: Database["public"]["Enums"]["factor"]
+ departmentId?: string | null
description?: string | null
id?: string
laborRate?: number
@@ -45782,6 +47087,7 @@ export type Database = {
createdBy?: string
customFields?: Json | null
defaultStandardFactor?: Database["public"]["Enums"]["factor"]
+ departmentId?: string | null
description?: string | null
id?: string
laborRate?: number
@@ -45858,6 +47164,13 @@ export type Database = {
referencedRelation: "userDefaults"
referencedColumns: ["userId"]
},
+ {
+ foreignKeyName: "workCenter_departmentId_fkey"
+ columns: ["departmentId"]
+ isOneToOne: false
+ referencedRelation: "department"
+ referencedColumns: ["id"]
+ },
{
foreignKeyName: "workCenter_locationId_fkey"
columns: ["locationId"]
@@ -51822,14 +53135,14 @@ export type Database = {
},
{
foreignKeyName: "partner_id_fkey"
- columns: ["supplierLocationId"]
+ columns: ["id"]
isOneToOne: false
referencedRelation: "supplierLocation"
referencedColumns: ["id"]
},
{
foreignKeyName: "partner_id_fkey"
- columns: ["id"]
+ columns: ["supplierLocationId"]
isOneToOne: false
referencedRelation: "supplierLocation"
referencedColumns: ["id"]
@@ -52273,6 +53586,8 @@ export type Database = {
accountId: string | null
accountName: string | null
assetId: string | null
+ assetName: string | null
+ assetReadableId: string | null
companyId: string | null
conversionFactor: number | null
costCenterId: string | null
@@ -52935,6 +54250,8 @@ export type Database = {
accountId: string | null
accountName: string | null
assetId: string | null
+ assetName: string | null
+ assetReadableId: string | null
autodeskUrn: string | null
companyId: string | null
conversionFactor: number | null
@@ -53013,6 +54330,13 @@ export type Database = {
referencedRelation: "accounts"
referencedColumns: ["id"]
},
+ {
+ foreignKeyName: "purchaseOrderLine_assetId_fkey"
+ columns: ["assetId"]
+ isOneToOne: false
+ referencedRelation: "fixedAsset"
+ referencedColumns: ["id"]
+ },
{
foreignKeyName: "purchaseOrderLine_costCenterId_fkey"
columns: ["costCenterId"]
@@ -53313,14 +54637,14 @@ export type Database = {
Relationships: [
{
foreignKeyName: "address_countryCode_fkey"
- columns: ["supplierCountryCode"]
+ columns: ["customerCountryCode"]
isOneToOne: false
referencedRelation: "country"
referencedColumns: ["alpha2"]
},
{
foreignKeyName: "address_countryCode_fkey"
- columns: ["customerCountryCode"]
+ columns: ["supplierCountryCode"]
isOneToOne: false
referencedRelation: "country"
referencedColumns: ["alpha2"]
@@ -56392,6 +57716,8 @@ export type Database = {
accountId: string | null
addOnCost: number | null
assetId: string | null
+ assetName: string | null
+ assetReadableId: string | null
companyId: string | null
convertedAddOnCost: number | null
convertedNonTaxableAddOnCost: number | null
@@ -56450,6 +57776,13 @@ export type Database = {
referencedRelation: "accounts"
referencedColumns: ["id"]
},
+ {
+ foreignKeyName: "salesInvoiceLine_assetId_fkey"
+ columns: ["assetId"]
+ isOneToOne: false
+ referencedRelation: "fixedAsset"
+ referencedColumns: ["id"]
+ },
{
foreignKeyName: "salesInvoiceLine_companyId_fkey"
columns: ["companyId"]
@@ -57027,6 +58360,8 @@ export type Database = {
accountId: string | null
addOnCost: number | null
assetId: string | null
+ assetName: string | null
+ assetReadableId: string | null
autodeskUrn: string | null
companyId: string | null
convertedAddOnCost: number | null
@@ -57121,6 +58456,13 @@ export type Database = {
referencedRelation: "accounts"
referencedColumns: ["id"]
},
+ {
+ foreignKeyName: "salesOrderLine_assetId_fkey"
+ columns: ["assetId"]
+ isOneToOne: false
+ referencedRelation: "fixedAsset"
+ referencedColumns: ["id"]
+ },
{
foreignKeyName: "salesOrderLine_createdBy_fkey"
columns: ["createdBy"]
@@ -57303,14 +58645,14 @@ export type Database = {
Relationships: [
{
foreignKeyName: "address_countryCode_fkey"
- columns: ["paymentCountryCode"]
+ columns: ["customerCountryCode"]
isOneToOne: false
referencedRelation: "country"
referencedColumns: ["alpha2"]
},
{
foreignKeyName: "address_countryCode_fkey"
- columns: ["customerCountryCode"]
+ columns: ["paymentCountryCode"]
isOneToOne: false
referencedRelation: "country"
referencedColumns: ["alpha2"]
@@ -60312,6 +61654,8 @@ export type Database = {
createdBy: string | null
customFields: Json | null
defaultStandardFactor: Database["public"]["Enums"]["factor"] | null
+ departmentId: string | null
+ departmentName: string | null
description: string | null
id: string | null
laborRate: number | null
@@ -60390,6 +61734,13 @@ export type Database = {
referencedRelation: "userDefaults"
referencedColumns: ["userId"]
},
+ {
+ foreignKeyName: "workCenter_departmentId_fkey"
+ columns: ["departmentId"]
+ isOneToOne: false
+ referencedRelation: "department"
+ referencedColumns: ["id"]
+ },
{
foreignKeyName: "workCenter_locationId_fkey"
columns: ["locationId"]
@@ -60451,6 +61802,7 @@ export type Database = {
createdBy: string | null
customFields: Json | null
defaultStandardFactor: Database["public"]["Enums"]["factor"] | null
+ departmentId: string | null
description: string | null
id: string | null
isBlocked: boolean | null
@@ -60529,6 +61881,13 @@ export type Database = {
referencedRelation: "userDefaults"
referencedColumns: ["userId"]
},
+ {
+ foreignKeyName: "workCenter_departmentId_fkey"
+ columns: ["departmentId"]
+ isOneToOne: false
+ referencedRelation: "department"
+ referencedColumns: ["id"]
+ },
{
foreignKeyName: "workCenter_locationId_fkey"
columns: ["locationId"]
@@ -62778,6 +64137,10 @@ export type Database = {
customRuleTargetType: "item" | "storageUnit" | "workCenter"
deadlineType: "No Deadline" | "ASAP" | "Soft Deadline" | "Hard Deadline"
demandSourceType: "Sales Order" | "Job Material"
+ depreciationMethod:
+ | "Straight Line"
+ | "Declining Balance"
+ | "Units of Production"
dimensionEntityType:
| "Custom"
| "Location"
@@ -62787,6 +64150,10 @@ export type Database = {
| "Department"
| "Employee"
| "CostCenter"
+ | "WorkCenter"
+ | "Process"
+ | "FixedAssetClass"
+ disposalMethod: "Sale" | "Scrapping"
disposition:
| "Conditional Acceptance"
| "Deviation Accepted"
@@ -62867,6 +64234,7 @@ export type Database = {
| "Seconds/Piece"
| "Total Hours"
| "Total Minutes"
+ fixedAssetStatus: "Draft" | "Active" | "Fully Depreciated" | "Disposed"
fulfillmentType: "Inventory" | "Job"
gaugeCalibrationStatus:
| "Pending"
@@ -62987,6 +64355,8 @@ export type Database = {
| "Job Receipt"
| "Production Event"
| "Job Close"
+ | "Asset Depreciation"
+ | "Asset Disposal"
journalEntryStatus: "Draft" | "Posted" | "Reversed"
journalLineDocumentType:
| "Receipt"
@@ -63005,6 +64375,8 @@ export type Database = {
| "Production Event"
| "Job Close"
kanbanOutput: "label" | "qrcode" | "url"
+ macrsConvention: "Half-Year" | "Mid-Quarter"
+ macrsPropertyClass: "3" | "5" | "7" | "10" | "15" | "20" | "27.5" | "39"
maintenanceDispatchPriority: "Low" | "Medium" | "High" | "Critical"
maintenanceDispatchStatus:
| "Open"
@@ -63266,6 +64638,7 @@ export type Database = {
supplierStatusType: "Active" | "Inactive" | "Pending" | "Rejected"
supplySourceType: "Purchase Order" | "Production Order"
tableViewType: "Public" | "Private"
+ taxDepreciationMethod: "Straight Line" | "Declining Balance" | "MACRS"
taxExemptionReason:
| "Resale"
| "Government"
@@ -64032,6 +65405,11 @@ export const Constants = {
customRuleTargetType: ["item", "storageUnit", "workCenter"],
deadlineType: ["No Deadline", "ASAP", "Soft Deadline", "Hard Deadline"],
demandSourceType: ["Sales Order", "Job Material"],
+ depreciationMethod: [
+ "Straight Line",
+ "Declining Balance",
+ "Units of Production",
+ ],
dimensionEntityType: [
"Custom",
"Location",
@@ -64041,7 +65419,11 @@ export const Constants = {
"Department",
"Employee",
"CostCenter",
+ "WorkCenter",
+ "Process",
+ "FixedAssetClass",
],
+ disposalMethod: ["Sale", "Scrapping"],
disposition: [
"Conditional Acceptance",
"Deviation Accepted",
@@ -64129,6 +65511,7 @@ export const Constants = {
"Total Hours",
"Total Minutes",
],
+ fixedAssetStatus: ["Draft", "Active", "Fully Depreciated", "Disposed"],
fulfillmentType: ["Inventory", "Job"],
gaugeCalibrationStatus: [
"Pending",
@@ -64259,6 +65642,8 @@ export const Constants = {
"Job Receipt",
"Production Event",
"Job Close",
+ "Asset Depreciation",
+ "Asset Disposal",
],
journalEntryStatus: ["Draft", "Posted", "Reversed"],
journalLineDocumentType: [
@@ -64279,6 +65664,8 @@ export const Constants = {
"Job Close",
],
kanbanOutput: ["label", "qrcode", "url"],
+ macrsConvention: ["Half-Year", "Mid-Quarter"],
+ macrsPropertyClass: ["3", "5", "7", "10", "15", "20", "27.5", "39"],
maintenanceDispatchPriority: ["Low", "Medium", "High", "Critical"],
maintenanceDispatchStatus: [
"Open",
@@ -64566,6 +65953,7 @@ export const Constants = {
supplierStatusType: ["Active", "Inactive", "Pending", "Rejected"],
supplySourceType: ["Purchase Order", "Production Order"],
tableViewType: ["Public", "Private"],
+ taxDepreciationMethod: ["Straight Line", "Declining Balance", "MACRS"],
taxExemptionReason: [
"Resale",
"Government",
diff --git a/packages/database/supabase/migrations/20260525143721_manual-scheduling.sql b/packages/database/supabase/migrations/20260525143721_manual-scheduling.sql
new file mode 100644
index 0000000000..582f6c80c3
--- /dev/null
+++ b/packages/database/supabase/migrations/20260525143721_manual-scheduling.sql
@@ -0,0 +1 @@
+ALTER TABLE "jobOperation" ADD COLUMN "manuallyScheduled" BOOLEAN NOT NULL DEFAULT false;
diff --git a/packages/locale/locales/de/erp.po b/packages/locale/locales/de/erp.po
index fbad383686..41c71df3c4 100644
--- a/packages/locale/locales/de/erp.po
+++ b/packages/locale/locales/de/erp.po
@@ -4223,7 +4223,7 @@ msgid "Loading..."
msgstr "Wird geladen..."
msgid "Loading…"
-msgstr ""
+msgstr "Wird geladen…"
msgid "Location"
msgstr "Standort"
@@ -5025,7 +5025,7 @@ msgid "No Gauge Selected"
msgstr "Keine Messuhr ausgewählt"
msgid "No grouped notifications"
-msgstr ""
+msgstr "Keine gruppierten Benachrichtigungen"
msgid "No groups assigned"
msgstr "Keine Gruppen zugewiesen"
diff --git a/packages/locale/locales/es/erp.po b/packages/locale/locales/es/erp.po
index c49e75863c..2910157838 100644
--- a/packages/locale/locales/es/erp.po
+++ b/packages/locale/locales/es/erp.po
@@ -4223,7 +4223,7 @@ msgid "Loading..."
msgstr "Cargando..."
msgid "Loading…"
-msgstr ""
+msgstr "Cargando…"
msgid "Location"
msgstr "Ubicación"
@@ -5025,7 +5025,7 @@ msgid "No Gauge Selected"
msgstr "Sin calibrador seleccionado"
msgid "No grouped notifications"
-msgstr ""
+msgstr "Sin notificaciones agrupadas"
msgid "No groups assigned"
msgstr "No hay grupos asignados"
diff --git a/packages/locale/locales/fr/erp.po b/packages/locale/locales/fr/erp.po
index c9faeb76a6..95a21b3187 100644
--- a/packages/locale/locales/fr/erp.po
+++ b/packages/locale/locales/fr/erp.po
@@ -4223,7 +4223,7 @@ msgid "Loading..."
msgstr "Chargement..."
msgid "Loading…"
-msgstr ""
+msgstr "Chargement…"
msgid "Location"
msgstr "Emplacement"
@@ -5025,7 +5025,7 @@ msgid "No Gauge Selected"
msgstr "Aucune jauge sélectionnée"
msgid "No grouped notifications"
-msgstr ""
+msgstr "Aucune notification groupée"
msgid "No groups assigned"
msgstr "Aucun groupe assigné"
diff --git a/packages/locale/locales/hi/erp.po b/packages/locale/locales/hi/erp.po
index 63adda6401..ae90ee3120 100644
--- a/packages/locale/locales/hi/erp.po
+++ b/packages/locale/locales/hi/erp.po
@@ -4223,7 +4223,7 @@ msgid "Loading..."
msgstr "लोड हो रहा है..."
msgid "Loading…"
-msgstr ""
+msgstr "लोड हो रहा है…"
msgid "Location"
msgstr "स्थान"
@@ -5025,7 +5025,7 @@ msgid "No Gauge Selected"
msgstr "कोई गेज चयनित नहीं"
msgid "No grouped notifications"
-msgstr ""
+msgstr "कोई समूहीकृत सूचनाएं नहीं"
msgid "No groups assigned"
msgstr "कोई समूह असाइन नहीं किया गया"
diff --git a/packages/locale/locales/it/erp.po b/packages/locale/locales/it/erp.po
index dfb62e6b76..3ce6661471 100644
--- a/packages/locale/locales/it/erp.po
+++ b/packages/locale/locales/it/erp.po
@@ -4223,7 +4223,7 @@ msgid "Loading..."
msgstr "Caricamento..."
msgid "Loading…"
-msgstr ""
+msgstr "Caricamento…"
msgid "Location"
msgstr "Ubicazione"
@@ -5025,7 +5025,7 @@ msgid "No Gauge Selected"
msgstr "Nessun Calibro Selezionato"
msgid "No grouped notifications"
-msgstr ""
+msgstr "Nessuna notifica raggruppata"
msgid "No groups assigned"
msgstr "Nessun gruppo assegnato"
diff --git a/packages/locale/locales/ja/erp.po b/packages/locale/locales/ja/erp.po
index 378f01e86f..7177fda025 100644
--- a/packages/locale/locales/ja/erp.po
+++ b/packages/locale/locales/ja/erp.po
@@ -4223,7 +4223,7 @@ msgid "Loading..."
msgstr "読み込み中..."
msgid "Loading…"
-msgstr ""
+msgstr "読み込み中…"
msgid "Location"
msgstr "ロケーション"
@@ -5025,7 +5025,7 @@ msgid "No Gauge Selected"
msgstr "ゲージが選択されていません"
msgid "No grouped notifications"
-msgstr ""
+msgstr "グループ化された通知がありません"
msgid "No groups assigned"
msgstr "グループが割り当てられていません"
diff --git a/packages/locale/locales/pl/erp.po b/packages/locale/locales/pl/erp.po
index 7b548d60cc..faa7183c7a 100644
--- a/packages/locale/locales/pl/erp.po
+++ b/packages/locale/locales/pl/erp.po
@@ -4223,7 +4223,7 @@ msgid "Loading..."
msgstr "Ładowanie..."
msgid "Loading…"
-msgstr ""
+msgstr "Ładowanie…"
msgid "Location"
msgstr "Lokalizacja"
@@ -5025,7 +5025,7 @@ msgid "No Gauge Selected"
msgstr "Nie wybrano miernika"
msgid "No grouped notifications"
-msgstr ""
+msgstr "Brak zgrupowanych powiadomień"
msgid "No groups assigned"
msgstr "Brak przypisanych grup"
diff --git a/packages/locale/locales/pt/erp.po b/packages/locale/locales/pt/erp.po
index 2ca6116a3c..8bbbe0a3e0 100644
--- a/packages/locale/locales/pt/erp.po
+++ b/packages/locale/locales/pt/erp.po
@@ -4223,7 +4223,7 @@ msgid "Loading..."
msgstr "Carregando..."
msgid "Loading…"
-msgstr ""
+msgstr "Carregando…"
msgid "Location"
msgstr "Localização"
@@ -5025,7 +5025,7 @@ msgid "No Gauge Selected"
msgstr "Nenhum Medidor Selecionado"
msgid "No grouped notifications"
-msgstr ""
+msgstr "Sem notificações agrupadas"
msgid "No groups assigned"
msgstr "Nenhum grupo atribuído"
diff --git a/packages/locale/locales/ru/erp.po b/packages/locale/locales/ru/erp.po
index f902d28fb6..abf98b5641 100644
--- a/packages/locale/locales/ru/erp.po
+++ b/packages/locale/locales/ru/erp.po
@@ -4223,7 +4223,7 @@ msgid "Loading..."
msgstr "Загрузка..."
msgid "Loading…"
-msgstr ""
+msgstr "Загрузка…"
msgid "Location"
msgstr "Местоположение"
@@ -5025,7 +5025,7 @@ msgid "No Gauge Selected"
msgstr "Датчик не выбран"
msgid "No grouped notifications"
-msgstr ""
+msgstr "Нет сгруппированных уведомлений"
msgid "No groups assigned"
msgstr "Нет назначенных групп"
diff --git a/packages/locale/locales/zh/erp.po b/packages/locale/locales/zh/erp.po
index 244d675632..ca1d846c58 100644
--- a/packages/locale/locales/zh/erp.po
+++ b/packages/locale/locales/zh/erp.po
@@ -4223,7 +4223,7 @@ msgid "Loading..."
msgstr "加载中..."
msgid "Loading…"
-msgstr ""
+msgstr "加载中…"
msgid "Location"
msgstr "位置"
@@ -5025,7 +5025,7 @@ msgid "No Gauge Selected"
msgstr "未选择量具"
msgid "No grouped notifications"
-msgstr ""
+msgstr "没有分组通知"
msgid "No groups assigned"
msgstr "未分配任何组"