/// <summary> /// Konstruktor (izdaje pravna osoba za pričuvu/zgradu) /// </summary> /// <param name="legalPersonFrom">pravna osoba koja šalje račun za zgradu</param> /// <param name="reserve">Pričuva</param> /// <param name="paymentDescription">opis plaćanja</param> /// <param name="tax">porez/PDV</param> public Bill(LegalPerson legalPersonFrom, Reserve reserve, string paymentDescription, short tax) { if (String.IsNullOrEmpty(legalPersonFrom.NumberOfBankAccount)) { throw new BusinessRulesException("Legal Person has not valid bank account number."); } to = null; this.reserve = reserve; from = new LegalPersonSnapshot(legalPersonFrom); this.paymentDescription = paymentDescription; this.tax = tax; dateTimeIssued = DateTime.Now; isPaid = false; billItems = new List<BillItem>(); }
/// <summary> /// Konstruktor (izdaje pričuva/zgrada za osobu) /// </summary> /// <param name="reserve">pričuva</param> /// <param name="personTo">osoba koja placa racun</param> /// <param name="paymentDescription">opis placanja</param> /// <param name="tax">porez/PDV</param> public Bill(Reserve reserve, Person personTo, string paymentDescription, short tax) { from = null; this.reserve = reserve; to = new PersonSnapshot(personTo); this.paymentDescription = paymentDescription; this.tax = tax; dateTimeIssued = DateTime.Now; isPaid = false; billItems = new List<BillItem>(); }