Árvore de páginas

Versões comparadas

Chave

  • Esta linha foi adicionada.
  • Esta linha foi removida.
  • A formatação mudou.

...

Todos os parâmetros são recebidos na User Function via PARAMIXB, conforme consta em Execblock / Customização.

08. EXEMPLO

------

       #INCLUDE #INCLUDE 'TOTVS.CH'



/*/{Protheus.doc} WMSALIBX
Ponto de entrada para manipular a tabela D12, no momento da

...

geração do serviço, antes de liberar para convocação
@type function
@version V.12

...


/*/
User Function WMSALIBX() //{Self:aLibD12}
Local aAreaAtu := GetArea()
Local aLibD12  := PARAMIXB[1]
Local nI := 0
Local nQtdOper := 0
Local nQtdAtivi := 0
Local nPorOper := 0
Local nConta := 0
Local nOper := 0

If Len(aLibD12) > 0
    nQtdOper  := 2
    nQtdAtivi := 0
    For nI := 1 To Len(aLibD12)
        If aLibD12[nI,4] == "301" //Serviço de Separação
            nQtdAtivi++
        Endif
    Next
    If nQtdAtivi > 0 .And. nQtdOper > 0
        nPorOper := Round(nQtdAtivi/nQtdOper,0)
        nConta   := 0
        nOper    := 1
        For nI := 1 To Len(aLibD12)
            If aLibD12[nI,4] == "301" //Serviço de Separação
                D12->(dbGoTo(aLibD12[nI,2]))
                If D12->(!Eof())
                    RecLock('D12',.F.)
                    D12->D12_RECEMB := StrZero(nOper,6)
                    D12->(MsUnlock())
                    nConta++
                EndIf
                If nConta >= nPorOper
                    nConta := 0
                    nOper  ++
                Endif
            Endif
        Next
    Endif
Endif
RestArea(aAreaAtu)

Return(aLibD12)


------


Templatedocumentos


HTML
<style>
div.theme-default .ia-splitter #main {
    margin-left: 0px;
}
.ia-fixed-sidebar, .ia-splitter-left {
    display: none;
}
#main {
    padding-left: 10px;
    padding-right: 10px;
    overflow-x: hidden;
}

.aui-header-primary .aui-nav,  .aui-page-panel {
    margin-left: 0px !important;
}
.aui-header-primary .aui-nav {
    margin-left: 0px !important;
}

.aui-tabs.horizontal-tabs>.tabs-menu>.menu-item.active-tab a::after { 
	background: #FF9900; !important 
}

.menu-item.active-tab { 
	border-bottom: none !important; 
}

</style>