sgrRetornaDocumentos
Returns documents that can be linked to new trips.
PARAMETERS
Field | Type | Req. | Description |
---|---|---|---|
keyaccess | string | Yes | Key returned by the sgrLogin method. |
cdpas | integer | Yes | PAS code, returned by the sgrListaPASUsuario method |
cdcliente | integer | Yes | Customer code, returned by the sgrListaEmpresasPASUsuario method. |
cdtransp | integer | No | Transport company code. This code is returned by the sgrListaTransportadoras method. |
cdsituacaodoc | integer | No | Document status code. Enter 0 to search for new documents, 7 to search for pending documents. If you fill in the field with another value, the search will return both new and pending documents. |
nrdoc | string | No | Document number. |
nrcnpjcpf | string | No | Recipient's CPF/CNPJ. |
nrcontrolecliente1 | string | No | Customer control. |
nrcontrolecliente2 | string | No | Customer control. |
nrcontrolclient3 | string | No | Customer control. |
nrcontrolclient4 | string | No | Client control. |
nrcontrolclient5 | string | No | Client control. |
nrcontrolclient6 | string | No | Customer control. |
METHOD RETURN:
ReturnDataset: If the parameters are filled in correctly, the property will return two tables:
Field | Type | Description |
---|---|---|
CDDOC | integer | Document code |
NRDOC | string | Document number |
CDTRANSP | integer | Transport company code |
DSNOMETRANSP | string | Transport company name |
NRCGCCPF | string | Recipient's CPF/CNPJ |
DSNOMEDESTINATIO | string | Recipient's name |
DSRUA | string | Recipient's address |
NRRUA | char(6) | Recipient's address number |
DSBAIRRO | string | Recipient's address neighborhood |
CDCID | integer | Recipient's city code |
DSNOMECID | string | Recipient's city name |
DSSIGLAUF | char(2) | Recipient's state (abbreviation) |
NRCONTROLLER1 | string | Customer control 1 |
NRCONTROLLER2 | string | Customer control 2 |
NRCONTROLECLIENTE3 | string | Client control 3 |
NRLACRESIF | string | Client control 4 |
NRLACREARMADOR | string | Client control 5 |
DSNAVIO | string | Client control 6 |
FLSITUATION | smallint | Document status |
DSSITUACAODOC | string | Description |
VLVALUE | money | Document value |
CDPAISORIGIN | integer | Country of origin code |
DTPREVISTA | datetime | Expected document date |
DSCOMPLRUA | string | Address complement |
NRFONE1 | char(12) | Recipient's phone number 1 |
NRFONE2 | char(12) | Recipient's phone number 2 |
VLLAT | real | Latitude of address |
VLLONG | real | Longitude of address |
VLQTDEPECAS | integer | Number of pieces in document |
VLQTDEVOL | integer | Document volume quantity |
DTPREVISTASAIDA | datetime | Expected departure date |
FLTPOPER | smallint | Type of operation |
VLSEQDEST | string | Destination sequence |
CDPAISORIGINEMITTER | integer | Issuer's country of origin code |
NRCGCCPFEMITENTE | string | CPF/CNPJ of the issuer |
FLTPDOC | smallint | Document type |
CDPFJ | integer | Recipient code |
CDEMITENT | integer | Issuer code |
CDEMBARCADOR | integer | Shipper code |
Field | Type | Description |
---|---|---|
CDDOC | integer | Document code |
CDPROD | integer | Product code |
VLPRODCARGA | real | Product value |
ReturnDescription: If there is an error when executing the method, the property will display:
Error | Description |
---|---|
There was an error performing the search. | This error may be caused by an incorrect parameter, the field to be corrected will be indicated in the returnDataset property. This means you need to check the parameters and run the method again. It may also indicate a timeout or a dropped connection to the database. It is necessary to pass on the data entered, as well as the name of the method, the issue time and the customer code to the following e-mail address: [email protected] so that the error can be validated. |