mirror of
https://github.com/itflow-org/itflow
synced 2026-03-16 10:44:50 +00:00
Cleanup Margins in Client and Vendor Reports as well as add currency
This commit is contained in:
@@ -26,8 +26,8 @@ $sql_vendors = mysqli_query($mysqli,"SELECT * FROM vendors WHERE company_id = $s
|
|||||||
<button type="button" class="btn btn-primary d-print-none" onclick="window.print();"><i class="fas fa-fw fa-print"></i> Print</button>
|
<button type="button" class="btn btn-primary d-print-none" onclick="window.print();"><i class="fas fa-fw fa-print"></i> Print</button>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="card-body p-0">
|
<div class="card-body">
|
||||||
<form class="p-3">
|
<form class="mb-3">
|
||||||
<select onchange="this.form.submit()" class="form-control" name="year">
|
<select onchange="this.form.submit()" class="form-control" name="year">
|
||||||
<?php
|
<?php
|
||||||
|
|
||||||
@@ -48,7 +48,7 @@ $sql_vendors = mysqli_query($mysqli,"SELECT * FROM vendors WHERE company_id = $s
|
|||||||
<thead>
|
<thead>
|
||||||
<tr>
|
<tr>
|
||||||
<th>Vendor</th>
|
<th>Vendor</th>
|
||||||
<th>Paid</th>
|
<th class="text-right">Paid</th>
|
||||||
</tr>
|
</tr>
|
||||||
</thead>
|
</thead>
|
||||||
<tbody>
|
<tbody>
|
||||||
@@ -60,7 +60,7 @@ $sql_vendors = mysqli_query($mysqli,"SELECT * FROM vendors WHERE company_id = $s
|
|||||||
$sql_amount_paid = mysqli_query($mysqli,"SELECT SUM(expense_amount) AS amount_paid FROM expenses WHERE YEAR(expense_date) = $year AND expense_vendor_id = $vendor_id");
|
$sql_amount_paid = mysqli_query($mysqli,"SELECT SUM(expense_amount) AS amount_paid FROM expenses WHERE YEAR(expense_date) = $year AND expense_vendor_id = $vendor_id");
|
||||||
$row = mysqli_fetch_array($sql_amount_paid);
|
$row = mysqli_fetch_array($sql_amount_paid);
|
||||||
|
|
||||||
$amount_paid = $row['amount_paid'];
|
$amount_paid = floatval($row['amount_paid']);
|
||||||
|
|
||||||
if($amount_paid > 599){
|
if($amount_paid > 599){
|
||||||
|
|
||||||
@@ -68,7 +68,7 @@ $sql_vendors = mysqli_query($mysqli,"SELECT * FROM vendors WHERE company_id = $s
|
|||||||
|
|
||||||
<tr>
|
<tr>
|
||||||
<td><?php echo $vendor_name; ?></td>
|
<td><?php echo $vendor_name; ?></td>
|
||||||
<td><?php echo $amount_paid; ?></td>
|
<td class="text-right"><?php echo numfmt_format_currency($currency_format, $amount_paid, $session_company_currency); ?></td>
|
||||||
</tr>
|
</tr>
|
||||||
<?php
|
<?php
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -26,8 +26,8 @@ $sql_clients = mysqli_query($mysqli,"SELECT * FROM clients WHERE company_id = $s
|
|||||||
<button type="button" class="btn btn-primary d-print-none" onclick="window.print();"><i class="fas fa-fw fa-print"></i> Print</button>
|
<button type="button" class="btn btn-primary d-print-none" onclick="window.print();"><i class="fas fa-fw fa-print"></i> Print</button>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="card-body p-0">
|
<div class="card-body">
|
||||||
<form class="p-3">
|
<form class="mb-3">
|
||||||
<select onchange="this.form.submit()" class="form-control" name="year">
|
<select onchange="this.form.submit()" class="form-control" name="year">
|
||||||
<?php
|
<?php
|
||||||
|
|
||||||
@@ -48,7 +48,7 @@ $sql_clients = mysqli_query($mysqli,"SELECT * FROM clients WHERE company_id = $s
|
|||||||
<thead>
|
<thead>
|
||||||
<tr>
|
<tr>
|
||||||
<th>Client</th>
|
<th>Client</th>
|
||||||
<th>Paid</th>
|
<th class="text-right">Paid</th>
|
||||||
</tr>
|
</tr>
|
||||||
</thead>
|
</thead>
|
||||||
<tbody>
|
<tbody>
|
||||||
@@ -60,7 +60,7 @@ $sql_clients = mysqli_query($mysqli,"SELECT * FROM clients WHERE company_id = $s
|
|||||||
$sql_amount_paid = mysqli_query($mysqli,"SELECT SUM(payment_amount) AS amount_paid FROM payments, invoices WHERE payment_invoice_id = invoice_id AND YEAR(payment_date) = $year AND invoice_client_id = $client_id");
|
$sql_amount_paid = mysqli_query($mysqli,"SELECT SUM(payment_amount) AS amount_paid FROM payments, invoices WHERE payment_invoice_id = invoice_id AND YEAR(payment_date) = $year AND invoice_client_id = $client_id");
|
||||||
$row = mysqli_fetch_array($sql_amount_paid);
|
$row = mysqli_fetch_array($sql_amount_paid);
|
||||||
|
|
||||||
$amount_paid = $row['amount_paid'];
|
$amount_paid = floatval($row['amount_paid']);
|
||||||
|
|
||||||
if($amount_paid > 599){
|
if($amount_paid > 599){
|
||||||
|
|
||||||
@@ -68,7 +68,7 @@ $sql_clients = mysqli_query($mysqli,"SELECT * FROM clients WHERE company_id = $s
|
|||||||
|
|
||||||
<tr>
|
<tr>
|
||||||
<td><?php echo $client_name; ?></td>
|
<td><?php echo $client_name; ?></td>
|
||||||
<td><?php echo $amount_paid; ?></td>
|
<td class="text-right"><?php echo numfmt_format_currency($currency_format, $amount_paid, $session_company_currency); ?></td>
|
||||||
</tr>
|
</tr>
|
||||||
<?php
|
<?php
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user