This commit is contained in:
DESKTOP-E401PHE\Administrator 2025-08-14 09:39:52 +08:00
parent 68d671e3a8
commit b65f12eba2

View File

@ -1750,25 +1750,30 @@ begin
begin begin
Close; Close;
sql.Clear; sql.Clear;
SQL.Add('select sum(mjlen)ddzc,sum(mjqty4)DDzz from WFB_MJJY where subid=''' + trim(FsubId) + ''' '); SQL.Add('select count(*)ydps from WFB_MJJY where subid=''' + trim(FsubId) + ''' '); //sum(mjlen)ddzc,sum(mjqty4)DDzz
open; open;
end; end;
if (FOrderUnit <> 'KG') or (FOrderUnit <> 'Kg') or (FOrderUnit <> 'kG') or (FOrderUnit <> 'kg') then if ADOTmp.FieldByName('ydps').asfloat >= FPRTOrderQty then
begin
if ADOTmp.FieldByName('ddzc').asfloat + strtofloatdef((MJLen.text), 0) > FPRTOrderQty then
begin begin
Application.MessageBox('已经达到订单数量,请重新扫码', '提示', 0); Application.MessageBox('已经达到订单数量,请重新扫码', '提示', 0);
Exit; Exit;
end; end;
end // if (FOrderUnit <> 'KG') or (FOrderUnit <> 'Kg') or (FOrderUnit <> 'kG') or (FOrderUnit <> 'kg') then
else // begin
begin // if ADOTmp.FieldByName('ddzc').asfloat + strtofloatdef((MJLen.text), 0) > FPRTOrderQty then
if ADOTmp.FieldByName('ddzz').asfloat + strtofloatdef((mjqty4.text), 0) > FPRTOrderQty then // begin
begin // Application.MessageBox('已经达到订单数量,请重新扫码', '提示', 0);
Application.MessageBox('已经达到订单数量,请重新扫码', '提示', 0); // Exit;
Exit; // end;
end; // end
end; // else
// begin
// if ADOTmp.FieldByName('ddzz').asfloat + strtofloatdef((mjqty4.text), 0) > FPRTOrderQty then
// begin
// Application.MessageBox('已经达到订单数量,请重新扫码', '提示', 0);
// Exit;
// end;
// end;
end; end;
BTPrint.Enabled := False; BTPrint.Enabled := False;
Timer1.Enabled := True; Timer1.Enabled := True;