[freeside-commits] branch master updated. 912cbcaf930f41cd6a087ea4bcc581aad035dd41

Ivan ivan at 420.am
Fri Jun 10 14:21:42 PDT 2016


The branch, master has been updated
       via  912cbcaf930f41cd6a087ea4bcc581aad035dd41 (commit)
       via  87637af22ca494f84fb76cbf7591da6a7296ed76 (commit)
      from  c66b912fd7f13f5fb0f2cc433f22b78d3ec5b56b (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 912cbcaf930f41cd6a087ea4bcc581aad035dd41
Merge: 87637af c66b912
Author: Ivan Kohler <ivan at freeside.biz>
Date:   Fri Jun 10 14:21:38 2016 -0700

    Merge branch 'master' of git.freeside.biz:/home/git/freeside


commit 87637af22ca494f84fb76cbf7591da6a7296ed76
Author: Ivan Kohler <ivan at freeside.biz>
Date:   Fri Jun 10 14:21:31 2016 -0700

    quick payment deletion script, RT#71249

diff --git a/bin/cust_pay-delete b/bin/cust_pay-delete
new file mode 100644
index 0000000..e266d0d
--- /dev/null
+++ b/bin/cust_pay-delete
@@ -0,0 +1,33 @@
+#!/usr/bin/perl
+
+use FS::UID qw( adminsuidsetup );
+use FS::Record qw( qsearch );
+use FS::cust_pay;
+
+adminsuidsetup shift or die usage();
+
+my $custnum = shift or die usage();
+
+my $paid = shift or die usage();
+
+my $min_paynum = shift or die usage();
+
+my @cust_pay = qsearch({
+  'table'   => 'cust_pay',
+  'hashref' => { 'custnum' => $custnum,
+                 'paid'    => $paid,
+                 'paynum'  => { op=>'>=', value=>$min_paynum, },
+                 'payinfo' => '',
+               },
+});
+
+die "Delete ". scalar(@cust_pay). " payments?\n";
+
+#foreach my $cust_pay (@cust_pay) {
+#  my $error = $cust_pay->delete;
+#  die $error if $error;
+#}
+
+sub usage {
+  "Usage: cust_pay delete username custnum paid min_paynum\n";
+}

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

Summary of changes:
 bin/cust_pay-delete |   33 +++++++++++++++++++++++++++++++++
 1 file changed, 33 insertions(+)
 create mode 100644 bin/cust_pay-delete




More information about the freeside-commits mailing list