diff --git a/add_asset_modal.php b/add_asset_modal.php index 19ba0121..39bb62aa 100644 --- a/add_asset_modal.php +++ b/add_asset_modal.php @@ -167,7 +167,7 @@
- + diff --git a/add_client_modal.php b/add_client_modal.php index d83dc61d..0b48a1f7 100644 --- a/add_client_modal.php +++ b/add_client_modal.php @@ -107,7 +107,7 @@ -
+
@@ -125,7 +125,7 @@
- +
diff --git a/add_network_modal.php b/add_network_modal.php index e23bacc2..01d31ac8 100644 --- a/add_network_modal.php +++ b/add_network_modal.php @@ -36,7 +36,7 @@
- +
diff --git a/calendar_events.php b/calendar_events.php index ae45a910..e1f0fb7f 100644 --- a/calendar_events.php +++ b/calendar_events.php @@ -8,7 +8,9 @@ if(isset($_GET['calendar_id'])){ ?> -
+
+
+
diff --git a/client_side_nav.php b/client_side_nav.php index aa40cd58..ee4daec4 100644 --- a/client_side_nav.php +++ b/client_side_nav.php @@ -1,246 +1,231 @@ - + + \ No newline at end of file diff --git a/clients.php b/clients.php index 59c77772..dcc6ebfd 100644 --- a/clients.php +++ b/clients.php @@ -45,12 +45,25 @@ $num_rows = mysqli_fetch_row(mysqli_query($mysqli,"SELECT FOUND_ROWS()")); ?> -
-
- -
Clients
- - +
+
+

Simple Full Width Table

+ +
+ +
+
+
+

Clients

+
+ +
diff --git a/clients_new.php b/clients_new.php new file mode 100644 index 00000000..c28b11dd --- /dev/null +++ b/clients_new.php @@ -0,0 +1,191 @@ + $sb, 'o' => $o))); + +if(isset($_GET['p'])){ + $p = intval($_GET['p']); + $record_from = (($p)-1)*10; + $record_to = 10; +}else{ + $record_from = 0; + $record_to = 10; + $p = 1; +} + +if(isset($_GET['q'])){ + $q = mysqli_real_escape_string($mysqli,$_GET['q']); +}else{ + $q = ""; +} + +if(!empty($_GET['sb'])){ + $sb = mysqli_real_escape_string($mysqli,$_GET['sb']); +}else{ + $sb = "client_id"; +} + +if(isset($_GET['o'])){ + if($_GET['o'] == 'ASC'){ + $o = "ASC"; + $disp = "DESC"; + }else{ + $o = "DESC"; + $disp = "ASC"; + } +}else{ + $o = "DESC"; + $disp = "ASC"; +} + +$sql = mysqli_query($mysqli,"SELECT SQL_CALC_FOUND_ROWS * FROM clients WHERE (client_name LIKE '%$q%' OR client_email LIKE '%$q%' OR client_contact LIKE '%$q%') AND company_id = $session_company_id ORDER BY $sb $o LIMIT $record_from, $record_to"); + +$num_rows = mysqli_fetch_row(mysqli_query($mysqli,"SELECT FOUND_ROWS()")); + +?> + +
+
+ +
Clients
+ + +
+
+ +
+ +
+ +
+
+ +
+
+ + "> + + + + + + + + + + 2){ + $client_phone = substr($row['client_phone'],0,3)."-".substr($row['client_phone'],3,3)."-".substr($row['client_phone'],6,4); + } + $client_mobile = $row['client_mobile']; + if(strlen($client_mobile)>2){ + $client_mobile = substr($row['client_mobile'],0,3)."-".substr($row['client_mobile'],3,3)."-".substr($row['client_mobile'],6,4); + } + $client_email = $row['client_email']; + $client_website = $row['client_website']; + $client_net_terms = $row['client_net_terms']; + $client_hours = $row['client_hours']; + + //Add up all the payments for the invoice and get the total amount paid to the invoice + $sql_invoice_amounts = mysqli_query($mysqli,"SELECT SUM(invoice_amount) AS invoice_amounts FROM invoices WHERE client_id = $client_id AND invoice_status NOT LIKE 'Draft' AND invoice_status NOT LIKE 'Cancelled' "); + $row = mysqli_fetch_array($sql_invoice_amounts); + + $invoice_amounts = $row['invoice_amounts']; + + $sql_amount_paid = mysqli_query($mysqli,"SELECT SUM(payment_amount) AS amount_paid FROM payments, invoices WHERE payments.invoice_id = invoices.invoice_id AND invoices.client_id = $client_id"); + $row = mysqli_fetch_array($sql_amount_paid); + + $amount_paid = $row['amount_paid']; + + $balance = $invoice_amounts - $amount_paid; + //set Text color on balance + if($balance > 0){ + $balance_text_color = "text-danger font-weight-bold"; + }else{ + $balance_text_color = ""; + } + + ?> + + + + + + + + + + + +
Name ">Type ContactBalanceAction
+ + +
+ + + +
+ + + +
+ + + + +
$ + + + + +
+ + + +
+
+
+ + + +
@@ -92,38 +97,77 @@ $clients_added = $row['clients_added'];
-
-
-
-
- -
-
Total Incomes

$

+
+ +
+
+

$

+

Total Incomes


- Recievables: $ + Recievables: $ +
+
+
-
-
-
-
- -
-
Total Expenses

$

-
-
-
-
-
-
-
- -
-
Total Profit

$

+ + +
+ +
+
+

$

+

Total Expenses

+
+
+
-
+
+ + +
+ +
+
+

$

+

