1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76
| procedure CEL_QUANTITEInput(CtrlKey, InputData);
var T;
begin
if CtrlKey='#ESC#' then
InitField('QUANTITE')
else if (CtrlKey='#VAL#') and (StrToFloat(InputData) > 0) then
begin
xSetValue('QUANTITE', StrToFloat(InputData));
if xGetValue('GERE_SERIE') then
begin
if xGetValue('QUANTITE')=QteSerie() then
begin
xSetValue('SERIE_MAN',false);
AddSerieRafale();
//Transaction();
FreeTob();
CreateTob();
RazVariables(true);
SetNextFocusControl('QUANTITE');
end
else
begin
xSetValue('SERIE_MAN',true);
xRadioError(GetErrorMessage(8));
//SetNextFocusControl('CODEARTICLE')
xSetValue('QTECOMPTE',xGetValue('QUANTITE'));
xSetValue('QUANTITE', 1);
xMetaDataActivate('CEL_SERIEINTERNE');
end;
end
else if InvDirect() then
begin
AddTobLigne();
Transaction();
FreeTob();
CreateTob();
RazVariables(true);
SetNextFocusControl('QUANTITE')
end
else if not ExisteDejaDansListe() then
begin
AddTobLigne();
SetNextFocusControl('QUANTITE')
end
else
begin
xSetValue('QUANTITE', 0);
xRadioError(GetErrorMessage(6))
end
end
end;
procedure CEL_QUANTITEUpdate();
begin
xSetProperty('Visible', not xGetValue('SERIE_MAN'))
end;
procedure ConfirmationInput(CtrlKey, InputData);
begin
if CtrlKey='#ESC#' then
InitField('CONFIRMATION')
else if CtrlKey='#VAL#' and ((UpperCase(Trim(InputData)) = 'O')
or (UpperCase(Trim(InputData)) = 'N')) then
begin
if (UpperCase(Trim(InputData)) = 'O') then
begin
addTobLigne();
Transaction();
end;
FreeTob();
RazVariables(True);
xMetaDataActivate('CEL_SCAN');
end
end; |
Partager