1 <BR><BR><A NAME="history"><FONT SIZE="+2">Payment History</FONT></A><BR>
4 % if ( $payby{'BILL'} && $curuser->access_right('Post payment') ) {
5 <% $s++ ? ' | ' : '' %>
6 <A HREF="javascript:void(0);" onClick="overlib( OLiframeContent('<% $p %>edit/cust_pay.cgi?popup=1;payby=BILL;custnum=<% $custnum %>', 392, 336, 'cust_pay_popup' ), CAPTION, 'Enter check payment', STICKY, AUTOSTATUSCAP, MIDX, 0, MIDY, 0, DRAGGABLE, CLOSECLICK ); return false;">Enter check payment</A>
9 % if ( $payby{'CASH'} && $curuser->access_right('Post payment') ) {
10 <% $s++ ? ' | ' : '' %>
11 <A HREF="javascript:void(0);" onClick="overlib( OLiframeContent('<% $p %>edit/cust_pay.cgi?popup=1;payby=CASH;custnum=<% $custnum %>', 392, 336, 'cust_pay_popup' ), CAPTION, 'Enter cash payment', STICKY, AUTOSTATUSCAP, MIDX, 0, MIDY, 0, DRAGGABLE, CLOSECLICK ); return false;">Enter cash payment</A>
14 % if ( $payby{'WEST'} && $curuser->access_right('Post payment') ) {
15 <% $s++ ? ' | ' : '' %>
16 <A HREF="<% $p %>edit/cust_pay.cgi?payby=WEST;custnum=<% $custnum %>">Enter Western Union payment</A>
19 % if ( ( $payby{'CARD'} || $payby{'DCRD'} )
20 % && $curuser->access_right('Process payment')
21 % && ! $cust_main->is_encrypted($cust_main->payinfo)
23 <% $s++ ? ' | ' : '' %>
24 <A HREF="<% $p %>misc/payment.cgi?payby=CARD;custnum=<% $custnum %>">Process credit card payment</A>
27 % if ( ( $payby{'CHEK'} || $payby{'DCHK'} )
28 % && $curuser->access_right('Process payment')
29 % && ! $cust_main->is_encrypted($cust_main->payinfo)
31 <% $s++ ? ' | ' : '' %>
32 <A HREF="<% $p %>misc/payment.cgi?payby=CHEK;custnum=<% $custnum %>">Process electronic check (ACH) payment</A>
35 % if ( $payby{'MCRD'} && $curuser->access_right('Post payment') ) {
36 <% $s++ ? ' | ' : '' %>
37 <A HREF="<% $p %>edit/cust_pay.cgi?payby=MCRD;custnum=<% $custnum %>">Post manual (offline) credit card payment</A>
42 % if ( $curuser->access_right('Post credit') ) {
43 <A HREF="javascript:void(0);" onClick="overlib( OLiframeContent('<% $p %>edit/cust_credit.cgi?<% $custnum %>', 392, 336, 'cust_credit_popup' ), CAPTION, 'Enter credit', STICKY, AUTOSTATUSCAP, MIDX, 0, MIDY, 0, DRAGGABLE, CLOSECLICK ); return false;">Enter credit</A>
47 % if ( $curuser->access_right('View customer tax exemptions') ) {
48 <A HREF="<% $p %>search/cust_tax_exempt_pkg.cgi?custnum=<% $custnum %>">View tax exemptions</A>
52 % if ( $conf->exists('batch-enable')
53 % && $curuser->access_right('View customer batched payments')
55 View batched payments:
56 % foreach my $status (qw( Queued In-transit Complete All )) {
57 <A HREF="<% $p %>search/cust_pay_batch.cgi?status=<% $status{$status} %>;custnum=<% $custnum %>"><% $status %></A>
58 <% $status ne 'All' ? '|' : '' %>
67 %foreach my $cust_bill ($cust_main->cust_bill) {
68 % my $pre = ( $cust_bill->owed > 0 )
69 % ? '<B><FONT SIZE="+1" COLOR="#FF0000">Open '
71 % my $post = ( $cust_bill->owed > 0 ) ? '</FONT></B>' : '';
72 % my $invnum = $cust_bill->invnum;
73 % my $link = $curuser->access_right('View invoices')
74 % ? qq!<A HREF="${p}view/cust_bill.cgi?$invnum">!
77 % if ( $cust_bill->num_cust_event
78 % && ( $curuser->access_right('Billing event reports')
79 % || $curuser->access_right('View customer billing events')
83 % qq!<BR><FONT SIZE="-1"><A HREF="${p}search/cust_event.html?invnum=!.
84 % $cust_bill->invnum. '">( View invoice events )</A></FONT>';
87 % 'date' => $cust_bill->_date,
88 % 'desc' => $link. $pre.
89 % "Invoice #$invnum (Balance \$". $cust_bill->owed. ')'.
90 % $post. ( $link ? '</A>' : '' ). $events,
91 % 'charge' => $cust_bill->charged,
95 %#payments (some false laziness w/credits)
96 %foreach my $cust_pay ($cust_main->cust_pay) {
98 % my $payby = $cust_pay->payby;
101 % if ( $payby eq 'CARD' ) {
102 % $payinfo = $cust_pay->paymask;
103 % } elsif ( $payby eq 'CHEK' ) {
104 % my( $account, $aba ) = split('@', $cust_pay->paymask );
105 % $payinfo = "ABA $2, Acct #$1";
107 % $payinfo = $cust_pay->payinfo;
109 % my @cust_bill_pay = $cust_pay->cust_bill_pay;
110 % my @cust_pay_refund = $cust_pay->cust_pay_refund;
112 % my $target = "$payby$payinfo";
113 % $payby =~ s/^BILL$/Check #/ if $payinfo;
114 % $payby =~ s/^CHEK$/Electronic check /;
115 % $payby =~ s/^PREP$/Prepaid card /;
116 % $payby =~ s/^CARD$/Credit card #/;
117 % $payby =~ s/^COMP$/Complimentary by /;
118 % $payby =~ s/^CASH$/Cash/;
119 % $payby =~ s/^WEST$/Western Union/;
120 % $payby =~ s/^MCRD$/Manual credit card/;
121 % $payby =~ s/^BILL$//;
122 % my $info = $payby ? "($payby$payinfo)" : '';
124 % my( $pre, $post, $desc, $apply, $ext ) = ( '', '', '', '', '' );
125 % if ( scalar(@cust_bill_pay) == 0
126 % && scalar(@cust_pay_refund) == 0 ) {
127 % #completely unapplied
128 % $pre = '<B><FONT COLOR="#FF0000">Unapplied ';
129 % $post = '</FONT></B>';
130 % if ( $curuser->access_right('Apply payment') ) {
131 % $apply = qq! (<A HREF="javascript:void(0);" onClick="overlib( OLiframeContent('${p}edit/cust_bill_pay.cgi?!.
133 % qq!', 392, 336, 'cust_bill_pay_popup' ), CAPTION, 'Apply payment', STICKY, AUTOSTATUSCAP, MIDX, 0, MIDY, 0, DRAGGABLE, CLOSECLICK ); return false;">apply</A>)!;
135 % } elsif ( scalar(@cust_bill_pay) == 1
136 % && scalar(@cust_pay_refund) == 0
137 % && $cust_pay->unapplied == 0 ) {
138 % #applied to one invoice, the usual situation
139 % $desc = ' applied to Invoice #'. $cust_bill_pay[0]->invnum;
140 % } elsif ( scalar(@cust_bill_pay) == 0
141 % && scalar(@cust_pay_refund) == 1
142 % && $cust_pay->unapplied == 0 ) {
143 % #applied to one refund
144 % $desc = ' refunded on '. time2str("%D", $cust_pay_refund[0]->_date);
148 % foreach my $app ( sort { $a->_date <=> $b->_date }
149 % ( @cust_bill_pay, @cust_pay_refund ) ) {
150 % if ( $app->isa('FS::cust_bill_pay') ) {
151 % $desc .= ' '.
153 % ' applied to Invoice #'. $app->invnum.
155 % #' on '. time2str("%D", $cust_bill_pay->_date).
156 % } elsif ( $app->isa('FS::cust_pay_refund') ) {
157 % $desc .= ' '.
159 % ' refunded on '. time2str("%D", $app->_date).
162 % die "$app is not a FS::cust_bill_pay or FS::cust_pay_refund";
165 % if ( $cust_pay->unapplied > 0 ) {
166 % $desc .= ' '.
167 % '<B><FONT COLOR="#FF0000">$'.
168 % $cust_pay->unapplied. ' unapplied</FONT></B>';
169 % if ( $curuser->access_right('Apply payment') ) {
170 % $desc .= qq! (<A HREF="javascript:void(0);" onClick="overlib( OLiframeContent('${p}edit/cust_bill_pay.cgi?!.
172 % qq!', 392, 336, 'cust_bill_pay_popup' ), CAPTION, 'Apply payment', STICKY, AUTOSTATUSCAP, MIDX, 0, MIDY, 0, DRAGGABLE, CLOSECLICK ); return false;">apply</A>)!;
178 % my $view = qq! (<A HREF="javascript:void(0);" onClick="overlib( OLiframeContent('${p}view/cust_pay.html?link=popup;paynum=!.
180 % qq!', 540, 336, 'view_cust_pay_popup' ), CAPTION, 'Payment Receipt', STICKY, AUTOSTATUSCAP, MIDX, 0, MIDY, 0, DRAGGABLE, CLOSECLICK ); return false;">view receipt</A>)!;
183 % my $refund_days = $conf->config('card_refund-days') || 120;
184 % if ( $cust_pay->closed !~ /^Y/i
185 % && $cust_pay->payby =~ /^(CARD|CHEK)$/
186 % && time-$cust_pay->_date < $refund_days*86400
187 % && $cust_pay->unrefunded > 0
188 % && $curuser->access_right('Refund payment')
190 % $refund = qq! (<A HREF="${p}edit/cust_refund.cgi?payby=$1;!.
191 % qq!paynum=!. $cust_pay->paynum. '"'.
192 % qq! TITLE="Send a refund for this payment to the payment gateway"!.
197 % if ( $cust_pay->closed !~ /^Y/i
198 % && ( ( $cust_pay->payby eq 'CARD'
199 % && $curuser->access_right('Credit card void')
201 % || ( $cust_pay->payby eq 'CHEK'
202 % && $curuser->access_right('Echeck void')
204 % || ( $cust_pay->payby !~ /^(CARD|CHEK)$/
205 % && $curuser->access_right('Regular void')
210 % $void = qq! (<A HREF="javascript:areyousure('!.
211 % qq!${p}misc/void-cust_pay.cgi?!. $cust_pay->paynum.
212 % qq!', 'Are you sure you want to void this payment?')"!.
213 % qq! TITLE="Void this payment from the database!.
214 % ( $cust_pay->payby =~ /^(CARD|CHEK)$/
215 % ? ' (do not send anything to the payment gateway)'
222 % if ( $cust_pay->closed !~ /^Y/i
223 % && $conf->exists('deletepayments')
224 % && $curuser->access_right('Delete payment')
227 % $delete = qq! (<A HREF="javascript:areyousure('!.
228 % qq!${p}misc/delete-cust_pay.cgi?!. $cust_pay->paynum.
229 % qq!', 'Are you sure you want to delete this payment?')"!.
230 % qq! TITLE="Delete this payment from the database completely - not recommended"!.
235 % if ( $cust_pay->closed !~ /^Y/i
236 % && scalar(@cust_bill_pay)
237 % && $curuser->access_right('Unapply payment')
240 % $unapply = qq! (<A HREF="javascript:areyousure('!.
241 % qq!${p}misc/unapply-cust_pay.cgi?!. $cust_pay->paynum.
242 % qq!', 'Are you sure you want to unapply this payment?')"!.
243 % qq! TITLE="Keep this payment, but dissociate it from the invoices it is currently applied against"!.
247 % my $otaker = $cust_pay->otaker;
248 % $otaker = '<i>auto billing</i>' if $otaker eq 'fs_daily';
249 % $otaker = '<i>customer self-service</i>' if $otaker eq 'fs_selfservice';
252 % 'date' => $cust_pay->_date,
253 % 'desc' => $pre. "Payment$post by $otaker $info$desc".
254 % "$view$apply$refund$void$delete$unapply",
255 % 'payment' => $cust_pay->paid,
256 % 'target' => $target,
261 %foreach my $cust_pay_void ($cust_main->cust_pay_void) {
263 % my $payby = $cust_pay_void->payby;
264 % my $payinfo = $payby eq 'CARD'
265 % ? $cust_pay_void->paymask
266 % : $cust_pay_void->payinfo;
268 % $payby =~ s/^BILL$/Check #/ if $payinfo;
269 % $payby =~ s/^CHEK$/Electronic check /;
270 % $payby =~ s/^BILL$//;
271 % $payby =~ s/^(CARD|COMP)$/$1 /;
272 % my $info = $payby ? " ($payby$payinfo)" : '';
275 % if ( $cust_pay_void->closed !~ /^Y/i
276 % && $curuser->access_right('Unvoid')
279 % $unvoid = qq! (<A HREF="javascript:areyousure('!.
280 % qq!${p}misc/unvoid-cust_pay_void.cgi?!. $cust_pay_void->paynum.
281 % qq!', 'Are you sure you want to unvoid this payment?')"!.
282 % qq! TITLE="Unvoid this payment from the database!.
283 % ( $cust_pay_void->payby =~ /^(CARD|CHEK)$/
284 % ? ' (do not send anything to the payment gateway)'
291 % 'date' => $cust_pay_void->_date,
292 % 'desc' => "<DEL>Payment $info</DEL> <I>voided ".
293 % time2str("%D", $cust_pay_void->void_date).
294 % " by ". $cust_pay_void->otaker. '</i>'. $unvoid,
295 % 'void_payment' => $cust_pay_void->paid,
300 %#credits (some false laziness w/payments)
301 %foreach my $cust_credit ($cust_main->cust_credit) {
303 % my @cust_credit_bill = $cust_credit->cust_credit_bill;
304 % my @cust_credit_refund = $cust_credit->cust_credit_refund;
306 % my( $pre, $post, $desc, $apply, $ext ) = ( '', '', '', '', '' );
307 % if ( scalar(@cust_credit_bill) == 0
308 % && scalar(@cust_credit_refund) == 0 ) {
309 % #completely unapplied
310 % $pre = '<B><FONT COLOR="#FF0000">Unapplied ';
311 % $post = '</FONT></B>';
312 % if ( $curuser->access_right('Apply credit') ) {
313 % $apply = qq! (<A HREF="javascript:void(0);" onClick="overlib( OLiframeContent('${p}edit/cust_credit_bill.cgi?!.
314 % $cust_credit->crednum.
315 % qq!', 392, 336, 'cust_credit_bill_popup' ), CAPTION, 'Apply credit', STICKY, AUTOSTATUSCAP, MIDX, 0, MIDY, 0, DRAGGABLE, CLOSECLICK ); return false;">apply</A>)!;
317 % } elsif ( scalar(@cust_credit_bill) == 1
318 % && scalar(@cust_credit_refund) == 0
319 % && $cust_credit->credited == 0 ) {
320 % #applied to one invoice, the usual situation
321 % $desc = ' applied to Invoice #'. $cust_credit_bill[0]->invnum;
322 % } elsif ( scalar(@cust_credit_bill) == 0
323 % && scalar(@cust_credit_refund) == 1
324 % && $cust_credit->credited == 0 ) {
325 % #applied to one refund
326 % $desc = ' refunded on '. time2str("%D", $cust_credit_refund[0]->_date);
330 % foreach my $app ( sort { $a->_date <=> $b->_date }
331 % ( @cust_credit_bill, @cust_credit_refund ) ) {
332 % if ( $app->isa('FS::cust_credit_bill') ) {
333 % $desc .= ' '.
335 % ' applied to Invoice #'. $app->invnum.
337 % #' on '. time2str("%D", $app->_date).
338 % } elsif ( $app->isa('FS::cust_credit_refund') ) {
339 % $desc .= ' '.
341 % ' refunded on '. time2str("%D", $app->_date).
344 % die "$app is not a FS::cust_credit_bill or a FS::cust_credit_refund";
347 % if ( $cust_credit->credited > 0 ) {
348 % $desc .= ' <B><FONT COLOR="#FF0000">$'.
349 % $cust_credit->credited. ' unapplied</FONT></B>';
350 % if ( $curuser->access_right('Apply credit') ) {
351 % $desc .= qq! (<A HREF="javascript:void(0);" onClick="overlib( OLiframeContent('${p}edit/cust_credit_bill.cgi?!.
352 % $cust_credit->crednum.
353 % qq!', 392, 336, 'cust_credit_bill_popup' ), CAPTION, 'Apply credit', STICKY, AUTOSTATUSCAP, MIDX, 0, MIDY, 0, DRAGGABLE, CLOSECLICK ); return false;">apply</A>)!;
360 % if ( $cust_credit->closed !~ /^Y/i
362 % #s'pose deleting a credit isn't bad like deleting a payment
363 % # and this needs to be generally available until we have credit voiding..
364 % #&& $conf->exists('deletecredits')
366 % && $curuser->access_right('Delete credit')
369 % $delete = qq! (<A HREF="javascript:areyousure('!.
370 % qq!${p}misc/delete-cust_credit.cgi?!. $cust_credit->crednum.
371 % qq!', 'Are you sure you want to delete this credit?')">!.
376 % if ( $cust_credit->closed !~ /^Y/i
377 % && scalar(@cust_credit_bill)
378 % && $curuser->access_right('Unapply credit')
381 % $unapply = qq! (<A HREF="javascript:areyousure('!.
382 % qq!${p}misc/unapply-cust_credit.cgi?!. $cust_credit->crednum.
383 % qq!', 'Are you sure you want to unapply this credit?')">!.
388 % 'date' => $cust_credit->_date,
389 % 'desc' => $pre. "Credit$post by ". $cust_credit->otaker.
390 % ( $cust_credit->reason
391 % ? ' ('. $cust_credit->reason. ')'
394 % "$desc$apply$delete$unapply",
395 % 'credit' => $cust_credit->amount,
401 %foreach my $cust_refund ($cust_main->cust_refund) {
403 % my $payby = $cust_refund->payby;
404 % my $payinfo = $payby eq 'CARD'
405 % ? $cust_refund->paymask
406 % : $cust_refund->payinfo;
408 % $payby =~ s/^BILL$/Check #/ if $payinfo;
409 % $payby =~ s/^CHEK$/Electronic check /;
410 % $payby =~ s/^(CARD|COMP)$/$1 /;
413 % if ( $cust_refund->closed !~ /^Y/i
414 % && $conf->exists('deleterefunds')
415 % && $curuser->access_right('Delete refund')
418 % $delete = qq! (<A HREF="javascript:areyousure('!.
419 % qq!${p}misc/delete-cust_refund.cgi?!. $cust_refund->refundnum.
420 % qq!', 'Are you sure you want to delete this refund?')"!.
421 % qq! TITLE="Delete this refund from the database completely - not recommended"!.
426 % 'date' => $cust_refund->_date,
427 % 'desc' => "Refund ($payby$payinfo) by ". $cust_refund->otaker. "<BR>".
429 % 'refund' => $cust_refund->refund,
437 <% include("/elements/table-grid.html") %>
438 % my $bgcolor1 = '#eeeeee';
439 % my $bgcolor2 = '#ffffff';
445 <TH CLASS="grid" BGCOLOR="#cccccc">Date</TH>
446 <TH CLASS="grid" BGCOLOR="#cccccc">Description</TH>
447 <TH CLASS="grid" BGCOLOR="#cccccc"><FONT SIZE=-1>Charge</FONT></TH>
448 <TH CLASS="grid" BGCOLOR="#cccccc"><FONT SIZE=-1>Payment</FONT></TH>
449 <TH CLASS="grid" BGCOLOR="#cccccc"><FONT SIZE=-1>In-house<BR>Credit</FONT></TH>
450 <TH CLASS="grid" BGCOLOR="#cccccc"><FONT SIZE=-1>Refund</FONT></TH>
451 <TH CLASS="grid" BGCOLOR="#cccccc"><FONT SIZE=-1>Balance</FONT></TH>
454 %#display payment history
456 %sub balance_forward_row {
457 % my( $b, $date ) = @_;
458 % my $conf = new FS::Conf;
459 % my $money_char = $conf->config('money_char') || '$';
460 % ( my $balance_forward = $money_char. $b ) =~ s/^\$\-/- \$/;
462 <TR ID="balance_forward_row">
463 <TD CLASS="grid" BGCOLOR="#dddddd">
464 <% time2str("%D",$date) %>
467 <TD CLASS="grid" BGCOLOR="#dddddd">
468 <I>Starting balance on <% time2str("%D",$date) %></I>
469 (<A HREF="javascript:void(0);" onClick="show_history();">show prior history</A>)
472 <TD CLASS="grid" BGCOLOR="#dddddd"></TD>
473 <TD CLASS="grid" BGCOLOR="#dddddd"></TD>
474 <TD CLASS="grid" BGCOLOR="#dddddd"></TD>
475 <TD CLASS="grid" BGCOLOR="#dddddd"></TD>
476 <TD CLASS="grid" BGCOLOR="#dddddd"><I><% $balance_forward %></I></TD>
483 %my $money_char = $conf->config('money_char') || '$';
485 %my $years = $conf->config('payment_history-years') || 2;
486 %my $older_than = time - $years * 31556736; #60*60*24*365.24
489 %my $old_history = 0;
492 %foreach my $item ( sort { $a->{'date'} <=> $b->{'date'} } @history ) {
494 % $lastdate = $item->{'date'};
497 % if ( $item->{'date'} < $older_than ) {
498 % $display = ' STYLE="display:none" ';
504 % if ( $hidden && ! $seen++ ) {
505 % balance_forward_row($balance, $item->{'date'});
510 % if ( $bgcolor eq $bgcolor1 ) {
511 % $bgcolor = $bgcolor2;
513 % $bgcolor = $bgcolor1;
516 % my $charge = exists($item->{'charge'})
517 % ? sprintf("$money_char\%.2f", $item->{'charge'})
520 % my $payment = exists($item->{'payment'})
521 % ? sprintf("- $money_char\%.2f", $item->{'payment'})
524 % $payment ||= sprintf( "<DEL>- $money_char\%.2f</DEL>",
525 % $item->{'void_payment'}
527 % if exists($item->{'void_payment'});
529 % my $credit = exists($item->{'credit'})
530 % ? sprintf("- $money_char\%.2f", $item->{'credit'})
533 % my $refund = exists($item->{'refund'})
534 % ? sprintf("$money_char\%.2f", $item->{'refund'})
537 % my $target = exists($item->{'target'}) ? $item->{'target'} : '';
539 % $balance += $item->{'charge'} if exists $item->{'charge'};
540 % $balance -= $item->{'payment'} if exists $item->{'payment'};
541 % $balance -= $item->{'credit'} if exists $item->{'credit'};
542 % $balance += $item->{'refund'} if exists $item->{'refund'};
543 % $balance = sprintf("%.2f", $balance);
544 % $balance =~ s/^\-0\.00$/0.00/; #yay ieee fp
545 % ( my $showbalance = $money_char. $balance ) =~ s/^\$\-/- \$/;
550 <TR <% $display ? $display.' ID="old_history'.$old_history++.'"' : ''%>>
551 <TD CLASS="grid" BGCOLOR="<% $bgcolor %>">
552 % unless ( !$target || $target{$target}++ ) {
554 <A NAME="<% $target %>">
557 <% time2str("%D",$item->{'date'}) %>
558 % if ( $target && $target{$target} == 1 ) {
565 <TD CLASS="grid" BGCOLOR="<% $bgcolor %>">
566 <% $item->{'desc'} %>
568 <TD ALIGN="right" CLASS="grid" BGCOLOR="<% $bgcolor %>">
571 <TD ALIGN="right" CLASS="grid" BGCOLOR="<% $bgcolor %>">
574 <TD ALIGN="right" CLASS="grid" BGCOLOR="<% $bgcolor %>">
577 <TD ALIGN="right" CLASS="grid" BGCOLOR="<% $bgcolor %>">
580 <TD ALIGN="right" CLASS="grid" BGCOLOR="<% $bgcolor %>">
586 %if ( scalar(@history) && $hidden && ! $seen++ ) {
587 % balance_forward_row($balance, $lastdate);
592 <SCRIPT TYPE="text/javascript">
594 function show_history () {
595 //alert('showing history!');
597 var balance_forward_row = document.getElementById('balance_forward_row');
599 balance_forward_row.style.display = 'none';
600 for ( var i = 0; i < <% $old_history %>; i++ ) {
601 var oldRow = document.getElementById('old_history'+i);
602 oldRow.style.display = '';
611 my( $cust_main ) = @_;
612 my $custnum = $cust_main->custnum;
614 my $conf = new FS::Conf;
616 my $curuser = $FS::CurrentUser::CurrentUser;
618 my @payby = grep /\w/, $conf->config('payby');
619 #@payby = (qw( CARD DCRD CHEK DCHK LECB BILL CASH WEST COMP ))
620 @payby = (qw( CARD DCRD CHEK DCHK LECB BILL CASH COMP ))
622 my %payby = map { $_=>1 } @payby;
625 'Queued' => 'O', #Open
627 'Complete' => 'R', #Resolved