1 <& elements/search.html,
4 'menubar' => [ 'Add a payable' => '../edit/vend_bill.html', ],
5 'html_init' => $html_init,
7 'count_query' => $count_query,
8 'count_addl' => [ '$%.2f total', ],
17 sub { time2str('%D', shift->_date) },
18 sub { time2str('%D', shift->payment_date) },
19 sub { shift->vend_main->vendname },
20 sub { shift->vend_main->vend_class->classname },
22 sub { '<A HREF="javascript:areyousure('.
32 unless $FS::CurrentUser::CurrentUser->access_right('Configuration');
36 # begin/end/beginning/ending
37 my($beginning, $ending) = FS::UI::Web::parse_beginning_ending($cgi, '_date');
38 $search{'_date'} = [ $beginning, $ending ];
40 ($beginning, $ending) = FS::UI::Web::parse_beginning_ending($cgi, 'payment_date');
41 $search{'payment_date'} = [ $beginning, $ending ];
43 $search{'classnum'} = $cgi->param('classnum');
45 my $query = FS::vend_bill->search( \%search );
46 my $count_query = delete( $query->{'count_query'} );
48 my $html_init .= <<"END";
49 <SCRIPT TYPE="text/javascript">
50 function areyousure(vendbillnum) {
51 if ( confirm('Are you sure you want to delete this payable?') )
52 window.location.href="${p}misc/delete-vend_bill.html?" + vendbillnum;