예제 #1
0
 public function printTR()
 {
     echo '<tr>';
     $c = new company($this->id_company);
     $company = $c->getName();
     echo '<td>' . $this->name . '</td>';
     echo '<td>' . $company . '</td>';
     echo '<td>' . $this->nationality . '</td>';
     echo '<td>' . $this->mail . '</td>';
     echo '<td>' . $this->phone_number . '</td>';
     echo '<td><a href="../controller/viewCustomer.php?id=' . $this->id . '"><button class=""><span class=\'glyphicon glyphicon-cog\' aria-hidden=\'true\'></span></button></a></td>';
     echo '</tr>';
 }
예제 #2
0
        $sdateBilling = gmdate('d-m-y', $dateBilling);
        $sdatePaid = gmdate('d-m-y', $dateBilling + intval($billing_period) * 24 * 3600);
        $today = date('today');
        $today = strtotime($today);
        $customer = new company($order->getId_company());
        $employee = $order->getEmployee();
        if ($dateBilling == 0) {
            echo '<tr class="success">';
        } else {
            if ($today < $dateBilling + intval($billing_period) * 24 * 3600) {
                echo '<tr class="warning">';
            } else {
                echo '<tr class="danger">';
            }
        }
        echo '<td>' . $customer->getName() . '</td>';
        echo '<td>' . $employee->printLink() . '</td>';
        if ($dateBilling != 0) {
            echo '<td>' . $sdateBilling . '</td>';
            echo '<td>' . $sdatePaid . '</td>';
        } else {
            echo '<td>Pas encore renseigné</td>';
            echo '<td>Pas encore renseigné</td>';
        }
        echo '<td>' . number_format($order->getAlready_paid(), 2, ',', ' ') . ' €</td>';
        echo '<td>' . number_format($order->getPrice(), 2, ',', ' ') . ' €</td>';
        echo '<td><a href="viewOrder.php?id=' . $order->getId() . '"><button class="btn btn-primary"><span class="glyphicon glyphicon-cog" aria-hidden="true"></span></button></a></td>';
        echo '</tr>';
    }
    ?>
    }
}
//récupération des textes
// /!\ Il faudra changer les textes en fonctions de langue que l'on rentre pour le client, mais la langue par défaut sera l'anglais /!\
//Pour le moment on met les allemands
$text_intro = "Sehr geehrte Damen und Herren, wir bedanken uns für Ihr Interesse und möchten Ihnen wie folgt anbieten:";
$text_fin = "Zahlungsbedingungen: " . $order->getDelayForDelivery() . " Tage netto \nDiesem Angebot liegen unsere allgemeinen Geschäftsbedingungen zugrunde. Wir halten uns bis 4 Wochen nach dem Ausstellungsdatum an das Angebot gebunden. Bitte beziehen Sie sich bei Ihrer Bestellung auf die Angebotsnummer in diesem Vorschlag. Nur so können wir Ihnen die hier angebotenen Preise einhalten. Alle Preise -sofern nicht anders ausgewiesen sind netto und ex works Werk Willstätt.";
$pdf = new PDF();
$pdf->AddPage();
$pdf->Image('../assets/datas/model-pdf.png', 0, 0, $pdf->w, $pdf->h, 'png');
//Marge top
$pdf->SetFont('Arial', 'U', 6);
$pdf->Cell(0, 40, '', 0, 1);
$pdf->Cell(0, 5, utf8_decode('Biothys GmbH | Gewerbestr. 6 | D-77731 Willstätt'), 0, 1, 'L', false);
$pdf->SetFont('Arial', '', 10);
$pdf->Cell(0, 5, utf8_decode($company->getName()), 0, 1, 'L', false);
$pdf->Cell(0, 5, utf8_decode($receiving_address->getLine() . ' ' . $receiving_address->getComplement()), 0, 1, 'L', false);
$pdf->Cell(0, 5, utf8_decode($receiving_address->getZip() . ' ' . $receiving_address->getCity() . ' ' . $receiving_address->getCountry()), 0, 1, 'L', false);
//Marge left
$pdf->SetFont('Arial', 'B', 20);
$pdf->Cell(180, 15, utf8_decode('Invoice for samples'), 0, 1, 'R', false);
//Marge top
$pdf->Cell(0, 10, '', 0, 1);
//CellBorder//remplacer le ust-id quand il sera setup
$pdf->SetFont('Arial', 'B', 11);
$pdf->Cell(185, 21, '', 1);
$pdf->setX($pdf->GetX() - 185);
$pdf->setY($pdf->GetY() + 2);
$pdf->FirstTable(array(array(utf8_decode('n° :'), $id_document, date('d.m.y', $order->getDate_entry())), array('UST-ID :', $company->getUst_id(), $order->getEmployee()->getSurname() . ' ' . $order->getEmployee()->getName()), array('Your ID :', $company->getId(), '1/1')));
$pdf->SetFont('Arial', '', 8);
$pdf->setY($pdf->GetY() + 2);
<?php

require_once '../model/company.php';
$idCo = $_GET['idCo'];
$idCu = $_GET['idCu'];
$customer = new customer($idCu);
$company = new company($idCo);
$customer->setId_company($idCo);
$customer->setToDatabase();
$result = array('idContact' => $idCo, 'contact' => $company->getName() . ' | ' . $company->getDescription());
echo json_encode($result);