summaryrefslogtreecommitdiff
path: root/db/schema/rfqLast.ts
diff options
context:
space:
mode:
Diffstat (limited to 'db/schema/rfqLast.ts')
-rw-r--r--db/schema/rfqLast.ts17
1 files changed, 17 insertions, 0 deletions
diff --git a/db/schema/rfqLast.ts b/db/schema/rfqLast.ts
index 34c61cd0..a9f91308 100644
--- a/db/schema/rfqLast.ts
+++ b/db/schema/rfqLast.ts
@@ -315,6 +315,23 @@ export const rfqsLastView = pgView("rfqs_last_view").as((qb) => {
LIMIT 1
)`.as("major_item_material_code"),
+ majorItemMaterialDescription: sql<string | null>`(
+ SELECT material_description
+ FROM rfq_pr_items
+ WHERE rfqs_last_id = ${rfqsLast.id}
+ AND major_yn = true
+ LIMIT 1
+ )`.as("major_item_materialD_description"),
+
+
+ majorItemMaterialCategory: sql<string | null>`(
+ SELECT material_category
+ FROM rfq_pr_items
+ WHERE rfqs_last_id = ${rfqsLast.id}
+ AND major_yn = true
+ LIMIT 1
+ )`.as("major_item_material_category"),
+
majorItemPrNo: sql<string | null>`(
SELECT pr_no
FROM rfq_pr_items