Language: FoxPro
wire_return form1.text1.valid
1: SELECT wire_inv 2: SEEK(cSpool_no) 3: 4: IF !FOUND() 5: RETURN .F. 6: ELSE 7: qty_prior = Wire_Inv.Qty 8: ENDIF 9: 10: IF USED("csEmpNoOut") 11: USE IN csEmpNoOut 12: ENDIF 13: 14: ** apparently redundant code that actually somehow ensures a valid result form the subsequens SQL SELECT ** 15: ** Vlad Apr-08-2010 *************************************************************************************** 16: *********************************************************************************************************** 17: IF !USED("erp_wire_out") 18: USE erp_wire_out IN 0 19: ENDIF 20: SELECT erp_wire_out 21: *********************************************************************************************************** 22: 23: SELECT emp_no_out FROM erp_wire_out WHERE spool_no = this.Value AND status="OUT" AND latest = "" INTO CURSOR csEmpNoOut 24: IF _tally > 0 25: IF USED('csResult') 26: USE IN csResult 27: ENDIF 28: SELECT emp_no + "-" + ALLTRIM(last_name) + " " + ALLTRIM(first_name) as pws from personne WHERE emp_no = csEmpNoOut.emp_no_out INTO CURSOR csResult 29: IF _tally > 0 30: thisform.txtempretu.Value = csResult.pws 31: ELSE 32: MESSAGEBOX("For this spool last weigth record contains a wrong employee number (missing from personne.dbf); please inform IT Department",16, "FYI") 33: thisform.txtempretu.Value = csEmpNoOut.emp_no_out 34: ENDIF 35: thisform.command1.Enabled = .t. 36: ELSE 37: thisform.txtempretu.Value = "Error!!!" 38: MESSAGEBOX("This spool was not checked out (there is not a check out record in erp_wire_out.dbf); please inform IT Department",16, "Error") 39: thisform.command1.Enabled = .f. 40: ENDIF 41: 42: USE IN SELECT("wire_erp_out") 43: 44: * thisform.cOutPut = "1.0" 45: * cData = thisform.cOutPut 46: * cData = STRTRAN(cData, 'AB', ' ') 47: * cData = STRTRAN(cData, 'lb', ' ') 48: 49: * nData = VAL(ALLTRIM(cData)) 50: * thisform.ctlnWeight.VALUE = nData 51: * thisform.REFRESH 52: 53: * nScale = STR(nData, 10, 4) 54: 55: thisform.refresh
Tags:
Report Abuse
Subscribe
Discuss
What's new
What is it
New Snippet
Recent Snippets
My Snippets
Web Code
Search

