First initial commit

This commit is contained in:
AzureAD\SylvainDUVERNAY
2026-01-07 14:38:55 +01:00
parent 0d02c89192
commit 022f4e0a2a
16 changed files with 587 additions and 2 deletions

32
vw_utility_lot.sql Normal file
View File

@@ -0,0 +1,32 @@
-- View: public.vw_utility_lot
-- DROP VIEW public.vw_utility_lot;
CREATE OR REPLACE VIEW public.vw_utility_lot AS
SELECT id AS "intLotId",
COALESCE(lot_container, ''::character varying) AS "strContainer",
COALESCE(lot_name, ''::character varying) AS "strLotName",
COALESCE(lot_status, ''::character varying) AS "strStatus",
COALESCE(lot_type, ''::character varying) AS "strType",
COALESCE(lot_av, ''::character varying) AS "strAvailability",
line AS "intPurchaseLineId",
sale_line AS "intSaleLineId",
lot_product AS "intProductId",
lot_state AS "intLotStateId",
lot_unit AS "intUnitId",
lot_unit_line AS "intUnitLineId",
lot_qt AS "dblQuantity",
invoice_line AS "intInvoiceLineId",
invoice_line_prov AS "intInvoiceLineProvId",
COALESCE(lot_pur_inv_state, ''::character varying) AS "strPurchaseInvoiceState",
COALESCE(lot_sale_inv_state, ''::character varying) AS "strSaleInvoiceState",
lot_shipment_in AS "intShipmentInId",
lot_shipment_internal AS "intShipmentInternalId",
lot_shipment_out AS "intShipmentOutId",
sale_invoice_line AS "intSaleInvoiceLineId",
sale_invoice_line_prov AS "intSaleInvoiceLineProvId"
FROM lot_lot lot
WHERE 1 = 1;
ALTER TABLE public.vw_utility_lot
OWNER TO postgres;