{ $due_date = $row->due_date; $current_date = date('Y-m-d'); $current_date = strtotime($current_date); if($current_date > $due_date) { make_invoice_over_due($row->id); } } ?> <tr class="main_text"> <td align="center" height="30"><?php echo date("Y-m-d", $row->invoice_generated_date); ?></td> <td align="center"><?php echo date("Y-m-d", $row->due_date); ?></td> <td align="center"><?php echo $row->invoice_id; ?></td> <td align="center"><?php echo customer_full_name($row->customer_id); ?></td> <td align="center" height="30"><?php echo date("Y-m-d H:i:s", $row->from_date); ?></td> <td align="center" height="30"><?php echo date("Y-m-d H:i:s", $row->to_date); ?></td> <td align="center" height="30"><?php echo $row->total_calls; ?></td> <td align="center" height="30"><?php echo $row->total_charges; ?></td> <?php if($row->customer_prepaid == '1') { $bill_type = "Prepaid"; } else { $bill_type = "Postapid"; } ?>
$due_date = $row->due_date; $current_date = date('Y-m-d'); $current_date = strtotime($current_date); if($current_date > $due_date) { make_invoice_over_due($row->id); } } ?> <tr class="main_text"> <td align="center" height="30"><?php echo date("Y-m-d", $row->invoice_generated_date); ?></td> <td align="center"><?php echo date("Y-m-d", $row->due_date); ?></td> <td align="center"><?php echo $row->invoice_id; ?></td> <td align="center"><?php echo anchor_popup('reseller/customers/edit_customer/'.$row->customer_id.'', customer_full_name($row->customer_id), $atts); ?></td> <td align="center" height="30"><?php echo date("Y-m-d H:i:s", $row->from_date); ?></td> <td align="center" height="30"><?php echo date("Y-m-d H:i:s", $row->to_date); ?></td> <td align="center" height="30"><?php echo $row->total_calls; ?></td> <td align="center" height="30"><?php echo $row->total_charges; ?></td> <?php if($row->customer_prepaid == '1') { $bill_type = "Prepaid"; } else { $bill_type = "Postapid"; }
$cust_type = "Customer"; if($row->reseller_level != 0) { $cust_type = "Reseller"; } ?> <td align="left" style="font-weight:bold;"><?php echo $cust_type; ?></td> <?php $parent = $row->parent_id; if($parent == $this->session->userdata('customer_id')) { echo '<td align="left" style="font-weight:bold;">You !</td>'; } else { echo '<td align="left" style="font-weight:bold;">'.anchor_popup('reseller/customers/edit_customer/'.$row->parent_id.'', customer_full_name($row->parent_id), $atts).'</td>'; } ?> <td align="left"><?php echo $row->customer_company; ?></td> <td align="left"><?php echo $row->customer_contact_email; ?></td> <td align="left"><?php echo country_any_cell($row->customer_country, 'countryname'); ?></td> <td align="center"><?php echo $row->customer_phone; ?></td> <td align="center"><?php echo $row->customer_balance; ?></td> <td align="center"><input type="checkbox" id="<?php echo $row->customer_id;?>" class="enable_checkbox" <?php if($row->customer_enabled == 1){ echo 'checked="checked"';}?>/></td> </tr> <tr style="height:5px;"><td colspan="10" id="shadowDiv" style="height:5px;margin-top:0px;background-color:#fff"></td></tr> <?php endforeach;?> <?php } else { echo '<tr><td align="center" style="color:red;" colspan="10">No Results Found</td></tr>'; } ?>
<?php echo '<li><a href="#">'.customer_full_name($customer_id).'</a></li>'; ?> <li>TYPE ::</li> <?php $type = customer_any_cell($customer_id, 'reseller_level'); if($type == 0) { echo '<li><a href="#">Customer</a></li>'; } else { echo '<li><a href="#">Reseller</a></li>'; } ?> <li>PARENT ::</li> <?php $parent = customer_any_cell($customer_id, 'parent_id'); if($parent == $this->session->userdata('customer_id')) { echo '<li><a href="#">You !</a></li>'; } else { echo '<li><a href="'.base_url().'reseller/customers/edit_customer/'.$parent.'">'.customer_full_name($parent).'</a></li>'; } ?> </ul> </td> </tr> <?php } ?>
<tr><td colspan="5" id="shadowDiv" style="height:5px;margin-top:-1px"></td></tr> <?php } else { ?> <tr><td colspan="4" id="shadowDiv" style="height:5px;margin-top:-1px"></td></tr> <?php } ?> <?php if($accounts->num_rows() > 0) {?> <?php foreach ($accounts->result() as $row): ?> <tr class="main_text"> <td align="center"> </td> <?php if($row->type != 'sub_admin'){?> <td align="left"><?php echo anchor_popup('customers/edit_customer/'.$row->customer_id.'', $row->username, $atts); ?></td> <td align="left"><?php echo customer_full_name($row->customer_id); ?></td> <td align="center"><input type="checkbox" id="<?php echo $row->id;?>" class="enable_checkbox" <?php if($row->enabled == 1){ echo 'checked="checked"';}?>/></td> <td align="left"><a href="#" id="<?php echo $row->id;?>" class="delete_account"><img src="<?php echo base_url();?>assets/images/button_cancel.png" style="width:16px;margin-left:15px;border:none;cursor:pointer;" /></a></td> <?php } else {?> <td width="3%" align="left"><?php echo $row->username; ?></td> <td width="4%" align="center"><input type="checkbox" id="<?php echo $row->id;?>" class="enable_checkbox" <?php if($row->enabled == 1){ echo 'checked="checked"';}?>/></td> <td width="6%" align="left"><a href="#" id="<?php echo $row->id;?>" class="delete_account"><img src="<?php echo base_url();?>assets/images/button_cancel.png" style="width:16px;margin-left:15px;border:none;cursor:pointer;" /></a></td> <?php } ?> </tr>
<tr class="bottom_link"> <td height="20" width="8%" align="center">Generated Date</td> <td width="8%" align="center">Due Date</td> <td width="7%" align="center">Invoice #</td> <td width="7%" align="center">Customer</td> <td width="7%" align="center">Billing From</td> <td width="7%" align="center">Billing To</td> <td width="7%" align="center">Total Calls</td> <td width="7%" align="center">Total Charges</td> <td width="7%" align="center">Billing Type</td> <td width="7%" align="center">Status</td> <td width="7%" align="center">View Invoice</td> <td width="7%" align="center">View CDR</td> </tr> <tr><td colspan="12" id="shadowDiv" style="height:5px;margin-top:-1px"></td></tr> <?php $my_name = customer_full_name($this->session->userdata('customer_id'));?> <?php if($invoices->num_rows() > 0) {?> <?php foreach ($invoices->result() as $row): ?> <?php /*****CHECK FOR DUE DATE ****/ if($row->status == 'pending') { $due_date = $row->due_date; $current_date = date('Y-m-d'); $current_date = strtotime($current_date); if($current_date > $due_date) {
{ echo '<td align="left" style="font-weight:bold;">You !</td>'; } else { if($this->session->userdata('user_type') == 'admin'){ echo '<td align="left" style="font-weight:bold;">'.anchor_popup('customers/edit_customer/'.$row->parent_id.'', customer_full_name($row->parent_id).' (L-'.customer_any_cell($row->parent_id, 'reseller_level').')', $atts).'</td>'; } else if($this->session->userdata('user_type') == 'sub_admin'){ if(sub_admin_access_any_cell($this->session->userdata('user_id'), 'edit_customers') == 1) { echo '<td align="left" style="font-weight:bold;">'.anchor_popup('customers/edit_customer/'.$row->parent_id.'', customer_full_name($row->parent_id).' (L-'.customer_any_cell($row->parent_id, 'reseller_level').')', $atts).'</td>'; } else { echo '<td align="left" style="font-weight:bold;">'.customer_full_name($row->parent_id).' (L-'.customer_any_cell($row->parent_id, 'reseller_level').')'.'</td>'; } } } ?> <td align="left" valign="middle"><?php echo $row->customer_company; ?></td> <td align="left" valign="middle"><?php echo $row->customer_contact_email; ?></td> <td align="left" valign="middle"><?php echo country_any_cell($row->customer_country, 'countryname'); ?></td> <td align="left" valign="middle"><?php echo $row->customer_phone; ?></td> <td align="left" valign="middle"><?php echo $row->customer_balance; ?></td> <?php if($this->session->userdata('user_type') == 'admin'){?> <td align="center"><input type="checkbox" id="<?php echo $row->customer_id;?>" class="enable_checkbox" <?php if($row->customer_enabled == 1){ echo 'checked="checked"';}?>/></td> <?php } else if($this->session->userdata('user_type') == 'sub_admin'){ if(sub_admin_access_any_cell($this->session->userdata('user_id'), 'enable_disable_customers') == 1) {