From b0e903717207ec87748e9095a266a7630cb0efc2 Mon Sep 17 00:00:00 2001 From: sunsetsystems Date: Mon, 20 Jun 2005 17:41:46 +0000 Subject: [PATCH] misc improvements --- interface/billing/sl_eob_invoice.php | 121 +++++++++++++++++++++++++++++------ interface/billing/sl_eob_search.php | 25 ++++++-- 2 files changed, 124 insertions(+), 22 deletions(-) diff --git a/interface/billing/sl_eob_invoice.php b/interface/billing/sl_eob_invoice.php index b9911a8ae..2306829af 100644 --- a/interface/billing/sl_eob_invoice.php +++ b/interface/billing/sl_eob_invoice.php @@ -355,6 +355,25 @@ EOB Posting - Invoice diff --git a/interface/billing/sl_eob_search.php b/interface/billing/sl_eob_search.php index b2d74c407..f9bdf5d9d 100644 --- a/interface/billing/sl_eob_search.php +++ b/interface/billing/sl_eob_search.php @@ -125,7 +125,7 @@ // Record something in ar.intnotes about this statement run. if ($intnotes) $intnotes .= "\n"; $intnotes = addslashes($intnotes . "Statement sent $today"); - if (! $DEBUG) { + if (! $DEBUG && ! $_POST['form_without']) { SLQuery("UPDATE ar SET intnotes = '$intnotes' WHERE id = " . $row['id']); if ($sl_err) die($sl_err); } @@ -137,7 +137,11 @@ $alertmsg = "Printing skipped; see test output in $STMT_TEMP_FILE"; } else { exec("$STMT_PRINT_CMD $STMT_TEMP_FILE"); - $alertmsg = "Now printing statements from $STMT_TEMP_FILE"; + if ($_POST['form_without']) { + $alertmsg = "Now printing statements; invoices will not be updated."; + } else { + $alertmsg = "Now printing statements and updating invoices."; + } } } ?> @@ -286,6 +290,9 @@ function npopup(pid) { Paid  + + Balance  + Prv @@ -303,8 +310,14 @@ function npopup(pid) { $where = ""; if ($form_name) { + // Allow the last name to be followed by a comma and some part of a first name. + if (preg_match('/^(.*\S)\s*,\s*(.*)/', $form_name, $matches)) { + $form_name = $matches[2] . '% ' . $matches[1] . '%'; + } else { + $form_name = "%$form_name%"; + } if ($where) $where .= " AND "; - $where .= "customer.name ILIKE '%$form_name%'"; + $where .= "customer.name ILIKE '$form_name'"; } if ($form_pid && $form_encounter) { @@ -421,6 +434,9 @@ function npopup(pid) {   + +   + @@ -439,7 +455,8 @@ function npopup(pid) {

    - +   + Without Update

-- 2.11.4.GIT