1 (edited by r00t3d777 2015-04-26 08:06:14)

Topic: how to two number show? please help

how to two number show? please help

http://s017.radikal.ru/i440/1504/c9/f760a6e0d079.jpg

Post's attachments

Attachment icon 7777.jpg 191 kb, 270 downloads since 2015-04-26 

Re: how to two number show? please help

Do you mean that you want to round the result to only 2 decimals? So it should show 5,69...

Re: how to two number show? please help

tcoton wrote:

Do you mean that you want to round the result to only 2 decimals? So it should show 5,69...

yes, So it should show 5,69

Re: how to two number show? please help

Ho do you get the result in last box? Do you use SQL query or calculated field?

Re: how to two number show? please help

tcoton wrote:

Ho do you get the result in last box? Do you use SQL query or calculated field?


http://s018.radikal.ru/i527/1504/e3/f7ac52b241f8.jpg


// event OnShow
procedure Form1_OnShow (Sender: string; Action: string);
begin
      Form1.WindowState := wsMaximized; //Windows Maximized
      AddInvoiceDB.WindowState := wsMaximized; //Windows Maximized
end;


//****************************************** Amount *************************//
procedure Calculate;
begin
    if ValidFloat(AddInvoiceDB.txbUnPri1.Text) and ValidInt(AddInvoiceDB.txbQty1.Text) then // check the correctness of the values
    begin
        AddInvoiceDB.txbToPri1.Text := FloatToStr( StrToFloat(AddInvoiceDB.txbUnPri1.Text) * StrToInt(AddInvoiceDB.txbQty1.Text) ); // calculate
    end else
    begin
        AddInvoiceDB.txbToPri1.Text := '0';
    end;

        if ValidFloat(AddInvoiceDB.txbUnPri2.Text) and ValidInt(AddInvoiceDB.txbQty2.Text) then // check the correctness of the values
    begin
        AddInvoiceDB.txbToPri2.Text := FloatToStr( StrToFloat(AddInvoiceDB.txbUnPri2.Text) * StrToInt(AddInvoiceDB.txbQty2.Text) ); // calculate
    end else
    begin
        AddInvoiceDB.txbToPri2.Text := '0';
    end;

        if ValidFloat(AddInvoiceDB.txbUnPri3.Text) and ValidInt(AddInvoiceDB.txbQty3.Text) then // check the correctness of the values
    begin                                
        AddInvoiceDB.txbToPri3.Text := FloatToStr( StrToFloat(AddInvoiceDB.txbUnPri3.Text) * StrToInt(AddInvoiceDB.txbQty3.Text) ); // calculate
    end else
    begin
        AddInvoiceDB.txbToPri3.Text := '0';
    end;

            if ValidFloat(AddInvoiceDB.txbUnPri4.Text) and ValidInt(AddInvoiceDB.txbQty4.Text) then // check the correctness of the values
    begin
        AddInvoiceDB.txbToPri4.Text := FloatToStr( StrToFloat(AddInvoiceDB.txbUnPri4.Text) * StrToInt(AddInvoiceDB.txbQty4.Text) ); // calculate
    end else
    begin
        AddInvoiceDB.txbToPri4.Text := '0';
    end;

            if ValidFloat(AddInvoiceDB.txbUnPri5.Text) and ValidInt(AddInvoiceDB.txbQty5.Text) then // check the correctness of the values
    begin
        AddInvoiceDB.txbToPri5.Text := FloatToStr( StrToFloat(AddInvoiceDB.txbUnPri5.Text) * StrToInt(AddInvoiceDB.txbQty5.Text) ); // calculate
    end else
    begin
        AddInvoiceDB.txbToPri5.Text := '0';
    end;

            if ValidFloat(AddInvoiceDB.txbUnPri6.Text) and ValidInt(AddInvoiceDB.txbQty6.Text) then // check the correctness of the values
    begin
        AddInvoiceDB.txbToPri6.Text := FloatToStr( StrToFloat(AddInvoiceDB.txbUnPri6.Text) * StrToInt(AddInvoiceDB.txbQty6.Text) ); // calculate
    end else
    begin
        AddInvoiceDB.txbToPri6.Text := '0';
    end;

            if ValidFloat(AddInvoiceDB.txbUnPri7.Text) and ValidInt(AddInvoiceDB.txbQty7.Text) then // check the correctness of the values
    begin
        AddInvoiceDB.txbToPri7.Text := FloatToStr( StrToFloat(AddInvoiceDB.txbUnPri7.Text) * StrToInt(AddInvoiceDB.txbQty7.Text) ); // calculate
    end else
    begin
        AddInvoiceDB.txbToPri7.Text := '0';
    end;

            if ValidFloat(AddInvoiceDB.txbUnPri8.Text) and ValidInt(AddInvoiceDB.txbQty8.Text) then // check the correctness of the values
    begin
        AddInvoiceDB.txbToPri8.Text := FloatToStr( StrToFloat(AddInvoiceDB.txbUnPri8.Text) * StrToInt(AddInvoiceDB.txbQty8.Text) ); // calculate
    end else
    begin
        AddInvoiceDB.txbToPri8.Text := '0';
    end;

    if ValidFloat(AddInvoiceDB.txbUnPri9.Text) and ValidInt(AddInvoiceDB.txbQty9.Text) then // check the correctness of the values
    begin
        AddInvoiceDB.txbToPri9.Text := FloatToStr( StrToFloat(AddInvoiceDB.txbUnPri9.Text) * StrToInt(AddInvoiceDB.txbQty9.Text) ); // calculate
    end else
    begin
        AddInvoiceDB.txbToPri9.Text := '0';
    end;

    if ValidFloat(AddInvoiceDB.txbUnPri10.Text) and ValidInt(AddInvoiceDB.txbQty10.Text) then // check the correctness of the values
    begin
        AddInvoiceDB.txbToPri10.Text := FloatToStr( StrToFloat(AddInvoiceDB.txbUnPri10.Text) * StrToInt(AddInvoiceDB.txbQty10.Text) ); // calculate
    end else
    begin
        AddInvoiceDB.txbToPri10.Text := '0';
    end;

    if ValidFloat(AddInvoiceDB.txbUnPri11.Text) and ValidInt(AddInvoiceDB.txbQty11.Text) then // check the correctness of the values
    begin
        AddInvoiceDB.txbToPri11.Text := FloatToStr( StrToFloat(AddInvoiceDB.txbUnPri11.Text) * StrToInt(AddInvoiceDB.txbQty11.Text) ); // calculate
    end else
    begin
        AddInvoiceDB.txbToPri11.Text := '0';
    end;

    if ValidFloat(AddInvoiceDB.txbUnPri12.Text) and ValidInt(AddInvoiceDB.txbQty12.Text) then // check the correctness of the values
    begin
        AddInvoiceDB.txbToPri12.Text := FloatToStr( StrToFloat(AddInvoiceDB.txbUnPri12.Text) * StrToInt(AddInvoiceDB.txbQty12.Text) ); // calculate
    end else
    begin
        AddInvoiceDB.txbToPri12.Text := '0';
    end;

    if ValidFloat(AddInvoiceDB.txbUnPri13.Text) and ValidInt(AddInvoiceDB.txbQty13.Text) then // check the correctness of the values
    begin
        AddInvoiceDB.txbToPri13.Text := FloatToStr( StrToFloat(AddInvoiceDB.txbUnPri13.Text) * StrToInt(AddInvoiceDB.txbQty13.Text) ); // calculate
    end else
    begin
        AddInvoiceDB.txbToPri13.Text := '0';
    end;

    if ValidFloat(AddInvoiceDB.txbUnPri14.Text) and ValidInt(AddInvoiceDB.txbQty14.Text) then // check the correctness of the values
    begin
        AddInvoiceDB.txbToPri14.Text := FloatToStr( StrToFloat(AddInvoiceDB.txbUnPri14.Text) * StrToInt(AddInvoiceDB.txbQty14.Text) ); // calculate
    end else
    begin
        AddInvoiceDB.txbToPri14.Text := '0';
    end;

    if ValidFloat(AddInvoiceDB.txbUnPri15.Text) and ValidInt(AddInvoiceDB.txbQty15.Text) then // check the correctness of the values
    begin
        AddInvoiceDB.txbToPri15.Text := FloatToStr( StrToFloat(AddInvoiceDB.txbUnPri15.Text) * StrToInt(AddInvoiceDB.txbQty15.Text) ); // calculate
    end else
    begin
        AddInvoiceDB.txbToPri15.Text := '0';
    end;

    if ValidFloat(AddInvoiceDB.txbUnPri16.Text) and ValidInt(AddInvoiceDB.txbQty16.Text) then // check the correctness of the values
    begin
        AddInvoiceDB.txbToPri16.Text := FloatToStr( StrToFloat(AddInvoiceDB.txbUnPri16.Text) * StrToInt(AddInvoiceDB.txbQty16.Text) ); // calculate
    end else
    begin
        AddInvoiceDB.txbToPri16.Text := '0';
    end;

    if ValidFloat(AddInvoiceDB.txbUnPri17.Text) and ValidInt(AddInvoiceDB.txbQty17.Text) then // check the correctness of the values
    begin
        AddInvoiceDB.txbToPri17.Text := FloatToStr( StrToFloat(AddInvoiceDB.txbUnPri17.Text) * StrToInt(AddInvoiceDB.txbQty17.Text) ); // calculate
    end else
    begin
        AddInvoiceDB.txbToPri17.Text := '0';
    end;

    if ValidFloat(AddInvoiceDB.txbUnPri18.Text) and ValidInt(AddInvoiceDB.txbQty18.Text) then // check the correctness of the values
    begin
        AddInvoiceDB.txbToPri18.Text := FloatToStr( StrToFloat(AddInvoiceDB.txbUnPri18.Text) * StrToInt(AddInvoiceDB.txbQty18.Text) ); // calculate
    end else
    begin
        AddInvoiceDB.txbToPri18.Text := '0';
    end;

    if ValidFloat(AddInvoiceDB.txbUnPri19.Text) and ValidInt(AddInvoiceDB.txbQty19.Text) then // check the correctness of the values
    begin
        AddInvoiceDB.txbToPri19.Text := FloatToStr( StrToFloat(AddInvoiceDB.txbUnPri19.Text) * StrToInt(AddInvoiceDB.txbQty19.Text) ); // calculate
    end else
    begin
        AddInvoiceDB.txbToPri19.Text := '0';
    end;

    if ValidFloat(AddInvoiceDB.txbUnPri20.Text) and ValidInt(AddInvoiceDB.txbQty20.Text) then // check the correctness of the values
    begin
        AddInvoiceDB.txbToPri20.Text := FloatToStr( StrToFloat(AddInvoiceDB.txbUnPri20.Text) * StrToInt(AddInvoiceDB.txbQty20.Text) ); // calculate
    end else
    begin
        AddInvoiceDB.txbToPri20.Text := '0';
    end;

    if ValidFloat(AddInvoiceDB.txbUnPri21.Text) and ValidInt(AddInvoiceDB.txbQty21.Text) then // check the correctness of the values
    begin
        AddInvoiceDB.txbToPri21.Text := FloatToStr( StrToFloat(AddInvoiceDB.txbUnPri21.Text) * StrToInt(AddInvoiceDB.txbQty21.Text) ); // calculate
    end else
    begin
        AddInvoiceDB.txbToPri21.Text := '0';
    end;

    if ValidFloat(AddInvoiceDB.txbUnPri22.Text) and ValidInt(AddInvoiceDB.txbQty22.Text) then // check the correctness of the values
    begin
        AddInvoiceDB.txbToPri22.Text := FloatToStr( StrToFloat(AddInvoiceDB.txbUnPri22.Text) * StrToInt(AddInvoiceDB.txbQty22.Text) ); // calculate
    end else
    begin
        AddInvoiceDB.txbToPri22.Text := '0';
    end;

    if ValidFloat(AddInvoiceDB.txbUnPri23.Text) and ValidInt(AddInvoiceDB.txbQty23.Text) then // check the correctness of the values
    begin
        AddInvoiceDB.txbToPri23.Text := FloatToStr( StrToFloat(AddInvoiceDB.txbUnPri23.Text) * StrToInt(AddInvoiceDB.txbQty23.Text) ); // calculate
    end else
    begin
        AddInvoiceDB.txbToPri23.Text := '0';
    end;

    if ValidFloat(AddInvoiceDB.txbUnPri24.Text) and ValidInt(AddInvoiceDB.txbQty24.Text) then // check the correctness of the values
    begin
        AddInvoiceDB.txbToPri24.Text := FloatToStr( StrToFloat(AddInvoiceDB.txbUnPri24.Text) * StrToInt(AddInvoiceDB.txbQty24.Text) ); // calculate
    end else
    begin
        AddInvoiceDB.txbToPri24.Text := '0';
    end;

    if ValidFloat(AddInvoiceDB.txbUnPri25.Text) and ValidInt(AddInvoiceDB.txbQty25.Text) then // check the correctness of the values
    begin
        AddInvoiceDB.txbToPri25.Text := FloatToStr( StrToFloat(AddInvoiceDB.txbUnPri25.Text) * StrToInt(AddInvoiceDB.txbQty25.Text) ); // calculate
    end else
    begin
        AddInvoiceDB.txbToPri25.Text := '0';
    end;

    if ValidFloat(AddInvoiceDB.txbUnPri26.Text) and ValidInt(AddInvoiceDB.txbQty26.Text) then // check the correctness of the values
    begin
        AddInvoiceDB.txbToPri26.Text := FloatToStr( StrToFloat(AddInvoiceDB.txbUnPri26.Text) * StrToInt(AddInvoiceDB.txbQty26.Text) ); // calculate
    end else
    begin
        AddInvoiceDB.txbToPri26.Text := '0';
    end;

    if ValidFloat(AddInvoiceDB.txbUnPri27.Text) and ValidInt(AddInvoiceDB.txbQty27.Text) then // check the correctness of the values
    begin
        AddInvoiceDB.txbToPri27.Text := FloatToStr( StrToFloat(AddInvoiceDB.txbUnPri27.Text) * StrToInt(AddInvoiceDB.txbQty27.Text) ); // calculate
    end else
    begin
        AddInvoiceDB.txbToPri27.Text := '0';
    end;

    if ValidFloat(AddInvoiceDB.txbUnPri28.Text) and ValidInt(AddInvoiceDB.txbQty28.Text) then // check the correctness of the values
    begin
        AddInvoiceDB.txbToPri28.Text := FloatToStr( StrToFloat(AddInvoiceDB.txbUnPri28.Text) * StrToInt(AddInvoiceDB.txbQty28.Text) ); // calculate
    end else
    begin
        AddInvoiceDB.txbToPri28.Text := '0';
    end;


        if ValidFloat(AddInvoiceDB.txbToTalOrder.Text) and ValidInt(AddInvoiceDB.txbfaiz18.Text) then // check the correctness of the values
    begin
        AddInvoiceDB.txbSum.Text := FloatToStr( StrToFloat(AddInvoiceDB.txbToTalOrder.Text) * StrToInt(AddInvoiceDB.txbfaiz18.Text) ); // calculate
    end else
    begin
        AddInvoiceDB.txbSum.Text := '0';
    end;

         if ValidFloat(AddInvoiceDB.txbSum.Text) and ValidInt(AddInvoiceDB.txbPercent.Text) then // check the correctness of the values
    begin
        AddInvoiceDB.txbVAT.Text := FloatToStr( StrToFloat(AddInvoiceDB.txbSum.Text) / StrToInt(AddInvoiceDB.txbPercent.Text) ); // calculate
    end else
    begin
        AddInvoiceDB.txbVAT.Text := '0';
    end;


        if ValidFloat(AddInvoiceDB.txbToPri1.Text) and ValidFloat(AddInvoiceDB.txbToPri2.Text) and ValidFloat(AddInvoiceDB.txbToPri3.Text) and ValidFloat(AddInvoiceDB.txbToPri4.Text) and ValidFloat(AddInvoiceDB.txbToPri5.Text) and ValidFloat(AddInvoiceDB.txbToPri6.Text) and ValidFloat(AddInvoiceDB.txbToPri7.Text) and ValidFloat(AddInvoiceDB.txbToPri8.Text)and ValidFloat(AddInvoiceDB.txbToPri9.Text)and ValidFloat(AddInvoiceDB.txbToPri10.Text)and ValidFloat(AddInvoiceDB.txbToPri11.Text)and ValidFloat(AddInvoiceDB.txbToPri12.Text)and ValidFloat(AddInvoiceDB.txbToPri13.Text)and ValidFloat(AddInvoiceDB.txbToPri14.Text)and ValidFloat(AddInvoiceDB.txbToPri15.Text)and ValidFloat(AddInvoiceDB.txbToPri16.Text)and ValidFloat(AddInvoiceDB.txbToPri17.Text)and ValidFloat(AddInvoiceDB.txbToPri18.Text)and ValidFloat(AddInvoiceDB.txbToPri19.Text)and ValidFloat(AddInvoiceDB.txbToPri20.Text)and ValidFloat(AddInvoiceDB.txbToPri21.Text)and ValidFloat(AddInvoiceDB.txbToPri22.Text)and ValidFloat(AddInvoiceDB.txbToPri23.Text)and ValidFloat(AddInvoiceDB.txbToPri24.Text)and ValidFloat(AddInvoiceDB.txbToPri25.Text)and ValidFloat(AddInvoiceDB.txbToPri26.Text)and ValidFloat(AddInvoiceDB.txbToPri27.Text)and ValidFloat(AddInvoiceDB.txbToPri28.Text)then
    begin
        AddInvoiceDB.txbToTalOrder.Text:= FloatToStr( StrToFloat(AddInvoiceDB.txbToPri1.Text) + StrToFloat(AddInvoiceDB.txbToPri2.Text) + StrToFloat(AddInvoiceDB.txbToPri3.Text) + StrToFloat(AddInvoiceDB.txbToPri4.Text) + StrToFloat(AddInvoiceDB.txbToPri5.Text) + StrToFloat(AddInvoiceDB.txbToPri6.Text) + StrToFloat(AddInvoiceDB.txbToPri7.Text) + StrToFloat(AddInvoiceDB.txbToPri8.Text) + StrToFloat(AddInvoiceDB.txbToPri9.Text) + StrToFloat(AddInvoiceDB.txbToPri10.Text) + StrToFloat(AddInvoiceDB.txbToPri11.Text) + StrToFloat(AddInvoiceDB.txbToPri12.Text) + StrToFloat(AddInvoiceDB.txbToPri13.Text) + StrToFloat(AddInvoiceDB.txbToPri14.Text) + StrToFloat(AddInvoiceDB.txbToPri15.Text) + StrToFloat(AddInvoiceDB.txbToPri16.Text) + StrToFloat(AddInvoiceDB.txbToPri17.Text) + StrToFloat(AddInvoiceDB.txbToPri18.Text) + StrToFloat(AddInvoiceDB.txbToPri19.Text) + StrToFloat(AddInvoiceDB.txbToPri20.Text) + StrToFloat(AddInvoiceDB.txbToPri21.Text) + StrToFloat(AddInvoiceDB.txbToPri22.Text) + StrToFloat(AddInvoiceDB.txbToPri23.Text) + StrToFloat(AddInvoiceDB.txbToPri24.Text) + StrToFloat(AddInvoiceDB.txbToPri25.Text) + StrToFloat(AddInvoiceDB.txbToPri26.Text) + StrToFloat(AddInvoiceDB.txbToPri27.Text) + StrToFloat(AddInvoiceDB.txbToPri28.Text));
    end else AddInvoiceDB.txbToTalOrder.Text := '0';


        if ValidFloat(AddInvoiceDB.txbToPri1.Text) and ValidFloat(AddInvoiceDB.txbToPri2.Text) and ValidFloat(AddInvoiceDB.txbToPri3.Text) and ValidFloat(AddInvoiceDB.txbToPri4.Text) and ValidFloat(AddInvoiceDB.txbToPri5.Text) and ValidFloat(AddInvoiceDB.txbToPri6.Text) and ValidFloat(AddInvoiceDB.txbToPri7.Text) and ValidFloat(AddInvoiceDB.txbToPri8.Text)and ValidFloat(AddInvoiceDB.txbToPri9.Text)and ValidFloat(AddInvoiceDB.txbToPri10.Text)and ValidFloat(AddInvoiceDB.txbToPri11.Text)and ValidFloat(AddInvoiceDB.txbToPri12.Text)and ValidFloat(AddInvoiceDB.txbToPri13.Text)and ValidFloat(AddInvoiceDB.txbToPri14.Text)and ValidFloat(AddInvoiceDB.txbToPri15.Text)and ValidFloat(AddInvoiceDB.txbToPri16.Text)and ValidFloat(AddInvoiceDB.txbToPri17.Text)and ValidFloat(AddInvoiceDB.txbToPri18.Text)and ValidFloat(AddInvoiceDB.txbToPri19.Text)and ValidFloat(AddInvoiceDB.txbToPri20.Text)and ValidFloat(AddInvoiceDB.txbToPri21.Text)and ValidFloat(AddInvoiceDB.txbToPri22.Text)and ValidFloat(AddInvoiceDB.txbToPri23.Text)and ValidFloat(AddInvoiceDB.txbToPri24.Text)and ValidFloat(AddInvoiceDB.txbToPri25.Text)and ValidFloat(AddInvoiceDB.txbToPri26.Text)and ValidFloat(AddInvoiceDB.txbToPri27.Text)and ValidFloat(AddInvoiceDB.txbToPri28.Text)and ValidFloat(AddInvoiceDB.txbVAT.Text)then
    begin
        AddInvoiceDB.txbTotalAZN.Text:= FloatToStr( StrToFloat(AddInvoiceDB.txbToPri1.Text) + StrToFloat(AddInvoiceDB.txbToPri2.Text) + StrToFloat(AddInvoiceDB.txbToPri3.Text) + StrToFloat(AddInvoiceDB.txbToPri4.Text) + StrToFloat(AddInvoiceDB.txbToPri5.Text) + StrToFloat(AddInvoiceDB.txbToPri6.Text) + StrToFloat(AddInvoiceDB.txbToPri7.Text) + StrToFloat(AddInvoiceDB.txbToPri8.Text) + StrToFloat(AddInvoiceDB.txbToPri9.Text) + StrToFloat(AddInvoiceDB.txbToPri10.Text) + StrToFloat(AddInvoiceDB.txbToPri11.Text) + StrToFloat(AddInvoiceDB.txbToPri12.Text) + StrToFloat(AddInvoiceDB.txbToPri13.Text) + StrToFloat(AddInvoiceDB.txbToPri14.Text) + StrToFloat(AddInvoiceDB.txbToPri15.Text) + StrToFloat(AddInvoiceDB.txbToPri16.Text) + StrToFloat(AddInvoiceDB.txbToPri17.Text) + StrToFloat(AddInvoiceDB.txbToPri18.Text) + StrToFloat(AddInvoiceDB.txbToPri19.Text) + StrToFloat(AddInvoiceDB.txbToPri20.Text) + StrToFloat(AddInvoiceDB.txbToPri21.Text) + StrToFloat(AddInvoiceDB.txbToPri22.Text) + StrToFloat(AddInvoiceDB.txbToPri23.Text) + StrToFloat(AddInvoiceDB.txbToPri24.Text) + StrToFloat(AddInvoiceDB.txbToPri25.Text) + StrToFloat(AddInvoiceDB.txbToPri26.Text) + StrToFloat(AddInvoiceDB.txbToPri27.Text) + StrToFloat(AddInvoiceDB.txbToPri28.Text) + StrToFloat(AddInvoiceDB.txbVAT.Text));
    end else AddInvoiceDB.txbTotalAZN.Text := '0';

    end;



    procedure AddInvoiceDB_txbSum_OnChange (Sender: string);
