Index: AAPClient/UI/DnaCodeScherm.pas =================================================================== diff -u -r359 -r377 --- AAPClient/UI/DnaCodeScherm.pas (.../DnaCodeScherm.pas) (revision 359) +++ AAPClient/UI/DnaCodeScherm.pas (.../DnaCodeScherm.pas) (revision 377) @@ -133,22 +133,24 @@ procedure TfmDnaCodeScherm.actAfrondenExecute(Sender: TObject); var fWaarschuwingModalResult: TModalResult; + fIsDirecteLevering: boolean; begin inherited; if UiContext.Toelevering = '' then exit; - if UiContext.Modus = modusKAD then begin + if (UiContext.Modus = modusKAD) then begin RondAfKaderdeurDag(); UiContext.Toelevering := ''; UiContext.Pallet := ''; end else begin if lblAantalGescand.Caption = lblTotaalAantal.Caption then begin - if BepaalDirecteLevering then begin + fIsDirecteLevering := (UiContext.Modus = modusDefault) and BepaalDirecteLevering; + if fIsDirecteLevering then begin ToonPopupScherm('Directe levering', 'OK','',15,-1,-1,clBlue); imgDirecteLevering.Visible := true; end; - ZetToeleveringStatus(DnaCodeStatus.InBuffer, BepaalDirecteLevering); + ZetToeleveringStatus(DnaCodeStatus.InBuffer, fIsDirecteLevering); if Self.ModalResult = mrPallet then begin ToonPopupScherm('Toelevering succesvol afgerond','OK','',19,-1,-1,clGreen); UiContext.Toelevering := ''; @@ -241,7 +243,7 @@ UiContext.LaatsteDnaCode := edtDnaCode.Text; lblLaatstGescandData.Caption := edtDnaCode.Text; - if UiContext.Modus = modusKAD then begin + if (UiContext.Modus = modusKAD) then begin Locatie := UiContext.Pallet; end else begin Locatie := '' @@ -256,13 +258,15 @@ UiContext.Toelevering := Response.DnaCodes[0].Toelevering; lblAantalGescand.Caption := IntToStr(Response.AantalReedsGescand); lblTotaalAantal.Caption := IntToStr(Response.AantalInToelevering); - if not UiContext.Modus = modusKAD then + if not (UiContext.Modus = modusKAD) then btnInfo.Visible := true; ZetIcoontjesBovenaan; VerwerkMogelijkePopups(Response.DnaCodes[0]); Self.ModalResult := mrDnaCode; end; 1005: begin //reeds gescand + if not (UiContext.Modus = modusKAD) then + btnInfo.Visible := true; Self.ModalResult := mrDnaCodeReedsGescand; end; else begin @@ -311,7 +315,7 @@ UiContext.Toelevering := Response.DnaCodes[0].Toelevering; lblAantalGescand.Caption := IntToStr(Response.AantalReedsGescand); lblTotaalAantal.Caption := IntToStr(Response.AantalInToelevering); - if not UiContext.Modus = modusKAD then + if not (UiContext.Modus = modusKAD) then btnInfo.Visible := true; ZetIcoontjesBovenaan; VerwerkMogelijkePopups(Response.DnaCodes[0]); @@ -324,22 +328,24 @@ procedure TfmDnaCodeScherm.VerwerkMogelijkePopups(EersteDnaCode: DnaCode); begin - if EersteDnaCode.IsDirecteLevering then begin - if not UiContext.IsDirecteLeveringPopupGetoond then begin - ToonPopupScherm('Directe levering', 'OK','',15,-1,-1,clBlue); - UiContext.IsDirecteLeveringPopupGetoond := true; + if UiContext.Modus = modusDefault then begin + if EersteDnaCode.IsDirecteLevering then begin + if not UiContext.IsDirecteLeveringPopupGetoond then begin + ToonPopupScherm('Directe levering', 'OK','',15,-1,-1,clBlue); + UiContext.IsDirecteLeveringPopupGetoond := true; + end; end; - end; - imgDirecteLevering.Visible := EersteDnaCode.IsDirecteLevering; + imgDirecteLevering.Visible := EersteDnaCode.IsDirecteLevering; - if EersteDnaCode.IsWegwerpPallet then begin - if not UiContext.IsWegwerpPalletPopupGetoond then begin - ToonPopupScherm('Wegwerppallet', 'OK','',16,-1,-1,clYellow); - UiContext.IsWegwerpPalletPopupGetoond := true; + if EersteDnaCode.IsWegwerpPallet then begin + if not UiContext.IsWegwerpPalletPopupGetoond then begin + ToonPopupScherm('Wegwerppallet', 'OK','',16,-1,-1,clYellow); + UiContext.IsWegwerpPalletPopupGetoond := true; + end; end; + imgWegwerpPallet.Visible := EersteDnaCode.IsWegwerpPallet; + Repaint; end; - imgWegwerpPallet.Visible := EersteDnaCode.IsWegwerpPallet; - Repaint; end; procedure TfmDnaCodeScherm.ZetIcoontjesBovenaan; @@ -421,7 +427,7 @@ DnaCodes: ArrayOfDnaCodeDnaCode; ii: integer; begin - fZoekViaPalletCodeResponse := TAgent.Create(UiContext).ZoekViaPalletCode(UiContext.Pallet); + {fZoekViaPalletCodeResponse := TAgent.Create(UiContext).ZoekViaPalletCode(UiContext.Pallet); try if fZoekViaPalletCodeResponse.Header.Status = '200' then begin DnaCodes := fZoekViaPalletCodeResponse.DnaCodes; @@ -435,7 +441,7 @@ DnaCodesStringList := TStringList.Create(); ii := 0; while ii < length(DnaCodes)-1 do begin - DnaCodesStringList.Add(DnaCodes[ii].DnaCode) + DnaCodesStringList.Add(DnaCodes[ii].DnaCode) <-- geeft AV in test6 end; fProboxAfdrukkenResponse := TAgent.Create(UiContext).ProboxEtiketAfdrukken(DnaCodesStringList); @@ -448,7 +454,7 @@ end; finally fProboxAfdrukkenResponse.Free; - end; + end;} end; end.