Histórico da Página
...
Bloco de código | ||||||
---|---|---|---|---|---|---|
| ||||||
#INCLUDE "PROTHEUS.CH" #INCLUDE "FWMVCDEF.CH" User Function HrExTFU( cEscala ) Local oModel := FwModelActive() Local oMdlHE := oModel:GetModel("TFU_HE") Local cQuery := "" Local cAliasTXH := GetNextAlias() cQuery := "" cQuery += " SELECT DISTINCT TXH.TXH_MANUT " cQuery += " FROM " + RetSqlName("TXH") + " TXH " cQuery += " INNER JOIN " + RetSQLName("TGW") + " TGW " cQuery += " ON TGW.TGW_COD = TXH.TXH_CODPAI " cQuery += " AND TGW.TGW_FILIAL = '" + xFilial("TGW") + "' " cQuery += " AND TGW.D_E_L_E_T_ = ' ' " cQuery += " WHERE " cQuery += " TXH.TXH_FILIAL = '" + xFilial("TXH") + "' " cQuery += " AND ( TXH.TXH_CODTFF = '" + oModel:GetValue("TFF_RH", "TFF_COD") + "' OR TXH.TXH_CODTFF = ' ' )" cQuery += " AND TXH.D_E_L_E_T_ = ' ' " cQuery += " AND TGW.TGW_EFETDX = '" + cEscala + "' " cQuery := ChangeQuery(cQuery) dbUseArea(.T.,"TOPCONN",TcGenQry(,,cQuery),cAliasTXH,.T.,.T.) While (cAliasTXH)->(!Eof()) If !(oMdlHE:SeekLine({{"TFU_CODABN", (cAliasTXH)->(TXH_MANUT)}})) If oMdlHE:Length() > 1 .Or. !Empty( oMdlHE:GetValue("TFU_CODABN") ) oMdlHE:AddLine() EndIf oMdlHE:SetValue("TFU_CODABN", (cAliasTXH)->(TXH_MANUT)) oMdlHE:SetValue("TFU_VALOR", 0) EndIf (cAliasTXH)->(DbSkip()) EndDo (cAliasTXH)->(dbCloseArea()) Return cEscala User Function VLDRecHR() Local lRet := .F. Local lIsRecorrente := .F. Local lIsItenExtra := .F. If isInCallStack("TECA870") .OR. isInCallStack("FATA300") .OR. isInCallStack("TECA745") lIsRecorrente := FwFldGet("TFJ_CNTREC") == "1" Local lIsItenExtra := FwfldGet("TFF_COBCTR") == "2" //Só será executado para contratos recorrentes e não será executado para item extra If lIsRecorrente .And. !lIsItenExtra lRet := .T. EndIf EndIf Return lRet |
04. DEMAIS INFORMAÇÕES
DSERSGS-8699 DT Pro rata na medição de orçamentos recorrentes
...
Visão Geral
Import HTML Content
Conteúdo das Ferramentas
Tarefas