func (VS *Server) deliveryToHTML(c *gin.Context, dPack []Delivery) []DeliveryHTML {
	var dpsHTML []DeliveryHTML
	var dpHTML DeliveryHTML
	for _, dp := range dPack {
		dpHTML.ID = dp.ID
		dpHTML.Date = strconv.Itoa(time.Unix(dp.Date, 0).Day()) + " / " + time.Unix(dp.Date, 0).Month().String()
		dpHTML.IsSent = dp.IsSent
		dpHTML.IsComplete = dp.IsComplete
		if dpHTML.IsSent && dp.IDManager != "" {
			dpHTML.ManagerName = VS.getUserByID(c, dp.IDManager, "h_view", "deliveryToHTML", "dpHTML.ManagerName = VS.getUserByID").Name
		}
		serEmitter := VS.getServiceByID(c, dp.IDServiceEmitter, "h_view", "deliveryToHTML", "serEmitter := VS.getServiceByID", true)
		dpHTML.ServiceEmitterName = serEmitter.Name
		dpHTML.ServiceEmitterID = serEmitter.ID
		serReceiver := VS.getServiceByID(c, dp.IDServiceReceiver, "h_view", "deliveryToHTML", "serReceiver := VS.getServiceByID", true)
		dpHTML.ServiceReceiverName = serReceiver.Name
		dpHTML.ServiceReceiverID = serReceiver.ID

		dpHTML.VillageName = VS.getVillageByID(c, serReceiver.IDVillage, "h_view", "deliveryToHTML", "dpHTML.VillageName = VS.getVillageByID").Name
		dpsHTML = append(dpsHTML, dpHTML)
	}
	return dpsHTML
}
// This methos transform the array of Delivery into human readable information
This methos transform the array of Delivery into human readable information
// This methos transform the array of Delivery into human readable information
func (VS *Server) deliveryToHTML(c *gin.Context, dPack []Delivery) []DeliveryHTML {
	var dpsHTML []DeliveryHTML
	var dpHTML DeliveryHTML
	for _, dp := range dPack {
		dpHTML.ID = dp.ID
		dpHTML.Date = strconv.Itoa(time.Unix(dp.Date, 0).Day()) + " / " + time.Unix(dp.Date, 0).Month().String()
		dpHTML.IsSent = dp.IsSent
		dpHTML.IsComplete = dp.IsComplete
		if dpHTML.IsSent && dp.IDManager != "" {
			dpHTML.ManagerName = VS.getUserByID(c, dp.IDManager, "h_view", "deliveryToHTML", "dpHTML.ManagerName = VS.getUserByID").Name
		}
		serEmitter := VS.getServiceByID(c, dp.IDServiceEmitter, "h_view", "deliveryToHTML", "serEmitter := VS.getServiceByID", true)
		dpHTML.ServiceEmitterName = serEmitter.Name
		dpHTML.ServiceEmitterID = serEmitter.ID
		serReceiver := VS.getServiceByID(c, dp.IDServiceReceiver, "h_view", "deliveryToHTML", "serReceiver := VS.getServiceByID", true)
		dpHTML.ServiceReceiverName = serReceiver.Name
		dpHTML.ServiceReceiverID = serReceiver.ID
		dpHTML.VillageName = VS.getVillageByID(c, serReceiver.IDVillage, "h_view", "deliveryToHTML", "dpHTML.VillageName = VS.getVillageByID").Name
		dpsHTML = append(dpsHTML, dpHTML)
	}
	return dpsHTML
}
func ( VS * Server ) deliveryToHTML ( c * gin . Context , dPack [ ] Delivery ) [ ] DeliveryHTML { var dpsHTML [ ] DeliveryHTML var dpHTML DeliveryHTML for _ , dp := range dPack { dpHTML . ID = dp . ID dpHTML . Date = strconv . Itoa ( time . Unix ( dp . Date , 0 ) . Day ( ) ) + " " + time . Unix ( dp . Date , 0 ) . Month ( ) . String ( ) dpHTML . IsSent = dp . IsSent dpHTML . IsComplete = dp . IsComplete if dpHTML . IsSent && dp . IDManager != " " { dpHTML . ManagerName = VS . getUserByID ( c , dp . IDManager , " " , " " , " " ) . Name } serEmitter := VS . getServiceByID ( c , dp . IDServiceEmitter , " " , " " , " " , true ) dpHTML . ServiceEmitterName = serEmitter . Name dpHTML . ServiceEmitterID = serEmitter . ID serReceiver := VS . getServiceByID ( c , dp . IDServiceReceiver , " " , " " , " " , true ) dpHTML . ServiceReceiverName = serReceiver . Name dpHTML . ServiceReceiverID = serReceiver . ID dpHTML . VillageName = VS . getVillageByID ( c , serReceiver . IDVillage , " " , " " , " " ) . Name dpsHTML = append ( dpsHTML , dpHTML ) } return dpsHTML }
This methos transform the array of Delivery into human readable information
This methos transform the array of Delivery into human readable information