begin
    Calculate;
end;

    procedure AddInvoiceDB_txbPercent_OnChange (Sender: string);
begin
    Calculate;
end;


    procedure AddInvoiceDB_txbVAT_OnChange (Sender: string);
begin
    Calculate;
end;

    procedure AddInvoiceDB_txbfaiz18_OnChange (Sender: string);
begin
    Calculate;
end;

    procedure AddInvoiceDB_txbToTalOrder_OnChange (Sender: string);
begin
    Calculate;
end;

    procedure AddInvoiceDB_txbQty1_OnChange (Sender: string);
begin
    Calculate;
end;

procedure AddInvoiceDB_txbUnPri1_OnChange (Sender: string);
begin
    Calculate;
end;

procedure AddInvoiceDB_txbToPri1_OnChange (Sender: string);
begin
    Calculate;
end;

procedure AddInvoiceDB_txbQty2_OnChange (Sender: string);
begin
    Calculate;
end;

procedure AddInvoiceDB_txbUnPri2_OnChange (Sender: string);
begin
    Calculate;
end;

procedure AddInvoiceDB_txbToPri2_OnChange (Sender: string);
begin
    Calculate;
end;

procedure AddInvoiceDB_txbQty3_OnChange (Sender: string);
begin
    Calculate;
end;

