Esempio n. 1
0
 function print_tree($inventory_tree)
 {
     self::$counter++;
     foreach ($inventory_tree as $row) {
         if ($row['id'] != 0) {
             echo "<tr class=\"tr-group\">";
             echo "<td>" . self::print_spaces(self::$counter) . $row['name'] . "</td>";
             echo "<td>Group</td>";
             echo "<td>-</td>";
             echo "<td>-</td>";
             echo "<td>-</td>";
             echo "<td>-</td>";
             echo "<td class=\"td-actions\">" . anchor('inventory/group/edit/' . $row['id'], "Edit", array('title' => 'Edit Inventory Group', 'class' => 'red-link'));
             echo " &nbsp;" . anchor('inventory/group/delete/' . $row['id'], img(array('src' => asset_url() . "images/icons/delete.png", 'border' => '0', 'alt' => 'Delete Inventory Group')), array('class' => "confirmClick", 'title' => "Delete Inventory Group")) . "</td>";
             echo "</tr>";
         }
         if ($row['sub_inventory_items']) {
             self::$counter++;
             foreach ($row['sub_inventory_items'] as $row_item) {
                 echo "<tr>";
                 echo "<td>" . self::print_spaces(self::$counter) . $row_item['name'] . "</td>";
                 echo "<td>Item</td>";
                 echo "<td>" . $row_item['op_balance_quantity'] . "</td>";
                 echo "<td>" . convert_amount_dc($row_item['op_balance_total_value']) . "</td>";
                 echo "<td>" . $row_item['cl_balance_quantity'] . "</td>";
                 echo "<td>" . convert_amount_dc($row_item['cl_balance_total_value']) . "</td>";
                 echo "<td class=\"td-actions\">" . anchor('inventory/item/edit/' . $row_item['id'], "Edit", array('title' => 'Edit Inventory Item', 'class' => 'red-link'));
                 echo " &nbsp;" . anchor('inventory/item/delete/' . $row_item['id'], img(array('src' => asset_url() . "images/icons/delete.png", 'border' => '0', 'alt' => 'Delete Inventory Item')), array('class' => "confirmClick", 'title' => "Delete Inventory Item")) . "</td>";
                 echo "</tr>";
             }
             self::$counter--;
         }
         if ($row['sub_inventory_groups']) {
             foreach ($row['sub_inventory_groups'] as $row_item) {
                 self::print_tree($row_item);
             }
         }
     }
     self::$counter--;
 }
