Homparty dev
This commit is contained in:
parent
9252094a04
commit
ac0d5b781e
60 changed files with 3443 additions and 293 deletions
|
|
@ -34,6 +34,10 @@ class ContractPDFRepository extends BaseRepository {
|
|||
$this->{$name} = $value;
|
||||
}
|
||||
|
||||
private function convert($str){
|
||||
return iconv('UTF-8', 'windows-1252', $str);
|
||||
}
|
||||
|
||||
public function createContractPDF() {
|
||||
|
||||
$pdf = new ContractPDF();
|
||||
|
|
@ -47,56 +51,58 @@ class ContractPDFRepository extends BaseRepository {
|
|||
$y = 70;
|
||||
$nl = 17.5;
|
||||
$pdf->SetXY($x1, $y);
|
||||
$pdf->Write(0, $this->model->account->m_account);
|
||||
$pdf->Write(0, $this->convert($this->model->account->m_account));
|
||||
$pdf->SetXY($x2, $y);
|
||||
$pdf->Write(0, now()->format("d.m.Y"));
|
||||
|
||||
$y += $nl;
|
||||
$pdf->SetXY($x1, $y);
|
||||
$pdf->Write(0, $this->model->account->company);
|
||||
$pdf->Write(0, $this->convert($this->model->account->company));
|
||||
$pdf->SetXY($x2, $y);
|
||||
$pre = $this->model->account->pre_phone_id != "" ? $this->model->account->pre_phone->phone." " : "";
|
||||
$pdf->Write(0, $pre.$this->model->account->phone);
|
||||
$pre = $this->model->account->pre_phone_id != "" ? $this->convert($this->model->account->pre_phone->phone)." " : "";
|
||||
$pdf->Write(0, $pre.$this->convert($this->model->account->phone));
|
||||
|
||||
|
||||
|
||||
$y += $nl;
|
||||
$pdf->SetXY($x1, $y);
|
||||
$pdf->Write(0, $this->model->account->m_first_name);
|
||||
$pdf->Write(0, $this->convert($this->model->account->m_first_name));
|
||||
$pdf->SetXY($x2, $y);
|
||||
$pre = $this->model->account->pre_mobil_id != "" ? $this->model->account->pre_mobil->phone." " : "";
|
||||
$pdf->Write(0, $pre.$this->model->account->mobil);
|
||||
$pre = $this->model->account->pre_mobil_id != "" ? $this->convert($this->model->account->pre_mobil->phone)." " : "";
|
||||
$pdf->Write(0, $pre.$this->convert($this->model->account->mobil));
|
||||
|
||||
$y += $nl;
|
||||
$pdf->SetXY($x1, $y);
|
||||
$pdf->Write(0, $this->model->account->m_last_name);
|
||||
$pdf->Write(0, $this->convert($this->model->account->m_last_name));
|
||||
$pdf->SetXY($x2, $y);
|
||||
$pdf->Write(0, $this->model->email);
|
||||
$pdf->Write(0, $this->convert($this->model->email));
|
||||
|
||||
$y += $nl;
|
||||
$pdf->SetXY($x1, $y);
|
||||
$pdf->Write(0, $this->model->account->address);
|
||||
$pdf->Write(0, $this->convert($this->model->account->address));
|
||||
$pdf->SetXY($x2, $y);
|
||||
$pdf->Write(0, $this->model->account->birthday);
|
||||
$pdf->Write(0, $this->convert($this->model->account->birthday));
|
||||
|
||||
$y += $nl;
|
||||
$pdf->SetXY($x1, $y);
|
||||
$pdf->Write(0, $this->model->account->zipcode." ".$this->model->account->city);
|
||||
$pdf->Write(0, $this->convert($this->model->account->zipcode)." ".$this->convert($this->model->account->city));
|
||||
|
||||
$y += $nl;
|
||||
$pdf->SetXY($x1, $y);
|
||||
$pre = $this->model->account->country_id ? $this->model->account->country->de." " : "";
|
||||
$pre = $this->model->account->country_id ? $this->convert($this->model->account->country->de)." " : "";
|
||||
$pdf->Write(0, $pre);
|
||||
|
||||
if($this->model->m_sponsor){
|
||||
|
||||
$y += 48;
|
||||
$pdf->SetXY($x1, $y);
|
||||
$pdf->Write(0, $this->model->user_sponsor->account->company);
|
||||
$pdf->Write(0, $this->convert($this->model->user_sponsor->account->company));
|
||||
$pdf->SetXY($x2, $y);
|
||||
$pdf->Write(0, $this->model->user_sponsor->account->m_account);
|
||||
$pdf->Write(0, $this->convert($this->model->user_sponsor->account->m_account));
|
||||
|
||||
$y += $nl;
|
||||
$pdf->SetXY($x1, $y);
|
||||
$pdf->Write(0, $this->model->user_sponsor->account->m_first_name." ".$this->model->user_sponsor->account->m_last_name);
|
||||
$pdf->Write(0, $this->convert($this->model->user_sponsor->account->m_first_name)." ".$this->convert($this->model->user_sponsor->account->m_last_name));
|
||||
|
||||
$website = $this->model->user_sponsor->shop()->count() ? $this->model->user_sponsor->shop->getSubdomain(false) : "www.mivita.care";
|
||||
|
||||
|
|
@ -112,9 +118,9 @@ class ContractPDFRepository extends BaseRepository {
|
|||
|
||||
|
||||
$pdf->SetXY($x1, 65);
|
||||
$pdf->Write(0, $this->model->account->m_first_name." ".$this->model->account->m_last_name);
|
||||
$pdf->Write(0, $this->convert($this->model->account->m_first_name)." ".$this->convert($this->model->account->m_last_name));
|
||||
$pdf->SetXY($x2, 65);
|
||||
$pdf->Write(0, $this->model->account->m_account);
|
||||
$pdf->Write(0, $this->convert($this->model->account->m_account));
|
||||
|
||||
$pdf->AddPage('P', array(210, 297));
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue