<?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';

function create_invoice(User $user)
{
    global $SERVICE_ACRONYM, $SERVICE_NAME, $SERVICE_LOGO, $REGULAR_CONFERENCE_FEE, $EARLYBIRD_CONFERENCE_FEE, $STUDENT_DISCOUNT, $CONFERENCE_DINNER, $LUNCH;

    $invoice = new InvoicePrinter("A4", "€", "en");
    $invoice->lang['product'] = "Item";
    /* 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(['', '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, -$STUDENT_DISCOUNT);
    if($user->conference_dinner)
        $invoice->addItem('Conference Dinner', 'The conference dinner will take place on 20 July.', 1, false, $CONFERENCE_DINNER, false, $CONFERENCE_DINNER);
    /* 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++;
    }

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

    $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
");
    //$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->conference_dinner = true;
create_invoice($user);
*/
?>