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.

fix: external quotes

Brad Barbin60c50ddf2d1d
diff --git a/apps/erp/app/modules/purchasing/purchasing.models.ts b/apps/erp/app/modules/purchasing/purchasing.models.ts
index 6d82187475..48fc89cd09 100644
--- a/apps/erp/app/modules/purchasing/purchasing.models.ts
+++ b/apps/erp/app/modules/purchasing/purchasing.models.ts
@@ -288,8 +288,8 @@ export const supplierValidator = z.object({
currencyCode: zfd.text(z.string().optional()),
purchasingContactId: zfd.text(z.string().optional()),
invoicingContactId: zfd.text(z.string().optional()),
- website: zfd.text(z.string().optional()),
- defaultCc: z.array(z.string().email()).default([])
+ website: zfd.text(z.string().optional())
+ // defaultCc: z.array(z.string().email()).default([])
});
export const supplierContactValidator = z.object({
diff --git a/apps/erp/app/modules/purchasing/ui/Supplier/SupplierForm.tsx b/apps/erp/app/modules/purchasing/ui/Supplier/SupplierForm.tsx
index 1d58be7b80..546e8edbf4 100644
--- a/apps/erp/app/modules/purchasing/ui/Supplier/SupplierForm.tsx
+++ b/apps/erp/app/modules/purchasing/ui/Supplier/SupplierForm.tsx
@@ -19,7 +19,6 @@ import type { z } from "zod";
import {
Currency,
CustomFormFields,
- EmailRecipients,
Employee,
Hidden,
Input,
@@ -128,7 +127,7 @@ const SupplierForm = ({
/>
</>
)}
- <EmailRecipients name="defaultCc" label="Default CC" />
+ {/* <EmailRecipients name="defaultCc" label="Default CC" /> */}
<CustomFormFields table="supplier" />
</div>
</ModalCardBody>
diff --git a/apps/erp/app/modules/sales/sales.models.ts b/apps/erp/app/modules/sales/sales.models.ts
index 6d404b6511..9fc2d2df2b 100644
--- a/apps/erp/app/modules/sales/sales.models.ts
+++ b/apps/erp/app/modules/sales/sales.models.ts
@@ -74,8 +74,8 @@ export const customerValidator = z.object({
),
salesContactId: zfd.text(z.string().optional()),
invoicingContactId: zfd.text(z.string().optional()),
- website: zfd.text(z.string().optional()),
- defaultCc: z.array(z.string().email()).default([])
+ website: zfd.text(z.string().optional())
+ // defaultCc: z.array(z.string().email()).default([])
});
export const customerPaymentValidator = z.object({
diff --git a/apps/erp/app/modules/sales/ui/Customer/CustomerForm.tsx b/apps/erp/app/modules/sales/ui/Customer/CustomerForm.tsx
index d13ef74ae6..489bf8b02c 100644
--- a/apps/erp/app/modules/sales/ui/Customer/CustomerForm.tsx
+++ b/apps/erp/app/modules/sales/ui/Customer/CustomerForm.tsx
@@ -22,7 +22,6 @@ import {
CustomerStatus,
CustomerType,
CustomFormFields,
- EmailRecipients,
Employee,
Hidden,
Input,
@@ -147,7 +146,7 @@ const CustomerForm = ({
/>
</>
)}
- <EmailRecipients name="defaultCc" label="Default CC" />
+ {/* <EmailRecipients name="defaultCc" label="Default CC" /> */}
<CustomFormFields table="customer" />
</div>
</ModalCardBody>
diff --git a/apps/erp/app/routes/share+/quote.$id.tsx b/apps/erp/app/routes/share+/quote.$id.tsx
index ee34d6769f..2fb8bcb23f 100644
--- a/apps/erp/app/routes/share+/quote.$id.tsx
+++ b/apps/erp/app/routes/share+/quote.$id.tsx
@@ -365,8 +365,8 @@ const Header = ({
customer: QuoteData["customerDetails"];
strings: (typeof translations)["en"];
}) => (
- <CardHeader className="flex flex-col sm:flex-row items-start sm:items-start justify-between space-y-4 sm:space-y-2 pb-7">
- <div className="flex items-center space-x-4">
+ <div className="flex justify-between">
+ <div className="flex items-center space-x-4 tracking-tight">
<div>
<CardTitle className="text-3xl">{company?.name ?? ""}</CardTitle>
{quote?.quoteId && (
@@ -411,7 +411,7 @@ const Header = ({
</div>
)}
</div>
- </CardHeader>
+ </div>
);
type SelectedLine = {
@@ -1193,18 +1193,21 @@ const Quote = ({
/>
)}
<Card className="w-full max-w-5xl mx-auto">
- <div className="w-full text-center">
- {!["Sent", "Lost"].includes(quote.status) && (
- <QuoteStatus status={quote.status} />
- )}
- {quote?.status === "Lost" && <Badge variant="red">Rejected</Badge>}
- </div>
- <Header
- company={company}
- quote={quote}
- customer={customerDetails}
- strings={strings}
- />
+ <CardHeader>
+ <div className="w-full text-center">
+ {!["Sent", "Lost"].includes(quote.status) && (
+ <QuoteStatus status={quote.status} />
+ )}
+ {quote?.status === "Lost" && <Badge variant="red">Rejected</Badge>}
+ </div>
+
+ <Header
+ company={company}
+ quote={quote}
+ customer={customerDetails}
+ strings={strings}
+ />
+ </CardHeader>
<CardContent>
<LineItems
currencyCode={quote.currencyCode ?? "USD"}
diff --git a/apps/erp/app/routes/share+/supplier-quote.$id.tsx b/apps/erp/app/routes/share+/supplier-quote.$id.tsx
index 16ec207eb0..a5f5399a33 100644
--- a/apps/erp/app/routes/share+/supplier-quote.$id.tsx
+++ b/apps/erp/app/routes/share+/supplier-quote.$id.tsx
@@ -192,8 +192,8 @@ const EditableBadge = () => {
};
const Header = ({ company, quote }: { company: any; quote: any }) => (
- <CardHeader className="flex flex-col sm:flex-row items-start sm:items-start justify-between gap-4 sm:space-y-2 pb-7">
- <VStack spacing={4}>
+ <div className="flex justify-between">
+ <VStack spacing={4} className="tracking-tight">
<div>
<CardTitle className="text-3xl">{company?.name ?? ""}</CardTitle>
{quote?.supplierQuoteId && (
@@ -215,7 +215,7 @@ const Header = ({ company, quote }: { company: any; quote: any }) => (
</span>
) : null}
</VStack>
- </CardHeader>
+ </div>
);
const NotesEditorModal = ({
@@ -858,17 +858,20 @@ const Quote = ({
/>
)}
<Card className="w-full max-w-5xl mx-auto">
- <div className="w-full text-center">
- {quote?.status && (quote?.status as string) !== "Draft" && (
- <Status
- className="inline-flex"
- color={quote.status === "Active" ? "green" : "gray"}
- >
- {quote.status}
- </Status>
- )}
- </div>
- <Header company={company} quote={quote} />
+ <CardHeader>
+ <div className="w-full text-center">
+ {quote?.status && (quote?.status as string) !== "Draft" && (
+ <Status
+ className="inline-flex"
+ color={quote.status === "Active" ? "green" : "gray"}
+ >
+ {quote.status}
+ </Status>
+ )}
+ </div>
+
+ <Header company={company} quote={quote} />
+ </CardHeader>
<CardContent>
<LineItems
currencyCode={quote.currencyCode ?? "USD"}