procedure AddInvoiceDB_txbUnPri3_OnChange (Sender: string);
begin
    Calculate;
end;

procedure AddInvoiceDB_txbToPri3_OnChange (Sender: string);
begin
    Calculate;
end;

procedure AddInvoiceDB_txbQty4_OnChange (Sender: string);
begin
    Calculate;
end;

procedure AddInvoiceDB_txbUnPri4_OnChange (Sender: string);
begin
    Calculate;
end;

procedure AddInvoiceDB_txbToPri4_OnChange (Sender: string);
begin
    Calculate;
end;

procedure AddInvoiceDB_txbQty5_OnChange (Sender: string);
begin
    Calculate;
end;

procedure AddInvoiceDB_txbUnPri5_OnChange (Sender: string);
begin
    Calculate;
end;

procedure AddInvoiceDB_txbToPri5_OnChange (Sender: string);
begin                                                               
    Calculate;
end;

procedure AddInvoiceDB_txbQty6_OnChange (Sender: string);
begin
    Calculate;
end;

procedure AddInvoiceDB_txbUnPri6_OnChange (Sender: string);
begin
    Calculate;
end;

procedure AddInvoiceDB_txbToPri6_OnChange (Sender: string);
begin
    Calculate;
end;

procedure AddInvoiceDB_txbQty7_OnChange (Sender: string);
begin
    Calculate;
