Subversion Repositories SmartDukaan

Rev

Rev 18136 | Rev 18138 | Go to most recent revision | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed

Rev 18136 Rev 18137
Line 8540... Line 8540...
8540
                                    orderQuantity = 0
8540
                                    orderQuantity = 0
8541
                            else:
8541
                            else:
8542
                                break
8542
                                break
8543
                            
8543
                            
8544
                            current_time = datetime.datetime.now()
8544
                            current_time = datetime.datetime.now()
8545
                            insertScanSql = "insert into scanNew(inventoryItemId, warehouseId, type, scannedAt, quantity, orderId) values(%d,%d,'%s','%s',%d,%d)"%(invItem[0],invItem[9],'BAD_SALE',current_time.strftime('%Y-%m-%d %H:%M:%S'),scanQuantity,order.id)
8545
                            insertScanSql = "insert into scanNew(inventoryItemId, warehouseId, type, scannedAt, quantity, orderId) values(%d,%d,'%s','%s',%d,%d)"%(invItem[0],invItem[8],'BAD_SALE',current_time.strftime('%Y-%m-%d %H:%M:%S'),scanQuantity,order.id)
8546
                            scanList.append(insertScanSql)
8546
                            scanList.append(insertScanSql)
8547
                            #whCursor.execute(insertScanSql)
8547
                            #whCursor.execute(insertScanSql)
8548
                            updateInvItemSql = "update inventoryItem set currentQuantity = currentQuantity-%d, lastScanType='BAD_SALE' where id=%d "%(scanQuantity,invItem[0])
8548
                            updateInvItemSql = "update inventoryItem set currentQuantity = currentQuantity-%d, lastScanType='BAD_SALE' where id=%d "%(scanQuantity,invItem[0])
8549
                            inventoryItemList.append(updateInvItemSql)
8549
                            inventoryItemList.append(updateInvItemSql)
8550
                            #whCursor.execute(updateInvItemSql)                            
8550
                            #whCursor.execute(updateInvItemSql)