Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- Func verificarFacturaComex($vFactura, ByRef $campo)
- Switch ($juridica)
- Case "NS"
- ;Send("New San SA")
- Case "ES"
- ;Send("Electronic System SA")
- Case "NX"
- ;Send("Noblex Argentina SA")
- Case "PI"
- ;Send("Pilisar S.A.")
- Case Else
- $campo = "Juridica"
- Return False
- EndSwitch
- Switch (Json_get($oFactura, ".tipoDocumento"))
- Case "FACTURA"
- ;Send("FC")
- Case "NOTA DE CREDITO"
- ;Send("NC")
- Case "NOTA DE DEBITO"
- ;Send("ND")
- Case Else
- $campo = "tipoDocumento"
- Return False
- EndSwitch
- if Json_get($oFactura, ".cuitProveedor") = "" Then
- $campo = "cuitProveedor"
- Return False
- EndIf
- if Json_get($oFactura, ".fechaEmision") = "" Then
- $campo = "fechaEmision"
- Return False
- EndIf
- if Json_get($oFactura, ".numeroFactura") = "" Then
- $campo = "numeroFactura"
- Return False
- EndIf
- if Json_get($oFactura, ".moneda") <> "" Then
- if Json_get($oFactura, ".tipoCambio") = "" Then
- $campo = "tipoCambio"
- Return False
- EndIf
- EndIf
- if Json_get($oFactura, ".importeTotal") = "" Then
- $campo = "importeTotal"
- Return False
- EndIf
- if Json_get($oFactura, ".letraDocumento") = "" Then
- $campo = "letraDocumento"
- Return False
- EndIf
- if Json_get($oFactura, ".cae") = "" Then
- $campo = "cae"
- Return False
- EndIf
- if Json_get($oFactura, ".fechaCae") = "" Then
- $campo = "fechaCae"
- Return False
- EndIf
- Return True
- EndFunc
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement