Advertisement
Guest User

funcion

a guest
Mar 26th, 2019
83
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.76 KB | None | 0 0
  1. Func verificarFacturaComex($vFactura, ByRef $campo)
  2.  
  3. Switch ($juridica)
  4. Case "NS"
  5. ;Send("New San SA")
  6. Case "ES"
  7. ;Send("Electronic System SA")
  8. Case "NX"
  9. ;Send("Noblex Argentina SA")
  10. Case "PI"
  11. ;Send("Pilisar S.A.")
  12. Case Else
  13. $campo = "Juridica"
  14. Return False
  15. EndSwitch
  16.  
  17. Switch (Json_get($oFactura, ".tipoDocumento"))
  18. Case "FACTURA"
  19. ;Send("FC")
  20. Case "NOTA DE CREDITO"
  21. ;Send("NC")
  22. Case "NOTA DE DEBITO"
  23. ;Send("ND")
  24. Case Else
  25. $campo = "tipoDocumento"
  26. Return False
  27. EndSwitch
  28.  
  29. if Json_get($oFactura, ".cuitProveedor") = "" Then
  30. $campo = "cuitProveedor"
  31. Return False
  32. EndIf
  33.  
  34. if Json_get($oFactura, ".fechaEmision") = "" Then
  35. $campo = "fechaEmision"
  36. Return False
  37. EndIf
  38.  
  39. if Json_get($oFactura, ".numeroFactura") = "" Then
  40. $campo = "numeroFactura"
  41. Return False
  42. EndIf
  43.  
  44. if Json_get($oFactura, ".moneda") <> "" Then
  45. if Json_get($oFactura, ".tipoCambio") = "" Then
  46. $campo = "tipoCambio"
  47. Return False
  48. EndIf
  49. EndIf
  50.  
  51. if Json_get($oFactura, ".importeTotal") = "" Then
  52. $campo = "importeTotal"
  53. Return False
  54. EndIf
  55.  
  56. if Json_get($oFactura, ".letraDocumento") = "" Then
  57. $campo = "letraDocumento"
  58. Return False
  59. EndIf
  60.  
  61. if Json_get($oFactura, ".cae") = "" Then
  62. $campo = "cae"
  63. Return False
  64. EndIf
  65.  
  66. if Json_get($oFactura, ".fechaCae") = "" Then
  67. $campo = "fechaCae"
  68. Return False
  69. EndIf
  70. Return True
  71. EndFunc
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement