Index: ProScan/UI/DnaCodeScherm.pas =================================================================== diff -u -r490 -r493 --- ProScan/UI/DnaCodeScherm.pas (.../DnaCodeScherm.pas) (revision 490) +++ ProScan/UI/DnaCodeScherm.pas (.../DnaCodeScherm.pas) (revision 493) @@ -48,6 +48,7 @@ procedure ZetInfoIcoontjeZichtbaar; procedure DrukProboxEtiketAfIndienNodig; procedure RondAfKaderdeurDag(); + procedure RondAfVhossBatch(); public end; @@ -128,6 +129,8 @@ UiContext.Pallet := ''; Self.ModalResult := mrPallet; end else if (UiContext.Modus = modusVHOSS) then begin + //TODO : popup tonen indien vhoss nog niet volledig (gescand <> te scannen) Vhoss nog niet volledig. Toch verwerken (vraagteken) + //Ja/annuleren Ja -> palletscherm (zoals nu), nee doet niets en gaat terug naar dnacodescherm PalletBijwerken(DnaCodeStatus.InBuffer,false); UiContext.Pallet := ''; Self.ModalResult := mrPallet; @@ -165,7 +168,8 @@ UiContext.Toelevering := ''; UiContext.Pallet := ''; end else if (UiContext.Modus = modusVHOSS) then begin - PalletBijwerken(DnaCodeStatus.InBuffer,false); + RondAfVhossBatch(); + UiContext.Pallet := ''; end else begin if lblAantalGescand.Caption = lblTotaalAantal.Caption then begin fIsDirecteLevering := (UiContext.Modus = modusDefault) and BepaalDirecteLevering; @@ -336,7 +340,7 @@ case strtoint(List[0]) of 200: begin UiContext.Toelevering := Response.DnaCodes[0].Toelevering; - UiContext.BatchId := Response.BatchId; + UiContext.BatchId := Response.DnaCodes[0].BatchId; lblAantalGescand.Caption := IntToStr(Response.AantalReedsGescand); lblTotaalAantal.Caption := IntToStr(Response.AantalInToelevering); ZetInfoIcoontjeZichtbaar; @@ -604,6 +608,46 @@ end; end; +procedure TfmDnaCodeScherm.RondAfVhossBatch; +var + Response: RondAfVhossBatchResponse; + cdsRondAfVhossBatch: TClientDataset; + antwoordlijnTeller: integer; + fAgent: TAgent; +begin + if (UiContext.BatchId = '') then + exit; + + fAgent := TAgent.Create(UiContext); + Response := fAgent.RondAfVhossBatch(UiContext.BatchId); + fAgent.Free; + cdsRondAfVhossBatch := TClientDataset.Create(self); + cdsRondAfVhossBatch.FieldDefs.Add('Vhoss',ftString,20); + cdsRondAfVhossBatch.FieldDefs.Add('Nog te scannen',ftInteger); + try + cdsRondAfVhossBatch.CreateDataSet; + if Response.Header.Status = '200' then begin + for antwoordlijnTeller := 0 to System.Length(Response.VhossKastenMetAantallen) -1 do begin + cdsRondAfVhossBatch.InsertRecord([Response.VhossKastenMetAantallen[antwoordlijnTeller].Vhosskast, + strtoint(Response.VhossKastenMetAantallen[antwoordlijnTeller].AantalLades)-strtoint(Response.VhossKastenMetAantallen[antwoordlijnTeller].AantalLadesGescand) + ]); + end; + if System.Length(Response.VhossKastenMetAantallen) > 0 then begin + if System.Length(Response.VhossKastenMetAantallen) = 1 then + ToonPopupScherm('Onvolledige Vhosskast','OK','',0,-1,-1,$001717CD,cdsRondAfVhossBatch) + else + ToonPopupScherm('Onvolledige Vhosskasten','OK','',0,-1,-1,$001717CD,cdsRondAfVhossBatch) + end else + ToonPopupScherm('Batch afgerond','OK','',19,-1,-1,clGreen); + end else begin + ToonPopupScherm(Response.Header.Omschrijving, 'Probeer opnieuw'); + end; + Self.ModalResult := mrPallet; + finally + Response.Free; + end; +end; + procedure TfmDnaCodeScherm.ZetToeleveringStatus(Status: DnaCodeStatus; isDirecteLevering: boolean = false); var Response: ToeleveringBijwerkenResponse;