I am having issues with using multiple if conditions with replace function. I have two variables i.e. Account receivables and Inventory. I want to replace the empty cells of of Account Receivable with 0 if the corresponding observation of Inventory has some value.

I am using this code for that: replace Act_Rcv = 0 if Inventory >=0 & Act_Rcv == .

The problem I am facing is that it also replaces those observations of Act_Rcv with 0 which also had empty cells of Inventory represented by dots. Seems like it is considering those dots to be zero or I am not sure why its doing that. Please help. Thanks.

Code:
* Example generated by -dataex-. To install: ssc install dataex
clear
input long firmid int time double(Act_Rcv Inventory)
1 2003                  .                  .
1 2004                  .                  .
1 2005                  .                  .
1 2006                  .                  .
1 2007                  .                  .
1 2008                  .                  0
1 2009                  .                  0
1 2010                  .                  0
1 2011                  .                  0
1 2012                  .                  0
1 2013                  .                  .
1 2014                  .                  .
1 2015                  .                  .
1 2016                  .                  .
1 2017                  .                  .
1 2018                  .                  .
2 2003  5.892399787902832                  0
2 2004 13.760000228881836 1.3839999437332153
2 2005 17.479000091552734 6.8470001220703125
2 2006 21.117000579833984 24.104000091552734
2 2007  48.71099853515625  33.87900161743164
2 2008 101.66899871826172 33.255001068115234
2 2009 122.98699951171875 32.494998931884766
2 2010 142.60000610351562 25.235000610351563
2 2011  141.2570037841797 24.391000747680664
2 2012                  .                  .
2 2013                  .                  .
2 2014                  .                  .
2 2015                  .                  .
2 2016                  .                  .
2 2017                  .                  .
2 2018                  .                  .
3 2003 3.2699999809265137                  0
3 2004 3.0989999771118164                  0
3 2005  4.702000141143799                  0
3 2006   8.37600040435791                  0
3 2007  7.271999835968018                  0
3 2008  5.199999809265137                  0
3 2009 10.199999809265137                  0
3 2010 11.600000381469727                  0
3 2011                  .                  .
3 2012                  .                  .
3 2013                  .                  .
3 2014                  .                  .
3 2015                  .                  .
3 2016                  .                  .
3 2017                  .                  .
3 2018                  .                  .
4 2003  104.5636978149414 18.341999053955078
4 2004  81.62069702148438  18.47100067138672
4 2005  62.26350021362305  65.15499877929688
4 2006  93.82279968261719  50.01300048828125
4 2007                  .                  .
4 2008    328.21728515625  83.41130065917969
4 2009  331.3634033203125 140.56190490722656
4 2010 399.79998779296875  222.6999969482422
4 2011 369.79998779296875                150
4 2012  514.0999755859375 182.10000610351562
4 2013 422.70001220703125  156.8000030517578
4 2014  843.2000122070313                168
4 2015                  .                  .
4 2016                  .                  .
4 2017                  .                  .
4 2018                  .                  .
5 2003  45.17499923706055  4.111000061035156
5 2004 34.540000915527344 4.2789998054504395
5 2005 43.582000732421875 2.9200000762939453
5 2006  46.60200119018555  4.508999824523926
5 2007 41.887001037597656  3.884999990463257
5 2008 19.833999633789063 2.2890000343322754
5 2009  20.35300064086914  4.452000141143799
5 2010 25.334999084472656 4.7220001220703125
5 2011 24.246000289916992 10.194999694824219
5 2012  37.41299819946289 11.975000381469727
5 2013  34.14699935913086 10.095999717712402
5 2014  31.70199966430664  6.355999946594238
5 2015                  .                  .
5 2016                  .                  .
5 2017                  .                  .
5 2018                  .                  .
6 2003  410.6000061035156                  .
6 2004  758.2999877929688                  .
6 2005  1363.300048828125                  .
6 2006  963.2000122070313                  .
6 2007  836.7999877929688                  .
6 2008 1091.0999755859375                  .
6 2009  847.5999755859375                  .
6 2010               1234                  .
6 2011 1600.9000244140625                  .
6 2012 1528.5999755859375                  .
6 2013               1402                  .
6 2014  1396.800048828125                  .
6 2015  1529.300048828125                  .
6 2016  2378.800048828125                  .
6 2017                  .                  .
6 2018                  .                  .
7 2003 224.94900512695312   78.2979965209961
7 2004   317.260986328125  95.18499755859375
7 2005  505.3999938964844  138.0469970703125
7 2006  677.4000244140625              161.5
end
label values firmid n_fid
label def n_fid 1 "0876711D LN Equity", modify
label def n_fid 2 "1218069D LN Equity", modify
label def n_fid 3 "1334987D LN Equity", modify
label def n_fid 4 "1561649D LN Equity", modify
label def n_fid 5 "1638414D LN Equity", modify
label def n_fid 6 "1655637D LN Equity", modify
label def n_fid 7 "3572335Q LN Equity", modify