Commit graph

20 commits

Author SHA1 Message Date
dd917b31ef Fix warning "Use of uninitialized value $VERBOSE in numeric ge (>=) at scripts/rt-bulk-prep-pay.plx line 32". 2025-10-02 20:18:47 -04:00
Bradley M. Kuhn
b163e59f98 Correct regular expression. 2025-01-27 09:43:45 -08:00
Bradley M. Kuhn
68b4875a2b Output should be what is really running. 2025-01-27 09:43:23 -08:00
Bradley M. Kuhn
131966162a Do not assume all tickets returned by query are 'ready-for-payment'
Since this script allows the user to provide a query, that query may
or may not include tickets in it that are not in the
'ready-for-payment' state.  As such, add a check for that, and output
the status of any ticket in the detail list that is not actually
'ready-for-payment'.
2023-09-08 12:05:46 -07:00
Bradley M. Kuhn
7d24d42788 Change regex to handle currency conversation USD hint.
I found a ticket today with payment-amount set as:

   "CUR AMOUNT ($OTHER_AMOUNT)"

Since the field is free-from I figured I probably need to accept
this.
2020-09-15 11:25:08 -07:00
Bradley M. Kuhn
6c2d685116 Rework to handle new format of custom fields for payment methods. 2020-07-21 13:50:43 -07:00
Bradley M. Kuhn
8ac2663124 Improve totals and subtotals output amounts
Various changes that I did a while ago to better support totals and
subtotals output.
2020-06-22 10:18:30 -07:00
Bradley M. Kuhn
b5bb608067 Support --subTotals option for each payment method.
--subTotals implies --showAmounts, and when you use it, the ticket amounts
are grouped by payment type, and the subtotal for each payment type is
printed.

Note that I left some code duplication in the $subTotalOk / $overallTotalOk
support stuff.  It was just laziness.  There should be a sub that tests the
values for validity.
2020-04-09 09:52:04 -07:00
Bradley M. Kuhn
df7362f6b9 Show total amounts for the whole group and for each ticket. 2020-04-09 09:33:26 -07:00
Bradley M. Kuhn
01decbbd55 Make Query String a CLI option; leave defaults of interest. 2020-04-09 09:32:22 -07:00
Bradley M. Kuhn
90618aba6a print a message & exit when there are no tickets to do. 2018-08-23 13:53:32 -07:00
Bradley M. Kuhn
4b0cdad67e Debugging output and skip blank lines, with comment. 2018-08-23 13:53:13 -07:00
Bradley M. Kuhn
6b8f3fac77 payment method only unknown when not defined
Assure reassignment of variable only happens inside conditional.
2018-08-07 10:32:09 -07:00
Bradley M. Kuhn
56441180e4 warn rather than die when payment method not found.
We still want to pay ready-for-payment tickets that have no payment method
found.
2018-08-07 10:28:40 -07:00
Bradley M. Kuhn
5e0433d39b paymentMethod should be lower case. 2018-07-25 13:57:27 -07:00
Bradley M. Kuhn
c9c3b8b01e I forgot map returns the last item in its block.
I want what $_ became, not the "1" returned from the s/// :)
2018-07-25 09:49:50 -07:00
Bradley M. Kuhn
e11ceab5dd Do not be so strict on this regex. 2018-07-25 09:49:34 -07:00
Bradley M. Kuhn
2e8f9c42d1 Correct rt show output; add verbosity there.
Note that "rt show ticket/NUMBER" does not give the entire ticket traffic,
whereas "rt show NUMBER" does.
2018-07-25 09:44:19 -07:00
Bradley M. Kuhn
c1fdf916d9 Fix typo. 2018-07-25 09:44:14 -07:00
Bradley M. Kuhn
7ec2c7a291 First draft of the bulk-prep-pay script. 2018-07-25 09:40:30 -07:00