<?php

include_once 'User.php';
use \User as User;

require 'vendor/autoload.php';

use Konekt\PdfInvoice\InvoicePrinter;

#include_once '../src/InvoicePrinter.php';
include 'config.php';
$FULL_VAT=0.19;
function create_invoice(User $user)
{
    global $FULL_VAT, $SERVICE_ACRONYM, $SERVICE_NAME, $SERVICE_LOGO, $REGULAR_CONFERENCE_FEE, $EARLYBIRD_CONFERENCE_FEE, $STUDENT_DISCOUNT, $CONFERENCE_DINNER, $LUNCH;
    $vat_sum = 0;
    $invoice = new InvoicePrinter("A4", "€", "en");
    $invoice->lang['product'] = "Item";
    $invoice->lang['discount'] = "VAT " . $FULL_VAT * 100 . "%";
    /* Header Settings */
    $invoice->setLogo(str_replace(".svg", ".png", $SERVICE_LOGO));
    $invoice->setColor('#4bb044');
    $invoice->setType('Invoice');
    $invoice->setReference('ICLC-10-' . $user->id);
    $invoice->setDate(date('Y-m-d', time()));
    $invoice->setFrom(['ICLC-conference / Administration', 'Leibniz-Institute for the German Language', 'R5 6-13', '68181 Mannheim', 'Germany']);
    $invoice->setTo([$user->first_name . ' ' . $user->last_name, $user->organization, $user->street, $user->zip . ' ' . $user->city, $user->country]);
    $invoice->setDue(date('Y-m-d', strtotime('+2 weeks')));
    // $invoice->hide_tofrom();
    /* Adding Items in table */
    if ($user->earlybird_registration) {
        $invoice->addItem( $SERVICE_ACRONYM . ' Early Bird Registration', $SERVICE_NAME, 1, false, $EARLYBIRD_CONFERENCE_FEE, false, $EARLYBIRD_CONFERENCE_FEE);
    } else
        $invoice->addItem( $SERVICE_ACRONYM . ' Registration', $SERVICE_NAME, 1, false, $REGULAR_CONFERENCE_FEE, false, $REGULAR_CONFERENCE_FEE);
    if($user->student) $invoice->addItem('Student Discount', 'Student discount', 1, false, - $STUDENT_DISCOUNT, false, -$STUDENT_DISCOUNT);
    if($user->conference_dinner)  {
        $invoice->addItem('Conference Dinner', 'The conference dinner will take place on 20 July.', 1, false, $CONFERENCE_DINNER, $CONFERENCE_DINNER * $FULL_VAT, $CONFERENCE_DINNER);
        $vat_sum += $CONFERENCE_DINNER * $FULL_VAT;
    }
    /* Add totals */
    $invoice->addTotal('Total', $user->total_due);
    $lunch_count = 0;
    $lunch_details = "";
    $i = 0;
    if ($user->lunch_day_1) {
        if ($i > 0)
            $lunch_details .= ", ";
        $lunch_count++;
        $lunch_details .= "Day 1: " . $user->lunch_day_1;
        $i++;
    }
    if ($user->lunch_day_2) {
        if ($i > 0)
            $lunch_details .= ", ";
        $lunch_count++;
        $lunch_details .= "Day 2: " . $user->lunch_day_2;
        $i++;
    }
    if ($user->lunch_day_3) {
        if ($i > 0)
            $lunch_details .= ", ";
        $lunch_count++;
        $lunch_details .= "Day 3: " . $user->lunch_day_3;
        $i++;
    }
    $vat_sum += $lunch_count * $LUNCH * $FULL_VAT;

    if ($lunch_count > 0)
        $invoice->addItem('Lunch', $lunch_details, $lunch_count, false, $LUNCH, $lunch_count * $LUNCH * $FULL_VAT, $lunch_count * $LUNCH);
    // $invoice->addTotal('Discount', $STUDENT_DISCOUNT);
    $invoice->addTotal('Total due', $user->total_due, true);
    $invoice->addTotal('incl. VAT', $vat_sum, false);

    $invoice->addTitle("Payment Details");

    $invoice->addParagraph("Please transfer the total amount due to our account: ");

    $invoice->addParagraph("Leibniz-Institute for the German Language
IBAN: DE70 6708 0050 0694 9411 00
BIC: DRESDEFF670
Commerzbank Mannheim
Reference: ICLC-10-" . $user->id . "

VAT ID: DE 143 845 359

If you have any questions about this invoice, please contact us via buchhaltung@ids-mannheim.de.
");
    //$invoice->setFooterNote("xx");

    /* Render */
    $ret = $invoice->render('example4.pdf', 'S'); /* I => Display on browser, D => Force Download, F => local path save, S => return document path */
    return $ret;
}

/*
$user = new User();
$user->id = 107;
$user->first_name = "John";
$user->last_name = "Урсула";
$user->organization = "Урсула ACME Inc.";
$user->street = "123 Main St.";
$user->zip = "12345";
$user->city = "Mannheim";
$user->country = "Germany";
$user->total_due = 260.0;
$user->student = true;
$user->lunch_day_1 = "vegan";
$user->lunch_day_2 = "non-vegetarian";
$user->conference_dinner = true;
create_invoice($user);
*/
?>