[freeside-commits] branch master updated. 29d80a8582103ead0b5910391cabc45cb85fa836

Ivan ivan at 420.am
Wed Nov 16 09:38:55 PST 2016


The branch, master has been updated
       via  29d80a8582103ead0b5910391cabc45cb85fa836 (commit)
      from  1f2021c9b76da7cc59e2a981fbac6b24312876d2 (commit)

Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.

- Log -----------------------------------------------------------------
commit 29d80a8582103ead0b5910391cabc45cb85fa836
Author: Ivan Kohler <ivan at freeside.biz>
Date:   Wed Nov 16 09:38:52 2016 -0800

    add -t flag to bulk void for payment type, RT#73413

diff --git a/bin/bulk_void b/bin/bulk_void
index b12b5a9..8f0c882 100755
--- a/bin/bulk_void
+++ b/bin/bulk_void
@@ -32,11 +32,12 @@ if (!$opt{start} or !$opt{end} or !$opt{r}) {
 
 print "DRY RUN--changes will not be committed.\n" unless $opt{X};
 
-my $date = " WHERE _date >= $opt{start} AND _date <= $opt{end}";
-
 my %search = ();
 $search{payby} = $opt{t} if $opt{t} && $opt{p};
 
+my $date = (keys %search ? ' AND ' : ' WHERE ').
+           " _date >= $opt{start} AND _date <= $opt{end}";
+
 my %tables = (
   c => 'cust_credit',
   p => 'cust_pay',

-----------------------------------------------------------------------

Summary of changes:
 bin/bulk_void |    5 +++--
 1 file changed, 3 insertions(+), 2 deletions(-)




More information about the freeside-commits mailing list