Á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

...

languagecpp
titleExemplo
linenumberstrue
collapsetrue

...

------

#INCLUDE "PROTHEUS.CH"

...

User

...

Function

...

WV080GVA()

...


Local

...

cCarga

...

:=

...

PARAMIXB[1]

...


Local

...

cPedido

...

:=

...

PARAMIXB[2]

...


Local

...

cProduto

...

:=

...

AllTrim(PARAMIXB[3])

...


Local

...

cVolume

...

:=

...

PARAMIXB[4]

...


Local

...

nQtde

...

:=

...

PARAMIXB[5]

...


Local

...

cQuery

...

:=

...

""

...


Local

...

cAliasQry

...

:=

...

""

...

If

...

cProduto

...

==

...

"WMS01"

...


      cQuery :=

...

"SELECT

...

MAX(DCU_CODVOL)

...

CODVOL"

...


      cQuery +=

...

"

...

FROM

...

"

...

+

...

RetSqlName('DCU')

...


      cQuery +=

...

"

...

WHERE

...

DCU_FILIAL

...

=

...

'"+xFilial('DCU')+"'"

...


      cQuery +=

...

"

...

AND

...

DCU_CARGA

...

=

...

'"+cCarga+"'"

...


      cQuery +=

...

"

...

AND

...

DCU_PEDIDO

...

=

...

'"+cPedido+"'"

...


      cQuery +=

...

"

...

AND

...

D_E_L_E_T_

...

=

...

'

...

'"

...


      cQuery :=

...

ChangeQuery(cQuery)

...


      cAliasQry :=

...

GetNextAlias()

...


      DbUseArea(.T.,'TOPCONN',TcGenQry(,,cQuery),cAliasQry,.F.,.T.)

...


      If !Empty((cAliasQry)

...

→ CODVOL)
              // Permite avaliar a quantidade do produto para gerar um novo volume
             If nQtde > 10
                   // Remove os espaços em branco e incrementa o valor
                  cVolume := Soma1(AllTrim((cAliasQry)->CODVOL))

...


                  WmsMessage("Novo

...

volume

...

criado:

...

"

...

+

...

cVolume)

...


            EndIf
      Else
           cVolume := "01"
     EndIf
EndIf

Return cVolume

------


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>