end;

procedure AddInvoiceDB_txbUnPri7_OnChange (Sender: string);
begin
    Calculate;
end;

procedure AddInvoiceDB_txbToPri7_OnChange (Sender: string);
begin
    Calculate;
end;


procedure AddInvoiceDB_txbQty8_OnChange (Sender: string);
begin
    Calculate;
end;

procedure AddInvoiceDB_txbUnPri8_OnChange (Sender: string);
begin
    Calculate;
end;

procedure AddInvoiceDB_txbToPri8_OnChange (Sender: string);
begin
    Calculate;
end;


    procedure AddInvoiceDB_txbQty9_OnChange (Sender: string);
begin
    Calculate;
end;

procedure AddInvoiceDB_txbUnPri9_OnChange (Sender: string);
begin
    Calculate;
end;

procedure AddInvoiceDB_txbToPri9_OnChange (Sender: string);
begin
    Calculate;
end;

procedure AddInvoiceDB_txbQty10_OnChange (Sender: string);
begin
    Calculate;
end;

procedure AddInvoiceDB_txbUnPri10_OnChange (Sender: string);
begin
    Calculate;
end;

procedure AddInvoiceDB_txbToPri10_OnChange (Sender: string);
begin
    Calculate;
end;

procedure AddInvoiceDB_txbQty11_OnChange (Sender: string);
begin
    Calculate;
