public function __construct($scenario = 'insert') { parent::__construct($scenario); $this->lb_vendor_no = 0; $this->lb_vendor_no = $this->formatVendorNextNumFormatted($this->lb_vendor_no); $this->lb_vendor_date = date('Y-m-d'); $this->lb_vendor_due_date = date('Y-m-d'); $this->lb_vendor_status = self::LB_PO_STATUS_CODE_DRAFT; $this->lb_vendor_encode = $this->setBase64_decodePO(); $this->lb_vendor_notes = ''; }
public function __construct($scenario = 'insert') { parent::__construct($scenario); $this->lb_quotation_no = 0; $this->lb_quotation_no = $this->formatQuotationNextNumFormatted($this->lb_quotation_no); $this->lb_quotation_status = self::LB_QUOTATION_STATUS_CODE_DRAFT; $this->lb_company_id = 5; $this->lb_quotation_date = date('Y-m-d'); $this->lb_quotation_due_date = date('Y-m-d'); $this->lb_quotation_encode = $this->setBase64_decodeQuotation(); // set invoice note $lastDefaultNote = LbDefaultNote::model()->getFullRecords(); if (count($lastDefaultNote) > 0) { $this->lb_quotation_note = $lastDefaultNote[0]->lb_default_note_quotation; } }