Exemplo n.º 1
0
 def get_item_form_le_updatesale(self, list=None):
     sdt = SaleDao()
     no = list[0]
     code = list[1]
     price = list[2]
     saleCnt = list[3]
     marginRate = list[4]
     sdt.update_item(code, price, saleCnt, marginRate, no)
     return self.create_item_sale(no, code, price, saleCnt, marginRate)
Exemplo n.º 2
0
    def update_item2(self):
        sale = SaleDao()
        selectionIdx = self.ui.tableWidget_2.selectedIndexes()[0]
        item_no, item_code, item_price, item_saleCnt, item_marginRate, no, code, price, saleCnt, marginRate = self.get_item_form_le2(
        )

        sale.update_item(code, price, saleCnt, marginRate, no)
        self.ui.tableWidget_2.setItem(selectionIdx.row(), 0, item_no)
        self.ui.tableWidget_2.setItem(selectionIdx.row(), 1, item_code)
        self.ui.tableWidget_2.setItem(selectionIdx.row(), 2, item_price)
        self.ui.tableWidget_2.setItem(selectionIdx.row(), 3, item_saleCnt)
        self.ui.tableWidget_2.setItem(selectionIdx.row(), 4, item_marginRate)
        self.init_item2()