end;

procedure AddInvoiceDB_txbUnPri11_OnChange (Sender: string);
begin
    Calculate;
end;

procedure AddInvoiceDB_txbToPri11_OnChange (Sender: string);
begin
    Calculate;
end;

procedure AddInvoiceDB_txbQty12_OnChange (Sender: string);
begin
    Calculate;
end;

procedure AddInvoiceDB_txbUnPri12_OnChange (Sender: string);
begin
    Calculate;
end;

procedure AddInvoiceDB_txbToPri12_OnChange (Sender: string);
begin
    Calculate;
end;

procedure AddInvoiceDB_txbQty13_OnChange (Sender: string);
begin
    Calculate;
end;

procedure AddInvoiceDB_txbUnPri13_OnChange (Sender: string);
begin
    Calculate;
end;

procedure AddInvoiceDB_txbToPri13_OnChange (Sender: string);
begin                                                               
    Calculate;
end;

procedure AddInvoiceDB_txbQty14_OnChange (Sender: string);
begin
    Calculate;
end;

procedure AddInvoiceDB_txbUnPri14_OnChange (Sender: string);
begin
    Calculate;
end;

procedure AddInvoiceDB_txbToPri14_OnChange (Sender: string);
begin
    Calculate;
end;

procedure AddInvoiceDB_txbQty15_OnChange (Sender: string);
begin
    Calculate;
