Dalsi zmeny

This commit is contained in:
2026-03-03 16:18:27 +01:00
parent 03ff9ebc84
commit a62b608cfd
97 changed files with 4635 additions and 240 deletions

View File

@ -398,8 +398,11 @@ uses
end;
if (params.ContainsKey('')) then
if (params.Items['jenRealizovane']<>'1') then
if (params.ContainsKey('jenRealizovane')) then
if (params.Items['jenRealizovane']='1') then
where:= where + IfThen(where<>'', ' AND ', '') + 'DatRealizace IS NOT NULL';
if (params.ContainsKey('jenReal')) then
if (params.Items['jenReal']='1') then
where:= where + IfThen(where<>'', ' AND ', '') + 'DatRealizace IS NOT NULL';
@ -487,7 +490,7 @@ uses
try
lQry.Open(lSQL, [AID]);
if (lQry.RecordCount>0) then
extInfoStr:= lQry.AsJSONObjectString;
extInfoStr:= lQry.AsJSONObject;
finally
lQry.Free;
end;
@ -709,7 +712,7 @@ uses
{$IFDEF CUSTOM_CTRL_Rootvin}
silo:= lQry.FieldByName('_Mouka_Silo').AsString;
{$ENDIF}
extInfoStr:= lQry.AsJSONObjectString;
extInfoStr:= lQry.AsJSONObject;
end;
finally
end;
@ -1084,15 +1087,15 @@ uses
lSQL:= lSQL.Replace('main.', '');
sqlConnX:= TFDConnection.Create(nil);
sqlConnX.ConnectionDefName:= sqlPoolName;
lQry:= TFDQuery.Create(nil);
{$IF DEFINED(CUSTOM_CTRL_Rootvin) or DEFINED(CUSTOM_CTRL_GatemaSD)}
// test zda polozky pochazi z SD serveru
if (idPZ>0) or (sdServer) then
begin
sqlConnX:= TFDConnection.Create(nil);
sqlConnX.ConnectionDefName:= sqlPoolName;
lQry:= TFDQuery.Create(nil);
try
lQry.FetchOptions.Mode:= fmAll;
lQry.Connection:= sqlConnX;
@ -1101,22 +1104,15 @@ uses
lSQL2:= lSQL2 + ' ORDER BY p.ID';
lQry.Open(lSQL2);
if (lQry.RecordCount>0) then
lSQL:= lSQL2.Replace(' 1 AS A ', ' p.ID, p.IDPohZbo_New AS IDPolozkaDokladu, 0 AS IDVyrCis, p.VyrCislo AS VyrCis, p.PopisSarze AS Nazev, p.Mnozstvi, p.MnozstviEvidence AS MnozstviEvid'
+ ', p.DatPorizeni AS DatVstup, p.DatumExpirace AS DatExpirace, 1 AS ZdrojSD, h.ID AS IDDokladGSD ');
lSQL:= lSQL2.Replace(' 1 AS A ', ' 1000000000+p.ID AS ID, p.IDPohZbo_New AS IDPolozkaDokladu, 0 AS IDVyrCis, p.VyrCislo AS VyrCis, p.PopisSarze AS Nazev, p.Mnozstvi'
+ ', p.MnozstviEvidence AS MnozstviEvid, p.DatPorizeni AS DatVstup, p.DatumExpirace AS DatExpirace, 1 AS ZdrojSD, h.ID AS IDDokladGSD ');
finally
lQry.Free;
end;
sqlConnX.Close;
sqlConnX.Free;
end;
{$ENDIF}
sqlConnX:= TFDConnection.Create(nil);
sqlConnX.ConnectionDefName:= sqlPoolName;
lQry:= TFDQuery.Create(nil);
try
lQry.FetchOptions.Mode:= fmAll;
lQry.Connection:= sqlConnX;