func (VS *Server) isQRavailableForAssignment(c *gin.Context, serType TypeOfItem, idQR bson.ObjectId, class string, method string, operation string) bool {
	var qrs []QR
	err := VS.DataBase.Find(&qrs, bolthold.Where("TypeOfItem").Eq(serType).And("ID").Eq(idQR))
	VS.checkOperation(c, class, method, operation, err)
	if len(qrs) == 1 {
		code := VS.getQRbyID(c, idQR, "handlers_manager", "showAddPaymentM", "workers := v.getAllWorkers")
		VS.deleteQRfromDatabase(c, code, "handlers_manager", "showAddPaymentM", "workers := v.getAllWorkers")
		return true
	}
	return false
}
// This method true is the QR is available for a new use and false if is not, and if available, it deletes it from the available QR table
This method true is the QR is available for a new use and false if is not, and if available, it deletes it from the available QR table
// This method true is the QR is available for a new use and false if is not and if available it deletes it from the available QR table
func (VS *Server) isQRavailableForAssignment(c *gin.Context, serType TypeOfItem, idQR bson.ObjectId, class string, method string, operation string) bool {
	var qrs []QR
	err := VS.DataBase.Find(&qrs, bolthold.Where("TypeOfItem").Eq(serType).And("ID").Eq(idQR))
	VS.checkOperation(c, class, method, operation, err)
	if len(qrs) == 1 {
		code := VS.getQRbyID(c, idQR, "handlers_manager", "showAddPaymentM", "workers := v.getAllWorkers")
		VS.deleteQRfromDatabase(c, code, "handlers_manager", "showAddPaymentM", "workers := v.getAllWorkers")
		return true
	}
	return false
}
func ( VS * Server ) isQRavailableForAssignment ( c * gin . Context , serType TypeOfItem , idQR bson . ObjectId , class string , method string , operation string ) bool { var qrs [ ] QR err := VS . DataBase . Find ( & qrs , bolthold . Where ( " " ) . Eq ( serType ) . And ( " " ) . Eq ( idQR ) ) VS . checkOperation ( c , class , method , operation , err ) if len ( qrs ) == 1 { code := VS . getQRbyID ( c , idQR , " " , " " , " " ) VS . deleteQRfromDatabase ( c , code , " " , " " , " " ) return true } return false }
This method true is the QR is available for a new use and false if is not, and if available, it deletes it from the available QR table
This method true is the QR is available for a new use and false if is not and if available it deletes it from the available QR table