end;

procedure AddInvoiceDB_txbUnPri15_OnChange (Sender: string);
begin
    Calculate;
end;

procedure AddInvoiceDB_txbToPri15_OnChange (Sender: string);
begin
    Calculate;
end;

procedure AddInvoiceDB_txbQty16_OnChange (Sender: string);
begin
    Calculate;
end;

procedure AddInvoiceDB_txbUnPri16_OnChange (Sender: string);
begin
    Calculate;
end;

procedure AddInvoiceDB_txbToPri16_OnChange (Sender: string);
begin
    Calculate;
end;


    procedure AddInvoiceDB_txbQty17_OnChange (Sender: string);
begin
    Calculate;
end;

procedure AddInvoiceDB_txbUnPri17_OnChange (Sender: string);
begin
    Calculate;
end;

procedure AddInvoiceDB_txbToPri17_OnChange (Sender: string);
begin
    Calculate;
end;

procedure AddInvoiceDB_txbQty18_OnChange (Sender: string);
begin
    Calculate;
end;

procedure AddInvoiceDB_txbUnPri18_OnChange (Sender: string);
begin
    Calculate;
end;

procedure AddInvoiceDB_txbToPri18_OnChange (Sender: string);
begin
    Calculate;
end;

procedure AddInvoiceDB_txbQty19_OnChange (Sender: string);
begin
    Calculate;