Profit

+
+
+ +
+
+
+ + +
+ +
+
+

+

Miles Driven

+
+
+ +
+
+
+ + +
+ +
+
+

+

New Clients

+
+
+ +
+
+
+
@@ -294,24 +338,6 @@ $clients_added = $row['clients_added'];
-
-
-
-
- Fun Stats -
-
-
    -
  • Miles Driven:
  • -
  • Clients Added:
  • -
-
-
-
-
- - - + + + + + + + + + + + + + + + + + - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - \ No newline at end of file + + \ No newline at end of file diff --git a/guest_footer.php b/guest_footer.php index 782c8b0d..d58ce8f2 100644 --- a/guest_footer.php +++ b/guest_footer.php @@ -1,30 +1,27 @@ +
- - +
-
- + - - - - - - - - - - - - - - + + + + + + + + + > + + + + - - + \ No newline at end of file diff --git a/guest_header.php b/guest_header.php index 6f6f27f6..ff281c6f 100644 --- a/guest_header.php +++ b/guest_header.php @@ -1,38 +1,44 @@ + - - - - - - + + - <?php echo $company_name; ?> + <?php echo $config_app_name; ?> - - - - - + + + + + + - - + + + + + - - - -
+ +
-
- -
\ No newline at end of file + +
+ + +
+
\ No newline at end of file diff --git a/guest_view_invoice.php b/guest_view_invoice.php index 955b4bab..16c1436a 100644 --- a/guest_view_invoice.php +++ b/guest_view_invoice.php @@ -107,9 +107,9 @@ if(isset($_GET['invoice_id'], $_GET['url_key'])){ } ?> - -
-
+ +
+
Print Download @@ -120,158 +120,157 @@ if(isset($_GET['invoice_id'], $_GET['url_key'])){
-
- -
- -
-
- -
-
-

Invoice

-
-
-
-
-
    -
  • -
  • -
  • -
  • P:
  • -
  • -
- -
-
- -
    -
  • -
  • -
  • -
  • P:
  • -
  • E:
  • -
- -
-
-
-
-
-
- - - - - - - - - -
Invoice Date
Due Date
-
-
- - - -
-
-
- - - - - - - - - - - - - - - - - - - - - - - - - - -
ProductDescriptionQtyPriceTaxTotal
$$$
-
-
-
- -
-
-
-
-
+
+
+
+ +
+
+

Invoice

-
-
- - - - - - - 0){ ?> - - - - - - 0){ ?> - - - - - - 0){ ?> - - - - - - - - - - -
Subtotal$
Discount$
Tax$
Paid to Date
$
Balance Due$
+
+
+
    +
  • +
  • +
  • +
  • P:
  • +
  • +
+ +
+
+ +
    +
  • +
  • +
  • +
  • P:
  • +
  • E:
  • +
+ +
+
+
+
+
+
+ + + + + + + + + +
Invoice Date
Due Date
+
+
+ + + +
+
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + +
ProductDescriptionQtyPriceTaxTotal
$$$
+
+
+
+ +
+
+
+
+
+
+
+
+
+ + + + + + + 0){ ?> + + + + + + 0){ ?> + + + + + + 0){ ?> + + + + + + + + + + +
Subtotal$
Discount$
Tax$
Paid to Date
$
Balance Due$
+
+
+ +
+ +
-
- -
- -
-
+
+ +
Print Download @@ -101,152 +102,152 @@ if(isset($_GET['quote_id'], $_GET['url_key'])){
-
+
-
- -
-
- -
-
-

Quote

-
-
- -
- -
-
    -
  • -
  • -
  • -
  • P:
  • -
  • -
- -
- -
- -
    -
  • -
  • -
  • -
  • P:
  • -
  • E:
  • -
- -
-
-
-
-
-
- - - - - -
Quote Date
-
-
- - - -
-
-
- - - - - - - - - - - - - - - - - - - - - - - - - - -
ProductDescriptionQtyPriceTaxTotal
$$$
-
-
-
- -
-
-
-
-
+
+
+ +
+
+

Quote

-
-
- - - - - - - 0){ ?> - - - - - - 0){ ?> - - - - - - - - - - -
Subtotal$
Discount$
Tax$
Total$
+
+ +
+
    +
  • +
  • +
  • +
  • P:
  • +
  • +
+ +
+ +
+ +
    +
  • +
  • +
  • +
  • P:
  • +
  • E:
  • +
+ +
+
+
+
+
+
+ + + + + +
Quote Date
+
+
+ + + +
+
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + +
ProductDescriptionQtyPriceTaxTotal
$$$
+
+
+
+ +
+
+
+
+
+
+
+
+ +
+ + + + + + + 0){ ?> + + + + + + 0){ ?> + + + + + + + + + + +
Subtotal$
Discount$
Tax$
Total$
+
+
+ +
+ +
-
- -
- - + - - - - - - + + <?php echo $config_app_name; ?> - - - - - - - - - + + + + + + - - - - - - - - - - + + + + + + + + + + +
+ - - - - -
- -
+ +
+ + +
+
+ + +
+ + +
+ + $_SESSION['alert_type'] = ''; + $_SESSION['alert_message'] = ''; - -
- - -
- \ No newline at end of file + ?> \ No newline at end of file diff --git a/invoice.php b/invoice.php index 8f9f8a88..95d0c475 100644 --- a/invoice.php +++ b/invoice.php @@ -87,7 +87,6 @@ if(isset($_GET['invoice_id'])){ - @@ -95,204 +94,216 @@ if(isset($_GET['invoice_id'])){ -
-
- -
-
-