def write(self):
     if sqlite_mode:
         Reader_Writer.write_changes(self.stock, self.bills, self.orders)
     else:
         Reader_Writer_json.write_changes(self.stock, self.bills,
                                          self.orders)
     self.close()
         biID = b.remove_item(commands[2])
         if sqlite_mode:
             Reader_Writer.delete_billitem_by_id(biID)
     elif (commands[1] == "print"):
         if (b == None):
             print("Wrong bill selected")
             continue
         b.print()
     elif (commands[1] == "printall"):
         bills.print()
     else:
         print("Wrong input!")
         continue
 elif (commands[0] == "write"):
     if sqlite_mode:
         Reader_Writer.write_changes(stock, bills, orders)
     else:
         Reader_Writer_json.write_changes(stock, bills, orders)
     app_on = False
     break
 elif (commands[0] == "order"):
     if (commands[1] == "new"):
         o = orders.new(u)
     elif (commands[1] == "select"):
         o = orders.find_order(commands[2])
     elif (commands[1] == "delete"):
         orders.delete(int(commands[2]) - 1)
     elif (commands[1] == "add"):
         if (o == None):
             print("Wrong order selected")
             continue