31 include_once
'./payment/classes/class.ilPaymentObject.php';
47 $this->ctrl->setParameter($this,
'pobject_id',$a_pobject_id);
53 $this->pobject_id = $a_pobject_id;
62 $cmd = $this->ctrl->getCmd();
63 switch ($this->ctrl->getNextClass($this))
67 if(!
$cmd = $this->ctrl->getCmd())
69 $cmd =
'showBillData';
80 $this->tpl->addBlockfile(
'ADM_CONTENT',
'adm_content',
'tpl.paya_bill_admin.html',
true);
83 $this->tpl->setVariable(
"BILL_FORMACTION",$this->ctrl->getFormAction($this));
90 $this->tpl->setVariable(
"ALT_IMG",$this->lng->txt(
'obj_'.$tmp_obj->getType()));
91 $this->tpl->setVariable(
"TITLE",$tmp_obj->getTitle());
92 $this->tpl->setVariable(
"DESCRIPTION",$this->lng->txt(
'paya_bill_data'));
96 $this->tpl->setVariable(
"TITLE", $this->lng->txt(
'object_not_found'));
99 $this->tpl->setVariable(
"TXT_CONTACT",$this->lng->txt(
'contact_data'));
100 $this->tpl->setVariable(
"TXT_GENDER",$this->lng->txt(
'gender'));
101 $this->tpl->setVariable(
"TXT_GENDER_F",$this->lng->txt(
"gender_f"));
102 $this->tpl->setVariable(
"TXT_GENDER_M",$this->lng->txt(
"gender_m"));
103 $this->tpl->setVariable(
"TXT_FIRSTNAME",$this->lng->txt(
'firstname'));
104 $this->tpl->setVariable(
"TXT_LASTNAME",$this->lng->txt(
'lastname'));
105 $this->tpl->setVariable(
"TXT_TITLE",$this->lng->txt(
'person_title'));
106 $this->tpl->setVariable(
"TXT_INSTITUTION",$this->lng->txt(
'institution'));
107 $this->tpl->setVariable(
"TXT_DEPARTMENT",$this->lng->txt(
'department'));
108 $this->tpl->setVariable(
"TXT_STREET",$this->lng->txt(
'street'));
109 $this->tpl->setVariable(
"TXT_ZIPCODE",$this->lng->txt(
'zipcode'));
110 $this->tpl->setVariable(
"TXT_CITY",$this->lng->txt(
'city'));
111 $this->tpl->setVariable(
"TXT_COUNTRY",$this->lng->txt(
'country'));
112 $this->tpl->setVariable(
"TXT_PHONE",$this->lng->txt(
'phone'));
113 $this->tpl->setVariable(
"TXT_FAX",$this->lng->txt(
'fax'));
114 $this->tpl->setVariable(
"TXT_EMAIL",$this->lng->txt(
'email'));
115 $this->tpl->setVariable(
"TXT_ACCOUNT_DATA",$this->lng->txt(
'account_data'));
116 $this->tpl->setVariable(
"TXT_ACCOUNT_NUMBER",$this->lng->txt(
'account_number'));
117 $this->tpl->setVariable(
"TXT_BANKCODE",$this->lng->txt(
'bankcode'));
118 $this->tpl->setVariable(
"TXT_IBAN",$this->lng->txt(
'iban'));
119 $this->tpl->setVariable(
"TXT_BIC",$this->lng->txt(
'bic'));
120 $this->tpl->setVariable(
"TXT_BANKNAME",$this->lng->txt(
'bankname'));
123 $this->tpl->setVariable(
"INPUT_VALUE",$this->lng->txt(
'save'));
127 $gender = isset(
$_POST[
'gender']) ?
$_POST[
'gender'] : $this->bvd_obj->getGender();
134 $this->tpl->setVariable(
"FIRSTNAME",
135 isset(
$_POST[
'firstname'])
138 $this->tpl->setVariable(
"LASTNAME",
142 $this->tpl->setVariable(
"INSTITUTION",
143 isset(
$_POST[
'institution'])
146 $this->tpl->setVariable(
"DEPARTMENT",
147 isset(
$_POST[
'department'])
150 $this->tpl->setVariable(
"STREET",
154 $this->tpl->setVariable(
"ZIPCODE",
158 $this->tpl->setVariable(
"CITY",
162 $this->tpl->setVariable(
"COUNTRY",
166 $this->tpl->setVariable(
"PHONE",
170 $this->tpl->setVariable(
"FAX",
174 $this->tpl->setVariable(
"EMAIL",
178 $this->tpl->setVariable(
"ACCOUNT_NUMBER",
179 isset(
$_POST[
'account_number'])
182 $this->tpl->setVariable(
"BANKCODE",
186 $this->tpl->setVariable(
"IBAN",
190 $this->tpl->setVariable(
"BIC",
194 $this->tpl->setVariable(
"BANKNAME",
202 include_once
'./payment/classes/class.ilPaymentBillVendor.php';
206 $this->bvd_obj->setGender(
$_POST[
'gender']);
225 if($this->bvd_obj->validate())
227 $this->bvd_obj->update();
232 ilUtil::sendInfo($this->lng->txt(
'paya_pay_method_fill_out_required').$this->bvd_obj->getMessage());
244 $this->ctrl->setParameterByClass(
'ilpaymentobjectgui',
'pobject_id',$this->pobject_id);
246 $this->tpl->addBlockfile(
"BUTTONS",
"buttons",
"tpl.buttons.html");
247 $this->tpl->setCurrentBlock(
"btn_cell");
248 $this->tpl->setVariable(
"BTN_LINK",$this->ctrl->getLinkTargetByClass(
'ilpaymentobjectgui',
'editDetails'));
249 $this->tpl->setVariable(
"BTN_TXT",$this->lng->txt(
'paya_edit_details'));
250 $this->tpl->parseCurrentBlock();
253 $this->tpl->addBlockfile(
"BUTTONS",
"buttons",
"tpl.buttons.html");
254 $this->tpl->setCurrentBlock(
"btn_cell");
255 $this->tpl->setVariable(
"BTN_LINK",$this->ctrl->getLinkTargetByClass(
'ilpaymentobjectgui',
'editPrices'));
256 $this->tpl->setVariable(
"BTN_TXT",$this->lng->txt(
'paya_edit_prices'));
257 $this->tpl->parseCurrentBlock();
259 $this->showButton(
'showBillData',$this->lng->txt(
'paya_edit_pay_method'));
264 include_once
'./payment/classes/class.ilPaymentBillVendor.php';
268 if(!$this->bvd_obj->hasData())
274 switch($tmp_user->getGender())
277 $this->bvd_obj->setGender(1);
280 $this->bvd_obj->setGender(2);
283 $this->bvd_obj->setFirstname($tmp_user->getFirstname());
284 $this->bvd_obj->setLastname($tmp_user->getLastname());
285 $this->bvd_obj->setTitle($tmp_user->getTitle());
286 $this->bvd_obj->setInstitution($tmp_user->getInstitution());
287 $this->bvd_obj->setDepartment($tmp_user->getDepartment());
288 $this->bvd_obj->setStreet($tmp_user->getStreet());
289 $this->bvd_obj->setZipcode($tmp_user->getZipcode());
290 $this->bvd_obj->setCity($tmp_user->getCity());
291 $this->bvd_obj->setCountry($tmp_user->getCountry());
292 $this->bvd_obj->setPhone($tmp_user->getPhoneOffice());
293 $this->bvd_obj->setFax($tmp_user->getFax());
294 $this->bvd_obj->setEmail($tmp_user->getEmail());