end;

procedure AddInvoiceDB_txbUnPri19_OnChange (Sender: string);
begin
    Calculate;
end;

procedure AddInvoiceDB_txbToPri19_OnChange (Sender: string);
begin
    Calculate;
end;

procedure AddInvoiceDB_txbQty20_OnChange (Sender: string);
begin                                                                 
    Calculate;
end;

procedure AddInvoiceDB_txbUnPri20_OnChange (Sender: string);
begin
    Calculate;
end;

procedure AddInvoiceDB_txbToPri20_OnChange (Sender: string);
begin
    Calculate;
end;

procedure AddInvoiceDB_txbQty21_OnChange (Sender: string);
begin
    Calculate;
end;

procedure AddInvoiceDB_txbUnPri21_OnChange (Sender: string);
begin
    Calculate;
end;

procedure AddInvoiceDB_txbToPri21_OnChange (Sender: string);
begin                                                               
    Calculate;
end;

procedure AddInvoiceDB_txbQty22_OnChange (Sender: string);
begin
    Calculate;
end;

procedure AddInvoiceDB_txbUnPri22_OnChange (Sender: string);
begin
    Calculate;
end;

procedure AddInvoiceDB_txbToPri22_OnChange (Sender: string);
begin
    Calculate;
end;

procedure AddInvoiceDB_txbQty23_OnChange (Sender: string);
begin
    Calculate;
