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));
89 $this->tpl->setVariable(
"ALT_IMG",$this->lng->txt(
'obj_'.$tmp_obj->getType()));
90 $this->tpl->setVariable(
"TITLE",$tmp_obj->getTitle());
91 $this->tpl->setVariable(
"DESCRIPTION",$this->lng->txt(
'paya_bill_data'));
94 $this->tpl->setVariable(
"TXT_CONTACT",$this->lng->txt(
'contact_data'));
95 $this->tpl->setVariable(
"TXT_GENDER",$this->lng->txt(
'gender'));
96 $this->tpl->setVariable(
"TXT_GENDER_F",$this->lng->txt(
"gender_f"));
97 $this->tpl->setVariable(
"TXT_GENDER_M",$this->lng->txt(
"gender_m"));
98 $this->tpl->setVariable(
"TXT_FIRSTNAME",$this->lng->txt(
'firstname'));
99 $this->tpl->setVariable(
"TXT_LASTNAME",$this->lng->txt(
'lastname'));
100 $this->tpl->setVariable(
"TXT_TITLE",$this->lng->txt(
'person_title'));
101 $this->tpl->setVariable(
"TXT_INSTITUTION",$this->lng->txt(
'institution'));
102 $this->tpl->setVariable(
"TXT_DEPARTMENT",$this->lng->txt(
'department'));
103 $this->tpl->setVariable(
"TXT_STREET",$this->lng->txt(
'street'));
104 $this->tpl->setVariable(
"TXT_ZIPCODE",$this->lng->txt(
'zipcode'));
105 $this->tpl->setVariable(
"TXT_CITY",$this->lng->txt(
'city'));
106 $this->tpl->setVariable(
"TXT_COUNTRY",$this->lng->txt(
'country'));
107 $this->tpl->setVariable(
"TXT_PHONE",$this->lng->txt(
'phone'));
108 $this->tpl->setVariable(
"TXT_FAX",$this->lng->txt(
'fax'));
109 $this->tpl->setVariable(
"TXT_EMAIL",$this->lng->txt(
'email'));
110 $this->tpl->setVariable(
"TXT_ACCOUNT_DATA",$this->lng->txt(
'account_data'));
111 $this->tpl->setVariable(
"TXT_ACCOUNT_NUMBER",$this->lng->txt(
'account_number'));
112 $this->tpl->setVariable(
"TXT_BANKCODE",$this->lng->txt(
'bankcode'));
113 $this->tpl->setVariable(
"TXT_IBAN",$this->lng->txt(
'iban'));
114 $this->tpl->setVariable(
"TXT_BIC",$this->lng->txt(
'bic'));
115 $this->tpl->setVariable(
"TXT_BANKNAME",$this->lng->txt(
'bankname'));
118 $this->tpl->setVariable(
"INPUT_VALUE",$this->lng->txt(
'save'));
122 $gender = isset($_POST[
'gender']) ? $_POST[
'gender'] : $this->bvd_obj->getGender();
129 $this->tpl->setVariable(
"FIRSTNAME",
130 isset($_POST[
'firstname'])
133 $this->tpl->setVariable(
"LASTNAME",
134 isset($_POST[
'lastname'])
137 $this->tpl->setVariable(
"INSTITUTION",
138 isset($_POST[
'institution'])
141 $this->tpl->setVariable(
"DEPARTMENT",
142 isset($_POST[
'department'])
145 $this->tpl->setVariable(
"STREET",
146 isset($_POST[
'street'])
149 $this->tpl->setVariable(
"ZIPCODE",
150 isset($_POST[
'zipcode'])
153 $this->tpl->setVariable(
"CITY",
154 isset($_POST[
'city'])
157 $this->tpl->setVariable(
"COUNTRY",
158 isset($_POST[
'country'])
161 $this->tpl->setVariable(
"PHONE",
162 isset($_POST[
'phone'])
165 $this->tpl->setVariable(
"FAX",
169 $this->tpl->setVariable(
"EMAIL",
170 isset($_POST[
'email'])
173 $this->tpl->setVariable(
"ACCOUNT_NUMBER",
174 isset($_POST[
'account_number'])
177 $this->tpl->setVariable(
"BANKCODE",
178 isset($_POST[
'bankcode'])
181 $this->tpl->setVariable(
"IBAN",
182 isset($_POST[
'iban'])
185 $this->tpl->setVariable(
"BIC",
189 $this->tpl->setVariable(
"BANKNAME",
190 isset($_POST[
'bankname'])
197 include_once
'./payment/classes/class.ilPaymentBillVendor.php';
201 $this->bvd_obj->setGender($_POST[
'gender']);
220 if($this->bvd_obj->validate())
222 $this->bvd_obj->update();
227 ilUtil::sendInfo($this->lng->txt(
'paya_pay_method_fill_out_required').$this->bvd_obj->getMessage());
239 $this->ctrl->setParameterByClass(
'ilpaymentobjectgui',
'pobject_id',$this->pobject_id);
241 $this->tpl->addBlockfile(
"BUTTONS",
"buttons",
"tpl.buttons.html");
242 $this->tpl->setCurrentBlock(
"btn_cell");
243 $this->tpl->setVariable(
"BTN_LINK",$this->ctrl->getLinkTargetByClass(
'ilpaymentobjectgui',
'editDetails'));
244 $this->tpl->setVariable(
"BTN_TXT",$this->lng->txt(
'paya_edit_details'));
245 $this->tpl->parseCurrentBlock();
248 $this->tpl->addBlockfile(
"BUTTONS",
"buttons",
"tpl.buttons.html");
249 $this->tpl->setCurrentBlock(
"btn_cell");
250 $this->tpl->setVariable(
"BTN_LINK",$this->ctrl->getLinkTargetByClass(
'ilpaymentobjectgui',
'editPrices'));
251 $this->tpl->setVariable(
"BTN_TXT",$this->lng->txt(
'paya_edit_prices'));
252 $this->tpl->parseCurrentBlock();
254 $this->showButton(
'showBillData',$this->lng->txt(
'paya_edit_pay_method'));
259 include_once
'./payment/classes/class.ilPaymentBillVendor.php';
263 if(!$this->bvd_obj->hasData())
269 switch($tmp_user->getGender())
272 $this->bvd_obj->setGender(1);
275 $this->bvd_obj->setGender(2);
278 $this->bvd_obj->setFirstname($tmp_user->getFirstname());
279 $this->bvd_obj->setLastname($tmp_user->getLastname());
280 $this->bvd_obj->setTitle($tmp_user->getTitle());
281 $this->bvd_obj->setInstitution($tmp_user->getInstitution());
282 $this->bvd_obj->setDepartment($tmp_user->getDepartment());
283 $this->bvd_obj->setStreet($tmp_user->getStreet());
284 $this->bvd_obj->setZipcode($tmp_user->getZipcode());
285 $this->bvd_obj->setCity($tmp_user->getCity());
286 $this->bvd_obj->setCountry($tmp_user->getCountry());
287 $this->bvd_obj->setPhone($tmp_user->getPhoneOffice());
288 $this->bvd_obj->setFax($tmp_user->getFax());
289 $this->bvd_obj->setEmail($tmp_user->getEmail());