func (VS *Server) deleteItemDeliveryGlobal(c *gin.Context) {
	idStock, b := VS.getIDParamFromURL(c, "idstock")
	if !b {
		return
	}
	stock := VS.getStockByID(c, idStock, "h_deliveries", "deleteItemDeliveryGlobal", "stock := VS.getStockByID")
	delivery, _ := VS.getDeliveryByID(c, stock.IDServiceLocation, "h_deliveries", "deleteItemDeliveryGlobal", "delivery, _ := VS.getDeliveryByID", true)
	if delivery.IsSent {
		return
	}
	VS.deleteAnything(c, stock, stock.ID, "h_deliveries", "deleteItemDeliveryGlobal", "VS.deleteAnything")
	// Recycle the QR
	if stock.IsTrackable {
		QR := QR{
			ID:         idStock,
			TypeOfItem: stock.TypeOfItem,
		}
		VS.addElementToDatabaseWithRegisterFromCentral(c, QR, QR.ID, "h_reports", "deleteItemDeliveryGlobal", "VS.addElementToDatabaseWithRegisterFromCentral")
	}
	delivery.Stocks = RemovesID(delivery.Stocks, idStock)
	VS.addElementToDatabaseWithRegisterFromCentral(c, delivery, delivery.ID, "h_deliveries", "deleteItemDeliveryGlobal", "VS.addElementToDatabaseWithRegisterFromCentral")
	VS.goodFeedback(c, "/data/new-stock/"+delivery.IDServiceReceiver.Hex()+"/"+delivery.ID.Hex())
}
// this handler deletes a item from the global delivery from central
this handler deletes a item from the global delivery from central
// this handler deletes a item from the global delivery from central
func (VS *Server) deleteItemDeliveryGlobal(c *gin.Context) {
	idStock, b := VS.getIDParamFromURL(c, "idstock")
	if !b {
		return
	}
	stock := VS.getStockByID(c, idStock, "h_deliveries", "deleteItemDeliveryGlobal", "stock := VS.getStockByID")
	delivery, _ := VS.getDeliveryByID(c, stock.IDServiceLocation, "h_deliveries", "deleteItemDeliveryGlobal", "delivery, _ := VS.getDeliveryByID", true)
	if delivery.IsSent {
		return
	}
	VS.deleteAnything(c, stock, stock.ID, "h_deliveries", "deleteItemDeliveryGlobal", "VS.deleteAnything")
	if stock.IsTrackable {
		QR := QR{
			ID:         idStock,
			TypeOfItem: stock.TypeOfItem,
		}
		VS.addElementToDatabaseWithRegisterFromCentral(c, QR, QR.ID, "h_reports", "deleteItemDeliveryGlobal", "VS.addElementToDatabaseWithRegisterFromCentral")
	}
	delivery.Stocks = RemovesID(delivery.Stocks, idStock)
	VS.addElementToDatabaseWithRegisterFromCentral(c, delivery, delivery.ID, "h_deliveries", "deleteItemDeliveryGlobal", "VS.addElementToDatabaseWithRegisterFromCentral")
	VS.goodFeedback(c, "/data/new-stock/"+delivery.IDServiceReceiver.Hex()+"/"+delivery.ID.Hex())
}
func ( VS * Server ) deleteItemDeliveryGlobal ( c * gin . Context ) { idStock , b := VS . getIDParamFromURL ( c , " " ) if ! b { return } stock := VS . getStockByID ( c , idStock , " " , " " , " " ) delivery , _ := VS . getDeliveryByID ( c , stock . IDServiceLocation , " " , " " , " " , true ) if delivery . IsSent { return } VS . deleteAnything ( c , stock , stock . ID , " " , " " , " " ) if stock . IsTrackable { QR := QR { ID : idStock , TypeOfItem : stock . TypeOfItem , } VS . addElementToDatabaseWithRegisterFromCentral ( c , QR , QR . ID , " " , " " , " " ) } delivery . Stocks = RemovesID ( delivery . Stocks , idStock ) VS . addElementToDatabaseWithRegisterFromCentral ( c , delivery , delivery . ID , " " , " " , " " ) VS . goodFeedback ( c , " " + delivery . IDServiceReceiver . Hex ( ) + " " + delivery . ID . Hex ( ) ) }
this handler deletes a item from the global delivery from central
this handler deletes a item from the global delivery from central
// Recycle the QR