...
Está operação ocorre no evento Finalização da Venda. A seguir exemplos de como executar esta operação.
PARÂMETRO | TIPO | OBRIGATÓRIO | DESCRIÇÃO |
PrintType | string | true | Tipo do modelo de impressão cptNone - Nenhum opção cptFull - Impressão completa cptNoPrint - Não imprime nada cptPrintPartial - Parcial sem os itens |
IdDocument | Integer | true | Identificado do documento |
KindDocument | string | true | Modelo do documento 59 - Sat 65 - NFCe |
55 - NFe
2D - Impressora fiscal
SerialNumber | TextString List | true | Número de série do documento |
Document | String XML | true | XML da venda |
URL | string | true | URL para acessar o documento na sefaz |
Os outros parâmetros são encontrados no evento Finalização da Venda. Clique aqui e acesse a documentação.
...
{
"Event":"cetBefore",
"Execution":"cetContinue",
"ID":"001032000942052",
"Operation":"cotEndSale",
"Sale":{
"Discount":0.0000000000000000E+000,
"Header":{
"AccountingDate":"2022-10-04T00:00:00",
"DateTimeIssue":"2022-10-04T11:05:10",
"IdDocument":942052,
"IdInvoiceKey":"29221002768254000180658000000079629611081219",
"IdStore":1,
"IdTerminal":32,
"IdUser":2,
"Status":"sttValid"
},
"ID":"001032000942052",
"Increase":0.0000000000000000E+000,
"Items":[
{
"BarCode":"3",
"CaptionPacking":"UN",
"Description":"REFRIGPETFANTALARANJA2L",
"DiscountPrice":0.0000000000000000E+000,
"IdSegment":3,
"IncreasePrice":0.0000000000000000E+000,
"InternalCode":"3966",
"ItemNumber":1,
"PackingQuantity":1.0000000000000000E+000,
"Quantity":1.0000000000000000E+000,
"SellerCode":0,
"Status":"sttValid",
"TotalPrice":1.5000000000000000E+001,
"UnitPrice":1.5000000000000000E+001
},
{
"BarCode":"1",
"CaptionPacking":"UN",
"Description":"INSPREMISTPAOFRANVICATO25kg",
"DiscountPrice":0.0000000000000000E+000,
"IdSegment":3,
"IncreasePrice":0.0000000000000000E+000,
"InternalCode":"1752",
"ItemNumber":2,
"OrderNumber":"",
"PackingQuantity":1.0000000000000000E+000,
"Quantity":1.0000000000000000E+000,
"SellerCode":0,
"Status":"sttValid",
"TotalPrice":5.8000000000000000E+001,
"UnitPrice":5.8000000000000000E+001
}
],
"Payments":[
{
"Discount":0.0000000000000000E+000,
"Increase":0.0000000000000000E+000,
"InstallmentAmount":0,
"ItemNumber":1,
"PaymentNumber":1,
"PaymentType":"cptMoney",
"Total":7.3000000000000000E+001
}
],
"TaxDocument":{
"Document":"<?xml version=\"1.0\"?>",
"IdDocument":7962,
"KindDocument":"65",
"SerialNumber":"800",
"URL":"http:\/\/nfcehomolog.sefaz.pe.gov.br\/nfce-web\/consultarNFCe"
},
"Total":7.3000000000000000E+001
},
"Version":1
}
...
{
"version":1,
"sale":{
"increase":0,
"discount":0,
"total":0,
"items":[
{
"itemNumber":1,
"unitPrice":0,
"increasePrice":0,
"packingQuantity":0,
"quantity":0,
"totalPrice":0,
"discountPrice":1.5,
"status":"sttValid",
"sellerCode":0
},
{
"itemNumber":2,
"unitPrice":0,
"increasePrice":0,
"packingQuantity":0,
"quantity":0,
"totalPrice":0,
"discountPrice":5.8,
"status":"sttValid",
"sellerCode":0
}
],
"print":{
"printType":"cptPrintPartial"
}
},
"execution":"cetCompleted"
}
...