</tr> <tr> <td><?php echo format_date($earliest_date); ?> </td> <td></td> <td>Opening Balance</td> <td>---</td> <td style = "text-align: right;"><?php echo my_money_format($balance); ?> </td> <td style = "text-align: right;"><?php echo my_money_format($balance); ?> </td> <td></td> <td></td> </tr> <?php $month_id = date("n"); $day_id = date("j"); while ($result = mysql_fetch_array($recent)) { if ($_GET['chk'] == $result['id'] && $form == TRUE) { include 'edit_chkbook.php'; // this will drop in the form } else { include 'ind_chkbook.php';
$output .= "<div class= \"summary\">\n"; $month_total_exp = $v_expense['daily_amt'] * $total_days; $spent = sum_variable_exp($v_expense['id'], $first_stamp); $output .= "<p><strong>Summary</strong></p>\n"; $output .= "<p>Beginning amount this month: " . my_money_format($month_total_exp) . "<br/>\n"; $output .= "Spent: " . my_money_format($spent) . "</p>\n"; $output .= "</div>"; $output .= "<div class= \"exp_title\"><h3>Remaining</h3></div>\n"; if ($today < $mid_stamp) { //the mid month pay day has NOT passed $output .= "<div class= \"mid\">\n"; $mid_proration = $month_total_exp * $first_half_days / $total_days; $output .= "<p><strong>Till pay day...</strong>\n<br/>\n"; $output .= "Remaining: " . my_money_format($mid_proration + $spent) . "\n" . "<br/>\n"; $remaining = ($mid_proration + $spent) / $days_till_mid; $output .= "Per day: " . my_money_format($remaining) . "<br/>"; $output .= "Per week: " . my_money_format($remaining * 7); $output .= "</p></div>"; } //$paid = abs(sum_variable_exp($v_expense['id'], $first_stamp)); $output .= "<div class= \"rest\">\n<p><strong>For the rest of the month...</strong><br/>"; $output .= "Remaining amount: " . my_money_format($month_total_exp + $spent) . "<br/>"; $remaining = $month_total_exp + $spent; $output .= "Per day : " . my_money_format($remaining / $remaining_days) . "<br/>"; $output .= "Per week : " . my_money_format(7 * $remaining / $remaining_days) . "</p>"; $output .= "</div></div>"; } echo $output; ?> </div>
<?php } ?> </ul> </span> </div> <?php } ?> </div> <div class="right_content_block"> <div class="info_item"> <span class="item_name"></span> <span class="item_value"> <?php echo my_money_format($user_info->cost); ?> <i class="fa fa-ruble"></i> <?php if ($user_info->cost && $user_info->cost != 0) { ?> <span class="sub_cost"><?php echo my_cost_format($user_info->per_hour, $user_info->per_project); ?> </span> <?php } ?> </span> </div> </div>
?> </td> </tr> <tr> <td>BTW</td> <td align="right">€</td> <td align="right" width="80"><?php echo my_money_format($tax); ?> </td> </tr> <tr> <td>Totaal (inclusief BTW)</td> <td align="right">€</td> <td align="right" width="80"><?php echo my_money_format($totalInclPrice); ?> </td> </tr> </tbody> </table> </div> <pagebreak /> <div class="pdf-content"> <h1><?php echo $machine->post_title; ?> </h1> <p>Koelcapaciteit: <?php echo $machine->meta['capacity'][0]; ?>
//NOT paid if ($expense['type'] != 2) { //not a variable expense...outputs what is allocated/month $allocated = allocated($expense['num_months'], $expense['total_exp'], $expense['due_date'], $thismonth); echo my_money_format($allocated); } else { //this is a variable expense allocate will = budgeted less spent if ($total > $spent) { //normal situation more budgeted than spent $allocated = $total + $spent; //spent will be a negative so the difference can be achieved thru simple addition } else { //more spent than budgeted $allocated = 0; } echo my_money_format($allocated); } //running total if ($expense['type'] == 0) { //pay to be rec'd $budgeted = $budgeted - $allocated; } elseif ($expense['type'] != 0) { //payments to be made $budgeted = $budgeted + $allocated; } } ?> </td> <!-- EDIT --> <td><a href= "edit.php?exp=<?php echo $expense['id'];