func (VS *Server) saleToWalletWorker(c *gin.Context, s Sale) Wallet {
	mat, _ := VS.getItemByID(c, s.IDStock, "h_functionality", "saleToWalletWorker", "mat, _ := VS.getItemByID", true)
	var w Wallet
	w.ID = s.ID.Hex()
	w.Date = strconv.Itoa(time.Unix(s.Date, 0).Day()) + "/" + time.Unix(s.Date, 0).Month().String()
	cat := VS.getCategoryByID(c, mat.IDCategory, "h_functionality", "saleToWalletWorker", "cat := VS.getCategoryByID(c, mat")
	tpe := VS.getCategoryTypeByID(c, cat.Type, "h_functionality", "saleToWalletWorker", "tpe := VS.getCategoryTypeByID")
	w.ItemName = mat.Name
	w.ItemPhoto = "/local-resources/categories/" + tpe.Name + "/" + cat.Name + "/" + mat.Photo
	w.Price = -mat.Price
	w.ServiceName = VS.getServiceByID(c, s.IDService, "h_functionality", "saleToWalletWorker", "w.ServiceName = VS.getServiceByID", true).Name
	w.DateUnix = time.Unix(s.Date, 0).UnixNano()
	return w
}
// Transform the Sales information from DataBase to Human readable (in individual)
Transform the Sales information from DataBase to Human readable (in individual)
// Transform the Sales information from DataBase to Human readable ( in individual )
func (VS *Server) saleToWalletWorker(c *gin.Context, s Sale) Wallet {
	mat, _ := VS.getItemByID(c, s.IDStock, "h_functionality", "saleToWalletWorker", "mat, _ := VS.getItemByID", true)
	var w Wallet
	w.ID = s.ID.Hex()
	w.Date = strconv.Itoa(time.Unix(s.Date, 0).Day()) + "/" + time.Unix(s.Date, 0).Month().String()
	cat := VS.getCategoryByID(c, mat.IDCategory, "h_functionality", "saleToWalletWorker", "cat := VS.getCategoryByID(c, mat")
	tpe := VS.getCategoryTypeByID(c, cat.Type, "h_functionality", "saleToWalletWorker", "tpe := VS.getCategoryTypeByID")
	w.ItemName = mat.Name
	w.ItemPhoto = "/local-resources/categories/" + tpe.Name + "/" + cat.Name + "/" + mat.Photo
	w.Price = -mat.Price
	w.ServiceName = VS.getServiceByID(c, s.IDService, "h_functionality", "saleToWalletWorker", "w.ServiceName = VS.getServiceByID", true).Name
	w.DateUnix = time.Unix(s.Date, 0).UnixNano()
	return w
}
func ( VS * Server ) saleToWalletWorker ( c * gin . Context , s Sale ) Wallet { mat , _ := VS . getItemByID ( c , s . IDStock , " " , " " , " " , true ) var w Wallet w . ID = s . ID . Hex ( ) w . Date = strconv . Itoa ( time . Unix ( s . Date , 0 ) . Day ( ) ) + " " + time . Unix ( s . Date , 0 ) . Month ( ) . String ( ) cat := VS . getCategoryByID ( c , mat . IDCategory , " " , " " , " " ) tpe := VS . getCategoryTypeByID ( c , cat . Type , " " , " " , " " ) w . ItemName = mat . Name w . ItemPhoto = " " + tpe . Name + " " + cat . Name + " " + mat . Photo w . Price = - mat . Price w . ServiceName = VS . getServiceByID ( c , s . IDService , " " , " " , " " , true ) . Name w . DateUnix = time . Unix ( s . Date , 0 ) . UnixNano ( ) return w }
Transform the Sales information from DataBase to Human readable (in individual)
Transform the Sales information from DataBase to Human readable ( in individual )