Como va quedando el botón nuevo documento
Código Delphi
[-]procedure TFXPAF.SbNuevoClick(Sender: TObject);
begin
PC.ActivePageIndex:=1;
DSPrincipal.DataSet.Insert;
NSESerie.Value:=1;
if DM.IBDCONFIUSARSERIEYEAR.Value='S' then
begin
NSESerie.Enabled:=False;
DBNSerie.Field.Value:=Copy(IntToStr(Ano(now)),3,4);
end else
begin
NSESerie.Enabled:=True;
DBNSerie.Field.Value:=DM.IBDCONFISERIE.AsString;
end;
NDBSENumeroProteccionDatos.Field.Value:=1;
DBNNumeroDocumento.Field.value:=VerNumeroDocumento(VarSTipoDocumento,DBNSerie.Text);
DSPrincipal.DataSet.FieldByName('PORCENTAJEFINANCIADO').Value:=0;
DSPrincipal.DataSet.FieldByName('TIPODOCUMENTO').Value:=VarSTipoDocumento;
DSPrincipal.DataSet.FieldByName('COBRADO').Value:='N';
DSPrincipal.DataSet.FieldByName('TOTALCOMISIONES').Value:=0;
DSPrincipal.DataSet.FieldByName('MODIFICACIONES').Value:=0;
DSPrincipal.DataSet.FieldByName('SUBTOTAL').Value:=0;
DSPrincipal.DataSet.FieldByName('TOTALIMPUESTOS').Value:=0;
DSPrincipal.DataSet.FieldByName('TOTALIMPUESTO1').Value:=0;
DSPrincipal.DataSet.FieldByName('TOTALIMPUESTO2').Value:=0;
DSPrincipal.DataSet.FieldByName('TOTALIMPUESTO3').Value:=0;
DSPrincipal.DataSet.FieldByName('TOTALIMPUESTO4').Value:=0;
DSPrincipal.DataSet.FieldByName('TOTALPESO').Value:=0;
DSPrincipal.DataSet.FieldByName('TOTALDESCUENTOS').Value:=0;
Memo2.Lines.Clear;
DBNSerie.SetFocus;
end;