end;

procedure AddInvoiceDB_txbUnPri23_OnChange (Sender: string);
begin
    Calculate;
end;

procedure AddInvoiceDB_txbToPri23_OnChange (Sender: string);
begin
    Calculate;
end;

procedure AddInvoiceDB_txbQty24_OnChange (Sender: string);
begin
    Calculate;
end;

procedure AddInvoiceDB_txbUnPri24_OnChange (Sender: string);
begin
    Calculate;
end;

procedure AddInvoiceDB_txbToPri24_OnChange (Sender: string);
begin
    Calculate;
end;


    procedure AddInvoiceDB_txbQty25_OnChange (Sender: string);
begin
    Calculate;
end;

procedure AddInvoiceDB_txbUnPri25_OnChange (Sender: string);
begin
    Calculate;
end;

procedure AddInvoiceDB_txbToPri25_OnChange (Sender: string);
begin
    Calculate;
end;

procedure AddInvoiceDB_txbQty26_OnChange (Sender: string);
begin
    Calculate;
end;

procedure AddInvoiceDB_txbUnPri26_OnChange (Sender: string);
begin
    Calculate;
end;

procedure AddInvoiceDB_txbToPri26_OnChange (Sender: string);
begin
    Calculate;
end;

procedure AddInvoiceDB_txbQty27_OnChange (Sender: string);
begin
    Calculate;
end;

procedure AddInvoiceDB_txbUnPri27_OnChange (Sender: string);
begin
    Calculate;
end;

procedure AddInvoiceDB_txbToPri27_OnChange (Sender: string);
begin
    Calculate;
end;

procedure AddInvoiceDB_txbQty28_OnChange (Sender: string);
begin
    Calculate;
end;

procedure AddInvoiceDB_txbUnPri28_OnChange (Sender: string);
begin
    Calculate;
end;

procedure AddInvoiceDB_txbToPri28_OnChange (Sender: string);
begin
    Calculate;
end;

//****************************************** Amount *************************//



begin
     Form1.mniFile.Visible := False;
     Form1.mniOptions.Visible := False;
     Form1.mniReport.Visible := False;
     Form1.mniAbout.Visible := False;
     

end.

Re: how to two number show? please help

Wow, this is far beyond my programming skills, it looks like you are using floating calculation, so maybe you would have to set the max decimal in a variable, I am not an expert for this here, just a guess from the top of my head.

http://www.delphibasics.co.uk/RTL.asp?Name=FloatToStrF

http://www.delphibasics.co.uk/RTL.asp?N … cyDecimals

Re: how to two number show? please help

You can use function FormatFloat, example:

Form1.Edit1.Text := FormatFloat('0.##', 25.5466);
Dmitry.