def FillingLocaiton(self): dataBase = warehouseDB() listing = dataBase.ListingLocation() self.window.cmbLocNo.addItem("Choosing", "-1") #print(listing) for lId, lName in listing: self.window.cmbLocNo.addItem(lName, lId)
def RunProgram(self): dataBase=warehouseDB() answer=QMessageBox.question(self,"QUESTION",'Do you want to take quality for this record ?',QMessageBox.Yes | QMessageBox.No) if(answer==QMessageBox.Yes): print("a") #print(listing) gelen=self.window.tblList.currentItem().text().split("/") print(gelen) #deneme = gelen[0] #y=int(deneme) processId='2' mId=gelen[4] quan=gelen[7] mUId=gelen[8] partyNo=gelen[10] id=gelen[0] locationId=gelen[2] dataBase.InsertingProcess(processId,mId,quan,mUId,partyNo) locationId='346' #quality id dataBase.UpdatingWarehouseQuantity(id,locationId) self.window.tblList.clear() self.FillingTable() elif(answer==QMessageBox.No): print("Yok")
def FillingMeasurement(self): dataBase=warehouseDB() listing=dataBase.ListingMeasurementUnit() self.window.cmbMeaUnit.addItem("Choosing","-1") print(listing) for mId,mUName in listing: self.window.cmbMeaUnit.addItem(mUName,mId)
def FillingTable(self): dataBase=warehouseDB() listing=dataBase.ListingViewQuality() for id,wName,locId,locName,MıD,mNo,mName,quan,mUId,mUName,partyNo,expDate in listing: item=QListWidgetItem("{}/{}/{}/{}/{}/{}/{}/{}/{}/{}/{}/{}".format(id,wName,locId,locName,MıD,mNo,mName,quan,mUId,mUName,partyNo,expDate)) self.window.tblList.addItem(item)
def RunProgram(self): dataBase=warehouseDB() #current indexte se.ilen ile farklı değer geliyor MId=self.window.cmbMNo.currentIndex() MId=str(MId) print(MId) listing=dataBase.ListingMaterialNo() print(dataBase.ListingMaterialNo()) print(self.window.cmbMNo.currentIndex()) quan=self.window.txtQuantity.text() mUId="1" #mUId=self.window.cmbMeaUnit.currentIndex() mUId=str(mUId) print(mUId) party=self.window.txtParty.text() expDate=self.window.dtExpDate.text() answer=QMessageBox.question(self,"SAVING MATERIAL ENTRY","Do you want to save this record",QMessageBox.Yes | QMessageBox.No, QMessageBox.Yes) if(answer==QMessageBox.Yes): if(dataBase.InsertingMaterialEntry(MId,quan,mUId,party,expDate)): dataBase.InsertingProcess("7",MId,mUId,quan,party) QMessageBox.information(self,"SAVING MATERIAL ENTRY","Saving Successful",QMessageBox.Ok,QMessageBox.Ok) elif(answer==QMessageBox.No): QMessageBox.information(self,"SAVING MATERIAL ENTRY","Saving Nonsuccessful",QMessageBox.Ok,QMessageBox.Ok)
def FillinWareHouseName(self): dataBase = warehouseDB() listing = dataBase.ListingWarehouseName() self.window.cmbWName.addItem("Choosing", "-1") print(listing) for wId, wname in listing: self.window.cmbWName.addItem(wname, wId)
def FillingMaterilNo(self): dataBase=warehouseDB() listing=dataBase.ListingMaterialNo() self.window.cmbMNo.addItem("Choosing","-1") print(listing) for mId,mNo in listing: self.window.cmbMNo.addItem(mNo,mId)
def TakingScraping(self): dataBase = warehouseDB() answer = QMessageBox.question(self, "QUESTION", 'Do you want to scrap this record ?', QMessageBox.Yes | QMessageBox.No) if (answer == QMessageBox.Yes): gelen = self.window.tblList.currentItem().text().split("/") print(gelen) processId = '5' mId = gelen[4] quan = gelen[7] mUId = gelen[8] partyNo = gelen[10] id = gelen[0] mNo = gelen[5] isOk = 0 dataBase.InsertingProcess(processId, mId, quan, mUId, partyNo) dataBase.UpdatingWarehouseQuantityForScraping(id, isOk) dataBase.InsertingScrap(mNo, quan, partyNo, mUId, id) QMessageBox.information(self, "SCRAPING", "Scraping is successful", QMessageBox.Ok, QMessageBox.Ok) self.window.tblList.clear() self.FillingTable() elif (answer == QMessageBox.Np): QMessageBox.information(self, "SCRAPING", "Scraping is not successful", QMessageBox.Ok, QMessageBox.Ok)
def FillingTable(self): dataBase = warehouseDB() listing = dataBase.ListingLocation() for id, locName in listing: item = QListWidgetItem("{}/{}".format(id, locName)) self.window.tblList.addItem(item)
def FillingMeasurementUnit(self): dataBase = warehouseDB() listing = dataBase.ListingMeasurementUnit() self.window.cmbMeaUnit.addItem("Choosing", "-1") print(listing) #SORUN BAKILACAK for meaUniID, meaUnit in listing: self.window.cmbMeaUnit.addItem(meaUnit, meaUniID)
def RunProgram(self): dataBase = warehouseDB() matNo = self.window.txtMatNo.text matName = self.window.txtMatName.text meaUnitID = "1" matTypeID = "1" cost = self.window.txtCost.text dataBase.InsertMaterialMasterData("aa", "aa", 1, 2, 5)
def FillingLableTable(self): dataBase=warehouseDB() gelen=self.window.tblList.currentItem().text().split("/") print(gelen) self.window.lblMatID.setText(gelen[0]) self.window.lblLocNo.setText(gelen[3]) self.window.lblMNo.setText(gelen[5]) self.window.lblQuantity.setText(gelen[7]) self.window.lblMUnit.setText(gelen[9]) self.window.lblParty.setText(gelen[10]) self.window.lblExDate.setText(gelen[11]) wName="WAREHOUSE" locClicked=str(gelen[3]) listing=dataBase.ListingLocationWithCondtion(wName,locClicked) self.window.cmbLocNo.addItem("Choosing","-1") #print(listing) for lId,lName in listing: self.window.cmbLocNo.addItem(lName,lId)
def TakingWarehouse(self): dataBase = warehouseDB() answer = QMessageBox.question( self, "QUESTION", 'Do you want to take warehouse for this record ?', QMessageBox.Yes | QMessageBox.No) if (answer == QMessageBox.Yes): gelen = self.window.tblList.currentItem().text().split("/") print(gelen) processId = '1' mId = gelen[4] quan = gelen[7] mUId = gelen[8] partyNo = gelen[10] id = gelen[0] dataBase.InsertingProcess(processId, mId, quan, mUId, partyNo) locationname = self.window.cmbLocNo.currentText() print(locationname) listingLog = locationname locations = dataBase.Locations(listingLog) for lId, lName in locations: self.window.cmbLocNo.addItem(lId, lName) print(locations) locationId = locations[0][0] print(str(locationId)) dataBase.UpdatingWarehouseQuantity(id, locationId) QMessageBox.information(self, "TAKING WAREHOUSE", "This record is successful", QMessageBox.Ok, QMessageBox.Ok) self.window.tblList.clear() self.FillingTable() elif (answer == QMessageBox.No): QMessageBox.information(self, "TAKING WAREHOUSE", "This record is unsuccessful", QMessageBox.Ok, QMessageBox.Ok)
def RunProgram(self): dataBase=warehouseDB() answer=QMessageBox.question(self,"LOCATION TRANSFER",'Do you want to tranfer for this record ?',QMessageBox.Yes | QMessageBox.No) if(answer==QMessageBox.Yes): gelen=self.window.tblList.currentItem().text().split("/") processId='8' mId=gelen[4] quan=gelen[7] mUId=gelen[8] partyNo=gelen[10] expDate=gelen[11] id=gelen[0] quanNew=self.window.txtQuantity.text() locName=self.window.cmbLocNo.currentText() locId=str(dataBase.ListingLocation_V2 (locName)[0][0]) isOk=0 quanUpdate=int(quan)-int(quanNew) if(quanNew>quan): QMessageBox.Warning(self,"LOCATION TRANSFER","Quantity updated is bigger than quantity",QMessageBox.Ok,QMessageBox.Ok) else: dataBase.InsertingProcess(processId,mId,quan,mUId,partyNo) dataBase.InsertingWarehouseQuantity(locId,mId,quanNew,mUId,partyNo,expDate) if(quanUpdate==0): dataBase.UpdatingWarehouseQuantityWithQuantityIsOk(id,quanUpdate,isOk) else: dataBase.UpdatingWarehouseQuantityWithQuantity(id,quanUpdate) QMessageBox.information(self,"LOCATION TRANSFER","This transfer is successful",QMessageBox.Ok,QMessageBox.Ok) self.window.tblList.clear() self.FillingTable() elif (answer==QMessageBox.No): QMessageBox.information(self,"LOCATION TRANSFER","This transfer is unsuccessful",QMessageBox.Ok,QMessageBox.Ok)
def secim(self): dataBase=warehouseDB() gelen=self.window.tblList.currentItem().text().split("/") print(gelen)
def RunProgram(self): dataBase = warehouseDB()
def FillingMaterialType(self): dataBase = warehouseDB() listing = dataBase.ListingMaterialType() self.window.cmbMatType.addItem("Choosing", "-1") print(listing) """
def FillingTable(self): dataBase = warehouseDB() listing = dataBase.ListingMaterialMasterData() print(listing)
def FillingTable(self): dataBase=warehouseDB() listing=dataBase.ListingViewMaterialEntry() for id,matId,matNo,matName,quan,mUIName,entDate,partyNo,expDate in listing: item = QListWidgetItem("{}/{}/{}/{}/{}/{}/{}/{}/{}".format(id,matId,matNo,matName,quan,mUIName,entDate,partyNo,expDate)) self.window.tblList.addItem(item)