Index: AAPClient/UI/DnaCodeScherm.pas =================================================================== diff -u -r323 -r324 --- AAPClient/UI/DnaCodeScherm.pas (.../DnaCodeScherm.pas) (revision 323) +++ AAPClient/UI/DnaCodeScherm.pas (.../DnaCodeScherm.pas) (revision 324) @@ -137,33 +137,34 @@ inherited; if UiContext.Toelevering = '' then exit; - if lblAantalGescand.Caption = lblTotaalAantal.Caption then begin - if BepaalDirecteLevering then begin - ToonPopupScherm('Directe levering', 'OK','',15,-1,-1,clBlue); - imgDirecteLevering.Visible := true; - end; - //if UiContext.Modus = modusKAD then - // RondKaderdeurDagAf() - //else + + if UiContext.Modus = modusKAD then + RondKaderdeurDagAf() + else begin + if lblAantalGescand.Caption = lblTotaalAantal.Caption then begin + if BepaalDirecteLevering then begin + ToonPopupScherm('Directe levering', 'OK','',15,-1,-1,clBlue); + imgDirecteLevering.Visible := true; + end; ZetToeleveringStatus(DnaCodeStatus.InBuffer, BepaalDirecteLevering); - if Self.ModalResult = mrPallet then begin - ToonPopupScherm('Toelevering succesvol afgerond','OK','',19,-1,-1,clGreen); - UiContext.Toelevering := ''; - if System.StrUtils.LeftStr(UiContext.Pallet,3) = 'TBP' then - DrukProboxEtiketAfIndienNodig; - end; - end else begin - fWaarschuwingModalResult := ToonPopupScherm('Onvolledige toelevering','Scan code','Nieuw',18,11,12); - if fWaarschuwingModalResult = mrYes then begin - Self.ModalResult := mrDnaCode; + if Self.ModalResult = mrPallet then begin + ToonPopupScherm('Toelevering succesvol afgerond','OK','',19,-1,-1,clGreen); + UiContext.Toelevering := ''; + if System.StrUtils.LeftStr(UiContext.Pallet,3) = 'TBP' then + DrukProboxEtiketAfIndienNodig; + end; end else begin - fWaarschuwingModalResult := ToonPopupScherm('Nieuwe toelevering starten?','Ja','Nee',14,6,7); + fWaarschuwingModalResult := ToonPopupScherm('Onvolledige toelevering','Scan code','Nieuw',18,11,12); if fWaarschuwingModalResult = mrYes then begin - ZetToeleveringStatus(DnaCodeStatus.OnHold); - Self.ModalResult := mrPallet; + Self.ModalResult := mrDnaCode; + end else begin + fWaarschuwingModalResult := ToonPopupScherm('Nieuwe toelevering starten?','Ja','Nee',14,6,7); + if fWaarschuwingModalResult = mrYes then begin + ZetToeleveringStatus(DnaCodeStatus.OnHold); + Self.ModalResult := mrPallet; + end; end; end; - end; PostMessage(Self.Handle,WM_Close,0,0); (Self.Parent.Parent As TfmProScanHoofdscherm).NavigeerNaar(Self.ModalResult); @@ -372,18 +373,18 @@ begin Response := TAgent.Create(UiContext).RondKaderdeurDagAf(UiContext.LaatsteDnaCode); cdsRondKaderdeurDagAf := TClientDataset.Create(self); - cdsRondKaderdeurDagAf.FieldDefs.Add('Toelevering',ftString); + cdsRondKaderdeurDagAf.FieldDefs.Add('Toelevering',ftString,20); cdsRondKaderdeurDagAf.FieldDefs.Add('Aantal deuren',ftInteger); cdsRondKaderdeurDagAf.FieldDefs.Add('Aantal gescand',ftInteger); try + cdsRondKaderdeurDagAf.CreateDataSet; if Response.Header.Status = '200' then begin for antwoordlijnTeller := 0 to System.Length(Response.ToeleveringMetAantallen) -1 do begin cdsRondKaderdeurDagAf.InsertRecord([Response.ToeleveringMetAantallen[antwoordlijnTeller].ToeleveringID, Response.ToeleveringMetAantallen[antwoordlijnTeller].AantalKaderdeuren, Response.ToeleveringMetAantallen[antwoordlijnTeller].AantalKaderdeurenGescand]); - end; - //ToonPopupScherm('Deze zijn nog niet compleet','Ok','','','','','',cdsRondKaderdeurDagAf); + ToonPopupScherm('Deze zijn nog niet compleet','Ok','',19,0,0,$001717CD,cdsRondKaderdeurDagAf); end else begin ToonPopupScherm(Response.Header.Omschrijving, 'Probeer opnieuw'); end;