. */ $_offer = new offer($_pdo, $_id); $_offer->generateInvoice(); ?>
Timeline
    $_offer->getId(), 'contact' => $_offer->getContact()->getName(), 'assignments' => '', 'assignments_header' => '' ); foreach ($_offer->getAssignments() as $assignment) { $temp['assignments'] .= "{$assignment->getTitle()}
    (".constants::invoice_valuta."{$assignment->calculate(assignment::SUBTOTAL)} excl. VAT, ".constants::invoice_valuta."{$assignment->calculate(assignment::TOTAL)} incl. VAT)

    {$assignment->getDescription()}

    "; $temp['assignments_header'] .= "{$assignment->getTitle()}
    (".constants::invoice_valuta."{$assignment->calculate(assignment::SUBTOTAL)} excl. VAT, ".constants::invoice_valuta."{$assignment->calculate(assignment::TOTAL)} incl. VAT)
    "; } $list[] = array_merge($temp, array('type' => 'start', 'time' => $_offer->getStartDate(), 'description' => 'Offer started')); $sort_list[] = $_offer->getStartDate() . $_offer->getId() . 0; $list[] = array_merge($temp, array('type' => 'end', 'time' => $_offer->getEndDate(), 'description' => 'Offer ended')); $sort_list[] = $_offer->getEndDate() . $_offer->getId() . 1; if ($_offer->getInvoiceDate() > 0) { $list[] = array_merge($temp, array('type' => 'invoice', 'time' => $_offer->getInvoiceDate(), 'description' => 'Invoice sent')); $sort_list[] = $_offer->getInvoiceDate() . $_offer->getId() . 2; if ($_offer->getPaymentReceived() > 0) { $list[] = array_merge($temp, array('type' => 'payment_received', 'time' => $_offer->getPaymentReceived(), 'description' => 'Payment received')); $sort_list[] = $_offer->getPaymentReceived() . $_offer->getId() . 3; } } array_multisort($sort_list, SORT_DESC, $list); $i = 0; foreach ($list as $item) { if ($item['time'] > time()) { continue; } echo ""; switch ($item['type']) { case 'start': echo "
    "; break; case 'end': echo "
    "; break; case 'invoice': echo "
    "; break; case 'payment_received': echo "
    "; break; } echo "
    "; echo "

    #{$item['id']} to {$item['contact']}: {$item['description']}

    ".BusinessAdmin::formatDate($item['time'],false,true,true)."

    "; switch ($item['type']) { case 'start': echo "
    {$item['assignments']}
    "; break; default: echo "
    {$item['assignments_header']}
    "; } echo "
    "; echo ""; } ?>
Assignments
"; } if (count($assignments) == 0) { echo ""; } ?>
# Briefing Time Price Tools
{$assignment->getId()} {$assignment->getTitle()}

{$assignment->getDescription()}

{$assignment->getHours()}h ".constants::invoice_valuta."{$assignment->getPricePerHour()} / hr
{$assignment->getVAT()}% VAT
There are no assignments in the database. Why not start with creating one, below?