func (VS *Server) showItemsDeliveryFromCentral(c *gin.Context) {
	serviceEmitter := VS.getCentralWarehouse(c, "h_deliveries", "showItemsDeliveryFromCentral", "serviceEmitter := VS.getCentralWarehouse")

	idDelivery, b := VS.getIDParamFromURL(c, "iddelivery")
	if !b {
		return
	}
	idServiceReceiver, b := VS.getIDParamFromURL(c, "idservice")
	if !b {
		return
	}
	serviceReceiver := VS.getServiceByID(c, idServiceReceiver, "h_deliveries", "showItemsDeliveryFromCentral", "serviceReceiver := VS.getServiceByID", true)
	serviceEmitterHTML := VS.serviceToHTML(c, serviceEmitter)
	serviceReceiverHTML := VS.serviceToHTML(c, serviceReceiver)
	itemsToChoose := VS.getAllITemsForServicePickerGlobal(c, "h_deliveries", "showItemsDeliveryFromCentral", "itemsToChoose := VS.getAllITemsForServicePickerGlobal")
	del, _ := VS.getDeliveryByID(c, idDelivery, "h_deliveries", "showItemsDeliveryFromCentral", "del, _ := VS.getDeliveryByID", true)
	sent := del.IsSent
	itemsChosen := VS.getAllStockByDelivery(c, idDelivery, "h_deliveries", "showItemsDeliveryFromCentral", "itemsChosen := VS.getAllStockByDelivery")
	itemsChosenHTML := VS.stocksToHTML(c, itemsChosen)

	render(c, gin.H{
		"serviceReceiver": serviceReceiverHTML,
		"serviceEmitter":  serviceEmitterHTML,
		"sent":            sent,
		"itemstochoose":   itemsToChoose,
		"itemsChosen":     itemsChosenHTML,
	}, "delivery-form-to-send.html")
}
// This handler shows the form to include more stocks in the delivery, and shows the items that are already in the delivery from Central
This handler shows the form to include more stocks in the delivery, and shows the items that are already in the delivery from Central
// This handler shows the form to include more stocks in the delivery and shows the items that are already in the delivery from Central
func (VS *Server) showItemsDeliveryFromCentral(c *gin.Context) {
	serviceEmitter := VS.getCentralWarehouse(c, "h_deliveries", "showItemsDeliveryFromCentral", "serviceEmitter := VS.getCentralWarehouse")
	idDelivery, b := VS.getIDParamFromURL(c, "iddelivery")
	if !b {
		return
	}
	idServiceReceiver, b := VS.getIDParamFromURL(c, "idservice")
	if !b {
		return
	}
	serviceReceiver := VS.getServiceByID(c, idServiceReceiver, "h_deliveries", "showItemsDeliveryFromCentral", "serviceReceiver := VS.getServiceByID", true)
	serviceEmitterHTML := VS.serviceToHTML(c, serviceEmitter)
	serviceReceiverHTML := VS.serviceToHTML(c, serviceReceiver)
	itemsToChoose := VS.getAllITemsForServicePickerGlobal(c, "h_deliveries", "showItemsDeliveryFromCentral", "itemsToChoose := VS.getAllITemsForServicePickerGlobal")
	del, _ := VS.getDeliveryByID(c, idDelivery, "h_deliveries", "showItemsDeliveryFromCentral", "del, _ := VS.getDeliveryByID", true)
	sent := del.IsSent
	itemsChosen := VS.getAllStockByDelivery(c, idDelivery, "h_deliveries", "showItemsDeliveryFromCentral", "itemsChosen := VS.getAllStockByDelivery")
	itemsChosenHTML := VS.stocksToHTML(c, itemsChosen)
	render(c, gin.H{
		"serviceReceiver": serviceReceiverHTML,
		"serviceEmitter":  serviceEmitterHTML,
		"sent":            sent,
		"itemstochoose":   itemsToChoose,
		"itemsChosen":     itemsChosenHTML,
	}, "delivery-form-to-send.html")
}
func ( VS * Server ) showItemsDeliveryFromCentral ( c * gin . Context ) { serviceEmitter := VS . getCentralWarehouse ( c , " " , " " , " " ) idDelivery , b := VS . getIDParamFromURL ( c , " " ) if ! b { return } idServiceReceiver , b := VS . getIDParamFromURL ( c , " " ) if ! b { return } serviceReceiver := VS . getServiceByID ( c , idServiceReceiver , " " , " " , " " , true ) serviceEmitterHTML := VS . serviceToHTML ( c , serviceEmitter ) serviceReceiverHTML := VS . serviceToHTML ( c , serviceReceiver ) itemsToChoose := VS . getAllITemsForServicePickerGlobal ( c , " " , " " , " " ) del , _ := VS . getDeliveryByID ( c , idDelivery , " " , " " , " " , true ) sent := del . IsSent itemsChosen := VS . getAllStockByDelivery ( c , idDelivery , " " , " " , " " ) itemsChosenHTML := VS . stocksToHTML ( c , itemsChosen ) render ( c , gin . H { " " : serviceReceiverHTML , " " : serviceEmitterHTML , " " : sent , " " : itemsToChoose , " " : itemsChosenHTML , } , " " ) }
This handler shows the form to include more stocks in the delivery, and shows the items that are already in the delivery from Central
This handler shows the form to include more stocks in the delivery and shows the items that are already in the delivery from Central