Example #1
0
 /// <summary>
 /// Brisanje stavke racuna
 /// </summary>
 /// <param name="billItem">stavka racuna koja se brise</param>
 public void RemoveBillItem(BillItem billItem)
 {
     billItems.Remove(billItem);
 }
        /// <summary>
        /// Izadaje racun za pricuvu
        /// </summary>
        /// <param name="apartment">stan za kojieg se izdaje racun za placanje pricuve</param>
        /// <returns>racun za pricuvu</returns>
        public Bill IssueReserveBillFor(Apartment apartment)
        {
            if(apartment.ResponsibleTenant == null) {
                throw new RulesException("Responsible tenant is not set.");
            }

            Bill bill = new Bill(apartment.ResponsibleTenant, buildingManager.LegalPerson, tax);
            decimal price = reserveCoefficient * apartment.SurfaceArea;
            BillItem billItem = new BillItem(1, price, "Pričuva");
            bill.AddBillItem(billItem);
            bill.ReferenceNumber = REFERENCE_NUMBER_PREFIX + apartment.Id + bill.DateTimeIssued.ToShortDateString();

            return bill;
        }
Example #3
0
 /// <summary>
 /// Dodavanje stavke racuna
 /// </summary>
 /// <param name="billItem">stavka racuna koja se dodaje</param>
 public void AddBillItem(BillItem billItem)
 {
     billItems.Add(billItem);
 }