func (VS *Server) showRecordsSalesWorkerGlobal(c *gin.Context) {
	user := VS.getUserFomCookie(c, "h_worker", "showRecordsSalesWorkerGlobal", "user := v.getUserFomCookie")
	purchases := VS.getAllServicePurchasesFromSpecificWorker(c, user.ID, "h_worker", "showRecordsSalesWorkerGlobal", "purchases := VS.getAllServicePurchasesFromSpecificWorker")
	fmt.Print("longitude of purchases: ")
	fmt.Print(len(purchases))

	purchasesHTML := VS.stocksToHTML(c, purchases)
	JSON, err := json.Marshal(purchasesHTML)
	VS.checkOperation(c, "h_worker", "showRecordsSalesWorkerGlobal", "JSON, err := json.Marshal(purchasesHTML", err)
	render(c, gin.H{
		"sales": purchasesHTML,
		"JSON":  string(JSON),
	}, "w-records-sales.html")
}
// Shows ALL the stock generated of the worker
Shows ALL the stock generated of the worker
// Shows ALL the stock generated of the worker
func (VS *Server) showRecordsSalesWorkerGlobal(c *gin.Context) {
	user := VS.getUserFomCookie(c, "h_worker", "showRecordsSalesWorkerGlobal", "user := v.getUserFomCookie")
	purchases := VS.getAllServicePurchasesFromSpecificWorker(c, user.ID, "h_worker", "showRecordsSalesWorkerGlobal", "purchases := VS.getAllServicePurchasesFromSpecificWorker")
	fmt.Print("longitude of purchases: ")
	fmt.Print(len(purchases))
	purchasesHTML := VS.stocksToHTML(c, purchases)
	JSON, err := json.Marshal(purchasesHTML)
	VS.checkOperation(c, "h_worker", "showRecordsSalesWorkerGlobal", "JSON, err := json.Marshal(purchasesHTML", err)
	render(c, gin.H{
		"sales": purchasesHTML,
		"JSON":  string(JSON),
	}, "w-records-sales.html")
}
func ( VS * Server ) showRecordsSalesWorkerGlobal ( c * gin . Context ) { user := VS . getUserFomCookie ( c , " " , " " , " " ) purchases := VS . getAllServicePurchasesFromSpecificWorker ( c , user . ID , " " , " " , " " ) fmt . Print ( " " ) fmt . Print ( len ( purchases ) ) purchasesHTML := VS . stocksToHTML ( c , purchases ) JSON , err := json . Marshal ( purchasesHTML ) VS . checkOperation ( c , " " , " " , " " , err ) render ( c , gin . H { " " : purchasesHTML , " " : string ( JSON ) , } , " " ) }
Shows ALL the stock generated of the worker
Shows ALL the stock generated of the worker