Ok, é um erro fácil de resolver, usuário até já resolve sozinho.
Mas estou pensando em expandir as validações dessa e de outras coisas.
Existe tabela oficial com regras adicionais pra facilitar as validações desse tipo de coisa e de outras coisas?
CSOSN incompatível na operação com NÃO Contribuinte
Moderador: Moderadores
- JoséQuintas
- Administrador

- Mensagens: 20267
- Registrado em: 26 Fev 2007 11:59
- Localização: São Paulo-SP
CSOSN incompatível na operação com NÃO Contribuinte
José M. C. Quintas
Harbour 3.2, mingw, gtwvg mt, fivewin 25.04, multithread, dbfcdx, MySQL, ADOClass, PDFClass, SefazClass, (hwgui mt), (hmg3), (hmg extended), (oohg), PNotepad, ASP, stored procedure, stored function, Linux (Flagship/harbour 3.2)
"The world is full of kings and queens, who blind our eyes and steal our dreams Its Heaven and Hell"
https://github.com/JoseQuintas/
Harbour 3.2, mingw, gtwvg mt, fivewin 25.04, multithread, dbfcdx, MySQL, ADOClass, PDFClass, SefazClass, (hwgui mt), (hmg3), (hmg extended), (oohg), PNotepad, ASP, stored procedure, stored function, Linux (Flagship/harbour 3.2)
"The world is full of kings and queens, who blind our eyes and steal our dreams Its Heaven and Hell"
https://github.com/JoseQuintas/
- JoséQuintas
- Administrador

- Mensagens: 20267
- Registrado em: 26 Fev 2007 11:59
- Localização: São Paulo-SP
CSOSN incompatível na operação com NÃO Contribuinte
Só evitando retrabalho.
Por enquanto acho que isso resolve.
Por enquanto acho que isso resolve.
Código: Selecionar todos
IF ASCan( { "101,201" }, { | e | e == Trim( jpitped->ipIcmCst ) } ) != 0 .AND. ;
ASCan( { "ISENTO", "NAOCONTRIBUINTE" }, { | e | e == Trim( jpcadastro->cdInsEst ) } ) != 0
MsgStop( "INVÁLIDO! CSOSN indicado exige Inscrição Estadual" + hb_Eol() + ;
"mas cadastro indica ISENTO ou NÃO CONTRIBUINTE." + hb_Eol() + ;
"Verifique se estão corretos a transação e/ou a tributação e/ou o cadastro" )
mErro := .T.
EXIT
ENDIF
José M. C. Quintas
Harbour 3.2, mingw, gtwvg mt, fivewin 25.04, multithread, dbfcdx, MySQL, ADOClass, PDFClass, SefazClass, (hwgui mt), (hmg3), (hmg extended), (oohg), PNotepad, ASP, stored procedure, stored function, Linux (Flagship/harbour 3.2)
"The world is full of kings and queens, who blind our eyes and steal our dreams Its Heaven and Hell"
https://github.com/JoseQuintas/
Harbour 3.2, mingw, gtwvg mt, fivewin 25.04, multithread, dbfcdx, MySQL, ADOClass, PDFClass, SefazClass, (hwgui mt), (hmg3), (hmg extended), (oohg), PNotepad, ASP, stored procedure, stored function, Linux (Flagship/harbour 3.2)
"The world is full of kings and queens, who blind our eyes and steal our dreams Its Heaven and Hell"
https://github.com/JoseQuintas/
- JoséQuintas
- Administrador

- Mensagens: 20267
- Registrado em: 26 Fev 2007 11:59
- Localização: São Paulo-SP
CSOSN incompatível na operação com NÃO Contribuinte
Primeiro ASCan() tá errado, não coloquei como array.
Mas deu certo.
O alerta antecipado ajuda o cliente a corrigir também antecipado.
Mas deu certo.
O alerta antecipado ajuda o cliente a corrigir também antecipado.
José M. C. Quintas
Harbour 3.2, mingw, gtwvg mt, fivewin 25.04, multithread, dbfcdx, MySQL, ADOClass, PDFClass, SefazClass, (hwgui mt), (hmg3), (hmg extended), (oohg), PNotepad, ASP, stored procedure, stored function, Linux (Flagship/harbour 3.2)
"The world is full of kings and queens, who blind our eyes and steal our dreams Its Heaven and Hell"
https://github.com/JoseQuintas/
Harbour 3.2, mingw, gtwvg mt, fivewin 25.04, multithread, dbfcdx, MySQL, ADOClass, PDFClass, SefazClass, (hwgui mt), (hmg3), (hmg extended), (oohg), PNotepad, ASP, stored procedure, stored function, Linux (Flagship/harbour 3.2)
"The world is full of kings and queens, who blind our eyes and steal our dreams Its Heaven and Hell"
https://github.com/JoseQuintas/