Esempio n. 2
0
 } else {
     $reconciliation_cr_total = 0;
 }
 $reconciliation_total = $reconciliation_dr_total - $reconciliation_cr_total;
 $reconciliation_pending = $clbalance - $reconciliation_total;
 /* Ledger and Reconciliation Summary */
 echo "<table class=\"reconciliation-summary\">";
 echo "<tr>";
 echo "<td><b>Opening Balance</b></td><td>" . convert_opening($opbalance, $optype) . "</td>";
 echo "<td width=\"20px\"></td>";
 echo "<td><b>Reconciliation Pending</b></td><td>" . convert_amount_dc($reconciliation_pending) . "</td>";
 echo "</tr>";
 echo "<tr>";
 echo "<td><b>Closing Balance</b></td><td>" . convert_amount_dc($clbalance) . "</td>";
 echo "<td width=\"20px\"></td>";
 echo "<td><b>Reconciliation Total</b></td><td>" . convert_amount_dc($reconciliation_total) . "</td>";
 echo "</tr>";
 echo "</table>";
 echo "<br />";
 if (!$print_preview) {
     $this->db->select('entries.id as entries_id, entries.number as entries_number, entries.date as entries_date, entries.narration as entries_narration, entries.entry_type as entries_entry_type, entry_items.id as entry_items_id, entry_items.amount as entry_items_amount, entry_items.dc as entry_items_dc, entry_items.reconciliation_date as entry_items_reconciliation_date');
     if ($reconciliation_type == 'all') {
         $this->db->from('entries')->join('entry_items', 'entries.id = entry_items.entry_id')->where('entry_items.ledger_id', $ledger_id)->order_by('entries.date', 'asc')->order_by('entries.number', 'asc')->limit($pagination_counter, $page_count);
     } else {
         $this->db->from('entries')->join('entry_items', 'entries.id = entry_items.entry_id')->where('entry_items.ledger_id', $ledger_id)->where('entry_items.reconciliation_date', NULL)->order_by('entries.date', 'asc')->order_by('entries.number', 'asc')->limit($pagination_counter, $page_count);
     }
     $ledgerst_q = $this->db->get();
 } else {
     $page_count = 0;
     $this->db->select('entries.id as entries_id, entries.number as entries_number, entries.date as entries_date, entries.narration as entries_narration, entries.entry_type as entries_entry_type, entry_items.id as entry_items_id, entry_items.amount as entry_items_amount, entry_items.dc as entry_items_dc, entry_items.reconciliation_date as entry_items_reconciliation_date');
     if ($reconciliation_type == 'all') {
Esempio n. 3
0
$odd_even = "odd";
foreach ($all_ledgers as $ledger_id => $ledger_name) {
    if ($ledger_id == 0) {
        continue;
    }
    echo "<tr class=\"tr-" . $odd_even . "\">";
    echo "<td>";
    echo anchor('report/ledgerst/' . $ledger_id, $ledger_name, array('title' => $ledger_name . ' Ledger Statement', 'class' => 'anchor-link-a'));
    echo "</td>";
    echo "<td>";
    list($opbal_amount, $opbal_type) = $this->Ledger_model->get_op_balance($ledger_id);
    echo convert_opening($opbal_amount, $opbal_type);
    echo "</td>";
    echo "<td>";
    $clbal_amount = $this->Ledger_model->get_ledger_balance($ledger_id);
    echo convert_amount_dc($clbal_amount);
    echo "</td>";
    echo "<td>";
    $dr_total = $this->Ledger_model->get_dr_total($ledger_id);
    if ($dr_total) {
        echo $dr_total;
        $temp_dr_total += $dr_total;
    } else {
        echo "0";
    }
    echo "</td>";
    echo "<td>";
    $cr_total = $this->Ledger_model->get_cr_total($ledger_id);
    if ($cr_total) {
        echo $cr_total;
        $temp_cr_total += $cr_total;
Esempio n. 4
0
 function print_tree($account_tree)
 {
     self::$counter++;
     foreach ($account_tree as $row) {
         if ($row['id'] > 0) {
             echo "<tr class=\"tr-group\">";
             if ($row['id'] <= 4) {
                 echo "<td><strong>" . self::print_spaces(self::$counter) . $row['name'] . "</strong></td>";
                 echo "<td>Group</td>";
                 echo "<td>-</td>";
                 echo "<td>-</td>";
                 echo "<td class=\"td-actions\">";
                 echo "</td>";
                 echo "</tr>";
             } else {
                 echo "<td>" . self::print_spaces(self::$counter) . $row['name'] . "</td>";
                 echo "<td>Group</td>";
                 echo "<td>-</td>";
                 echo "<td>-</td>";
                 echo "<td class=\"td-actions\">" . anchor('group/edit/' . $row['id'], "Edit", array('title' => 'Edit Group', 'class' => 'red-link'));
                 echo " &nbsp;" . anchor('group/delete/' . $row['id'], img(array('src' => asset_url() . "images/icons/delete.png", 'border' => '0', 'alt' => 'Delete Group')), array('class' => "confirmClick", 'title' => "Delete Group")) . "</td>";
                 echo "</tr>";
             }
         }
         if ($row['sub_ledgers']) {
             self::$counter++;
             foreach ($row['sub_ledgers'] as $row_item) {
                 echo "<tr>";
                 echo "<td>" . self::print_spaces(self::$counter) . $row_item['name'] . "</td>";
                 echo "<td>Ledger</td>";
                 echo "<td>" . convert_opening($row_item['op_balance'], $row_item['op_balance_dc']) . "</td>";
                 echo "<td>" . convert_amount_dc($row_item['cl_balance']) . "</td>";
                 echo "<td class=\"td-actions\">" . anchor('ledger/edit/' . $row_item['id'], "Edit", array('title' => 'Edit Ledger', 'class' => 'red-link'));
                 echo " &nbsp;" . anchor('ledger/delete/' . $row_item['id'], img(array('src' => asset_url() . "images/icons/delete.png", 'border' => '0', 'alt' => 'Delete Ledger')), array('class' => "confirmClick", 'title' => "Delete Ledger")) . "</td>";
                 echo "</tr>";
             }
             self::$counter--;
         }
         if ($row['sub_groups']) {
             foreach ($row['sub_groups'] as $row_item) {
                 self::print_tree($row_item);
             }
         }
     }
     self::$counter--;
 }
Esempio n. 5
0
} else {
    echo "You have not created any bank or cash account";
}
?>
		</div>
	</div>
	<div id="dashboard-summary" class="dashboard-item">
		<div class="dashboard-title">Account Summary</div>
		<div class="dashboard-content">
			<?php 
echo "<table class=\"dashboard-summary-table\">";
echo "<tbody>";
echo "<tr><td>Assets Total</td><td>" . convert_amount_dc($asset_total) . "</td></tr>";
echo "<tr><td>Liabilities Total</td><td>" . convert_amount_dc($liability_total) . "</td></tr>";
echo "<tr><td>Incomes Total</td><td>" . convert_amount_dc($income_total) . "</td></tr>";
echo "<tr><td>Expenses Total</td><td>" . convert_amount_dc($expense_total) . "</td></tr>";
echo "</tbody>";
echo "</table>";
?>
		</div>
	</div>
</div>
<?php 
if (check_access('view log')) {
    ?>
	<div id="dashboard-log">
		<div id="dashboard-recent-log" class="dashboard-log-item">
			<div class="dashboard-log-title">Recent Activity</div>
			<div class="dashboard-log-content">
				<?php 
    if ($logs) {
Esempio n. 6
0
}
?>
<tr class="entry-total"><td colspan=2><strong>Total</strong></td><td id=dr-total>Dr <?php 
echo $cur_entry->dr_total;
?>
</td><td id=cr-total">Cr <?php 
echo $cur_entry->cr_total;
?>
</td></tr>
<?php 
if (float_ops($cur_entry->dr_total, $cur_entry->cr_total, '!=')) {
    $difference = float_ops($cur_entry->dr_total, $cur_entry->cr_total, '-');
    if (float_ops($difference, 0, '<')) {
        echo "<tr class=\"entry-difference\"><td colspan=2><strong>Difference</strong></td><td id=\"dr-diff\"></td><td id=\"cr-diff\">" . convert_amount_dc($difference) . "</td></tr>";
    } else {
        echo "<tr class=\"entry-difference\"><td colspan=2><strong>Difference</strong></td><td id=\"dr-diff\">" . convert_amount_dc($difference) . "</td><td id=\"cr-diff\"></td></tr>";
    }
}
?>
</table>
<p>Narration :<br />
<span class="bold"><?php 
echo $cur_entry->narration;
?>
</span>
</p>
<p>
Tag : 
<?php 
$cur_entry_tag = $this->Tag_model->show_entry_tag($cur_entry->tag_id);
if ($cur_entry_tag == "") {
 function account_st_main($c = 0)
 {
     $this->counter = $c;
     if ($this->id != 0) {
         echo "<tr class=\"tr-group\">";
         echo "<td class=\"td-group\">";
         echo $this->print_space($this->counter);
         if ($this->id <= 4) {
             echo "&nbsp;<strong>" . $this->name . "</strong>";
         } else {
             echo "&nbsp;" . $this->name;
         }
         echo "</td>";
         echo "<td>Group Account</td>";
         echo "<td>-</td>";
         echo "<td>-</td>";
         if ($this->id <= 4) {
             echo "<td class=\"td-actions\"></tr>";
         } else {
             echo "<td class=\"td-actions\">" . anchor('group/edit/' . $this->id, "Edit", array('title' => 'Edit Group', 'class' => 'red-link'));
             echo " &nbsp;" . anchor('group/delete/' . $this->id, img(array('src' => asset_url() . "images/icons/delete.png", 'border' => '0', 'alt' => 'Delete group')), array('class' => "confirmClick", 'title' => "Delete Group")) . "</td>";
         }
         echo "</tr>";
     }
     foreach ($this->children_groups as $id => $data) {
         $this->counter++;
         $data->account_st_main($this->counter);
         $this->counter--;
     }
     if (count($this->children_ledgers) > 0) {
         $this->counter++;
         foreach ($this->children_ledgers as $id => $data) {
             echo "<tr class=\"tr-ledger\">";
             echo "<td class=\"td-ledger\">";
             echo $this->print_space($this->counter);
             echo "&nbsp;" . anchor('report/ledgerst/' . $data['id'], $data['name'], array('title' => $data['name'] . ' Ledger Statement', 'style' => 'color:#000000'));
             echo "</td>";
             echo "<td>Ledger Account</td>";
             echo "<td>" . convert_opening($data['opbalance'], $data['optype']) . "</td>";
             echo "<td>" . convert_amount_dc($data['total']) . "</td>";
             echo "<td class=\"td-actions\">" . anchor('ledger/edit/' . $data['id'], 'Edit', array('title' => "Edit Ledger", 'class' => 'red-link'));
             echo " &nbsp;" . anchor('ledger/delete/' . $data['id'], img(array('src' => asset_url() . "images/icons/delete.png", 'border' => '0', 'alt' => 'Delete Ledger')), array('class' => "confirmClick", 'title' => "Delete Ledger")) . "</td>";
             echo "</tr>";
         }
         $this->counter--;
     }
 }
Esempio n. 8
0
            echo " ";
            echo $row->entry_items_amount;
            echo "</td>";
            echo "<td></td>";
        } else {
            $cur_balance = float_ops($cur_balance, $row->entry_items_amount, '-');
            echo "<td></td>";
            echo "<td>";
            echo convert_dc($row->entry_items_dc);
            echo " ";
            echo $row->entry_items_amount;
            echo "</td>";
        }
        echo "<td>";
        echo convert_amount_dc($cur_balance);
        echo "</td>";
        echo "</tr>";
        $odd_even = $odd_even == "odd" ? "even" : "odd";
    }
    /* Current Page Closing Balance */
    echo "<tr class=\"tr-balance\"><td colspan=6>Closing</td><td>" . convert_amount_dc($cur_balance) . "</td></tr>";
    echo "</table>";
}
if (!$print_preview) {
    ?>
<div id="pagination-container"><?php 
    echo $this->pagination->create_links();
    ?>
</div>
<?php 
}
Esempio n. 9
0
?>
</h2></div>
                	<div class="bottomTitle">This year payable</div>
                </td>
            	<td class="orange_bg">
                	<div class="topTitle">RECEIVABLE</div>
                	<div class="middleCounter"><h2><?php 
echo convert_amount_dc($recievables_total);
?>
</h2></div>
                	<div class="bottomTitle">This year payable</div>
                </td>
            	<td class="red_bg">
                	<div class="topTitle">SALE</div>
                	<div class="middleCounter"><h2><?php 
echo convert_amount_dc($sales_total);
?>
</h2></div>
                	<div class="bottomTitle">This year payable</div>
                </td>
            </tr>
        </table>
			</div>
		</div>
        </div>

<div id="dashboard-log">
		<div id="dashboard-recent-log" class="dashboard-log-item">
			<div class="dashboard-log-title">Today Cashier Sales</div>
			<div class="dashboard-log-content">
				 <section class="sales_graph">