CREATE VIEW "SBODEMODE"."B1_JournalTransSourceView" ( "DocEntry", "InstlmntID", "ObjType", "CardCode", "CardName", "NumAtCard", "SlpCode", "InsTotal", "InsTotalFC", "InsTotalSy", "BlockDunn", "DunnLevel", "TransType", "IsSales", "IsDunnable", "BoeNum", "BoeStatus", "PeyMethod" ) AS ((((SELECT T0."DocEntry", T0."InstlmntID", T0."ObjType", T0."CardCode", T0."CardName", T0."NumAtCard", T0."SlpCode", T0."InsTotal", T0."InsTotalFC", T0."InsTotalSy", T0."BlockDunn", T0."DunnLevel", 'I' AS "TransType", T0."IsSales", T0."IsDunnable", 0 AS "BoeNum", '' AS "BoeStatus", T0."PeyMethod" FROM  "SBODEMODE"."B1_DocInstallmentsView" T0) UNION ALL (SELECT T0."DocEntry", 0 AS "InstlmntID", T0."ObjType", T0."CardCode", T0."CardName", '' AS "NumAtCard", -1 AS "SlpCode", T0."DocTotal", T0."DocTotalFC", T0."DocTotalSy", 'Y' AS "BlockDunn", 0 AS "DunnLevel", 'P' AS "SrcType", '' AS "IsSales", 'N' AS "IsDunnable", 0 AS "BoeNum", '' AS "BoeStatus", '' AS "PeyMethod" FROM  "SBODEMODE"."ORCT" T0)) UNION ALL (SELECT T0."DocEntry", 0 AS "InstlmntID", T0."ObjType", T0."CardCode", T0."CardName", '' AS "NumAtCard", -1 AS "SlpCode", T0."DocTotal", T0."DocTotalFC", T0."DocTotalSy", 'Y' AS "BlockDunn", 0 AS "DunnLevel", 'P' AS "SrcType", '' AS "IsSales", 'N' AS "IsDunnable", 0 AS "BoeNum", '' AS "BoeStatus", '' AS "PeyMethod" FROM  "SBODEMODE"."OVPM" T0)) UNION ALL (SELECT T0."DeposId", 0 AS "InstlmntID", T0."ObjType", '' AS "CardCode", '' AS "CardName", '' AS "NumAtCard", -1 AS "SlpCode", T0."LocTotal", T0."FcTotal", T0."SysTotal", 'Y' AS "BlockDunn", 0 AS "DunnLevel", 'D' AS "SrcType", '' AS "IsSales", 'N' AS "IsDunnable", T1."BoeNum", T1."BoeStatus", '' AS "PeyMethod" FROM  "SBODEMODE"."ODPS" T0   LEFT OUTER  JOIN "SBODEMODE"."OBOE" T1  ON  T1."BoeKey" = T0."DeposId")) WITH READ ONLY