Segundo o manual do BPe as formas de pagamento são: 01-Dinheiro;02-Cheque;03-Cartão de Crédito;04-Cartão de Débito;05-Vale Transporte;99 -Outros
Fiz as modificações no arquivo para atender o BPe.
PCNComum/pcnConversao.pas
TpcnFormaPagamentoBPe = (fpDinheiroBPe, fpChequeBPe, fpCartaoCreditoBPe, fpCartaoDebitoBPe, fpValeTransporteBPe,
fpOutroBPe);
function FormaPagamentoBPeToStr(const t: TpcnFormaPagamentoBPe): string;
function FormaPagamentoBPeToDescricao(const t: TpcnFormaPagamentoBPe): string;
function StrToFormaPagamentoBPe(out ok: boolean; const s: string): TpcnFormaPagamentoBPe;
function FormaPagamentoBPeToStr(const t: TpcnFormaPagamentoBPe): string;
begin
result := EnumeradoToStr(t, ['01', '02', '03', '04', '05', '99'],
[fpDinheiroBPe, fpChequeBPe, fpCartaoCreditoBPe, fpCartaoDebitoBPe, fpValeTransporteBPe,
fpOutroBPe ]);
end;
function FormaPagamentoBPeToDescricao(const t: TpcnFormaPagamentoBPe): string;
begin
result := EnumeradoToStr(t, ['Dinheiro', 'Cheque', 'Cartão de Crédito', 'Cartão de Débito', 'Vale Transporte',
'Outro'],
[fpDinheiroBPe, fpChequeBPe, fpCartaoCreditoBPe, fpCartaoDebitoBPe, fpValeTransporteBPe,
fpOutroBPe]);
end;
function StrToFormaPagamentoBPe(out ok: boolean; const s: string): TpcnFormaPagamentoBPe;
begin
result := StrToEnumerado(ok, s, ['01', '02', '03', '04', '05', '99'],
[fpDinheiroBPe, fpChequeBPe, fpCartaoCreditoBPe, fpCartaoDebitoBPe, fpValeTransporteBPe,
fpOutroBPe]);
end;
ACBrDFe/ACBrBPe/ACBrBPeBilhetes.pas
tPag := StrToFormaPagamentoBPe(OK, sFim);
ACBrDFe/ACBrBPe/DABPE/EscPos/ACBrBPeDABPeESCPOS.pas
FPosPrinter.Buffer.Add('<c>' + ACBrStr(PadSpace(FormaPagamentoBPeToDescricao(FpBPe.pag.Items[i].tPag) +
ACBrDFe/ACBrBPe/PCNBPe/pcnBPe.pas
FtPag: TpcnFormaPagamentoBPe;
property tPag: TpcnFormaPagamentoBPe read FtPag write FtPag;
ACBrDFe/ACBrBPe/PCNBPe/pcnBPeR.pas
BPe.Pag[i].tPag := StrToFormaPagamentoBPe(ok, Leitor.rCampo(tcStr, 'tPag'));
ACBrDFe/ACBrBPe/PCNBPe/pcnBPeW.pas
Gerador.wCampo(tcStr, '#162', 'tPag ', 02, 002, 1, FormaPagamentoBPeToStr(BPe.pag[i].tPag), DSC_TPAG);
if(BPe.pag[i].tPag in [fpCartaoDebitoBPe,fpCartaoCreditoBPe]) and
Segue arquivo para validação das modificações.
ACBrBPeBilhetes.pas
ACBrBPeDABPeESCPOS.pas
pcnBPe.pas
pcnBPeR.pas
pcnBPeW.pas
pcnConversao.pas