mirror of
				https://github.com/klmp200/PQT_Gestionnaire_vente_stock.git
				synced 2025-10-31 00:53:10 +00:00 
			
		
		
		
	Module Core, clss Sale : ajout méthd getTotalPrice
This commit is contained in:
		| @@ -100,4 +100,12 @@ public class Sale implements ILoggable, Serializable{ | |||||||
|     public void setStatus(SaleStatus status) { |     public void setStatus(SaleStatus status) { | ||||||
|         this.status = status; |         this.status = status; | ||||||
|     } |     } | ||||||
|  |  | ||||||
|  |     public double getTotalPrice() { | ||||||
|  |         double totalPrice = 0; | ||||||
|  |         for(Product product : this.products.keySet()){ | ||||||
|  |             totalPrice+=product.getPrice()*(double)this.products.get(product); | ||||||
|  |         } | ||||||
|  |         return totalPrice; | ||||||
|  |     } | ||||||
| } | } | ||||||
|   | |||||||
		Reference in New Issue
	
	Block a user