>Public oldproduct,oldrinward,sale2edit,sale2add, luRetval, oareacode, oareaname, osmancode, osmanname, ocompcode, ocompname >Public allowed, opstockid, unitname,LISTA,dfile1,mintag,min1tag, lsman, lgrid, myid >dfile1='pr'+Sys(3) >=usefile('LEDGER') >=usefile('LEDGER2') >=usefile('inward') >=usefile('inward1') >=usefile('customer') >=usefile('partycd') >=usefile('SCHEME1') >=usefile('SCHEME2') >=usefile('SCHEME3') >=usefile('pcode1') >=usefile('STOCK') >=usefile('TAXMAST') >=usefile('area') >=usefile2('rep') >Select scheme1 >Select scheme2 >Select scheme3 >Select partycd >Set Order To ACCOMP && ACCODE+COMPCODE >SELECT ledger >SET ORDER TO vno >GOTO top >SELECT ledger2 >SET ORDER TO vno >GOTO top >Select stock >Set Order To pcodebatch >Select area >Set Order To areaname >Sele TAXMAST >Sele pcode1 >Goto Top >Select customer >Set Order To acname >myid=Left(Id(),50) >Select rep >Do replrep >Select inward >Set Order To vno >Set Filter To >Goto Top >Do While vno<=0 And !Eof() > If Status='SA' And machineid=myid And vno=0 And !savedrec > Delete > Endif > Skip >Enddo >Select inward1 >Set Order To vno >Set Filter To >Goto Top >Do While vno<=0 And !Eof() > If Status='SA' And machineid=myid And vno=0 And !savedrec > Do Case > Case Not flg$'XLN' > Do stkeffect With inward1.pcode, inward1.lotno, inward1.qty, inward1.Free, "OUT", "-", inward.godcode > Case flg='N' > Do stkeffect With inward1.pcode, inward1.lotno, inward1.qty, inward1.Free, "IN", "-", inward.godcode > Endcase > Replace inward1.stk With ((stock.Sin+stock.fin)-(stock.sout+stock.fout)) > Delete > Endif > Skip >Enddo > >Select inward >Set Order To vno >Set Filter To inward.Status='SA' >Go Bottom >If salereco=0 And inward.Status='SA' > salereco=Recno() >Endif >Select inward1 >Set Order To reco1 >Seek inward.reco1 >=closfile("xxbill") >Select inward1 >Copy Structure To xxbill >=usefile2('xxbill') >Select xxbill >Select inward >sale2edit=.F. >sale2add=.F. >rinwarddelete=.F. >allowed=.F. >LISTA=.T. >oldproduct='' >luRetval='' >lsman=.F. >lgrid=.F. >zprintcont=.F. >zprintyn=.F. >Store '' To oareacode, oareaname, osmancode, osmanname, ocompcode, ocompname, oldcnno >>
>On Key Label CTRL+R Modi Repo salbill >On Key Label CTRL+S Modi Repo salbill1 >ON KEY LABEL CTRL+T MODI REPO csalbill >Select inward1 >Set Order to reco1 >SELECT INWARD1 >Select inward >Set Order to vno >Set Filter To Status='SA' >SET RELATION OFF INTO INWARD1 >SET RELATION TO RECO1 INTO INWARD1 ADDITIVE >Select inward1 >SEEK inward.RECO1 >Select inward >If !Empty(salereco) And salereco<=Reccount('inward') > Select inward > Goto salereco > Select inward1 > SEEK inward.RECO1 > Select inward > Thisform.Refresh >Endif >Select inward1 >Select inward >thisform.rcdrtn >Thisform.Refresh >Select inward >thisform.pageframe1.pAGE1.Refresh >Select xxbill >>in deactive event
>ON KEY LABEL CTRL+R >ON KEY LABEL CTRL+S >ON KEY LABEL CTRL+T >SELECT inward >SET ORDER TO vno >*salereco=RECNO() >SELECT inward1 >SET ORDER TO reco1 >SELECT inward >thisform.Refresh >thisform.pageframe1.pAGE1.Refresh >SELECT xxbill >>