func (VS *Server) purchasesToWalletWorker(c *gin.Context, p Stock) Wallet {
	var cost float64
	prod, b := VS.getVideoCourseByID(c, p.IDVideoCourseOrItem, "h_functionality", "purchasesToWalletWorker", "prod, b := VS.getVideoCourseByID", true)
	var w Wallet
	w.ID = p.ID.Hex()
	w.Date = strconv.Itoa(time.Unix(p.Date, 0).Day()) + "/" + time.Unix(p.Date, 0).Month().String()
	if b {
		w.ItemPhoto = "/local/video-courses/" + prod.Name + "/purchases/" + "/" + p.Photo
		cost = prod.Price
	} else {
		item, _ := VS.getItemByID(c, p.IDVideoCourseOrItem, "h_functionality", "purchasesToWalletWorker", "item, _ := VS.getItemByID(c, p.", true)
		cat := VS.getCategoryByID(c, item.IDCategory, "h_functionality", "purchasesToWalletWorker", "cat := VS.getCategoryByID")
		tpe := VS.getCategoryTypeByID(c, cat.Type, "h_functionality", "purchasesToWalletWorker", "tpe := VS.getCategoryTypeByID")
		w.ItemPhoto = "/local/categories/" + tpe.Name + "/" + cat.Name + "/" + item.Photo
		cost = item.Price
	}
	w.Price = cost
	w.ItemName = prod.Name
	w.DateUnix = time.Unix(p.Date, 0).UnixNano()
	w.ServiceName = VS.getServiceByID(c, p.ServiceCreated, "h_functionality", "purchasesToWalletWorker", "w.ServiceName = VS.getServiceByID", true).Name
	return w
}
// Transform the Purchases information from DataBase to Human readable (in individual)
Transform the Purchases information from DataBase to Human readable (in individual)
// Transform the Purchases information from DataBase to Human readable ( in individual )
func (VS *Server) purchasesToWalletWorker(c *gin.Context, p Stock) Wallet {
	var cost float64
	prod, b := VS.getVideoCourseByID(c, p.IDVideoCourseOrItem, "h_functionality", "purchasesToWalletWorker", "prod, b := VS.getVideoCourseByID", true)
	var w Wallet
	w.ID = p.ID.Hex()
	w.Date = strconv.Itoa(time.Unix(p.Date, 0).Day()) + "/" + time.Unix(p.Date, 0).Month().String()
	if b {
		w.ItemPhoto = "/local/video-courses/" + prod.Name + "/purchases/" + "/" + p.Photo
		cost = prod.Price
	} else {
		item, _ := VS.getItemByID(c, p.IDVideoCourseOrItem, "h_functionality", "purchasesToWalletWorker", "item, _ := VS.getItemByID(c, p.", true)
		cat := VS.getCategoryByID(c, item.IDCategory, "h_functionality", "purchasesToWalletWorker", "cat := VS.getCategoryByID")
		tpe := VS.getCategoryTypeByID(c, cat.Type, "h_functionality", "purchasesToWalletWorker", "tpe := VS.getCategoryTypeByID")
		w.ItemPhoto = "/local/categories/" + tpe.Name + "/" + cat.Name + "/" + item.Photo
		cost = item.Price
	}
	w.Price = cost
	w.ItemName = prod.Name
	w.DateUnix = time.Unix(p.Date, 0).UnixNano()
	w.ServiceName = VS.getServiceByID(c, p.ServiceCreated, "h_functionality", "purchasesToWalletWorker", "w.ServiceName = VS.getServiceByID", true).Name
	return w
}
func ( VS * Server ) purchasesToWalletWorker ( c * gin . Context , p Stock ) Wallet { var cost float64 prod , b := VS . getVideoCourseByID ( c , p . IDVideoCourseOrItem , " " , " " , " " , true ) var w Wallet w . ID = p . ID . Hex ( ) w . Date = strconv . Itoa ( time . Unix ( p . Date , 0 ) . Day ( ) ) + " " + time . Unix ( p . Date , 0 ) . Month ( ) . String ( ) if b { w . ItemPhoto = " " + prod . Name + " " + " " + p . Photo cost = prod . Price } else { item , _ := VS . getItemByID ( c , p . IDVideoCourseOrItem , " " , " " , " " , true ) cat := VS . getCategoryByID ( c , item . IDCategory , " " , " " , " " ) tpe := VS . getCategoryTypeByID ( c , cat . Type , " " , " " , " " ) w . ItemPhoto = " " + tpe . Name + " " + cat . Name + " " + item . Photo cost = item . Price } w . Price = cost w . ItemName = prod . Name w . DateUnix = time . Unix ( p . Date , 0 ) . UnixNano ( ) w . ServiceName = VS . getServiceByID ( c , p . ServiceCreated , " " , " " , " " , true ) . Name return w }
Transform the Purchases information from DataBase to Human readable (in individual)
Transform the Purchases information from DataBase to Human readable ( in individual )