. */ require_once(__DIR__ . '/../login.php'); $_offer = new Offer($_pdo, $_id); ?>
Assignments
getAssignments(); foreach ($assignments as $assignment) { echo ""; } if (count($assignments) == 0) { echo ""; } ?>
# Briefing Time Price Tools
{$assignment->id} {$assignment->title}

{$assignment->getHTMLDescription()}

{$assignment->hours}h ".Constants::invoice_valuta."{$assignment->price_per_hour} / hr
{$assignment->VAT_percentage}% VAT
There are no assignments in the database.
Discounts
getDiscounts(); foreach ($discounts as $discount) { echo ""; } if (count($discounts) == 0) { echo ""; } ?>
# Briefing Value Tools
{$discount->id} {$discount->title}

{$discount->description}

".Constants::invoice_valuta."{$discount->value}
{$discount->VAT_percentage}% VAT
There are no discounts in the database.
Payments
getPayment(); $payments = is_null($payment) ? [] : [$payment]; foreach ($payments as $payment) { echo ""; } if (count($payments) == 0) { echo ""; } ?>
# Braintree ID Braintree status Tools
{$payment->id} {$payment->braintree_id}
"; foreach ($payment->getBraintreeStatusHistory() as $item) { echo "{$item->timestamp->format('Y-m-d H:i')}: {$item->status}
"; } echo "
There are no payments in the database.
Timeline
    $_offer->id, 'contact' => $_offer->getContact()->name, 'assignments' => '', 'assignments_header' => '' ]; foreach ($_offer->getAssignments() as $assignment) { $temp['assignments'] .= "{$assignment->title}
    (".Constants::invoice_valuta."{$assignment->calculate(Calculatable::SUBTOTAL)} excl. VAT, ".Constants::invoice_valuta."{$assignment->calculate(Calculatable::TOTAL)} incl. VAT)

    {$assignment->getHTMLDescription()}

    "; $temp['assignments_header'] .= "{$assignment->title}
    (".Constants::invoice_valuta."{$assignment->calculate(Calculatable::SUBTOTAL)} excl. VAT, ".Constants::invoice_valuta."{$assignment->calculate(Calculatable::TOTAL)} incl. VAT)
    "; } $list[] = array_merge($temp, ['type' => 'start', 'time' => $_offer->start_date, 'description' => 'Offer started']); $sort_list[] = $_offer->start_date . $_offer->id . 0; $list[] = array_merge($temp, ['type' => 'end', 'time' => $_offer->end_date, 'description' => 'Offer ended']); $sort_list[] = $_offer->end_date . $_offer->id . 1; if ($_offer->invoice_date > 0) { $list[] = array_merge($temp, ['type' => 'invoice', 'time' => $_offer->invoice_date, 'description' => 'Invoice sent']); $sort_list[] = $_offer->invoice_date . $_offer->id . 2; if ($_offer->getPaymentReceived() > 0) { $list[] = array_merge($temp, ['type' => 'payment_received', 'time' => $_offer->getPaymentReceived(), 'description' => 'Payment received']); $sort_list[] = $_offer->getPaymentReceived() . $_offer->id . 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 ""; } ?>