SELECT {FIELDS} FROM
ServiceAssemblyForms A
{JOIN}
{WHERE}
{ORDERBY}
| Alias | CLSID objektu | Prefix | Popis |
|---|---|---|---|
| A | I3CRLLN3XYVO30ZDQ2WB4CRZW0 | ||
| DQ | OFTMKVQH3ZD13ACL03KIU0CLP4 | DocQueues | Řada dokladů |
| F | 4K3EXM5PQBCL35CH000ILPWJF4 | Firm | Firma |
| P | CAQPAYUOXVCL3ACL03KIU0CLP4 | Periods | Období |
| SDC | BCHF52UGXCO4H5MIAQVY5P3ZOC | ServDoc | Servisní list |
| SR | QRDGQ1DV2CU4D3TOUMORZ0LWIW | SecurityRole | Role uživatele |
| SWS | S0MSV3WXRC24PFNR3SF20HZ5VC | WorkSpace | Pracoviště/Dílna |
SELECT {FIELDS} FROM
ServiceAssemblyForms2 R
{JOIN}
WHERE
R.Parent_ID=:ID
ORDER BY
R.PosIndex
| Alias | CLSID objektu | Prefix | Popis |
|---|---|---|---|
| R | T3S00IN35IV4D0M3AQ0Y10CDFC | ||
| SC | C3V5QDVZ5BDL342M01C0CX3FCC | StoreCard | Skladová karta |
| SR | QRDGQ1DV2CU4D3TOUMORZ0LWIW | SecurityRole | Role pracovníka |
| SR2 | QRDGQ1DV2CU4D3TOUMORZ0LWIW | SecurityRole | Role zařízení (nepersonální) |
| ST | SFMSB5W15BDL3CL100C4RHECN0 | Store | Sklad |
| SWC | OJQ5SXN23YPOX2PYAK41SFBIVO | ServiceWorkCategory | Servisní odbornost |
SELECT {FIELDS} FROM
ServiceDocumentDefects A
WHERE
A.Parent_ID=:ServiceDocument_ID
ORDER BY
A.PosIndex
| Alias | CLSID objektu | Prefix | Popis |
|---|---|---|---|
| A | WSM5RRXCO55OT3QTVRB4XCA15C |
A.ServiceDocument_ID = {:VALUE}
A.ServiceDocument_ID IN ({:LIST})
(A.StartDate$DATE >= {:LOW}) and (A.StartDate$DATE < {:HIGH})
(A.EndDate$DATE >= {:LOW}) and (A.EndDate$DATE < {:HIGH})
A.Cooperation = {:VALUE}
(A.CooperationFirm_ID IN (SELECT ID FROM Firms WHERE ID={:VALUE} OR Firm_ID={:VALUE}))
(A.CooperationFirm_ID IN (SELECT ID FROM Firms WHERE (ID IN ({:LIST})) OR (Firm_ID IN ({:LIST}))))
A.ServiceWorkSpace_ID IN ({:LIST})
A.ServiceWorkSpace_ID = {:VALUE}
A.ServiceWorkSpace_ID IS NULL
/* Omezeni za role s moznosti vsech podrizenych */
(
/* timhle omezime vsechny prime nadrizene */
(A.ResponsibleRole_ID = (select Bx.ID from SecurityRoles Bx where Bx.ID = {:VALUE}))
or
/* a jestli mame omezeit za podrizene tak to udelame takhle */
({WithChildren} = 1 AND
(A.ResponsibleRole_ID in
(select Bx.ID from SecurityRoles Bx where
Bx.ID in (select B2x.ID from Sys$SecurityRoles2 B2x where B2x.Superior_ID = {:VALUE})
)
)
)
)
/* Omezeni za role s moznosti vsech podrizenych */
(
/* timhle omezime vsechny prime nadrizene */
(A.ResponsibleRole_ID in (select Bx.ID from SecurityRoles Bx where Bx.ID in ({:LIST})))
or
/* a jestli mame omezeit za podrizene tak to udelame takhle */
({WithChildren} = 1 AND
(A.ResponsibleRole_ID in
(select Bx.ID from SecurityRoles Bx where
Bx.ID in (select B2x.ID from Sys$SecurityRoles2 B2x where B2x.Superior_ID in ({:LIST}))
)
)
)
)
##CASEOR {:VALUE} #
##1#A.AssemblyState = 0
##2#A.AssemblyState = 1
##3#A.AssemblyState = 2
##4#A.AssemblyState = 3
##END#
{:ANDWHERE}
TableName=ServiceAssemblyForms2
Alias=Y
##CASEOR {:VALUE} #
##1#Y.ItemType = 0
##2#Y.ItemType = 1
##3#Y.ItemType = 2
##4#Y.ItemType = 3
##5#Y.ItemType = 4
##END#
/* Omezeni za role s moznosti vsech podrizenych */
(
/* timhle omezime vsechny prime nadrizene */
(Y.WorkerRole_ID = (select Bx.ID from SecurityRoles Bx where Bx.ID = {:VALUE}))
or
/* a jestli mame omezeit za podrizene tak to udelame takhle */
({WithChildren} = 1 AND
(Y.WorkerRole_ID in
(select Bx.ID from SecurityRoles Bx where
Bx.ID in (select B2x.ID from Sys$SecurityRoles2 B2x where B2x.Superior_ID = {:VALUE})
)
)
)
)
/* Omezeni za role s moznosti vsech podrizenych */
(
/* timhle omezime vsechny prime nadrizene */
(Y.WorkerRole_ID in (select Bx.ID from SecurityRoles Bx where Bx.ID in ({:LIST})))
or
/* a jestli mame omezeit za podrizene tak to udelame takhle */
({WithChildren} = 1 AND
(Y.WorkerRole_ID in
(select Bx.ID from SecurityRoles Bx where
Bx.ID in (select B2x.ID from Sys$SecurityRoles2 B2x where B2x.Superior_ID in ({:LIST}))
)
)
)
)
<<Y.Text>> LIKE {:VALUE} ESCAPE '~'
/* musime bohuzel doplnit podminku pro neskladove radky, aby se
do vystupu dostaly i textove radky bez skladu */
((not (Y.StoreCard_ID is null) and Y.Store_ID = {:VALUE}) or (Y.StoreCard_ID is null))
/* musime bohuzel doplnit podminku pro neskladove radky, aby se
do vystupu dostaly i textove radky bez skladu */
((not (Y.StoreCard_ID is null) and (Y.Store_ID IN ({:LIST}))) or (Y.StoreCard_ID is null))
Y.QuantityDelivered BETWEEN {:LOW} and {:HIGH}
Y.SecurityRole_ID = {:VALUE}
Y.SecurityRole_ID IN ({:LIST})
Y.ServiceWorkCategory_ID = {:VALUE}
Y.ServiceWorkCategory_ID IN ({:LIST})
Y.ServiceWorkCategory_ID IS NULL
##CASEOR {:VALUE} #
##1#Y.ToInvoiceType = 0
##2#Y.ToInvoiceType = 1
##3#Y.ToInvoiceType = 2
##4#Y.ToInvoiceType = 3
##END#
##CASEOR {:VALUE} #
##1#Y.IsInvoiced = 0
##2#Y.IsInvoiced = 1
##3#Y.IsInvoiced = 2
##4#Y.IsInvoiced = 3
##END#
DQ.Code Collate PXW_CSY {DIR},
P.Code Collate PXW_CSY {DIR},
SDC.OrdNumber {DIR},
A.OrdNumberA.OrdNumber
A.StartDate$DATE
A.EndDate$DATE
SWS.Name
SR.Name
A.AssemblyState
F.Name Collate PXW_CSY {DIR},A.CooperationFirm_IDGenerated by ABRA Software a.s. 27.10.2021 16:36