1 (edited by sibprogsistem 2019-07-12 12:10:52)

Topic: вычисляемое поле

не получается получить в вычисляемом поле остаток товара

нужно от inProduct.inkolvo отнять  outProduct.outkolvo
http://myvisualdatabase.com/forum/misc.php?action=pun_attachment&item=5640&download=0

Post's attachments

Attachment icon Безымянный.png 23.9 kb, 214 downloads since 2019-07-12 

Re: вычисляемое поле

Привет Sibprogsistem,
Это помогает?
С уважением,
Derek

Post's attachments

Attachment icon all.zip 337.14 kb, 300 downloads since 2019-07-12 

Re: вычисляемое поле

derek wrote:

Привет Sibprogsistem,
Это помогает?
С уважением,
Derek

thank derek !
now everything works

(SELECT IFNULL(sum(inkolvo),"0") FROM inProduct WHERE inProduct.id_magazin=magazin.id ) 
 -  
(SELECT IFNULL(sum(outkolvo),"0") FROM outProduct WHERE outProduct.id_magazin=magazin.id)
 

Re: вычисляемое поле

I have any question about script sum for one text box in form between DateTimePicker1 and DateTimePicker1, how i can do it?
I try

procedure frmLap_keuangan_Button2_OnClick (Sender: TObject; var Cancel: boolean);
begin

frmLap_keuangan.Edit2.Value := SQLExecute ('SELECT sum(debet)FROM transaksi where tanggal >=' +  frmLap_keuangan.DateTimePicker1.sqlDate AND <=  +  frmLap_keuangan.DateTimePicker2.sqlDate);

end;

Re: вычисляемое поле

Hi Agusecc,
Try it like this (see attached).
Derek.

Post's attachments

Attachment icon agusecc date.zip 336.92 kb, 249 downloads since 2019-12-31 

Re: вычисляемое поле

thanks Derek,  for your help