function __construct($quoteId, $date, $clientId, $amount, $tax, $total, $user) { $this->id = $quoteId; $this->transactionId = $quoteId; $this->date = $date; $this->type = 'Quotation'; $this->party = Client::GetClient($clientId); $this->amount = floatval($amount); $this->tax = floatval($tax); $this->total = floatval($total); $this->description = 'Quotation for ' . $this->party->name; if (is_null($user)) { $this->user = SessionManager::GetUsername(); } else { $this->user = $user; } $this->lineItems = QuotationLine::GetQuoteItems($quoteId); }