Ejemplo n.º 1
0
 public function __construct($usr_id, $pay_type)
 {
     $this->ilUser = new ilObjUser($usr_id);
     $this->pay_type = $pay_type;
     $this->active_erp = ilERP::getActive();
     $this->erp_cls = "ilERPDebtor_" . $this->active_erp['erp_short'];
     require_once './Services/Payment/classes/class.' . $this->erp_cls . '.php';
     $this->deb = new $this->erp_cls();
     $this->cart = new ilPaymentShoppingCart($this->ilUser);
     $this->sc = $this->cart->getShoppingCart($pay_type);
     if (!$this->sc) {
         throw new ilERPException("EmptyCart");
     }
 }
Ejemplo n.º 2
0
 /**
  * Sets e-conomic settings.
  *
  * @access public
  */
 public function setSettings($a)
 {
     parent::setSettings($a);
 }
 public function saveInvoice($contens, $preview = true)
 {
     $file = $preview ? ilERP::getPreviewFile() : ilERP::getSaveDirectory() . $this->getInvoiceNumber() . ".pdf";
     $fp = @fopen($file, 'w+');
     if (!$fp) {
         throw new ilERPException("Cannot write " . $file);
     }
     fwrite($fp, $contens);
     fclose($fp);
 }
Ejemplo n.º 4
0
 /**
  * Sets e-conomic settings.
  *
  * @access public
  */
 public function setSettings($a)
 {
     $this->setAgreement($a['agreement']);
     $this->setProduct($a['product']);
     $this->setTerms($a['terms']);
     $this->setLayout($a['layout']);
     $this->setCode($a['code']);
     parent::setSettings($a);
 }